@maestro_io/maestro-web-sdk 2.0.2 → 2.1.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 +4 -0
- package/dist/components/atoms/BaseButton/BaseButton.d.ts +2 -4
- package/dist/components/atoms/Image/index.d.ts +5 -1
- package/dist/components/atoms/Rive/index.d.ts +88 -0
- package/dist/components/atoms/SvgIcon/BetGeneralIcon.d.ts +4 -0
- package/dist/components/atoms/SvgIcon/BetsWarningIcon.d.ts +7 -0
- package/dist/components/atoms/SvgIcon/CheckmarkIcon.d.ts +4 -0
- package/dist/components/atoms/SvgIcon/CollapseIcon.d.ts +4 -0
- package/dist/components/atoms/SvgIcon/ExpandIcon.d.ts +4 -0
- package/dist/components/atoms/SvgIcon/FlameIcon.d.ts +7 -0
- package/dist/components/atoms/SvgIcon/Icon.d.ts +10 -0
- package/dist/components/atoms/SvgIcon/MobilePhoneIcon.d.ts +7 -0
- package/dist/components/atoms/SvgIcon/TimesIcon.d.ts +4 -0
- package/dist/components/core/OverlayContainer.d.ts +3 -0
- package/dist/components/core/PanelManager/PanelManager.d.ts +1 -0
- package/dist/components/core/ScrollableContainer/FocusableItem.d.ts +6 -0
- package/dist/components/core/ScrollableContainer/ScrollableContainer.d.ts +75 -0
- package/dist/components/core/ScrollableContainer/index.d.ts +2 -0
- package/dist/components/molecules/ActionButton/ActionButton.d.ts +5 -8
- package/dist/components/molecules/Overlay/Overlay.d.ts +34 -0
- package/dist/components/molecules/Overlay/index.d.ts +2 -0
- package/dist/components/molecules/PanelNavButton/PanelNavButton.d.ts +40 -91
- package/dist/components/molecules/SegmentButton/SegmentButton.d.ts +6 -7
- package/dist/components/organisms/PanelNavigation/PanelNavigation.d.ts +7 -0
- package/dist/components/organisms/SegmentController/SegmentController.d.ts +19 -5
- package/dist/components/organisms/SegmentController/index.d.ts +2 -1
- package/dist/external/AxiosNetworkClient.d.ts +8 -3
- package/dist/external/LocalStorageCacheManager.d.ts +63 -8
- package/dist/external/mocks/MockExternalNetworkClient.d.ts +90 -0
- package/dist/external/ports/cacheManager.d.ts +3 -1
- package/dist/external/ports/networkClient.d.ts +1 -1
- package/dist/external/spatial-navigation/spatialNavigation.d.ts +13 -22
- package/dist/external/spatial-navigation/utils.d.ts +5 -0
- package/dist/external/spatial-navigation/withFocusable.d.ts +12 -17
- package/dist/index.d.ts +22 -11
- package/dist/interfaces/IMaestroEvent.d.ts +9 -0
- package/dist/interfaces/IMaestroEventDelegate.d.ts +17 -0
- package/dist/interfaces/IMaestroManager.d.ts +33 -20
- package/dist/maestro-web-sdk.umd.js +10 -1
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/models/IWinningBet.d.ts +7 -0
- package/dist/modules/bets/interfaces/IBets.d.ts +190 -0
- package/dist/modules/bets/mocks.d.ts +2 -0
- package/dist/modules/bets/view/BetsView.d.ts +23 -0
- package/dist/modules/bets/view/HotProps/HotPropsView.d.ts +53 -0
- package/dist/modules/bets/view/SixPack/SixPackView.d.ts +20 -0
- package/dist/modules/bets/view/TabLoadFailureView.d.ts +46 -0
- package/dist/modules/bets/view/UserBets/BetResult/BetResult.d.ts +6 -0
- package/dist/modules/bets/view/UserBets/BetsCard/BetsCard.d.ts +53 -0
- package/dist/modules/bets/view/UserBets/BetsCard/BetsCardEvent.d.ts +24 -0
- package/dist/modules/bets/view/UserBets/BetsCard/BetsCardFooter.d.ts +7 -0
- package/dist/modules/bets/view/UserBets/Boost/Boost.d.ts +7 -0
- package/dist/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.d.ts +7 -0
- package/dist/modules/bets/view/UserBets/Parlay/Parlay.d.ts +8 -0
- package/dist/modules/bets/view/UserBets/Straight/Straight.d.ts +7 -0
- package/dist/modules/bets/view/UserBets/Teaser/Teaser.d.ts +7 -0
- package/dist/modules/bets/view/UserBets/UserBetsView.d.ts +26 -0
- package/dist/modules/bets/view/components/Bet/Bet.d.ts +62 -0
- package/dist/modules/bets/view/components/BetPill/BetPill.d.ts +6 -0
- package/dist/modules/bets/view/components/BetsCard/BetsCard.d.ts +10 -0
- package/dist/modules/bets/view/components/BetsCard/BetsCardHeader.d.ts +16 -0
- package/dist/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.d.ts +8 -0
- package/dist/modules/bets/view/components/LocationWarning/LocationWarning.d.ts +10 -0
- package/dist/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.d.ts +22 -0
- package/dist/modules/bets/view/components/PromoCodeBanner/index.d.ts +2 -0
- package/dist/modules/bets/view-model/BetsViewModel.d.ts +179 -0
- package/dist/modules/key-plays/view/KeyPlayCardView.d.ts +28 -102
- package/dist/modules/key-plays/view/KeyPlaysView.d.ts +1 -4
- package/dist/services/BetsService.d.ts +61 -0
- package/dist/services/NetworkManager/NetworkManager.d.ts +131 -0
- package/dist/services/NetworkManager/errors.d.ts +17 -0
- package/dist/types/OverlayTypes.d.ts +43 -0
- package/dist/view-models/MaestroEventViewModel.d.ts +5 -1
- package/dist/view-models/OverlayViewModel.d.ts +33 -0
- package/dist/view-models/index.d.ts +2 -0
- package/package.json +5 -4
- package/dist/components/molecules/ScrollableGradient/ScrollableGradient.d.ts +0 -11
- package/dist/components/molecules/ScrollableGradient/index.d.ts +0 -2
- package/dist/helpers/withRemoteControl.d.ts +0 -47
- package/dist/services/NetworkManager.d.ts +0 -13
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
export interface ITeam {
|
|
2
|
+
id: string;
|
|
3
|
+
uid: string;
|
|
4
|
+
guid: string;
|
|
5
|
+
slug: string;
|
|
6
|
+
abbreviation: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
shortDisplayName: string;
|
|
9
|
+
name: string;
|
|
10
|
+
nickname: string;
|
|
11
|
+
location: string;
|
|
12
|
+
color: string;
|
|
13
|
+
alternateColor: string;
|
|
14
|
+
favored: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface IOddsValue {
|
|
17
|
+
/** "-110", "+138", "EVEN", etc. */
|
|
18
|
+
odds: string;
|
|
19
|
+
/** Team ID reference */
|
|
20
|
+
team?: string;
|
|
21
|
+
/** "home", "away", "over", "under" */
|
|
22
|
+
type: string;
|
|
23
|
+
/** "WIN", "LOSS" (for closed bets) */
|
|
24
|
+
outcome?: string;
|
|
25
|
+
/** "o41.5", "u41.5", "+2.5", "-2.5" (for totals and spreads) */
|
|
26
|
+
line?: string;
|
|
27
|
+
}
|
|
28
|
+
interface IOdds {
|
|
29
|
+
/** "Moneyline", "Total Points", "Spread" */
|
|
30
|
+
displayName: string;
|
|
31
|
+
/** "ML", "Total", "Spread" */
|
|
32
|
+
abbreviation: string;
|
|
33
|
+
/** "moneyline", "total", "pointSpread" */
|
|
34
|
+
type: string;
|
|
35
|
+
/** "open", "close" */
|
|
36
|
+
state: string;
|
|
37
|
+
/** Values for this bet type (usually 2 options) */
|
|
38
|
+
values: IOddsValue[];
|
|
39
|
+
}
|
|
40
|
+
export interface IHotPropsSelection {
|
|
41
|
+
id: string;
|
|
42
|
+
/** "Over 5.5", "Under 5.5" */
|
|
43
|
+
text: string;
|
|
44
|
+
/** "over", "under" */
|
|
45
|
+
type: string;
|
|
46
|
+
/** "closed" */
|
|
47
|
+
status: string;
|
|
48
|
+
odds: {
|
|
49
|
+
/** "+750", "-3000" */
|
|
50
|
+
current?: string;
|
|
51
|
+
};
|
|
52
|
+
/** "WIN", "LOSS" */
|
|
53
|
+
outcome?: string;
|
|
54
|
+
/** URL to icon */
|
|
55
|
+
icon?: string;
|
|
56
|
+
/** URL to dark mode icon */
|
|
57
|
+
iconDark?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface IHotProps {
|
|
60
|
+
id: string;
|
|
61
|
+
/** "Carlos Santana Total Hits + Runs + RBIs" */
|
|
62
|
+
text: string;
|
|
63
|
+
/** ISO date string */
|
|
64
|
+
date: string;
|
|
65
|
+
selections: IHotPropsSelection[];
|
|
66
|
+
}
|
|
67
|
+
export type IBetsResponse = {
|
|
68
|
+
entities: {
|
|
69
|
+
teams: Record<string, ITeam>;
|
|
70
|
+
};
|
|
71
|
+
/** Featured bets (may not always be present) */
|
|
72
|
+
featured?: IHotProps[];
|
|
73
|
+
} & Partial<BetLiveEvent>;
|
|
74
|
+
export interface IBetLeg {
|
|
75
|
+
id: string;
|
|
76
|
+
marketId?: string;
|
|
77
|
+
marketSelectionId?: string;
|
|
78
|
+
marketType?: string;
|
|
79
|
+
/** "PENDING", "WIN", etc. */
|
|
80
|
+
status: string;
|
|
81
|
+
/** "+370", "+265", etc. */
|
|
82
|
+
odds: string;
|
|
83
|
+
/** "NONE", "ODDS_BOOST" */
|
|
84
|
+
boostType?: string;
|
|
85
|
+
/** Human-readable description */
|
|
86
|
+
selectionText: string;
|
|
87
|
+
/** "list", "over", etc. */
|
|
88
|
+
type: string;
|
|
89
|
+
/** Market description */
|
|
90
|
+
marketText?: string;
|
|
91
|
+
icon?: string;
|
|
92
|
+
iconDark?: string;
|
|
93
|
+
/** Deep link URL */
|
|
94
|
+
url?: string;
|
|
95
|
+
/** "LIVE", "UPCOMING", etc. */
|
|
96
|
+
marketStatus?: string;
|
|
97
|
+
/** Point value for totals */
|
|
98
|
+
points?: string;
|
|
99
|
+
accrued?: {
|
|
100
|
+
/** Accrued goal value */
|
|
101
|
+
goal: number;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export interface IBetEvent {
|
|
105
|
+
/** Event name */
|
|
106
|
+
displayName: string;
|
|
107
|
+
/** Bet legs for this event */
|
|
108
|
+
legs: IBetLeg[];
|
|
109
|
+
}
|
|
110
|
+
export interface IUserBet {
|
|
111
|
+
id: string;
|
|
112
|
+
/** "STRAIGHT", "PARLAY" */
|
|
113
|
+
type: string;
|
|
114
|
+
/** "OPEN", "SETTLED" */
|
|
115
|
+
betStatus: string;
|
|
116
|
+
/** "PENDING", "WIN" */
|
|
117
|
+
outcome: string;
|
|
118
|
+
/** "NOT_SET" */
|
|
119
|
+
overrideOutcome: string;
|
|
120
|
+
/** "10", "2", etc. */
|
|
121
|
+
betAmount: string;
|
|
122
|
+
/** "171.55", "12.00", etc. */
|
|
123
|
+
payoutAmount: string;
|
|
124
|
+
/** "+1616", "+500", etc. */
|
|
125
|
+
odds: string;
|
|
126
|
+
/** ISO date string */
|
|
127
|
+
startTime: string;
|
|
128
|
+
/** ISO date string (for settled bets) */
|
|
129
|
+
closedAtTime?: string;
|
|
130
|
+
/** Events in this bet */
|
|
131
|
+
events: IBetEvent[];
|
|
132
|
+
rewardInfo: {
|
|
133
|
+
/** "NONE", "ODDS_BOOST" */
|
|
134
|
+
type: string;
|
|
135
|
+
icon?: {
|
|
136
|
+
/** URL to light mode icon */
|
|
137
|
+
light: string;
|
|
138
|
+
/** URL to dark mode icon */
|
|
139
|
+
dark: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
/** Number of legs in the bet */
|
|
143
|
+
legCount: number;
|
|
144
|
+
/** Whether the bet is no action */
|
|
145
|
+
isNoAction: boolean;
|
|
146
|
+
/** "to win", "you won", etc. */
|
|
147
|
+
betDisplayStatement: string;
|
|
148
|
+
}
|
|
149
|
+
export type BetLiveEvent = {
|
|
150
|
+
/** Event ID */
|
|
151
|
+
id: string;
|
|
152
|
+
/** "football", "basketball", etc. */
|
|
153
|
+
sport: string;
|
|
154
|
+
/** ISO date string */
|
|
155
|
+
date: string;
|
|
156
|
+
/** 'pre' | 'live' | 'post' | 'in' */
|
|
157
|
+
gameState: string;
|
|
158
|
+
bets: {
|
|
159
|
+
odds: IOdds[];
|
|
160
|
+
};
|
|
161
|
+
featured?: IHotProps[];
|
|
162
|
+
};
|
|
163
|
+
export interface IPersonalizedBetsResponse extends IBetsResponse {
|
|
164
|
+
/** Current Live event data */
|
|
165
|
+
event?: BetLiveEvent;
|
|
166
|
+
betsModule?: {
|
|
167
|
+
/** "live", etc. */
|
|
168
|
+
defaultTab: string;
|
|
169
|
+
upcoming: IUserBet[];
|
|
170
|
+
live: IUserBet[];
|
|
171
|
+
settled: IUserBet[];
|
|
172
|
+
};
|
|
173
|
+
promos?: {
|
|
174
|
+
/** "FIRST BET RESET" */
|
|
175
|
+
title: string;
|
|
176
|
+
/** Promo description */
|
|
177
|
+
description: string;
|
|
178
|
+
/** URL to logo */
|
|
179
|
+
logo: string;
|
|
180
|
+
/** URL to QR code */
|
|
181
|
+
qrCode: string;
|
|
182
|
+
};
|
|
183
|
+
disclaimers?: {
|
|
184
|
+
/** Location-specific disclaimer */
|
|
185
|
+
location: string;
|
|
186
|
+
/** Gambling disclaimer */
|
|
187
|
+
gambling: string;
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import './BetsView.styles.css';
|
|
3
|
+
import { BetItem, BetsErrorState } from '../view-model/BetsViewModel';
|
|
4
|
+
interface BetsViewState {
|
|
5
|
+
container: HTMLDivElement | null;
|
|
6
|
+
betsItems: BetItem[];
|
|
7
|
+
isDataLoading: boolean;
|
|
8
|
+
errorState: BetsErrorState;
|
|
9
|
+
}
|
|
10
|
+
declare class BetsView extends Component<{}, BetsViewState> {
|
|
11
|
+
private container;
|
|
12
|
+
private betsItemsUnsub;
|
|
13
|
+
private isDataLoadingUnsub;
|
|
14
|
+
private errorStateUnsub;
|
|
15
|
+
private vm;
|
|
16
|
+
constructor(props: {});
|
|
17
|
+
componentDidMount(): void;
|
|
18
|
+
componentWillUnmount(): void;
|
|
19
|
+
renderBetItem: (item: BetItem) => React.JSX.Element | null;
|
|
20
|
+
clearTabLoadFailure: () => void;
|
|
21
|
+
render(): React.JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
export default BetsView;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/// <reference types="prop-types" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
4
|
+
import { Details, Direction, Layout } from '@/external/spatial-navigation/utils';
|
|
5
|
+
import './HotPropsView.css';
|
|
6
|
+
import { HotPropsBetItem } from '../../view-model/BetsViewModel';
|
|
7
|
+
type HotPropsViewProps = {
|
|
8
|
+
item: HotPropsBetItem;
|
|
9
|
+
hasFocusedChild?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: {
|
|
12
|
+
new (props?: (HotPropsViewProps & WithFocusableProps) | undefined, context?: any): {
|
|
13
|
+
state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
14
|
+
getChildContext(): {
|
|
15
|
+
parentFocusKey: string;
|
|
16
|
+
};
|
|
17
|
+
setFocus: (focusKey: string) => void;
|
|
18
|
+
navigateByDirection: (direction: Direction, details?: Record<string, any>) => void;
|
|
19
|
+
stealFocus: () => void;
|
|
20
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
21
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
22
|
+
onEnterPressHandler: (details: Details) => void;
|
|
23
|
+
onEnterReleaseHandler: () => void;
|
|
24
|
+
onBackPressHandler: (details: Details) => void;
|
|
25
|
+
onArrowPressHandler: (direction: Direction, details: Details) => boolean | void;
|
|
26
|
+
onBecameFocusedHandler: (layout: Layout, details: Details) => void;
|
|
27
|
+
onBecameBlurredHandler: (layout: Layout, details: Details) => void;
|
|
28
|
+
componentDidMount(): void;
|
|
29
|
+
componentDidUpdate(): void;
|
|
30
|
+
componentWillUnmount(): void;
|
|
31
|
+
render(): React.ReactElement<HotPropsViewProps & WithFocusableProps>;
|
|
32
|
+
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: HotPropsViewProps & 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;
|
|
33
|
+
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
34
|
+
props: Readonly<{
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
}> & Readonly<HotPropsViewProps & WithFocusableProps>;
|
|
37
|
+
context: any;
|
|
38
|
+
refs: {
|
|
39
|
+
[key: string]: React.ReactInstance;
|
|
40
|
+
};
|
|
41
|
+
componentWillMount?(): void;
|
|
42
|
+
componentWillReceiveProps?(nextProps: Readonly<HotPropsViewProps & WithFocusableProps>, nextContext: any): void;
|
|
43
|
+
shouldComponentUpdate?(nextProps: Readonly<HotPropsViewProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
44
|
+
componentWillUpdate?(nextProps: Readonly<HotPropsViewProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
45
|
+
};
|
|
46
|
+
contextTypes: {
|
|
47
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
48
|
+
};
|
|
49
|
+
childContextTypes: {
|
|
50
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './SixPackView.style.css';
|
|
3
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
4
|
+
import { Details, Direction, Layout } from '@/external/spatial-navigation/utils';
|
|
5
|
+
import { SixPackBetItem } from '../../view-model/BetsViewModel';
|
|
6
|
+
type Props = WithFocusableProps & {
|
|
7
|
+
item: SixPackBetItem;
|
|
8
|
+
};
|
|
9
|
+
export default class FocusableSixPackViewWrapper extends React.Component<Props> {
|
|
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
|
+
onBecameFocused: (layout: Layout) => void;
|
|
17
|
+
onArrowPress: (d: Direction, _props: any, details: Details) => void;
|
|
18
|
+
render(): React.JSX.Element;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="prop-types" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
new (props?: (object & WithFocusableProps) | undefined, context?: any): {
|
|
6
|
+
state: import("../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
7
|
+
getChildContext(): {
|
|
8
|
+
parentFocusKey: string;
|
|
9
|
+
};
|
|
10
|
+
setFocus: (focusKey: string) => void;
|
|
11
|
+
navigateByDirection: (direction: import("../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
12
|
+
stealFocus: () => void;
|
|
13
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
14
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
15
|
+
onEnterPressHandler: (details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
16
|
+
onEnterReleaseHandler: () => void;
|
|
17
|
+
onBackPressHandler: (details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
18
|
+
onArrowPressHandler: (direction: import("../../../external/spatial-navigation/utils").Direction, details: import("../../../external/spatial-navigation/utils").Details) => boolean | void;
|
|
19
|
+
onBecameFocusedHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
20
|
+
onBecameBlurredHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
21
|
+
componentDidMount(): void;
|
|
22
|
+
componentDidUpdate(): void;
|
|
23
|
+
componentWillUnmount(): void;
|
|
24
|
+
render(): React.ReactElement<object & WithFocusableProps>;
|
|
25
|
+
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: object & 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;
|
|
26
|
+
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
27
|
+
props: Readonly<{
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
}> & Readonly<object & WithFocusableProps>;
|
|
30
|
+
context: any;
|
|
31
|
+
refs: {
|
|
32
|
+
[key: string]: React.ReactInstance;
|
|
33
|
+
};
|
|
34
|
+
componentWillMount?(): void;
|
|
35
|
+
componentWillReceiveProps?(nextProps: Readonly<object & WithFocusableProps>, nextContext: any): void;
|
|
36
|
+
shouldComponentUpdate?(nextProps: Readonly<object & WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
37
|
+
componentWillUpdate?(nextProps: Readonly<object & WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
38
|
+
};
|
|
39
|
+
contextTypes: {
|
|
40
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
41
|
+
};
|
|
42
|
+
childContextTypes: {
|
|
43
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/// <reference types="prop-types" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
4
|
+
import { Details, Direction, Layout } from '@/external/spatial-navigation/utils';
|
|
5
|
+
import { IUserBet } from '@/modules/bets/interfaces/IBets';
|
|
6
|
+
export declare const EVENTS_COUNT_THRESHOLD = 3;
|
|
7
|
+
export type BaseBetCardProps = {
|
|
8
|
+
bet: IUserBet;
|
|
9
|
+
renderHeaderContent?: (props: WithFocusableProps) => React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: {
|
|
12
|
+
new (props?: (BaseBetCardProps & WithFocusableProps) | undefined, context?: any): {
|
|
13
|
+
state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
14
|
+
getChildContext(): {
|
|
15
|
+
parentFocusKey: string;
|
|
16
|
+
};
|
|
17
|
+
setFocus: (focusKey: string) => void;
|
|
18
|
+
navigateByDirection: (direction: Direction, details?: Record<string, any>) => void;
|
|
19
|
+
stealFocus: () => void;
|
|
20
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
21
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
22
|
+
onEnterPressHandler: (details: Details) => void;
|
|
23
|
+
onEnterReleaseHandler: () => void;
|
|
24
|
+
onBackPressHandler: (details: Details) => void;
|
|
25
|
+
onArrowPressHandler: (direction: Direction, details: Details) => boolean | void;
|
|
26
|
+
onBecameFocusedHandler: (layout: Layout, details: Details) => void;
|
|
27
|
+
onBecameBlurredHandler: (layout: Layout, details: Details) => void;
|
|
28
|
+
componentDidMount(): void;
|
|
29
|
+
componentDidUpdate(): void;
|
|
30
|
+
componentWillUnmount(): void;
|
|
31
|
+
render(): React.ReactElement<BaseBetCardProps & WithFocusableProps>;
|
|
32
|
+
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: BaseBetCardProps & 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;
|
|
33
|
+
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
34
|
+
props: Readonly<{
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
}> & Readonly<BaseBetCardProps & WithFocusableProps>;
|
|
37
|
+
context: any;
|
|
38
|
+
refs: {
|
|
39
|
+
[key: string]: React.ReactInstance;
|
|
40
|
+
};
|
|
41
|
+
componentWillMount?(): void;
|
|
42
|
+
componentWillReceiveProps?(nextProps: Readonly<BaseBetCardProps & WithFocusableProps>, nextContext: any): void;
|
|
43
|
+
shouldComponentUpdate?(nextProps: Readonly<BaseBetCardProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
44
|
+
componentWillUpdate?(nextProps: Readonly<BaseBetCardProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
45
|
+
};
|
|
46
|
+
contextTypes: {
|
|
47
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
48
|
+
};
|
|
49
|
+
childContextTypes: {
|
|
50
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IUserBet } from '@/modules/bets/interfaces/IBets';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Details, Direction, Layout } from '@/external/spatial-navigation/utils';
|
|
4
|
+
type BetsCardEventProps = {
|
|
5
|
+
event: IUserBet['events'][number];
|
|
6
|
+
betsFocusable: boolean;
|
|
7
|
+
betId: string;
|
|
8
|
+
parentFocusKey: string;
|
|
9
|
+
eventIndex: number;
|
|
10
|
+
betType: string;
|
|
11
|
+
onBetArrowPress: (eventIndex: number, legIndex: number) => (direction: Direction, props: any, details: Details) => void;
|
|
12
|
+
onBetBackPress: () => void;
|
|
13
|
+
};
|
|
14
|
+
declare class BetsCardEvent extends React.Component<BetsCardEventProps> {
|
|
15
|
+
static contextTypes: {
|
|
16
|
+
refsMap: React.Requireable<any>;
|
|
17
|
+
setRef: React.Requireable<any>;
|
|
18
|
+
scrollToFocusedElement: React.Requireable<any>;
|
|
19
|
+
};
|
|
20
|
+
context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
|
|
21
|
+
onBecameFocused: (layout: Layout) => void;
|
|
22
|
+
render(): React.JSX.Element;
|
|
23
|
+
}
|
|
24
|
+
export default BetsCardEvent;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SegmentItem } from '@/components/organisms/SegmentController/SegmentController';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './UserBetsView.styles.css';
|
|
4
|
+
import { IUserBet } from '../../interfaces/IBets';
|
|
5
|
+
import { UserBetsBetItem } from '../../view-model/BetsViewModel';
|
|
6
|
+
export type Segments = 'live' | 'settled' | 'upcoming';
|
|
7
|
+
type UserBetsViewProps = {
|
|
8
|
+
item: UserBetsBetItem;
|
|
9
|
+
};
|
|
10
|
+
declare class UserBetsView extends React.Component<UserBetsViewProps, {
|
|
11
|
+
activeSegment: string;
|
|
12
|
+
}> {
|
|
13
|
+
state: {
|
|
14
|
+
activeSegment: string;
|
|
15
|
+
};
|
|
16
|
+
setSegment: (segment: Segments) => () => void;
|
|
17
|
+
segmentItems: (SegmentItem & {
|
|
18
|
+
type: Segments;
|
|
19
|
+
})[];
|
|
20
|
+
onSegmentChange: (segment: Segments) => void;
|
|
21
|
+
renderBet: (bet: IUserBet) => React.JSX.Element | null;
|
|
22
|
+
renderBets: () => React.JSX.Element | (React.JSX.Element | null)[];
|
|
23
|
+
get bets(): IUserBet[] | null;
|
|
24
|
+
render(): React.JSX.Element;
|
|
25
|
+
}
|
|
26
|
+
export default UserBetsView;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/// <reference types="prop-types" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './Bet.styles.css';
|
|
4
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
5
|
+
import { IBetLeg } from '@/modules/bets/interfaces/IBets';
|
|
6
|
+
declare const _default: {
|
|
7
|
+
new (props?: ({
|
|
8
|
+
leg: IBetLeg;
|
|
9
|
+
} & WithFocusableProps) | undefined, context?: any): {
|
|
10
|
+
state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
11
|
+
getChildContext(): {
|
|
12
|
+
parentFocusKey: string;
|
|
13
|
+
};
|
|
14
|
+
setFocus: (focusKey: string) => void;
|
|
15
|
+
navigateByDirection: (direction: import("../../../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
16
|
+
stealFocus: () => void;
|
|
17
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
18
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
19
|
+
onEnterPressHandler: (details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
20
|
+
onEnterReleaseHandler: () => void;
|
|
21
|
+
onBackPressHandler: (details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
22
|
+
onArrowPressHandler: (direction: import("../../../../../external/spatial-navigation/utils").Direction, details: import("../../../../../external/spatial-navigation/utils").Details) => boolean | void;
|
|
23
|
+
onBecameFocusedHandler: (layout: import("../../../../../external/spatial-navigation/utils").Layout, details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
24
|
+
onBecameBlurredHandler: (layout: import("../../../../../external/spatial-navigation/utils").Layout, details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
25
|
+
componentDidMount(): void;
|
|
26
|
+
componentDidUpdate(): void;
|
|
27
|
+
componentWillUnmount(): void;
|
|
28
|
+
render(): React.ReactElement<{
|
|
29
|
+
leg: IBetLeg;
|
|
30
|
+
} & 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: {
|
|
32
|
+
leg: IBetLeg;
|
|
33
|
+
} & 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;
|
|
34
|
+
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
35
|
+
props: Readonly<{
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
}> & Readonly<{
|
|
38
|
+
leg: IBetLeg;
|
|
39
|
+
} & WithFocusableProps>;
|
|
40
|
+
context: any;
|
|
41
|
+
refs: {
|
|
42
|
+
[key: string]: React.ReactInstance;
|
|
43
|
+
};
|
|
44
|
+
componentWillMount?(): void;
|
|
45
|
+
componentWillReceiveProps?(nextProps: Readonly<{
|
|
46
|
+
leg: IBetLeg;
|
|
47
|
+
} & WithFocusableProps>, nextContext: any): void;
|
|
48
|
+
shouldComponentUpdate?(nextProps: Readonly<{
|
|
49
|
+
leg: IBetLeg;
|
|
50
|
+
} & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
51
|
+
componentWillUpdate?(nextProps: Readonly<{
|
|
52
|
+
leg: IBetLeg;
|
|
53
|
+
} & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
54
|
+
};
|
|
55
|
+
contextTypes: {
|
|
56
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
57
|
+
};
|
|
58
|
+
childContextTypes: {
|
|
59
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './BetsCard.styles.css';
|
|
3
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
4
|
+
export type BetsCardProps = {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
header: (props: BetsCardProps & WithFocusableProps) => React.ReactNode;
|
|
7
|
+
footer: (props: BetsCardProps & WithFocusableProps) => React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: React.ComponentType<BetsCardProps & WithFocusableProps>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
3
|
+
type BetsCardHeaderProps = {
|
|
4
|
+
betCardProps: WithFocusableProps;
|
|
5
|
+
cardExpanded: boolean;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
legCountThreshold?: number;
|
|
8
|
+
overrideOutcome?: string;
|
|
9
|
+
outcome?: string;
|
|
10
|
+
betType: string;
|
|
11
|
+
renderIcon?: () => React.ReactNode;
|
|
12
|
+
iconUrl?: string;
|
|
13
|
+
legCount?: number;
|
|
14
|
+
};
|
|
15
|
+
declare const BetsCardHeader: (props: BetsCardHeaderProps) => React.JSX.Element;
|
|
16
|
+
export default BetsCardHeader;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './LocationWarning.styles.css';
|
|
3
|
+
interface LocationWarningProps {
|
|
4
|
+
/** Location disclaimer text from API, falls back to default if not provided */
|
|
5
|
+
disclaimerText?: string;
|
|
6
|
+
}
|
|
7
|
+
declare class LocationWarning extends React.Component<LocationWarningProps> {
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
|
+
}
|
|
10
|
+
export default LocationWarning;
|