react-native-inapp-inspector 2.3.18 → 2.3.20
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 +57 -0
- package/dist/commonjs/analytics.js +1 -24
- package/dist/commonjs/bundle.js +1 -16
- package/dist/commonjs/capture.d.ts +2 -0
- package/dist/commonjs/capture.js +1 -32
- package/dist/commonjs/components/AnalyticsDetail.js +92 -623
- package/dist/commonjs/components/AnalyticsEventCard.js +54 -350
- package/dist/commonjs/components/AnalyticsGraph.js +70 -370
- package/dist/commonjs/components/AnimatedEntrance.js +1 -11
- package/dist/commonjs/components/AppHeaderLogo.js +7 -134
- package/dist/commonjs/components/BrandCircleIcon.js +73 -118
- package/dist/commonjs/components/BrandSquareIcon.js +63 -108
- package/dist/commonjs/components/CodeSnippet.js +48 -623
- package/dist/commonjs/components/ConsoleLogCard.js +63 -537
- package/dist/commonjs/components/CopyButton.js +3 -89
- package/dist/commonjs/components/DiffViewer.js +19 -83
- package/dist/commonjs/components/DomainHeader.js +27 -127
- package/dist/commonjs/components/EmptyState.d.ts +1 -0
- package/dist/commonjs/components/EmptyState.js +10 -87
- package/dist/commonjs/components/EndOfListFooter.js +7 -81
- package/dist/commonjs/components/ErrorBoundary.js +72 -566
- package/dist/commonjs/components/HeadersSection.js +31 -110
- package/dist/commonjs/components/HighlightText.js +17 -58
- package/dist/commonjs/components/Inspector/AboutModal.d.ts +6 -0
- package/dist/commonjs/components/Inspector/AboutModal.js +351 -0
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +98 -797
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +284 -930
- package/dist/commonjs/components/Inspector/BundleTab.js +551 -2918
- package/dist/commonjs/components/Inspector/ConsoleTab.js +79 -492
- package/dist/commonjs/components/Inspector/CrashDetail.js +123 -672
- package/dist/commonjs/components/Inspector/CrashFilterModal.js +66 -498
- package/dist/commonjs/components/Inspector/CrashTab.js +98 -670
- package/dist/commonjs/components/Inspector/DebuggingTab.js +64 -871
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +143 -907
- package/dist/commonjs/components/Inspector/FabLauncher.js +85 -54
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +6 -99
- package/dist/commonjs/components/Inspector/FeedbackModal.d.ts +9 -0
- package/dist/commonjs/components/Inspector/FeedbackModal.js +167 -521
- package/dist/commonjs/components/Inspector/InspectorContext.js +1 -21
- package/dist/commonjs/components/Inspector/InspectorHeader.js +219 -1093
- package/dist/commonjs/components/Inspector/LogDetail.js +168 -994
- package/dist/commonjs/components/Inspector/MainScreen.js +60 -332
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +136 -278
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +134 -361
- package/dist/commonjs/components/Inspector/NavigationTracker.js +1 -12
- package/dist/commonjs/components/Inspector/NetworkDetail.js +96 -432
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +60 -576
- package/dist/commonjs/components/Inspector/NetworkTab.js +84 -514
- package/dist/commonjs/components/Inspector/NpmStarPrompt.js +17 -433
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +25 -298
- package/dist/commonjs/components/Inspector/PerformanceTab.js +182 -1397
- package/dist/commonjs/components/Inspector/ReduxDetail.js +188 -1089
- package/dist/commonjs/components/Inspector/ReduxTab.js +85 -701
- package/dist/commonjs/components/Inspector/SettingsPanel.js +431 -3431
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +11 -180
- package/dist/commonjs/components/Inspector/StorageTab.js +93 -826
- package/dist/commonjs/components/Inspector/TabBar.js +47 -183
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +34 -408
- package/dist/commonjs/components/JsonViewer.js +168 -380
- package/dist/commonjs/components/LogCard.js +57 -567
- package/dist/commonjs/components/LogSyntaxHighlighter.js +11 -130
- package/dist/commonjs/components/MetaAccordion.js +69 -238
- package/dist/commonjs/components/MiniBarChart.js +3 -56
- package/dist/commonjs/components/MiniLineChart.js +3 -58
- package/dist/commonjs/components/NetworkIcons.d.ts +7 -0
- package/dist/commonjs/components/NetworkIcons.js +479 -997
- package/dist/commonjs/components/QRCodeView.js +5 -79
- package/dist/commonjs/components/SectionHeader.js +15 -37
- package/dist/commonjs/components/SegmentedTabs.js +7 -61
- package/dist/commonjs/components/SkeletonPlaceholder.js +11 -180
- package/dist/commonjs/components/Slider.js +15 -243
- package/dist/commonjs/components/SourcePageCard.js +30 -89
- package/dist/commonjs/components/Toast.js +5 -147
- package/dist/commonjs/components/TouchableScale.js +3 -24
- package/dist/commonjs/components/TreeNode.js +55 -130
- package/dist/commonjs/console.js +1 -16
- package/dist/commonjs/constants/index.js +1 -32
- package/dist/commonjs/constants/telemetryConfig.js +1 -6
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -4
- package/dist/commonjs/crash.js +1 -23
- package/dist/commonjs/customHooks/analyticsLogger.js +1 -250
- package/dist/commonjs/customHooks/bundleAnalyzer.js +1 -957
- package/dist/commonjs/customHooks/consoleLogger.js +6 -445
- package/dist/commonjs/customHooks/crashHandler.js +7 -656
- package/dist/commonjs/customHooks/logFilters.js +1 -23
- package/dist/commonjs/customHooks/networkLogger.js +2 -536
- package/dist/commonjs/customHooks/performanceTracker.js +63 -750
- package/dist/commonjs/customHooks/reduxLogger.js +2 -313
- package/dist/commonjs/customHooks/storageInspector.js +1 -435
- package/dist/commonjs/customHooks/useAccordion.js +1 -18
- package/dist/commonjs/decorators/index.js +1 -100
- package/dist/commonjs/helpers/gaAnalyticsRegistry.js +1 -148
- package/dist/commonjs/helpers/index.js +8 -921
- package/dist/commonjs/helpers/memoryManager.js +1 -99
- package/dist/commonjs/helpers/qrGenerator.js +1 -367
- package/dist/commonjs/helpers/remoteConfig.js +1 -165
- package/dist/commonjs/helpers/searchQueryParser.js +1 -62
- package/dist/commonjs/helpers/settingsStore.js +1 -144
- package/dist/commonjs/helpers/telemetry.js +1 -501
- package/dist/commonjs/helpers/toast.js +1 -20
- package/dist/commonjs/i18n/index.js +1 -90
- package/dist/commonjs/i18n/locales/en.json +1 -1122
- package/dist/commonjs/index.js +5 -2153
- package/dist/commonjs/metro.js +6 -468
- package/dist/commonjs/native/NativeInspector.d.ts +3 -0
- package/dist/commonjs/native/NativeInspector.js +1 -402
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +1 -0
- package/dist/commonjs/native/NativeNetworkInspector.js +1 -4
- package/dist/commonjs/network.js +1 -13
- package/dist/commonjs/performance.js +1 -29
- package/dist/commonjs/redux.js +1 -20
- package/dist/commonjs/storage.js +1 -14
- package/dist/commonjs/styles/AppColors.js +1 -423
- package/dist/commonjs/styles/AppFonts.js +1 -17
- package/dist/commonjs/styles/common.js +1 -190
- package/dist/commonjs/styles/index.d.ts +6 -0
- package/dist/commonjs/styles/index.js +1 -1589
- package/dist/commonjs/types/enums.d.ts +2 -1
- package/dist/commonjs/types/enums.js +1 -150
- package/dist/commonjs/types/index.js +1 -18
- package/dist/commonjs/types/interfaces.d.ts +7 -0
- package/dist/commonjs/types/interfaces.js +1 -2
- package/dist/esm/analytics.js +1 -2
- package/dist/esm/bundle.js +1 -2
- package/dist/esm/capture.d.ts +2 -0
- package/dist/esm/capture.js +1 -29
- package/dist/esm/components/AnalyticsDetail.js +171 -664
- package/dist/esm/components/AnalyticsEventCard.js +77 -335
- package/dist/esm/components/AnalyticsGraph.js +95 -357
- package/dist/esm/components/AnimatedEntrance.js +1 -6
- package/dist/esm/components/AppHeaderLogo.js +7 -94
- package/dist/esm/components/BrandCircleIcon.js +114 -119
- package/dist/esm/components/BrandSquareIcon.js +73 -78
- package/dist/esm/components/CodeSnippet.js +58 -595
- package/dist/esm/components/ConsoleLogCard.js +91 -526
- package/dist/esm/components/CopyButton.js +3 -51
- package/dist/esm/components/DiffViewer.js +22 -48
- package/dist/esm/components/DomainHeader.js +43 -138
- package/dist/esm/components/EmptyState.d.ts +1 -0
- package/dist/esm/components/EmptyState.js +17 -56
- package/dist/esm/components/EndOfListFooter.js +15 -83
- package/dist/esm/components/ErrorBoundary.js +125 -582
- package/dist/esm/components/HeadersSection.js +52 -93
- package/dist/esm/components/HighlightText.js +17 -53
- package/dist/esm/components/Inspector/AboutModal.d.ts +6 -0
- package/dist/esm/components/Inspector/AboutModal.js +351 -0
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +225 -886
- package/dist/esm/components/Inspector/AnalyticsTab.js +296 -904
- package/dist/esm/components/Inspector/BundleTab.js +1175 -3502
- package/dist/esm/components/Inspector/ConsoleTab.js +113 -488
- package/dist/esm/components/Inspector/CrashDetail.js +236 -747
- package/dist/esm/components/Inspector/CrashFilterModal.js +149 -541
- package/dist/esm/components/Inspector/CrashTab.js +177 -711
- package/dist/esm/components/Inspector/DebuggingTab.js +156 -923
- package/dist/esm/components/Inspector/DeviceInfoTab.js +199 -924
- package/dist/esm/components/Inspector/FabLauncher.js +85 -49
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +14 -70
- package/dist/esm/components/Inspector/FeedbackModal.d.ts +9 -0
- package/dist/esm/components/Inspector/FeedbackModal.js +182 -499
- package/dist/esm/components/Inspector/InspectorContext.js +1 -12
- package/dist/esm/components/Inspector/InspectorHeader.js +309 -1145
- package/dist/esm/components/Inspector/LogDetail.js +235 -1023
- package/dist/esm/components/Inspector/MainScreen.js +86 -320
- package/dist/esm/components/Inspector/MediaGalleryTab.js +157 -259
- package/dist/esm/components/Inspector/MediaPreviewModal.js +153 -340
- package/dist/esm/components/Inspector/NavigationTracker.js +1 -10
- package/dist/esm/components/Inspector/NetworkDetail.js +141 -472
- package/dist/esm/components/Inspector/NetworkFilterModal.js +122 -597
- package/dist/esm/components/Inspector/NetworkTab.js +125 -517
- package/dist/esm/components/Inspector/NpmStarPrompt.js +58 -434
- package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -281
- package/dist/esm/components/Inspector/PerformanceTab.js +393 -1570
- package/dist/esm/components/Inspector/ReduxDetail.js +307 -1170
- package/dist/esm/components/Inspector/ReduxTab.js +144 -722
- package/dist/esm/components/Inspector/SettingsPanel.js +647 -3609
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +30 -163
- package/dist/esm/components/Inspector/StorageTab.js +172 -866
- package/dist/esm/components/Inspector/TabBar.js +52 -183
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +79 -416
- package/dist/esm/components/JsonViewer.js +179 -353
- package/dist/esm/components/LogCard.js +93 -565
- package/dist/esm/components/LogSyntaxHighlighter.js +11 -123
- package/dist/esm/components/MetaAccordion.js +136 -267
- package/dist/esm/components/MiniBarChart.js +3 -18
- package/dist/esm/components/MiniLineChart.js +3 -20
- package/dist/esm/components/NetworkIcons.d.ts +7 -0
- package/dist/esm/components/NetworkIcons.js +481 -817
- package/dist/esm/components/QRCodeView.js +8 -45
- package/dist/esm/components/SectionHeader.js +22 -39
- package/dist/esm/components/SegmentedTabs.js +8 -57
- package/dist/esm/components/SkeletonPlaceholder.js +30 -163
- package/dist/esm/components/Slider.js +24 -213
- package/dist/esm/components/SourcePageCard.js +65 -86
- package/dist/esm/components/Toast.js +10 -117
- package/dist/esm/components/TouchableScale.js +3 -19
- package/dist/esm/components/TreeNode.js +58 -95
- package/dist/esm/console.js +1 -2
- package/dist/esm/constants/index.js +1 -28
- package/dist/esm/constants/telemetryConfig.js +1 -3
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/crash.js +1 -2
- package/dist/esm/customHooks/analyticsLogger.js +1 -230
- package/dist/esm/customHooks/bundleAnalyzer.js +1 -944
- package/dist/esm/customHooks/consoleLogger.js +6 -432
- package/dist/esm/customHooks/crashHandler.js +7 -630
- package/dist/esm/customHooks/logFilters.js +1 -20
- package/dist/esm/customHooks/networkLogger.js +2 -519
- package/dist/esm/customHooks/performanceTracker.js +63 -723
- package/dist/esm/customHooks/reduxLogger.js +2 -293
- package/dist/esm/customHooks/storageInspector.js +1 -418
- package/dist/esm/customHooks/useAccordion.js +1 -16
- package/dist/esm/decorators/index.js +1 -95
- package/dist/esm/helpers/gaAnalyticsRegistry.js +1 -143
- package/dist/esm/helpers/index.js +8 -861
- package/dist/esm/helpers/memoryManager.js +1 -91
- package/dist/esm/helpers/qrGenerator.js +1 -364
- package/dist/esm/helpers/remoteConfig.js +1 -160
- package/dist/esm/helpers/searchQueryParser.js +1 -59
- package/dist/esm/helpers/settingsStore.js +1 -134
- package/dist/esm/helpers/telemetry.js +1 -489
- package/dist/esm/helpers/toast.js +1 -15
- package/dist/esm/i18n/index.js +1 -78
- package/dist/esm/i18n/locales/en.json +1 -1122
- package/dist/esm/index.js +7 -1967
- package/dist/esm/metro.js +6 -459
- package/dist/esm/native/NativeInspector.d.ts +3 -0
- package/dist/esm/native/NativeInspector.js +1 -370
- package/dist/esm/native/NativeNetworkInspector.d.ts +1 -0
- package/dist/esm/native/NativeNetworkInspector.js +1 -2
- package/dist/esm/network.js +1 -1
- package/dist/esm/performance.js +1 -2
- package/dist/esm/redux.js +1 -1
- package/dist/esm/storage.js +1 -1
- package/dist/esm/styles/AppColors.js +1 -417
- package/dist/esm/styles/AppFonts.js +1 -13
- package/dist/esm/styles/common.js +1 -186
- package/dist/esm/styles/index.d.ts +6 -0
- package/dist/esm/styles/index.js +1 -1551
- package/dist/esm/types/enums.d.ts +2 -1
- package/dist/esm/types/enums.js +1 -147
- package/dist/esm/types/index.js +1 -2
- package/dist/esm/types/interfaces.d.ts +7 -0
- package/dist/esm/types/interfaces.js +1 -1
- package/ios/NetworkInspectorModule.mm +253 -136
- package/package.json +5 -3
- package/react-native-inapp-inspector.podspec +1 -1
- package/src/native/NativeInspector.ts +17 -0
- package/src/native/NativeNetworkInspector.ts +1 -0
- package/src/analytics.ts +0 -35
- package/src/bundle.ts +0 -25
- package/src/capture.ts +0 -101
- package/src/components/AnalyticsDetail.tsx +0 -870
- package/src/components/AnalyticsEventCard.tsx +0 -444
- package/src/components/AnalyticsGraph.tsx +0 -583
- package/src/components/AnimatedEntrance.tsx +0 -20
- package/src/components/AppHeaderLogo.tsx +0 -143
- package/src/components/BrandCircleIcon.tsx +0 -144
- package/src/components/BrandSquareIcon.tsx +0 -184
- package/src/components/CodeSnippet.tsx +0 -725
- package/src/components/ConsoleLogCard.tsx +0 -679
- package/src/components/CopyButton.tsx +0 -87
- package/src/components/DiffViewer.tsx +0 -82
- package/src/components/DomainHeader.tsx +0 -224
- package/src/components/EmptyState.tsx +0 -95
- package/src/components/EndOfListFooter.tsx +0 -100
- package/src/components/ErrorBoundary.tsx +0 -688
- package/src/components/HeadersSection.tsx +0 -172
- package/src/components/HighlightText.tsx +0 -100
- package/src/components/Inspector/AnalyticsFilterModal.tsx +0 -1250
- package/src/components/Inspector/AnalyticsTab.tsx +0 -1362
- package/src/components/Inspector/BundleTab.tsx +0 -4768
- package/src/components/Inspector/ConsoleTab.tsx +0 -726
- package/src/components/Inspector/CrashDetail.tsx +0 -997
- package/src/components/Inspector/CrashFilterModal.tsx +0 -721
- package/src/components/Inspector/CrashTab.tsx +0 -933
- package/src/components/Inspector/DebuggingTab.tsx +0 -1103
- package/src/components/Inspector/DeviceInfoTab.tsx +0 -1397
- package/src/components/Inspector/FabLauncher.tsx +0 -80
- package/src/components/Inspector/FeatureUnderDevNotice.tsx +0 -94
- package/src/components/Inspector/FeedbackModal.tsx +0 -626
- package/src/components/Inspector/InspectorContext.tsx +0 -28
- package/src/components/Inspector/InspectorHeader.tsx +0 -1545
- package/src/components/Inspector/LogDetail.tsx +0 -1431
- package/src/components/Inspector/MainScreen.tsx +0 -459
- package/src/components/Inspector/MediaGalleryTab.tsx +0 -355
- package/src/components/Inspector/MediaPreviewModal.tsx +0 -435
- package/src/components/Inspector/NavigationTracker.tsx +0 -13
- package/src/components/Inspector/NetworkDetail.tsx +0 -795
- package/src/components/Inspector/NetworkFilterModal.tsx +0 -730
- package/src/components/Inspector/NetworkTab.tsx +0 -820
- package/src/components/Inspector/NpmStarPrompt.tsx +0 -532
- package/src/components/Inspector/NpmUpdateToast.tsx +0 -387
- package/src/components/Inspector/PerformanceTab.tsx +0 -1967
- package/src/components/Inspector/ReduxDetail.tsx +0 -1651
- package/src/components/Inspector/ReduxTab.tsx +0 -987
- package/src/components/Inspector/SettingsPanel.tsx +0 -4580
- package/src/components/Inspector/SkeletonPlaceholder.tsx +0 -206
- package/src/components/Inspector/StorageTab.tsx +0 -1159
- package/src/components/Inspector/TabBar.tsx +0 -263
- package/src/components/Inspector/UpdateAvailableModal.tsx +0 -555
- package/src/components/JsonViewer.tsx +0 -547
- package/src/components/LogCard.tsx +0 -694
- package/src/components/LogSyntaxHighlighter.tsx +0 -178
- package/src/components/MetaAccordion.tsx +0 -355
- package/src/components/MiniBarChart.tsx +0 -42
- package/src/components/MiniLineChart.tsx +0 -33
- package/src/components/NetworkIcons.tsx +0 -2599
- package/src/components/QRCodeView.tsx +0 -75
- package/src/components/SectionHeader.tsx +0 -101
- package/src/components/SegmentedTabs.tsx +0 -83
- package/src/components/SkeletonPlaceholder.tsx +0 -206
- package/src/components/Slider.tsx +0 -300
- package/src/components/SourcePageCard.tsx +0 -150
- package/src/components/Toast.tsx +0 -131
- package/src/components/TouchableScale.tsx +0 -61
- package/src/components/TreeNode.tsx +0 -171
- package/src/console.ts +0 -24
- package/src/constants/index.ts +0 -41
- package/src/constants/telemetryConfig.ts +0 -4
- package/src/constants/version.ts +0 -3
- package/src/crash.ts +0 -32
- package/src/customHooks/analyticsLogger.ts +0 -336
- package/src/customHooks/bundleAnalyzer.ts +0 -1256
- package/src/customHooks/consoleLogger.ts +0 -530
- package/src/customHooks/crashHandler.ts +0 -944
- package/src/customHooks/logFilters.ts +0 -32
- package/src/customHooks/networkLogger.ts +0 -624
- package/src/customHooks/performanceTracker.ts +0 -1014
- package/src/customHooks/reduxLogger.ts +0 -406
- package/src/customHooks/storageInspector.ts +0 -513
- package/src/customHooks/useAccordion.tsx +0 -27
- package/src/decorators/index.ts +0 -184
- package/src/helpers/gaAnalyticsRegistry.ts +0 -204
- package/src/helpers/index.ts +0 -1092
- package/src/helpers/memoryManager.ts +0 -138
- package/src/helpers/qrGenerator.ts +0 -430
- package/src/helpers/remoteConfig.ts +0 -212
- package/src/helpers/searchQueryParser.ts +0 -84
- package/src/helpers/settingsStore.ts +0 -171
- package/src/helpers/telemetry.ts +0 -568
- package/src/helpers/toast.ts +0 -17
- package/src/i18n/index.ts +0 -104
- package/src/i18n/locales/en.json +0 -1125
- package/src/index.tsx +0 -2635
- package/src/metro.ts +0 -598
- package/src/network.ts +0 -22
- package/src/performance.ts +0 -38
- package/src/redux.ts +0 -23
- package/src/storage.ts +0 -18
- package/src/styles/AppColors.ts +0 -455
- package/src/styles/AppFonts.ts +0 -26
- package/src/styles/common.ts +0 -209
- package/src/styles/index.ts +0 -1606
- package/src/types/enums.ts +0 -208
- package/src/types/index.ts +0 -34
- package/src/types/interfaces.ts +0 -530
|
@@ -1,543 +1,151 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import { AppFonts } from '../../styles/AppFonts';
|
|
14
|
-
import { METHOD_COLORS } from '../../constants';
|
|
15
|
-
import { useTranslation } from '../../i18n';
|
|
16
|
-
import { SearchIcon, ClearIcon, TrashIcon, SortArrowIcon, FilterIcon, CircleCheckIcon, CircleXIcon, LayersIcon, HeaderPauseIcon, ClockIcon, RequestIcon, ResponseIcon, AtomIcon, } from '../NetworkIcons';
|
|
17
|
-
const NetworkTab = React.memo(() => {
|
|
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
|
-
const { t } = useTranslation();
|
|
20
|
-
const apisListRef = useRef(null);
|
|
21
|
-
const [isFilterModalOpen, setIsFilterModalOpen] = React.useState(false);
|
|
22
|
-
const [isSearchFocused, setIsSearchFocused] = React.useState(false);
|
|
23
|
-
const modalFilterState = useMemo(() => ({
|
|
24
|
-
statusCodes: statusFilters.size > 0 ? new Set(statusFilters) : new Set(['all']),
|
|
25
|
-
methods: methodFilters.size > 0 ? new Set(methodFilters) : new Set(['all']),
|
|
26
|
-
latency: 'all',
|
|
27
|
-
protocol: 'all',
|
|
28
|
-
sortBy: sortOrder === 'newest' ? 'time_desc' : 'time_asc',
|
|
29
|
-
}), [statusFilters, methodFilters, sortOrder]);
|
|
30
|
-
const handleApplyNetworkFilters = useCallback((newFilters) => {
|
|
31
|
-
if (newFilters.statusCodes.has('all') ||
|
|
32
|
-
newFilters.statusCodes.size === 0) {
|
|
33
|
-
setStatusFilters(new Set());
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
setStatusFilters(new Set(newFilters.statusCodes));
|
|
37
|
-
}
|
|
38
|
-
if (newFilters.methods.has('all') || newFilters.methods.size === 0) {
|
|
39
|
-
setMethodFilters(new Set());
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
setMethodFilters(new Set([...newFilters.methods].map(m => m)));
|
|
43
|
-
}
|
|
44
|
-
if (newFilters.sortBy === 'time_asc') {
|
|
45
|
-
setSortOrder('oldest');
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
setSortOrder('newest');
|
|
49
|
-
}
|
|
50
|
-
}, [setStatusFilters, setMethodFilters, setSortOrder]);
|
|
51
|
-
const quickCounts = useMemo(() => {
|
|
52
|
-
let errorCount = 0;
|
|
53
|
-
let successCount = 0;
|
|
54
|
-
let slowCount = 0;
|
|
55
|
-
let postCount = 0;
|
|
56
|
-
let getCount = 0;
|
|
57
|
-
let gqlCount = 0;
|
|
58
|
-
logs.forEach(l => {
|
|
59
|
-
const s = typeof l.status === 'number'
|
|
60
|
-
? l.status
|
|
61
|
-
: parseInt(String(l.status), 10);
|
|
62
|
-
if (l.status === 0 || l.status == null || (!isNaN(s) && s >= 400)) {
|
|
63
|
-
errorCount++;
|
|
64
|
-
}
|
|
65
|
-
else if (!isNaN(s) && s >= 200 && s < 400) {
|
|
66
|
-
successCount++;
|
|
67
|
-
}
|
|
68
|
-
if ((l.duration || 0) >= 500) {
|
|
69
|
-
slowCount++;
|
|
70
|
-
}
|
|
71
|
-
const m = (l.method || '').toUpperCase();
|
|
72
|
-
if (m === 'POST')
|
|
73
|
-
postCount++;
|
|
74
|
-
if (m === 'GET')
|
|
75
|
-
getCount++;
|
|
76
|
-
const u = (l.url || '').toLowerCase();
|
|
77
|
-
const c = (l.client || '').toLowerCase();
|
|
78
|
-
if (u.includes('graphql') ||
|
|
79
|
-
c.includes('graphql') ||
|
|
80
|
-
c.includes('apollo')) {
|
|
81
|
-
gqlCount++;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
return {
|
|
85
|
-
all: logs.length,
|
|
86
|
-
errors: errorCount,
|
|
87
|
-
success: successCount,
|
|
88
|
-
slow: slowCount,
|
|
89
|
-
post: postCount,
|
|
90
|
-
get: getCount,
|
|
91
|
-
graphql: gqlCount,
|
|
92
|
-
};
|
|
93
|
-
}, [logs]);
|
|
94
|
-
const QUICK_CHIPS = useMemo(() => [
|
|
95
|
-
{
|
|
96
|
-
id: 'all',
|
|
97
|
-
label: 'All',
|
|
98
|
-
count: quickCounts.all,
|
|
99
|
-
color: AppColors.purple,
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
id: 'errors',
|
|
103
|
-
label: 'Errors',
|
|
104
|
-
count: quickCounts.errors,
|
|
105
|
-
color: AppColors.errorColor,
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
id: 'success',
|
|
109
|
-
label: '2xx OK',
|
|
110
|
-
count: quickCounts.success,
|
|
111
|
-
color: AppColors.greenColor,
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
id: 'slow',
|
|
115
|
-
label: 'Slow >500ms',
|
|
116
|
-
count: quickCounts.slow,
|
|
117
|
-
color: AppColors.warningIconGold,
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
id: 'POST',
|
|
121
|
-
label: 'POST',
|
|
122
|
-
count: quickCounts.post,
|
|
123
|
-
color: METHOD_COLORS.POST || '#3B82F6',
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
id: 'GET',
|
|
127
|
-
label: 'GET',
|
|
128
|
-
count: quickCounts.get,
|
|
129
|
-
color: METHOD_COLORS.GET || '#10B981',
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
id: 'graphql',
|
|
133
|
-
label: 'GraphQL',
|
|
134
|
-
count: quickCounts.graphql,
|
|
135
|
-
color: '#E10098',
|
|
136
|
-
},
|
|
137
|
-
], [quickCounts]);
|
|
138
|
-
const networkMetrics = useMemo(() => {
|
|
139
|
-
if (!logs || logs.length === 0)
|
|
140
|
-
return null;
|
|
141
|
-
let successCount = 0;
|
|
142
|
-
let completedCount = 0;
|
|
143
|
-
let totalDuration = 0;
|
|
144
|
-
let totalBytes = 0;
|
|
145
|
-
const durations = [];
|
|
146
|
-
logs.forEach(log => {
|
|
147
|
-
if (log.status != null) {
|
|
148
|
-
completedCount++;
|
|
149
|
-
const s = typeof log.status === 'number' ? log.status : parseInt(String(log.status), 10);
|
|
150
|
-
if (!isNaN(s)) {
|
|
151
|
-
if (s >= 200 && s < 400) {
|
|
152
|
-
successCount++;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
if (typeof log.duration === 'number' && log.duration > 0) {
|
|
157
|
-
durations.push(log.duration);
|
|
158
|
-
totalDuration += log.duration;
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
durations.sort((a, b) => a - b);
|
|
162
|
-
const avgDuration = durations.length > 0 ? Math.round(totalDuration / durations.length) : 0;
|
|
163
|
-
const p95 = durations.length > 0 ? durations[Math.floor(durations.length * 0.95)] : 0;
|
|
164
|
-
const successRate = completedCount > 0 ? Math.round((successCount / completedCount) * 100) : 100;
|
|
165
|
-
return {
|
|
166
|
-
successRate,
|
|
167
|
-
avgDuration,
|
|
168
|
-
p95,
|
|
169
|
-
totalCount: logs.length,
|
|
170
|
-
};
|
|
171
|
-
}, [logs]);
|
|
172
|
-
const renderItem = useCallback(({ item, index }) => {
|
|
173
|
-
if (item.type === 'header') {
|
|
174
|
-
return (<AnimatedEntrance index={index} distance={8}>
|
|
175
|
-
<DomainHeader pageName={item.pageName} color={item.color} stats={item.stats} activeFilters={item.activeFilters} onToggleFilter={toggleSectionFilter} isCollapsed={item.isCollapsed} onToggleCollapse={toggleSectionCollapse} isFirst={item.isFirst} timestamp={item.timestamp}/>
|
|
176
|
-
</AnimatedEntrance>);
|
|
177
|
-
}
|
|
178
|
-
const { log, isLast, color } = item;
|
|
179
|
-
return (<AnimatedEntrance index={index} distance={8} style={[
|
|
180
|
-
styles.treeNodeRow,
|
|
181
|
-
isLast && styles.treeNodeRowLast,
|
|
182
|
-
]}>
|
|
183
|
-
<View style={styles.treeLines}>
|
|
184
|
-
<View style={[
|
|
185
|
-
styles.modernTreeLine,
|
|
186
|
-
{ borderColor: color },
|
|
187
|
-
isLast && styles.modernTreeLineLast,
|
|
188
|
-
]}/>
|
|
189
|
-
{!isLast && (<View style={[styles.modernTreeBranch, { borderColor: color }]}/>)}
|
|
190
|
-
</View>
|
|
191
|
-
<View style={styles.treeCardWrapper}>
|
|
192
|
-
<LogCard item={log} isSelected={selectedLogs.has(log.id)} onToggleSelect={toggleSelect} onPress={() => {
|
|
193
|
-
setSelected(log);
|
|
194
|
-
}} timelineMinStart={minStart} timelineTotalRange={totalRange} isNew={newLogIds.has(log.id)} searchStr={search}/>
|
|
195
|
-
</View>
|
|
196
|
-
</AnimatedEntrance>);
|
|
197
|
-
}, [
|
|
198
|
-
minStart,
|
|
199
|
-
totalRange,
|
|
200
|
-
newLogIds,
|
|
201
|
-
selectedLogs,
|
|
202
|
-
toggleSelect,
|
|
203
|
-
search,
|
|
204
|
-
toggleSectionFilter,
|
|
205
|
-
toggleSectionCollapse,
|
|
206
|
-
setSelected,
|
|
207
|
-
]);
|
|
208
|
-
return (<View style={{ flex: 1 }}>
|
|
209
|
-
<View style={{ marginTop: 6 }}>
|
|
1
|
+
import J,{useCallback as de,useMemo as Q,useRef as Oe}from"react";import{FlatList as Ne,Platform as De,Pressable as Ee,ScrollView as He,Text as I,TextInput as Ae,View as S}from"react-native";import{useInspector as Me}from"./InspectorContext";import D from"../TouchableScale";import Se from"../AnimatedEntrance";import We from"../DomainHeader";import $e from"../LogCard";import Ge from"../EmptyState";import Qe from"../EndOfListFooter";import _e from"./NetworkFilterModal";import w from"../../styles";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as B}from"../../styles/AppFonts";import{METHOD_COLORS as we}from"../../constants";import{useTranslation as Ue}from"../../i18n";import{SearchIcon as Ke,ClearIcon as Xe,TrashIcon as Je,SortArrowIcon as Ye,FilterIcon as Ce,CircleCheckIcon as Ze,CircleXIcon as So,LayersIcon as Co,HeaderPauseIcon as To,ClockIcon as Te,RequestIcon as Io,ResponseIcon as Fo,AtomIcon as Ro}from"../NetworkIcons";const Bo=J.memo(()=>{const{groupedData:Y,search:L,setSearch:q,searchScope:Vo,setSearchScope:xe,isRegexSearch:Po,setIsRegexSearch:Lo,isCaseSensitive:Oo,setIsCaseSensitive:vo,quickFilter:_,setQuickFilter:U,handleDelete:ke,selectedLogs:W,sortOrder:j,setSortOrder:$,statusFilters:T,setStatusFilters:H,methodFilters:x,setMethodFilters:A,availableMethods:No,filteredLogs:M,logs:P,toggleSectionFilter:Z,toggleSectionCollapse:ee,minStart:oe,totalRange:te,newLogIds:re,toggleSelect:le,setSelected:se,isNetworkPaused:K,setIsNetworkPaused:Ie}=Me(),{t:ae}=Ue(),Fe=Oe(null),[Re,X]=J.useState(!1),[ie,ne]=J.useState(!1),Be=Q(()=>({statusCodes:T.size>0?new Set(T):new Set(["all"]),methods:x.size>0?new Set(x):new Set(["all"]),latency:"all",protocol:"all",sortBy:j==="newest"?"time_desc":"time_asc"}),[T,x,j]),Ve=de(o=>{o.statusCodes.has("all")||o.statusCodes.size===0?H(new Set):H(new Set(o.statusCodes)),o.methods.has("all")||o.methods.size===0?A(new Set):A(new Set([...o.methods].map(C=>C))),o.sortBy==="time_asc"?$("oldest"):$("newest")},[H,A,$]),O=Q(()=>{let o=0,C=0,b=0,z=0,F=0,G=0;return P.forEach(V=>{const E=typeof V.status=="number"?V.status:parseInt(String(V.status),10);V.status===0||V.status==null||!isNaN(E)&&E>=400?o++:!isNaN(E)&&E>=200&&E<400&&C++,(V.duration||0)>=500&&b++;const R=(V.method||"").toUpperCase();R==="POST"&&z++,R==="GET"&&F++;const N=(V.url||"").toLowerCase(),ce=(V.client||"").toLowerCase();(N.includes("graphql")||ce.includes("graphql")||ce.includes("apollo"))&&G++}),{all:P.length,errors:o,success:C,slow:b,post:z,get:F,graphql:G}},[P]),Pe=Q(()=>[{id:"all",label:"All",count:O.all,color:e.purple},{id:"errors",label:"Errors",count:O.errors,color:e.errorColor},{id:"success",label:"2xx OK",count:O.success,color:e.greenColor},{id:"slow",label:"Slow >500ms",count:O.slow,color:e.warningIconGold},{id:"POST",label:"POST",count:O.post,color:we.POST||"#3B82F6"},{id:"GET",label:"GET",count:O.get,color:we.GET||"#10B981"},{id:"graphql",label:"GraphQL",count:O.graphql,color:"#E10098"}],[O]),v=Q(()=>{if(!P||P.length===0)return null;let o=0,C=0,b=0,z=0;const F=[];P.forEach(R=>{if(R.status!=null){C++;const N=typeof R.status=="number"?R.status:parseInt(String(R.status),10);isNaN(N)||N>=200&&N<400&&o++}typeof R.duration=="number"&&R.duration>0&&(F.push(R.duration),b+=R.duration)}),F.sort((R,N)=>R-N);const G=F.length>0?Math.round(b/F.length):0,V=F.length>0?F[Math.floor(F.length*.95)]:0;return{successRate:C>0?Math.round(o/C*100):100,avgDuration:G,p95:V,totalCount:P.length}},[P]),Le=de(({item:o,index:C})=>{if(o.type==="header")return<Se index={C}distance={8}>
|
|
2
|
+
<We pageName={o.pageName}color={o.color}stats={o.stats}activeFilters={o.activeFilters}onToggleFilter={Z}isCollapsed={o.isCollapsed}onToggleCollapse={ee}isFirst={o.isFirst}timestamp={o.timestamp}/>
|
|
3
|
+
</Se>;const{log:b,isLast:z,color:F}=o;return<Se index={C}distance={8}style={[w.treeNodeRow,z&&w.treeNodeRowLast]}>
|
|
4
|
+
<S style={w.treeLines}>
|
|
5
|
+
<S style={[w.modernTreeLine,{borderColor:F},z&&w.modernTreeLineLast]}/>
|
|
6
|
+
{!z&&<S style={[w.modernTreeBranch,{borderColor:F}]}/>}
|
|
7
|
+
</S>
|
|
8
|
+
<S style={w.treeCardWrapper}>
|
|
9
|
+
<$e item={b}isSelected={W.has(b.id)}onToggleSelect={le}onPress={()=>{se(b)}}timelineMinStart={oe}timelineTotalRange={te}isNew={re.has(b.id)}searchStr={L}/>
|
|
10
|
+
</S>
|
|
11
|
+
</Se>},[oe,te,re,W,le,L,Z,ee,se]);return<S style={{flex:1}}>
|
|
12
|
+
<S style={{marginTop:6}}>
|
|
210
13
|
|
|
211
|
-
{
|
|
212
|
-
flexDirection: 'row',
|
|
213
|
-
alignItems: 'center',
|
|
214
|
-
justifyContent: 'space-between',
|
|
215
|
-
backgroundColor: AppColors.grayBackground,
|
|
216
|
-
borderRadius: 8,
|
|
217
|
-
paddingHorizontal: 10,
|
|
218
|
-
paddingVertical: 5.5,
|
|
219
|
-
marginHorizontal: 12,
|
|
220
|
-
marginBottom: 6,
|
|
221
|
-
borderWidth: 1,
|
|
222
|
-
borderColor: AppColors.dividerColor,
|
|
223
|
-
}}>
|
|
14
|
+
{v!=null&&v.totalCount>0&&<S style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:e.grayBackground,borderRadius:8,paddingHorizontal:10,paddingVertical:5.5,marginHorizontal:12,marginBottom:6,borderWidth:1,borderColor:e.dividerColor}}>
|
|
224
15
|
|
|
225
|
-
<
|
|
226
|
-
<
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
: AppColors.errorColor,
|
|
235
|
-
}}/>
|
|
236
|
-
<Text style={{ fontFamily: AppFonts.interBold, fontSize: 10.5, color: AppColors.primaryBlack }}>
|
|
237
|
-
{networkMetrics.successRate}%
|
|
238
|
-
</Text>
|
|
239
|
-
<Text style={{ fontFamily: AppFonts.interRegular, fontSize: 10, color: AppColors.grayTextWeak }}>
|
|
240
|
-
{t('network.successRate')}
|
|
241
|
-
</Text>
|
|
242
|
-
</View>
|
|
16
|
+
<S style={{flexDirection:"row",alignItems:"center",gap:4.5}}>
|
|
17
|
+
<S style={{width:6,height:6,borderRadius:3,backgroundColor:v.successRate>=95?e.greenColor:v.successRate>=80?e.amber500:e.errorColor}}/>
|
|
18
|
+
<I style={{fontFamily:B.interBold,fontSize:10.5,color:e.primaryBlack}}>
|
|
19
|
+
{v.successRate}%
|
|
20
|
+
</I>
|
|
21
|
+
<I style={{fontFamily:B.interRegular,fontSize:10,color:e.grayTextWeak}}>
|
|
22
|
+
{ae("network.successRate")}
|
|
23
|
+
</I>
|
|
24
|
+
</S>
|
|
243
25
|
|
|
244
|
-
<
|
|
26
|
+
<S style={{width:1,height:11,backgroundColor:e.dividerColor}}/>
|
|
245
27
|
|
|
246
28
|
|
|
247
|
-
<
|
|
248
|
-
<
|
|
249
|
-
<
|
|
250
|
-
{
|
|
251
|
-
</
|
|
252
|
-
<
|
|
253
|
-
{
|
|
254
|
-
</
|
|
255
|
-
</
|
|
29
|
+
<S style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
30
|
+
<Te color={e.purple}size={10}/>
|
|
31
|
+
<I style={{fontFamily:B.interBold,fontSize:10.5,color:e.purple}}>
|
|
32
|
+
{v.avgDuration}ms
|
|
33
|
+
</I>
|
|
34
|
+
<I style={{fontFamily:B.interRegular,fontSize:10,color:e.grayTextWeak}}>
|
|
35
|
+
{ae("network.avgLatency")}
|
|
36
|
+
</I>
|
|
37
|
+
</S>
|
|
256
38
|
|
|
257
|
-
<
|
|
39
|
+
<S style={{width:1,height:11,backgroundColor:e.dividerColor}}/>
|
|
258
40
|
|
|
259
41
|
|
|
260
|
-
<
|
|
261
|
-
<
|
|
262
|
-
{
|
|
263
|
-
</
|
|
264
|
-
<
|
|
42
|
+
<S style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
43
|
+
<I style={{fontFamily:B.interBold,fontSize:10.5,color:e.primaryBlack}}>
|
|
44
|
+
{v.p95}ms
|
|
45
|
+
</I>
|
|
46
|
+
<I style={{fontFamily:B.interRegular,fontSize:10,color:e.grayTextWeak}}>
|
|
265
47
|
P95
|
|
266
|
-
</
|
|
267
|
-
</
|
|
268
|
-
</
|
|
48
|
+
</I>
|
|
49
|
+
</S>
|
|
50
|
+
</S>}
|
|
269
51
|
|
|
270
52
|
|
|
271
|
-
<
|
|
272
|
-
<
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
borderColor: AppColors.purple,
|
|
276
|
-
borderWidth: 1.5,
|
|
277
|
-
},
|
|
278
|
-
]}>
|
|
279
|
-
<SearchIcon color={isSearchFocused
|
|
280
|
-
? AppColors.purple
|
|
281
|
-
: AppColors.grayTextWeak} size={15}/>
|
|
282
|
-
<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"/>
|
|
53
|
+
<S style={w.toolbarRow}>
|
|
54
|
+
<S style={[w.searchContainer,ie&&{borderColor:e.purple,borderWidth:1.5}]}>
|
|
55
|
+
<Ke color={ie?e.purple:e.grayTextWeak}size={15}/>
|
|
56
|
+
<Ae placeholder="Search URL, status, method, headers, body..."placeholderTextColor={e.grayTextWeak}value={L}onChangeText={q}onFocus={()=>ne(!0)}onBlur={()=>ne(!1)}style={w.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
283
57
|
|
|
284
|
-
{
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
<Text style={{
|
|
296
|
-
color: AppColors.purple,
|
|
297
|
-
fontSize: 9.5,
|
|
298
|
-
fontFamily: AppFonts.interBold,
|
|
299
|
-
}}>
|
|
300
|
-
{filteredLogs.length}
|
|
301
|
-
</Text>
|
|
302
|
-
</View>
|
|
303
|
-
<Pressable onPress={() => setSearch('')} hitSlop={10} style={styles.clearBtn}>
|
|
304
|
-
<ClearIcon color={AppColors.grayTextWeak} size={13}/>
|
|
305
|
-
</Pressable>
|
|
306
|
-
</View>)}
|
|
307
|
-
</View>
|
|
58
|
+
{L.length>0&&<S style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
59
|
+
<S style={{backgroundColor:`${e.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
60
|
+
<I style={{color:e.purple,fontSize:9.5,fontFamily:B.interBold}}>
|
|
61
|
+
{M.length}
|
|
62
|
+
</I>
|
|
63
|
+
</S>
|
|
64
|
+
<Ee onPress={()=>q("")}hitSlop={10}style={w.clearBtn}>
|
|
65
|
+
<Xe color={e.grayTextWeak}size={13}/>
|
|
66
|
+
</Ee>
|
|
67
|
+
</S>}
|
|
68
|
+
</S>
|
|
308
69
|
|
|
309
|
-
<
|
|
310
|
-
<
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
borderColor: `${AppColors.darkOrange}50`,
|
|
314
|
-
backgroundColor: `${AppColors.darkOrange}18`,
|
|
315
|
-
},
|
|
316
|
-
]} onPress={() => setIsNetworkPaused(p => !p)} hitSlop={6}>
|
|
317
|
-
<HeaderPauseIcon isPaused={isNetworkPaused} color={isNetworkPaused
|
|
318
|
-
? AppColors.darkOrange
|
|
319
|
-
: AppColors.grayTextStrong} size={16}/>
|
|
320
|
-
</TouchableScale>
|
|
70
|
+
<S style={w.toolbarRight}>
|
|
71
|
+
<D style={[w.toolbarBtn,K&&{borderColor:`${e.darkOrange}50`,backgroundColor:`${e.darkOrange}18`}]}onPress={()=>Ie(o=>!o)}hitSlop={6}>
|
|
72
|
+
<To isPaused={K}color={K?e.darkOrange:e.grayTextStrong}size={16}/>
|
|
73
|
+
</D>
|
|
321
74
|
|
|
322
|
-
<
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
{selectedLogs.size > 0 && (<View style={styles.trashBadge}>
|
|
331
|
-
<Text style={styles.trashBadgeText}>
|
|
332
|
-
{selectedLogs.size}
|
|
333
|
-
</Text>
|
|
334
|
-
</View>)}
|
|
335
|
-
</TouchableScale>
|
|
75
|
+
<D style={[w.toolbarBtn,{borderColor:`${e.errorColor}38`,backgroundColor:`${e.errorColor}0F`}]}onPress={ke}hitSlop={6}>
|
|
76
|
+
<Je color={e.errorColor}size={15}/>
|
|
77
|
+
{W.size>0&&<S style={w.trashBadge}>
|
|
78
|
+
<I style={w.trashBadgeText}>
|
|
79
|
+
{W.size}
|
|
80
|
+
</I>
|
|
81
|
+
</S>}
|
|
82
|
+
</D>
|
|
336
83
|
|
|
337
|
-
<
|
|
338
|
-
<
|
|
339
|
-
</
|
|
84
|
+
<D style={w.toolbarBtn}onPress={()=>$(o=>o==="newest"?"oldest":"newest")}hitSlop={10}>
|
|
85
|
+
<Ye direction={j==="newest"?"down":"up"}color={e.grayTextStrong}size={18}/>
|
|
86
|
+
</D>
|
|
340
87
|
|
|
341
|
-
<
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
]} onPress={() => setIsFilterModalOpen(true)} hitSlop={6}>
|
|
348
|
-
<FilterIcon color={statusFilters.size > 0 || methodFilters.size > 0
|
|
349
|
-
? AppColors.purple
|
|
350
|
-
: AppColors.grayTextStrong} size={16}/>
|
|
351
|
-
{(statusFilters.size > 0 ||
|
|
352
|
-
methodFilters.size > 0) && (<View style={styles.activeFilterDot}/>)}
|
|
353
|
-
</TouchableScale>
|
|
354
|
-
</View>
|
|
355
|
-
</View>
|
|
88
|
+
<D style={[w.toolbarBtn,(T.size>0||x.size>0)&&{borderColor:e.purple,backgroundColor:`${e.purple}15`}]}onPress={()=>X(!0)}hitSlop={6}>
|
|
89
|
+
<Ce color={T.size>0||x.size>0?e.purple:e.grayTextStrong}size={16}/>
|
|
90
|
+
{(T.size>0||x.size>0)&&<S style={w.activeFilterDot}/>}
|
|
91
|
+
</D>
|
|
92
|
+
</S>
|
|
93
|
+
</S>
|
|
356
94
|
|
|
357
95
|
|
|
358
|
-
<
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
alignItems: 'center',
|
|
381
|
-
paddingHorizontal: 9,
|
|
382
|
-
paddingVertical: 4.5,
|
|
383
|
-
borderRadius: 8,
|
|
384
|
-
backgroundColor: isActive
|
|
385
|
-
? chipColor
|
|
386
|
-
: `${chipColor}12`,
|
|
387
|
-
borderWidth: 1,
|
|
388
|
-
borderColor: isActive
|
|
389
|
-
? chipColor
|
|
390
|
-
: `${chipColor}30`,
|
|
391
|
-
gap: 5,
|
|
392
|
-
}}>
|
|
393
|
-
{chip.id === 'all' && <LayersIcon size={11} color={iconColor}/>}
|
|
394
|
-
{chip.id === 'errors' && <CircleXIcon size={11} color={iconColor}/>}
|
|
395
|
-
{chip.id === 'success' && <CircleCheckIcon size={11} color={iconColor}/>}
|
|
396
|
-
{chip.id === 'slow' && <ClockIcon size={11} color={iconColor}/>}
|
|
397
|
-
{chip.id === 'POST' && <RequestIcon size={11} color={iconColor}/>}
|
|
398
|
-
{chip.id === 'GET' && <ResponseIcon size={11} color={iconColor}/>}
|
|
399
|
-
{chip.id === 'graphql' && <AtomIcon size={11} color={iconColor}/>}
|
|
400
|
-
<Text style={{
|
|
401
|
-
fontFamily: AppFonts.interBold,
|
|
402
|
-
fontSize: 10.5,
|
|
403
|
-
color: isActive
|
|
404
|
-
? AppColors.white
|
|
405
|
-
: AppColors.primaryBlack,
|
|
406
|
-
}}>
|
|
407
|
-
{chip.label}
|
|
408
|
-
</Text>
|
|
409
|
-
<View style={{
|
|
410
|
-
backgroundColor: isActive
|
|
411
|
-
? 'rgba(255,255,255,0.25)'
|
|
412
|
-
: `${chipColor}20`,
|
|
413
|
-
paddingHorizontal: 5,
|
|
414
|
-
paddingVertical: 1,
|
|
415
|
-
borderRadius: 8,
|
|
416
|
-
}}>
|
|
417
|
-
<Text style={{
|
|
418
|
-
fontFamily: AppFonts.interBold,
|
|
419
|
-
fontSize: 9,
|
|
420
|
-
color: isActive ? AppColors.white : chipColor,
|
|
421
|
-
}}>
|
|
422
|
-
{chip.count}
|
|
423
|
-
</Text>
|
|
424
|
-
</View>
|
|
425
|
-
</View>
|
|
426
|
-
</TouchableScale>);
|
|
427
|
-
})}
|
|
428
|
-
</ScrollView>
|
|
96
|
+
<S style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
|
|
97
|
+
<He horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
98
|
+
{Pe.map(o=>{const C=_===o.id,b=o.color||e.purple,z=C?e.white:b;return<D key={o.id}onPress={()=>{U(C?"all":o.id)}}>
|
|
99
|
+
<S style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:C?b:`${b}12`,borderWidth:1,borderColor:C?b:`${b}30`,gap:5}}>
|
|
100
|
+
{o.id==="all"&&<Co size={11}color={z}/>}
|
|
101
|
+
{o.id==="errors"&&<So size={11}color={z}/>}
|
|
102
|
+
{o.id==="success"&&<Ze size={11}color={z}/>}
|
|
103
|
+
{o.id==="slow"&&<Te size={11}color={z}/>}
|
|
104
|
+
{o.id==="POST"&&<Io size={11}color={z}/>}
|
|
105
|
+
{o.id==="GET"&&<Fo size={11}color={z}/>}
|
|
106
|
+
{o.id==="graphql"&&<Ro size={11}color={z}/>}
|
|
107
|
+
<I style={{fontFamily:B.interBold,fontSize:10.5,color:C?e.white:e.primaryBlack}}>
|
|
108
|
+
{o.label}
|
|
109
|
+
</I>
|
|
110
|
+
<S style={{backgroundColor:C?"rgba(255,255,255,0.25)":`${b}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8}}>
|
|
111
|
+
<I style={{fontFamily:B.interBold,fontSize:9,color:C?e.white:b}}>
|
|
112
|
+
{o.count}
|
|
113
|
+
</I>
|
|
114
|
+
</S>
|
|
115
|
+
</S>
|
|
116
|
+
</D>})}
|
|
117
|
+
</He>
|
|
429
118
|
|
|
430
|
-
<
|
|
431
|
-
<
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
paddingHorizontal: 10,
|
|
435
|
-
paddingVertical: 4.5,
|
|
436
|
-
borderRadius: 8,
|
|
437
|
-
backgroundColor: statusFilters.size > 0 || methodFilters.size > 0
|
|
438
|
-
? `${AppColors.purple}20`
|
|
439
|
-
: AppColors.grayBackground,
|
|
440
|
-
borderWidth: 1,
|
|
441
|
-
borderColor: statusFilters.size > 0 || methodFilters.size > 0
|
|
442
|
-
? AppColors.purple
|
|
443
|
-
: AppColors.grayBorderSecondary,
|
|
444
|
-
gap: 5,
|
|
445
|
-
shadowColor: AppColors.black,
|
|
446
|
-
shadowOpacity: 0.04,
|
|
447
|
-
shadowRadius: 2,
|
|
448
|
-
shadowOffset: { width: 0, height: 1 },
|
|
449
|
-
elevation: 1,
|
|
450
|
-
}}>
|
|
451
|
-
<FilterIcon size={11} color={statusFilters.size > 0 || methodFilters.size > 0
|
|
452
|
-
? AppColors.purple
|
|
453
|
-
: AppColors.grayText}/>
|
|
454
|
-
<Text style={{
|
|
455
|
-
fontFamily: AppFonts.interBold,
|
|
456
|
-
fontSize: 10.5,
|
|
457
|
-
color: statusFilters.size > 0 || methodFilters.size > 0
|
|
458
|
-
? AppColors.purple
|
|
459
|
-
: AppColors.grayText,
|
|
460
|
-
}}>
|
|
119
|
+
<D onPress={()=>X(!0)}style={{flexShrink:0}}>
|
|
120
|
+
<S style={{flexDirection:"row",alignItems:"center",paddingHorizontal:10,paddingVertical:4.5,borderRadius:8,backgroundColor:T.size>0||x.size>0?`${e.purple}20`:e.grayBackground,borderWidth:1,borderColor:T.size>0||x.size>0?e.purple:e.grayBorderSecondary,gap:5,shadowColor:e.black,shadowOpacity:.04,shadowRadius:2,shadowOffset:{width:0,height:1},elevation:1}}>
|
|
121
|
+
<Ce size={11}color={T.size>0||x.size>0?e.purple:e.grayText}/>
|
|
122
|
+
<I style={{fontFamily:B.interBold,fontSize:10.5,color:T.size>0||x.size>0?e.purple:e.grayText}}>
|
|
461
123
|
More Filters
|
|
462
|
-
</
|
|
463
|
-
{(
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
fontSize: 8.5,
|
|
472
|
-
color: AppColors.white,
|
|
473
|
-
}}>
|
|
474
|
-
{statusFilters.size + methodFilters.size}
|
|
475
|
-
</Text>
|
|
476
|
-
</View>)}
|
|
477
|
-
</View>
|
|
478
|
-
</TouchableScale>
|
|
479
|
-
</View>
|
|
124
|
+
</I>
|
|
125
|
+
{(T.size>0||x.size>0)&&<S style={{backgroundColor:e.purple,paddingHorizontal:4.5,paddingVertical:1,borderRadius:6}}>
|
|
126
|
+
<I style={{fontFamily:B.interBold,fontSize:8.5,color:e.white}}>
|
|
127
|
+
{T.size+x.size}
|
|
128
|
+
</I>
|
|
129
|
+
</S>}
|
|
130
|
+
</S>
|
|
131
|
+
</D>
|
|
132
|
+
</S>
|
|
480
133
|
|
|
481
134
|
|
|
482
|
-
{(
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
alignItems: 'center',
|
|
489
|
-
justifyContent: 'space-between',
|
|
490
|
-
marginHorizontal: 12,
|
|
491
|
-
marginBottom: 8,
|
|
492
|
-
paddingHorizontal: 10,
|
|
493
|
-
paddingVertical: 5.5,
|
|
494
|
-
backgroundColor: `${AppColors.purple}10`,
|
|
495
|
-
borderRadius: 8,
|
|
496
|
-
borderWidth: 1,
|
|
497
|
-
borderColor: `${AppColors.purple}25`,
|
|
498
|
-
}}>
|
|
499
|
-
<Text style={{
|
|
500
|
-
fontFamily: AppFonts.interMedium,
|
|
501
|
-
fontSize: 10.5,
|
|
502
|
-
color: AppColors.purple,
|
|
503
|
-
}}>
|
|
504
|
-
Showing {filteredLogs.length} of {logs.length} requests
|
|
505
|
-
</Text>
|
|
506
|
-
<TouchableScale onPress={() => {
|
|
507
|
-
setSearch('');
|
|
508
|
-
setQuickFilter('all');
|
|
509
|
-
setStatusFilters(new Set());
|
|
510
|
-
setMethodFilters(new Set());
|
|
511
|
-
}}>
|
|
512
|
-
<Text style={{
|
|
513
|
-
fontFamily: AppFonts.interBold,
|
|
514
|
-
fontSize: 10.5,
|
|
515
|
-
color: AppColors.errorColor,
|
|
516
|
-
}}>
|
|
135
|
+
{(_!=="all"||L.trim().length>0||T.size>0||x.size>0||M.length!==P.length)&&<S style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginHorizontal:12,marginBottom:8,paddingHorizontal:10,paddingVertical:5.5,backgroundColor:`${e.purple}10`,borderRadius:8,borderWidth:1,borderColor:`${e.purple}25`}}>
|
|
136
|
+
<I style={{fontFamily:B.interMedium,fontSize:10.5,color:e.purple}}>
|
|
137
|
+
Showing {M.length} of {P.length} requests
|
|
138
|
+
</I>
|
|
139
|
+
<D onPress={()=>{q(""),U("all"),H(new Set),A(new Set)}}>
|
|
140
|
+
<I style={{fontFamily:B.interBold,fontSize:10.5,color:e.errorColor}}>
|
|
517
141
|
Clear All Filters
|
|
518
|
-
</
|
|
519
|
-
</
|
|
520
|
-
</
|
|
521
|
-
</
|
|
142
|
+
</I>
|
|
143
|
+
</D>
|
|
144
|
+
</S>}
|
|
145
|
+
</S>
|
|
522
146
|
|
|
523
|
-
<
|
|
524
|
-
statusFilters.size > 0 ||
|
|
525
|
-
methodFilters.size > 0 ||
|
|
526
|
-
quickFilter !== 'all'} searchQuery={search} customTitle={search.length > 0
|
|
527
|
-
? 'No matching API requests'
|
|
528
|
-
: 'No network activity'} onClearSearch={() => {
|
|
529
|
-
setSearch('');
|
|
530
|
-
setStatusFilters(new Set());
|
|
531
|
-
setMethodFilters(new Set());
|
|
532
|
-
setQuickFilter('all');
|
|
533
|
-
setSearchScope('all');
|
|
534
|
-
}}/>} ListFooterComponent={groupedData.length > 0 ? (<EndOfListFooter count={filteredLogs.length} label="requests"/>) : null} contentContainerStyle={[
|
|
535
|
-
styles.listContent,
|
|
536
|
-
filteredLogs.length === 0 && { flexGrow: 1 },
|
|
537
|
-
]} keyboardShouldPersistTaps="handled"/>
|
|
147
|
+
<Ne ref={Fe}data={Y}keyExtractor={o=>o?.id?.toString()}renderItem={Le}initialNumToRender={12}maxToRenderPerBatch={8}windowSize={5}removeClippedSubviews={De.OS==="android"}renderToHardwareTextureAndroid={!0}ListEmptyComponent={<Ge isSearch={L.length>0||T.size>0||x.size>0||_!=="all"}searchQuery={L}customTitle={L.length>0?"No matching API requests":"No network activity"}onClearSearch={()=>{q(""),H(new Set),A(new Set),U("all"),xe("all")}}/>}ListFooterComponent={Y.length>0?<Qe count={M.length}label="requests"/>:null}contentContainerStyle={[w.listContent,M.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
538
148
|
|
|
539
149
|
|
|
540
|
-
<
|
|
541
|
-
</
|
|
542
|
-
});
|
|
543
|
-
export default NetworkTab;
|
|
150
|
+
<_e visible={Re}onClose={()=>X(!1)}filters={Be}onApply={Ve}searchQuery={L}/>
|
|
151
|
+
</S>});export default Bo;
|