@applicaster/zapp-react-native-ui-components 13.0.0-alpha.6714678893 → 13.0.0-alpha.7100577251

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 (123) 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.ios.ts +1 -1
  10. package/Components/BaseFocusable/index.tsx +66 -29
  11. package/Components/Cell/Cell.tsx +7 -3
  12. package/Components/Cell/TvOSCellComponent.tsx +4 -8
  13. package/Components/CellRendererResolver/__tests__/__snapshots__/cellRendererResolver.test.js.snap +20 -20
  14. package/Components/CellRendererResolver/__tests__/cellRendererResolver.test.js +5 -3
  15. package/Components/ComponentResolver/__tests__/__snapshots__/componentResolver.test.js.snap +5 -5
  16. package/Components/ComponentResolver/__tests__/componentResolver.test.js +11 -9
  17. package/Components/DisplayState/__tests__/__snapshots__/displayState.test.js.snap +2 -2
  18. package/Components/Focusable/Focusable.tsx +0 -54
  19. package/Components/Focusable/FocusableTvOS.tsx +1 -5
  20. package/Components/Focusable/Touchable.tsx +19 -20
  21. package/Components/FocusableList/index.tsx +0 -1
  22. package/Components/FocusableScrollView/index.tsx +12 -39
  23. package/Components/GeneralContentScreen/utils/__tests__/useCurationAPI.test.js +9 -0
  24. package/Components/GeneralContentScreen/utils/useCurationAPI.ts +1 -1
  25. package/Components/Layout/TV/__tests__/ScreenContainer.test.tsx +1 -0
  26. package/Components/Layout/TV/__tests__/__snapshots__/LayoutContainer.test.tsx.snap +1 -1
  27. package/Components/Layout/TV/__tests__/__snapshots__/NavBarContainer.test.tsx.snap +3 -3
  28. package/Components/Layout/TV/__tests__/__snapshots__/ScreenContainer.test.tsx.snap +9 -9
  29. package/Components/Layout/TV/__tests__/__snapshots__/index.test.tsx.snap +1 -1
  30. package/Components/Layout/TV/__tests__/index.test.tsx +7 -3
  31. package/Components/MasterCell/DefaultComponents/BorderContainerView/__tests__/index.test.tsx +66 -0
  32. package/Components/MasterCell/DefaultComponents/BorderContainerView/index.tsx +4 -1
  33. package/Components/MasterCell/DefaultComponents/Image/Image.ios.tsx +6 -12
  34. package/Components/MasterCell/DefaultComponents/ImageBorderContainer/__tests__/index.test.ts +93 -0
  35. package/Components/MasterCell/DefaultComponents/SecondaryImage/__tests__/__snapshots__/Image.test.tsx.snap +3 -3
  36. package/Components/MasterCell/DefaultComponents/SecondaryImage/utils.ts +1 -1
  37. package/Components/MasterCell/DefaultComponents/__tests__/image.test.js +1 -1
  38. package/Components/MasterCell/SharedUI/CollapsibleTextContainer/__tests__/__snapshots__/index.test.tsx.snap +1 -1
  39. package/Components/MasterCell/__tests__/__snapshots__/dataAdapter.test.js.snap +180 -180
  40. package/Components/MasterCell/__tests__/__snapshots__/elementMapper.test.js.snap +7 -7
  41. package/Components/MasterCell/__tests__/__snapshots__/masterCell.test.js.snap +34 -34
  42. package/Components/MasterCell/hooks/useAsyncRendering/MasterCellAsyncRenderManager.ts +2 -2
  43. package/Components/MasterCell/hooks/useAsyncRendering/index.ts +2 -2
  44. package/Components/MasterCell/utils/index.ts +1 -1
  45. package/Components/ModalComponent/Header/index.tsx +3 -3
  46. package/Components/OfflineHandler/__tests__/__snapshots__/index.test.tsx.snap +7 -7
  47. package/Components/OfflineHandler/__tests__/index.test.tsx +28 -25
  48. package/Components/PlayerContainer/PlayerContainer.tsx +5 -11
  49. package/Components/PlayerContainer/PlayerContainerContext.tsx +9 -0
  50. package/Components/PlayerImageBackground/index.tsx +23 -3
  51. package/Components/River/ComponentsMap/ComponentsMap.tsx +39 -65
  52. package/Components/River/ComponentsMap/hooks/useLoadingState.ts +78 -51
  53. package/Components/River/RefreshControl.tsx +1 -1
  54. package/Components/River/RiverFooter.tsx +39 -9
  55. package/Components/River/RiverItem.tsx +37 -2
  56. package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +114 -45
  57. package/Components/River/__tests__/__snapshots__/river.test.js.snap +12 -12
  58. package/Components/River/__tests__/componentsMap.test.js +64 -17
  59. package/Components/RouteManager/__tests__/__snapshots__/routeManager.test.js.snap +1 -1
  60. package/Components/RouteManager/__tests__/__snapshots__/testId.test.js.snap +1 -1
  61. package/Components/Screen/__tests__/Screen.test.tsx +41 -27
  62. package/Components/Screen/__tests__/__snapshots__/Screen.test.tsx.snap +4 -4
  63. package/Components/Screen/hooks.ts +56 -0
  64. package/Components/Screen/index.tsx +13 -39
  65. package/Components/ScreenResolver/__tests__/__snapshots__/screenResolver.test.js.snap +2 -2
  66. package/Components/ScreenResolver/__tests__/screenResolver.test.js +31 -27
  67. package/Components/Tabs/Tab.tsx +7 -6
  68. package/Components/TextInputTv/__tests__/TextInputTv.test.js +42 -42
  69. package/Components/TextInputTv/__tests__/__snapshots__/TextInputTv.test.js.snap +7 -0
  70. package/Components/TextInputTv/index.tsx +4 -4
  71. package/Components/Touchable/__tests__/__snapshots__/touchable.test.tsx.snap +2 -2
  72. package/Components/Transitioner/AnimationManager.js +8 -8
  73. package/Components/Transitioner/Scene.tsx +52 -23
  74. package/Components/Transitioner/__tests__/__snapshots__/AnimationManager.test.js.snap +26 -26
  75. package/Components/Transitioner/__tests__/__snapshots__/Scene.test.js.snap +62 -46
  76. package/Components/Transitioner/__tests__/__snapshots__/config.test.js.snap +20 -20
  77. package/Components/Transitioner/__tests__/__snapshots__/transitioner.test.js.snap +4 -4
  78. package/Components/Transitioner/index.js +8 -4
  79. package/Components/VideoLive/LiveImageManager.ts +27 -1
  80. package/Components/VideoLive/PlayerLiveImageComponent.tsx +29 -21
  81. package/Components/VideoLive/__tests__/PlayerLiveImageComponent.test.tsx +63 -8
  82. package/Components/VideoLive/__tests__/__snapshots__/PlayerLiveImageComponent.test.tsx.snap +5 -10
  83. package/Components/VideoModal/ModalAnimation/AnimatedScrollModal.tsx +5 -1
  84. package/Components/VideoModal/ModalAnimation/AnimatedVideoPlayerComponent.tsx +5 -1
  85. package/Components/VideoModal/ModalAnimation/AnimationComponent.tsx +8 -7
  86. package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +4 -10
  87. package/Components/VideoModal/ModalAnimation/index.ts +2 -1
  88. package/Components/VideoModal/ModalAnimation/useModalAnimationContext.ts +6 -0
  89. package/Components/VideoModal/ModalAnimation/utils.ts +2 -2
  90. package/Components/VideoModal/OpaqueLayer.tsx +33 -0
  91. package/Components/VideoModal/PlayerDetails.tsx +4 -1
  92. package/Components/VideoModal/PlayerWrapper.tsx +16 -35
  93. package/Components/VideoModal/VideoModal.tsx +14 -23
  94. package/Components/VideoModal/__tests__/PlayerDetails.test.tsx +5 -2
  95. package/Components/VideoModal/__tests__/PlayerWrapper.test.tsx +13 -10
  96. package/Components/VideoModal/__tests__/__snapshots__/PlayerDetails.test.tsx.snap +4 -4
  97. package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +66 -156
  98. package/Components/VideoModal/hooks/__tests__/useDelayedPlayerDetails.test.ts +89 -0
  99. package/Components/VideoModal/hooks/index.ts +7 -0
  100. package/Components/VideoModal/hooks/useDelayedPlayerDetails.ts +49 -0
  101. package/Components/VideoModal/hooks/utils/__tests__/showDetails.test.ts +91 -0
  102. package/Components/VideoModal/hooks/utils/index.ts +33 -0
  103. package/Components/VideoModal/utils.ts +3 -5
  104. package/Components/Viewport/ViewportAware/__tests__/__snapshots__/viewportAware.test.js.snap +2 -2
  105. package/Components/Viewport/ViewportTracker/__tests__/__snapshots__/viewportTracker.test.js.snap +1 -1
  106. package/Components/ZappUIComponent/__tests__/__snapshots__/ZappUIComponent.test.js.snap +11 -11
  107. package/Components/default-cell-renderer/__tests__/__snapshots__/defaultCellRenderer.test.tsx.snap +30 -30
  108. package/Contexts/ConfigutaionContext/__tests__/__snapshots__/ConfigurationProvider.test.tsx.snap +1 -1
  109. package/Contexts/ScreenContext/index.tsx +3 -2
  110. package/Decorators/Navigator/__tests__/__snapshots__/navigator.test.js.snap +2 -2
  111. package/Decorators/RiverFeedLoader/__tests__/__snapshots__/riverFeedLoader.test.tsx.snap +77 -77
  112. package/Decorators/RiverFeedLoader/__tests__/riverFeedLoader.test.tsx +34 -39
  113. package/Decorators/RiverFeedLoader/__tests__/utils.test.ts +0 -9
  114. package/Decorators/RiverFeedLoader/index.tsx +1 -1
  115. package/Decorators/RiverFeedLoader/utils/getDatasourceUrl.ts +39 -0
  116. package/Decorators/RiverFeedLoader/utils/index.ts +29 -0
  117. package/Decorators/RiverFeedLoader/utils/usePipesContexts.ts +40 -0
  118. package/Decorators/RiverResolver/__tests__/__snapshots__/riverResolver.test.tsx.snap +5 -5
  119. package/Decorators/RiverResolver/__tests__/riverResolver.test.tsx +16 -10
  120. package/Decorators/ZappPipesDataConnector/__tests__/Hero.js +1 -1
  121. package/Decorators/ZappPipesDataConnector/index.tsx +32 -2
  122. package/package.json +12 -6
  123. package/Decorators/RiverFeedLoader/utils.ts +0 -100
@@ -10,7 +10,7 @@ exports[`elementMapper renders the nodes 1`] = `
10
10
  <ImageContainer
11
11
  key="0"
12
12
  style={
13
- Object {
13
+ {
14
14
  "borderTopLeftRadius": 4,
15
15
  "borderTopRightRadius": 4,
16
16
  "height": 216,
@@ -22,7 +22,7 @@ exports[`elementMapper renders the nodes 1`] = `
22
22
  <View
23
23
  key="1"
24
24
  style={
25
- Object {
25
+ {
26
26
  "height": 30,
27
27
  "marginHorizontal": 24,
28
28
  "marginTop": 24,
@@ -37,7 +37,7 @@ exports[`elementMapper renders the nodes 1`] = `
37
37
  label="Test Entry"
38
38
  numberOfLines={1}
39
39
  style={
40
- Object {
40
+ {
41
41
  "color": "#EFEFEF",
42
42
  "fontSize": 26,
43
43
  "fontStyle": "normal",
@@ -49,7 +49,7 @@ exports[`elementMapper renders the nodes 1`] = `
49
49
  <View
50
50
  key="2"
51
51
  style={
52
- Object {
52
+ {
53
53
  "height": 60,
54
54
  "marginHorizontal": 24,
55
55
  "marginTop": 10,
@@ -63,7 +63,7 @@ exports[`elementMapper renders the nodes 1`] = `
63
63
  label="Summary of the test entry"
64
64
  numberOfLines={2}
65
65
  style={
66
- Object {
66
+ {
67
67
  "color": "#EFEFEF",
68
68
  "fontSize": 24,
69
69
  "fontStyle": "normal",
@@ -76,7 +76,7 @@ exports[`elementMapper renders the nodes 1`] = `
76
76
  <View
77
77
  key="3"
78
78
  style={
79
- Object {
79
+ {
80
80
  "height": 42,
81
81
  "margin": 24,
82
82
  "width": 56,
@@ -88,7 +88,7 @@ exports[`elementMapper renders the nodes 1`] = `
88
88
  <ImageContainer
89
89
  key="0"
90
90
  style={
91
- Object {
91
+ {
92
92
  "height": 42,
93
93
  "width": 56,
94
94
  }
@@ -3,7 +3,7 @@
3
3
  exports[`masterCellBuilder when using a custom data adapter renders correctly 1`] = `
4
4
  <View
5
5
  style={
6
- Object {
6
+ {
7
7
  "flex": 1,
8
8
  }
9
9
  }
@@ -13,7 +13,7 @@ exports[`masterCellBuilder when using a custom data adapter renders correctly 1`
13
13
  key="0"
14
14
  skipButtons={false}
15
15
  style={
16
- Object {
16
+ {
17
17
  "backgroundColor": "#2F2F2F",
18
18
  "borderRadius": 4,
19
19
  "height": 436,
@@ -22,7 +22,7 @@ exports[`masterCellBuilder when using a custom data adapter renders correctly 1`
22
22
  }
23
23
  }
24
24
  wrapperRef={
25
- Object {
25
+ {
26
26
  "current": null,
27
27
  }
28
28
  }
@@ -33,7 +33,7 @@ exports[`masterCellBuilder when using a custom data adapter renders correctly 1`
33
33
  exports[`masterCellBuilder when using custom containerStyle renders correctly 1`] = `
34
34
  <View
35
35
  style={
36
- Object {
36
+ {
37
37
  "backgroundColor": "black",
38
38
  }
39
39
  }
@@ -42,9 +42,9 @@ exports[`masterCellBuilder when using custom containerStyle renders correctly 1`
42
42
  cellUUID="mocked-uuid"
43
43
  key="0"
44
44
  skipButtons={false}
45
- style={Object {}}
45
+ style={{}}
46
46
  wrapperRef={
47
- Object {
47
+ {
48
48
  "current": null,
49
49
  }
50
50
  }
@@ -55,7 +55,7 @@ exports[`masterCellBuilder when using custom containerStyle renders correctly 1`
55
55
  exports[`masterCellBuilder when using custom default components renders correctly 1`] = `
56
56
  <mockConstructor
57
57
  style={
58
- Object {
58
+ {
59
59
  "flex": 1,
60
60
  }
61
61
  }
@@ -64,9 +64,9 @@ exports[`masterCellBuilder when using custom default components renders correctl
64
64
  cellUUID="mocked-uuid"
65
65
  key="0"
66
66
  skipButtons={false}
67
- style={Object {}}
67
+ style={{}}
68
68
  wrapperRef={
69
- Object {
69
+ {
70
70
  "current": null,
71
71
  }
72
72
  }
@@ -77,7 +77,7 @@ exports[`masterCellBuilder when using custom default components renders correctl
77
77
  exports[`masterCellBuilder when using default options can be invoked as a React Component 1`] = `
78
78
  <View
79
79
  style={
80
- Object {
80
+ {
81
81
  "flex": 1,
82
82
  }
83
83
  }
@@ -87,7 +87,7 @@ exports[`masterCellBuilder when using default options can be invoked as a React
87
87
  key="0"
88
88
  skipButtons={false}
89
89
  style={
90
- Object {
90
+ {
91
91
  "backgroundColor": "#2F2F2F",
92
92
  "borderRadius": 4,
93
93
  "height": 436,
@@ -96,13 +96,13 @@ exports[`masterCellBuilder when using default options can be invoked as a React
96
96
  }
97
97
  }
98
98
  whoAmI={
99
- Object {
99
+ {
100
100
  "contentType": "feed",
101
101
  "state": "default",
102
102
  }
103
103
  }
104
104
  wrapperRef={
105
- Object {
105
+ {
106
106
  "current": null,
107
107
  }
108
108
  }
@@ -113,7 +113,7 @@ exports[`masterCellBuilder when using default options can be invoked as a React
113
113
  numberOfLines={1}
114
114
  skipButtons={false}
115
115
  style={
116
- Object {
116
+ {
117
117
  "borderTopLeftRadius": 4,
118
118
  "borderTopRightRadius": 4,
119
119
  "height": 216,
@@ -127,7 +127,7 @@ exports[`masterCellBuilder when using default options can be invoked as a React
127
127
  key="1"
128
128
  skipButtons={false}
129
129
  style={
130
- Object {
130
+ {
131
131
  "height": 30,
132
132
  "marginHorizontal": 24,
133
133
  "marginTop": 24,
@@ -135,7 +135,7 @@ exports[`masterCellBuilder when using default options can be invoked as a React
135
135
  }
136
136
  }
137
137
  wrapperRef={
138
- Object {
138
+ {
139
139
  "current": null,
140
140
  }
141
141
  }
@@ -146,7 +146,7 @@ exports[`masterCellBuilder when using default options can be invoked as a React
146
146
  numberOfLines={1}
147
147
  skipButtons={false}
148
148
  style={
149
- Object {
149
+ {
150
150
  "color": "#EFEFEF",
151
151
  "fontSize": 26,
152
152
  "fontStyle": "normal",
@@ -160,7 +160,7 @@ exports[`masterCellBuilder when using default options can be invoked as a React
160
160
  key="2"
161
161
  skipButtons={false}
162
162
  style={
163
- Object {
163
+ {
164
164
  "height": 60,
165
165
  "marginHorizontal": 24,
166
166
  "marginTop": 10,
@@ -168,7 +168,7 @@ exports[`masterCellBuilder when using default options can be invoked as a React
168
168
  }
169
169
  }
170
170
  wrapperRef={
171
- Object {
171
+ {
172
172
  "current": null,
173
173
  }
174
174
  }
@@ -179,7 +179,7 @@ exports[`masterCellBuilder when using default options can be invoked as a React
179
179
  numberOfLines={2}
180
180
  skipButtons={false}
181
181
  style={
182
- Object {
182
+ {
183
183
  "color": "#EFEFEF",
184
184
  "fontSize": 24,
185
185
  "fontStyle": "normal",
@@ -194,14 +194,14 @@ exports[`masterCellBuilder when using default options can be invoked as a React
194
194
  key="3"
195
195
  skipButtons={false}
196
196
  style={
197
- Object {
197
+ {
198
198
  "height": 42,
199
199
  "margin": 24,
200
200
  "width": 56,
201
201
  }
202
202
  }
203
203
  wrapperRef={
204
- Object {
204
+ {
205
205
  "current": null,
206
206
  }
207
207
  }
@@ -211,7 +211,7 @@ exports[`masterCellBuilder when using default options can be invoked as a React
211
211
  key="0"
212
212
  skipButtons={false}
213
213
  style={
214
- Object {
214
+ {
215
215
  "height": 42,
216
216
  "width": 56,
217
217
  }
@@ -227,24 +227,24 @@ exports[`masterCellBuilder when using default options renders correctly 1`] = `
227
227
  <View>
228
228
  <Memo(MasterCell)
229
229
  item={
230
- Object {
231
- "author": Object {
230
+ {
231
+ "author": {
232
232
  "name": "John Doe",
233
233
  },
234
234
  "id": "A1234",
235
- "media_group": Array [
236
- Object {
237
- "media_item": Array [
238
- Object {
235
+ "media_group": [
236
+ {
237
+ "media_item": [
238
+ {
239
239
  "key": "image_base",
240
240
  "src": "http://urlOfTheImage.net/img.png",
241
241
  },
242
242
  ],
243
243
  "type": "image",
244
244
  },
245
- Object {
246
- "media_item": Array [
247
- Object {
245
+ {
246
+ "media_item": [
247
+ {
248
248
  "key": "logo_thumbnail",
249
249
  "src": "http://urlOfTheImage.net/channelLogo.png",
250
250
  },
@@ -255,7 +255,7 @@ exports[`masterCellBuilder when using default options renders correctly 1`] = `
255
255
  "published": "2019/03/17 02:17:46 +0000",
256
256
  "summary": "Summary of the test entry",
257
257
  "title": "Test Entry",
258
- "type": Object {
258
+ "type": {
259
259
  "value": "feed",
260
260
  },
261
261
  }
@@ -265,7 +265,7 @@ exports[`masterCellBuilder when using default options renders correctly 1`] = `
265
265
  `;
266
266
 
267
267
  exports[`masterCellBuilder when using default options returns a function 1`] = `
268
- Object {
268
+ {
269
269
  "$$typeof": Symbol(react.memo),
270
270
  "compare": null,
271
271
  "hasFocusableInside": [Function],
@@ -16,13 +16,13 @@ export class MasterCellAsyncRenderManager {
16
16
  }
17
17
 
18
18
  public emitAsyncElementRegistrate = () => {
19
- this.asyncElementRegistrate$.next();
19
+ this.asyncElementRegistrate$.next(null);
20
20
 
21
21
  return this.decrementAsyncElementRegistrationCount;
22
22
  };
23
23
 
24
24
  public emitAsyncElementLayout = () => {
25
- this.asyncElementLayout$.next();
25
+ this.asyncElementLayout$.next(null);
26
26
  };
27
27
 
28
28
  public decrementAsyncElementRegistrationCount = () => {
@@ -8,7 +8,7 @@ import { MasterCellAsyncRenderManager } from "./MasterCellAsyncRenderManager";
8
8
  const layoutMeasure = (viewRef, onMeasure) => {
9
9
  viewRef?.measureLayout?.(
10
10
  findNodeHandle(viewRef),
11
- (x, y, width, height) => {
11
+ (_x, _y, width, height) => {
12
12
  onMeasure({ width, height });
13
13
  },
14
14
  noop
@@ -16,7 +16,7 @@ const layoutMeasure = (viewRef, onMeasure) => {
16
16
  };
17
17
 
18
18
  const regularMeasure = (viewRef, onMeasure) => {
19
- viewRef?.measure?.((x, y, width, height) => {
19
+ viewRef?.measure?.((_x, _y, width, height) => {
20
20
  onMeasure({ width, height });
21
21
  });
22
22
  };
@@ -103,7 +103,7 @@ export const useFilterChildren = <
103
103
  item: any;
104
104
  pluginIdentifier: string;
105
105
  };
106
- }
106
+ },
107
107
  >(
108
108
  children: T[]
109
109
  ): T[] => {
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo } from "react";
2
- import { View, StyleSheet, LayoutChangeEvent } from "react-native";
2
+ import { LayoutChangeEvent, StyleSheet, View } from "react-native";
3
3
  import { Title, TitleProps } from "./Title";
4
4
  import { CloseButton, CloseButtonProps } from "./CloseButton";
5
5
  import { getCloseButtonProps, getTitleProps } from "./utils";
@@ -60,8 +60,8 @@ export function ModalHeader(props: Props) {
60
60
  width: width - buttonsContainerWidth,
61
61
  }}
62
62
  >
63
- {title && <Title {...titleProps} />}
64
- {summary && <Title {...summaryProps} />}
63
+ {title ? <Title {...titleProps} /> : null}
64
+ {summary ? <Title {...summaryProps} /> : null}
65
65
  </View>
66
66
  <View style={{ width: buttonsContainerWidth }}>
67
67
  <CloseButton {...closeButtonProps} />
@@ -3,7 +3,7 @@
3
3
  exports[`OfflineHandler renders 1`] = `
4
4
  <View
5
5
  style={
6
- Object {
6
+ {
7
7
  "flex": 1,
8
8
  "position": "relative",
9
9
  }
@@ -11,7 +11,7 @@ exports[`OfflineHandler renders 1`] = `
11
11
  >
12
12
  <View
13
13
  style={
14
- Object {
14
+ {
15
15
  "bottom": 0,
16
16
  "left": 0,
17
17
  "position": "absolute",
@@ -32,7 +32,7 @@ exports[`OfflineHandler renders 1`] = `
32
32
  onResponderTerminationRequest={[Function]}
33
33
  onStartShouldSetResponder={[Function]}
34
34
  style={
35
- Object {
35
+ {
36
36
  "alignItems": "center",
37
37
  "backgroundColor": undefined,
38
38
  "flex": 1,
@@ -43,8 +43,8 @@ exports[`OfflineHandler renders 1`] = `
43
43
  "position": "absolute",
44
44
  "right": 0,
45
45
  "top": 0,
46
- "transform": Array [
47
- Object {
46
+ "transform": [
47
+ {
48
48
  "translateY": -88,
49
49
  },
50
50
  ],
@@ -54,7 +54,7 @@ exports[`OfflineHandler renders 1`] = `
54
54
  >
55
55
  <View
56
56
  style={
57
- Object {
57
+ {
58
58
  "backgroundColor": undefined,
59
59
  "height": 44,
60
60
  }
@@ -62,7 +62,7 @@ exports[`OfflineHandler renders 1`] = `
62
62
  />
63
63
  <Text
64
64
  style={
65
- Object {
65
+ {
66
66
  "color": undefined,
67
67
  "fontFamily": undefined,
68
68
  "fontSize": undefined,
@@ -2,43 +2,46 @@ import React from "react";
2
2
 
3
3
  import renderer, { act } from "react-test-renderer";
4
4
 
5
- jest.useFakeTimers();
5
+ jest.useFakeTimers({ legacyFakeTimers: true });
6
6
 
7
- let connectionStatus = false;
8
- const previousValue = null;
7
+ let mockConnectionStatus = false;
8
+ const mockPreviousValue = null;
9
9
 
10
10
  jest.mock("@applicaster/zapp-react-native-utils/reactHooks/connection", () => {
11
11
  return {
12
- useConnectionInfo: jest.fn(() => connectionStatus),
12
+ useConnectionInfo: jest.fn(() => mockConnectionStatus),
13
13
  };
14
14
  });
15
15
 
16
16
  jest.mock("@applicaster/zapp-react-native-utils/reactHooks/utils", () => {
17
17
  return {
18
- usePrevious: jest.fn(() => previousValue),
18
+ usePrevious: jest.fn(() => mockPreviousValue),
19
19
  };
20
20
  });
21
21
 
22
- jest.mock("@applicaster/zapp-react-native-redux/hooks", () => ({
23
- usePickFromState: () => ({
24
- plugins: [
25
- {
26
- name: "offline experience",
27
- identifier: "offline-experience",
28
- type: "general",
29
- module: {
30
- useOfflineExperienceConfiguration: () => ({
31
- configurationFields: {},
32
- localizations: {
33
- offline_toast_message: "No internet connection",
34
- online_toast_message: "You are back online",
35
- },
36
- }),
22
+ jest.mock(
23
+ "@applicaster/zapp-react-native-redux/hooks/usePickFromState",
24
+ () => ({
25
+ usePickFromState: () => ({
26
+ plugins: [
27
+ {
28
+ name: "offline experience",
29
+ identifier: "offline-experience",
30
+ type: "general",
31
+ module: {
32
+ useOfflineExperienceConfiguration: () => ({
33
+ configurationFields: {},
34
+ localizations: {
35
+ offline_toast_message: "No internet connection",
36
+ online_toast_message: "You are back online",
37
+ },
38
+ }),
39
+ },
37
40
  },
38
- },
39
- ],
40
- }),
41
- }));
41
+ ],
42
+ }),
43
+ })
44
+ );
42
45
 
43
46
  jest.mock("react-native-safe-area-context", () => ({
44
47
  useSafeAreaInsets: () => ({ top: 44 }),
@@ -53,7 +56,7 @@ describe("OfflineHandler", () => {
53
56
  });
54
57
 
55
58
  it("renders Notification mode if component was rendered while online", () => {
56
- connectionStatus = true;
59
+ mockConnectionStatus = true;
57
60
 
58
61
  let instance;
59
62
 
@@ -35,10 +35,8 @@ import {
35
35
  log_warning,
36
36
  } from "./logger";
37
37
  import { usePlayer } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/usePlayer";
38
- import {
39
- useSetNavbarState,
40
- useTargetScreenData,
41
- } from "@applicaster/zapp-react-native-utils/reactHooks/screen";
38
+ import { useSetNavbarState } from "@applicaster/zapp-react-native-utils/reactHooks/screen/useScreenContext";
39
+ import { useTargetScreenData } from "@applicaster/zapp-react-native-utils/reactHooks/screen/useTargetScreenData";
42
40
  import {
43
41
  PlayerContainerContext,
44
42
  PlayerContainerContextProvider,
@@ -382,7 +380,7 @@ const PlayerContainerComponent = (props: Props) => {
382
380
  }
383
381
  };
384
382
 
385
- const playerRemoteHandler = (component, event, isLanguageOverlayVisible) => {
383
+ const playerRemoteHandler = (event, isLanguageOverlayVisible) => {
386
384
  const { eventType } = event;
387
385
 
388
386
  if (!isLanguageOverlayVisible && eventType === "menu") {
@@ -625,12 +623,8 @@ const PlayerContainerComponent = (props: Props) => {
625
623
  <PlayerContainerContext.Consumer>
626
624
  {(context) => (
627
625
  <TVEventHandlerComponent
628
- tvEventHandler={(component, event) =>
629
- playerRemoteHandler(
630
- component,
631
- event,
632
- context.isLanguageOverlayVisible
633
- )
626
+ tvEventHandler={(_component, event) =>
627
+ playerRemoteHandler(event, context.isLanguageOverlayVisible)
634
628
  }
635
629
  >
636
630
  <FocusableGroup
@@ -9,11 +9,14 @@ type ContextProps = {
9
9
  setIsLanguageOverlayVisible: (isVisible) => void;
10
10
  setShowComponentsContainer: (isVisible) => void;
11
11
  showComponentsContainer: boolean;
12
+ setIsSeekBarTouch: (isTouch) => void;
13
+ isSeekBarTouch: boolean;
12
14
  };
13
15
 
14
16
  export const PlayerContainerContext = createContext({
15
17
  ignoreOffsetContainer: false,
16
18
  isLanguageOverlayVisible: false,
19
+ isSeekBarTouch: false,
17
20
  } as ContextProps);
18
21
 
19
22
  type Props = {
@@ -40,6 +43,8 @@ export const PlayerContainerContextProvider = ({
40
43
  const [showComponentsContainer, setShowComponentsContainer] =
41
44
  React.useState(true);
42
45
 
46
+ const [isSeekBarTouch, setIsSeekBarTouch] = React.useState(false);
47
+
43
48
  const value = React.useMemo(
44
49
  () => ({
45
50
  ignoreOffsetContainer,
@@ -49,6 +54,8 @@ export const PlayerContainerContextProvider = ({
49
54
  setIsLanguageOverlayVisible,
50
55
  showComponentsContainer,
51
56
  setShowComponentsContainer: inline ? setShowComponentsContainer : null,
57
+ isSeekBarTouch,
58
+ setIsSeekBarTouch,
52
59
  }),
53
60
  [
54
61
  ignoreOffsetContainer,
@@ -58,6 +65,8 @@ export const PlayerContainerContextProvider = ({
58
65
  setIsLanguageOverlayVisible,
59
66
  showComponentsContainer,
60
67
  setShowComponentsContainer,
68
+ isSeekBarTouch,
69
+ setIsSeekBarTouch,
61
70
  ]
62
71
  );
63
72
 
@@ -1,4 +1,4 @@
1
- import React, { PropsWithChildren } from "react";
1
+ import React, { PropsWithChildren, useEffect, useState } from "react";
2
2
  import { ImageBackground, View } from "react-native";
3
3
 
4
4
  import { imageSrcFromMediaItem } from "@applicaster/zapp-react-native-utils/configurationUtils";
@@ -12,6 +12,7 @@ import {
12
12
  type Props = PropsWithChildren<{
13
13
  entry: ZappEntry;
14
14
  style?: { [K: string]: any };
15
+ docked?: boolean;
15
16
  imageStyle?: { [K: string]: any };
16
17
  imageKey?: string;
17
18
  defaultImageDimensions?: { [K: string]: any };
@@ -23,6 +24,7 @@ const PlayerImageBackgroundComponent = ({
23
24
  entry,
24
25
  children,
25
26
  style,
27
+ docked,
26
28
  imageStyle,
27
29
  imageKey,
28
30
  defaultImageDimensions,
@@ -34,8 +36,22 @@ const PlayerImageBackgroundComponent = ({
34
36
 
35
37
  const { playerAnimationState } = useModalAnimationContext();
36
38
 
39
+ const [lastNonNullAnimationState, setLastNonNullAnimationState] =
40
+ useState(playerAnimationState);
41
+
42
+ useEffect(() => {
43
+ if (playerAnimationState !== null) {
44
+ setLastNonNullAnimationState(playerAnimationState);
45
+ }
46
+ }, [playerAnimationState]);
47
+
37
48
  if (!source) return <>{children}</>;
38
49
 
50
+ const imageBackgroundStyle =
51
+ lastNonNullAnimationState !== PlayerAnimationStateEnum.minimize && !docked
52
+ ? defaultImageDimensions
53
+ : imageSize;
54
+
39
55
  return (
40
56
  <View
41
57
  style={
@@ -45,13 +61,17 @@ const PlayerImageBackgroundComponent = ({
45
61
  }
46
62
  >
47
63
  <AnimationComponent
48
- style={style}
64
+ style={
65
+ playerAnimationState === PlayerAnimationStateEnum.maximaze
66
+ ? defaultImageDimensions
67
+ : style
68
+ }
49
69
  animationType={ComponentAnimationType.player}
50
70
  additionalData={defaultImageDimensions}
51
71
  >
52
72
  <ImageBackground
53
73
  resizeMode="cover"
54
- style={imageSize}
74
+ style={imageBackgroundStyle}
55
75
  imageStyle={imageStyle}
56
76
  source={source}
57
77
  >