@applicaster/zapp-react-native-app 14.0.0-alpha.2847632144 → 14.0.0-alpha.3552323332

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.
@@ -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,40 @@ 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) {
103
+ return isMenuVisible(navigator.currentRoute, navigator.screenData);
104
+ } else {
105
+ if (videoModalState.mode === "FULLSCREEN") {
106
+ return false;
107
+ }
108
+ }
109
+
110
+ return isMenuVisible(navigator.currentRoute, navigator.screenData);
111
+ }, [
112
+ videoModalState.visible,
113
+ videoModalState.mode,
114
+ navigator.currentRoute,
115
+ isActiveGesture,
116
+ ]);
111
117
 
112
118
  const isBottomTabsPlugin = plugin?.identifier === "quick-brick-bottom-tabs";
113
119
 
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]);
120
+ const paddingBottom =
121
+ showMenu && isBottomTabsPlugin
122
+ ? bottomTabBarHeight + safeAreaBottomInset
123
+ : 0; // if activeRiver?.navigations has quick-brick-bottom-tabs - append bottomTabBarHeight as padding
117
124
 
118
125
  const contentStyle = React.useMemo(
119
- () => ({
120
- ...containerStyle,
121
- paddingBottom,
122
- opacity: videoModalState.visible && !isVideoModalDocked ? 0 : 1,
123
- }),
124
- [videoModalState.visible, isVideoModalDocked, paddingBottom]
126
+ () =>
127
+ StyleSheet.flatten([
128
+ styles.container,
129
+ {
130
+ paddingBottom,
131
+ opacity: videoModalState.visible && !isVideoModalDocked ? 0 : 1,
132
+ },
133
+ ]),
134
+ [videoModalState.visible, isVideoModalDocked]
125
135
  );
126
136
 
127
137
  const menuProps = React.useMemo(() => {
@@ -165,7 +175,7 @@ const LayoutWithMenu = () => {
165
175
  return (
166
176
  <>
167
177
  {appReady ? (
168
- <View style={containerStyle}>
178
+ <View style={styles.container}>
169
179
  <Transitioner
170
180
  transitionConfig={transitionConfig}
171
181
  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.2847632144",
3
+ "version": "14.0.0-alpha.3552323332",
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.2847632144",
31
- "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.2847632144",
32
- "@applicaster/zapp-react-native-redux": "14.0.0-alpha.2847632144",
33
- "@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.2847632144",
34
- "@applicaster/zapp-react-native-utils": "14.0.0-alpha.2847632144",
30
+ "@applicaster/quick-brick-core": "14.0.0-alpha.3552323332",
31
+ "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.3552323332",
32
+ "@applicaster/zapp-react-native-redux": "14.0.0-alpha.3552323332",
33
+ "@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.3552323332",
34
+ "@applicaster/zapp-react-native-utils": "14.0.0-alpha.3552323332",
35
35
  "axios": "^0.28.0",
36
36
  "camelize": "^1.0.0",
37
37
  "query-string": "7.1.3",