react-native-inapp-inspector 2.3.19 → 2.3.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/README.md +14 -14
  2. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +67 -0
  3. package/dist/commonjs/analytics.js +1 -24
  4. package/dist/commonjs/bundle.js +1 -16
  5. package/dist/commonjs/capture.js +1 -35
  6. package/dist/commonjs/components/AnalyticsDetail.js +92 -623
  7. package/dist/commonjs/components/AnalyticsEventCard.js +54 -350
  8. package/dist/commonjs/components/AnalyticsGraph.js +70 -370
  9. package/dist/commonjs/components/AnimatedEntrance.js +1 -11
  10. package/dist/commonjs/components/AppHeaderLogo.js +7 -134
  11. package/dist/commonjs/components/BrandCircleIcon.js +73 -118
  12. package/dist/commonjs/components/BrandSquareIcon.js +63 -108
  13. package/dist/commonjs/components/CodeSnippet.js +48 -623
  14. package/dist/commonjs/components/ConsoleLogCard.js +63 -537
  15. package/dist/commonjs/components/CopyButton.js +3 -89
  16. package/dist/commonjs/components/DiffViewer.js +19 -83
  17. package/dist/commonjs/components/DomainHeader.js +27 -127
  18. package/dist/commonjs/components/EmptyState.js +10 -87
  19. package/dist/commonjs/components/EndOfListFooter.js +7 -81
  20. package/dist/commonjs/components/ErrorBoundary.js +72 -566
  21. package/dist/commonjs/components/HeadersSection.js +31 -110
  22. package/dist/commonjs/components/HighlightText.js +17 -58
  23. package/dist/commonjs/components/Inspector/AboutModal.d.ts +6 -0
  24. package/dist/commonjs/components/Inspector/AboutModal.js +243 -0
  25. package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +98 -797
  26. package/dist/commonjs/components/Inspector/AnalyticsTab.js +284 -930
  27. package/dist/commonjs/components/Inspector/BundleTab.js +551 -2918
  28. package/dist/commonjs/components/Inspector/ConsoleTab.js +79 -492
  29. package/dist/commonjs/components/Inspector/CrashDetail.js +123 -672
  30. package/dist/commonjs/components/Inspector/CrashFilterModal.js +66 -498
  31. package/dist/commonjs/components/Inspector/CrashTab.js +98 -670
  32. package/dist/commonjs/components/Inspector/DebuggingTab.js +74 -875
  33. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +143 -907
  34. package/dist/commonjs/components/Inspector/FabLauncher.js +42 -466
  35. package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +6 -99
  36. package/dist/commonjs/components/Inspector/InspectorContext.js +1 -21
  37. package/dist/commonjs/components/Inspector/InspectorHeader.js +191 -1110
  38. package/dist/commonjs/components/Inspector/LogDetail.js +168 -994
  39. package/dist/commonjs/components/Inspector/MainScreen.js +52 -335
  40. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +97 -644
  41. package/dist/commonjs/components/Inspector/MediaPreviewModal.js +90 -605
  42. package/dist/commonjs/components/Inspector/NavigationTracker.js +1 -12
  43. package/dist/commonjs/components/Inspector/NetworkDetail.js +89 -411
  44. package/dist/commonjs/components/Inspector/NetworkFilterModal.js +60 -576
  45. package/dist/commonjs/components/Inspector/NetworkTab.js +84 -514
  46. package/dist/commonjs/components/Inspector/NpmStarPrompt.js +18 -434
  47. package/dist/commonjs/components/Inspector/NpmUpdateToast.js +25 -298
  48. package/dist/commonjs/components/Inspector/PerformanceTab.js +182 -1397
  49. package/dist/commonjs/components/Inspector/ReduxDetail.js +188 -1089
  50. package/dist/commonjs/components/Inspector/ReduxTab.js +85 -701
  51. package/dist/commonjs/components/Inspector/SettingsPanel.js +427 -3807
  52. package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +11 -180
  53. package/dist/commonjs/components/Inspector/StorageTab.js +93 -826
  54. package/dist/commonjs/components/Inspector/TabBar.js +36 -334
  55. package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +37 -412
  56. package/dist/commonjs/components/JsonViewer.js +168 -381
  57. package/dist/commonjs/components/LogCard.js +57 -567
  58. package/dist/commonjs/components/LogSyntaxHighlighter.js +11 -130
  59. package/dist/commonjs/components/MetaAccordion.js +69 -238
  60. package/dist/commonjs/components/MiniBarChart.js +3 -56
  61. package/dist/commonjs/components/MiniLineChart.js +3 -58
  62. package/dist/commonjs/components/NetworkIcons.d.ts +13 -0
  63. package/dist/commonjs/components/NetworkIcons.js +521 -1022
  64. package/dist/commonjs/components/QRCodeView.js +5 -79
  65. package/dist/commonjs/components/SectionHeader.js +15 -37
  66. package/dist/commonjs/components/SegmentedTabs.js +7 -62
  67. package/dist/commonjs/components/SkeletonPlaceholder.js +11 -180
  68. package/dist/commonjs/components/Slider.js +15 -243
  69. package/dist/commonjs/components/SourcePageCard.js +30 -89
  70. package/dist/commonjs/components/Toast.js +5 -147
  71. package/dist/commonjs/components/TouchableScale.js +3 -24
  72. package/dist/commonjs/components/TreeNode.js +55 -130
  73. package/dist/commonjs/console.js +1 -16
  74. package/dist/commonjs/constants/index.js +1 -32
  75. package/dist/commonjs/constants/telemetryConfig.js +1 -6
  76. package/dist/commonjs/constants/version.d.ts +1 -1
  77. package/dist/commonjs/constants/version.js +1 -4
  78. package/dist/commonjs/crash.js +1 -23
  79. package/dist/commonjs/customHooks/analyticsLogger.js +1 -250
  80. package/dist/commonjs/customHooks/bundleAnalyzer.js +1 -957
  81. package/dist/commonjs/customHooks/consoleLogger.js +6 -445
  82. package/dist/commonjs/customHooks/crashHandler.js +7 -656
  83. package/dist/commonjs/customHooks/logFilters.js +1 -23
  84. package/dist/commonjs/customHooks/networkLogger.js +2 -536
  85. package/dist/commonjs/customHooks/performanceTracker.js +63 -750
  86. package/dist/commonjs/customHooks/reduxLogger.js +2 -313
  87. package/dist/commonjs/customHooks/storageInspector.js +1 -435
  88. package/dist/commonjs/customHooks/useAccordion.js +1 -18
  89. package/dist/commonjs/decorators/index.js +1 -100
  90. package/dist/commonjs/helpers/gaAnalyticsRegistry.js +1 -148
  91. package/dist/commonjs/helpers/index.d.ts +1 -0
  92. package/dist/commonjs/helpers/index.js +8 -921
  93. package/dist/commonjs/helpers/memoryManager.js +1 -99
  94. package/dist/commonjs/helpers/qrGenerator.js +1 -367
  95. package/dist/commonjs/helpers/remoteConfig.js +1 -165
  96. package/dist/commonjs/helpers/searchQueryParser.js +1 -62
  97. package/dist/commonjs/helpers/settingsStore.js +1 -144
  98. package/dist/commonjs/helpers/telemetry.js +1 -501
  99. package/dist/commonjs/helpers/toast.js +1 -20
  100. package/dist/commonjs/i18n/index.js +1 -90
  101. package/dist/commonjs/i18n/locales/en.json +1 -1140
  102. package/dist/commonjs/index.js +5 -2168
  103. package/dist/commonjs/metro.js +6 -468
  104. package/dist/commonjs/native/NativeInspector.d.ts +1 -0
  105. package/dist/commonjs/native/NativeInspector.js +1 -415
  106. package/dist/commonjs/native/NativeNetworkInspector.js +1 -4
  107. package/dist/commonjs/network.js +1 -13
  108. package/dist/commonjs/performance.js +1 -29
  109. package/dist/commonjs/redux.js +1 -20
  110. package/dist/commonjs/storage.js +1 -14
  111. package/dist/commonjs/styles/AppColors.js +1 -423
  112. package/dist/commonjs/styles/AppFonts.js +1 -17
  113. package/dist/commonjs/styles/common.js +1 -190
  114. package/dist/commonjs/styles/index.d.ts +6 -0
  115. package/dist/commonjs/styles/index.js +1 -1589
  116. package/dist/commonjs/types/enums.d.ts +0 -1
  117. package/dist/commonjs/types/enums.js +1 -152
  118. package/dist/commonjs/types/index.js +1 -18
  119. package/dist/commonjs/types/interfaces.d.ts +2 -2
  120. package/dist/commonjs/types/interfaces.js +1 -2
  121. package/dist/esm/analytics.js +1 -2
  122. package/dist/esm/bundle.js +1 -2
  123. package/dist/esm/capture.js +1 -32
  124. package/dist/esm/components/AnalyticsDetail.js +171 -664
  125. package/dist/esm/components/AnalyticsEventCard.js +77 -335
  126. package/dist/esm/components/AnalyticsGraph.js +95 -357
  127. package/dist/esm/components/AnimatedEntrance.js +1 -6
  128. package/dist/esm/components/AppHeaderLogo.js +7 -94
  129. package/dist/esm/components/BrandCircleIcon.js +114 -119
  130. package/dist/esm/components/BrandSquareIcon.js +73 -78
  131. package/dist/esm/components/CodeSnippet.js +58 -595
  132. package/dist/esm/components/ConsoleLogCard.js +91 -526
  133. package/dist/esm/components/CopyButton.js +3 -51
  134. package/dist/esm/components/DiffViewer.js +22 -48
  135. package/dist/esm/components/DomainHeader.js +43 -138
  136. package/dist/esm/components/EmptyState.js +17 -56
  137. package/dist/esm/components/EndOfListFooter.js +15 -83
  138. package/dist/esm/components/ErrorBoundary.js +125 -582
  139. package/dist/esm/components/HeadersSection.js +52 -93
  140. package/dist/esm/components/HighlightText.js +17 -53
  141. package/dist/esm/components/Inspector/AboutModal.d.ts +6 -0
  142. package/dist/esm/components/Inspector/AboutModal.js +243 -0
  143. package/dist/esm/components/Inspector/AnalyticsFilterModal.js +225 -886
  144. package/dist/esm/components/Inspector/AnalyticsTab.js +296 -904
  145. package/dist/esm/components/Inspector/BundleTab.js +1175 -3502
  146. package/dist/esm/components/Inspector/ConsoleTab.js +113 -488
  147. package/dist/esm/components/Inspector/CrashDetail.js +236 -747
  148. package/dist/esm/components/Inspector/CrashFilterModal.js +149 -541
  149. package/dist/esm/components/Inspector/CrashTab.js +177 -711
  150. package/dist/esm/components/Inspector/DebuggingTab.js +164 -925
  151. package/dist/esm/components/Inspector/DeviceInfoTab.js +199 -924
  152. package/dist/esm/components/Inspector/FabLauncher.js +68 -454
  153. package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +14 -70
  154. package/dist/esm/components/Inspector/InspectorContext.js +1 -12
  155. package/dist/esm/components/Inspector/InspectorHeader.js +282 -1163
  156. package/dist/esm/components/Inspector/LogDetail.js +235 -1023
  157. package/dist/esm/components/Inspector/MainScreen.js +78 -323
  158. package/dist/esm/components/Inspector/MediaGalleryTab.js +143 -650
  159. package/dist/esm/components/Inspector/MediaPreviewModal.js +138 -613
  160. package/dist/esm/components/Inspector/NavigationTracker.js +1 -10
  161. package/dist/esm/components/Inspector/NetworkDetail.js +138 -455
  162. package/dist/esm/components/Inspector/NetworkFilterModal.js +122 -597
  163. package/dist/esm/components/Inspector/NetworkTab.js +125 -517
  164. package/dist/esm/components/Inspector/NpmStarPrompt.js +58 -434
  165. package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -281
  166. package/dist/esm/components/Inspector/PerformanceTab.js +393 -1570
  167. package/dist/esm/components/Inspector/ReduxDetail.js +307 -1170
  168. package/dist/esm/components/Inspector/ReduxTab.js +144 -722
  169. package/dist/esm/components/Inspector/SettingsPanel.js +643 -3985
  170. package/dist/esm/components/Inspector/SkeletonPlaceholder.js +30 -163
  171. package/dist/esm/components/Inspector/StorageTab.js +172 -866
  172. package/dist/esm/components/Inspector/TabBar.js +45 -305
  173. package/dist/esm/components/Inspector/UpdateAvailableModal.js +80 -418
  174. package/dist/esm/components/JsonViewer.js +179 -354
  175. package/dist/esm/components/LogCard.js +93 -565
  176. package/dist/esm/components/LogSyntaxHighlighter.js +11 -123
  177. package/dist/esm/components/MetaAccordion.js +136 -267
  178. package/dist/esm/components/MiniBarChart.js +3 -18
  179. package/dist/esm/components/MiniLineChart.js +3 -20
  180. package/dist/esm/components/NetworkIcons.d.ts +13 -0
  181. package/dist/esm/components/NetworkIcons.js +523 -838
  182. package/dist/esm/components/QRCodeView.js +8 -45
  183. package/dist/esm/components/SectionHeader.js +22 -39
  184. package/dist/esm/components/SegmentedTabs.js +8 -58
  185. package/dist/esm/components/SkeletonPlaceholder.js +30 -163
  186. package/dist/esm/components/Slider.js +24 -213
  187. package/dist/esm/components/SourcePageCard.js +65 -86
  188. package/dist/esm/components/Toast.js +10 -117
  189. package/dist/esm/components/TouchableScale.js +3 -19
  190. package/dist/esm/components/TreeNode.js +58 -95
  191. package/dist/esm/console.js +1 -2
  192. package/dist/esm/constants/index.js +1 -28
  193. package/dist/esm/constants/telemetryConfig.js +1 -3
  194. package/dist/esm/constants/version.d.ts +1 -1
  195. package/dist/esm/constants/version.js +1 -1
  196. package/dist/esm/crash.js +1 -2
  197. package/dist/esm/customHooks/analyticsLogger.js +1 -230
  198. package/dist/esm/customHooks/bundleAnalyzer.js +1 -944
  199. package/dist/esm/customHooks/consoleLogger.js +6 -432
  200. package/dist/esm/customHooks/crashHandler.js +7 -630
  201. package/dist/esm/customHooks/logFilters.js +1 -20
  202. package/dist/esm/customHooks/networkLogger.js +2 -519
  203. package/dist/esm/customHooks/performanceTracker.js +63 -723
  204. package/dist/esm/customHooks/reduxLogger.js +2 -293
  205. package/dist/esm/customHooks/storageInspector.js +1 -418
  206. package/dist/esm/customHooks/useAccordion.js +1 -16
  207. package/dist/esm/decorators/index.js +1 -95
  208. package/dist/esm/helpers/gaAnalyticsRegistry.js +1 -143
  209. package/dist/esm/helpers/index.d.ts +1 -0
  210. package/dist/esm/helpers/index.js +8 -861
  211. package/dist/esm/helpers/memoryManager.js +1 -91
  212. package/dist/esm/helpers/qrGenerator.js +1 -364
  213. package/dist/esm/helpers/remoteConfig.js +1 -160
  214. package/dist/esm/helpers/searchQueryParser.js +1 -59
  215. package/dist/esm/helpers/settingsStore.js +1 -134
  216. package/dist/esm/helpers/telemetry.js +1 -489
  217. package/dist/esm/helpers/toast.js +1 -15
  218. package/dist/esm/i18n/index.js +1 -78
  219. package/dist/esm/i18n/locales/en.json +1 -1140
  220. package/dist/esm/index.js +7 -1982
  221. package/dist/esm/metro.js +6 -459
  222. package/dist/esm/native/NativeInspector.d.ts +1 -0
  223. package/dist/esm/native/NativeInspector.js +1 -382
  224. package/dist/esm/native/NativeNetworkInspector.js +1 -2
  225. package/dist/esm/network.js +1 -1
  226. package/dist/esm/performance.js +1 -2
  227. package/dist/esm/redux.js +1 -1
  228. package/dist/esm/storage.js +1 -1
  229. package/dist/esm/styles/AppColors.js +1 -417
  230. package/dist/esm/styles/AppFonts.js +1 -13
  231. package/dist/esm/styles/common.js +1 -186
  232. package/dist/esm/styles/index.d.ts +6 -0
  233. package/dist/esm/styles/index.js +1 -1551
  234. package/dist/esm/types/enums.d.ts +0 -1
  235. package/dist/esm/types/enums.js +1 -149
  236. package/dist/esm/types/index.js +1 -2
  237. package/dist/esm/types/interfaces.d.ts +2 -2
  238. package/dist/esm/types/interfaces.js +1 -1
  239. package/ios/NetworkInspectorModule.mm +60 -12
  240. package/package.json +5 -3
  241. package/src/native/NativeInspector.ts +18 -0
  242. package/dist/commonjs/components/Inspector/FeedbackModal.d.ts +0 -7
  243. package/dist/commonjs/components/Inspector/FeedbackModal.js +0 -552
  244. package/dist/esm/components/Inspector/FeedbackModal.d.ts +0 -7
  245. package/dist/esm/components/Inspector/FeedbackModal.js +0 -515
  246. package/src/analytics.ts +0 -35
  247. package/src/bundle.ts +0 -25
  248. package/src/capture.ts +0 -109
  249. package/src/components/AnalyticsDetail.tsx +0 -870
  250. package/src/components/AnalyticsEventCard.tsx +0 -444
  251. package/src/components/AnalyticsGraph.tsx +0 -583
  252. package/src/components/AnimatedEntrance.tsx +0 -20
  253. package/src/components/AppHeaderLogo.tsx +0 -143
  254. package/src/components/BrandCircleIcon.tsx +0 -144
  255. package/src/components/BrandSquareIcon.tsx +0 -184
  256. package/src/components/CodeSnippet.tsx +0 -725
  257. package/src/components/ConsoleLogCard.tsx +0 -679
  258. package/src/components/CopyButton.tsx +0 -87
  259. package/src/components/DiffViewer.tsx +0 -82
  260. package/src/components/DomainHeader.tsx +0 -224
  261. package/src/components/EmptyState.tsx +0 -97
  262. package/src/components/EndOfListFooter.tsx +0 -100
  263. package/src/components/ErrorBoundary.tsx +0 -688
  264. package/src/components/HeadersSection.tsx +0 -172
  265. package/src/components/HighlightText.tsx +0 -100
  266. package/src/components/Inspector/AnalyticsFilterModal.tsx +0 -1250
  267. package/src/components/Inspector/AnalyticsTab.tsx +0 -1362
  268. package/src/components/Inspector/BundleTab.tsx +0 -4768
  269. package/src/components/Inspector/ConsoleTab.tsx +0 -726
  270. package/src/components/Inspector/CrashDetail.tsx +0 -997
  271. package/src/components/Inspector/CrashFilterModal.tsx +0 -721
  272. package/src/components/Inspector/CrashTab.tsx +0 -933
  273. package/src/components/Inspector/DebuggingTab.tsx +0 -1103
  274. package/src/components/Inspector/DeviceInfoTab.tsx +0 -1397
  275. package/src/components/Inspector/FabLauncher.tsx +0 -590
  276. package/src/components/Inspector/FeatureUnderDevNotice.tsx +0 -94
  277. package/src/components/Inspector/FeedbackModal.tsx +0 -626
  278. package/src/components/Inspector/InspectorContext.tsx +0 -28
  279. package/src/components/Inspector/InspectorHeader.tsx +0 -1583
  280. package/src/components/Inspector/LogDetail.tsx +0 -1431
  281. package/src/components/Inspector/MainScreen.tsx +0 -460
  282. package/src/components/Inspector/MediaGalleryTab.tsx +0 -829
  283. package/src/components/Inspector/MediaPreviewModal.tsx +0 -783
  284. package/src/components/Inspector/NavigationTracker.tsx +0 -13
  285. package/src/components/Inspector/NetworkDetail.tsx +0 -778
  286. package/src/components/Inspector/NetworkFilterModal.tsx +0 -730
  287. package/src/components/Inspector/NetworkTab.tsx +0 -820
  288. package/src/components/Inspector/NpmStarPrompt.tsx +0 -532
  289. package/src/components/Inspector/NpmUpdateToast.tsx +0 -387
  290. package/src/components/Inspector/PerformanceTab.tsx +0 -1967
  291. package/src/components/Inspector/ReduxDetail.tsx +0 -1651
  292. package/src/components/Inspector/ReduxTab.tsx +0 -987
  293. package/src/components/Inspector/SettingsPanel.tsx +0 -5136
  294. package/src/components/Inspector/SkeletonPlaceholder.tsx +0 -206
  295. package/src/components/Inspector/StorageTab.tsx +0 -1159
  296. package/src/components/Inspector/TabBar.tsx +0 -431
  297. package/src/components/Inspector/UpdateAvailableModal.tsx +0 -555
  298. package/src/components/JsonViewer.tsx +0 -549
  299. package/src/components/LogCard.tsx +0 -694
  300. package/src/components/LogSyntaxHighlighter.tsx +0 -178
  301. package/src/components/MetaAccordion.tsx +0 -355
  302. package/src/components/MiniBarChart.tsx +0 -42
  303. package/src/components/MiniLineChart.tsx +0 -33
  304. package/src/components/NetworkIcons.tsx +0 -2655
  305. package/src/components/QRCodeView.tsx +0 -75
  306. package/src/components/SectionHeader.tsx +0 -101
  307. package/src/components/SegmentedTabs.tsx +0 -84
  308. package/src/components/SkeletonPlaceholder.tsx +0 -206
  309. package/src/components/Slider.tsx +0 -300
  310. package/src/components/SourcePageCard.tsx +0 -150
  311. package/src/components/Toast.tsx +0 -131
  312. package/src/components/TouchableScale.tsx +0 -61
  313. package/src/components/TreeNode.tsx +0 -171
  314. package/src/console.ts +0 -24
  315. package/src/constants/index.ts +0 -41
  316. package/src/constants/telemetryConfig.ts +0 -4
  317. package/src/constants/version.ts +0 -3
  318. package/src/crash.ts +0 -32
  319. package/src/customHooks/analyticsLogger.ts +0 -336
  320. package/src/customHooks/bundleAnalyzer.ts +0 -1256
  321. package/src/customHooks/consoleLogger.ts +0 -530
  322. package/src/customHooks/crashHandler.ts +0 -944
  323. package/src/customHooks/logFilters.ts +0 -32
  324. package/src/customHooks/networkLogger.ts +0 -624
  325. package/src/customHooks/performanceTracker.ts +0 -1014
  326. package/src/customHooks/reduxLogger.ts +0 -406
  327. package/src/customHooks/storageInspector.ts +0 -513
  328. package/src/customHooks/useAccordion.tsx +0 -27
  329. package/src/decorators/index.ts +0 -184
  330. package/src/helpers/gaAnalyticsRegistry.ts +0 -204
  331. package/src/helpers/index.ts +0 -1092
  332. package/src/helpers/memoryManager.ts +0 -138
  333. package/src/helpers/qrGenerator.ts +0 -430
  334. package/src/helpers/remoteConfig.ts +0 -212
  335. package/src/helpers/searchQueryParser.ts +0 -84
  336. package/src/helpers/settingsStore.ts +0 -171
  337. package/src/helpers/telemetry.ts +0 -568
  338. package/src/helpers/toast.ts +0 -17
  339. package/src/i18n/index.ts +0 -104
  340. package/src/i18n/locales/en.json +0 -1141
  341. package/src/index.tsx +0 -2650
  342. package/src/metro.ts +0 -598
  343. package/src/network.ts +0 -22
  344. package/src/performance.ts +0 -38
  345. package/src/redux.ts +0 -23
  346. package/src/storage.ts +0 -18
  347. package/src/styles/AppColors.ts +0 -455
  348. package/src/styles/AppFonts.ts +0 -26
  349. package/src/styles/common.ts +0 -209
  350. package/src/styles/index.ts +0 -1606
  351. package/src/types/enums.ts +0 -210
  352. package/src/types/index.ts +0 -34
  353. package/src/types/interfaces.ts +0 -535
@@ -1,940 +1,332 @@
1
- import React, { useCallback, useState, useMemo, useEffect, useRef } from 'react';
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
- <View style={styles.analyticsHeaderTop}>
208
- <View style={{ flex: 1 }}>
209
- <View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
210
- <Text style={styles.analyticsHeaderTitle}>{t('analytics.realtimeStream')}</Text>
211
- <View style={[
212
- styles.statusDot,
213
- {
214
- backgroundColor: isTrackingEnabled
215
- ? AppColors.greenColor
216
- : AppColors.errorColor,
217
- },
218
- ]}/>
219
- <Text style={[
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
- <TouchableOpacity style={styles.analyticsHeaderToggle} activeOpacity={0.7} onPress={() => {
237
- animateNextLayout();
238
- setAnalyticsHeaderExpanded(!analyticsHeaderExpanded);
239
- }}>
240
- <Text style={styles.analyticsHeaderToggleText}>
241
- {analyticsHeaderExpanded ? t('common.close') : t('analytics.eventDetails')}
242
- </Text>
243
- </TouchableOpacity>
244
- </View>
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
- <View style={{ marginTop: 10, marginBottom: 8 }}>
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
- const isSelected = !analyticsFilters.categories.has('all') &&
353
- analyticsFilters.categories.has('page_view');
354
- return (<TouchableScale onPress={() => toggleCategoryFilter('page_view')} style={[
355
- {
356
- flexDirection: 'row',
357
- alignItems: 'center',
358
- gap: 5,
359
- backgroundColor: isSelected ? AppColors.sky600 : AppColors.sky100,
360
- paddingHorizontal: 8,
361
- paddingVertical: 5,
362
- borderRadius: 7,
363
- borderWidth: 1,
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
- const isSelected = !analyticsFilters.categories.has('all') &&
388
- analyticsFilters.categories.has('system');
389
- return (<TouchableScale onPress={() => toggleCategoryFilter('system')} style={[
390
- {
391
- flexDirection: 'row',
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
- const isSelected = !analyticsFilters.categories.has('all') &&
423
- analyticsFilters.categories.has('custom');
424
- return (<TouchableScale onPress={() => toggleCategoryFilter('custom')} style={[
425
- {
426
- flexDirection: 'row',
427
- alignItems: 'center',
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
- <View style={{
459
- marginTop: 2,
460
- marginBottom: 8,
461
- backgroundColor: AppColors.grayBackground,
462
- borderRadius: 10,
463
- borderWidth: 1,
464
- borderColor: AppColors.dividerColor,
465
- padding: 10,
466
- }}>
467
-
468
- <View style={{
469
- flexDirection: 'row',
470
- justifyContent: 'space-between',
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
- <View style={{ flexDirection: 'row', alignItems: 'center', gap: 5 }}>
496
- <View style={{
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
- {categoryStats.totalRevenue > 0 && (<View style={{
517
- flexDirection: 'row',
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
- <View style={{ height: chartHeight, position: 'relative', overflow: 'hidden', borderRadius: 8 }}>
541
- <Svg width="100%" height={chartHeight} viewBox={`0 0 ${svgWidth} ${chartHeight}`} preserveAspectRatio="none">
542
- <Defs>
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
- <Line x1="6" y1={chartHeight - 6} x2={svgWidth - 6} y2={chartHeight - 6} stroke="#E2E8F0" strokeWidth="1"/>
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
- <Path d={histogramData.areaPath} fill="url(#crashlyticsAreaGrad)"/>
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
- {histogramData.buckets.map((b, idx) => {
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
- {b.total > 0 && (<Rect x={barX} y={barY} width={barWidth} height={barHeight} rx={3} fill="url(#crashlyticsBarGrad)"/>)}
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
- {isSelected && (<Line x1={b.x} y1={4} x2={b.x} y2={chartHeight - 6} stroke="#8B5CF6" strokeWidth="1.5" strokeDasharray="2,2"/>)}
577
- </G>);
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
- <Path d={histogramData.linePath} fill="none" stroke="#8B5CF6" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
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
- {histogramData.buckets.length > 0 && (<G>
585
- <Circle cx={histogramData.buckets[histogramData.buckets.length - 1].x} cy={histogramData.buckets[histogramData.buckets.length - 1].y} r="5.5" fill="#8B5CF6" opacity="0.25"/>
586
- <Circle cx={histogramData.buckets[histogramData.buckets.length - 1].x} cy={histogramData.buckets[histogramData.buckets.length - 1].y} r="3" fill="#7C3AED"/>
587
- </G>)}
588
- </Svg>
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
- <View style={{
592
- position: 'absolute',
593
- top: 0,
594
- left: 0,
595
- right: 0,
596
- bottom: 0,
597
- flexDirection: 'row',
598
- }}>
599
- {histogramData.buckets.map((b, idx) => (<TouchableOpacity key={b.index} style={{ flex: 1, height: '100%' }} activeOpacity={0.8} onPress={() => setSelectedBucketIdx(selectedBucketIdx === idx ? null : idx)}/>))}
600
- </View>
601
- </View>
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
- {selectedBucket && (<View style={{
605
- flexDirection: 'row',
606
- alignItems: 'center',
607
- justifyContent: 'space-between',
608
- backgroundColor: AppColors.white,
609
- borderRadius: 6,
610
- paddingHorizontal: 8,
611
- paddingVertical: 4,
612
- marginTop: 4,
613
- borderWidth: 1,
614
- borderColor: AppColors.brandPurple,
615
- }}>
616
- <Text style={{
617
- fontFamily: AppFonts.interBold,
618
- fontSize: 10,
619
- color: AppColors.primaryBlack,
620
- }}>
621
- {t('analytics.selectedBucket', {
622
- time: selectedBucket.ageLabel,
623
- count: selectedBucket.total,
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
- <View style={{
641
- flexDirection: 'row',
642
- justifyContent: 'space-between',
643
- marginTop: 4,
644
- paddingHorizontal: 4,
645
- }}>
646
- <Text style={{
647
- fontFamily: AppFonts.interMedium,
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
- {topScreens.length > 0 && (<View style={{
679
- marginTop: 8,
680
- backgroundColor: `${AppColors.sky500}0A`,
681
- borderRadius: 8,
682
- borderWidth: 1,
683
- borderColor: `${AppColors.sky500}22`,
684
- padding: 8,
685
- }}>
686
- <View style={{
687
- flexDirection: 'row',
688
- justifyContent: 'space-between',
689
- alignItems: 'center',
690
- marginBottom: 6,
691
- }}>
692
- <View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
693
- <PinIcon color={AppColors.sky600} size={11}/>
694
- <Text style={{
695
- fontFamily: AppFonts.interBold,
696
- fontSize: 9.5,
697
- color: AppColors.sky600,
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
- <View style={{ gap: 4 }}>
713
- {topScreens.map(scr => (<View key={scr.name}>
714
- <View style={{
715
- flexDirection: 'row',
716
- justifyContent: 'space-between',
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
- {analyticsHeaderExpanded && (<>
754
-
755
- <View style={styles.analyticsStatsRow}>
756
- <View style={styles.analyticsStatBox}>
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
- {(hasUserProps || hasDefaultParams) && (<View style={styles.analyticsHeaderDetails}>
776
- {hasUserProps && (<View style={{ marginBottom: 10 }}>
777
- <Text style={styles.detailsGroupTitle}>{t('analytics.userProperties')}</Text>
778
- {Object.entries(userProperties).map(([k, v]) => (<View key={k} style={styles.detailsRow}>
779
- <Text style={styles.detailsKey} selectable={true}>{k}</Text>
780
- <Text style={styles.detailsValue} selectable={true}>{String(v)}</Text>
781
- </View>))}
782
- </View>)}
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
- {hasDefaultParams && (<View>
785
- <Text style={styles.detailsGroupTitle}>{t('analytics.defaultParameters')}</Text>
786
- {Object.entries(defaultParams).map(([k, v]) => (<View key={k} style={styles.detailsRow}>
787
- <Text style={styles.detailsKey} selectable={true}>{k}</Text>
788
- <Text style={styles.detailsValue} selectable={true}>{String(v)}</Text>
789
- </View>))}
790
- </View>)}
791
- </View>)}
792
- </>)}
793
- </View>);
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
- <TouchableOpacity style={[
887
- styles.toolbarBtn,
888
- isAnalyticsFilterApplied && {
889
- borderColor: `${AppColors.brandPurple}60`,
890
- backgroundColor: `${AppColors.brandPurple}15`,
891
- },
892
- ]} onPress={() => setIsFilterModalOpen(true)} hitSlop={6}>
893
- <FilterIcon color={isAnalyticsFilterApplied
894
- ? AppColors.brandPurple
895
- : AppColors.grayTextStrong} size={15}/>
896
- {isAnalyticsFilterApplied && (<View style={{
897
- position: 'absolute',
898
- top: 2,
899
- right: 2,
900
- width: 7,
901
- height: 7,
902
- borderRadius: 3.5,
903
- backgroundColor: AppColors.darkOrange,
904
- borderWidth: 1,
905
- borderColor: AppColors.white,
906
- }}/>)}
907
- </TouchableOpacity>
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
- <TouchableOpacity style={[
910
- styles.toolbarBtn,
911
- {
912
- borderColor: `${AppColors.errorColor}38`,
913
- backgroundColor: `${AppColors.errorColor}0F`,
914
- },
915
- ]} onPress={handleDelete} hitSlop={6}>
916
- <TrashIcon color={AppColors.errorColor} size={15}/>
917
- </TouchableOpacity>
918
- </View>
919
- </View>)}
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
- <AnalyticsFilterModal visible={isFilterModalOpen} onClose={() => setIsFilterModalOpen(false)}/>
325
+ <Bt visible={j}onClose={()=>U(!1)}/>
923
326
 
924
- <View style={{ flex: 1 }} onLayout={() => setIsAnalyticsLayoutReady(true)}>
925
- {isAnalyticsLayoutReady ? (<>
926
- <FlatList ref={listRef} data={filteredAnalyticsEvents} keyExtractor={keyExtractor} ListHeaderComponent={AnalyticsHeader} renderItem={renderItem} initialNumToRender={12} maxToRenderPerBatch={8} windowSize={5} removeClippedSubviews={Platform.OS === 'android'} renderToHardwareTextureAndroid={true} ListEmptyComponent={<EmptyState isSearch={analyticsSearch.length > 0} searchQuery={analyticsSearch} customTitle={analyticsSearch.length > 0
927
- ? 'No matching analytics events'
928
- : 'No analytics events yet'} customSub={analyticsSearch.length > 0
929
- ? `No events matched "${analyticsSearch}"`
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;