react-native-inapp-inspector 2.3.24 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -5
- package/dist/commonjs/components/AnalyticsDetail.js +15 -12
- package/dist/commonjs/components/AnalyticsEventCard.js +11 -8
- package/dist/commonjs/components/AppHeaderLogo.js +4 -6
- 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/AnalyticsFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +27 -299
- package/dist/commonjs/components/Inspector/ConsoleTab.js +36 -94
- package/dist/commonjs/components/Inspector/CrashDetail.js +11 -10
- package/dist/commonjs/components/Inspector/CrashTab.js +43 -33
- package/dist/commonjs/components/Inspector/DebuggingTab.js +13 -13
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +107 -71
- 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 +66 -30
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +1 -1
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +3 -3
- 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/NpmStarPrompt.js +3 -3
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +21 -22
- 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 +109 -106
- package/dist/commonjs/components/Inspector/SettingsPanel.js +230 -134
- package/dist/commonjs/components/Inspector/StorageTab.js +55 -51
- package/dist/commonjs/components/Inspector/TabBar.js +30 -26
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -2
- package/dist/commonjs/components/JsonViewer.js +151 -159
- package/dist/commonjs/components/LogCard.js +34 -38
- package/dist/commonjs/components/LogSyntaxHighlighter.js +3 -3
- 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 +8 -2
- package/dist/commonjs/components/SegmentedTabs.js +11 -7
- package/dist/commonjs/components/ShareButton.d.ts +11 -0
- package/dist/commonjs/components/ShareButton.js +6 -0
- 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/crashHandler.js +4 -4
- package/dist/commonjs/customHooks/networkLogger.js +1 -2
- package/dist/commonjs/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/commonjs/customHooks/pushNotificationLogger.js +1 -0
- package/dist/commonjs/helpers/index.d.ts +6 -0
- package/dist/commonjs/helpers/index.js +4 -4
- package/dist/commonjs/helpers/memoryManager.d.ts +2 -2
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/remoteConfig.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/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 +6 -5
- 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/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 +30 -20
- 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 +84 -81
- package/dist/esm/components/AnalyticsEventCard.js +20 -17
- package/dist/esm/components/AppHeaderLogo.js +5 -7
- 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/AnalyticsFilterModal.js +14 -14
- package/dist/esm/components/Inspector/AnalyticsTab.js +44 -316
- package/dist/esm/components/Inspector/ConsoleTab.js +55 -113
- package/dist/esm/components/Inspector/CrashDetail.js +53 -52
- package/dist/esm/components/Inspector/CrashTab.js +74 -64
- package/dist/esm/components/Inspector/DebuggingTab.js +33 -33
- package/dist/esm/components/Inspector/DeviceInfoTab.js +174 -138
- 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 +98 -62
- package/dist/esm/components/Inspector/MediaGalleryTab.js +1 -1
- package/dist/esm/components/Inspector/MediaPreviewModal.js +31 -31
- 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 +132 -130
- package/dist/esm/components/Inspector/NpmStarPrompt.js +42 -42
- package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -46
- 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 +155 -152
- package/dist/esm/components/Inspector/SettingsPanel.js +380 -284
- package/dist/esm/components/Inspector/StorageTab.js +177 -173
- package/dist/esm/components/Inspector/TabBar.js +38 -34
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +1 -1
- package/dist/esm/components/JsonViewer.js +161 -169
- package/dist/esm/components/LogCard.js +38 -42
- package/dist/esm/components/LogSyntaxHighlighter.js +1 -1
- 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 +8 -2
- 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/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/crashHandler.js +6 -6
- package/dist/esm/customHooks/networkLogger.js +1 -2
- package/dist/esm/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/esm/customHooks/pushNotificationLogger.js +1 -0
- package/dist/esm/helpers/index.d.ts +6 -0
- package/dist/esm/helpers/index.js +4 -4
- package/dist/esm/helpers/memoryManager.d.ts +2 -2
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/remoteConfig.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/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 +6 -5
- 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/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 +30 -20
- 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 -24
- package/src/native/NativeInspector.ts +0 -1
- package/dist/commonjs/bundle.d.ts +0 -2
- package/dist/commonjs/bundle.js +0 -1
- package/dist/commonjs/components/BrandSquareIcon.d.ts +0 -5
- package/dist/commonjs/components/BrandSquareIcon.js +0 -112
- 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/BrandSquareIcon.d.ts +0 -5
- package/dist/esm/components/BrandSquareIcon.js +0 -112
- 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,60 @@
|
|
|
1
|
-
import
|
|
1
|
+
import de,{useCallback as R,useState as U,useMemo as X,useRef as me}from"react";import{FlatList as Ce,Platform as we,Pressable as Se,ScrollView as Ie,Text as O,TextInput as Te,TouchableOpacity as Y,View as C}from"react-native";import{animateNextLayout as ve,useInspector as xe}from"./InspectorContext";import Ae from"../AnalyticsEventCard";import Fe from"./AnalyticsFilterModal";import Le from"../EndOfListFooter";import Pe from"../EmptyState";import I from"../../styles";import{AppColors as r}from"../../styles/AppColors";import{AppFonts as $}from"../../styles/AppFonts";import{useTranslation as Re}from"../../i18n";import Ve from"../TouchableScale";import{getEventCategory as Be}from"../../helpers";import{LayersIcon as Ee,SearchIcon as Ne,ClearIcon as Me,TrashIcon as _e,FilterIcon as Oe,CartIcon as $e,GlobeIcon as De,BoltIcon as He,SparkleIcon as We}from"../NetworkIcons";const Ge=de.memo(()=>{const{t:D}=Re(),{analyticsEvents:H,filteredAnalyticsEvents:a,analyticsSearch:w,setAnalyticsSearch:V,analyticsFilters:B,setAnalyticsFilters:W,handleDelete:Z,selectedEvent:ee,setSelectedEvent:G,newEventIds:j,logRouteMapRef:J,isAnalyticsLayoutReady:te,setIsAnalyticsLayoutReady:oe,isAnalyticsFilterApplied:E}=xe(),re=me(null),[ae,Q]=U(!1),[q,le]=U(100),N=X(()=>a.slice(0,q),[a,q]),v=X(()=>{let e=0,o=0,t=0,S=0;for(const L of H){const F=Be(L.name),T=L.count||1;F==="ecommerce"?e+=T:F==="page_view"?o+=T:F==="system"?t+=T:S+=T}const A=e+o+t+S;return{ecommerce:e,page_view:o,system:t,custom:S,totalCount:A}},[H]),ne=R(e=>{ve(),W(o=>{if(e==="all")return{...o,categories:new Set(["all"])};const t=new Set(o.categories);if(t.has("all"))t.delete("all"),t.add(e);else if(t.has(e))t.delete(e),t.size===0&&t.add("all");else if(t.add(e),t.has("ecommerce")&&t.has("page_view")&&t.has("system")&&t.has("custom"))return{...o,categories:new Set(["all"])};return{...o,categories:t}})},[W]),se=R((e,o)=>e?.id?.toString()??o.toString(),[]),ie=R(({item:e,index:o})=>{const t=a[o+1],S=a[o-1],A=t?e.timestamp-t.timestamp:void 0,L=Math.floor(e.timestamp/6e4),F=S?Math.floor(S.timestamp/6e4):-1,T=o===0||L!==F;return<Ae event={e}onPress={()=>{G(e)}}isNew={j.has(e.id)}searchStr={w}isFirst={o===0}isLast={o===a.length-1}msSincePrev={A}showTimestamp={T}computedScreenName={(()=>{if(!e)return"";const P=e.screenName||e.screenClass||e.pageTitle||e.pageLocation||e.params?.firebase_screen||e.params?.screen_name||e.params?.firebase_screen_class||e.params?.screen_class;let M=typeof P=="string"?P:P?JSON.stringify(P):"";const _=J.current.get(e.id+1e6);if(!M&&_&&_.path!=="Navigators"){const K=_.path.split(" \u2794 ");M=K[K.length-1]}return M})()}/>},[a,w,j,G,J]),ce=R((e,o)=>({length:86,offset:86*o,index:o}),[]);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:r.white,borderBottomWidth:1,borderBottomColor:r.dividerColor,paddingBottom:6}}>
|
|
4
|
+
<C style={[I.toolbarRow,{marginTop:12,marginBottom:8}]}>
|
|
5
|
+
<C style={I.searchContainer}>
|
|
6
|
+
<Ne color={r.grayTextWeak}size={16}/>
|
|
7
|
+
<Te placeholder={D("analytics.searchPlaceholder","Search events...")}placeholderTextColor={r.grayTextWeak}value={w}onChangeText={V}style={I.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
8
|
+
{w.length>0&&<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
9
|
+
<C style={{backgroundColor:`${r.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
10
|
+
<O style={{color:r.purple,fontSize:9.5,fontFamily:$.interBold}}>
|
|
11
|
+
{a.length}
|
|
12
|
+
</O>
|
|
237
13
|
</C>
|
|
238
|
-
<
|
|
239
|
-
<
|
|
240
|
-
</
|
|
14
|
+
<Se onPress={()=>V("")}hitSlop={10}style={I.clearBtn}>
|
|
15
|
+
<Me color={r.grayTextWeak}size={13}/>
|
|
16
|
+
</Se>
|
|
241
17
|
</C>}
|
|
242
18
|
</C>
|
|
243
|
-
<C style={
|
|
244
|
-
<Ce style={[k.toolbarBtn,Y&&{borderColor:`${e.darkOrange}50`,backgroundColor:`${e.darkOrange}18`}]}onPress={()=>Oe(o=>!o)}hitSlop={6}>
|
|
245
|
-
<Nt isPaused={Y}color={Y?e.darkOrange:e.grayTextStrong}size={16}/>
|
|
246
|
-
</Ce>
|
|
247
|
-
|
|
19
|
+
<C style={I.toolbarRight}>
|
|
248
20
|
|
|
249
|
-
<
|
|
250
|
-
<
|
|
251
|
-
{
|
|
252
|
-
</
|
|
253
|
-
|
|
254
|
-
<
|
|
255
|
-
<
|
|
256
|
-
</
|
|
21
|
+
<Y style={[I.toolbarBtn,E&&{borderColor:`${r.brandPurple}60`,backgroundColor:`${r.brandPurple}15`}]}onPress={()=>Q(!0)}hitSlop={6}>
|
|
22
|
+
<Oe color={E?r.brandPurple:r.grayTextStrong}size={15}/>
|
|
23
|
+
{E&&<C style={{position:"absolute",top:2,right:2,width:7,height:7,borderRadius:3.5,backgroundColor:r.darkOrange,borderWidth:1,borderColor:r.white}}/>}
|
|
24
|
+
</Y>
|
|
25
|
+
|
|
26
|
+
<Y style={[I.toolbarBtn,{borderColor:`${r.errorColor}38`,backgroundColor:`${r.errorColor}0F`}]}onPress={Z}hitSlop={6}>
|
|
27
|
+
<_e color={r.errorColor}size={15}/>
|
|
28
|
+
</Y>
|
|
257
29
|
</C>
|
|
258
30
|
</C>
|
|
259
31
|
|
|
260
32
|
|
|
261
|
-
<
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
<
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
33
|
+
<C style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
|
|
34
|
+
<Ie horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
35
|
+
{[{id:"all",label:D("common.all","All"),count:v.totalCount,color:r.purple,Icon:Ee},{id:"ecommerce",label:"Ecommerce",count:v.ecommerce,color:r.amber600,Icon:$e},{id:"page_view",label:"Screens",count:v.page_view,color:r.sky600,Icon:De},{id:"system",label:"System",count:v.system,color:r.violet600,Icon:He},{id:"custom",label:"Custom",count:v.custom,color:r.teal600,Icon:We}].map(e=>{const o=e.id==="all"?B.categories.has("all"):!B.categories.has("all")&&B.categories.has(e.id),t=e.color||r.purple,S=o?r.white:t,A=e.Icon;return<Ve key={e.id}onPress={()=>ne(e.id)}>
|
|
36
|
+
<C style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:o?t:`${t}12`,borderWidth:1,borderColor:o?t:`${t}30`,gap:5}}>
|
|
37
|
+
<A size={11}color={S}/>
|
|
38
|
+
<O style={{fontFamily:$.interBold,fontSize:10.5,color:o?r.white:r.primaryBlack}}>
|
|
39
|
+
{e.label}
|
|
40
|
+
</O>
|
|
41
|
+
<C style={{backgroundColor:o?"rgba(255,255,255,0.25)":`${t}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8,alignItems:"center",justifyContent:"center"}}>
|
|
42
|
+
<O style={{fontFamily:$.interBold,fontSize:9.5,color:o?r.white:t}}>
|
|
43
|
+
{e.count}
|
|
44
|
+
</O>
|
|
45
|
+
</C>
|
|
270
46
|
</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>
|
|
47
|
+
</Ve>})}
|
|
48
|
+
</Ie>
|
|
49
|
+
</C>
|
|
322
50
|
</C>}
|
|
323
51
|
|
|
324
52
|
|
|
325
|
-
<
|
|
53
|
+
<Fe visible={ae}onClose={()=>Q(!1)}/>
|
|
326
54
|
|
|
327
|
-
<C style={{flex:1}}onLayout={()=>
|
|
328
|
-
{
|
|
329
|
-
<
|
|
55
|
+
<C style={{flex:1}}onLayout={()=>oe(!0)}>
|
|
56
|
+
{te?<>
|
|
57
|
+
<Ce ref={re}data={N}keyExtractor={se}renderItem={ie}getItemLayout={ce}initialNumToRender={15}maxToRenderPerBatch={10}windowSize={9}removeClippedSubviews={we.OS==="android"}renderToHardwareTextureAndroid={!0}ListEmptyComponent={<Pe isSearch={w.length>0}searchQuery={w}customTitle={w.length>0?"No matching analytics events":"No analytics events yet"}customSub={w.length>0?`No events matched "${w}"`:"Call setupAnalyticsLogger(analytics()) at app start."}onClearSearch={()=>V("")}/>}ListFooterComponent={a.length>0?<Le count={N.length}totalCount={a.length}label="events"hasMore={N.length<a.length}onLoadMore={()=>le(e=>e+10)}/>:null}contentContainerStyle={[I.listContent,a.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
330
58
|
</>:null}
|
|
331
59
|
</C>
|
|
332
|
-
</>});export default
|
|
60
|
+
</>});export default Ge;
|