@applicaster/zapp-react-native-app 12.0.0-alpha.5521005225 → 12.0.0-alpha.5545254270

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.
@@ -3,21 +3,16 @@ import { BackHandler } from "react-native";
3
3
  import * as R from "ramda";
4
4
 
5
5
  import {
6
- sendQuickBrickEvent,
7
6
  QUICK_BRICK_EVENTS,
7
+ sendQuickBrickEvent,
8
8
  } from "@applicaster/zapp-react-native-bridge/QuickBrick";
9
9
  import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks/navigation";
10
10
  import { useAnalytics } from "@applicaster/zapp-react-native-utils/analyticsUtils";
11
11
  import { useRivers } from "@applicaster/zapp-react-native-utils/reactHooks/state";
12
12
 
13
- type Props = {
14
- children: React.CElement,
15
- };
16
-
17
13
  const getHome = R.compose(R.find(R.propEq("home", true)), R.values);
18
14
 
19
- const InteractionManagerComponent = (props: Props) => {
20
- const { children } = props;
15
+ const InteractionManagerComponent = () => {
21
16
  const { sendHardwareBackButtonClickEvent } = useAnalytics();
22
17
  const rivers = useRivers();
23
18
  const navigator = useNavigation();
@@ -63,19 +58,7 @@ const InteractionManagerComponent = (props: Props) => {
63
58
  };
64
59
  }, [onHardwareBackPress]);
65
60
 
66
- return children;
61
+ return null;
67
62
  };
68
63
 
69
64
  export const InteractionManager = React.memo(InteractionManagerComponent);
70
-
71
- export function withInteractionManager(
72
- Component: React.ComponentType<any>
73
- ): React.ComponentType<any> {
74
- return function InteractionManagerComponent(props) {
75
- return (
76
- <InteractionManager>
77
- <Component {...props} />
78
- </InteractionManager>
79
- );
80
- };
81
- }
@@ -113,19 +113,17 @@ const LayoutWithMenu = () => {
113
113
 
114
114
  const isBottomTabsPlugin = plugin?.identifier === "quick-brick-bottom-tabs";
115
115
 
116
- const shouldApplyStyleForBottomTabs = showMenu && isBottomTabsPlugin;
116
+ const paddingBottom = React.useMemo(() => {
117
+ return showMenu && isBottomTabsPlugin ? bottomTabBarHeight : 0; // if activeRiver?.navigations has quick-brick-bottom-tabs - append bottomTabBarHeight as padding
118
+ }, [showMenu, isBottomTabsPlugin, bottomTabBarHeight]);
117
119
 
118
120
  const contentStyle = React.useMemo(
119
121
  () => ({
120
- ...(shouldApplyStyleForBottomTabs
121
- ? {
122
- paddingBottom: bottomTabBarHeight,
123
- }
124
- : {}),
125
122
  ...containerStyle,
123
+ paddingBottom,
126
124
  opacity: videoModalState.visible && !isVideoModalDocked ? 0 : 1,
127
125
  }),
128
- [bottomTabBarHeight, videoModalState.visible, isVideoModalDocked, showMenu]
126
+ [videoModalState.visible, isVideoModalDocked, paddingBottom]
129
127
  );
130
128
 
131
129
  const menuProps = React.useMemo(() => {
@@ -172,7 +170,7 @@ const LayoutWithMenu = () => {
172
170
  <View style={contentStyle}>
173
171
  <Transitioner
174
172
  transitionConfig={transitionConfig}
175
- contentStyle={{}}
173
+ contentStyle={contentStyle}
176
174
  isRTL={isRTL}
177
175
  >
178
176
  <Screen
package/App/index.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import * as React from "react";
2
2
  import * as R from "ramda";
3
- import { NativeRouter, useLocation, useHistory } from "react-router-native";
3
+ import { NativeRouter, useHistory, useLocation } from "react-router-native";
4
4
  // @ts-ignore
5
5
  import { createQuickBrickApp } from "@applicaster/quick-brick-core";
6
6
  import * as Contexts from "@applicaster/zapp-react-native-ui-components/Contexts";
7
7
  import * as QuickBrickManager from "@applicaster/zapp-react-native-bridge/QuickBrick";
8
8
  import { OfflineHandler } from "@applicaster/zapp-react-native-ui-components/Components/OfflineHandler";
9
9
 
10
- import { withInteractionManager } from "./InteractionManager";
10
+ import { InteractionManager } from "./InteractionManager";
11
11
 
12
12
  import { Layout } from "./Layout";
13
13
 
@@ -22,6 +22,6 @@ export const ZappApp: React.ComponentType<Props> = createQuickBrickApp({
22
22
  QuickBrickManager,
23
23
  Layout,
24
24
  OfflineHandler,
25
- InteractionManager: withInteractionManager, // mostly back button handle in Android
25
+ InteractionManager, // mostly back button handle in Android
26
26
  ContextProviders: R.map(R.prop("withProvider"), R.values(Contexts)),
27
27
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-app",
3
- "version": "12.0.0-alpha.5521005225",
3
+ "version": "12.0.0-alpha.5545254270",
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.5521005225",
33
- "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5521005225",
34
- "@applicaster/zapp-react-native-redux": "12.0.0-alpha.5521005225",
35
- "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.5521005225",
36
- "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5521005225",
32
+ "@applicaster/quick-brick-core": "12.0.0-alpha.5545254270",
33
+ "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5545254270",
34
+ "@applicaster/zapp-react-native-redux": "12.0.0-alpha.5545254270",
35
+ "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.5545254270",
36
+ "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5545254270",
37
37
  "axios": "^0.28.0",
38
38
  "camelize": "^1.0.0",
39
39
  "query-string": "7.1.3",