react-native-inapp-inspector 2.3.19 → 2.3.21
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 +14 -14
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +67 -0
- package/dist/commonjs/analytics.js +1 -24
- package/dist/commonjs/bundle.js +1 -16
- package/dist/commonjs/capture.js +1 -35
- 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.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 +243 -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 +74 -875
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +143 -907
- package/dist/commonjs/components/Inspector/FabLauncher.js +42 -466
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +6 -99
- package/dist/commonjs/components/Inspector/InspectorContext.js +1 -21
- package/dist/commonjs/components/Inspector/InspectorHeader.js +191 -1110
- package/dist/commonjs/components/Inspector/LogDetail.js +168 -994
- package/dist/commonjs/components/Inspector/MainScreen.js +52 -335
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +97 -644
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +90 -605
- package/dist/commonjs/components/Inspector/NavigationTracker.js +1 -12
- package/dist/commonjs/components/Inspector/NetworkDetail.js +89 -411
- 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 +18 -434
- 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 +427 -3807
- 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 +36 -334
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +37 -412
- package/dist/commonjs/components/JsonViewer.js +168 -381
- 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 +13 -0
- package/dist/commonjs/components/NetworkIcons.js +521 -1022
- package/dist/commonjs/components/QRCodeView.js +5 -79
- package/dist/commonjs/components/SectionHeader.js +15 -37
- package/dist/commonjs/components/SegmentedTabs.js +7 -62
- 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.d.ts +1 -0
- 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 -1140
- package/dist/commonjs/index.js +5 -2168
- package/dist/commonjs/metro.js +6 -468
- package/dist/commonjs/native/NativeInspector.d.ts +1 -0
- package/dist/commonjs/native/NativeInspector.js +1 -415
- 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 +0 -1
- package/dist/commonjs/types/enums.js +1 -152
- package/dist/commonjs/types/index.js +1 -18
- package/dist/commonjs/types/interfaces.d.ts +2 -2
- 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.js +1 -32
- 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.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 +243 -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 +164 -925
- package/dist/esm/components/Inspector/DeviceInfoTab.js +199 -924
- package/dist/esm/components/Inspector/FabLauncher.js +68 -454
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +14 -70
- package/dist/esm/components/Inspector/InspectorContext.js +1 -12
- package/dist/esm/components/Inspector/InspectorHeader.js +282 -1163
- package/dist/esm/components/Inspector/LogDetail.js +235 -1023
- package/dist/esm/components/Inspector/MainScreen.js +78 -323
- package/dist/esm/components/Inspector/MediaGalleryTab.js +143 -650
- package/dist/esm/components/Inspector/MediaPreviewModal.js +138 -613
- package/dist/esm/components/Inspector/NavigationTracker.js +1 -10
- package/dist/esm/components/Inspector/NetworkDetail.js +138 -455
- 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 +643 -3985
- 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 +45 -305
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +80 -418
- package/dist/esm/components/JsonViewer.js +179 -354
- 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 +13 -0
- package/dist/esm/components/NetworkIcons.js +523 -838
- package/dist/esm/components/QRCodeView.js +8 -45
- package/dist/esm/components/SectionHeader.js +22 -39
- package/dist/esm/components/SegmentedTabs.js +8 -58
- 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.d.ts +1 -0
- 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 -1140
- package/dist/esm/index.js +7 -1982
- package/dist/esm/metro.js +6 -459
- package/dist/esm/native/NativeInspector.d.ts +1 -0
- package/dist/esm/native/NativeInspector.js +1 -382
- 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 +0 -1
- package/dist/esm/types/enums.js +1 -149
- package/dist/esm/types/index.js +1 -2
- package/dist/esm/types/interfaces.d.ts +2 -2
- package/dist/esm/types/interfaces.js +1 -1
- package/ios/NetworkInspectorModule.mm +60 -12
- package/package.json +5 -3
- package/src/native/NativeInspector.ts +18 -0
- package/dist/commonjs/components/Inspector/FeedbackModal.d.ts +0 -7
- package/dist/commonjs/components/Inspector/FeedbackModal.js +0 -552
- package/dist/esm/components/Inspector/FeedbackModal.d.ts +0 -7
- package/dist/esm/components/Inspector/FeedbackModal.js +0 -515
- package/src/analytics.ts +0 -35
- package/src/bundle.ts +0 -25
- package/src/capture.ts +0 -109
- 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 -97
- 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 -590
- 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 -1583
- package/src/components/Inspector/LogDetail.tsx +0 -1431
- package/src/components/Inspector/MainScreen.tsx +0 -460
- package/src/components/Inspector/MediaGalleryTab.tsx +0 -829
- package/src/components/Inspector/MediaPreviewModal.tsx +0 -783
- package/src/components/Inspector/NavigationTracker.tsx +0 -13
- package/src/components/Inspector/NetworkDetail.tsx +0 -778
- 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 -5136
- package/src/components/Inspector/SkeletonPlaceholder.tsx +0 -206
- package/src/components/Inspector/StorageTab.tsx +0 -1159
- package/src/components/Inspector/TabBar.tsx +0 -431
- package/src/components/Inspector/UpdateAvailableModal.tsx +0 -555
- package/src/components/JsonViewer.tsx +0 -549
- 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 -2655
- package/src/components/QRCodeView.tsx +0 -75
- package/src/components/SectionHeader.tsx +0 -101
- package/src/components/SegmentedTabs.tsx +0 -84
- 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 -1141
- package/src/index.tsx +0 -2650
- 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 -210
- package/src/types/index.ts +0 -34
- package/src/types/interfaces.ts +0 -535
|
@@ -1,556 +1,164 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { AppColors } from '../../styles/AppColors';
|
|
5
|
-
import { AppFonts } from '../../styles/AppFonts';
|
|
6
|
-
import { useTranslation } from '../../i18n';
|
|
7
|
-
import { FilterIcon, CloseWhite, CheckIcon, ClockIcon, HourglassIcon, SkullIcon, JsIcon, LayoutIcon, ChipIcon, AppleIcon, AndroidIcon, BoltIcon, } from '../NetworkIcons';
|
|
8
|
-
import TouchableScale from '../TouchableScale';
|
|
9
|
-
export const DEFAULT_CRASH_FILTERS = {
|
|
10
|
-
types: new Set(['all']),
|
|
11
|
-
timeWindow: 'all',
|
|
12
|
-
platform: 'all',
|
|
13
|
-
engine: 'all',
|
|
14
|
-
sortBy: 'time_desc',
|
|
15
|
-
};
|
|
16
|
-
export const isCrashFiltersDefault = (f) => (f.types.has('all') || f.types.size === 0) &&
|
|
17
|
-
f.timeWindow === 'all' &&
|
|
18
|
-
f.platform === 'all' &&
|
|
19
|
-
f.engine === 'all' &&
|
|
20
|
-
f.sortBy === 'time_desc';
|
|
21
|
-
const CrashFilterModal = ({ visible, onClose, filters, onApply, searchQuery = '', }) => {
|
|
22
|
-
const { t } = useTranslation();
|
|
23
|
-
const { crashRecords } = useInspector();
|
|
24
|
-
const [draft, setDraft] = useState(() => ({
|
|
25
|
-
...filters,
|
|
26
|
-
types: new Set(filters.types),
|
|
27
|
-
}));
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
if (visible) {
|
|
30
|
-
setDraft({
|
|
31
|
-
...filters,
|
|
32
|
-
types: new Set(filters.types),
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}, [visible]);
|
|
36
|
-
const toggleType = (key) => {
|
|
37
|
-
setDraft(prev => {
|
|
38
|
-
const next = new Set(prev.types);
|
|
39
|
-
if (key === 'all') {
|
|
40
|
-
return { ...prev, types: new Set(['all']) };
|
|
41
|
-
}
|
|
42
|
-
next.delete('all');
|
|
43
|
-
if (next.has(key)) {
|
|
44
|
-
next.delete(key);
|
|
45
|
-
if (next.size === 0)
|
|
46
|
-
next.add('all');
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
next.add(key);
|
|
50
|
-
}
|
|
51
|
-
return { ...prev, types: next };
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
const setTimeWindow = (tw) => {
|
|
55
|
-
setDraft(prev => ({ ...prev, timeWindow: tw }));
|
|
56
|
-
};
|
|
57
|
-
const setPlatform = (p) => {
|
|
58
|
-
setDraft(prev => ({ ...prev, platform: p }));
|
|
59
|
-
};
|
|
60
|
-
const setEngine = (e) => {
|
|
61
|
-
setDraft(prev => ({ ...prev, engine: e }));
|
|
62
|
-
};
|
|
63
|
-
const setSort = (sortBy) => {
|
|
64
|
-
setDraft(prev => ({ ...prev, sortBy }));
|
|
65
|
-
};
|
|
66
|
-
const handleResetDraft = () => {
|
|
67
|
-
setDraft({
|
|
68
|
-
...DEFAULT_CRASH_FILTERS,
|
|
69
|
-
types: new Set(DEFAULT_CRASH_FILTERS.types),
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
const handleApply = () => {
|
|
73
|
-
onApply({
|
|
74
|
-
...draft,
|
|
75
|
-
types: new Set(draft.types),
|
|
76
|
-
});
|
|
77
|
-
onClose();
|
|
78
|
-
};
|
|
79
|
-
const handleDiscard = () => {
|
|
80
|
-
setDraft({
|
|
81
|
-
...filters,
|
|
82
|
-
types: new Set(filters.types),
|
|
83
|
-
});
|
|
84
|
-
onClose();
|
|
85
|
-
};
|
|
86
|
-
const draftMatchCount = useMemo(() => {
|
|
87
|
-
let crashes = crashRecords;
|
|
88
|
-
if (searchQuery.trim().length > 0) {
|
|
89
|
-
const q = searchQuery.toLowerCase();
|
|
90
|
-
crashes = crashes.filter(c => (c.message || '').toLowerCase().includes(q) ||
|
|
91
|
-
(c.name || '').toLowerCase().includes(q) ||
|
|
92
|
-
(c.stack || '').toLowerCase().includes(q));
|
|
93
|
-
}
|
|
94
|
-
if (draft.types.size > 0 && !draft.types.has('all')) {
|
|
95
|
-
crashes = crashes.filter(c => {
|
|
96
|
-
if (draft.types.has('fatal') && c.isFatal)
|
|
97
|
-
return true;
|
|
98
|
-
if (draft.types.has('js') && c.type === 'js')
|
|
99
|
-
return true;
|
|
100
|
-
if (draft.types.has('promise') && c.type === 'promise')
|
|
101
|
-
return true;
|
|
102
|
-
if (draft.types.has('render') && c.type === 'render')
|
|
103
|
-
return true;
|
|
104
|
-
if (draft.types.has('native') && c.type === 'native')
|
|
105
|
-
return true;
|
|
106
|
-
return false;
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
if (draft.timeWindow !== 'all') {
|
|
110
|
-
const now = Date.now();
|
|
111
|
-
const cutoff = draft.timeWindow === '15m'
|
|
112
|
-
? now - 15 * 60 * 1000
|
|
113
|
-
: draft.timeWindow === '1h'
|
|
114
|
-
? now - 60 * 60 * 1000
|
|
115
|
-
: draft.timeWindow === '24h'
|
|
116
|
-
? now - 24 * 60 * 60 * 1000
|
|
117
|
-
: now - 7 * 24 * 60 * 60 * 1000;
|
|
118
|
-
crashes = crashes.filter(c => c.timestamp >= cutoff);
|
|
119
|
-
}
|
|
120
|
-
if (draft.platform !== 'all') {
|
|
121
|
-
crashes = crashes.filter(c => (c.deviceInfo?.platform || '').toLowerCase() === draft.platform);
|
|
122
|
-
}
|
|
123
|
-
if (draft.engine !== 'all') {
|
|
124
|
-
crashes = crashes.filter(c => {
|
|
125
|
-
const isHermes = c.deviceInfo?.isHermes;
|
|
126
|
-
if (draft.engine === 'hermes')
|
|
127
|
-
return isHermes === true;
|
|
128
|
-
return isHermes === false || isHermes === undefined;
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
return crashes.length;
|
|
132
|
-
}, [crashRecords, searchQuery, draft]);
|
|
133
|
-
const isAllTypes = draft.types.has('all') || draft.types.size === 0;
|
|
134
|
-
const typeChips = [
|
|
135
|
-
{ key: 'all', label: t('crash.filterTypeAll'), Icon: FilterIcon, color: AppColors.grayTextStrong },
|
|
136
|
-
{ key: 'fatal', label: t('crash.filterFatal'), Icon: SkullIcon, color: AppColors.errorColor },
|
|
137
|
-
{ key: 'js', label: t('crash.filterJsError'), Icon: JsIcon, color: AppColors.sky600 },
|
|
138
|
-
{ key: 'promise', label: t('crash.filterPromise'), Icon: HourglassIcon, color: AppColors.darkOrange },
|
|
139
|
-
{ key: 'render', label: t('crash.filterRender'), Icon: LayoutIcon, color: AppColors.purple },
|
|
140
|
-
{ key: 'native', label: t('crash.filterNative'), Icon: ChipIcon, color: AppColors.amber700 },
|
|
141
|
-
];
|
|
142
|
-
return (<Modal visible={visible} transparent animationType="fade" onRequestClose={handleDiscard}>
|
|
143
|
-
<View style={styles.backdrop}>
|
|
144
|
-
<Pressable style={StyleSheet.absoluteFill} onPress={handleDiscard}/>
|
|
1
|
+
import{useEffect as Q,useMemo as ee,useState as te}from"react";import{Modal as Te,Pressable as Pe,ScrollView as Se,StyleSheet as j,Text as P,TouchableOpacity as V,View as T}from"react-native";import{useInspector as Ce}from"./InspectorContext";import{AppColors as t}from"../../styles/AppColors";import{AppFonts as I}from"../../styles/AppFonts";import{useTranslation as Be}from"../../i18n";import{FilterIcon as _,CloseWhite as Ie,CheckIcon as Ae,ClockIcon as O,HourglassIcon as E,SkullIcon as L,JsIcon as Ve,LayoutIcon as We,ChipIcon as ze,AppleIcon as M,AndroidIcon as Re,BoltIcon as $}from"../NetworkIcons";import C from"../TouchableScale";export const DEFAULT_CRASH_FILTERS={types:new Set(["all"]),timeWindow:"all",platform:"all",engine:"all",sortBy:"time_desc"},isCrashFiltersDefault=S=>(S.types.has("all")||S.types.size===0)&&S.timeWindow==="all"&&S.platform==="all"&&S.engine==="all"&&S.sortBy==="time_desc";const Oe=({visible:S,onClose:F,filters:v,onApply:q,searchQuery:W=""})=>{const{t:o}=Be(),{crashRecords:H}=Ce(),[l,B]=te(()=>({...v,types:new Set(v.types)}));Q(()=>{S&&B({...v,types:new Set(v.types)})},[S]);const J=r=>{B(i=>{const k=new Set(i.types);return r==="all"?{...i,types:new Set(["all"])}:(k.delete("all"),k.has(r)?(k.delete(r),k.size===0&&k.add("all")):k.add(r),{...i,types:k})})},N=r=>{B(i=>({...i,timeWindow:r}))},z=r=>{B(i=>({...i,platform:r}))},R=r=>{B(i=>({...i,engine:r}))},D=r=>{B(i=>({...i,sortBy:r}))},U=()=>{B({...DEFAULT_CRASH_FILTERS,types:new Set(DEFAULT_CRASH_FILTERS.types)})},G=()=>{q({...l,types:new Set(l.types)}),F()},A=()=>{B({...v,types:new Set(v.types)}),F()},K=ee(()=>{let r=H;if(W.trim().length>0){const i=W.toLowerCase();r=r.filter(k=>(k.message||"").toLowerCase().includes(i)||(k.name||"").toLowerCase().includes(i)||(k.stack||"").toLowerCase().includes(i))}if(l.types.size>0&&!l.types.has("all")&&(r=r.filter(i=>!!(l.types.has("fatal")&&i.isFatal||l.types.has("js")&&i.type==="js"||l.types.has("promise")&&i.type==="promise"||l.types.has("render")&&i.type==="render"||l.types.has("native")&&i.type==="native"))),l.timeWindow!=="all"){const i=Date.now(),k=l.timeWindow==="15m"?i-900*1e3:l.timeWindow==="1h"?i-3600*1e3:l.timeWindow==="24h"?i-1440*60*1e3:i-10080*60*1e3;r=r.filter(Z=>Z.timestamp>=k)}return l.platform!=="all"&&(r=r.filter(i=>(i.deviceInfo?.platform||"").toLowerCase()===l.platform)),l.engine!=="all"&&(r=r.filter(i=>{const k=i.deviceInfo?.isHermes;return l.engine==="hermes"?k===!0:k===!1||k===void 0})),r.length},[H,W,l]),X=l.types.has("all")||l.types.size===0,Y=[{key:"all",label:o("crash.filterTypeAll"),Icon:_,color:t.grayTextStrong},{key:"fatal",label:o("crash.filterFatal"),Icon:L,color:t.errorColor},{key:"js",label:o("crash.filterJsError"),Icon:Ve,color:t.sky600},{key:"promise",label:o("crash.filterPromise"),Icon:E,color:t.darkOrange},{key:"render",label:o("crash.filterRender"),Icon:We,color:t.purple},{key:"native",label:o("crash.filterNative"),Icon:ze,color:t.amber700}];return<Te visible={S}transparent animationType="fade"onRequestClose={A}>
|
|
2
|
+
<T style={e.backdrop}>
|
|
3
|
+
<Pe style={j.absoluteFill}onPress={A}/>
|
|
145
4
|
|
|
146
|
-
<
|
|
147
|
-
<
|
|
148
|
-
<
|
|
149
|
-
<
|
|
150
|
-
<
|
|
151
|
-
</
|
|
152
|
-
<
|
|
153
|
-
<
|
|
154
|
-
<
|
|
155
|
-
{
|
|
156
|
-
</
|
|
157
|
-
</
|
|
158
|
-
</
|
|
5
|
+
<T style={e.modalCard}>
|
|
6
|
+
<T style={e.header}>
|
|
7
|
+
<T style={{flexDirection:"row",alignItems:"center",gap:8}}>
|
|
8
|
+
<T style={e.headerIconBox}>
|
|
9
|
+
<_ color={t.brandPurple}size={15}/>
|
|
10
|
+
</T>
|
|
11
|
+
<T>
|
|
12
|
+
<P style={e.headerTitle}>{o("crash.filterTitle")}</P>
|
|
13
|
+
<P style={e.headerSubtitle}>
|
|
14
|
+
{o("crash.filterSubtitle")}
|
|
15
|
+
</P>
|
|
16
|
+
</T>
|
|
17
|
+
</T>
|
|
159
18
|
|
|
160
|
-
<
|
|
161
|
-
<
|
|
162
|
-
<
|
|
163
|
-
</
|
|
19
|
+
<T style={{flexDirection:"row",alignItems:"center",gap:8}}>
|
|
20
|
+
<V onPress={U}hitSlop={8}style={e.resetBtn}>
|
|
21
|
+
<P style={e.resetBtnText}>{o("crash.filterReset")}</P>
|
|
22
|
+
</V>
|
|
164
23
|
|
|
165
|
-
<
|
|
166
|
-
<
|
|
167
|
-
</
|
|
168
|
-
</
|
|
169
|
-
</
|
|
24
|
+
<V onPress={A}hitSlop={10}style={e.closeBtn}>
|
|
25
|
+
<Ie/>
|
|
26
|
+
</V>
|
|
27
|
+
</T>
|
|
28
|
+
</T>
|
|
170
29
|
|
|
171
|
-
<
|
|
172
|
-
<
|
|
173
|
-
<
|
|
174
|
-
<
|
|
175
|
-
<
|
|
176
|
-
{
|
|
177
|
-
</
|
|
178
|
-
</
|
|
179
|
-
<
|
|
180
|
-
{
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
styles.filterPillText,
|
|
190
|
-
isSelected && styles.filterPillTextActive,
|
|
191
|
-
]}>
|
|
192
|
-
{chip.label}
|
|
193
|
-
</Text>
|
|
194
|
-
</TouchableScale>);
|
|
195
|
-
})}
|
|
196
|
-
</View>
|
|
197
|
-
</View>
|
|
30
|
+
<Se style={{maxHeight:460}}contentContainerStyle={e.scrollContent}showsVerticalScrollIndicator={!0}>
|
|
31
|
+
<T style={e.section}>
|
|
32
|
+
<T style={e.sectionHeaderRow}>
|
|
33
|
+
<L color={t.grayTextWeak}size={12}/>
|
|
34
|
+
<P style={e.sectionTitle}>
|
|
35
|
+
{o("crash.filterTypeSection")}
|
|
36
|
+
</P>
|
|
37
|
+
</T>
|
|
38
|
+
<T style={e.chipsWrap}>
|
|
39
|
+
{Y.map(r=>{const i=r.key==="all"?X:l.types.has(r.key);return<C key={r.key}onPress={()=>J(r.key)}style={[e.filterPill,i&&e.filterPillActive]}>
|
|
40
|
+
{r.key==="all"&&i&&<Ae color={t.white}size={12}/>}
|
|
41
|
+
<r.Icon size={12}color={i?t.white:r.color}/>
|
|
42
|
+
<P style={[e.filterPillText,i&&e.filterPillTextActive]}>
|
|
43
|
+
{r.label}
|
|
44
|
+
</P>
|
|
45
|
+
</C>})}
|
|
46
|
+
</T>
|
|
47
|
+
</T>
|
|
198
48
|
|
|
199
|
-
<
|
|
200
|
-
<
|
|
201
|
-
<
|
|
202
|
-
<
|
|
203
|
-
{
|
|
204
|
-
</
|
|
205
|
-
</
|
|
206
|
-
<
|
|
207
|
-
{[
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
styles.filterPill,
|
|
215
|
-
draft.timeWindow === item.key && styles.filterPillActive,
|
|
216
|
-
]}>
|
|
217
|
-
<Text style={[
|
|
218
|
-
styles.filterPillText,
|
|
219
|
-
draft.timeWindow === item.key &&
|
|
220
|
-
styles.filterPillTextActive,
|
|
221
|
-
]}>
|
|
222
|
-
{item.label}
|
|
223
|
-
</Text>
|
|
224
|
-
</TouchableScale>))}
|
|
225
|
-
</View>
|
|
226
|
-
</View>
|
|
49
|
+
<T style={e.section}>
|
|
50
|
+
<T style={e.sectionHeaderRow}>
|
|
51
|
+
<O color={t.grayTextWeak}size={12}/>
|
|
52
|
+
<P style={e.sectionTitle}>
|
|
53
|
+
{o("crash.filterTimeSection")}
|
|
54
|
+
</P>
|
|
55
|
+
</T>
|
|
56
|
+
<T style={e.chipsWrap}>
|
|
57
|
+
{[{key:"all",label:o("crash.filterTimeAll")},{key:"15m",label:o("crash.filterTime15m")},{key:"1h",label:o("crash.filterTime1h")},{key:"24h",label:o("crash.filterTime24h")},{key:"7d",label:o("crash.filterTime7d")}].map(r=><C key={r.key}onPress={()=>N(r.key)}style={[e.filterPill,l.timeWindow===r.key&&e.filterPillActive]}>
|
|
58
|
+
<P style={[e.filterPillText,l.timeWindow===r.key&&e.filterPillTextActive]}>
|
|
59
|
+
{r.label}
|
|
60
|
+
</P>
|
|
61
|
+
</C>)}
|
|
62
|
+
</T>
|
|
63
|
+
</T>
|
|
227
64
|
|
|
228
|
-
<
|
|
229
|
-
<
|
|
230
|
-
<
|
|
231
|
-
<
|
|
232
|
-
{
|
|
233
|
-
</
|
|
234
|
-
</
|
|
235
|
-
<
|
|
236
|
-
<
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
styles.filterPillText,
|
|
242
|
-
draft.platform === 'all' && styles.filterPillTextActive,
|
|
243
|
-
]}>
|
|
244
|
-
{t('crash.filterPlatformAll')}
|
|
245
|
-
</Text>
|
|
246
|
-
</TouchableScale>
|
|
65
|
+
<T style={e.section}>
|
|
66
|
+
<T style={e.sectionHeaderRow}>
|
|
67
|
+
<M color={t.grayTextWeak}size={12}/>
|
|
68
|
+
<P style={e.sectionTitle}>
|
|
69
|
+
{o("crash.filterPlatformSection")}
|
|
70
|
+
</P>
|
|
71
|
+
</T>
|
|
72
|
+
<T style={e.chipsWrap}>
|
|
73
|
+
<C onPress={()=>z("all")}style={[e.filterPill,l.platform==="all"&&e.filterPillActive]}>
|
|
74
|
+
<P style={[e.filterPillText,l.platform==="all"&&e.filterPillTextActive]}>
|
|
75
|
+
{o("crash.filterPlatformAll")}
|
|
76
|
+
</P>
|
|
77
|
+
</C>
|
|
247
78
|
|
|
248
|
-
<
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
: AppColors.grayTextStrong}/>
|
|
255
|
-
<Text style={[
|
|
256
|
-
styles.filterPillText,
|
|
257
|
-
draft.platform === 'ios' && styles.filterPillTextActive,
|
|
258
|
-
]}>
|
|
259
|
-
{t('crash.filterPlatformIos')}
|
|
260
|
-
</Text>
|
|
261
|
-
</TouchableScale>
|
|
79
|
+
<C onPress={()=>z("ios")}style={[e.filterPill,l.platform==="ios"&&e.filterPillActive]}>
|
|
80
|
+
<M size={12}color={l.platform==="ios"?t.white:t.grayTextStrong}/>
|
|
81
|
+
<P style={[e.filterPillText,l.platform==="ios"&&e.filterPillTextActive]}>
|
|
82
|
+
{o("crash.filterPlatformIos")}
|
|
83
|
+
</P>
|
|
84
|
+
</C>
|
|
262
85
|
|
|
263
|
-
<
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
styles.filterPillText,
|
|
272
|
-
draft.platform === 'android' && styles.filterPillTextActive,
|
|
273
|
-
]}>
|
|
274
|
-
{t('crash.filterPlatformAndroid')}
|
|
275
|
-
</Text>
|
|
276
|
-
</TouchableScale>
|
|
277
|
-
</View>
|
|
278
|
-
</View>
|
|
86
|
+
<C onPress={()=>z("android")}style={[e.filterPill,l.platform==="android"&&e.filterPillActive]}>
|
|
87
|
+
<Re size={12}color={l.platform==="android"?t.white:t.greenColor}/>
|
|
88
|
+
<P style={[e.filterPillText,l.platform==="android"&&e.filterPillTextActive]}>
|
|
89
|
+
{o("crash.filterPlatformAndroid")}
|
|
90
|
+
</P>
|
|
91
|
+
</C>
|
|
92
|
+
</T>
|
|
93
|
+
</T>
|
|
279
94
|
|
|
280
|
-
<
|
|
281
|
-
<
|
|
282
|
-
|
|
283
|
-
<
|
|
284
|
-
{
|
|
285
|
-
</
|
|
286
|
-
</
|
|
287
|
-
<
|
|
288
|
-
<
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
styles.filterPillText,
|
|
294
|
-
draft.engine === 'all' && styles.filterPillTextActive,
|
|
295
|
-
]}>
|
|
296
|
-
{t('crash.filterEngineAll')}
|
|
297
|
-
</Text>
|
|
298
|
-
</TouchableScale>
|
|
95
|
+
<T style={e.section}>
|
|
96
|
+
<T style={e.sectionHeaderRow}>
|
|
97
|
+
<$ color={t.grayTextWeak}size={12}/>
|
|
98
|
+
<P style={e.sectionTitle}>
|
|
99
|
+
{o("crash.filterEngineSection")}
|
|
100
|
+
</P>
|
|
101
|
+
</T>
|
|
102
|
+
<T style={e.chipsWrap}>
|
|
103
|
+
<C onPress={()=>R("all")}style={[e.filterPill,l.engine==="all"&&e.filterPillActive]}>
|
|
104
|
+
<P style={[e.filterPillText,l.engine==="all"&&e.filterPillTextActive]}>
|
|
105
|
+
{o("crash.filterEngineAll")}
|
|
106
|
+
</P>
|
|
107
|
+
</C>
|
|
299
108
|
|
|
300
|
-
<
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
: AppColors.brandPurple}/>
|
|
307
|
-
<Text style={[
|
|
308
|
-
styles.filterPillText,
|
|
309
|
-
draft.engine === 'hermes' && styles.filterPillTextActive,
|
|
310
|
-
]}>
|
|
311
|
-
{t('crash.filterEngineHermes')}
|
|
312
|
-
</Text>
|
|
313
|
-
</TouchableScale>
|
|
109
|
+
<C onPress={()=>R("hermes")}style={[e.filterPill,l.engine==="hermes"&&e.filterPillActive]}>
|
|
110
|
+
<$ size={12}color={l.engine==="hermes"?t.white:t.brandPurple}/>
|
|
111
|
+
<P style={[e.filterPillText,l.engine==="hermes"&&e.filterPillTextActive]}>
|
|
112
|
+
{o("crash.filterEngineHermes")}
|
|
113
|
+
</P>
|
|
114
|
+
</C>
|
|
314
115
|
|
|
315
|
-
<
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
]}>
|
|
323
|
-
{t('crash.jsc')}
|
|
324
|
-
</Text>
|
|
325
|
-
</TouchableScale>
|
|
326
|
-
</View>
|
|
327
|
-
</View>
|
|
116
|
+
<C onPress={()=>R("jsc")}style={[e.filterPill,l.engine==="jsc"&&e.filterPillActive]}>
|
|
117
|
+
<P style={[e.filterPillText,l.engine==="jsc"&&e.filterPillTextActive]}>
|
|
118
|
+
{o("crash.jsc")}
|
|
119
|
+
</P>
|
|
120
|
+
</C>
|
|
121
|
+
</T>
|
|
122
|
+
</T>
|
|
328
123
|
|
|
329
|
-
<
|
|
330
|
-
<
|
|
331
|
-
<
|
|
332
|
-
<
|
|
333
|
-
{
|
|
334
|
-
</
|
|
335
|
-
</
|
|
336
|
-
<
|
|
337
|
-
<
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
: AppColors.grayText}/>
|
|
344
|
-
<Text style={[
|
|
345
|
-
styles.filterPillText,
|
|
346
|
-
draft.sortBy === 'time_desc' &&
|
|
347
|
-
styles.filterPillTextActive,
|
|
348
|
-
]}>
|
|
349
|
-
{t('crash.filterSortNewest')}
|
|
350
|
-
</Text>
|
|
351
|
-
</TouchableScale>
|
|
124
|
+
<T style={e.section}>
|
|
125
|
+
<T style={e.sectionHeaderRow}>
|
|
126
|
+
<O color={t.grayTextWeak}size={12}/>
|
|
127
|
+
<P style={e.sectionTitle}>
|
|
128
|
+
{o("crash.filterSortSection")}
|
|
129
|
+
</P>
|
|
130
|
+
</T>
|
|
131
|
+
<T style={e.chipsWrap}>
|
|
132
|
+
<C onPress={()=>D("time_desc")}style={[e.filterPill,l.sortBy==="time_desc"&&e.filterPillActive]}>
|
|
133
|
+
<O size={12}color={l.sortBy==="time_desc"?t.white:t.grayText}/>
|
|
134
|
+
<P style={[e.filterPillText,l.sortBy==="time_desc"&&e.filterPillTextActive]}>
|
|
135
|
+
{o("crash.filterSortNewest")}
|
|
136
|
+
</P>
|
|
137
|
+
</C>
|
|
352
138
|
|
|
353
|
-
<
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
draft.sortBy === 'time_asc' &&
|
|
363
|
-
styles.filterPillTextActive,
|
|
364
|
-
]}>
|
|
365
|
-
{t('crash.filterSortOldest')}
|
|
366
|
-
</Text>
|
|
367
|
-
</TouchableScale>
|
|
368
|
-
</View>
|
|
369
|
-
</View>
|
|
370
|
-
</ScrollView>
|
|
139
|
+
<C onPress={()=>D("time_asc")}style={[e.filterPill,l.sortBy==="time_asc"&&e.filterPillActive]}>
|
|
140
|
+
<E size={12}color={l.sortBy==="time_asc"?t.white:t.grayText}/>
|
|
141
|
+
<P style={[e.filterPillText,l.sortBy==="time_asc"&&e.filterPillTextActive]}>
|
|
142
|
+
{o("crash.filterSortOldest")}
|
|
143
|
+
</P>
|
|
144
|
+
</C>
|
|
145
|
+
</T>
|
|
146
|
+
</T>
|
|
147
|
+
</Se>
|
|
371
148
|
|
|
372
|
-
<
|
|
373
|
-
<
|
|
374
|
-
<
|
|
375
|
-
{
|
|
376
|
-
</
|
|
377
|
-
</
|
|
149
|
+
<T style={e.footer}>
|
|
150
|
+
<V onPress={A}style={e.discardBtn}activeOpacity={.8}>
|
|
151
|
+
<P style={e.discardBtnText}>
|
|
152
|
+
{o("crash.filterDiscard")}
|
|
153
|
+
</P>
|
|
154
|
+
</V>
|
|
378
155
|
|
|
379
|
-
<
|
|
380
|
-
<
|
|
381
|
-
{
|
|
382
|
-
</
|
|
383
|
-
</
|
|
384
|
-
</
|
|
385
|
-
</
|
|
386
|
-
</
|
|
387
|
-
</
|
|
388
|
-
};
|
|
389
|
-
const styles = StyleSheet.create({
|
|
390
|
-
backdrop: {
|
|
391
|
-
flex: 1,
|
|
392
|
-
backgroundColor: `${AppColors.primaryBlack}85`,
|
|
393
|
-
justifyContent: 'center',
|
|
394
|
-
alignItems: 'center',
|
|
395
|
-
padding: 16,
|
|
396
|
-
},
|
|
397
|
-
modalCard: {
|
|
398
|
-
width: '100%',
|
|
399
|
-
maxWidth: 440,
|
|
400
|
-
backgroundColor: AppColors.white,
|
|
401
|
-
borderRadius: 14,
|
|
402
|
-
borderWidth: 1,
|
|
403
|
-
borderColor: AppColors.dividerColor,
|
|
404
|
-
shadowColor: AppColors.black,
|
|
405
|
-
shadowOpacity: 0.18,
|
|
406
|
-
shadowRadius: 12,
|
|
407
|
-
shadowOffset: { width: 0, height: 4 },
|
|
408
|
-
elevation: 8,
|
|
409
|
-
overflow: 'hidden',
|
|
410
|
-
},
|
|
411
|
-
header: {
|
|
412
|
-
flexDirection: 'row',
|
|
413
|
-
alignItems: 'center',
|
|
414
|
-
justifyContent: 'space-between',
|
|
415
|
-
paddingHorizontal: 14,
|
|
416
|
-
paddingVertical: 12,
|
|
417
|
-
borderBottomWidth: 1,
|
|
418
|
-
borderBottomColor: AppColors.dividerColor,
|
|
419
|
-
backgroundColor: `${AppColors.brandPurple}08`,
|
|
420
|
-
},
|
|
421
|
-
headerIconBox: {
|
|
422
|
-
width: 28,
|
|
423
|
-
height: 28,
|
|
424
|
-
borderRadius: 7,
|
|
425
|
-
backgroundColor: `${AppColors.brandPurple}18`,
|
|
426
|
-
alignItems: 'center',
|
|
427
|
-
justifyContent: 'center',
|
|
428
|
-
},
|
|
429
|
-
headerTitle: {
|
|
430
|
-
fontFamily: AppFonts.interBold,
|
|
431
|
-
fontSize: 13.5,
|
|
432
|
-
color: AppColors.primaryBlack,
|
|
433
|
-
},
|
|
434
|
-
headerSubtitle: {
|
|
435
|
-
fontFamily: AppFonts.interMedium,
|
|
436
|
-
fontSize: 10,
|
|
437
|
-
color: AppColors.grayTextWeak,
|
|
438
|
-
},
|
|
439
|
-
resetBtn: {
|
|
440
|
-
paddingHorizontal: 8,
|
|
441
|
-
paddingVertical: 4,
|
|
442
|
-
borderRadius: 5,
|
|
443
|
-
backgroundColor: `${AppColors.darkOrange}14`,
|
|
444
|
-
borderWidth: 1,
|
|
445
|
-
borderColor: `${AppColors.darkOrange}30`,
|
|
446
|
-
},
|
|
447
|
-
resetBtnText: {
|
|
448
|
-
fontFamily: AppFonts.interBold,
|
|
449
|
-
fontSize: 10,
|
|
450
|
-
color: AppColors.darkOrange,
|
|
451
|
-
},
|
|
452
|
-
closeBtn: {
|
|
453
|
-
width: 24,
|
|
454
|
-
height: 24,
|
|
455
|
-
borderRadius: 12,
|
|
456
|
-
backgroundColor: `${AppColors.primaryBlack}18`,
|
|
457
|
-
alignItems: 'center',
|
|
458
|
-
justifyContent: 'center',
|
|
459
|
-
},
|
|
460
|
-
scrollContent: {
|
|
461
|
-
padding: 14,
|
|
462
|
-
gap: 14,
|
|
463
|
-
},
|
|
464
|
-
section: {
|
|
465
|
-
gap: 7,
|
|
466
|
-
},
|
|
467
|
-
sectionHeaderRow: {
|
|
468
|
-
flexDirection: 'row',
|
|
469
|
-
alignItems: 'center',
|
|
470
|
-
gap: 5,
|
|
471
|
-
},
|
|
472
|
-
sectionTitle: {
|
|
473
|
-
fontFamily: AppFonts.interBold,
|
|
474
|
-
fontSize: 9.5,
|
|
475
|
-
color: AppColors.grayTextWeak,
|
|
476
|
-
letterSpacing: 0.5,
|
|
477
|
-
},
|
|
478
|
-
chipsWrap: {
|
|
479
|
-
flexDirection: 'row',
|
|
480
|
-
flexWrap: 'wrap',
|
|
481
|
-
gap: 6.5,
|
|
482
|
-
},
|
|
483
|
-
filterPill: {
|
|
484
|
-
flexDirection: 'row',
|
|
485
|
-
alignItems: 'center',
|
|
486
|
-
gap: 5,
|
|
487
|
-
paddingHorizontal: 9,
|
|
488
|
-
paddingVertical: 5.5,
|
|
489
|
-
borderRadius: 7,
|
|
490
|
-
backgroundColor: AppColors.grayBackground,
|
|
491
|
-
borderWidth: 1,
|
|
492
|
-
borderColor: AppColors.dividerColor,
|
|
493
|
-
},
|
|
494
|
-
filterPillActive: {
|
|
495
|
-
backgroundColor: AppColors.brandPurple,
|
|
496
|
-
borderColor: AppColors.brandPurple,
|
|
497
|
-
shadowColor: AppColors.brandPurple,
|
|
498
|
-
shadowOffset: { width: 0, height: 1 },
|
|
499
|
-
shadowOpacity: 0.25,
|
|
500
|
-
shadowRadius: 3,
|
|
501
|
-
elevation: 2,
|
|
502
|
-
},
|
|
503
|
-
filterPillText: {
|
|
504
|
-
fontFamily: AppFonts.interMedium,
|
|
505
|
-
fontSize: 11,
|
|
506
|
-
color: AppColors.primaryBlack,
|
|
507
|
-
},
|
|
508
|
-
filterPillTextActive: {
|
|
509
|
-
color: AppColors.white,
|
|
510
|
-
fontFamily: AppFonts.interBold,
|
|
511
|
-
},
|
|
512
|
-
footer: {
|
|
513
|
-
flexDirection: 'row',
|
|
514
|
-
alignItems: 'center',
|
|
515
|
-
gap: 10,
|
|
516
|
-
paddingHorizontal: 14,
|
|
517
|
-
paddingVertical: 12,
|
|
518
|
-
borderTopWidth: 1,
|
|
519
|
-
borderTopColor: AppColors.dividerColor,
|
|
520
|
-
backgroundColor: AppColors.grayBackground,
|
|
521
|
-
},
|
|
522
|
-
discardBtn: {
|
|
523
|
-
flex: 1,
|
|
524
|
-
paddingVertical: 9.5,
|
|
525
|
-
borderRadius: 8,
|
|
526
|
-
borderWidth: 1,
|
|
527
|
-
borderColor: AppColors.dividerColor,
|
|
528
|
-
backgroundColor: AppColors.white,
|
|
529
|
-
alignItems: 'center',
|
|
530
|
-
justifyContent: 'center',
|
|
531
|
-
},
|
|
532
|
-
discardBtnText: {
|
|
533
|
-
fontFamily: AppFonts.interBold,
|
|
534
|
-
fontSize: 12.5,
|
|
535
|
-
color: AppColors.grayTextStrong,
|
|
536
|
-
},
|
|
537
|
-
applyBtn: {
|
|
538
|
-
flex: 2,
|
|
539
|
-
backgroundColor: AppColors.brandPurple,
|
|
540
|
-
paddingVertical: 9.5,
|
|
541
|
-
borderRadius: 8,
|
|
542
|
-
alignItems: 'center',
|
|
543
|
-
justifyContent: 'center',
|
|
544
|
-
shadowColor: AppColors.brandPurple,
|
|
545
|
-
shadowOffset: { width: 0, height: 1 },
|
|
546
|
-
shadowOpacity: 0.25,
|
|
547
|
-
shadowRadius: 3,
|
|
548
|
-
elevation: 2,
|
|
549
|
-
},
|
|
550
|
-
applyBtnText: {
|
|
551
|
-
fontFamily: AppFonts.interBold,
|
|
552
|
-
fontSize: 12.5,
|
|
553
|
-
color: AppColors.white,
|
|
554
|
-
},
|
|
555
|
-
});
|
|
556
|
-
export default CrashFilterModal;
|
|
156
|
+
<V onPress={G}style={e.applyBtn}activeOpacity={.85}>
|
|
157
|
+
<P style={e.applyBtnText}>
|
|
158
|
+
{o("crash.filterApply",{count:K})}
|
|
159
|
+
</P>
|
|
160
|
+
</V>
|
|
161
|
+
</T>
|
|
162
|
+
</T>
|
|
163
|
+
</T>
|
|
164
|
+
</Te>},e=j.create({backdrop:{flex:1,backgroundColor:`${t.primaryBlack}85`,justifyContent:"center",alignItems:"center",padding:16},modalCard:{width:"100%",maxWidth:440,backgroundColor:t.white,borderRadius:14,borderWidth:1,borderColor:t.dividerColor,shadowColor:t.black,shadowOpacity:.18,shadowRadius:12,shadowOffset:{width:0,height:4},elevation:8,overflow:"hidden"},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:14,paddingVertical:12,borderBottomWidth:1,borderBottomColor:t.dividerColor,backgroundColor:`${t.brandPurple}08`},headerIconBox:{width:28,height:28,borderRadius:7,backgroundColor:`${t.brandPurple}18`,alignItems:"center",justifyContent:"center"},headerTitle:{fontFamily:I.interBold,fontSize:13.5,color:t.primaryBlack},headerSubtitle:{fontFamily:I.interMedium,fontSize:10,color:t.grayTextWeak},resetBtn:{paddingHorizontal:8,paddingVertical:4,borderRadius:5,backgroundColor:`${t.darkOrange}14`,borderWidth:1,borderColor:`${t.darkOrange}30`},resetBtnText:{fontFamily:I.interBold,fontSize:10,color:t.darkOrange},closeBtn:{width:24,height:24,borderRadius:12,backgroundColor:`${t.primaryBlack}18`,alignItems:"center",justifyContent:"center"},scrollContent:{padding:14,gap:14},section:{gap:7},sectionHeaderRow:{flexDirection:"row",alignItems:"center",gap:5},sectionTitle:{fontFamily:I.interBold,fontSize:9.5,color:t.grayTextWeak,letterSpacing:.5},chipsWrap:{flexDirection:"row",flexWrap:"wrap",gap:6.5},filterPill:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:9,paddingVertical:5.5,borderRadius:7,backgroundColor:t.grayBackground,borderWidth:1,borderColor:t.dividerColor},filterPillActive:{backgroundColor:t.brandPurple,borderColor:t.brandPurple,shadowColor:t.brandPurple,shadowOffset:{width:0,height:1},shadowOpacity:.25,shadowRadius:3,elevation:2},filterPillText:{fontFamily:I.interMedium,fontSize:11,color:t.primaryBlack},filterPillTextActive:{color:t.white,fontFamily:I.interBold},footer:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:14,paddingVertical:12,borderTopWidth:1,borderTopColor:t.dividerColor,backgroundColor:t.grayBackground},discardBtn:{flex:1,paddingVertical:9.5,borderRadius:8,borderWidth:1,borderColor:t.dividerColor,backgroundColor:t.white,alignItems:"center",justifyContent:"center"},discardBtnText:{fontFamily:I.interBold,fontSize:12.5,color:t.grayTextStrong},applyBtn:{flex:2,backgroundColor:t.brandPurple,paddingVertical:9.5,borderRadius:8,alignItems:"center",justifyContent:"center",shadowColor:t.brandPurple,shadowOffset:{width:0,height:1},shadowOpacity:.25,shadowRadius:3,elevation:2},applyBtnText:{fontFamily:I.interBold,fontSize:12.5,color:t.white}});export default Oe;
|