@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
|
@@ -7,7 +7,7 @@ type WinProbabilityProps = {
|
|
|
7
7
|
item: WinProbabilityStatsItem;
|
|
8
8
|
};
|
|
9
9
|
declare const _default: {
|
|
10
|
-
new (props
|
|
10
|
+
new (props: (WinProbabilityProps & WithFocusableProps) | Readonly<WinProbabilityProps & WithFocusableProps>): {
|
|
11
11
|
state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
12
12
|
navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
|
|
13
13
|
getChildContext(): {
|
|
@@ -27,20 +27,65 @@ declare const _default: {
|
|
|
27
27
|
componentDidMount(): void;
|
|
28
28
|
componentDidUpdate(): void;
|
|
29
29
|
componentWillUnmount(): void;
|
|
30
|
-
render(): React.ReactElement<WinProbabilityProps & WithFocusableProps
|
|
31
|
-
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: WinProbabilityProps & 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;
|
|
32
|
-
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
33
|
-
props: Readonly<{
|
|
34
|
-
children?: React.ReactNode;
|
|
35
|
-
}> & Readonly<WinProbabilityProps & WithFocusableProps>;
|
|
30
|
+
render(): React.ReactElement<WinProbabilityProps & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
36
31
|
context: any;
|
|
32
|
+
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<WinProbabilityProps & 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;
|
|
33
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
34
|
+
readonly props: Readonly<WinProbabilityProps & WithFocusableProps> & Readonly<{
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
}>;
|
|
37
37
|
refs: {
|
|
38
38
|
[key: string]: React.ReactInstance;
|
|
39
39
|
};
|
|
40
|
+
shouldComponentUpdate?(nextProps: Readonly<WinProbabilityProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
41
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
42
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<WinProbabilityProps & WithFocusableProps>, prevState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
40
43
|
componentWillMount?(): void;
|
|
44
|
+
UNSAFE_componentWillMount?(): void;
|
|
41
45
|
componentWillReceiveProps?(nextProps: Readonly<WinProbabilityProps & WithFocusableProps>, nextContext: any): void;
|
|
46
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<WinProbabilityProps & WithFocusableProps>, nextContext: any): void;
|
|
47
|
+
componentWillUpdate?(nextProps: Readonly<WinProbabilityProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
48
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<WinProbabilityProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
49
|
+
};
|
|
50
|
+
new (props: WinProbabilityProps & WithFocusableProps, context: any): {
|
|
51
|
+
state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
52
|
+
navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
|
|
53
|
+
getChildContext(): {
|
|
54
|
+
parentFocusKey: string;
|
|
55
|
+
};
|
|
56
|
+
setFocus: (focusKey: string) => void;
|
|
57
|
+
navigateByDirection: (direction: import("../../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
58
|
+
stealFocus: () => void;
|
|
59
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
60
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
61
|
+
onEnterPressHandler: (details: import("../../../../external/spatial-navigation/utils").Details) => void;
|
|
62
|
+
onEnterReleaseHandler: () => void;
|
|
63
|
+
onBackPressHandler: (details: import("../../../../external/spatial-navigation/utils").Details) => void;
|
|
64
|
+
onArrowPressHandler: (direction: import("../../../../external/spatial-navigation/utils").Direction, details: import("../../../../external/spatial-navigation/utils").Details) => boolean | void;
|
|
65
|
+
onBecameFocusedHandler: (layout: import("../../../../external/spatial-navigation/utils").Layout, details: import("../../../../external/spatial-navigation/utils").Details) => void;
|
|
66
|
+
onBecameBlurredHandler: (layout: import("../../../../external/spatial-navigation/utils").Layout, details: import("../../../../external/spatial-navigation/utils").Details) => void;
|
|
67
|
+
componentDidMount(): void;
|
|
68
|
+
componentDidUpdate(): void;
|
|
69
|
+
componentWillUnmount(): void;
|
|
70
|
+
render(): React.ReactElement<WinProbabilityProps & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
71
|
+
context: any;
|
|
72
|
+
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<WinProbabilityProps & 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;
|
|
73
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
74
|
+
readonly props: Readonly<WinProbabilityProps & WithFocusableProps> & Readonly<{
|
|
75
|
+
children?: React.ReactNode;
|
|
76
|
+
}>;
|
|
77
|
+
refs: {
|
|
78
|
+
[key: string]: React.ReactInstance;
|
|
79
|
+
};
|
|
42
80
|
shouldComponentUpdate?(nextProps: Readonly<WinProbabilityProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
81
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
82
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<WinProbabilityProps & WithFocusableProps>, prevState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
83
|
+
componentWillMount?(): void;
|
|
84
|
+
UNSAFE_componentWillMount?(): void;
|
|
85
|
+
componentWillReceiveProps?(nextProps: Readonly<WinProbabilityProps & WithFocusableProps>, nextContext: any): void;
|
|
86
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<WinProbabilityProps & WithFocusableProps>, nextContext: any): void;
|
|
43
87
|
componentWillUpdate?(nextProps: Readonly<WinProbabilityProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
88
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<WinProbabilityProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
44
89
|
};
|
|
45
90
|
contextTypes: {
|
|
46
91
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
@@ -48,5 +93,6 @@ declare const _default: {
|
|
|
48
93
|
childContextTypes: {
|
|
49
94
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
50
95
|
};
|
|
96
|
+
contextType?: React.Context<any> | undefined;
|
|
51
97
|
};
|
|
52
98
|
export default _default;
|
|
@@ -22,7 +22,7 @@ export type AthletesStatisticsProps = {
|
|
|
22
22
|
item: AthletesStatisticsItem;
|
|
23
23
|
};
|
|
24
24
|
declare const _default: {
|
|
25
|
-
new (props
|
|
25
|
+
new (props: (AthletesStatisticsProps & WithFocusableProps) | Readonly<AthletesStatisticsProps & WithFocusableProps>): {
|
|
26
26
|
state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
27
27
|
navigation: import("../../../../../external/spatial-navigation/spatialNavigation").default;
|
|
28
28
|
getChildContext(): {
|
|
@@ -42,20 +42,65 @@ declare const _default: {
|
|
|
42
42
|
componentDidMount(): void;
|
|
43
43
|
componentDidUpdate(): void;
|
|
44
44
|
componentWillUnmount(): void;
|
|
45
|
-
render(): React.ReactElement<AthletesStatisticsProps & WithFocusableProps
|
|
46
|
-
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: AthletesStatisticsProps & 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;
|
|
47
|
-
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
48
|
-
props: Readonly<{
|
|
49
|
-
children?: React.ReactNode;
|
|
50
|
-
}> & Readonly<AthletesStatisticsProps & WithFocusableProps>;
|
|
45
|
+
render(): React.ReactElement<AthletesStatisticsProps & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
51
46
|
context: any;
|
|
47
|
+
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<AthletesStatisticsProps & 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;
|
|
48
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
49
|
+
readonly props: Readonly<AthletesStatisticsProps & WithFocusableProps> & Readonly<{
|
|
50
|
+
children?: React.ReactNode;
|
|
51
|
+
}>;
|
|
52
52
|
refs: {
|
|
53
53
|
[key: string]: React.ReactInstance;
|
|
54
54
|
};
|
|
55
|
+
shouldComponentUpdate?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
56
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
57
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, prevState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
55
58
|
componentWillMount?(): void;
|
|
59
|
+
UNSAFE_componentWillMount?(): void;
|
|
56
60
|
componentWillReceiveProps?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextContext: any): void;
|
|
61
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextContext: any): void;
|
|
62
|
+
componentWillUpdate?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
63
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
64
|
+
};
|
|
65
|
+
new (props: AthletesStatisticsProps & WithFocusableProps, context: any): {
|
|
66
|
+
state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
67
|
+
navigation: import("../../../../../external/spatial-navigation/spatialNavigation").default;
|
|
68
|
+
getChildContext(): {
|
|
69
|
+
parentFocusKey: string;
|
|
70
|
+
};
|
|
71
|
+
setFocus: (focusKey: string) => void;
|
|
72
|
+
navigateByDirection: (direction: import("../../../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
73
|
+
stealFocus: () => void;
|
|
74
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
75
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
76
|
+
onEnterPressHandler: (details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
77
|
+
onEnterReleaseHandler: () => void;
|
|
78
|
+
onBackPressHandler: (details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
79
|
+
onArrowPressHandler: (direction: import("../../../../../external/spatial-navigation/utils").Direction, details: import("../../../../../external/spatial-navigation/utils").Details) => boolean | void;
|
|
80
|
+
onBecameFocusedHandler: (layout: import("../../../../../external/spatial-navigation/utils").Layout, details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
81
|
+
onBecameBlurredHandler: (layout: import("../../../../../external/spatial-navigation/utils").Layout, details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
82
|
+
componentDidMount(): void;
|
|
83
|
+
componentDidUpdate(): void;
|
|
84
|
+
componentWillUnmount(): void;
|
|
85
|
+
render(): React.ReactElement<AthletesStatisticsProps & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
86
|
+
context: any;
|
|
87
|
+
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<AthletesStatisticsProps & 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;
|
|
88
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
89
|
+
readonly props: Readonly<AthletesStatisticsProps & WithFocusableProps> & Readonly<{
|
|
90
|
+
children?: React.ReactNode;
|
|
91
|
+
}>;
|
|
92
|
+
refs: {
|
|
93
|
+
[key: string]: React.ReactInstance;
|
|
94
|
+
};
|
|
57
95
|
shouldComponentUpdate?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
96
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
97
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, prevState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
98
|
+
componentWillMount?(): void;
|
|
99
|
+
UNSAFE_componentWillMount?(): void;
|
|
100
|
+
componentWillReceiveProps?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextContext: any): void;
|
|
101
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextContext: any): void;
|
|
58
102
|
componentWillUpdate?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
103
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<AthletesStatisticsProps & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
59
104
|
};
|
|
60
105
|
contextTypes: {
|
|
61
106
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
@@ -63,5 +108,6 @@ declare const _default: {
|
|
|
63
108
|
childContextTypes: {
|
|
64
109
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
65
110
|
};
|
|
111
|
+
contextType?: React.Context<any> | undefined;
|
|
66
112
|
};
|
|
67
113
|
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { AthletesStatisticsProps } from './AthletesStatistics';
|
|
3
|
-
declare const StatisticsTable: (props: AthletesStatisticsProps) =>
|
|
2
|
+
declare const StatisticsTable: (props: AthletesStatisticsProps) => JSX.Element;
|
|
4
3
|
export default StatisticsTable;
|
|
@@ -156,7 +156,7 @@ export declare class StatsViewModel extends ViewModel {
|
|
|
156
156
|
* Sets panel-specific data configuration
|
|
157
157
|
* @param panelData - Object containing panel configuration
|
|
158
158
|
*/
|
|
159
|
-
|
|
159
|
+
setDataToPanel(panelData: Record<string, any>): void;
|
|
160
160
|
/**
|
|
161
161
|
* Initialize the ViewModel and start data fetching
|
|
162
162
|
*/
|
|
@@ -146,7 +146,7 @@ export class StatsViewModel extends ViewModel {
|
|
|
146
146
|
* Sets panel-specific data configuration
|
|
147
147
|
* @param panelData - Object containing panel configuration
|
|
148
148
|
*/
|
|
149
|
-
|
|
149
|
+
setDataToPanel(panelData) {
|
|
150
150
|
if ('overrideUrl' in panelData) {
|
|
151
151
|
const overrideUrl = panelData.overrideUrl;
|
|
152
152
|
if (typeof overrideUrl === 'string' && overrideUrl.length > 0) {
|
|
@@ -138,10 +138,12 @@ class AnalyticsService {
|
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
const metadata = pageConfig.page.metadata;
|
|
141
|
-
const event = SDK.getMaestroEventViewModel().getCurrentEventID();
|
|
142
141
|
const airing = metadata?.external_field_4 === 'airing'
|
|
143
142
|
? metadata.external_field_1 || ''
|
|
144
143
|
: '';
|
|
144
|
+
const event = metadata?.external_field_4 === 'event'
|
|
145
|
+
? metadata.external_field_1 || 'unknown'
|
|
146
|
+
: 'unknown';
|
|
145
147
|
const sport = metadata?.external_field_2 || '';
|
|
146
148
|
const league = metadata?.external_field_3 || '';
|
|
147
149
|
return {
|
|
@@ -122,7 +122,7 @@ class NetworkManager {
|
|
|
122
122
|
/**
|
|
123
123
|
* Make a request to the Maestro API
|
|
124
124
|
*/
|
|
125
|
-
async maestroApiRequest({ endpoint, method = HttpMethod.GET, params = {}, data = null, headers = {}, useCache =
|
|
125
|
+
async maestroApiRequest({ endpoint, method = HttpMethod.GET, params = {}, data = null, headers = {}, useCache = false, maestroDefaultHeaders = null, skipResponseBodyDeserialization = false, }) {
|
|
126
126
|
// Add SDK flavor to headers
|
|
127
127
|
const requestHeaders = {
|
|
128
128
|
'x-maestro-maestro-kit-flavor': SDK_FLAVOR,
|
|
@@ -179,7 +179,7 @@ class NetworkManager {
|
|
|
179
179
|
/**
|
|
180
180
|
* Make a request to an external API
|
|
181
181
|
*/
|
|
182
|
-
async externalApiRequest({ endpoint, method = HttpMethod.GET, params = {}, data = null, headers = {}, useCache =
|
|
182
|
+
async externalApiRequest({ endpoint, method = HttpMethod.GET, params = {}, data = null, headers = {}, useCache = false, skipResponseBodyDeserialization = false, }) {
|
|
183
183
|
// Check cache if using GET and cache is enabled
|
|
184
184
|
if (method === HttpMethod.GET && useCache) {
|
|
185
185
|
const cacheKey = this.cacheManager.produceCacheKey(JSON.stringify({
|
|
@@ -225,7 +225,7 @@ class NetworkManager {
|
|
|
225
225
|
/**
|
|
226
226
|
* Make a request to an external API and return both data and headers
|
|
227
227
|
*/
|
|
228
|
-
async externalApiRequestWithHeaders({ endpoint, method = HttpMethod.GET, params = {}, data = null, headers = {}, useCache =
|
|
228
|
+
async externalApiRequestWithHeaders({ endpoint, method = HttpMethod.GET, params = {}, data = null, headers = {}, useCache = false, skipResponseBodyDeserialization = false, }) {
|
|
229
229
|
// Check cache if using GET and cache is enabled
|
|
230
230
|
if (method === HttpMethod.GET && useCache) {
|
|
231
231
|
const cacheKey = this.cacheManager.produceCacheKey(JSON.stringify({
|
|
@@ -30,7 +30,7 @@ export declare class MaestroEventViewModel extends ViewModel implements IMaestro
|
|
|
30
30
|
setActivePanel(panelType: MaestroPanelType): void;
|
|
31
31
|
updatePlayerTimeCode(timestamp: number): void;
|
|
32
32
|
getPlayerTimeCode(): number | null;
|
|
33
|
-
|
|
33
|
+
setDataToPanel(panelData: Record<string, any>): void;
|
|
34
34
|
deinit(): Promise<void>;
|
|
35
35
|
updateKeyPlaysData(data: IMaestroKeyPlaysResponse | null): Promise<void>;
|
|
36
36
|
updateUserSettings(settings: IUserSettings): Promise<void>;
|
|
@@ -111,10 +111,7 @@ export class MaestroEventViewModel extends ViewModel {
|
|
|
111
111
|
? new ShopViewModel(eventId)
|
|
112
112
|
: null;
|
|
113
113
|
this.panelManagerViewModel = new PanelManagerViewModel();
|
|
114
|
-
this.navigation = new SpatialNavigation(
|
|
115
|
-
throttle: 150,
|
|
116
|
-
throttleKeypresses: true,
|
|
117
|
-
});
|
|
114
|
+
this.navigation = new SpatialNavigation();
|
|
118
115
|
}
|
|
119
116
|
setActivePanel(panelType) {
|
|
120
117
|
const index = this.panelManagerViewModel.getIndex(panelType);
|
|
@@ -143,7 +140,7 @@ export class MaestroEventViewModel extends ViewModel {
|
|
|
143
140
|
getPlayerTimeCode() {
|
|
144
141
|
return this.playerTimeCode;
|
|
145
142
|
}
|
|
146
|
-
|
|
143
|
+
setDataToPanel(panelData) {
|
|
147
144
|
const panelTypes = Object.keys(panelData);
|
|
148
145
|
// Map panel types to view model instances
|
|
149
146
|
const viewModels = {
|
|
@@ -160,12 +157,12 @@ export class MaestroEventViewModel extends ViewModel {
|
|
|
160
157
|
const viewModel = viewModels[panelType];
|
|
161
158
|
if (!viewModel) {
|
|
162
159
|
// Panel is not initialized, so we ignore the data
|
|
163
|
-
console.log(`[
|
|
160
|
+
console.log(`[setDataToPanel] Panel '${panelType}' not initialized/supported. Data ignored.`);
|
|
164
161
|
}
|
|
165
162
|
else {
|
|
166
|
-
// Panel exists, call its
|
|
167
|
-
if (panelType === 'espnStats' && viewModel.
|
|
168
|
-
viewModel.
|
|
163
|
+
// Panel exists, call its setDataToPanel method
|
|
164
|
+
if (panelType === 'espnStats' && viewModel.setDataToPanel) {
|
|
165
|
+
viewModel.setDataToPanel(data);
|
|
169
166
|
}
|
|
170
167
|
}
|
|
171
168
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maestro_io/maestro-web-sdk",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.4",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/maestro-web-sdk.umd.js",
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
"@babel/preset-env": "7.12.1",
|
|
39
39
|
"@babel/preset-react": "7.12.1",
|
|
40
40
|
"@babel/preset-typescript": "7.12.1",
|
|
41
|
-
"@types/enzyme-adapter-react-
|
|
41
|
+
"@types/enzyme-adapter-react-16": "^1.0.6",
|
|
42
42
|
"@types/jest": "24.0.25",
|
|
43
43
|
"@types/node": "10",
|
|
44
44
|
"@types/prop-types": "^15.7.10",
|
|
45
|
-
"@types/react": "
|
|
46
|
-
"@types/react-dom": "
|
|
45
|
+
"@types/react": "16.14.34",
|
|
46
|
+
"@types/react-dom": "16.9.18",
|
|
47
47
|
"@typescript-eslint/eslint-plugin": "2.34.0",
|
|
48
48
|
"@typescript-eslint/parser": "2.34.0",
|
|
49
49
|
"babel-jest": "26.6.3",
|
|
50
50
|
"babel-loader": "8",
|
|
51
51
|
"css-loader": "5",
|
|
52
52
|
"enzyme": "3.11.0",
|
|
53
|
-
"enzyme-adapter-react-
|
|
53
|
+
"enzyme-adapter-react-16": "1.15.7",
|
|
54
54
|
"eslint": "6.8.0",
|
|
55
55
|
"eslint-config-prettier": "6.0.0",
|
|
56
56
|
"eslint-plugin-react": "7.20.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"jest": "26.6.3",
|
|
63
63
|
"nodemon": "^3.1.9",
|
|
64
64
|
"prettier": "2.0.5",
|
|
65
|
-
"react-test-renderer": "
|
|
65
|
+
"react-test-renderer": "16.14.0",
|
|
66
66
|
"style-loader": "2",
|
|
67
67
|
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
|
68
68
|
"typescript": "^4",
|
|
@@ -75,9 +75,13 @@
|
|
|
75
75
|
"@sentry/browser": "7.68.0",
|
|
76
76
|
"axios": "^0.27.2",
|
|
77
77
|
"flexibility": "^2.0.1",
|
|
78
|
-
"prop-types": "15",
|
|
79
|
-
"react": "
|
|
80
|
-
"react-dom": "
|
|
78
|
+
"prop-types": "15.8.1",
|
|
79
|
+
"react": "16.14.0",
|
|
80
|
+
"react-dom": "16.14.0"
|
|
81
|
+
},
|
|
82
|
+
"peerDependencies": {
|
|
83
|
+
"react": "^16.0.0",
|
|
84
|
+
"react-dom": "^16.0.0"
|
|
81
85
|
},
|
|
82
86
|
"resolutions": {
|
|
83
87
|
"sockjs-client": "1.5.1",
|