@applicaster/zapp-react-native-app 14.0.0-alpha.6242515303 → 14.0.0-alpha.6461844364

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.
@@ -10,9 +10,41 @@ import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks/n
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
  import { useErrorStore } from "@applicaster/quick-brick-core/App/ErrorBoundary/store";
13
+ import { isApplePlatform } from "@applicaster/zapp-react-native-utils/reactUtils";
14
+
15
+ import NativeDevSettings from "react-native/Libraries/NativeModules/specs/NativeDevSettings";
13
16
 
14
17
  const getHome = R.compose(R.find(R.propEq("home", true)), R.values);
15
18
 
19
+ const isIOS = isApplePlatform();
20
+ /* Set to `false` in production, do not commit this change */
21
+ const IS_DEBUGGER_ENABLED = false;
22
+
23
+ /**
24
+ * This is a workaround to fix an error on start when debugger is connected.
25
+ * node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js :167
26
+ * callNativeSyncHook(
27
+ moduleID: number,
28
+ methodID: number,
29
+ params: mixed[],
30
+ onFail: ?Function,
31
+ onSucc: ?Function,
32
+ ): any {
33
+ this.processCallbacks(moduleID, methodID, params, onFail, onSucc);
34
+ if(global.nativeCallSyncHook)
35
+ {
36
+ return global.nativeCallSyncHook(moduleID, methodID, params);
37
+ }
38
+ }
39
+ */
40
+
41
+ // Assign this to a dev-only button or useEffect call
42
+ const connectToRemoteDebugger = () => {
43
+ if (isIOS) {
44
+ NativeDevSettings.setIsDebuggingRemotely(IS_DEBUGGER_ENABLED);
45
+ }
46
+ };
47
+
16
48
  const InteractionManagerComponent = () => {
17
49
  const { sendHardwareBackButtonClickEvent } = useAnalytics();
18
50
  const rivers = useRivers();
@@ -66,10 +98,17 @@ const InteractionManagerComponent = () => {
66
98
  }, [navigator.currentRoute]);
67
99
 
68
100
  React.useEffect(() => {
69
- BackHandler.addEventListener("hardwareBackPress", onHardwareBackPress);
101
+ connectToRemoteDebugger();
102
+ }, []);
103
+
104
+ React.useEffect(() => {
105
+ const unsubscribe = BackHandler.addEventListener(
106
+ "hardwareBackPress",
107
+ onHardwareBackPress
108
+ );
70
109
 
71
110
  return () => {
72
- BackHandler.removeEventListener("hardwareBackPress", onHardwareBackPress);
111
+ unsubscribe.remove();
73
112
  };
74
113
  }, [onHardwareBackPress]);
75
114
 
@@ -138,6 +138,9 @@ jest.mock(
138
138
  );
139
139
 
140
140
  jest.mock("@applicaster/zapp-react-native-utils/navigationUtils", () => ({
141
+ ...(jest.requireActual(
142
+ "@applicaster/zapp-react-native-utils/navigationUtils"
143
+ ) as jest.Mock<any>),
141
144
  getNavigationProps: () => ({}),
142
145
  resolveNavigationPlugin: () => ({
143
146
  identifier: "quick-brick-bottom-tabs",
@@ -98,20 +98,18 @@ const LayoutWithMenu = () => {
98
98
  * otherwise hidden if videoModalState - visible
99
99
  * also check isMenuVisible
100
100
  */
101
- const showMenu = React.useMemo(
102
- () =>
103
- ((videoModalState.visible &&
104
- (videoModalState.mode === "MINIMIZED" ||
105
- (videoModalState.mode === "MAXIMIZED" && isActiveGesture))) ||
106
- !videoModalState.visible) &&
107
- isMenuVisible(navigator.currentRoute, navigator.screenData),
108
- [
109
- videoModalState.visible,
110
- videoModalState.mode,
111
- navigator.currentRoute,
112
- isActiveGesture,
113
- ]
114
- );
101
+ const showMenu = React.useMemo(() => {
102
+ if (!videoModalState.visible && videoModalState.mode === "FULLSCREEN") {
103
+ return false;
104
+ }
105
+
106
+ return isMenuVisible(navigator.currentRoute, navigator.screenData);
107
+ }, [
108
+ videoModalState.visible,
109
+ videoModalState.mode,
110
+ navigator.currentRoute,
111
+ isActiveGesture,
112
+ ]);
115
113
 
116
114
  const isBottomTabsPlugin = plugin?.identifier === "quick-brick-bottom-tabs";
117
115
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-app",
3
- "version": "14.0.0-alpha.6242515303",
3
+ "version": "14.0.0-alpha.6461844364",
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.6242515303",
31
- "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.6242515303",
32
- "@applicaster/zapp-react-native-redux": "14.0.0-alpha.6242515303",
33
- "@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.6242515303",
34
- "@applicaster/zapp-react-native-utils": "14.0.0-alpha.6242515303",
30
+ "@applicaster/quick-brick-core": "14.0.0-alpha.6461844364",
31
+ "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.6461844364",
32
+ "@applicaster/zapp-react-native-redux": "14.0.0-alpha.6461844364",
33
+ "@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.6461844364",
34
+ "@applicaster/zapp-react-native-utils": "14.0.0-alpha.6461844364",
35
35
  "axios": "^0.28.0",
36
36
  "camelize": "^1.0.0",
37
37
  "query-string": "7.1.3",
@@ -51,7 +51,6 @@
51
51
  "react-native": "*",
52
52
  "react-native-fs": "*",
53
53
  "react-native-linear-gradient": "*",
54
- "react-native-safe-area-context": "*",
55
54
  "react-native-svg": "*",
56
55
  "react-native-webview": "*",
57
56
  "uglify-js": "*",