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
|
@@ -356,10 +356,11 @@ export const StorageTab = React.memo(() => {
|
|
|
356
356
|
// Filter entries
|
|
357
357
|
const filteredEntries = useMemo(() => {
|
|
358
358
|
if (!search.trim()) return entries;
|
|
359
|
-
const
|
|
360
|
-
return entries.filter(
|
|
361
|
-
|
|
362
|
-
|
|
359
|
+
const tokens = search.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
360
|
+
return entries.filter(e => {
|
|
361
|
+
const corpus = `${e.key} ${e.value}`.toLowerCase();
|
|
362
|
+
return tokens.every(tok => corpus.includes(tok));
|
|
363
|
+
});
|
|
363
364
|
}, [entries, search]);
|
|
364
365
|
|
|
365
366
|
const totalBytes = useMemo(() => {
|
|
@@ -585,40 +586,36 @@ export const StorageTab = React.memo(() => {
|
|
|
585
586
|
<DatabaseIcon size={28} color={AppColors.grayTextWeak} />
|
|
586
587
|
</View>
|
|
587
588
|
<Text style={styles.emptyTitle}>
|
|
588
|
-
{search
|
|
589
|
+
{search.trim().length > 0
|
|
590
|
+
? 'No matching keys found'
|
|
591
|
+
: `No ${activeDriver === 'asyncStorage' ? 'AsyncStorage' : 'MMKV'} Keys`}
|
|
589
592
|
</Text>
|
|
590
593
|
<Text style={styles.emptySubtitle}>
|
|
591
|
-
{search
|
|
592
|
-
?
|
|
594
|
+
{search.trim().length > 0
|
|
595
|
+
? `No keys or values match "${search}"`
|
|
593
596
|
: `Storage is auto-detected. Tap "+ Add" above to create your first ${activeDriver === 'asyncStorage' ? 'AsyncStorage' : 'MMKV'} key!`}
|
|
594
597
|
</Text>
|
|
598
|
+
{search.trim().length > 0 && (
|
|
599
|
+
<TouchableScale
|
|
600
|
+
onPress={() => setSearch('')}
|
|
601
|
+
style={{
|
|
602
|
+
marginTop: 12,
|
|
603
|
+
paddingHorizontal: 14,
|
|
604
|
+
paddingVertical: 6,
|
|
605
|
+
borderRadius: 8,
|
|
606
|
+
backgroundColor: AppColors.grayBackground,
|
|
607
|
+
borderWidth: 1,
|
|
608
|
+
borderColor: AppColors.grayBorderSecondary,
|
|
609
|
+
}}>
|
|
610
|
+
<Text style={{color: AppColors.brandPurple, fontSize: 12, fontFamily: AppFonts.interBold}}>
|
|
611
|
+
Clear Search
|
|
612
|
+
</Text>
|
|
613
|
+
</TouchableScale>
|
|
614
|
+
)}
|
|
595
615
|
</View>
|
|
596
616
|
}
|
|
597
617
|
ListFooterComponent={<View style={{height: 60}} />}
|
|
598
618
|
/>
|
|
599
|
-
|
|
600
|
-
<TouchableScale
|
|
601
|
-
onPress={() => {
|
|
602
|
-
try {
|
|
603
|
-
listRef.current?.scrollToOffset({
|
|
604
|
-
offset: 0,
|
|
605
|
-
animated: true,
|
|
606
|
-
});
|
|
607
|
-
} catch {
|
|
608
|
-
try {
|
|
609
|
-
listRef.current?.scrollToIndex({
|
|
610
|
-
index: 0,
|
|
611
|
-
animated: true,
|
|
612
|
-
});
|
|
613
|
-
} catch {}
|
|
614
|
-
}
|
|
615
|
-
}}
|
|
616
|
-
hitSlop={12}
|
|
617
|
-
style={globalStyles.scrollTopBtn}>
|
|
618
|
-
<View style={{transform: [{rotate: '180deg'}]}}>
|
|
619
|
-
<ChevronIcon color={AppColors.white} size={18} />
|
|
620
|
-
</View>
|
|
621
|
-
</TouchableScale>
|
|
622
619
|
</>
|
|
623
620
|
)}
|
|
624
621
|
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
import {useInspector} from './InspectorContext';
|
|
11
11
|
import styles from '../../styles';
|
|
12
12
|
import {AppColors} from '../../styles/AppColors';
|
|
13
|
+
import {AppFonts} from '../../styles/AppFonts';
|
|
13
14
|
import TouchableScale from '../TouchableScale';
|
|
14
15
|
import {
|
|
15
16
|
SignalIcon,
|
|
@@ -56,60 +57,70 @@ const TabBar = React.memo(() => {
|
|
|
56
57
|
{(
|
|
57
58
|
[
|
|
58
59
|
{
|
|
60
|
+
id: 1,
|
|
59
61
|
key: 'apis',
|
|
60
62
|
label: 'APIs',
|
|
61
63
|
count: logs.length,
|
|
62
64
|
icon: 'apis',
|
|
63
65
|
},
|
|
64
66
|
{
|
|
67
|
+
id: 2,
|
|
65
68
|
key: 'logs',
|
|
66
69
|
label: 'Logs',
|
|
67
70
|
count: consoleLogs.length,
|
|
68
71
|
icon: 'logs',
|
|
69
72
|
},
|
|
70
73
|
{
|
|
74
|
+
id: 3,
|
|
71
75
|
key: 'analytics',
|
|
72
76
|
label: 'Analytics',
|
|
73
77
|
count: analyticsEvents.length,
|
|
74
78
|
icon: 'analytics',
|
|
75
79
|
},
|
|
76
80
|
{
|
|
81
|
+
id: 4,
|
|
77
82
|
key: 'redux',
|
|
78
83
|
label: 'Redux',
|
|
79
84
|
count: 0,
|
|
80
85
|
icon: 'redux',
|
|
81
86
|
},
|
|
82
87
|
{
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
id: 5,
|
|
89
|
+
key: 'storage',
|
|
90
|
+
label: 'Storage',
|
|
85
91
|
count: 0,
|
|
86
|
-
icon: '
|
|
92
|
+
icon: 'storage',
|
|
87
93
|
},
|
|
88
94
|
{
|
|
89
|
-
|
|
90
|
-
|
|
95
|
+
id: 6,
|
|
96
|
+
key: 'device',
|
|
97
|
+
label: 'Device',
|
|
91
98
|
count: 0,
|
|
92
|
-
icon: '
|
|
99
|
+
icon: 'device',
|
|
93
100
|
},
|
|
94
101
|
{
|
|
102
|
+
id: 7,
|
|
95
103
|
key: 'crash',
|
|
96
104
|
label: 'Crash',
|
|
97
105
|
count: crashRecords?.length || 0,
|
|
98
106
|
icon: 'crash',
|
|
99
107
|
},
|
|
100
108
|
{
|
|
101
|
-
|
|
102
|
-
|
|
109
|
+
id: 8,
|
|
110
|
+
key: 'bundle',
|
|
111
|
+
label: 'Bundle',
|
|
103
112
|
count: 0,
|
|
104
|
-
icon: '
|
|
113
|
+
icon: 'bundle',
|
|
105
114
|
},
|
|
106
115
|
{
|
|
107
|
-
|
|
108
|
-
|
|
116
|
+
id: 9,
|
|
117
|
+
key: 'performance',
|
|
118
|
+
label: 'Performance',
|
|
109
119
|
count: 0,
|
|
110
|
-
icon: '
|
|
120
|
+
icon: 'performance',
|
|
111
121
|
},
|
|
112
122
|
{
|
|
123
|
+
id: 10,
|
|
113
124
|
key: 'debugging',
|
|
114
125
|
label: 'Debugging',
|
|
115
126
|
count: 0,
|
|
@@ -176,24 +187,50 @@ const TabBar = React.memo(() => {
|
|
|
176
187
|
{tab.icon === 'redux' && (
|
|
177
188
|
<ReduxIcon color={iconColor} size={14} />
|
|
178
189
|
)}
|
|
179
|
-
{tab.icon === '
|
|
180
|
-
<
|
|
190
|
+
{tab.icon === 'storage' && (
|
|
191
|
+
<DatabaseIcon color={iconColor} size={14} />
|
|
181
192
|
)}
|
|
182
|
-
{tab.icon === '
|
|
183
|
-
<
|
|
193
|
+
{tab.icon === 'device' && (
|
|
194
|
+
<SmartphoneIcon color={iconColor} size={14} />
|
|
184
195
|
)}
|
|
185
196
|
{tab.icon === 'crash' && (
|
|
186
197
|
<CrashIcon color={iconColor} size={14} />
|
|
187
198
|
)}
|
|
188
|
-
{tab.icon === '
|
|
189
|
-
<
|
|
199
|
+
{tab.icon === 'bundle' && (
|
|
200
|
+
<PackageIcon color={iconColor} size={14} />
|
|
190
201
|
)}
|
|
191
|
-
{tab.icon === '
|
|
192
|
-
<
|
|
202
|
+
{tab.icon === 'performance' && (
|
|
203
|
+
<PerformanceIcon color={iconColor} size={14} />
|
|
193
204
|
)}
|
|
194
205
|
{tab.icon === 'debugging' && (
|
|
195
206
|
<QrCodeIcon color={iconColor} size={14} />
|
|
196
207
|
)}
|
|
208
|
+
<View
|
|
209
|
+
style={{
|
|
210
|
+
minWidth: 20,
|
|
211
|
+
height: 20,
|
|
212
|
+
paddingHorizontal: 4,
|
|
213
|
+
borderRadius: 10,
|
|
214
|
+
backgroundColor: isActive
|
|
215
|
+
? `${AppColors.white}33`
|
|
216
|
+
: `${AppColors.purple}1F`,
|
|
217
|
+
borderWidth: 1,
|
|
218
|
+
borderColor: isActive
|
|
219
|
+
? `${AppColors.white}66`
|
|
220
|
+
: `${AppColors.purple}40`,
|
|
221
|
+
alignItems: 'center',
|
|
222
|
+
justifyContent: 'center',
|
|
223
|
+
}}>
|
|
224
|
+
<Text
|
|
225
|
+
style={{
|
|
226
|
+
fontFamily: AppFonts.interBold,
|
|
227
|
+
fontSize: 9.5,
|
|
228
|
+
lineHeight: 12,
|
|
229
|
+
color: isActive ? AppColors.white : AppColors.purple,
|
|
230
|
+
}}>
|
|
231
|
+
#{tab.id}
|
|
232
|
+
</Text>
|
|
233
|
+
</View>
|
|
197
234
|
<Text
|
|
198
235
|
numberOfLines={1}
|
|
199
236
|
ellipsizeMode="tail"
|
|
@@ -186,11 +186,24 @@ const JsonViewer = React.memo(({
|
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
let keys = Object.keys(data as object);
|
|
190
|
+
if (search && search.trim().length > 0) {
|
|
191
|
+
const q = search.trim().toLowerCase();
|
|
192
|
+
keys = keys.filter(key => {
|
|
193
|
+
const val = (data as any)[key];
|
|
194
|
+
const valStr = typeof val === 'object' && val !== null ? JSON.stringify(val) : String(val);
|
|
195
|
+
return key.toLowerCase().includes(q) || valStr.toLowerCase().includes(q);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
190
199
|
if (keys.length === 0) {
|
|
191
200
|
return (
|
|
192
201
|
<View style={localStyles.emptyTable}>
|
|
193
|
-
<Text style={localStyles.emptyTableText}>
|
|
202
|
+
<Text style={localStyles.emptyTableText}>
|
|
203
|
+
{search && search.trim().length > 0
|
|
204
|
+
? 'No matching keys or values found'
|
|
205
|
+
: t('network.jsonViewer.emptyTable')}
|
|
206
|
+
</Text>
|
|
194
207
|
</View>
|
|
195
208
|
);
|
|
196
209
|
}
|