@applicaster/zapp-react-native-ui-components 12.0.0-rc.85 → 12.0.0-rc.87
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.
|
@@ -71,9 +71,9 @@ export class BaseFocusable<
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
getId(props?: { id: string; groupId: string }) {
|
|
74
|
-
const { id
|
|
74
|
+
const { id } = props || this.props;
|
|
75
75
|
|
|
76
|
-
return
|
|
76
|
+
return id;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
getRect() {
|
|
@@ -8,6 +8,7 @@ import { ScreenDataContext } from "@applicaster/zapp-react-native-ui-components/
|
|
|
8
8
|
import { PathnameContext } from "@applicaster/zapp-react-native-ui-components/Contexts/PathnameContext";
|
|
9
9
|
|
|
10
10
|
import { Screen } from "../Screen/TV/index.web";
|
|
11
|
+
import { isLast } from "@applicaster/zapp-react-native-utils/arrayUtils";
|
|
11
12
|
|
|
12
13
|
type Components = {
|
|
13
14
|
NavBar: React.ComponentType<any>;
|
|
@@ -19,21 +20,26 @@ type Props = {
|
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
export const StackNavigator = ({ Components }: Props) => {
|
|
22
|
-
const { mainStack
|
|
23
|
+
const { mainStack } = useNavigation();
|
|
23
24
|
|
|
24
|
-
const renderScreen = ({ route, state }) => {
|
|
25
|
+
const renderScreen = ({ route, state }, index) => {
|
|
25
26
|
const pathAttributes = getPathAttributes({ pathname: route });
|
|
26
27
|
|
|
27
28
|
if (isEmpty(pathAttributes)) {
|
|
28
29
|
return null;
|
|
29
30
|
}
|
|
30
31
|
|
|
32
|
+
// HACK: Adding index to route to avoid conflicts in the navigator.
|
|
33
|
+
// Startup hooks are all using PUSH navigation action to navigate, but their routes are always like root routes.
|
|
34
|
+
// This means some hooks can have the same routes, e.g., ["hooks/context-setter", "/hooks/login-plug", "hooks/context-setter"].
|
|
35
|
+
const routeId = `${route}--${index}`;
|
|
36
|
+
|
|
31
37
|
return (
|
|
32
38
|
<FocusableGroup
|
|
33
|
-
id={
|
|
34
|
-
preferredFocus={
|
|
39
|
+
id={routeId}
|
|
40
|
+
preferredFocus={isLast(index, mainStack.length)}
|
|
35
41
|
excludeFromFocusSearching
|
|
36
|
-
key={
|
|
42
|
+
key={routeId}
|
|
37
43
|
>
|
|
38
44
|
<ScreenDataContext.Provider value={state}>
|
|
39
45
|
<PathnameContext.Provider value={route}>
|
|
@@ -42,6 +42,13 @@ const getPluginType = pathOr("unknown_plugin_type", [
|
|
|
42
42
|
"plugin_type",
|
|
43
43
|
]);
|
|
44
44
|
|
|
45
|
+
export const isPresentFullScreen = pathOr(false, [
|
|
46
|
+
"state",
|
|
47
|
+
"screen",
|
|
48
|
+
"module",
|
|
49
|
+
"presentFullScreen",
|
|
50
|
+
]);
|
|
51
|
+
|
|
45
52
|
const isPlayerPlugin = (routeState): boolean =>
|
|
46
53
|
getPluginType(routeState) === "player";
|
|
47
54
|
|
|
@@ -150,8 +157,9 @@ export const Screen = ({ route, Components }: Props) => {
|
|
|
150
157
|
|
|
151
158
|
const isPlayer = isPlayerPlugin(routeState);
|
|
152
159
|
const isLogin = isLoginPlugin(routeState);
|
|
160
|
+
const isFullScreen = isPresentFullScreen(routeState);
|
|
153
161
|
|
|
154
|
-
const isNavBarVisible = !isPlayer && !isLogin;
|
|
162
|
+
const isNavBarVisible = !isPlayer && !isLogin && !isFullScreen;
|
|
155
163
|
|
|
156
164
|
const screenData =
|
|
157
165
|
screenType === "hooks" || isPlayer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "12.0.0-rc.
|
|
3
|
+
"version": "12.0.0-rc.87",
|
|
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",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"redux-mock-store": "^1.5.3"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@applicaster/applicaster-types": "12.0.0-rc.
|
|
38
|
-
"@applicaster/zapp-react-native-bridge": "12.0.0-rc.
|
|
39
|
-
"@applicaster/zapp-react-native-redux": "12.0.0-rc.
|
|
40
|
-
"@applicaster/zapp-react-native-utils": "12.0.0-rc.
|
|
37
|
+
"@applicaster/applicaster-types": "12.0.0-rc.87",
|
|
38
|
+
"@applicaster/zapp-react-native-bridge": "12.0.0-rc.87",
|
|
39
|
+
"@applicaster/zapp-react-native-redux": "12.0.0-rc.87",
|
|
40
|
+
"@applicaster/zapp-react-native-utils": "12.0.0-rc.87",
|
|
41
41
|
"promise": "^8.3.0",
|
|
42
42
|
"react-router-native": "^5.1.2",
|
|
43
43
|
"url": "^0.11.0",
|