@maestro_io/maestro-web-sdk 1.0.0 → 2.0.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 +9 -0
- package/dist/components/atoms/BaseButton/BaseButton.d.ts +9 -0
- package/dist/components/atoms/BaseButton/index.d.ts +2 -0
- package/dist/components/atoms/Image/index.d.ts +9 -0
- package/dist/components/atoms/SvgIcon/BetsIcon.d.ts +7 -0
- package/dist/components/atoms/SvgIcon/FantasyIcon.d.ts +6 -0
- package/dist/components/atoms/SvgIcon/Icon.d.ts +28 -0
- package/dist/components/atoms/SvgIcon/KeyPlaysIcon.d.ts +6 -0
- package/dist/components/atoms/SvgIcon/PlayIcon.d.ts +6 -0
- package/dist/components/atoms/SvgIcon/StatsIcon.d.ts +6 -0
- package/dist/components/atoms/SvgIcon/WarningIcon.d.ts +6 -0
- package/dist/components/atoms/SvgIcon/index.d.ts +2 -0
- package/dist/components/core/App/App.d.ts +10 -0
- package/dist/components/core/App/index.d.ts +2 -0
- package/dist/components/core/PanelManager/PanelManager.d.ts +14 -0
- package/dist/components/core/PanelManager/index.d.ts +2 -0
- package/dist/components/molecules/ActionButton/ActionButton.d.ts +50 -0
- package/dist/components/molecules/ActionButton/index.d.ts +2 -0
- package/dist/components/molecules/PanelNavButton/PanelNavButton.d.ts +107 -0
- package/dist/components/molecules/PanelNavButton/index.d.ts +2 -0
- package/dist/components/molecules/ScrollableGradient/ScrollableGradient.d.ts +11 -0
- package/dist/components/molecules/ScrollableGradient/index.d.ts +2 -0
- package/dist/components/molecules/SegmentButton/SegmentButton.d.ts +10 -0
- package/dist/components/molecules/SegmentButton/index.d.ts +2 -0
- package/dist/components/molecules/WatchButton/WatchButton.d.ts +10 -0
- package/dist/components/molecules/WatchButton/index.d.ts +2 -0
- package/dist/components/organisms/PanelNavigation/PanelNavigation.d.ts +15 -0
- package/dist/components/organisms/PanelNavigation/index.d.ts +2 -0
- package/dist/components/organisms/SegmentController/SegmentController.d.ts +14 -0
- package/dist/components/organisms/SegmentController/index.d.ts +2 -0
- package/dist/external/AxiosNetworkClient.d.ts +15 -0
- package/dist/external/LocalStorageCacheManager.d.ts +10 -0
- package/dist/external/ReactRenderer.d.ts +26 -0
- package/dist/external/ports/cacheManager.d.ts +15 -0
- package/dist/external/ports/networkClient.d.ts +5 -0
- package/dist/external/ports/renderer.d.ts +9 -0
- package/dist/external/spatial-navigation/index.d.ts +5 -0
- package/dist/external/spatial-navigation/measureLayout.d.ts +2 -0
- package/dist/external/spatial-navigation/spatialNavigation.d.ts +166 -0
- package/dist/external/spatial-navigation/utils.d.ts +15 -0
- package/dist/external/spatial-navigation/visualDebugger.d.ts +17 -0
- package/dist/external/spatial-navigation/withFocusable.d.ts +81 -0
- package/dist/helpers/Observable.d.ts +12 -0
- package/dist/helpers/deliver-focus.d.ts +5 -0
- package/dist/helpers/withRemoteControl.d.ts +47 -0
- package/dist/index.d.ts +60 -382
- package/dist/interfaces/IMaestroEvent.d.ts +62 -0
- package/dist/interfaces/IMaestroEventDelegate.d.ts +18 -0
- package/dist/interfaces/IMaestroManager.d.ts +82 -0
- package/dist/maestro-web-sdk.umd.js +2 -3
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/models/IModel.d.ts +7 -0
- package/dist/models/IPanel.d.ts +20 -0
- package/dist/models/ITheme.d.ts +77 -0
- package/dist/modules/key-plays/constants.d.ts +3 -0
- package/dist/modules/key-plays/interfaces/IKeyPlays.d.ts +31 -0
- package/dist/modules/key-plays/interfaces/IKeyPlaysResponse.d.ts +44 -0
- package/dist/modules/key-plays/view/KeyPlayCardScoreTagView.d.ts +9 -0
- package/dist/modules/key-plays/view/KeyPlayCardView.d.ts +115 -0
- package/dist/modules/key-plays/view/KeyPlayErrorStateView.d.ts +11 -0
- package/dist/modules/key-plays/view/KeyPlaysView.d.ts +53 -0
- package/dist/modules/key-plays/view-model/KeyPlaysViewModel.d.ts +29 -0
- package/dist/services/NetworkManager.d.ts +13 -0
- package/dist/services/ThemeManager/constants.d.ts +2 -0
- package/dist/view-models/MaestroEventViewModel.d.ts +37 -0
- package/dist/view-models/PanelManagerViewModel.d.ts +18 -0
- package/dist/view-models/ViewModel.d.ts +12 -0
- package/dist/view-models/index.d.ts +17 -0
- package/package.json +64 -36
- package/dist/BetsIcon-UrnN4lvP.js +0 -22
- package/dist/BetsIcon-UrnN4lvP.js.map +0 -1
- package/dist/FantasyIcon-DmloKsq_.js +0 -24
- package/dist/FantasyIcon-DmloKsq_.js.map +0 -1
- package/dist/KeyPlayErrorStateView-Dk89rtUq.js +0 -112
- package/dist/KeyPlayErrorStateView-Dk89rtUq.js.map +0 -1
- package/dist/KeyPlaysIcon-Br9gu_Zu.js +0 -24
- package/dist/KeyPlaysIcon-Br9gu_Zu.js.map +0 -1
- package/dist/KeyPlaysView-Br-88ytG.js +0 -174
- package/dist/KeyPlaysView-Br-88ytG.js.map +0 -1
- package/dist/PlayIcon-CNKWNaLP.js +0 -24
- package/dist/PlayIcon-CNKWNaLP.js.map +0 -1
- package/dist/StatsIcon-Ds4hriWX.js +0 -25
- package/dist/StatsIcon-Ds4hriWX.js.map +0 -1
- package/dist/WarningIcon-BuzZKL26.js +0 -24
- package/dist/WarningIcon-BuzZKL26.js.map +0 -1
- package/dist/index-BaSckwps.js +0 -2998
- package/dist/index-BaSckwps.js.map +0 -1
- package/dist/index-DXErYNZH.js +0 -151
- package/dist/index-DXErYNZH.js.map +0 -1
- package/dist/index-q5GKgbOd.js +0 -56
- package/dist/index-q5GKgbOd.js.map +0 -1
- package/dist/maestro-web-sdk.esm.js +0 -6
- package/dist/maestro-web-sdk.esm.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import IMaestroEventDelegate from './interfaces/IMaestroEventDelegate';
|
|
2
|
+
/**
|
|
3
|
+
* Our own implementation of the IMaestroEventDelegate interface. Useful for Development and Testing
|
|
4
|
+
*/
|
|
5
|
+
export default class MaestroEventDelegate implements IMaestroEventDelegate {
|
|
6
|
+
userRequestedNewKeyPlaysData(): Promise<void>;
|
|
7
|
+
startFocusManagement(): Promise<void>;
|
|
8
|
+
playClip(atIndex: number): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
interface BaseButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
}
|
|
5
|
+
declare class BaseButton extends React.Component<BaseButtonProps> {
|
|
6
|
+
constructor(props: BaseButtonProps);
|
|
7
|
+
render(): React.JSX.Element;
|
|
8
|
+
}
|
|
9
|
+
export default BaseButton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImgHTMLAttributes } from 'react';
|
|
3
|
+
interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
4
|
+
}
|
|
5
|
+
declare class Image extends React.Component<ImageProps> {
|
|
6
|
+
constructor(props: ImageProps);
|
|
7
|
+
render(): React.JSX.Element;
|
|
8
|
+
}
|
|
9
|
+
export default Image;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import KeyPlaysIcon from './KeyPlaysIcon';
|
|
3
|
+
import PlayIcon from './PlayIcon';
|
|
4
|
+
import BetsIcon from './BetsIcon';
|
|
5
|
+
import StatsIcon from './StatsIcon';
|
|
6
|
+
import FantasyIcon from './FantasyIcon';
|
|
7
|
+
import WarningIcon from './WarningIcon';
|
|
8
|
+
declare const iconImports: {
|
|
9
|
+
keyPlays: typeof KeyPlaysIcon;
|
|
10
|
+
play: typeof PlayIcon;
|
|
11
|
+
bets: typeof BetsIcon;
|
|
12
|
+
stats: typeof StatsIcon;
|
|
13
|
+
fantasy: typeof FantasyIcon;
|
|
14
|
+
warning: typeof WarningIcon;
|
|
15
|
+
};
|
|
16
|
+
export type IconsName = keyof typeof iconImports;
|
|
17
|
+
export type IconProps = {
|
|
18
|
+
iconName: IconsName;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
interface IconState {
|
|
23
|
+
loaded: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare class Icon extends React.Component<IconProps, IconState> {
|
|
26
|
+
render(): React.JSX.Element;
|
|
27
|
+
}
|
|
28
|
+
export default Icon;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './PanelManager.styles.css';
|
|
3
|
+
import { MaestroPanelType } from '@/models/IPanel';
|
|
4
|
+
interface PanelManagerState {
|
|
5
|
+
activePanel: MaestroPanelType;
|
|
6
|
+
}
|
|
7
|
+
declare class PanelManager extends React.Component<{}, PanelManagerState> {
|
|
8
|
+
private unsubscribe;
|
|
9
|
+
constructor(props: {});
|
|
10
|
+
componentDidMount(): void;
|
|
11
|
+
componentWillUnmount(): void;
|
|
12
|
+
render(): React.JSX.Element;
|
|
13
|
+
}
|
|
14
|
+
export default PanelManager;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/// <reference types="prop-types" />
|
|
2
|
+
import './ActionButton.styles.css';
|
|
3
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
declare const _default: {
|
|
6
|
+
new (props?: (object & WithFocusableProps) | undefined, context?: any): {
|
|
7
|
+
state: import("../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
8
|
+
getChildContext(): {
|
|
9
|
+
parentFocusKey: string;
|
|
10
|
+
};
|
|
11
|
+
setFocus: (focusKey: string) => void;
|
|
12
|
+
navigateByDirection: (direction: import("../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
13
|
+
stealFocus: () => void;
|
|
14
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
15
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
16
|
+
onEnterPressHandler: (details: {
|
|
17
|
+
pressedKeys: Record<string, number>;
|
|
18
|
+
}) => void;
|
|
19
|
+
onEnterReleaseHandler: () => void;
|
|
20
|
+
onArrowPressHandler: (direction: import("../../../external/spatial-navigation/utils").Direction, details: {
|
|
21
|
+
pressedKeys: Record<string, number>;
|
|
22
|
+
}) => boolean | void;
|
|
23
|
+
onBecameFocusedHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: any) => void;
|
|
24
|
+
onBecameBlurredHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: any) => void;
|
|
25
|
+
componentDidMount(): void;
|
|
26
|
+
componentDidUpdate(): void;
|
|
27
|
+
componentWillUnmount(): void;
|
|
28
|
+
render(): React.ReactElement<object & WithFocusableProps>;
|
|
29
|
+
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;
|
|
30
|
+
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
31
|
+
props: Readonly<{
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
}> & Readonly<object & WithFocusableProps>;
|
|
34
|
+
context: any;
|
|
35
|
+
refs: {
|
|
36
|
+
[key: string]: React.ReactInstance;
|
|
37
|
+
};
|
|
38
|
+
componentWillMount?(): void;
|
|
39
|
+
componentWillReceiveProps?(nextProps: Readonly<object & WithFocusableProps>, nextContext: any): void;
|
|
40
|
+
shouldComponentUpdate?(nextProps: Readonly<object & WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
41
|
+
componentWillUpdate?(nextProps: Readonly<object & WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
42
|
+
};
|
|
43
|
+
contextTypes: {
|
|
44
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
45
|
+
};
|
|
46
|
+
childContextTypes: {
|
|
47
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export default _default;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import './PanelNavButton.styles.css';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { RemoteControlProps } from '@/helpers/withRemoteControl';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
new (props: RemoteControlProps & {
|
|
6
|
+
iconName: "play" | "keyPlays" | "stats" | "fantasy" | "bets" | "warning";
|
|
7
|
+
index: number;
|
|
8
|
+
active: boolean;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
focused?: boolean | undefined;
|
|
11
|
+
focusKey: string;
|
|
12
|
+
onBecameFocused: () => void;
|
|
13
|
+
buttonRef?: React.Ref<HTMLDivElement> | undefined;
|
|
14
|
+
} & import("@/external/spatial-navigation").WithFocusableProps): {
|
|
15
|
+
cleanup?: (() => void) | undefined;
|
|
16
|
+
componentDidUpdate(prevProps: Readonly<RemoteControlProps & {
|
|
17
|
+
iconName: "play" | "keyPlays" | "stats" | "fantasy" | "bets" | "warning";
|
|
18
|
+
index: number;
|
|
19
|
+
active: boolean;
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
focused?: boolean | undefined;
|
|
22
|
+
focusKey: string;
|
|
23
|
+
onBecameFocused: () => void;
|
|
24
|
+
buttonRef?: React.Ref<HTMLDivElement> | undefined;
|
|
25
|
+
} & import("@/external/spatial-navigation").WithFocusableProps>): void;
|
|
26
|
+
componentDidMount(): void;
|
|
27
|
+
componentWillUnmount(): void;
|
|
28
|
+
handleKeyDown: (e: KeyboardEvent) => void;
|
|
29
|
+
render(): React.JSX.Element;
|
|
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;
|
|
50
|
+
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
51
|
+
props: Readonly<{
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
}> & Readonly<RemoteControlProps & {
|
|
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
|
+
}>;
|
|
66
|
+
context: any;
|
|
67
|
+
refs: {
|
|
68
|
+
[key: string]: React.ReactInstance;
|
|
69
|
+
};
|
|
70
|
+
componentWillMount?(): void;
|
|
71
|
+
componentWillReceiveProps?(nextProps: Readonly<RemoteControlProps & {
|
|
72
|
+
iconName: "play" | "keyPlays" | "stats" | "fantasy" | "bets" | "warning";
|
|
73
|
+
index: number;
|
|
74
|
+
active: boolean;
|
|
75
|
+
children?: React.ReactNode;
|
|
76
|
+
focused?: boolean | undefined;
|
|
77
|
+
focusKey: string;
|
|
78
|
+
onBecameFocused: () => void;
|
|
79
|
+
buttonRef?: React.Ref<HTMLDivElement> | undefined;
|
|
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;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ScrollableGradient.styles.css';
|
|
3
|
+
interface ScrollableGradientProps {
|
|
4
|
+
scrolled: boolean;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare class ScrollableGradient extends React.Component<ScrollableGradientProps> {
|
|
8
|
+
constructor(props: ScrollableGradientProps);
|
|
9
|
+
render(): React.JSX.Element;
|
|
10
|
+
}
|
|
11
|
+
export default ScrollableGradient;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import './SegmentButton.styles.css';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
interface SegmentButtonProps extends HTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
}
|
|
6
|
+
declare class SegmentButton extends React.Component<SegmentButtonProps> {
|
|
7
|
+
constructor(props: SegmentButtonProps);
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
|
+
}
|
|
10
|
+
export default SegmentButton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import './WatchButton.styles.css';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
interface WatchButtonProps extends HTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
}
|
|
6
|
+
declare class WatchButton extends React.Component<WatchButtonProps> {
|
|
7
|
+
constructor(props: WatchButtonProps);
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
|
+
}
|
|
10
|
+
export default WatchButton;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IconsName } from '@/components/atoms/SvgIcon/Icon';
|
|
2
|
+
import './PanelNavigation.styles.css';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
interface PanelNavigationProps {
|
|
5
|
+
items: {
|
|
6
|
+
title: string;
|
|
7
|
+
onEnter: () => void;
|
|
8
|
+
iconName: IconsName;
|
|
9
|
+
active: boolean;
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
declare class PanelNavigation extends React.Component<PanelNavigationProps> {
|
|
13
|
+
render(): React.JSX.Element;
|
|
14
|
+
}
|
|
15
|
+
export default PanelNavigation;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './SegmentController.styles.css';
|
|
3
|
+
interface SegmentControllerProps {
|
|
4
|
+
backgroundColor?: string;
|
|
5
|
+
items: {
|
|
6
|
+
title: string;
|
|
7
|
+
onEnter: () => void;
|
|
8
|
+
}[];
|
|
9
|
+
}
|
|
10
|
+
declare class SegmentController extends React.Component<SegmentControllerProps> {
|
|
11
|
+
constructor(props: SegmentControllerProps);
|
|
12
|
+
render(): React.JSX.Element;
|
|
13
|
+
}
|
|
14
|
+
export default SegmentController;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { INetworkClient } from './ports/networkClient';
|
|
2
|
+
declare class AxiosNetworkClient implements INetworkClient {
|
|
3
|
+
private client;
|
|
4
|
+
constructor({ baseURL, retries, delay, backoff, }: {
|
|
5
|
+
baseURL: string;
|
|
6
|
+
retries: number;
|
|
7
|
+
delay: number;
|
|
8
|
+
backoff: number;
|
|
9
|
+
});
|
|
10
|
+
private handleRetry;
|
|
11
|
+
get<TResponseData = any>(endpoint: string, params?: any): Promise<TResponseData>;
|
|
12
|
+
post<TRequestData = any, TResponseData = any>(endpoint: string, data: TRequestData): Promise<TResponseData>;
|
|
13
|
+
setAuthentication(token: string | null, apiKey: string | null): void;
|
|
14
|
+
}
|
|
15
|
+
export default AxiosNetworkClient;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICacheManager, ProduceCacheKeyParams } from './ports/cacheManager';
|
|
2
|
+
declare class LocalStorageCacheManager implements ICacheManager {
|
|
3
|
+
private cacheDuration;
|
|
4
|
+
constructor(cacheDuration?: number);
|
|
5
|
+
produceCacheKey(payload: ProduceCacheKeyParams): string;
|
|
6
|
+
setCache(key: string, data: unknown): void;
|
|
7
|
+
getCache<T = any>(key: string): T | null;
|
|
8
|
+
clearCache(key: string): void;
|
|
9
|
+
}
|
|
10
|
+
export default LocalStorageCacheManager;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type IRenderer } from './ports/renderer';
|
|
2
|
+
import { MaestroViewModels } from '@/view-models';
|
|
3
|
+
import type IMaestroEventDelegate from '@/interfaces/IMaestroEventDelegate';
|
|
4
|
+
declare class ReactRenderer implements IRenderer {
|
|
5
|
+
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
|
+
/**
|
|
14
|
+
* Renders the panel manager
|
|
15
|
+
* @param id The element ID to render in
|
|
16
|
+
* @param options Options for rendering including height and width
|
|
17
|
+
*/
|
|
18
|
+
renderPanel(id: string): Promise<() => void>;
|
|
19
|
+
/**
|
|
20
|
+
* @description Get the render function and renderer for the MaestroWebSDK. Useful to configure the renderer and fonts before rendering the component.
|
|
21
|
+
* @param {string} id - The id of the element to render the component in.
|
|
22
|
+
* @param {{ height: number; width: number }} options - The height and width of the component.
|
|
23
|
+
*/
|
|
24
|
+
private getRenderer;
|
|
25
|
+
}
|
|
26
|
+
export default ReactRenderer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type CachedData = {
|
|
2
|
+
data: unknown;
|
|
3
|
+
timestamp: number;
|
|
4
|
+
};
|
|
5
|
+
export interface ProduceCacheKeyParams {
|
|
6
|
+
endpoint: string;
|
|
7
|
+
params?: Record<string, any>;
|
|
8
|
+
data?: any;
|
|
9
|
+
}
|
|
10
|
+
export interface ICacheManager {
|
|
11
|
+
setCache(key: string, data: unknown): void;
|
|
12
|
+
getCache<T = any>(key: string): T | null;
|
|
13
|
+
produceCacheKey(params: ProduceCacheKeyParams): string;
|
|
14
|
+
clearCache(key: string): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export interface INetworkClient {
|
|
2
|
+
get<TResponseData = any>(endpoint: string, params?: any): Promise<TResponseData>;
|
|
3
|
+
post<TRequestData = any, TResponseData = any>(endpoint: string, data: TRequestData): Promise<TResponseData>;
|
|
4
|
+
setAuthentication(token: string | null, apiKey: string | null): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import IMaestroEventDelegate from '../../interfaces/IMaestroEventDelegate';
|
|
2
|
+
import { MaestroViewModels } from '../../view-models';
|
|
3
|
+
type UnmountFn = () => void;
|
|
4
|
+
export interface IRenderer {
|
|
5
|
+
renderPanel(id: string): Promise<UnmountFn>;
|
|
6
|
+
setViewModels(eventId: string, delegate?: IMaestroEventDelegate): Promise<MaestroViewModels | null>;
|
|
7
|
+
viewModels: MaestroViewModels | null;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import withFocusable, { WithFocusableProps } from './withFocusable';
|
|
2
|
+
import { InitOptions, KeyMap } from './spatialNavigation';
|
|
3
|
+
declare const destroy: () => void, pause: () => void, resume: () => void, setFocus: (targetFocusKey: string, details?: Record<string, any>) => void, init: ({ debug, visualDebug, nativeMode, throttle, throttleKeypresses, }?: InitOptions) => void, setKeyMap: (keyMap: KeyMap) => void;
|
|
4
|
+
export { withFocusable, init, setKeyMap, destroy, pause, resume, setFocus };
|
|
5
|
+
export type { InitOptions, KeyMap, WithFocusableProps };
|