react-native-inapp-inspector 2.3.5 → 2.3.6
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/dist/commonjs/analytics.d.ts +0 -4
- package/dist/commonjs/analytics.js +0 -4
- package/dist/commonjs/bundle.d.ts +0 -4
- package/dist/commonjs/bundle.js +0 -4
- package/dist/commonjs/components/AnalyticsDetail.js +18 -27
- package/dist/commonjs/components/AnalyticsEventCard.js +9 -12
- package/dist/commonjs/components/AnalyticsGraph.js +10 -15
- package/dist/commonjs/components/AppHeaderLogo.js +0 -3
- package/dist/commonjs/components/BrandCircleIcon.js +15 -15
- package/dist/commonjs/components/BrandSquareIcon.js +20 -20
- package/dist/commonjs/components/CodeSnippet.js +6 -19
- package/dist/commonjs/components/ConsoleLogCard.js +0 -1
- package/dist/commonjs/components/CopyButton.js +0 -4
- package/dist/commonjs/components/DiffViewer.js +0 -2
- package/dist/commonjs/components/DomainHeader.js +0 -4
- package/dist/commonjs/components/EmptyState.js +0 -3
- package/dist/commonjs/components/ErrorBoundary.js +5 -10
- package/dist/commonjs/components/HeadersSection.js +0 -5
- package/dist/commonjs/components/HighlightText.js +1 -4
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +11 -26
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +34 -40
- package/dist/commonjs/components/Inspector/BundleTab.js +56 -84
- package/dist/commonjs/components/Inspector/ConsoleTab.js +7 -7
- package/dist/commonjs/components/Inspector/CrashDetail.js +18 -20
- package/dist/commonjs/components/Inspector/CrashFilterModal.js +0 -1
- package/dist/commonjs/components/Inspector/CrashTab.js +11 -20
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +12 -24
- package/dist/commonjs/components/Inspector/FabLauncher.js +1 -1
- package/dist/commonjs/components/Inspector/InspectorContext.js +0 -2
- package/dist/commonjs/components/Inspector/InspectorHeader.js +7 -8
- package/dist/commonjs/components/Inspector/LogDetail.js +27 -29
- package/dist/commonjs/components/Inspector/MainScreen.js +9 -10
- package/dist/commonjs/components/Inspector/NetworkDetail.js +10 -11
- package/dist/commonjs/components/Inspector/NetworkTab.js +14 -14
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +6 -9
- package/dist/commonjs/components/Inspector/PerformanceTab.js +30 -43
- package/dist/commonjs/components/Inspector/ReduxDetail.js +18 -34
- package/dist/commonjs/components/Inspector/ReduxTab.js +11 -20
- package/dist/commonjs/components/Inspector/SettingsPanel.js +32 -36
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +6 -6
- package/dist/commonjs/components/Inspector/StorageTab.js +14 -26
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +5 -6
- package/dist/commonjs/components/JsonViewer.js +3 -10
- package/dist/commonjs/components/LogCard.js +7 -7
- package/dist/commonjs/components/MetaAccordion.js +1 -7
- package/dist/commonjs/components/NetworkIcons.js +12 -16
- package/dist/commonjs/components/SectionHeader.js +0 -4
- package/dist/commonjs/components/SkeletonPlaceholder.js +6 -6
- package/dist/commonjs/components/Slider.js +6 -6
- package/dist/commonjs/components/SourcePageCard.js +0 -4
- package/dist/commonjs/components/TreeNode.js +0 -4
- package/dist/commonjs/console.d.ts +0 -4
- package/dist/commonjs/console.js +0 -4
- package/dist/commonjs/constants/index.js +6 -9
- package/dist/commonjs/constants/telemetryConfig.d.ts +7 -0
- package/dist/commonjs/constants/telemetryConfig.js +10 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -3
- package/dist/commonjs/crash.d.ts +0 -4
- package/dist/commonjs/crash.js +0 -4
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +0 -7
- package/dist/commonjs/customHooks/analyticsLogger.js +3 -59
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +0 -9
- package/dist/commonjs/customHooks/bundleAnalyzer.js +3 -86
- package/dist/commonjs/customHooks/consoleLogger.js +0 -16
- package/dist/commonjs/customHooks/crashHandler.d.ts +0 -28
- package/dist/commonjs/customHooks/crashHandler.js +0 -55
- package/dist/commonjs/customHooks/logFilters.d.ts +0 -4
- package/dist/commonjs/customHooks/logFilters.js +0 -11
- package/dist/commonjs/customHooks/networkLogger.js +2 -13
- package/dist/commonjs/customHooks/performanceTracker.d.ts +0 -27
- package/dist/commonjs/customHooks/performanceTracker.js +0 -31
- package/dist/commonjs/customHooks/reduxLogger.d.ts +0 -12
- package/dist/commonjs/customHooks/reduxLogger.js +0 -51
- package/dist/commonjs/customHooks/storageInspector.d.ts +0 -40
- package/dist/commonjs/customHooks/storageInspector.js +1 -56
- package/dist/commonjs/decorators/index.d.ts +0 -37
- package/dist/commonjs/decorators/index.js +0 -42
- package/dist/commonjs/helpers/gaAnalyticsRegistry.d.ts +0 -10
- package/dist/commonjs/helpers/gaAnalyticsRegistry.js +0 -26
- package/dist/commonjs/helpers/index.d.ts +0 -7
- package/dist/commonjs/helpers/index.js +1 -42
- package/dist/commonjs/helpers/memoryManager.d.ts +0 -11
- package/dist/commonjs/helpers/memoryManager.js +0 -13
- package/dist/commonjs/helpers/searchQueryParser.d.ts +0 -4
- package/dist/commonjs/helpers/searchQueryParser.js +0 -18
- package/dist/commonjs/helpers/settingsStore.js +0 -8
- package/dist/commonjs/helpers/telemetry.d.ts +2 -0
- package/dist/commonjs/helpers/telemetry.js +302 -0
- package/dist/commonjs/i18n/index.d.ts +0 -9
- package/dist/commonjs/i18n/index.js +0 -15
- package/dist/commonjs/index.js +15 -97
- package/dist/commonjs/native/NativeInspector.d.ts +0 -54
- package/dist/commonjs/native/NativeInspector.js +0 -56
- package/dist/commonjs/network.d.ts +0 -4
- package/dist/commonjs/network.js +0 -4
- package/dist/commonjs/performance.d.ts +0 -4
- package/dist/commonjs/performance.js +0 -4
- package/dist/commonjs/redux.d.ts +0 -4
- package/dist/commonjs/redux.js +0 -4
- package/dist/commonjs/storage.d.ts +0 -4
- package/dist/commonjs/storage.js +0 -4
- package/dist/commonjs/styles/AppColors.d.ts +0 -3
- package/dist/commonjs/styles/AppColors.js +15 -30
- package/dist/commonjs/styles/AppFonts.d.ts +0 -4
- package/dist/commonjs/styles/AppFonts.js +0 -4
- package/dist/commonjs/styles/common.js +0 -11
- package/dist/commonjs/styles/index.js +0 -8
- package/dist/commonjs/types/enums.js +0 -3
- package/dist/commonjs/types/interfaces.d.ts +3 -3
- package/dist/esm/analytics.d.ts +0 -4
- package/dist/esm/analytics.js +0 -4
- package/dist/esm/bundle.d.ts +0 -4
- package/dist/esm/bundle.js +0 -4
- package/dist/esm/components/AnalyticsDetail.js +18 -27
- package/dist/esm/components/AnalyticsEventCard.js +9 -12
- package/dist/esm/components/AnalyticsGraph.js +10 -15
- package/dist/esm/components/AppHeaderLogo.js +0 -3
- package/dist/esm/components/BrandCircleIcon.js +15 -15
- package/dist/esm/components/BrandSquareIcon.js +20 -20
- package/dist/esm/components/CodeSnippet.js +6 -19
- package/dist/esm/components/ConsoleLogCard.js +0 -1
- package/dist/esm/components/CopyButton.js +0 -4
- package/dist/esm/components/DiffViewer.js +0 -2
- package/dist/esm/components/DomainHeader.js +0 -4
- package/dist/esm/components/EmptyState.js +0 -3
- package/dist/esm/components/ErrorBoundary.js +5 -10
- package/dist/esm/components/HeadersSection.js +0 -5
- package/dist/esm/components/HighlightText.js +1 -4
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +11 -26
- package/dist/esm/components/Inspector/AnalyticsTab.js +34 -40
- package/dist/esm/components/Inspector/BundleTab.js +56 -84
- package/dist/esm/components/Inspector/ConsoleTab.js +7 -7
- package/dist/esm/components/Inspector/CrashDetail.js +18 -20
- package/dist/esm/components/Inspector/CrashFilterModal.js +0 -1
- package/dist/esm/components/Inspector/CrashTab.js +11 -20
- package/dist/esm/components/Inspector/DeviceInfoTab.js +12 -24
- package/dist/esm/components/Inspector/FabLauncher.js +1 -1
- package/dist/esm/components/Inspector/InspectorContext.js +0 -2
- package/dist/esm/components/Inspector/InspectorHeader.js +7 -8
- package/dist/esm/components/Inspector/LogDetail.js +27 -29
- package/dist/esm/components/Inspector/MainScreen.js +9 -10
- package/dist/esm/components/Inspector/NetworkDetail.js +10 -11
- package/dist/esm/components/Inspector/NetworkTab.js +14 -14
- package/dist/esm/components/Inspector/NpmUpdateToast.js +6 -9
- package/dist/esm/components/Inspector/PerformanceTab.js +30 -43
- package/dist/esm/components/Inspector/ReduxDetail.js +18 -34
- package/dist/esm/components/Inspector/ReduxTab.js +11 -20
- package/dist/esm/components/Inspector/SettingsPanel.js +32 -36
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +6 -6
- package/dist/esm/components/Inspector/StorageTab.js +14 -26
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +5 -6
- package/dist/esm/components/JsonViewer.js +3 -10
- package/dist/esm/components/LogCard.js +7 -7
- package/dist/esm/components/MetaAccordion.js +1 -7
- package/dist/esm/components/NetworkIcons.js +12 -16
- package/dist/esm/components/SectionHeader.js +0 -4
- package/dist/esm/components/SkeletonPlaceholder.js +6 -6
- package/dist/esm/components/Slider.js +6 -6
- package/dist/esm/components/SourcePageCard.js +0 -4
- package/dist/esm/components/TreeNode.js +0 -4
- package/dist/esm/console.d.ts +0 -4
- package/dist/esm/console.js +0 -4
- package/dist/esm/constants/index.js +6 -9
- package/dist/esm/constants/telemetryConfig.d.ts +7 -0
- package/dist/esm/constants/telemetryConfig.js +7 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -3
- package/dist/esm/crash.d.ts +0 -4
- package/dist/esm/crash.js +0 -4
- package/dist/esm/customHooks/analyticsLogger.d.ts +0 -7
- package/dist/esm/customHooks/analyticsLogger.js +3 -59
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +0 -9
- package/dist/esm/customHooks/bundleAnalyzer.js +3 -86
- package/dist/esm/customHooks/consoleLogger.js +0 -16
- package/dist/esm/customHooks/crashHandler.d.ts +0 -28
- package/dist/esm/customHooks/crashHandler.js +0 -55
- package/dist/esm/customHooks/logFilters.d.ts +0 -4
- package/dist/esm/customHooks/logFilters.js +0 -11
- package/dist/esm/customHooks/networkLogger.js +2 -13
- package/dist/esm/customHooks/performanceTracker.d.ts +0 -27
- package/dist/esm/customHooks/performanceTracker.js +0 -31
- package/dist/esm/customHooks/reduxLogger.d.ts +0 -12
- package/dist/esm/customHooks/reduxLogger.js +0 -51
- package/dist/esm/customHooks/storageInspector.d.ts +0 -40
- package/dist/esm/customHooks/storageInspector.js +1 -56
- package/dist/esm/decorators/index.d.ts +0 -37
- package/dist/esm/decorators/index.js +0 -42
- package/dist/esm/helpers/gaAnalyticsRegistry.d.ts +0 -10
- package/dist/esm/helpers/gaAnalyticsRegistry.js +0 -26
- package/dist/esm/helpers/index.d.ts +0 -7
- package/dist/esm/helpers/index.js +1 -42
- package/dist/esm/helpers/memoryManager.d.ts +0 -11
- package/dist/esm/helpers/memoryManager.js +0 -13
- package/dist/esm/helpers/searchQueryParser.d.ts +0 -4
- package/dist/esm/helpers/searchQueryParser.js +0 -18
- package/dist/esm/helpers/settingsStore.js +0 -8
- package/dist/esm/helpers/telemetry.d.ts +2 -0
- package/dist/esm/helpers/telemetry.js +298 -0
- package/dist/esm/i18n/index.d.ts +0 -9
- package/dist/esm/i18n/index.js +0 -15
- package/dist/esm/index.js +15 -97
- package/dist/esm/native/NativeInspector.d.ts +0 -54
- package/dist/esm/native/NativeInspector.js +0 -56
- package/dist/esm/network.d.ts +0 -4
- package/dist/esm/network.js +0 -4
- package/dist/esm/performance.d.ts +0 -4
- package/dist/esm/performance.js +0 -4
- package/dist/esm/redux.d.ts +0 -4
- package/dist/esm/redux.js +0 -4
- package/dist/esm/storage.d.ts +0 -4
- package/dist/esm/storage.js +0 -4
- package/dist/esm/styles/AppColors.d.ts +0 -3
- package/dist/esm/styles/AppColors.js +15 -30
- package/dist/esm/styles/AppFonts.d.ts +0 -4
- package/dist/esm/styles/AppFonts.js +0 -4
- package/dist/esm/styles/common.js +0 -11
- package/dist/esm/styles/index.js +0 -8
- package/dist/esm/types/enums.js +0 -3
- package/dist/esm/types/interfaces.d.ts +3 -3
- package/package.json +2 -2
- package/src/constants/telemetryConfig.ts +16 -0
- package/src/constants/version.ts +1 -1
- package/src/helpers/telemetry.ts +341 -0
- package/src/index.tsx +15 -1
- package/src/types/interfaces.ts +3 -0
|
@@ -3,14 +3,14 @@ import Svg, { Circle, Path, G, Defs, LinearGradient, RadialGradient, Stop, Rect,
|
|
|
3
3
|
export const BrandSquareIcon = ({ size = 56 }) => {
|
|
4
4
|
return (<Svg width={size} height={size} viewBox="0 0 256 256" fill="none">
|
|
5
5
|
<Defs>
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
<LinearGradient id="bs_tile" x1="0" y1="0" x2="256" y2="256" gradientUnits="userSpaceOnUse">
|
|
8
8
|
<Stop offset="0%" stopColor="#1E1B4B"/>
|
|
9
9
|
<Stop offset="50%" stopColor="#18182F"/>
|
|
10
10
|
<Stop offset="100%" stopColor="#0B0F19"/>
|
|
11
11
|
</LinearGradient>
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
<LinearGradient id="bs_border" x1="0" y1="0" x2="256" y2="256" gradientUnits="userSpaceOnUse">
|
|
15
15
|
<Stop offset="0%" stopColor="#818CF8" stopOpacity={0.9}/>
|
|
16
16
|
<Stop offset="45%" stopColor="#C084FC" stopOpacity={0.8}/>
|
|
@@ -18,21 +18,21 @@ export const BrandSquareIcon = ({ size = 56 }) => {
|
|
|
18
18
|
<Stop offset="100%" stopColor="#38BDF8" stopOpacity={0.9}/>
|
|
19
19
|
</LinearGradient>
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
<RadialGradient id="bs_top_glow" cx="50%" cy="15%" r="65%">
|
|
23
23
|
<Stop offset="0%" stopColor="#818CF8" stopOpacity={0.35}/>
|
|
24
24
|
<Stop offset="60%" stopColor="#A855F7" stopOpacity={0.12}/>
|
|
25
25
|
<Stop offset="100%" stopColor="#1E1B4B" stopOpacity={0}/>
|
|
26
26
|
</RadialGradient>
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
<LinearGradient id="bs_body" x1="64" y1="40" x2="192" y2="220" gradientUnits="userSpaceOnUse">
|
|
30
30
|
<Stop offset="0%" stopColor="#3730A3"/>
|
|
31
31
|
<Stop offset="50%" stopColor="#2E1065"/>
|
|
32
32
|
<Stop offset="100%" stopColor="#17123A"/>
|
|
33
33
|
</LinearGradient>
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
<LinearGradient id="bs_beam" x1="40" y1="40" x2="220" y2="220" gradientUnits="userSpaceOnUse">
|
|
37
37
|
<Stop offset="0%" stopColor="#67E8F9"/>
|
|
38
38
|
<Stop offset="35%" stopColor="#818CF8"/>
|
|
@@ -40,7 +40,7 @@ export const BrandSquareIcon = ({ size = 56 }) => {
|
|
|
40
40
|
<Stop offset="100%" stopColor="#F472B6"/>
|
|
41
41
|
</LinearGradient>
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
<RadialGradient id="bs_iris" cx="38%" cy="36%" r="65%">
|
|
45
45
|
<Stop offset="0%" stopColor="#FEF08A"/>
|
|
46
46
|
<Stop offset="40%" stopColor="#FBBF24"/>
|
|
@@ -48,13 +48,13 @@ export const BrandSquareIcon = ({ size = 56 }) => {
|
|
|
48
48
|
<Stop offset="100%" stopColor="#D97706"/>
|
|
49
49
|
</RadialGradient>
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
<LinearGradient id="bs_beak" x1="124" y1="120" x2="132" y2="136" gradientUnits="userSpaceOnUse">
|
|
53
53
|
<Stop offset="0%" stopColor="#FDE047"/>
|
|
54
54
|
<Stop offset="100%" stopColor="#EA580C"/>
|
|
55
55
|
</LinearGradient>
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
|
|
58
58
|
<RadialGradient id="bs_lens" cx="40%" cy="35%" r="65%">
|
|
59
59
|
<Stop offset="0%" stopColor="#A5F3FC" stopOpacity={0.4}/>
|
|
60
60
|
<Stop offset="50%" stopColor="#38BDF8" stopOpacity={0.18}/>
|
|
@@ -62,23 +62,23 @@ export const BrandSquareIcon = ({ size = 56 }) => {
|
|
|
62
62
|
</RadialGradient>
|
|
63
63
|
</Defs>
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
|
|
66
66
|
<Rect x="2" y="2" width="252" height="252" rx="58" fill="url(#bs_tile)"/>
|
|
67
67
|
<Rect x="2" y="2" width="252" height="252" rx="58" fill="url(#bs_top_glow)"/>
|
|
68
68
|
<Rect x="2" y="2" width="252" height="252" rx="58" fill="none" stroke="url(#bs_border)" strokeWidth="3.5"/>
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
|
|
71
71
|
<Path d="M62 120 C42 152 46 194 76 210 C68 178 66 146 80 120 Z" fill="#1E1B4B" stroke="url(#bs_beam)" strokeWidth="3" strokeOpacity={0.75}/>
|
|
72
72
|
<Path d="M194 120 C214 152 210 194 180 210 C188 178 190 146 176 120 Z" fill="#1E1B4B" stroke="url(#bs_beam)" strokeWidth="3" strokeOpacity={0.75}/>
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
|
|
75
75
|
<Path d="M58 146 C54 98 68 64 88 52 L98 34 L118 56 Q128 50 138 56 L158 34 L168 52 C188 64 202 98 198 146 C202 180 186 208 152 216 C140 220 116 220 104 216 C70 208 54 180 58 146 Z" fill="url(#bs_body)" stroke="url(#bs_beam)" strokeWidth="4.5" strokeLinejoin="round"/>
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
|
|
78
78
|
<Path d="M98 42 L112 56 L102 57 Z" fill="#67E8F9" opacity={0.6}/>
|
|
79
79
|
<Path d="M158 42 L144 56 L154 57 Z" fill="#F472B6" opacity={0.6}/>
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
|
|
82
82
|
<Rect x="98" y="162" width="60" height="38" rx="10" fill="#050811" stroke="url(#bs_beam)" strokeWidth="2.5"/>
|
|
83
83
|
<G strokeWidth="3" strokeLinecap="round" strokeLinejoin="round" fill="none">
|
|
84
84
|
<Path d="M116 174 L108 181 L116 188" stroke="#38BDF8"/>
|
|
@@ -86,31 +86,31 @@ export const BrandSquareIcon = ({ size = 56 }) => {
|
|
|
86
86
|
<Path d="M131 171 L125 191" stroke="#F43F5E"/>
|
|
87
87
|
</G>
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
|
|
90
90
|
<Path d="M128 88 C152 64 192 72 192 104 C192 132 162 152 128 152 C94 152 64 132 64 104 C64 72 104 64 128 88 Z" fill="#1E1B4B" stroke="url(#bs_beam)" strokeWidth="2.8"/>
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
|
|
93
93
|
<Circle cx="156" cy="106" r="19" fill="url(#bs_iris)" stroke="#0F172A" strokeWidth="2.5"/>
|
|
94
94
|
<Circle cx="156" cy="106" r="9.5" fill="#0B0F19"/>
|
|
95
95
|
<Circle cx="159.5" cy="102.5" r="3.5" fill="#FFFFFF"/>
|
|
96
96
|
<Circle cx="153" cy="109.5" r="1.8" fill="#FFFFFF" opacity={0.85}/>
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
|
|
99
|
+
|
|
100
100
|
<Circle cx="94" cy="104" r="30" fill="url(#bs_lens)" stroke="url(#bs_beam)" strokeWidth="6"/>
|
|
101
101
|
<Line x1="72" y1="126" x2="48" y2="152" stroke="#0B0F19" strokeWidth="13" strokeLinecap="round"/>
|
|
102
102
|
<Line x1="72" y1="126" x2="48" y2="152" stroke="url(#bs_beam)" strokeWidth="8" strokeLinecap="round"/>
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
|
|
105
105
|
<Circle cx="94" cy="104" r="21" fill="url(#bs_iris)" stroke="#0F172A" strokeWidth="2.5"/>
|
|
106
106
|
<Circle cx="94" cy="104" r="10.5" fill="#0B0F19"/>
|
|
107
107
|
<Circle cx="98" cy="100" r="4" fill="#FFFFFF"/>
|
|
108
108
|
<Circle cx="90.5" cy="107.5" r="2" fill="#FFFFFF" opacity={0.85}/>
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
|
|
111
111
|
<Path d="M74 94 A26 26 0 0 1 106 78" stroke="#FFFFFF" strokeWidth="3" strokeLinecap="round" opacity={0.65} fill="none"/>
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
|
|
114
114
|
<Path d="M123 120 Q128 118 133 120 Q131.5 133 128 137 Q124.5 133 123 120 Z" fill="url(#bs_beak)" stroke="#78350F" strokeWidth="1"/>
|
|
115
115
|
</Svg>);
|
|
116
116
|
};
|
|
@@ -9,7 +9,6 @@ import { AppFonts } from '../styles/AppFonts';
|
|
|
9
9
|
const escapeRegExp = (string) => {
|
|
10
10
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
11
11
|
};
|
|
12
|
-
// HTML pretty printer
|
|
13
12
|
const formatHTML = (html) => {
|
|
14
13
|
if (!html)
|
|
15
14
|
return '';
|
|
@@ -47,7 +46,6 @@ const formatHTML = (html) => {
|
|
|
47
46
|
}
|
|
48
47
|
return formatted.join('\n');
|
|
49
48
|
};
|
|
50
|
-
// CSS pretty printer
|
|
51
49
|
const formatCSS = (css) => {
|
|
52
50
|
if (!css)
|
|
53
51
|
return '';
|
|
@@ -73,7 +71,6 @@ const formatCSS = (css) => {
|
|
|
73
71
|
}
|
|
74
72
|
return formatted.join('\n');
|
|
75
73
|
};
|
|
76
|
-
// JS pretty printer
|
|
77
74
|
const formatJS = (js) => {
|
|
78
75
|
if (!js)
|
|
79
76
|
return '';
|
|
@@ -257,12 +254,12 @@ const CodeSnippetLine = React.memo(({ line, lineIndex, language, search, isActiv
|
|
|
257
254
|
</Text>);
|
|
258
255
|
};
|
|
259
256
|
return (<View style={[styles.lineRow, isActiveMatch && styles.activeMatchRow]}>
|
|
260
|
-
|
|
257
|
+
|
|
261
258
|
<View style={[styles.gutter, { backgroundColor: AppColors.grayBackground, borderRightColor: AppColors.grayBorderSecondary }, isActiveMatch && styles.activeMatchGutter]}>
|
|
262
259
|
<Text style={[styles.lineNumber, { color: AppColors.grayTextWeak }, isActiveMatch && styles.activeMatchLineNumber]}>{lineIndex + 1}</Text>
|
|
263
260
|
</View>
|
|
264
261
|
|
|
265
|
-
|
|
262
|
+
|
|
266
263
|
<View style={styles.codeLine}>
|
|
267
264
|
<Text style={[styles.codeLineText, { color: AppColors.primaryBlack }]}>
|
|
268
265
|
{tokens.length === 0 ? (<Text style={[styles.plain, { color: AppColors.primaryBlack }]}> </Text>) : (tokens.map((token, tokenIdx) => (<React.Fragment key={tokenIdx}>
|
|
@@ -278,21 +275,17 @@ const CodeSnippet = ({ code, language, search, }) => {
|
|
|
278
275
|
const [currentMatchIdx, setCurrentMatchIdx] = useState(-1);
|
|
279
276
|
const [visibleLinesCount, setVisibleLinesCount] = useState(200);
|
|
280
277
|
const flatListRef = useRef(null);
|
|
281
|
-
// Sync prop search to searchQuery
|
|
282
278
|
useEffect(() => {
|
|
283
279
|
if (search !== undefined) {
|
|
284
280
|
setSearchQuery(search);
|
|
285
281
|
}
|
|
286
282
|
}, [search]);
|
|
287
|
-
// Debounce search query updates
|
|
288
283
|
useEffect(() => {
|
|
289
284
|
const timer = setTimeout(() => {
|
|
290
285
|
setDebouncedQuery(searchQuery);
|
|
291
286
|
}, 300);
|
|
292
287
|
return () => clearTimeout(timer);
|
|
293
288
|
}, [searchQuery]);
|
|
294
|
-
// If code is extremely large (e.g. > 150KB), skip the pretty printers
|
|
295
|
-
// to avoid blocking the single JS thread.
|
|
296
289
|
const formattedCode = useMemo(() => {
|
|
297
290
|
if (!code)
|
|
298
291
|
return '';
|
|
@@ -312,7 +305,6 @@ const CodeSnippet = ({ code, language, search, }) => {
|
|
|
312
305
|
return [];
|
|
313
306
|
return formattedCode.split(/\r?\n/);
|
|
314
307
|
}, [formattedCode]);
|
|
315
|
-
// Find all line indices matching the search query
|
|
316
308
|
const matches = useMemo(() => {
|
|
317
309
|
if (!debouncedQuery.trim() || debouncedQuery.length < 2)
|
|
318
310
|
return [];
|
|
@@ -325,13 +317,11 @@ const CodeSnippet = ({ code, language, search, }) => {
|
|
|
325
317
|
}
|
|
326
318
|
return indices;
|
|
327
319
|
}, [debouncedQuery, lines]);
|
|
328
|
-
// Reset scroll and states on code/language changes
|
|
329
320
|
useEffect(() => {
|
|
330
321
|
setVisibleLinesCount(200);
|
|
331
322
|
setSearchQuery(search || '');
|
|
332
323
|
setCurrentMatchIdx(-1);
|
|
333
324
|
}, [code, language]);
|
|
334
|
-
// Auto-scroll to the first match when search query returns matches
|
|
335
325
|
useEffect(() => {
|
|
336
326
|
if (matches.length > 0) {
|
|
337
327
|
setCurrentMatchIdx(0);
|
|
@@ -345,11 +335,9 @@ const CodeSnippet = ({ code, language, search, }) => {
|
|
|
345
335
|
if (matches.length === 0 || matchIdx < 0 || matchIdx >= matches.length)
|
|
346
336
|
return;
|
|
347
337
|
const lineIdx = matches[matchIdx];
|
|
348
|
-
// Ensure the targeted index is loaded in FlatList
|
|
349
338
|
if (lineIdx >= visibleLinesCount) {
|
|
350
339
|
setVisibleLinesCount(lineIdx + 100);
|
|
351
340
|
}
|
|
352
|
-
// Schedule scroll after state has applied
|
|
353
341
|
setTimeout(() => {
|
|
354
342
|
try {
|
|
355
343
|
flatListRef.current?.scrollToIndex({
|
|
@@ -359,7 +347,6 @@ const CodeSnippet = ({ code, language, search, }) => {
|
|
|
359
347
|
});
|
|
360
348
|
}
|
|
361
349
|
catch (e) {
|
|
362
|
-
// Fallback recovery is handled by onScrollToIndexFailed
|
|
363
350
|
}
|
|
364
351
|
}, 50);
|
|
365
352
|
};
|
|
@@ -408,13 +395,13 @@ const CodeSnippet = ({ code, language, search, }) => {
|
|
|
408
395
|
return (<CodeSnippetLine line={item} lineIndex={index} language={language} search={debouncedQuery} isActiveMatch={isActiveMatch}/>);
|
|
409
396
|
};
|
|
410
397
|
return (<View style={{ flex: 1 }}>
|
|
411
|
-
|
|
398
|
+
|
|
412
399
|
<View style={styles.searchRow}>
|
|
413
400
|
<View style={[styles.searchBar, { backgroundColor: AppColors.primaryLight, borderColor: AppColors.grayBorderSecondary }]}>
|
|
414
401
|
<SearchIcon color={AppColors.grayTextWeak} size={15}/>
|
|
415
402
|
<TextInput placeholder={`Search ${language.toUpperCase()}...`} placeholderTextColor={AppColors.grayTextWeak} value={searchQuery} onChangeText={setSearchQuery} style={[styles.searchInput, { color: AppColors.primaryBlack }]} autoCorrect={false} autoCapitalize="none"/>
|
|
416
403
|
|
|
417
|
-
|
|
404
|
+
|
|
418
405
|
{debouncedQuery.length >= 2 && (<Text style={[styles.matchCountText, { backgroundColor: AppColors.grayBackground, color: AppColors.grayTextWeak }]}>
|
|
419
406
|
{matches.length > 0 ? `${currentMatchIdx + 1}/${matches.length}` : '0/0'}
|
|
420
407
|
</Text>)}
|
|
@@ -424,7 +411,7 @@ const CodeSnippet = ({ code, language, search, }) => {
|
|
|
424
411
|
</Pressable>)}
|
|
425
412
|
</View>
|
|
426
413
|
|
|
427
|
-
|
|
414
|
+
|
|
428
415
|
{matches.length > 0 && (<View style={[styles.navArrowsGroup, { backgroundColor: AppColors.primaryLight, borderColor: AppColors.grayBorderSecondary }]}>
|
|
429
416
|
<TouchableScale onPress={handlePrevMatch} hitSlop={8} style={styles.navArrowBtn}>
|
|
430
417
|
<ArrowUpIcon color={AppColors.grayTextStrong} size={14}/>
|
|
@@ -437,7 +424,7 @@ const CodeSnippet = ({ code, language, search, }) => {
|
|
|
437
424
|
<CopyButton value={code} label={`${language.toUpperCase()} Source`}/>
|
|
438
425
|
</View>
|
|
439
426
|
|
|
440
|
-
|
|
427
|
+
|
|
441
428
|
<View style={[styles.container, { backgroundColor: AppColors.grayBackground, borderColor: AppColors.grayBorderSecondary }]}>
|
|
442
429
|
<FlatList ref={flatListRef} data={visibleLines} renderItem={renderLine} keyExtractor={(_, index) => String(index)} maxToRenderPerBatch={30} windowSize={5} initialNumToRender={50} removeClippedSubviews={Platform.OS === 'android'} onEndReached={handleEndReached} onEndReachedThreshold={0.5} onScrollToIndexFailed={onScrollToIndexFailed}/>
|
|
443
430
|
</View>
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React, { useState, useCallback } from 'react';
|
|
2
2
|
import { Share } from 'react-native';
|
|
3
|
-
// Components
|
|
4
3
|
import TouchableScale from './TouchableScale';
|
|
5
|
-
// Helpers
|
|
6
4
|
import { copyToClipboard } from '../helpers';
|
|
7
5
|
import { triggerNativeHaptic } from '../native/NativeInspector';
|
|
8
|
-
// Assets
|
|
9
6
|
import { TerminalIcon, FetchIcon, CopyIcon, CheckIcon } from './NetworkIcons';
|
|
10
|
-
// Stylesheet
|
|
11
7
|
import { AppColors } from '../styles/AppColors';
|
|
12
8
|
import styles from '../styles';
|
|
13
9
|
const CopyButton = React.memo(({ value, label, iconType = 'copy' }) => {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { useTranslation } from '../i18n';
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { View, Text, ScrollView } from 'react-native';
|
|
4
|
-
// Helpers
|
|
5
4
|
import { getDiff } from '../helpers';
|
|
6
|
-
// Stylesheet
|
|
7
5
|
import { AppColors } from '../styles/AppColors';
|
|
8
6
|
import styles from '../styles';
|
|
9
7
|
const DiffViewer = React.memo(({ oldData, newData, forceOpen, }) => {
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import { Animated, Pressable, View, Text } from 'react-native';
|
|
3
|
-
// Stylesheet
|
|
4
3
|
import { AppColors } from '../styles/AppColors';
|
|
5
4
|
import { AppFonts } from '../styles/AppFonts';
|
|
6
|
-
// Helpers
|
|
7
5
|
import { formatDateTime } from '../helpers';
|
|
8
|
-
// Assets
|
|
9
6
|
import { ChevronIcon, ScreenIcon, CheckIcon, FailIcon, ClockIcon, } from './NetworkIcons';
|
|
10
|
-
// Stylesheet
|
|
11
7
|
import styles from '../styles';
|
|
12
8
|
const DomainHeader = ({ pageName, color, stats, activeFilters, onToggleFilter, isCollapsed, onToggleCollapse, isFirst, timestamp, }) => {
|
|
13
9
|
const chevronAnim = useRef(new Animated.Value(isCollapsed ? 0 : 1)).current;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import { Animated, DevSettings, Alert, Text } from 'react-native';
|
|
3
|
-
// Components
|
|
4
3
|
import TouchableScale from './TouchableScale';
|
|
5
4
|
import AnimatedEntrance from './AnimatedEntrance';
|
|
6
|
-
// Assets
|
|
7
5
|
import { EmptyRadarIcon } from './NetworkIcons';
|
|
8
|
-
// Stylesheet
|
|
9
6
|
import { AppColors } from '../styles/AppColors';
|
|
10
7
|
import styles from '../styles';
|
|
11
8
|
const EmptyState = React.memo(function EmptyState({ isSearch, searchQuery, customTitle, customSub, onClearSearch, }) {
|
|
@@ -20,7 +20,6 @@ function parseStackTrace(stack) {
|
|
|
20
20
|
line.includes('handleInterceptedCrash')) {
|
|
21
21
|
continue;
|
|
22
22
|
}
|
|
23
|
-
// iOS format: method@url:line:col
|
|
24
23
|
const iosMatch = line.match(/^([^@]*)@(.*):(\d+):(\d+)$/);
|
|
25
24
|
if (iosMatch) {
|
|
26
25
|
const [, method, fullPath, lineNum, colNum] = iosMatch;
|
|
@@ -36,7 +35,6 @@ function parseStackTrace(stack) {
|
|
|
36
35
|
});
|
|
37
36
|
continue;
|
|
38
37
|
}
|
|
39
|
-
// Android format: at method (url:line:col) or at url:line:col
|
|
40
38
|
const androidMatch = line.match(/^\s*at\s+(.+)\s+\((.+):(\d+):(\d+)\)$/);
|
|
41
39
|
if (androidMatch) {
|
|
42
40
|
const [, method, fullPath, lineNum, colNum] = androidMatch;
|
|
@@ -67,7 +65,6 @@ function parseStackTrace(stack) {
|
|
|
67
65
|
});
|
|
68
66
|
}
|
|
69
67
|
}
|
|
70
|
-
// Find topmost project frame, or fallback to first frame
|
|
71
68
|
const rootFrame = frames.find(f => f.isProjectFile) || frames[0] || null;
|
|
72
69
|
return { rootFrame, frames };
|
|
73
70
|
}
|
|
@@ -125,7 +122,6 @@ ${error.stack || 'No stack trace available'}
|
|
|
125
122
|
const isSyntaxOrType = errorType.includes('Syntax') ||
|
|
126
123
|
errorType.includes('Type') ||
|
|
127
124
|
errorType.includes('Reference');
|
|
128
|
-
// ─── Inline Fallback View ─────────────────────────────────────────────
|
|
129
125
|
if (this.props.fallbackType === 'inline') {
|
|
130
126
|
return (<View style={styles.inlineContainer}>
|
|
131
127
|
<View style={styles.inlineHeader}>
|
|
@@ -151,10 +147,9 @@ ${error.stack || 'No stack trace available'}
|
|
|
151
147
|
</View>
|
|
152
148
|
</View>);
|
|
153
149
|
}
|
|
154
|
-
// ─── Full-Screen Custom Native Recovery Modal ─────────────────────────
|
|
155
150
|
return (<SafeAreaView style={styles.safeArea}>
|
|
156
151
|
<View style={styles.container}>
|
|
157
|
-
|
|
152
|
+
|
|
158
153
|
<View style={styles.header}>
|
|
159
154
|
<View style={styles.iconGlowWrap}>
|
|
160
155
|
<WarningTriangleIcon color={AppColors.red500} size={28}/>
|
|
@@ -179,7 +174,7 @@ ${error.stack || 'No stack trace available'}
|
|
|
179
174
|
</View>
|
|
180
175
|
|
|
181
176
|
<ScrollView style={styles.scrollArea} contentContainerStyle={styles.scrollContent} showsVerticalScrollIndicator={false}>
|
|
182
|
-
|
|
177
|
+
|
|
183
178
|
<View style={styles.errorBox}>
|
|
184
179
|
<View style={styles.errorBoxHeader}>
|
|
185
180
|
<CircleAlertIcon size={14} color={AppColors.red500}/>
|
|
@@ -188,7 +183,7 @@ ${error.stack || 'No stack trace available'}
|
|
|
188
183
|
<Text style={styles.errorMessage}>{error.message}</Text>
|
|
189
184
|
</View>
|
|
190
185
|
|
|
191
|
-
|
|
186
|
+
|
|
192
187
|
{rootFrame && (<View style={styles.locationCard}>
|
|
193
188
|
<Text style={styles.cardHeaderTitle}>{t('errors.exactLocation')}</Text>
|
|
194
189
|
<View style={styles.locRow}>
|
|
@@ -212,7 +207,7 @@ ${error.stack || 'No stack trace available'}
|
|
|
212
207
|
</Text>) : null}
|
|
213
208
|
</View>)}
|
|
214
209
|
|
|
215
|
-
|
|
210
|
+
|
|
216
211
|
<View style={styles.stackCard}>
|
|
217
212
|
<View style={styles.stackCardHeader}>
|
|
218
213
|
<Text style={styles.cardHeaderTitle}>{t('errors.callStack')}</Text>
|
|
@@ -251,7 +246,7 @@ ${error.stack || 'No stack trace available'}
|
|
|
251
246
|
</View>
|
|
252
247
|
</ScrollView>
|
|
253
248
|
|
|
254
|
-
|
|
249
|
+
|
|
255
250
|
<View style={styles.footer}>
|
|
256
251
|
<TouchableOpacity onPress={this.handleReset} style={styles.retryBtn} activeOpacity={0.8}>
|
|
257
252
|
<RefreshCcwIcon size={16} color={AppColors.white}/>
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { useTranslation } from '../i18n';
|
|
3
3
|
import { View, Pressable, Text, Animated } from 'react-native';
|
|
4
|
-
// Components
|
|
5
4
|
import CopyButton from './CopyButton';
|
|
6
5
|
import TouchableScale from './TouchableScale';
|
|
7
|
-
// Helpers
|
|
8
6
|
import { copyToClipboard } from '../helpers';
|
|
9
|
-
// Custom Hooks
|
|
10
7
|
import useAccordion from '../customHooks/useAccordion';
|
|
11
|
-
// Assets
|
|
12
8
|
import { HeadersIcon, ChevronIcon, CopyIcon } from './NetworkIcons';
|
|
13
|
-
// Stylesheet
|
|
14
9
|
import { AppColors } from '../styles/AppColors';
|
|
15
10
|
import styles from '../styles';
|
|
16
11
|
const HeaderRow = React.memo(function HeaderRow({ headerKey, value, isLast, index, }) {
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Text } from 'react-native';
|
|
3
|
-
// Helpers
|
|
4
3
|
import { escapeRegex, handleOpenExternalLink } from '../helpers';
|
|
5
4
|
const HighlightText = React.memo(function HighlightText({ text, search, style, highlightStyle, detectLinks, numberOfLines, ...rest }) {
|
|
6
|
-
// Optimization: For huge strings (> 20KB) with no active search, bypass all splitting/regex overhead
|
|
7
5
|
if (!text || (text.length > 20000 && !search && !detectLinks)) {
|
|
8
6
|
return (<Text style={style} numberOfLines={numberOfLines} {...rest}>
|
|
9
7
|
{text}
|
|
10
8
|
</Text>);
|
|
11
9
|
}
|
|
12
|
-
// Regex to detect absolute URLs
|
|
13
10
|
const URL_REGEX = /(https?:\/\/[^\s]+)/g;
|
|
14
11
|
const renderNormalOrHighlighted = (subText, keyPrefix) => {
|
|
15
12
|
if (!search) {
|
|
@@ -29,7 +26,7 @@ const HighlightText = React.memo(function HighlightText({ text, search, style, h
|
|
|
29
26
|
{parts.map((part, i) => {
|
|
30
27
|
if (part.match(URL_REGEX)) {
|
|
31
28
|
return (<Text key={`link-${i}`} style={{
|
|
32
|
-
color: '#007AFF',
|
|
29
|
+
color: '#007AFF',
|
|
33
30
|
textDecorationLine: 'underline',
|
|
34
31
|
}} onPress={() => {
|
|
35
32
|
handleOpenExternalLink(part);
|
|
@@ -23,7 +23,6 @@ const DEFAULT_FILTERS = {
|
|
|
23
23
|
};
|
|
24
24
|
const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
25
25
|
const { analyticsEvents, analyticsSearch, analyticsFilters, setAnalyticsFilters, } = useInspector();
|
|
26
|
-
// Staged Draft State: applied ONLY on tapping "Apply Filters"
|
|
27
26
|
const [draft, setDraft] = useState(() => ({
|
|
28
27
|
...analyticsFilters,
|
|
29
28
|
categories: new Set(analyticsFilters.categories),
|
|
@@ -31,7 +30,6 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
31
30
|
sources: new Set(analyticsFilters.sources || ['all']),
|
|
32
31
|
userTypes: new Set(analyticsFilters.userTypes || ['all']),
|
|
33
32
|
}));
|
|
34
|
-
// Re-sync draft whenever modal opens
|
|
35
33
|
useEffect(() => {
|
|
36
34
|
if (visible) {
|
|
37
35
|
setDraft({
|
|
@@ -43,7 +41,6 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
43
41
|
});
|
|
44
42
|
}
|
|
45
43
|
}, [visible, analyticsFilters]);
|
|
46
|
-
// Extract unique screen names from logged events
|
|
47
44
|
const uniqueScreens = useMemo(() => {
|
|
48
45
|
const screens = new Set();
|
|
49
46
|
for (const e of analyticsEvents) {
|
|
@@ -58,7 +55,6 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
58
55
|
}
|
|
59
56
|
return Array.from(screens);
|
|
60
57
|
}, [analyticsEvents]);
|
|
61
|
-
// Toggle Category in Draft
|
|
62
58
|
const toggleCategory = (cat) => {
|
|
63
59
|
setDraft(prev => {
|
|
64
60
|
const next = new Set(prev.categories);
|
|
@@ -77,7 +73,6 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
77
73
|
return { ...prev, categories: next };
|
|
78
74
|
});
|
|
79
75
|
};
|
|
80
|
-
// Toggle Screen in Draft
|
|
81
76
|
const toggleScreen = (scr) => {
|
|
82
77
|
setDraft(prev => {
|
|
83
78
|
const next = new Set(prev.screens);
|
|
@@ -90,7 +85,6 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
90
85
|
return { ...prev, screens: next };
|
|
91
86
|
});
|
|
92
87
|
};
|
|
93
|
-
// Toggle Source in Draft
|
|
94
88
|
const toggleSource = (src) => {
|
|
95
89
|
setDraft(prev => {
|
|
96
90
|
const next = new Set(prev.sources);
|
|
@@ -109,7 +103,6 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
109
103
|
return { ...prev, sources: next };
|
|
110
104
|
});
|
|
111
105
|
};
|
|
112
|
-
// Toggle User Type in Draft
|
|
113
106
|
const toggleUserType = (ut) => {
|
|
114
107
|
setDraft(prev => {
|
|
115
108
|
const next = new Set(prev.userTypes);
|
|
@@ -128,26 +121,21 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
128
121
|
return { ...prev, userTypes: next };
|
|
129
122
|
});
|
|
130
123
|
};
|
|
131
|
-
// Toggle Boolean Flag in Draft
|
|
132
124
|
const toggleFlag = (key) => {
|
|
133
125
|
setDraft(prev => ({
|
|
134
126
|
...prev,
|
|
135
127
|
[key]: !prev[key],
|
|
136
128
|
}));
|
|
137
129
|
};
|
|
138
|
-
// Set Time Window in Draft
|
|
139
130
|
const setTimeWindow = (tw) => {
|
|
140
131
|
setDraft(prev => ({ ...prev, timeWindow: tw }));
|
|
141
132
|
};
|
|
142
|
-
// Set Payload Complexity in Draft
|
|
143
133
|
const setPayloadComplexity = (pc) => {
|
|
144
134
|
setDraft(prev => ({ ...prev, payloadComplexity: pc }));
|
|
145
135
|
};
|
|
146
|
-
// Set Sort in Draft
|
|
147
136
|
const setSort = (sortBy) => {
|
|
148
137
|
setDraft(prev => ({ ...prev, sortBy }));
|
|
149
138
|
};
|
|
150
|
-
// Reset Draft to default
|
|
151
139
|
const handleResetDraft = () => {
|
|
152
140
|
setDraft({
|
|
153
141
|
categories: new Set(['all']),
|
|
@@ -165,7 +153,6 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
165
153
|
sortBy: 'time_desc',
|
|
166
154
|
});
|
|
167
155
|
};
|
|
168
|
-
// Commit Draft to actual filters
|
|
169
156
|
const handleApply = () => {
|
|
170
157
|
setAnalyticsFilters({
|
|
171
158
|
...draft,
|
|
@@ -176,7 +163,6 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
176
163
|
});
|
|
177
164
|
onClose();
|
|
178
165
|
};
|
|
179
|
-
// Discard changes & close
|
|
180
166
|
const handleDiscard = () => {
|
|
181
167
|
setDraft({
|
|
182
168
|
...analyticsFilters,
|
|
@@ -187,7 +173,6 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
187
173
|
});
|
|
188
174
|
onClose();
|
|
189
175
|
};
|
|
190
|
-
// Calculate matching count for Draft in real-time
|
|
191
176
|
const draftMatchCount = useMemo(() => {
|
|
192
177
|
let events = analyticsEvents;
|
|
193
178
|
if (analyticsSearch) {
|
|
@@ -290,7 +275,7 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
290
275
|
<Pressable style={StyleSheet.absoluteFill} onPress={handleDiscard}/>
|
|
291
276
|
|
|
292
277
|
<View style={styles.modalCard}>
|
|
293
|
-
|
|
278
|
+
|
|
294
279
|
<View style={styles.header}>
|
|
295
280
|
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
296
281
|
<View style={styles.headerIconBox}>
|
|
@@ -315,9 +300,9 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
315
300
|
</View>
|
|
316
301
|
</View>
|
|
317
302
|
|
|
318
|
-
|
|
303
|
+
|
|
319
304
|
<ScrollView style={{ maxHeight: 460 }} contentContainerStyle={styles.scrollContent} showsVerticalScrollIndicator={true}>
|
|
320
|
-
|
|
305
|
+
|
|
321
306
|
<View style={styles.section}>
|
|
322
307
|
<View style={styles.sectionHeaderRow}>
|
|
323
308
|
<ClockIcon color={AppColors.grayTextWeak} size={12}/>
|
|
@@ -346,7 +331,7 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
346
331
|
</View>
|
|
347
332
|
</View>
|
|
348
333
|
|
|
349
|
-
|
|
334
|
+
|
|
350
335
|
<View style={styles.section}>
|
|
351
336
|
<View style={styles.sectionHeaderRow}>
|
|
352
337
|
<TargetGoalIcon color={AppColors.grayTextWeak} size={12}/>
|
|
@@ -436,7 +421,7 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
436
421
|
</View>
|
|
437
422
|
</View>
|
|
438
423
|
|
|
439
|
-
|
|
424
|
+
|
|
440
425
|
<View style={styles.section}>
|
|
441
426
|
<View style={styles.sectionHeaderRow}>
|
|
442
427
|
<MoneyIcon color={AppColors.grayTextWeak} size={12}/>
|
|
@@ -537,7 +522,7 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
537
522
|
</View>
|
|
538
523
|
</View>
|
|
539
524
|
|
|
540
|
-
|
|
525
|
+
|
|
541
526
|
<View style={styles.section}>
|
|
542
527
|
<View style={styles.sectionHeaderRow}>
|
|
543
528
|
<UserIcon color={AppColors.grayTextWeak} size={12}/>
|
|
@@ -593,7 +578,7 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
593
578
|
</View>
|
|
594
579
|
</View>
|
|
595
580
|
|
|
596
|
-
|
|
581
|
+
|
|
597
582
|
<View style={styles.section}>
|
|
598
583
|
<View style={styles.sectionHeaderRow}>
|
|
599
584
|
<BoltIcon color={AppColors.grayTextWeak} size={12}/>
|
|
@@ -643,7 +628,7 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
643
628
|
</View>
|
|
644
629
|
</View>
|
|
645
630
|
|
|
646
|
-
|
|
631
|
+
|
|
647
632
|
<View style={styles.section}>
|
|
648
633
|
<View style={styles.sectionHeaderRow}>
|
|
649
634
|
<CodeBracketsIcon color={AppColors.grayTextWeak} size={12}/>
|
|
@@ -671,7 +656,7 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
671
656
|
</View>
|
|
672
657
|
</View>
|
|
673
658
|
|
|
674
|
-
|
|
659
|
+
|
|
675
660
|
{uniqueScreens.length > 0 && (<View style={styles.section}>
|
|
676
661
|
<View style={styles.sectionHeaderRow}>
|
|
677
662
|
<PinIcon color={AppColors.grayTextWeak} size={12}/>
|
|
@@ -700,7 +685,7 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
700
685
|
</View>
|
|
701
686
|
</View>)}
|
|
702
687
|
|
|
703
|
-
|
|
688
|
+
|
|
704
689
|
<View style={styles.section}>
|
|
705
690
|
<View style={styles.sectionHeaderRow}>
|
|
706
691
|
<ClockIcon color={AppColors.grayTextWeak} size={12}/>
|
|
@@ -778,7 +763,7 @@ const AnalyticsFilterModal = ({ visible, onClose, }) => {
|
|
|
778
763
|
</View>
|
|
779
764
|
</ScrollView>
|
|
780
765
|
|
|
781
|
-
|
|
766
|
+
|
|
782
767
|
<View style={styles.footer}>
|
|
783
768
|
<TouchableOpacity onPress={handleDiscard} style={styles.discardBtn} activeOpacity={0.8}>
|
|
784
769
|
<Text style={styles.discardBtnText}>Discard</Text>
|