react-native-inapp-inspector 2.4.1 → 2.5.0

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 (295) hide show
  1. package/README.ar.md +163 -0
  2. package/README.de.md +163 -0
  3. package/README.es.md +164 -0
  4. package/README.fr.md +163 -0
  5. package/README.hi.md +163 -0
  6. package/README.ja.md +180 -0
  7. package/README.ko.md +163 -0
  8. package/README.md +340 -243
  9. package/README.pt-BR.md +163 -0
  10. package/README.ru.md +163 -0
  11. package/README.zh-CN.md +387 -0
  12. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +605 -23
  13. package/assets/banner_dark.svg +186 -0
  14. package/assets/banner_light.svg +186 -0
  15. package/assets/icon_circle.svg +148 -0
  16. package/assets/icon_square.svg +369 -0
  17. package/assets/inapp_inspector_icon.gif +0 -0
  18. package/assets/inapp_inspector_icon_original.gif +0 -0
  19. package/assets/social_preview.png +0 -0
  20. package/assets/walkthrough.gif +0 -0
  21. package/dist/commonjs/capture.d.ts +2 -0
  22. package/dist/commonjs/capture.js +1 -1
  23. package/dist/commonjs/components/AnalyticsDetail.js +23 -23
  24. package/dist/commonjs/components/AnalyticsEventCard.js +1 -1
  25. package/dist/commonjs/components/AnalyticsGraph.js +44 -44
  26. package/dist/commonjs/components/AnimatedBrandOwl.d.ts +7 -0
  27. package/dist/commonjs/components/AnimatedBrandOwl.js +175 -0
  28. package/dist/commonjs/components/AppHeaderLogo.d.ts +1 -0
  29. package/dist/commonjs/components/AppHeaderLogo.js +5 -3
  30. package/dist/commonjs/components/BrandCircleIcon.js +28 -28
  31. package/dist/commonjs/components/BrandSquareIcon.d.ts +5 -0
  32. package/dist/commonjs/components/BrandSquareIcon.js +139 -0
  33. package/dist/commonjs/components/ConsoleLogCard.d.ts +2 -1
  34. package/dist/commonjs/components/ConsoleLogCard.js +23 -39
  35. package/dist/commonjs/components/Inspector/AboutModal.js +44 -54
  36. package/dist/commonjs/components/Inspector/AnalyticsTab.js +6 -6
  37. package/dist/commonjs/components/Inspector/ConfirmationModal.d.ts +13 -0
  38. package/dist/commonjs/components/Inspector/ConfirmationModal.js +30 -0
  39. package/dist/commonjs/components/Inspector/ConsoleTab.js +12 -12
  40. package/dist/commonjs/components/Inspector/CrashTab.js +44 -9
  41. package/dist/commonjs/components/Inspector/DebuggingTab.js +17 -17
  42. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +1 -1
  43. package/dist/commonjs/components/Inspector/FabLauncher.js +30 -33
  44. package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +2 -2
  45. package/dist/commonjs/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
  46. package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +54 -0
  47. package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
  48. package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.js +234 -0
  49. package/dist/commonjs/components/Inspector/InspectorHeader.js +137 -127
  50. package/dist/commonjs/components/Inspector/LanguageSelectorModal.d.ts +15 -0
  51. package/dist/commonjs/components/Inspector/LanguageSelectorModal.js +172 -0
  52. package/dist/commonjs/components/Inspector/MainScreen.js +55 -35
  53. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +40 -35
  54. package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +36 -0
  55. package/dist/commonjs/components/Inspector/MediaPreviewModal.js +341 -135
  56. package/dist/commonjs/components/Inspector/NetworkTab.js +50 -50
  57. package/dist/commonjs/components/Inspector/NpmUpdateToast.js +1 -1
  58. package/dist/commonjs/components/Inspector/PushCard.d.ts +3 -2
  59. package/dist/commonjs/components/Inspector/PushCard.js +5 -4
  60. package/dist/commonjs/components/Inspector/PushDetail.js +41 -32
  61. package/dist/commonjs/components/Inspector/PushTab.js +12 -12
  62. package/dist/commonjs/components/Inspector/ReduxDetail.js +32 -32
  63. package/dist/commonjs/components/Inspector/ReduxTab.js +10 -8
  64. package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
  65. package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +43 -0
  66. package/dist/commonjs/components/Inspector/SettingsPanel.js +287 -139
  67. package/dist/commonjs/components/Inspector/SocketCard.d.ts +5 -0
  68. package/dist/commonjs/components/Inspector/SocketCard.js +116 -0
  69. package/dist/commonjs/components/Inspector/SocketDetail.d.ts +4 -0
  70. package/dist/commonjs/components/Inspector/SocketDetail.js +327 -0
  71. package/dist/commonjs/components/Inspector/SocketFilterModal.d.ts +13 -0
  72. package/dist/commonjs/components/Inspector/SocketFilterModal.js +69 -0
  73. package/dist/commonjs/components/Inspector/SocketTab.d.ts +3 -0
  74. package/dist/commonjs/components/Inspector/SocketTab.js +112 -0
  75. package/dist/commonjs/components/Inspector/StorageTab.js +39 -37
  76. package/dist/commonjs/components/Inspector/SupportModal.d.ts +7 -0
  77. package/dist/commonjs/components/Inspector/SupportModal.js +125 -0
  78. package/dist/commonjs/components/Inspector/SupportPage.d.ts +5 -0
  79. package/dist/commonjs/components/Inspector/SupportPage.js +227 -0
  80. package/dist/commonjs/components/Inspector/TabBar.js +24 -23
  81. package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +24 -24
  82. package/dist/commonjs/components/JsonViewer.js +50 -48
  83. package/dist/commonjs/components/LogCard.d.ts +3 -2
  84. package/dist/commonjs/components/LogCard.js +27 -25
  85. package/dist/commonjs/components/LogSyntaxHighlighter.js +5 -5
  86. package/dist/commonjs/components/ModuleErrorBoundary.js +5 -5
  87. package/dist/commonjs/components/NetworkIcons.d.ts +42 -0
  88. package/dist/commonjs/components/NetworkIcons.js +139 -6
  89. package/dist/commonjs/components/SegmentedTabs.js +1 -1
  90. package/dist/commonjs/constants/version.d.ts +1 -1
  91. package/dist/commonjs/constants/version.js +1 -1
  92. package/dist/commonjs/crash.d.ts +1 -1
  93. package/dist/commonjs/crash.js +1 -1
  94. package/dist/commonjs/customHooks/crashHandler.d.ts +2 -1
  95. package/dist/commonjs/customHooks/crashHandler.js +7 -7
  96. package/dist/commonjs/customHooks/socketLogger.d.ts +26 -0
  97. package/dist/commonjs/customHooks/socketLogger.js +2 -0
  98. package/dist/commonjs/editor.d.ts +13 -0
  99. package/dist/commonjs/editor.js +1 -0
  100. package/dist/commonjs/helpers/index.d.ts +1 -0
  101. package/dist/commonjs/helpers/index.js +3 -3
  102. package/dist/commonjs/helpers/memoryManager.d.ts +1 -0
  103. package/dist/commonjs/helpers/memoryManager.js +1 -1
  104. package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -1
  105. package/dist/commonjs/helpers/searchQueryParser.js +5 -1
  106. package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
  107. package/dist/commonjs/helpers/settingsStore.js +1 -1
  108. package/dist/commonjs/helpers/shareFormatter.d.ts +3 -1
  109. package/dist/commonjs/helpers/shareFormatter.js +8 -7
  110. package/dist/commonjs/helpers/telemetry.js +1 -1
  111. package/dist/commonjs/i18n/index.d.ts +99 -1
  112. package/dist/commonjs/i18n/index.js +1 -1
  113. package/dist/commonjs/i18n/locales/ar.json +1 -1
  114. package/dist/commonjs/i18n/locales/bn.json +1 -0
  115. package/dist/commonjs/i18n/locales/de.json +1 -1
  116. package/dist/commonjs/i18n/locales/en.json +1 -1
  117. package/dist/commonjs/i18n/locales/es.json +1 -1
  118. package/dist/commonjs/i18n/locales/fr.json +1 -1
  119. package/dist/commonjs/i18n/locales/gu.json +1 -0
  120. package/dist/commonjs/i18n/locales/hi.json +1 -1
  121. package/dist/commonjs/i18n/locales/id.json +1 -0
  122. package/dist/commonjs/i18n/locales/it.json +1 -0
  123. package/dist/commonjs/i18n/locales/ja.json +1 -1
  124. package/dist/commonjs/i18n/locales/kn.json +1 -0
  125. package/dist/commonjs/i18n/locales/ko.json +1 -1
  126. package/dist/commonjs/i18n/locales/ml.json +1 -0
  127. package/dist/commonjs/i18n/locales/mr.json +1 -0
  128. package/dist/commonjs/i18n/locales/nl.json +1 -0
  129. package/dist/commonjs/i18n/locales/pa.json +1 -0
  130. package/dist/commonjs/i18n/locales/pl.json +1 -0
  131. package/dist/commonjs/i18n/locales/pt.json +1 -1
  132. package/dist/commonjs/i18n/locales/ru.json +1 -1
  133. package/dist/commonjs/i18n/locales/ta.json +1 -0
  134. package/dist/commonjs/i18n/locales/te.json +1 -0
  135. package/dist/commonjs/i18n/locales/tr.json +1 -0
  136. package/dist/commonjs/i18n/locales/vi.json +1 -0
  137. package/dist/commonjs/i18n/locales/zh.json +1 -1
  138. package/dist/commonjs/index.d.ts +16 -13
  139. package/dist/commonjs/index.js +5 -4
  140. package/dist/commonjs/native/NativeInspector.d.ts +4 -0
  141. package/dist/commonjs/native/NativeInspector.js +1 -1
  142. package/dist/commonjs/native/NativeNetworkInspector.d.ts +4 -0
  143. package/dist/commonjs/socket.d.ts +4 -0
  144. package/dist/commonjs/socket.js +1 -0
  145. package/dist/commonjs/styles/AppColors.d.ts +42 -2
  146. package/dist/commonjs/styles/AppColors.js +1 -1
  147. package/dist/commonjs/styles/common.js +1 -1
  148. package/dist/commonjs/styles/index.d.ts +30 -0
  149. package/dist/commonjs/styles/index.js +1 -1
  150. package/dist/commonjs/types/editor.d.ts +96 -0
  151. package/dist/commonjs/types/editor.js +1 -0
  152. package/dist/commonjs/types/enums.d.ts +40 -0
  153. package/dist/commonjs/types/enums.js +1 -1
  154. package/dist/commonjs/types/interfaces.d.ts +143 -1
  155. package/dist/esm/capture.d.ts +2 -0
  156. package/dist/esm/capture.js +1 -1
  157. package/dist/esm/components/AnalyticsDetail.js +31 -31
  158. package/dist/esm/components/AnalyticsEventCard.js +1 -1
  159. package/dist/esm/components/AnalyticsGraph.js +74 -74
  160. package/dist/esm/components/AnimatedBrandOwl.d.ts +7 -0
  161. package/dist/esm/components/AnimatedBrandOwl.js +175 -0
  162. package/dist/esm/components/AppHeaderLogo.d.ts +1 -0
  163. package/dist/esm/components/AppHeaderLogo.js +7 -5
  164. package/dist/esm/components/BrandCircleIcon.js +70 -70
  165. package/dist/esm/components/BrandSquareIcon.d.ts +5 -0
  166. package/dist/esm/components/BrandSquareIcon.js +139 -0
  167. package/dist/esm/components/ConsoleLogCard.d.ts +2 -1
  168. package/dist/esm/components/ConsoleLogCard.js +61 -77
  169. package/dist/esm/components/Inspector/AboutModal.js +85 -95
  170. package/dist/esm/components/Inspector/AnalyticsTab.js +24 -24
  171. package/dist/esm/components/Inspector/ConfirmationModal.d.ts +13 -0
  172. package/dist/esm/components/Inspector/ConfirmationModal.js +30 -0
  173. package/dist/esm/components/Inspector/ConsoleTab.js +48 -48
  174. package/dist/esm/components/Inspector/CrashTab.js +203 -168
  175. package/dist/esm/components/Inspector/DebuggingTab.js +29 -29
  176. package/dist/esm/components/Inspector/DeviceInfoTab.js +75 -75
  177. package/dist/esm/components/Inspector/FabLauncher.js +57 -60
  178. package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +7 -7
  179. package/dist/esm/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
  180. package/dist/esm/components/Inspector/FloatingCaptureWidget.js +54 -0
  181. package/dist/esm/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
  182. package/dist/esm/components/Inspector/GlobalCrashScreenModal.js +234 -0
  183. package/dist/esm/components/Inspector/InspectorHeader.js +162 -152
  184. package/dist/esm/components/Inspector/LanguageSelectorModal.d.ts +15 -0
  185. package/dist/esm/components/Inspector/LanguageSelectorModal.js +172 -0
  186. package/dist/esm/components/Inspector/MainScreen.js +130 -110
  187. package/dist/esm/components/Inspector/MediaGalleryTab.js +83 -78
  188. package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +36 -0
  189. package/dist/esm/components/Inspector/MediaPreviewModal.js +345 -139
  190. package/dist/esm/components/Inspector/NetworkTab.js +130 -130
  191. package/dist/esm/components/Inspector/NpmUpdateToast.js +1 -1
  192. package/dist/esm/components/Inspector/PushCard.d.ts +3 -2
  193. package/dist/esm/components/Inspector/PushCard.js +23 -22
  194. package/dist/esm/components/Inspector/PushDetail.js +45 -36
  195. package/dist/esm/components/Inspector/PushTab.js +23 -23
  196. package/dist/esm/components/Inspector/ReduxDetail.js +42 -42
  197. package/dist/esm/components/Inspector/ReduxTab.js +20 -18
  198. package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
  199. package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +43 -0
  200. package/dist/esm/components/Inspector/SettingsPanel.js +526 -378
  201. package/dist/esm/components/Inspector/SocketCard.d.ts +5 -0
  202. package/dist/esm/components/Inspector/SocketCard.js +116 -0
  203. package/dist/esm/components/Inspector/SocketDetail.d.ts +4 -0
  204. package/dist/esm/components/Inspector/SocketDetail.js +327 -0
  205. package/dist/esm/components/Inspector/SocketFilterModal.d.ts +13 -0
  206. package/dist/esm/components/Inspector/SocketFilterModal.js +69 -0
  207. package/dist/esm/components/Inspector/SocketTab.d.ts +3 -0
  208. package/dist/esm/components/Inspector/SocketTab.js +112 -0
  209. package/dist/esm/components/Inspector/StorageTab.js +139 -137
  210. package/dist/esm/components/Inspector/SupportModal.d.ts +7 -0
  211. package/dist/esm/components/Inspector/SupportModal.js +125 -0
  212. package/dist/esm/components/Inspector/SupportPage.d.ts +5 -0
  213. package/dist/esm/components/Inspector/SupportPage.js +227 -0
  214. package/dist/esm/components/Inspector/TabBar.js +36 -35
  215. package/dist/esm/components/Inspector/UpdateAvailableModal.js +22 -22
  216. package/dist/esm/components/JsonViewer.js +66 -64
  217. package/dist/esm/components/LogCard.d.ts +3 -2
  218. package/dist/esm/components/LogCard.js +57 -55
  219. package/dist/esm/components/LogSyntaxHighlighter.js +5 -5
  220. package/dist/esm/components/ModuleErrorBoundary.js +23 -23
  221. package/dist/esm/components/NetworkIcons.d.ts +42 -0
  222. package/dist/esm/components/NetworkIcons.js +139 -6
  223. package/dist/esm/components/SegmentedTabs.js +7 -7
  224. package/dist/esm/constants/version.d.ts +1 -1
  225. package/dist/esm/constants/version.js +1 -1
  226. package/dist/esm/crash.d.ts +1 -1
  227. package/dist/esm/crash.js +1 -1
  228. package/dist/esm/customHooks/crashHandler.d.ts +2 -1
  229. package/dist/esm/customHooks/crashHandler.js +7 -7
  230. package/dist/esm/customHooks/socketLogger.d.ts +26 -0
  231. package/dist/esm/customHooks/socketLogger.js +2 -0
  232. package/dist/esm/editor.d.ts +13 -0
  233. package/dist/esm/editor.js +1 -0
  234. package/dist/esm/helpers/index.d.ts +1 -0
  235. package/dist/esm/helpers/index.js +4 -4
  236. package/dist/esm/helpers/memoryManager.d.ts +1 -0
  237. package/dist/esm/helpers/memoryManager.js +1 -1
  238. package/dist/esm/helpers/searchQueryParser.d.ts +1 -1
  239. package/dist/esm/helpers/searchQueryParser.js +5 -1
  240. package/dist/esm/helpers/settingsStore.d.ts +1 -0
  241. package/dist/esm/helpers/settingsStore.js +1 -1
  242. package/dist/esm/helpers/shareFormatter.d.ts +3 -1
  243. package/dist/esm/helpers/shareFormatter.js +8 -7
  244. package/dist/esm/helpers/telemetry.js +1 -1
  245. package/dist/esm/i18n/index.d.ts +99 -1
  246. package/dist/esm/i18n/index.js +1 -1
  247. package/dist/esm/i18n/locales/ar.json +1 -1
  248. package/dist/esm/i18n/locales/bn.json +1 -0
  249. package/dist/esm/i18n/locales/de.json +1 -1
  250. package/dist/esm/i18n/locales/en.json +1 -1
  251. package/dist/esm/i18n/locales/es.json +1 -1
  252. package/dist/esm/i18n/locales/fr.json +1 -1
  253. package/dist/esm/i18n/locales/gu.json +1 -0
  254. package/dist/esm/i18n/locales/hi.json +1 -1
  255. package/dist/esm/i18n/locales/id.json +1 -0
  256. package/dist/esm/i18n/locales/it.json +1 -0
  257. package/dist/esm/i18n/locales/ja.json +1 -1
  258. package/dist/esm/i18n/locales/kn.json +1 -0
  259. package/dist/esm/i18n/locales/ko.json +1 -1
  260. package/dist/esm/i18n/locales/ml.json +1 -0
  261. package/dist/esm/i18n/locales/mr.json +1 -0
  262. package/dist/esm/i18n/locales/nl.json +1 -0
  263. package/dist/esm/i18n/locales/pa.json +1 -0
  264. package/dist/esm/i18n/locales/pl.json +1 -0
  265. package/dist/esm/i18n/locales/pt.json +1 -1
  266. package/dist/esm/i18n/locales/ru.json +1 -1
  267. package/dist/esm/i18n/locales/ta.json +1 -0
  268. package/dist/esm/i18n/locales/te.json +1 -0
  269. package/dist/esm/i18n/locales/tr.json +1 -0
  270. package/dist/esm/i18n/locales/vi.json +1 -0
  271. package/dist/esm/i18n/locales/zh.json +1 -1
  272. package/dist/esm/index.d.ts +16 -13
  273. package/dist/esm/index.js +8 -7
  274. package/dist/esm/native/NativeInspector.d.ts +4 -0
  275. package/dist/esm/native/NativeInspector.js +1 -1
  276. package/dist/esm/native/NativeNetworkInspector.d.ts +4 -0
  277. package/dist/esm/socket.d.ts +4 -0
  278. package/dist/esm/socket.js +1 -0
  279. package/dist/esm/styles/AppColors.d.ts +42 -2
  280. package/dist/esm/styles/AppColors.js +1 -1
  281. package/dist/esm/styles/common.js +1 -1
  282. package/dist/esm/styles/index.d.ts +30 -0
  283. package/dist/esm/styles/index.js +1 -1
  284. package/dist/esm/types/editor.d.ts +96 -0
  285. package/dist/esm/types/editor.js +1 -0
  286. package/dist/esm/types/enums.d.ts +40 -0
  287. package/dist/esm/types/enums.js +1 -1
  288. package/dist/esm/types/interfaces.d.ts +143 -1
  289. package/editor.d.ts +1 -0
  290. package/editor.js +1 -0
  291. package/ios/NetworkInspectorModule.mm +531 -12
  292. package/package.json +213 -2
  293. package/react-native-inapp-inspector.podspec +1 -1
  294. package/src/native/NativeInspector.ts +65 -4
  295. package/src/native/NativeNetworkInspector.ts +4 -0
@@ -1,40 +1,40 @@
1
- import X,{useCallback as F,useState as Y,useMemo as Z,useRef as Fe}from"react";import{FlatList as Pe,Platform as Re,Pressable as Ve,ScrollView as Be,Text as N,TextInput as Me,TouchableOpacity as Ce,View as C}from"react-native";import{animateNextLayout as _e,useInspector as Ne}from"./InspectorContext";import Oe from"../AnalyticsEventCard";import $e from"./AnalyticsFilterModal";import De from"../EndOfListFooter";import He from"../EmptyState";import I from"../../styles";import{AppColors as r}from"../../styles/AppColors";import{AppFonts as O}from"../../styles/AppFonts";import{useTranslation as We}from"../../i18n";import Ge from"../TouchableScale";import{getEventCategory as je}from"../../helpers";import{LayersIcon as Je,SearchIcon as Qe,ClearIcon as Ke,TrashIcon as Ue,FilterIcon as Xe,CartIcon as Ye,GlobeIcon as Ze,BoltIcon as et,SparkleIcon as tt}from"../NetworkIcons";const Se=10,ot=X.memo(()=>{const{t:$}=We(),{analyticsEvents:D,filteredAnalyticsEvents:a,analyticsSearch:S,setAnalyticsSearch:P,analyticsFilters:A,setAnalyticsFilters:H,handleDelete:we,selectedEvent:Ie,setSelectedEvent:W,newEventIds:G,logRouteMapRef:j,isAnalyticsLayoutReady:Te,setIsAnalyticsLayoutReady:ve,isAnalyticsFilterApplied:R,maxAnalyticsEventsLimit:V}=Ne(),xe=V||100,J=Fe(null),[Le,Q]=Y(!1),[q,K]=Y(xe);X.useEffect(()=>{K(V||100),J.current?.scrollToOffset({offset:0,animated:!1})},[S,A,V]);const B=Z(()=>a.slice(0,q),[a,q]),v=Z(()=>{let e=0,o=0,t=0,w=0;for(const E of D){const k=je(E.name),T=E.count||1;k==="ecommerce"?e+=T:k==="page_view"?o+=T:k==="system"?t+=T:w+=T}const L=e+o+t+w;return{ecommerce:e,page_view:o,system:t,custom:w,totalCount:L}},[D]),ke=F(e=>{_e(),H(o=>{if(e==="all")return{...o,categories:new Set(["all"])};const t=new Set(o.categories);if(t.has("all"))t.delete("all"),t.add(e);else if(t.has(e))t.delete(e),t.size===0&&t.add("all");else if(t.add(e),t.has("ecommerce")&&t.has("page_view")&&t.has("system")&&t.has("custom"))return{...o,categories:new Set(["all"])};return{...o,categories:t}})},[H]),Ae=F((e,o)=>e?.id?.toString()??o.toString(),[]),Ee=F(({item:e,index:o})=>{const t=a[o+1],w=a[o-1],L=t?e.timestamp-t.timestamp:void 0,E=Math.floor(e.timestamp/6e4),k=w?Math.floor(w.timestamp/6e4):-1,T=o===0||E!==k;return<Oe event={e}onPress={()=>{W(e)}}isNew={G.has(e.id)}searchStr={S}isFirst={o===0}isLast={o===a.length-1}msSincePrev={L}showTimestamp={T}computedScreenName={(()=>{if(!e)return"";const z=e.screenName||e.screenClass||e.pageTitle||e.pageLocation||e.params?.firebase_screen||e.params?.screen_name||e.params?.firebase_screen_class||e.params?.screen_class;let M=typeof z=="string"?z:z?JSON.stringify(z):"";const _=j.current.get(e.id+1e6);if(!M&&_&&_.path!=="Navigators"){const U=_.path.split(" \u2794 ");M=U[U.length-1]}return M})()}/>},[a,S,G,W,j]),ze=F((e,o)=>({length:86,offset:86*o,index:o}),[]);return<>
1
+ import X,{useCallback as F,useState as Y,useMemo as Z,useRef as Fe}from"react";import{FlatList as Pe,Pressable as Re,ScrollView as Ve,Text as N,TextInput as Be,TouchableOpacity as Ce,View as C}from"react-native";import{animateNextLayout as Me,useInspector as _e}from"./InspectorContext";import Ne from"../AnalyticsEventCard";import Oe from"./AnalyticsFilterModal";import $e from"../EndOfListFooter";import De from"../EmptyState";import T from"../../styles";import{AppColors as r}from"../../styles/AppColors";import{AppFonts as O}from"../../styles/AppFonts";import{useTranslation as He}from"../../i18n";import We from"../TouchableScale";import{getEventCategory as Ge}from"../../helpers";import{LayersIcon as je,SearchIcon as Je,ClearIcon as Qe,TrashIcon as Ke,FilterIcon as Ue,CartIcon as Xe,GlobeIcon as Ye,BoltIcon as Ze,SparkleIcon as et}from"../NetworkIcons";const Se=10,tt=X.memo(()=>{const{t:$}=He(),{analyticsEvents:D,filteredAnalyticsEvents:S,analyticsSearch:w,setAnalyticsSearch:P,analyticsFilters:A,setAnalyticsFilters:H,handleDelete:we,selectedEvent:Ie,setSelectedEvent:W,newEventIds:G,logRouteMapRef:j,isAnalyticsLayoutReady:Te,setIsAnalyticsLayoutReady:ve,isAnalyticsFilterApplied:R,maxAnalyticsEventsLimit:V}=_e(),xe=V||100,J=Fe(null),[Le,Q]=Y(!1),[q,K]=Y(xe);X.useEffect(()=>{K(V||100),J.current?.scrollToOffset({offset:0,animated:!1})},[w,A,V]);const B=Z(()=>S.slice(0,q),[S,q]),x=Z(()=>{let e=0,o=0,t=0,I=0;for(const E of D){const k=Ge(E.name),v=E.count||1;k==="ecommerce"?e+=v:k==="page_view"?o+=v:k==="system"?t+=v:I+=v}const L=e+o+t+I;return{ecommerce:e,page_view:o,system:t,custom:I,totalCount:L}},[D]),ke=F(e=>{Me(),H(o=>{if(e==="all")return{...o,categories:new Set(["all"])};const t=new Set(o.categories);if(t.has("all"))t.delete("all"),t.add(e);else if(t.has(e))t.delete(e),t.size===0&&t.add("all");else if(t.add(e),t.has("ecommerce")&&t.has("page_view")&&t.has("system")&&t.has("custom"))return{...o,categories:new Set(["all"])};return{...o,categories:t}})},[H]),Ae=F((e,o)=>e?.id?.toString()??o.toString(),[]),Ee=F(({item:e,index:o})=>{const t=S[o+1],I=S[o-1],L=t?e.timestamp-t.timestamp:void 0,E=Math.floor(e.timestamp/6e4),k=I?Math.floor(I.timestamp/6e4):-1,v=o===0||E!==k;return<Ne event={e}onPress={()=>{W(e)}}isNew={G.has(e.id)}searchStr={w}isFirst={o===0}isLast={o===S.length-1}msSincePrev={L}showTimestamp={v}computedScreenName={(()=>{if(!e)return"";const z=e.screenName||e.screenClass||e.pageTitle||e.pageLocation||e.params?.firebase_screen||e.params?.screen_name||e.params?.firebase_screen_class||e.params?.screen_class;let M=typeof z=="string"?z:z?JSON.stringify(z):"";const _=j.current.get(e.id+1e6);if(!M&&_&&_.path!=="Navigators"){const U=_.path.split(" \u2794 ");M=U[U.length-1]}return M})()}/>},[S,w,G,W,j]),ze=F((e,o)=>({length:86,offset:86*o,index:o}),[]);return<>
2
2
 
3
3
  {Ie==null&&<C style={{backgroundColor:r.white,borderBottomWidth:1,borderBottomColor:r.dividerColor,paddingBottom:6}}>
4
- <C style={[I.toolbarRow,{marginTop:12,marginBottom:8}]}>
5
- <C style={I.searchContainer}>
6
- <Qe color={r.grayTextWeak}size={16}/>
7
- <Me placeholder={$("analytics.searchPlaceholder","Search events...")}placeholderTextColor={r.grayTextWeak}value={S}onChangeText={P}style={I.searchInput}autoCorrect={!1}autoCapitalize="none"/>
8
- {S.length>0&&<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
4
+ <C style={[T.toolbarRow,{marginTop:12,marginBottom:8}]}>
5
+ <C style={T.searchContainer}>
6
+ <Je color={r.grayTextWeak}size={16}/>
7
+ <Be placeholder={$("analytics.searchPlaceholder","Search events...")}placeholderTextColor={r.grayTextWeak}value={w}onChangeText={P}style={T.searchInput}autoCorrect={!1}autoCapitalize="none"/>
8
+ {w.length>0&&<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
9
9
  <C style={{backgroundColor:`${r.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
10
10
  <N style={{color:r.purple,fontSize:9.5,fontFamily:O.interBold}}>
11
- {a.length}
11
+ {S.length}
12
12
  </N>
13
13
  </C>
14
- <Ve onPress={()=>P("")}hitSlop={10}style={I.clearBtn}>
15
- <Ke color={r.grayTextWeak}size={13}/>
16
- </Ve>
14
+ <Re onPress={()=>P("")}hitSlop={10}style={T.clearBtn}>
15
+ <Qe color={r.grayTextWeak}size={13}/>
16
+ </Re>
17
17
  </C>}
18
18
  </C>
19
- <C style={I.toolbarRight}>
19
+ <C style={T.toolbarRight}>
20
20
 
21
- <Ce style={[I.toolbarBtn,R&&{borderColor:`${r.brandPurple}60`,backgroundColor:`${r.brandPurple}15`}]}onPress={()=>Q(!0)}hitSlop={6}>
22
- <Xe color={R?r.brandPurple:r.grayTextStrong}size={15}/>
21
+ <Ce style={[T.toolbarBtn,R&&{borderColor:`${r.brandPurple}60`,backgroundColor:`${r.brandPurple}15`}]}onPress={()=>Q(!0)}hitSlop={6}>
22
+ <Ue color={R?r.brandPurple:r.grayTextStrong}size={15}/>
23
23
  {R&&<C style={{position:"absolute",top:2,right:2,width:7,height:7,borderRadius:3.5,backgroundColor:r.darkOrange,borderWidth:1,borderColor:r.white}}/>}
24
24
  </Ce>
25
25
 
26
- <Ce style={[I.toolbarBtn,{borderColor:`${r.errorColor}38`,backgroundColor:`${r.errorColor}0F`}]}onPress={we}hitSlop={6}>
27
- <Ue color={r.errorColor}size={15}/>
26
+ <Ce style={[T.toolbarBtn,{borderColor:`${r.errorColor}38`,backgroundColor:`${r.errorColor}0F`}]}onPress={we}hitSlop={6}>
27
+ <Ke color={r.errorColor}size={15}/>
28
28
  </Ce>
29
29
  </C>
30
30
  </C>
31
31
 
32
32
 
33
- <C style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
34
- <Be horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
35
- {[{id:"all",label:$("common.all","All"),count:v.totalCount,color:r.purple,Icon:Je},{id:"ecommerce",label:"Ecommerce",count:v.ecommerce,color:r.amber600,Icon:Ye},{id:"page_view",label:"Screens",count:v.page_view,color:r.sky600,Icon:Ze},{id:"system",label:"System",count:v.system,color:r.violet600,Icon:et},{id:"custom",label:"Custom",count:v.custom,color:r.teal600,Icon:tt}].map(e=>{const o=e.id==="all"?A.categories.has("all"):!A.categories.has("all")&&A.categories.has(e.id),t=e.color||r.purple,w=o?r.white:t,L=e.Icon;return<Ge key={e.id}onPress={()=>ke(e.id)}>
33
+ <C style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:8,gap:6}}>
34
+ <Ve horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
35
+ {[{id:"all",label:$("common.all","All"),count:x.totalCount,color:r.purple,Icon:je},{id:"ecommerce",label:"Ecommerce",count:x.ecommerce,color:r.amber600,Icon:Xe},{id:"page_view",label:"Screens",count:x.page_view,color:r.sky600,Icon:Ye},{id:"system",label:"System",count:x.system,color:r.violet600,Icon:Ze},{id:"custom",label:"Custom",count:x.custom,color:r.teal600,Icon:et}].map(e=>{const o=e.id==="all"?A.categories.has("all"):!A.categories.has("all")&&A.categories.has(e.id),t=e.color||r.purple,I=o?r.white:t,L=e.Icon;return<We key={e.id}onPress={()=>ke(e.id)}>
36
36
  <C style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:o?t:`${t}12`,borderWidth:1,borderColor:o?t:`${t}30`,gap:5}}>
37
- <L size={11}color={w}/>
37
+ <L size={11}color={I}/>
38
38
  <N style={{fontFamily:O.interBold,fontSize:10.5,color:o?r.white:r.primaryBlack}}>
39
39
  {e.label}
40
40
  </N>
@@ -44,17 +44,17 @@ import X,{useCallback as F,useState as Y,useMemo as Z,useRef as Fe}from"react";i
44
44
  </N>
45
45
  </C>
46
46
  </C>
47
- </Ge>})}
48
- </Be>
47
+ </We>})}
48
+ </Ve>
49
49
  </C>
50
50
  </C>}
51
51
 
52
52
 
53
- <$e visible={Le}onClose={()=>Q(!1)}/>
53
+ <Oe visible={Le}onClose={()=>Q(!1)}/>
54
54
 
55
55
  <C style={{flex:1}}onLayout={()=>ve(!0)}>
56
56
  {Te?<>
57
- <Pe ref={J}data={B}keyExtractor={Ae}renderItem={Ee}getItemLayout={ze}initialNumToRender={15}maxToRenderPerBatch={10}windowSize={9}removeClippedSubviews={Re.OS==="android"}renderToHardwareTextureAndroid={!0}ListEmptyComponent={<He isSearch={S.length>0}searchQuery={S}customTitle={S.length>0?"No matching analytics events":"No analytics events yet"}customSub={S.length>0?`No events matched "${S}"`:"Call setupAnalyticsLogger(analytics()) at app start."}onClearSearch={()=>P("")}/>}ListFooterComponent={a.length>0?<De count={B.length}totalCount={a.length}label="events"loadMoreStep={Se}hasMore={B.length<a.length}onLoadMore={()=>K(e=>e+Se)}/>:null}contentContainerStyle={[I.listContent,a.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
57
+ <Pe ref={J}data={B}keyExtractor={Ae}renderItem={Ee}getItemLayout={ze}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}showsVerticalScrollIndicator={!1}nestedScrollEnabled={!0}ListEmptyComponent={<De isSearch={w.length>0}searchQuery={w}customTitle={w.length>0?"No matching analytics events":"No analytics events yet"}customSub={w.length>0?`No events matched "${w}"`:"Call setupAnalyticsLogger(analytics()) at app start."}onClearSearch={()=>P("")}/>}ListFooterComponent={S.length>0?<$e count={B.length}totalCount={S.length}label="events"loadMoreStep={Se}hasMore={B.length<S.length}onLoadMore={()=>K(e=>e+Se)}/>:null}style={{flex:1}}contentContainerStyle={[T.listContent,{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
58
58
  </>:null}
59
59
  </C>
60
- </>});export default ot;
60
+ </>});export default tt;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ export interface ConfirmationModalProps {
3
+ visible: boolean;
4
+ title: string;
5
+ message: string;
6
+ confirmText?: string;
7
+ cancelText?: string;
8
+ isDestructive?: boolean;
9
+ icon?: 'trash' | 'alert' | 'reset' | 'info';
10
+ onConfirm: () => void;
11
+ onCancel: () => void;
12
+ }
13
+ export declare const ConfirmationModal: React.FC<ConfirmationModalProps>;
@@ -0,0 +1,30 @@
1
+ import"react";import{View as C,Text as B,StyleSheet as R,Pressable as J,Platform as I}from"react-native";import P from"../TouchableScale";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as x}from"../../styles/AppFonts";import{TrashIcon as K,AlertTriangleIcon as Q,ResetIcon as U,InfoCircleIcon as X,CloseWhite as Y}from"../NetworkIcons";import{triggerNativeHaptic as j}from"../../native/NativeInspector";import{useTranslation as Z}from"../../i18n";export const ConfirmationModal=({visible:A,title:H,message:V,confirmText:$,cancelText:L,isDestructive:o=!0,icon:T="trash",onConfirm:D,onCancel:M})=>{const{t:F}=Z();if(!A)return null;const O=$||F("common.confirm","Confirm"),W=L||F("common.cancel","Cancel"),N=()=>{j(o?"heavy":"medium"),D()},S=()=>{j("light"),M()},q=()=>{switch(T){case"trash":return<K size={24}color={e.red500}/>;case"alert":return<Q size={24}color={e.amber500}/>;case"reset":return<U size={24}color={e.purple}/>;default:return<X size={24}color={e.purple}/>}},E=o?e.red100:T==="alert"?e.amber100:e.purple50,G=o?`${e.red500}4D`:T==="alert"?e.amber200:e.purple200;return<C style={[R.absoluteFill,t.overlay,{zIndex:999999,elevation:999}]}>
2
+ <J style={t.backdrop}onPress={S}/>
3
+
4
+ <C style={t.card}>
5
+
6
+ <P onPress={S}hitSlop={8}style={t.cornerCloseBtn}>
7
+ <Y size={11}color={e.grayTextWeak}/>
8
+ </P>
9
+
10
+
11
+ <C style={[t.iconBadge,{backgroundColor:E,borderColor:G}]}>
12
+ {q()}
13
+ </C>
14
+
15
+
16
+ <B style={t.title}>{H}</B>
17
+ <B style={t.message}>{V}</B>
18
+
19
+
20
+ <C style={t.buttonRow}>
21
+ <P accessible={!0}accessibilityRole="button"accessibilityLabel={W}onPress={S}style={t.cancelBtn}>
22
+ <B style={t.cancelBtnText}>{W}</B>
23
+ </P>
24
+
25
+ <P accessible={!0}accessibilityRole="button"accessibilityLabel={O}onPress={N}style={[t.confirmBtn,o?t.confirmBtnDestructive:t.confirmBtnPrimary]}>
26
+ <B style={t.confirmBtnText}>{O}</B>
27
+ </P>
28
+ </C>
29
+ </C>
30
+ </C>};const t=R.create({overlay:{flex:1,backgroundColor:`${e.slate900}A6`,justifyContent:"center",alignItems:"center",paddingHorizontal:24},backdrop:{...R.absoluteFillObject},card:{width:"100%",maxWidth:340,backgroundColor:e.white,borderRadius:22,paddingTop:24,paddingBottom:18,paddingHorizontal:20,alignItems:"center",borderWidth:1,borderColor:`${e.white}CC`,...I.select({ios:{shadowColor:e.slate900,shadowOffset:{width:0,height:12},shadowOpacity:.28,shadowRadius:24},android:{elevation:12}})},cornerCloseBtn:{position:"absolute",top:14,right:14,width:28,height:28,borderRadius:14,backgroundColor:e.graySurface,alignItems:"center",justifyContent:"center"},iconBadge:{width:54,height:54,borderRadius:27,borderWidth:1.5,alignItems:"center",justifyContent:"center",marginBottom:14},title:{fontFamily:x.interBold,fontSize:17,color:e.slate900,textAlign:"center",marginBottom:8,letterSpacing:-.2},message:{fontFamily:x.interRegular,fontSize:13,color:e.grayTextWeak,textAlign:"center",lineHeight:19,paddingHorizontal:8,marginBottom:22},buttonRow:{flexDirection:"row",alignItems:"center",gap:10,width:"100%"},cancelBtn:{flex:1,height:44,borderRadius:12,backgroundColor:e.graySurface,borderWidth:1,borderColor:e.grayBorderSecondary,alignItems:"center",justifyContent:"center"},cancelBtnText:{fontFamily:x.interSemiBold,fontSize:14,color:e.grayText},confirmBtn:{flex:1.15,height:44,borderRadius:12,alignItems:"center",justifyContent:"center"},confirmBtnDestructive:{backgroundColor:e.red500,...I.select({ios:{shadowColor:e.red500,shadowOffset:{width:0,height:4},shadowOpacity:.35,shadowRadius:8},android:{elevation:4}})},confirmBtnPrimary:{backgroundColor:e.purple,...I.select({ios:{shadowColor:e.purple,shadowOffset:{width:0,height:4},shadowOpacity:.35,shadowRadius:8},android:{elevation:4}})},confirmBtnText:{fontFamily:x.interBold,fontSize:14,color:e.white,letterSpacing:.2}});
@@ -1,71 +1,71 @@
1
- import F,{useCallback as $,useMemo as k,useRef as lo}from"react";import{FlatList as So,Platform as ho,Pressable as Co,ScrollView as _,Text as L,TextInput as To,View as S}from"react-native";import{useInspector as Io}from"./InspectorContext";import{useTranslation as xo}from"../../i18n";import H from"../TouchableScale";import Ao from"../AnimatedEntrance";import{ConsoleLogCard as Lo}from"../ConsoleLogCard";import Vo from"../EmptyState";import Eo from"../EndOfListFooter";import I from"../../styles";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as z}from"../../styles/AppFonts";import{LogFilter as V}from"../../types";import{SearchIcon as Bo,ClearIcon as Fo,SortArrowIcon as Ho,TrashIcon as Po,LayersIcon as Ro,UserIcon as Oo,InfoCircleIcon as Wo,WarningTriangleIcon as $o,ErrorCircleIcon as Do,AnalyticsIcon as No}from"../NetworkIcons";const Q=10,Uo=F.memo(()=>{const{t:b}=xo(),{logSearch:h,setLogSearch:E,logSortOrder:Y,setLogSortOrder:K,handleDelete:X,logFilters:C,setLogFilters:P,logCounts:x,filteredConsoleLogs:w,visibleConsoleLogs:D,maxConsoleLogs:R}=Io(),j=R||100,N=lo(null),[U,G]=F.useState(j);F.useEffect(()=>{G(R||100),N.current?.scrollToOffset({offset:0,animated:!1})},[h,C,R]);const O=k(()=>w.slice(0,U),[w,U]),q=$(({item:o,index:t})=><Ao index={t}distance={8}>
2
- <Lo item={o}searchStr={h}/>
3
- </Ao>,[h]),J=$((o,t)=>({length:148,offset:148*t,index:t}),[]),Z=$((o,t)=>o?.id?.toString()??t.toString(),[]),oo=k(()=>{const o=D.length,t=w.length;if(C.has("all")||!Array.from(C).some(B=>B!=="all"))return<S style={{paddingHorizontal:12,paddingTop:8,paddingBottom:3}}>
4
- <L style={{fontFamily:z.interMedium,fontSize:11,color:e.grayTextWeak,letterSpacing:.2}}>
5
- {t===o?`Showing ${o} logs`:`Showing ${t} of ${o} logs`}
6
- </L>
7
- </S>;{const B=Array.from(C).filter(T=>T!=="all").map(T=>T==="user-log"?"Log":T==="analytics"?"Analytics":T.charAt(0).toUpperCase()+T.slice(1));return<S style={{paddingHorizontal:12,paddingTop:8,paddingBottom:3}}>
8
- <L style={{fontFamily:z.interMedium,fontSize:11,color:e.grayTextWeak,letterSpacing:.2}}>
9
- Filtered by {B.join(", ")} ({t} of {o} logs)
10
- </L>
11
- </S>}},[D.length,w.length,C]),[W,M]=F.useState(!1),eo=k(()=>["[AXIOS]","[API]","[GRAPHQL]","[REDUX]","[ANALYTICS]","[AUTH]","[NAV]","[STORAGE]","[PERF]","[WS]","[PUSH]","[PAYMENT]","[SYNC]","[BLE]","[LOCATION]","[TEST]","[DEBUG]"],[]),to=k(()=>[{id:V.All,label:b("common.all","All"),count:x.all?.split("/")?.[0]??"0",color:e.purple,Icon:Ro},{id:V.UserLog,label:b("console.log","Log"),count:x["user-log"]?.split("/")?.[0]??"0",color:e.teal600,Icon:Oo},{id:V.Info,label:b("console.info","Info"),count:x.info?.split("/")?.[0]??"0",color:e.sky600,Icon:Wo},{id:V.Warn,label:b("console.warning","Warn"),count:x.warn?.split("/")?.[0]??"0",color:e.amber600,Icon:$o},{id:V.Error,label:b("console.error","Error"),count:x.error?.split("/")?.[0]??"0",color:e.errorColor,Icon:Do},{id:V.Analytics,label:b("console.analytics","Analytics"),count:x.analytics?.split("/")?.[0]??"0",color:e.violet600,Icon:No}],[x,b]);return<S style={{flex:1}}>
12
- <S style={{backgroundColor:e.white,borderBottomWidth:1,borderBottomColor:e.dividerColor,paddingBottom:6}}>
13
- <S style={[I.toolbarRow,{marginTop:12,marginBottom:8}]}>
14
- <S style={[I.searchContainer,W&&{borderColor:e.purple,borderWidth:1.5}]}>
15
- <Bo color={W?e.purple:e.grayTextWeak}size={16}/>
16
- <To placeholder={b("console.searchPlaceholder")}placeholderTextColor={e.grayTextWeak}value={h}onChangeText={E}onFocus={()=>M(!0)}onBlur={()=>M(!1)}style={I.searchInput}autoCorrect={!1}autoCapitalize="none"/>
17
- {h.length>0&&<S style={{flexDirection:"row",alignItems:"center",gap:4}}>
18
- <S style={{backgroundColor:`${e.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:2}}>
19
- <L style={{color:e.purple,fontSize:10,fontFamily:z.interBold}}>
1
+ import F,{useCallback as k,useMemo as P,useRef as ne}from"react";import{FlatList as Se,Pressable as Ce,ScrollView as Q,Text as A,TextInput as Ie,View as S}from"react-native";import{useInspector as Te}from"./InspectorContext";import{useTranslation as xe}from"../../i18n";import H from"../TouchableScale";import Le from"../AnimatedEntrance";import{ConsoleLogCard as Ae}from"../ConsoleLogCard";import Ve from"../EmptyState";import Ee from"../EndOfListFooter";import T from"../../styles";import{AppColors as o}from"../../styles/AppColors";import{AppFonts as z}from"../../styles/AppFonts";import{LogFilter as V}from"../../types";import{SearchIcon as Be,ClearIcon as Fe,SortArrowIcon as Pe,TrashIcon as He,LayersIcon as Re,UserIcon as We,InfoCircleIcon as $e,WarningTriangleIcon as Oe,ErrorCircleIcon as De,AnalyticsIcon as Ne}from"../NetworkIcons";const Y=10,Ue=F.memo(()=>{const{t:C}=xe(),{logSearch:y,setLogSearch:E,logSortOrder:K,setLogSortOrder:X,handleDelete:j,logFilters:h,setLogFilters:R,logCounts:x,filteredConsoleLogs:w,visibleConsoleLogs:D,maxConsoleLogs:W,setSelectedLog:N}=Te(),q=W||100,U=ne(null),[G,M]=F.useState(q);F.useEffect(()=>{M(W||100),U.current?.scrollToOffset({offset:0,animated:!1})},[y,h,W]);const $=P(()=>w.slice(0,G),[w,G]),v=k(e=>{N(e)},[N]),J=k(({item:e,index:t})=><Le index={t}distance={8}>
2
+ <Ae item={e}searchStr={y}onPress={v}/>
3
+ </Le>,[y,v]),Z=k((e,t)=>({length:148,offset:148*t,index:t}),[]),ee=k((e,t)=>e?.id?.toString()??t.toString(),[]),oe=P(()=>{const e=D.length,t=w.length;if(h.has("all")||!Array.from(h).some(B=>B!=="all"))return<S style={{paddingHorizontal:8,paddingTop:8,paddingBottom:3}}>
4
+ <A style={{fontFamily:z.interMedium,fontSize:11,color:o.grayTextWeak,letterSpacing:.2}}>
5
+ {t===e?`Showing ${e} logs`:`Showing ${t} of ${e} logs`}
6
+ </A>
7
+ </S>;{const B=Array.from(h).filter(I=>I!=="all").map(I=>I==="user-log"?"Log":I==="analytics"?"Analytics":I.charAt(0).toUpperCase()+I.slice(1));return<S style={{paddingHorizontal:12,paddingTop:8,paddingBottom:3}}>
8
+ <A style={{fontFamily:z.interMedium,fontSize:11,color:o.grayTextWeak,letterSpacing:.2}}>
9
+ Filtered by {B.join(", ")} ({t} of {e} logs)
10
+ </A>
11
+ </S>}},[D.length,w.length,h]),[O,_]=F.useState(!1),te=P(()=>["[AXIOS]","[API]","[GRAPHQL]","[REDUX]","[ANALYTICS]","[AUTH]","[NAV]","[STORAGE]","[PERF]","[WS]","[PUSH]","[PAYMENT]","[SYNC]","[BLE]","[LOCATION]","[TEST]","[DEBUG]"],[]),re=P(()=>[{id:V.All,label:C("common.all","All"),count:x.all?.split("/")?.[0]??"0",color:o.purple,Icon:Re},{id:V.UserLog,label:C("console.log","Log"),count:x["user-log"]?.split("/")?.[0]??"0",color:o.teal600,Icon:We},{id:V.Info,label:C("console.info","Info"),count:x.info?.split("/")?.[0]??"0",color:o.sky600,Icon:$e},{id:V.Warn,label:C("console.warning","Warn"),count:x.warn?.split("/")?.[0]??"0",color:o.amber600,Icon:Oe},{id:V.Error,label:C("console.error","Error"),count:x.error?.split("/")?.[0]??"0",color:o.errorColor,Icon:De},{id:V.Analytics,label:C("console.analytics","Analytics"),count:x.analytics?.split("/")?.[0]??"0",color:o.violet600,Icon:Ne}],[x,C]);return<S style={{flex:1}}>
12
+ <S style={{backgroundColor:o.white,borderBottomWidth:1,borderBottomColor:o.dividerColor,paddingBottom:6}}>
13
+ <S style={[T.toolbarRow,{marginTop:12,marginBottom:8}]}>
14
+ <S style={[T.searchContainer,O&&{borderColor:o.purple,borderWidth:1.5}]}>
15
+ <Be color={O?o.purple:o.grayTextWeak}size={16}/>
16
+ <Ie placeholder={C("console.searchPlaceholder")}placeholderTextColor={o.grayTextWeak}value={y}onChangeText={E}onFocus={()=>_(!0)}onBlur={()=>_(!1)}style={T.searchInput}autoCorrect={!1}autoCapitalize="none"/>
17
+ {y.length>0&&<S style={{flexDirection:"row",alignItems:"center",gap:4}}>
18
+ <S style={{backgroundColor:`${o.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:2}}>
19
+ <A style={{color:o.purple,fontSize:10,fontFamily:z.interBold}}>
20
20
  {w.length}
21
- </L>
21
+ </A>
22
22
  </S>
23
- <Co onPress={()=>E("")}hitSlop={10}style={I.clearBtn}>
24
- <Fo color={e.grayTextWeak}size={14}/>
25
- </Co>
23
+ <Ce onPress={()=>E("")}hitSlop={10}style={T.clearBtn}>
24
+ <Fe color={o.grayTextWeak}size={14}/>
25
+ </Ce>
26
26
  </S>}
27
27
  </S>
28
28
 
29
- <S style={I.toolbarRight}>
30
- <H style={I.toolbarBtn}onPress={()=>K(o=>o==="newest"?"oldest":"newest")}hitSlop={10}>
31
- <Ho color={e.grayTextStrong}size={18}direction={Y==="newest"?"down":"up"}/>
29
+ <S style={T.toolbarRight}>
30
+ <H style={T.toolbarBtn}onPress={()=>X(e=>e==="newest"?"oldest":"newest")}hitSlop={10}>
31
+ <Pe color={o.grayTextStrong}size={18}direction={K==="newest"?"down":"up"}/>
32
32
  </H>
33
- <H style={[I.toolbarBtn,{borderColor:`${e.errorColor}38`,backgroundColor:`${e.errorColor}0F`}]}onPress={X}hitSlop={6}>
34
- <Po color={e.errorColor}size={15}/>
33
+ <H style={[T.toolbarBtn,{borderColor:`${o.errorColor}38`,backgroundColor:`${o.errorColor}0F`}]}onPress={j}hitSlop={6}>
34
+ <He color={o.errorColor}size={15}/>
35
35
  </H>
36
36
  </S>
37
37
  </S>
38
38
 
39
39
 
40
- {(W||h.length>0)&&<_ horizontal showsHorizontalScrollIndicator={!1}style={{marginBottom:6,maxHeight:30}}contentContainerStyle={{paddingHorizontal:16,flexDirection:"row",alignItems:"center",gap:6}}>
41
- {eo.map(o=>{const t=h.includes(o);return<H key={o}onPress={()=>{E(t?r=>r.replace(o,"").trim():r=>r?`${r} ${o}`.trim():o)}}>
42
- <S style={{paddingHorizontal:8,paddingVertical:3,borderRadius:6,backgroundColor:t?e.purple:`${e.purple}14`,borderWidth:1,borderColor:t?e.purple:`${e.purple}30`}}>
43
- <L style={{fontFamily:z.interBold,fontSize:10,color:t?e.white:e.purple}}>
44
- {o}
45
- </L>
40
+ {(O||y.length>0)&&<Q horizontal showsHorizontalScrollIndicator={!1}style={{marginBottom:6,maxHeight:30}}contentContainerStyle={{paddingHorizontal:8,flexDirection:"row",alignItems:"center",gap:6}}>
41
+ {te.map(e=>{const t=y.includes(e);return<H key={e}onPress={()=>{E(t?r=>r.replace(e,"").trim():r=>r?`${r} ${e}`.trim():e)}}>
42
+ <S style={{paddingHorizontal:8,paddingVertical:3,borderRadius:6,backgroundColor:t?o.purple:`${o.purple}14`,borderWidth:1,borderColor:t?o.purple:`${o.purple}30`}}>
43
+ <A style={{fontFamily:z.interBold,fontSize:10,color:t?o.white:o.purple}}>
44
+ {e}
45
+ </A>
46
46
  </S>
47
47
  </H>})}
48
- </_>}
48
+ </Q>}
49
49
 
50
50
 
51
- <S style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
52
- <_ horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
53
- {to.map(o=>{const t=o.id==="all"?C.has("all"):C.has(o.id)&&!C.has("all"),r=o.color||e.purple,B=t?e.white:r,T=o.Icon;return<H key={o.id}onPress={()=>{o.id==="all"?P(new Set(["all"])):P(ro=>{const A=new Set(ro);return A.delete("all"),A.has(o.id)?A.delete(o.id):A.add(o.id),A.size===0&&A.add("all"),A})}}>
51
+ <S style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:8,gap:6}}>
52
+ <Q horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
53
+ {re.map(e=>{const t=e.id==="all"?h.has("all"):h.has(e.id)&&!h.has("all"),r=e.color||o.purple,B=t?o.white:r,I=e.Icon;return<H key={e.id}onPress={()=>{e.id==="all"?R(new Set(["all"])):R(le=>{const L=new Set(le);return L.delete("all"),L.has(e.id)?L.delete(e.id):L.add(e.id),L.size===0&&L.add("all"),L})}}>
54
54
  <S style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:t?r:`${r}12`,borderWidth:1,borderColor:t?r:`${r}30`,gap:5}}>
55
- <T size={11}color={B}/>
56
- <L style={{fontFamily:z.interBold,fontSize:10.5,color:t?e.white:e.primaryBlack}}>
57
- {o.label}
58
- </L>
55
+ <I size={11}color={B}/>
56
+ <A style={{fontFamily:z.interBold,fontSize:10.5,color:t?o.white:o.primaryBlack}}>
57
+ {e.label}
58
+ </A>
59
59
  <S style={{backgroundColor:t?"rgba(255,255,255,0.25)":`${r}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8}}>
60
- <L style={{fontFamily:z.interBold,fontSize:9,color:t?e.white:r}}>
61
- {o.count}
62
- </L>
60
+ <A style={{fontFamily:z.interBold,fontSize:9,color:t?o.white:r}}>
61
+ {e.count}
62
+ </A>
63
63
  </S>
64
64
  </S>
65
65
  </H>})}
66
- </_>
66
+ </Q>
67
67
  </S>
68
68
  </S>
69
69
 
70
- <So ref={N}data={O}keyExtractor={Z}ListHeaderComponent={oo}renderItem={q}getItemLayout={J}initialNumToRender={15}maxToRenderPerBatch={10}windowSize={9}removeClippedSubviews={ho.OS==="android"}renderToHardwareTextureAndroid={!0}ListEmptyComponent={<Vo isSearch={h.length>0||!C.has("all")}searchQuery={h}customTitle={h.length>0?"No matching console logs":"No console logs"}onClearSearch={()=>{E(""),P(new Set(["all"]))}}/>}ListFooterComponent={w.length>0?<Eo count={O.length}totalCount={w.length}label="logs"loadMoreStep={Q}hasMore={O.length<w.length}onLoadMore={()=>G(o=>o+Q)}/>:null}contentContainerStyle={[I.listContent,w.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
71
- </S>});export default Uo;
70
+ <Se ref={U}data={$}keyExtractor={ee}ListHeaderComponent={oe}renderItem={J}getItemLayout={Z}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}showsVerticalScrollIndicator={!1}nestedScrollEnabled={!0}ListEmptyComponent={<Ve isSearch={y.length>0||!h.has("all")}searchQuery={y}customTitle={y.length>0?"No matching console logs":"No console logs"}onClearSearch={()=>{E(""),R(new Set(["all"]))}}/>}ListFooterComponent={w.length>0?<Ee count={$.length}totalCount={w.length}label="logs"loadMoreStep={Y}hasMore={$.length<w.length}onLoadMore={()=>M(e=>e+Y)}/>:null}style={{flex:1}}contentContainerStyle={[T.listContent,{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
71
+ </S>});export default Ue;