react-native-inapp-inspector 2.3.23 → 2.3.25
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/dist/commonjs/components/AnalyticsDetail.js +8 -8
- package/dist/commonjs/components/AnalyticsEventCard.js +11 -8
- package/dist/commonjs/components/AppHeaderLogo.js +1 -1
- package/dist/commonjs/components/BrandSquareIcon.js +12 -12
- package/dist/commonjs/components/ConsoleLogCard.d.ts +1 -0
- package/dist/commonjs/components/ConsoleLogCard.js +92 -80
- package/dist/commonjs/components/EndOfListFooter.d.ts +5 -1
- package/dist/commonjs/components/EndOfListFooter.js +27 -5
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +30 -298
- package/dist/commonjs/components/Inspector/ConsoleTab.js +38 -93
- package/dist/commonjs/components/Inspector/CrashDetail.js +12 -12
- package/dist/commonjs/components/Inspector/CrashTab.js +43 -33
- package/dist/commonjs/components/Inspector/DebuggingTab.js +9 -9
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +54 -52
- package/dist/commonjs/components/Inspector/InspectorHeader.js +1 -1
- package/dist/commonjs/components/Inspector/LogDetail.js +6 -6
- package/dist/commonjs/components/Inspector/MainScreen.js +23 -25
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +1 -1
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +3 -3
- package/dist/commonjs/components/Inspector/NetworkTab.js +31 -31
- package/dist/commonjs/components/Inspector/NpmStarPrompt.js +3 -3
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +21 -22
- package/dist/commonjs/components/Inspector/ReduxDetail.js +1 -1
- package/dist/commonjs/components/Inspector/ReduxTab.js +110 -97
- package/dist/commonjs/components/Inspector/SettingsPanel.js +48 -100
- package/dist/commonjs/components/Inspector/StorageTab.js +56 -52
- package/dist/commonjs/components/Inspector/TabBar.js +29 -26
- package/dist/commonjs/components/JsonViewer.js +169 -164
- package/dist/commonjs/components/LogCard.js +34 -38
- package/dist/commonjs/components/LogSyntaxHighlighter.js +3 -3
- package/dist/commonjs/components/SegmentedTabs.d.ts +4 -1
- package/dist/commonjs/components/SegmentedTabs.js +8 -8
- package/dist/commonjs/constants/index.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/networkLogger.js +1 -2
- package/dist/commonjs/helpers/index.d.ts +6 -0
- package/dist/commonjs/helpers/index.js +4 -4
- package/dist/commonjs/helpers/memoryManager.d.ts +0 -1
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/remoteConfig.js +1 -1
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/i18n/index.d.ts +35 -0
- package/dist/commonjs/i18n/index.js +1 -1
- package/dist/commonjs/i18n/locales/ar.json +1 -0
- package/dist/commonjs/i18n/locales/de.json +1 -0
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -0
- package/dist/commonjs/i18n/locales/fr.json +1 -0
- package/dist/commonjs/i18n/locales/hi.json +1 -0
- package/dist/commonjs/i18n/locales/ja.json +1 -0
- package/dist/commonjs/i18n/locales/ko.json +1 -0
- package/dist/commonjs/i18n/locales/pt.json +1 -0
- package/dist/commonjs/i18n/locales/ru.json +1 -0
- package/dist/commonjs/i18n/locales/zh.json +1 -0
- package/dist/commonjs/index.d.ts +2 -4
- package/dist/commonjs/index.js +2 -2
- package/dist/commonjs/styles/AppColors.d.ts +40 -0
- package/dist/commonjs/styles/AppColors.js +1 -1
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/enums.d.ts +0 -20
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/esm/components/AnalyticsDetail.js +75 -75
- package/dist/esm/components/AnalyticsEventCard.js +20 -17
- package/dist/esm/components/AppHeaderLogo.js +5 -5
- package/dist/esm/components/BrandSquareIcon.js +39 -39
- package/dist/esm/components/ConsoleLogCard.d.ts +1 -0
- package/dist/esm/components/ConsoleLogCard.js +98 -86
- package/dist/esm/components/EndOfListFooter.d.ts +5 -1
- package/dist/esm/components/EndOfListFooter.js +36 -14
- package/dist/esm/components/Inspector/AnalyticsTab.js +47 -315
- package/dist/esm/components/Inspector/ConsoleTab.js +61 -116
- package/dist/esm/components/Inspector/CrashDetail.js +49 -49
- package/dist/esm/components/Inspector/CrashTab.js +75 -65
- package/dist/esm/components/Inspector/DebuggingTab.js +31 -31
- package/dist/esm/components/Inspector/DeviceInfoTab.js +146 -144
- package/dist/esm/components/Inspector/InspectorHeader.js +5 -5
- package/dist/esm/components/Inspector/LogDetail.js +1 -1
- package/dist/esm/components/Inspector/MainScreen.js +51 -53
- package/dist/esm/components/Inspector/MediaGalleryTab.js +1 -1
- package/dist/esm/components/Inspector/MediaPreviewModal.js +31 -31
- package/dist/esm/components/Inspector/NetworkTab.js +63 -63
- package/dist/esm/components/Inspector/NpmStarPrompt.js +42 -42
- package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -46
- package/dist/esm/components/Inspector/ReduxDetail.js +1 -1
- package/dist/esm/components/Inspector/ReduxTab.js +163 -150
- package/dist/esm/components/Inspector/SettingsPanel.js +136 -188
- package/dist/esm/components/Inspector/StorageTab.js +88 -84
- package/dist/esm/components/Inspector/TabBar.js +37 -34
- package/dist/esm/components/JsonViewer.js +173 -168
- package/dist/esm/components/LogCard.js +38 -42
- package/dist/esm/components/LogSyntaxHighlighter.js +1 -1
- package/dist/esm/components/SegmentedTabs.d.ts +4 -1
- package/dist/esm/components/SegmentedTabs.js +8 -8
- package/dist/esm/constants/index.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/networkLogger.js +1 -2
- package/dist/esm/helpers/index.d.ts +6 -0
- package/dist/esm/helpers/index.js +4 -4
- package/dist/esm/helpers/memoryManager.d.ts +0 -1
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/remoteConfig.js +1 -1
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/i18n/index.d.ts +35 -0
- package/dist/esm/i18n/index.js +1 -1
- package/dist/esm/i18n/locales/ar.json +1 -0
- package/dist/esm/i18n/locales/de.json +1 -0
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -0
- package/dist/esm/i18n/locales/fr.json +1 -0
- package/dist/esm/i18n/locales/hi.json +1 -0
- package/dist/esm/i18n/locales/ja.json +1 -0
- package/dist/esm/i18n/locales/ko.json +1 -0
- package/dist/esm/i18n/locales/pt.json +1 -0
- package/dist/esm/i18n/locales/ru.json +1 -0
- package/dist/esm/i18n/locales/zh.json +1 -0
- package/dist/esm/index.d.ts +2 -4
- package/dist/esm/index.js +5 -5
- package/dist/esm/styles/AppColors.d.ts +40 -0
- package/dist/esm/styles/AppColors.js +1 -1
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/enums.d.ts +0 -20
- package/dist/esm/types/enums.js +1 -1
- package/package.json +1 -15
- package/dist/commonjs/bundle.d.ts +0 -2
- package/dist/commonjs/bundle.js +0 -1
- package/dist/commonjs/components/Inspector/BundleTab.d.ts +0 -48
- package/dist/commonjs/components/Inspector/BundleTab.js +0 -1297
- package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +0 -27
- package/dist/commonjs/components/Inspector/PerformanceTab.js +0 -454
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +0 -115
- package/dist/commonjs/customHooks/bundleAnalyzer.js +0 -1
- package/dist/commonjs/customHooks/performanceTracker.d.ts +0 -144
- package/dist/commonjs/customHooks/performanceTracker.js +0 -63
- package/dist/commonjs/performance.d.ts +0 -2
- package/dist/commonjs/performance.js +0 -1
- package/dist/esm/bundle.d.ts +0 -2
- package/dist/esm/bundle.js +0 -1
- package/dist/esm/components/Inspector/BundleTab.d.ts +0 -48
- package/dist/esm/components/Inspector/BundleTab.js +0 -1297
- package/dist/esm/components/Inspector/PerformanceTab.d.ts +0 -27
- package/dist/esm/components/Inspector/PerformanceTab.js +0 -454
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +0 -115
- package/dist/esm/customHooks/bundleAnalyzer.js +0 -1
- package/dist/esm/customHooks/performanceTracker.d.ts +0 -144
- package/dist/esm/customHooks/performanceTracker.js +0 -63
- package/dist/esm/performance.d.ts +0 -2
- package/dist/esm/performance.js +0 -1
|
@@ -1,332 +1,64 @@
|
|
|
1
|
-
import
|
|
1
|
+
import me,{useCallback as L,useState as X,useMemo as Y,useRef as pe}from"react";import{FlatList as Ce,Platform as Se,Pressable as Ie,ScrollView as Te,Text as _,TextInput as Pe,TouchableOpacity as $,View as C}from"react-native";import{animateNextLayout as Ae,useInspector as ze}from"./InspectorContext";import Fe from"../AnalyticsEventCard";import Le from"./AnalyticsFilterModal";import Re from"../EndOfListFooter";import Ve from"../EmptyState";import w from"../../styles";import{AppColors as t}from"../../styles/AppColors";import{AppFonts as H}from"../../styles/AppFonts";import{useTranslation as Be}from"../../i18n";import Ee from"../TouchableScale";import{getEventCategory as Oe}from"../../helpers";import{LayersIcon as Ne,SearchIcon as Me,ClearIcon as _e,TrashIcon as $e,HeaderPauseIcon as He,FilterIcon as De,CartIcon as We,GlobeIcon as Ge,BoltIcon as je,SparkleIcon as Je}from"../NetworkIcons";const Qe=me.memo(()=>{const{t:D}=Be(),{analyticsEvents:W,filteredAnalyticsEvents:a,analyticsSearch:S,setAnalyticsSearch:R,analyticsFilters:V,setAnalyticsFilters:G,handleDelete:Z,selectedEvent:ee,setSelectedEvent:j,newEventIds:J,logRouteMapRef:Q,isAnalyticsLayoutReady:te,setIsAnalyticsLayoutReady:oe,isAnalyticsPaused:B,setIsAnalyticsPaused:re,isAnalyticsFilterApplied:E}=ze(),ae=pe(null),[le,q]=X(!1),[K,ne]=X(100),O=Y(()=>a.slice(0,K),[a,K]),v=Y(()=>{let e=0,r=0,o=0,I=0;for(const z of W){const A=Oe(z.name),T=z.count||1;A==="ecommerce"?e+=T:A==="page_view"?r+=T:A==="system"?o+=T:I+=T}const P=e+r+o+I;return{ecommerce:e,page_view:r,system:o,custom:I,totalCount:P}},[W]),se=L(e=>{Ae(),G(r=>{if(e==="all")return{...r,categories:new Set(["all"])};const o=new Set(r.categories);if(o.has("all"))o.delete("all"),o.add(e);else if(o.has(e))o.delete(e),o.size===0&&o.add("all");else if(o.add(e),o.has("ecommerce")&&o.has("page_view")&&o.has("system")&&o.has("custom"))return{...r,categories:new Set(["all"])};return{...r,categories:o}})},[G]),ie=L((e,r)=>e?.id?.toString()??r.toString(),[]),ce=L(({item:e,index:r})=>{const o=a[r+1],I=a[r-1],P=o?e.timestamp-o.timestamp:void 0,z=Math.floor(e.timestamp/6e4),A=I?Math.floor(I.timestamp/6e4):-1,T=r===0||z!==A;return<Fe event={e}onPress={()=>{j(e)}}isNew={J.has(e.id)}searchStr={S}isFirst={r===0}isLast={r===a.length-1}msSincePrev={P}showTimestamp={T}computedScreenName={(()=>{if(!e)return"";const F=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 N=typeof F=="string"?F:F?JSON.stringify(F):"";const M=Q.current.get(e.id+1e6);if(!N&&M&&M.path!=="Navigators"){const U=M.path.split(" \u2794 ");N=U[U.length-1]}return N})()}/>},[a,S,J,j,Q]),de=L((e,r)=>({length:86,offset:86*r,index:r}),[]);return<>
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{Pe?`${I("analytics.userId")}: ${Pe}`:I("analytics.emptySubtitle")}
|
|
14
|
-
</S>
|
|
15
|
-
</C>
|
|
16
|
-
|
|
17
|
-
<C style={{flexDirection:"row",alignItems:"center",gap:8}}>
|
|
18
|
-
{$?<Ce style={k.analyticsHeaderToggle}activeOpacity={.7}onPress={t=>{t.stopPropagation(),Ae(),ke(!E)}}>
|
|
19
|
-
<S style={k.analyticsHeaderToggleText}>
|
|
20
|
-
{I(E?"common.close":"analytics.eventDetails")}
|
|
21
|
-
</S>
|
|
22
|
-
</Ce>:<C style={{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:`${e.purple}14`,paddingHorizontal:7,paddingVertical:3,borderRadius:6,borderWidth:1,borderColor:`${e.purple}25`}}>
|
|
23
|
-
<S style={{fontFamily:V.interBold,fontSize:10,color:e.purple}}>
|
|
24
|
-
{G} {G===1?"event":"events"}
|
|
25
|
-
</S>
|
|
26
|
-
</C>}
|
|
27
|
-
|
|
28
|
-
<Yt direction={$?"up":"down"}size={16}color={e.grayTextWeak}/>
|
|
29
|
-
</C>
|
|
30
|
-
</Ce>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
{$&&<C style={{marginTop:10}}>
|
|
34
|
-
|
|
35
|
-
<C style={{marginBottom:8,backgroundColor:e.grayBackground,borderRadius:10,borderWidth:1,borderColor:e.dividerColor,padding:10}}>
|
|
36
|
-
|
|
37
|
-
<C style={{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",marginBottom:6}}>
|
|
38
|
-
<C>
|
|
39
|
-
<C style={{flexDirection:"row",alignItems:"baseline",gap:6}}>
|
|
40
|
-
<S style={{fontFamily:V.interBold,fontSize:22,color:e.primaryBlack,lineHeight:26}}>
|
|
41
|
-
{G}
|
|
42
|
-
</S>
|
|
43
|
-
<S style={{fontFamily:V.interMedium,fontSize:10.5,color:e.grayTextWeak}}>
|
|
44
|
-
{I("analytics.eventsInWindow")}
|
|
45
|
-
</S>
|
|
46
|
-
</C>
|
|
47
|
-
</C>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<C style={{flexDirection:"row",alignItems:"center",gap:5}}>
|
|
51
|
-
<C style={{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:`${e.purple}14`,paddingHorizontal:6,paddingVertical:2.5,borderRadius:4,borderWidth:1,borderColor:`${e.purple}2E`}}>
|
|
52
|
-
<S style={{fontFamily:V.interBold,fontSize:9.5,color:e.purple}}>
|
|
53
|
-
{I("analytics.eventVelocity",{rate:O.eventRate})}
|
|
54
|
-
</S>
|
|
55
|
-
</C>
|
|
56
|
-
|
|
57
|
-
{Y.totalRevenue>0&&<C style={{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:`${e.emerald600}15`,paddingHorizontal:6,paddingVertical:2.5,borderRadius:4,borderWidth:1,borderColor:`${e.emerald600}30`}}>
|
|
58
|
-
<Xt color={e.emerald600}size={10}/>
|
|
59
|
-
<S style={{fontFamily:V.interBold,fontSize:9.5,color:e.emerald600}}>
|
|
60
|
-
${Y.totalRevenue.toFixed(2)}
|
|
61
|
-
</S>
|
|
62
|
-
</C>}
|
|
63
|
-
</C>
|
|
64
|
-
</C>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<C style={{height:z,position:"relative",overflow:"hidden",borderRadius:8}}>
|
|
68
|
-
<Ot width="100%"height={z}viewBox={`0 0 ${j} ${z}`}preserveAspectRatio="none">
|
|
69
|
-
<Rt>
|
|
70
|
-
<Qe id="crashlyticsBarGrad"x1="0"y1="0"x2="0"y2="1">
|
|
71
|
-
<Fe offset="0%"stopColor="#8B5CF6"stopOpacity="0.9"/>
|
|
72
|
-
<Fe offset="100%"stopColor="#6366F1"stopOpacity="0.6"/>
|
|
73
|
-
</Qe>
|
|
74
|
-
<Qe id="crashlyticsAreaGrad"x1="0"y1="0"x2="0"y2="1">
|
|
75
|
-
<Fe offset="0%"stopColor="#8B5CF6"stopOpacity="0.25"/>
|
|
76
|
-
<Fe offset="80%"stopColor="#8B5CF6"stopOpacity="0.04"/>
|
|
77
|
-
<Fe offset="100%"stopColor="#8B5CF6"stopOpacity="0.0"/>
|
|
78
|
-
</Qe>
|
|
79
|
-
</Rt>
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
<Me x1="6"y1={z-6}x2={j-6}y2={z-6}stroke="#E2E8F0"strokeWidth="1"/>
|
|
83
|
-
<Me x1="6"y1={z/2}x2={j-6}y2={z/2}stroke="#F1F5F9"strokeWidth="1"strokeDasharray="4,4"/>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
<Ge d={O.areaPath}fill="url(#crashlyticsAreaGrad)"/>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
{O.buckets.map((t,T)=>{const P=U===T,F=10,B=t.x-F/2,D=Math.max(3,z-8-t.y),H=z-8-D;return<Je key={`bar-${t.index}`}>
|
|
90
|
-
|
|
91
|
-
<Ue x={B}y={6}width={F}height={z-14}rx={3}fill={P?"#EDE9FE":"#F8FAFC"}/>
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
{t.total>0&&<Ue x={B}y={H}width={F}height={D}rx={3}fill="url(#crashlyticsBarGrad)"/>}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
{P&&<Me x1={t.x}y1={4}x2={t.x}y2={z-6}stroke="#8B5CF6"strokeWidth="1.5"strokeDasharray="2,2"/>}
|
|
98
|
-
</Je>})}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
<Ge d={O.linePath}fill="none"stroke="#8B5CF6"strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
{O.buckets.length>0&&<Je>
|
|
105
|
-
<Ke cx={O.buckets[O.buckets.length-1].x}cy={O.buckets[O.buckets.length-1].y}r="5.5"fill="#8B5CF6"opacity="0.25"/>
|
|
106
|
-
<Ke cx={O.buckets[O.buckets.length-1].x}cy={O.buckets[O.buckets.length-1].y}r="3"fill="#7C3AED"/>
|
|
107
|
-
</Je>}
|
|
108
|
-
</Ot>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
<C style={{position:"absolute",top:0,left:0,right:0,bottom:0,flexDirection:"row"}}>
|
|
112
|
-
{O.buckets.map((t,T)=><Ce key={t.index}style={{flex:1,height:"100%"}}activeOpacity={.8}onPress={()=>K(U===T?null:T)}/>)}
|
|
113
|
-
</C>
|
|
114
|
-
</C>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
{o&&<C style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:e.white,borderRadius:6,paddingHorizontal:8,paddingVertical:4,marginTop:4,borderWidth:1,borderColor:e.brandPurple}}>
|
|
118
|
-
<S style={{fontFamily:V.interBold,fontSize:10,color:e.primaryBlack}}>
|
|
119
|
-
{I("analytics.selectedBucket",{time:o.ageLabel,count:o.total})}
|
|
120
|
-
</S>
|
|
121
|
-
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
122
|
-
{o.ecommerce>0&&<S style={{fontSize:9,fontFamily:V.interBold,color:e.amber700}}>
|
|
123
|
-
Ecom: {o.ecommerce}
|
|
124
|
-
</S>}
|
|
125
|
-
{o.page_view>0&&<S style={{fontSize:9,fontFamily:V.interBold,color:e.sky500}}>
|
|
126
|
-
Screen: {o.page_view}
|
|
127
|
-
</S>}
|
|
128
|
-
{o.custom>0&&<S style={{fontSize:9,fontFamily:V.interBold,color:e.brandPurple}}>
|
|
129
|
-
Custom: {o.custom}
|
|
130
|
-
</S>}
|
|
131
|
-
</C>
|
|
132
|
-
</C>}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<C style={{flexDirection:"row",justifyContent:"space-between",marginTop:4,paddingHorizontal:4}}>
|
|
136
|
-
<S style={{fontFamily:V.interMedium,fontSize:8.5,color:e.grayTextWeak}}>
|
|
137
|
-
-60s
|
|
138
|
-
</S>
|
|
139
|
-
<S style={{fontFamily:V.interMedium,fontSize:8.5,color:e.grayTextWeak}}>
|
|
140
|
-
-40s
|
|
141
|
-
</S>
|
|
142
|
-
<S style={{fontFamily:V.interMedium,fontSize:8.5,color:e.grayTextWeak}}>
|
|
143
|
-
-20s
|
|
144
|
-
</S>
|
|
145
|
-
<S style={{fontFamily:V.interBold,fontSize:8.5,color:e.brandPurple}}>
|
|
146
|
-
{I("analytics.timeNow")}
|
|
147
|
-
</S>
|
|
148
|
-
</C>
|
|
149
|
-
</C>
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
{Oe.length>0&&<C style={{marginTop:4,backgroundColor:`${e.sky500}0A`,borderRadius:8,borderWidth:1,borderColor:`${e.sky500}22`,padding:8}}>
|
|
153
|
-
<C style={{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:6}}>
|
|
154
|
-
<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
155
|
-
<Qt color={e.sky600}size={11}/>
|
|
156
|
-
<S style={{fontFamily:V.interBold,fontSize:9.5,color:e.sky600,letterSpacing:.3}}>
|
|
157
|
-
TOP SCREENS (REALTIME)
|
|
158
|
-
</S>
|
|
159
|
-
</C>
|
|
160
|
-
<S style={{fontFamily:V.interMedium,fontSize:9,color:e.grayTextWeak}}>
|
|
161
|
-
Views
|
|
162
|
-
</S>
|
|
163
|
-
</C>
|
|
164
|
-
|
|
165
|
-
<C style={{gap:4}}>
|
|
166
|
-
{Oe.map(t=><C key={t.name}>
|
|
167
|
-
<C style={{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:2}}>
|
|
168
|
-
<S style={{fontFamily:V.interMedium,fontSize:10,color:e.primaryBlack}}numberOfLines={1}>
|
|
169
|
-
{t.name}
|
|
170
|
-
</S>
|
|
171
|
-
<S style={{fontFamily:V.interBold,fontSize:9.5,color:e.sky600}}>
|
|
172
|
-
{t.count} ({t.pct}%)
|
|
173
|
-
</S>
|
|
174
|
-
</C>
|
|
175
|
-
|
|
176
|
-
<C style={{height:3,borderRadius:1.5,backgroundColor:`${e.sky500}22`,overflow:"hidden"}}>
|
|
177
|
-
<C style={{height:"100%",width:`${t.barWidthPct}%`,backgroundColor:e.sky500}}/>
|
|
178
|
-
</C>
|
|
179
|
-
</C>)}
|
|
180
|
-
</C>
|
|
181
|
-
</C>}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
{E&&<>
|
|
185
|
-
|
|
186
|
-
<C style={k.analyticsStatsRow}>
|
|
187
|
-
<C style={k.analyticsStatBox}>
|
|
188
|
-
<S style={k.analyticsStatValue}>{G}</S>
|
|
189
|
-
<S style={k.analyticsStatLabel}>{I("analytics.eventCount",{count:G})}</S>
|
|
190
|
-
</C>
|
|
191
|
-
<C style={k.analyticsStatBox}>
|
|
192
|
-
<S style={k.analyticsStatValue}>
|
|
193
|
-
{Object.keys(Te).length}
|
|
194
|
-
</S>
|
|
195
|
-
<S style={k.analyticsStatLabel}>{I("analytics.props")}</S>
|
|
196
|
-
</C>
|
|
197
|
-
<C style={k.analyticsStatBox}>
|
|
198
|
-
<S style={k.analyticsStatValue}>
|
|
199
|
-
{Object.keys(X).length}
|
|
200
|
-
</S>
|
|
201
|
-
<S style={k.analyticsStatLabel}>{I("analytics.defaultParameters")}</S>
|
|
202
|
-
</C>
|
|
203
|
-
</C>
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
{(Se||ze)&&<C style={k.analyticsHeaderDetails}>
|
|
207
|
-
{Se&&<C style={{marginBottom:10}}>
|
|
208
|
-
<S style={k.detailsGroupTitle}>{I("analytics.userProperties")}</S>
|
|
209
|
-
{Object.entries(Te).map(([t,T])=><C key={t}style={k.detailsRow}>
|
|
210
|
-
<S style={k.detailsKey}selectable={!0}>{t}</S>
|
|
211
|
-
<S style={k.detailsValue}selectable={!0}>{String(T)}</S>
|
|
212
|
-
</C>)}
|
|
213
|
-
</C>}
|
|
214
|
-
|
|
215
|
-
{ze&&<C>
|
|
216
|
-
<S style={k.detailsGroupTitle}>{I("analytics.defaultParameters")}</S>
|
|
217
|
-
{Object.entries(X).map(([t,T])=><C key={t}style={k.detailsRow}>
|
|
218
|
-
<S style={k.detailsKey}selectable={!0}>{t}</S>
|
|
219
|
-
<S style={k.detailsValue}selectable={!0}>{String(T)}</S>
|
|
220
|
-
</C>)}
|
|
221
|
-
</C>}
|
|
222
|
-
</C>}
|
|
223
|
-
</>}
|
|
224
|
-
</C>}
|
|
225
|
-
</C>}),qt=We.memo(()=>{const{t:I}=_e(),{analyticsEvents:Q,filteredAnalyticsEvents:R,analyticsSearch:E,setAnalyticsSearch:ke,analyticsFilters:$,setAnalyticsFilters:Ie,handleDelete:Pe,selectedEvent:Te,setSelectedEvent:X,newEventIds:N,logRouteMapRef:Se,isAnalyticsLayoutReady:ze,setIsAnalyticsLayoutReady:G,isAnalyticsPaused:Y,setIsAnalyticsPaused:Oe,isAnalyticsFilterApplied:M}=Ne(),z=tt(null),[j,U]=De(!1),K=Ee(()=>{let o=0,t=0,T=0,P=0;for(const B of Q){const D=He(B.name),H=B.count||1;D==="ecommerce"?o+=H:D==="page_view"?t+=H:D==="system"?T+=H:P+=H}const F=o+t+T+P;return{ecommerce:o,page_view:t,system:T,custom:P,totalCount:F}},[Q]),J=Le(o=>{Ae(),Ie(t=>{if(o==="all")return{...t,categories:new Set(["all"])};const T=new Set(t.categories);if(T.has("all"))T.delete("all"),T.add(o);else if(T.has(o))T.delete(o),T.size===0&&T.add("all");else if(T.add(o),T.has("ecommerce")&&T.has("page_view")&&T.has("system")&&T.has("custom"))return{...t,categories:new Set(["all"])};return{...t,categories:T}})},[Ie]),$e=Le((o,t)=>o?.id?.toString()??t.toString(),[]),O=Le(({item:o,index:t})=>{const T=R[t+1],P=R[t-1],F=T?o.timestamp-T.timestamp:void 0,B=Math.floor(o.timestamp/6e4),D=P?Math.floor(P.timestamp/6e4):-1,H=t===0||B!==D;return<Ft event={o}onPress={()=>{X(o)}}isNew={N.has(o.id)}searchStr={E}isFirst={t===0}isLast={t===R.length-1}msSincePrev={F}showTimestamp={H}computedScreenName={(()=>{if(!o)return"";const Z=o.screenName||o.screenClass||o.pageTitle||o.pageLocation||o.params?.firebase_screen||o.params?.screen_name||o.params?.firebase_screen_class||o.params?.screen_class;let ve=typeof Z=="string"?Z:Z?JSON.stringify(Z):"";const Ve=Se.current.get(o.id+1e6);if(!ve&&Ve&&Ve.path!=="Navigators"){const Re=Ve.path.split(" \u2794 ");ve=Re[Re.length-1]}return ve})()}/>},[R,E,N,X,Se]);return<>
|
|
226
|
-
|
|
227
|
-
{Te==null&&<C style={{backgroundColor:e.white,borderBottomWidth:1,borderBottomColor:e.dividerColor,paddingBottom:6}}>
|
|
228
|
-
<C style={[k.toolbarRow,{marginTop:12,marginBottom:8}]}>
|
|
229
|
-
<C style={k.searchContainer}>
|
|
230
|
-
<Mt color={e.grayTextWeak}size={16}/>
|
|
231
|
-
<Vt placeholder="Search events..."placeholderTextColor={e.grayTextWeak}value={E}onChangeText={ke}style={k.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
232
|
-
{E.length>0&&<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
233
|
-
<C style={{backgroundColor:`${e.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
234
|
-
<S style={{color:e.purple,fontSize:9.5,fontFamily:V.interBold}}>
|
|
235
|
-
{R.length}
|
|
236
|
-
</S>
|
|
3
|
+
{ee==null&&<C style={{backgroundColor:t.white,borderBottomWidth:1,borderBottomColor:t.dividerColor,paddingBottom:6}}>
|
|
4
|
+
<C style={[w.toolbarRow,{marginTop:12,marginBottom:8}]}>
|
|
5
|
+
<C style={w.searchContainer}>
|
|
6
|
+
<Me color={t.grayTextWeak}size={16}/>
|
|
7
|
+
<Pe placeholder={D("analytics.searchPlaceholder","Search events...")}placeholderTextColor={t.grayTextWeak}value={S}onChangeText={R}style={w.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
8
|
+
{S.length>0&&<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
9
|
+
<C style={{backgroundColor:`${t.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
10
|
+
<_ style={{color:t.purple,fontSize:9.5,fontFamily:H.interBold}}>
|
|
11
|
+
{a.length}
|
|
12
|
+
</_>
|
|
237
13
|
</C>
|
|
238
|
-
<
|
|
239
|
-
<
|
|
240
|
-
</
|
|
14
|
+
<Ie onPress={()=>R("")}hitSlop={10}style={w.clearBtn}>
|
|
15
|
+
<_e color={t.grayTextWeak}size={13}/>
|
|
16
|
+
</Ie>
|
|
241
17
|
</C>}
|
|
242
18
|
</C>
|
|
243
|
-
<C style={
|
|
244
|
-
|
|
245
|
-
<
|
|
246
|
-
|
|
19
|
+
<C style={w.toolbarRight}>
|
|
20
|
+
<$ style={[w.toolbarBtn,B&&{borderColor:`${t.darkOrange}50`,backgroundColor:`${t.darkOrange}18`}]}onPress={()=>re(e=>!e)}hitSlop={6}>
|
|
21
|
+
<He isPaused={B}color={B?t.darkOrange:t.grayTextStrong}size={16}/>
|
|
22
|
+
</$>
|
|
247
23
|
|
|
248
24
|
|
|
249
|
-
|
|
250
|
-
<
|
|
251
|
-
{
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
25
|
+
<$ style={[w.toolbarBtn,E&&{borderColor:`${t.brandPurple}60`,backgroundColor:`${t.brandPurple}15`}]}onPress={()=>q(!0)}hitSlop={6}>
|
|
26
|
+
<De color={E?t.brandPurple:t.grayTextStrong}size={15}/>
|
|
27
|
+
{E&&<C style={{position:"absolute",top:2,right:2,width:7,height:7,borderRadius:3.5,backgroundColor:t.darkOrange,borderWidth:1,borderColor:t.white}}/>}
|
|
28
|
+
</$>
|
|
29
|
+
|
|
30
|
+
<$ style={[w.toolbarBtn,{borderColor:`${t.errorColor}38`,backgroundColor:`${t.errorColor}0F`}]}onPress={Z}hitSlop={6}>
|
|
31
|
+
<$e color={t.errorColor}size={15}/>
|
|
32
|
+
</$>
|
|
257
33
|
</C>
|
|
258
34
|
</C>
|
|
259
35
|
|
|
260
36
|
|
|
261
|
-
<
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
<
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
37
|
+
<C style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
|
|
38
|
+
<Te horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
39
|
+
{[{id:"all",label:D("common.all","All"),count:v.totalCount,color:t.purple,Icon:Ne},{id:"ecommerce",label:"Ecommerce",count:v.ecommerce,color:t.amber600,Icon:We},{id:"page_view",label:"Screens",count:v.page_view,color:t.sky600,Icon:Ge},{id:"system",label:"System",count:v.system,color:t.violet600,Icon:je},{id:"custom",label:"Custom",count:v.custom,color:t.teal600,Icon:Je}].map(e=>{const r=e.id==="all"?V.categories.has("all"):!V.categories.has("all")&&V.categories.has(e.id),o=e.color||t.purple,I=r?t.white:o,P=e.Icon;return<Ee key={e.id}onPress={()=>se(e.id)}>
|
|
40
|
+
<C style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:r?o:`${o}12`,borderWidth:1,borderColor:r?o:`${o}30`,gap:5}}>
|
|
41
|
+
<P size={11}color={I}/>
|
|
42
|
+
<_ style={{fontFamily:H.interBold,fontSize:10.5,color:r?t.white:t.primaryBlack}}>
|
|
43
|
+
{e.label}
|
|
44
|
+
</_>
|
|
45
|
+
<C style={{backgroundColor:r?"rgba(255,255,255,0.25)":`${o}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8,alignItems:"center",justifyContent:"center"}}>
|
|
46
|
+
<_ style={{fontFamily:H.interBold,fontSize:9.5,color:r?t.white:o}}>
|
|
47
|
+
{e.count}
|
|
48
|
+
</_>
|
|
49
|
+
</C>
|
|
270
50
|
</C>
|
|
271
|
-
</
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
{(()=>{const o=!$.categories.has("all")&&$.categories.has("ecommerce");return<Be onPress={()=>J("ecommerce")}>
|
|
276
|
-
<C style={[k.statusFilterChip,{backgroundColor:o?e.amber600:e.amber100,borderColor:o?e.amber700:e.amber200,borderRadius:8,paddingHorizontal:10,paddingVertical:6},o&&{shadowColor:e.amber600,shadowOffset:{width:0,height:1},shadowOpacity:.28,shadowRadius:2.5,elevation:2}]}>
|
|
277
|
-
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
278
|
-
<Gt size={13}color={o?e.white:e.amber700}/>
|
|
279
|
-
<S numberOfLines={1}style={[k.statusFilterText,{color:o?e.white:e.amber800Warm,fontFamily:V.interBold}]}>
|
|
280
|
-
Ecommerce ({K.ecommerce})
|
|
281
|
-
</S>
|
|
282
|
-
</C>
|
|
283
|
-
</C>
|
|
284
|
-
</Be>})()}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
{(()=>{const o=!$.categories.has("all")&&$.categories.has("page_view");return<Be onPress={()=>J("page_view")}>
|
|
288
|
-
<C style={[k.statusFilterChip,{backgroundColor:o?e.sky600:e.sky100,borderColor:o?e.blue700:e.sky400,borderRadius:8,paddingHorizontal:10,paddingVertical:6},o&&{shadowColor:e.sky600,shadowOffset:{width:0,height:1},shadowOpacity:.28,shadowRadius:2.5,elevation:2}]}>
|
|
289
|
-
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
290
|
-
<Ut size={13}color={o?e.white:e.sky600}/>
|
|
291
|
-
<S numberOfLines={1}style={[k.statusFilterText,{color:o?e.white:e.sky600,fontFamily:V.interBold}]}>
|
|
292
|
-
Screens ({K.page_view})
|
|
293
|
-
</S>
|
|
294
|
-
</C>
|
|
295
|
-
</C>
|
|
296
|
-
</Be>})()}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
{(()=>{const o=!$.categories.has("all")&&$.categories.has("system");return<Be onPress={()=>J("system")}>
|
|
300
|
-
<C style={[k.statusFilterChip,{backgroundColor:o?e.violet600:e.purple100,borderColor:o?e.purpleShade700:e.purple200,borderRadius:8,paddingHorizontal:10,paddingVertical:6},o&&{shadowColor:e.violet600,shadowOffset:{width:0,height:1},shadowOpacity:.28,shadowRadius:2.5,elevation:2}]}>
|
|
301
|
-
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
302
|
-
<Kt size={13}color={o?e.white:e.purple}/>
|
|
303
|
-
<S numberOfLines={1}style={[k.statusFilterText,{color:o?e.white:e.brandPurple,fontFamily:V.interBold}]}>
|
|
304
|
-
System ({K.system})
|
|
305
|
-
</S>
|
|
306
|
-
</C>
|
|
307
|
-
</C>
|
|
308
|
-
</Be>})()}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
{(()=>{const o=!$.categories.has("all")&&$.categories.has("custom");return<Be onPress={()=>J("custom")}>
|
|
312
|
-
<C style={[k.statusFilterChip,{backgroundColor:o?e.pink600:e.pink100,borderColor:o?e.rose700:e.roseBorder,borderRadius:8,paddingHorizontal:10,paddingVertical:6},o&&{shadowColor:e.pink600,shadowOffset:{width:0,height:1},shadowOpacity:.28,shadowRadius:2.5,elevation:2}]}>
|
|
313
|
-
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
314
|
-
<Jt size={13}color={o?e.white:e.brandPurple}/>
|
|
315
|
-
<S numberOfLines={1}style={[k.statusFilterText,{color:o?e.white:e.pink600,fontFamily:V.interBold}]}>
|
|
316
|
-
Custom ({K.custom})
|
|
317
|
-
</S>
|
|
318
|
-
</C>
|
|
319
|
-
</C>
|
|
320
|
-
</Be>})()}
|
|
321
|
-
</St>
|
|
51
|
+
</Ee>})}
|
|
52
|
+
</Te>
|
|
53
|
+
</C>
|
|
322
54
|
</C>}
|
|
323
55
|
|
|
324
56
|
|
|
325
|
-
<
|
|
57
|
+
<Le visible={le}onClose={()=>q(!1)}/>
|
|
326
58
|
|
|
327
|
-
<C style={{flex:1}}onLayout={()=>
|
|
328
|
-
{
|
|
329
|
-
<
|
|
59
|
+
<C style={{flex:1}}onLayout={()=>oe(!0)}>
|
|
60
|
+
{te?<>
|
|
61
|
+
<Ce ref={ae}data={O}keyExtractor={ie}renderItem={ce}getItemLayout={de}initialNumToRender={15}maxToRenderPerBatch={10}windowSize={9}removeClippedSubviews={Se.OS==="android"}renderToHardwareTextureAndroid={!0}ListEmptyComponent={<Ve 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={()=>R("")}/>}ListFooterComponent={a.length>0?<Re count={O.length}totalCount={a.length}label="events"hasMore={O.length<a.length}onLoadMore={()=>ne(e=>e+10)}/>:null}contentContainerStyle={[w.listContent,a.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
330
62
|
</>:null}
|
|
331
63
|
</C>
|
|
332
|
-
</>});export default
|
|
64
|
+
</>});export default Qe;
|