@applicaster/zapp-react-native-ui-components 13.0.0-alpha.6525006318 → 13.0.0-alpha.6944415045
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/Components/AppContainer/__tests__/__snapshots__/AppContainer.test.js.snap +1 -1
- package/Components/AudioPlayer/__tests__/__snapshots__/Runtime.test.js.snap +4 -4
- package/Components/AudioPlayer/__tests__/__snapshots__/artWork.test.js.snap +3 -3
- package/Components/AudioPlayer/__tests__/__snapshots__/audioPlayer.test.js.snap +6 -6
- package/Components/AudioPlayer/__tests__/__snapshots__/audioPlayerLayout.test.js.snap +7 -7
- package/Components/AudioPlayer/__tests__/__snapshots__/channel.test.js.snap +3 -3
- package/Components/AudioPlayer/__tests__/__snapshots__/summary.test.js.snap +2 -2
- package/Components/AudioPlayer/__tests__/__snapshots__/title.test.js.snap +2 -2
- package/Components/BaseFocusable/index.tsx +65 -28
- package/Components/Cell/Cell.tsx +11 -9
- package/Components/Cell/CellWithFocusable.tsx +1 -1
- package/Components/Cell/TvOSCellComponent.tsx +23 -30
- package/Components/Cell/index.js +3 -1
- package/Components/CellRendererResolver/__tests__/__snapshots__/cellRendererResolver.test.js.snap +20 -20
- package/Components/CellRendererResolver/__tests__/cellRendererResolver.test.js +5 -3
- package/Components/ComponentResolver/__tests__/__snapshots__/componentResolver.test.js.snap +5 -5
- package/Components/ComponentResolver/__tests__/componentResolver.test.js +11 -9
- package/Components/DisplayState/__tests__/__snapshots__/displayState.test.js.snap +2 -2
- package/Components/Focusable/Focusable.tsx +0 -54
- package/Components/Focusable/FocusableTvOS.tsx +6 -2
- package/Components/FocusableList/index.tsx +25 -10
- package/Components/FocusableScrollView/index.tsx +39 -12
- package/Components/GeneralContentScreen/utils/__tests__/useCurationAPI.test.js +76 -7
- package/Components/GeneralContentScreen/utils/useCurationAPI.ts +53 -9
- package/Components/Layout/TV/NavBarContainer.tsx +8 -7
- package/Components/Layout/TV/__tests__/ScreenContainer.test.tsx +1 -0
- package/Components/Layout/TV/__tests__/__snapshots__/LayoutContainer.test.tsx.snap +1 -1
- package/Components/Layout/TV/__tests__/__snapshots__/NavBarContainer.test.tsx.snap +3 -3
- package/Components/Layout/TV/__tests__/__snapshots__/ScreenContainer.test.tsx.snap +9 -9
- package/Components/Layout/TV/__tests__/__snapshots__/index.test.tsx.snap +1 -1
- package/Components/Layout/TV/__tests__/index.test.tsx +7 -3
- package/Components/MasterCell/DefaultComponents/Image/Image.ios.tsx +1 -1
- package/Components/MasterCell/DefaultComponents/SecondaryImage/__tests__/__snapshots__/Image.test.tsx.snap +3 -3
- package/Components/MasterCell/SharedUI/CollapsibleTextContainer/__tests__/__snapshots__/index.test.tsx.snap +1 -1
- package/Components/MasterCell/__tests__/__snapshots__/dataAdapter.test.js.snap +180 -180
- package/Components/MasterCell/__tests__/__snapshots__/elementMapper.test.js.snap +7 -7
- package/Components/MasterCell/__tests__/__snapshots__/masterCell.test.js.snap +34 -34
- package/Components/MasterCell/hooks/useAsyncRendering/index.ts +2 -2
- package/Components/NativeFocusables/{index.js → index.ts} +4 -2
- package/Components/OfflineHandler/__tests__/__snapshots__/index.test.tsx.snap +7 -7
- package/Components/OfflineHandler/__tests__/index.test.tsx +28 -25
- package/Components/PlayerContainer/PlayerContainer.tsx +5 -11
- package/Components/PlayerContainer/PlayerContainerContext.tsx +9 -0
- package/Components/River/RefreshControl.tsx +1 -1
- package/Components/River/TV/index.tsx +6 -1
- package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +17 -17
- package/Components/River/__tests__/__snapshots__/river.test.js.snap +12 -12
- package/Components/River/__tests__/componentsMap.test.js +47 -12
- package/Components/RouteManager/__tests__/__snapshots__/routeManager.test.js.snap +1 -1
- package/Components/RouteManager/__tests__/__snapshots__/testId.test.js.snap +1 -1
- package/Components/Screen/__tests__/Screen.test.tsx +41 -27
- package/Components/Screen/__tests__/__snapshots__/Screen.test.tsx.snap +4 -4
- package/Components/ScreenResolver/__tests__/__snapshots__/screenResolver.test.js.snap +2 -2
- package/Components/ScreenResolver/__tests__/screenResolver.test.js +31 -27
- package/Components/Tabs/Tab.tsx +1 -0
- package/Components/TextInputTv/__tests__/TextInputTv.test.js +42 -42
- package/Components/TextInputTv/__tests__/__snapshots__/TextInputTv.test.js.snap +7 -0
- package/Components/TextInputTv/index.tsx +2 -2
- package/Components/Touchable/__tests__/__snapshots__/touchable.test.tsx.snap +2 -2
- package/Components/Transitioner/__tests__/__snapshots__/AnimationManager.test.js.snap +26 -26
- package/Components/Transitioner/__tests__/__snapshots__/Scene.test.js.snap +9 -9
- package/Components/Transitioner/__tests__/__snapshots__/config.test.js.snap +20 -20
- package/Components/Transitioner/__tests__/__snapshots__/transitioner.test.js.snap +2 -2
- package/Components/VideoLive/__tests__/PlayerLiveImageComponent.test.tsx +12 -7
- package/Components/VideoLive/__tests__/__snapshots__/PlayerLiveImageComponent.test.tsx.snap +6 -6
- package/Components/VideoModal/ModalAnimation/AnimatedScrollModal.tsx +5 -1
- package/Components/VideoModal/ModalAnimation/AnimatedVideoPlayerComponent.tsx +5 -1
- package/Components/VideoModal/ModalAnimation/AnimationComponent.tsx +1 -1
- package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +4 -10
- package/Components/VideoModal/ModalAnimation/index.ts +2 -1
- package/Components/VideoModal/ModalAnimation/useModalAnimationContext.ts +6 -0
- package/Components/VideoModal/__tests__/PlayerDetails.test.tsx +5 -2
- package/Components/VideoModal/__tests__/PlayerWrapper.test.tsx +12 -9
- package/Components/VideoModal/__tests__/__snapshots__/PlayerDetails.test.tsx.snap +4 -4
- package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +78 -78
- package/Components/VideoModal/utils.ts +2 -4
- package/Components/Viewport/ViewportAware/__tests__/__snapshots__/viewportAware.test.js.snap +2 -2
- package/Components/Viewport/ViewportTracker/__tests__/__snapshots__/viewportTracker.test.js.snap +1 -1
- package/Components/ZappFrameworkComponents/BarView/BarView.tsx +1 -0
- package/Components/ZappUIComponent/__tests__/__snapshots__/ZappUIComponent.test.js.snap +11 -11
- package/Components/default-cell-renderer/__tests__/__snapshots__/defaultCellRenderer.test.tsx.snap +30 -30
- package/Contexts/ComponentsMapOffsetContext/index.tsx +46 -0
- package/Contexts/ConfigutaionContext/__tests__/__snapshots__/ConfigurationProvider.test.tsx.snap +1 -1
- package/Contexts/FocusableGroupContext/withFocusableContext.tsx +18 -11
- package/Decorators/Analytics/{index.js → index.tsx} +11 -11
- package/Decorators/Navigator/__tests__/__snapshots__/navigator.test.js.snap +2 -2
- package/Decorators/RiverFeedLoader/__tests__/__snapshots__/riverFeedLoader.test.tsx.snap +77 -77
- package/Decorators/RiverFeedLoader/__tests__/riverFeedLoader.test.tsx +34 -39
- package/Decorators/RiverFeedLoader/__tests__/utils.test.ts +0 -9
- package/Decorators/RiverFeedLoader/index.tsx +1 -1
- package/Decorators/RiverFeedLoader/utils/getDatasourceUrl.ts +39 -0
- package/Decorators/RiverFeedLoader/utils/index.ts +29 -0
- package/Decorators/RiverFeedLoader/utils/usePipesContexts.ts +40 -0
- package/Decorators/RiverResolver/__tests__/__snapshots__/riverResolver.test.tsx.snap +5 -5
- package/Decorators/RiverResolver/__tests__/riverResolver.test.tsx +16 -10
- package/Decorators/ZappPipesDataConnector/index.tsx +1 -1
- package/package.json +12 -6
- 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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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={
|
|
45
|
+
style={{}}
|
|
46
46
|
wrapperRef={
|
|
47
|
-
|
|
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
|
-
|
|
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={
|
|
67
|
+
style={{}}
|
|
68
68
|
wrapperRef={
|
|
69
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
99
|
+
{
|
|
100
100
|
"contentType": "feed",
|
|
101
101
|
"state": "default",
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
wrapperRef={
|
|
105
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
197
|
+
{
|
|
198
198
|
"height": 42,
|
|
199
199
|
"margin": 24,
|
|
200
200
|
"width": 56,
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
wrapperRef={
|
|
204
|
-
|
|
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
|
-
|
|
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
|
-
|
|
231
|
-
"author":
|
|
230
|
+
{
|
|
231
|
+
"author": {
|
|
232
232
|
"name": "John Doe",
|
|
233
233
|
},
|
|
234
234
|
"id": "A1234",
|
|
235
|
-
"media_group":
|
|
236
|
-
|
|
237
|
-
"media_item":
|
|
238
|
-
|
|
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
|
-
|
|
246
|
-
"media_item":
|
|
247
|
-
|
|
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":
|
|
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
|
-
|
|
268
|
+
{
|
|
269
269
|
"$$typeof": Symbol(react.memo),
|
|
270
270
|
"compare": null,
|
|
271
271
|
"hasFocusableInside": [Function],
|
|
@@ -8,7 +8,7 @@ import { MasterCellAsyncRenderManager } from "./MasterCellAsyncRenderManager";
|
|
|
8
8
|
const layoutMeasure = (viewRef, onMeasure) => {
|
|
9
9
|
viewRef?.measureLayout?.(
|
|
10
10
|
findNodeHandle(viewRef),
|
|
11
|
-
(
|
|
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?.((
|
|
19
|
+
viewRef?.measure?.((_x, _y, width, height) => {
|
|
20
20
|
onMeasure({ width, height });
|
|
21
21
|
});
|
|
22
22
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { requireNativeComponent, View } from "react-native";
|
|
2
2
|
import { isAppleTV } from "@applicaster/zapp-react-native-ui-components/Helpers/Platform";
|
|
3
3
|
|
|
4
|
+
// @TODO define the types
|
|
4
5
|
export const FocusableGroupNative = isAppleTV()
|
|
5
|
-
? requireNativeComponent("FocusableGroupViewModule"
|
|
6
|
+
? requireNativeComponent<any>("FocusableGroupViewModule")
|
|
6
7
|
: View;
|
|
7
8
|
|
|
9
|
+
// @TODO define the types
|
|
8
10
|
export const FocusableItemNative = isAppleTV()
|
|
9
|
-
? requireNativeComponent("FocusableViewModule"
|
|
11
|
+
? requireNativeComponent<any>("FocusableViewModule")
|
|
10
12
|
: View;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports[`OfflineHandler renders 1`] = `
|
|
4
4
|
<View
|
|
5
5
|
style={
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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":
|
|
47
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
8
|
-
const
|
|
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(() =>
|
|
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(() =>
|
|
18
|
+
usePrevious: jest.fn(() => mockPreviousValue),
|
|
19
19
|
};
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
jest.mock(
|
|
23
|
-
usePickFromState
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 = (
|
|
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={(
|
|
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
|
|
|
@@ -9,7 +9,7 @@ import { useTheme } from "@applicaster/zapp-react-native-utils/theme";
|
|
|
9
9
|
import { useLocalizedStrings } from "@applicaster/zapp-react-native-utils/localizationUtils";
|
|
10
10
|
import { useAnalytics } from "@applicaster/zapp-react-native-utils/analyticsUtils";
|
|
11
11
|
import { useSendAnalyticsEventWithFunction } from "@applicaster/zapp-react-native-utils/analyticsUtils/helpers/hooks";
|
|
12
|
-
import { useCurrentScreenData } from "@applicaster/zapp-react-native-utils/reactHooks/screen";
|
|
12
|
+
import { useCurrentScreenData } from "@applicaster/zapp-react-native-utils/reactHooks/screen/useCurrentScreenData";
|
|
13
13
|
import { loadPipesData } from "@applicaster/zapp-react-native-redux/ZappPipes";
|
|
14
14
|
import { useDispatch } from "react-redux";
|
|
15
15
|
import { useShallow } from "zustand/react/shallow";
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { compose } from "ramda";
|
|
1
2
|
import { River as RiverComponent } from "./River";
|
|
2
3
|
import { withTvEventHandler } from "./withTVEventHandler";
|
|
4
|
+
import { withComponentsMapOffsetContext } from "../../../Contexts/ComponentsMapOffsetContext";
|
|
3
5
|
|
|
4
|
-
export const River =
|
|
6
|
+
export const River = compose(
|
|
7
|
+
withTvEventHandler,
|
|
8
|
+
withComponentsMapOffsetContext
|
|
9
|
+
)(RiverComponent);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports[`componentsMap renders renders components map correctly 1`] = `
|
|
4
4
|
<View
|
|
5
5
|
style={
|
|
6
|
-
|
|
6
|
+
{
|
|
7
7
|
"flex": 1,
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -11,7 +11,7 @@ exports[`componentsMap renders renders components map correctly 1`] = `
|
|
|
11
11
|
<View
|
|
12
12
|
onLayout={[Function]}
|
|
13
13
|
style={
|
|
14
|
-
|
|
14
|
+
{
|
|
15
15
|
"flex": 1,
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -19,7 +19,7 @@ exports[`componentsMap renders renders components map correctly 1`] = `
|
|
|
19
19
|
<RCTScrollView
|
|
20
20
|
ListFooterComponent={[Function]}
|
|
21
21
|
contentContainerStyle={
|
|
22
|
-
|
|
22
|
+
{
|
|
23
23
|
"paddingBottom": undefined,
|
|
24
24
|
"paddingLeft": undefined,
|
|
25
25
|
"paddingRight": undefined,
|
|
@@ -27,22 +27,22 @@ exports[`componentsMap renders renders components map correctly 1`] = `
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
data={
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
[
|
|
31
|
+
{
|
|
32
32
|
"component_type": "hero",
|
|
33
33
|
"id": "A1",
|
|
34
|
-
"styles":
|
|
35
|
-
"cell_styles":
|
|
34
|
+
"styles": {
|
|
35
|
+
"cell_styles": [
|
|
36
36
|
"some",
|
|
37
37
|
"obsolete",
|
|
38
38
|
"ids",
|
|
39
39
|
],
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
|
-
|
|
42
|
+
{
|
|
43
43
|
"component_type": "grid",
|
|
44
44
|
"id": "A2",
|
|
45
|
-
"styles":
|
|
45
|
+
"styles": {
|
|
46
46
|
"master_cell_id": "uuid-5678-B",
|
|
47
47
|
},
|
|
48
48
|
},
|
|
@@ -66,12 +66,12 @@ exports[`componentsMap renders renders components map correctly 1`] = `
|
|
|
66
66
|
renderItem={[Function]}
|
|
67
67
|
scrollEventThrottle={16}
|
|
68
68
|
scrollIndicatorInsets={
|
|
69
|
-
|
|
69
|
+
{
|
|
70
70
|
"right": 1,
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
stickyHeaderIndices={
|
|
74
|
-
viewabilityConfigCallbackPairs={
|
|
73
|
+
stickyHeaderIndices={[]}
|
|
74
|
+
viewabilityConfigCallbackPairs={[]}
|
|
75
75
|
windowSize={12}
|
|
76
76
|
>
|
|
77
77
|
<View>
|
|
@@ -81,7 +81,7 @@ exports[`componentsMap renders renders components map correctly 1`] = `
|
|
|
81
81
|
>
|
|
82
82
|
<View
|
|
83
83
|
style={
|
|
84
|
-
|
|
84
|
+
{
|
|
85
85
|
"display": "flex",
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -89,7 +89,7 @@ exports[`componentsMap renders renders components map correctly 1`] = `
|
|
|
89
89
|
<View
|
|
90
90
|
onLayout={[Function]}
|
|
91
91
|
style={
|
|
92
|
-
|
|
92
|
+
{
|
|
93
93
|
"flex": 1,
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -104,7 +104,7 @@ exports[`componentsMap renders renders components map correctly 1`] = `
|
|
|
104
104
|
>
|
|
105
105
|
<View
|
|
106
106
|
style={
|
|
107
|
-
|
|
107
|
+
{
|
|
108
108
|
"display": "none",
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -112,7 +112,7 @@ exports[`componentsMap renders renders components map correctly 1`] = `
|
|
|
112
112
|
<View
|
|
113
113
|
onLayout={[Function]}
|
|
114
114
|
style={
|
|
115
|
-
|
|
115
|
+
{
|
|
116
116
|
"flex": 1,
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -127,7 +127,7 @@ exports[`componentsMap renders renders components map correctly 1`] = `
|
|
|
127
127
|
<View
|
|
128
128
|
renderToHardwareTextureAndroid={true}
|
|
129
129
|
style={
|
|
130
|
-
|
|
130
|
+
{
|
|
131
131
|
"alignItems": "center",
|
|
132
132
|
"height": null,
|
|
133
133
|
"justifyContent": "center",
|