@applicaster/zapp-react-native-app 14.0.0-alpha.1661204539 → 14.0.0-alpha.2175196485

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.
@@ -66,10 +66,13 @@ const InteractionManagerComponent = () => {
66
66
  }, [navigator.currentRoute]);
67
67
 
68
68
  React.useEffect(() => {
69
- BackHandler.addEventListener("hardwareBackPress", onHardwareBackPress);
69
+ const unsubscribe = BackHandler.addEventListener(
70
+ "hardwareBackPress",
71
+ onHardwareBackPress
72
+ );
70
73
 
71
74
  return () => {
72
- BackHandler.removeEventListener("hardwareBackPress", onHardwareBackPress);
75
+ unsubscribe.remove();
73
76
  };
74
77
  }, [onHardwareBackPress]);
75
78
 
@@ -138,6 +138,9 @@ jest.mock(
138
138
  );
139
139
 
140
140
  jest.mock("@applicaster/zapp-react-native-utils/navigationUtils", () => ({
141
+ ...(jest.requireActual(
142
+ "@applicaster/zapp-react-native-utils/navigationUtils"
143
+ ) as jest.Mock<any>),
141
144
  getNavigationProps: () => ({}),
142
145
  resolveNavigationPlugin: () => ({
143
146
  identifier: "quick-brick-bottom-tabs",
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import * as R from "ramda";
3
3
 
4
- import { View } from "react-native";
4
+ import { View, StyleSheet } from "react-native";
5
5
 
6
6
  import {
7
7
  getNavigationProps,
@@ -39,10 +39,13 @@ import {
39
39
  PushTopicManagerConsts,
40
40
  PushTopicManagerEvents,
41
41
  } from "@applicaster/zapp-react-native-bridge/PushNotifications/PushTopicManager";
42
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
42
43
 
43
- const containerStyle = {
44
- height: "100%",
45
- };
44
+ const styles = StyleSheet.create({
45
+ container: {
46
+ height: "100%",
47
+ },
48
+ });
46
49
 
47
50
  const LayoutWithMenu = () => {
48
51
  const {
@@ -63,6 +66,7 @@ const LayoutWithMenu = () => {
63
66
  const isRTL = useIsRTL();
64
67
  const navigator = useNavigation();
65
68
  const bottomTabBarHeight = useGetBottomTabBarHeight();
69
+ const { bottom: safeAreaBottomInset } = useSafeAreaInsets();
66
70
  const { title } = useNavbarState();
67
71
 
68
72
  const { activeRiver, videoModalState, isVideoModalDocked } = navigator;
@@ -94,34 +98,36 @@ const LayoutWithMenu = () => {
94
98
  * otherwise hidden if videoModalState - visible
95
99
  * also check isMenuVisible
96
100
  */
97
- const showMenu = React.useMemo(
98
- () =>
99
- ((videoModalState.visible &&
100
- (videoModalState.mode === "MINIMIZED" ||
101
- (videoModalState.mode === "MAXIMIZED" && isActiveGesture))) ||
102
- !videoModalState.visible) &&
103
- isMenuVisible(navigator.currentRoute, navigator.screenData),
104
- [
105
- videoModalState.visible,
106
- videoModalState.mode,
107
- navigator.currentRoute,
108
- isActiveGesture,
109
- ]
110
- );
101
+ const showMenu = React.useMemo(() => {
102
+ if (!videoModalState.visible && videoModalState.mode === "FULLSCREEN") {
103
+ return false;
104
+ }
105
+
106
+ return isMenuVisible(navigator.currentRoute, navigator.screenData);
107
+ }, [
108
+ videoModalState.visible,
109
+ videoModalState.mode,
110
+ navigator.currentRoute,
111
+ isActiveGesture,
112
+ ]);
111
113
 
112
114
  const isBottomTabsPlugin = plugin?.identifier === "quick-brick-bottom-tabs";
113
115
 
114
- const paddingBottom = React.useMemo(() => {
115
- return showMenu && isBottomTabsPlugin ? bottomTabBarHeight : 0; // if activeRiver?.navigations has quick-brick-bottom-tabs - append bottomTabBarHeight as padding
116
- }, [showMenu, isBottomTabsPlugin, bottomTabBarHeight]);
116
+ const paddingBottom =
117
+ showMenu && isBottomTabsPlugin
118
+ ? bottomTabBarHeight + safeAreaBottomInset
119
+ : 0; // if activeRiver?.navigations has quick-brick-bottom-tabs - append bottomTabBarHeight as padding
117
120
 
118
121
  const contentStyle = React.useMemo(
119
- () => ({
120
- ...containerStyle,
121
- paddingBottom,
122
- opacity: videoModalState.visible && !isVideoModalDocked ? 0 : 1,
123
- }),
124
- [videoModalState.visible, isVideoModalDocked, paddingBottom]
122
+ () =>
123
+ StyleSheet.flatten([
124
+ styles.container,
125
+ {
126
+ paddingBottom,
127
+ opacity: videoModalState.visible && !isVideoModalDocked ? 0 : 1,
128
+ },
129
+ ]),
130
+ [videoModalState.visible, isVideoModalDocked]
125
131
  );
126
132
 
127
133
  const menuProps = React.useMemo(() => {
@@ -165,7 +171,7 @@ const LayoutWithMenu = () => {
165
171
  return (
166
172
  <>
167
173
  {appReady ? (
168
- <View style={containerStyle}>
174
+ <View style={styles.container}>
169
175
  <Transitioner
170
176
  transitionConfig={transitionConfig}
171
177
  contentStyle={contentStyle}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-app",
3
- "version": "14.0.0-alpha.1661204539",
3
+ "version": "14.0.0-alpha.2175196485",
4
4
  "description": "Zapp App Component for Applicaster's Quick Brick React Native App",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -27,11 +27,11 @@
27
27
  },
28
28
  "homepage": "https://github.com/applicaster/quickbrick#readme",
29
29
  "dependencies": {
30
- "@applicaster/quick-brick-core": "14.0.0-alpha.1661204539",
31
- "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.1661204539",
32
- "@applicaster/zapp-react-native-redux": "14.0.0-alpha.1661204539",
33
- "@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.1661204539",
34
- "@applicaster/zapp-react-native-utils": "14.0.0-alpha.1661204539",
30
+ "@applicaster/quick-brick-core": "14.0.0-alpha.2175196485",
31
+ "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.2175196485",
32
+ "@applicaster/zapp-react-native-redux": "14.0.0-alpha.2175196485",
33
+ "@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.2175196485",
34
+ "@applicaster/zapp-react-native-utils": "14.0.0-alpha.2175196485",
35
35
  "axios": "^0.28.0",
36
36
  "camelize": "^1.0.0",
37
37
  "query-string": "7.1.3",
@@ -50,19 +50,11 @@
50
50
  "react": "*",
51
51
  "react-native": "*",
52
52
  "react-native-fs": "*",
53
- "react-native-gesture-handler": "*",
54
53
  "react-native-linear-gradient": "*",
55
- "react-native-safe-area-context": "*",
56
54
  "react-native-svg": "*",
57
- "react-native-web": "*",
58
55
  "react-native-webview": "*",
59
56
  "uglify-js": "*",
60
57
  "validate-color": "*",
61
58
  "zustand": "*"
62
- },
63
- "devDependencies": {
64
- "nock": "^10.0.0",
65
- "redux-mock-store": "^1.5.3"
66
- },
67
- "gitHead": "a473487564142c55cdb50f02505cf0b60fe75658"
59
+ }
68
60
  }