@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
|
@@ -3,7 +3,11 @@ import IMaestroEventDelegate from './interfaces/IMaestroEventDelegate';
|
|
|
3
3
|
* Our own implementation of the IMaestroEventDelegate interface. Useful for Development and Testing
|
|
4
4
|
*/
|
|
5
5
|
export default class MaestroEventDelegate implements IMaestroEventDelegate {
|
|
6
|
+
getBettingAPIBaseURL(): string;
|
|
6
7
|
userRequestedNewKeyPlaysData(): Promise<void>;
|
|
7
8
|
startFocusManagement(): Promise<void>;
|
|
9
|
+
userIsAuthenticated(): Promise<boolean>;
|
|
10
|
+
getUserSWID(): Promise<string | null>;
|
|
11
|
+
getUserToken(): Promise<string | null>;
|
|
8
12
|
playClip(atIndex: number): void;
|
|
9
13
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare class BaseButton extends React.Component<BaseButtonProps> {
|
|
6
|
-
constructor(props: BaseButtonProps);
|
|
3
|
+
import './BaseButton.styles.css';
|
|
4
|
+
declare class BaseButton extends React.Component<ButtonHTMLAttributes<HTMLButtonElement>> {
|
|
7
5
|
render(): React.JSX.Element;
|
|
8
6
|
}
|
|
9
7
|
export default BaseButton;
|
|
@@ -3,7 +3,11 @@ import { ImgHTMLAttributes } from 'react';
|
|
|
3
3
|
interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
4
4
|
}
|
|
5
5
|
declare class Image extends React.Component<ImageProps> {
|
|
6
|
+
state: {
|
|
7
|
+
failed: boolean;
|
|
8
|
+
};
|
|
6
9
|
constructor(props: ImageProps);
|
|
7
|
-
|
|
10
|
+
handleError: () => void;
|
|
11
|
+
render(): React.JSX.Element | null;
|
|
8
12
|
}
|
|
9
13
|
export default Image;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/// <reference types="prop-types" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
new (props?: (React.CanvasHTMLAttributes<HTMLCanvasElement> & {
|
|
6
|
+
id: string;
|
|
7
|
+
autoFocus: boolean;
|
|
8
|
+
autoPlay: boolean;
|
|
9
|
+
src: string;
|
|
10
|
+
onLoadRiveInstance: (riveInstance: any) => void;
|
|
11
|
+
} & WithFocusableProps) | undefined, context?: any): {
|
|
12
|
+
state: import("../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
13
|
+
getChildContext(): {
|
|
14
|
+
parentFocusKey: string;
|
|
15
|
+
};
|
|
16
|
+
setFocus: (focusKey: string) => void;
|
|
17
|
+
navigateByDirection: (direction: import("../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
18
|
+
stealFocus: () => void;
|
|
19
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
20
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
21
|
+
onEnterPressHandler: (details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
22
|
+
onEnterReleaseHandler: () => void;
|
|
23
|
+
onBackPressHandler: (details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
24
|
+
onArrowPressHandler: (direction: import("../../../external/spatial-navigation/utils").Direction, details: import("../../../external/spatial-navigation/utils").Details) => boolean | void;
|
|
25
|
+
onBecameFocusedHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
26
|
+
onBecameBlurredHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
27
|
+
componentDidMount(): void;
|
|
28
|
+
componentDidUpdate(): void;
|
|
29
|
+
componentWillUnmount(): void;
|
|
30
|
+
render(): React.ReactElement<React.CanvasHTMLAttributes<HTMLCanvasElement> & {
|
|
31
|
+
id: string;
|
|
32
|
+
autoFocus: boolean;
|
|
33
|
+
autoPlay: boolean;
|
|
34
|
+
src: string;
|
|
35
|
+
onLoadRiveInstance: (riveInstance: any) => void;
|
|
36
|
+
} & WithFocusableProps>;
|
|
37
|
+
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: React.CanvasHTMLAttributes<HTMLCanvasElement> & {
|
|
38
|
+
id: string;
|
|
39
|
+
autoFocus: boolean;
|
|
40
|
+
autoPlay: boolean;
|
|
41
|
+
src: string;
|
|
42
|
+
onLoadRiveInstance: (riveInstance: any) => void;
|
|
43
|
+
} & 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;
|
|
44
|
+
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
45
|
+
props: Readonly<{
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
}> & Readonly<React.CanvasHTMLAttributes<HTMLCanvasElement> & {
|
|
48
|
+
id: string;
|
|
49
|
+
autoFocus: boolean;
|
|
50
|
+
autoPlay: boolean;
|
|
51
|
+
src: string;
|
|
52
|
+
onLoadRiveInstance: (riveInstance: any) => void;
|
|
53
|
+
} & WithFocusableProps>;
|
|
54
|
+
context: any;
|
|
55
|
+
refs: {
|
|
56
|
+
[key: string]: React.ReactInstance;
|
|
57
|
+
};
|
|
58
|
+
componentWillMount?(): void;
|
|
59
|
+
componentWillReceiveProps?(nextProps: Readonly<React.CanvasHTMLAttributes<HTMLCanvasElement> & {
|
|
60
|
+
id: string;
|
|
61
|
+
autoFocus: boolean;
|
|
62
|
+
autoPlay: boolean;
|
|
63
|
+
src: string;
|
|
64
|
+
onLoadRiveInstance: (riveInstance: any) => void;
|
|
65
|
+
} & WithFocusableProps>, nextContext: any): void;
|
|
66
|
+
shouldComponentUpdate?(nextProps: Readonly<React.CanvasHTMLAttributes<HTMLCanvasElement> & {
|
|
67
|
+
id: string;
|
|
68
|
+
autoFocus: boolean;
|
|
69
|
+
autoPlay: boolean;
|
|
70
|
+
src: string;
|
|
71
|
+
onLoadRiveInstance: (riveInstance: any) => void;
|
|
72
|
+
} & WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
73
|
+
componentWillUpdate?(nextProps: Readonly<React.CanvasHTMLAttributes<HTMLCanvasElement> & {
|
|
74
|
+
id: string;
|
|
75
|
+
autoFocus: boolean;
|
|
76
|
+
autoPlay: boolean;
|
|
77
|
+
src: string;
|
|
78
|
+
onLoadRiveInstance: (riveInstance: any) => void;
|
|
79
|
+
} & WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
80
|
+
};
|
|
81
|
+
contextTypes: {
|
|
82
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
83
|
+
};
|
|
84
|
+
childContextTypes: {
|
|
85
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
export default _default;
|
|
@@ -5,6 +5,9 @@ import BetsIcon from './BetsIcon';
|
|
|
5
5
|
import StatsIcon from './StatsIcon';
|
|
6
6
|
import FantasyIcon from './FantasyIcon';
|
|
7
7
|
import WarningIcon from './WarningIcon';
|
|
8
|
+
import FlameIcon from './FlameIcon';
|
|
9
|
+
import BetsWarningIcon from './BetsWarningIcon';
|
|
10
|
+
import MobilePhoneIcon from './MobilePhoneIcon';
|
|
8
11
|
declare const iconImports: {
|
|
9
12
|
keyPlays: typeof KeyPlaysIcon;
|
|
10
13
|
play: typeof PlayIcon;
|
|
@@ -12,6 +15,13 @@ declare const iconImports: {
|
|
|
12
15
|
stats: typeof StatsIcon;
|
|
13
16
|
fantasy: typeof FantasyIcon;
|
|
14
17
|
warning: typeof WarningIcon;
|
|
18
|
+
expand: (props: IconProps) => React.JSX.Element;
|
|
19
|
+
collapse: (props: IconProps) => React.JSX.Element;
|
|
20
|
+
times: (props: IconProps) => React.JSX.Element;
|
|
21
|
+
checkmark: (props: IconProps) => React.JSX.Element;
|
|
22
|
+
flame: typeof FlameIcon;
|
|
23
|
+
betsWarning: typeof BetsWarningIcon;
|
|
24
|
+
mobilePhone: typeof MobilePhoneIcon;
|
|
15
25
|
};
|
|
16
26
|
export type IconsName = keyof typeof iconImports;
|
|
17
27
|
export type IconProps = {
|
|
@@ -9,6 +9,7 @@ declare class PanelManager extends React.Component<{}, PanelManagerState> {
|
|
|
9
9
|
constructor(props: {});
|
|
10
10
|
componentDidMount(): void;
|
|
11
11
|
componentWillUnmount(): void;
|
|
12
|
+
goToPanel(panel: MaestroPanelType): () => void;
|
|
12
13
|
render(): React.JSX.Element;
|
|
13
14
|
}
|
|
14
15
|
export default PanelManager;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ScrollableContainer.styles.css';
|
|
3
|
+
import { Layout } from '@/external/spatial-navigation/utils';
|
|
4
|
+
export interface ScrollableContainerContextType {
|
|
5
|
+
/**
|
|
6
|
+
* Sets a reference for a focusable item.
|
|
7
|
+
* This is used to register the item in the context so it can be focused later.
|
|
8
|
+
*/
|
|
9
|
+
setRef: (ref: HTMLElement) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Called when an item is focused.
|
|
12
|
+
* This function scrolls the container to the focused item if necessary.
|
|
13
|
+
*/
|
|
14
|
+
scrollToFocusedElement: (layout: Layout) => void;
|
|
15
|
+
/**
|
|
16
|
+
* An array of all registered focusable items.
|
|
17
|
+
* This is used to determine the order of focusable items.
|
|
18
|
+
*/
|
|
19
|
+
refsMap: HTMLElement[];
|
|
20
|
+
}
|
|
21
|
+
type ScrollableContainerProps = {
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* The element that is scrollable.
|
|
25
|
+
* This is typically a container that has overflow set to auto or scroll.
|
|
26
|
+
*/
|
|
27
|
+
scrollableContainerRef?: HTMLElement | null;
|
|
28
|
+
/**
|
|
29
|
+
* The top offset of the container, used to adjust the scroll position.
|
|
30
|
+
* This is useful if the container has a fixed header or similar elements.
|
|
31
|
+
*/
|
|
32
|
+
containerTopOffset?: number;
|
|
33
|
+
} & React.HTMLAttributes<HTMLDivElement>;
|
|
34
|
+
/**
|
|
35
|
+
* ScrollableContainer component provides a context for focusable items
|
|
36
|
+
* that allows them to register themselves and handle scrolling
|
|
37
|
+
* when they become focused.
|
|
38
|
+
* @example
|
|
39
|
+
* ```jsx
|
|
40
|
+
* <ScrollableContainer scrollableContainerRef={scrollableContainerRef}>
|
|
41
|
+
* <FocusableItem>Item 1</FocusableItem>
|
|
42
|
+
* <FocusableItem>Item 2</FocusableItem>
|
|
43
|
+
* <FocusableItem>Item 3</FocusableItem>
|
|
44
|
+
* </ScrollableContainer>
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
declare class ScrollableContainer extends React.Component<ScrollableContainerProps> {
|
|
48
|
+
private refsMap;
|
|
49
|
+
private hash;
|
|
50
|
+
private lastHash;
|
|
51
|
+
state: {
|
|
52
|
+
scrolled: boolean;
|
|
53
|
+
};
|
|
54
|
+
setRef: (ref: HTMLElement) => void;
|
|
55
|
+
static childContextTypes: {
|
|
56
|
+
refsMap: React.Requireable<any>;
|
|
57
|
+
setRef: React.Requireable<any>;
|
|
58
|
+
scrollToFocusedElement: React.Requireable<any>;
|
|
59
|
+
};
|
|
60
|
+
getOrderedRefs: () => HTMLElement[];
|
|
61
|
+
/**
|
|
62
|
+
* @description - Scrolls the container to the focused element if necessary
|
|
63
|
+
*/
|
|
64
|
+
private scrollToFocusedElement;
|
|
65
|
+
getChildContext(): ScrollableContainerContextType;
|
|
66
|
+
componentWillUnmount(): void;
|
|
67
|
+
render(): React.JSX.Element;
|
|
68
|
+
}
|
|
69
|
+
export declare const DEFAULT_SCROLLABLE_CONTAINER_CONTEXT: ScrollableContainerContextType;
|
|
70
|
+
export declare const SCROLLABLE_CONTEXT_TYPE: {
|
|
71
|
+
refsMap: React.Requireable<any>;
|
|
72
|
+
setRef: React.Requireable<any>;
|
|
73
|
+
scrollToFocusedElement: React.Requireable<any>;
|
|
74
|
+
};
|
|
75
|
+
export default ScrollableContainer;
|
|
@@ -13,15 +13,12 @@ declare const _default: {
|
|
|
13
13
|
stealFocus: () => void;
|
|
14
14
|
onUpdateFocus: (focused: boolean) => void;
|
|
15
15
|
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
16
|
-
onEnterPressHandler: (details:
|
|
17
|
-
pressedKeys: Record<string, number>;
|
|
18
|
-
}) => void;
|
|
16
|
+
onEnterPressHandler: (details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
19
17
|
onEnterReleaseHandler: () => void;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
onBecameBlurredHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: any) => void;
|
|
18
|
+
onBackPressHandler: (details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
19
|
+
onArrowPressHandler: (direction: import("../../../external/spatial-navigation/utils").Direction, details: import("../../../external/spatial-navigation/utils").Details) => boolean | void;
|
|
20
|
+
onBecameFocusedHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
21
|
+
onBecameBlurredHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
25
22
|
componentDidMount(): void;
|
|
26
23
|
componentDidUpdate(): void;
|
|
27
24
|
componentWillUnmount(): void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { OverlayType, IFantasyPayload } from '@/types/OverlayTypes';
|
|
3
|
+
import { IWinningBet } from '@/models/IWinningBet';
|
|
4
|
+
interface OverlayProps {
|
|
5
|
+
id: string;
|
|
6
|
+
position?: {
|
|
7
|
+
top?: number;
|
|
8
|
+
left?: number;
|
|
9
|
+
right?: number;
|
|
10
|
+
bottom?: number;
|
|
11
|
+
};
|
|
12
|
+
overlayType: OverlayType;
|
|
13
|
+
winningBet?: IWinningBet;
|
|
14
|
+
fantasy?: IFantasyPayload;
|
|
15
|
+
onOverlayAction?: (overlayType: OverlayType) => void;
|
|
16
|
+
onOverlayViewed?: (overlayType: OverlayType) => void;
|
|
17
|
+
}
|
|
18
|
+
interface OverlayState {
|
|
19
|
+
autoDismiss: boolean;
|
|
20
|
+
hasTrackedView: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const WINNING_BET_RIVE_FILE_URL = "https://static.gcp.maestro.io/media/664b9c57d59a7a431542d814/67db106027ddcdcd2ecb97d4.riv";
|
|
23
|
+
declare class Overlay extends React.Component<OverlayProps, OverlayState> {
|
|
24
|
+
private autoDismissTimeout;
|
|
25
|
+
constructor(props: OverlayProps);
|
|
26
|
+
componentWillUnmount(): void;
|
|
27
|
+
private handleOverlayAction;
|
|
28
|
+
get overlayTitle(): string;
|
|
29
|
+
get overlayMetadata(): string;
|
|
30
|
+
private trackOverlayViewed;
|
|
31
|
+
onLoadRiveInstance: (riveInstance: any | null) => void;
|
|
32
|
+
render(): React.JSX.Element;
|
|
33
|
+
}
|
|
34
|
+
export default Overlay;
|
|
@@ -1,107 +1,56 @@
|
|
|
1
|
+
import { IconsName } from '@/components/atoms/SvgIcon/Icon';
|
|
1
2
|
import './PanelNavButton.styles.css';
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
type PanelNavButtonProps = {
|
|
6
|
+
iconName: IconsName;
|
|
7
|
+
index: number;
|
|
8
|
+
active: boolean;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
focused?: boolean;
|
|
11
|
+
focusKey: string;
|
|
12
|
+
onBecameFocused: () => void;
|
|
13
|
+
};
|
|
4
14
|
declare const _default: {
|
|
5
|
-
new (props
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
focused?: boolean | undefined;
|
|
22
|
-
focusKey: string;
|
|
23
|
-
onBecameFocused: () => void;
|
|
24
|
-
buttonRef?: React.Ref<HTMLDivElement> | undefined;
|
|
25
|
-
} & import("@/external/spatial-navigation").WithFocusableProps>): void;
|
|
15
|
+
new (props?: (PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps) | undefined, context?: any): {
|
|
16
|
+
state: import("../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
17
|
+
getChildContext(): {
|
|
18
|
+
parentFocusKey: string;
|
|
19
|
+
};
|
|
20
|
+
setFocus: (focusKey: string) => void;
|
|
21
|
+
navigateByDirection: (direction: import("../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
22
|
+
stealFocus: () => void;
|
|
23
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
24
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
25
|
+
onEnterPressHandler: (details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
26
|
+
onEnterReleaseHandler: () => void;
|
|
27
|
+
onBackPressHandler: (details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
28
|
+
onArrowPressHandler: (direction: import("../../../external/spatial-navigation/utils").Direction, details: import("../../../external/spatial-navigation/utils").Details) => boolean | void;
|
|
29
|
+
onBecameFocusedHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
30
|
+
onBecameBlurredHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
26
31
|
componentDidMount(): void;
|
|
32
|
+
componentDidUpdate(): void;
|
|
27
33
|
componentWillUnmount(): void;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
setState<K extends "active">(state: {
|
|
31
|
-
active: boolean;
|
|
32
|
-
} | ((prevState: Readonly<{
|
|
33
|
-
active: boolean;
|
|
34
|
-
}>, props: RemoteControlProps & {
|
|
35
|
-
iconName: "play" | "keyPlays" | "stats" | "fantasy" | "bets" | "warning";
|
|
36
|
-
index: number;
|
|
37
|
-
active: boolean;
|
|
38
|
-
children?: React.ReactNode;
|
|
39
|
-
focused?: boolean | undefined;
|
|
40
|
-
focusKey: string;
|
|
41
|
-
onBecameFocused: () => void;
|
|
42
|
-
buttonRef?: React.Ref<HTMLDivElement> | undefined;
|
|
43
|
-
} & import("@/external/spatial-navigation").WithFocusableProps) => {
|
|
44
|
-
active: boolean;
|
|
45
|
-
} | Pick<{
|
|
46
|
-
active: boolean;
|
|
47
|
-
}, K>) | Pick<{
|
|
48
|
-
active: boolean;
|
|
49
|
-
}, K>, callback?: (() => any) | undefined): void;
|
|
34
|
+
render(): React.ReactElement<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>;
|
|
35
|
+
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: PanelNavButtonProps & import("@/external/spatial-navigation").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;
|
|
50
36
|
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
51
37
|
props: Readonly<{
|
|
52
38
|
children?: React.ReactNode;
|
|
53
|
-
}> & Readonly<
|
|
54
|
-
iconName: "play" | "keyPlays" | "stats" | "fantasy" | "bets" | "warning";
|
|
55
|
-
index: number;
|
|
56
|
-
active: boolean;
|
|
57
|
-
children?: React.ReactNode;
|
|
58
|
-
focused?: boolean | undefined;
|
|
59
|
-
focusKey: string;
|
|
60
|
-
onBecameFocused: () => void;
|
|
61
|
-
buttonRef?: React.Ref<HTMLDivElement> | undefined;
|
|
62
|
-
} & import("@/external/spatial-navigation").WithFocusableProps>;
|
|
63
|
-
state: Readonly<{
|
|
64
|
-
active: boolean;
|
|
65
|
-
}>;
|
|
39
|
+
}> & Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>;
|
|
66
40
|
context: any;
|
|
67
41
|
refs: {
|
|
68
42
|
[key: string]: React.ReactInstance;
|
|
69
43
|
};
|
|
70
44
|
componentWillMount?(): void;
|
|
71
|
-
componentWillReceiveProps?(nextProps: Readonly<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
} & import("@/external/spatial-navigation").WithFocusableProps>, nextContext: any): void;
|
|
81
|
-
shouldComponentUpdate?(nextProps: Readonly<RemoteControlProps & {
|
|
82
|
-
iconName: "play" | "keyPlays" | "stats" | "fantasy" | "bets" | "warning";
|
|
83
|
-
index: number;
|
|
84
|
-
active: boolean;
|
|
85
|
-
children?: React.ReactNode;
|
|
86
|
-
focused?: boolean | undefined;
|
|
87
|
-
focusKey: string;
|
|
88
|
-
onBecameFocused: () => void;
|
|
89
|
-
buttonRef?: React.Ref<HTMLDivElement> | undefined;
|
|
90
|
-
} & import("@/external/spatial-navigation").WithFocusableProps>, nextState: Readonly<{
|
|
91
|
-
active: boolean;
|
|
92
|
-
}>, nextContext: any): boolean;
|
|
93
|
-
componentWillUpdate?(nextProps: Readonly<RemoteControlProps & {
|
|
94
|
-
iconName: "play" | "keyPlays" | "stats" | "fantasy" | "bets" | "warning";
|
|
95
|
-
index: number;
|
|
96
|
-
active: boolean;
|
|
97
|
-
children?: React.ReactNode;
|
|
98
|
-
focused?: boolean | undefined;
|
|
99
|
-
focusKey: string;
|
|
100
|
-
onBecameFocused: () => void;
|
|
101
|
-
buttonRef?: React.Ref<HTMLDivElement> | undefined;
|
|
102
|
-
} & import("@/external/spatial-navigation").WithFocusableProps>, nextState: Readonly<{
|
|
103
|
-
active: boolean;
|
|
104
|
-
}>, nextContext: any): void;
|
|
45
|
+
componentWillReceiveProps?(nextProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, nextContext: any): void;
|
|
46
|
+
shouldComponentUpdate?(nextProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
47
|
+
componentWillUpdate?(nextProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
48
|
+
};
|
|
49
|
+
contextTypes: {
|
|
50
|
+
parentFocusKey: PropTypes.Requireable<string>;
|
|
51
|
+
};
|
|
52
|
+
childContextTypes: {
|
|
53
|
+
parentFocusKey: PropTypes.Requireable<string>;
|
|
105
54
|
};
|
|
106
55
|
};
|
|
107
56
|
export default _default;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import './SegmentButton.styles.css';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export default SegmentButton;
|
|
4
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
5
|
+
type SegmentButtonProps = HTMLAttributes<HTMLButtonElement> & WithFocusableProps & {
|
|
6
|
+
active: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: React.ComponentType<SegmentButtonProps>;
|
|
9
|
+
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IconsName } from '@/components/atoms/SvgIcon/Icon';
|
|
2
2
|
import './PanelNavigation.styles.css';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { Direction } from '@/external/spatial-navigation/utils';
|
|
4
5
|
interface PanelNavigationProps {
|
|
5
6
|
items: {
|
|
6
7
|
title: string;
|
|
@@ -10,6 +11,12 @@ interface PanelNavigationProps {
|
|
|
10
11
|
}[];
|
|
11
12
|
}
|
|
12
13
|
declare class PanelNavigation extends React.Component<PanelNavigationProps> {
|
|
14
|
+
state: {
|
|
15
|
+
itemFocused: null;
|
|
16
|
+
lastFocused: null;
|
|
17
|
+
};
|
|
18
|
+
handleBecameFocused: (index: number) => () => void;
|
|
19
|
+
handleArrowPress: (direction: Direction) => void;
|
|
13
20
|
render(): React.JSX.Element;
|
|
14
21
|
}
|
|
15
22
|
export default PanelNavigation;
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './SegmentController.styles.css';
|
|
3
|
+
import { Details, Direction, Layout } from '@/external/spatial-navigation/utils';
|
|
4
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
5
|
+
export type SegmentItem = {
|
|
6
|
+
title: string;
|
|
7
|
+
onEnter: () => void;
|
|
8
|
+
};
|
|
3
9
|
interface SegmentControllerProps {
|
|
4
10
|
backgroundColor?: string;
|
|
5
|
-
items:
|
|
6
|
-
title: string;
|
|
7
|
-
onEnter: () => void;
|
|
8
|
-
}[];
|
|
11
|
+
items: SegmentItem[];
|
|
9
12
|
}
|
|
10
13
|
declare class SegmentController extends React.Component<SegmentControllerProps> {
|
|
11
|
-
|
|
14
|
+
context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
|
|
15
|
+
static contextTypes: {
|
|
16
|
+
refsMap: React.Requireable<any>;
|
|
17
|
+
setRef: React.Requireable<any>;
|
|
18
|
+
scrollToFocusedElement: React.Requireable<any>;
|
|
19
|
+
};
|
|
20
|
+
state: {
|
|
21
|
+
activeIndex: number;
|
|
22
|
+
lastActiveIndex: number;
|
|
23
|
+
};
|
|
24
|
+
onBecameFocused: (item: SegmentItem, i: number) => (layout: Layout) => void;
|
|
25
|
+
handleArrowPress: (index: number) => (direction: Direction, _props: WithFocusableProps, details: Details) => void;
|
|
12
26
|
render(): React.JSX.Element;
|
|
13
27
|
}
|
|
14
28
|
export default SegmentController;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
1
2
|
import { INetworkClient } from './ports/networkClient';
|
|
2
3
|
declare class AxiosNetworkClient implements INetworkClient {
|
|
3
4
|
private client;
|
|
4
|
-
|
|
5
|
+
private retries;
|
|
6
|
+
private delay;
|
|
7
|
+
private backoff;
|
|
8
|
+
constructor({ baseURL, retries, delay, backoff, axiosInstance, }: {
|
|
5
9
|
baseURL: string;
|
|
6
10
|
retries: number;
|
|
7
11
|
delay: number;
|
|
8
12
|
backoff: number;
|
|
13
|
+
axiosInstance?: AxiosInstance;
|
|
9
14
|
});
|
|
10
|
-
private
|
|
11
|
-
get<TResponseData = any>(endpoint: string, params?: any): Promise<TResponseData>;
|
|
15
|
+
private retry;
|
|
16
|
+
get<TResponseData = any>(endpoint: string, params?: Record<string, any>, headers?: Record<string, string>): Promise<TResponseData>;
|
|
12
17
|
post<TRequestData = any, TResponseData = any>(endpoint: string, data: TRequestData): Promise<TResponseData>;
|
|
13
18
|
setAuthentication(token: string | null, apiKey: string | null): void;
|
|
14
19
|
}
|