@applicaster/zapp-react-native-ui-components 14.0.0-alpha.4111088201 → 14.0.0-alpha.4274952546
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.
|
@@ -91,6 +91,7 @@ function FocusableListComponent<ItemT>(props: Props<ItemT>, ref) {
|
|
|
91
91
|
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
92
92
|
omitPropsPropagation = [],
|
|
93
93
|
useScrollView = false,
|
|
94
|
+
onScrollToIndexFailed = noop,
|
|
94
95
|
} = props;
|
|
95
96
|
|
|
96
97
|
useCheckItemIdsForUnique({ componentId: props.id, items: data });
|
|
@@ -277,6 +278,7 @@ function FocusableListComponent<ItemT>(props: Props<ItemT>, ref) {
|
|
|
277
278
|
"withStateMemory",
|
|
278
279
|
"useSequentialLoading",
|
|
279
280
|
"useScrollView",
|
|
281
|
+
"onScrollToIndexFailed",
|
|
280
282
|
...omitPropsPropagation,
|
|
281
283
|
],
|
|
282
284
|
R.__
|
|
@@ -305,6 +307,7 @@ function FocusableListComponent<ItemT>(props: Props<ItemT>, ref) {
|
|
|
305
307
|
{...getFlatListProps(props)}
|
|
306
308
|
onEndReached={onEndReached}
|
|
307
309
|
initialNumToRender={initialNumToRender}
|
|
310
|
+
onScrollToIndexFailed={onScrollToIndexFailed}
|
|
308
311
|
renderItem={renderItem}
|
|
309
312
|
focused={focused}
|
|
310
313
|
data={data}
|
|
@@ -319,6 +322,7 @@ function FocusableListComponent<ItemT>(props: Props<ItemT>, ref) {
|
|
|
319
322
|
renderItem={renderItem}
|
|
320
323
|
onEndReached={onEndReached}
|
|
321
324
|
initialNumToRender={initialNumToRender}
|
|
325
|
+
onScrollToIndexFailed={onScrollToIndexFailed}
|
|
322
326
|
/>
|
|
323
327
|
)}
|
|
324
328
|
</ChildrenFocusDeactivatorView>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useEffect, useReducer } from "react";
|
|
3
|
-
|
|
4
|
-
import { TVMenuControl, View, ViewStyle } from "react-native";
|
|
3
|
+
import { View, ViewStyle } from "react-native";
|
|
5
4
|
import * as R from "ramda";
|
|
6
5
|
import uuid from "uuid/v4";
|
|
7
6
|
import { playerManager } from "@applicaster/zapp-react-native-utils/appUtils/playerManager";
|
|
@@ -62,6 +61,11 @@ import {
|
|
|
62
61
|
useModalAnimationContext,
|
|
63
62
|
} from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
|
|
64
63
|
|
|
64
|
+
import {
|
|
65
|
+
PlayerNativeCommandTypes,
|
|
66
|
+
PlayerNativeSendCommand,
|
|
67
|
+
} from "@applicaster/zapp-react-native-utils/appUtils/playerManager/playerNativeCommand";
|
|
68
|
+
|
|
65
69
|
type Props = {
|
|
66
70
|
Player: React.ComponentType<any>;
|
|
67
71
|
PlayerLoadingView?: React.ComponentType<any>; // 👀 we are not receiving this prop
|
|
@@ -260,9 +264,15 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
260
264
|
return;
|
|
261
265
|
}
|
|
262
266
|
|
|
267
|
+
// send command to clear and stop player
|
|
268
|
+
PlayerNativeSendCommand(
|
|
269
|
+
PlayerNativeCommandTypes.clearPlayerData,
|
|
270
|
+
state.playerId
|
|
271
|
+
);
|
|
272
|
+
|
|
263
273
|
showNavBar(true);
|
|
264
274
|
navigator.goBack();
|
|
265
|
-
}, [isModal, navigator.goBack, showNavBar]);
|
|
275
|
+
}, [isModal, navigator.goBack, state.playerId, showNavBar]);
|
|
266
276
|
|
|
267
277
|
const playEntry = (entry) => navigator.replaceTop(entry, { mode });
|
|
268
278
|
|
|
@@ -390,13 +400,17 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
390
400
|
}
|
|
391
401
|
};
|
|
392
402
|
|
|
393
|
-
const playerRemoteHandler = (
|
|
394
|
-
|
|
403
|
+
const playerRemoteHandler = React.useCallback(
|
|
404
|
+
(isLanguageOverlayVisible = false) =>
|
|
405
|
+
(event) => {
|
|
406
|
+
const { eventType } = event;
|
|
395
407
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
408
|
+
if (!isLanguageOverlayVisible && eventType === "menu") {
|
|
409
|
+
close();
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
[close]
|
|
413
|
+
);
|
|
400
414
|
|
|
401
415
|
// Effects
|
|
402
416
|
useEffect(() => {
|
|
@@ -509,16 +523,6 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
509
523
|
}
|
|
510
524
|
}, [isAudioContent]);
|
|
511
525
|
|
|
512
|
-
// Needs to handle back button on Apple TV
|
|
513
|
-
// https://github.com/facebook/react-native/issues/18930
|
|
514
|
-
useEffect(() => {
|
|
515
|
-
TVMenuControl?.enableTVMenuKey();
|
|
516
|
-
|
|
517
|
-
return () => {
|
|
518
|
-
TVMenuControl?.disableTVMenuKey();
|
|
519
|
-
};
|
|
520
|
-
}, []);
|
|
521
|
-
|
|
522
526
|
useEffect(() => {
|
|
523
527
|
playerEvent("source_changed", { item });
|
|
524
528
|
|
|
@@ -627,9 +631,9 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
627
631
|
<PlayerContainerContext.Consumer>
|
|
628
632
|
{(context) => (
|
|
629
633
|
<TVEventHandlerComponent
|
|
630
|
-
tvEventHandler={(
|
|
631
|
-
|
|
632
|
-
}
|
|
634
|
+
tvEventHandler={playerRemoteHandler(
|
|
635
|
+
context.isLanguageOverlayVisible
|
|
636
|
+
)}
|
|
633
637
|
>
|
|
634
638
|
<FocusableGroup
|
|
635
639
|
id={FocusableGroupMainContainerId}
|
|
@@ -7,7 +7,6 @@ import { isEmptyOrNil } from "@applicaster/zapp-react-native-utils/cellUtils";
|
|
|
7
7
|
|
|
8
8
|
import Tab from "./Tab";
|
|
9
9
|
import { Gutter } from "../Gutter";
|
|
10
|
-
import { noop } from "@applicaster/zapp-react-native-utils/functionUtils";
|
|
11
10
|
import { ImageBackground, View } from "react-native";
|
|
12
11
|
import { getStyles } from "./styles";
|
|
13
12
|
import {
|
|
@@ -100,7 +99,6 @@ const TabsComponent = ({
|
|
|
100
99
|
>
|
|
101
100
|
<FocusableList
|
|
102
101
|
horizontal
|
|
103
|
-
onScrollToIndexFailed={noop}
|
|
104
102
|
onLayout={onLayoutChange}
|
|
105
103
|
contentContainerStyle={tabsListContentContainer}
|
|
106
104
|
ref={flatListRef}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "14.0.0-alpha.
|
|
3
|
+
"version": "14.0.0-alpha.4274952546",
|
|
4
4
|
"description": "Applicaster Zapp React Native ui components for the Quick Brick App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"redux-mock-store": "^1.5.3"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@applicaster/applicaster-types": "14.0.0-alpha.
|
|
35
|
-
"@applicaster/zapp-react-native-bridge": "14.0.0-alpha.
|
|
36
|
-
"@applicaster/zapp-react-native-redux": "14.0.0-alpha.
|
|
37
|
-
"@applicaster/zapp-react-native-utils": "14.0.0-alpha.
|
|
34
|
+
"@applicaster/applicaster-types": "14.0.0-alpha.4274952546",
|
|
35
|
+
"@applicaster/zapp-react-native-bridge": "14.0.0-alpha.4274952546",
|
|
36
|
+
"@applicaster/zapp-react-native-redux": "14.0.0-alpha.4274952546",
|
|
37
|
+
"@applicaster/zapp-react-native-utils": "14.0.0-alpha.4274952546",
|
|
38
38
|
"promise": "^8.3.0",
|
|
39
39
|
"url": "^0.11.0",
|
|
40
40
|
"uuid": "^3.3.2"
|