react-native-inapp-inspector 2.2.2 → 2.2.4

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.
Files changed (159) hide show
  1. package/dist/commonjs/components/AnalyticsDetail.js +5 -1
  2. package/dist/commonjs/components/AnalyticsEventCard.js +2 -1
  3. package/dist/commonjs/components/DiffViewer.js +1 -1
  4. package/dist/commonjs/components/Inspector/BundleTab.js +22 -0
  5. package/dist/commonjs/components/Inspector/DeviceInfoTab.d.ts +3 -0
  6. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +835 -0
  7. package/dist/commonjs/components/Inspector/InspectorHeader.js +12 -14
  8. package/dist/commonjs/components/Inspector/LogDetail.js +6 -3
  9. package/dist/commonjs/components/Inspector/MainScreen.js +7 -3
  10. package/dist/commonjs/components/Inspector/NetworkTab.js +92 -15
  11. package/dist/commonjs/components/Inspector/PerformanceTab.js +38 -12
  12. package/dist/commonjs/components/Inspector/SettingsPanel.js +440 -229
  13. package/dist/commonjs/components/Inspector/StorageTab.d.ts +3 -0
  14. package/dist/commonjs/components/Inspector/StorageTab.js +892 -0
  15. package/dist/commonjs/components/Inspector/TabBar.js +14 -0
  16. package/dist/commonjs/components/Inspector/TelemetryConsentModal.js +11 -2
  17. package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +4 -1
  18. package/dist/commonjs/components/NetworkIcons.d.ts +6 -0
  19. package/dist/commonjs/components/NetworkIcons.js +30 -1
  20. package/dist/commonjs/constants/version.d.ts +1 -1
  21. package/dist/commonjs/constants/version.js +1 -1
  22. package/dist/commonjs/customHooks/bundleAnalyzer.js +44 -22
  23. package/dist/commonjs/customHooks/storageInspector.d.ts +67 -0
  24. package/dist/commonjs/customHooks/storageInspector.js +486 -0
  25. package/dist/commonjs/i18n/locales/en.json +8 -2
  26. package/dist/commonjs/index.d.ts +1 -0
  27. package/dist/commonjs/index.js +16 -1
  28. package/dist/commonjs/storage.d.ts +5 -0
  29. package/dist/commonjs/storage.js +18 -0
  30. package/dist/commonjs/types/enums.d.ts +5 -0
  31. package/dist/commonjs/types/enums.js +5 -0
  32. package/dist/esm/components/AnalyticsDetail.js +6 -2
  33. package/dist/esm/components/AnalyticsEventCard.js +2 -1
  34. package/dist/esm/components/DiffViewer.js +1 -1
  35. package/dist/esm/components/Inspector/BundleTab.js +22 -0
  36. package/dist/esm/components/Inspector/DeviceInfoTab.d.ts +3 -0
  37. package/dist/esm/components/Inspector/DeviceInfoTab.js +796 -0
  38. package/dist/esm/components/Inspector/InspectorHeader.js +13 -15
  39. package/dist/esm/components/Inspector/LogDetail.js +7 -4
  40. package/dist/esm/components/Inspector/MainScreen.js +7 -3
  41. package/dist/esm/components/Inspector/NetworkTab.js +93 -16
  42. package/dist/esm/components/Inspector/PerformanceTab.js +39 -13
  43. package/dist/esm/components/Inspector/SettingsPanel.js +441 -230
  44. package/dist/esm/components/Inspector/StorageTab.d.ts +3 -0
  45. package/dist/esm/components/Inspector/StorageTab.js +853 -0
  46. package/dist/esm/components/Inspector/TabBar.js +15 -1
  47. package/dist/esm/components/Inspector/TelemetryConsentModal.js +11 -2
  48. package/dist/esm/components/Inspector/UpdateAvailableModal.js +4 -1
  49. package/dist/esm/components/NetworkIcons.d.ts +6 -0
  50. package/dist/esm/components/NetworkIcons.js +23 -0
  51. package/dist/esm/constants/version.d.ts +1 -1
  52. package/dist/esm/constants/version.js +1 -1
  53. package/dist/esm/customHooks/bundleAnalyzer.js +44 -22
  54. package/dist/esm/customHooks/storageInspector.d.ts +67 -0
  55. package/dist/esm/customHooks/storageInspector.js +469 -0
  56. package/dist/esm/i18n/locales/en.json +8 -2
  57. package/dist/esm/index.d.ts +1 -0
  58. package/dist/esm/index.js +5 -0
  59. package/dist/esm/storage.d.ts +5 -0
  60. package/dist/esm/storage.js +5 -0
  61. package/dist/esm/types/enums.d.ts +5 -0
  62. package/dist/esm/types/enums.js +5 -0
  63. package/package.json +9 -1
  64. package/src/analytics.ts +35 -0
  65. package/src/bundle.ts +25 -0
  66. package/src/components/AnalyticsDetail.tsx +870 -0
  67. package/src/components/AnalyticsEventCard.tsx +442 -0
  68. package/src/components/AnalyticsGraph.tsx +583 -0
  69. package/src/components/AnimatedEntrance.tsx +64 -0
  70. package/src/components/AppHeaderLogo.tsx +109 -0
  71. package/src/components/BrandCircleIcon.tsx +144 -0
  72. package/src/components/BrandSquareIcon.tsx +144 -0
  73. package/src/components/CodeSnippet.tsx +725 -0
  74. package/src/components/ConsoleLogCard.tsx +628 -0
  75. package/src/components/CopyButton.tsx +87 -0
  76. package/src/components/DiffViewer.tsx +82 -0
  77. package/src/components/DomainHeader.tsx +237 -0
  78. package/src/components/EmptyState.tsx +73 -0
  79. package/src/components/EndOfListFooter.tsx +100 -0
  80. package/src/components/ErrorBoundary.tsx +688 -0
  81. package/src/components/HeadersSection.tsx +192 -0
  82. package/src/components/HighlightText.tsx +100 -0
  83. package/src/components/Inspector/AnalyticsFilterModal.tsx +1250 -0
  84. package/src/components/Inspector/AnalyticsTab.tsx +1336 -0
  85. package/src/components/Inspector/BundleTab.tsx +4760 -0
  86. package/src/components/Inspector/ConsoleTab.tsx +702 -0
  87. package/src/components/Inspector/CrashDetail.tsx +941 -0
  88. package/src/components/Inspector/CrashFilterModal.tsx +721 -0
  89. package/src/components/Inspector/CrashTab.tsx +871 -0
  90. package/src/components/Inspector/DeviceInfoTab.tsx +1204 -0
  91. package/src/components/Inspector/FabLauncher.tsx +80 -0
  92. package/src/components/Inspector/InspectorContext.tsx +28 -0
  93. package/src/components/Inspector/InspectorHeader.tsx +972 -0
  94. package/src/components/Inspector/LogDetail.tsx +1431 -0
  95. package/src/components/Inspector/MainScreen.tsx +262 -0
  96. package/src/components/Inspector/NavigationTracker.tsx +13 -0
  97. package/src/components/Inspector/NetworkDetail.tsx +794 -0
  98. package/src/components/Inspector/NetworkTab.tsx +1183 -0
  99. package/src/components/Inspector/NpmUpdateToast.tsx +392 -0
  100. package/src/components/Inspector/PerformanceTab.tsx +1928 -0
  101. package/src/components/Inspector/ReduxDetail.tsx +1651 -0
  102. package/src/components/Inspector/ReduxTab.tsx +954 -0
  103. package/src/components/Inspector/SettingsPanel.tsx +3447 -0
  104. package/src/components/Inspector/StorageTab.tsx +1048 -0
  105. package/src/components/Inspector/TabBar.tsx +207 -0
  106. package/src/components/Inspector/TelemetryConsentModal.tsx +416 -0
  107. package/src/components/Inspector/UpdateAvailableModal.tsx +557 -0
  108. package/src/components/JsonViewer.tsx +486 -0
  109. package/src/components/LogCard.tsx +491 -0
  110. package/src/components/LogSyntaxHighlighter.tsx +178 -0
  111. package/src/components/MetaAccordion.tsx +340 -0
  112. package/src/components/MiniBarChart.tsx +42 -0
  113. package/src/components/MiniLineChart.tsx +33 -0
  114. package/src/components/NetworkIcons.tsx +2221 -0
  115. package/src/components/SectionHeader.tsx +113 -0
  116. package/src/components/SegmentedTabs.tsx +83 -0
  117. package/src/components/Slider.tsx +300 -0
  118. package/src/components/SourcePageCard.tsx +148 -0
  119. package/src/components/Toast.tsx +131 -0
  120. package/src/components/TouchableScale.tsx +91 -0
  121. package/src/components/TreeNode.tsx +186 -0
  122. package/src/console.ts +24 -0
  123. package/src/constants/index.ts +38 -0
  124. package/src/constants/version.ts +3 -0
  125. package/src/crash.ts +32 -0
  126. package/src/customHooks/analyticsLogger.ts +336 -0
  127. package/src/customHooks/bundleAnalyzer.ts +1256 -0
  128. package/src/customHooks/consoleLogger.ts +497 -0
  129. package/src/customHooks/crashHandler.ts +944 -0
  130. package/src/customHooks/logFilters.ts +32 -0
  131. package/src/customHooks/networkLogger.ts +419 -0
  132. package/src/customHooks/performanceTracker.ts +1014 -0
  133. package/src/customHooks/reduxLogger.ts +406 -0
  134. package/src/customHooks/storageInspector.ts +509 -0
  135. package/src/customHooks/useAccordion.tsx +60 -0
  136. package/src/decorators/index.ts +184 -0
  137. package/src/helpers/gaAnalyticsRegistry.ts +204 -0
  138. package/src/helpers/index.ts +860 -0
  139. package/src/helpers/memoryManager.ts +138 -0
  140. package/src/helpers/searchQueryParser.ts +283 -0
  141. package/src/helpers/settingsStore.ts +171 -0
  142. package/src/helpers/telemetry.ts +505 -0
  143. package/src/helpers/toast.ts +17 -0
  144. package/src/i18n/index.ts +69 -0
  145. package/src/i18n/locales/en.json +1058 -0
  146. package/src/index.tsx +2356 -0
  147. package/src/native/NativeInspector.ts +397 -0
  148. package/src/native/NativeNetworkInspector.ts +24 -0
  149. package/src/network.ts +22 -0
  150. package/src/performance.ts +38 -0
  151. package/src/redux.ts +23 -0
  152. package/src/storage.ts +18 -0
  153. package/src/styles/AppColors.ts +408 -0
  154. package/src/styles/AppFonts.ts +8 -0
  155. package/src/styles/common.ts +209 -0
  156. package/src/styles/index.ts +1570 -0
  157. package/src/types/enums.ts +199 -0
  158. package/src/types/index.ts +34 -0
  159. package/src/types/interfaces.ts +515 -0
@@ -0,0 +1,1250 @@
1
+ import React, {useEffect, useMemo, useState} from 'react';
2
+ import {
3
+ Modal,
4
+ Pressable,
5
+ ScrollView,
6
+ StyleSheet,
7
+ Text,
8
+ TouchableOpacity,
9
+ View,
10
+ } from 'react-native';
11
+ import {useInspector} from './InspectorContext';
12
+ import {AnalyticsFilters, AnalyticsEvent} from '../../types';
13
+ import {AppColors} from '../../styles/AppColors';
14
+ import {AppFonts} from '../../styles/AppFonts';
15
+ import {getEventCategory} from '../../helpers';
16
+ import {
17
+ FilterIcon,
18
+ CloseWhite,
19
+ CheckIcon,
20
+ CartIcon,
21
+ GlobeIcon,
22
+ BoltIcon,
23
+ SparkleIcon,
24
+ MoneyIcon,
25
+ ClockIcon,
26
+ HourglassIcon,
27
+ FlameIcon,
28
+ PinIcon,
29
+ RepeatIcon,
30
+ TargetGoalIcon,
31
+ UserIcon,
32
+ UserCheckIcon,
33
+ PackageBoxIcon,
34
+ CodeBracketsIcon,
35
+ } from '../NetworkIcons';
36
+ import TouchableScale from '../TouchableScale';
37
+
38
+ interface AnalyticsFilterModalProps {
39
+ visible: boolean;
40
+ onClose: () => void;
41
+ }
42
+
43
+ const DEFAULT_FILTERS: AnalyticsFilters = {
44
+ categories: new Set(['all']),
45
+ screens: new Set(),
46
+ sources: new Set(['all']),
47
+ userTypes: new Set(['all']),
48
+ timeWindow: 'all',
49
+ payloadComplexity: 'all',
50
+ hasRevenue: false,
51
+ hasItems: false,
52
+ hasUserProps: false,
53
+ hasParams: false,
54
+ onlyDuplicates: false,
55
+ onlyConversions: false,
56
+ sortBy: 'time_desc',
57
+ };
58
+
59
+ const AnalyticsFilterModal: React.FC<AnalyticsFilterModalProps> = ({
60
+ visible,
61
+ onClose,
62
+ }) => {
63
+ const {
64
+ analyticsEvents,
65
+ analyticsSearch,
66
+ analyticsFilters,
67
+ setAnalyticsFilters,
68
+ } = useInspector();
69
+
70
+ // Staged Draft State: applied ONLY on tapping "Apply Filters"
71
+ const [draft, setDraft] = useState<AnalyticsFilters>(() => ({
72
+ ...analyticsFilters,
73
+ categories: new Set(analyticsFilters.categories),
74
+ screens: new Set(analyticsFilters.screens),
75
+ sources: new Set(analyticsFilters.sources || ['all']),
76
+ userTypes: new Set(analyticsFilters.userTypes || ['all']),
77
+ }));
78
+
79
+ // Re-sync draft whenever modal opens
80
+ useEffect(() => {
81
+ if (visible) {
82
+ setDraft({
83
+ ...analyticsFilters,
84
+ categories: new Set(analyticsFilters.categories),
85
+ screens: new Set(analyticsFilters.screens),
86
+ sources: new Set(analyticsFilters.sources || ['all']),
87
+ userTypes: new Set(analyticsFilters.userTypes || ['all']),
88
+ });
89
+ }
90
+ }, [visible, analyticsFilters]);
91
+
92
+ // Extract unique screen names from logged events
93
+ const uniqueScreens = useMemo(() => {
94
+ const screens = new Set<string>();
95
+ for (const e of analyticsEvents) {
96
+ const scr =
97
+ e.screenName ||
98
+ e.params?.firebase_screen ||
99
+ e.params?.screen_name ||
100
+ e.params?.firebase_screen_class ||
101
+ e.screenClass;
102
+ if (scr && typeof scr === 'string' && scr.trim() !== '') {
103
+ screens.add(scr.trim());
104
+ }
105
+ }
106
+ return Array.from(screens);
107
+ }, [analyticsEvents]);
108
+
109
+ // Toggle Category in Draft
110
+ const toggleCategory = (cat: string) => {
111
+ setDraft(prev => {
112
+ const next = new Set(prev.categories);
113
+ if (cat === 'all') {
114
+ return {...prev, categories: new Set(['all'])};
115
+ }
116
+ next.delete('all');
117
+ if (next.has(cat)) {
118
+ next.delete(cat);
119
+ if (next.size === 0) next.add('all');
120
+ } else {
121
+ next.add(cat);
122
+ }
123
+ return {...prev, categories: next};
124
+ });
125
+ };
126
+
127
+ // Toggle Screen in Draft
128
+ const toggleScreen = (scr: string) => {
129
+ setDraft(prev => {
130
+ const next = new Set(prev.screens);
131
+ if (next.has(scr)) {
132
+ next.delete(scr);
133
+ } else {
134
+ next.add(scr);
135
+ }
136
+ return {...prev, screens: next};
137
+ });
138
+ };
139
+
140
+ // Toggle Source in Draft
141
+ const toggleSource = (src: string) => {
142
+ setDraft(prev => {
143
+ const next = new Set(prev.sources);
144
+ if (src === 'all') {
145
+ return {...prev, sources: new Set(['all'])};
146
+ }
147
+ next.delete('all');
148
+ if (next.has(src)) {
149
+ next.delete(src);
150
+ if (next.size === 0) next.add('all');
151
+ } else {
152
+ next.add(src);
153
+ }
154
+ return {...prev, sources: next};
155
+ });
156
+ };
157
+
158
+ // Toggle User Type in Draft
159
+ const toggleUserType = (ut: string) => {
160
+ setDraft(prev => {
161
+ const next = new Set(prev.userTypes);
162
+ if (ut === 'all') {
163
+ return {...prev, userTypes: new Set(['all'])};
164
+ }
165
+ next.delete('all');
166
+ if (next.has(ut)) {
167
+ next.delete(ut);
168
+ if (next.size === 0) next.add('all');
169
+ } else {
170
+ next.add(ut);
171
+ }
172
+ return {...prev, userTypes: next};
173
+ });
174
+ };
175
+
176
+ // Toggle Boolean Flag in Draft
177
+ const toggleFlag = (
178
+ key:
179
+ | 'hasRevenue'
180
+ | 'hasItems'
181
+ | 'hasUserProps'
182
+ | 'hasParams'
183
+ | 'onlyDuplicates'
184
+ | 'onlyConversions',
185
+ ) => {
186
+ setDraft(prev => ({
187
+ ...prev,
188
+ [key]: !prev[key],
189
+ }));
190
+ };
191
+
192
+ // Set Time Window in Draft
193
+ const setTimeWindow = (tw: 'all' | '1m' | '5m' | '15m' | '1h') => {
194
+ setDraft(prev => ({...prev, timeWindow: tw}));
195
+ };
196
+
197
+ // Set Payload Complexity in Draft
198
+ const setPayloadComplexity = (
199
+ pc: 'all' | 'none' | 'simple' | 'heavy',
200
+ ) => {
201
+ setDraft(prev => ({...prev, payloadComplexity: pc}));
202
+ };
203
+
204
+ // Set Sort in Draft
205
+ const setSort = (
206
+ sortBy: 'time_desc' | 'time_asc' | 'revenue_desc' | 'count_desc',
207
+ ) => {
208
+ setDraft(prev => ({...prev, sortBy}));
209
+ };
210
+
211
+ // Reset Draft to default
212
+ const handleResetDraft = () => {
213
+ setDraft({
214
+ categories: new Set(['all']),
215
+ screens: new Set(),
216
+ sources: new Set(['all']),
217
+ userTypes: new Set(['all']),
218
+ timeWindow: 'all',
219
+ payloadComplexity: 'all',
220
+ hasRevenue: false,
221
+ hasItems: false,
222
+ hasUserProps: false,
223
+ hasParams: false,
224
+ onlyDuplicates: false,
225
+ onlyConversions: false,
226
+ sortBy: 'time_desc',
227
+ });
228
+ };
229
+
230
+ // Commit Draft to actual filters
231
+ const handleApply = () => {
232
+ setAnalyticsFilters({
233
+ ...draft,
234
+ categories: new Set(draft.categories),
235
+ screens: new Set(draft.screens),
236
+ sources: new Set(draft.sources),
237
+ userTypes: new Set(draft.userTypes),
238
+ });
239
+ onClose();
240
+ };
241
+
242
+ // Discard changes & close
243
+ const handleDiscard = () => {
244
+ setDraft({
245
+ ...analyticsFilters,
246
+ categories: new Set(analyticsFilters.categories),
247
+ screens: new Set(analyticsFilters.screens),
248
+ sources: new Set(analyticsFilters.sources || ['all']),
249
+ userTypes: new Set(analyticsFilters.userTypes || ['all']),
250
+ });
251
+ onClose();
252
+ };
253
+
254
+ // Calculate matching count for Draft in real-time
255
+ const draftMatchCount = useMemo(() => {
256
+ let events = analyticsEvents;
257
+
258
+ if (analyticsSearch) {
259
+ const s = analyticsSearch.toLowerCase();
260
+ events = events.filter(
261
+ e =>
262
+ e.name.toLowerCase().includes(s) ||
263
+ JSON.stringify(e.params || {}).toLowerCase().includes(s) ||
264
+ (e.screenName ?? '').toLowerCase().includes(s) ||
265
+ (e.pageTitle ?? '').toLowerCase().includes(s),
266
+ );
267
+ }
268
+
269
+ if (draft.categories.size > 0 && !draft.categories.has('all')) {
270
+ events = events.filter(e => {
271
+ const cat = getEventCategory(e.name);
272
+ return draft.categories.has(cat);
273
+ });
274
+ }
275
+
276
+ if (draft.timeWindow !== 'all') {
277
+ const now = Date.now();
278
+ const cutoff =
279
+ draft.timeWindow === '1m'
280
+ ? now - 60 * 1000
281
+ : draft.timeWindow === '5m'
282
+ ? now - 5 * 60 * 1000
283
+ : draft.timeWindow === '15m'
284
+ ? now - 15 * 60 * 1000
285
+ : now - 60 * 60 * 1000;
286
+ events = events.filter(e => e.timestamp >= cutoff);
287
+ }
288
+
289
+ if (draft.sources.size > 0 && !draft.sources.has('all')) {
290
+ events = events.filter(e => draft.sources.has(e.source || 'manual'));
291
+ }
292
+
293
+ if (draft.userTypes.size > 0 && !draft.userTypes.has('all')) {
294
+ events = events.filter(e => {
295
+ const isIdentified = Boolean(e.userId && e.userId.trim() !== '');
296
+ if (draft.userTypes.has('identified') && isIdentified) return true;
297
+ if (draft.userTypes.has('anonymous') && !isIdentified) return true;
298
+ return false;
299
+ });
300
+ }
301
+
302
+ if (draft.payloadComplexity !== 'all') {
303
+ events = events.filter(e => {
304
+ const count = e.params ? Object.keys(e.params).length : 0;
305
+ if (draft.payloadComplexity === 'none') return count === 0;
306
+ if (draft.payloadComplexity === 'simple') return count >= 1 && count <= 5;
307
+ if (draft.payloadComplexity === 'heavy') return count > 5;
308
+ return true;
309
+ });
310
+ }
311
+
312
+ if (draft.onlyConversions) {
313
+ const CONVERSION_PATTERNS = [
314
+ 'purchase',
315
+ 'item_purchase',
316
+ 'ecommerce_purchase',
317
+ 'sign_up',
318
+ 'login',
319
+ 'lead',
320
+ 'generate_lead',
321
+ 'tutorial_complete',
322
+ 'add_payment_info',
323
+ 'begin_checkout',
324
+ ];
325
+ events = events.filter(e =>
326
+ CONVERSION_PATTERNS.some(pat => e.name.toLowerCase().includes(pat)),
327
+ );
328
+ }
329
+
330
+ if (draft.screens.size > 0) {
331
+ events = events.filter(e => {
332
+ const scr =
333
+ e.screenName ||
334
+ e.params?.firebase_screen ||
335
+ e.params?.screen_name ||
336
+ e.params?.firebase_screen_class ||
337
+ e.screenClass ||
338
+ '';
339
+ return draft.screens.has(scr);
340
+ });
341
+ }
342
+
343
+ if (draft.hasRevenue) {
344
+ events = events.filter(e => {
345
+ const val = e.params?.value ?? e.params?.price;
346
+ return val !== undefined && val !== null && Number(val) > 0;
347
+ });
348
+ }
349
+
350
+ if (draft.hasItems) {
351
+ events = events.filter(
352
+ e => Array.isArray(e.params?.items) && e.params.items.length > 0,
353
+ );
354
+ }
355
+
356
+ if (draft.hasUserProps) {
357
+ events = events.filter(
358
+ e => e.userProperties && Object.keys(e.userProperties).length > 0,
359
+ );
360
+ }
361
+
362
+ if (draft.hasParams) {
363
+ events = events.filter(
364
+ e => e.params && Object.keys(e.params).length > 0,
365
+ );
366
+ }
367
+
368
+ return events.length;
369
+ }, [analyticsEvents, analyticsSearch, draft]);
370
+
371
+ const isAllCategories =
372
+ draft.categories.has('all') || draft.categories.size === 0;
373
+ const isAllSources = draft.sources.has('all') || draft.sources.size === 0;
374
+ const isAllUserTypes =
375
+ draft.userTypes.has('all') || draft.userTypes.size === 0;
376
+
377
+ return (
378
+ <Modal
379
+ visible={visible}
380
+ transparent
381
+ animationType="fade"
382
+ onRequestClose={handleDiscard}>
383
+ <View style={styles.backdrop}>
384
+ <Pressable style={StyleSheet.absoluteFill} onPress={handleDiscard} />
385
+
386
+ <View style={styles.modalCard}>
387
+ {/* ─── Header ──────────────────────────────────────────────────────── */}
388
+ <View style={styles.header}>
389
+ <View style={{flexDirection: 'row', alignItems: 'center', gap: 8}}>
390
+ <View style={styles.headerIconBox}>
391
+ <FilterIcon color={AppColors.brandPurple} size={15} />
392
+ </View>
393
+ <View>
394
+ <Text style={styles.headerTitle}>Analytics Filters</Text>
395
+ <Text style={styles.headerSubtitle}>
396
+ GA4 Telemetry Dimensions & Metrics
397
+ </Text>
398
+ </View>
399
+ </View>
400
+
401
+ <View style={{flexDirection: 'row', alignItems: 'center', gap: 8}}>
402
+ <TouchableOpacity
403
+ onPress={handleResetDraft}
404
+ hitSlop={8}
405
+ style={styles.resetBtn}>
406
+ <Text style={styles.resetBtnText}>Reset All</Text>
407
+ </TouchableOpacity>
408
+
409
+ <TouchableOpacity
410
+ onPress={handleDiscard}
411
+ hitSlop={10}
412
+ style={styles.closeBtn}>
413
+ <CloseWhite />
414
+ </TouchableOpacity>
415
+ </View>
416
+ </View>
417
+
418
+ {/* ─── Scrollable Filter Options ──────────────────────────────────── */}
419
+ <ScrollView
420
+ style={{maxHeight: 460}}
421
+ contentContainerStyle={styles.scrollContent}
422
+ showsVerticalScrollIndicator={true}>
423
+ {/* 1. Time Horizon Window */}
424
+ <View style={styles.section}>
425
+ <View style={styles.sectionHeaderRow}>
426
+ <ClockIcon color={AppColors.grayTextWeak} size={12} />
427
+ <Text style={styles.sectionTitle}>TIME HORIZON</Text>
428
+ </View>
429
+ <View style={styles.chipsWrap}>
430
+ {[
431
+ {key: 'all' as const, label: 'All Time'},
432
+ {key: '1m' as const, label: 'Last 1 min'},
433
+ {key: '5m' as const, label: 'Last 5 mins'},
434
+ {key: '15m' as const, label: 'Last 15 mins'},
435
+ {key: '1h' as const, label: 'Last 1 hour'},
436
+ ].map(item => (
437
+ <TouchableScale
438
+ key={item.key}
439
+ onPress={() => setTimeWindow(item.key)}
440
+ style={[
441
+ styles.filterPill,
442
+ draft.timeWindow === item.key &&
443
+ styles.filterPillActive,
444
+ ]}>
445
+ <Text
446
+ style={[
447
+ styles.filterPillText,
448
+ draft.timeWindow === item.key &&
449
+ styles.filterPillTextActive,
450
+ ]}>
451
+ {item.label}
452
+ </Text>
453
+ </TouchableScale>
454
+ ))}
455
+ </View>
456
+ </View>
457
+
458
+ {/* 2. Category Dimensions */}
459
+ <View style={styles.section}>
460
+ <View style={styles.sectionHeaderRow}>
461
+ <TargetGoalIcon color={AppColors.grayTextWeak} size={12} />
462
+ <Text style={styles.sectionTitle}>EVENT CATEGORIES</Text>
463
+ </View>
464
+ <View style={styles.chipsWrap}>
465
+ <TouchableScale
466
+ onPress={() => toggleCategory('all')}
467
+ style={[
468
+ styles.filterPill,
469
+ isAllCategories && styles.filterPillActive,
470
+ ]}>
471
+ {isAllCategories && (
472
+ <CheckIcon color={AppColors.white} size={12} />
473
+ )}
474
+ <Text
475
+ style={[
476
+ styles.filterPillText,
477
+ isAllCategories && styles.filterPillTextActive,
478
+ ]}>
479
+ All Categories
480
+ </Text>
481
+ </TouchableScale>
482
+
483
+ <TouchableScale
484
+ onPress={() => toggleCategory('ecommerce')}
485
+ style={[
486
+ styles.filterPill,
487
+ draft.categories.has('ecommerce') &&
488
+ styles.filterPillActive,
489
+ ]}>
490
+ <CartIcon
491
+ color={
492
+ draft.categories.has('ecommerce')
493
+ ? AppColors.white
494
+ : AppColors.amber700
495
+ }
496
+ size={13}
497
+ />
498
+ <Text
499
+ style={[
500
+ styles.filterPillText,
501
+ draft.categories.has('ecommerce') &&
502
+ styles.filterPillTextActive,
503
+ ]}>
504
+ Ecommerce
505
+ </Text>
506
+ </TouchableScale>
507
+
508
+ <TouchableScale
509
+ onPress={() => toggleCategory('page_view')}
510
+ style={[
511
+ styles.filterPill,
512
+ draft.categories.has('page_view') &&
513
+ styles.filterPillActive,
514
+ ]}>
515
+ <GlobeIcon
516
+ color={
517
+ draft.categories.has('page_view')
518
+ ? AppColors.white
519
+ : AppColors.sky600
520
+ }
521
+ size={13}
522
+ />
523
+ <Text
524
+ style={[
525
+ styles.filterPillText,
526
+ draft.categories.has('page_view') &&
527
+ styles.filterPillTextActive,
528
+ ]}>
529
+ Screens & Pages
530
+ </Text>
531
+ </TouchableScale>
532
+
533
+ <TouchableScale
534
+ onPress={() => toggleCategory('system')}
535
+ style={[
536
+ styles.filterPill,
537
+ draft.categories.has('system') &&
538
+ styles.filterPillActive,
539
+ ]}>
540
+ <BoltIcon
541
+ color={
542
+ draft.categories.has('system')
543
+ ? AppColors.white
544
+ : AppColors.purple
545
+ }
546
+ size={13}
547
+ />
548
+ <Text
549
+ style={[
550
+ styles.filterPillText,
551
+ draft.categories.has('system') &&
552
+ styles.filterPillTextActive,
553
+ ]}>
554
+ System & Lifecycle
555
+ </Text>
556
+ </TouchableScale>
557
+
558
+ <TouchableScale
559
+ onPress={() => toggleCategory('custom')}
560
+ style={[
561
+ styles.filterPill,
562
+ draft.categories.has('custom') &&
563
+ styles.filterPillActive,
564
+ ]}>
565
+ <SparkleIcon
566
+ color={
567
+ draft.categories.has('custom')
568
+ ? AppColors.white
569
+ : AppColors.brandPurple
570
+ }
571
+ size={13}
572
+ />
573
+ <Text
574
+ style={[
575
+ styles.filterPillText,
576
+ draft.categories.has('custom') &&
577
+ styles.filterPillTextActive,
578
+ ]}>
579
+ Custom Events
580
+ </Text>
581
+ </TouchableScale>
582
+ </View>
583
+ </View>
584
+
585
+ {/* 3. Goals, Monetization & Attributes */}
586
+ <View style={styles.section}>
587
+ <View style={styles.sectionHeaderRow}>
588
+ <MoneyIcon color={AppColors.grayTextWeak} size={12} />
589
+ <Text style={styles.sectionTitle}>
590
+ MONETIZATION & ATTRIBUTES
591
+ </Text>
592
+ </View>
593
+ <View style={styles.chipsWrap}>
594
+ <TouchableScale
595
+ onPress={() => toggleFlag('onlyConversions')}
596
+ style={[
597
+ styles.filterPill,
598
+ draft.onlyConversions && styles.filterPillActive,
599
+ ]}>
600
+ <TargetGoalIcon
601
+ color={
602
+ draft.onlyConversions
603
+ ? AppColors.white
604
+ : AppColors.brandPurple
605
+ }
606
+ size={13}
607
+ />
608
+ <Text
609
+ style={[
610
+ styles.filterPillText,
611
+ draft.onlyConversions && styles.filterPillTextActive,
612
+ ]}>
613
+ Conversion Events Only
614
+ </Text>
615
+ </TouchableScale>
616
+
617
+ <TouchableScale
618
+ onPress={() => toggleFlag('hasRevenue')}
619
+ style={[
620
+ styles.filterPill,
621
+ draft.hasRevenue && styles.filterPillActive,
622
+ ]}>
623
+ <MoneyIcon
624
+ color={
625
+ draft.hasRevenue
626
+ ? AppColors.white
627
+ : AppColors.emerald600
628
+ }
629
+ size={13}
630
+ />
631
+ <Text
632
+ style={[
633
+ styles.filterPillText,
634
+ draft.hasRevenue && styles.filterPillTextActive,
635
+ ]}>
636
+ With Revenue (Value &gt; 0)
637
+ </Text>
638
+ </TouchableScale>
639
+
640
+ <TouchableScale
641
+ onPress={() => toggleFlag('hasItems')}
642
+ style={[
643
+ styles.filterPill,
644
+ draft.hasItems && styles.filterPillActive,
645
+ ]}>
646
+ <PackageBoxIcon
647
+ color={
648
+ draft.hasItems
649
+ ? AppColors.white
650
+ : AppColors.amber700
651
+ }
652
+ size={13}
653
+ />
654
+ <Text
655
+ style={[
656
+ styles.filterPillText,
657
+ draft.hasItems && styles.filterPillTextActive,
658
+ ]}>
659
+ With Items Payload
660
+ </Text>
661
+ </TouchableScale>
662
+
663
+ <TouchableScale
664
+ onPress={() => toggleFlag('hasUserProps')}
665
+ style={[
666
+ styles.filterPill,
667
+ draft.hasUserProps && styles.filterPillActive,
668
+ ]}>
669
+ <SparkleIcon
670
+ color={
671
+ draft.hasUserProps
672
+ ? AppColors.white
673
+ : AppColors.brandPurple
674
+ }
675
+ size={13}
676
+ />
677
+ <Text
678
+ style={[
679
+ styles.filterPillText,
680
+ draft.hasUserProps && styles.filterPillTextActive,
681
+ ]}>
682
+ With User Properties
683
+ </Text>
684
+ </TouchableScale>
685
+
686
+ <TouchableScale
687
+ onPress={() => toggleFlag('hasParams')}
688
+ style={[
689
+ styles.filterPill,
690
+ draft.hasParams && styles.filterPillActive,
691
+ ]}>
692
+ <CodeBracketsIcon
693
+ color={
694
+ draft.hasParams
695
+ ? AppColors.white
696
+ : AppColors.grayText
697
+ }
698
+ size={13}
699
+ />
700
+ <Text
701
+ style={[
702
+ styles.filterPillText,
703
+ draft.hasParams && styles.filterPillTextActive,
704
+ ]}>
705
+ With Custom Params
706
+ </Text>
707
+ </TouchableScale>
708
+
709
+ <TouchableScale
710
+ onPress={() => toggleFlag('onlyDuplicates')}
711
+ style={[
712
+ styles.filterPill,
713
+ draft.onlyDuplicates && styles.filterPillActive,
714
+ ]}>
715
+ <RepeatIcon
716
+ color={
717
+ draft.onlyDuplicates
718
+ ? AppColors.white
719
+ : AppColors.rose600
720
+ }
721
+ size={13}
722
+ />
723
+ <Text
724
+ style={[
725
+ styles.filterPillText,
726
+ draft.onlyDuplicates && styles.filterPillTextActive,
727
+ ]}>
728
+ Frequent Only (&gt; 1×)
729
+ </Text>
730
+ </TouchableScale>
731
+ </View>
732
+ </View>
733
+
734
+ {/* 4. User Identification */}
735
+ <View style={styles.section}>
736
+ <View style={styles.sectionHeaderRow}>
737
+ <UserIcon color={AppColors.grayTextWeak} size={12} />
738
+ <Text style={styles.sectionTitle}>USER IDENTIFICATION</Text>
739
+ </View>
740
+ <View style={styles.chipsWrap}>
741
+ <TouchableScale
742
+ onPress={() => toggleUserType('all')}
743
+ style={[
744
+ styles.filterPill,
745
+ isAllUserTypes && styles.filterPillActive,
746
+ ]}>
747
+ {isAllUserTypes && (
748
+ <CheckIcon color={AppColors.white} size={12} />
749
+ )}
750
+ <Text
751
+ style={[
752
+ styles.filterPillText,
753
+ isAllUserTypes && styles.filterPillTextActive,
754
+ ]}>
755
+ All Users
756
+ </Text>
757
+ </TouchableScale>
758
+
759
+ <TouchableScale
760
+ onPress={() => toggleUserType('identified')}
761
+ style={[
762
+ styles.filterPill,
763
+ draft.userTypes.has('identified') &&
764
+ styles.filterPillActive,
765
+ ]}>
766
+ <UserCheckIcon
767
+ color={
768
+ draft.userTypes.has('identified')
769
+ ? AppColors.white
770
+ : AppColors.greenColor
771
+ }
772
+ size={13}
773
+ />
774
+ <Text
775
+ style={[
776
+ styles.filterPillText,
777
+ draft.userTypes.has('identified') &&
778
+ styles.filterPillTextActive,
779
+ ]}>
780
+ Identified (User ID)
781
+ </Text>
782
+ </TouchableScale>
783
+
784
+ <TouchableScale
785
+ onPress={() => toggleUserType('anonymous')}
786
+ style={[
787
+ styles.filterPill,
788
+ draft.userTypes.has('anonymous') &&
789
+ styles.filterPillActive,
790
+ ]}>
791
+ <UserIcon
792
+ color={
793
+ draft.userTypes.has('anonymous')
794
+ ? AppColors.white
795
+ : AppColors.grayTextWeak
796
+ }
797
+ size={13}
798
+ />
799
+ <Text
800
+ style={[
801
+ styles.filterPillText,
802
+ draft.userTypes.has('anonymous') &&
803
+ styles.filterPillTextActive,
804
+ ]}>
805
+ Anonymous
806
+ </Text>
807
+ </TouchableScale>
808
+ </View>
809
+ </View>
810
+
811
+ {/* 5. Source Logger SDK */}
812
+ <View style={styles.section}>
813
+ <View style={styles.sectionHeaderRow}>
814
+ <BoltIcon color={AppColors.grayTextWeak} size={12} />
815
+ <Text style={styles.sectionTitle}>EVENT SOURCE</Text>
816
+ </View>
817
+ <View style={styles.chipsWrap}>
818
+ <TouchableScale
819
+ onPress={() => toggleSource('all')}
820
+ style={[
821
+ styles.filterPill,
822
+ isAllSources && styles.filterPillActive,
823
+ ]}>
824
+ {isAllSources && (
825
+ <CheckIcon color={AppColors.white} size={12} />
826
+ )}
827
+ <Text
828
+ style={[
829
+ styles.filterPillText,
830
+ isAllSources && styles.filterPillTextActive,
831
+ ]}>
832
+ All Sources
833
+ </Text>
834
+ </TouchableScale>
835
+
836
+ <TouchableScale
837
+ onPress={() => toggleSource('firebase')}
838
+ style={[
839
+ styles.filterPill,
840
+ draft.sources.has('firebase') &&
841
+ styles.filterPillActive,
842
+ ]}>
843
+ <Text
844
+ style={[
845
+ styles.filterPillText,
846
+ draft.sources.has('firebase') &&
847
+ styles.filterPillTextActive,
848
+ ]}>
849
+ Firebase / GA SDK
850
+ </Text>
851
+ </TouchableScale>
852
+
853
+ <TouchableScale
854
+ onPress={() => toggleSource('manual')}
855
+ style={[
856
+ styles.filterPill,
857
+ draft.sources.has('manual') &&
858
+ styles.filterPillActive,
859
+ ]}>
860
+ <Text
861
+ style={[
862
+ styles.filterPillText,
863
+ draft.sources.has('manual') &&
864
+ styles.filterPillTextActive,
865
+ ]}>
866
+ In-App Logger
867
+ </Text>
868
+ </TouchableScale>
869
+ </View>
870
+ </View>
871
+
872
+ {/* 6. Payload Complexity */}
873
+ <View style={styles.section}>
874
+ <View style={styles.sectionHeaderRow}>
875
+ <CodeBracketsIcon color={AppColors.grayTextWeak} size={12} />
876
+ <Text style={styles.sectionTitle}>PAYLOAD COMPLEXITY</Text>
877
+ </View>
878
+ <View style={styles.chipsWrap}>
879
+ {[
880
+ {key: 'all' as const, label: 'All Payloads'},
881
+ {key: 'none' as const, label: '0 Params'},
882
+ {key: 'simple' as const, label: '1 - 5 Params'},
883
+ {key: 'heavy' as const, label: '> 5 Params'},
884
+ ].map(item => (
885
+ <TouchableScale
886
+ key={item.key}
887
+ onPress={() => setPayloadComplexity(item.key)}
888
+ style={[
889
+ styles.filterPill,
890
+ draft.payloadComplexity === item.key &&
891
+ styles.filterPillActive,
892
+ ]}>
893
+ <Text
894
+ style={[
895
+ styles.filterPillText,
896
+ draft.payloadComplexity === item.key &&
897
+ styles.filterPillTextActive,
898
+ ]}>
899
+ {item.label}
900
+ </Text>
901
+ </TouchableScale>
902
+ ))}
903
+ </View>
904
+ </View>
905
+
906
+ {/* 7. Discovered Screens (Dimensions) */}
907
+ {uniqueScreens.length > 0 && (
908
+ <View style={styles.section}>
909
+ <View style={styles.sectionHeaderRow}>
910
+ <PinIcon color={AppColors.grayTextWeak} size={12} />
911
+ <Text style={styles.sectionTitle}>
912
+ DISCOVERED SCREENS ({uniqueScreens.length})
913
+ </Text>
914
+ </View>
915
+ <View style={styles.chipsWrap}>
916
+ {uniqueScreens.map(scr => {
917
+ const isSelected = draft.screens.has(scr);
918
+ return (
919
+ <TouchableScale
920
+ key={scr}
921
+ onPress={() => toggleScreen(scr)}
922
+ style={[
923
+ styles.filterPill,
924
+ isSelected && styles.filterPillActive,
925
+ ]}>
926
+ <PinIcon
927
+ color={
928
+ isSelected
929
+ ? AppColors.white
930
+ : AppColors.amber700
931
+ }
932
+ size={12}
933
+ />
934
+ <Text
935
+ style={[
936
+ styles.filterPillText,
937
+ isSelected && styles.filterPillTextActive,
938
+ ]}>
939
+ {scr}
940
+ </Text>
941
+ </TouchableScale>
942
+ );
943
+ })}
944
+ </View>
945
+ </View>
946
+ )}
947
+
948
+ {/* 8. Sort Order */}
949
+ <View style={styles.section}>
950
+ <View style={styles.sectionHeaderRow}>
951
+ <ClockIcon color={AppColors.grayTextWeak} size={12} />
952
+ <Text style={styles.sectionTitle}>SORT ORDER</Text>
953
+ </View>
954
+ <View style={styles.chipsWrap}>
955
+ <TouchableScale
956
+ onPress={() => setSort('time_desc')}
957
+ style={[
958
+ styles.filterPill,
959
+ draft.sortBy === 'time_desc' &&
960
+ styles.filterPillActive,
961
+ ]}>
962
+ <ClockIcon
963
+ color={
964
+ draft.sortBy === 'time_desc'
965
+ ? AppColors.white
966
+ : AppColors.grayText
967
+ }
968
+ size={12}
969
+ />
970
+ <Text
971
+ style={[
972
+ styles.filterPillText,
973
+ draft.sortBy === 'time_desc' &&
974
+ styles.filterPillTextActive,
975
+ ]}>
976
+ Newest First (Default)
977
+ </Text>
978
+ </TouchableScale>
979
+
980
+ <TouchableScale
981
+ onPress={() => setSort('time_asc')}
982
+ style={[
983
+ styles.filterPill,
984
+ draft.sortBy === 'time_asc' &&
985
+ styles.filterPillActive,
986
+ ]}>
987
+ <HourglassIcon
988
+ color={
989
+ draft.sortBy === 'time_asc'
990
+ ? AppColors.white
991
+ : AppColors.grayText
992
+ }
993
+ size={12}
994
+ />
995
+ <Text
996
+ style={[
997
+ styles.filterPillText,
998
+ draft.sortBy === 'time_asc' &&
999
+ styles.filterPillTextActive,
1000
+ ]}>
1001
+ Oldest First
1002
+ </Text>
1003
+ </TouchableScale>
1004
+
1005
+ <TouchableScale
1006
+ onPress={() => setSort('revenue_desc')}
1007
+ style={[
1008
+ styles.filterPill,
1009
+ draft.sortBy === 'revenue_desc' &&
1010
+ styles.filterPillActive,
1011
+ ]}>
1012
+ <MoneyIcon
1013
+ color={
1014
+ draft.sortBy === 'revenue_desc'
1015
+ ? AppColors.white
1016
+ : AppColors.emerald600
1017
+ }
1018
+ size={12}
1019
+ />
1020
+ <Text
1021
+ style={[
1022
+ styles.filterPillText,
1023
+ draft.sortBy === 'revenue_desc' &&
1024
+ styles.filterPillTextActive,
1025
+ ]}>
1026
+ Highest Revenue
1027
+ </Text>
1028
+ </TouchableScale>
1029
+
1030
+ <TouchableScale
1031
+ onPress={() => setSort('count_desc')}
1032
+ style={[
1033
+ styles.filterPill,
1034
+ draft.sortBy === 'count_desc' &&
1035
+ styles.filterPillActive,
1036
+ ]}>
1037
+ <FlameIcon
1038
+ color={
1039
+ draft.sortBy === 'count_desc'
1040
+ ? AppColors.white
1041
+ : AppColors.darkOrange
1042
+ }
1043
+ size={12}
1044
+ />
1045
+ <Text
1046
+ style={[
1047
+ styles.filterPillText,
1048
+ draft.sortBy === 'count_desc' &&
1049
+ styles.filterPillTextActive,
1050
+ ]}>
1051
+ Most Frequent
1052
+ </Text>
1053
+ </TouchableScale>
1054
+ </View>
1055
+ </View>
1056
+ </ScrollView>
1057
+
1058
+ {/* ─── Footer Action Bar (Discard + Apply) ────────────────────────── */}
1059
+ <View style={styles.footer}>
1060
+ <TouchableOpacity
1061
+ onPress={handleDiscard}
1062
+ style={styles.discardBtn}
1063
+ activeOpacity={0.8}>
1064
+ <Text style={styles.discardBtnText}>Discard</Text>
1065
+ </TouchableOpacity>
1066
+
1067
+ <TouchableOpacity
1068
+ onPress={handleApply}
1069
+ style={styles.applyBtn}
1070
+ activeOpacity={0.85}>
1071
+ <Text style={styles.applyBtnText}>
1072
+ Apply ({draftMatchCount} Events)
1073
+ </Text>
1074
+ </TouchableOpacity>
1075
+ </View>
1076
+ </View>
1077
+ </View>
1078
+ </Modal>
1079
+ );
1080
+ };
1081
+
1082
+ const styles = StyleSheet.create({
1083
+ backdrop: {
1084
+ flex: 1,
1085
+ backgroundColor: `${AppColors.primaryBlack}85`,
1086
+ justifyContent: 'center',
1087
+ alignItems: 'center',
1088
+ padding: 16,
1089
+ },
1090
+ modalCard: {
1091
+ width: '100%',
1092
+ maxWidth: 440,
1093
+ backgroundColor: AppColors.white,
1094
+ borderRadius: 14,
1095
+ borderWidth: 1,
1096
+ borderColor: AppColors.dividerColor,
1097
+ shadowColor: AppColors.black,
1098
+ shadowOpacity: 0.18,
1099
+ shadowRadius: 12,
1100
+ shadowOffset: {width: 0, height: 4},
1101
+ elevation: 8,
1102
+ overflow: 'hidden',
1103
+ },
1104
+ header: {
1105
+ flexDirection: 'row',
1106
+ alignItems: 'center',
1107
+ justifyContent: 'space-between',
1108
+ paddingHorizontal: 14,
1109
+ paddingVertical: 12,
1110
+ borderBottomWidth: 1,
1111
+ borderBottomColor: AppColors.dividerColor,
1112
+ backgroundColor: `${AppColors.brandPurple}08`,
1113
+ },
1114
+ headerIconBox: {
1115
+ width: 28,
1116
+ height: 28,
1117
+ borderRadius: 7,
1118
+ backgroundColor: `${AppColors.brandPurple}18`,
1119
+ alignItems: 'center',
1120
+ justifyContent: 'center',
1121
+ },
1122
+ headerTitle: {
1123
+ fontFamily: AppFonts.interBold,
1124
+ fontSize: 13.5,
1125
+ color: AppColors.primaryBlack,
1126
+ },
1127
+ headerSubtitle: {
1128
+ fontFamily: AppFonts.interMedium,
1129
+ fontSize: 10,
1130
+ color: AppColors.grayTextWeak,
1131
+ },
1132
+ resetBtn: {
1133
+ paddingHorizontal: 8,
1134
+ paddingVertical: 4,
1135
+ borderRadius: 5,
1136
+ backgroundColor: `${AppColors.darkOrange}14`,
1137
+ borderWidth: 1,
1138
+ borderColor: `${AppColors.darkOrange}30`,
1139
+ },
1140
+ resetBtnText: {
1141
+ fontFamily: AppFonts.interBold,
1142
+ fontSize: 10,
1143
+ color: AppColors.darkOrange,
1144
+ },
1145
+ closeBtn: {
1146
+ width: 24,
1147
+ height: 24,
1148
+ borderRadius: 12,
1149
+ backgroundColor: `${AppColors.primaryBlack}18`,
1150
+ alignItems: 'center',
1151
+ justifyContent: 'center',
1152
+ },
1153
+ scrollContent: {
1154
+ padding: 14,
1155
+ gap: 14,
1156
+ },
1157
+ section: {
1158
+ gap: 7,
1159
+ },
1160
+ sectionHeaderRow: {
1161
+ flexDirection: 'row',
1162
+ alignItems: 'center',
1163
+ gap: 5,
1164
+ },
1165
+ sectionTitle: {
1166
+ fontFamily: AppFonts.interBold,
1167
+ fontSize: 9.5,
1168
+ color: AppColors.grayTextWeak,
1169
+ letterSpacing: 0.5,
1170
+ },
1171
+ chipsWrap: {
1172
+ flexDirection: 'row',
1173
+ flexWrap: 'wrap',
1174
+ gap: 6.5,
1175
+ },
1176
+ filterPill: {
1177
+ flexDirection: 'row',
1178
+ alignItems: 'center',
1179
+ gap: 5,
1180
+ paddingHorizontal: 9,
1181
+ paddingVertical: 5.5,
1182
+ borderRadius: 7,
1183
+ backgroundColor: AppColors.grayBackground,
1184
+ borderWidth: 1,
1185
+ borderColor: AppColors.dividerColor,
1186
+ },
1187
+ filterPillActive: {
1188
+ backgroundColor: AppColors.brandPurple,
1189
+ borderColor: AppColors.brandPurple,
1190
+ shadowColor: AppColors.brandPurple,
1191
+ shadowOffset: {width: 0, height: 1},
1192
+ shadowOpacity: 0.25,
1193
+ shadowRadius: 3,
1194
+ elevation: 2,
1195
+ },
1196
+ filterPillText: {
1197
+ fontFamily: AppFonts.interMedium,
1198
+ fontSize: 11,
1199
+ color: AppColors.primaryBlack,
1200
+ },
1201
+ filterPillTextActive: {
1202
+ color: AppColors.white,
1203
+ fontFamily: AppFonts.interBold,
1204
+ },
1205
+ footer: {
1206
+ flexDirection: 'row',
1207
+ alignItems: 'center',
1208
+ gap: 10,
1209
+ paddingHorizontal: 14,
1210
+ paddingVertical: 12,
1211
+ borderTopWidth: 1,
1212
+ borderTopColor: AppColors.dividerColor,
1213
+ backgroundColor: AppColors.grayBackground,
1214
+ },
1215
+ discardBtn: {
1216
+ flex: 1,
1217
+ paddingVertical: 9.5,
1218
+ borderRadius: 8,
1219
+ borderWidth: 1,
1220
+ borderColor: AppColors.dividerColor,
1221
+ backgroundColor: AppColors.white,
1222
+ alignItems: 'center',
1223
+ justifyContent: 'center',
1224
+ },
1225
+ discardBtnText: {
1226
+ fontFamily: AppFonts.interBold,
1227
+ fontSize: 12.5,
1228
+ color: AppColors.grayTextStrong,
1229
+ },
1230
+ applyBtn: {
1231
+ flex: 2,
1232
+ backgroundColor: AppColors.brandPurple,
1233
+ paddingVertical: 9.5,
1234
+ borderRadius: 8,
1235
+ alignItems: 'center',
1236
+ justifyContent: 'center',
1237
+ shadowColor: AppColors.brandPurple,
1238
+ shadowOffset: {width: 0, height: 1},
1239
+ shadowOpacity: 0.25,
1240
+ shadowRadius: 3,
1241
+ elevation: 2,
1242
+ },
1243
+ applyBtnText: {
1244
+ fontFamily: AppFonts.interBold,
1245
+ fontSize: 12.5,
1246
+ color: AppColors.white,
1247
+ },
1248
+ });
1249
+
1250
+ export default AnalyticsFilterModal;