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,940 +1,332 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { FlatList, Platform, Pressable, Text, TextInput, TouchableOpacity, View, } from 'react-native';
|
|
3
|
-
import { animateNextLayout, useInspector } from './InspectorContext';
|
|
4
|
-
import AnalyticsEventCard from '../AnalyticsEventCard';
|
|
5
|
-
import AnalyticsFilterModal from './AnalyticsFilterModal';
|
|
6
|
-
import EndOfListFooter from '../EndOfListFooter';
|
|
7
|
-
import EmptyState from '../EmptyState';
|
|
8
|
-
import styles from '../../styles';
|
|
9
|
-
import { AppColors } from '../../styles/AppColors';
|
|
10
|
-
import { AppFonts } from '../../styles/AppFonts';
|
|
11
|
-
import { useTranslation } from '../../i18n';
|
|
12
|
-
import Svg, { Path, Rect, Line, Circle, G, Defs, LinearGradient as SvgLinearGradient, Stop, } from 'react-native-svg';
|
|
13
|
-
import TouchableScale from '../TouchableScale';
|
|
14
|
-
import { getCurrentUserId, getCurrentUserProperties, getDefaultEventParameters, getCollectionEnabled, } from '../../customHooks/analyticsLogger';
|
|
15
|
-
import { getEventCategory, } from '../../helpers';
|
|
16
|
-
import { LayersIcon, SearchIcon, ClearIcon, TrashIcon, HeaderPauseIcon, FilterIcon, CartIcon, GlobeIcon, BoltIcon, SparkleIcon, PinIcon, MoneyIcon, } from '../NetworkIcons';
|
|
17
|
-
const AnalyticsHeader = React.memo(() => {
|
|
18
|
-
const { t } = useTranslation();
|
|
19
|
-
const { analyticsEvents, filteredAnalyticsEvents, analyticsFilters, setAnalyticsFilters, analyticsHeaderExpanded, setAnalyticsHeaderExpanded, } = useInspector();
|
|
20
|
-
const userId = getCurrentUserId();
|
|
21
|
-
const userProperties = getCurrentUserProperties();
|
|
22
|
-
const defaultParams = getDefaultEventParameters();
|
|
23
|
-
const isTrackingEnabled = getCollectionEnabled();
|
|
24
|
-
if (analyticsEvents.length === 0) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
const hasUserProps = Object.keys(userProperties).length > 0;
|
|
28
|
-
const hasDefaultParams = Object.keys(defaultParams).length > 0;
|
|
29
|
-
const totalEvents = filteredAnalyticsEvents.length;
|
|
30
|
-
const categoryStats = useMemo(() => {
|
|
31
|
-
let ecommerce = 0;
|
|
32
|
-
let page_view = 0;
|
|
33
|
-
let system = 0;
|
|
34
|
-
let custom = 0;
|
|
35
|
-
let totalRevenue = 0;
|
|
36
|
-
for (const e of analyticsEvents) {
|
|
37
|
-
const cat = getEventCategory(e.name);
|
|
38
|
-
const c = e.count || 1;
|
|
39
|
-
if (cat === 'ecommerce') {
|
|
40
|
-
ecommerce += c;
|
|
41
|
-
const val = e.params?.value ?? e.params?.price;
|
|
42
|
-
if (val && !isNaN(Number(val))) {
|
|
43
|
-
totalRevenue += Number(val);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
else if (cat === 'page_view') {
|
|
47
|
-
page_view += c;
|
|
48
|
-
}
|
|
49
|
-
else if (cat === 'system') {
|
|
50
|
-
system += c;
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
custom += c;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
const total = ecommerce + page_view + system + custom || 1;
|
|
57
|
-
return {
|
|
58
|
-
ecommerce,
|
|
59
|
-
page_view,
|
|
60
|
-
system,
|
|
61
|
-
custom,
|
|
62
|
-
totalRevenue,
|
|
63
|
-
ecommercePct: Math.round((ecommerce / total) * 100),
|
|
64
|
-
page_viewPct: Math.round((page_view / total) * 100),
|
|
65
|
-
systemPct: Math.round((system / total) * 100),
|
|
66
|
-
customPct: Math.round((custom / total) * 100),
|
|
67
|
-
totalCount: total,
|
|
68
|
-
};
|
|
69
|
-
}, [analyticsEvents]);
|
|
70
|
-
const topScreens = useMemo(() => {
|
|
71
|
-
const screenMap = new Map();
|
|
72
|
-
for (const e of filteredAnalyticsEvents) {
|
|
73
|
-
const scr = e.screenName ||
|
|
74
|
-
e.params?.firebase_screen ||
|
|
75
|
-
e.params?.screen_name ||
|
|
76
|
-
e.params?.firebase_screen_class ||
|
|
77
|
-
e.screenClass;
|
|
78
|
-
if (scr && typeof scr === 'string' && scr.trim() !== '') {
|
|
79
|
-
screenMap.set(scr, (screenMap.get(scr) || 0) + (e.count || 1));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const arr = Array.from(screenMap.entries()).sort((a, b) => b[1] - a[1]);
|
|
83
|
-
const maxVal = arr.length > 0 ? arr[0][1] : 1;
|
|
84
|
-
return arr.slice(0, 3).map(([name, count]) => ({
|
|
85
|
-
name,
|
|
86
|
-
count,
|
|
87
|
-
pct: Math.round((count / (filteredAnalyticsEvents.length || 1)) * 100),
|
|
88
|
-
barWidthPct: Math.round((count / maxVal) * 100),
|
|
89
|
-
}));
|
|
90
|
-
}, [filteredAnalyticsEvents]);
|
|
91
|
-
const toggleCategoryFilter = (cat) => {
|
|
92
|
-
animateNextLayout();
|
|
93
|
-
setAnalyticsFilters(prev => {
|
|
94
|
-
if (cat === 'all') {
|
|
95
|
-
return { ...prev, categories: new Set(['all']) };
|
|
96
|
-
}
|
|
97
|
-
const nextCategories = new Set(prev.categories);
|
|
98
|
-
if (nextCategories.has('all')) {
|
|
99
|
-
nextCategories.delete('all');
|
|
100
|
-
nextCategories.add(cat);
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
if (nextCategories.has(cat)) {
|
|
104
|
-
nextCategories.delete(cat);
|
|
105
|
-
if (nextCategories.size === 0) {
|
|
106
|
-
nextCategories.add('all');
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
nextCategories.add(cat);
|
|
111
|
-
if (nextCategories.has('ecommerce') &&
|
|
112
|
-
nextCategories.has('page_view') &&
|
|
113
|
-
nextCategories.has('system') &&
|
|
114
|
-
nextCategories.has('custom')) {
|
|
115
|
-
return { ...prev, categories: new Set(['all']) };
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return { ...prev, categories: nextCategories };
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
const BUCKET_COUNT = 12;
|
|
123
|
-
const chartHeight = 64;
|
|
124
|
-
const svgWidth = 320;
|
|
125
|
-
const [selectedBucketIdx, setSelectedBucketIdx] = useState(null);
|
|
126
|
-
const [liveTick, setLiveTick] = useState(0);
|
|
127
|
-
useEffect(() => {
|
|
128
|
-
if (!isTrackingEnabled)
|
|
129
|
-
return;
|
|
130
|
-
const interval = setInterval(() => {
|
|
131
|
-
setLiveTick(t => (t + 1) % 100000);
|
|
132
|
-
}, 1000);
|
|
133
|
-
return () => clearInterval(interval);
|
|
134
|
-
}, [isTrackingEnabled]);
|
|
135
|
-
const histogramData = useMemo(() => {
|
|
136
|
-
const buckets = [];
|
|
137
|
-
const now = Date.now();
|
|
138
|
-
const windowMs = 60000;
|
|
139
|
-
const bucketDuration = windowMs / BUCKET_COUNT;
|
|
140
|
-
for (let i = 0; i < BUCKET_COUNT; i++) {
|
|
141
|
-
const bucketAgeSec = Math.round(((BUCKET_COUNT - 1 - i) * bucketDuration) / 1000);
|
|
142
|
-
buckets.push({
|
|
143
|
-
index: i,
|
|
144
|
-
ecommerce: 0,
|
|
145
|
-
page_view: 0,
|
|
146
|
-
system: 0,
|
|
147
|
-
custom: 0,
|
|
148
|
-
total: 0,
|
|
149
|
-
x: (i / (BUCKET_COUNT - 1)) * (svgWidth - 24) + 12,
|
|
150
|
-
y: chartHeight - 12,
|
|
151
|
-
isLatest: i === BUCKET_COUNT - 1,
|
|
152
|
-
ageLabel: i === BUCKET_COUNT - 1 ? t('analytics.timeNow') : `-${bucketAgeSec}s`,
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
for (const e of filteredAnalyticsEvents) {
|
|
156
|
-
const age = now - e.timestamp;
|
|
157
|
-
if (age >= 0 && age < windowMs) {
|
|
158
|
-
const bucketIdx = Math.floor((windowMs - 1 - age) / bucketDuration);
|
|
159
|
-
if (bucketIdx >= 0 && bucketIdx < BUCKET_COUNT) {
|
|
160
|
-
const cat = getEventCategory(e.name);
|
|
161
|
-
const c = e.count || 1;
|
|
162
|
-
buckets[bucketIdx].total += c;
|
|
163
|
-
if (cat === 'ecommerce')
|
|
164
|
-
buckets[bucketIdx].ecommerce += c;
|
|
165
|
-
else if (cat === 'page_view')
|
|
166
|
-
buckets[bucketIdx].page_view += c;
|
|
167
|
-
else if (cat === 'system')
|
|
168
|
-
buckets[bucketIdx].system += c;
|
|
169
|
-
else
|
|
170
|
-
buckets[bucketIdx].custom += c;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
const maxVal = Math.max(...buckets.map(b => b.total), 4);
|
|
175
|
-
buckets.forEach(b => {
|
|
176
|
-
const normalizedH = (b.total / maxVal) * (chartHeight - 22);
|
|
177
|
-
b.y = chartHeight - 10 - normalizedH;
|
|
178
|
-
});
|
|
179
|
-
let linePath = `M ${buckets[0].x.toFixed(1)} ${buckets[0].y.toFixed(1)}`;
|
|
180
|
-
for (let i = 0; i < buckets.length - 1; i++) {
|
|
181
|
-
const p0 = buckets[Math.max(0, i - 1)];
|
|
182
|
-
const p1 = buckets[i];
|
|
183
|
-
const p2 = buckets[i + 1];
|
|
184
|
-
const p3 = buckets[Math.min(buckets.length - 1, i + 2)];
|
|
185
|
-
const cp1x = p1.x + (p2.x - p0.x) / 6;
|
|
186
|
-
const cp1y = p1.y + (p2.y - p0.y) / 6;
|
|
187
|
-
const cp2x = p2.x - (p3.x - p1.x) / 6;
|
|
188
|
-
const cp2y = p2.y - (p3.y - p1.y) / 6;
|
|
189
|
-
linePath += ` C ${cp1x.toFixed(1)} ${cp1y.toFixed(1)}, ${cp2x.toFixed(1)} ${cp2y.toFixed(1)}, ${p2.x.toFixed(1)} ${p2.y.toFixed(1)}`;
|
|
190
|
-
}
|
|
191
|
-
const lastB = buckets[buckets.length - 1];
|
|
192
|
-
const firstB = buckets[0];
|
|
193
|
-
const areaPath = `${linePath} L ${lastB.x.toFixed(1)} ${chartHeight - 4} L ${firstB.x.toFixed(1)} ${chartHeight - 4} Z`;
|
|
194
|
-
const peakVal = Math.max(...buckets.map(b => b.total), 0);
|
|
195
|
-
const eventRate = Math.round(buckets.reduce((a, b) => a + b.total, 0));
|
|
196
|
-
return {
|
|
197
|
-
buckets,
|
|
198
|
-
linePath,
|
|
199
|
-
areaPath,
|
|
200
|
-
peakVal,
|
|
201
|
-
eventRate,
|
|
202
|
-
};
|
|
203
|
-
}, [filteredAnalyticsEvents, chartHeight, svgWidth, liveTick, t]);
|
|
204
|
-
const selectedBucket = selectedBucketIdx != null ? histogramData.buckets[selectedBucketIdx] : null;
|
|
205
|
-
return (<View style={styles.analyticsHeaderCard}>
|
|
1
|
+
import We,{useCallback as Le,useState as De,useMemo as Ee,useEffect as et,useRef as tt}from"react";import{FlatList as Ct,Platform as kt,Pressable as Tt,ScrollView as St,Text as S,TextInput as Vt,TouchableOpacity as Ce,View as C}from"react-native";import{animateNextLayout as Ae,useInspector as Ne}from"./InspectorContext";import Ft from"../AnalyticsEventCard";import Bt from"./AnalyticsFilterModal";import It from"../EndOfListFooter";import Pt from"../EmptyState";import k from"../../styles";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as V}from"../../styles/AppFonts";import{useTranslation as _e}from"../../i18n";import Ot,{Path as Ge,Rect as Ue,Line as Me,Circle as Ke,G as Je,Defs as Rt,LinearGradient as Qe,Stop as Fe}from"react-native-svg";import Be from"../TouchableScale";import{getCurrentUserId as Dt,getCurrentUserProperties as Et,getDefaultEventParameters as $t,getCollectionEnabled as Lt}from"../../customHooks/analyticsLogger";import{getEventCategory as He}from"../../helpers";import{LayersIcon as At,SearchIcon as Mt,ClearIcon as Ht,TrashIcon as Wt,HeaderPauseIcon as Nt,FilterIcon as _t,CartIcon as Gt,GlobeIcon as Ut,BoltIcon as Kt,SparkleIcon as Jt,PinIcon as Qt,MoneyIcon as Xt,ChevronIcon as Yt}from"../NetworkIcons";const Zt=We.memo(()=>{const{t:I}=_e(),{analyticsEvents:Q,filteredAnalyticsEvents:R,analyticsHeaderExpanded:E,setAnalyticsHeaderExpanded:ke}=Ne(),[$,Ie]=De(!1),Pe=Dt(),Te=Et(),X=$t(),N=Lt();if(Q.length===0)return null;const Se=Object.keys(Te).length>0,ze=Object.keys(X).length>0,G=R.length,Y=Ee(()=>{let t=0,T=0;for(const P of Q){const F=He(P.name),B=P.count||1;if(F==="ecommerce"){t+=B;const D=P.params?.value??P.params?.price;D&&!isNaN(Number(D))&&(T+=Number(D))}}return{ecommerce:t,totalRevenue:T}},[Q]),Oe=Ee(()=>{const t=new Map;for(const F of R){const B=F.screenName||F.params?.firebase_screen||F.params?.screen_name||F.params?.firebase_screen_class||F.screenClass;B&&typeof B=="string"&&B.trim()!==""&&t.set(B,(t.get(B)||0)+(F.count||1))}const T=Array.from(t.entries()).sort((F,B)=>B[1]-F[1]),P=T.length>0?T[0][1]:1;return T.slice(0,3).map(([F,B])=>({name:F,count:B,pct:Math.round(B/(R.length||1)*100),barWidthPct:Math.round(B/P*100)}))},[R]),M=12,z=64,j=320,[U,K]=De(null),[J,$e]=De(0);et(()=>{if(!N)return;const t=setInterval(()=>{$e(T=>(T+1)%1e5)},1e3);return()=>clearInterval(t)},[N]);const O=Ee(()=>{const t=[],T=Date.now(),P=6e4,F=P/M;for(let v=0;v<M;v++){const L=Math.round((M-1-v)*F/1e3);t.push({index:v,ecommerce:0,page_view:0,system:0,custom:0,total:0,x:v/(M-1)*(j-24)+12,y:z-12,isLatest:v===M-1,ageLabel:v===M-1?I("analytics.timeNow"):`-${L}s`})}for(const v of R){const L=T-v.timestamp;if(L>=0&&L<P){const A=Math.floor((P-1-L)/F);if(A>=0&&A<M){const W=He(v.name),_=v.count||1;t[A].total+=_,W==="ecommerce"?t[A].ecommerce+=_:W==="page_view"?t[A].page_view+=_:W==="system"?t[A].system+=_:t[A].custom+=_}}}const B=Math.max(...t.map(v=>v.total),4);t.forEach(v=>{const L=v.total/B*(z-22);v.y=z-10-L});let D=`M ${t[0].x.toFixed(1)} ${t[0].y.toFixed(1)}`;for(let v=0;v<t.length-1;v++){const L=t[Math.max(0,v-1)],A=t[v],W=t[v+1],_=t[Math.min(t.length-1,v+2)],Xe=A.x+(W.x-L.x)/6,Ye=A.y+(W.y-L.y)/6,Ze=W.x-(_.x-A.x)/6,qe=W.y-(_.y-A.y)/6;D+=` C ${Xe.toFixed(1)} ${Ye.toFixed(1)}, ${Ze.toFixed(1)} ${qe.toFixed(1)}, ${W.x.toFixed(1)} ${W.y.toFixed(1)}`}const H=t[t.length-1],Z=t[0],ve=`${D} L ${H.x.toFixed(1)} ${z-4} L ${Z.x.toFixed(1)} ${z-4} Z`,Ve=Math.max(...t.map(v=>v.total),0),Re=Math.round(t.reduce((v,L)=>v+L.total,0));return{buckets:t,linePath:D,areaPath:ve,peakVal:Ve,eventRate:Re}},[R,z,j,J,I]),o=U!=null?O.buckets[U]:null;return<C style={k.analyticsHeaderCard}>
|
|
206
2
|
|
|
207
|
-
<
|
|
208
|
-
<
|
|
209
|
-
<
|
|
210
|
-
<
|
|
211
|
-
<
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
styles.statusText,
|
|
221
|
-
{
|
|
222
|
-
color: isTrackingEnabled
|
|
223
|
-
? AppColors.greenColor
|
|
224
|
-
: AppColors.errorColor,
|
|
225
|
-
fontFamily: AppFonts.interBold,
|
|
226
|
-
},
|
|
227
|
-
]}>
|
|
228
|
-
{isTrackingEnabled ? t('performance.live') : t('common.pause')}
|
|
229
|
-
</Text>
|
|
230
|
-
</View>
|
|
231
|
-
<Text style={styles.analyticsHeaderSubtitle} numberOfLines={1}>
|
|
232
|
-
{userId ? `${t('analytics.userId')}: ${userId}` : t('analytics.emptySubtitle')}
|
|
233
|
-
</Text>
|
|
234
|
-
</View>
|
|
3
|
+
<Ce activeOpacity={.7}onPress={()=>{Ae(),Ie(t=>!t)}}style={{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:2}}>
|
|
4
|
+
<C style={{flex:1}}>
|
|
5
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
6
|
+
<S style={k.analyticsHeaderTitle}>{I("analytics.realtimeStream")}</S>
|
|
7
|
+
<C style={[k.statusDot,{backgroundColor:N?e.greenColor:e.errorColor}]}/>
|
|
8
|
+
<S style={[k.statusText,{color:N?e.greenColor:e.errorColor,fontFamily:V.interBold}]}>
|
|
9
|
+
{I(N?"performance.live":"common.pause")}
|
|
10
|
+
</S>
|
|
11
|
+
</C>
|
|
12
|
+
<S style={k.analyticsHeaderSubtitle}numberOfLines={1}>
|
|
13
|
+
{Pe?`${I("analytics.userId")}: ${Pe}`:I("analytics.emptySubtitle")}
|
|
14
|
+
</S>
|
|
15
|
+
</C>
|
|
235
16
|
|
|
236
|
-
<
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
{
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
17
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:8}}>
|
|
18
|
+
{$?<Ce style={k.analyticsHeaderToggle}activeOpacity={.7}onPress={t=>{t.stopPropagation(),Ae(),ke(!E)}}>
|
|
19
|
+
<S style={k.analyticsHeaderToggleText}>
|
|
20
|
+
{I(E?"common.close":"analytics.eventDetails")}
|
|
21
|
+
</S>
|
|
22
|
+
</Ce>:<C style={{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:`${e.purple}14`,paddingHorizontal:7,paddingVertical:3,borderRadius:6,borderWidth:1,borderColor:`${e.purple}25`}}>
|
|
23
|
+
<S style={{fontFamily:V.interBold,fontSize:10,color:e.purple}}>
|
|
24
|
+
{G} {G===1?"event":"events"}
|
|
25
|
+
</S>
|
|
26
|
+
</C>}
|
|
245
27
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
<View style={{
|
|
250
|
-
height: 4.5,
|
|
251
|
-
borderRadius: 2.5,
|
|
252
|
-
backgroundColor: `${AppColors.grayBorderSecondary}40`,
|
|
253
|
-
flexDirection: 'row',
|
|
254
|
-
overflow: 'hidden',
|
|
255
|
-
marginBottom: 8,
|
|
256
|
-
}}>
|
|
257
|
-
{categoryStats.ecommerce > 0 && (<View style={{
|
|
258
|
-
flex: categoryStats.ecommerce,
|
|
259
|
-
backgroundColor: AppColors.amber500,
|
|
260
|
-
}}/>)}
|
|
261
|
-
{categoryStats.page_view > 0 && (<View style={{
|
|
262
|
-
flex: categoryStats.page_view,
|
|
263
|
-
backgroundColor: AppColors.sky500,
|
|
264
|
-
}}/>)}
|
|
265
|
-
{categoryStats.system > 0 && (<View style={{
|
|
266
|
-
flex: categoryStats.system,
|
|
267
|
-
backgroundColor: AppColors.purple,
|
|
268
|
-
}}/>)}
|
|
269
|
-
{categoryStats.custom > 0 && (<View style={{
|
|
270
|
-
flex: categoryStats.custom,
|
|
271
|
-
backgroundColor: AppColors.brandPurple,
|
|
272
|
-
}}/>)}
|
|
273
|
-
</View>
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
<View style={{
|
|
277
|
-
flexDirection: 'row',
|
|
278
|
-
flexWrap: 'wrap',
|
|
279
|
-
gap: 6,
|
|
280
|
-
}}>
|
|
281
|
-
|
|
282
|
-
{(() => {
|
|
283
|
-
const isAllSelected = analyticsFilters.categories.has('all');
|
|
284
|
-
return (<TouchableScale onPress={() => toggleCategoryFilter('all')} style={[
|
|
285
|
-
{
|
|
286
|
-
flexDirection: 'row',
|
|
287
|
-
alignItems: 'center',
|
|
288
|
-
gap: 5,
|
|
289
|
-
backgroundColor: isAllSelected ? AppColors.indigo600Alt : AppColors.indigo50,
|
|
290
|
-
paddingHorizontal: 8,
|
|
291
|
-
paddingVertical: 5,
|
|
292
|
-
borderRadius: 7,
|
|
293
|
-
borderWidth: 1,
|
|
294
|
-
borderColor: isAllSelected ? AppColors.indigo600 : AppColors.indigo400,
|
|
295
|
-
},
|
|
296
|
-
isAllSelected && {
|
|
297
|
-
shadowColor: AppColors.indigo600Alt,
|
|
298
|
-
shadowOffset: { width: 0, height: 1 },
|
|
299
|
-
shadowOpacity: 0.28,
|
|
300
|
-
shadowRadius: 2.5,
|
|
301
|
-
elevation: 2,
|
|
302
|
-
},
|
|
303
|
-
]}>
|
|
304
|
-
<LayersIcon color={isAllSelected ? AppColors.white : AppColors.indigo600Alt} size={11}/>
|
|
305
|
-
<Text style={{
|
|
306
|
-
fontFamily: AppFonts.interBold,
|
|
307
|
-
fontSize: 10,
|
|
308
|
-
color: isAllSelected ? AppColors.white : AppColors.indigo600Alt,
|
|
309
|
-
}}>
|
|
310
|
-
{t('analytics.allCategory')}: {categoryStats.totalCount}
|
|
311
|
-
</Text>
|
|
312
|
-
</TouchableScale>);
|
|
313
|
-
})()}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
{(() => {
|
|
317
|
-
const isSelected = !analyticsFilters.categories.has('all') &&
|
|
318
|
-
analyticsFilters.categories.has('ecommerce');
|
|
319
|
-
return (<TouchableScale onPress={() => toggleCategoryFilter('ecommerce')} style={[
|
|
320
|
-
{
|
|
321
|
-
flexDirection: 'row',
|
|
322
|
-
alignItems: 'center',
|
|
323
|
-
gap: 5,
|
|
324
|
-
backgroundColor: isSelected ? AppColors.amber600 : AppColors.amber100,
|
|
325
|
-
paddingHorizontal: 8,
|
|
326
|
-
paddingVertical: 5,
|
|
327
|
-
borderRadius: 7,
|
|
328
|
-
borderWidth: 1,
|
|
329
|
-
borderColor: isSelected ? AppColors.amber700 : AppColors.amber200,
|
|
330
|
-
},
|
|
331
|
-
isSelected && {
|
|
332
|
-
shadowColor: AppColors.amber600,
|
|
333
|
-
shadowOffset: { width: 0, height: 1 },
|
|
334
|
-
shadowOpacity: 0.28,
|
|
335
|
-
shadowRadius: 2.5,
|
|
336
|
-
elevation: 2,
|
|
337
|
-
},
|
|
338
|
-
]}>
|
|
339
|
-
<CartIcon color={isSelected ? AppColors.white : AppColors.amber700} size={11}/>
|
|
340
|
-
<Text style={{
|
|
341
|
-
fontFamily: AppFonts.interBold,
|
|
342
|
-
fontSize: 10,
|
|
343
|
-
color: isSelected ? AppColors.white : AppColors.amber800Warm,
|
|
344
|
-
}}>
|
|
345
|
-
{t('analytics.ecommerceCategory')}: {categoryStats.ecommerce} ({categoryStats.ecommercePct}%)
|
|
346
|
-
</Text>
|
|
347
|
-
</TouchableScale>);
|
|
348
|
-
})()}
|
|
28
|
+
<Yt direction={$?"up":"down"}size={16}color={e.grayTextWeak}/>
|
|
29
|
+
</C>
|
|
30
|
+
</Ce>
|
|
349
31
|
|
|
32
|
+
|
|
33
|
+
{$&&<C style={{marginTop:10}}>
|
|
350
34
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
borderColor: isSelected ? AppColors.blue700 : AppColors.sky400,
|
|
365
|
-
},
|
|
366
|
-
isSelected && {
|
|
367
|
-
shadowColor: AppColors.sky600,
|
|
368
|
-
shadowOffset: { width: 0, height: 1 },
|
|
369
|
-
shadowOpacity: 0.28,
|
|
370
|
-
shadowRadius: 2.5,
|
|
371
|
-
elevation: 2,
|
|
372
|
-
},
|
|
373
|
-
]}>
|
|
374
|
-
<GlobeIcon color={isSelected ? AppColors.white : AppColors.sky600} size={11}/>
|
|
375
|
-
<Text style={{
|
|
376
|
-
fontFamily: AppFonts.interBold,
|
|
377
|
-
fontSize: 10,
|
|
378
|
-
color: isSelected ? AppColors.white : AppColors.sky600,
|
|
379
|
-
}}>
|
|
380
|
-
{t('analytics.screensCategory')}: {categoryStats.page_view} ({categoryStats.page_viewPct}%)
|
|
381
|
-
</Text>
|
|
382
|
-
</TouchableScale>);
|
|
383
|
-
})()}
|
|
35
|
+
<C style={{marginBottom:8,backgroundColor:e.grayBackground,borderRadius:10,borderWidth:1,borderColor:e.dividerColor,padding:10}}>
|
|
36
|
+
|
|
37
|
+
<C style={{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",marginBottom:6}}>
|
|
38
|
+
<C>
|
|
39
|
+
<C style={{flexDirection:"row",alignItems:"baseline",gap:6}}>
|
|
40
|
+
<S style={{fontFamily:V.interBold,fontSize:22,color:e.primaryBlack,lineHeight:26}}>
|
|
41
|
+
{G}
|
|
42
|
+
</S>
|
|
43
|
+
<S style={{fontFamily:V.interMedium,fontSize:10.5,color:e.grayTextWeak}}>
|
|
44
|
+
{I("analytics.eventsInWindow")}
|
|
45
|
+
</S>
|
|
46
|
+
</C>
|
|
47
|
+
</C>
|
|
384
48
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
alignItems: 'center',
|
|
393
|
-
gap: 5,
|
|
394
|
-
backgroundColor: isSelected ? AppColors.violet600 : AppColors.purple100,
|
|
395
|
-
paddingHorizontal: 8,
|
|
396
|
-
paddingVertical: 5,
|
|
397
|
-
borderRadius: 7,
|
|
398
|
-
borderWidth: 1,
|
|
399
|
-
borderColor: isSelected ? AppColors.purpleShade700 : AppColors.purple200,
|
|
400
|
-
},
|
|
401
|
-
isSelected && {
|
|
402
|
-
shadowColor: AppColors.violet600,
|
|
403
|
-
shadowOffset: { width: 0, height: 1 },
|
|
404
|
-
shadowOpacity: 0.28,
|
|
405
|
-
shadowRadius: 2.5,
|
|
406
|
-
elevation: 2,
|
|
407
|
-
},
|
|
408
|
-
]}>
|
|
409
|
-
<BoltIcon color={isSelected ? AppColors.white : AppColors.purple} size={11}/>
|
|
410
|
-
<Text style={{
|
|
411
|
-
fontFamily: AppFonts.interBold,
|
|
412
|
-
fontSize: 10,
|
|
413
|
-
color: isSelected ? AppColors.white : AppColors.brandPurple,
|
|
414
|
-
}}>
|
|
415
|
-
{t('analytics.systemCategory')}: {categoryStats.system} ({categoryStats.systemPct}%)
|
|
416
|
-
</Text>
|
|
417
|
-
</TouchableScale>);
|
|
418
|
-
})()}
|
|
49
|
+
|
|
50
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:5}}>
|
|
51
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:`${e.purple}14`,paddingHorizontal:6,paddingVertical:2.5,borderRadius:4,borderWidth:1,borderColor:`${e.purple}2E`}}>
|
|
52
|
+
<S style={{fontFamily:V.interBold,fontSize:9.5,color:e.purple}}>
|
|
53
|
+
{I("analytics.eventVelocity",{rate:O.eventRate})}
|
|
54
|
+
</S>
|
|
55
|
+
</C>
|
|
419
56
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
gap: 5,
|
|
429
|
-
backgroundColor: isSelected ? AppColors.pink600 : AppColors.pink100,
|
|
430
|
-
paddingHorizontal: 8,
|
|
431
|
-
paddingVertical: 5,
|
|
432
|
-
borderRadius: 7,
|
|
433
|
-
borderWidth: 1,
|
|
434
|
-
borderColor: isSelected ? AppColors.rose700 : AppColors.roseBorder,
|
|
435
|
-
},
|
|
436
|
-
isSelected && {
|
|
437
|
-
shadowColor: AppColors.pink600,
|
|
438
|
-
shadowOffset: { width: 0, height: 1 },
|
|
439
|
-
shadowOpacity: 0.28,
|
|
440
|
-
shadowRadius: 2.5,
|
|
441
|
-
elevation: 2,
|
|
442
|
-
},
|
|
443
|
-
]}>
|
|
444
|
-
<SparkleIcon color={isSelected ? AppColors.white : AppColors.brandPurple} size={11}/>
|
|
445
|
-
<Text style={{
|
|
446
|
-
fontFamily: AppFonts.interBold,
|
|
447
|
-
fontSize: 10,
|
|
448
|
-
color: isSelected ? AppColors.white : AppColors.pink600,
|
|
449
|
-
}}>
|
|
450
|
-
{t('analytics.customCategory')}: {categoryStats.custom} ({categoryStats.customPct}%)
|
|
451
|
-
</Text>
|
|
452
|
-
</TouchableScale>);
|
|
453
|
-
})()}
|
|
454
|
-
</View>
|
|
455
|
-
</View>
|
|
57
|
+
{Y.totalRevenue>0&&<C style={{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:`${e.emerald600}15`,paddingHorizontal:6,paddingVertical:2.5,borderRadius:4,borderWidth:1,borderColor:`${e.emerald600}30`}}>
|
|
58
|
+
<Xt color={e.emerald600}size={10}/>
|
|
59
|
+
<S style={{fontFamily:V.interBold,fontSize:9.5,color:e.emerald600}}>
|
|
60
|
+
${Y.totalRevenue.toFixed(2)}
|
|
61
|
+
</S>
|
|
62
|
+
</C>}
|
|
63
|
+
</C>
|
|
64
|
+
</C>
|
|
456
65
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
alignItems: 'flex-start',
|
|
472
|
-
marginBottom: 6,
|
|
473
|
-
}}>
|
|
474
|
-
<View>
|
|
475
|
-
<View style={{ flexDirection: 'row', alignItems: 'baseline', gap: 6 }}>
|
|
476
|
-
<Text style={{
|
|
477
|
-
fontFamily: AppFonts.interBold,
|
|
478
|
-
fontSize: 22,
|
|
479
|
-
color: AppColors.primaryBlack,
|
|
480
|
-
lineHeight: 26,
|
|
481
|
-
}}>
|
|
482
|
-
{totalEvents}
|
|
483
|
-
</Text>
|
|
484
|
-
<Text style={{
|
|
485
|
-
fontFamily: AppFonts.interMedium,
|
|
486
|
-
fontSize: 10.5,
|
|
487
|
-
color: AppColors.grayTextWeak,
|
|
488
|
-
}}>
|
|
489
|
-
{t('analytics.eventsInWindow')}
|
|
490
|
-
</Text>
|
|
491
|
-
</View>
|
|
492
|
-
</View>
|
|
66
|
+
|
|
67
|
+
<C style={{height:z,position:"relative",overflow:"hidden",borderRadius:8}}>
|
|
68
|
+
<Ot width="100%"height={z}viewBox={`0 0 ${j} ${z}`}preserveAspectRatio="none">
|
|
69
|
+
<Rt>
|
|
70
|
+
<Qe id="crashlyticsBarGrad"x1="0"y1="0"x2="0"y2="1">
|
|
71
|
+
<Fe offset="0%"stopColor="#8B5CF6"stopOpacity="0.9"/>
|
|
72
|
+
<Fe offset="100%"stopColor="#6366F1"stopOpacity="0.6"/>
|
|
73
|
+
</Qe>
|
|
74
|
+
<Qe id="crashlyticsAreaGrad"x1="0"y1="0"x2="0"y2="1">
|
|
75
|
+
<Fe offset="0%"stopColor="#8B5CF6"stopOpacity="0.25"/>
|
|
76
|
+
<Fe offset="80%"stopColor="#8B5CF6"stopOpacity="0.04"/>
|
|
77
|
+
<Fe offset="100%"stopColor="#8B5CF6"stopOpacity="0.0"/>
|
|
78
|
+
</Qe>
|
|
79
|
+
</Rt>
|
|
493
80
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
flexDirection: 'row',
|
|
498
|
-
alignItems: 'center',
|
|
499
|
-
gap: 3,
|
|
500
|
-
backgroundColor: `${AppColors.purple}14`,
|
|
501
|
-
paddingHorizontal: 6,
|
|
502
|
-
paddingVertical: 2.5,
|
|
503
|
-
borderRadius: 4,
|
|
504
|
-
borderWidth: 1,
|
|
505
|
-
borderColor: `${AppColors.purple}2E`,
|
|
506
|
-
}}>
|
|
507
|
-
<Text style={{
|
|
508
|
-
fontFamily: AppFonts.interBold,
|
|
509
|
-
fontSize: 9.5,
|
|
510
|
-
color: AppColors.purple,
|
|
511
|
-
}}>
|
|
512
|
-
{t('analytics.eventVelocity', { rate: histogramData.eventRate })}
|
|
513
|
-
</Text>
|
|
514
|
-
</View>
|
|
81
|
+
|
|
82
|
+
<Me x1="6"y1={z-6}x2={j-6}y2={z-6}stroke="#E2E8F0"strokeWidth="1"/>
|
|
83
|
+
<Me x1="6"y1={z/2}x2={j-6}y2={z/2}stroke="#F1F5F9"strokeWidth="1"strokeDasharray="4,4"/>
|
|
515
84
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
alignItems: 'center',
|
|
519
|
-
gap: 3,
|
|
520
|
-
backgroundColor: `${AppColors.emerald600}15`,
|
|
521
|
-
paddingHorizontal: 6,
|
|
522
|
-
paddingVertical: 2.5,
|
|
523
|
-
borderRadius: 4,
|
|
524
|
-
borderWidth: 1,
|
|
525
|
-
borderColor: `${AppColors.emerald600}30`,
|
|
526
|
-
}}>
|
|
527
|
-
<MoneyIcon color={AppColors.emerald600} size={10}/>
|
|
528
|
-
<Text style={{
|
|
529
|
-
fontFamily: AppFonts.interBold,
|
|
530
|
-
fontSize: 9.5,
|
|
531
|
-
color: AppColors.emerald600,
|
|
532
|
-
}}>
|
|
533
|
-
${categoryStats.totalRevenue.toFixed(2)}
|
|
534
|
-
</Text>
|
|
535
|
-
</View>)}
|
|
536
|
-
</View>
|
|
537
|
-
</View>
|
|
85
|
+
|
|
86
|
+
<Ge d={O.areaPath}fill="url(#crashlyticsAreaGrad)"/>
|
|
538
87
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
<SvgLinearGradient id="crashlyticsBarGrad" x1="0" y1="0" x2="0" y2="1">
|
|
544
|
-
<Stop offset="0%" stopColor="#8B5CF6" stopOpacity="0.9"/>
|
|
545
|
-
<Stop offset="100%" stopColor="#6366F1" stopOpacity="0.6"/>
|
|
546
|
-
</SvgLinearGradient>
|
|
547
|
-
<SvgLinearGradient id="crashlyticsAreaGrad" x1="0" y1="0" x2="0" y2="1">
|
|
548
|
-
<Stop offset="0%" stopColor="#8B5CF6" stopOpacity="0.25"/>
|
|
549
|
-
<Stop offset="80%" stopColor="#8B5CF6" stopOpacity="0.04"/>
|
|
550
|
-
<Stop offset="100%" stopColor="#8B5CF6" stopOpacity="0.0"/>
|
|
551
|
-
</SvgLinearGradient>
|
|
552
|
-
</Defs>
|
|
88
|
+
|
|
89
|
+
{O.buckets.map((t,T)=>{const P=U===T,F=10,B=t.x-F/2,D=Math.max(3,z-8-t.y),H=z-8-D;return<Je key={`bar-${t.index}`}>
|
|
90
|
+
|
|
91
|
+
<Ue x={B}y={6}width={F}height={z-14}rx={3}fill={P?"#EDE9FE":"#F8FAFC"}/>
|
|
553
92
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
<Line x1="6" y1={chartHeight / 2} x2={svgWidth - 6} y2={chartHeight / 2} stroke="#F1F5F9" strokeWidth="1" strokeDasharray="4,4"/>
|
|
93
|
+
|
|
94
|
+
{t.total>0&&<Ue x={B}y={H}width={F}height={D}rx={3}fill="url(#crashlyticsBarGrad)"/>}
|
|
557
95
|
|
|
558
|
-
|
|
559
|
-
|
|
96
|
+
|
|
97
|
+
{P&&<Me x1={t.x}y1={4}x2={t.x}y2={z-6}stroke="#8B5CF6"strokeWidth="1.5"strokeDasharray="2,2"/>}
|
|
98
|
+
</Je>})}
|
|
560
99
|
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
const isSelected = selectedBucketIdx === idx;
|
|
564
|
-
const barWidth = 10;
|
|
565
|
-
const barX = b.x - barWidth / 2;
|
|
566
|
-
const barHeight = Math.max(3, chartHeight - 8 - b.y);
|
|
567
|
-
const barY = chartHeight - 8 - barHeight;
|
|
568
|
-
return (<G key={`bar-${b.index}`}>
|
|
569
|
-
|
|
570
|
-
<Rect x={barX} y={6} width={barWidth} height={chartHeight - 14} rx={3} fill={isSelected ? '#EDE9FE' : '#F8FAFC'}/>
|
|
100
|
+
|
|
101
|
+
<Ge d={O.linePath}fill="none"stroke="#8B5CF6"strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
571
102
|
|
|
572
|
-
|
|
573
|
-
|
|
103
|
+
|
|
104
|
+
{O.buckets.length>0&&<Je>
|
|
105
|
+
<Ke cx={O.buckets[O.buckets.length-1].x}cy={O.buckets[O.buckets.length-1].y}r="5.5"fill="#8B5CF6"opacity="0.25"/>
|
|
106
|
+
<Ke cx={O.buckets[O.buckets.length-1].x}cy={O.buckets[O.buckets.length-1].y}r="3"fill="#7C3AED"/>
|
|
107
|
+
</Je>}
|
|
108
|
+
</Ot>
|
|
574
109
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
110
|
+
|
|
111
|
+
<C style={{position:"absolute",top:0,left:0,right:0,bottom:0,flexDirection:"row"}}>
|
|
112
|
+
{O.buckets.map((t,T)=><Ce key={t.index}style={{flex:1,height:"100%"}}activeOpacity={.8}onPress={()=>K(U===T?null:T)}/>)}
|
|
113
|
+
</C>
|
|
114
|
+
</C>
|
|
579
115
|
|
|
580
116
|
|
|
581
|
-
|
|
117
|
+
{o&&<C style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:e.white,borderRadius:6,paddingHorizontal:8,paddingVertical:4,marginTop:4,borderWidth:1,borderColor:e.brandPurple}}>
|
|
118
|
+
<S style={{fontFamily:V.interBold,fontSize:10,color:e.primaryBlack}}>
|
|
119
|
+
{I("analytics.selectedBucket",{time:o.ageLabel,count:o.total})}
|
|
120
|
+
</S>
|
|
121
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
122
|
+
{o.ecommerce>0&&<S style={{fontSize:9,fontFamily:V.interBold,color:e.amber700}}>
|
|
123
|
+
Ecom: {o.ecommerce}
|
|
124
|
+
</S>}
|
|
125
|
+
{o.page_view>0&&<S style={{fontSize:9,fontFamily:V.interBold,color:e.sky500}}>
|
|
126
|
+
Screen: {o.page_view}
|
|
127
|
+
</S>}
|
|
128
|
+
{o.custom>0&&<S style={{fontSize:9,fontFamily:V.interBold,color:e.brandPurple}}>
|
|
129
|
+
Custom: {o.custom}
|
|
130
|
+
</S>}
|
|
131
|
+
</C>
|
|
132
|
+
</C>}
|
|
582
133
|
|
|
583
134
|
|
|
584
|
-
{
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
</
|
|
588
|
-
|
|
135
|
+
<C style={{flexDirection:"row",justifyContent:"space-between",marginTop:4,paddingHorizontal:4}}>
|
|
136
|
+
<S style={{fontFamily:V.interMedium,fontSize:8.5,color:e.grayTextWeak}}>
|
|
137
|
+
-60s
|
|
138
|
+
</S>
|
|
139
|
+
<S style={{fontFamily:V.interMedium,fontSize:8.5,color:e.grayTextWeak}}>
|
|
140
|
+
-40s
|
|
141
|
+
</S>
|
|
142
|
+
<S style={{fontFamily:V.interMedium,fontSize:8.5,color:e.grayTextWeak}}>
|
|
143
|
+
-20s
|
|
144
|
+
</S>
|
|
145
|
+
<S style={{fontFamily:V.interBold,fontSize:8.5,color:e.brandPurple}}>
|
|
146
|
+
{I("analytics.timeNow")}
|
|
147
|
+
</S>
|
|
148
|
+
</C>
|
|
149
|
+
</C>
|
|
589
150
|
|
|
590
151
|
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
152
|
+
{Oe.length>0&&<C style={{marginTop:4,backgroundColor:`${e.sky500}0A`,borderRadius:8,borderWidth:1,borderColor:`${e.sky500}22`,padding:8}}>
|
|
153
|
+
<C style={{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:6}}>
|
|
154
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
155
|
+
<Qt color={e.sky600}size={11}/>
|
|
156
|
+
<S style={{fontFamily:V.interBold,fontSize:9.5,color:e.sky600,letterSpacing:.3}}>
|
|
157
|
+
TOP SCREENS (REALTIME)
|
|
158
|
+
</S>
|
|
159
|
+
</C>
|
|
160
|
+
<S style={{fontFamily:V.interMedium,fontSize:9,color:e.grayTextWeak}}>
|
|
161
|
+
Views
|
|
162
|
+
</S>
|
|
163
|
+
</C>
|
|
164
|
+
|
|
165
|
+
<C style={{gap:4}}>
|
|
166
|
+
{Oe.map(t=><C key={t.name}>
|
|
167
|
+
<C style={{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:2}}>
|
|
168
|
+
<S style={{fontFamily:V.interMedium,fontSize:10,color:e.primaryBlack}}numberOfLines={1}>
|
|
169
|
+
{t.name}
|
|
170
|
+
</S>
|
|
171
|
+
<S style={{fontFamily:V.interBold,fontSize:9.5,color:e.sky600}}>
|
|
172
|
+
{t.count} ({t.pct}%)
|
|
173
|
+
</S>
|
|
174
|
+
</C>
|
|
175
|
+
|
|
176
|
+
<C style={{height:3,borderRadius:1.5,backgroundColor:`${e.sky500}22`,overflow:"hidden"}}>
|
|
177
|
+
<C style={{height:"100%",width:`${t.barWidthPct}%`,backgroundColor:e.sky500}}/>
|
|
178
|
+
</C>
|
|
179
|
+
</C>)}
|
|
180
|
+
</C>
|
|
181
|
+
</C>}
|
|
602
182
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
})}
|
|
625
|
-
</Text>
|
|
626
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
627
|
-
{selectedBucket.ecommerce > 0 && (<Text style={{ fontSize: 9, fontFamily: AppFonts.interBold, color: AppColors.amber700 }}>
|
|
628
|
-
Ecom: {selectedBucket.ecommerce}
|
|
629
|
-
</Text>)}
|
|
630
|
-
{selectedBucket.page_view > 0 && (<Text style={{ fontSize: 9, fontFamily: AppFonts.interBold, color: AppColors.sky500 }}>
|
|
631
|
-
Screen: {selectedBucket.page_view}
|
|
632
|
-
</Text>)}
|
|
633
|
-
{selectedBucket.custom > 0 && (<Text style={{ fontSize: 9, fontFamily: AppFonts.interBold, color: AppColors.brandPurple }}>
|
|
634
|
-
Custom: {selectedBucket.custom}
|
|
635
|
-
</Text>)}
|
|
636
|
-
</View>
|
|
637
|
-
</View>)}
|
|
183
|
+
|
|
184
|
+
{E&&<>
|
|
185
|
+
|
|
186
|
+
<C style={k.analyticsStatsRow}>
|
|
187
|
+
<C style={k.analyticsStatBox}>
|
|
188
|
+
<S style={k.analyticsStatValue}>{G}</S>
|
|
189
|
+
<S style={k.analyticsStatLabel}>{I("analytics.eventCount",{count:G})}</S>
|
|
190
|
+
</C>
|
|
191
|
+
<C style={k.analyticsStatBox}>
|
|
192
|
+
<S style={k.analyticsStatValue}>
|
|
193
|
+
{Object.keys(Te).length}
|
|
194
|
+
</S>
|
|
195
|
+
<S style={k.analyticsStatLabel}>{I("analytics.props")}</S>
|
|
196
|
+
</C>
|
|
197
|
+
<C style={k.analyticsStatBox}>
|
|
198
|
+
<S style={k.analyticsStatValue}>
|
|
199
|
+
{Object.keys(X).length}
|
|
200
|
+
</S>
|
|
201
|
+
<S style={k.analyticsStatLabel}>{I("analytics.defaultParameters")}</S>
|
|
202
|
+
</C>
|
|
203
|
+
</C>
|
|
638
204
|
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
fontSize: 8.5,
|
|
649
|
-
color: AppColors.grayTextWeak,
|
|
650
|
-
}}>
|
|
651
|
-
-60s
|
|
652
|
-
</Text>
|
|
653
|
-
<Text style={{
|
|
654
|
-
fontFamily: AppFonts.interMedium,
|
|
655
|
-
fontSize: 8.5,
|
|
656
|
-
color: AppColors.grayTextWeak,
|
|
657
|
-
}}>
|
|
658
|
-
-40s
|
|
659
|
-
</Text>
|
|
660
|
-
<Text style={{
|
|
661
|
-
fontFamily: AppFonts.interMedium,
|
|
662
|
-
fontSize: 8.5,
|
|
663
|
-
color: AppColors.grayTextWeak,
|
|
664
|
-
}}>
|
|
665
|
-
-20s
|
|
666
|
-
</Text>
|
|
667
|
-
<Text style={{
|
|
668
|
-
fontFamily: AppFonts.interBold,
|
|
669
|
-
fontSize: 8.5,
|
|
670
|
-
color: AppColors.brandPurple,
|
|
671
|
-
}}>
|
|
672
|
-
{t('analytics.timeNow')}
|
|
673
|
-
</Text>
|
|
674
|
-
</View>
|
|
675
|
-
</View>
|
|
205
|
+
|
|
206
|
+
{(Se||ze)&&<C style={k.analyticsHeaderDetails}>
|
|
207
|
+
{Se&&<C style={{marginBottom:10}}>
|
|
208
|
+
<S style={k.detailsGroupTitle}>{I("analytics.userProperties")}</S>
|
|
209
|
+
{Object.entries(Te).map(([t,T])=><C key={t}style={k.detailsRow}>
|
|
210
|
+
<S style={k.detailsKey}selectable={!0}>{t}</S>
|
|
211
|
+
<S style={k.detailsValue}selectable={!0}>{String(T)}</S>
|
|
212
|
+
</C>)}
|
|
213
|
+
</C>}
|
|
676
214
|
|
|
215
|
+
{ze&&<C>
|
|
216
|
+
<S style={k.detailsGroupTitle}>{I("analytics.defaultParameters")}</S>
|
|
217
|
+
{Object.entries(X).map(([t,T])=><C key={t}style={k.detailsRow}>
|
|
218
|
+
<S style={k.detailsKey}selectable={!0}>{t}</S>
|
|
219
|
+
<S style={k.detailsValue}selectable={!0}>{String(T)}</S>
|
|
220
|
+
</C>)}
|
|
221
|
+
</C>}
|
|
222
|
+
</C>}
|
|
223
|
+
</>}
|
|
224
|
+
</C>}
|
|
225
|
+
</C>}),qt=We.memo(()=>{const{t:I}=_e(),{analyticsEvents:Q,filteredAnalyticsEvents:R,analyticsSearch:E,setAnalyticsSearch:ke,analyticsFilters:$,setAnalyticsFilters:Ie,handleDelete:Pe,selectedEvent:Te,setSelectedEvent:X,newEventIds:N,logRouteMapRef:Se,isAnalyticsLayoutReady:ze,setIsAnalyticsLayoutReady:G,isAnalyticsPaused:Y,setIsAnalyticsPaused:Oe,isAnalyticsFilterApplied:M}=Ne(),z=tt(null),[j,U]=De(!1),K=Ee(()=>{let o=0,t=0,T=0,P=0;for(const B of Q){const D=He(B.name),H=B.count||1;D==="ecommerce"?o+=H:D==="page_view"?t+=H:D==="system"?T+=H:P+=H}const F=o+t+T+P;return{ecommerce:o,page_view:t,system:T,custom:P,totalCount:F}},[Q]),J=Le(o=>{Ae(),Ie(t=>{if(o==="all")return{...t,categories:new Set(["all"])};const T=new Set(t.categories);if(T.has("all"))T.delete("all"),T.add(o);else if(T.has(o))T.delete(o),T.size===0&&T.add("all");else if(T.add(o),T.has("ecommerce")&&T.has("page_view")&&T.has("system")&&T.has("custom"))return{...t,categories:new Set(["all"])};return{...t,categories:T}})},[Ie]),$e=Le((o,t)=>o?.id?.toString()??t.toString(),[]),O=Le(({item:o,index:t})=>{const T=R[t+1],P=R[t-1],F=T?o.timestamp-T.timestamp:void 0,B=Math.floor(o.timestamp/6e4),D=P?Math.floor(P.timestamp/6e4):-1,H=t===0||B!==D;return<Ft event={o}onPress={()=>{X(o)}}isNew={N.has(o.id)}searchStr={E}isFirst={t===0}isLast={t===R.length-1}msSincePrev={F}showTimestamp={H}computedScreenName={(()=>{if(!o)return"";const Z=o.screenName||o.screenClass||o.pageTitle||o.pageLocation||o.params?.firebase_screen||o.params?.screen_name||o.params?.firebase_screen_class||o.params?.screen_class;let ve=typeof Z=="string"?Z:Z?JSON.stringify(Z):"";const Ve=Se.current.get(o.id+1e6);if(!ve&&Ve&&Ve.path!=="Navigators"){const Re=Ve.path.split(" \u2794 ");ve=Re[Re.length-1]}return ve})()}/>},[R,E,N,X,Se]);return<>
|
|
677
226
|
|
|
678
|
-
{
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
letterSpacing: 0.3,
|
|
699
|
-
}}>
|
|
700
|
-
TOP SCREENS (REALTIME)
|
|
701
|
-
</Text>
|
|
702
|
-
</View>
|
|
703
|
-
<Text style={{
|
|
704
|
-
fontFamily: AppFonts.interMedium,
|
|
705
|
-
fontSize: 9,
|
|
706
|
-
color: AppColors.grayTextWeak,
|
|
707
|
-
}}>
|
|
708
|
-
Views
|
|
709
|
-
</Text>
|
|
710
|
-
</View>
|
|
227
|
+
{Te==null&&<C style={{backgroundColor:e.white,borderBottomWidth:1,borderBottomColor:e.dividerColor,paddingBottom:6}}>
|
|
228
|
+
<C style={[k.toolbarRow,{marginTop:12,marginBottom:8}]}>
|
|
229
|
+
<C style={k.searchContainer}>
|
|
230
|
+
<Mt color={e.grayTextWeak}size={16}/>
|
|
231
|
+
<Vt placeholder="Search events..."placeholderTextColor={e.grayTextWeak}value={E}onChangeText={ke}style={k.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
232
|
+
{E.length>0&&<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
233
|
+
<C style={{backgroundColor:`${e.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
234
|
+
<S style={{color:e.purple,fontSize:9.5,fontFamily:V.interBold}}>
|
|
235
|
+
{R.length}
|
|
236
|
+
</S>
|
|
237
|
+
</C>
|
|
238
|
+
<Tt onPress={()=>ke("")}hitSlop={10}style={k.clearBtn}>
|
|
239
|
+
<Ht color={e.grayTextWeak}size={13}/>
|
|
240
|
+
</Tt>
|
|
241
|
+
</C>}
|
|
242
|
+
</C>
|
|
243
|
+
<C style={k.toolbarRight}>
|
|
244
|
+
<Ce style={[k.toolbarBtn,Y&&{borderColor:`${e.darkOrange}50`,backgroundColor:`${e.darkOrange}18`}]}onPress={()=>Oe(o=>!o)}hitSlop={6}>
|
|
245
|
+
<Nt isPaused={Y}color={Y?e.darkOrange:e.grayTextStrong}size={16}/>
|
|
246
|
+
</Ce>
|
|
711
247
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
<
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
alignItems: 'center',
|
|
718
|
-
marginBottom: 2,
|
|
719
|
-
}}>
|
|
720
|
-
<Text style={{
|
|
721
|
-
fontFamily: AppFonts.interMedium,
|
|
722
|
-
fontSize: 10,
|
|
723
|
-
color: AppColors.primaryBlack,
|
|
724
|
-
}} numberOfLines={1}>
|
|
725
|
-
{scr.name}
|
|
726
|
-
</Text>
|
|
727
|
-
<Text style={{
|
|
728
|
-
fontFamily: AppFonts.interBold,
|
|
729
|
-
fontSize: 9.5,
|
|
730
|
-
color: AppColors.sky600,
|
|
731
|
-
}}>
|
|
732
|
-
{scr.count} ({scr.pct}%)
|
|
733
|
-
</Text>
|
|
734
|
-
</View>
|
|
735
|
-
|
|
736
|
-
<View style={{
|
|
737
|
-
height: 3,
|
|
738
|
-
borderRadius: 1.5,
|
|
739
|
-
backgroundColor: `${AppColors.sky500}22`,
|
|
740
|
-
overflow: 'hidden',
|
|
741
|
-
}}>
|
|
742
|
-
<View style={{
|
|
743
|
-
height: '100%',
|
|
744
|
-
width: `${scr.barWidthPct}%`,
|
|
745
|
-
backgroundColor: AppColors.sky500,
|
|
746
|
-
}}/>
|
|
747
|
-
</View>
|
|
748
|
-
</View>))}
|
|
749
|
-
</View>
|
|
750
|
-
</View>)}
|
|
248
|
+
|
|
249
|
+
<Ce style={[k.toolbarBtn,M&&{borderColor:`${e.brandPurple}60`,backgroundColor:`${e.brandPurple}15`}]}onPress={()=>U(!0)}hitSlop={6}>
|
|
250
|
+
<_t color={M?e.brandPurple:e.grayTextStrong}size={15}/>
|
|
251
|
+
{M&&<C style={{position:"absolute",top:2,right:2,width:7,height:7,borderRadius:3.5,backgroundColor:e.darkOrange,borderWidth:1,borderColor:e.white}}/>}
|
|
252
|
+
</Ce>
|
|
751
253
|
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
<Text style={styles.analyticsStatValue}>{totalEvents}</Text>
|
|
758
|
-
<Text style={styles.analyticsStatLabel}>{t('analytics.eventCount', { count: totalEvents })}</Text>
|
|
759
|
-
</View>
|
|
760
|
-
<View style={styles.analyticsStatBox}>
|
|
761
|
-
<Text style={styles.analyticsStatValue}>
|
|
762
|
-
{Object.keys(userProperties).length}
|
|
763
|
-
</Text>
|
|
764
|
-
<Text style={styles.analyticsStatLabel}>{t('analytics.props')}</Text>
|
|
765
|
-
</View>
|
|
766
|
-
<View style={styles.analyticsStatBox}>
|
|
767
|
-
<Text style={styles.analyticsStatValue}>
|
|
768
|
-
{Object.keys(defaultParams).length}
|
|
769
|
-
</Text>
|
|
770
|
-
<Text style={styles.analyticsStatLabel}>{t('analytics.defaultParameters')}</Text>
|
|
771
|
-
</View>
|
|
772
|
-
</View>
|
|
254
|
+
<Ce style={[k.toolbarBtn,{borderColor:`${e.errorColor}38`,backgroundColor:`${e.errorColor}0F`}]}onPress={Pe}hitSlop={6}>
|
|
255
|
+
<Wt color={e.errorColor}size={15}/>
|
|
256
|
+
</Ce>
|
|
257
|
+
</C>
|
|
258
|
+
</C>
|
|
773
259
|
|
|
774
260
|
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
{
|
|
779
|
-
|
|
780
|
-
<
|
|
781
|
-
|
|
782
|
-
|
|
261
|
+
<St horizontal showsHorizontalScrollIndicator={!1}style={{marginVertical:4,maxHeight:46}}contentContainerStyle={{paddingHorizontal:16,paddingBottom:4,flexDirection:"row",alignItems:"center",gap:8}}>
|
|
262
|
+
|
|
263
|
+
{(()=>{const o=$.categories.has("all");return<Be onPress={()=>J("all")}>
|
|
264
|
+
<C style={[k.statusFilterChip,{backgroundColor:o?e.indigo600Alt:e.indigo50,borderColor:o?e.indigo600:e.indigo400,borderRadius:8,paddingHorizontal:10,paddingVertical:6},o&&{shadowColor:e.indigo600Alt,shadowOffset:{width:0,height:1},shadowOpacity:.28,shadowRadius:2.5,elevation:2}]}>
|
|
265
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
266
|
+
<At size={13}color={o?e.white:e.indigo600Alt}/>
|
|
267
|
+
<S numberOfLines={1}style={[k.statusFilterText,{color:o?e.white:e.indigo600Alt,fontFamily:V.interBold}]}>
|
|
268
|
+
{I("common.all","All")} ({K.totalCount})
|
|
269
|
+
</S>
|
|
270
|
+
</C>
|
|
271
|
+
</C>
|
|
272
|
+
</Be>})()}
|
|
783
273
|
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
{
|
|
787
|
-
|
|
788
|
-
<
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
})
|
|
795
|
-
const AnalyticsTab = React.memo(() => {
|
|
796
|
-
const { t } = useTranslation();
|
|
797
|
-
const { filteredAnalyticsEvents, analyticsSearch, setAnalyticsSearch, handleDelete, selectedEvent, setSelectedEvent, newEventIds, logRouteMapRef, isAnalyticsLayoutReady, setIsAnalyticsLayoutReady, isAnalyticsPaused, setIsAnalyticsPaused, isAnalyticsFilterApplied, } = useInspector();
|
|
798
|
-
const listRef = useRef(null);
|
|
799
|
-
const [isFilterModalOpen, setIsFilterModalOpen] = useState(false);
|
|
800
|
-
const keyExtractor = useCallback((item, index) => item?.id?.toString() ?? index.toString(), []);
|
|
801
|
-
const renderItem = useCallback(({ item, index }) => {
|
|
802
|
-
const prev = filteredAnalyticsEvents[index + 1];
|
|
803
|
-
const next = filteredAnalyticsEvents[index - 1];
|
|
804
|
-
const msSincePrev = prev
|
|
805
|
-
? item.timestamp - prev.timestamp
|
|
806
|
-
: undefined;
|
|
807
|
-
const thisMin = Math.floor(item.timestamp / 60000);
|
|
808
|
-
const nextMin = next
|
|
809
|
-
? Math.floor(next.timestamp / 60000)
|
|
810
|
-
: -1;
|
|
811
|
-
const showTimestamp = index === 0 || thisMin !== nextMin;
|
|
812
|
-
return (<AnalyticsEventCard event={item} onPress={() => {
|
|
813
|
-
setSelectedEvent(item);
|
|
814
|
-
}} isNew={newEventIds.has(item.id)} searchStr={analyticsSearch} isFirst={index === 0} isLast={index === filteredAnalyticsEvents.length - 1} msSincePrev={msSincePrev} showTimestamp={showTimestamp} computedScreenName={(() => {
|
|
815
|
-
if (!item)
|
|
816
|
-
return '';
|
|
817
|
-
const rawScreenName = item.screenName ||
|
|
818
|
-
item.screenClass ||
|
|
819
|
-
item.pageTitle ||
|
|
820
|
-
item.pageLocation ||
|
|
821
|
-
item.params?.firebase_screen ||
|
|
822
|
-
item.params?.screen_name ||
|
|
823
|
-
item.params?.firebase_screen_class ||
|
|
824
|
-
item.params?.screen_class;
|
|
825
|
-
let screenName = typeof rawScreenName === 'string'
|
|
826
|
-
? rawScreenName
|
|
827
|
-
: (rawScreenName ? JSON.stringify(rawScreenName) : '');
|
|
828
|
-
const routeInfo = logRouteMapRef.current.get(item.id + 1000000);
|
|
829
|
-
if (!screenName) {
|
|
830
|
-
if (routeInfo &&
|
|
831
|
-
routeInfo.path !== 'Navigators') {
|
|
832
|
-
const parts = routeInfo.path.split(' ➔ ');
|
|
833
|
-
screenName = parts[parts.length - 1];
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
return screenName;
|
|
837
|
-
})()}/>);
|
|
838
|
-
}, [filteredAnalyticsEvents, analyticsSearch, newEventIds, setSelectedEvent, logRouteMapRef]);
|
|
839
|
-
return (<>
|
|
840
|
-
|
|
841
|
-
{selectedEvent == null && (<View style={[
|
|
842
|
-
styles.toolbarRow,
|
|
843
|
-
{ marginTop: 12, marginBottom: 8 },
|
|
844
|
-
]}>
|
|
845
|
-
<View style={styles.searchContainer}>
|
|
846
|
-
<SearchIcon color={AppColors.grayTextWeak} size={16}/>
|
|
847
|
-
<TextInput placeholder="Search events..." placeholderTextColor={AppColors.grayTextWeak} value={analyticsSearch} onChangeText={setAnalyticsSearch} style={styles.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
848
|
-
{analyticsSearch.length > 0 && (<View style={{
|
|
849
|
-
flexDirection: 'row',
|
|
850
|
-
alignItems: 'center',
|
|
851
|
-
gap: 4,
|
|
852
|
-
}}>
|
|
853
|
-
<View style={{
|
|
854
|
-
backgroundColor: `${AppColors.purple}20`,
|
|
855
|
-
borderRadius: 10,
|
|
856
|
-
paddingHorizontal: 6,
|
|
857
|
-
paddingVertical: 1.5,
|
|
858
|
-
}}>
|
|
859
|
-
<Text style={{
|
|
860
|
-
color: AppColors.purple,
|
|
861
|
-
fontSize: 9.5,
|
|
862
|
-
fontFamily: AppFonts.interBold,
|
|
863
|
-
}}>
|
|
864
|
-
{filteredAnalyticsEvents.length}
|
|
865
|
-
</Text>
|
|
866
|
-
</View>
|
|
867
|
-
<Pressable onPress={() => setAnalyticsSearch('')} hitSlop={10} style={styles.clearBtn}>
|
|
868
|
-
<ClearIcon color={AppColors.grayTextWeak} size={13}/>
|
|
869
|
-
</Pressable>
|
|
870
|
-
</View>)}
|
|
871
|
-
</View>
|
|
872
|
-
<View style={styles.toolbarRight}>
|
|
873
|
-
<TouchableOpacity style={[
|
|
874
|
-
styles.toolbarBtn,
|
|
875
|
-
isAnalyticsPaused && {
|
|
876
|
-
borderColor: `${AppColors.darkOrange}50`,
|
|
877
|
-
backgroundColor: `${AppColors.darkOrange}18`,
|
|
878
|
-
},
|
|
879
|
-
]} onPress={() => setIsAnalyticsPaused(p => !p)} hitSlop={6}>
|
|
880
|
-
<HeaderPauseIcon isPaused={isAnalyticsPaused} color={isAnalyticsPaused
|
|
881
|
-
? AppColors.darkOrange
|
|
882
|
-
: AppColors.grayTextStrong} size={16}/>
|
|
883
|
-
</TouchableOpacity>
|
|
274
|
+
|
|
275
|
+
{(()=>{const o=!$.categories.has("all")&&$.categories.has("ecommerce");return<Be onPress={()=>J("ecommerce")}>
|
|
276
|
+
<C style={[k.statusFilterChip,{backgroundColor:o?e.amber600:e.amber100,borderColor:o?e.amber700:e.amber200,borderRadius:8,paddingHorizontal:10,paddingVertical:6},o&&{shadowColor:e.amber600,shadowOffset:{width:0,height:1},shadowOpacity:.28,shadowRadius:2.5,elevation:2}]}>
|
|
277
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
278
|
+
<Gt size={13}color={o?e.white:e.amber700}/>
|
|
279
|
+
<S numberOfLines={1}style={[k.statusFilterText,{color:o?e.white:e.amber800Warm,fontFamily:V.interBold}]}>
|
|
280
|
+
Ecommerce ({K.ecommerce})
|
|
281
|
+
</S>
|
|
282
|
+
</C>
|
|
283
|
+
</C>
|
|
284
|
+
</Be>})()}
|
|
884
285
|
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
286
|
+
|
|
287
|
+
{(()=>{const o=!$.categories.has("all")&&$.categories.has("page_view");return<Be onPress={()=>J("page_view")}>
|
|
288
|
+
<C style={[k.statusFilterChip,{backgroundColor:o?e.sky600:e.sky100,borderColor:o?e.blue700:e.sky400,borderRadius:8,paddingHorizontal:10,paddingVertical:6},o&&{shadowColor:e.sky600,shadowOffset:{width:0,height:1},shadowOpacity:.28,shadowRadius:2.5,elevation:2}]}>
|
|
289
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
290
|
+
<Ut size={13}color={o?e.white:e.sky600}/>
|
|
291
|
+
<S numberOfLines={1}style={[k.statusFilterText,{color:o?e.white:e.sky600,fontFamily:V.interBold}]}>
|
|
292
|
+
Screens ({K.page_view})
|
|
293
|
+
</S>
|
|
294
|
+
</C>
|
|
295
|
+
</C>
|
|
296
|
+
</Be>})()}
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
{(()=>{const o=!$.categories.has("all")&&$.categories.has("system");return<Be onPress={()=>J("system")}>
|
|
300
|
+
<C style={[k.statusFilterChip,{backgroundColor:o?e.violet600:e.purple100,borderColor:o?e.purpleShade700:e.purple200,borderRadius:8,paddingHorizontal:10,paddingVertical:6},o&&{shadowColor:e.violet600,shadowOffset:{width:0,height:1},shadowOpacity:.28,shadowRadius:2.5,elevation:2}]}>
|
|
301
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
302
|
+
<Kt size={13}color={o?e.white:e.purple}/>
|
|
303
|
+
<S numberOfLines={1}style={[k.statusFilterText,{color:o?e.white:e.brandPurple,fontFamily:V.interBold}]}>
|
|
304
|
+
System ({K.system})
|
|
305
|
+
</S>
|
|
306
|
+
</C>
|
|
307
|
+
</C>
|
|
308
|
+
</Be>})()}
|
|
908
309
|
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
310
|
+
|
|
311
|
+
{(()=>{const o=!$.categories.has("all")&&$.categories.has("custom");return<Be onPress={()=>J("custom")}>
|
|
312
|
+
<C style={[k.statusFilterChip,{backgroundColor:o?e.pink600:e.pink100,borderColor:o?e.rose700:e.roseBorder,borderRadius:8,paddingHorizontal:10,paddingVertical:6},o&&{shadowColor:e.pink600,shadowOffset:{width:0,height:1},shadowOpacity:.28,shadowRadius:2.5,elevation:2}]}>
|
|
313
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
314
|
+
<Jt size={13}color={o?e.white:e.brandPurple}/>
|
|
315
|
+
<S numberOfLines={1}style={[k.statusFilterText,{color:o?e.white:e.pink600,fontFamily:V.interBold}]}>
|
|
316
|
+
Custom ({K.custom})
|
|
317
|
+
</S>
|
|
318
|
+
</C>
|
|
319
|
+
</C>
|
|
320
|
+
</Be>})()}
|
|
321
|
+
</St>
|
|
322
|
+
</C>}
|
|
920
323
|
|
|
921
324
|
|
|
922
|
-
<
|
|
325
|
+
<Bt visible={j}onClose={()=>U(!1)}/>
|
|
923
326
|
|
|
924
|
-
<
|
|
925
|
-
{
|
|
926
|
-
<
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
: 'Call setupAnalyticsLogger(analytics()) at app start.'} onClearSearch={() => setAnalyticsSearch('')}/>} ListFooterComponent={filteredAnalyticsEvents.length > 0 ? (<EndOfListFooter count={filteredAnalyticsEvents.length} label="events"/>) : null} contentContainerStyle={[
|
|
931
|
-
styles.listContent,
|
|
932
|
-
filteredAnalyticsEvents.length === 0 && {
|
|
933
|
-
flexGrow: 1,
|
|
934
|
-
},
|
|
935
|
-
]} keyboardShouldPersistTaps="handled"/>
|
|
936
|
-
</>) : null}
|
|
937
|
-
</View>
|
|
938
|
-
</>);
|
|
939
|
-
});
|
|
940
|
-
export default AnalyticsTab;
|
|
327
|
+
<C style={{flex:1}}onLayout={()=>G(!0)}>
|
|
328
|
+
{ze?<>
|
|
329
|
+
<Ct ref={z}data={R}keyExtractor={$e}ListHeaderComponent={Zt}renderItem={O}initialNumToRender={12}maxToRenderPerBatch={8}windowSize={5}removeClippedSubviews={kt.OS==="android"}renderToHardwareTextureAndroid={!0}ListEmptyComponent={<Pt isSearch={E.length>0}searchQuery={E}customTitle={E.length>0?"No matching analytics events":"No analytics events yet"}customSub={E.length>0?`No events matched "${E}"`:"Call setupAnalyticsLogger(analytics()) at app start."}onClearSearch={()=>ke("")}/>}ListFooterComponent={R.length>0?<It count={R.length}label="events"/>:null}contentContainerStyle={[k.listContent,R.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
330
|
+
</>:null}
|
|
331
|
+
</C>
|
|
332
|
+
</>});export default qt;
|