react-native-inapp-inspector 2.3.25 → 2.4.1
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.
- package/README.md +26 -5
- package/dist/commonjs/components/AnalyticsDetail.js +9 -6
- package/dist/commonjs/components/AppHeaderLogo.js +4 -6
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +18 -22
- package/dist/commonjs/components/Inspector/ConsoleTab.js +13 -16
- package/dist/commonjs/components/Inspector/CrashDetail.js +7 -6
- package/dist/commonjs/components/Inspector/CrashTab.js +23 -23
- package/dist/commonjs/components/Inspector/DebuggingTab.js +6 -6
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +77 -43
- package/dist/commonjs/components/Inspector/FabLauncher.js +8 -9
- package/dist/commonjs/components/Inspector/InspectorHeader.js +93 -70
- package/dist/commonjs/components/Inspector/LogDetail.js +10 -7
- package/dist/commonjs/components/Inspector/MainScreen.js +67 -29
- package/dist/commonjs/components/Inspector/NetworkDetail.js +29 -28
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/NetworkTab.js +87 -85
- package/dist/commonjs/components/Inspector/PushCard.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushCard.js +89 -0
- package/dist/commonjs/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushDetail.js +190 -0
- package/dist/commonjs/components/Inspector/PushTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/PushTab.js +45 -0
- package/dist/commonjs/components/Inspector/ReduxDetail.js +16 -13
- package/dist/commonjs/components/Inspector/ReduxTab.js +18 -28
- package/dist/commonjs/components/Inspector/SettingsPanel.js +253 -105
- package/dist/commonjs/components/Inspector/StorageTab.js +40 -40
- package/dist/commonjs/components/Inspector/TabBar.js +9 -8
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -2
- package/dist/commonjs/components/JsonViewer.js +77 -90
- package/dist/commonjs/components/LogCard.js +9 -6
- package/dist/commonjs/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/commonjs/components/ModuleErrorBoundary.js +33 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +3 -3
- package/dist/commonjs/components/NetworkIcons.js +10 -6
- package/dist/commonjs/components/SegmentedTabs.d.ts +4 -1
- package/dist/commonjs/components/SegmentedTabs.js +12 -8
- package/dist/commonjs/components/ShareButton.d.ts +11 -0
- package/dist/commonjs/components/ShareButton.js +6 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.js +4 -4
- package/dist/commonjs/customHooks/networkLogger.js +1 -1
- package/dist/commonjs/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/commonjs/customHooks/pushNotificationLogger.js +1 -0
- package/dist/commonjs/helpers/memoryManager.d.ts +2 -1
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.d.ts +13 -0
- package/dist/commonjs/helpers/shareFormatter.js +7 -0
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/index.d.ts +5 -2
- package/dist/commonjs/index.js +4 -4
- package/dist/commonjs/push.d.ts +4 -0
- package/dist/commonjs/push.js +1 -0
- package/dist/commonjs/types/enums.d.ts +30 -0
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/index.d.ts +10 -0
- package/dist/commonjs/types/interfaces.d.ts +63 -7
- package/dist/esm/components/AnalyticsDetail.js +28 -25
- package/dist/esm/components/AppHeaderLogo.js +5 -7
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +14 -14
- package/dist/esm/components/Inspector/AnalyticsTab.js +36 -40
- package/dist/esm/components/Inspector/ConsoleTab.js +52 -55
- package/dist/esm/components/Inspector/CrashDetail.js +11 -10
- package/dist/esm/components/Inspector/CrashTab.js +23 -23
- package/dist/esm/components/Inspector/DebuggingTab.js +10 -10
- package/dist/esm/components/Inspector/DeviceInfoTab.js +208 -174
- package/dist/esm/components/Inspector/FabLauncher.js +41 -42
- package/dist/esm/components/Inspector/InspectorHeader.js +138 -115
- package/dist/esm/components/Inspector/LogDetail.js +24 -21
- package/dist/esm/components/Inspector/MainScreen.js +100 -62
- package/dist/esm/components/Inspector/NetworkDetail.js +88 -87
- package/dist/esm/components/Inspector/NetworkFilterModal.js +8 -8
- package/dist/esm/components/Inspector/NetworkTab.js +136 -134
- package/dist/esm/components/Inspector/PushCard.d.ts +4 -0
- package/dist/esm/components/Inspector/PushCard.js +89 -0
- package/dist/esm/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/esm/components/Inspector/PushDetail.js +190 -0
- package/dist/esm/components/Inspector/PushTab.d.ts +3 -0
- package/dist/esm/components/Inspector/PushTab.js +45 -0
- package/dist/esm/components/Inspector/ReduxDetail.js +40 -37
- package/dist/esm/components/Inspector/ReduxTab.js +109 -119
- package/dist/esm/components/Inspector/SettingsPanel.js +406 -258
- package/dist/esm/components/Inspector/StorageTab.js +174 -174
- package/dist/esm/components/Inspector/TabBar.js +28 -27
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +1 -1
- package/dist/esm/components/JsonViewer.js +101 -114
- package/dist/esm/components/LogCard.js +25 -22
- package/dist/esm/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/esm/components/ModuleErrorBoundary.js +33 -0
- package/dist/esm/components/NetworkIcons.d.ts +3 -3
- package/dist/esm/components/NetworkIcons.js +7 -3
- package/dist/esm/components/SegmentedTabs.d.ts +4 -1
- package/dist/esm/components/SegmentedTabs.js +12 -8
- package/dist/esm/components/ShareButton.d.ts +11 -0
- package/dist/esm/components/ShareButton.js +6 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/crashHandler.js +6 -6
- package/dist/esm/customHooks/networkLogger.js +1 -1
- package/dist/esm/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/esm/customHooks/pushNotificationLogger.js +1 -0
- package/dist/esm/helpers/memoryManager.d.ts +2 -1
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/settingsStore.d.ts +1 -0
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/helpers/shareFormatter.d.ts +13 -0
- package/dist/esm/helpers/shareFormatter.js +7 -0
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/index.d.ts +5 -2
- package/dist/esm/index.js +7 -7
- package/dist/esm/push.d.ts +4 -0
- package/dist/esm/push.js +1 -0
- package/dist/esm/types/enums.d.ts +30 -0
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/index.d.ts +10 -0
- package/dist/esm/types/interfaces.d.ts +63 -7
- package/package.json +53 -10
- package/src/native/NativeInspector.ts +0 -1
- package/dist/commonjs/components/BrandSquareIcon.d.ts +0 -5
- package/dist/commonjs/components/BrandSquareIcon.js +0 -112
- package/dist/esm/components/BrandSquareIcon.d.ts +0 -5
- package/dist/esm/components/BrandSquareIcon.js +0 -112
package/README.md
CHANGED
|
@@ -9,13 +9,27 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<a href="https://www.npmjs.com/package/react-native-inapp-inspector"><img src="https://img.shields.io/npm/v/react-native-inapp-inspector?color=6366f1&label=npm" alt="npm version" /></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/react-native-inapp-inspector"><img src="https://img.shields.io/npm/v/react-native-inapp-inspector?color=6366f1&label=npm&logo=npm" alt="npm version" /></a>
|
|
13
13
|
<a href="https://www.npmjs.com/package/react-native-inapp-inspector"><img src="https://img.shields.io/npm/dm/react-native-inapp-inspector?color=3b82f6&label=downloads" alt="npm downloads" /></a>
|
|
14
14
|
<a href="https://github.com/vengatmacuser/react-native-inapp-inspector"><img src="https://img.shields.io/github/stars/vengatmacuser/react-native-inapp-inspector?color=f59e0b&label=stars&logo=github" alt="GitHub stars" /></a>
|
|
15
|
-
<a href="https://bundlephobia.com/package/react-native-inapp-inspector"><img src="https://img.shields.io/bundlephobia/minzip/react-native-inapp-inspector?color=10b981&label=minzipped" alt="bundle size" /></a>
|
|
16
15
|
<a href="https://github.com/vengatmacuser/react-native-inapp-inspector/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license" /></a>
|
|
17
|
-
<a href="https://
|
|
18
|
-
|
|
16
|
+
<a href="https://www.npmjs.com/package/react-native-inapp-inspector"><img src="https://img.shields.io/npm/unpacked-size/react-native-inapp-inspector?color=10b981&label=size" alt="unpacked size" /></a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<img src="https://img.shields.io/badge/Platform-iOS%20%7C%20Android%20%7C%20Expo-0284c7?logo=apple&logoColor=white" alt="platform" />
|
|
21
|
+
<img src="https://img.shields.io/badge/React%20Native-%E2%89%A50.60-61DAFB?logo=react&logoColor=white" alt="React Native" />
|
|
22
|
+
<img src="https://img.shields.io/badge/Expo-SDK%2048%2B%20%7C%2050%2B%20%7C%2051%2B-000020?logo=expo&logoColor=white" alt="Expo" />
|
|
23
|
+
<img src="https://img.shields.io/badge/TypeScript-Strict%20Ready-3178c6?logo=typescript&logoColor=white" alt="TypeScript" />
|
|
24
|
+
<img src="https://img.shields.io/badge/Engine-Hermes%20%7C%20JSC-9333ea" alt="Engine" />
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<img src="https://img.shields.io/badge/Micro--UI-Fault--Isolated-10b981?logo=shield&logoColor=white" alt="Fault Isolated" />
|
|
29
|
+
<img src="https://img.shields.io/badge/Overhead-0%25%20Inactive-06b6d4" alt="Overhead" />
|
|
30
|
+
<img src="https://img.shields.io/badge/Redux-RTK%20%7C%20Persist-764abc?logo=redux&logoColor=white" alt="Redux" />
|
|
31
|
+
<img src="https://img.shields.io/badge/Analytics-Firebase%20%7C%20GA4-FFCA28?logo=firebase&logoColor=black" alt="Firebase" />
|
|
32
|
+
<a href="https://github.com/vengatmacuser/react-native-inapp-inspector/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" /></a>
|
|
19
33
|
</p>
|
|
20
34
|
|
|
21
35
|
The **zero-config, all-in-one in-app debugging overlay for React Native & Expo**. Inspect network traffic (fetch/Axios), console logs with Metro symbolicated stack traces, Redux state diffs, Firebase Analytics events, and JavaScript bundle size directly on your device or simulator with zero native setup.
|
|
@@ -384,7 +398,14 @@ This library is a free, open-source utility maintained in spare time. If it save
|
|
|
384
398
|
|
|
385
399
|
👉 **[Sponsor @vengatmacuser on GitHub Sponsors](https://github.com/sponsors/vengatmacuser)**
|
|
386
400
|
|
|
387
|
-
|
|
401
|
+
## 🔍 Keywords & Search Topics
|
|
402
|
+
|
|
403
|
+
`react-native-inapp-inspector` is designed for engineers seeking:
|
|
404
|
+
* **Network Logging**: React Native network logger, in-app HTTP/HTTPS network inspector, Axios interceptor, Fetch API logger, GraphQL network monitor, WebSocket stream logger, cURL snippet export on device.
|
|
405
|
+
* **Modern Tool Alternatives**: Standalone Flipper alternative for React Native, Chucker for React Native Android & iOS, React Native Debugger replacement, mobile Proxyman / Charles Proxy alternative.
|
|
406
|
+
* **State & Storage Inspection**: React Native Redux DevTools on mobile, Redux Toolkit action diffs, `redux-persist` metadata inspector, AsyncStorage viewer & editor, MMKV storage debugger.
|
|
407
|
+
* **Crash & Diagnostics**: React Native crash reporter, Metro symbolicated stack traces, React Error Boundary with fault-isolated Micro-UI architecture, low-level RAM & battery telemetry, device hardware inspector.
|
|
408
|
+
* **Analytics & Screen Capture**: Firebase Analytics event inspector, GA4 debugger, on-device screen recorder, video capture, and screenshot utility for bare React Native & Expo applications.
|
|
388
409
|
|
|
389
410
|
---
|
|
390
411
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,r,i,l){l===void 0&&(l=i);var o=Object.getOwnPropertyDescriptor(r,i);(!o||("get"in o?!r.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return r[i]}}),Object.defineProperty(e,l,o)}):(function(e,r,i,l){l===void 0&&(l=i),e[l]=r[i]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}):function(e,r){e.default=r}),__importStar=this&&this.__importStar||(function(){var e=function(r){return e=Object.getOwnPropertyNames||function(i){var l=[];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(l[l.length]=o);return l},e(r)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var l=e(r),o=0;o<l.length;o++)l[o]!=="default"&&__createBinding(i,r,l[o]);return __setModuleDefault(i,r),i}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),CopyButton_1=__importDefault(require("./CopyButton")),JsonViewer_1=__importDefault(require("./JsonViewer")),SegmentedTabs_1=__importDefault(require("./SegmentedTabs")),HighlightText_1=__importDefault(require("./HighlightText")),AnimatedEntrance_1=__importDefault(require("./AnimatedEntrance")),AppFonts_1=require("../styles/AppFonts"),AppColors_1=require("../styles/AppColors"),helpers_1=require("../helpers"),gaAnalyticsRegistry_1=require("../helpers/gaAnalyticsRegistry"),i18n_1=require("../i18n"),NetworkIcons_1=require("./NetworkIcons"),AnalyticsDetail=({event:e})=>{const{t:r}=(0,i18n_1.useTranslation)(),[i,l]=(0,react_1.useState)("overview"),[o,w]=(0,react_1.useState)(""),a=(0,react_1.useMemo)(()=>e.params??{},[e.params]),d=(0,react_1.useMemo)(()=>e.userProperties??{},[e.userProperties]),u=(0,react_1.useMemo)(()=>Object.keys(a),[a]),s=(0,react_1.useMemo)(()=>Object.keys(d),[d]),b=(0,react_1.useMemo)(()=>(0,gaAnalyticsRegistry_1.getEventCategory)(e.name,a),[e.name,a]),y=(0,react_1.useMemo)(()=>({name:e.name,timestamp:e.timestamp,source:e.source,...e.screenName?{screenName:e.screenName}:{},...e.screenClass?{screenClass:e.screenClass}:{},...e.userId?{userId:e.userId}:{},...e.sessionId?{sessionId:e.sessionId}:{},...e.trackingId?{trackingId:e.trackingId}:{},params:a,...s.length>0?{userProperties:d}:{}}),[e,a,s.length,d]),m=(0,react_1.useMemo)(()=>{const t=a.value??a.price,n=a.currency??"USD";return t!=null&&!isNaN(Number(t))?{amount:Number(t).toFixed(2),currency:String(n).toUpperCase()}:null},[a]),f=(0,react_1.useMemo)(()=>Array.isArray(a.items)?a.items.length:null,[a.items]),
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,r,i,l){l===void 0&&(l=i);var o=Object.getOwnPropertyDescriptor(r,i);(!o||("get"in o?!r.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return r[i]}}),Object.defineProperty(e,l,o)}):(function(e,r,i,l){l===void 0&&(l=i),e[l]=r[i]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}):function(e,r){e.default=r}),__importStar=this&&this.__importStar||(function(){var e=function(r){return e=Object.getOwnPropertyNames||function(i){var l=[];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(l[l.length]=o);return l},e(r)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var l=e(r),o=0;o<l.length;o++)l[o]!=="default"&&__createBinding(i,r,l[o]);return __setModuleDefault(i,r),i}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),CopyButton_1=__importDefault(require("./CopyButton")),ShareButton_1=__importDefault(require("./ShareButton")),JsonViewer_1=__importDefault(require("./JsonViewer")),SegmentedTabs_1=__importDefault(require("./SegmentedTabs")),HighlightText_1=__importDefault(require("./HighlightText")),AnimatedEntrance_1=__importDefault(require("./AnimatedEntrance")),AppFonts_1=require("../styles/AppFonts"),AppColors_1=require("../styles/AppColors"),helpers_1=require("../helpers"),shareFormatter_1=require("../helpers/shareFormatter"),gaAnalyticsRegistry_1=require("../helpers/gaAnalyticsRegistry"),i18n_1=require("../i18n"),NetworkIcons_1=require("./NetworkIcons"),AnalyticsDetail=({event:e})=>{const{t:r}=(0,i18n_1.useTranslation)(),[i,l]=(0,react_1.useState)("overview"),[o,w]=(0,react_1.useState)(""),a=(0,react_1.useMemo)(()=>e.params??{},[e.params]),d=(0,react_1.useMemo)(()=>e.userProperties??{},[e.userProperties]),u=(0,react_1.useMemo)(()=>Object.keys(a),[a]),s=(0,react_1.useMemo)(()=>Object.keys(d),[d]),b=(0,react_1.useMemo)(()=>(0,gaAnalyticsRegistry_1.getEventCategory)(e.name,a),[e.name,a]),y=(0,react_1.useMemo)(()=>({name:e.name,timestamp:e.timestamp,source:e.source,...e.screenName?{screenName:e.screenName}:{},...e.screenClass?{screenClass:e.screenClass}:{},...e.userId?{userId:e.userId}:{},...e.sessionId?{sessionId:e.sessionId}:{},...e.trackingId?{trackingId:e.trackingId}:{},params:a,...s.length>0?{userProperties:d}:{}}),[e,a,s.length,d]),m=(0,react_1.useMemo)(()=>{const t=a.value??a.price,n=a.currency??"USD";return t!=null&&!isNaN(Number(t))?{amount:Number(t).toFixed(2),currency:String(n).toUpperCase()}:null},[a]),f=(0,react_1.useMemo)(()=>Array.isArray(a.items)?a.items.length:null,[a.items]),h=(0,react_1.useMemo)(()=>e.screenName||a.firebase_screen||a.screen_name||a.page_title||e.screenClass||a.firebase_screen_class,[e.screenName,e.screenClass,a]),x=(0,react_1.useMemo)(()=>{const t=Object.entries(a);if(!o.trim())return t;const n=o.toLowerCase();return t.filter(([_,c])=>{const C=typeof c=="object"?JSON.stringify(c):String(c);return _.toLowerCase().includes(n)||C.toLowerCase().includes(n)})},[a,o]),p=(0,react_1.useMemo)(()=>{switch(b){case"ecommerce":return{label:r("analytics.ecommerceCategory"),color:AppColors_1.AppColors.amber700,bg:AppColors_1.AppColors.amber100,border:AppColors_1.AppColors.amber200,icon:t=><NetworkIcons_1.CartIcon color={t}size={11}/>};case"page_view":return{label:r("analytics.screensCategory"),color:AppColors_1.AppColors.sky600,bg:AppColors_1.AppColors.sky100,border:AppColors_1.AppColors.sky400,icon:t=><NetworkIcons_1.GlobeIcon color={t}size={11}/>};case"system":return{label:r("analytics.systemCategory"),color:AppColors_1.AppColors.purple,bg:AppColors_1.AppColors.purple100,border:AppColors_1.AppColors.purple200,icon:t=><NetworkIcons_1.BoltIcon color={t}size={11}/>};default:return{label:r("analytics.customCategory"),color:AppColors_1.AppColors.brandPurple,bg:AppColors_1.AppColors.purple100,border:AppColors_1.AppColors.purple200,icon:t=><NetworkIcons_1.SparkleIcon color={t}size={11}/>}}},[b,r]),T=[{key:"overview",label:`${r("analytics.overviewTab")} (${u.length})`,icon:t=><NetworkIcons_1.TableIcon color={t?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}size={12}/>},{key:"json",label:"JSON Payload",icon:t=><NetworkIcons_1.PrettyIcon color={t?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}size={12}/>}];return<react_native_1.ScrollView style={detailStyles.scroll}contentContainerStyle={detailStyles.content}showsVerticalScrollIndicator contentInsetAdjustmentBehavior="never"automaticallyAdjustContentInsets={!1}>
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
<react_native_1.View style={detailStyles.heroCard}>
|
|
@@ -30,7 +30,10 @@
|
|
|
30
30
|
</react_native_1.View>
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
<
|
|
33
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
34
|
+
<ShareButton_1.default onShare={()=>(0,shareFormatter_1.shareAnalyticsReport)(e)}/>
|
|
35
|
+
<CopyButton_1.default value={JSON.stringify(y,null,2)}label={r("analytics.eventDetails")}/>
|
|
36
|
+
</react_native_1.View>
|
|
34
37
|
</react_native_1.View>
|
|
35
38
|
|
|
36
39
|
|
|
@@ -49,10 +52,10 @@
|
|
|
49
52
|
</react_native_1.Text>
|
|
50
53
|
</react_native_1.View>
|
|
51
54
|
|
|
52
|
-
{
|
|
55
|
+
{h&&<react_native_1.View style={detailStyles.screenPill}>
|
|
53
56
|
<NetworkIcons_1.PinIcon color={AppColors_1.AppColors.sky600}size={11}/>
|
|
54
57
|
<react_native_1.Text style={detailStyles.screenText}numberOfLines={1}>
|
|
55
|
-
{String(
|
|
58
|
+
{String(h)}
|
|
56
59
|
</react_native_1.Text>
|
|
57
60
|
</react_native_1.View>}
|
|
58
61
|
</react_native_1.View>
|
|
@@ -147,12 +150,12 @@
|
|
|
147
150
|
<react_native_1.Text style={detailStyles.emptyParamsText}>
|
|
148
151
|
No custom parameters recorded for this event.
|
|
149
152
|
</react_native_1.Text>
|
|
150
|
-
</react_native_1.View>:
|
|
153
|
+
</react_native_1.View>:x.length===0?<react_native_1.View style={detailStyles.emptyParamsBox}>
|
|
151
154
|
<react_native_1.Text style={detailStyles.emptyParamsText}>
|
|
152
155
|
No parameters matching "{o}"
|
|
153
156
|
</react_native_1.Text>
|
|
154
157
|
</react_native_1.View>:<react_native_1.View style={detailStyles.paramList}>
|
|
155
|
-
{
|
|
158
|
+
{x.map(([t,n],_)=>{const c=typeof n=="object"&&n!==null,C=Array.isArray(n);let g=typeof n;n===null?g="null":C?g=`array [${n.length}]`:c&&(g="object");const A=c?JSON.stringify(n,null,2):String(n),V=t==="value"||t==="price"||t==="currency"||t==="screen_name"||t==="item_id"||t==="item_name";return<AnimatedEntrance_1.default key={t}index={_}distance={4}>
|
|
156
159
|
<react_native_1.View style={detailStyles.paramCard}>
|
|
157
160
|
|
|
158
161
|
<react_native_1.View style={detailStyles.paramCardHeader}>
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppHeaderLogo=void 0;const react_1=__importDefault(require("react")),react_native_1=require("react-native"),
|
|
2
|
-
{
|
|
1
|
+
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppHeaderLogo=void 0;const react_1=__importDefault(require("react")),react_native_1=require("react-native"),BrandCircleIcon_1=__importDefault(require("./BrandCircleIcon")),AppHeaderLogo=({size:e=52,customIcon:t})=>{const r=Math.round(e*.23);if(t){if(react_1.default.isValidElement(t)){const n=react_1.default.cloneElement(t,{size:e,width:e,height:e});return<react_native_1.View style={[logoStyles.container,{width:e,height:e,borderRadius:r}]}>
|
|
2
|
+
{n}
|
|
3
3
|
</react_native_1.View>}return<react_native_1.View style={[logoStyles.imageContainer,{width:e,height:e,borderRadius:r}]}>
|
|
4
|
-
<react_native_1.Image source={t}style={[logoStyles.image,{borderRadius:r
|
|
5
|
-
</react_native_1.View>}return<
|
|
6
|
-
<BrandSquareIcon_1.default size={e}/>
|
|
7
|
-
</react_native_1.View>};exports.AppHeaderLogo=AppHeaderLogo;const logoStyles=react_native_1.StyleSheet.create({container:{overflow:"hidden",alignItems:"center",justifyContent:"center",borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.55)",backgroundColor:AppColors_1.AppColors.white,shadowColor:AppColors_1.AppColors.shadowColorString,shadowOffset:{width:0,height:2},shadowOpacity:.35,shadowRadius:5,elevation:4},imageContainer:{overflow:"hidden",backgroundColor:AppColors_1.AppColors.white,borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.55)",alignItems:"center",justifyContent:"center",shadowColor:AppColors_1.AppColors.shadowColorString,shadowOffset:{width:0,height:2},shadowOpacity:.3,shadowRadius:4,elevation:3},image:{width:"100%",height:"100%"}});exports.default=exports.AppHeaderLogo;
|
|
4
|
+
<react_native_1.Image source={t}style={[logoStyles.image,{borderRadius:r}]}resizeMode="cover"/>
|
|
5
|
+
</react_native_1.View>}return<BrandCircleIcon_1.default size={e}/>};exports.AppHeaderLogo=AppHeaderLogo;const logoStyles=react_native_1.StyleSheet.create({container:{overflow:"hidden",alignItems:"center",justifyContent:"center",backgroundColor:"transparent"},imageContainer:{overflow:"hidden",backgroundColor:"transparent",alignItems:"center",justifyContent:"center"},image:{width:"100%",height:"100%"}});exports.default=exports.AppHeaderLogo;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(a,i,n,o){o===void 0&&(o=n);var s=Object.getOwnPropertyDescriptor(i,n);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[n]}}),Object.defineProperty(a,o,s)}):(function(a,i,n,o){o===void 0&&(o=n),a[o]=i[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(a,i){Object.defineProperty(a,"default",{enumerable:!0,value:i})}):function(a,i){a.default=i}),__importStar=this&&this.__importStar||(function(){var a=function(i){return a=Object.getOwnPropertyNames||function(n){var o=[];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[o.length]=s);return o},a(i)};return function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var o=a(i),s=0;s<o.length;s++)o[s]!=="default"&&__createBinding(n,i,o[s]);return __setModuleDefault(n,i),n}})(),__importDefault=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),InspectorContext_1=require("./InspectorContext"),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),helpers_1=require("../../helpers"),NetworkIcons_1=require("../NetworkIcons"),TouchableScale_1=__importDefault(require("../TouchableScale")),
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(a,i,n,o){o===void 0&&(o=n);var s=Object.getOwnPropertyDescriptor(i,n);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[n]}}),Object.defineProperty(a,o,s)}):(function(a,i,n,o){o===void 0&&(o=n),a[o]=i[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(a,i){Object.defineProperty(a,"default",{enumerable:!0,value:i})}):function(a,i){a.default=i}),__importStar=this&&this.__importStar||(function(){var a=function(i){return a=Object.getOwnPropertyNames||function(n){var o=[];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[o.length]=s);return o},a(i)};return function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var o=a(i),s=0;s<o.length;s++)o[s]!=="default"&&__createBinding(n,i,o[s]);return __setModuleDefault(n,i),n}})(),__importDefault=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),InspectorContext_1=require("./InspectorContext"),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),helpers_1=require("../../helpers"),NetworkIcons_1=require("../NetworkIcons"),TouchableScale_1=__importDefault(require("../TouchableScale")),AnalyticsFilterModal=({visible:a,onClose:i})=>{const{analyticsEvents:n,analyticsSearch:o,analyticsFilters:s,setAnalyticsFilters:v}=(0,InspectorContext_1.useInspector)(),[e,c]=(0,react_1.useState)(()=>({...s,categories:new Set(s.categories),screens:new Set(s.screens),sources:new Set(s.sources||["all"]),userTypes:new Set(s.userTypes||["all"])}));(0,react_1.useEffect)(()=>{a&&c({...s,categories:new Set(s.categories),screens:new Set(s.screens),sources:new Set(s.sources||["all"]),userTypes:new Set(s.userTypes||["all"])})},[a,s]);const y=(0,react_1.useMemo)(()=>{const t=new Set;for(const l of n){const r=l.screenName||l.params?.firebase_screen||l.params?.screen_name||l.params?.firebase_screen_class||l.screenClass;r&&typeof r=="string"&&r.trim()!==""&&t.add(r.trim())}return Array.from(t)},[n]),u=t=>{c(l=>{const r=new Set(l.categories);return t==="all"?{...l,categories:new Set(["all"])}:(r.delete("all"),r.has(t)?(r.delete(t),r.size===0&&r.add("all")):r.add(t),{...l,categories:r})})},C=t=>{c(l=>{const r=new Set(l.screens);return r.has(t)?r.delete(t):r.add(t),{...l,screens:r}})},_=t=>{c(l=>{const r=new Set(l.sources);return t==="all"?{...l,sources:new Set(["all"])}:(r.delete("all"),r.has(t)?(r.delete(t),r.size===0&&r.add("all")):r.add(t),{...l,sources:r})})},T=t=>{c(l=>{const r=new Set(l.userTypes);return t==="all"?{...l,userTypes:new Set(["all"])}:(r.delete("all"),r.has(t)?(r.delete(t),r.size===0&&r.add("all")):r.add(t),{...l,userTypes:r})})},p=t=>{c(l=>({...l,[t]:!l[t]}))},A=t=>{c(l=>({...l,timeWindow:t}))},m=t=>{c(l=>({...l,payloadComplexity:t}))},d=t=>{c(l=>({...l,sortBy:t}))},g=()=>{c({categories:new Set(["all"]),screens:new Set,sources:new Set(["all"]),userTypes:new Set(["all"]),timeWindow:"all",payloadComplexity:"all",hasRevenue:!1,hasItems:!1,hasUserProps:!1,hasParams:!1,onlyDuplicates:!1,onlyConversions:!1,sortBy:"time_desc"})},b=()=>{v({...e,categories:new Set(e.categories),screens:new Set(e.screens),sources:new Set(e.sources),userTypes:new Set(e.userTypes)}),i()},f=()=>{c({...s,categories:new Set(s.categories),screens:new Set(s.screens),sources:new Set(s.sources||["all"]),userTypes:new Set(s.userTypes||["all"])}),i()},S=(0,react_1.useMemo)(()=>{let t=n;if(o){const l=o.toLowerCase();t=t.filter(r=>r.name.toLowerCase().includes(l)||JSON.stringify(r.params||{}).toLowerCase().includes(l)||(r.screenName??"").toLowerCase().includes(l)||(r.pageTitle??"").toLowerCase().includes(l))}if(e.categories.size>0&&!e.categories.has("all")&&(t=t.filter(l=>{const r=(0,helpers_1.getEventCategory)(l.name);return e.categories.has(r)})),e.timeWindow!=="all"){const l=Date.now(),r=e.timeWindow==="1m"?l-60*1e3:e.timeWindow==="5m"?l-300*1e3:e.timeWindow==="15m"?l-900*1e3:l-3600*1e3;t=t.filter(P=>P.timestamp>=r)}if(e.sources.size>0&&!e.sources.has("all")&&(t=t.filter(l=>e.sources.has(l.source||"manual"))),e.userTypes.size>0&&!e.userTypes.has("all")&&(t=t.filter(l=>{const r=!!(l.userId&&l.userId.trim()!=="");return!!(e.userTypes.has("identified")&&r||e.userTypes.has("anonymous")&&!r)})),e.payloadComplexity!=="all"&&(t=t.filter(l=>{const r=l.params?Object.keys(l.params).length:0;return e.payloadComplexity==="none"?r===0:e.payloadComplexity==="simple"?r>=1&&r<=5:e.payloadComplexity==="heavy"?r>5:!0})),e.onlyConversions){const l=["purchase","item_purchase","ecommerce_purchase","sign_up","login","lead","generate_lead","tutorial_complete","add_payment_info","begin_checkout"];t=t.filter(r=>l.some(P=>r.name.toLowerCase().includes(P)))}return e.screens.size>0&&(t=t.filter(l=>{const r=l.screenName||l.params?.firebase_screen||l.params?.screen_name||l.params?.firebase_screen_class||l.screenClass||"";return e.screens.has(r)})),e.hasRevenue&&(t=t.filter(l=>{const r=l.params?.value??l.params?.price;return r!=null&&Number(r)>0})),e.hasItems&&(t=t.filter(l=>Array.isArray(l.params?.items)&&l.params.items.length>0)),e.hasUserProps&&(t=t.filter(l=>l.userProperties&&Object.keys(l.userProperties).length>0)),e.hasParams&&(t=t.filter(l=>l.params&&Object.keys(l.params).length>0)),t.length},[n,o,e]),h=e.categories.has("all")||e.categories.size===0,w=e.sources.has("all")||e.sources.size===0,x=e.userTypes.has("all")||e.userTypes.size===0;return<react_native_1.Modal visible={a}transparent animationType="fade"onRequestClose={f}>
|
|
2
2
|
<react_native_1.View style={styles.backdrop}>
|
|
3
3
|
<react_native_1.Pressable style={react_native_1.StyleSheet.absoluteFill}onPress={f}/>
|
|
4
4
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(n,l,
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(n,l,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(l,a);(!s||("get"in s?!l.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return l[a]}}),Object.defineProperty(n,o,s)}):(function(n,l,a,o){o===void 0&&(o=a),n[o]=l[a]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(n,l){Object.defineProperty(n,"default",{enumerable:!0,value:l})}):function(n,l){n.default=l}),__importStar=this&&this.__importStar||(function(){var n=function(l){return n=Object.getOwnPropertyNames||function(a){var o=[];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(o[o.length]=s);return o},n(l)};return function(l){if(l&&l.__esModule)return l;var a={};if(l!=null)for(var o=n(l),s=0;s<o.length;s++)o[s]!=="default"&&__createBinding(a,l,o[s]);return __setModuleDefault(a,l),a}})(),__importDefault=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),InspectorContext_1=require("./InspectorContext"),AnalyticsEventCard_1=__importDefault(require("../AnalyticsEventCard")),AnalyticsFilterModal_1=__importDefault(require("./AnalyticsFilterModal")),EndOfListFooter_1=__importDefault(require("../EndOfListFooter")),EmptyState_1=__importDefault(require("../EmptyState")),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),i18n_1=require("../../i18n"),TouchableScale_1=__importDefault(require("../TouchableScale")),helpers_1=require("../../helpers"),NetworkIcons_1=require("../NetworkIcons"),LOAD_MORE_STEP=10,AnalyticsTab=react_1.default.memo(()=>{const{t:n}=(0,i18n_1.useTranslation)(),{analyticsEvents:l,filteredAnalyticsEvents:a,analyticsSearch:o,setAnalyticsSearch:s,analyticsFilters:m,setAnalyticsFilters:x,handleDelete:B,selectedEvent:R,setSelectedEvent:V,newEventIds:O,logRouteMapRef:F,isAnalyticsLayoutReady:N,setIsAnalyticsLayoutReady:k,isAnalyticsFilterApplied:w,maxAnalyticsEventsLimit:A}=(0,InspectorContext_1.useInspector)(),q=A||100,P=(0,react_1.useRef)(null),[D,E]=(0,react_1.useState)(!1),[L,M]=(0,react_1.useState)(q);react_1.default.useEffect(()=>{M(A||100),P.current?.scrollToOffset({offset:0,animated:!1})},[o,m,A]);const S=(0,react_1.useMemo)(()=>a.slice(0,L),[a,L]),u=(0,react_1.useMemo)(()=>{let e=0,r=0,t=0,i=0;for(const b of l){const C=(0,helpers_1.getEventCategory)(b.name),c=b.count||1;C==="ecommerce"?e+=c:C==="page_view"?r+=c:C==="system"?t+=c:i+=c}const _=e+r+t+i;return{ecommerce:e,page_view:r,system:t,custom:i,totalCount:_}},[l]),j=(0,react_1.useCallback)(e=>{(0,InspectorContext_1.animateNextLayout)(),x(r=>{if(e==="all")return{...r,categories:new Set(["all"])};const t=new Set(r.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{...r,categories:new Set(["all"])};return{...r,categories:t}})},[x]),$=(0,react_1.useCallback)((e,r)=>e?.id?.toString()??r.toString(),[]),H=(0,react_1.useCallback)(({item:e,index:r})=>{const t=a[r+1],i=a[r-1],_=t?e.timestamp-t.timestamp:void 0,b=Math.floor(e.timestamp/6e4),C=i?Math.floor(i.timestamp/6e4):-1,c=r===0||b!==C;return<AnalyticsEventCard_1.default event={e}onPress={()=>{V(e)}}isNew={O.has(e.id)}searchStr={o}isFirst={r===0}isLast={r===a.length-1}msSincePrev={_}showTimestamp={c}computedScreenName={(()=>{if(!e)return"";const v=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 I=typeof v=="string"?v:v?JSON.stringify(v):"";const T=F.current.get(e.id+1e6);if(!I&&T&&T.path!=="Navigators"){const z=T.path.split(" \u2794 ");I=z[z.length-1]}return I})()}/>},[a,o,O,V,F]),W=(0,react_1.useCallback)((e,r)=>({length:86,offset:86*r,index:r}),[]);return<>
|
|
2
2
|
|
|
3
|
-
{
|
|
3
|
+
{R==null&&<react_native_1.View style={{backgroundColor:AppColors_1.AppColors.white,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,paddingBottom:6}}>
|
|
4
4
|
<react_native_1.View style={[styles_1.default.toolbarRow,{marginTop:12,marginBottom:8}]}>
|
|
5
5
|
<react_native_1.View style={styles_1.default.searchContainer}>
|
|
6
6
|
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak}size={16}/>
|
|
7
|
-
<react_native_1.TextInput placeholder={n("analytics.searchPlaceholder","Search events...")}placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={
|
|
8
|
-
{
|
|
7
|
+
<react_native_1.TextInput placeholder={n("analytics.searchPlaceholder","Search events...")}placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={o}onChangeText={s}style={styles_1.default.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
8
|
+
{o.length>0&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
9
9
|
<react_native_1.View style={{backgroundColor:`${AppColors_1.AppColors.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
10
10
|
<react_native_1.Text style={{color:AppColors_1.AppColors.purple,fontSize:9.5,fontFamily:AppFonts_1.AppFonts.interBold}}>
|
|
11
|
-
{
|
|
11
|
+
{a.length}
|
|
12
12
|
</react_native_1.Text>
|
|
13
13
|
</react_native_1.View>
|
|
14
14
|
<react_native_1.Pressable onPress={()=>s("")}hitSlop={10}style={styles_1.default.clearBtn}>
|
|
@@ -17,17 +17,13 @@
|
|
|
17
17
|
</react_native_1.View>}
|
|
18
18
|
</react_native_1.View>
|
|
19
19
|
<react_native_1.View style={styles_1.default.toolbarRight}>
|
|
20
|
-
<react_native_1.TouchableOpacity style={[styles_1.default.toolbarBtn,w&&{borderColor:`${AppColors_1.AppColors.darkOrange}50`,backgroundColor:`${AppColors_1.AppColors.darkOrange}18`}]}onPress={()=>N(e=>!e)}hitSlop={6}>
|
|
21
|
-
<NetworkIcons_1.HeaderPauseIcon isPaused={w}color={w?AppColors_1.AppColors.darkOrange:AppColors_1.AppColors.grayTextStrong}size={16}/>
|
|
22
|
-
</react_native_1.TouchableOpacity>
|
|
23
|
-
|
|
24
20
|
|
|
25
|
-
<react_native_1.TouchableOpacity style={[styles_1.default.toolbarBtn,
|
|
26
|
-
<NetworkIcons_1.FilterIcon color={
|
|
27
|
-
{
|
|
21
|
+
<react_native_1.TouchableOpacity style={[styles_1.default.toolbarBtn,w&&{borderColor:`${AppColors_1.AppColors.brandPurple}60`,backgroundColor:`${AppColors_1.AppColors.brandPurple}15`}]}onPress={()=>E(!0)}hitSlop={6}>
|
|
22
|
+
<NetworkIcons_1.FilterIcon color={w?AppColors_1.AppColors.brandPurple:AppColors_1.AppColors.grayTextStrong}size={15}/>
|
|
23
|
+
{w&&<react_native_1.View style={{position:"absolute",top:2,right:2,width:7,height:7,borderRadius:3.5,backgroundColor:AppColors_1.AppColors.darkOrange,borderWidth:1,borderColor:AppColors_1.AppColors.white}}/>}
|
|
28
24
|
</react_native_1.TouchableOpacity>
|
|
29
25
|
|
|
30
|
-
<react_native_1.TouchableOpacity style={[styles_1.default.toolbarBtn,{borderColor:`${AppColors_1.AppColors.errorColor}38`,backgroundColor:`${AppColors_1.AppColors.errorColor}0F`}]}onPress={
|
|
26
|
+
<react_native_1.TouchableOpacity style={[styles_1.default.toolbarBtn,{borderColor:`${AppColors_1.AppColors.errorColor}38`,backgroundColor:`${AppColors_1.AppColors.errorColor}0F`}]}onPress={B}hitSlop={6}>
|
|
31
27
|
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor}size={15}/>
|
|
32
28
|
</react_native_1.TouchableOpacity>
|
|
33
29
|
</react_native_1.View>
|
|
@@ -36,14 +32,14 @@
|
|
|
36
32
|
|
|
37
33
|
<react_native_1.View style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
|
|
38
34
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
39
|
-
{[{id:"all",label:n("common.all","All"),count:u.totalCount,color:AppColors_1.AppColors.purple,Icon:NetworkIcons_1.LayersIcon},{id:"ecommerce",label:"Ecommerce",count:u.ecommerce,color:AppColors_1.AppColors.amber600,Icon:NetworkIcons_1.CartIcon},{id:"page_view",label:"Screens",count:u.page_view,color:AppColors_1.AppColors.sky600,Icon:NetworkIcons_1.GlobeIcon},{id:"system",label:"System",count:u.system,color:AppColors_1.AppColors.violet600,Icon:NetworkIcons_1.BoltIcon},{id:"custom",label:"Custom",count:u.custom,color:AppColors_1.AppColors.teal600,Icon:NetworkIcons_1.SparkleIcon}].map(e=>{const
|
|
40
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:
|
|
35
|
+
{[{id:"all",label:n("common.all","All"),count:u.totalCount,color:AppColors_1.AppColors.purple,Icon:NetworkIcons_1.LayersIcon},{id:"ecommerce",label:"Ecommerce",count:u.ecommerce,color:AppColors_1.AppColors.amber600,Icon:NetworkIcons_1.CartIcon},{id:"page_view",label:"Screens",count:u.page_view,color:AppColors_1.AppColors.sky600,Icon:NetworkIcons_1.GlobeIcon},{id:"system",label:"System",count:u.system,color:AppColors_1.AppColors.violet600,Icon:NetworkIcons_1.BoltIcon},{id:"custom",label:"Custom",count:u.custom,color:AppColors_1.AppColors.teal600,Icon:NetworkIcons_1.SparkleIcon}].map(e=>{const r=e.id==="all"?m.categories.has("all"):!m.categories.has("all")&&m.categories.has(e.id),t=e.color||AppColors_1.AppColors.purple,i=r?AppColors_1.AppColors.white:t,_=e.Icon;return<TouchableScale_1.default key={e.id}onPress={()=>j(e.id)}>
|
|
36
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:r?t:`${t}12`,borderWidth:1,borderColor:r?t:`${t}30`,gap:5}}>
|
|
41
37
|
<_ size={11}color={i}/>
|
|
42
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:
|
|
38
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:r?AppColors_1.AppColors.white:AppColors_1.AppColors.primaryBlack}}>
|
|
43
39
|
{e.label}
|
|
44
40
|
</react_native_1.Text>
|
|
45
|
-
<react_native_1.View style={{backgroundColor:
|
|
46
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:
|
|
41
|
+
<react_native_1.View style={{backgroundColor:r?"rgba(255,255,255,0.25)":`${t}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8,alignItems:"center",justifyContent:"center"}}>
|
|
42
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:r?AppColors_1.AppColors.white:t}}>
|
|
47
43
|
{e.count}
|
|
48
44
|
</react_native_1.Text>
|
|
49
45
|
</react_native_1.View>
|
|
@@ -54,11 +50,11 @@
|
|
|
54
50
|
</react_native_1.View>}
|
|
55
51
|
|
|
56
52
|
|
|
57
|
-
<AnalyticsFilterModal_1.default visible={
|
|
53
|
+
<AnalyticsFilterModal_1.default visible={D}onClose={()=>E(!1)}/>
|
|
58
54
|
|
|
59
|
-
<react_native_1.View style={{flex:1}}onLayout={()=>
|
|
60
|
-
{
|
|
61
|
-
<react_native_1.FlatList ref={
|
|
55
|
+
<react_native_1.View style={{flex:1}}onLayout={()=>k(!0)}>
|
|
56
|
+
{N?<>
|
|
57
|
+
<react_native_1.FlatList ref={P}data={S}keyExtractor={$}renderItem={H}getItemLayout={W}initialNumToRender={15}maxToRenderPerBatch={10}windowSize={9}removeClippedSubviews={react_native_1.Platform.OS==="android"}renderToHardwareTextureAndroid={!0}ListEmptyComponent={<EmptyState_1.default isSearch={o.length>0}searchQuery={o}customTitle={o.length>0?"No matching analytics events":"No analytics events yet"}customSub={o.length>0?`No events matched "${o}"`:"Call setupAnalyticsLogger(analytics()) at app start."}onClearSearch={()=>s("")}/>}ListFooterComponent={a.length>0?<EndOfListFooter_1.default count={S.length}totalCount={a.length}label="events"loadMoreStep={LOAD_MORE_STEP}hasMore={S.length<a.length}onLoadMore={()=>M(e=>e+LOAD_MORE_STEP)}/>:null}contentContainerStyle={[styles_1.default.listContent,a.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
62
58
|
</>:null}
|
|
63
59
|
</react_native_1.View>
|
|
64
60
|
</>});exports.default=AnalyticsTab;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,o,l,n){n===void 0&&(n=l);var a=Object.getOwnPropertyDescriptor(o,l);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[l]}}),Object.defineProperty(t,n,a)}):(function(t,o,l,n){n===void 0&&(n=l),t[n]=o[l]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,o){Object.defineProperty(t,"default",{enumerable:!0,value:o})}):function(t,o){t.default=o}),__importStar=this&&this.__importStar||(function(){var t=function(o){return t=Object.getOwnPropertyNames||function(l){var n=[];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(n[n.length]=a);return n},t(o)};return function(o){if(o&&o.__esModule)return o;var l={};if(o!=null)for(var n=t(o),a=0;a<n.length;a++)n[a]!=="default"&&__createBinding(l,o,n[a]);return __setModuleDefault(l,o),l}})(),__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),InspectorContext_1=require("./InspectorContext"),i18n_1=require("../../i18n"),TouchableScale_1=__importDefault(require("../TouchableScale")),AnimatedEntrance_1=__importDefault(require("../AnimatedEntrance")),ConsoleLogCard_1=require("../ConsoleLogCard"),EmptyState_1=__importDefault(require("../EmptyState")),EndOfListFooter_1=__importDefault(require("../EndOfListFooter")),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),types_1=require("../../types"),NetworkIcons_1=require("../NetworkIcons"),ConsoleTab=react_1.default.memo(()=>{const{t}=(0,i18n_1.useTranslation)(),{logSearch:o,setLogSearch:l,logSortOrder:n,setLogSortOrder:a,handleDelete:
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,o,l,n){n===void 0&&(n=l);var a=Object.getOwnPropertyDescriptor(o,l);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[l]}}),Object.defineProperty(t,n,a)}):(function(t,o,l,n){n===void 0&&(n=l),t[n]=o[l]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,o){Object.defineProperty(t,"default",{enumerable:!0,value:o})}):function(t,o){t.default=o}),__importStar=this&&this.__importStar||(function(){var t=function(o){return t=Object.getOwnPropertyNames||function(l){var n=[];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(n[n.length]=a);return n},t(o)};return function(o){if(o&&o.__esModule)return o;var l={};if(o!=null)for(var n=t(o),a=0;a<n.length;a++)n[a]!=="default"&&__createBinding(l,o,n[a]);return __setModuleDefault(l,o),l}})(),__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),InspectorContext_1=require("./InspectorContext"),i18n_1=require("../../i18n"),TouchableScale_1=__importDefault(require("../TouchableScale")),AnimatedEntrance_1=__importDefault(require("../AnimatedEntrance")),ConsoleLogCard_1=require("../ConsoleLogCard"),EmptyState_1=__importDefault(require("../EmptyState")),EndOfListFooter_1=__importDefault(require("../EndOfListFooter")),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),types_1=require("../../types"),NetworkIcons_1=require("../NetworkIcons"),LOAD_MORE_STEP=10,ConsoleTab=react_1.default.memo(()=>{const{t}=(0,i18n_1.useTranslation)(),{logSearch:o,setLogSearch:l,logSortOrder:n,setLogSortOrder:a,handleDelete:L,logFilters:s,setLogFilters:A,logCounts:_,filteredConsoleLogs:c,visibleConsoleLogs:b,maxConsoleLogs:S}=(0,InspectorContext_1.useInspector)(),V=S||100,T=(0,react_1.useRef)(null),[I,v]=react_1.default.useState(V);react_1.default.useEffect(()=>{v(S||100),T.current?.scrollToOffset({offset:0,animated:!1})},[o,s,S]);const w=(0,react_1.useMemo)(()=>c.slice(0,I),[c,I]),F=(0,react_1.useCallback)(({item:e,index:r})=><AnimatedEntrance_1.default index={r}distance={8}>
|
|
2
2
|
<ConsoleLogCard_1.ConsoleLogCard item={e}searchStr={o}/>
|
|
3
|
-
</AnimatedEntrance_1.default>,[o]),
|
|
3
|
+
</AnimatedEntrance_1.default>,[o]),z=(0,react_1.useCallback)((e,r)=>({length:148,offset:148*r,index:r}),[]),O=(0,react_1.useCallback)((e,r)=>e?.id?.toString()??r.toString(),[]),E=(0,react_1.useMemo)(()=>{const e=b.length,r=c.length;if(s.has("all")||!Array.from(s).some(h=>h!=="all"))return<react_native_1.View style={{paddingHorizontal:12,paddingTop:8,paddingBottom:3}}>
|
|
4
4
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.grayTextWeak,letterSpacing:.2}}>
|
|
5
5
|
{r===e?`Showing ${e} logs`:`Showing ${r} of ${e} logs`}
|
|
6
6
|
</react_native_1.Text>
|
|
7
|
-
</react_native_1.View>;{const h=Array.from(
|
|
7
|
+
</react_native_1.View>;{const h=Array.from(s).filter(C=>C!=="all").map(C=>C==="user-log"?"Log":C==="analytics"?"Analytics":C.charAt(0).toUpperCase()+C.slice(1));return<react_native_1.View style={{paddingHorizontal:12,paddingTop:8,paddingBottom:3}}>
|
|
8
8
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.grayTextWeak,letterSpacing:.2}}>
|
|
9
9
|
Filtered by {h.join(", ")} ({r} of {e} logs)
|
|
10
10
|
</react_native_1.Text>
|
|
11
|
-
</react_native_1.View>}},[
|
|
11
|
+
</react_native_1.View>}},[b.length,c.length,s]),[m,x]=react_1.default.useState(!1),P=(0,react_1.useMemo)(()=>["[AXIOS]","[API]","[GRAPHQL]","[REDUX]","[ANALYTICS]","[AUTH]","[NAV]","[STORAGE]","[PERF]","[WS]","[PUSH]","[PAYMENT]","[SYNC]","[BLE]","[LOCATION]","[TEST]","[DEBUG]"],[]),B=(0,react_1.useMemo)(()=>[{id:types_1.LogFilter.All,label:t("common.all","All"),count:_.all?.split("/")?.[0]??"0",color:AppColors_1.AppColors.purple,Icon:NetworkIcons_1.LayersIcon},{id:types_1.LogFilter.UserLog,label:t("console.log","Log"),count:_["user-log"]?.split("/")?.[0]??"0",color:AppColors_1.AppColors.teal600,Icon:NetworkIcons_1.UserIcon},{id:types_1.LogFilter.Info,label:t("console.info","Info"),count:_.info?.split("/")?.[0]??"0",color:AppColors_1.AppColors.sky600,Icon:NetworkIcons_1.InfoCircleIcon},{id:types_1.LogFilter.Warn,label:t("console.warning","Warn"),count:_.warn?.split("/")?.[0]??"0",color:AppColors_1.AppColors.amber600,Icon:NetworkIcons_1.WarningTriangleIcon},{id:types_1.LogFilter.Error,label:t("console.error","Error"),count:_.error?.split("/")?.[0]??"0",color:AppColors_1.AppColors.errorColor,Icon:NetworkIcons_1.ErrorCircleIcon},{id:types_1.LogFilter.Analytics,label:t("console.analytics","Analytics"),count:_.analytics?.split("/")?.[0]??"0",color:AppColors_1.AppColors.violet600,Icon:NetworkIcons_1.AnalyticsIcon}],[_,t]);return<react_native_1.View style={{flex:1}}>
|
|
12
12
|
<react_native_1.View style={{backgroundColor:AppColors_1.AppColors.white,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,paddingBottom:6}}>
|
|
13
13
|
<react_native_1.View style={[styles_1.default.toolbarRow,{marginTop:12,marginBottom:8}]}>
|
|
14
|
-
<react_native_1.View style={[styles_1.default.searchContainer,
|
|
15
|
-
<NetworkIcons_1.SearchIcon color={
|
|
16
|
-
<react_native_1.TextInput placeholder={t("console.searchPlaceholder")}placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={o}onChangeText={l}onFocus={()=>
|
|
14
|
+
<react_native_1.View style={[styles_1.default.searchContainer,m&&{borderColor:AppColors_1.AppColors.purple,borderWidth:1.5}]}>
|
|
15
|
+
<NetworkIcons_1.SearchIcon color={m?AppColors_1.AppColors.purple:AppColors_1.AppColors.grayTextWeak}size={16}/>
|
|
16
|
+
<react_native_1.TextInput placeholder={t("console.searchPlaceholder")}placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={o}onChangeText={l}onFocus={()=>x(!0)}onBlur={()=>x(!1)}style={styles_1.default.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
17
17
|
{o.length>0&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
18
18
|
<react_native_1.View style={{backgroundColor:`${AppColors_1.AppColors.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:2}}>
|
|
19
19
|
<react_native_1.Text style={{color:AppColors_1.AppColors.purple,fontSize:10,fontFamily:AppFonts_1.AppFonts.interBold}}>
|
|
20
|
-
{
|
|
20
|
+
{c.length}
|
|
21
21
|
</react_native_1.Text>
|
|
22
22
|
</react_native_1.View>
|
|
23
23
|
<react_native_1.Pressable onPress={()=>l("")}hitSlop={10}style={styles_1.default.clearBtn}>
|
|
@@ -27,21 +27,18 @@
|
|
|
27
27
|
</react_native_1.View>
|
|
28
28
|
|
|
29
29
|
<react_native_1.View style={styles_1.default.toolbarRight}>
|
|
30
|
-
<TouchableScale_1.default style={[styles_1.default.toolbarBtn,S&&{borderColor:`${AppColors_1.AppColors.darkOrange}50`,backgroundColor:`${AppColors_1.AppColors.darkOrange}18`}]}onPress={()=>x(e=>!e)}hitSlop={6}>
|
|
31
|
-
<NetworkIcons_1.HeaderPauseIcon isPaused={S}color={S?AppColors_1.AppColors.darkOrange:AppColors_1.AppColors.grayTextStrong}size={16}/>
|
|
32
|
-
</TouchableScale_1.default>
|
|
33
30
|
<TouchableScale_1.default style={styles_1.default.toolbarBtn}onPress={()=>a(e=>e==="newest"?"oldest":"newest")}hitSlop={10}>
|
|
34
31
|
<NetworkIcons_1.SortArrowIcon color={AppColors_1.AppColors.grayTextStrong}size={18}direction={n==="newest"?"down":"up"}/>
|
|
35
32
|
</TouchableScale_1.default>
|
|
36
|
-
<TouchableScale_1.default style={[styles_1.default.toolbarBtn,{borderColor:`${AppColors_1.AppColors.errorColor}38`,backgroundColor:`${AppColors_1.AppColors.errorColor}0F`}]}onPress={
|
|
33
|
+
<TouchableScale_1.default style={[styles_1.default.toolbarBtn,{borderColor:`${AppColors_1.AppColors.errorColor}38`,backgroundColor:`${AppColors_1.AppColors.errorColor}0F`}]}onPress={L}hitSlop={6}>
|
|
37
34
|
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor}size={15}/>
|
|
38
35
|
</TouchableScale_1.default>
|
|
39
36
|
</react_native_1.View>
|
|
40
37
|
</react_native_1.View>
|
|
41
38
|
|
|
42
39
|
|
|
43
|
-
{(
|
|
44
|
-
{
|
|
40
|
+
{(m||o.length>0)&&<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}style={{marginBottom:6,maxHeight:30}}contentContainerStyle={{paddingHorizontal:16,flexDirection:"row",alignItems:"center",gap:6}}>
|
|
41
|
+
{P.map(e=>{const r=o.includes(e);return<TouchableScale_1.default key={e}onPress={()=>{l(r?i=>i.replace(e,"").trim():i=>i?`${i} ${e}`.trim():e)}}>
|
|
45
42
|
<react_native_1.View style={{paddingHorizontal:8,paddingVertical:3,borderRadius:6,backgroundColor:r?AppColors_1.AppColors.purple:`${AppColors_1.AppColors.purple}14`,borderWidth:1,borderColor:r?AppColors_1.AppColors.purple:`${AppColors_1.AppColors.purple}30`}}>
|
|
46
43
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:r?AppColors_1.AppColors.white:AppColors_1.AppColors.purple}}>
|
|
47
44
|
{e}
|
|
@@ -53,7 +50,7 @@
|
|
|
53
50
|
|
|
54
51
|
<react_native_1.View style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
|
|
55
52
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
56
|
-
{
|
|
53
|
+
{B.map(e=>{const r=e.id==="all"?s.has("all"):s.has(e.id)&&!s.has("all"),i=e.color||AppColors_1.AppColors.purple,h=r?AppColors_1.AppColors.white:i,C=e.Icon;return<TouchableScale_1.default key={e.id}onPress={()=>{e.id==="all"?A(new Set(["all"])):A(H=>{const y=new Set(H);return y.delete("all"),y.has(e.id)?y.delete(e.id):y.add(e.id),y.size===0&&y.add("all"),y})}}>
|
|
57
54
|
<react_native_1.View style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:r?i:`${i}12`,borderWidth:1,borderColor:r?i:`${i}30`,gap:5}}>
|
|
58
55
|
<C size={11}color={h}/>
|
|
59
56
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:r?AppColors_1.AppColors.white:AppColors_1.AppColors.primaryBlack}}>
|
|
@@ -70,5 +67,5 @@
|
|
|
70
67
|
</react_native_1.View>
|
|
71
68
|
</react_native_1.View>
|
|
72
69
|
|
|
73
|
-
<react_native_1.FlatList ref={
|
|
70
|
+
<react_native_1.FlatList ref={T}data={w}keyExtractor={O}ListHeaderComponent={E}renderItem={F}getItemLayout={z}initialNumToRender={15}maxToRenderPerBatch={10}windowSize={9}removeClippedSubviews={react_native_1.Platform.OS==="android"}renderToHardwareTextureAndroid={!0}ListEmptyComponent={<EmptyState_1.default isSearch={o.length>0||!s.has("all")}searchQuery={o}customTitle={o.length>0?"No matching console logs":"No console logs"}onClearSearch={()=>{l(""),A(new Set(["all"]))}}/>}ListFooterComponent={c.length>0?<EndOfListFooter_1.default count={w.length}totalCount={c.length}label="logs"loadMoreStep={LOAD_MORE_STEP}hasMore={w.length<c.length}onLoadMore={()=>v(e=>e+LOAD_MORE_STEP)}/>:null}contentContainerStyle={[styles_1.default.listContent,c.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
74
71
|
</react_native_1.View>});exports.default=ConsoleTab;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,a,i){i===void 0&&(i=a);var o=Object.getOwnPropertyDescriptor(e,a);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,o)}):(function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),__importStar=this&&this.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(a){var i=[];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(i[i.length]=o);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var i=t(e),o=0;o<i.length;o++)i[o]!=="default"&&__createBinding(a,e,i[o]);return __setModuleDefault(a,e),a}})(),__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),i18n_1=require("../../i18n"),InspectorContext_1=require("./InspectorContext"),TouchableScale_1=__importDefault(require("../TouchableScale")),SegmentedTabs_1=__importDefault(require("../SegmentedTabs")),HighlightText_1=__importDefault(require("../HighlightText")),JsonViewer_1=__importDefault(require("../JsonViewer")),CopyButton_1=__importDefault(require("../CopyButton")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),crashHandler_1=require("../../customHooks/crashHandler"),helpers_1=require("../../helpers"),NetworkIcons_1=require("../NetworkIcons"),CrashDetail=react_1.default.memo(()=>{const{t}=(0,i18n_1.useTranslation)(),{selectedCrash:e}=(0,InspectorContext_1.useInspector)(),[a,i]=(0,react_1.useState)("stack"),[o,
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,a,i){i===void 0&&(i=a);var o=Object.getOwnPropertyDescriptor(e,a);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,o)}):(function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),__importStar=this&&this.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(a){var i=[];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(i[i.length]=o);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var i=t(e),o=0;o<i.length;o++)i[o]!=="default"&&__createBinding(a,e,i[o]);return __setModuleDefault(a,e),a}})(),__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),i18n_1=require("../../i18n"),InspectorContext_1=require("./InspectorContext"),TouchableScale_1=__importDefault(require("../TouchableScale")),SegmentedTabs_1=__importDefault(require("../SegmentedTabs")),HighlightText_1=__importDefault(require("../HighlightText")),JsonViewer_1=__importDefault(require("../JsonViewer")),CopyButton_1=__importDefault(require("../CopyButton")),ShareButton_1=__importDefault(require("../ShareButton")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),crashHandler_1=require("../../customHooks/crashHandler"),helpers_1=require("../../helpers"),shareFormatter_1=require("../../helpers/shareFormatter"),NetworkIcons_1=require("../NetworkIcons"),CrashDetail=react_1.default.memo(()=>{const{t}=(0,i18n_1.useTranslation)(),{selectedCrash:e}=(0,InspectorContext_1.useInspector)(),[a,i]=(0,react_1.useState)("stack"),[o,g]=(0,react_1.useState)(""),[n,C]=(0,react_1.useState)("app"),[c,y]=(0,react_1.useState)(!1),[m,_]=(0,react_1.useState)(null);if(!e)return null;const s=(0,react_1.useMemo)(()=>e.parsedStack&&e.parsedStack.length>0?e.parsedStack:e.stack?(0,crashHandler_1.parseCrashStackTrace)(e.stack):[],[e]),h=(0,react_1.useMemo)(()=>{try{return JSON.parse(JSON.stringify(e))}catch{return e}},[e]),p=(0,react_1.useMemo)(()=>s.filter(r=>r.isAppCode),[s]),f=(0,react_1.useMemo)(()=>n==="app"&&p.length>0?p:s,[n,p,s]),d=(0,react_1.useMemo)(()=>p[0]||s[0]||null,[p,s]),T=()=>{const r=(0,crashHandler_1.exportCrashReport)(e);(0,helpers_1.copyToClipboard)(r,"Crash Report"),y(!0),setTimeout(()=>y(!1),2e3)},x=(r,l)=>{const u=r.raw||`${r.method}@${r.file}:${r.lineNumber}:${r.column}`;(0,helpers_1.copyToClipboard)(u,"Stack Frame"),_(l),setTimeout(()=>_(null),1500)},b=[{key:"stack",label:t("crash.tabStack",{count:s.length}),icon:r=><NetworkIcons_1.StackTraceIcon size={12}color={r?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}/>},{key:"diagnostics",label:t("crash.tabDiagnostics"),icon:r=><NetworkIcons_1.DiagnosticsIcon size={12}color={r?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}/>},{key:"breadcrumbs",label:t("crash.tabTrail",{count:e.breadcrumbs?.length||0}),icon:r=><NetworkIcons_1.TrailIcon size={12}color={r?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}/>},{key:"raw",label:t("crash.tabRawJson"),icon:r=><NetworkIcons_1.RawJsonIcon size={12}color={r?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}/>}];return<react_native_1.View style={{flex:1,backgroundColor:AppColors_1.AppColors.grayBackground}}>
|
|
2
2
|
|
|
3
3
|
<react_native_1.View style={{paddingHorizontal:8,paddingTop:6}}>
|
|
4
4
|
<react_native_1.View style={localStyles.infoBar}>
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
<react_native_1.View style={{flex:1}}/>
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
<
|
|
25
|
+
<ShareButton_1.default onShare={()=>(0,shareFormatter_1.shareCrashReport)(e)}/>
|
|
26
|
+
<TouchableScale_1.default onPress={T}hitSlop={10}style={[localStyles.actionButton,c&&{backgroundColor:AppColors_1.AppColors.mintGreenBg,borderColor:AppColors_1.AppColors.mintGreenBorder}]}>
|
|
26
27
|
{c?<NetworkIcons_1.CircleCheckIcon color={AppColors_1.AppColors.mintGreenText}size={12}/>:<NetworkIcons_1.CopyIcon color={AppColors_1.AppColors.purple}size={12}/>}
|
|
27
28
|
<react_native_1.Text style={[localStyles.actionButtonText,c&&{color:AppColors_1.AppColors.mintGreenText}]}>
|
|
28
29
|
{t(c?"crash.copied":"crash.copyReport")}
|
|
@@ -70,8 +71,8 @@
|
|
|
70
71
|
{(a==="stack"||a==="raw")&&<react_native_1.View style={{paddingHorizontal:12,paddingBottom:6}}>
|
|
71
72
|
<react_native_1.View style={localStyles.searchContainer}>
|
|
72
73
|
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayText}size={14}/>
|
|
73
|
-
<react_native_1.TextInput style={localStyles.searchInput}placeholder={t("crash.searchDetailPlaceholder")}placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={o}onChangeText={
|
|
74
|
-
{o.length>0&&<TouchableScale_1.default onPress={()=>
|
|
74
|
+
<react_native_1.TextInput style={localStyles.searchInput}placeholder={t("crash.searchDetailPlaceholder")}placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={o}onChangeText={g}autoCapitalize="none"autoCorrect={!1}/>
|
|
75
|
+
{o.length>0&&<TouchableScale_1.default onPress={()=>g("")}hitSlop={10}>
|
|
75
76
|
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayText}size={13}/>
|
|
76
77
|
</TouchableScale_1.default>}
|
|
77
78
|
</react_native_1.View>
|
|
@@ -99,7 +100,7 @@
|
|
|
99
100
|
</react_native_1.View>
|
|
100
101
|
|
|
101
102
|
|
|
102
|
-
{f.length>0?f.filter(r=>{if(!o.trim())return!0;const l=o.toLowerCase();return r.method.toLowerCase().includes(l)||r.file.toLowerCase().includes(l)}).map((r,l)=>{const
|
|
103
|
+
{f.length>0?f.filter(r=>{if(!o.trim())return!0;const l=o.toLowerCase();return r.method.toLowerCase().includes(l)||r.file.toLowerCase().includes(l)}).map((r,l)=>{const u=l===0&&r.isAppCode;return<react_native_1.View key={`frame_${l}`}style={[localStyles.frameCard,u&&localStyles.originFrameCard]}>
|
|
103
104
|
<react_native_1.View style={localStyles.frameCardHeader}>
|
|
104
105
|
<react_native_1.View style={localStyles.frameIndexBadge}>
|
|
105
106
|
<react_native_1.Text style={localStyles.frameIndexBadgeText}>
|
|
@@ -277,7 +278,7 @@
|
|
|
277
278
|
|
|
278
279
|
|
|
279
280
|
{a==="raw"&&<react_native_1.View style={localStyles.rawContainer}>
|
|
280
|
-
<JsonViewer_1.default data={
|
|
281
|
+
<JsonViewer_1.default data={h}search={o}wrap/>
|
|
281
282
|
</react_native_1.View>}
|
|
282
283
|
</react_native_1.ScrollView>
|
|
283
284
|
</react_native_1.View>});exports.default=CrashDetail;const localStyles=react_native_1.StyleSheet.create({infoBar:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:12,padding:12,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,shadowColor:AppColors_1.AppColors.black,shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:3,elevation:2,gap:8},badgeRow:{flexDirection:"row",alignItems:"center",gap:8},pillBadge:{flexDirection:"row",alignItems:"center",paddingHorizontal:8,paddingVertical:3,borderRadius:12,borderWidth:1,gap:5},statusDot:{width:6,height:6,borderRadius:3},pillBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,letterSpacing:.4},actionButton:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:`${AppColors_1.AppColors.purple}14`,borderColor:`${AppColors_1.AppColors.purple}33`,borderWidth:1,paddingHorizontal:8,paddingVertical:4,borderRadius:8},actionButtonText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.purple},titleText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:14,color:AppColors_1.AppColors.primaryBlack,lineHeight:19},metaRow:{flexDirection:"row",alignItems:"center",gap:6,paddingVertical:2},metaChip:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:AppColors_1.AppColors.grayBackground,paddingHorizontal:7,paddingVertical:3,borderRadius:6,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},metaChipText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10,color:AppColors_1.AppColors.grayText},searchContainer:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.primaryLight,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,borderRadius:8,paddingHorizontal:10,height:36,gap:8},searchInput:{flex:1,fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:12,color:AppColors_1.AppColors.primaryBlack,paddingVertical:0},filterChipsRow:{flexDirection:"row",alignItems:"center",gap:8},filterChip:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:10,paddingVertical:5,borderRadius:8,backgroundColor:AppColors_1.AppColors.primaryLight,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},filterChipActive:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},filterChipText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.grayText},filterChipTextActive:{fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.white},frameCard:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:8,padding:10,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,gap:4},originFrameCard:{borderColor:AppColors_1.AppColors.greenMintBorder,backgroundColor:AppColors_1.AppColors.greenMintBg},frameCardHeader:{flexDirection:"row",alignItems:"center",gap:8},frameIndexBadge:{minWidth:24,height:18,paddingHorizontal:4,borderRadius:4,backgroundColor:`${AppColors_1.AppColors.purple}14`,alignItems:"center",justifyContent:"center"},frameIndexBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9,color:AppColors_1.AppColors.purple},frameTypeBadge:{paddingHorizontal:5,paddingVertical:2,borderRadius:4,borderWidth:1},frameTypeBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5},frameMethodText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.primaryBlack,flex:1},frameLocationRow:{flexDirection:"row",alignItems:"center"},frameFileText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,color:AppColors_1.AppColors.grayText,flex:1},frameLineText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.purple},frameCopyBtn:{flexDirection:"row",alignItems:"center",gap:3,paddingHorizontal:6,paddingVertical:3,borderRadius:5,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},frameCopyBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9,color:AppColors_1.AppColors.grayText},frameRawText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak,backgroundColor:`${AppColors_1.AppColors.primaryBlack}06`,borderRadius:5,paddingHorizontal:7,paddingVertical:4,overflow:"hidden"},componentStackText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,lineHeight:16,color:AppColors_1.AppColors.grayText,backgroundColor:`${AppColors_1.AppColors.primaryBlack}06`,borderRadius:6,padding:10},sectionCard:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:10,padding:12,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,gap:10},sectionCardHeader:{flexDirection:"row",alignItems:"center",gap:6,paddingBottom:6,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor},sectionCardTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12.5,color:AppColors_1.AppColors.primaryBlack},diagGrid:{flexDirection:"row",flexWrap:"wrap",rowGap:8,columnGap:12},diagItem:{width:"47%",gap:2},diagLabel:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.grayTextWeak},diagValue:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11.5,color:AppColors_1.AppColors.primaryBlack},breadcrumbCard:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:8,padding:10,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,gap:4},breadcrumbHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},breadcrumbTag:{backgroundColor:`${AppColors_1.AppColors.purple}14`,paddingHorizontal:6,paddingVertical:2,borderRadius:4},breadcrumbTagText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9,color:AppColors_1.AppColors.purple},breadcrumbTime:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.grayTextWeak},breadcrumbMessage:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11.5,color:AppColors_1.AppColors.primaryBlack,marginTop:2},rawContainer:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:10,padding:10,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},emptyContainer:{padding:16,alignItems:"center",justifyContent:"center",backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:8,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},emptyText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,color:AppColors_1.AppColors.grayText,textAlign:"center"}});
|