@applicaster/zapp-react-native-ui-components 12.0.0-alpha.4337072244 → 12.0.0-alpha.4342457208

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.
Files changed (86) hide show
  1. package/Components/BaseFocusable/index.tsx +2 -2
  2. package/Components/Cell/Cell.tsx +26 -5
  3. package/Components/Cell/CellWithFocusable.tsx +6 -4
  4. package/Components/Cell/TvOSCellComponent.tsx +3 -7
  5. package/Components/Focusable/Focusable.tsx +6 -1
  6. package/Components/FocusableGroup/index.tsx +10 -2
  7. package/Components/FreezeWithCallback/Freeze.tsx +31 -0
  8. package/Components/FreezeWithCallback/LICENSE +21 -0
  9. package/Components/FreezeWithCallback/Suspender.tsx +17 -0
  10. package/Components/FreezeWithCallback/__tests__/index.test.tsx +170 -0
  11. package/Components/FreezeWithCallback/index.tsx +3 -0
  12. package/Components/Layout/TV/ScreenContainer.tsx +79 -5
  13. package/Components/Layout/TV/__tests__/ScreenContainer.test.tsx +38 -28
  14. package/Components/Layout/TV/__tests__/__snapshots__/ScreenContainer.test.tsx.snap +25 -13
  15. package/Components/Layout/TV/__tests__/index.test.tsx +3 -2
  16. package/Components/Layout/TV/index.tsx +47 -41
  17. package/Components/Layout/TV/index.web.tsx +33 -0
  18. package/Components/Layout/index.tsx +15 -11
  19. package/Components/MasterCell/DefaultComponents/ActionButton.tsx +2 -1
  20. package/Components/MasterCell/DefaultComponents/BorderContainerView/index.tsx +86 -116
  21. package/Components/MasterCell/DefaultComponents/DynamicBadge.tsx +4 -2
  22. package/Components/MasterCell/DefaultComponents/FocusableView/index.tsx +17 -1
  23. package/Components/MasterCell/DefaultComponents/ImageBorderContainer/index.ts +71 -0
  24. package/Components/MasterCell/DefaultComponents/LiveImage/index.tsx +20 -0
  25. package/Components/MasterCell/DefaultComponents/index.ts +2 -0
  26. package/Components/MasterCell/DefaultComponents/tv/ButtonContainerView/index.tsx +6 -1
  27. package/Components/MasterCell/SharedUI/ProgressBar/hooks/useFillInPercent.ts +7 -1
  28. package/Components/MasterCell/dataAdapter.ts +21 -7
  29. package/Components/MasterCell/index.tsx +5 -3
  30. package/Components/MasterCell/utils/__tests__/insertBetween.test.js +9 -0
  31. package/Components/MasterCell/utils/index.ts +17 -30
  32. package/Components/Navigator/StackNavigator.tsx +57 -0
  33. package/Components/Navigator/index.ts +1 -0
  34. package/Components/PlayerContainer/PlayerContainer.tsx +12 -2
  35. package/Components/River/ComponentsMap/ComponentsMap.tsx +6 -0
  36. package/Components/River/RefreshControl.tsx +2 -2
  37. package/Components/RouteManager/index.tsx +2 -2
  38. package/Components/Screen/TV/hooks/index.ts +0 -2
  39. package/Components/Screen/TV/hooks/useInitialFocus.ts +6 -3
  40. package/Components/Screen/TV/index.web.tsx +43 -39
  41. package/Components/Screen/__tests__/Screen.test.tsx +3 -49
  42. package/Components/Screen/index.tsx +55 -76
  43. package/Components/Screen/navigationHandler.ts +6 -3
  44. package/Components/Screen/orientationHandler.ts +18 -7
  45. package/Components/Screen/utils.ts +16 -0
  46. package/Components/ScreenResolver/index.tsx +6 -11
  47. package/Components/Transitioner/Scene.tsx +39 -26
  48. package/Components/Transitioner/Transitioner.tsx +56 -48
  49. package/Components/Transitioner/__tests__/Scene.test.js +7 -0
  50. package/Components/Transitioner/__tests__/__snapshots__/Scene.test.js.snap +12 -4
  51. package/Components/Transitioner/__tests__/__snapshots__/transitioner.test.js.snap +2 -0
  52. package/Components/VideoLive/LiveImageManager.ts +28 -1
  53. package/Components/VideoLive/PlayerLiveImageComponent.tsx +52 -24
  54. package/Components/VideoLive/__tests__/__snapshots__/PlayerLiveImageComponent.test.tsx.snap +26 -24
  55. package/Components/VideoModal/ModalAnimation/AnimatedPlayerModalWrapper.tsx +2 -14
  56. package/Components/VideoModal/ModalAnimation/AnimatedScrollModal.tsx +79 -45
  57. package/Components/VideoModal/ModalAnimation/AnimatedVideoPlayerComponent.tsx +47 -33
  58. package/Components/VideoModal/ModalAnimation/AnimationComponent.tsx +121 -86
  59. package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +32 -4
  60. package/Components/VideoModal/ModalAnimation/utils.ts +7 -4
  61. package/Components/VideoModal/PlayerDetails.tsx +19 -5
  62. package/Components/VideoModal/PlayerWrapper.tsx +106 -69
  63. package/Components/VideoModal/VideoModal.tsx +31 -25
  64. package/Components/VideoModal/__tests__/PlayerDetails.test.tsx +7 -0
  65. package/Components/VideoModal/__tests__/PlayerWrapper.test.tsx +7 -0
  66. package/Components/VideoModal/__tests__/__snapshots__/PlayerDetails.test.tsx.snap +2 -0
  67. package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +134 -22
  68. package/Components/VideoModal/hooks/useModalSize.ts +10 -12
  69. package/Components/VideoModal/utils.ts +5 -2
  70. package/Components/Viewport/ViewportTracker/ViewportTracker.tsx +31 -40
  71. package/Components/ZappFrameworkComponents/BarView/BarView.tsx +4 -3
  72. package/Components/default-cell-renderer/__tests__/__snapshots__/defaultCellRenderer.test.tsx.snap +4 -4
  73. package/Contexts/ConfirmDialogState/index.ts +1 -1
  74. package/Contexts/FocusableGroupContext/FocusableGroupContext.ts +3 -0
  75. package/Contexts/FocusableGroupContext/FocusableGroupContextProvider.tsx +16 -0
  76. package/Contexts/FocusableGroupContext/__tests__/FocusableGroupContextProvider.test.tsx +22 -0
  77. package/Contexts/FocusableGroupContext/__tests__/withFocusableContext.test.tsx +26 -0
  78. package/Contexts/FocusableGroupContext/index.ts +7 -0
  79. package/Contexts/FocusableGroupContext/withFocusableContext.tsx +17 -0
  80. package/Contexts/ScreenDataContext/index.tsx +20 -0
  81. package/const.ts +6 -0
  82. package/index.js +3 -0
  83. package/package.json +5 -5
  84. package/Components/Screen/TV/hooks/useRestoreFocus.ts +0 -22
  85. /package/Components/FocusableGroup/{index.android.js → index.android.ts} +0 -0
  86. /package/Components/FocusableGroup/{index.ios.js → index.ios.ts} +0 -0
@@ -13,6 +13,7 @@ export enum ComponentAnimationType {
13
13
  }
14
14
 
15
15
  export const AUDIO_PLAYER_HORIZONTAL_PADDING = 15;
16
+ export const PROGRESS_BAR_HEIGHT = 3;
16
17
 
17
18
  export const defaultAspectRatioWidth = (height: number): number =>
18
19
  (height / 9) * 16;
@@ -233,7 +234,7 @@ export const gestureListenerHelper = (data) => {
233
234
  animatedValue,
234
235
  calculationData,
235
236
  modalSnapPoint,
236
- startAnimationDistance,
237
+ startComponentsAnimationDistance,
237
238
  startComponentsAnimation,
238
239
  setStartComponentsAnimation,
239
240
  getAnimationValue,
@@ -243,7 +244,7 @@ export const gestureListenerHelper = (data) => {
243
244
  if (listenerValue <= 0) {
244
245
  if (
245
246
  preparedValue >= 0 &&
246
- preparedValue <= modalSnapPoint - startAnimationDistance
247
+ preparedValue <= modalSnapPoint - startComponentsAnimationDistance
247
248
  ) {
248
249
  !startComponentsAnimation && setStartComponentsAnimation(true);
249
250
 
@@ -263,9 +264,11 @@ export const gestureListenerHelper = (data) => {
263
264
  animatedValue.setValue(value);
264
265
  }
265
266
  } else {
266
- if (preparedValue >= startAnimationDistance) {
267
+ if (preparedValue >= startComponentsAnimationDistance) {
267
268
  !startComponentsAnimation && setStartComponentsAnimation(true);
268
- const value = Math.round(preparedValue - startAnimationDistance);
269
+ const value = Math.round(
270
+ preparedValue - startComponentsAnimationDistance
271
+ );
269
272
 
270
273
  animatedValue.setValue(
271
274
  calculateAnimationValue(animationType, value, calculationData)
@@ -1,9 +1,17 @@
1
1
  import React, { useEffect, useRef } from "react";
2
- import { StyleProp, ViewStyle, Animated, Easing } from "react-native";
2
+ import {
3
+ StyleProp,
4
+ ViewStyle,
5
+ Animated,
6
+ Easing,
7
+ Dimensions,
8
+ } from "react-native";
3
9
  import { useTargetScreenData } from "@applicaster/zapp-react-native-utils/reactHooks/screen";
4
10
  import { ComponentsMap } from "@applicaster/zapp-react-native-ui-components/Components/River/ComponentsMap";
5
11
  import { useSafeAreaInsets } from "react-native-safe-area-context";
6
12
 
13
+ const { width: SCREEN_WIDTH } = Dimensions.get("screen");
14
+
7
15
  type Configuration = {
8
16
  [key: string]: any;
9
17
  modal_background_color?: string;
@@ -15,6 +23,7 @@ type Props = {
15
23
  configuration: Configuration;
16
24
  isTabletLandscape: boolean;
17
25
  isAudioPlayer?: boolean;
26
+ isTablet: boolean;
18
27
  };
19
28
 
20
29
  const containerStyle = ({
@@ -31,6 +40,7 @@ export const PlayerDetails = ({
31
40
  configuration,
32
41
  isTabletLandscape,
33
42
  isAudioPlayer,
43
+ isTablet,
34
44
  }: Props) => {
35
45
  const screenData = useTargetScreenData(entry);
36
46
  const insets = useSafeAreaInsets();
@@ -42,12 +52,12 @@ export const PlayerDetails = ({
42
52
  : {};
43
53
 
44
54
  // Animation setup
45
- const translateY = useRef(new Animated.Value(100)).current;
55
+ const translateY = useRef(new Animated.Value(50)).current;
46
56
  const opacity = useRef(new Animated.Value(0)).current;
47
57
 
48
58
  const runAnimation = () => {
49
59
  Animated.timing(translateY, {
50
- toValue: 0,
60
+ toValue: -30,
51
61
  duration: 500,
52
62
  easing: Easing.inOut(Easing.ease),
53
63
  useNativeDriver: true,
@@ -63,7 +73,7 @@ export const PlayerDetails = ({
63
73
 
64
74
  useEffect(() => {
65
75
  if (isAudioPlayer) {
66
- setTimeout(() => runAnimation(), 1000);
76
+ setTimeout(() => runAnimation(), 1500);
67
77
  }
68
78
  }, [isAudioPlayer]);
69
79
 
@@ -77,7 +87,11 @@ export const PlayerDetails = ({
77
87
  transform: [{ translateY }],
78
88
  opacity,
79
89
  },
80
- // isAudioPlayer && audioMarginStyle,
90
+ {
91
+ // workaround for avoid wrong text-height after going back to portrait rotation
92
+ // we don't see this view in landscape mode, so we are able to use fixed width from portrait mode
93
+ width: isTablet ? undefined : SCREEN_WIDTH,
94
+ },
81
95
  ]}
82
96
  >
83
97
  {screenData && (
@@ -7,21 +7,23 @@ import {
7
7
  ViewStyle,
8
8
  } from "react-native";
9
9
  import { Edge, SafeAreaView } from "react-native-safe-area-context";
10
-
11
10
  import { isTV } from "@applicaster/zapp-react-native-utils/reactUtils";
12
11
  import { useIsTablet } from "@applicaster/zapp-react-native-utils/reactHooks";
13
12
  import { PlayerDetails } from "./PlayerDetails";
14
13
  import { playerDimesionsHack } from "./utils";
15
14
  import { PathnameContext } from "../../Contexts/PathnameContext";
16
15
  import { ScreenContextProvider } from "../../Contexts/ScreenContext";
16
+ import { ROUTE_TYPES } from "@applicaster/zapp-react-native-utils/navigationUtils/routeTypes";
17
17
 
18
18
  import {
19
- AnimationComponent,
20
- ComponentAnimationType,
21
19
  AnimatedScrollModal,
22
20
  AnimatedVideoPlayerComponent,
21
+ AnimationComponent,
22
+ ComponentAnimationType,
23
23
  } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
24
24
 
25
+ const { width: SCREEN_WIDTH, height: SCREEN_HEIGHT } = Dimensions.get("screen");
26
+
25
27
  type DimensionsT = {
26
28
  width: number | string;
27
29
  height: number | string | undefined;
@@ -68,10 +70,8 @@ const directionStyles = (isTabletLandscape: boolean): ViewStyle => {
68
70
  };
69
71
 
70
72
  const getScreenAspectRatio = () => {
71
- const { width, height } = Dimensions.get("screen");
72
-
73
- const longEdge = Math.max(width, height);
74
- const shortEdge = Math.min(width, height);
73
+ const longEdge = Math.max(SCREEN_WIDTH, SCREEN_HEIGHT);
74
+ const shortEdge = Math.min(SCREEN_WIDTH, SCREEN_HEIGHT);
75
75
 
76
76
  return longEdge / shortEdge;
77
77
  };
@@ -96,7 +96,7 @@ const getEdges = (isTablet: boolean, isInlineModal: boolean) => {
96
96
  }
97
97
 
98
98
  if (!isInlineModal && Platform.OS === "android") {
99
- return ["top", "left", "right", "bottom"];
99
+ return [];
100
100
  }
101
101
 
102
102
  return ["top"];
@@ -124,10 +124,37 @@ const getTabletWidth = (
124
124
  return Number(width) - sidebarWidth;
125
125
  };
126
126
 
127
- export const PlayerWrapper = (props: Props) => {
127
+ const getStyles = (baseStyle, isMobile, isPortrait) => {
128
+ if (isMobile && isPortrait) {
129
+ return { width: SCREEN_WIDTH, height: SCREEN_HEIGHT };
130
+ }
131
+
132
+ if (isMobile && !isPortrait) {
133
+ return { width: SCREEN_HEIGHT, height: SCREEN_WIDTH };
134
+ }
135
+
136
+ return baseStyle;
137
+ };
138
+
139
+ const showDetails = (isMobile: boolean, docked: boolean): boolean => {
140
+ // for mobile we always show details. Mounting of it very heavy operation.
141
+ if (isMobile) {
142
+ return true;
143
+ }
144
+
145
+ // workaround for tablets we need to mount/unmount in order to avoid PlayerDetails content dissappearing
146
+ // FIXME - find out the reason of dissapearing of content
147
+ if (docked) {
148
+ return false;
149
+ }
150
+
151
+ return true;
152
+ };
153
+
154
+ const PlayerWrapperComponent = (props: Props) => {
128
155
  const {
129
156
  entry,
130
- style,
157
+ style: baseStyle,
131
158
  containerStyle,
132
159
  inline,
133
160
  docked,
@@ -142,6 +169,8 @@ export const PlayerWrapper = (props: Props) => {
142
169
 
143
170
  const isInlineModal = inline && isModal;
144
171
 
172
+ const style = getStyles(baseStyle, !isTablet, isInlineModal);
173
+
145
174
  const isTabletLandscape = !isTV() && isTablet && !isTabletPortrait;
146
175
 
147
176
  const tabletWidth = getTabletWidth(configuration, style);
@@ -161,7 +190,7 @@ export const PlayerWrapper = (props: Props) => {
161
190
  width: isInlineModal && docked ? undefined : baseDimensions.width,
162
191
  aspectRatio: !isInlineModal && !pip ? getScreenAspectRatio() : 16 / 9,
163
192
  }),
164
- [baseDimensions, isInlineModal, pip, docked]
193
+ [baseDimensions, isInlineModal, pip]
165
194
  );
166
195
 
167
196
  const containerDimensions: DimensionsT = React.useMemo(
@@ -180,65 +209,73 @@ export const PlayerWrapper = (props: Props) => {
180
209
  [containerDimensions, playerDimesionsHack]
181
210
  );
182
211
 
212
+ const pathname = `${ROUTE_TYPES.VIDEO_MODAL}/${entry?.id}`;
213
+
183
214
  return (
184
- <WrapperView
185
- edges={getEdges(isTablet, isInlineModal) as readonly Edge[]}
186
- style={[
187
- safeAreaStyles(configuration, isTablet),
188
- style,
189
- playerDimesionsHack,
190
- ]}
191
- >
192
- <AnimationComponent
193
- animationType={ComponentAnimationType.moveUpComponent}
194
- additionalData={{ saveArea: true }}
195
- style={directionStyles(isTabletLandscape)}
196
- >
197
- <ScreenContextProvider pathname={"videoModal"}>
198
- <PathnameContext.Provider value={"videoModal"}>
199
- <View
200
- testID={`${entry?.id}-player-container`}
201
- style={[
202
- defaultStyles.playerContainer,
203
- containerDimensions,
204
- containerStyle,
205
- playerDimesionsHack,
206
- ]}
207
- >
208
- <AnimationComponent
209
- animationType={ComponentAnimationType.moveUpComponent}
210
- style={isTabletLandscape ? defaultStyles.flex : undefined}
211
- additionalData={{
212
- useLayoutMeasure: isTabletLandscape,
213
- disableAnimatedComponent: !isTabletLandscape,
214
- resetAnimationValue: isTabletLandscape && docked,
215
- }}
216
- >
217
- <AnimatedVideoPlayerComponent>
218
- {children(childrenStyles)}
219
- </AnimatedVideoPlayerComponent>
220
- </AnimationComponent>
221
- </View>
222
- <AnimatedScrollModal>
223
- {isInlineModal ? (
224
- <AnimationComponent
225
- animationType={ComponentAnimationType.componentFade}
226
- style={defaultStyles.flex}
215
+ <PathnameContext.Provider value={pathname}>
216
+ <ScreenContextProvider pathname={pathname}>
217
+ <WrapperView
218
+ edges={getEdges(isTablet, isInlineModal) as readonly Edge[]}
219
+ style={[
220
+ safeAreaStyles(configuration, isTablet),
221
+ style,
222
+ playerDimesionsHack,
223
+ ]}
224
+ >
225
+ <AnimationComponent
226
+ animationType={ComponentAnimationType.moveUpComponent}
227
+ additionalData={{ saveArea: true }}
228
+ style={[directionStyles(isTabletLandscape), defaultStyles.flex]}
229
+ >
230
+ <PathnameContext.Provider value={pathname}>
231
+ <ScreenContextProvider pathname={pathname}>
232
+ <View
233
+ testID={`${entry?.id}-player-container`}
234
+ style={[
235
+ defaultStyles.playerContainer,
236
+ containerDimensions,
237
+ containerStyle,
238
+ playerDimesionsHack,
239
+ ]}
227
240
  >
228
- <PlayerDetails
229
- configuration={configuration}
230
- style={defaultStyles.playerDetails}
231
- entry={entry}
232
- isTabletLandscape={isTabletLandscape}
233
- />
234
- </AnimationComponent>
235
- ) : (
236
- <View style={defaultStyles.playerDetails} />
237
- )}
238
- </AnimatedScrollModal>
239
- </PathnameContext.Provider>
240
- </ScreenContextProvider>
241
- </AnimationComponent>
242
- </WrapperView>
241
+ <AnimationComponent
242
+ animationType={ComponentAnimationType.moveUpComponent}
243
+ style={isTabletLandscape ? defaultStyles.flex : undefined}
244
+ additionalData={{
245
+ useLayoutMeasure: isTabletLandscape,
246
+ disableAnimatedComponent: !isTabletLandscape,
247
+ resetAnimationValue: isTabletLandscape && docked,
248
+ }}
249
+ >
250
+ <AnimatedVideoPlayerComponent>
251
+ {children(childrenStyles)}
252
+ </AnimatedVideoPlayerComponent>
253
+ </AnimationComponent>
254
+ </View>
255
+
256
+ <AnimatedScrollModal>
257
+ {showDetails(!isTablet, docked) && (
258
+ <AnimationComponent
259
+ animationType={ComponentAnimationType.componentFade}
260
+ style={defaultStyles.flex}
261
+ >
262
+ <PlayerDetails
263
+ configuration={configuration}
264
+ style={defaultStyles.playerDetails}
265
+ entry={entry}
266
+ isTabletLandscape={isTabletLandscape}
267
+ isTablet={isTablet}
268
+ />
269
+ </AnimationComponent>
270
+ )}
271
+ </AnimatedScrollModal>
272
+ </ScreenContextProvider>
273
+ </PathnameContext.Provider>
274
+ </AnimationComponent>
275
+ </WrapperView>
276
+ </ScreenContextProvider>
277
+ </PathnameContext.Provider>
243
278
  );
244
279
  };
280
+
281
+ export const PlayerWrapper = PlayerWrapperComponent;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import * as R from "ramda";
3
- import { StyleSheet, View } from "react-native";
3
+ import { StyleSheet, View, StatusBar } from "react-native";
4
4
 
5
5
  import { HandlePlayable } from "@applicaster/zapp-react-native-ui-components/Components/HandlePlayable";
6
6
  import {
@@ -129,32 +129,38 @@ const VideoModalComponent = () => {
129
129
  const pathname = `${ROUTE_TYPES.VIDEO_MODAL}/${item?.id}`;
130
130
 
131
131
  return (
132
- <ScreenContextProvider pathname={pathname}>
132
+ <>
133
+ {/* TODO: Workaround to avoid unnecessary UI effect when switching from portrait to fullscreen */}
134
+ <StatusBar hidden={false} />
135
+ {/* TODO: Workaround to avoid unnecessary UI effect when switching from portrait to fullscreen */}
136
+
133
137
  <PathnameContext.Provider value={pathname}>
134
- {itemIdHooksFinished === item?.id ? (
135
- <AnimatedPlayerModalWrapper
136
- style={[
137
- styles.container,
138
- {
139
- backgroundColor,
140
- },
141
- ]}
142
- >
143
- <HandlePlayable
144
- item={item}
145
- isModal={mode !== "PIP"}
146
- modalHeight={modalSize.height}
147
- modalWidth={modalSize.width}
148
- mode={mode}
149
- />
150
- </AnimatedPlayerModalWrapper>
151
- ) : (
152
- <View style={styles.loaderContainer}>
153
- <Spinner />
154
- </View>
155
- )}
138
+ <ScreenContextProvider pathname={pathname}>
139
+ {itemIdHooksFinished === item?.id ? (
140
+ <AnimatedPlayerModalWrapper
141
+ style={[
142
+ styles.container,
143
+ {
144
+ backgroundColor,
145
+ },
146
+ ]}
147
+ >
148
+ <HandlePlayable
149
+ item={item}
150
+ isModal={mode !== "PIP"}
151
+ modalHeight={modalSize.height}
152
+ modalWidth={modalSize.width}
153
+ mode={mode}
154
+ />
155
+ </AnimatedPlayerModalWrapper>
156
+ ) : (
157
+ <View style={styles.loaderContainer}>
158
+ <Spinner />
159
+ </View>
160
+ )}
161
+ </ScreenContextProvider>
156
162
  </PathnameContext.Provider>
157
- </ScreenContextProvider>
163
+ </>
158
164
  );
159
165
  };
160
166
 
@@ -8,6 +8,13 @@ const props = {
8
8
  configuration: { modal_background_color: "transparent" },
9
9
  };
10
10
 
11
+ jest.mock("@applicaster/zapp-react-native-utils/reactHooks/layout", () => ({
12
+ useDimensions: jest.fn(() => ({
13
+ width: 20,
14
+ height: 30,
15
+ })),
16
+ }));
17
+
11
18
  jest.mock("react-native-safe-area-context", () => ({
12
19
  useSafeAreaInsets: jest.fn(() => ({
13
20
  top: 20,
@@ -25,6 +25,13 @@ jest.mock("react-native-gesture-handler");
25
25
 
26
26
  jest.mock("../PlayerDetails", () => ({ PlayerDetails: View }));
27
27
 
28
+ jest.mock(
29
+ "@applicaster/zapp-react-native-utils/reactHooks/screen/useScreenContext",
30
+ () => ({
31
+ useScreenContext: jest.fn().mockReturnValue({ screen: {}, entry: {} }),
32
+ })
33
+ );
34
+
28
35
  jest.mock("@applicaster/zapp-react-native-utils/reactHooks/device", () => ({
29
36
  useIsTablet,
30
37
  }));
@@ -9,6 +9,7 @@ exports[`PlayerDetails renders properly 1`] = `
9
9
  "flex": 1,
10
10
  "marginTop": -8,
11
11
  "paddingTop": -8,
12
+ "width": 750,
12
13
  }
13
14
  }
14
15
  >
@@ -29,6 +30,7 @@ exports[`PlayerDetails renders properly on tablet in landscape orientation 1`] =
29
30
  "flex": 1,
30
31
  "marginTop": -20,
31
32
  "paddingTop": 40,
33
+ "width": 750,
32
34
  }
33
35
  }
34
36
  >