@applicaster/zapp-react-native-app 14.0.0-alpha.4274952546 → 14.0.0-alpha.4385101226

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,46 @@ 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";
13
14
 
14
15
  const getHome = R.compose(R.find(R.propEq("home", true)), R.values);
15
16
 
17
+ const isIOS = isApplePlatform();
18
+ /* Set to `false` in production, do not commit this change */
19
+ const IS_DEBUGGER_ENABLED = false;
20
+
21
+ /**
22
+ * This is a workaround to fix an error on start when debugger is connected.
23
+ * Update function body for this function `callNativeSyncHook`
24
+ * node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:167
25
+
26
+ this.processCallbacks(moduleID, methodID, params, onFail, onSucc);
27
+ if(global.nativeCallSyncHook) {
28
+ return global.nativeCallSyncHook(moduleID, methodID, params);
29
+ }
30
+ */
31
+
32
+ // Assign this to a dev-only button or useEffect call
33
+ const connectToRemoteDebugger = () => {
34
+ if (__DEV__ && isIOS) {
35
+ try {
36
+ const { DevSettings, NativeModules } = require("react-native");
37
+
38
+ // eslint-disable-next-line no-console
39
+ console.warn(`Debugger connected: ${IS_DEBUGGER_ENABLED}`);
40
+
41
+ if (DevSettings?.setIsDebuggingRemotely) {
42
+ DevSettings.setIsDebuggingRemotely(IS_DEBUGGER_ENABLED);
43
+ }
44
+
45
+ NativeModules?.DevSettings?.setIsDebuggingRemotely?.(IS_DEBUGGER_ENABLED);
46
+ } catch (error) {
47
+ // eslint-disable-next-line no-console
48
+ console.error(`connectToRemoteDebugger message: ${error.message}`);
49
+ }
50
+ }
51
+ };
52
+
16
53
  const InteractionManagerComponent = () => {
17
54
  const { sendHardwareBackButtonClickEvent } = useAnalytics();
18
55
  const rivers = useRivers();
@@ -65,6 +102,10 @@ const InteractionManagerComponent = () => {
65
102
  return true; // Take care! see jsdoc above
66
103
  }, [navigator.currentRoute]);
67
104
 
105
+ React.useEffect(() => {
106
+ connectToRemoteDebugger();
107
+ }, []);
108
+
68
109
  React.useEffect(() => {
69
110
  const unsubscribe = BackHandler.addEventListener(
70
111
  "hardwareBackPress",
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { renderWithProviders } from "@applicaster/zapp-react-native-utils/testUtils";
2
3
 
3
4
  const mockUseMenuToggleContext = jest.fn(() => ({
@@ -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.4274952546",
3
+ "version": "14.0.0-alpha.4385101226",
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.4274952546",
31
- "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.4274952546",
32
- "@applicaster/zapp-react-native-redux": "14.0.0-alpha.4274952546",
33
- "@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.4274952546",
34
- "@applicaster/zapp-react-native-utils": "14.0.0-alpha.4274952546",
30
+ "@applicaster/quick-brick-core": "14.0.0-alpha.4385101226",
31
+ "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.4385101226",
32
+ "@applicaster/zapp-react-native-redux": "14.0.0-alpha.4385101226",
33
+ "@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.4385101226",
34
+ "@applicaster/zapp-react-native-utils": "14.0.0-alpha.4385101226",
35
35
  "axios": "^0.28.0",
36
36
  "camelize": "^1.0.0",
37
37
  "query-string": "7.1.3",
@@ -46,22 +46,14 @@
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": "*",
53
- "react-native-gesture-handler": "*",
54
52
  "react-native-linear-gradient": "*",
55
53
  "react-native-svg": "*",
56
- "react-native-web": "*",
57
54
  "react-native-webview": "*",
58
55
  "uglify-js": "*",
59
56
  "validate-color": "*",
60
57
  "zustand": "*"
61
- },
62
- "devDependencies": {
63
- "nock": "^10.0.0",
64
- "redux-mock-store": "^1.5.3"
65
- },
66
- "gitHead": "a473487564142c55cdb50f02505cf0b60fe75658"
58
+ }
67
59
  }