@applicaster/zapp-react-native-app 14.0.0-alpha.2523527255 → 14.0.0-alpha.2802628909
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.
- package/App/Layout/index.tsx +12 -30
- package/package.json +6 -7
package/App/Layout/index.tsx
CHANGED
|
@@ -3,10 +3,7 @@ import * as R from "ramda";
|
|
|
3
3
|
|
|
4
4
|
import { View, StyleSheet } from "react-native";
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
getNavigationProps,
|
|
8
|
-
resolveNavigationPlugin,
|
|
9
|
-
} from "@applicaster/zapp-react-native-utils/navigationUtils";
|
|
6
|
+
import { getNavigationProps } from "@applicaster/zapp-react-native-utils/navigationUtils";
|
|
10
7
|
import {
|
|
11
8
|
useDimensions,
|
|
12
9
|
useGetBottomTabBarHeight,
|
|
@@ -30,7 +27,6 @@ import {
|
|
|
30
27
|
import { VideoModal } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal";
|
|
31
28
|
import { withDimensionsProvider } from "@applicaster/zapp-react-native-utils/dimensionsProvider";
|
|
32
29
|
import { withModalAnimationProvider } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
|
|
33
|
-
import { useModalAnimationContext } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation/useModalAnimationContext";
|
|
34
30
|
|
|
35
31
|
import { ZappHooksModal } from "@applicaster/zapp-react-dom-ui-components/Components/ZappHooksModal";
|
|
36
32
|
import { useListenEventBusEvent } from "@applicaster/zapp-react-native-utils/reactHooks/useListenEventBusEvent";
|
|
@@ -71,12 +67,6 @@ const LayoutWithMenu = () => {
|
|
|
71
67
|
|
|
72
68
|
const { activeRiver, videoModalState, isVideoModalDocked } = navigator;
|
|
73
69
|
|
|
74
|
-
const plugin = resolveNavigationPlugin({
|
|
75
|
-
category: "menu",
|
|
76
|
-
navigations: activeRiver?.navigations,
|
|
77
|
-
plugins,
|
|
78
|
-
});
|
|
79
|
-
|
|
80
70
|
const Menu = React.useMemo(
|
|
81
71
|
() =>
|
|
82
72
|
getNavigationPluginModule(
|
|
@@ -92,31 +82,25 @@ const LayoutWithMenu = () => {
|
|
|
92
82
|
[activeRiver]
|
|
93
83
|
);
|
|
94
84
|
|
|
95
|
-
const { isActiveGesture } = useModalAnimationContext();
|
|
96
|
-
|
|
97
85
|
/** BTB shown when videoModalState - visible & minimized, maximized & animation gesture is active
|
|
98
86
|
* otherwise hidden if videoModalState - visible
|
|
99
87
|
* also check isMenuVisible
|
|
100
88
|
*/
|
|
101
89
|
const showMenu = React.useMemo(() => {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
90
|
+
const menuVisible = isMenuVisible(
|
|
91
|
+
navigator.currentRoute,
|
|
92
|
+
navigator.screenData,
|
|
93
|
+
plugins
|
|
94
|
+
);
|
|
105
95
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
videoModalState.mode,
|
|
110
|
-
navigator.currentRoute,
|
|
111
|
-
isActiveGesture,
|
|
112
|
-
]);
|
|
96
|
+
const shouldShowWithVideo =
|
|
97
|
+
videoModalState.visible &&
|
|
98
|
+
["MINIMIZED", "MAXIMIZED"].includes(videoModalState.mode);
|
|
113
99
|
|
|
114
|
-
|
|
100
|
+
return menuVisible && (shouldShowWithVideo || !videoModalState.visible);
|
|
101
|
+
}, [videoModalState.visible, videoModalState.mode, navigator.currentRoute]);
|
|
115
102
|
|
|
116
|
-
const paddingBottom =
|
|
117
|
-
showMenu && isBottomTabsPlugin
|
|
118
|
-
? bottomTabBarHeight + safeAreaBottomInset
|
|
119
|
-
: 0; // if activeRiver?.navigations has quick-brick-bottom-tabs - append bottomTabBarHeight as padding
|
|
103
|
+
const paddingBottom = showMenu ? bottomTabBarHeight + safeAreaBottomInset : 0; // if activeRiver?.navigations has quick-brick-bottom-tabs - append bottomTabBarHeight as padding
|
|
120
104
|
|
|
121
105
|
const contentStyle = React.useMemo(
|
|
122
106
|
() =>
|
|
@@ -168,8 +152,6 @@ const LayoutWithMenu = () => {
|
|
|
168
152
|
PushTopicManager.getInstance().prepareTags();
|
|
169
153
|
}, []);
|
|
170
154
|
|
|
171
|
-
console.log("Layout", { navigatorData: navigator.data });
|
|
172
|
-
|
|
173
155
|
return (
|
|
174
156
|
<>
|
|
175
157
|
{appReady ? (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-app",
|
|
3
|
-
"version": "14.0.0-alpha.
|
|
3
|
+
"version": "14.0.0-alpha.2802628909",
|
|
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.
|
|
31
|
-
"@applicaster/zapp-react-native-bridge": "14.0.0-alpha.
|
|
32
|
-
"@applicaster/zapp-react-native-redux": "14.0.0-alpha.
|
|
33
|
-
"@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.
|
|
34
|
-
"@applicaster/zapp-react-native-utils": "14.0.0-alpha.
|
|
30
|
+
"@applicaster/quick-brick-core": "14.0.0-alpha.2802628909",
|
|
31
|
+
"@applicaster/zapp-react-native-bridge": "14.0.0-alpha.2802628909",
|
|
32
|
+
"@applicaster/zapp-react-native-redux": "14.0.0-alpha.2802628909",
|
|
33
|
+
"@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.2802628909",
|
|
34
|
+
"@applicaster/zapp-react-native-utils": "14.0.0-alpha.2802628909",
|
|
35
35
|
"axios": "^0.28.0",
|
|
36
36
|
"camelize": "^1.0.0",
|
|
37
37
|
"query-string": "7.1.3",
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
"@applicaster/zapp-react-native-tvos-ui-components": "*",
|
|
47
47
|
"@babel/runtime": "*",
|
|
48
48
|
"@react-native-community/netinfo": "*",
|
|
49
|
-
"immer": "*",
|
|
50
49
|
"react": "*",
|
|
51
50
|
"react-native": "*",
|
|
52
51
|
"react-native-fs": "*",
|