react-native-inapp-inspector 2.0.0 → 2.0.1
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/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +10 -24
- package/dist/commonjs/components/ConsoleLogCard.js +5 -5
- package/dist/commonjs/components/EndOfListFooter.js +1 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +19 -71
- package/dist/commonjs/components/Inspector/BundleTab.js +670 -188
- package/dist/commonjs/components/Inspector/ConsoleTab.js +109 -98
- package/dist/commonjs/components/Inspector/CrashTab.js +2 -1
- package/dist/commonjs/components/Inspector/InspectorHeader.js +102 -19
- package/dist/commonjs/components/Inspector/MainScreen.js +147 -17
- package/dist/commonjs/components/Inspector/NetworkTab.js +104 -20
- package/dist/commonjs/components/Inspector/SettingsPanel.js +1111 -1385
- package/dist/commonjs/components/Inspector/TabBar.js +3 -4
- package/dist/commonjs/components/JsonViewer.js +9 -4
- package/dist/commonjs/components/LogCard.js +31 -1
- package/dist/commonjs/components/LogSyntaxHighlighter.d.ts +16 -0
- package/dist/commonjs/components/LogSyntaxHighlighter.js +130 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +2 -0
- package/dist/commonjs/components/NetworkIcons.js +10 -1
- package/dist/commonjs/components/Slider.d.ts +13 -0
- package/dist/commonjs/components/Slider.js +261 -0
- 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/crashHandler.js +1 -1
- package/dist/commonjs/helpers/index.d.ts +1 -0
- package/dist/commonjs/helpers/index.js +15 -0
- package/dist/commonjs/helpers/searchQueryParser.d.ts +6 -0
- package/dist/commonjs/helpers/searchQueryParser.js +236 -0
- package/dist/commonjs/helpers/settingsStore.js +13 -13
- package/dist/commonjs/index.js +7 -20
- package/dist/commonjs/styles/index.js +35 -35
- package/dist/esm/components/ConsoleLogCard.js +5 -5
- package/dist/esm/components/EndOfListFooter.js +2 -2
- package/dist/esm/components/Inspector/AnalyticsTab.js +21 -73
- package/dist/esm/components/Inspector/BundleTab.js +670 -188
- package/dist/esm/components/Inspector/ConsoleTab.js +110 -99
- package/dist/esm/components/Inspector/CrashTab.js +2 -1
- package/dist/esm/components/Inspector/InspectorHeader.js +103 -20
- package/dist/esm/components/Inspector/MainScreen.js +115 -18
- package/dist/esm/components/Inspector/NetworkTab.js +105 -21
- package/dist/esm/components/Inspector/SettingsPanel.js +1114 -1388
- package/dist/esm/components/Inspector/TabBar.js +4 -5
- package/dist/esm/components/JsonViewer.js +9 -4
- package/dist/esm/components/LogCard.js +32 -2
- package/dist/esm/components/LogSyntaxHighlighter.d.ts +16 -0
- package/dist/esm/components/LogSyntaxHighlighter.js +123 -0
- package/dist/esm/components/NetworkIcons.d.ts +2 -0
- package/dist/esm/components/NetworkIcons.js +7 -0
- package/dist/esm/components/Slider.d.ts +13 -0
- package/dist/esm/components/Slider.js +222 -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/crashHandler.js +1 -1
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +1 -0
- package/dist/esm/helpers/searchQueryParser.d.ts +6 -0
- package/dist/esm/helpers/searchQueryParser.js +233 -0
- package/dist/esm/helpers/settingsStore.js +13 -13
- package/dist/esm/index.js +8 -21
- package/dist/esm/styles/index.js +35 -35
- package/ios/NetworkInspectorModule.m +81 -41
- package/package.json +1 -1
|
@@ -89,6 +89,8 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
89
89
|
</react_native_1.Text>);
|
|
90
90
|
}
|
|
91
91
|
}, [visibleConsoleLogs.length, filteredConsoleLogs.length, logFilters]);
|
|
92
|
+
const [isSearchFocused, setIsSearchFocused] = react_1.default.useState(false);
|
|
93
|
+
const QUICK_TAG_SUGGESTIONS = (0, react_1.useMemo)(() => ['[AXIOS]', '[API]', '[REDUX]', '[ANALYTICS]', '[AUTH]', '[WARN]', '[ERROR]'], []);
|
|
92
94
|
return (<react_native_1.View style={{ flex: 1 }}>
|
|
93
95
|
<react_native_1.View style={{
|
|
94
96
|
backgroundColor: AppColors_1.AppColors.white,
|
|
@@ -100,12 +102,38 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
100
102
|
styles_1.default.toolbarRow,
|
|
101
103
|
{ marginTop: 12, marginBottom: 8 },
|
|
102
104
|
]}>
|
|
103
|
-
<react_native_1.View style={
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
<react_native_1.View style={[
|
|
106
|
+
styles_1.default.searchContainer,
|
|
107
|
+
isSearchFocused && {
|
|
108
|
+
borderColor: AppColors_1.AppColors.purple,
|
|
109
|
+
borderWidth: 1.5,
|
|
110
|
+
},
|
|
111
|
+
]}>
|
|
112
|
+
<NetworkIcons_1.SearchIcon color={isSearchFocused ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayTextWeak} size={16}/>
|
|
113
|
+
<react_native_1.TextInput placeholder={t('console.searchPlaceholder')} placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={logSearch} onChangeText={setLogSearch} onFocus={() => setIsSearchFocused(true)} onBlur={() => setIsSearchFocused(false)} style={styles_1.default.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
114
|
+
{logSearch.length > 0 && (<react_native_1.View style={{
|
|
115
|
+
flexDirection: 'row',
|
|
116
|
+
alignItems: 'center',
|
|
117
|
+
gap: 4,
|
|
118
|
+
}}>
|
|
119
|
+
<react_native_1.View style={{
|
|
120
|
+
backgroundColor: `${AppColors_1.AppColors.purple}20`,
|
|
121
|
+
borderRadius: 10,
|
|
122
|
+
paddingHorizontal: 6,
|
|
123
|
+
paddingVertical: 2,
|
|
124
|
+
}}>
|
|
125
|
+
<react_native_1.Text style={{
|
|
126
|
+
color: AppColors_1.AppColors.purple,
|
|
127
|
+
fontSize: 10,
|
|
128
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
129
|
+
}}>
|
|
130
|
+
{filteredConsoleLogs.length}
|
|
131
|
+
</react_native_1.Text>
|
|
132
|
+
</react_native_1.View>
|
|
133
|
+
<react_native_1.Pressable onPress={() => setLogSearch('')} hitSlop={10} style={styles_1.default.clearBtn}>
|
|
134
|
+
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
135
|
+
</react_native_1.Pressable>
|
|
136
|
+
</react_native_1.View>)}
|
|
109
137
|
</react_native_1.View>
|
|
110
138
|
|
|
111
139
|
<react_native_1.View style={styles_1.default.toolbarRight}>
|
|
@@ -135,6 +163,49 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
135
163
|
</react_native_1.View>
|
|
136
164
|
</react_native_1.View>
|
|
137
165
|
|
|
166
|
+
{/* Quick Tag Search Suggestions Bar */}
|
|
167
|
+
{(isSearchFocused || logSearch.length > 0) && (<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} style={{ marginBottom: 6, maxHeight: 30 }} contentContainerStyle={{
|
|
168
|
+
paddingHorizontal: 16,
|
|
169
|
+
flexDirection: 'row',
|
|
170
|
+
alignItems: 'center',
|
|
171
|
+
gap: 6,
|
|
172
|
+
}}>
|
|
173
|
+
{QUICK_TAG_SUGGESTIONS.map(tag => {
|
|
174
|
+
const isSelected = logSearch.includes(tag);
|
|
175
|
+
return (<TouchableScale_1.default key={tag} onPress={() => {
|
|
176
|
+
if (isSelected) {
|
|
177
|
+
setLogSearch(prev => prev.replace(tag, '').trim());
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
setLogSearch(prev => prev ? `${prev} ${tag}`.trim() : tag);
|
|
181
|
+
}
|
|
182
|
+
}}>
|
|
183
|
+
<react_native_1.View style={{
|
|
184
|
+
paddingHorizontal: 8,
|
|
185
|
+
paddingVertical: 3,
|
|
186
|
+
borderRadius: 6,
|
|
187
|
+
backgroundColor: isSelected
|
|
188
|
+
? AppColors_1.AppColors.purple
|
|
189
|
+
: `${AppColors_1.AppColors.purple}14`,
|
|
190
|
+
borderWidth: 1,
|
|
191
|
+
borderColor: isSelected
|
|
192
|
+
? AppColors_1.AppColors.purple
|
|
193
|
+
: `${AppColors_1.AppColors.purple}30`,
|
|
194
|
+
}}>
|
|
195
|
+
<react_native_1.Text style={{
|
|
196
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
197
|
+
fontSize: 10,
|
|
198
|
+
color: isSelected
|
|
199
|
+
? AppColors_1.AppColors.white
|
|
200
|
+
: AppColors_1.AppColors.purple,
|
|
201
|
+
}}>
|
|
202
|
+
{tag}
|
|
203
|
+
</react_native_1.Text>
|
|
204
|
+
</react_native_1.View>
|
|
205
|
+
</TouchableScale_1.default>);
|
|
206
|
+
})}
|
|
207
|
+
</react_native_1.ScrollView>)}
|
|
208
|
+
|
|
138
209
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} style={{ marginVertical: 4, maxHeight: 46 }} contentContainerStyle={{
|
|
139
210
|
paddingHorizontal: 16,
|
|
140
211
|
paddingBottom: 4,
|
|
@@ -153,7 +224,9 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
153
224
|
{
|
|
154
225
|
backgroundColor: active ? AppColors_1.AppColors.indigo600Alt : AppColors_1.AppColors.indigo50,
|
|
155
226
|
borderColor: active ? AppColors_1.AppColors.indigo600 : AppColors_1.AppColors.indigo400,
|
|
156
|
-
borderRadius:
|
|
227
|
+
borderRadius: 8,
|
|
228
|
+
paddingHorizontal: 10,
|
|
229
|
+
paddingVertical: 6,
|
|
157
230
|
},
|
|
158
231
|
active && {
|
|
159
232
|
shadowColor: AppColors_1.AppColors.indigo600Alt,
|
|
@@ -166,21 +239,9 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
166
239
|
<react_native_1.View style={{
|
|
167
240
|
flexDirection: 'row',
|
|
168
241
|
alignItems: 'center',
|
|
169
|
-
gap:
|
|
170
|
-
}}>
|
|
171
|
-
<react_native_1.View style={{
|
|
172
|
-
width: 12,
|
|
173
|
-
height: 12,
|
|
174
|
-
borderRadius: 3,
|
|
175
|
-
borderWidth: 1.2,
|
|
176
|
-
borderColor: active ? AppColors_1.AppColors.white : AppColors_1.AppColors.indigo400,
|
|
177
|
-
backgroundColor: active ? AppColors_1.AppColors.white : 'transparent',
|
|
178
|
-
alignItems: 'center',
|
|
179
|
-
justifyContent: 'center',
|
|
242
|
+
gap: 6,
|
|
180
243
|
}}>
|
|
181
|
-
|
|
182
|
-
</react_native_1.View>
|
|
183
|
-
<NetworkIcons_1.LayersIcon size={12} color={active ? AppColors_1.AppColors.white : AppColors_1.AppColors.indigo600Alt}/>
|
|
244
|
+
<NetworkIcons_1.LayersIcon size={13} color={active ? AppColors_1.AppColors.white : AppColors_1.AppColors.indigo600Alt}/>
|
|
184
245
|
<react_native_1.Text numberOfLines={1} style={[
|
|
185
246
|
styles_1.default.statusFilterText,
|
|
186
247
|
{
|
|
@@ -215,7 +276,9 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
215
276
|
{
|
|
216
277
|
backgroundColor: active ? AppColors_1.AppColors.teal600 : AppColors_1.AppColors.teal100,
|
|
217
278
|
borderColor: active ? AppColors_1.AppColors.teal600 : AppColors_1.AppColors.teal400,
|
|
218
|
-
borderRadius:
|
|
279
|
+
borderRadius: 8,
|
|
280
|
+
paddingHorizontal: 10,
|
|
281
|
+
paddingVertical: 6,
|
|
219
282
|
},
|
|
220
283
|
active && {
|
|
221
284
|
shadowColor: AppColors_1.AppColors.teal600,
|
|
@@ -228,21 +291,9 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
228
291
|
<react_native_1.View style={{
|
|
229
292
|
flexDirection: 'row',
|
|
230
293
|
alignItems: 'center',
|
|
231
|
-
gap:
|
|
294
|
+
gap: 6,
|
|
232
295
|
}}>
|
|
233
|
-
<
|
|
234
|
-
width: 12,
|
|
235
|
-
height: 12,
|
|
236
|
-
borderRadius: 3,
|
|
237
|
-
borderWidth: 1.2,
|
|
238
|
-
borderColor: active ? AppColors_1.AppColors.white : AppColors_1.AppColors.teal400,
|
|
239
|
-
backgroundColor: active ? AppColors_1.AppColors.white : 'transparent',
|
|
240
|
-
alignItems: 'center',
|
|
241
|
-
justifyContent: 'center',
|
|
242
|
-
}}>
|
|
243
|
-
{active && <NetworkIcons_1.CheckIcon color={AppColors_1.AppColors.teal600} size={8}/>}
|
|
244
|
-
</react_native_1.View>
|
|
245
|
-
<NetworkIcons_1.UserIcon size={12} color={active ? AppColors_1.AppColors.white : AppColors_1.AppColors.teal600}/>
|
|
296
|
+
<NetworkIcons_1.UserIcon size={13} color={active ? AppColors_1.AppColors.white : AppColors_1.AppColors.teal600}/>
|
|
246
297
|
<react_native_1.Text numberOfLines={1} style={[
|
|
247
298
|
styles_1.default.statusFilterText,
|
|
248
299
|
{
|
|
@@ -277,7 +328,9 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
277
328
|
{
|
|
278
329
|
backgroundColor: active ? AppColors_1.AppColors.sky600 : AppColors_1.AppColors.sky100,
|
|
279
330
|
borderColor: active ? AppColors_1.AppColors.blue700 : AppColors_1.AppColors.sky400,
|
|
280
|
-
borderRadius:
|
|
331
|
+
borderRadius: 8,
|
|
332
|
+
paddingHorizontal: 10,
|
|
333
|
+
paddingVertical: 6,
|
|
281
334
|
},
|
|
282
335
|
active && {
|
|
283
336
|
shadowColor: AppColors_1.AppColors.sky600,
|
|
@@ -290,21 +343,9 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
290
343
|
<react_native_1.View style={{
|
|
291
344
|
flexDirection: 'row',
|
|
292
345
|
alignItems: 'center',
|
|
293
|
-
gap:
|
|
346
|
+
gap: 6,
|
|
294
347
|
}}>
|
|
295
|
-
<
|
|
296
|
-
width: 12,
|
|
297
|
-
height: 12,
|
|
298
|
-
borderRadius: 3,
|
|
299
|
-
borderWidth: 1.2,
|
|
300
|
-
borderColor: active ? AppColors_1.AppColors.white : AppColors_1.AppColors.sky400,
|
|
301
|
-
backgroundColor: active ? AppColors_1.AppColors.white : 'transparent',
|
|
302
|
-
alignItems: 'center',
|
|
303
|
-
justifyContent: 'center',
|
|
304
|
-
}}>
|
|
305
|
-
{active && <NetworkIcons_1.CheckIcon color={AppColors_1.AppColors.sky600} size={8}/>}
|
|
306
|
-
</react_native_1.View>
|
|
307
|
-
<NetworkIcons_1.InfoCircleIcon size={12} color={active ? AppColors_1.AppColors.white : AppColors_1.AppColors.sky600}/>
|
|
348
|
+
<NetworkIcons_1.InfoCircleIcon size={13} color={active ? AppColors_1.AppColors.white : AppColors_1.AppColors.sky600}/>
|
|
308
349
|
<react_native_1.Text numberOfLines={1} style={[
|
|
309
350
|
styles_1.default.statusFilterText,
|
|
310
351
|
{
|
|
@@ -339,7 +380,9 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
339
380
|
{
|
|
340
381
|
backgroundColor: active ? AppColors_1.AppColors.amber600 : AppColors_1.AppColors.amber100,
|
|
341
382
|
borderColor: active ? AppColors_1.AppColors.amber700 : AppColors_1.AppColors.amber200,
|
|
342
|
-
borderRadius:
|
|
383
|
+
borderRadius: 8,
|
|
384
|
+
paddingHorizontal: 10,
|
|
385
|
+
paddingVertical: 6,
|
|
343
386
|
},
|
|
344
387
|
active && {
|
|
345
388
|
shadowColor: AppColors_1.AppColors.amber600,
|
|
@@ -352,21 +395,9 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
352
395
|
<react_native_1.View style={{
|
|
353
396
|
flexDirection: 'row',
|
|
354
397
|
alignItems: 'center',
|
|
355
|
-
gap:
|
|
356
|
-
}}>
|
|
357
|
-
<react_native_1.View style={{
|
|
358
|
-
width: 12,
|
|
359
|
-
height: 12,
|
|
360
|
-
borderRadius: 3,
|
|
361
|
-
borderWidth: 1.2,
|
|
362
|
-
borderColor: active ? AppColors_1.AppColors.white : AppColors_1.AppColors.amber500,
|
|
363
|
-
backgroundColor: active ? AppColors_1.AppColors.white : 'transparent',
|
|
364
|
-
alignItems: 'center',
|
|
365
|
-
justifyContent: 'center',
|
|
398
|
+
gap: 6,
|
|
366
399
|
}}>
|
|
367
|
-
|
|
368
|
-
</react_native_1.View>
|
|
369
|
-
<NetworkIcons_1.WarningTriangleIcon size={12} color={active ? AppColors_1.AppColors.white : AppColors_1.AppColors.amber700}/>
|
|
400
|
+
<NetworkIcons_1.WarningTriangleIcon size={13} color={active ? AppColors_1.AppColors.white : AppColors_1.AppColors.amber700}/>
|
|
370
401
|
<react_native_1.Text numberOfLines={1} style={[
|
|
371
402
|
styles_1.default.statusFilterText,
|
|
372
403
|
{
|
|
@@ -401,7 +432,9 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
401
432
|
{
|
|
402
433
|
backgroundColor: active ? AppColors_1.AppColors.red500 : AppColors_1.AppColors.red100,
|
|
403
434
|
borderColor: active ? AppColors_1.AppColors.red600 : AppColors_1.AppColors.errorBorder,
|
|
404
|
-
borderRadius:
|
|
435
|
+
borderRadius: 8,
|
|
436
|
+
paddingHorizontal: 10,
|
|
437
|
+
paddingVertical: 6,
|
|
405
438
|
},
|
|
406
439
|
active && {
|
|
407
440
|
shadowColor: AppColors_1.AppColors.red500,
|
|
@@ -414,21 +447,9 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
414
447
|
<react_native_1.View style={{
|
|
415
448
|
flexDirection: 'row',
|
|
416
449
|
alignItems: 'center',
|
|
417
|
-
gap:
|
|
418
|
-
}}>
|
|
419
|
-
<react_native_1.View style={{
|
|
420
|
-
width: 12,
|
|
421
|
-
height: 12,
|
|
422
|
-
borderRadius: 3,
|
|
423
|
-
borderWidth: 1.2,
|
|
424
|
-
borderColor: active ? AppColors_1.AppColors.white : AppColors_1.AppColors.red500,
|
|
425
|
-
backgroundColor: active ? AppColors_1.AppColors.white : 'transparent',
|
|
426
|
-
alignItems: 'center',
|
|
427
|
-
justifyContent: 'center',
|
|
450
|
+
gap: 6,
|
|
428
451
|
}}>
|
|
429
|
-
|
|
430
|
-
</react_native_1.View>
|
|
431
|
-
<NetworkIcons_1.ErrorCircleIcon size={12} color={active ? AppColors_1.AppColors.white : AppColors_1.AppColors.red500}/>
|
|
452
|
+
<NetworkIcons_1.ErrorCircleIcon size={13} color={active ? AppColors_1.AppColors.white : AppColors_1.AppColors.red500}/>
|
|
432
453
|
<react_native_1.Text numberOfLines={1} style={[
|
|
433
454
|
styles_1.default.statusFilterText,
|
|
434
455
|
{
|
|
@@ -463,7 +484,9 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
463
484
|
{
|
|
464
485
|
backgroundColor: active ? AppColors_1.AppColors.violet600 : AppColors_1.AppColors.purple100,
|
|
465
486
|
borderColor: active ? AppColors_1.AppColors.purple700 : AppColors_1.AppColors.purple200,
|
|
466
|
-
borderRadius:
|
|
487
|
+
borderRadius: 8,
|
|
488
|
+
paddingHorizontal: 10,
|
|
489
|
+
paddingVertical: 6,
|
|
467
490
|
},
|
|
468
491
|
active && {
|
|
469
492
|
shadowColor: AppColors_1.AppColors.violet600,
|
|
@@ -476,29 +499,17 @@ const ConsoleTab = react_1.default.memo(() => {
|
|
|
476
499
|
<react_native_1.View style={{
|
|
477
500
|
flexDirection: 'row',
|
|
478
501
|
alignItems: 'center',
|
|
479
|
-
gap:
|
|
480
|
-
}}>
|
|
481
|
-
<react_native_1.View style={{
|
|
482
|
-
width: 12,
|
|
483
|
-
height: 12,
|
|
484
|
-
borderRadius: 3,
|
|
485
|
-
borderWidth: 1.2,
|
|
486
|
-
borderColor: active ? AppColors_1.AppColors.white : AppColors_1.AppColors.purple400,
|
|
487
|
-
backgroundColor: active ? AppColors_1.AppColors.white : 'transparent',
|
|
488
|
-
alignItems: 'center',
|
|
489
|
-
justifyContent: 'center',
|
|
502
|
+
gap: 6,
|
|
490
503
|
}}>
|
|
491
|
-
|
|
492
|
-
</react_native_1.View>
|
|
493
|
-
<NetworkIcons_1.AnalyticsIcon size={12} color={active ? AppColors_1.AppColors.white : AppColors_1.AppColors.purple}/>
|
|
504
|
+
<NetworkIcons_1.AnalyticsIcon size={13} color={active ? AppColors_1.AppColors.white : AppColors_1.AppColors.violet600}/>
|
|
494
505
|
<react_native_1.Text numberOfLines={1} style={[
|
|
495
506
|
styles_1.default.statusFilterText,
|
|
496
507
|
{
|
|
497
|
-
color: active ? AppColors_1.AppColors.white : AppColors_1.AppColors.
|
|
508
|
+
color: active ? AppColors_1.AppColors.white : AppColors_1.AppColors.purpleText,
|
|
498
509
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
499
510
|
},
|
|
500
511
|
]}>
|
|
501
|
-
{t('
|
|
512
|
+
{t('console.analytics', 'Analytics')} ({logCounts.analytics})
|
|
502
513
|
</react_native_1.Text>
|
|
503
514
|
</react_native_1.View>
|
|
504
515
|
</react_native_1.View>
|
|
@@ -695,10 +695,11 @@ const localStyles = react_native_1.StyleSheet.create({
|
|
|
695
695
|
color: AppColors_1.AppColors.grayTextWeak,
|
|
696
696
|
},
|
|
697
697
|
emptyContainer: {
|
|
698
|
+
flexGrow: 1,
|
|
698
699
|
alignItems: 'center',
|
|
699
700
|
justifyContent: 'center',
|
|
700
701
|
padding: 32,
|
|
701
|
-
|
|
702
|
+
paddingBottom: 80,
|
|
702
703
|
},
|
|
703
704
|
emptyIconCircle: {
|
|
704
705
|
width: 72,
|
|
@@ -50,7 +50,7 @@ const constants_2 = require("../../constants");
|
|
|
50
50
|
const helpers_1 = require("../../helpers");
|
|
51
51
|
const NetworkIcons_1 = require("../NetworkIcons");
|
|
52
52
|
const InspectorHeader = react_1.default.memo(() => {
|
|
53
|
-
const { modalHeightPercent, appIcon, selected, setSelected, selectedEvent, setSelectedEvent, selectedLog, setSelectedLog, selectedReduxSlice, setSelectedReduxSlice, selectedReduxAction, setSelectedReduxAction, reduxState, reduxLastActionMap, showHeaderInfo, setShowHeaderInfo, updateAvailable, latestNpmVersion, clearAnim, activePulseAnim, unreadPulseAnim, runClearAllWithAnimation, setSettingsPage, closeModal, detailTitle, activeTab, environment, selectedCrash, setSelectedCrash, } = (0, InspectorContext_1.useInspector)();
|
|
53
|
+
const { modalHeightPercent, appIcon, selected, setSelected, selectedEvent, setSelectedEvent, selectedLog, setSelectedLog, selectedReduxSlice, setSelectedReduxSlice, selectedReduxAction, setSelectedReduxAction, reduxState, reduxLastActionMap, showHeaderInfo, setShowHeaderInfo, updateAvailable, latestNpmVersion, clearAnim, activePulseAnim, unreadPulseAnim, runClearAllWithAnimation, settingsPage, setSettingsPage, resetToDefaults, closeModal, detailTitle, activeTab, environment, selectedCrash, setSelectedCrash, } = (0, InspectorContext_1.useInspector)();
|
|
54
54
|
const envConfig = (0, react_1.useMemo)(() => {
|
|
55
55
|
const rawEnv = (environment || (__DEV__ ? 'DEV' : 'PROD')).trim();
|
|
56
56
|
const clean = rawEnv.toUpperCase();
|
|
@@ -91,9 +91,30 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
91
91
|
(activeTab === 'logs' && selectedLog != null) ||
|
|
92
92
|
(activeTab === 'redux' && (selectedReduxSlice != null || selectedReduxAction != null)) ||
|
|
93
93
|
(activeTab === 'crash' && selectedCrash != null);
|
|
94
|
-
const
|
|
94
|
+
const isSettingsView = settingsPage !== null;
|
|
95
|
+
const isAnySelected = isDetailView || isSettingsView;
|
|
96
|
+
const settingsModuleTitle = (0, react_1.useMemo)(() => {
|
|
97
|
+
switch (settingsPage) {
|
|
98
|
+
case 'apis':
|
|
99
|
+
return 'APIs (Network)';
|
|
100
|
+
case 'logs':
|
|
101
|
+
return 'Console Logs';
|
|
102
|
+
case 'performance':
|
|
103
|
+
return 'Performance Tracker';
|
|
104
|
+
case 'bundle':
|
|
105
|
+
return 'Bundle Analyzer';
|
|
106
|
+
case 'crash':
|
|
107
|
+
return 'Crash Protection';
|
|
108
|
+
case 'analytics':
|
|
109
|
+
return 'Analytics Logger';
|
|
110
|
+
case 'redux':
|
|
111
|
+
return 'Redux Inspector';
|
|
112
|
+
default:
|
|
113
|
+
return 'Settings & Modules';
|
|
114
|
+
}
|
|
115
|
+
}, [settingsPage]);
|
|
95
116
|
const headerTopPadding = react_native_1.Platform.OS === 'ios' && modalHeightPercent >= 95 ? 44 : 0;
|
|
96
|
-
return (<react_native_linear_gradient_1.default colors={[
|
|
117
|
+
return (<react_native_linear_gradient_1.default colors={['#4F46E5', '#7C3AED']} start={{ x: 0, y: 0 }} end={{ x: 1, y: 1 }} style={styles_1.default.headerGradient}>
|
|
97
118
|
<react_native_1.View style={{ paddingTop: headerTopPadding, width: '100%' }}>
|
|
98
119
|
<react_native_1.View style={styles_1.default.header}>
|
|
99
120
|
<react_native_1.View style={[
|
|
@@ -101,12 +122,21 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
101
122
|
{
|
|
102
123
|
flexDirection: 'row',
|
|
103
124
|
alignItems: 'center',
|
|
104
|
-
gap:
|
|
125
|
+
gap: 8,
|
|
105
126
|
flex: !isDetailView ? 1 : 0,
|
|
106
127
|
minWidth: 0,
|
|
107
128
|
},
|
|
108
129
|
]}>
|
|
109
130
|
<TouchableScale_1.default onPress={() => {
|
|
131
|
+
if (isSettingsView) {
|
|
132
|
+
if (settingsPage === 'main') {
|
|
133
|
+
setSettingsPage(null);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
setSettingsPage('main');
|
|
137
|
+
}
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
110
140
|
requestAnimationFrame(() => {
|
|
111
141
|
setSelected(null);
|
|
112
142
|
setSelectedEvent(null);
|
|
@@ -139,7 +169,43 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
139
169
|
<NetworkIcons_1.WhiteBackNavigation />
|
|
140
170
|
</TouchableScale_1.default>
|
|
141
171
|
|
|
142
|
-
{
|
|
172
|
+
{isSettingsView ? (<react_native_1.View style={{ gap: 2, flex: 1, minWidth: 0 }}>
|
|
173
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
174
|
+
<react_native_1.Text style={{
|
|
175
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
176
|
+
fontSize: 16,
|
|
177
|
+
color: AppColors_1.AppColors.white,
|
|
178
|
+
letterSpacing: -0.2,
|
|
179
|
+
}} numberOfLines={1}>
|
|
180
|
+
{settingsModuleTitle}
|
|
181
|
+
</react_native_1.Text>
|
|
182
|
+
{settingsPage === 'main' && (<react_native_1.View style={{
|
|
183
|
+
backgroundColor: `${AppColors_1.AppColors.white}26`,
|
|
184
|
+
paddingHorizontal: 6,
|
|
185
|
+
paddingVertical: 1.5,
|
|
186
|
+
borderRadius: 10,
|
|
187
|
+
borderWidth: 1,
|
|
188
|
+
borderColor: `${AppColors_1.AppColors.white}20`,
|
|
189
|
+
}}>
|
|
190
|
+
<react_native_1.Text style={{
|
|
191
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
192
|
+
fontSize: 9,
|
|
193
|
+
color: AppColors_1.AppColors.white,
|
|
194
|
+
}}>
|
|
195
|
+
v{constants_2.LIB_VERSION}
|
|
196
|
+
</react_native_1.Text>
|
|
197
|
+
</react_native_1.View>)}
|
|
198
|
+
</react_native_1.View>
|
|
199
|
+
<react_native_1.Text style={{
|
|
200
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
201
|
+
fontSize: 10.5,
|
|
202
|
+
color: `${AppColors_1.AppColors.white}CC`,
|
|
203
|
+
}} numberOfLines={1}>
|
|
204
|
+
{settingsPage === 'main'
|
|
205
|
+
? 'Manage modules and preferences'
|
|
206
|
+
: 'Configure module parameters'}
|
|
207
|
+
</react_native_1.Text>
|
|
208
|
+
</react_native_1.View>) : !isAnySelected ? (<react_native_1.View style={{
|
|
143
209
|
flexDirection: 'row',
|
|
144
210
|
alignItems: 'center',
|
|
145
211
|
gap: 8,
|
|
@@ -147,7 +213,7 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
147
213
|
minWidth: 0,
|
|
148
214
|
marginRight: 6,
|
|
149
215
|
}}>
|
|
150
|
-
<AppHeaderLogo_1.default size={
|
|
216
|
+
<AppHeaderLogo_1.default size={30} customIcon={appIcon}/>
|
|
151
217
|
<react_native_1.View style={{ gap: 2.5, flex: 1, minWidth: 0 }}>
|
|
152
218
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, minWidth: 0 }}>
|
|
153
219
|
<react_native_1.Text style={[styles_1.default.headerTitle, { flexShrink: 1 }]} numberOfLines={1} ellipsizeMode="tail">
|
|
@@ -227,22 +293,26 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
227
293
|
</react_native_1.View>
|
|
228
294
|
|
|
229
295
|
<react_native_1.Pressable onPress={() => react_native_1.Linking.openURL('https://www.npmjs.com/package/react-native-inapp-inspector').catch(() => { })} style={{
|
|
230
|
-
backgroundColor: '#
|
|
231
|
-
borderRadius:
|
|
232
|
-
paddingHorizontal:
|
|
233
|
-
paddingVertical:
|
|
234
|
-
borderWidth: 1,
|
|
235
|
-
borderColor: '#CB383780',
|
|
296
|
+
backgroundColor: '#FFFFFF',
|
|
297
|
+
borderRadius: 5,
|
|
298
|
+
paddingHorizontal: 6,
|
|
299
|
+
paddingVertical: 2,
|
|
236
300
|
flexDirection: 'row',
|
|
237
301
|
alignItems: 'center',
|
|
238
|
-
gap:
|
|
302
|
+
gap: 4,
|
|
239
303
|
flexShrink: 0,
|
|
304
|
+
shadowColor: '#000000',
|
|
305
|
+
shadowOffset: { width: 0, height: 1 },
|
|
306
|
+
shadowOpacity: 0.15,
|
|
307
|
+
shadowRadius: 2,
|
|
308
|
+
elevation: 2,
|
|
240
309
|
}}>
|
|
241
|
-
<NetworkIcons_1.NpmIcon size={11} color="#
|
|
310
|
+
<NetworkIcons_1.NpmIcon size={11} color="#CB3837"/>
|
|
242
311
|
<react_native_1.Text style={{
|
|
243
312
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
244
|
-
fontSize: 9,
|
|
245
|
-
color: '#
|
|
313
|
+
fontSize: 9.5,
|
|
314
|
+
color: '#CB3837',
|
|
315
|
+
letterSpacing: 0.2,
|
|
246
316
|
}} numberOfLines={1}>
|
|
247
317
|
v{constants_2.LIB_VERSION}
|
|
248
318
|
</react_native_1.Text>
|
|
@@ -532,6 +602,19 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
532
602
|
gap: 8,
|
|
533
603
|
},
|
|
534
604
|
]}>
|
|
605
|
+
{isSettingsView && (<TouchableScale_1.default onPress={() => {
|
|
606
|
+
react_native_1.Alert.alert('Reset All Settings', 'This restores all module visibility and UI preferences to defaults. Continue?', [
|
|
607
|
+
{ text: 'Cancel', style: 'cancel' },
|
|
608
|
+
{
|
|
609
|
+
text: 'Reset',
|
|
610
|
+
style: 'destructive',
|
|
611
|
+
onPress: resetToDefaults,
|
|
612
|
+
},
|
|
613
|
+
]);
|
|
614
|
+
}} hitSlop={15} style={styles_1.default.closeButtonSquare}>
|
|
615
|
+
<NetworkIcons_1.ResetIcon color={AppColors_1.AppColors.white} size={14}/>
|
|
616
|
+
</TouchableScale_1.default>)}
|
|
617
|
+
|
|
535
618
|
{!isAnySelected && (<TouchableScale_1.default onPress={() => {
|
|
536
619
|
react_native_1.Alert.alert('Clear Everything', 'This clears all tabs — APIs, Logs, Analytics, Redux timeline and Crash history. Continue?', [
|
|
537
620
|
{ text: 'Cancel', style: 'cancel' },
|
|
@@ -558,16 +641,16 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
558
641
|
},
|
|
559
642
|
],
|
|
560
643
|
}}>
|
|
561
|
-
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.white} size={
|
|
644
|
+
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.white} size={14}/>
|
|
562
645
|
</react_native_1.Animated.View>
|
|
563
646
|
</TouchableScale_1.default>)}
|
|
564
647
|
|
|
565
648
|
{!isAnySelected && (<TouchableScale_1.default onPress={() => setSettingsPage('main')} hitSlop={15} style={styles_1.default.closeButtonSquare}>
|
|
566
|
-
<NetworkIcons_1.SettingsIcon color={AppColors_1.AppColors.white} size={
|
|
649
|
+
<NetworkIcons_1.SettingsIcon color={AppColors_1.AppColors.white} size={14}/>
|
|
567
650
|
</TouchableScale_1.default>)}
|
|
568
651
|
|
|
569
652
|
<TouchableScale_1.default onPress={closeModal} hitSlop={15} style={styles_1.default.closeButtonSquare}>
|
|
570
|
-
<NetworkIcons_1.CloseWhite size={
|
|
653
|
+
<NetworkIcons_1.CloseWhite size={14}/>
|
|
571
654
|
</TouchableScale_1.default>
|
|
572
655
|
</react_native_1.View>
|
|
573
656
|
</react_native_1.View>
|