react-native-inapp-inspector 2.3.14 → 2.3.16
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/README.md +1 -0
- package/dist/commonjs/components/AnimatedEntrance.js +3 -3
- package/dist/commonjs/components/ConsoleLogCard.js +174 -100
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +0 -22
- package/dist/commonjs/components/Inspector/ConsoleTab.js +25 -38
- package/dist/commonjs/components/Inspector/CrashTab.js +19 -28
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +198 -98
- package/dist/commonjs/components/Inspector/FeedbackModal.d.ts +7 -0
- package/dist/commonjs/components/Inspector/FeedbackModal.js +552 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +58 -6
- package/dist/commonjs/components/Inspector/MainScreen.js +100 -58
- package/dist/commonjs/components/Inspector/NetworkTab.js +26 -371
- package/dist/commonjs/components/Inspector/NpmStarPrompt.d.ts +3 -0
- package/dist/commonjs/components/Inspector/NpmStarPrompt.js +494 -0
- package/dist/commonjs/components/Inspector/PerformanceTab.js +40 -7
- package/dist/commonjs/components/Inspector/ReduxTab.js +3 -23
- package/dist/commonjs/components/Inspector/SettingsPanel.js +1035 -173
- package/dist/commonjs/components/Inspector/StorageTab.js +23 -28
- package/dist/commonjs/components/Inspector/TabBar.js +50 -15
- package/dist/commonjs/components/JsonViewer.js +14 -2
- package/dist/commonjs/components/LogCard.js +428 -227
- package/dist/commonjs/components/NetworkIcons.d.ts +5 -0
- package/dist/commonjs/components/NetworkIcons.js +33 -2
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.js +1 -1
- package/dist/commonjs/customHooks/consoleLogger.js +34 -2
- package/dist/commonjs/customHooks/crashHandler.js +1 -1
- package/dist/commonjs/customHooks/networkLogger.js +184 -26
- package/dist/commonjs/helpers/index.d.ts +1 -0
- package/dist/commonjs/helpers/index.js +1 -0
- package/dist/commonjs/helpers/remoteConfig.d.ts +4 -0
- package/dist/commonjs/helpers/remoteConfig.js +165 -0
- package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -1
- package/dist/commonjs/helpers/searchQueryParser.js +39 -291
- package/dist/commonjs/helpers/telemetry.d.ts +5 -0
- package/dist/commonjs/helpers/telemetry.js +339 -8
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +173 -29
- package/dist/commonjs/styles/AppFonts.d.ts +2 -0
- package/dist/commonjs/styles/AppFonts.js +1 -0
- package/dist/commonjs/styles/index.d.ts +22 -0
- package/dist/commonjs/styles/index.js +19 -0
- package/dist/commonjs/types/enums.d.ts +1 -0
- package/dist/commonjs/types/enums.js +1 -0
- package/dist/commonjs/types/interfaces.d.ts +12 -0
- package/dist/esm/components/AnimatedEntrance.js +3 -3
- package/dist/esm/components/ConsoleLogCard.js +141 -100
- package/dist/esm/components/Inspector/AnalyticsTab.js +1 -23
- package/dist/esm/components/Inspector/ConsoleTab.js +26 -39
- package/dist/esm/components/Inspector/CrashTab.js +20 -29
- package/dist/esm/components/Inspector/DeviceInfoTab.js +198 -98
- package/dist/esm/components/Inspector/FeedbackModal.d.ts +7 -0
- package/dist/esm/components/Inspector/FeedbackModal.js +515 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +60 -8
- package/dist/esm/components/Inspector/MainScreen.js +101 -59
- package/dist/esm/components/Inspector/NetworkTab.js +27 -372
- package/dist/esm/components/Inspector/NpmStarPrompt.d.ts +3 -0
- package/dist/esm/components/Inspector/NpmStarPrompt.js +454 -0
- package/dist/esm/components/Inspector/PerformanceTab.js +40 -7
- package/dist/esm/components/Inspector/ReduxTab.js +4 -24
- package/dist/esm/components/Inspector/SettingsPanel.js +1038 -176
- package/dist/esm/components/Inspector/StorageTab.js +23 -28
- package/dist/esm/components/Inspector/TabBar.js +50 -15
- package/dist/esm/components/JsonViewer.js +14 -2
- package/dist/esm/components/LogCard.js +422 -221
- package/dist/esm/components/NetworkIcons.d.ts +5 -0
- package/dist/esm/components/NetworkIcons.js +26 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.js +1 -1
- package/dist/esm/customHooks/consoleLogger.js +34 -2
- package/dist/esm/customHooks/crashHandler.js +1 -1
- package/dist/esm/customHooks/networkLogger.js +184 -26
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +1 -0
- package/dist/esm/helpers/remoteConfig.d.ts +4 -0
- package/dist/esm/helpers/remoteConfig.js +160 -0
- package/dist/esm/helpers/searchQueryParser.d.ts +1 -1
- package/dist/esm/helpers/searchQueryParser.js +39 -291
- package/dist/esm/helpers/telemetry.d.ts +5 -0
- package/dist/esm/helpers/telemetry.js +332 -9
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +171 -29
- package/dist/esm/styles/AppFonts.d.ts +2 -0
- package/dist/esm/styles/AppFonts.js +1 -0
- package/dist/esm/styles/index.d.ts +22 -0
- package/dist/esm/styles/index.js +19 -0
- package/dist/esm/types/enums.d.ts +1 -0
- package/dist/esm/types/enums.js +1 -0
- package/dist/esm/types/interfaces.d.ts +12 -0
- package/package.json +1 -1
- package/src/components/AnimatedEntrance.tsx +3 -3
- package/src/components/ConsoleLogCard.tsx +154 -103
- package/src/components/Inspector/AnalyticsTab.tsx +0 -23
- package/src/components/Inspector/ConsoleTab.tsx +27 -41
- package/src/components/Inspector/CrashTab.tsx +19 -28
- package/src/components/Inspector/DeviceInfoTab.tsx +224 -102
- package/src/components/Inspector/FeedbackModal.tsx +626 -0
- package/src/components/Inspector/InspectorHeader.tsx +83 -5
- package/src/components/Inspector/MainScreen.tsx +61 -6
- package/src/components/Inspector/NetworkTab.tsx +70 -480
- package/src/components/Inspector/NpmStarPrompt.tsx +532 -0
- package/src/components/Inspector/PerformanceTab.tsx +44 -8
- package/src/components/Inspector/ReduxTab.tsx +9 -24
- package/src/components/Inspector/SettingsPanel.tsx +1162 -197
- package/src/components/Inspector/StorageTab.tsx +27 -30
- package/src/components/Inspector/TabBar.tsx +57 -20
- package/src/components/JsonViewer.tsx +15 -2
- package/src/components/LogCard.tsx +528 -339
- package/src/components/NetworkIcons.tsx +92 -0
- package/src/constants/version.ts +1 -1
- package/src/customHooks/analyticsLogger.ts +1 -1
- package/src/customHooks/consoleLogger.ts +36 -3
- package/src/customHooks/crashHandler.ts +1 -1
- package/src/customHooks/networkLogger.ts +214 -26
- package/src/helpers/index.ts +1 -0
- package/src/helpers/remoteConfig.ts +212 -0
- package/src/helpers/searchQueryParser.ts +42 -284
- package/src/helpers/telemetry.ts +381 -10
- package/src/index.tsx +374 -211
- package/src/styles/AppFonts.ts +2 -0
- package/src/styles/index.ts +20 -1
- package/src/types/enums.ts +1 -0
- package/src/types/interfaces.ts +12 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import { Animated, Modal, Platform, Pressable, StatusBar, StyleSheet, View, } from 'react-native';
|
|
2
|
+
import { Animated, Modal, Platform, Pressable, StatusBar, StyleSheet, TouchableOpacity, View, } from 'react-native';
|
|
3
3
|
import { useInspector } from './InspectorContext';
|
|
4
4
|
import ErrorBoundary from '../ErrorBoundary';
|
|
5
5
|
import FabLauncher from './FabLauncher';
|
|
@@ -22,13 +22,16 @@ import StorageTab from './StorageTab';
|
|
|
22
22
|
import DebuggingTab from './DebuggingTab';
|
|
23
23
|
import SettingsPanel from './SettingsPanel';
|
|
24
24
|
import NpmUpdateToast from './NpmUpdateToast';
|
|
25
|
+
import NpmStarPrompt from './NpmStarPrompt';
|
|
26
|
+
import FeedbackModal from './FeedbackModal';
|
|
25
27
|
import Toast from '../Toast';
|
|
28
|
+
import { HeadphonesIcon } from '../NetworkIcons';
|
|
26
29
|
import styles from '../../styles';
|
|
27
30
|
import { AppColors } from '../../styles/AppColors';
|
|
28
31
|
import NavigationTracker from './NavigationTracker';
|
|
29
32
|
import { isLocalDebugEnvironment } from '../../helpers';
|
|
30
33
|
const MainScreen = () => {
|
|
31
|
-
const { visible, modalAnimationType, closeModal, modalHeightPercent, selected, selectedEvent, selectedLog, selectedReduxSlice, selectedReduxAction, selectedCrash, settingsPage, activeTab, isReady, enabled, useNativeFab, hasNavigationContext, setNavState, } = useInspector();
|
|
34
|
+
const { visible, modalAnimationType, closeModal, modalHeightPercent, selected, selectedEvent, selectedLog, selectedReduxSlice, selectedReduxAction, selectedCrash, settingsPage, isFeedbackOpen, setIsFeedbackOpen, activeTab, isReady, enabled, useNativeFab, hasNavigationContext, setNavState, } = useInspector();
|
|
32
35
|
const isDetailActive = (activeTab === 'apis' && selected != null) ||
|
|
33
36
|
(activeTab === 'analytics' && selectedEvent != null) ||
|
|
34
37
|
(activeTab === 'logs' && selectedLog != null) ||
|
|
@@ -58,6 +61,18 @@ const MainScreen = () => {
|
|
|
58
61
|
}).start();
|
|
59
62
|
}
|
|
60
63
|
}, [settingsPage !== null]);
|
|
64
|
+
const feedbackAnim = useRef(new Animated.Value(0)).current;
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (isFeedbackOpen) {
|
|
67
|
+
feedbackAnim.setValue(0);
|
|
68
|
+
Animated.spring(feedbackAnim, {
|
|
69
|
+
toValue: 1,
|
|
70
|
+
friction: 8,
|
|
71
|
+
tension: 65,
|
|
72
|
+
useNativeDriver: true,
|
|
73
|
+
}).start();
|
|
74
|
+
}
|
|
75
|
+
}, [isFeedbackOpen]);
|
|
61
76
|
const tabAnim = useRef(new Animated.Value(1)).current;
|
|
62
77
|
useEffect(() => {
|
|
63
78
|
tabAnim.setValue(0);
|
|
@@ -72,45 +87,45 @@ const MainScreen = () => {
|
|
|
72
87
|
enabled &&
|
|
73
88
|
!visible &&
|
|
74
89
|
!useNativeFab && <FabLauncher />}
|
|
75
|
-
<Modal visible={visible} animationType={modalAnimationType} transparent statusBarTranslucent={true}>
|
|
76
|
-
|
|
90
|
+
<Modal visible={visible} animationType={modalAnimationType} transparent statusBarTranslucent={true} onRequestClose={closeModal}>
|
|
91
|
+
<ErrorBoundary onClose={closeModal}>
|
|
77
92
|
<View style={styles.modalBackdrop}>
|
|
78
93
|
<Pressable style={styles.modalBackdropPressable} onPress={closeModal}/>
|
|
79
94
|
<View style={[
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
95
|
+
styles.modalContentCard,
|
|
96
|
+
{
|
|
97
|
+
height: `${modalHeightPercent}%`,
|
|
98
|
+
borderTopLeftRadius: modalHeightPercent >= 100 ? 0 : 20,
|
|
99
|
+
borderTopRightRadius: modalHeightPercent >= 100 ? 0 : 20,
|
|
100
|
+
},
|
|
101
|
+
]}>
|
|
87
102
|
<StatusBar translucent backgroundColor="transparent" barStyle="light-content"/>
|
|
88
103
|
|
|
89
104
|
<InspectorHeader />
|
|
90
105
|
|
|
91
106
|
<View style={{ flex: 1 }}>
|
|
92
107
|
|
|
93
|
-
{!isDetailActive && <TabBar />}
|
|
108
|
+
{!isDetailActive && settingsPage === null && !isFeedbackOpen && <TabBar />}
|
|
94
109
|
|
|
95
110
|
{isReady ? (<View style={{ flex: 1 }}>
|
|
96
111
|
|
|
97
112
|
<Animated.View style={[
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
{
|
|
114
|
+
flex: 1,
|
|
115
|
+
opacity: tabAnim,
|
|
116
|
+
transform: [
|
|
117
|
+
{
|
|
118
|
+
translateY: tabAnim.interpolate({
|
|
119
|
+
inputRange: [0, 1],
|
|
120
|
+
outputRange: [6, 0],
|
|
121
|
+
}),
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
(isDetailActive || settingsPage !== null || isFeedbackOpen) && {
|
|
126
|
+
pointerEvents: 'none',
|
|
127
|
+
},
|
|
128
|
+
]}>
|
|
114
129
|
{activeTab === 'apis' && <NetworkTab />}
|
|
115
130
|
{activeTab === 'logs' && <ConsoleTab />}
|
|
116
131
|
{activeTab === 'analytics' && <AnalyticsTab />}
|
|
@@ -121,52 +136,76 @@ const MainScreen = () => {
|
|
|
121
136
|
{activeTab === 'device' && <DeviceInfoTab />}
|
|
122
137
|
{activeTab === 'storage' && <StorageTab />}
|
|
123
138
|
{Platform.OS === 'android' &&
|
|
124
|
-
|
|
125
|
-
|
|
139
|
+
isLocalDebugEnvironment() &&
|
|
140
|
+
activeTab === 'debugging' && <DebuggingTab />}
|
|
126
141
|
</Animated.View>
|
|
127
142
|
|
|
128
143
|
|
|
129
144
|
{isDetailActive && (<Animated.View style={[
|
|
130
|
-
StyleSheet.absoluteFill,
|
|
131
|
-
{
|
|
132
|
-
backgroundColor: AppColors.contentBg,
|
|
133
|
-
opacity: detailAnim,
|
|
134
|
-
transform: [
|
|
135
|
-
{
|
|
136
|
-
translateX: detailAnim.interpolate({
|
|
137
|
-
inputRange: [0, 1],
|
|
138
|
-
outputRange: [32, 0],
|
|
139
|
-
}),
|
|
140
|
-
},
|
|
141
|
-
],
|
|
142
|
-
},
|
|
143
|
-
]}>
|
|
144
|
-
{activeTab === 'apis' && selected != null && (<NetworkDetail />)}
|
|
145
|
-
{activeTab === 'analytics' && selectedEvent != null && (<AnalyticsDetail event={selectedEvent}/>)}
|
|
146
|
-
{activeTab === 'logs' && selectedLog != null && (<LogDetail />)}
|
|
147
|
-
{activeTab === 'redux' && <ReduxDetail />}
|
|
148
|
-
{activeTab === 'crash' && selectedCrash != null && (<CrashDetail />)}
|
|
149
|
-
</Animated.View>)}
|
|
150
|
-
</View>) : (<MainScreenSkeleton />)}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
{settingsPage !== null && (<Animated.View style={[
|
|
154
145
|
StyleSheet.absoluteFill,
|
|
155
146
|
{
|
|
156
|
-
backgroundColor: AppColors.
|
|
157
|
-
opacity:
|
|
147
|
+
backgroundColor: AppColors.contentBg,
|
|
148
|
+
opacity: detailAnim,
|
|
158
149
|
transform: [
|
|
159
150
|
{
|
|
160
|
-
|
|
151
|
+
translateX: detailAnim.interpolate({
|
|
161
152
|
inputRange: [0, 1],
|
|
162
|
-
outputRange: [
|
|
153
|
+
outputRange: [32, 0],
|
|
163
154
|
}),
|
|
164
155
|
},
|
|
165
156
|
],
|
|
166
157
|
},
|
|
167
158
|
]}>
|
|
159
|
+
{activeTab === 'apis' && selected != null && (<NetworkDetail />)}
|
|
160
|
+
{activeTab === 'analytics' && selectedEvent != null && (<AnalyticsDetail event={selectedEvent}/>)}
|
|
161
|
+
{activeTab === 'logs' && selectedLog != null && (<LogDetail />)}
|
|
162
|
+
{activeTab === 'redux' && <ReduxDetail />}
|
|
163
|
+
{activeTab === 'crash' && selectedCrash != null && (<CrashDetail />)}
|
|
164
|
+
</Animated.View>)}
|
|
165
|
+
</View>) : (<MainScreenSkeleton />)}
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
{settingsPage !== null && (<Animated.View style={[
|
|
169
|
+
StyleSheet.absoluteFill,
|
|
170
|
+
{
|
|
171
|
+
backgroundColor: AppColors.grayBackground,
|
|
172
|
+
opacity: settingsAnim,
|
|
173
|
+
transform: [
|
|
174
|
+
{
|
|
175
|
+
translateY: settingsAnim.interpolate({
|
|
176
|
+
inputRange: [0, 1],
|
|
177
|
+
outputRange: [24, 0],
|
|
178
|
+
}),
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
]}>
|
|
168
183
|
<SettingsPanel />
|
|
169
184
|
</Animated.View>)}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
{isFeedbackOpen && (<Animated.View style={[
|
|
188
|
+
StyleSheet.absoluteFill,
|
|
189
|
+
{
|
|
190
|
+
backgroundColor: AppColors.primaryLight,
|
|
191
|
+
opacity: feedbackAnim,
|
|
192
|
+
transform: [
|
|
193
|
+
{
|
|
194
|
+
translateY: feedbackAnim.interpolate({
|
|
195
|
+
inputRange: [0, 1],
|
|
196
|
+
outputRange: [24, 0],
|
|
197
|
+
}),
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
]}>
|
|
202
|
+
<FeedbackModal onClose={() => setIsFeedbackOpen(false)}/>
|
|
203
|
+
</Animated.View>)}
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
{!isDetailActive && settingsPage === null && !isFeedbackOpen && (<TouchableOpacity activeOpacity={0.8} onPress={() => setIsFeedbackOpen(true)} hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }} style={styles.supportFab}>
|
|
207
|
+
<HeadphonesIcon color={AppColors.white} size={20}/>
|
|
208
|
+
</TouchableOpacity>)}
|
|
170
209
|
</View>
|
|
171
210
|
|
|
172
211
|
|
|
@@ -174,9 +213,12 @@ const MainScreen = () => {
|
|
|
174
213
|
|
|
175
214
|
|
|
176
215
|
<NpmUpdateToast />
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
<NpmStarPrompt />
|
|
177
219
|
</View>
|
|
178
220
|
</View>
|
|
179
|
-
</ErrorBoundary>
|
|
221
|
+
</ErrorBoundary>
|
|
180
222
|
{hasNavigationContext && (<NavigationTracker onStateChange={setNavState}/>)}
|
|
181
223
|
</Modal>
|
|
182
224
|
</>);
|