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
|
@@ -13,7 +13,7 @@ import { AppColors } from '../../styles/AppColors';
|
|
|
13
13
|
import { AppFonts } from '../../styles/AppFonts';
|
|
14
14
|
import { METHOD_COLORS } from '../../constants';
|
|
15
15
|
import { useTranslation } from '../../i18n';
|
|
16
|
-
import { SearchIcon, ClearIcon, TrashIcon, SortArrowIcon, FilterIcon,
|
|
16
|
+
import { SearchIcon, ClearIcon, TrashIcon, SortArrowIcon, FilterIcon, CircleCheckIcon, CircleXIcon, LayersIcon, HeaderPauseIcon, ClockIcon, RequestIcon, ResponseIcon, AtomIcon, } from '../NetworkIcons';
|
|
17
17
|
const NetworkTab = React.memo(() => {
|
|
18
18
|
const { groupedData, search, setSearch, searchScope, setSearchScope, isRegexSearch, setIsRegexSearch, isCaseSensitive, setIsCaseSensitive, quickFilter, setQuickFilter, handleDelete, selectedLogs, sortOrder, setSortOrder, statusFilters, setStatusFilters, methodFilters, setMethodFilters, availableMethods, filteredLogs, logs, toggleSectionFilter, toggleSectionCollapse, minStart, totalRange, newLogIds, toggleSelect, setSelected, isNetworkPaused, setIsNetworkPaused, } = useInspector();
|
|
19
19
|
const { t } = useTranslation();
|
|
@@ -135,85 +135,6 @@ const NetworkTab = React.memo(() => {
|
|
|
135
135
|
color: '#E10098',
|
|
136
136
|
},
|
|
137
137
|
], [quickCounts]);
|
|
138
|
-
const SEARCH_SCOPES = [
|
|
139
|
-
{
|
|
140
|
-
id: 'all',
|
|
141
|
-
label: 'All',
|
|
142
|
-
icon: color => <LayersIcon size={9.5} color={color}/>,
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
id: 'url',
|
|
146
|
-
label: 'URL / Path',
|
|
147
|
-
icon: color => <GlobeIcon size={9.5} color={color}/>,
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
id: 'reqBody',
|
|
151
|
-
label: 'Payload',
|
|
152
|
-
icon: color => <RequestIcon size={9.5} color={color}/>,
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
id: 'resBody',
|
|
156
|
-
label: 'Response',
|
|
157
|
-
icon: color => <ResponseIcon size={9.5} color={color}/>,
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
id: 'headers',
|
|
161
|
-
label: 'Headers',
|
|
162
|
-
icon: color => <HeadersIcon size={9.5} color={color}/>,
|
|
163
|
-
},
|
|
164
|
-
];
|
|
165
|
-
const QUICK_API_QUERY_TAGS = useMemo(() => [
|
|
166
|
-
{
|
|
167
|
-
label: 'Failed',
|
|
168
|
-
query: 'is:error',
|
|
169
|
-
icon: (color) => <CircleXIcon size={9.5} color={color}/>,
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
label: 'Slow (>1s)',
|
|
173
|
-
query: 'slow:>1s',
|
|
174
|
-
icon: (color) => <ClockIcon size={9.5} color={color}/>,
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
label: 'POST',
|
|
178
|
-
query: 'm:POST',
|
|
179
|
-
icon: (color) => <RequestIcon size={9.5} color={color}/>,
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
label: 'GET',
|
|
183
|
-
query: 'm:GET',
|
|
184
|
-
icon: (color) => <ResponseIcon size={9.5} color={color}/>,
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
label: 'GraphQL',
|
|
188
|
-
query: 'is:graphql',
|
|
189
|
-
icon: (color) => <AtomIcon size={9.5} color={color}/>,
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
label: 'Axios',
|
|
193
|
-
query: 'client:axios',
|
|
194
|
-
icon: (color) => <BoltIcon size={9.5} color={color}/>,
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
label: '200 OK',
|
|
198
|
-
query: 'status:200',
|
|
199
|
-
icon: (color) => <CircleCheckIcon size={9.5} color={color}/>,
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
label: '404',
|
|
203
|
-
query: 'status:404',
|
|
204
|
-
icon: (color) => <CircleAlertIcon size={9.5} color={color}/>,
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
label: '500',
|
|
208
|
-
query: 'status:500',
|
|
209
|
-
icon: (color) => <CircleXIcon size={9.5} color={color}/>,
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
label: 'HTTPS',
|
|
213
|
-
query: 'is:https',
|
|
214
|
-
icon: (color) => <ShieldAlertIcon size={9.5} color={color}/>,
|
|
215
|
-
},
|
|
216
|
-
], []);
|
|
217
138
|
const networkMetrics = useMemo(() => {
|
|
218
139
|
if (!logs || logs.length === 0)
|
|
219
140
|
return null;
|
|
@@ -359,61 +280,7 @@ const NetworkTab = React.memo(() => {
|
|
|
359
280
|
<SearchIcon color={isSearchFocused
|
|
360
281
|
? AppColors.purple
|
|
361
282
|
: AppColors.grayTextWeak} size={15}/>
|
|
362
|
-
<TextInput placeholder="Search
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
<View style={{
|
|
366
|
-
flexDirection: 'row',
|
|
367
|
-
alignItems: 'center',
|
|
368
|
-
gap: 3,
|
|
369
|
-
marginRight: 2,
|
|
370
|
-
}}>
|
|
371
|
-
<Pressable hitSlop={8} onPress={() => setIsCaseSensitive(prev => !prev)} style={{
|
|
372
|
-
paddingHorizontal: 4.5,
|
|
373
|
-
paddingVertical: 2,
|
|
374
|
-
borderRadius: 4,
|
|
375
|
-
backgroundColor: isCaseSensitive
|
|
376
|
-
? AppColors.purple
|
|
377
|
-
: 'transparent',
|
|
378
|
-
borderWidth: 1,
|
|
379
|
-
borderColor: isCaseSensitive
|
|
380
|
-
? AppColors.purple
|
|
381
|
-
: `${AppColors.grayBorderSecondary}`,
|
|
382
|
-
}}>
|
|
383
|
-
<Text style={{
|
|
384
|
-
fontFamily: AppFonts.interBold,
|
|
385
|
-
fontSize: 9.5,
|
|
386
|
-
color: isCaseSensitive
|
|
387
|
-
? AppColors.white
|
|
388
|
-
: AppColors.grayTextWeak,
|
|
389
|
-
}}>
|
|
390
|
-
Aa
|
|
391
|
-
</Text>
|
|
392
|
-
</Pressable>
|
|
393
|
-
|
|
394
|
-
<Pressable hitSlop={8} onPress={() => setIsRegexSearch(prev => !prev)} style={{
|
|
395
|
-
paddingHorizontal: 4.5,
|
|
396
|
-
paddingVertical: 2,
|
|
397
|
-
borderRadius: 4,
|
|
398
|
-
backgroundColor: isRegexSearch
|
|
399
|
-
? AppColors.purple
|
|
400
|
-
: 'transparent',
|
|
401
|
-
borderWidth: 1,
|
|
402
|
-
borderColor: isRegexSearch
|
|
403
|
-
? AppColors.purple
|
|
404
|
-
: `${AppColors.grayBorderSecondary}`,
|
|
405
|
-
}}>
|
|
406
|
-
<Text style={{
|
|
407
|
-
fontFamily: AppFonts.interBold,
|
|
408
|
-
fontSize: 9.5,
|
|
409
|
-
color: isRegexSearch
|
|
410
|
-
? AppColors.white
|
|
411
|
-
: AppColors.grayTextWeak,
|
|
412
|
-
}}>
|
|
413
|
-
.*
|
|
414
|
-
</Text>
|
|
415
|
-
</Pressable>
|
|
416
|
-
</View>
|
|
283
|
+
<TextInput placeholder="Search URL, status, method, headers, body..." placeholderTextColor={AppColors.grayTextWeak} value={search} onChangeText={setSearch} onFocus={() => setIsSearchFocused(true)} onBlur={() => setIsSearchFocused(false)} style={styles.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
417
284
|
|
|
418
285
|
{search.length > 0 && (<View style={{
|
|
419
286
|
flexDirection: 'row',
|
|
@@ -489,100 +356,18 @@ const NetworkTab = React.memo(() => {
|
|
|
489
356
|
</View>
|
|
490
357
|
|
|
491
358
|
|
|
492
|
-
<View style={{
|
|
493
|
-
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
494
|
-
paddingHorizontal: 12,
|
|
359
|
+
<View style={{
|
|
495
360
|
flexDirection: 'row',
|
|
496
361
|
alignItems: 'center',
|
|
497
|
-
|
|
498
|
-
paddingVertical: 2,
|
|
499
|
-
}}>
|
|
500
|
-
|
|
501
|
-
{SEARCH_SCOPES.map(s => {
|
|
502
|
-
const isActive = searchScope === s.id;
|
|
503
|
-
return (<TouchableScale key={`scope_${s.id}`} onPress={() => setSearchScope(s.id)} hitSlop={6} style={{
|
|
504
|
-
flexDirection: 'row',
|
|
505
|
-
alignItems: 'center',
|
|
506
|
-
gap: 3.5,
|
|
507
|
-
paddingHorizontal: 7.5,
|
|
508
|
-
paddingVertical: 3.5,
|
|
509
|
-
borderRadius: 6,
|
|
510
|
-
backgroundColor: isActive
|
|
511
|
-
? AppColors.purple
|
|
512
|
-
: AppColors.grayBackground,
|
|
513
|
-
borderWidth: 1,
|
|
514
|
-
borderColor: isActive
|
|
515
|
-
? AppColors.purple
|
|
516
|
-
: AppColors.grayBorderSecondary,
|
|
517
|
-
}}>
|
|
518
|
-
{s.icon(isActive ? AppColors.white : AppColors.grayTextWeak)}
|
|
519
|
-
<Text style={{
|
|
520
|
-
fontFamily: AppFonts.interBold,
|
|
521
|
-
fontSize: 10,
|
|
522
|
-
color: isActive ? AppColors.white : AppColors.grayText,
|
|
523
|
-
}}>
|
|
524
|
-
{s.label}
|
|
525
|
-
</Text>
|
|
526
|
-
</TouchableScale>);
|
|
527
|
-
})}
|
|
528
|
-
|
|
529
|
-
<View style={{
|
|
530
|
-
width: 1,
|
|
531
|
-
height: 14,
|
|
532
|
-
backgroundColor: AppColors.dividerColor,
|
|
533
|
-
marginHorizontal: 3,
|
|
534
|
-
}}/>
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
{QUICK_API_QUERY_TAGS.map(q => {
|
|
538
|
-
const isActive = search.includes(q.query);
|
|
539
|
-
return (<TouchableScale key={`quick_${q.query}`} onPress={() => {
|
|
540
|
-
setSearch(prev => {
|
|
541
|
-
if (prev.includes(q.query)) {
|
|
542
|
-
return prev
|
|
543
|
-
.replace(q.query, '')
|
|
544
|
-
.replace(/\s+/g, ' ')
|
|
545
|
-
.trim();
|
|
546
|
-
}
|
|
547
|
-
return `${prev} ${q.query}`.trim();
|
|
548
|
-
});
|
|
549
|
-
}} hitSlop={6} style={{
|
|
550
|
-
flexDirection: 'row',
|
|
551
|
-
alignItems: 'center',
|
|
552
|
-
gap: 3.5,
|
|
553
|
-
paddingHorizontal: 7.5,
|
|
554
|
-
paddingVertical: 3.5,
|
|
555
|
-
borderRadius: 6,
|
|
556
|
-
backgroundColor: isActive
|
|
557
|
-
? `${AppColors.purple}20`
|
|
558
|
-
: AppColors.grayBackground,
|
|
559
|
-
borderWidth: 1,
|
|
560
|
-
borderColor: isActive
|
|
561
|
-
? AppColors.purple
|
|
562
|
-
: AppColors.grayBorderSecondary,
|
|
563
|
-
}}>
|
|
564
|
-
{q.icon(isActive ? AppColors.purple : AppColors.grayTextWeak)}
|
|
565
|
-
<Text style={{
|
|
566
|
-
fontFamily: AppFonts.interMedium,
|
|
567
|
-
fontSize: 10,
|
|
568
|
-
color: isActive
|
|
569
|
-
? AppColors.purple
|
|
570
|
-
: AppColors.grayText,
|
|
571
|
-
}}>
|
|
572
|
-
{q.label}
|
|
573
|
-
</Text>
|
|
574
|
-
</TouchableScale>);
|
|
575
|
-
})}
|
|
576
|
-
</ScrollView>
|
|
577
|
-
</View>
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
<View style={{ marginBottom: 8 }}>
|
|
581
|
-
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
362
|
+
marginBottom: 8,
|
|
582
363
|
paddingHorizontal: 12,
|
|
364
|
+
gap: 6,
|
|
365
|
+
}}>
|
|
366
|
+
<ScrollView horizontal showsHorizontalScrollIndicator={false} style={{ flex: 1 }} contentContainerStyle={{
|
|
583
367
|
flexDirection: 'row',
|
|
584
368
|
alignItems: 'center',
|
|
585
369
|
gap: 6,
|
|
370
|
+
paddingRight: 6,
|
|
586
371
|
}}>
|
|
587
372
|
{QUICK_CHIPS.map(chip => {
|
|
588
373
|
const isActive = quickFilter === chip.id;
|
|
@@ -641,9 +426,10 @@ const NetworkTab = React.memo(() => {
|
|
|
641
426
|
</View>
|
|
642
427
|
</TouchableScale>);
|
|
643
428
|
})}
|
|
429
|
+
</ScrollView>
|
|
644
430
|
|
|
645
|
-
|
|
646
|
-
|
|
431
|
+
<TouchableScale onPress={() => setIsFilterModalOpen(true)} style={{ flexShrink: 0 }}>
|
|
432
|
+
<View style={{
|
|
647
433
|
flexDirection: 'row',
|
|
648
434
|
alignItems: 'center',
|
|
649
435
|
paddingHorizontal: 10,
|
|
@@ -657,143 +443,43 @@ const NetworkTab = React.memo(() => {
|
|
|
657
443
|
? AppColors.purple
|
|
658
444
|
: AppColors.grayBorderSecondary,
|
|
659
445
|
gap: 5,
|
|
446
|
+
shadowColor: AppColors.black,
|
|
447
|
+
shadowOpacity: 0.04,
|
|
448
|
+
shadowRadius: 2,
|
|
449
|
+
shadowOffset: { width: 0, height: 1 },
|
|
450
|
+
elevation: 1,
|
|
660
451
|
}}>
|
|
661
|
-
|
|
452
|
+
<FilterIcon size={11} color={statusFilters.size > 0 || methodFilters.size > 0
|
|
662
453
|
? AppColors.purple
|
|
663
454
|
: AppColors.grayText}/>
|
|
664
|
-
|
|
455
|
+
<Text style={{
|
|
665
456
|
fontFamily: AppFonts.interBold,
|
|
666
457
|
fontSize: 10.5,
|
|
667
458
|
color: statusFilters.size > 0 || methodFilters.size > 0
|
|
668
459
|
? AppColors.purple
|
|
669
460
|
: AppColors.grayText,
|
|
670
461
|
}}>
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
462
|
+
More Filters
|
|
463
|
+
</Text>
|
|
464
|
+
{(statusFilters.size > 0 || methodFilters.size > 0) && (<View style={{
|
|
674
465
|
backgroundColor: AppColors.purple,
|
|
675
466
|
paddingHorizontal: 4.5,
|
|
676
467
|
paddingVertical: 1,
|
|
677
468
|
borderRadius: 6,
|
|
678
469
|
}}>
|
|
679
|
-
|
|
470
|
+
<Text style={{
|
|
680
471
|
fontFamily: AppFonts.interBold,
|
|
681
472
|
fontSize: 8.5,
|
|
682
473
|
color: AppColors.white,
|
|
683
474
|
}}>
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
</ScrollView>
|
|
475
|
+
{statusFilters.size + methodFilters.size}
|
|
476
|
+
</Text>
|
|
477
|
+
</View>)}
|
|
478
|
+
</View>
|
|
479
|
+
</TouchableScale>
|
|
690
480
|
</View>
|
|
691
481
|
|
|
692
482
|
|
|
693
|
-
{(isSearchFocused || search.length > 0) && (<View style={{
|
|
694
|
-
flexDirection: 'row',
|
|
695
|
-
alignItems: 'center',
|
|
696
|
-
paddingHorizontal: 12,
|
|
697
|
-
marginBottom: 6,
|
|
698
|
-
gap: 6,
|
|
699
|
-
}}>
|
|
700
|
-
<Text style={{
|
|
701
|
-
fontFamily: AppFonts.interBold,
|
|
702
|
-
fontSize: 9.5,
|
|
703
|
-
color: AppColors.grayTextWeak,
|
|
704
|
-
textTransform: 'uppercase',
|
|
705
|
-
letterSpacing: 0.5,
|
|
706
|
-
}}>
|
|
707
|
-
Scope:
|
|
708
|
-
</Text>
|
|
709
|
-
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
710
|
-
flexDirection: 'row',
|
|
711
|
-
alignItems: 'center',
|
|
712
|
-
gap: 5,
|
|
713
|
-
}}>
|
|
714
|
-
{SEARCH_SCOPES.map(s => {
|
|
715
|
-
const isSelected = searchScope === s.id;
|
|
716
|
-
const iconColor = isSelected ? AppColors.white : AppColors.grayText;
|
|
717
|
-
return (<TouchableScale key={s.id} onPress={() => setSearchScope(s.id)}>
|
|
718
|
-
<View style={{
|
|
719
|
-
flexDirection: 'row',
|
|
720
|
-
alignItems: 'center',
|
|
721
|
-
gap: 4,
|
|
722
|
-
paddingHorizontal: 7,
|
|
723
|
-
paddingVertical: 2.5,
|
|
724
|
-
borderRadius: 5,
|
|
725
|
-
backgroundColor: isSelected
|
|
726
|
-
? AppColors.purple
|
|
727
|
-
: `${AppColors.grayBorderSecondary}40`,
|
|
728
|
-
borderWidth: 1,
|
|
729
|
-
borderColor: isSelected
|
|
730
|
-
? AppColors.purple
|
|
731
|
-
: AppColors.grayBorderSecondary,
|
|
732
|
-
}}>
|
|
733
|
-
{s.icon(iconColor)}
|
|
734
|
-
<Text style={{
|
|
735
|
-
fontFamily: AppFonts.interBold,
|
|
736
|
-
fontSize: 9.5,
|
|
737
|
-
color: isSelected
|
|
738
|
-
? AppColors.white
|
|
739
|
-
: AppColors.grayText,
|
|
740
|
-
}}>
|
|
741
|
-
{s.label}
|
|
742
|
-
</Text>
|
|
743
|
-
</View>
|
|
744
|
-
</TouchableScale>);
|
|
745
|
-
})}
|
|
746
|
-
</ScrollView>
|
|
747
|
-
</View>)}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
{(isSearchFocused || search.length > 0) && (<ScrollView horizontal showsHorizontalScrollIndicator={false} style={{ marginBottom: 8, maxHeight: 28 }} contentContainerStyle={{
|
|
751
|
-
paddingHorizontal: 12,
|
|
752
|
-
flexDirection: 'row',
|
|
753
|
-
alignItems: 'center',
|
|
754
|
-
gap: 5,
|
|
755
|
-
}}>
|
|
756
|
-
{QUICK_API_QUERY_TAGS.map(item => {
|
|
757
|
-
const isSelected = search.includes(item.query);
|
|
758
|
-
return (<TouchableScale key={item.query} onPress={() => {
|
|
759
|
-
if (isSelected) {
|
|
760
|
-
setSearch(prev => prev.replace(item.query, '').trim());
|
|
761
|
-
}
|
|
762
|
-
else {
|
|
763
|
-
setSearch(prev => prev ? `${prev} ${item.query}`.trim() : item.query);
|
|
764
|
-
}
|
|
765
|
-
}}>
|
|
766
|
-
<View style={{
|
|
767
|
-
flexDirection: 'row',
|
|
768
|
-
alignItems: 'center',
|
|
769
|
-
gap: 4,
|
|
770
|
-
paddingHorizontal: 7,
|
|
771
|
-
paddingVertical: 2.5,
|
|
772
|
-
borderRadius: 5,
|
|
773
|
-
backgroundColor: isSelected
|
|
774
|
-
? AppColors.purple
|
|
775
|
-
: `${AppColors.purple}14`,
|
|
776
|
-
borderWidth: 1,
|
|
777
|
-
borderColor: isSelected
|
|
778
|
-
? AppColors.purple
|
|
779
|
-
: `${AppColors.purple}30`,
|
|
780
|
-
}}>
|
|
781
|
-
{item.icon(isSelected ? AppColors.white : AppColors.purple)}
|
|
782
|
-
<Text style={{
|
|
783
|
-
fontFamily: AppFonts.interBold,
|
|
784
|
-
fontSize: 9.5,
|
|
785
|
-
color: isSelected
|
|
786
|
-
? AppColors.white
|
|
787
|
-
: AppColors.purple,
|
|
788
|
-
}}>
|
|
789
|
-
{item.label}
|
|
790
|
-
</Text>
|
|
791
|
-
</View>
|
|
792
|
-
</TouchableScale>);
|
|
793
|
-
})}
|
|
794
|
-
</ScrollView>)}
|
|
795
|
-
|
|
796
|
-
|
|
797
483
|
{(quickFilter !== 'all' ||
|
|
798
484
|
search.trim().length > 0 ||
|
|
799
485
|
statusFilters.size > 0 ||
|
|
@@ -833,15 +519,6 @@ const NetworkTab = React.memo(() => {
|
|
|
833
519
|
</Text>
|
|
834
520
|
</TouchableScale>
|
|
835
521
|
</View>)}
|
|
836
|
-
|
|
837
|
-
{(search ||
|
|
838
|
-
statusFilters.size > 0 ||
|
|
839
|
-
methodFilters.size > 0 ||
|
|
840
|
-
quickFilter !== 'all') && (<Text style={styles.resultCount}>
|
|
841
|
-
{filteredLogs.length === logs.length
|
|
842
|
-
? `${logs.length} requests`
|
|
843
|
-
: `${filteredLogs.length} of ${logs.length} filtered requests`}
|
|
844
|
-
</Text>)}
|
|
845
522
|
</View>} ListEmptyComponent={<EmptyState isSearch={search.length > 0 ||
|
|
846
523
|
statusFilters.size > 0 ||
|
|
847
524
|
methodFilters.size > 0 ||
|
|
@@ -857,28 +534,6 @@ const NetworkTab = React.memo(() => {
|
|
|
857
534
|
styles.listContent,
|
|
858
535
|
filteredLogs.length === 0 && { flexGrow: 1 },
|
|
859
536
|
]} keyboardShouldPersistTaps="handled"/>
|
|
860
|
-
|
|
861
|
-
<TouchableScale onPress={() => {
|
|
862
|
-
try {
|
|
863
|
-
apisListRef.current?.scrollToOffset({
|
|
864
|
-
offset: 0,
|
|
865
|
-
animated: true,
|
|
866
|
-
});
|
|
867
|
-
}
|
|
868
|
-
catch {
|
|
869
|
-
try {
|
|
870
|
-
apisListRef.current?.scrollToIndex({
|
|
871
|
-
index: 0,
|
|
872
|
-
animated: true,
|
|
873
|
-
});
|
|
874
|
-
}
|
|
875
|
-
catch { }
|
|
876
|
-
}
|
|
877
|
-
}} hitSlop={12} style={styles.scrollTopBtn}>
|
|
878
|
-
<View style={{ transform: [{ rotate: '180deg' }] }}>
|
|
879
|
-
<ChevronIcon color={AppColors.white} size={18}/>
|
|
880
|
-
</View>
|
|
881
|
-
</TouchableScale>
|
|
882
537
|
|
|
883
538
|
|
|
884
539
|
<NetworkFilterModal visible={isFilterModalOpen} onClose={() => setIsFilterModalOpen(false)} filters={modalFilterState} onApply={handleApplyNetworkFilters} searchQuery={search}/>
|