@maestro_io/maestro-web-sdk 2.2.3 → 2.2.5

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.
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
2
  import './App.styles.css';
3
+ import { IThemeTypography } from '@/models/ITheme';
3
4
  declare class App extends React.Component<{
4
5
  children?: React.ReactNode;
5
6
  }> {
6
- get colors(): import("../../../models/ITheme").IThemeColors;
7
- get typography(): import("../../../models/ITheme").IThemeTypography;
7
+ get colors(): import("@/models/ITheme").IThemeColors;
8
+ get typography(): IThemeTypography;
8
9
  componentDidMount(): void;
9
10
  componentWillUnmount(): void;
10
11
  render(): React.JSX.Element;
@@ -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 {};
@@ -76,7 +76,7 @@ declare class SpatialNavigation {
76
76
  private throttle;
77
77
  private throttleKeypresses;
78
78
  private pressedKeys;
79
- private paused;
79
+ paused: boolean;
80
80
  private keyDownEventListener;
81
81
  private keyUpEventListener;
82
82
  private keyMap;
package/dist/index.d.ts CHANGED
@@ -5,11 +5,12 @@ import { MaestroEventViewModel } from './view-models/MaestroEventViewModel';
5
5
  import IMaestroKeyPlaysResponse from './modules/key-plays/interfaces/IKeyPlaysResponse';
6
6
  import { IUserSettings } from './interfaces/IUserSettings';
7
7
  import { PageConfig } from './services/PageService/types';
8
+ import { MaestroPanelType } from './models/IPanel';
8
9
  export { default as Overlay } from './components/molecules/Overlay/Overlay';
9
10
  export { OverlayType, IMaestroOverlayEvent, IOverlaySize, IOverlayPosition, IFantasyPayload, IOverlayAnalyticsEvent, } from './types/OverlayTypes';
10
11
  export { IWinningBet } from './models/IWinningBet';
11
12
  export { ActionTrackEvent, ImpressionTrackEvent, Metadata, PanelClickAction, PanelViewAction, } from './services/AnalyticsService/types';
12
- export { IMaestroEventDelegate, IMaestroEvent, IMaestroKeyPlaysResponse };
13
+ export { IMaestroEventDelegate, IMaestroEvent, IMaestroKeyPlaysResponse, MaestroPanelType, };
13
14
  export { IUserSettings, DEFAULT_USER_SETTINGS, } from './interfaces/IUserSettings';
14
15
  export type Environment = 'development' | 'production';
15
16
  /**
@@ -63,11 +64,6 @@ declare class MaestroWebSDK implements IMaestroManager {
63
64
  * @returns The current event view model
64
65
  */
65
66
  getMaestroEventViewModel(): MaestroEventViewModel;
66
- /**
67
- * Gets the view models container
68
- * @returns The current view models
69
- */
70
- getMaestroViewModels(): import("./view-models").MaestroViewModels | null;
71
67
  renderPanel(id: string): Promise<() => void>;
72
68
  setMaestroJwt(jwt: string | undefined): void;
73
69
  setClientAppSwid(swid: string | undefined): void;
@@ -88,6 +88,12 @@ 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";