@applicaster/zapp-react-native-ui-components 13.0.0-alpha.1338463240 → 13.0.0-alpha.1360301199

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 (98) hide show
  1. package/Components/AppContainer/__tests__/__snapshots__/AppContainer.test.js.snap +1 -1
  2. package/Components/AudioPlayer/__tests__/__snapshots__/Runtime.test.js.snap +4 -4
  3. package/Components/AudioPlayer/__tests__/__snapshots__/artWork.test.js.snap +3 -3
  4. package/Components/AudioPlayer/__tests__/__snapshots__/audioPlayer.test.js.snap +6 -6
  5. package/Components/AudioPlayer/__tests__/__snapshots__/audioPlayerLayout.test.js.snap +7 -7
  6. package/Components/AudioPlayer/__tests__/__snapshots__/channel.test.js.snap +3 -3
  7. package/Components/AudioPlayer/__tests__/__snapshots__/summary.test.js.snap +2 -2
  8. package/Components/AudioPlayer/__tests__/__snapshots__/title.test.js.snap +2 -2
  9. package/Components/BaseFocusable/index.tsx +65 -28
  10. package/Components/Cell/Cell.tsx +7 -3
  11. package/Components/Cell/TvOSCellComponent.tsx +4 -8
  12. package/Components/CellRendererResolver/__tests__/__snapshots__/cellRendererResolver.test.js.snap +20 -20
  13. package/Components/CellRendererResolver/__tests__/cellRendererResolver.test.js +5 -3
  14. package/Components/ComponentResolver/__tests__/__snapshots__/componentResolver.test.js.snap +5 -5
  15. package/Components/ComponentResolver/__tests__/componentResolver.test.js +11 -9
  16. package/Components/DisplayState/__tests__/__snapshots__/displayState.test.js.snap +2 -2
  17. package/Components/Focusable/Focusable.tsx +0 -54
  18. package/Components/Focusable/FocusableTvOS.tsx +1 -5
  19. package/Components/FocusableList/index.tsx +9 -26
  20. package/Components/FocusableScrollView/index.tsx +12 -39
  21. package/Components/GeneralContentScreen/utils/__tests__/useCurationAPI.test.js +9 -0
  22. package/Components/GeneralContentScreen/utils/useCurationAPI.ts +1 -1
  23. package/Components/Layout/TV/__tests__/ScreenContainer.test.tsx +1 -0
  24. package/Components/Layout/TV/__tests__/__snapshots__/LayoutContainer.test.tsx.snap +1 -1
  25. package/Components/Layout/TV/__tests__/__snapshots__/NavBarContainer.test.tsx.snap +3 -3
  26. package/Components/Layout/TV/__tests__/__snapshots__/ScreenContainer.test.tsx.snap +9 -9
  27. package/Components/Layout/TV/__tests__/__snapshots__/index.test.tsx.snap +1 -1
  28. package/Components/Layout/TV/__tests__/index.test.tsx +7 -3
  29. package/Components/MasterCell/DefaultComponents/Image/Image.ios.tsx +1 -1
  30. package/Components/MasterCell/DefaultComponents/SecondaryImage/__tests__/__snapshots__/Image.test.tsx.snap +3 -3
  31. package/Components/MasterCell/SharedUI/CollapsibleTextContainer/__tests__/__snapshots__/index.test.tsx.snap +1 -1
  32. package/Components/MasterCell/__tests__/__snapshots__/dataAdapter.test.js.snap +180 -180
  33. package/Components/MasterCell/__tests__/__snapshots__/elementMapper.test.js.snap +7 -7
  34. package/Components/MasterCell/__tests__/__snapshots__/masterCell.test.js.snap +34 -34
  35. package/Components/MasterCell/hooks/useAsyncRendering/index.ts +2 -2
  36. package/Components/OfflineHandler/__tests__/__snapshots__/index.test.tsx.snap +7 -7
  37. package/Components/OfflineHandler/__tests__/index.test.tsx +28 -25
  38. package/Components/PlayerContainer/PlayerContainer.tsx +5 -11
  39. package/Components/PlayerContainer/PlayerContainerContext.tsx +9 -0
  40. package/Components/River/RefreshControl.tsx +1 -1
  41. package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +17 -17
  42. package/Components/River/__tests__/__snapshots__/river.test.js.snap +12 -12
  43. package/Components/River/__tests__/componentsMap.test.js +61 -13
  44. package/Components/RouteManager/__tests__/__snapshots__/routeManager.test.js.snap +1 -1
  45. package/Components/RouteManager/__tests__/__snapshots__/testId.test.js.snap +1 -1
  46. package/Components/Screen/__tests__/Screen.test.tsx +41 -27
  47. package/Components/Screen/__tests__/__snapshots__/Screen.test.tsx.snap +4 -4
  48. package/Components/ScreenResolver/__tests__/__snapshots__/screenResolver.test.js.snap +2 -2
  49. package/Components/ScreenResolver/__tests__/screenResolver.test.js +31 -27
  50. package/Components/Tabs/Tab.tsx +1 -0
  51. package/Components/TextInputTv/__tests__/TextInputTv.test.js +42 -42
  52. package/Components/TextInputTv/__tests__/__snapshots__/TextInputTv.test.js.snap +7 -0
  53. package/Components/TextInputTv/index.tsx +2 -2
  54. package/Components/Touchable/__tests__/__snapshots__/touchable.test.tsx.snap +2 -2
  55. package/Components/Transitioner/__tests__/__snapshots__/AnimationManager.test.js.snap +26 -26
  56. package/Components/Transitioner/__tests__/__snapshots__/Scene.test.js.snap +9 -9
  57. package/Components/Transitioner/__tests__/__snapshots__/config.test.js.snap +20 -20
  58. package/Components/Transitioner/__tests__/__snapshots__/transitioner.test.js.snap +2 -2
  59. package/Components/VideoLive/PlayerLiveImageComponent.tsx +18 -16
  60. package/Components/VideoLive/__tests__/PlayerLiveImageComponent.test.tsx +63 -8
  61. package/Components/VideoLive/__tests__/__snapshots__/PlayerLiveImageComponent.test.tsx.snap +6 -6
  62. package/Components/VideoModal/ModalAnimation/AnimatedScrollModal.tsx +5 -1
  63. package/Components/VideoModal/ModalAnimation/AnimatedVideoPlayerComponent.tsx +5 -1
  64. package/Components/VideoModal/ModalAnimation/AnimationComponent.tsx +1 -1
  65. package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +4 -10
  66. package/Components/VideoModal/ModalAnimation/index.ts +2 -1
  67. package/Components/VideoModal/ModalAnimation/useModalAnimationContext.ts +6 -0
  68. package/Components/VideoModal/OpaqueLayer.tsx +33 -0
  69. package/Components/VideoModal/PlayerWrapper.tsx +16 -35
  70. package/Components/VideoModal/VideoModal.tsx +14 -23
  71. package/Components/VideoModal/__tests__/PlayerDetails.test.tsx +5 -2
  72. package/Components/VideoModal/__tests__/PlayerWrapper.test.tsx +13 -10
  73. package/Components/VideoModal/__tests__/__snapshots__/PlayerDetails.test.tsx.snap +4 -4
  74. package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +66 -156
  75. package/Components/VideoModal/hooks/__tests__/useDelayedPlayerDetails.test.ts +89 -0
  76. package/Components/VideoModal/hooks/index.ts +7 -0
  77. package/Components/VideoModal/hooks/useDelayedPlayerDetails.ts +49 -0
  78. package/Components/VideoModal/hooks/utils/__tests__/showDetails.test.ts +91 -0
  79. package/Components/VideoModal/hooks/utils/index.ts +33 -0
  80. package/Components/VideoModal/utils.ts +3 -5
  81. package/Components/Viewport/ViewportAware/__tests__/__snapshots__/viewportAware.test.js.snap +2 -2
  82. package/Components/Viewport/ViewportTracker/__tests__/__snapshots__/viewportTracker.test.js.snap +1 -1
  83. package/Components/ZappUIComponent/__tests__/__snapshots__/ZappUIComponent.test.js.snap +11 -11
  84. package/Components/default-cell-renderer/__tests__/__snapshots__/defaultCellRenderer.test.tsx.snap +30 -30
  85. package/Contexts/ConfigutaionContext/__tests__/__snapshots__/ConfigurationProvider.test.tsx.snap +1 -1
  86. package/Decorators/Navigator/__tests__/__snapshots__/navigator.test.js.snap +2 -2
  87. package/Decorators/RiverFeedLoader/__tests__/__snapshots__/riverFeedLoader.test.tsx.snap +77 -77
  88. package/Decorators/RiverFeedLoader/__tests__/riverFeedLoader.test.tsx +34 -39
  89. package/Decorators/RiverFeedLoader/__tests__/utils.test.ts +0 -9
  90. package/Decorators/RiverFeedLoader/index.tsx +1 -1
  91. package/Decorators/RiverFeedLoader/utils/getDatasourceUrl.ts +39 -0
  92. package/Decorators/RiverFeedLoader/utils/index.ts +29 -0
  93. package/Decorators/RiverFeedLoader/utils/usePipesContexts.ts +40 -0
  94. package/Decorators/RiverResolver/__tests__/__snapshots__/riverResolver.test.tsx.snap +5 -5
  95. package/Decorators/RiverResolver/__tests__/riverResolver.test.tsx +16 -10
  96. package/Decorators/ZappPipesDataConnector/index.tsx +32 -2
  97. package/package.json +12 -6
  98. package/Decorators/RiverFeedLoader/utils.ts +0 -100
@@ -1,5 +1,4 @@
1
1
  import * as React from "react";
2
- import * as R from "ramda";
3
2
 
4
3
  import { BaseFocusable } from "../BaseFocusable";
5
4
  import { focusManager } from "@applicaster/zapp-react-native-utils/appUtils/focusManager";
@@ -42,8 +41,6 @@ class Focusable extends BaseFocusable<Props> {
42
41
  this.resetLongPressTimeout = this.resetLongPressTimeout.bind(this);
43
42
  this.longPress = this.longPress.bind(this);
44
43
  this.press = this.press.bind(this);
45
- this.focus = this.focus.bind(this);
46
- this.blur = this.blur.bind(this);
47
44
  }
48
45
 
49
46
  /**
@@ -55,37 +52,6 @@ class Focusable extends BaseFocusable<Props> {
55
52
  return this.preferredFocus();
56
53
  }
57
54
 
58
- /**
59
- * Sets the focus on this item. Will trigger sequentially a sequence of
60
- * functions (willReceiveFocus, focus, hasReceivedFocus). If these functions (defined in the Focusable
61
- * Item underlying component) return promises, execution will wait before it proceeds to the next. This
62
- * is useful for triggering sequential operations that specifically require to fully run before or after
63
- * focus is actually set on that item.
64
- * @param {string} scrollDirection string representation of the direction of the navigation which landed
65
- * to this item being focused
66
- */
67
- setFocus(scrollDirection) {
68
- const focusMethods = [
69
- this.willReceiveFocus,
70
- this.focus,
71
- this.hasReceivedFocus,
72
- ];
73
-
74
- const self = this;
75
-
76
- return R.reduce(
77
- (sequence, method) => {
78
- return sequence
79
- .then(() => method.apply(self, [scrollDirection]))
80
- .catch((e) => {
81
- throw e;
82
- });
83
- },
84
- Promise.resolve(),
85
- focusMethods
86
- );
87
- }
88
-
89
55
  startLongPressTimeout() {
90
56
  this.longPressTimeout = setTimeout(() => {
91
57
  this.longPress(null);
@@ -102,26 +68,6 @@ class Focusable extends BaseFocusable<Props> {
102
68
  }
103
69
  }
104
70
 
105
- /**
106
- * will invoke the underlying component's focus method
107
- * @param {Object} scrollDirection
108
- * @returns {Promise}
109
- */
110
- focus(scrollDirection) {
111
- return this.onFocus(this, scrollDirection); // invokeComponentMethod(this, "onFocus", scrollDirection);
112
- }
113
-
114
- /**
115
- * will invoke the underlying component's blur method
116
- * @param {Object} scrollDirection
117
- * @returns {Promise}
118
- */
119
- blur(
120
- scrollDirection?: FocusManager.Web.Direction | FocusManager.IOS.Direction
121
- ) {
122
- return this.onBlur(this, scrollDirection);
123
- }
124
-
125
71
  /**
126
72
  * will invoke the underlying component's press method
127
73
  * @param {Object} keyEvent
@@ -16,8 +16,6 @@ function noop() {}
16
16
  type Props = {
17
17
  id: string;
18
18
  groupId: string;
19
- willReceiveFocus?: (nativeEvent: React.SyntheticEvent) => void;
20
- hasReceivedFocus?: (nativeEvent: React.SyntheticEvent) => void;
21
19
  onPress?: (nativeEvent: React.SyntheticEvent) => void;
22
20
  onFocus?: (nativeEvent: React.SyntheticEvent) => void;
23
21
  onBlur?: (nativeEvent: React.SyntheticEvent) => void;
@@ -37,8 +35,6 @@ type Props = {
37
35
  forceFocus?: boolean;
38
36
  initialFocus?: boolean;
39
37
  onLayout?: (e: any) => void;
40
- offsetUpdater: (arg1: string, arg2: number) => number;
41
- style: any;
42
38
  };
43
39
 
44
40
  export class Focusable extends BaseFocusable<Props> {
@@ -94,7 +90,7 @@ export class Focusable extends BaseFocusable<Props> {
94
90
  onBlur(nativeEvent);
95
91
  }
96
92
 
97
- setFocus(direction, callback) {
93
+ setFocus(_direction, callback) {
98
94
  const focusMethods = [
99
95
  { method: this.willReceiveFocus },
100
96
  { method: this.focus, args: [callback] },
@@ -15,7 +15,6 @@ import { noop } from "@applicaster/zapp-react-native-utils/functionUtils";
15
15
 
16
16
  import { useParentFocus, useCheckItemIdsForUnique } from "./hooks";
17
17
  import { FocusableListItemWrapper } from "./FocusableListItemWrapper";
18
- import { FocusableScrollView } from "../FocusableScrollView";
19
18
 
20
19
  const mapIndexed = R.addIndex(R.map);
21
20
 
@@ -55,7 +54,6 @@ export type Props<ItemT> = FlatListProps<ItemT> & {
55
54
  disableNextFocusUp?: boolean;
56
55
  disableNextFocusLeft?: boolean;
57
56
  disableNextFocusRight?: boolean;
58
- useScrollView?: boolean;
59
57
  } & ParentFocus;
60
58
 
61
59
  function FocusableListComponent<ItemT>(props: Props<ItemT>, ref) {
@@ -89,9 +87,7 @@ function FocusableListComponent<ItemT>(props: Props<ItemT>, ref) {
89
87
  initialFocusDirection = "down",
90
88
  data = [],
91
89
  // eslint-disable-next-line unused-imports/no-unused-vars
92
- onAllComponentsLoaded, // TODO: re-implement it
93
90
  omitPropsPropagation = [],
94
- useScrollView = false,
95
91
  } = props;
96
92
 
97
93
  useCheckItemIdsForUnique({ componentId: props.id, items: data });
@@ -277,7 +273,6 @@ function FocusableListComponent<ItemT>(props: Props<ItemT>, ref) {
277
273
  "initialFocusDirection",
278
274
  "withStateMemory",
279
275
  "useSequentialLoading",
280
- "useScrollView",
281
276
  ...omitPropsPropagation,
282
277
  ],
283
278
  R.__
@@ -300,27 +295,15 @@ function FocusableListComponent<ItemT>(props: Props<ItemT>, ref) {
300
295
  return (
301
296
  // @ts-ignore
302
297
  <ChildrenFocusDeactivatorView flex={1}>
303
- {useScrollView ? (
304
- <FocusableScrollView
305
- ref={ref}
306
- {...getFlatListProps(props)}
307
- onEndReached={onEndReached}
308
- initialNumToRender={initialNumToRender}
309
- renderItem={renderItem}
310
- focused={focused}
311
- data={data}
312
- />
313
- ) : (
314
- <FlatList
315
- focusable={false}
316
- scrollEnabled={false}
317
- ref={ref}
318
- {...getFlatListProps(props)}
319
- renderItem={renderItem}
320
- onEndReached={onEndReached}
321
- initialNumToRender={initialNumToRender}
322
- />
323
- )}
298
+ <FlatList
299
+ focusable={false}
300
+ scrollEnabled={false}
301
+ ref={ref}
302
+ {...getFlatListProps(props)}
303
+ renderItem={renderItem}
304
+ onEndReached={onEndReached}
305
+ initialNumToRender={initialNumToRender}
306
+ />
324
307
  </ChildrenFocusDeactivatorView>
325
308
  );
326
309
  }
@@ -11,13 +11,6 @@ import {
11
11
  useInitialFocus,
12
12
  } from "@applicaster/zapp-react-native-utils/focusManager";
13
13
 
14
- export type FocusableScrollViewRenderItem = (info: {
15
- item: ZappUIComponent;
16
- index: number;
17
- focused: boolean;
18
- parentFocus: ParentFocus;
19
- }) => React.ReactElement;
20
-
21
14
  export type Props = ScrollViewProps & {
22
15
  id?: number | string;
23
16
  horizontal?: boolean;
@@ -39,27 +32,17 @@ export type Props = ScrollViewProps & {
39
32
  initialFocusDirection?: FocusManager.Android.FocusNavigationDirections;
40
33
  onAllComponentsLoaded?: () => void;
41
34
  omitPropsPropagation?: Array<keyof FlatListProps<any>>;
42
- renderItem: FocusableScrollViewRenderItem;
35
+ renderItem: (info: {
36
+ item: ZappUIComponent;
37
+ index: number;
38
+ focused: boolean;
39
+ parentFocus: ParentFocus;
40
+ }) => React.ReactElement;
43
41
  } & ParentFocus;
44
42
 
45
43
  type State = boolean[];
46
44
  type Action = { index?: number; isFocusable: boolean; type?: string };
47
45
 
48
- const unwrapArray = (maybeArray) =>
49
- Array.isArray(maybeArray) ? maybeArray[0] : maybeArray;
50
-
51
- function getEntry<T>(data: T | T[], index: unknown): T {
52
- let entry;
53
-
54
- if (R.isNil(index)) {
55
- entry = unwrapArray(data);
56
- } else if (typeof index === "number") {
57
- entry = unwrapArray(data[index]);
58
- }
59
-
60
- return entry;
61
- }
62
-
63
46
  const focusableStateReducer = (
64
47
  state: State,
65
48
  { index = null, isFocusable, type = null }: Action
@@ -90,7 +73,7 @@ const extendScrollViewRef = (_ref, childCompsMeasurementsMap) => {
90
73
  };
91
74
 
92
75
  _ref.scrollToIndex = (params) => {
93
- const { index, viewOffset = 0 } = params;
76
+ const { index, viewOffset } = params;
94
77
 
95
78
  const itemByIndex = R.find(R.propEq("index", index))(
96
79
  R.values(childCompsMeasurementsMap)
@@ -146,11 +129,8 @@ function FocusableScrollViewComponent(props: Props, ref) {
146
129
  );
147
130
 
148
131
  const getFocusableEntryId = React.useCallback(
149
- (_entry: ZappEntry | null, index?: number) => {
150
- const entry: { id?: string } = getEntry(
151
- R.isNil(index) ? _entry : data,
152
- index
153
- );
132
+ (_entry: ZappEntry, index?: number) => {
133
+ const entry = R.isNil(index) ? _entry : data[index];
154
134
 
155
135
  return entry ? `${props.id}--${entry?.id}` : undefined;
156
136
  },
@@ -293,18 +273,11 @@ function FocusableScrollViewComponent(props: Props, ref) {
293
273
  const renderItem = React.useCallback(
294
274
  (item, index) => {
295
275
  const renderArgs = { item, index };
296
-
297
- const id = getFocusableEntryId(
298
- Array.isArray(item) ? item[0] : item,
299
- index
300
- );
301
-
302
- const nextFocus = getNextFocus(index);
276
+ const id = `${props.id}--${renderArgs?.item?.id}`;
277
+ const nextFocus = getNextFocus(renderArgs?.index);
303
278
 
304
279
  const onItemLayout = (event) => {
305
- childCompsMeasurementsMap.current[
306
- Array.isArray(item) ? index : item.id
307
- ] = {
280
+ childCompsMeasurementsMap.current[item.id] = {
308
281
  index,
309
282
  layout: event.nativeEvent.layout,
310
283
  };
@@ -16,6 +16,15 @@ import { PathnameContext } from "@applicaster/zapp-react-native-ui-components/Co
16
16
  import { Provider } from "react-redux";
17
17
  import configureStore from "redux-mock-store";
18
18
 
19
+ jest.mock(
20
+ "@applicaster/zapp-react-native-utils/reactHooks/navigation/useRoute",
21
+ () => ({
22
+ useRoute: jest.fn().mockReturnValue({
23
+ pathname: "/home",
24
+ }),
25
+ })
26
+ );
27
+
19
28
  const homeStack = {
20
29
  route: "/home",
21
30
  state: {
@@ -9,7 +9,7 @@ import { loadPipesData } from "@applicaster/zapp-react-native-redux/ZappPipes";
9
9
  import { isEmptyOrNil } from "@applicaster/zapp-react-native-utils/cellUtils";
10
10
  import { Categories } from "./logger";
11
11
  import { createLogger } from "@applicaster/zapp-react-native-utils/logger";
12
- import { useRoute } from "@applicaster/zapp-react-native-utils/reactHooks/navigation";
12
+ import { useRoute } from "@applicaster/zapp-react-native-utils/reactHooks/navigation/useRoute";
13
13
  import {
14
14
  ZappPipesEntryContext,
15
15
  ZappPipesScreenContext,
@@ -39,6 +39,7 @@ jest.mock(
39
39
  );
40
40
 
41
41
  jest.mock("@applicaster/zapp-react-native-utils/theme", () => ({
42
+ ...jest.requireActual<any>("@applicaster/zapp-react-native-utils/theme"),
42
43
  useTheme: () => ({}),
43
44
  }));
44
45
 
@@ -3,7 +3,7 @@
3
3
  exports[`LayoutContainer renders 1`] = `
4
4
  <View
5
5
  style={
6
- Object {
6
+ {
7
7
  "flex": 1,
8
8
  "height": 1080,
9
9
  "width": 1920,
@@ -3,14 +3,14 @@
3
3
  exports[`NavBarContainer renders 1`] = `
4
4
  <View
5
5
  style={
6
- Array [
7
- Object {
6
+ [
7
+ {
8
8
  "position": "absolute",
9
9
  "top": 0,
10
10
  "width": 1920,
11
11
  "zIndex": 10,
12
12
  },
13
- Object {
13
+ {
14
14
  "maxHeight": 10,
15
15
  },
16
16
  ]
@@ -4,8 +4,8 @@ exports[`ScreenContainer renders 1`] = `
4
4
  <RNCSafeAreaProvider
5
5
  onInsetsChange={[Function]}
6
6
  style={
7
- Array [
8
- Object {
7
+ [
8
+ {
9
9
  "flex": 1,
10
10
  },
11
11
  undefined,
@@ -14,14 +14,14 @@ exports[`ScreenContainer renders 1`] = `
14
14
  >
15
15
  <View
16
16
  style={
17
- Array [
18
- Object {
17
+ [
18
+ {
19
19
  "position": "absolute",
20
20
  "top": 0,
21
21
  "width": 1920,
22
22
  "zIndex": 10,
23
23
  },
24
- Object {
24
+ {
25
25
  "maxHeight": 10,
26
26
  },
27
27
  ]
@@ -30,7 +30,7 @@ exports[`ScreenContainer renders 1`] = `
30
30
  >
31
31
  <View
32
32
  isVisible={true}
33
- menuPlugin={Object {}}
33
+ menuPlugin={{}}
34
34
  navigationProps={null}
35
35
  />
36
36
  </View>
@@ -38,13 +38,13 @@ exports[`ScreenContainer renders 1`] = `
38
38
  `;
39
39
 
40
40
  exports[`ScreenContainer sets margins provided by the theme 1`] = `
41
- Array [
42
- Object {
41
+ [
42
+ {
43
43
  "flex": 1,
44
44
  "height": "100%",
45
45
  "width": "100%",
46
46
  },
47
- Object {
47
+ {
48
48
  "backgroundColor": "transparent",
49
49
  "marginBottom": 10,
50
50
  "paddingBottom": 0,
@@ -8,7 +8,7 @@ exports[`Layout TV renders 1`] = `
8
8
  >
9
9
  <View
10
10
  Components={
11
- Object {
11
+ {
12
12
  "Background": [Function],
13
13
  "NavBar": [Function],
14
14
  }
@@ -8,9 +8,13 @@ import configureStore from "redux-mock-store";
8
8
 
9
9
  const withoutChildren = omit(["children"]);
10
10
 
11
- jest.mock("../../../Screen/TV/index.web", () => ({
12
- Screen: View,
13
- }));
11
+ jest.mock("../../../Screen/TV/index.web", () => {
12
+ const View = jest.requireActual("react-native").View;
13
+
14
+ return {
15
+ Screen: View,
16
+ };
17
+ });
14
18
 
15
19
  const Layout = require("../index.web").default;
16
20
 
@@ -50,7 +50,7 @@ function Image({
50
50
  // @ts-ignore
51
51
  <MemoizedImage
52
52
  style={style as ImageStyle}
53
- onError={() => setErrorState(true)}
53
+ onError={React.useCallback(() => setErrorState(true), [])}
54
54
  source={
55
55
  shouldRenderImg ? withDimensions(source) : defaultPlaceHolderImage
56
56
  }
@@ -6,7 +6,7 @@ exports[`SecondaryImage - Image SecondaryImage should render if known dimensions
6
6
  <View
7
7
  onLayout={[Function]}
8
8
  style={
9
- Object {
9
+ {
10
10
  "borderRadius": 10,
11
11
  "height": 100,
12
12
  "width": 100,
@@ -16,12 +16,12 @@ exports[`SecondaryImage - Image SecondaryImage should render if known dimensions
16
16
  <Image
17
17
  onAsyncRender={[Function]}
18
18
  source={
19
- Object {
19
+ {
20
20
  "uri": "",
21
21
  }
22
22
  }
23
23
  style={
24
- Object {
24
+ {
25
25
  "aspectRatio": 1,
26
26
  "borderRadius": 10,
27
27
  "height": 100,
@@ -3,7 +3,7 @@
3
3
  exports[`CollapsibleTextContainer render container+children when label is presented 1`] = `
4
4
  <View
5
5
  style={
6
- Object {
6
+ {
7
7
  "backgroundColor": "#000000",
8
8
  }
9
9
  }