react-native-inapp-inspector 2.4.0 → 2.4.2
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.ar.md +163 -0
- package/README.de.md +163 -0
- package/README.es.md +164 -0
- package/README.fr.md +163 -0
- package/README.hi.md +163 -0
- package/README.ja.md +180 -0
- package/README.ko.md +163 -0
- package/README.md +340 -243
- package/README.pt-BR.md +163 -0
- package/README.ru.md +163 -0
- package/README.zh-CN.md +387 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +82 -21
- package/assets/banner_dark.svg +186 -0
- package/assets/banner_light.svg +186 -0
- package/assets/icon_circle.svg +148 -0
- package/assets/icon_square.svg +369 -0
- package/assets/inapp_inspector_icon.gif +0 -0
- package/assets/inapp_inspector_icon_original.gif +0 -0
- package/assets/social_preview.png +0 -0
- package/assets/walkthrough.gif +0 -0
- package/dist/commonjs/components/AnimatedBrandOwl.d.ts +7 -0
- package/dist/commonjs/components/AnimatedBrandOwl.js +175 -0
- package/dist/commonjs/components/AppHeaderLogo.d.ts +1 -0
- package/dist/commonjs/components/AppHeaderLogo.js +7 -5
- package/dist/commonjs/components/BrandSquareIcon.d.ts +5 -0
- package/dist/commonjs/components/BrandSquareIcon.js +139 -0
- package/dist/commonjs/components/ConsoleLogCard.d.ts +2 -1
- package/dist/commonjs/components/ConsoleLogCard.js +23 -39
- package/dist/commonjs/components/Inspector/AboutModal.js +44 -54
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +16 -16
- package/dist/commonjs/components/Inspector/ConfirmationModal.d.ts +13 -0
- package/dist/commonjs/components/Inspector/ConfirmationModal.js +32 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.js +15 -15
- package/dist/commonjs/components/Inspector/CrashTab.js +25 -23
- package/dist/commonjs/components/Inspector/DebuggingTab.js +17 -17
- package/dist/commonjs/components/Inspector/FabLauncher.js +22 -30
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +2 -2
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.d.ts +15 -0
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.js +90 -0
- package/dist/commonjs/components/Inspector/MainScreen.js +46 -33
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +21 -19
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +85 -101
- package/dist/commonjs/components/Inspector/NetworkTab.js +50 -50
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +1 -1
- package/dist/commonjs/components/Inspector/PushCard.d.ts +3 -2
- package/dist/commonjs/components/Inspector/PushCard.js +5 -4
- package/dist/commonjs/components/Inspector/PushDetail.js +32 -23
- package/dist/commonjs/components/Inspector/PushTab.js +13 -13
- package/dist/commonjs/components/Inspector/ReduxDetail.js +32 -32
- package/dist/commonjs/components/Inspector/ReduxTab.js +14 -14
- package/dist/commonjs/components/Inspector/SettingsPanel.js +258 -139
- package/dist/commonjs/components/Inspector/SocketCard.d.ts +5 -0
- package/dist/commonjs/components/Inspector/SocketCard.js +116 -0
- package/dist/commonjs/components/Inspector/SocketDetail.d.ts +4 -0
- package/dist/commonjs/components/Inspector/SocketDetail.js +317 -0
- package/dist/commonjs/components/Inspector/SocketFilterModal.d.ts +13 -0
- package/dist/commonjs/components/Inspector/SocketFilterModal.js +69 -0
- package/dist/commonjs/components/Inspector/SocketTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/SocketTab.js +112 -0
- package/dist/commonjs/components/Inspector/StorageTab.js +34 -32
- package/dist/commonjs/components/Inspector/SupportModal.d.ts +7 -0
- package/dist/commonjs/components/Inspector/SupportModal.js +125 -0
- package/dist/commonjs/components/Inspector/SupportPage.d.ts +5 -0
- package/dist/commonjs/components/Inspector/SupportPage.js +227 -0
- package/dist/commonjs/components/Inspector/TabBar.js +24 -23
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +24 -24
- package/dist/commonjs/components/JsonViewer.js +7 -7
- package/dist/commonjs/components/LogCard.d.ts +3 -2
- package/dist/commonjs/components/LogCard.js +17 -14
- package/dist/commonjs/components/LogSyntaxHighlighter.js +5 -5
- package/dist/commonjs/components/ModuleErrorBoundary.js +2 -2
- package/dist/commonjs/components/NetworkIcons.d.ts +15 -0
- package/dist/commonjs/components/NetworkIcons.js +38 -3
- package/dist/commonjs/components/SegmentedTabs.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/socketLogger.d.ts +26 -0
- package/dist/commonjs/customHooks/socketLogger.js +2 -0
- package/dist/commonjs/helpers/index.js +3 -3
- package/dist/commonjs/helpers/memoryManager.d.ts +1 -0
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -1
- package/dist/commonjs/helpers/searchQueryParser.js +5 -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 +3 -1
- package/dist/commonjs/helpers/shareFormatter.js +8 -7
- package/dist/commonjs/i18n/index.d.ts +99 -1
- package/dist/commonjs/i18n/index.js +1 -1
- package/dist/commonjs/i18n/locales/ar.json +1 -1
- package/dist/commonjs/i18n/locales/bn.json +1 -0
- package/dist/commonjs/i18n/locales/de.json +1 -1
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -1
- package/dist/commonjs/i18n/locales/fr.json +1 -1
- package/dist/commonjs/i18n/locales/gu.json +1 -0
- package/dist/commonjs/i18n/locales/hi.json +1 -1
- package/dist/commonjs/i18n/locales/id.json +1 -0
- package/dist/commonjs/i18n/locales/it.json +1 -0
- package/dist/commonjs/i18n/locales/ja.json +1 -1
- package/dist/commonjs/i18n/locales/kn.json +1 -0
- package/dist/commonjs/i18n/locales/ko.json +1 -1
- package/dist/commonjs/i18n/locales/ml.json +1 -0
- package/dist/commonjs/i18n/locales/mr.json +1 -0
- package/dist/commonjs/i18n/locales/nl.json +1 -0
- package/dist/commonjs/i18n/locales/pa.json +1 -0
- package/dist/commonjs/i18n/locales/pl.json +1 -0
- package/dist/commonjs/i18n/locales/pt.json +1 -1
- package/dist/commonjs/i18n/locales/ru.json +1 -1
- package/dist/commonjs/i18n/locales/ta.json +1 -0
- package/dist/commonjs/i18n/locales/te.json +1 -0
- package/dist/commonjs/i18n/locales/tr.json +1 -0
- package/dist/commonjs/i18n/locales/vi.json +1 -0
- package/dist/commonjs/i18n/locales/zh.json +1 -1
- package/dist/commonjs/index.d.ts +13 -13
- package/dist/commonjs/index.js +5 -4
- package/dist/commonjs/native/NativeInspector.d.ts +1 -0
- package/dist/commonjs/socket.d.ts +4 -0
- package/dist/commonjs/socket.js +1 -0
- package/dist/commonjs/styles/index.d.ts +23 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/enums.d.ts +40 -0
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +122 -1
- package/dist/esm/components/AnimatedBrandOwl.d.ts +7 -0
- package/dist/esm/components/AnimatedBrandOwl.js +175 -0
- package/dist/esm/components/AppHeaderLogo.d.ts +1 -0
- package/dist/esm/components/AppHeaderLogo.js +7 -5
- package/dist/esm/components/BrandSquareIcon.d.ts +5 -0
- package/dist/esm/components/BrandSquareIcon.js +139 -0
- package/dist/esm/components/ConsoleLogCard.d.ts +2 -1
- package/dist/esm/components/ConsoleLogCard.js +61 -77
- package/dist/esm/components/Inspector/AboutModal.js +85 -95
- package/dist/esm/components/Inspector/AnalyticsTab.js +31 -31
- package/dist/esm/components/Inspector/ConfirmationModal.d.ts +13 -0
- package/dist/esm/components/Inspector/ConfirmationModal.js +32 -0
- package/dist/esm/components/Inspector/ConsoleTab.js +49 -49
- package/dist/esm/components/Inspector/CrashTab.js +40 -38
- package/dist/esm/components/Inspector/DebuggingTab.js +29 -29
- package/dist/esm/components/Inspector/FabLauncher.js +50 -58
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +7 -7
- package/dist/esm/components/Inspector/LanguageSelectorModal.d.ts +15 -0
- package/dist/esm/components/Inspector/LanguageSelectorModal.js +90 -0
- package/dist/esm/components/Inspector/MainScreen.js +123 -110
- package/dist/esm/components/Inspector/MediaGalleryTab.js +64 -62
- package/dist/esm/components/Inspector/MediaPreviewModal.js +107 -123
- package/dist/esm/components/Inspector/NetworkTab.js +90 -90
- package/dist/esm/components/Inspector/NpmUpdateToast.js +1 -1
- package/dist/esm/components/Inspector/PushCard.d.ts +3 -2
- package/dist/esm/components/Inspector/PushCard.js +23 -22
- package/dist/esm/components/Inspector/PushDetail.js +34 -25
- package/dist/esm/components/Inspector/PushTab.js +25 -25
- package/dist/esm/components/Inspector/ReduxDetail.js +42 -42
- package/dist/esm/components/Inspector/ReduxTab.js +35 -35
- package/dist/esm/components/Inspector/SettingsPanel.js +495 -376
- package/dist/esm/components/Inspector/SocketCard.d.ts +5 -0
- package/dist/esm/components/Inspector/SocketCard.js +116 -0
- package/dist/esm/components/Inspector/SocketDetail.d.ts +4 -0
- package/dist/esm/components/Inspector/SocketDetail.js +317 -0
- package/dist/esm/components/Inspector/SocketFilterModal.d.ts +13 -0
- package/dist/esm/components/Inspector/SocketFilterModal.js +69 -0
- package/dist/esm/components/Inspector/SocketTab.d.ts +3 -0
- package/dist/esm/components/Inspector/SocketTab.js +112 -0
- package/dist/esm/components/Inspector/StorageTab.js +136 -134
- package/dist/esm/components/Inspector/SupportModal.d.ts +7 -0
- package/dist/esm/components/Inspector/SupportModal.js +125 -0
- package/dist/esm/components/Inspector/SupportPage.d.ts +5 -0
- package/dist/esm/components/Inspector/SupportPage.js +227 -0
- package/dist/esm/components/Inspector/TabBar.js +36 -35
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +22 -22
- package/dist/esm/components/JsonViewer.js +55 -55
- package/dist/esm/components/LogCard.d.ts +3 -2
- package/dist/esm/components/LogCard.js +61 -58
- package/dist/esm/components/LogSyntaxHighlighter.js +5 -5
- package/dist/esm/components/ModuleErrorBoundary.js +23 -23
- package/dist/esm/components/NetworkIcons.d.ts +15 -0
- package/dist/esm/components/NetworkIcons.js +38 -3
- package/dist/esm/components/SegmentedTabs.js +7 -7
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/socketLogger.d.ts +26 -0
- package/dist/esm/customHooks/socketLogger.js +2 -0
- package/dist/esm/helpers/index.js +3 -3
- package/dist/esm/helpers/memoryManager.d.ts +1 -0
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/searchQueryParser.d.ts +1 -1
- package/dist/esm/helpers/searchQueryParser.js +5 -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 +3 -1
- package/dist/esm/helpers/shareFormatter.js +8 -7
- package/dist/esm/i18n/index.d.ts +99 -1
- package/dist/esm/i18n/index.js +1 -1
- package/dist/esm/i18n/locales/ar.json +1 -1
- package/dist/esm/i18n/locales/bn.json +1 -0
- package/dist/esm/i18n/locales/de.json +1 -1
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -1
- package/dist/esm/i18n/locales/fr.json +1 -1
- package/dist/esm/i18n/locales/gu.json +1 -0
- package/dist/esm/i18n/locales/hi.json +1 -1
- package/dist/esm/i18n/locales/id.json +1 -0
- package/dist/esm/i18n/locales/it.json +1 -0
- package/dist/esm/i18n/locales/ja.json +1 -1
- package/dist/esm/i18n/locales/kn.json +1 -0
- package/dist/esm/i18n/locales/ko.json +1 -1
- package/dist/esm/i18n/locales/ml.json +1 -0
- package/dist/esm/i18n/locales/mr.json +1 -0
- package/dist/esm/i18n/locales/nl.json +1 -0
- package/dist/esm/i18n/locales/pa.json +1 -0
- package/dist/esm/i18n/locales/pl.json +1 -0
- package/dist/esm/i18n/locales/pt.json +1 -1
- package/dist/esm/i18n/locales/ru.json +1 -1
- package/dist/esm/i18n/locales/ta.json +1 -0
- package/dist/esm/i18n/locales/te.json +1 -0
- package/dist/esm/i18n/locales/tr.json +1 -0
- package/dist/esm/i18n/locales/vi.json +1 -0
- package/dist/esm/i18n/locales/zh.json +1 -1
- package/dist/esm/index.d.ts +13 -13
- package/dist/esm/index.js +8 -7
- package/dist/esm/native/NativeInspector.d.ts +1 -0
- package/dist/esm/socket.d.ts +4 -0
- package/dist/esm/socket.js +1 -0
- package/dist/esm/styles/index.d.ts +23 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/enums.d.ts +40 -0
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/interfaces.d.ts +122 -1
- package/ios/NetworkInspectorModule.mm +102 -12
- package/package.json +204 -2
- package/src/native/NativeInspector.ts +8 -0
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import
|
|
1
|
+
import X,{useCallback as F,useState as Y,useMemo as Z,useRef as Fe}from"react";import{FlatList as Pe,Pressable as Re,ScrollView as Ve,Text as N,TextInput as Be,TouchableOpacity as Ce,View as C}from"react-native";import{animateNextLayout as Me,useInspector as _e}from"./InspectorContext";import Ne from"../AnalyticsEventCard";import Oe from"./AnalyticsFilterModal";import $e from"../EndOfListFooter";import De from"../EmptyState";import I from"../../styles";import{AppColors as r}from"../../styles/AppColors";import{AppFonts as O}from"../../styles/AppFonts";import{useTranslation as He}from"../../i18n";import We from"../TouchableScale";import{getEventCategory as Ge}from"../../helpers";import{LayersIcon as je,SearchIcon as Je,ClearIcon as Qe,TrashIcon as Ke,FilterIcon as Ue,CartIcon as Xe,GlobeIcon as Ye,BoltIcon as Ze,SparkleIcon as et}from"../NetworkIcons";const Se=10,tt=X.memo(()=>{const{t:$}=He(),{analyticsEvents:D,filteredAnalyticsEvents:a,analyticsSearch:S,setAnalyticsSearch:P,analyticsFilters:A,setAnalyticsFilters:H,handleDelete:we,selectedEvent:Ie,setSelectedEvent:W,newEventIds:G,logRouteMapRef:j,isAnalyticsLayoutReady:Te,setIsAnalyticsLayoutReady:ve,isAnalyticsFilterApplied:R,maxAnalyticsEventsLimit:V}=_e(),xe=V||100,J=Fe(null),[Le,Q]=Y(!1),[q,K]=Y(xe);X.useEffect(()=>{K(V||100),J.current?.scrollToOffset({offset:0,animated:!1})},[S,A,V]);const B=Z(()=>a.slice(0,q),[a,q]),v=Z(()=>{let e=0,o=0,t=0,w=0;for(const E of D){const k=Ge(E.name),T=E.count||1;k==="ecommerce"?e+=T:k==="page_view"?o+=T:k==="system"?t+=T:w+=T}const L=e+o+t+w;return{ecommerce:e,page_view:o,system:t,custom:w,totalCount:L}},[D]),ke=F(e=>{Me(),H(o=>{if(e==="all")return{...o,categories:new Set(["all"])};const t=new Set(o.categories);if(t.has("all"))t.delete("all"),t.add(e);else if(t.has(e))t.delete(e),t.size===0&&t.add("all");else if(t.add(e),t.has("ecommerce")&&t.has("page_view")&&t.has("system")&&t.has("custom"))return{...o,categories:new Set(["all"])};return{...o,categories:t}})},[H]),Ae=F((e,o)=>e?.id?.toString()??o.toString(),[]),Ee=F(({item:e,index:o})=>{const t=a[o+1],w=a[o-1],L=t?e.timestamp-t.timestamp:void 0,E=Math.floor(e.timestamp/6e4),k=w?Math.floor(w.timestamp/6e4):-1,T=o===0||E!==k;return<Ne event={e}onPress={()=>{W(e)}}isNew={G.has(e.id)}searchStr={S}isFirst={o===0}isLast={o===a.length-1}msSincePrev={L}showTimestamp={T}computedScreenName={(()=>{if(!e)return"";const z=e.screenName||e.screenClass||e.pageTitle||e.pageLocation||e.params?.firebase_screen||e.params?.screen_name||e.params?.firebase_screen_class||e.params?.screen_class;let M=typeof z=="string"?z:z?JSON.stringify(z):"";const _=j.current.get(e.id+1e6);if(!M&&_&&_.path!=="Navigators"){const U=_.path.split(" \u2794 ");M=U[U.length-1]}return M})()}/>},[a,S,G,W,j]),ze=F((e,o)=>({length:86,offset:86*o,index:o}),[]);return<>
|
|
2
2
|
|
|
3
|
-
{
|
|
3
|
+
{Ie==null&&<C style={{backgroundColor:r.white,borderBottomWidth:1,borderBottomColor:r.dividerColor,paddingBottom:6}}>
|
|
4
4
|
<C style={[I.toolbarRow,{marginTop:12,marginBottom:8}]}>
|
|
5
5
|
<C style={I.searchContainer}>
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
{
|
|
6
|
+
<Je color={r.grayTextWeak}size={16}/>
|
|
7
|
+
<Be placeholder={$("analytics.searchPlaceholder","Search events...")}placeholderTextColor={r.grayTextWeak}value={S}onChangeText={P}style={I.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
8
|
+
{S.length>0&&<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
9
9
|
<C style={{backgroundColor:`${r.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
10
|
-
<
|
|
10
|
+
<N style={{color:r.purple,fontSize:9.5,fontFamily:O.interBold}}>
|
|
11
11
|
{a.length}
|
|
12
|
-
</
|
|
12
|
+
</N>
|
|
13
13
|
</C>
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
</
|
|
14
|
+
<Re onPress={()=>P("")}hitSlop={10}style={I.clearBtn}>
|
|
15
|
+
<Qe color={r.grayTextWeak}size={13}/>
|
|
16
|
+
</Re>
|
|
17
17
|
</C>}
|
|
18
18
|
</C>
|
|
19
19
|
<C style={I.toolbarRight}>
|
|
20
20
|
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
{
|
|
24
|
-
</
|
|
21
|
+
<Ce style={[I.toolbarBtn,R&&{borderColor:`${r.brandPurple}60`,backgroundColor:`${r.brandPurple}15`}]}onPress={()=>Q(!0)}hitSlop={6}>
|
|
22
|
+
<Ue color={R?r.brandPurple:r.grayTextStrong}size={15}/>
|
|
23
|
+
{R&&<C style={{position:"absolute",top:2,right:2,width:7,height:7,borderRadius:3.5,backgroundColor:r.darkOrange,borderWidth:1,borderColor:r.white}}/>}
|
|
24
|
+
</Ce>
|
|
25
25
|
|
|
26
|
-
<
|
|
27
|
-
<
|
|
28
|
-
</
|
|
26
|
+
<Ce style={[I.toolbarBtn,{borderColor:`${r.errorColor}38`,backgroundColor:`${r.errorColor}0F`}]}onPress={we}hitSlop={6}>
|
|
27
|
+
<Ke color={r.errorColor}size={15}/>
|
|
28
|
+
</Ce>
|
|
29
29
|
</C>
|
|
30
30
|
</C>
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
<C style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
|
|
34
|
-
<
|
|
35
|
-
{[{id:"all",label
|
|
34
|
+
<Ve horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
35
|
+
{[{id:"all",label:$("common.all","All"),count:v.totalCount,color:r.purple,Icon:je},{id:"ecommerce",label:"Ecommerce",count:v.ecommerce,color:r.amber600,Icon:Xe},{id:"page_view",label:"Screens",count:v.page_view,color:r.sky600,Icon:Ye},{id:"system",label:"System",count:v.system,color:r.violet600,Icon:Ze},{id:"custom",label:"Custom",count:v.custom,color:r.teal600,Icon:et}].map(e=>{const o=e.id==="all"?A.categories.has("all"):!A.categories.has("all")&&A.categories.has(e.id),t=e.color||r.purple,w=o?r.white:t,L=e.Icon;return<We key={e.id}onPress={()=>ke(e.id)}>
|
|
36
36
|
<C style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:o?t:`${t}12`,borderWidth:1,borderColor:o?t:`${t}30`,gap:5}}>
|
|
37
|
-
<
|
|
38
|
-
<
|
|
37
|
+
<L size={11}color={w}/>
|
|
38
|
+
<N style={{fontFamily:O.interBold,fontSize:10.5,color:o?r.white:r.primaryBlack}}>
|
|
39
39
|
{e.label}
|
|
40
|
-
</
|
|
40
|
+
</N>
|
|
41
41
|
<C style={{backgroundColor:o?"rgba(255,255,255,0.25)":`${t}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8,alignItems:"center",justifyContent:"center"}}>
|
|
42
|
-
<
|
|
42
|
+
<N style={{fontFamily:O.interBold,fontSize:9.5,color:o?r.white:t}}>
|
|
43
43
|
{e.count}
|
|
44
|
-
</
|
|
44
|
+
</N>
|
|
45
45
|
</C>
|
|
46
46
|
</C>
|
|
47
|
-
</
|
|
48
|
-
</
|
|
47
|
+
</We>})}
|
|
48
|
+
</Ve>
|
|
49
49
|
</C>
|
|
50
50
|
</C>}
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
<
|
|
53
|
+
<Oe visible={Le}onClose={()=>Q(!1)}/>
|
|
54
54
|
|
|
55
|
-
<C style={{flex:1}}onLayout={()=>
|
|
56
|
-
{
|
|
57
|
-
<
|
|
55
|
+
<C style={{flex:1}}onLayout={()=>ve(!0)}>
|
|
56
|
+
{Te?<>
|
|
57
|
+
<Pe ref={J}data={B}keyExtractor={Ae}renderItem={Ee}getItemLayout={ze}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}showsVerticalScrollIndicator={!1}ListEmptyComponent={<De isSearch={S.length>0}searchQuery={S}customTitle={S.length>0?"No matching analytics events":"No analytics events yet"}customSub={S.length>0?`No events matched "${S}"`:"Call setupAnalyticsLogger(analytics()) at app start."}onClearSearch={()=>P("")}/>}ListFooterComponent={a.length>0?<$e count={B.length}totalCount={a.length}label="events"loadMoreStep={Se}hasMore={B.length<a.length}onLoadMore={()=>K(e=>e+Se)}/>:null}contentContainerStyle={[I.listContent,a.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
58
58
|
</>:null}
|
|
59
59
|
</C>
|
|
60
|
-
</>});export default
|
|
60
|
+
</>});export default tt;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ConfirmationModalProps {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
confirmText?: string;
|
|
7
|
+
cancelText?: string;
|
|
8
|
+
isDestructive?: boolean;
|
|
9
|
+
icon?: 'trash' | 'alert' | 'reset' | 'info';
|
|
10
|
+
onConfirm: () => void;
|
|
11
|
+
onCancel: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const ConfirmationModal: React.FC<ConfirmationModalProps>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import"react";import{Modal as D,View as C,Text as B,StyleSheet as P,Pressable as N,Platform as S}from"react-native";import R from"../TouchableScale";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as T}from"../../styles/AppFonts";import{TrashIcon as E,AlertTriangleIcon as G,ResetIcon as J,InfoCircleIcon as K,CloseWhite as Q}from"../NetworkIcons";import{triggerNativeHaptic as O}from"../../native/NativeInspector";import{useTranslation as U}from"../../i18n";export const ConfirmationModal=({visible:I,title:W,message:j,confirmText:A,cancelText:F,isDestructive:o=!0,icon:x="trash",onConfirm:H,onCancel:V})=>{const{t:z}=U();if(!I)return null;const k=A||z("common.confirm","Confirm"),v=F||z("common.cancel","Cancel"),M=()=>{O(o?"heavy":"medium"),H()},r=()=>{O("light"),V()},$=()=>{switch(x){case"trash":return<E size={24}color={e.red500}/>;case"alert":return<G size={24}color={e.amber500}/>;case"reset":return<J size={24}color={e.purple}/>;default:return<K size={24}color={e.purple}/>}},L=o?e.red100:x==="alert"?e.amber100:e.purple50,q=o?`${e.red500}4D`:x==="alert"?e.amber200:e.purple200;return<D visible={I}transparent={!0}animationType="fade"onRequestClose={r}>
|
|
2
|
+
<C style={t.overlay}>
|
|
3
|
+
<N style={t.backdrop}onPress={r}/>
|
|
4
|
+
|
|
5
|
+
<C style={t.card}>
|
|
6
|
+
|
|
7
|
+
<R onPress={r}hitSlop={8}style={t.cornerCloseBtn}>
|
|
8
|
+
<Q size={11}color={e.grayTextWeak}/>
|
|
9
|
+
</R>
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<C style={[t.iconBadge,{backgroundColor:L,borderColor:q}]}>
|
|
13
|
+
{$()}
|
|
14
|
+
</C>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<B style={t.title}>{W}</B>
|
|
18
|
+
<B style={t.message}>{j}</B>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
<C style={t.buttonRow}>
|
|
22
|
+
<R accessible={!0}accessibilityRole="button"accessibilityLabel={v}onPress={r}style={t.cancelBtn}>
|
|
23
|
+
<B style={t.cancelBtnText}>{v}</B>
|
|
24
|
+
</R>
|
|
25
|
+
|
|
26
|
+
<R accessible={!0}accessibilityRole="button"accessibilityLabel={k}onPress={M}style={[t.confirmBtn,o?t.confirmBtnDestructive:t.confirmBtnPrimary]}>
|
|
27
|
+
<B style={t.confirmBtnText}>{k}</B>
|
|
28
|
+
</R>
|
|
29
|
+
</C>
|
|
30
|
+
</C>
|
|
31
|
+
</C>
|
|
32
|
+
</D>};const t=P.create({overlay:{flex:1,backgroundColor:`${e.slate900}A6`,justifyContent:"center",alignItems:"center",paddingHorizontal:24},backdrop:{...P.absoluteFillObject},card:{width:"100%",maxWidth:340,backgroundColor:e.white,borderRadius:22,paddingTop:24,paddingBottom:18,paddingHorizontal:20,alignItems:"center",borderWidth:1,borderColor:`${e.white}CC`,...S.select({ios:{shadowColor:e.slate900,shadowOffset:{width:0,height:12},shadowOpacity:.28,shadowRadius:24},android:{elevation:12}})},cornerCloseBtn:{position:"absolute",top:14,right:14,width:28,height:28,borderRadius:14,backgroundColor:e.graySurface,alignItems:"center",justifyContent:"center"},iconBadge:{width:54,height:54,borderRadius:27,borderWidth:1.5,alignItems:"center",justifyContent:"center",marginBottom:14},title:{fontFamily:T.interBold,fontSize:17,color:e.slate900,textAlign:"center",marginBottom:8,letterSpacing:-.2},message:{fontFamily:T.interRegular,fontSize:13,color:e.grayTextWeak,textAlign:"center",lineHeight:19,paddingHorizontal:8,marginBottom:22},buttonRow:{flexDirection:"row",alignItems:"center",gap:10,width:"100%"},cancelBtn:{flex:1,height:44,borderRadius:12,backgroundColor:e.graySurface,borderWidth:1,borderColor:e.grayBorderSecondary,alignItems:"center",justifyContent:"center"},cancelBtnText:{fontFamily:T.interSemiBold,fontSize:14,color:e.grayText},confirmBtn:{flex:1.15,height:44,borderRadius:12,alignItems:"center",justifyContent:"center"},confirmBtnDestructive:{backgroundColor:e.red500,...S.select({ios:{shadowColor:e.red500,shadowOffset:{width:0,height:4},shadowOpacity:.35,shadowRadius:8},android:{elevation:4}})},confirmBtnPrimary:{backgroundColor:e.purple,...S.select({ios:{shadowColor:e.purple,shadowOffset:{width:0,height:4},shadowOpacity:.35,shadowRadius:8},android:{elevation:4}})},confirmBtnText:{fontFamily:T.interBold,fontSize:14,color:e.white,letterSpacing:.2}});
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import
|
|
2
|
-
<
|
|
3
|
-
</
|
|
4
|
-
<
|
|
5
|
-
{t===
|
|
6
|
-
</
|
|
7
|
-
</S>;{const
|
|
8
|
-
<
|
|
9
|
-
Filtered by {
|
|
10
|
-
</
|
|
11
|
-
</S>}},[
|
|
12
|
-
<S style={{backgroundColor:
|
|
1
|
+
import F,{useCallback as k,useMemo as P,useRef as ne}from"react";import{FlatList as Se,Pressable as Ce,ScrollView as Q,Text as A,TextInput as Ie,View as S}from"react-native";import{useInspector as Te}from"./InspectorContext";import{useTranslation as xe}from"../../i18n";import H from"../TouchableScale";import Le from"../AnimatedEntrance";import{ConsoleLogCard as Ae}from"../ConsoleLogCard";import Ve from"../EmptyState";import Be from"../EndOfListFooter";import T from"../../styles";import{AppColors as o}from"../../styles/AppColors";import{AppFonts as z}from"../../styles/AppFonts";import{LogFilter as V}from"../../types";import{SearchIcon as Ee,ClearIcon as Fe,SortArrowIcon as Pe,TrashIcon as He,LayersIcon as Re,UserIcon as We,InfoCircleIcon as $e,WarningTriangleIcon as Oe,ErrorCircleIcon as De,AnalyticsIcon as Ne}from"../NetworkIcons";const Y=10,Ue=F.memo(()=>{const{t:w}=xe(),{logSearch:h,setLogSearch:B,logSortOrder:K,setLogSortOrder:X,handleDelete:j,logFilters:y,setLogFilters:R,logCounts:x,filteredConsoleLogs:C,visibleConsoleLogs:D,maxConsoleLogs:W,setSelectedLog:N}=Te(),q=W||100,U=ne(null),[G,M]=F.useState(q);F.useEffect(()=>{M(W||100),U.current?.scrollToOffset({offset:0,animated:!1})},[h,y,W]);const $=P(()=>C.slice(0,G),[C,G]),v=k(e=>{N(e)},[N]),J=k(({item:e,index:t})=><Le index={t}distance={8}>
|
|
2
|
+
<Ae item={e}searchStr={h}onPress={v}/>
|
|
3
|
+
</Le>,[h,v]),Z=k((e,t)=>({length:148,offset:148*t,index:t}),[]),ee=k((e,t)=>e?.id?.toString()??t.toString(),[]),oe=P(()=>{const e=D.length,t=C.length;if(y.has("all")||!Array.from(y).some(E=>E!=="all"))return<S style={{paddingHorizontal:12,paddingTop:8,paddingBottom:3}}>
|
|
4
|
+
<A style={{fontFamily:z.interMedium,fontSize:11,color:o.grayTextWeak,letterSpacing:.2}}>
|
|
5
|
+
{t===e?`Showing ${e} logs`:`Showing ${t} of ${e} logs`}
|
|
6
|
+
</A>
|
|
7
|
+
</S>;{const E=Array.from(y).filter(I=>I!=="all").map(I=>I==="user-log"?"Log":I==="analytics"?"Analytics":I.charAt(0).toUpperCase()+I.slice(1));return<S style={{paddingHorizontal:12,paddingTop:8,paddingBottom:3}}>
|
|
8
|
+
<A style={{fontFamily:z.interMedium,fontSize:11,color:o.grayTextWeak,letterSpacing:.2}}>
|
|
9
|
+
Filtered by {E.join(", ")} ({t} of {e} logs)
|
|
10
|
+
</A>
|
|
11
|
+
</S>}},[D.length,C.length,y]),[O,_]=F.useState(!1),te=P(()=>["[AXIOS]","[API]","[GRAPHQL]","[REDUX]","[ANALYTICS]","[AUTH]","[NAV]","[STORAGE]","[PERF]","[WS]","[PUSH]","[PAYMENT]","[SYNC]","[BLE]","[LOCATION]","[TEST]","[DEBUG]"],[]),re=P(()=>[{id:V.All,label:w("common.all","All"),count:x.all?.split("/")?.[0]??"0",color:o.purple,Icon:Re},{id:V.UserLog,label:w("console.log","Log"),count:x["user-log"]?.split("/")?.[0]??"0",color:o.teal600,Icon:We},{id:V.Info,label:w("console.info","Info"),count:x.info?.split("/")?.[0]??"0",color:o.sky600,Icon:$e},{id:V.Warn,label:w("console.warning","Warn"),count:x.warn?.split("/")?.[0]??"0",color:o.amber600,Icon:Oe},{id:V.Error,label:w("console.error","Error"),count:x.error?.split("/")?.[0]??"0",color:o.errorColor,Icon:De},{id:V.Analytics,label:w("console.analytics","Analytics"),count:x.analytics?.split("/")?.[0]??"0",color:o.violet600,Icon:Ne}],[x,w]);return<S style={{flex:1}}>
|
|
12
|
+
<S style={{backgroundColor:o.white,borderBottomWidth:1,borderBottomColor:o.dividerColor,paddingBottom:6}}>
|
|
13
13
|
<S style={[T.toolbarRow,{marginTop:12,marginBottom:8}]}>
|
|
14
|
-
<S style={[T.searchContainer,
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
{
|
|
18
|
-
<S style={{backgroundColor:`${
|
|
19
|
-
<
|
|
14
|
+
<S style={[T.searchContainer,O&&{borderColor:o.purple,borderWidth:1.5}]}>
|
|
15
|
+
<Ee color={O?o.purple:o.grayTextWeak}size={16}/>
|
|
16
|
+
<Ie placeholder={w("console.searchPlaceholder")}placeholderTextColor={o.grayTextWeak}value={h}onChangeText={B}onFocus={()=>_(!0)}onBlur={()=>_(!1)}style={T.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
17
|
+
{h.length>0&&<S style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
18
|
+
<S style={{backgroundColor:`${o.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:2}}>
|
|
19
|
+
<A style={{color:o.purple,fontSize:10,fontFamily:z.interBold}}>
|
|
20
20
|
{C.length}
|
|
21
|
-
</
|
|
21
|
+
</A>
|
|
22
22
|
</S>
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
</
|
|
23
|
+
<Ce onPress={()=>B("")}hitSlop={10}style={T.clearBtn}>
|
|
24
|
+
<Fe color={o.grayTextWeak}size={14}/>
|
|
25
|
+
</Ce>
|
|
26
26
|
</S>}
|
|
27
27
|
</S>
|
|
28
28
|
|
|
29
29
|
<S style={T.toolbarRight}>
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
</
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
</
|
|
30
|
+
<H style={T.toolbarBtn}onPress={()=>X(e=>e==="newest"?"oldest":"newest")}hitSlop={10}>
|
|
31
|
+
<Pe color={o.grayTextStrong}size={18}direction={K==="newest"?"down":"up"}/>
|
|
32
|
+
</H>
|
|
33
|
+
<H style={[T.toolbarBtn,{borderColor:`${o.errorColor}38`,backgroundColor:`${o.errorColor}0F`}]}onPress={j}hitSlop={6}>
|
|
34
|
+
<He color={o.errorColor}size={15}/>
|
|
35
|
+
</H>
|
|
36
36
|
</S>
|
|
37
37
|
</S>
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
{(
|
|
41
|
-
{
|
|
42
|
-
<S style={{paddingHorizontal:8,paddingVertical:3,borderRadius:6,backgroundColor:t?
|
|
43
|
-
<
|
|
44
|
-
{
|
|
45
|
-
</
|
|
40
|
+
{(O||h.length>0)&&<Q horizontal showsHorizontalScrollIndicator={!1}style={{marginBottom:6,maxHeight:30}}contentContainerStyle={{paddingHorizontal:16,flexDirection:"row",alignItems:"center",gap:6}}>
|
|
41
|
+
{te.map(e=>{const t=h.includes(e);return<H key={e}onPress={()=>{B(t?r=>r.replace(e,"").trim():r=>r?`${r} ${e}`.trim():e)}}>
|
|
42
|
+
<S style={{paddingHorizontal:8,paddingVertical:3,borderRadius:6,backgroundColor:t?o.purple:`${o.purple}14`,borderWidth:1,borderColor:t?o.purple:`${o.purple}30`}}>
|
|
43
|
+
<A style={{fontFamily:z.interBold,fontSize:10,color:t?o.white:o.purple}}>
|
|
44
|
+
{e}
|
|
45
|
+
</A>
|
|
46
46
|
</S>
|
|
47
|
-
</
|
|
48
|
-
</
|
|
47
|
+
</H>})}
|
|
48
|
+
</Q>}
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
<S style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
|
|
52
|
-
<
|
|
53
|
-
{
|
|
52
|
+
<Q horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
53
|
+
{re.map(e=>{const t=e.id==="all"?y.has("all"):y.has(e.id)&&!y.has("all"),r=e.color||o.purple,E=t?o.white:r,I=e.Icon;return<H key={e.id}onPress={()=>{e.id==="all"?R(new Set(["all"])):R(le=>{const L=new Set(le);return L.delete("all"),L.has(e.id)?L.delete(e.id):L.add(e.id),L.size===0&&L.add("all"),L})}}>
|
|
54
54
|
<S style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:t?r:`${r}12`,borderWidth:1,borderColor:t?r:`${r}30`,gap:5}}>
|
|
55
|
-
<I size={11}color={
|
|
56
|
-
<
|
|
57
|
-
{
|
|
58
|
-
</
|
|
55
|
+
<I size={11}color={E}/>
|
|
56
|
+
<A style={{fontFamily:z.interBold,fontSize:10.5,color:t?o.white:o.primaryBlack}}>
|
|
57
|
+
{e.label}
|
|
58
|
+
</A>
|
|
59
59
|
<S style={{backgroundColor:t?"rgba(255,255,255,0.25)":`${r}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8}}>
|
|
60
|
-
<
|
|
61
|
-
{
|
|
62
|
-
</
|
|
60
|
+
<A style={{fontFamily:z.interBold,fontSize:9,color:t?o.white:r}}>
|
|
61
|
+
{e.count}
|
|
62
|
+
</A>
|
|
63
63
|
</S>
|
|
64
64
|
</S>
|
|
65
|
-
</
|
|
66
|
-
</
|
|
65
|
+
</H>})}
|
|
66
|
+
</Q>
|
|
67
67
|
</S>
|
|
68
68
|
</S>
|
|
69
69
|
|
|
70
|
-
<
|
|
71
|
-
</S>});export default
|
|
70
|
+
<Se ref={U}data={$}keyExtractor={ee}ListHeaderComponent={oe}renderItem={J}getItemLayout={Z}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}showsVerticalScrollIndicator={!1}ListEmptyComponent={<Ve isSearch={h.length>0||!y.has("all")}searchQuery={h}customTitle={h.length>0?"No matching console logs":"No console logs"}onClearSearch={()=>{B(""),R(new Set(["all"]))}}/>}ListFooterComponent={C.length>0?<Be count={$.length}totalCount={C.length}label="logs"loadMoreStep={Y}hasMore={$.length<C.length}onLoadMore={()=>M(e=>e+Y)}/>:null}contentContainerStyle={[T.listContent,C.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
71
|
+
</S>});export default Ue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
<
|
|
1
|
+
import oe,{useCallback as ae,useEffect as le,useMemo as G,useRef as ne,useState as W}from"react";import{FlatList as Ce,ScrollView as J,StyleSheet as be,Text as T,TextInput as Te,TouchableOpacity as Se,View as C}from"react-native";import{useTranslation as ke}from"../../i18n";import{useInspector as Ie}from"./InspectorContext";import M from"../TouchableScale";import Be from"../AnimatedEntrance";import Ve from"../EndOfListFooter";import Fe from"./FeatureUnderDevNotice";import Re from"../HighlightText";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as k}from"../../styles/AppFonts";import{clearCrashRecords as ve}from"../../customHooks/crashHandler";import He,{DEFAULT_CRASH_FILTERS as K,isCrashFiltersDefault as $}from"./CrashFilterModal";import{ConfirmationModal as Le}from"./ConfirmationModal";import{SearchIcon as Pe,ClearIcon as We,TrashIcon as $e,TerminalIcon as De,LayersIcon as Ae,ClockIcon as Me,ShieldAlertIcon as Oe,FlameIcon as Ee,JsIcon as Ne,HourglassIcon as Je,SkullIcon as _e,LayoutIcon as Ue,ChipIcon as Qe,AppleIcon as Ge,AndroidIcon as Ke,RepeatIcon as Xe,CodeBracketsIcon as Ye,FilterIcon as Ze,ForwardChevronIcon as Ct}from"../NetworkIcons";const bt=S=>{const R=Date.now(),j=Math.max(0,R-S),v=Math.floor(j/1e3),D=Math.floor(v/60),P=Math.floor(D/60),A=Math.floor(P/24);return v<60?`${v}s ago`:D<60?`${D}m ago`:P<24?`${P}h ago`:`${A}d ago`},X=10,Tt=oe.memo(()=>{const{t:S}=ke(),{crashRecords:R,setSelectedCrash:j,maxCrashLogs:v}=Ie(),D=v||50,P=ne(null),[A,_]=W(D),[B,E]=W(""),[z,U]=W("all"),[w,Q]=W(K),[Y,q]=W(!1),[Z,N]=W(!1);le(()=>{_(v||50),P.current?.scrollToOffset({offset:0,animated:!1})},[B,z,w,v]);const V=G(()=>{const r=R.length;let o=0,x=0,F=0,I=0,O=0;return R.forEach(L=>{L.isFatal&&o++,L.type==="js"?x++:L.type==="promise"?F++:L.type==="render"?I++:L.type==="native"&&O++}),{total:r,fatalCount:o,jsCount:x,promiseCount:F,renderCount:I,nativeCount:O}},[R]),H=G(()=>{let r=R.filter(o=>{if(z==="fatal"&&!o.isFatal||z==="js"&&o.type!=="js"||z==="promise"&&o.type!=="promise"||z==="render"&&o.type!=="render"||z==="native"&&o.type!=="native"||w.types.size>0&&!w.types.has("all")&&!(w.types.has("fatal")&&o.isFatal||w.types.has("js")&&o.type==="js"||w.types.has("promise")&&o.type==="promise"||w.types.has("render")&&o.type==="render"||w.types.has("native")&&o.type==="native"))return!1;if(w.timeWindow!=="all"){const x=Date.now(),F=w.timeWindow==="15m"?x-900*1e3:w.timeWindow==="1h"?x-3600*1e3:w.timeWindow==="24h"?x-1440*60*1e3:x-10080*60*1e3;if(o.timestamp<F)return!1}if(w.platform!=="all"&&(o.deviceInfo?.platform||"").toLowerCase()!==w.platform)return!1;if(w.engine!=="all"){const x=o.deviceInfo?.isHermes;if(w.engine==="hermes"&&x!==!0||w.engine==="jsc"&&x===!0)return!1}if(B.trim().length>0){const x=B.trim().toLowerCase().split(/\s+/).filter(Boolean),F=[o.message||"",o.name||"",o.stack||"",o.type||"",o.deviceInfo?.platform||"",...(o.breadcrumbs||[]).map(I=>`${I.type||""} ${I.message||""}`)].join(" ").toLowerCase();return x.every(I=>F.includes(I))}return!0});return w.sortBy==="time_asc"&&(r=[...r].sort((o,x)=>o.timestamp-x.timestamp)),r},[R,z,B,w]),ee=()=>{N(!0)},te=ae(({item:r,index:o})=>{const x=r.isFatal,F=r.type.toUpperCase(),I=r.parsedStack&&r.parsedStack.length>0?r.parsedStack.find(re=>re.isAppCode)||r.parsedStack[0]:null,O=r.type==="native"?`${e.errorColor}22`:r.type==="render"?`${e.purple}22`:r.type==="promise"?`${e.darkOrange}22`:`${e.offerPurple}22`,L=r.type==="native"?e.errorColor:r.type==="render"?e.purple:r.type==="promise"?e.darkOrange:e.offerPurple;return<Be index={o}distance={8}>
|
|
2
|
+
<M onPress={()=>{j(r)}}style={[t.cardContainer,x&&t.fatalCardBorder]}>
|
|
3
3
|
|
|
4
4
|
<C style={t.cardHeader}>
|
|
5
5
|
<C style={t.badgeRow}>
|
|
@@ -14,15 +14,15 @@ import Y,{useCallback as Z,useMemo as Q,useRef as ee,useState as D}from"react";i
|
|
|
14
14
|
<T style={t.caughtBadgeText}>{S("crash.handledBadge")}</T>
|
|
15
15
|
</C>}
|
|
16
16
|
|
|
17
|
-
<C style={[t.typeBadge,{backgroundColor:
|
|
18
|
-
<T style={[t.typeBadgeText,{color:
|
|
17
|
+
<C style={[t.typeBadge,{backgroundColor:O}]}>
|
|
18
|
+
<T style={[t.typeBadgeText,{color:L}]}>
|
|
19
19
|
{F}
|
|
20
20
|
</T>
|
|
21
21
|
</C>
|
|
22
22
|
</C>
|
|
23
23
|
|
|
24
24
|
<C style={t.timeRow}>
|
|
25
|
-
<
|
|
25
|
+
<Me size={11}color={e.grayTextWeak}/>
|
|
26
26
|
<T style={t.timestampText}>
|
|
27
27
|
{r.timeStr||new Date(r.timestamp).toLocaleTimeString()}
|
|
28
28
|
</T>
|
|
@@ -35,12 +35,12 @@ import Y,{useCallback as Z,useMemo as Q,useRef as ee,useState as D}from"react";i
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
<C style={{marginVertical:6}}>
|
|
38
|
-
<
|
|
38
|
+
<Re text={r.message||S("crash.unknownException")}highlight={B}numberOfLines={3}style={t.errorMessageText}/>
|
|
39
39
|
</C>
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
{I&&<C style={t.locationRow}>
|
|
43
|
-
<
|
|
43
|
+
<De size={12}color={e.grayTextWeak}/>
|
|
44
44
|
<T numberOfLines={1}ellipsizeMode="middle"style={t.locationText}>
|
|
45
45
|
{I.method!=="<anonymous>"?`${I.method} `:""}
|
|
46
46
|
<T style={{color:e.purple,fontFamily:k.interBold}}>
|
|
@@ -83,12 +83,12 @@ import Y,{useCallback as Z,useMemo as Q,useRef as ee,useState as D}from"react";i
|
|
|
83
83
|
</C>}
|
|
84
84
|
</C>
|
|
85
85
|
</C>
|
|
86
|
-
</
|
|
87
|
-
</
|
|
86
|
+
</M>
|
|
87
|
+
</Be>},[B,j]);return<C style={t.container}>
|
|
88
88
|
{R.length>0&&<>
|
|
89
89
|
|
|
90
90
|
<C style={t.statsBar}>
|
|
91
|
-
<
|
|
91
|
+
<J horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={t.statsScrollContent}>
|
|
92
92
|
<C style={[t.statChip,t.statChipActive]}>
|
|
93
93
|
<T style={t.statChipValue}>{V.total}</T>
|
|
94
94
|
<T style={t.statChipLabel}>{S("crash.statCrashes")}</T>
|
|
@@ -128,45 +128,45 @@ import Y,{useCallback as Z,useMemo as Q,useRef as ee,useState as D}from"react";i
|
|
|
128
128
|
</T>
|
|
129
129
|
<T style={t.statChipLabel}>{S("crash.statNative")}</T>
|
|
130
130
|
</C>
|
|
131
|
-
</
|
|
131
|
+
</J>
|
|
132
132
|
</C>
|
|
133
133
|
|
|
134
134
|
|
|
135
135
|
<C style={t.controlsContainer}>
|
|
136
136
|
<C style={t.searchRow}>
|
|
137
137
|
<C style={t.searchInputWrapper}>
|
|
138
|
-
|
|
139
|
-
<
|
|
138
|
+
<Pe color={e.grayTextWeak}size={14}/>
|
|
139
|
+
<Te value={B}onChangeText={E}placeholder={S("crash.searchPlaceholder")}placeholderTextColor={e.grayTextWeak}style={t.searchInput}autoCapitalize="none"autoCorrect={!1}/>
|
|
140
140
|
{B.length>0&&<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
141
141
|
<C style={{backgroundColor:`${e.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
142
142
|
<T style={{color:e.purple,fontSize:9.5,fontFamily:k.interBold}}>
|
|
143
143
|
{H.length}
|
|
144
144
|
</T>
|
|
145
145
|
</C>
|
|
146
|
-
<
|
|
147
|
-
<
|
|
148
|
-
</
|
|
146
|
+
<Se onPress={()=>E("")}hitSlop={8}>
|
|
147
|
+
<We color={e.grayTextWeak}size={14}/>
|
|
148
|
+
</Se>
|
|
149
149
|
</C>}
|
|
150
150
|
</C>
|
|
151
151
|
|
|
152
152
|
|
|
153
|
-
<
|
|
154
|
-
<Ze size={14}color={
|
|
155
|
-
{
|
|
156
|
-
</
|
|
153
|
+
<M onPress={()=>q(!0)}style={[t.filterButton,!$(w)&&{borderColor:`${e.brandPurple}60`,backgroundColor:`${e.brandPurple}15`}]}>
|
|
154
|
+
<Ze size={14}color={$(w)?e.grayTextStrong:e.brandPurple}/>
|
|
155
|
+
{!$(w)&&<C style={{position:"absolute",top:2,right:2,width:7,height:7,borderRadius:3.5,backgroundColor:e.darkOrange,borderWidth:1,borderColor:e.white}}/>}
|
|
156
|
+
</M>
|
|
157
157
|
|
|
158
158
|
|
|
159
|
-
<
|
|
160
|
-
|
|
161
|
-
</
|
|
159
|
+
<M onPress={ee}style={t.clearButton}>
|
|
160
|
+
<$e size={14}color={e.errorColor}/>
|
|
161
|
+
</M>
|
|
162
162
|
</C>
|
|
163
163
|
|
|
164
|
-
<
|
|
164
|
+
<Fe featureName="Crash & Exception Sentinel"/>
|
|
165
165
|
|
|
166
166
|
|
|
167
167
|
<C style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
|
|
168
|
-
<
|
|
169
|
-
{[{key:"all",label:S("crash.filterAll"),Icon:
|
|
168
|
+
<J horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
169
|
+
{[{key:"all",label:S("crash.filterAll"),Icon:Ae,count:V.total,themeColor:e.purple},{key:"fatal",label:S("crash.filterFatal"),Icon:_e,count:V.fatalCount,themeColor:e.errorColor},{key:"js",label:S("crash.filterJsError"),Icon:Ne,count:V.jsCount,themeColor:e.amber600},{key:"promise",label:S("crash.filterPromise"),Icon:Je,count:V.promiseCount,themeColor:e.orange600},{key:"render",label:S("crash.filterRender"),Icon:Ue,count:V.renderCount,themeColor:e.violet600},{key:"native",label:S("crash.filterNative"),Icon:Qe,count:V.nativeCount,themeColor:e.cyan600}].map(r=>{const o=z===r.key,x=r.themeColor||e.purple,F=o?e.white:x,I=r.Icon;return<M key={r.key}onPress={()=>U(r.key)}>
|
|
170
170
|
<C style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:o?x:`${x}12`,borderWidth:1,borderColor:o?x:`${x}30`,gap:5}}>
|
|
171
171
|
<I size={11}color={F}/>
|
|
172
172
|
<T style={{fontFamily:k.interBold,fontSize:10.5,color:o?e.white:e.primaryBlack}}>
|
|
@@ -178,32 +178,34 @@ import Y,{useCallback as Z,useMemo as Q,useRef as ee,useState as D}from"react";i
|
|
|
178
178
|
</T>
|
|
179
179
|
</C>
|
|
180
180
|
</C>
|
|
181
|
-
</
|
|
182
|
-
</
|
|
181
|
+
</M>})}
|
|
182
|
+
</J>
|
|
183
183
|
</C>
|
|
184
184
|
</C>
|
|
185
185
|
</>}
|
|
186
186
|
|
|
187
187
|
|
|
188
|
-
{H.length===0?<
|
|
188
|
+
{H.length===0?<J contentContainerStyle={t.emptyContainer}showsVerticalScrollIndicator={!1}>
|
|
189
189
|
<C style={t.emptyIconCircle}>
|
|
190
|
-
<
|
|
190
|
+
<Oe size={38}color={e.greenColor}/>
|
|
191
191
|
</C>
|
|
192
192
|
<T style={t.emptyTitle}>
|
|
193
|
-
{B.length>0?"No matching crash entries":z!=="all"
|
|
193
|
+
{B.length>0?"No matching crash entries":z!=="all"||!$(w)?"No crashes match filters":S("crash.emptyTitle")}
|
|
194
194
|
</T>
|
|
195
195
|
<T style={t.emptySub}>
|
|
196
|
-
{B?`No crash entries matched "${B}"`:z!=="all"
|
|
196
|
+
{B?`No crash entries matched "${B}"`:z!=="all"||!$(w)?"Try adjusting your filters or search keywords.":S("crash.emptySubtitle")}
|
|
197
197
|
</T>
|
|
198
|
-
{(B.length>0||z!=="all"
|
|
198
|
+
{(B.length>0||z!=="all"||!$(w))&&<M onPress={()=>{E(""),U("all"),Q(K)}}style={{marginTop:10,paddingHorizontal:14,paddingVertical:7,borderRadius:8,backgroundColor:e.purple}}>
|
|
199
199
|
<T style={{fontFamily:k.interBold,fontSize:11.5,color:e.white}}>
|
|
200
200
|
Clear Search & Filters
|
|
201
201
|
</T>
|
|
202
|
-
</
|
|
203
|
-
</
|
|
204
|
-
<Ce ref={
|
|
202
|
+
</M>}
|
|
203
|
+
</J>:<>
|
|
204
|
+
<Ce ref={P}data={H.slice(0,A)}keyExtractor={r=>r.id}renderItem={te}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}contentContainerStyle={t.listContent}showsVerticalScrollIndicator={!1}ListFooterComponent={H.length>0?<Ve count={Math.min(A,H.length)}totalCount={H.length}label="crashes"loadMoreStep={X}hasMore={H.length>A}onLoadMore={()=>_(r=>r+X)}/>:null}/>
|
|
205
205
|
</>}
|
|
206
206
|
|
|
207
207
|
|
|
208
|
-
<
|
|
209
|
-
|
|
208
|
+
<He visible={Y}onClose={()=>q(!1)}filters={w}onApply={Q}searchQuery={B}/>
|
|
209
|
+
|
|
210
|
+
<Le visible={Z}title={S("crash.clearTitle","Clear Crash Records")}message={S("crash.clearMessage","Are you sure you want to clear all intercepted crash records?")}confirmText={S("crash.clearConfirm","Clear All")}cancelText={S("crash.clearCancel","Cancel")}isDestructive={!0}icon="trash"onConfirm={()=>{N(!1),ve()}}onCancel={()=>N(!1)}/>
|
|
211
|
+
</C>});export default Tt;const t=be.create({container:{flex:1,backgroundColor:e.grayBackground},statsBar:{backgroundColor:e.primaryLight,borderBottomWidth:1,borderBottomColor:e.grayBorderSecondary,paddingVertical:10},statsScrollContent:{paddingHorizontal:16,gap:8},statChip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:10,paddingVertical:5,borderRadius:8,backgroundColor:e.purpleShade50,borderWidth:1,borderColor:`${e.purple}14`},statChipActive:{backgroundColor:`${e.purple}14`,borderColor:`${e.purple}33`},statChipValue:{fontFamily:k.interBold,fontSize:13,color:e.primaryBlack},statChipLabel:{fontFamily:k.interMedium,fontSize:11,color:e.grayText},controlsContainer:{paddingHorizontal:16,paddingTop:12,paddingBottom:6,backgroundColor:e.grayBackground},searchRow:{flexDirection:"row",alignItems:"center",gap:8},searchInputWrapper:{flex:1,flexDirection:"row",alignItems:"center",backgroundColor:e.primaryLight,borderWidth:1,borderColor:e.grayBorderSecondary,borderRadius:10,paddingHorizontal:10,height:38,gap:8},searchInput:{flex:1,fontFamily:k.interRegular,fontSize:13,color:e.primaryBlack,paddingVertical:0},clearButton:{width:38,height:38,borderRadius:10,backgroundColor:`${e.errorColor}14`,borderWidth:1,borderColor:`${e.errorColor}22`,alignItems:"center",justifyContent:"center"},filterButton:{width:38,height:38,borderRadius:10,backgroundColor:`${e.brandPurple}0F`,borderWidth:1,borderColor:`${e.brandPurple}30`,alignItems:"center",justifyContent:"center"},filterScrollContent:{paddingVertical:10,gap:6},filterChip:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:e.primaryLight,borderWidth:1,borderColor:e.grayBorderSecondary},filterChipActive:{backgroundColor:e.purple,borderColor:e.purple},filterChipText:{fontFamily:k.interMedium,fontSize:12,color:e.grayText},filterChipTextActive:{fontFamily:k.interBold,color:e.white},listContent:{paddingHorizontal:16,paddingTop:4,paddingBottom:24,gap:10},cardContainer:{backgroundColor:e.primaryLight,borderRadius:12,borderWidth:1,borderColor:e.grayBorderSecondary,padding:14,shadowColor:e.shadowColorString,shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:3,elevation:2},fatalCardBorder:{borderColor:`${e.errorColor}44`},cardHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},badgeRow:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:1},sNoBadge:{backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary,paddingHorizontal:6,paddingVertical:3,borderRadius:5},sNoBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.grayText,letterSpacing:.3},fatalBadge:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:e.errorColor,paddingHorizontal:6,paddingVertical:3,borderRadius:5},fatalBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.white,letterSpacing:.5},caughtBadge:{backgroundColor:`${e.greenColor}1F`,paddingHorizontal:6,paddingVertical:3,borderRadius:5},caughtBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.greenColor,letterSpacing:.5},typeBadge:{paddingHorizontal:6,paddingVertical:3,borderRadius:5},typeBadgeText:{fontFamily:k.interBold,fontSize:9.5,letterSpacing:.5},timeRow:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:1},timestampText:{fontFamily:k.interRegular,fontSize:11,color:e.grayTextWeak},relativeTimeText:{fontFamily:k.interBold,fontSize:10,color:e.grayTextWeak,backgroundColor:e.grayBackground,paddingHorizontal:5,paddingVertical:1,borderRadius:4,overflow:"hidden"},errorMessageText:{fontFamily:k.interBold,fontSize:13.5,color:e.primaryBlack,lineHeight:18},locationRow:{flexDirection:"row",alignItems:"center",gap:6,marginTop:2,marginBottom:6,backgroundColor:e.purpleShade50,paddingHorizontal:8,paddingVertical:4,borderRadius:6},locationText:{fontFamily:k.interRegular,fontSize:11,color:e.grayText,flex:1},cardFooter:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginTop:6,paddingTop:8,borderTopWidth:1,borderTopColor:e.dividerColor},metaPill:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:e.purpleShade50,paddingHorizontal:6,paddingVertical:2,borderRadius:4},metaPillText:{fontFamily:k.interMedium,fontSize:10,color:e.grayTextWeak},emptyContainer:{flexGrow:1,alignItems:"center",justifyContent:"center",padding:32,paddingBottom:80},emptyIconCircle:{width:72,height:72,borderRadius:36,backgroundColor:`${e.greenColor}1F`,alignItems:"center",justifyContent:"center",marginBottom:16},emptyTitle:{fontFamily:k.interBold,fontSize:17,color:e.primaryBlack,marginBottom:6},emptySub:{fontFamily:k.interRegular,fontSize:13,color:e.grayText,textAlign:"center",lineHeight:18,maxWidth:280}});
|