@maestro_io/maestro-web-sdk 4.0.0-beta.2 → 4.0.0-beta.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/maestro-web-sdk.esm.js +4 -4
- package/dist/maestro-web-sdk.esm.js.map +1 -1
- package/dist/maestro-web-sdk.umd.js +4 -4
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/package.json +13 -9
- package/dist/src/components/atoms/BaseButton/BaseButton.d.ts +1 -1
- package/dist/src/components/atoms/Image/index.d.ts +1 -1
- package/dist/src/components/atoms/Rive/index.d.ts +141 -11
- package/dist/src/components/atoms/SvgIcon/BetGeneralIcon.d.ts +1 -2
- package/dist/src/components/atoms/SvgIcon/BetsIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/BetsWarningIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/ChatIcon.d.ts +4 -0
- package/dist/src/components/atoms/SvgIcon/CheckmarkIcon.d.ts +1 -2
- package/dist/src/components/atoms/SvgIcon/CollapseIcon.d.ts +1 -2
- package/dist/src/components/atoms/SvgIcon/ExpandIcon.d.ts +1 -2
- package/dist/src/components/atoms/SvgIcon/FantasyIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/FlameIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/HelloWorldIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/Icon.d.ts +5 -5
- package/dist/src/components/atoms/SvgIcon/KeyPlaysIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/MobilePhoneIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/PlayIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/ShopIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/ShopifyIcon.d.ts +4 -0
- package/dist/src/components/atoms/SvgIcon/StatsIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/TimesIcon.d.ts +1 -2
- package/dist/src/components/atoms/SvgIcon/WarningIcon.d.ts +1 -1
- package/dist/src/components/core/App/App.d.ts +1 -1
- package/dist/src/components/core/PanelManager/PanelManager.d.ts +1 -1
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.d.ts +8 -7
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.js +7 -6
- package/dist/src/components/molecules/ActionButton/ActionButton.d.ts +53 -7
- package/dist/src/components/molecules/HeadshotImage/HeadshotImage.d.ts +1 -1
- package/dist/src/components/molecules/Overlay/Overlay.d.ts +1 -1
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.d.ts +53 -7
- package/dist/src/components/molecules/TabLoadError/TabLoadError.d.ts +53 -7
- package/dist/src/components/molecules/WatchButton/WatchButton.d.ts +1 -1
- package/dist/src/components/organisms/PanelNavigation/PanelNavigation.d.ts +1 -1
- package/dist/src/components/organisms/SegmentController/SegmentController.d.ts +5 -4
- package/dist/src/development/TimeSeek.d.ts +1 -1
- package/dist/src/development/development.js +7 -4
- package/dist/src/external/ReactRenderer.js +15 -3
- package/dist/src/external/spatial-navigation/withFocusable.d.ts +53 -7
- package/dist/src/index.d.ts +1 -2
- package/dist/src/index.js +1 -1
- package/dist/src/interfaces/IMaestroEvent.d.ts +2 -2
- package/dist/src/interfaces/IMaestroManager.d.ts +2 -2
- package/dist/src/modules/bets/view/BetsView.d.ts +3 -3
- package/dist/src/modules/bets/view/HotProps/HotPropsView.d.ts +53 -7
- package/dist/src/modules/bets/view/SixPack/SixPackView.d.ts +5 -4
- package/dist/src/modules/bets/view/UserBets/BetResult/BetResult.d.ts +1 -1
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCard.d.ts +53 -7
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardEvent.d.ts +5 -4
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardFooter.d.ts +1 -2
- package/dist/src/modules/bets/view/UserBets/Boost/Boost.d.ts +1 -2
- package/dist/src/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.d.ts +1 -2
- package/dist/src/modules/bets/view/UserBets/Parlay/Parlay.d.ts +1 -2
- package/dist/src/modules/bets/view/UserBets/Straight/Straight.d.ts +1 -2
- package/dist/src/modules/bets/view/UserBets/Teaser/Teaser.d.ts +1 -2
- package/dist/src/modules/bets/view/UserBets/UserBetsView.d.ts +3 -3
- package/dist/src/modules/bets/view/components/Bet/Bet.d.ts +99 -11
- package/dist/src/modules/bets/view/components/BetPill/BetPill.d.ts +1 -1
- package/dist/src/modules/bets/view/components/BetsCard/BetsCardHeader.d.ts +1 -1
- package/dist/src/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.d.ts +1 -1
- package/dist/src/modules/bets/view/components/LocationWarning/LocationWarning.d.ts +1 -1
- package/dist/src/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.d.ts +5 -4
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/ExpandedAthletesList.d.ts +1 -1
- package/dist/src/modules/fantasy/components/LeagueCard/LeagueCard.d.ts +53 -7
- package/dist/src/modules/fantasy/components/TopPlayerCard/TopPlayerCard.d.ts +53 -7
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/ActiveAthletesMarquee.d.ts +1 -1
- package/dist/src/modules/fantasy/view/FantasyItemView.d.ts +6 -5
- package/dist/src/modules/fantasy/view/FantasyView.d.ts +3 -3
- package/dist/src/modules/fantasy/view/InactiveLeague/DraftDateCountdown.d.ts +1 -1
- package/dist/src/modules/fantasy/view/InactiveLeague/InactiveLeague.d.ts +53 -7
- package/dist/src/modules/fantasy/view/LoginView/LoginView.d.ts +53 -7
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.d.ts +53 -7
- package/dist/src/modules/fantasy/view/MatchupPair/ExpandedDoubleAthleteCards.d.ts +1 -1
- package/dist/src/modules/fantasy/view/MatchupPair/MatchupPair.d.ts +53 -7
- package/dist/src/modules/fantasy/view/MatchupSingle/ExpandedSingleAthleteCards.d.ts +1 -1
- package/dist/src/modules/fantasy/view/MatchupSingle/MatchupSingle.d.ts +53 -7
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.d.ts +53 -7
- package/dist/src/modules/fantasy/view/PromoView/PromoView.d.ts +53 -7
- package/dist/src/modules/hello-world/HelloWorldImage.d.ts +3 -0
- package/dist/src/modules/hello-world/HelloWorldView.d.ts +11 -0
- package/dist/src/modules/hello-world/HelloWorldView.js +33 -0
- package/dist/src/modules/hello-world/index.d.ts +2 -0
- package/dist/src/modules/hello-world/index.js +2 -0
- package/dist/src/modules/key-plays/view/KeyPlayCardScoreTagView.d.ts +1 -1
- package/dist/src/modules/key-plays/view/KeyPlayCardView.d.ts +7 -6
- package/dist/src/modules/key-plays/view/KeyPlayCardView.js +6 -11
- package/dist/src/modules/key-plays/view/KeyPlayErrorStateView.d.ts +1 -1
- package/dist/src/modules/key-plays/view/KeyPlaysView.d.ts +3 -3
- package/dist/src/modules/shop/mocks.js +1 -0
- package/dist/src/modules/shop/view/ProductDetailView/ProductDetailView.d.ts +1 -2
- package/dist/src/modules/shop/view/ProductDetailView/ProductDetailView.js +5 -1
- package/dist/src/modules/shop/view/ShopView.d.ts +3 -3
- package/dist/src/modules/shop/view/components/BrowseCard/BrowseCard.d.ts +54 -8
- package/dist/src/modules/shop/view/components/BrowseCard/BrowseCard.js +1 -1
- package/dist/src/modules/shop/view/components/ProductSummaryCard/ProductSummaryCard.d.ts +53 -7
- package/dist/src/modules/shop/view/components/ProductSummaryCard/ProductSummaryCard.js +1 -1
- package/dist/src/modules/shop/view/components/ShopPromoView/ShopPromoView.d.ts +1 -2
- package/dist/src/modules/shop/view/components/ShopSection/ShopSection.d.ts +5 -4
- package/dist/src/modules/shop/view-model/ShopViewModel.js +5 -1
- package/dist/src/modules/stats/utils/renderTeamStatistic.d.ts +1 -2
- package/dist/src/modules/stats/view/ActiveAthletes/ActiveAthletes.d.ts +2 -2
- package/dist/src/modules/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.d.ts +1 -2
- package/dist/src/modules/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.d.ts +1 -1
- package/dist/src/modules/stats/view/DriveSummary/DrivePlayCard.d.ts +53 -7
- package/dist/src/modules/stats/view/DriveSummary/DriveSummary.d.ts +1 -1
- package/dist/src/modules/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.d.ts +1 -1
- package/dist/src/modules/stats/view/DriveSummary/Header/DriveSummaryHeader.d.ts +1 -2
- package/dist/src/modules/stats/view/DriveSummary/MainStat/MainStat.d.ts +1 -2
- package/dist/src/modules/stats/view/GameLeaders/GameLeaders.d.ts +5 -4
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/DonutChart.d.ts +2 -2
- package/dist/src/modules/stats/view/MatchPredictor/MatchPredictorView.d.ts +53 -7
- package/dist/src/modules/stats/view/Penalties/Penalties.d.ts +1 -2
- package/dist/src/modules/stats/view/RecentGames/RecentGames.d.ts +53 -7
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.d.ts +1 -1
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.js +3 -1
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/ScoreItem.d.ts +53 -7
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/ScoresSection.d.ts +1 -2
- package/dist/src/modules/stats/view/ScoringSummary/ScoringSummary.d.ts +5 -2
- package/dist/src/modules/stats/view/ScoringSummary/ScoringSummary.js +20 -1
- package/dist/src/modules/stats/view/StatsItemView.d.ts +6 -5
- package/dist/src/modules/stats/view/StatsQRCode/StatsQRCodeView.d.ts +53 -7
- package/dist/src/modules/stats/view/StatsView.d.ts +3 -3
- package/dist/src/modules/stats/view/TeamStats/TeamStatsView.d.ts +53 -7
- package/dist/src/modules/stats/view/Teams/StatsCarousel.d.ts +2 -2
- package/dist/src/modules/stats/view/Teams/StatsProgressBar.d.ts +1 -2
- package/dist/src/modules/stats/view/Teams/Teams.d.ts +53 -7
- package/dist/src/modules/stats/view/Teams/Teams.js +17 -1
- package/dist/src/modules/stats/view/WinProbability/WinProbability.d.ts +53 -7
- package/dist/src/modules/stats/view/components/AthletesStatistics/AthletesStatistics.d.ts +53 -7
- package/dist/src/modules/stats/view/components/AthletesStatistics/StatisticTable.d.ts +1 -2
- package/dist/src/modules/stats/view-model/StatsViewModel.d.ts +1 -1
- package/dist/src/modules/stats/view-model/StatsViewModel.js +1 -1
- package/dist/src/services/AnalyticsService/AnalyticsService.js +3 -1
- package/dist/src/services/NetworkManager/NetworkManager.js +3 -3
- package/dist/src/view-models/MaestroEventViewModel.d.ts +1 -1
- package/dist/src/view-models/MaestroEventViewModel.js +6 -9
- package/package.json +13 -9
|
@@ -29,6 +29,6 @@ declare class Overlay extends React.Component<OverlayProps, OverlayState> {
|
|
|
29
29
|
get overlayMetadata(): string;
|
|
30
30
|
private trackOverlayViewed;
|
|
31
31
|
onLoadRiveInstance: (riveInstance: any | null) => void;
|
|
32
|
-
render():
|
|
32
|
+
render(): JSX.Element;
|
|
33
33
|
}
|
|
34
34
|
export default Overlay;
|
|
@@ -13,7 +13,7 @@ type PanelNavButtonProps = {
|
|
|
13
13
|
width: string;
|
|
14
14
|
};
|
|
15
15
|
declare const _default: {
|
|
16
|
-
new (props
|
|
16
|
+
new (props: (PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps) | Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>): {
|
|
17
17
|
state: import("../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
18
18
|
navigation: import("../../../external/spatial-navigation/spatialNavigation").default;
|
|
19
19
|
getChildContext(): {
|
|
@@ -33,20 +33,65 @@ declare const _default: {
|
|
|
33
33
|
componentDidMount(): void;
|
|
34
34
|
componentDidUpdate(): void;
|
|
35
35
|
componentWillUnmount(): void;
|
|
36
|
-
render(): React.ReactElement<PanelNavButtonProps & import("@/external/spatial-navigation").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: 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;
|
|
38
|
-
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
39
|
-
props: Readonly<{
|
|
40
|
-
children?: React.ReactNode;
|
|
41
|
-
}> & Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>;
|
|
36
|
+
render(): React.ReactElement<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
42
37
|
context: any;
|
|
38
|
+
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: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>) => import("../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null) | Pick<import("../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
39
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
40
|
+
readonly props: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps> & Readonly<{
|
|
41
|
+
children?: React.ReactNode;
|
|
42
|
+
}>;
|
|
43
43
|
refs: {
|
|
44
44
|
[key: string]: React.ReactInstance;
|
|
45
45
|
};
|
|
46
|
+
shouldComponentUpdate?(nextProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
47
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
48
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, prevState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
46
49
|
componentWillMount?(): void;
|
|
50
|
+
UNSAFE_componentWillMount?(): void;
|
|
47
51
|
componentWillReceiveProps?(nextProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, nextContext: any): void;
|
|
52
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, nextContext: any): void;
|
|
53
|
+
componentWillUpdate?(nextProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
54
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
55
|
+
};
|
|
56
|
+
new (props: PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps, context: any): {
|
|
57
|
+
state: import("../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
58
|
+
navigation: import("../../../external/spatial-navigation/spatialNavigation").default;
|
|
59
|
+
getChildContext(): {
|
|
60
|
+
parentFocusKey: string;
|
|
61
|
+
};
|
|
62
|
+
setFocus: (focusKey: string) => void;
|
|
63
|
+
navigateByDirection: (direction: import("../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
64
|
+
stealFocus: () => void;
|
|
65
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
66
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
67
|
+
onEnterPressHandler: (details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
68
|
+
onEnterReleaseHandler: () => void;
|
|
69
|
+
onBackPressHandler: (details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
70
|
+
onArrowPressHandler: (direction: import("../../../external/spatial-navigation/utils").Direction, details: import("../../../external/spatial-navigation/utils").Details) => boolean | void;
|
|
71
|
+
onBecameFocusedHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
72
|
+
onBecameBlurredHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
73
|
+
componentDidMount(): void;
|
|
74
|
+
componentDidUpdate(): void;
|
|
75
|
+
componentWillUnmount(): void;
|
|
76
|
+
render(): React.ReactElement<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
77
|
+
context: any;
|
|
78
|
+
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: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>) => import("../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null) | Pick<import("../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
79
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
80
|
+
readonly props: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps> & Readonly<{
|
|
81
|
+
children?: React.ReactNode;
|
|
82
|
+
}>;
|
|
83
|
+
refs: {
|
|
84
|
+
[key: string]: React.ReactInstance;
|
|
85
|
+
};
|
|
48
86
|
shouldComponentUpdate?(nextProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
87
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
88
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, prevState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
89
|
+
componentWillMount?(): void;
|
|
90
|
+
UNSAFE_componentWillMount?(): void;
|
|
91
|
+
componentWillReceiveProps?(nextProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, nextContext: any): void;
|
|
92
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, nextContext: any): void;
|
|
49
93
|
componentWillUpdate?(nextProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
94
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<PanelNavButtonProps & import("@/external/spatial-navigation").WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
50
95
|
};
|
|
51
96
|
contextTypes: {
|
|
52
97
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
@@ -54,5 +99,6 @@ declare const _default: {
|
|
|
54
99
|
childContextTypes: {
|
|
55
100
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
56
101
|
};
|
|
102
|
+
contextType?: React.Context<any> | undefined;
|
|
57
103
|
};
|
|
58
104
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import './TabLoadError.styles.css';
|
|
5
5
|
declare const _default: {
|
|
6
|
-
new (props
|
|
6
|
+
new (props: (object & WithFocusableProps) | Readonly<object & WithFocusableProps>): {
|
|
7
7
|
state: import("../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
8
8
|
navigation: import("../../../external/spatial-navigation/spatialNavigation").default;
|
|
9
9
|
getChildContext(): {
|
|
@@ -23,20 +23,65 @@ declare const _default: {
|
|
|
23
23
|
componentDidMount(): void;
|
|
24
24
|
componentDidUpdate(): void;
|
|
25
25
|
componentWillUnmount(): void;
|
|
26
|
-
render(): React.ReactElement<object & WithFocusableProps
|
|
27
|
-
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;
|
|
28
|
-
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
29
|
-
props: Readonly<{
|
|
30
|
-
children?: React.ReactNode;
|
|
31
|
-
}> & Readonly<object & WithFocusableProps>;
|
|
26
|
+
render(): React.ReactElement<object & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
32
27
|
context: any;
|
|
28
|
+
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: Readonly<object & WithFocusableProps>) => import("../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null) | Pick<import("../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
29
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
30
|
+
readonly props: Readonly<object & WithFocusableProps> & Readonly<{
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
}>;
|
|
33
33
|
refs: {
|
|
34
34
|
[key: string]: React.ReactInstance;
|
|
35
35
|
};
|
|
36
|
+
shouldComponentUpdate?(nextProps: Readonly<object & WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
37
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
38
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<object & WithFocusableProps>, prevState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
36
39
|
componentWillMount?(): void;
|
|
40
|
+
UNSAFE_componentWillMount?(): void;
|
|
37
41
|
componentWillReceiveProps?(nextProps: Readonly<object & WithFocusableProps>, nextContext: any): void;
|
|
42
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<object & WithFocusableProps>, nextContext: any): void;
|
|
43
|
+
componentWillUpdate?(nextProps: Readonly<object & WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
44
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<object & WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
45
|
+
};
|
|
46
|
+
new (props: object & WithFocusableProps, context: any): {
|
|
47
|
+
state: import("../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
48
|
+
navigation: import("../../../external/spatial-navigation/spatialNavigation").default;
|
|
49
|
+
getChildContext(): {
|
|
50
|
+
parentFocusKey: string;
|
|
51
|
+
};
|
|
52
|
+
setFocus: (focusKey: string) => void;
|
|
53
|
+
navigateByDirection: (direction: import("../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
54
|
+
stealFocus: () => void;
|
|
55
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
56
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
57
|
+
onEnterPressHandler: (details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
58
|
+
onEnterReleaseHandler: () => void;
|
|
59
|
+
onBackPressHandler: (details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
60
|
+
onArrowPressHandler: (direction: import("../../../external/spatial-navigation/utils").Direction, details: import("../../../external/spatial-navigation/utils").Details) => boolean | void;
|
|
61
|
+
onBecameFocusedHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
62
|
+
onBecameBlurredHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: import("../../../external/spatial-navigation/utils").Details) => void;
|
|
63
|
+
componentDidMount(): void;
|
|
64
|
+
componentDidUpdate(): void;
|
|
65
|
+
componentWillUnmount(): void;
|
|
66
|
+
render(): React.ReactElement<object & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
67
|
+
context: any;
|
|
68
|
+
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: Readonly<object & WithFocusableProps>) => import("../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null) | Pick<import("../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
69
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
70
|
+
readonly props: Readonly<object & WithFocusableProps> & Readonly<{
|
|
71
|
+
children?: React.ReactNode;
|
|
72
|
+
}>;
|
|
73
|
+
refs: {
|
|
74
|
+
[key: string]: React.ReactInstance;
|
|
75
|
+
};
|
|
38
76
|
shouldComponentUpdate?(nextProps: Readonly<object & WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
77
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
78
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<object & WithFocusableProps>, prevState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
79
|
+
componentWillMount?(): void;
|
|
80
|
+
UNSAFE_componentWillMount?(): void;
|
|
81
|
+
componentWillReceiveProps?(nextProps: Readonly<object & WithFocusableProps>, nextContext: any): void;
|
|
82
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<object & WithFocusableProps>, nextContext: any): void;
|
|
39
83
|
componentWillUpdate?(nextProps: Readonly<object & WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
84
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<object & WithFocusableProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
40
85
|
};
|
|
41
86
|
contextTypes: {
|
|
42
87
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
@@ -44,5 +89,6 @@ declare const _default: {
|
|
|
44
89
|
childContextTypes: {
|
|
45
90
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
46
91
|
};
|
|
92
|
+
contextType?: React.Context<any> | undefined;
|
|
47
93
|
};
|
|
48
94
|
export default _default;
|
|
@@ -5,6 +5,6 @@ interface WatchButtonProps extends HTMLAttributes<HTMLButtonElement> {
|
|
|
5
5
|
}
|
|
6
6
|
declare class WatchButton extends React.Component<WatchButtonProps> {
|
|
7
7
|
constructor(props: WatchButtonProps);
|
|
8
|
-
render():
|
|
8
|
+
render(): JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default WatchButton;
|
|
@@ -11,6 +11,6 @@ interface PanelNavigationProps {
|
|
|
11
11
|
}
|
|
12
12
|
declare class PanelNavigation extends React.Component<PanelNavigationProps> {
|
|
13
13
|
handleBecameFocused: (index: number) => () => void;
|
|
14
|
-
render():
|
|
14
|
+
render(): JSX.Element | null;
|
|
15
15
|
}
|
|
16
16
|
export default PanelNavigation;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="prop-types" />
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import './SegmentController.styles.css';
|
|
3
4
|
import { Direction, Layout } from '@/external/spatial-navigation/utils';
|
|
@@ -13,9 +14,9 @@ interface SegmentControllerProps {
|
|
|
13
14
|
declare class SegmentController extends React.Component<SegmentControllerProps> {
|
|
14
15
|
context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
|
|
15
16
|
static contextTypes: {
|
|
16
|
-
refsMap:
|
|
17
|
-
setRef:
|
|
18
|
-
scrollToFocusedElement:
|
|
17
|
+
refsMap: import("prop-types").Requireable<(HTMLElement | null | undefined)[]>;
|
|
18
|
+
setRef: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
19
|
+
scrollToFocusedElement: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
19
20
|
};
|
|
20
21
|
state: {
|
|
21
22
|
activeIndex: number;
|
|
@@ -24,6 +25,6 @@ declare class SegmentController extends React.Component<SegmentControllerProps>
|
|
|
24
25
|
onBecameFocused: (item: SegmentItem, i: number) => (layout: Layout) => void;
|
|
25
26
|
onEnterPress: (item: SegmentItem) => () => void;
|
|
26
27
|
handleArrowPress: (index: number) => (direction: Direction, _props: WithFocusableProps) => void;
|
|
27
|
-
render():
|
|
28
|
+
render(): JSX.Element;
|
|
28
29
|
}
|
|
29
30
|
export default SegmentController;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import ReactDOM from 'react-dom';
|
|
2
3
|
import SDK from '..';
|
|
3
4
|
import MaestroEventDelegate from './MaestroEventDelegate';
|
|
4
|
-
import React from 'react';
|
|
5
5
|
import TimeCodeSeek from './TimeSeek';
|
|
6
6
|
const eventDelegate = new MaestroEventDelegate();
|
|
7
7
|
SDK.configure({
|
|
@@ -26,8 +26,11 @@ const init = async () => {
|
|
|
26
26
|
setTimeout(async () => {
|
|
27
27
|
await SDK.renderPanel('panel-manager');
|
|
28
28
|
}, 0);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
React.createElement(
|
|
29
|
+
const rootElement = document.getElementById('root');
|
|
30
|
+
if (rootElement) {
|
|
31
|
+
ReactDOM.render((React.createElement("div", null,
|
|
32
|
+
React.createElement("div", { id: "panel-manager" }),
|
|
33
|
+
React.createElement(TimeCodeSeek, { eventId: EVENT_ID }))), rootElement);
|
|
34
|
+
}
|
|
32
35
|
};
|
|
33
36
|
init();
|
|
@@ -15,14 +15,23 @@ class ReactRenderer {
|
|
|
15
15
|
* @param options Options for rendering including height and width
|
|
16
16
|
*/
|
|
17
17
|
async renderPanel(id) {
|
|
18
|
+
// Check if there's already a renderer for this ID and clean it up first
|
|
19
|
+
if (this.renderersMap.has(id)) {
|
|
20
|
+
const existingRenderer = this.renderersMap.get(id);
|
|
21
|
+
existingRenderer.unmount();
|
|
22
|
+
this.renderersMap.delete(id);
|
|
23
|
+
}
|
|
18
24
|
const renderer = await this.getRenderer(id);
|
|
19
25
|
const App = require('../components/core/App').default;
|
|
20
26
|
const PanelManager = require('../components/core/PanelManager').default;
|
|
21
27
|
renderer.render(React.createElement(App, null,
|
|
22
28
|
React.createElement(PanelManager, null)));
|
|
23
29
|
return () => {
|
|
24
|
-
renderer
|
|
25
|
-
this.renderersMap.
|
|
30
|
+
// Only unmount if this renderer is still in the map (hasn't been replaced)
|
|
31
|
+
if (this.renderersMap.has(id) && this.renderersMap.get(id) === renderer) {
|
|
32
|
+
renderer.unmount();
|
|
33
|
+
this.renderersMap.delete(id);
|
|
34
|
+
}
|
|
26
35
|
};
|
|
27
36
|
}
|
|
28
37
|
/**
|
|
@@ -43,7 +52,10 @@ class ReactRenderer {
|
|
|
43
52
|
ReactDOM.render(children, el);
|
|
44
53
|
},
|
|
45
54
|
unmount: () => {
|
|
46
|
-
|
|
55
|
+
const el = document.getElementById(id);
|
|
56
|
+
if (el) {
|
|
57
|
+
ReactDOM.unmountComponentAtNode(el);
|
|
58
|
+
}
|
|
47
59
|
},
|
|
48
60
|
};
|
|
49
61
|
this.renderersMap.set(id, renderer);
|
|
@@ -32,7 +32,7 @@ export interface WithFocusableState {
|
|
|
32
32
|
parentFocusKey: string;
|
|
33
33
|
}
|
|
34
34
|
declare const withFocusable: <P extends object>({ forgetLastFocusedChild: configForgetLastFocusedChild, trackChildren: configTrackChildren, autoRestoreFocus: configAutoRestoreFocus, blockNavigationOut: configBlockNavigationOut, }?: WithFocusableConfig) => (WrappedComponent: import("react").ComponentType<P & WithFocusableProps>) => {
|
|
35
|
-
new (props
|
|
35
|
+
new (props: (P & WithFocusableProps) | Readonly<P & WithFocusableProps>): {
|
|
36
36
|
state: WithFocusableState;
|
|
37
37
|
navigation: import("./spatialNavigation").default;
|
|
38
38
|
getChildContext(): {
|
|
@@ -52,20 +52,65 @@ declare const withFocusable: <P extends object>({ forgetLastFocusedChild: config
|
|
|
52
52
|
componentDidMount(): void;
|
|
53
53
|
componentDidUpdate(): void;
|
|
54
54
|
componentWillUnmount(): void;
|
|
55
|
-
render(): import("react").ReactElement<P & WithFocusableProps
|
|
56
|
-
setState<K extends keyof WithFocusableState>(state: WithFocusableState | ((prevState: Readonly<WithFocusableState>, props: P & WithFocusableProps) => WithFocusableState | Pick<WithFocusableState, K>) | Pick<WithFocusableState, K>, callback?: (() => any) | undefined): void;
|
|
57
|
-
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
58
|
-
props: Readonly<{
|
|
59
|
-
children?: import("react").ReactNode;
|
|
60
|
-
}> & Readonly<P & WithFocusableProps>;
|
|
55
|
+
render(): import("react").ReactElement<P & WithFocusableProps, string | import("react").JSXElementConstructor<any>>;
|
|
61
56
|
context: any;
|
|
57
|
+
setState<K extends keyof WithFocusableState>(state: WithFocusableState | ((prevState: Readonly<WithFocusableState>, props: Readonly<P & WithFocusableProps>) => WithFocusableState | Pick<WithFocusableState, K> | null) | Pick<WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
58
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
59
|
+
readonly props: Readonly<P & WithFocusableProps> & Readonly<{
|
|
60
|
+
children?: import("react").ReactNode;
|
|
61
|
+
}>;
|
|
62
62
|
refs: {
|
|
63
63
|
[key: string]: import("react").ReactInstance;
|
|
64
64
|
};
|
|
65
|
+
shouldComponentUpdate?(nextProps: Readonly<P & WithFocusableProps>, nextState: Readonly<WithFocusableState>, nextContext: any): boolean;
|
|
66
|
+
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
67
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<P & WithFocusableProps>, prevState: Readonly<WithFocusableState>): any;
|
|
65
68
|
componentWillMount?(): void;
|
|
69
|
+
UNSAFE_componentWillMount?(): void;
|
|
66
70
|
componentWillReceiveProps?(nextProps: Readonly<P & WithFocusableProps>, nextContext: any): void;
|
|
71
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P & WithFocusableProps>, nextContext: any): void;
|
|
72
|
+
componentWillUpdate?(nextProps: Readonly<P & WithFocusableProps>, nextState: Readonly<WithFocusableState>, nextContext: any): void;
|
|
73
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<P & WithFocusableProps>, nextState: Readonly<WithFocusableState>, nextContext: any): void;
|
|
74
|
+
};
|
|
75
|
+
new (props: P & WithFocusableProps, context: any): {
|
|
76
|
+
state: WithFocusableState;
|
|
77
|
+
navigation: import("./spatialNavigation").default;
|
|
78
|
+
getChildContext(): {
|
|
79
|
+
parentFocusKey: string;
|
|
80
|
+
};
|
|
81
|
+
setFocus: (focusKey: string) => void;
|
|
82
|
+
navigateByDirection: (direction: Direction, details?: Record<string, any>) => void;
|
|
83
|
+
stealFocus: () => void;
|
|
84
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
85
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
86
|
+
onEnterPressHandler: (details: Details) => void;
|
|
87
|
+
onEnterReleaseHandler: () => void;
|
|
88
|
+
onBackPressHandler: (details: Details) => void;
|
|
89
|
+
onArrowPressHandler: (direction: Direction, details: Details) => boolean | void;
|
|
90
|
+
onBecameFocusedHandler: (layout: Layout, details: Details) => void;
|
|
91
|
+
onBecameBlurredHandler: (layout: Layout, details: Details) => void;
|
|
92
|
+
componentDidMount(): void;
|
|
93
|
+
componentDidUpdate(): void;
|
|
94
|
+
componentWillUnmount(): void;
|
|
95
|
+
render(): import("react").ReactElement<P & WithFocusableProps, string | import("react").JSXElementConstructor<any>>;
|
|
96
|
+
context: any;
|
|
97
|
+
setState<K extends keyof WithFocusableState>(state: WithFocusableState | ((prevState: Readonly<WithFocusableState>, props: Readonly<P & WithFocusableProps>) => WithFocusableState | Pick<WithFocusableState, K> | null) | Pick<WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
98
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
99
|
+
readonly props: Readonly<P & WithFocusableProps> & Readonly<{
|
|
100
|
+
children?: import("react").ReactNode;
|
|
101
|
+
}>;
|
|
102
|
+
refs: {
|
|
103
|
+
[key: string]: import("react").ReactInstance;
|
|
104
|
+
};
|
|
67
105
|
shouldComponentUpdate?(nextProps: Readonly<P & WithFocusableProps>, nextState: Readonly<WithFocusableState>, nextContext: any): boolean;
|
|
106
|
+
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
107
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<P & WithFocusableProps>, prevState: Readonly<WithFocusableState>): any;
|
|
108
|
+
componentWillMount?(): void;
|
|
109
|
+
UNSAFE_componentWillMount?(): void;
|
|
110
|
+
componentWillReceiveProps?(nextProps: Readonly<P & WithFocusableProps>, nextContext: any): void;
|
|
111
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P & WithFocusableProps>, nextContext: any): void;
|
|
68
112
|
componentWillUpdate?(nextProps: Readonly<P & WithFocusableProps>, nextState: Readonly<WithFocusableState>, nextContext: any): void;
|
|
113
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<P & WithFocusableProps>, nextState: Readonly<WithFocusableState>, nextContext: any): void;
|
|
69
114
|
};
|
|
70
115
|
contextTypes: {
|
|
71
116
|
parentFocusKey: PropTypes.Requireable<string>;
|
|
@@ -73,5 +118,6 @@ declare const withFocusable: <P extends object>({ forgetLastFocusedChild: config
|
|
|
73
118
|
childContextTypes: {
|
|
74
119
|
parentFocusKey: PropTypes.Requireable<string>;
|
|
75
120
|
};
|
|
121
|
+
contextType?: import("react").Context<any> | undefined;
|
|
76
122
|
};
|
|
77
123
|
export default withFocusable;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { UnmountFn } from './external/ports/renderer';
|
|
2
1
|
import IMaestroEventDelegate, { PanelEvent } from './interfaces/IMaestroEventDelegate';
|
|
3
2
|
import IMaestroManager, { SDKConfigParams } from './interfaces/IMaestroManager';
|
|
4
3
|
import IMaestroEvent from './interfaces/IMaestroEvent';
|
|
@@ -47,7 +46,7 @@ declare class MaestroWebSDK implements IMaestroManager {
|
|
|
47
46
|
* @returns The current event view model
|
|
48
47
|
*/
|
|
49
48
|
getMaestroEventViewModel(): MaestroEventViewModel;
|
|
50
|
-
renderPanel(id: string): Promise<
|
|
49
|
+
renderPanel(id: string): Promise<() => Promise<void>>;
|
|
51
50
|
getPageConfig(): PageConfig | null;
|
|
52
51
|
getGlobalConfig(): GlobalConfig | null;
|
|
53
52
|
}
|
package/dist/src/index.js
CHANGED
|
@@ -150,8 +150,8 @@ class MaestroWebSDK {
|
|
|
150
150
|
await this.analyticsService.pinchBackSessionStart();
|
|
151
151
|
const panelUnmountFn = await this.renderer.renderPanel(id);
|
|
152
152
|
return async () => {
|
|
153
|
-
panelUnmountFn();
|
|
154
153
|
await this.analyticsService.pinchBackSessionEnd();
|
|
154
|
+
panelUnmountFn();
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
getPageConfig() {
|
|
@@ -91,14 +91,14 @@ export default interface IMaestroEvent {
|
|
|
91
91
|
* @description Sets data on panel view models. Interface to pass any data to any panel.
|
|
92
92
|
* @param {Record<string, any>} panelData - Object with panel names as keys and their data as values
|
|
93
93
|
* @example
|
|
94
|
-
*
|
|
94
|
+
* setDataToPanel({
|
|
95
95
|
* [panelType]: {
|
|
96
96
|
* overrideUrl: 'https://...',
|
|
97
97
|
* customProperty: 'value'
|
|
98
98
|
* },
|
|
99
99
|
* })
|
|
100
100
|
*/
|
|
101
|
-
|
|
101
|
+
setDataToPanel(panelData: Record<string, any>): void;
|
|
102
102
|
simulateUseCase<T = any>(useCase: TestUseCase, panelType: MaestroPanelType, testData?: T): void;
|
|
103
103
|
/**
|
|
104
104
|
* @description Sets the active panel in the Maestro SDK, if the panel is available and not hidden.
|
|
@@ -39,7 +39,7 @@ export default interface IMaestroManager {
|
|
|
39
39
|
/**
|
|
40
40
|
* Render the PanelManager with the available panels for the current event in the specified HTML id element.
|
|
41
41
|
* @param id - The ID of the HTML element where the panel will be rendered.
|
|
42
|
-
* @return A Promise that resolves to
|
|
42
|
+
* @return A Promise that resolves to an async function to remove the panel when no longer needed.
|
|
43
43
|
*/
|
|
44
|
-
renderPanel(id: string): Promise<() => void
|
|
44
|
+
renderPanel(id: string): Promise<() => Promise<void>>;
|
|
45
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component } from 'react';
|
|
2
2
|
import './BetsView.styles.css';
|
|
3
3
|
import BetsViewModel, { BetItem, BetsErrorState } from '../view-model/BetsViewModel';
|
|
4
4
|
import { Direction } from '@/external/spatial-navigation/utils';
|
|
@@ -20,9 +20,9 @@ declare class BetsView extends Component<{}, BetsViewState> {
|
|
|
20
20
|
get viewModel(): BetsViewModel;
|
|
21
21
|
componentDidMount(): void;
|
|
22
22
|
componentWillUnmount(): void;
|
|
23
|
-
renderBetItem: (item: BetItem) =>
|
|
23
|
+
renderBetItem: (item: BetItem) => JSX.Element | null;
|
|
24
24
|
clearTabLoadFailure: () => void;
|
|
25
25
|
onArrowPress: (d: Direction) => void;
|
|
26
|
-
render():
|
|
26
|
+
render(): JSX.Element;
|
|
27
27
|
}
|
|
28
28
|
export default BetsView;
|
|
@@ -9,7 +9,7 @@ type HotPropsViewProps = {
|
|
|
9
9
|
hasFocusedChild?: boolean;
|
|
10
10
|
};
|
|
11
11
|
declare const _default: {
|
|
12
|
-
new (props
|
|
12
|
+
new (props: (HotPropsViewProps & WithFocusableProps) | Readonly<HotPropsViewProps & WithFocusableProps>): {
|
|
13
13
|
state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
14
14
|
navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
|
|
15
15
|
getChildContext(): {
|
|
@@ -29,20 +29,65 @@ declare const _default: {
|
|
|
29
29
|
componentDidMount(): void;
|
|
30
30
|
componentDidUpdate(): void;
|
|
31
31
|
componentWillUnmount(): void;
|
|
32
|
-
render(): React.ReactElement<HotPropsViewProps & WithFocusableProps
|
|
33
|
-
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;
|
|
34
|
-
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
35
|
-
props: Readonly<{
|
|
36
|
-
children?: React.ReactNode;
|
|
37
|
-
}> & Readonly<HotPropsViewProps & WithFocusableProps>;
|
|
32
|
+
render(): React.ReactElement<HotPropsViewProps & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
38
33
|
context: any;
|
|
34
|
+
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: Readonly<HotPropsViewProps & WithFocusableProps>) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
35
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
36
|
+
readonly props: Readonly<HotPropsViewProps & WithFocusableProps> & Readonly<{
|
|
37
|
+
children?: React.ReactNode;
|
|
38
|
+
}>;
|
|
39
39
|
refs: {
|
|
40
40
|
[key: string]: React.ReactInstance;
|
|
41
41
|
};
|
|
42
|
+
shouldComponentUpdate?(nextProps: Readonly<HotPropsViewProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
43
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
44
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<HotPropsViewProps & WithFocusableProps>, prevState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
42
45
|
componentWillMount?(): void;
|
|
46
|
+
UNSAFE_componentWillMount?(): void;
|
|
43
47
|
componentWillReceiveProps?(nextProps: Readonly<HotPropsViewProps & WithFocusableProps>, nextContext: any): void;
|
|
48
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<HotPropsViewProps & WithFocusableProps>, nextContext: any): void;
|
|
49
|
+
componentWillUpdate?(nextProps: Readonly<HotPropsViewProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
50
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<HotPropsViewProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
51
|
+
};
|
|
52
|
+
new (props: HotPropsViewProps & WithFocusableProps, context: any): {
|
|
53
|
+
state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
54
|
+
navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
|
|
55
|
+
getChildContext(): {
|
|
56
|
+
parentFocusKey: string;
|
|
57
|
+
};
|
|
58
|
+
setFocus: (focusKey: string) => void;
|
|
59
|
+
navigateByDirection: (direction: Direction, details?: Record<string, any>) => void;
|
|
60
|
+
stealFocus: () => void;
|
|
61
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
62
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
63
|
+
onEnterPressHandler: (details: import("@/external/spatial-navigation/utils").Details) => void;
|
|
64
|
+
onEnterReleaseHandler: () => void;
|
|
65
|
+
onBackPressHandler: (details: import("@/external/spatial-navigation/utils").Details) => void;
|
|
66
|
+
onArrowPressHandler: (direction: Direction, details: import("@/external/spatial-navigation/utils").Details) => boolean | void;
|
|
67
|
+
onBecameFocusedHandler: (layout: Layout, details: import("@/external/spatial-navigation/utils").Details) => void;
|
|
68
|
+
onBecameBlurredHandler: (layout: Layout, details: import("@/external/spatial-navigation/utils").Details) => void;
|
|
69
|
+
componentDidMount(): void;
|
|
70
|
+
componentDidUpdate(): void;
|
|
71
|
+
componentWillUnmount(): void;
|
|
72
|
+
render(): React.ReactElement<HotPropsViewProps & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
73
|
+
context: any;
|
|
74
|
+
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: Readonly<HotPropsViewProps & WithFocusableProps>) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
75
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
76
|
+
readonly props: Readonly<HotPropsViewProps & WithFocusableProps> & Readonly<{
|
|
77
|
+
children?: React.ReactNode;
|
|
78
|
+
}>;
|
|
79
|
+
refs: {
|
|
80
|
+
[key: string]: React.ReactInstance;
|
|
81
|
+
};
|
|
44
82
|
shouldComponentUpdate?(nextProps: Readonly<HotPropsViewProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
83
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
84
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<HotPropsViewProps & WithFocusableProps>, prevState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
85
|
+
componentWillMount?(): void;
|
|
86
|
+
UNSAFE_componentWillMount?(): void;
|
|
87
|
+
componentWillReceiveProps?(nextProps: Readonly<HotPropsViewProps & WithFocusableProps>, nextContext: any): void;
|
|
88
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<HotPropsViewProps & WithFocusableProps>, nextContext: any): void;
|
|
45
89
|
componentWillUpdate?(nextProps: Readonly<HotPropsViewProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
90
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<HotPropsViewProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
46
91
|
};
|
|
47
92
|
contextTypes: {
|
|
48
93
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
@@ -50,5 +95,6 @@ declare const _default: {
|
|
|
50
95
|
childContextTypes: {
|
|
51
96
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
52
97
|
};
|
|
98
|
+
contextType?: React.Context<any> | undefined;
|
|
53
99
|
};
|
|
54
100
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="prop-types" />
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import './SixPackView.style.css';
|
|
3
4
|
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
@@ -8,15 +9,15 @@ type Props = WithFocusableProps & {
|
|
|
8
9
|
};
|
|
9
10
|
export default class FocusableSixPackViewWrapper extends React.Component<Props> {
|
|
10
11
|
static contextTypes: {
|
|
11
|
-
refsMap:
|
|
12
|
-
setRef:
|
|
13
|
-
scrollToFocusedElement:
|
|
12
|
+
refsMap: import("prop-types").Requireable<(HTMLElement | null | undefined)[]>;
|
|
13
|
+
setRef: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
14
|
+
scrollToFocusedElement: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
14
15
|
};
|
|
15
16
|
context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
|
|
16
17
|
onBecameFocused: (layout: Layout) => void;
|
|
17
18
|
onArrowPress: (d: Direction, _props: any) => void;
|
|
18
19
|
get viewModel(): import("../../view-model/BetsViewModel").BetsViewModel;
|
|
19
20
|
onEnterPress: () => void;
|
|
20
|
-
render():
|
|
21
|
+
render(): JSX.Element;
|
|
21
22
|
}
|
|
22
23
|
export {};
|