@applicaster/zapp-react-native-app 15.0.0-rc.52 → 15.0.0-rc.53
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.
|
@@ -57,7 +57,17 @@ exports[`Layout should match snapshot when appReady is true 1`] = `
|
|
|
57
57
|
},
|
|
58
58
|
"currentRoute": "home",
|
|
59
59
|
"data": {},
|
|
60
|
-
"isVideoModalDocked":
|
|
60
|
+
"isVideoModalDocked": [MockFunction] {
|
|
61
|
+
"calls": [
|
|
62
|
+
[],
|
|
63
|
+
],
|
|
64
|
+
"results": [
|
|
65
|
+
{
|
|
66
|
+
"type": "return",
|
|
67
|
+
"value": false,
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
61
71
|
"videoModalState": {
|
|
62
72
|
"mode": "MINIMIZED",
|
|
63
73
|
"visible": false,
|
|
@@ -59,7 +59,13 @@ jest.mock(
|
|
|
59
59
|
})
|
|
60
60
|
);
|
|
61
61
|
|
|
62
|
-
const mockUseNavigation = jest.fn()
|
|
62
|
+
const mockUseNavigation = jest.fn(() => ({
|
|
63
|
+
activeRiver: { navigations: [] },
|
|
64
|
+
videoModalState: { visible: false, mode: "MINIMIZED" },
|
|
65
|
+
currentRoute: "home",
|
|
66
|
+
data: {},
|
|
67
|
+
isVideoModalDocked: jest.fn(() => false),
|
|
68
|
+
}));
|
|
63
69
|
|
|
64
70
|
jest.mock(
|
|
65
71
|
"@applicaster/zapp-react-native-utils/reactHooks/navigation/useNavigation",
|
|
@@ -160,28 +166,6 @@ jest.mock("@applicaster/zapp-react-native-utils/navigationUtils", () => ({
|
|
|
160
166
|
const { Layout } = require("../");
|
|
161
167
|
|
|
162
168
|
describe("Layout", () => {
|
|
163
|
-
beforeAll(() => {
|
|
164
|
-
mockUseNavigation.mockImplementation(() => ({
|
|
165
|
-
activeRiver: { navigations: [] },
|
|
166
|
-
videoModalState: { visible: false, mode: "MINIMIZED" },
|
|
167
|
-
isVideoModalDocked: false,
|
|
168
|
-
currentRoute: "home",
|
|
169
|
-
data: {},
|
|
170
|
-
}));
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
beforeEach(() => {
|
|
174
|
-
jest.clearAllMocks();
|
|
175
|
-
|
|
176
|
-
mockUseNavigation.mockImplementation(() => ({
|
|
177
|
-
activeRiver: { navigations: [] },
|
|
178
|
-
videoModalState: { visible: false, mode: "MINIMIZED" },
|
|
179
|
-
isVideoModalDocked: false,
|
|
180
|
-
currentRoute: "home",
|
|
181
|
-
data: {},
|
|
182
|
-
}));
|
|
183
|
-
});
|
|
184
|
-
|
|
185
169
|
it("should match snapshot when appReady is true", () => {
|
|
186
170
|
const { toJSON } = renderWithProviders(<Layout />);
|
|
187
171
|
|
|
@@ -208,7 +192,7 @@ describe("Layout", () => {
|
|
|
208
192
|
mockUseNavigation.mockReturnValue({
|
|
209
193
|
activeRiver: { navigations: [] },
|
|
210
194
|
videoModalState: { visible: true, mode: "MINIMIZED" },
|
|
211
|
-
isVideoModalDocked:
|
|
195
|
+
isVideoModalDocked: jest.fn(() => true),
|
|
212
196
|
currentRoute: "home",
|
|
213
197
|
data: {},
|
|
214
198
|
});
|
|
@@ -226,7 +210,7 @@ describe("Layout", () => {
|
|
|
226
210
|
mockUseNavigation.mockReturnValueOnce({
|
|
227
211
|
activeRiver: { navigations: [{ identifier: "quick-brick-bottom-tabs" }] },
|
|
228
212
|
videoModalState: { visible: false, mode: "MINIMIZED" },
|
|
229
|
-
isVideoModalDocked: false,
|
|
213
|
+
isVideoModalDocked: jest.fn(() => false),
|
|
230
214
|
currentRoute: "home",
|
|
231
215
|
data: {},
|
|
232
216
|
});
|
|
@@ -256,7 +240,7 @@ describe("Layout", () => {
|
|
|
256
240
|
mockUseNavigation.mockReturnValue({
|
|
257
241
|
activeRiver: { navigations: [] },
|
|
258
242
|
videoModalState: { visible: true, mode: "FULLSCREEN" },
|
|
259
|
-
isVideoModalDocked: false,
|
|
243
|
+
isVideoModalDocked: jest.fn(() => false),
|
|
260
244
|
currentRoute: "home",
|
|
261
245
|
data: {},
|
|
262
246
|
});
|
|
@@ -273,7 +257,7 @@ describe("Layout", () => {
|
|
|
273
257
|
mockUseNavigation.mockReturnValue({
|
|
274
258
|
activeRiver: { navigations: [] },
|
|
275
259
|
videoModalState: { visible: true, mode: "FULLSCREEN" },
|
|
276
|
-
isVideoModalDocked: false,
|
|
260
|
+
isVideoModalDocked: jest.fn(() => false),
|
|
277
261
|
currentRoute: "home",
|
|
278
262
|
data: {},
|
|
279
263
|
});
|
|
@@ -292,7 +276,7 @@ describe("Layout", () => {
|
|
|
292
276
|
mockUseNavigation.mockReturnValue({
|
|
293
277
|
activeRiver: { navigations: [] },
|
|
294
278
|
videoModalState: { visible: false, mode: "MINIMIZED" },
|
|
295
|
-
isVideoModalDocked: false,
|
|
279
|
+
isVideoModalDocked: jest.fn(() => false),
|
|
296
280
|
currentRoute: "home",
|
|
297
281
|
data: {},
|
|
298
282
|
});
|
package/App/Layout/index.tsx
CHANGED
|
@@ -143,16 +143,18 @@ const LayoutWithMenu = () => {
|
|
|
143
143
|
? bottomTabBarHeight + safeAreaBottomInset
|
|
144
144
|
: 0; // if activeRiver?.navigations has quick-brick-bottom-tabs - append bottomTabBarHeight as padding
|
|
145
145
|
|
|
146
|
+
const videoModalStateDocked = isVideoModalDocked();
|
|
147
|
+
|
|
146
148
|
const contentStyle = React.useMemo(
|
|
147
149
|
() =>
|
|
148
150
|
StyleSheet.flatten([
|
|
149
151
|
styles.container,
|
|
150
152
|
{
|
|
151
153
|
paddingBottom,
|
|
152
|
-
opacity: videoModalState.visible && !
|
|
154
|
+
opacity: videoModalState.visible && !videoModalStateDocked ? 0 : 1,
|
|
153
155
|
},
|
|
154
156
|
]),
|
|
155
|
-
[videoModalState.visible,
|
|
157
|
+
[paddingBottom, videoModalState.visible, videoModalStateDocked]
|
|
156
158
|
);
|
|
157
159
|
|
|
158
160
|
const menuProps = React.useMemo(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-app",
|
|
3
|
-
"version": "15.0.0-rc.
|
|
3
|
+
"version": "15.0.0-rc.53",
|
|
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": "15.0.0-rc.
|
|
31
|
-
"@applicaster/zapp-react-native-bridge": "15.0.0-rc.
|
|
32
|
-
"@applicaster/zapp-react-native-redux": "15.0.0-rc.
|
|
33
|
-
"@applicaster/zapp-react-native-ui-components": "15.0.0-rc.
|
|
34
|
-
"@applicaster/zapp-react-native-utils": "15.0.0-rc.
|
|
30
|
+
"@applicaster/quick-brick-core": "15.0.0-rc.53",
|
|
31
|
+
"@applicaster/zapp-react-native-bridge": "15.0.0-rc.53",
|
|
32
|
+
"@applicaster/zapp-react-native-redux": "15.0.0-rc.53",
|
|
33
|
+
"@applicaster/zapp-react-native-ui-components": "15.0.0-rc.53",
|
|
34
|
+
"@applicaster/zapp-react-native-utils": "15.0.0-rc.53",
|
|
35
35
|
"axios": "^0.28.0",
|
|
36
36
|
"camelize": "^1.0.0",
|
|
37
37
|
"query-string": "7.1.3",
|