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,556 +1,164 @@
1
- import React, { useEffect, useMemo, useState } from 'react';
2
- import { Modal, Pressable, ScrollView, StyleSheet, Text, TouchableOpacity, View, } from 'react-native';
3
- import { useInspector } from './InspectorContext';
4
- import { AppColors } from '../../styles/AppColors';
5
- import { AppFonts } from '../../styles/AppFonts';
6
- import { useTranslation } from '../../i18n';
7
- import { FilterIcon, CloseWhite, CheckIcon, ClockIcon, HourglassIcon, SkullIcon, JsIcon, LayoutIcon, ChipIcon, AppleIcon, AndroidIcon, BoltIcon, } from '../NetworkIcons';
8
- import TouchableScale from '../TouchableScale';
9
- export const DEFAULT_CRASH_FILTERS = {
10
- types: new Set(['all']),
11
- timeWindow: 'all',
12
- platform: 'all',
13
- engine: 'all',
14
- sortBy: 'time_desc',
15
- };
16
- export const isCrashFiltersDefault = (f) => (f.types.has('all') || f.types.size === 0) &&
17
- f.timeWindow === 'all' &&
18
- f.platform === 'all' &&
19
- f.engine === 'all' &&
20
- f.sortBy === 'time_desc';
21
- const CrashFilterModal = ({ visible, onClose, filters, onApply, searchQuery = '', }) => {
22
- const { t } = useTranslation();
23
- const { crashRecords } = useInspector();
24
- const [draft, setDraft] = useState(() => ({
25
- ...filters,
26
- types: new Set(filters.types),
27
- }));
28
- useEffect(() => {
29
- if (visible) {
30
- setDraft({
31
- ...filters,
32
- types: new Set(filters.types),
33
- });
34
- }
35
- }, [visible]);
36
- const toggleType = (key) => {
37
- setDraft(prev => {
38
- const next = new Set(prev.types);
39
- if (key === 'all') {
40
- return { ...prev, types: new Set(['all']) };
41
- }
42
- next.delete('all');
43
- if (next.has(key)) {
44
- next.delete(key);
45
- if (next.size === 0)
46
- next.add('all');
47
- }
48
- else {
49
- next.add(key);
50
- }
51
- return { ...prev, types: next };
52
- });
53
- };
54
- const setTimeWindow = (tw) => {
55
- setDraft(prev => ({ ...prev, timeWindow: tw }));
56
- };
57
- const setPlatform = (p) => {
58
- setDraft(prev => ({ ...prev, platform: p }));
59
- };
60
- const setEngine = (e) => {
61
- setDraft(prev => ({ ...prev, engine: e }));
62
- };
63
- const setSort = (sortBy) => {
64
- setDraft(prev => ({ ...prev, sortBy }));
65
- };
66
- const handleResetDraft = () => {
67
- setDraft({
68
- ...DEFAULT_CRASH_FILTERS,
69
- types: new Set(DEFAULT_CRASH_FILTERS.types),
70
- });
71
- };
72
- const handleApply = () => {
73
- onApply({
74
- ...draft,
75
- types: new Set(draft.types),
76
- });
77
- onClose();
78
- };
79
- const handleDiscard = () => {
80
- setDraft({
81
- ...filters,
82
- types: new Set(filters.types),
83
- });
84
- onClose();
85
- };
86
- const draftMatchCount = useMemo(() => {
87
- let crashes = crashRecords;
88
- if (searchQuery.trim().length > 0) {
89
- const q = searchQuery.toLowerCase();
90
- crashes = crashes.filter(c => (c.message || '').toLowerCase().includes(q) ||
91
- (c.name || '').toLowerCase().includes(q) ||
92
- (c.stack || '').toLowerCase().includes(q));
93
- }
94
- if (draft.types.size > 0 && !draft.types.has('all')) {
95
- crashes = crashes.filter(c => {
96
- if (draft.types.has('fatal') && c.isFatal)
97
- return true;
98
- if (draft.types.has('js') && c.type === 'js')
99
- return true;
100
- if (draft.types.has('promise') && c.type === 'promise')
101
- return true;
102
- if (draft.types.has('render') && c.type === 'render')
103
- return true;
104
- if (draft.types.has('native') && c.type === 'native')
105
- return true;
106
- return false;
107
- });
108
- }
109
- if (draft.timeWindow !== 'all') {
110
- const now = Date.now();
111
- const cutoff = draft.timeWindow === '15m'
112
- ? now - 15 * 60 * 1000
113
- : draft.timeWindow === '1h'
114
- ? now - 60 * 60 * 1000
115
- : draft.timeWindow === '24h'
116
- ? now - 24 * 60 * 60 * 1000
117
- : now - 7 * 24 * 60 * 60 * 1000;
118
- crashes = crashes.filter(c => c.timestamp >= cutoff);
119
- }
120
- if (draft.platform !== 'all') {
121
- crashes = crashes.filter(c => (c.deviceInfo?.platform || '').toLowerCase() === draft.platform);
122
- }
123
- if (draft.engine !== 'all') {
124
- crashes = crashes.filter(c => {
125
- const isHermes = c.deviceInfo?.isHermes;
126
- if (draft.engine === 'hermes')
127
- return isHermes === true;
128
- return isHermes === false || isHermes === undefined;
129
- });
130
- }
131
- return crashes.length;
132
- }, [crashRecords, searchQuery, draft]);
133
- const isAllTypes = draft.types.has('all') || draft.types.size === 0;
134
- const typeChips = [
135
- { key: 'all', label: t('crash.filterTypeAll'), Icon: FilterIcon, color: AppColors.grayTextStrong },
136
- { key: 'fatal', label: t('crash.filterFatal'), Icon: SkullIcon, color: AppColors.errorColor },
137
- { key: 'js', label: t('crash.filterJsError'), Icon: JsIcon, color: AppColors.sky600 },
138
- { key: 'promise', label: t('crash.filterPromise'), Icon: HourglassIcon, color: AppColors.darkOrange },
139
- { key: 'render', label: t('crash.filterRender'), Icon: LayoutIcon, color: AppColors.purple },
140
- { key: 'native', label: t('crash.filterNative'), Icon: ChipIcon, color: AppColors.amber700 },
141
- ];
142
- return (<Modal visible={visible} transparent animationType="fade" onRequestClose={handleDiscard}>
143
- <View style={styles.backdrop}>
144
- <Pressable style={StyleSheet.absoluteFill} onPress={handleDiscard}/>
1
+ import{useEffect as Q,useMemo as ee,useState as te}from"react";import{Modal as Te,Pressable as Pe,ScrollView as Se,StyleSheet as j,Text as P,TouchableOpacity as V,View as T}from"react-native";import{useInspector as Ce}from"./InspectorContext";import{AppColors as t}from"../../styles/AppColors";import{AppFonts as I}from"../../styles/AppFonts";import{useTranslation as Be}from"../../i18n";import{FilterIcon as _,CloseWhite as Ie,CheckIcon as Ae,ClockIcon as O,HourglassIcon as E,SkullIcon as L,JsIcon as Ve,LayoutIcon as We,ChipIcon as ze,AppleIcon as M,AndroidIcon as Re,BoltIcon as $}from"../NetworkIcons";import C from"../TouchableScale";export const DEFAULT_CRASH_FILTERS={types:new Set(["all"]),timeWindow:"all",platform:"all",engine:"all",sortBy:"time_desc"},isCrashFiltersDefault=S=>(S.types.has("all")||S.types.size===0)&&S.timeWindow==="all"&&S.platform==="all"&&S.engine==="all"&&S.sortBy==="time_desc";const Oe=({visible:S,onClose:F,filters:v,onApply:q,searchQuery:W=""})=>{const{t:o}=Be(),{crashRecords:H}=Ce(),[l,B]=te(()=>({...v,types:new Set(v.types)}));Q(()=>{S&&B({...v,types:new Set(v.types)})},[S]);const J=r=>{B(i=>{const k=new Set(i.types);return r==="all"?{...i,types:new Set(["all"])}:(k.delete("all"),k.has(r)?(k.delete(r),k.size===0&&k.add("all")):k.add(r),{...i,types:k})})},N=r=>{B(i=>({...i,timeWindow:r}))},z=r=>{B(i=>({...i,platform:r}))},R=r=>{B(i=>({...i,engine:r}))},D=r=>{B(i=>({...i,sortBy:r}))},U=()=>{B({...DEFAULT_CRASH_FILTERS,types:new Set(DEFAULT_CRASH_FILTERS.types)})},G=()=>{q({...l,types:new Set(l.types)}),F()},A=()=>{B({...v,types:new Set(v.types)}),F()},K=ee(()=>{let r=H;if(W.trim().length>0){const i=W.toLowerCase();r=r.filter(k=>(k.message||"").toLowerCase().includes(i)||(k.name||"").toLowerCase().includes(i)||(k.stack||"").toLowerCase().includes(i))}if(l.types.size>0&&!l.types.has("all")&&(r=r.filter(i=>!!(l.types.has("fatal")&&i.isFatal||l.types.has("js")&&i.type==="js"||l.types.has("promise")&&i.type==="promise"||l.types.has("render")&&i.type==="render"||l.types.has("native")&&i.type==="native"))),l.timeWindow!=="all"){const i=Date.now(),k=l.timeWindow==="15m"?i-900*1e3:l.timeWindow==="1h"?i-3600*1e3:l.timeWindow==="24h"?i-1440*60*1e3:i-10080*60*1e3;r=r.filter(Z=>Z.timestamp>=k)}return l.platform!=="all"&&(r=r.filter(i=>(i.deviceInfo?.platform||"").toLowerCase()===l.platform)),l.engine!=="all"&&(r=r.filter(i=>{const k=i.deviceInfo?.isHermes;return l.engine==="hermes"?k===!0:k===!1||k===void 0})),r.length},[H,W,l]),X=l.types.has("all")||l.types.size===0,Y=[{key:"all",label:o("crash.filterTypeAll"),Icon:_,color:t.grayTextStrong},{key:"fatal",label:o("crash.filterFatal"),Icon:L,color:t.errorColor},{key:"js",label:o("crash.filterJsError"),Icon:Ve,color:t.sky600},{key:"promise",label:o("crash.filterPromise"),Icon:E,color:t.darkOrange},{key:"render",label:o("crash.filterRender"),Icon:We,color:t.purple},{key:"native",label:o("crash.filterNative"),Icon:ze,color:t.amber700}];return<Te visible={S}transparent animationType="fade"onRequestClose={A}>
2
+ <T style={e.backdrop}>
3
+ <Pe style={j.absoluteFill}onPress={A}/>
145
4
 
146
- <View style={styles.modalCard}>
147
- <View style={styles.header}>
148
- <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
149
- <View style={styles.headerIconBox}>
150
- <FilterIcon color={AppColors.brandPurple} size={15}/>
151
- </View>
152
- <View>
153
- <Text style={styles.headerTitle}>{t('crash.filterTitle')}</Text>
154
- <Text style={styles.headerSubtitle}>
155
- {t('crash.filterSubtitle')}
156
- </Text>
157
- </View>
158
- </View>
5
+ <T style={e.modalCard}>
6
+ <T style={e.header}>
7
+ <T style={{flexDirection:"row",alignItems:"center",gap:8}}>
8
+ <T style={e.headerIconBox}>
9
+ <_ color={t.brandPurple}size={15}/>
10
+ </T>
11
+ <T>
12
+ <P style={e.headerTitle}>{o("crash.filterTitle")}</P>
13
+ <P style={e.headerSubtitle}>
14
+ {o("crash.filterSubtitle")}
15
+ </P>
16
+ </T>
17
+ </T>
159
18
 
160
- <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
161
- <TouchableOpacity onPress={handleResetDraft} hitSlop={8} style={styles.resetBtn}>
162
- <Text style={styles.resetBtnText}>{t('crash.filterReset')}</Text>
163
- </TouchableOpacity>
19
+ <T style={{flexDirection:"row",alignItems:"center",gap:8}}>
20
+ <V onPress={U}hitSlop={8}style={e.resetBtn}>
21
+ <P style={e.resetBtnText}>{o("crash.filterReset")}</P>
22
+ </V>
164
23
 
165
- <TouchableOpacity onPress={handleDiscard} hitSlop={10} style={styles.closeBtn}>
166
- <CloseWhite />
167
- </TouchableOpacity>
168
- </View>
169
- </View>
24
+ <V onPress={A}hitSlop={10}style={e.closeBtn}>
25
+ <Ie/>
26
+ </V>
27
+ </T>
28
+ </T>
170
29
 
171
- <ScrollView style={{ maxHeight: 460 }} contentContainerStyle={styles.scrollContent} showsVerticalScrollIndicator={true}>
172
- <View style={styles.section}>
173
- <View style={styles.sectionHeaderRow}>
174
- <SkullIcon color={AppColors.grayTextWeak} size={12}/>
175
- <Text style={styles.sectionTitle}>
176
- {t('crash.filterTypeSection')}
177
- </Text>
178
- </View>
179
- <View style={styles.chipsWrap}>
180
- {typeChips.map(chip => {
181
- const isSelected = chip.key === 'all' ? isAllTypes : draft.types.has(chip.key);
182
- return (<TouchableScale key={chip.key} onPress={() => toggleType(chip.key)} style={[
183
- styles.filterPill,
184
- isSelected && styles.filterPillActive,
185
- ]}>
186
- {chip.key === 'all' && isSelected && (<CheckIcon color={AppColors.white} size={12}/>)}
187
- <chip.Icon size={12} color={isSelected ? AppColors.white : chip.color}/>
188
- <Text style={[
189
- styles.filterPillText,
190
- isSelected && styles.filterPillTextActive,
191
- ]}>
192
- {chip.label}
193
- </Text>
194
- </TouchableScale>);
195
- })}
196
- </View>
197
- </View>
30
+ <Se style={{maxHeight:460}}contentContainerStyle={e.scrollContent}showsVerticalScrollIndicator={!0}>
31
+ <T style={e.section}>
32
+ <T style={e.sectionHeaderRow}>
33
+ <L color={t.grayTextWeak}size={12}/>
34
+ <P style={e.sectionTitle}>
35
+ {o("crash.filterTypeSection")}
36
+ </P>
37
+ </T>
38
+ <T style={e.chipsWrap}>
39
+ {Y.map(r=>{const i=r.key==="all"?X:l.types.has(r.key);return<C key={r.key}onPress={()=>J(r.key)}style={[e.filterPill,i&&e.filterPillActive]}>
40
+ {r.key==="all"&&i&&<Ae color={t.white}size={12}/>}
41
+ <r.Icon size={12}color={i?t.white:r.color}/>
42
+ <P style={[e.filterPillText,i&&e.filterPillTextActive]}>
43
+ {r.label}
44
+ </P>
45
+ </C>})}
46
+ </T>
47
+ </T>
198
48
 
199
- <View style={styles.section}>
200
- <View style={styles.sectionHeaderRow}>
201
- <ClockIcon color={AppColors.grayTextWeak} size={12}/>
202
- <Text style={styles.sectionTitle}>
203
- {t('crash.filterTimeSection')}
204
- </Text>
205
- </View>
206
- <View style={styles.chipsWrap}>
207
- {[
208
- { key: 'all', label: t('crash.filterTimeAll') },
209
- { key: '15m', label: t('crash.filterTime15m') },
210
- { key: '1h', label: t('crash.filterTime1h') },
211
- { key: '24h', label: t('crash.filterTime24h') },
212
- { key: '7d', label: t('crash.filterTime7d') },
213
- ].map(item => (<TouchableScale key={item.key} onPress={() => setTimeWindow(item.key)} style={[
214
- styles.filterPill,
215
- draft.timeWindow === item.key && styles.filterPillActive,
216
- ]}>
217
- <Text style={[
218
- styles.filterPillText,
219
- draft.timeWindow === item.key &&
220
- styles.filterPillTextActive,
221
- ]}>
222
- {item.label}
223
- </Text>
224
- </TouchableScale>))}
225
- </View>
226
- </View>
49
+ <T style={e.section}>
50
+ <T style={e.sectionHeaderRow}>
51
+ <O color={t.grayTextWeak}size={12}/>
52
+ <P style={e.sectionTitle}>
53
+ {o("crash.filterTimeSection")}
54
+ </P>
55
+ </T>
56
+ <T style={e.chipsWrap}>
57
+ {[{key:"all",label:o("crash.filterTimeAll")},{key:"15m",label:o("crash.filterTime15m")},{key:"1h",label:o("crash.filterTime1h")},{key:"24h",label:o("crash.filterTime24h")},{key:"7d",label:o("crash.filterTime7d")}].map(r=><C key={r.key}onPress={()=>N(r.key)}style={[e.filterPill,l.timeWindow===r.key&&e.filterPillActive]}>
58
+ <P style={[e.filterPillText,l.timeWindow===r.key&&e.filterPillTextActive]}>
59
+ {r.label}
60
+ </P>
61
+ </C>)}
62
+ </T>
63
+ </T>
227
64
 
228
- <View style={styles.section}>
229
- <View style={styles.sectionHeaderRow}>
230
- <AppleIcon color={AppColors.grayTextWeak} size={12}/>
231
- <Text style={styles.sectionTitle}>
232
- {t('crash.filterPlatformSection')}
233
- </Text>
234
- </View>
235
- <View style={styles.chipsWrap}>
236
- <TouchableScale onPress={() => setPlatform('all')} style={[
237
- styles.filterPill,
238
- draft.platform === 'all' && styles.filterPillActive,
239
- ]}>
240
- <Text style={[
241
- styles.filterPillText,
242
- draft.platform === 'all' && styles.filterPillTextActive,
243
- ]}>
244
- {t('crash.filterPlatformAll')}
245
- </Text>
246
- </TouchableScale>
65
+ <T style={e.section}>
66
+ <T style={e.sectionHeaderRow}>
67
+ <M color={t.grayTextWeak}size={12}/>
68
+ <P style={e.sectionTitle}>
69
+ {o("crash.filterPlatformSection")}
70
+ </P>
71
+ </T>
72
+ <T style={e.chipsWrap}>
73
+ <C onPress={()=>z("all")}style={[e.filterPill,l.platform==="all"&&e.filterPillActive]}>
74
+ <P style={[e.filterPillText,l.platform==="all"&&e.filterPillTextActive]}>
75
+ {o("crash.filterPlatformAll")}
76
+ </P>
77
+ </C>
247
78
 
248
- <TouchableScale onPress={() => setPlatform('ios')} style={[
249
- styles.filterPill,
250
- draft.platform === 'ios' && styles.filterPillActive,
251
- ]}>
252
- <AppleIcon size={12} color={draft.platform === 'ios'
253
- ? AppColors.white
254
- : AppColors.grayTextStrong}/>
255
- <Text style={[
256
- styles.filterPillText,
257
- draft.platform === 'ios' && styles.filterPillTextActive,
258
- ]}>
259
- {t('crash.filterPlatformIos')}
260
- </Text>
261
- </TouchableScale>
79
+ <C onPress={()=>z("ios")}style={[e.filterPill,l.platform==="ios"&&e.filterPillActive]}>
80
+ <M size={12}color={l.platform==="ios"?t.white:t.grayTextStrong}/>
81
+ <P style={[e.filterPillText,l.platform==="ios"&&e.filterPillTextActive]}>
82
+ {o("crash.filterPlatformIos")}
83
+ </P>
84
+ </C>
262
85
 
263
- <TouchableScale onPress={() => setPlatform('android')} style={[
264
- styles.filterPill,
265
- draft.platform === 'android' && styles.filterPillActive,
266
- ]}>
267
- <AndroidIcon size={12} color={draft.platform === 'android'
268
- ? AppColors.white
269
- : AppColors.greenColor}/>
270
- <Text style={[
271
- styles.filterPillText,
272
- draft.platform === 'android' && styles.filterPillTextActive,
273
- ]}>
274
- {t('crash.filterPlatformAndroid')}
275
- </Text>
276
- </TouchableScale>
277
- </View>
278
- </View>
86
+ <C onPress={()=>z("android")}style={[e.filterPill,l.platform==="android"&&e.filterPillActive]}>
87
+ <Re size={12}color={l.platform==="android"?t.white:t.greenColor}/>
88
+ <P style={[e.filterPillText,l.platform==="android"&&e.filterPillTextActive]}>
89
+ {o("crash.filterPlatformAndroid")}
90
+ </P>
91
+ </C>
92
+ </T>
93
+ </T>
279
94
 
280
- <View style={styles.section}>
281
- <View style={styles.sectionHeaderRow}>
282
- <BoltIcon color={AppColors.grayTextWeak} size={12}/>
283
- <Text style={styles.sectionTitle}>
284
- {t('crash.filterEngineSection')}
285
- </Text>
286
- </View>
287
- <View style={styles.chipsWrap}>
288
- <TouchableScale onPress={() => setEngine('all')} style={[
289
- styles.filterPill,
290
- draft.engine === 'all' && styles.filterPillActive,
291
- ]}>
292
- <Text style={[
293
- styles.filterPillText,
294
- draft.engine === 'all' && styles.filterPillTextActive,
295
- ]}>
296
- {t('crash.filterEngineAll')}
297
- </Text>
298
- </TouchableScale>
95
+ <T style={e.section}>
96
+ <T style={e.sectionHeaderRow}>
97
+ <$ color={t.grayTextWeak}size={12}/>
98
+ <P style={e.sectionTitle}>
99
+ {o("crash.filterEngineSection")}
100
+ </P>
101
+ </T>
102
+ <T style={e.chipsWrap}>
103
+ <C onPress={()=>R("all")}style={[e.filterPill,l.engine==="all"&&e.filterPillActive]}>
104
+ <P style={[e.filterPillText,l.engine==="all"&&e.filterPillTextActive]}>
105
+ {o("crash.filterEngineAll")}
106
+ </P>
107
+ </C>
299
108
 
300
- <TouchableScale onPress={() => setEngine('hermes')} style={[
301
- styles.filterPill,
302
- draft.engine === 'hermes' && styles.filterPillActive,
303
- ]}>
304
- <BoltIcon size={12} color={draft.engine === 'hermes'
305
- ? AppColors.white
306
- : AppColors.brandPurple}/>
307
- <Text style={[
308
- styles.filterPillText,
309
- draft.engine === 'hermes' && styles.filterPillTextActive,
310
- ]}>
311
- {t('crash.filterEngineHermes')}
312
- </Text>
313
- </TouchableScale>
109
+ <C onPress={()=>R("hermes")}style={[e.filterPill,l.engine==="hermes"&&e.filterPillActive]}>
110
+ <$ size={12}color={l.engine==="hermes"?t.white:t.brandPurple}/>
111
+ <P style={[e.filterPillText,l.engine==="hermes"&&e.filterPillTextActive]}>
112
+ {o("crash.filterEngineHermes")}
113
+ </P>
114
+ </C>
314
115
 
315
- <TouchableScale onPress={() => setEngine('jsc')} style={[
316
- styles.filterPill,
317
- draft.engine === 'jsc' && styles.filterPillActive,
318
- ]}>
319
- <Text style={[
320
- styles.filterPillText,
321
- draft.engine === 'jsc' && styles.filterPillTextActive,
322
- ]}>
323
- {t('crash.jsc')}
324
- </Text>
325
- </TouchableScale>
326
- </View>
327
- </View>
116
+ <C onPress={()=>R("jsc")}style={[e.filterPill,l.engine==="jsc"&&e.filterPillActive]}>
117
+ <P style={[e.filterPillText,l.engine==="jsc"&&e.filterPillTextActive]}>
118
+ {o("crash.jsc")}
119
+ </P>
120
+ </C>
121
+ </T>
122
+ </T>
328
123
 
329
- <View style={styles.section}>
330
- <View style={styles.sectionHeaderRow}>
331
- <ClockIcon color={AppColors.grayTextWeak} size={12}/>
332
- <Text style={styles.sectionTitle}>
333
- {t('crash.filterSortSection')}
334
- </Text>
335
- </View>
336
- <View style={styles.chipsWrap}>
337
- <TouchableScale onPress={() => setSort('time_desc')} style={[
338
- styles.filterPill,
339
- draft.sortBy === 'time_desc' && styles.filterPillActive,
340
- ]}>
341
- <ClockIcon size={12} color={draft.sortBy === 'time_desc'
342
- ? AppColors.white
343
- : AppColors.grayText}/>
344
- <Text style={[
345
- styles.filterPillText,
346
- draft.sortBy === 'time_desc' &&
347
- styles.filterPillTextActive,
348
- ]}>
349
- {t('crash.filterSortNewest')}
350
- </Text>
351
- </TouchableScale>
124
+ <T style={e.section}>
125
+ <T style={e.sectionHeaderRow}>
126
+ <O color={t.grayTextWeak}size={12}/>
127
+ <P style={e.sectionTitle}>
128
+ {o("crash.filterSortSection")}
129
+ </P>
130
+ </T>
131
+ <T style={e.chipsWrap}>
132
+ <C onPress={()=>D("time_desc")}style={[e.filterPill,l.sortBy==="time_desc"&&e.filterPillActive]}>
133
+ <O size={12}color={l.sortBy==="time_desc"?t.white:t.grayText}/>
134
+ <P style={[e.filterPillText,l.sortBy==="time_desc"&&e.filterPillTextActive]}>
135
+ {o("crash.filterSortNewest")}
136
+ </P>
137
+ </C>
352
138
 
353
- <TouchableScale onPress={() => setSort('time_asc')} style={[
354
- styles.filterPill,
355
- draft.sortBy === 'time_asc' && styles.filterPillActive,
356
- ]}>
357
- <HourglassIcon size={12} color={draft.sortBy === 'time_asc'
358
- ? AppColors.white
359
- : AppColors.grayText}/>
360
- <Text style={[
361
- styles.filterPillText,
362
- draft.sortBy === 'time_asc' &&
363
- styles.filterPillTextActive,
364
- ]}>
365
- {t('crash.filterSortOldest')}
366
- </Text>
367
- </TouchableScale>
368
- </View>
369
- </View>
370
- </ScrollView>
139
+ <C onPress={()=>D("time_asc")}style={[e.filterPill,l.sortBy==="time_asc"&&e.filterPillActive]}>
140
+ <E size={12}color={l.sortBy==="time_asc"?t.white:t.grayText}/>
141
+ <P style={[e.filterPillText,l.sortBy==="time_asc"&&e.filterPillTextActive]}>
142
+ {o("crash.filterSortOldest")}
143
+ </P>
144
+ </C>
145
+ </T>
146
+ </T>
147
+ </Se>
371
148
 
372
- <View style={styles.footer}>
373
- <TouchableOpacity onPress={handleDiscard} style={styles.discardBtn} activeOpacity={0.8}>
374
- <Text style={styles.discardBtnText}>
375
- {t('crash.filterDiscard')}
376
- </Text>
377
- </TouchableOpacity>
149
+ <T style={e.footer}>
150
+ <V onPress={A}style={e.discardBtn}activeOpacity={.8}>
151
+ <P style={e.discardBtnText}>
152
+ {o("crash.filterDiscard")}
153
+ </P>
154
+ </V>
378
155
 
379
- <TouchableOpacity onPress={handleApply} style={styles.applyBtn} activeOpacity={0.85}>
380
- <Text style={styles.applyBtnText}>
381
- {t('crash.filterApply', { count: draftMatchCount })}
382
- </Text>
383
- </TouchableOpacity>
384
- </View>
385
- </View>
386
- </View>
387
- </Modal>);
388
- };
389
- const styles = StyleSheet.create({
390
- backdrop: {
391
- flex: 1,
392
- backgroundColor: `${AppColors.primaryBlack}85`,
393
- justifyContent: 'center',
394
- alignItems: 'center',
395
- padding: 16,
396
- },
397
- modalCard: {
398
- width: '100%',
399
- maxWidth: 440,
400
- backgroundColor: AppColors.white,
401
- borderRadius: 14,
402
- borderWidth: 1,
403
- borderColor: AppColors.dividerColor,
404
- shadowColor: AppColors.black,
405
- shadowOpacity: 0.18,
406
- shadowRadius: 12,
407
- shadowOffset: { width: 0, height: 4 },
408
- elevation: 8,
409
- overflow: 'hidden',
410
- },
411
- header: {
412
- flexDirection: 'row',
413
- alignItems: 'center',
414
- justifyContent: 'space-between',
415
- paddingHorizontal: 14,
416
- paddingVertical: 12,
417
- borderBottomWidth: 1,
418
- borderBottomColor: AppColors.dividerColor,
419
- backgroundColor: `${AppColors.brandPurple}08`,
420
- },
421
- headerIconBox: {
422
- width: 28,
423
- height: 28,
424
- borderRadius: 7,
425
- backgroundColor: `${AppColors.brandPurple}18`,
426
- alignItems: 'center',
427
- justifyContent: 'center',
428
- },
429
- headerTitle: {
430
- fontFamily: AppFonts.interBold,
431
- fontSize: 13.5,
432
- color: AppColors.primaryBlack,
433
- },
434
- headerSubtitle: {
435
- fontFamily: AppFonts.interMedium,
436
- fontSize: 10,
437
- color: AppColors.grayTextWeak,
438
- },
439
- resetBtn: {
440
- paddingHorizontal: 8,
441
- paddingVertical: 4,
442
- borderRadius: 5,
443
- backgroundColor: `${AppColors.darkOrange}14`,
444
- borderWidth: 1,
445
- borderColor: `${AppColors.darkOrange}30`,
446
- },
447
- resetBtnText: {
448
- fontFamily: AppFonts.interBold,
449
- fontSize: 10,
450
- color: AppColors.darkOrange,
451
- },
452
- closeBtn: {
453
- width: 24,
454
- height: 24,
455
- borderRadius: 12,
456
- backgroundColor: `${AppColors.primaryBlack}18`,
457
- alignItems: 'center',
458
- justifyContent: 'center',
459
- },
460
- scrollContent: {
461
- padding: 14,
462
- gap: 14,
463
- },
464
- section: {
465
- gap: 7,
466
- },
467
- sectionHeaderRow: {
468
- flexDirection: 'row',
469
- alignItems: 'center',
470
- gap: 5,
471
- },
472
- sectionTitle: {
473
- fontFamily: AppFonts.interBold,
474
- fontSize: 9.5,
475
- color: AppColors.grayTextWeak,
476
- letterSpacing: 0.5,
477
- },
478
- chipsWrap: {
479
- flexDirection: 'row',
480
- flexWrap: 'wrap',
481
- gap: 6.5,
482
- },
483
- filterPill: {
484
- flexDirection: 'row',
485
- alignItems: 'center',
486
- gap: 5,
487
- paddingHorizontal: 9,
488
- paddingVertical: 5.5,
489
- borderRadius: 7,
490
- backgroundColor: AppColors.grayBackground,
491
- borderWidth: 1,
492
- borderColor: AppColors.dividerColor,
493
- },
494
- filterPillActive: {
495
- backgroundColor: AppColors.brandPurple,
496
- borderColor: AppColors.brandPurple,
497
- shadowColor: AppColors.brandPurple,
498
- shadowOffset: { width: 0, height: 1 },
499
- shadowOpacity: 0.25,
500
- shadowRadius: 3,
501
- elevation: 2,
502
- },
503
- filterPillText: {
504
- fontFamily: AppFonts.interMedium,
505
- fontSize: 11,
506
- color: AppColors.primaryBlack,
507
- },
508
- filterPillTextActive: {
509
- color: AppColors.white,
510
- fontFamily: AppFonts.interBold,
511
- },
512
- footer: {
513
- flexDirection: 'row',
514
- alignItems: 'center',
515
- gap: 10,
516
- paddingHorizontal: 14,
517
- paddingVertical: 12,
518
- borderTopWidth: 1,
519
- borderTopColor: AppColors.dividerColor,
520
- backgroundColor: AppColors.grayBackground,
521
- },
522
- discardBtn: {
523
- flex: 1,
524
- paddingVertical: 9.5,
525
- borderRadius: 8,
526
- borderWidth: 1,
527
- borderColor: AppColors.dividerColor,
528
- backgroundColor: AppColors.white,
529
- alignItems: 'center',
530
- justifyContent: 'center',
531
- },
532
- discardBtnText: {
533
- fontFamily: AppFonts.interBold,
534
- fontSize: 12.5,
535
- color: AppColors.grayTextStrong,
536
- },
537
- applyBtn: {
538
- flex: 2,
539
- backgroundColor: AppColors.brandPurple,
540
- paddingVertical: 9.5,
541
- borderRadius: 8,
542
- alignItems: 'center',
543
- justifyContent: 'center',
544
- shadowColor: AppColors.brandPurple,
545
- shadowOffset: { width: 0, height: 1 },
546
- shadowOpacity: 0.25,
547
- shadowRadius: 3,
548
- elevation: 2,
549
- },
550
- applyBtnText: {
551
- fontFamily: AppFonts.interBold,
552
- fontSize: 12.5,
553
- color: AppColors.white,
554
- },
555
- });
556
- export default CrashFilterModal;
156
+ <V onPress={G}style={e.applyBtn}activeOpacity={.85}>
157
+ <P style={e.applyBtnText}>
158
+ {o("crash.filterApply",{count:K})}
159
+ </P>
160
+ </V>
161
+ </T>
162
+ </T>
163
+ </T>
164
+ </Te>},e=j.create({backdrop:{flex:1,backgroundColor:`${t.primaryBlack}85`,justifyContent:"center",alignItems:"center",padding:16},modalCard:{width:"100%",maxWidth:440,backgroundColor:t.white,borderRadius:14,borderWidth:1,borderColor:t.dividerColor,shadowColor:t.black,shadowOpacity:.18,shadowRadius:12,shadowOffset:{width:0,height:4},elevation:8,overflow:"hidden"},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:14,paddingVertical:12,borderBottomWidth:1,borderBottomColor:t.dividerColor,backgroundColor:`${t.brandPurple}08`},headerIconBox:{width:28,height:28,borderRadius:7,backgroundColor:`${t.brandPurple}18`,alignItems:"center",justifyContent:"center"},headerTitle:{fontFamily:I.interBold,fontSize:13.5,color:t.primaryBlack},headerSubtitle:{fontFamily:I.interMedium,fontSize:10,color:t.grayTextWeak},resetBtn:{paddingHorizontal:8,paddingVertical:4,borderRadius:5,backgroundColor:`${t.darkOrange}14`,borderWidth:1,borderColor:`${t.darkOrange}30`},resetBtnText:{fontFamily:I.interBold,fontSize:10,color:t.darkOrange},closeBtn:{width:24,height:24,borderRadius:12,backgroundColor:`${t.primaryBlack}18`,alignItems:"center",justifyContent:"center"},scrollContent:{padding:14,gap:14},section:{gap:7},sectionHeaderRow:{flexDirection:"row",alignItems:"center",gap:5},sectionTitle:{fontFamily:I.interBold,fontSize:9.5,color:t.grayTextWeak,letterSpacing:.5},chipsWrap:{flexDirection:"row",flexWrap:"wrap",gap:6.5},filterPill:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:9,paddingVertical:5.5,borderRadius:7,backgroundColor:t.grayBackground,borderWidth:1,borderColor:t.dividerColor},filterPillActive:{backgroundColor:t.brandPurple,borderColor:t.brandPurple,shadowColor:t.brandPurple,shadowOffset:{width:0,height:1},shadowOpacity:.25,shadowRadius:3,elevation:2},filterPillText:{fontFamily:I.interMedium,fontSize:11,color:t.primaryBlack},filterPillTextActive:{color:t.white,fontFamily:I.interBold},footer:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:14,paddingVertical:12,borderTopWidth:1,borderTopColor:t.dividerColor,backgroundColor:t.grayBackground},discardBtn:{flex:1,paddingVertical:9.5,borderRadius:8,borderWidth:1,borderColor:t.dividerColor,backgroundColor:t.white,alignItems:"center",justifyContent:"center"},discardBtnText:{fontFamily:I.interBold,fontSize:12.5,color:t.grayTextStrong},applyBtn:{flex:2,backgroundColor:t.brandPurple,paddingVertical:9.5,borderRadius:8,alignItems:"center",justifyContent:"center",shadowColor:t.brandPurple,shadowOffset:{width:0,height:1},shadowOpacity:.25,shadowRadius:3,elevation:2},applyBtnText:{fontFamily:I.interBold,fontSize:12.5,color:t.white}});export default Oe;