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,696 +1,203 @@
1
- import React, { useState, useMemo } from 'react';
2
- import { Pressable, ScrollView, StyleSheet, Text, TextInput, View, } from 'react-native';
3
- import CopyButton from './CopyButton';
4
- import JsonViewer from './JsonViewer';
5
- import SegmentedTabs from './SegmentedTabs';
6
- import HighlightText from './HighlightText';
7
- import AnimatedEntrance from './AnimatedEntrance';
8
- import { AppFonts } from '../styles/AppFonts';
9
- import { AppColors } from '../styles/AppColors';
10
- import { getSize, formatDateTime } from '../helpers';
11
- import { getEventCategory } from '../helpers/gaAnalyticsRegistry';
12
- import { useTranslation } from '../i18n';
13
- import { SparkleIcon, ClockIcon, SearchIcon, ClearIcon, LayersIcon, CartIcon, GlobeIcon, BoltIcon, PinIcon, MoneyIcon, PrettyIcon, RawIcon, TableIcon, DocIcon, PackageIcon, } from './NetworkIcons';
14
- const AnalyticsDetail = ({ event, }) => {
15
- const { t } = useTranslation();
16
- const [activeViewTab, setActiveViewTab] = useState('overview');
17
- const [paramSearch, setParamSearch] = useState('');
18
- const params = useMemo(() => event.params ?? {}, [event.params]);
19
- const userProperties = useMemo(() => event.userProperties ?? {}, [event.userProperties]);
20
- const paramKeys = useMemo(() => Object.keys(params), [params]);
21
- const userPropKeys = useMemo(() => Object.keys(userProperties), [userProperties]);
22
- const category = useMemo(() => getEventCategory(event.name, params), [event.name, params]);
23
- const fullJsonData = useMemo(() => ({
24
- name: event.name,
25
- timestamp: event.timestamp,
26
- source: event.source,
27
- ...(event.screenName ? { screenName: event.screenName } : {}),
28
- ...(event.screenClass ? { screenClass: event.screenClass } : {}),
29
- ...(event.userId ? { userId: event.userId } : {}),
30
- ...(event.sessionId ? { sessionId: event.sessionId } : {}),
31
- ...(event.trackingId ? { trackingId: event.trackingId } : {}),
32
- params,
33
- ...(userPropKeys.length > 0 ? { userProperties } : {}),
34
- }), [event, params, userPropKeys.length, userProperties]);
35
- const revenueInfo = useMemo(() => {
36
- const val = params.value ?? params.price;
37
- const currency = params.currency ?? 'USD';
38
- if (val !== undefined && val !== null && !isNaN(Number(val))) {
39
- return {
40
- amount: Number(val).toFixed(2),
41
- currency: String(currency).toUpperCase(),
42
- };
43
- }
44
- return null;
45
- }, [params]);
46
- const itemsCount = useMemo(() => {
47
- if (Array.isArray(params.items)) {
48
- return params.items.length;
49
- }
50
- return null;
51
- }, [params.items]);
52
- const screenContext = useMemo(() => {
53
- return (event.screenName ||
54
- params.firebase_screen ||
55
- params.screen_name ||
56
- params.page_title ||
57
- event.screenClass ||
58
- params.firebase_screen_class);
59
- }, [event.screenName, event.screenClass, params]);
60
- const filteredParamEntries = useMemo(() => {
61
- const entries = Object.entries(params);
62
- if (!paramSearch.trim())
63
- return entries;
64
- const q = paramSearch.toLowerCase();
65
- return entries.filter(([k, v]) => {
66
- const valStr = typeof v === 'object' ? JSON.stringify(v) : String(v);
67
- return k.toLowerCase().includes(q) || valStr.toLowerCase().includes(q);
68
- });
69
- }, [params, paramSearch]);
70
- const catMeta = useMemo(() => {
71
- switch (category) {
72
- case 'ecommerce':
73
- return {
74
- label: t('analytics.ecommerceCategory'),
75
- color: AppColors.amber700,
76
- bg: AppColors.amber100,
77
- border: AppColors.amber200,
78
- icon: (color) => <CartIcon color={color} size={11}/>,
79
- };
80
- case 'page_view':
81
- return {
82
- label: t('analytics.screensCategory'),
83
- color: AppColors.sky600,
84
- bg: AppColors.sky100,
85
- border: AppColors.sky400,
86
- icon: (color) => <GlobeIcon color={color} size={11}/>,
87
- };
88
- case 'system':
89
- return {
90
- label: t('analytics.systemCategory'),
91
- color: AppColors.purple,
92
- bg: AppColors.purple100,
93
- border: AppColors.purple200,
94
- icon: (color) => <BoltIcon color={color} size={11}/>,
95
- };
96
- default:
97
- return {
98
- label: t('analytics.customCategory'),
99
- color: AppColors.brandPurple,
100
- bg: AppColors.purple100,
101
- border: AppColors.purple200,
102
- icon: (color) => <SparkleIcon color={color} size={11}/>,
103
- };
104
- }
105
- }, [category, t]);
106
- const viewTabs = [
107
- {
108
- key: 'overview',
109
- label: `${t('analytics.overviewTab')} (${paramKeys.length})`,
110
- icon: (isActive) => (<TableIcon color={isActive ? AppColors.white : AppColors.grayText} size={12}/>),
111
- },
112
- {
113
- key: 'tree',
114
- label: t('analytics.jsonTreeTab'),
115
- icon: (isActive) => (<PrettyIcon color={isActive ? AppColors.white : AppColors.grayText} size={12}/>),
116
- },
117
- {
118
- key: 'raw',
119
- label: t('analytics.rawPayloadTab'),
120
- icon: (isActive) => (<RawIcon color={isActive ? AppColors.white : AppColors.grayText} size={12}/>),
121
- },
122
- ];
123
- return (<ScrollView style={detailStyles.scroll} contentContainerStyle={detailStyles.content} showsVerticalScrollIndicator contentInsetAdjustmentBehavior="never" automaticallyAdjustContentInsets={false}>
1
+ import{useState as q,useMemo as z}from"react";import{Pressable as Ce,ScrollView as Te,StyleSheet as Be,Text as V,TextInput as Ve,View as C}from"react-native";import G from"./CopyButton";import Y from"./JsonViewer";import Se from"./SegmentedTabs";import Q from"./HighlightText";import Ie from"./AnimatedEntrance";import{AppFonts as S}from"../styles/AppFonts";import{AppColors as e}from"../styles/AppColors";import{getSize as ze,formatDateTime as Pe}from"../helpers";import{getEventCategory as De}from"../helpers/gaAnalyticsRegistry";import{useTranslation as Re}from"../i18n";import{SparkleIcon as X,ClockIcon as Fe,SearchIcon as We,ClearIcon as He,LayersIcon as Ee,CartIcon as Ne,GlobeIcon as Ae,BoltIcon as Oe,PinIcon as Ke,MoneyIcon as Le,PrettyIcon as Me,TableIcon as Z,DocIcon as $e,PackageIcon as _e}from"./NetworkIcons";const Je=({event:T})=>{const{t:P}=Re(),[j,ee]=q("overview"),[D,v]=q(""),k=z(()=>T.params??{},[T.params]),H=z(()=>T.userProperties??{},[T.userProperties]),E=z(()=>Object.keys(k),[k]),R=z(()=>Object.keys(H),[H]),M=z(()=>De(T.name,k),[T.name,k]),A=z(()=>({name:T.name,timestamp:T.timestamp,source:T.source,...T.screenName?{screenName:T.screenName}:{},...T.screenClass?{screenClass:T.screenClass}:{},...T.userId?{userId:T.userId}:{},...T.sessionId?{sessionId:T.sessionId}:{},...T.trackingId?{trackingId:T.trackingId}:{},params:k,...R.length>0?{userProperties:H}:{}}),[T,k,R.length,H]),O=z(()=>{const B=k.value??k.price,I=k.currency??"USD";return B!=null&&!isNaN(Number(B))?{amount:Number(B).toFixed(2),currency:String(I).toUpperCase()}:null},[k]),$=z(()=>Array.isArray(k.items)?k.items.length:null,[k.items]),_=z(()=>T.screenName||k.firebase_screen||k.screen_name||k.page_title||T.screenClass||k.firebase_screen_class,[T.screenName,T.screenClass,k]),J=z(()=>{const B=Object.entries(k);if(!D.trim())return B;const I=D.toLowerCase();return B.filter(([K,F])=>{const L=typeof F=="object"?JSON.stringify(F):String(F);return K.toLowerCase().includes(I)||L.toLowerCase().includes(I)})},[k,D]),W=z(()=>{switch(M){case"ecommerce":return{label:P("analytics.ecommerceCategory"),color:e.amber700,bg:e.amber100,border:e.amber200,icon:B=><Ne color={B}size={11}/>};case"page_view":return{label:P("analytics.screensCategory"),color:e.sky600,bg:e.sky100,border:e.sky400,icon:B=><Ae color={B}size={11}/>};case"system":return{label:P("analytics.systemCategory"),color:e.purple,bg:e.purple100,border:e.purple200,icon:B=><Oe color={B}size={11}/>};default:return{label:P("analytics.customCategory"),color:e.brandPurple,bg:e.purple100,border:e.purple200,icon:B=><X color={B}size={11}/>}}},[M,P]),re=[{key:"overview",label:`${P("analytics.overviewTab")} (${E.length})`,icon:B=><Z color={B?e.white:e.grayText}size={12}/>},{key:"json",label:"JSON Payload",icon:B=><Me color={B?e.white:e.grayText}size={12}/>}];return<Te style={r.scroll}contentContainerStyle={r.content}showsVerticalScrollIndicator contentInsetAdjustmentBehavior="never"automaticallyAdjustContentInsets={!1}>
124
2
 
125
3
 
126
- <View style={detailStyles.heroCard}>
4
+ <C style={r.heroCard}>
127
5
 
128
- <View style={detailStyles.heroTopRow}>
129
- <View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, flexWrap: 'wrap', flex: 1 }}>
6
+ <C style={r.heroTopRow}>
7
+ <C style={{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap",flex:1}}>
130
8
 
131
- <View style={[
132
- detailStyles.sourceBadge,
133
- event.source === 'firebase'
134
- ? { backgroundColor: AppColors.amberBg, borderColor: AppColors.amberBorder }
135
- : { backgroundColor: AppColors.purpleBg, borderColor: AppColors.purpleBorder },
136
- ]}>
137
- <View style={[
138
- detailStyles.sourceDot,
139
- {
140
- backgroundColor: event.source === 'firebase'
141
- ? AppColors.firebaseOrange
142
- : AppColors.purple,
143
- },
144
- ]}/>
145
- <Text style={[
146
- detailStyles.sourceBadgeText,
147
- {
148
- color: event.source === 'firebase'
149
- ? AppColors.amber800Warm
150
- : AppColors.purple,
151
- },
152
- ]}>
153
- {event.source === 'firebase' ? t('analytics.sourceFirebase') : t('analytics.sourceCustom')}
154
- </Text>
155
- </View>
9
+ <C style={r.idBadge}>
10
+ <V style={r.idBadgeText}>
11
+ #{T.id!=null?T.id+1:1}
12
+ </V>
13
+ </C>
156
14
 
157
15
 
158
- <View style={[
159
- detailStyles.catBadge,
160
- { backgroundColor: catMeta.bg, borderColor: catMeta.border },
161
- ]}>
162
- {catMeta.icon(catMeta.color)}
163
- <Text style={[detailStyles.catBadgeText, { color: catMeta.color }]}>
164
- {catMeta.label}
165
- </Text>
166
- </View>
167
- </View>
16
+ <C style={[r.sourceBadge,T.source==="firebase"?{backgroundColor:e.amberBg,borderColor:e.amberBorder}:{backgroundColor:e.purpleBg,borderColor:e.purpleBorder}]}>
17
+ <C style={[r.sourceDot,{backgroundColor:T.source==="firebase"?e.firebaseOrange:e.purple}]}/>
18
+ <V style={[r.sourceBadgeText,{color:T.source==="firebase"?e.amber800Warm:e.purple}]}>
19
+ {T.source==="firebase"?P("analytics.sourceFirebase"):P("analytics.sourceCustom")}
20
+ </V>
21
+ </C>
22
+
23
+
24
+ <C style={[r.catBadge,{backgroundColor:W.bg,borderColor:W.border}]}>
25
+ {W.icon(W.color)}
26
+ <V style={[r.catBadgeText,{color:W.color}]}>
27
+ {W.label}
28
+ </V>
29
+ </C>
30
+ </C>
168
31
 
169
32
 
170
- <CopyButton value={JSON.stringify(fullJsonData, null, 2)} label={t('analytics.eventDetails')}/>
171
- </View>
33
+ <G value={JSON.stringify(A,null,2)}label={P("analytics.eventDetails")}/>
34
+ </C>
172
35
 
173
36
 
174
- <View style={detailStyles.titleRow}>
175
- <Text style={detailStyles.eventTitle} selectable numberOfLines={2}>
176
- {event.name}
177
- </Text>
178
- </View>
37
+ <C style={r.titleRow}>
38
+ <V style={r.eventTitle}selectable numberOfLines={2}>
39
+ {T.name}
40
+ </V>
41
+ </C>
179
42
 
180
43
 
181
- <View style={detailStyles.metaRow}>
182
- <View style={detailStyles.timePill}>
183
- <ClockIcon color={AppColors.purple} size={11}/>
184
- <Text style={detailStyles.timeText}>
185
- {formatDateTime(event.timestamp)}
186
- </Text>
187
- </View>
188
-
189
- {screenContext && (<View style={detailStyles.screenPill}>
190
- <PinIcon color={AppColors.sky600} size={11}/>
191
- <Text style={detailStyles.screenText} numberOfLines={1}>
192
- {String(screenContext)}
193
- </Text>
194
- </View>)}
195
- </View>
44
+ <C style={r.metaRow}>
45
+ <C style={r.timePill}>
46
+ <Fe color={e.purple}size={11}/>
47
+ <V style={r.timeText}>
48
+ {Pe(T.timestamp)}
49
+ </V>
50
+ </C>
51
+
52
+ {_&&<C style={r.screenPill}>
53
+ <Ke color={e.sky600}size={11}/>
54
+ <V style={r.screenText}numberOfLines={1}>
55
+ {String(_)}
56
+ </V>
57
+ </C>}
58
+ </C>
196
59
 
197
60
 
198
- <View style={detailStyles.metricsBar}>
199
- <View style={detailStyles.metricPill}>
200
- <Text style={detailStyles.metricLabel}>Params:</Text>
201
- <Text style={detailStyles.metricValue}>{paramKeys.length}</Text>
202
- </View>
203
-
204
- {userPropKeys.length > 0 && (<View style={detailStyles.metricPill}>
205
- <Text style={detailStyles.metricLabel}>User Props:</Text>
206
- <Text style={detailStyles.metricValue}>{userPropKeys.length}</Text>
207
- </View>)}
208
-
209
- <View style={detailStyles.metricPill}>
210
- <Text style={detailStyles.metricLabel}>Size:</Text>
211
- <Text style={detailStyles.metricValue}>{getSize(fullJsonData)}</Text>
212
- </View>
213
-
214
- {revenueInfo && (<View style={detailStyles.revenuePill}>
215
- <MoneyIcon color={AppColors.emerald600} size={11}/>
216
- <Text style={detailStyles.revenueValue}>
217
- ${revenueInfo.amount} {revenueInfo.currency}
218
- </Text>
219
- </View>)}
220
-
221
- {itemsCount !== null && (<View style={detailStyles.itemsPill}>
222
- <PackageIcon size={12} color="#1D4ED8"/>
223
- <Text style={detailStyles.itemsValue}>
224
- {itemsCount} items
225
- </Text>
226
- </View>)}
227
- </View>
228
- </View>
61
+ <C style={r.metricsBar}>
62
+ <C style={r.metricPill}>
63
+ <V style={r.metricLabel}>Params:</V>
64
+ <V style={r.metricValue}>{E.length}</V>
65
+ </C>
66
+
67
+ {R.length>0&&<C style={r.metricPill}>
68
+ <V style={r.metricLabel}>User Props:</V>
69
+ <V style={r.metricValue}>{R.length}</V>
70
+ </C>}
71
+
72
+ <C style={r.metricPill}>
73
+ <V style={r.metricLabel}>Size:</V>
74
+ <V style={r.metricValue}>{ze(A)}</V>
75
+ </C>
76
+
77
+ {O&&<C style={r.revenuePill}>
78
+ <Le color={e.emerald600}size={11}/>
79
+ <V style={r.revenueValue}>
80
+ ${O.amount} {O.currency}
81
+ </V>
82
+ </C>}
83
+
84
+ {$!==null&&<C style={r.itemsPill}>
85
+ <_e size={12}color="#1D4ED8"/>
86
+ <V style={r.itemsValue}>
87
+ {$} items
88
+ </V>
89
+ </C>}
90
+ </C>
91
+ </C>
229
92
 
230
93
 
231
- <View style={detailStyles.tabsWrap}>
232
- <SegmentedTabs tabs={viewTabs} activeKey={activeViewTab} onChange={key => setActiveViewTab(key)}/>
233
- </View>
94
+ <C style={r.tabsWrap}>
95
+ <Se tabs={re}activeKey={j}onChange={B=>ee(B)}/>
96
+ </C>
234
97
 
235
98
 
236
- {activeViewTab === 'overview' && (<View style={detailStyles.tabContent}>
99
+ {j==="overview"&&<C style={r.tabContent}>
237
100
 
238
- {(event.userId || event.sessionId || event.trackingId) && (<View style={detailStyles.sectionCard}>
239
- <View style={detailStyles.sectionHeader}>
240
- <LayersIcon color={AppColors.purple} size={12}/>
241
- <Text style={detailStyles.sectionTitle}>SESSION & IDENTITY</Text>
242
- </View>
243
- <View style={detailStyles.sectionBody}>
244
- {event.userId && (<View style={detailStyles.kvRow}>
245
- <Text style={detailStyles.kvKey}>User ID:</Text>
246
- <Text style={detailStyles.kvVal} selectable>{event.userId}</Text>
247
- </View>)}
248
- {event.sessionId && (<View style={detailStyles.kvRow}>
249
- <Text style={detailStyles.kvKey}>Session ID:</Text>
250
- <Text style={detailStyles.kvVal} selectable>{event.sessionId}</Text>
251
- </View>)}
252
- {event.trackingId && (<View style={detailStyles.kvRow}>
253
- <Text style={detailStyles.kvKey}>Tracking ID:</Text>
254
- <Text style={detailStyles.kvVal} selectable>{event.trackingId}</Text>
255
- </View>)}
256
- </View>
257
- </View>)}
101
+ {(T.userId||T.sessionId||T.trackingId)&&<C style={r.sectionCard}>
102
+ <C style={r.sectionHeader}>
103
+ <Ee color={e.purple}size={12}/>
104
+ <V style={r.sectionTitle}>SESSION & IDENTITY</V>
105
+ </C>
106
+ <C style={r.sectionBody}>
107
+ {T.userId&&<C style={r.kvRow}>
108
+ <V style={r.kvKey}>User ID:</V>
109
+ <V style={r.kvVal}selectable>{T.userId}</V>
110
+ </C>}
111
+ {T.sessionId&&<C style={r.kvRow}>
112
+ <V style={r.kvKey}>Session ID:</V>
113
+ <V style={r.kvVal}selectable>{T.sessionId}</V>
114
+ </C>}
115
+ {T.trackingId&&<C style={r.kvRow}>
116
+ <V style={r.kvKey}>Tracking ID:</V>
117
+ <V style={r.kvVal}selectable>{T.trackingId}</V>
118
+ </C>}
119
+ </C>
120
+ </C>}
258
121
 
259
122
 
260
- <View style={detailStyles.sectionCard}>
261
- <View style={detailStyles.sectionHeaderBetween}>
262
- <View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
263
- <TableIcon color={AppColors.brandPurple} size={12}/>
264
- <Text style={detailStyles.sectionTitle}>
265
- EVENT PARAMETERS ({paramKeys.length})
266
- </Text>
267
- </View>
268
- <Text style={detailStyles.sectionSubtitle}>
123
+ <C style={r.sectionCard}>
124
+ <C style={r.sectionHeaderBetween}>
125
+ <C style={{flexDirection:"row",alignItems:"center",gap:6}}>
126
+ <Z color={e.brandPurple}size={12}/>
127
+ <V style={r.sectionTitle}>
128
+ EVENT PARAMETERS ({E.length})
129
+ </V>
130
+ </C>
131
+ <V style={r.sectionSubtitle}>
269
132
  Key-Value Attributes
270
- </Text>
271
- </View>
133
+ </V>
134
+ </C>
272
135
 
273
136
 
274
- {paramKeys.length > 4 && (<View style={detailStyles.searchBar}>
275
- <SearchIcon color={AppColors.grayTextWeak} size={13}/>
276
- <TextInput placeholder="Filter parameters by key or value..." placeholderTextColor={AppColors.grayTextWeak} value={paramSearch} onChangeText={setParamSearch} style={detailStyles.searchInput} autoCorrect={false} autoCapitalize="none"/>
277
- {paramSearch.length > 0 && (<Pressable onPress={() => setParamSearch('')} hitSlop={8}>
278
- <ClearIcon color={AppColors.grayTextWeak} size={13}/>
279
- </Pressable>)}
280
- </View>)}
281
-
282
- {paramKeys.length === 0 ? (<View style={detailStyles.emptyParamsBox}>
283
- <DocIcon color={AppColors.grayTextWeak} size={16}/>
284
- <Text style={detailStyles.emptyParamsText}>
137
+ {E.length>4&&<C style={r.searchBar}>
138
+ <We color={e.grayTextWeak}size={13}/>
139
+ <Ve placeholder="Filter parameters by key or value..."placeholderTextColor={e.grayTextWeak}value={D}onChangeText={v}style={r.searchInput}autoCorrect={!1}autoCapitalize="none"/>
140
+ {D.length>0&&<Ce onPress={()=>v("")}hitSlop={8}>
141
+ <He color={e.grayTextWeak}size={13}/>
142
+ </Ce>}
143
+ </C>}
144
+
145
+ {E.length===0?<C style={r.emptyParamsBox}>
146
+ <$e color={e.grayTextWeak}size={16}/>
147
+ <V style={r.emptyParamsText}>
285
148
  No custom parameters recorded for this event.
286
- </Text>
287
- </View>) : filteredParamEntries.length === 0 ? (<View style={detailStyles.emptyParamsBox}>
288
- <Text style={detailStyles.emptyParamsText}>
289
- No parameters matching "{paramSearch}"
290
- </Text>
291
- </View>) : (<View style={detailStyles.paramList}>
292
- {filteredParamEntries.map(([key, val], pIdx) => {
293
- const isObject = typeof val === 'object' && val !== null;
294
- const isArray = Array.isArray(val);
295
- let typeStr = typeof val;
296
- if (val === null)
297
- typeStr = 'null';
298
- else if (isArray)
299
- typeStr = `array [${val.length}]`;
300
- else if (isObject)
301
- typeStr = 'object';
302
- const valString = isObject ? JSON.stringify(val, null, 2) : String(val);
303
- const isKeyHighlighted = key === 'value' ||
304
- key === 'price' ||
305
- key === 'currency' ||
306
- key === 'screen_name' ||
307
- key === 'item_id' ||
308
- key === 'item_name';
309
- return (<AnimatedEntrance key={key} index={pIdx} distance={4}>
310
- <View style={detailStyles.paramCard}>
149
+ </V>
150
+ </C>:J.length===0?<C style={r.emptyParamsBox}>
151
+ <V style={r.emptyParamsText}>
152
+ No parameters matching "{D}"
153
+ </V>
154
+ </C>:<C style={r.paramList}>
155
+ {J.map(([B,I],K)=>{const F=typeof I=="object"&&I!==null,L=Array.isArray(I);let N=typeof I;I===null?N="null":L?N=`array [${I.length}]`:F&&(N="object");const U=F?JSON.stringify(I,null,2):String(I),te=B==="value"||B==="price"||B==="currency"||B==="screen_name"||B==="item_id"||B==="item_name";return<Ie key={B}index={K}distance={4}>
156
+ <C style={r.paramCard}>
311
157
 
312
- <View style={detailStyles.paramCardHeader}>
313
- <View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, flex: 1, minWidth: 0 }}>
314
- <HighlightText text={key} search={paramSearch} style={[
315
- detailStyles.paramKeyText,
316
- isKeyHighlighted && detailStyles.paramKeyHighlighted,
317
- ]} highlightStyle={detailStyles.highlight}/>
318
- <View style={detailStyles.typeBadge}>
319
- <Text style={detailStyles.typeBadgeText}>
320
- {typeStr.toUpperCase()}
321
- </Text>
322
- </View>
323
- </View>
324
-
325
- <CopyButton value={valString} label={key}/>
326
- </View>
158
+ <C style={r.paramCardHeader}>
159
+ <C style={{flexDirection:"row",alignItems:"center",gap:6,flex:1,minWidth:0}}>
160
+ <Q text={B}search={D}style={[r.paramKeyText,te&&r.paramKeyHighlighted]}highlightStyle={r.highlight}/>
161
+ <C style={r.typeBadge}>
162
+ <V style={r.typeBadgeText}>
163
+ {N.toUpperCase()}
164
+ </V>
165
+ </C>
166
+ </C>
167
+
168
+ <G value={U}label={B}/>
169
+ </C>
327
170
 
328
171
 
329
- <View style={detailStyles.paramValBox}>
330
- {isObject ? (<JsonViewer data={val} search={paramSearch} hideTabs wrap/>) : (<HighlightText text={valString} search={paramSearch} style={detailStyles.paramValText} highlightStyle={detailStyles.highlight} selectable/>)}
331
- </View>
332
- </View>
333
- </AnimatedEntrance>);
334
- })}
335
- </View>)}
336
- </View>
172
+ <C style={r.paramValBox}>
173
+ {F?<Y data={I}search={D}hideTabs wrap/>:<Q text={U}search={D}style={r.paramValText}highlightStyle={r.highlight}selectable/>}
174
+ </C>
175
+ </C>
176
+ </Ie>})}
177
+ </C>}
178
+ </C>
337
179
 
338
180
 
339
- {userPropKeys.length > 0 && (<View style={detailStyles.sectionCard}>
340
- <View style={detailStyles.sectionHeader}>
341
- <SparkleIcon color={AppColors.purple} size={12}/>
342
- <Text style={detailStyles.sectionTitle}>
343
- USER PROPERTIES SNAPSHOT ({userPropKeys.length})
344
- </Text>
345
- </View>
346
- <View style={detailStyles.sectionBody}>
347
- {userPropKeys.map(k => (<View key={k} style={detailStyles.kvRow}>
348
- <Text style={detailStyles.kvKey}>{k}:</Text>
349
- <Text style={detailStyles.kvVal} selectable>
350
- {String(userProperties[k])}
351
- </Text>
352
- </View>))}
353
- </View>
354
- </View>)}
355
- </View>)}
356
-
357
-
358
- {activeViewTab === 'tree' && (<View style={detailStyles.jsonContainer}>
359
- <JsonViewer data={fullJsonData} defaultExpandDepth={1} mode="pretty" fullHeight/>
360
- </View>)}
181
+ {R.length>0&&<C style={r.sectionCard}>
182
+ <C style={r.sectionHeader}>
183
+ <X color={e.purple}size={12}/>
184
+ <V style={r.sectionTitle}>
185
+ USER PROPERTIES SNAPSHOT ({R.length})
186
+ </V>
187
+ </C>
188
+ <C style={r.sectionBody}>
189
+ {R.map(B=><C key={B}style={r.kvRow}>
190
+ <V style={r.kvKey}>{B}:</V>
191
+ <V style={r.kvVal}selectable>
192
+ {String(H[B])}
193
+ </V>
194
+ </C>)}
195
+ </C>
196
+ </C>}
197
+ </C>}
361
198
 
362
199
 
363
- {activeViewTab === 'raw' && (<View style={detailStyles.jsonContainer}>
364
- <JsonViewer data={fullJsonData} mode="raw" fullHeight/>
365
- </View>)}
366
- </ScrollView>);
367
- };
368
- const detailStyles = StyleSheet.create({
369
- scroll: {
370
- flex: 1,
371
- backgroundColor: AppColors.grayBackground,
372
- },
373
- content: {
374
- paddingTop: 12,
375
- paddingBottom: 40,
376
- paddingHorizontal: 12,
377
- },
378
- heroCard: {
379
- backgroundColor: AppColors.white,
380
- borderRadius: 12,
381
- padding: 14,
382
- borderWidth: 1,
383
- borderColor: AppColors.dividerColor,
384
- shadowColor: AppColors.primaryBlack,
385
- shadowOffset: { width: 0, height: 1 },
386
- shadowOpacity: 0.04,
387
- shadowRadius: 4,
388
- elevation: 2,
389
- marginBottom: 12,
390
- },
391
- heroTopRow: {
392
- flexDirection: 'row',
393
- alignItems: 'center',
394
- justifyContent: 'space-between',
395
- marginBottom: 10,
396
- },
397
- sourceBadge: {
398
- flexDirection: 'row',
399
- alignItems: 'center',
400
- gap: 4.5,
401
- paddingHorizontal: 7,
402
- paddingVertical: 3,
403
- borderRadius: 5,
404
- borderWidth: 1,
405
- },
406
- sourceDot: {
407
- width: 6,
408
- height: 6,
409
- borderRadius: 3,
410
- },
411
- sourceBadgeText: {
412
- fontFamily: AppFonts.interBold,
413
- fontSize: 9.5,
414
- letterSpacing: 0.4,
415
- },
416
- catBadge: {
417
- flexDirection: 'row',
418
- alignItems: 'center',
419
- gap: 4,
420
- paddingHorizontal: 7,
421
- paddingVertical: 3,
422
- borderRadius: 5,
423
- borderWidth: 1,
424
- },
425
- catBadgeText: {
426
- fontFamily: AppFonts.interBold,
427
- fontSize: 9.5,
428
- letterSpacing: 0.3,
429
- },
430
- titleRow: {
431
- marginBottom: 8,
432
- },
433
- eventTitle: {
434
- fontFamily: AppFonts.interBold,
435
- fontSize: 16,
436
- color: AppColors.primaryBlack,
437
- lineHeight: 22,
438
- },
439
- metaRow: {
440
- flexDirection: 'row',
441
- alignItems: 'center',
442
- gap: 6,
443
- flexWrap: 'wrap',
444
- marginBottom: 10,
445
- },
446
- timePill: {
447
- flexDirection: 'row',
448
- alignItems: 'center',
449
- gap: 4,
450
- backgroundColor: `${AppColors.purple}14`,
451
- paddingHorizontal: 7,
452
- paddingVertical: 3,
453
- borderRadius: 5,
454
- borderWidth: 1,
455
- borderColor: `${AppColors.purple}2E`,
456
- },
457
- timeText: {
458
- fontFamily: AppFonts.interMedium,
459
- fontSize: 10.5,
460
- color: AppColors.purple,
461
- },
462
- screenPill: {
463
- flexDirection: 'row',
464
- alignItems: 'center',
465
- gap: 4,
466
- backgroundColor: `${AppColors.sky500}14`,
467
- paddingHorizontal: 7,
468
- paddingVertical: 3,
469
- borderRadius: 5,
470
- borderWidth: 1,
471
- borderColor: `${AppColors.sky500}2E`,
472
- maxWidth: 220,
473
- },
474
- screenText: {
475
- fontFamily: AppFonts.interMedium,
476
- fontSize: 10.5,
477
- color: AppColors.sky600,
478
- },
479
- metricsBar: {
480
- flexDirection: 'row',
481
- alignItems: 'center',
482
- gap: 6,
483
- flexWrap: 'wrap',
484
- paddingTop: 8,
485
- borderTopWidth: 1,
486
- borderTopColor: AppColors.dividerColor,
487
- },
488
- metricPill: {
489
- flexDirection: 'row',
490
- alignItems: 'center',
491
- gap: 4,
492
- backgroundColor: AppColors.grayBackground,
493
- paddingHorizontal: 7,
494
- paddingVertical: 3,
495
- borderRadius: 5,
496
- borderWidth: 1,
497
- borderColor: AppColors.dividerColor,
498
- },
499
- metricLabel: {
500
- fontFamily: AppFonts.interMedium,
501
- fontSize: 10.5,
502
- color: AppColors.grayTextWeak,
503
- },
504
- metricValue: {
505
- fontFamily: AppFonts.interBold,
506
- fontSize: 10.5,
507
- color: AppColors.primaryBlack,
508
- },
509
- revenuePill: {
510
- flexDirection: 'row',
511
- alignItems: 'center',
512
- gap: 4,
513
- backgroundColor: AppColors.emeraldBg,
514
- paddingHorizontal: 7,
515
- paddingVertical: 3,
516
- borderRadius: 5,
517
- borderWidth: 1,
518
- borderColor: AppColors.emeraldBorder,
519
- },
520
- revenueValue: {
521
- fontFamily: AppFonts.interBold,
522
- fontSize: 10.5,
523
- color: '#047857',
524
- },
525
- itemsPill: {
526
- flexDirection: 'row',
527
- alignItems: 'center',
528
- gap: 4,
529
- backgroundColor: '#EFF6FF',
530
- paddingHorizontal: 7,
531
- paddingVertical: 3,
532
- borderRadius: 5,
533
- borderWidth: 1,
534
- borderColor: '#BFDBFE',
535
- },
536
- itemsValue: {
537
- fontFamily: AppFonts.interBold,
538
- fontSize: 10.5,
539
- color: '#1D4ED8',
540
- },
541
- tabsWrap: {
542
- marginBottom: 12,
543
- },
544
- tabContent: {
545
- gap: 12,
546
- },
547
- sectionCard: {
548
- backgroundColor: AppColors.white,
549
- borderRadius: 12,
550
- padding: 12,
551
- borderWidth: 1,
552
- borderColor: AppColors.dividerColor,
553
- shadowColor: AppColors.primaryBlack,
554
- shadowOffset: { width: 0, height: 1 },
555
- shadowOpacity: 0.04,
556
- shadowRadius: 4,
557
- elevation: 2,
558
- },
559
- sectionHeader: {
560
- flexDirection: 'row',
561
- alignItems: 'center',
562
- gap: 6,
563
- marginBottom: 10,
564
- paddingBottom: 6,
565
- borderBottomWidth: 1,
566
- borderBottomColor: AppColors.dividerColor,
567
- },
568
- sectionHeaderBetween: {
569
- flexDirection: 'row',
570
- alignItems: 'center',
571
- justifyContent: 'space-between',
572
- marginBottom: 10,
573
- paddingBottom: 6,
574
- borderBottomWidth: 1,
575
- borderBottomColor: AppColors.dividerColor,
576
- },
577
- sectionTitle: {
578
- fontFamily: AppFonts.interBold,
579
- fontSize: 11,
580
- color: AppColors.slate700,
581
- letterSpacing: 0.4,
582
- },
583
- sectionSubtitle: {
584
- fontFamily: AppFonts.interMedium,
585
- fontSize: 10,
586
- color: AppColors.grayTextWeak,
587
- },
588
- sectionBody: {
589
- gap: 6,
590
- },
591
- kvRow: {
592
- flexDirection: 'row',
593
- alignItems: 'center',
594
- justifyContent: 'space-between',
595
- paddingVertical: 3,
596
- },
597
- kvKey: {
598
- fontFamily: AppFonts.interMedium,
599
- fontSize: 11,
600
- color: AppColors.grayTextWeak,
601
- },
602
- kvVal: {
603
- fontFamily: AppFonts.interBold,
604
- fontSize: 11,
605
- color: AppColors.primaryBlack,
606
- },
607
- searchBar: {
608
- flexDirection: 'row',
609
- alignItems: 'center',
610
- backgroundColor: AppColors.grayBackground,
611
- borderRadius: 8,
612
- paddingHorizontal: 8,
613
- paddingVertical: 5,
614
- borderWidth: 1,
615
- borderColor: AppColors.dividerColor,
616
- marginBottom: 10,
617
- gap: 6,
618
- },
619
- searchInput: {
620
- flex: 1,
621
- fontFamily: AppFonts.interRegular,
622
- fontSize: 11,
623
- color: AppColors.primaryBlack,
624
- paddingVertical: 0,
625
- },
626
- emptyParamsBox: {
627
- alignItems: 'center',
628
- justifyContent: 'center',
629
- paddingVertical: 20,
630
- gap: 6,
631
- },
632
- emptyParamsText: {
633
- fontFamily: AppFonts.interMedium,
634
- fontSize: 11,
635
- color: AppColors.grayTextWeak,
636
- },
637
- paramList: {
638
- gap: 8,
639
- },
640
- paramCard: {
641
- backgroundColor: AppColors.grayBackground,
642
- borderRadius: 8,
643
- padding: 9,
644
- borderWidth: 1,
645
- borderColor: AppColors.dividerColor,
646
- },
647
- paramCardHeader: {
648
- flexDirection: 'row',
649
- alignItems: 'center',
650
- justifyContent: 'space-between',
651
- marginBottom: 4,
652
- },
653
- paramKeyText: {
654
- fontFamily: AppFonts.interBold,
655
- fontSize: 11.5,
656
- color: AppColors.primaryBlack,
657
- },
658
- paramKeyHighlighted: {
659
- color: AppColors.brandPurple,
660
- },
661
- typeBadge: {
662
- backgroundColor: '#E2E8F0',
663
- paddingHorizontal: 5,
664
- paddingVertical: 1.5,
665
- borderRadius: 3,
666
- },
667
- typeBadgeText: {
668
- fontFamily: AppFonts.interBold,
669
- fontSize: 8.5,
670
- color: AppColors.slate700,
671
- letterSpacing: 0.3,
672
- },
673
- paramValBox: {
674
- marginTop: 2,
675
- },
676
- paramValText: {
677
- fontFamily: AppFonts.interRegular,
678
- fontSize: 11,
679
- color: AppColors.slate700,
680
- lineHeight: 16,
681
- },
682
- jsonContainer: {
683
- borderRadius: 12,
684
- borderWidth: 1,
685
- borderColor: AppColors.dividerColor,
686
- overflow: 'hidden',
687
- backgroundColor: AppColors.white,
688
- minHeight: 300,
689
- },
690
- highlight: {
691
- backgroundColor: '#FEF08A',
692
- color: '#854D0E',
693
- fontFamily: AppFonts.interBold,
694
- },
695
- });
696
- export default AnalyticsDetail;
200
+ {j==="json"&&<C style={r.jsonContainer}>
201
+ <Y data={A}defaultExpandDepth={2}fullHeight/>
202
+ </C>}
203
+ </Te>},r=Be.create({scroll:{flex:1,backgroundColor:e.grayBackground},content:{paddingTop:12,paddingBottom:40,paddingHorizontal:12},heroCard:{backgroundColor:e.white,borderRadius:12,padding:14,borderWidth:1,borderColor:e.dividerColor,shadowColor:e.primaryBlack,shadowOffset:{width:0,height:1},shadowOpacity:.04,shadowRadius:4,elevation:2,marginBottom:12},heroTopRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:10},idBadge:{paddingHorizontal:6,paddingVertical:2.5,borderRadius:5,backgroundColor:`${e.slate500}12`,borderWidth:1,borderColor:`${e.slate500}22`},idBadgeText:{fontFamily:S.interBold,fontSize:10,color:e.grayTextWeak,letterSpacing:.2},sourceBadge:{flexDirection:"row",alignItems:"center",gap:4.5,paddingHorizontal:7,paddingVertical:3,borderRadius:5,borderWidth:1},sourceDot:{width:6,height:6,borderRadius:3},sourceBadgeText:{fontFamily:S.interBold,fontSize:9.5,letterSpacing:.4},catBadge:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:7,paddingVertical:3,borderRadius:5,borderWidth:1},catBadgeText:{fontFamily:S.interBold,fontSize:9.5,letterSpacing:.3},titleRow:{marginBottom:8},eventTitle:{fontFamily:S.interBold,fontSize:16,color:e.primaryBlack,lineHeight:22},metaRow:{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap",marginBottom:10},timePill:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:`${e.purple}14`,paddingHorizontal:7,paddingVertical:3,borderRadius:5,borderWidth:1,borderColor:`${e.purple}2E`},timeText:{fontFamily:S.interMedium,fontSize:10.5,color:e.purple},screenPill:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:`${e.sky500}14`,paddingHorizontal:7,paddingVertical:3,borderRadius:5,borderWidth:1,borderColor:`${e.sky500}2E`,maxWidth:220},screenText:{fontFamily:S.interMedium,fontSize:10.5,color:e.sky600},metricsBar:{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap",paddingTop:8,borderTopWidth:1,borderTopColor:e.dividerColor},metricPill:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:e.grayBackground,paddingHorizontal:7,paddingVertical:3,borderRadius:5,borderWidth:1,borderColor:e.dividerColor},metricLabel:{fontFamily:S.interMedium,fontSize:10.5,color:e.grayTextWeak},metricValue:{fontFamily:S.interBold,fontSize:10.5,color:e.primaryBlack},revenuePill:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:e.emeraldBg,paddingHorizontal:7,paddingVertical:3,borderRadius:5,borderWidth:1,borderColor:e.emeraldBorder},revenueValue:{fontFamily:S.interBold,fontSize:10.5,color:"#047857"},itemsPill:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:"#EFF6FF",paddingHorizontal:7,paddingVertical:3,borderRadius:5,borderWidth:1,borderColor:"#BFDBFE"},itemsValue:{fontFamily:S.interBold,fontSize:10.5,color:"#1D4ED8"},tabsWrap:{marginBottom:12},tabContent:{gap:12},sectionCard:{backgroundColor:e.white,borderRadius:12,padding:12,borderWidth:1,borderColor:e.dividerColor,shadowColor:e.primaryBlack,shadowOffset:{width:0,height:1},shadowOpacity:.04,shadowRadius:4,elevation:2},sectionHeader:{flexDirection:"row",alignItems:"center",gap:6,marginBottom:10,paddingBottom:6,borderBottomWidth:1,borderBottomColor:e.dividerColor},sectionHeaderBetween:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:10,paddingBottom:6,borderBottomWidth:1,borderBottomColor:e.dividerColor},sectionTitle:{fontFamily:S.interBold,fontSize:11,color:e.slate700,letterSpacing:.4},sectionSubtitle:{fontFamily:S.interMedium,fontSize:10,color:e.grayTextWeak},sectionBody:{gap:6},kvRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:3},kvKey:{fontFamily:S.interMedium,fontSize:11,color:e.grayTextWeak},kvVal:{fontFamily:S.interBold,fontSize:11,color:e.primaryBlack},searchBar:{flexDirection:"row",alignItems:"center",backgroundColor:e.grayBackground,borderRadius:8,paddingHorizontal:8,paddingVertical:5,borderWidth:1,borderColor:e.dividerColor,marginBottom:10,gap:6},searchInput:{flex:1,fontFamily:S.interRegular,fontSize:11,color:e.primaryBlack,paddingVertical:0},emptyParamsBox:{alignItems:"center",justifyContent:"center",paddingVertical:20,gap:6},emptyParamsText:{fontFamily:S.interMedium,fontSize:11,color:e.grayTextWeak},paramList:{gap:8},paramCard:{backgroundColor:e.grayBackground,borderRadius:8,padding:9,borderWidth:1,borderColor:e.dividerColor},paramCardHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4},paramKeyText:{fontFamily:S.interBold,fontSize:11.5,color:e.primaryBlack},paramKeyHighlighted:{color:e.brandPurple},typeBadge:{backgroundColor:"#E2E8F0",paddingHorizontal:5,paddingVertical:1.5,borderRadius:3},typeBadgeText:{fontFamily:S.interBold,fontSize:8.5,color:e.slate700,letterSpacing:.3},paramValBox:{marginTop:2},paramValText:{fontFamily:S.interRegular,fontSize:11,color:e.slate700,lineHeight:16},jsonContainer:{borderRadius:12,borderWidth:1,borderColor:e.dividerColor,overflow:"hidden",backgroundColor:e.white,minHeight:300},highlight:{backgroundColor:"#FEF08A",color:"#854D0E",fontFamily:S.interBold}});export default Je;