@applicaster/zapp-react-native-app 12.0.0-alpha.5227180498 → 12.0.0-alpha.5335460000
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 +42 -11
- package/package.json +6 -6
package/App/Layout/index.tsx
CHANGED
|
@@ -3,12 +3,15 @@ import * as R from "ramda";
|
|
|
3
3
|
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
|
|
6
|
-
import { getNavigationProps } from "@applicaster/zapp-react-native-utils/navigationUtils";
|
|
7
6
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
getNavigationProps,
|
|
8
|
+
resolveNavigationPlugin,
|
|
9
|
+
} from "@applicaster/zapp-react-native-utils/navigationUtils";
|
|
10
|
+
import {
|
|
10
11
|
useDimensions,
|
|
12
|
+
useGetBottomTabBarHeight,
|
|
11
13
|
useNavbarState,
|
|
14
|
+
useNavigation,
|
|
12
15
|
} from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
13
16
|
import { Transitioner } from "@applicaster/zapp-react-native-ui-components/Components/Transitioner";
|
|
14
17
|
import { transitionConfig } from "@applicaster/zapp-react-native-ui-components/Components/Transitioner/config";
|
|
@@ -26,7 +29,10 @@ import {
|
|
|
26
29
|
} from "@applicaster/zapp-react-native-ui-components/Contexts/MenuToggleContext";
|
|
27
30
|
import { VideoModal } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal";
|
|
28
31
|
import { withDimensionsProvider } from "@applicaster/zapp-react-native-utils/dimensionsProvider";
|
|
29
|
-
import {
|
|
32
|
+
import {
|
|
33
|
+
withModalAnimationProvider,
|
|
34
|
+
useModalAnimationContext,
|
|
35
|
+
} from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
|
|
30
36
|
|
|
31
37
|
import { ZappHooksModal } from "@applicaster/zapp-react-dom-ui-components/Components/ZappHooksModal";
|
|
32
38
|
import { useListenEventBusEvent } from "@applicaster/zapp-react-native-utils/reactHooks/useListenEventBusEvent";
|
|
@@ -63,6 +69,12 @@ const LayoutWithMenu = () => {
|
|
|
63
69
|
|
|
64
70
|
const { activeRiver, videoModalState, isVideoModalDocked } = navigator;
|
|
65
71
|
|
|
72
|
+
const plugin = resolveNavigationPlugin({
|
|
73
|
+
category: "menu",
|
|
74
|
+
navigations: activeRiver?.navigations,
|
|
75
|
+
plugins,
|
|
76
|
+
});
|
|
77
|
+
|
|
66
78
|
const Menu = React.useMemo(
|
|
67
79
|
() =>
|
|
68
80
|
getNavigationPluginModule(
|
|
@@ -75,17 +87,37 @@ const LayoutWithMenu = () => {
|
|
|
75
87
|
navigator: QuickBrickAppNavigator;
|
|
76
88
|
}
|
|
77
89
|
>,
|
|
78
|
-
[]
|
|
90
|
+
[activeRiver]
|
|
79
91
|
);
|
|
80
92
|
|
|
93
|
+
const { isActiveGesture } = useModalAnimationContext();
|
|
94
|
+
|
|
95
|
+
/** BTB shown when videoModalState - visible & minimized, maximized & animation gesture is active
|
|
96
|
+
* otherwise hidden if videoModalState - visible
|
|
97
|
+
* also check isMenuVisible
|
|
98
|
+
*/
|
|
81
99
|
const showMenu = React.useMemo(
|
|
82
|
-
() =>
|
|
83
|
-
|
|
100
|
+
() =>
|
|
101
|
+
((videoModalState.visible &&
|
|
102
|
+
(videoModalState.mode === "MINIMIZED" ||
|
|
103
|
+
(videoModalState.mode === "MAXIMIZED" && isActiveGesture))) ||
|
|
104
|
+
!videoModalState.visible) &&
|
|
105
|
+
isMenuVisible(navigator.currentRoute, navigator.screenData),
|
|
106
|
+
[
|
|
107
|
+
videoModalState.visible,
|
|
108
|
+
videoModalState.mode,
|
|
109
|
+
navigator.currentRoute,
|
|
110
|
+
isActiveGesture,
|
|
111
|
+
]
|
|
84
112
|
);
|
|
85
113
|
|
|
114
|
+
const isBottomTabsPlugin = plugin?.identifier === "quick-brick-bottom-tabs";
|
|
115
|
+
|
|
116
|
+
const shouldApplyStyleForBottomTabs = showMenu && isBottomTabsPlugin;
|
|
117
|
+
|
|
86
118
|
const contentStyle = React.useMemo(
|
|
87
119
|
() => ({
|
|
88
|
-
...(
|
|
120
|
+
...(shouldApplyStyleForBottomTabs
|
|
89
121
|
? {
|
|
90
122
|
paddingBottom: bottomTabBarHeight,
|
|
91
123
|
}
|
|
@@ -140,14 +172,13 @@ const LayoutWithMenu = () => {
|
|
|
140
172
|
<View style={contentStyle}>
|
|
141
173
|
<Transitioner
|
|
142
174
|
transitionConfig={transitionConfig}
|
|
143
|
-
contentStyle={
|
|
175
|
+
contentStyle={{}}
|
|
144
176
|
isRTL={isRTL}
|
|
145
177
|
>
|
|
146
|
-
{/* has pathname context */}
|
|
147
178
|
<Screen
|
|
148
179
|
key={navigator.currentRoute}
|
|
149
180
|
pathname={navigator.currentRoute} // required by TransitionerComponent
|
|
150
|
-
screenData={navigator.
|
|
181
|
+
screenData={navigator.data} // required by TransitionerComponent
|
|
151
182
|
/>
|
|
152
183
|
</Transitioner>
|
|
153
184
|
</View>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-app",
|
|
3
|
-
"version": "12.0.0-alpha.
|
|
3
|
+
"version": "12.0.0-alpha.5335460000",
|
|
4
4
|
"description": "Zapp App Component for Applicaster's Quick Brick React Native App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@applicaster/quick-brick-core": "12.0.0-alpha.
|
|
33
|
-
"@applicaster/zapp-react-native-bridge": "12.0.0-alpha.
|
|
34
|
-
"@applicaster/zapp-react-native-redux": "12.0.0-alpha.
|
|
35
|
-
"@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.
|
|
36
|
-
"@applicaster/zapp-react-native-utils": "12.0.0-alpha.
|
|
32
|
+
"@applicaster/quick-brick-core": "12.0.0-alpha.5335460000",
|
|
33
|
+
"@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5335460000",
|
|
34
|
+
"@applicaster/zapp-react-native-redux": "12.0.0-alpha.5335460000",
|
|
35
|
+
"@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.5335460000",
|
|
36
|
+
"@applicaster/zapp-react-native-utils": "12.0.0-alpha.5335460000",
|
|
37
37
|
"axios": "^0.28.0",
|
|
38
38
|
"camelize": "^1.0.0",
|
|
39
39
|
"query-string": "7.1.3",
|