@maestro_io/maestro-web-sdk 2.2.2 → 2.2.4
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/components/core/App/App.d.ts +2 -0
- package/dist/components/core/PanelManager/PanelManager.d.ts +5 -2
- package/dist/components/organisms/PanelNavigation/PanelNavigation.d.ts +0 -6
- package/dist/external/ReactRenderer.d.ts +0 -9
- package/dist/external/ports/renderer.d.ts +0 -4
- package/dist/external/spatial-navigation/spatialNavigation.d.ts +1 -1
- package/dist/index.d.ts +5 -6
- package/dist/interfaces/IMaestroEvent.d.ts +12 -0
- package/dist/maestro-web-sdk.umd.js +3 -3
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/modules/bets/types/BetsAnalyticsTypes.d.ts +0 -17
- package/dist/modules/bets/view-model/BetsViewModel.d.ts +0 -4
- package/dist/modules/stats/view-model/StatsViewModel.d.ts +57 -16
- package/dist/services/AnalyticsService/AnalyticsService.d.ts +10 -26
- package/dist/services/InsightsService/InsightsPayloadBuilder.d.ts +9 -7
- package/dist/services/PageService/PageService.d.ts +8 -0
- package/dist/services/PageService/index.d.ts +2 -0
- package/dist/services/PageService/mocks.d.ts +2 -0
- package/dist/services/PageService/types.d.ts +53 -0
- package/dist/services/StatsService.d.ts +11 -10
- package/dist/view-models/MaestroEventViewModel.d.ts +3 -0
- package/dist/view-models/PanelManagerViewModel.d.ts +14 -10
- package/package.json +1 -1
- package/dist/view-models/index.d.ts +0 -23
|
@@ -3,6 +3,8 @@ import './App.styles.css';
|
|
|
3
3
|
declare class App extends React.Component<{
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
}> {
|
|
6
|
+
get colors(): import("../../../models/ITheme").IThemeColors;
|
|
7
|
+
get typography(): import("../../../models/ITheme").IThemeTypography;
|
|
6
8
|
componentDidMount(): void;
|
|
7
9
|
componentWillUnmount(): void;
|
|
8
10
|
render(): React.JSX.Element;
|
|
@@ -2,8 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import './PanelManager.styles.css';
|
|
3
3
|
import { MaestroPanelType } from '@/models/IPanel';
|
|
4
4
|
interface PanelManagerState {
|
|
5
|
-
activePanel: MaestroPanelType;
|
|
6
|
-
visiblePanels:
|
|
5
|
+
activePanel: MaestroPanelType | null;
|
|
6
|
+
visiblePanels: {
|
|
7
|
+
type: MaestroPanelType;
|
|
8
|
+
title: string;
|
|
9
|
+
}[];
|
|
7
10
|
}
|
|
8
11
|
declare class PanelManager extends React.Component<{}, PanelManagerState> {
|
|
9
12
|
private unsubscribe;
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
interface PanelNavigationProps {
|
|
6
5
|
items: {
|
|
7
6
|
title: string;
|
|
@@ -11,12 +10,7 @@ interface PanelNavigationProps {
|
|
|
11
10
|
}[];
|
|
12
11
|
}
|
|
13
12
|
declare class PanelNavigation extends React.Component<PanelNavigationProps> {
|
|
14
|
-
state: {
|
|
15
|
-
itemFocused: null;
|
|
16
|
-
lastFocused: null;
|
|
17
|
-
};
|
|
18
13
|
handleBecameFocused: (index: number) => () => void;
|
|
19
|
-
handleArrowPress: (direction: Direction) => void;
|
|
20
14
|
render(): React.JSX.Element;
|
|
21
15
|
}
|
|
22
16
|
export default PanelNavigation;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { IRenderer } from './ports/renderer';
|
|
2
|
-
import { MaestroViewModels } from '@/view-models';
|
|
3
|
-
import IMaestroEventDelegate from '@/interfaces/IMaestroEventDelegate';
|
|
4
2
|
declare class ReactRenderer implements IRenderer {
|
|
5
3
|
private renderersMap;
|
|
6
|
-
viewModels: MaestroViewModels | null;
|
|
7
|
-
/**
|
|
8
|
-
* Sets the view models for the renderer
|
|
9
|
-
* @param eventId The event ID to create view models for
|
|
10
|
-
* @param delegate The event delegate to use
|
|
11
|
-
*/
|
|
12
|
-
setViewModels(eventId: string, delegate?: IMaestroEventDelegate): Promise<MaestroViewModels | null>;
|
|
13
4
|
/**
|
|
14
5
|
* Renders the panel manager
|
|
15
6
|
* @param id The element ID to render in
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import IMaestroEventDelegate from '../../interfaces/IMaestroEventDelegate';
|
|
2
|
-
import { MaestroViewModels } from '../../view-models';
|
|
3
1
|
type UnmountFn = () => void;
|
|
4
2
|
export interface IRenderer {
|
|
5
3
|
renderPanel(id: string): Promise<UnmountFn>;
|
|
6
|
-
setViewModels(eventId: string, delegate?: IMaestroEventDelegate): Promise<MaestroViewModels | null>;
|
|
7
|
-
viewModels: MaestroViewModels | null;
|
|
8
4
|
}
|
|
9
5
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -4,11 +4,13 @@ import IMaestroEvent from './interfaces/IMaestroEvent';
|
|
|
4
4
|
import { MaestroEventViewModel } from './view-models/MaestroEventViewModel';
|
|
5
5
|
import IMaestroKeyPlaysResponse from './modules/key-plays/interfaces/IKeyPlaysResponse';
|
|
6
6
|
import { IUserSettings } from './interfaces/IUserSettings';
|
|
7
|
+
import { PageConfig } from './services/PageService/types';
|
|
8
|
+
import { MaestroPanelType } from './models/IPanel';
|
|
7
9
|
export { default as Overlay } from './components/molecules/Overlay/Overlay';
|
|
8
10
|
export { OverlayType, IMaestroOverlayEvent, IOverlaySize, IOverlayPosition, IFantasyPayload, IOverlayAnalyticsEvent, } from './types/OverlayTypes';
|
|
9
11
|
export { IWinningBet } from './models/IWinningBet';
|
|
10
12
|
export { ActionTrackEvent, ImpressionTrackEvent, Metadata, PanelClickAction, PanelViewAction, } from './services/AnalyticsService/types';
|
|
11
|
-
export { IMaestroEventDelegate, IMaestroEvent, IMaestroKeyPlaysResponse };
|
|
13
|
+
export { IMaestroEventDelegate, IMaestroEvent, IMaestroKeyPlaysResponse, MaestroPanelType, };
|
|
12
14
|
export { IUserSettings, DEFAULT_USER_SETTINGS, } from './interfaces/IUserSettings';
|
|
13
15
|
export type Environment = 'development' | 'production';
|
|
14
16
|
/**
|
|
@@ -25,6 +27,7 @@ declare class MaestroWebSDK implements IMaestroManager {
|
|
|
25
27
|
private clientAppSwid?;
|
|
26
28
|
private maestroEventViewModel;
|
|
27
29
|
private environment;
|
|
30
|
+
private pageConfig;
|
|
28
31
|
private constructor();
|
|
29
32
|
/**
|
|
30
33
|
* @description Returns the MaestroWebSDK instance
|
|
@@ -61,11 +64,6 @@ declare class MaestroWebSDK implements IMaestroManager {
|
|
|
61
64
|
* @returns The current event view model
|
|
62
65
|
*/
|
|
63
66
|
getMaestroEventViewModel(): MaestroEventViewModel;
|
|
64
|
-
/**
|
|
65
|
-
* Gets the view models container
|
|
66
|
-
* @returns The current view models
|
|
67
|
-
*/
|
|
68
|
-
getMaestroViewModels(): import("./view-models").MaestroViewModels | null;
|
|
69
67
|
renderPanel(id: string): Promise<() => void>;
|
|
70
68
|
setMaestroJwt(jwt: string | undefined): void;
|
|
71
69
|
setClientAppSwid(swid: string | undefined): void;
|
|
@@ -76,6 +74,7 @@ declare class MaestroWebSDK implements IMaestroManager {
|
|
|
76
74
|
getClientAppToken(): string | undefined;
|
|
77
75
|
getCurrentUserID(): string | undefined;
|
|
78
76
|
getClientAppSwid(): string | undefined;
|
|
77
|
+
getPageConfig(): PageConfig | null;
|
|
79
78
|
}
|
|
80
79
|
declare const SDK: MaestroWebSDK;
|
|
81
80
|
export default SDK;
|
|
@@ -88,11 +88,23 @@ export default interface IMaestroEvent {
|
|
|
88
88
|
*/
|
|
89
89
|
getPlayerTimeCode(): number | null;
|
|
90
90
|
simulateUseCase<T = any>(useCase: TestUseCase, panelType: MaestroPanelType, testData?: T): void;
|
|
91
|
+
/**
|
|
92
|
+
* @description Sets the active panel in the Maestro SDK, if the panel is available and not hidden.
|
|
93
|
+
* @param {MaestroPanelType} panelType - The type of the panel to set as active
|
|
94
|
+
* https://developers.maestro.io/sdk/web/maestro-event-interface/state/setActivePanel
|
|
95
|
+
*/
|
|
96
|
+
setActivePanel(panelType: MaestroPanelType): void;
|
|
91
97
|
}
|
|
92
98
|
declare const TEST_USE_CASES: {
|
|
93
99
|
readonly betsTabLoadFailure: "betsTabLoadFailure";
|
|
94
100
|
readonly betsMockData: "betsMockData";
|
|
95
101
|
readonly betsLiveData: "betsLiveData";
|
|
102
|
+
readonly showBasketballPreGameStatsMockData: "showBasketballPreGameStatsMockData";
|
|
103
|
+
readonly showBasketballInGameStatsMockData: "showBasketballInGameStatsMockData";
|
|
104
|
+
readonly showFootballPreGameStatsMockData: "showFootballPreGameStatsMockData";
|
|
105
|
+
readonly showFootballInGameStatsMockData: "showFootballInGameStatsMockData";
|
|
106
|
+
readonly showHockeyPreGameStatsMockData: "showHockeyPreGameStatsMockData";
|
|
107
|
+
readonly showHockeyInGameStatsMockData: "showHockeyInGameStatsMockData";
|
|
96
108
|
};
|
|
97
109
|
export type TestUseCase = typeof TEST_USE_CASES[keyof typeof TEST_USE_CASES];
|
|
98
110
|
export {};
|