@applicaster/zapp-react-native-ui-components 14.0.24 → 14.0.25-alpha.1904811005

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.
@@ -9,6 +9,11 @@ exports[`Layout TV renders 1`] = `
9
9
  excludeFromFocusSearching={true}
10
10
  id="/river/A1234"
11
11
  preferredFocus={true}
12
+ style={
13
+ {
14
+ "flex": 1,
15
+ }
16
+ }
12
17
  >
13
18
  <View
14
19
  Components={
@@ -6,11 +6,16 @@ import { getPathAttributes } from "@applicaster/zapp-react-native-utils/navigati
6
6
  import { FocusableGroup } from "@applicaster/zapp-react-native-ui-components/Components/FocusableGroup";
7
7
  import { ScreenDataContext } from "@applicaster/zapp-react-native-ui-components/Contexts/ScreenDataContext";
8
8
  import { PathnameContext } from "@applicaster/zapp-react-native-ui-components/Contexts/PathnameContext";
9
+ import { StyleSheet } from "react-native";
9
10
 
10
11
  import { Screen } from "../Screen/TV/index.web";
11
12
  import { isLast } from "@applicaster/zapp-react-native-utils/arrayUtils";
12
13
  import { ScreenContextProvider } from "../../Contexts/ScreenContext";
13
14
 
15
+ const styles = StyleSheet.create({
16
+ container: { flex: 1 },
17
+ });
18
+
14
19
  type Components = {
15
20
  NavBar: React.ComponentType<any>;
16
21
  Background: React.ComponentType<any>;
@@ -41,6 +46,7 @@ export const StackNavigator = ({ Components }: Props) => {
41
46
  preferredFocus={isLast(index, mainStack.length)}
42
47
  excludeFromFocusSearching
43
48
  key={routeId}
49
+ style={styles.container}
44
50
  >
45
51
  <ScreenDataContext.Provider value={state}>
46
52
  <PathnameContext.Provider value={route}>
@@ -108,7 +108,7 @@ const withBorderHack = () => {
108
108
  /* @HACK: see GH#7269 */
109
109
  return {
110
110
  borderWidth: 1,
111
- borderColor: "transparent",
111
+ borderColor: "black",
112
112
  };
113
113
  }
114
114
 
@@ -3,16 +3,25 @@
3
3
  import React from "react";
4
4
  import { TVEventHandlerComponent } from "@applicaster/zapp-react-native-tvos-ui-components/Components/TVEventHandlerComponent";
5
5
  import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks";
6
+ import { useIsStandaloneFullscreen } from "@applicaster/zapp-react-native-utils/reactHooks/screen";
6
7
 
7
8
  export const withTvEventHandler = (Component) => {
8
9
  return function WithTVEventHandler(props) {
9
10
  const navigator = useNavigation();
10
11
 
12
+ const isStandaloneFullscreen = useIsStandaloneFullscreen();
13
+
11
14
  const remoteHandler = (event) => {
12
15
  const { eventType } = event;
13
16
 
14
17
  const canGoBack = navigator.canGoBack();
15
18
 
19
+ if (eventType === "menu" && isStandaloneFullscreen) {
20
+ navigator.goHome();
21
+
22
+ return;
23
+ }
24
+
16
25
  if (eventType === "menu" && canGoBack) {
17
26
  navigator.goBack();
18
27
  }
@@ -25,6 +25,7 @@ export const SHOWN = 1; // opacity = 1
25
25
 
26
26
  type Props = {
27
27
  componentsToRender: ZappUIComponent[];
28
+ backgroundColor?: string;
28
29
  };
29
30
 
30
31
  export const withScreenRevealManager = (Component) => {
@@ -97,7 +98,9 @@ export const withScreenRevealManager = (Component) => {
97
98
  styles.container,
98
99
  {
99
100
  opacity: opacityRef.current,
100
- backgroundColor: theme.app_background_color,
101
+ // TODO: we should support background image as well, but for now we will use background color from theme
102
+ backgroundColor:
103
+ props.backgroundColor ?? theme.app_background_color,
101
104
  },
102
105
  ]}
103
106
  testID="animated-component"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "14.0.24",
3
+ "version": "14.0.25-alpha.1904811005",
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",
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "homepage": "https://github.com/applicaster/quickbrick#readme",
30
30
  "dependencies": {
31
- "@applicaster/applicaster-types": "14.0.24",
32
- "@applicaster/zapp-react-native-bridge": "14.0.24",
33
- "@applicaster/zapp-react-native-redux": "14.0.24",
34
- "@applicaster/zapp-react-native-utils": "14.0.24",
31
+ "@applicaster/applicaster-types": "14.0.25-alpha.1904811005",
32
+ "@applicaster/zapp-react-native-bridge": "14.0.25-alpha.1904811005",
33
+ "@applicaster/zapp-react-native-redux": "14.0.25-alpha.1904811005",
34
+ "@applicaster/zapp-react-native-utils": "14.0.25-alpha.1904811005",
35
35
  "fast-json-stable-stringify": "^2.1.0",
36
36
  "promise": "^8.3.0",
37
37
  "url": "^0.11.0",