react-native-inapp-inspector 2.5.9 → 2.5.10
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/Inspector/ConsoleExportModal.d.ts +10 -0
- package/dist/commonjs/components/Inspector/ConsoleExportModal.js +317 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.js +20 -15
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +34 -20
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +49 -44
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +3 -3
- package/dist/commonjs/components/SkeletonPlaceholder.js +3 -3
- package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
- package/dist/commonjs/constants/telemetryConfig.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.d.ts +15 -0
- package/dist/commonjs/helpers/shareFormatter.js +15 -8
- package/dist/commonjs/i18n/locales/ar.json +1 -1
- package/dist/commonjs/i18n/locales/bn.json +1 -1
- 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 -1
- package/dist/commonjs/i18n/locales/hi.json +1 -1
- package/dist/commonjs/i18n/locales/id.json +1 -1
- package/dist/commonjs/i18n/locales/it.json +1 -1
- package/dist/commonjs/i18n/locales/ja.json +1 -1
- package/dist/commonjs/i18n/locales/kn.json +1 -1
- package/dist/commonjs/i18n/locales/ko.json +1 -1
- package/dist/commonjs/i18n/locales/ml.json +1 -1
- package/dist/commonjs/i18n/locales/mr.json +1 -1
- package/dist/commonjs/i18n/locales/nl.json +1 -1
- package/dist/commonjs/i18n/locales/pa.json +1 -1
- package/dist/commonjs/i18n/locales/pl.json +1 -1
- 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 -1
- package/dist/commonjs/i18n/locales/te.json +1 -1
- package/dist/commonjs/i18n/locales/tr.json +1 -1
- package/dist/commonjs/i18n/locales/vi.json +1 -1
- package/dist/commonjs/i18n/locales/zh.json +1 -1
- package/dist/esm/components/Inspector/ConsoleExportModal.d.ts +10 -0
- package/dist/esm/components/Inspector/ConsoleExportModal.js +317 -0
- package/dist/esm/components/Inspector/ConsoleTab.js +38 -33
- package/dist/esm/components/Inspector/MediaGalleryTab.js +88 -74
- package/dist/esm/components/Inspector/MediaPreviewModal.js +178 -173
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +11 -11
- package/dist/esm/components/SkeletonPlaceholder.js +11 -11
- package/dist/esm/constants/telemetryConfig.d.ts +3 -3
- package/dist/esm/constants/telemetryConfig.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/helpers/shareFormatter.d.ts +15 -0
- package/dist/esm/helpers/shareFormatter.js +15 -8
- package/dist/esm/i18n/locales/ar.json +1 -1
- package/dist/esm/i18n/locales/bn.json +1 -1
- 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 -1
- package/dist/esm/i18n/locales/hi.json +1 -1
- package/dist/esm/i18n/locales/id.json +1 -1
- package/dist/esm/i18n/locales/it.json +1 -1
- package/dist/esm/i18n/locales/ja.json +1 -1
- package/dist/esm/i18n/locales/kn.json +1 -1
- package/dist/esm/i18n/locales/ko.json +1 -1
- package/dist/esm/i18n/locales/ml.json +1 -1
- package/dist/esm/i18n/locales/mr.json +1 -1
- package/dist/esm/i18n/locales/nl.json +1 -1
- package/dist/esm/i18n/locales/pa.json +1 -1
- package/dist/esm/i18n/locales/pl.json +1 -1
- 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 -1
- package/dist/esm/i18n/locales/te.json +1 -1
- package/dist/esm/i18n/locales/tr.json +1 -1
- package/dist/esm/i18n/locales/vi.json +1 -1
- package/dist/esm/i18n/locales/zh.json +1 -1
- package/package.json +1 -1
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/android/build/reports/problems/problems-report.html +0 -659
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import{useCallback as ne,useEffect as De,useMemo as $,useRef as He,useState as k}from"react";import{Modal as Ze,View as T,Text as C,TextInput as Le,StyleSheet as Pe,Pressable as Qe,Animated as L,Easing as J,ScrollView as Ye,Platform as _e,Share as Ee}from"react-native";import F from"../TouchableScale";import{AppColors as t}from"../../styles/AppColors";import{AppFonts as w}from"../../styles/AppFonts";import{ExportIcon as Ce,ShareIcon as Ct,SaveIcon as Tt,CopyIcon as St,CloseWhite as Bt,CircleCheckIcon as Ft,InfoCircleIcon as Vt,WarningTriangleIcon as It,ErrorCircleIcon as Rt,LayersIcon as We,FilterIcon as At,CheckIcon as Dt,ZapIcon as Ht,PenIcon as Lt}from"../NetworkIcons";import{triggerNativeHaptic as R}from"../../native/NativeInspector";import{copyToClipboard as Pt,showToast as X}from"../../helpers";import{formatConsoleLogsExport as Et,estimateConsoleLogsExportSize as Wt,generateConsoleLogsFilename as Ot}from"../../helpers/shareFormatter";import{useTranslation as Mt}from"../../i18n";export const ConsoleExportModal=({visible:ae,onClose:Z,filteredLogs:Q,allLogs:Y})=>{const{t:S}=Mt(),[O,_]=k("config"),[P,be]=k("filtered"),[j,Te]=k("info"),[V,se]=k("all"),[de,we]=k("50"),[M,Se]=k(""),[A,Be]=k("txt"),[ce,ke]=k(!1),[ge,ve]=k(!1),[ue,Fe]=k(!1),[pe,Ve]=k(!1),[me,Ie]=k(!1),[Oe,fe]=k(0),[Me,ye]=k(0),[D,Re]=k(""),[H,ze]=k(""),[$e,Ae]=k(0),N=He(new L.Value(0)).current,ee=He(new L.Value(1)).current,E=$(()=>{if(!M||M.trim().length===0)return{isValid:!0,error:null,regex:null};try{return{isValid:!0,error:null,regex:new RegExp(M.trim(),"i")}}catch(o){return{isValid:!1,error:o?.message||"Invalid pattern",regex:null}}},[M]),te=$(()=>({includeStackTrace:ce,includeArguments:ge,includeCaller:ue,includeTimestamps:pe,includeAppInfo:me,includeDuplicates:!1,ignorePattern:V==="custom"&&E.isValid?M.trim():void 0}),[ce,ge,ue,pe,me,V,E.isValid,M]);De(()=>{if(O==="progress"){const o=L.loop(L.sequence([L.timing(ee,{toValue:1.05,duration:600,easing:J.inOut(J.ease),useNativeDriver:!0}),L.timing(ee,{toValue:1,duration:600,easing:J.inOut(J.ease),useNativeDriver:!0})]));return o.start(),()=>o.stop()}},[O,ee]),De(()=>{ae&&(_("config"),se("all"),Te("info"),Be("txt"),we("50"),Se(""),ke(!1),ve(!1),Fe(!1),Ve(!1),Ie(!1),fe(0),ye(0),Re(""),ze(""),Ae(0),N.setValue(0))},[ae,N]);const G=$(()=>P==="filtered"?Q:Y,[P,Q,Y]),K=$(()=>j==="all"?G:G.filter(o=>j==="info"?o.type==="info"||o.sourceMethod==="log"||o.sourceMethod==="info":j==="warn"?o.type==="warn":j==="error"?o.type==="error":!0),[G,j]),oe=$(()=>{let o=0,B=0,I=0;return G.forEach(W=>{W.type==="error"?I++:W.type==="warn"?B++:o++}),{all:G.length,info:o,warn:B,error:I}},[G]),{selectedLogs:v,ignoredCount:re}=$(()=>{if(K.length===0)return{selectedLogs:[],ignoredCount:0};let B=K,I=0;if(V==="custom"&&E.regex){const z=E.regex,ie=B.length;B=B.filter(U=>{const qe=U.message||"",Je=U.rawArgs?JSON.stringify(U.rawArgs):"",Xe=U.caller||"";return!z.test(qe)&&!z.test(Je)&&!z.test(Xe)}),I=ie-B.length}let W=B.length;if(V==="all")W=B.length;else if(V==="custom"){const z=parseInt(de,10);W=isNaN(z)||z<=0?B.length:Math.min(z,B.length)}return{selectedLogs:B.slice(-W),ignoredCount:I}},[K,V,de,E.regex]),le=$(()=>Wt(v,A,te),[v,A,te]),q=o=>o<=0?"0 KB":o<1024?`${(o/1024).toFixed(2)} KB`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(2)} MB`,je=ne(()=>{if(v.length===0){X(S("console.noLogsToExport","No logs available to export"));return}R("medium"),_("progress"),fe(0),ye(0),N.setValue(0);const o=v.length,B=Math.max(1,Math.floor(o/10));let I=0;const W=setInterval(()=>{I=Math.min(I+B,o);const z=I/o;fe(Math.round(z*100)),ye(I),L.timing(N,{toValue:z,duration:120,easing:J.linear,useNativeDriver:!1}).start(),I>=o&&(clearInterval(W),setTimeout(()=>{const ie=Et(v,A,te),U=Ot(A);Re(ie),ze(U),Ae(ie.length),_("complete"),R("heavy")},180))},45)},[v,A,te,N,S]),Ne=ne(async()=>{if(D){R("light");try{await Ee.share({title:H,message:D},{dialogTitle:`Share ${H}`,subject:H})}catch(o){o?.message!=="User did not share"&&X(o?.message||"Failed to open share sheet")}}},[D,H]),Ge=ne(async()=>{if(D){R("medium");try{await Ee.share({title:`Save ${H}`,message:D},{dialogTitle:`Save to Disk (${H})`,subject:H}),X(S("console.savePromptOpened","Opened save to disk dialog"))}catch(o){o?.message!=="User did not share"&&X(o?.message||"Save error")}}},[D,H,S]),Ue=ne(()=>{D&&(R("light"),Pt(D,"Console Logs"),X(S("console.copiedLogs","Logs copied to clipboard!")))},[D,S]),Ke=Q.length!==Y.length;return<Ze visible={ae}transparent animationType="slide"onRequestClose={Z}>
|
|
2
|
+
<T style={e.overlay}>
|
|
3
|
+
<Qe style={e.backdrop}onPress={Z}/>
|
|
4
|
+
|
|
5
|
+
<T style={e.bottomSheetCard}>
|
|
6
|
+
|
|
7
|
+
<T style={e.sheetHandleContainer}>
|
|
8
|
+
<T style={e.sheetHandle}/>
|
|
9
|
+
</T>
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<T style={e.headerRow}>
|
|
13
|
+
<T style={e.headerLeft}>
|
|
14
|
+
<T style={e.iconBadge}>
|
|
15
|
+
<Ce size={18}color={t.purple}/>
|
|
16
|
+
</T>
|
|
17
|
+
<T style={e.headerTextGroup}>
|
|
18
|
+
<C style={e.title}>
|
|
19
|
+
{S("console.exportTitle","Export Console Logs")}
|
|
20
|
+
</C>
|
|
21
|
+
<C style={e.subtitle}>
|
|
22
|
+
{O==="config"?`${v.length} logs ready for export`:O==="progress"?"Preparing exported file...":"Export complete"}
|
|
23
|
+
</C>
|
|
24
|
+
</T>
|
|
25
|
+
</T>
|
|
26
|
+
<F onPress={Z}hitSlop={10}style={e.closeBtn}>
|
|
27
|
+
<Bt size={12}color={t.grayTextWeak}/>
|
|
28
|
+
</F>
|
|
29
|
+
</T>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
{O==="config"&&<>
|
|
33
|
+
<Ye showsVerticalScrollIndicator={!1}contentContainerStyle={e.configContainer}>
|
|
34
|
+
|
|
35
|
+
{Ke&&<T style={e.section}>
|
|
36
|
+
<C style={e.sectionLabel}>
|
|
37
|
+
{S("console.exportScope","LOG SOURCE SCOPE")}
|
|
38
|
+
</C>
|
|
39
|
+
<T style={e.segmentedRow}>
|
|
40
|
+
<F onPress={()=>{R("light"),be("filtered")}}style={[e.segmentBtn,P==="filtered"&&e.segmentBtnActive]}>
|
|
41
|
+
<At size={13}color={P==="filtered"?t.purple:t.grayTextWeak}/>
|
|
42
|
+
<C style={[e.segmentBtnText,P==="filtered"&&e.segmentBtnTextActive]}>
|
|
43
|
+
{S("console.filteredView","Active Filter")} (
|
|
44
|
+
{Q.length})
|
|
45
|
+
</C>
|
|
46
|
+
</F>
|
|
47
|
+
|
|
48
|
+
<F onPress={()=>{R("light"),be("all")}}style={[e.segmentBtn,P==="all"&&e.segmentBtnActive]}>
|
|
49
|
+
<We size={13}color={P==="all"?t.purple:t.grayTextWeak}/>
|
|
50
|
+
<C style={[e.segmentBtnText,P==="all"&&e.segmentBtnTextActive]}>
|
|
51
|
+
{S("console.allLogsScope","All Logs")} ({Y.length})
|
|
52
|
+
</C>
|
|
53
|
+
</F>
|
|
54
|
+
</T>
|
|
55
|
+
</T>}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
<T style={e.section}>
|
|
59
|
+
<C style={e.sectionLabel}>LOG LEVEL FILTER</C>
|
|
60
|
+
<T style={e.levelRow}>
|
|
61
|
+
{[{id:"all",label:"All",count:oe.all,color:t.purple,Icon:We},{id:"info",label:"Info / Log",count:oe.info,color:t.sky600,Icon:Vt},{id:"warn",label:"Warn",count:oe.warn,color:t.amber600,Icon:It},{id:"error",label:"Error",count:oe.error,color:t.errorColor,Icon:Rt}].map(o=>{const B=j===o.id,I=o.Icon;return<F key={o.id}onPress={()=>{R("light"),Te(o.id)}}style={[e.levelChip,B&&{backgroundColor:`${o.color}15`,borderColor:o.color}]}>
|
|
62
|
+
<I size={11}color={B?o.color:t.grayTextWeak}/>
|
|
63
|
+
<C style={[e.levelChipText,B&&{color:o.color,fontFamily:w.interBold}]}>
|
|
64
|
+
{o.label}
|
|
65
|
+
</C>
|
|
66
|
+
<T style={[e.levelCountBadge,B&&{backgroundColor:`${o.color}25`}]}>
|
|
67
|
+
<C style={[e.levelCountText,B&&{color:o.color}]}>
|
|
68
|
+
{o.count}
|
|
69
|
+
</C>
|
|
70
|
+
</T>
|
|
71
|
+
</F>})}
|
|
72
|
+
</T>
|
|
73
|
+
</T>
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
<T style={e.section}>
|
|
77
|
+
<T style={e.sectionHeaderRow}>
|
|
78
|
+
<C style={e.sectionLabel}>LOGS COUNT RANGE</C>
|
|
79
|
+
<T style={e.countPill}>
|
|
80
|
+
<C style={e.countPillText}>
|
|
81
|
+
Matched: {K.length}
|
|
82
|
+
</C>
|
|
83
|
+
</T>
|
|
84
|
+
</T>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
<T style={e.segmentedRow}>
|
|
88
|
+
<F onPress={()=>{R("light"),se("all")}}style={[e.segmentBtn,V==="all"&&e.segmentBtnActive]}>
|
|
89
|
+
<Ht size={13}color={V==="all"?t.purple:t.grayTextStrong}/>
|
|
90
|
+
<C style={[e.segmentBtnText,V==="all"&&e.segmentBtnTextActive]}>
|
|
91
|
+
All ({K.length})
|
|
92
|
+
</C>
|
|
93
|
+
</F>
|
|
94
|
+
|
|
95
|
+
<F onPress={()=>{R("light"),se("custom")}}style={[e.segmentBtn,V==="custom"&&e.segmentBtnActive]}>
|
|
96
|
+
<Lt size={12}color={V==="custom"?t.purple:t.grayTextStrong}/>
|
|
97
|
+
<C style={[e.segmentBtnText,V==="custom"&&e.segmentBtnTextActive]}>
|
|
98
|
+
Custom
|
|
99
|
+
</C>
|
|
100
|
+
</F>
|
|
101
|
+
</T>
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
{V==="custom"&&<T style={e.customOptionsContainer}>
|
|
105
|
+
|
|
106
|
+
<T style={e.customFieldRow}>
|
|
107
|
+
<C style={e.customFieldLabel}>
|
|
108
|
+
{S("console.enterCount","Enter number of logs:")}
|
|
109
|
+
</C>
|
|
110
|
+
<Le keyboardType="number-pad"value={de}onChangeText={we}style={e.customCountInput}placeholder="e.g. 50"placeholderTextColor={t.slate400}/>
|
|
111
|
+
</T>
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
<T style={e.regexFieldBlock}>
|
|
115
|
+
<T style={e.regexLabelRow}>
|
|
116
|
+
<C style={e.customFieldLabel}>
|
|
117
|
+
{S("console.ignorePatterns","Ignore Patterns (Regex):")}
|
|
118
|
+
</C>
|
|
119
|
+
{E.isValid&&re>0&&<T style={e.regexExclusionBadge}>
|
|
120
|
+
<C style={e.regexExclusionBadgeText}>
|
|
121
|
+
-{re} excluded
|
|
122
|
+
</C>
|
|
123
|
+
</T>}
|
|
124
|
+
</T>
|
|
125
|
+
|
|
126
|
+
<Le autoCapitalize="none"autoCorrect={!1}value={M}onChangeText={Se}style={[e.regexInput,!E.isValid&&e.regexInputError]}placeholder="e.g. ^\[DEBUG\]|analytics|token=.*"placeholderTextColor={t.slate400}/>
|
|
127
|
+
|
|
128
|
+
{E.isValid?<C style={e.regexHelpText}>
|
|
129
|
+
{S("console.ignorePatternsDesc","Logs matching this regex will be excluded from export.")}
|
|
130
|
+
</C>:<C style={e.regexErrorText}>
|
|
131
|
+
⚠️{" "}
|
|
132
|
+
{S("console.invalidRegex","Invalid regular expression syntax")}
|
|
133
|
+
</C>}
|
|
134
|
+
</T>
|
|
135
|
+
</T>}
|
|
136
|
+
</T>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
<T style={e.section}>
|
|
140
|
+
<C style={e.sectionLabel}>EXPORT FORMAT</C>
|
|
141
|
+
<T style={e.formatRowInline}>
|
|
142
|
+
{[{id:"txt",label:"Plain Text (.txt)",desc:"Universal text with structured banners"},{id:"log",label:"Log File (.log)",desc:"Standard log format with frame blocks"}].map(o=>{const B=A===o.id;return<F key={o.id}onPress={()=>{R("light"),Be(o.id)}}style={[e.formatCardInline,B&&e.formatCardInlineActive]}>
|
|
143
|
+
<T style={e.formatCardInlineHeader}>
|
|
144
|
+
<T style={[e.radioCircle,B&&e.radioCircleActive]}>
|
|
145
|
+
{B&&<T style={e.radioDot}/>}
|
|
146
|
+
</T>
|
|
147
|
+
<C style={[e.formatCardTitle,B&&e.formatCardTitleActive]}>
|
|
148
|
+
{o.label}
|
|
149
|
+
</C>
|
|
150
|
+
</T>
|
|
151
|
+
<C style={e.formatCardDesc}>{o.desc}</C>
|
|
152
|
+
</F>})}
|
|
153
|
+
</T>
|
|
154
|
+
</T>
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
<T style={e.section}>
|
|
158
|
+
<C style={e.sectionLabel}>CONTENT OPTIONS</C>
|
|
159
|
+
<T style={e.optionsGrid}>
|
|
160
|
+
{[{key:"stack",label:"Stack Trace & Frames",value:ce,toggle:()=>ke(o=>!o)},{key:"args",label:"Arguments & Payloads",value:ge,toggle:()=>ve(o=>!o)},{key:"caller",label:"Caller & File Origin",value:ue,toggle:()=>Fe(o=>!o)},{key:"timestamps",label:"Exact Timestamps",value:pe,toggle:()=>Ve(o=>!o)},{key:"appinfo",label:"System Header Banner",value:me,toggle:()=>Ie(o=>!o)}].map(o=><F key={o.key}onPress={()=>{R("light"),o.toggle()}}style={[e.optionRow,o.value&&e.optionRowActive]}>
|
|
161
|
+
<T style={[e.checkbox,o.value&&e.checkboxActive]}>
|
|
162
|
+
{o.value&&<Dt size={10}color={t.white}/>}
|
|
163
|
+
</T>
|
|
164
|
+
<C style={[e.optionLabel,o.value&&e.optionLabelActive]}>
|
|
165
|
+
{o.label}
|
|
166
|
+
</C>
|
|
167
|
+
</F>)}
|
|
168
|
+
</T>
|
|
169
|
+
</T>
|
|
170
|
+
</Ye>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<T style={e.staticFooter}>
|
|
174
|
+
<T style={e.footerMinimalSummary}>
|
|
175
|
+
<T style={e.footerSummaryLeft}>
|
|
176
|
+
<T style={e.footerSummaryDot}/>
|
|
177
|
+
<C style={e.footerSummaryCountText}>
|
|
178
|
+
{v.length} logs
|
|
179
|
+
</C>
|
|
180
|
+
<C style={e.footerSummaryDivider}>•</C>
|
|
181
|
+
<C style={e.footerSummarySizeText}>
|
|
182
|
+
~{q(le)}
|
|
183
|
+
</C>
|
|
184
|
+
<C style={e.footerSummaryDivider}>•</C>
|
|
185
|
+
<C style={e.footerSummaryFormatText}>
|
|
186
|
+
.{A.toUpperCase()}
|
|
187
|
+
</C>
|
|
188
|
+
</T>
|
|
189
|
+
|
|
190
|
+
{re>0&&<T style={e.footerIgnoredPill}>
|
|
191
|
+
<C style={e.footerIgnoredPillText}>
|
|
192
|
+
-{re} ignored
|
|
193
|
+
</C>
|
|
194
|
+
</T>}
|
|
195
|
+
</T>
|
|
196
|
+
|
|
197
|
+
<F onPress={je}disabled={v.length===0}style={[e.exportActionBtn,v.length===0&&e.exportActionBtnDisabled]}>
|
|
198
|
+
<Ce size={17}color={t.white}/>
|
|
199
|
+
<C style={e.exportActionBtnText}>
|
|
200
|
+
{S("console.exportLogsAction",{count:v.length,size:q(le),defaultValue:`Export ${v.length} Logs (${q(le)})`})}
|
|
201
|
+
</C>
|
|
202
|
+
</F>
|
|
203
|
+
</T>
|
|
204
|
+
</>}
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
{O==="progress"&&<T style={e.progressContainer}>
|
|
208
|
+
<L.View style={[e.progressIconBadge,{transform:[{scale:ee}]}]}>
|
|
209
|
+
<Ce size={30}color={t.purple}/>
|
|
210
|
+
</L.View>
|
|
211
|
+
|
|
212
|
+
<C style={e.progressHeading}>
|
|
213
|
+
{S("console.exportingLogs","Exporting Console Logs...")}
|
|
214
|
+
</C>
|
|
215
|
+
<C style={e.progressSub}>
|
|
216
|
+
{S("console.processingItem","Processing")} {Me} /{" "}
|
|
217
|
+
{v.length} {S("console.records","records")} (
|
|
218
|
+
{Oe}%)
|
|
219
|
+
</C>
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
<T style={e.progressTrack}>
|
|
223
|
+
<L.View style={[e.progressBar,{width:N.interpolate({inputRange:[0,1],outputRange:["0%","100%"]})}]}/>
|
|
224
|
+
</T>
|
|
225
|
+
|
|
226
|
+
<C style={e.progressFootnote}>
|
|
227
|
+
Formatting .{A.toUpperCase()} payload with separators •{" "}
|
|
228
|
+
{q(le)}
|
|
229
|
+
</C>
|
|
230
|
+
</T>}
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
{O==="complete"&&<T style={e.completeContainer}>
|
|
234
|
+
<T style={e.completeSuccessBadge}>
|
|
235
|
+
<Ft size={34}color={t.emerald500}/>
|
|
236
|
+
</T>
|
|
237
|
+
|
|
238
|
+
<C style={e.completeTitle}>
|
|
239
|
+
{S("console.exportSuccessTitle","Logs Export Ready!")}
|
|
240
|
+
</C>
|
|
241
|
+
<C style={e.completeSub}>
|
|
242
|
+
{S("console.exportSuccessDesc","Generated full formatted log bundle ready to share or save.")}
|
|
243
|
+
</C>
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
<T style={e.fileDetailsCard}>
|
|
247
|
+
<T style={e.fileDetailsRow}>
|
|
248
|
+
<C style={e.fileDetailLabel}>📁 File:</C>
|
|
249
|
+
<C style={e.fileDetailValue}numberOfLines={1}>
|
|
250
|
+
{H}
|
|
251
|
+
</C>
|
|
252
|
+
</T>
|
|
253
|
+
<T style={e.fileDetailsRow}>
|
|
254
|
+
<C style={e.fileDetailLabel}>📊 Log Count:</C>
|
|
255
|
+
<C style={e.fileDetailValue}>
|
|
256
|
+
{v.length} logs
|
|
257
|
+
</C>
|
|
258
|
+
</T>
|
|
259
|
+
<T style={e.fileDetailsRow}>
|
|
260
|
+
<C style={e.fileDetailLabel}>💾 Final Size:</C>
|
|
261
|
+
<C style={[e.fileDetailValue,{color:t.emerald500,fontFamily:w.interBold}]}>
|
|
262
|
+
{q($e)}
|
|
263
|
+
</C>
|
|
264
|
+
</T>
|
|
265
|
+
<T style={e.fileDetailsRow}>
|
|
266
|
+
<C style={e.fileDetailLabel}>⚙️ Format:</C>
|
|
267
|
+
<C style={e.fileDetailValue}>
|
|
268
|
+
.{A.toUpperCase()}
|
|
269
|
+
</C>
|
|
270
|
+
</T>
|
|
271
|
+
</T>
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
<T style={e.actionButtonGroup}>
|
|
275
|
+
|
|
276
|
+
<F onPress={Ne}style={[e.primaryActionBtn,e.shareBtn]}>
|
|
277
|
+
<Ct size={15}color={t.white}/>
|
|
278
|
+
<C style={e.primaryActionBtnText}>
|
|
279
|
+
{S("console.shareReport","Share Logs")}
|
|
280
|
+
</C>
|
|
281
|
+
</F>
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
<F onPress={Ge}style={[e.primaryActionBtn,e.saveDiskBtn]}>
|
|
285
|
+
<Tt size={15}color={t.white}/>
|
|
286
|
+
<C style={e.primaryActionBtnText}>
|
|
287
|
+
{S("console.saveToDisk","Save to Disk")}
|
|
288
|
+
</C>
|
|
289
|
+
</F>
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
<F onPress={Ue}style={e.secondaryActionBtn}>
|
|
293
|
+
<St size={14}color={t.purple}/>
|
|
294
|
+
<C style={e.secondaryActionBtnText}>
|
|
295
|
+
{S("console.copyToClipboard","Copy Content")}
|
|
296
|
+
</C>
|
|
297
|
+
</F>
|
|
298
|
+
</T>
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
<T style={e.bottomFooterRow}>
|
|
302
|
+
<F onPress={()=>_("config")}style={e.textBtn}>
|
|
303
|
+
<C style={e.textBtnText}>
|
|
304
|
+
{S("console.exportAnother","\u2190 Export Another")}
|
|
305
|
+
</C>
|
|
306
|
+
</F>
|
|
307
|
+
|
|
308
|
+
<F onPress={Z}style={e.doneBtn}>
|
|
309
|
+
<C style={e.doneBtnText}>
|
|
310
|
+
{S("common.done","Done")}
|
|
311
|
+
</C>
|
|
312
|
+
</F>
|
|
313
|
+
</T>
|
|
314
|
+
</T>}
|
|
315
|
+
</T>
|
|
316
|
+
</T>
|
|
317
|
+
</Ze>};const e=Pe.create({overlay:{flex:1,backgroundColor:"rgba(0,0,0,0.55)",justifyContent:"flex-end"},backdrop:{...Pe.absoluteFillObject},bottomSheetCard:{width:"100%",maxHeight:"86%",backgroundColor:t.white,borderTopLeftRadius:24,borderTopRightRadius:24,overflow:"hidden",shadowColor:"#000",shadowOffset:{width:0,height:-6},shadowOpacity:.18,shadowRadius:16,elevation:24},sheetHandleContainer:{width:"100%",alignItems:"center",paddingTop:8,paddingBottom:4,backgroundColor:"#FAF9FE"},sheetHandle:{width:38,height:4,borderRadius:2,backgroundColor:`${t.grayTextWeak}40`},headerRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:18,paddingVertical:12,borderBottomWidth:1,borderBottomColor:t.dividerColor,backgroundColor:"#FAF9FE",shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.04,shadowRadius:4,elevation:3},headerLeft:{flexDirection:"row",alignItems:"center",gap:12,flex:1},headerTextGroup:{gap:2},iconBadge:{width:36,height:36,borderRadius:10,backgroundColor:`${t.purple}14`,borderWidth:1,borderColor:`${t.purple}28`,justifyContent:"center",alignItems:"center"},title:{fontFamily:w.interBold,fontSize:15.5,lineHeight:20,color:t.primaryBlack,letterSpacing:-.2},subtitle:{fontFamily:w.interMedium,fontSize:11.5,lineHeight:15,color:t.grayTextWeak},closeBtn:{width:28,height:28,borderRadius:14,backgroundColor:t.dividerColor,justifyContent:"center",alignItems:"center"},configContainer:{padding:16,gap:14},section:{gap:7},sectionHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},sectionLabel:{fontFamily:w.interBold,fontSize:10.5,lineHeight:14,color:t.grayTextWeak,letterSpacing:.6},levelRow:{flexDirection:"row",flexWrap:"wrap",gap:6},levelChip:{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:5.5,borderRadius:8,backgroundColor:t.grayBackground,borderWidth:1,borderColor:t.dividerColor,gap:5},levelChipText:{fontFamily:w.interMedium,fontSize:11,lineHeight:15,color:t.primaryBlack},levelCountBadge:{backgroundColor:"rgba(0,0,0,0.06)",paddingHorizontal:4.5,paddingVertical:1,borderRadius:5},levelCountText:{fontFamily:w.interBold,fontSize:9.5,color:t.grayTextStrong},countPill:{backgroundColor:`${t.purple}12`,paddingHorizontal:8,paddingVertical:2,borderRadius:6},countPillText:{fontFamily:w.interSemiBold,fontSize:10.5,color:t.purple},segmentedRow:{flexDirection:"row",gap:7},segmentBtn:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,paddingVertical:8.5,borderRadius:9,backgroundColor:t.grayBackground,borderWidth:1,borderColor:t.dividerColor},segmentBtnActive:{backgroundColor:`${t.purple}14`,borderColor:t.purple},segmentBtnText:{fontFamily:w.interMedium,fontSize:11.5,lineHeight:15,color:t.grayTextStrong},segmentBtnTextActive:{color:t.purple,fontFamily:w.interBold},customOptionsContainer:{marginTop:6,padding:11,borderRadius:10,backgroundColor:"#F8FAFC",borderWidth:1,borderColor:t.dividerColor,gap:10},customFieldRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:10},customFieldLabel:{fontFamily:w.interSemiBold,fontSize:11.5,lineHeight:15,color:t.grayTextStrong},customCountInput:{width:90,backgroundColor:t.white,borderWidth:1,borderColor:t.dividerColor,borderRadius:7,paddingHorizontal:10,paddingVertical:5.5,fontSize:12.5,fontFamily:w.interSemiBold,color:t.primaryBlack,textAlign:"center"},regexFieldBlock:{gap:5,paddingTop:4,borderTopWidth:1,borderTopColor:t.dividerColor},regexLabelRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},regexExclusionBadge:{backgroundColor:`${t.purple}14`,paddingHorizontal:7,paddingVertical:2,borderRadius:5},regexExclusionBadgeText:{fontFamily:w.interBold,fontSize:10,color:t.purple},regexInput:{backgroundColor:t.white,borderWidth:1,borderColor:t.dividerColor,borderRadius:7,paddingHorizontal:10,paddingVertical:6,fontSize:12,fontFamily:w.interRegular,color:t.primaryBlack},regexInputError:{borderColor:t.errorColor,backgroundColor:`${t.errorColor}08`},regexErrorText:{fontFamily:w.interMedium,fontSize:10.5,lineHeight:14,color:t.errorColor},regexHelpText:{fontFamily:w.interRegular,fontSize:10.5,lineHeight:14,color:t.grayTextWeak},formatRowInline:{flexDirection:"row",gap:8},formatCardInline:{flex:1,padding:10,borderRadius:10,backgroundColor:t.grayBackground,borderWidth:1,borderColor:t.dividerColor,gap:4},formatCardInlineActive:{backgroundColor:`${t.purple}0C`,borderColor:t.purple},formatCardInlineHeader:{flexDirection:"row",alignItems:"center",gap:6},radioCircle:{width:14,height:14,borderRadius:7,borderWidth:1.5,borderColor:t.grayTextWeak,justifyContent:"center",alignItems:"center"},radioCircleActive:{borderColor:t.purple},radioDot:{width:7,height:7,borderRadius:3.5,backgroundColor:t.purple},formatCardTitle:{fontFamily:w.interSemiBold,fontSize:11.5,lineHeight:15,color:t.grayTextStrong},formatCardTitleActive:{fontFamily:w.interBold,color:t.purple},formatCardDesc:{fontFamily:w.interRegular,fontSize:10,lineHeight:13,color:t.grayTextWeak,paddingLeft:20},optionsGrid:{flexDirection:"column",gap:5},optionRow:{flexDirection:"row",alignItems:"center",paddingHorizontal:10,paddingVertical:7,borderRadius:8,backgroundColor:t.grayBackground,borderWidth:1,borderColor:t.dividerColor,gap:8},optionRowActive:{backgroundColor:`${t.purple}0A`,borderColor:`${t.purple}30`},checkbox:{width:15,height:15,borderRadius:3.5,borderWidth:1.5,borderColor:t.grayTextWeak,justifyContent:"center",alignItems:"center"},checkboxActive:{backgroundColor:t.purple,borderColor:t.purple},optionLabel:{fontFamily:w.interMedium,fontSize:11.5,lineHeight:15,color:t.grayTextStrong},optionLabelActive:{fontFamily:w.interSemiBold,color:t.primaryBlack},staticFooter:{paddingHorizontal:16,paddingTop:10,paddingBottom:_e.OS==="ios"?26:14,backgroundColor:t.white,borderTopWidth:1,borderTopColor:t.dividerColor,shadowColor:t.purple,shadowOffset:{width:0,height:-4},shadowOpacity:.12,shadowRadius:8,elevation:8,gap:8},footerMinimalSummary:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:2},footerSummaryLeft:{flexDirection:"row",alignItems:"center",gap:6},footerSummaryDot:{width:6,height:6,borderRadius:3,backgroundColor:t.emerald500||"#10B981"},footerSummaryCountText:{fontFamily:w.interSemiBold,fontSize:11.5,lineHeight:15,color:t.grayTextStrong},footerSummaryDivider:{fontSize:10,color:t.grayTextWeak},footerSummarySizeText:{fontFamily:w.interBold,fontSize:11.5,lineHeight:15,color:t.purple},footerSummaryFormatText:{fontFamily:w.interMedium,fontSize:11,lineHeight:14,color:t.grayTextWeak},footerIgnoredPill:{backgroundColor:`${t.errorColor}12`,paddingHorizontal:7,paddingVertical:1.5,borderRadius:5},footerIgnoredPillText:{fontFamily:w.interSemiBold,fontSize:10,color:t.errorColor},exportActionBtn:{flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:t.purple,paddingVertical:12,borderRadius:12,gap:7,shadowColor:t.purple,shadowOffset:{width:0,height:4},shadowOpacity:.25,shadowRadius:8,elevation:4},exportActionBtnDisabled:{opacity:.5},exportActionBtnText:{fontFamily:w.interBold,fontSize:13.5,lineHeight:17,color:t.white,letterSpacing:.1},progressContainer:{padding:28,alignItems:"center",justifyContent:"center"},progressIconBadge:{width:60,height:60,borderRadius:30,backgroundColor:`${t.purple}18`,justifyContent:"center",alignItems:"center",marginBottom:14},progressHeading:{fontFamily:w.interBold,fontSize:15.5,lineHeight:21,color:t.primaryBlack,marginBottom:3},progressSub:{fontFamily:w.interMedium,fontSize:12,lineHeight:16,color:t.grayTextWeak,marginBottom:18},progressTrack:{width:"100%",height:9,backgroundColor:t.grayBackground,borderRadius:4.5,overflow:"hidden",borderWidth:1,borderColor:t.dividerColor,marginBottom:10},progressBar:{height:"100%",backgroundColor:t.purple,borderRadius:4.5},progressFootnote:{fontFamily:w.interMedium,fontSize:11,lineHeight:14,color:t.grayTextWeak},completeContainer:{padding:20,alignItems:"center"},completeSuccessBadge:{width:58,height:58,borderRadius:29,backgroundColor:`${t.emerald500}18`,justifyContent:"center",alignItems:"center",marginBottom:12},completeTitle:{fontFamily:w.interBold,fontSize:16.5,lineHeight:22,color:t.primaryBlack},completeSub:{fontFamily:w.interMedium,fontSize:12,lineHeight:16,color:t.grayTextWeak,textAlign:"center",marginTop:3,marginBottom:16},fileDetailsCard:{width:"100%",backgroundColor:"#F8FAFC",borderRadius:12,padding:12,borderWidth:1,borderColor:t.dividerColor,gap:7,marginBottom:16},fileDetailsRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},fileDetailLabel:{fontFamily:w.interMedium,fontSize:11.5,lineHeight:15,color:t.grayTextStrong},fileDetailValue:{fontFamily:w.interSemiBold,fontSize:11.5,lineHeight:15,color:t.primaryBlack},actionButtonGroup:{width:"100%",gap:8,marginBottom:14},primaryActionBtn:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:12,borderRadius:10,gap:7},shareBtn:{backgroundColor:t.purple,shadowColor:t.purple,shadowOffset:{width:0,height:3},shadowOpacity:.2,shadowRadius:6,elevation:3},saveDiskBtn:{backgroundColor:t.teal600,shadowColor:t.teal600,shadowOffset:{width:0,height:3},shadowOpacity:.2,shadowRadius:6,elevation:3},primaryActionBtnText:{fontFamily:w.interBold,fontSize:13,lineHeight:17,color:t.white},secondaryActionBtn:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:10,borderRadius:10,borderWidth:1,borderColor:`${t.purple}40`,backgroundColor:`${t.purple}0C`,gap:6},secondaryActionBtnText:{fontFamily:w.interSemiBold,fontSize:12,lineHeight:15,color:t.purple},bottomFooterRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",paddingTop:8,borderTopWidth:1,borderTopColor:t.dividerColor},textBtn:{paddingVertical:5,paddingHorizontal:8},textBtnText:{fontFamily:w.interMedium,fontSize:11.5,lineHeight:15,color:t.grayTextStrong},doneBtn:{paddingVertical:5,paddingHorizontal:14,borderRadius:6,backgroundColor:t.dividerColor},doneBtnText:{fontFamily:w.interBold,fontSize:11.5,lineHeight:15,color:t.primaryBlack}});export default ConsoleExportModal;
|
|
@@ -1,71 +1,76 @@
|
|
|
1
|
-
import F,{useCallback as
|
|
2
|
-
<Ae testID={`inspector.console.item.${t}`}item={e}searchStr={y}onPress={
|
|
3
|
-
</Le>,[y,
|
|
1
|
+
import F,{useCallback as H,useMemo as R,useRef as se}from"react";import{FlatList as Se,Pressable as Ce,ScrollView as K,Text as A,TextInput as Ie,View as S}from"react-native";import{useInspector as we}from"./InspectorContext";import{useTranslation as Te}from"../../i18n";import P from"../TouchableScale";import Le from"../AnimatedEntrance";import{ConsoleLogCard as Ae}from"../ConsoleLogCard";import Ee from"../EmptyState";import Ve from"../EndOfListFooter";import Be from"./ConsoleExportModal";import b from"../../styles";import{AppColors as o}from"../../styles/AppColors";import{AppFonts as z}from"../../styles/AppFonts";import{LogFilter as E}from"../../types";import{SearchIcon as Fe,ClearIcon as Pe,SortArrowIcon as He,TrashIcon as Re,LayersIcon as $e,UserIcon as De,InfoCircleIcon as We,WarningTriangleIcon as Oe,ErrorCircleIcon as Me,AnalyticsIcon as Ne,ExportIcon as Ue}from"../NetworkIcons";const X=10,ve=F.memo(()=>{const{t:I}=Te(),{logSearch:y,setLogSearch:V,logSortOrder:j,setLogSortOrder:q,handleDelete:J,logFilters:h,setLogFilters:$,logCounts:x,filteredConsoleLogs:C,visibleConsoleLogs:D,maxConsoleLogs:W,setSelectedLog:N}=we(),Z=W||100,U=se(null),[v,G]=F.useState(Z),[ee,_]=F.useState(!1);F.useEffect(()=>{G(W||100),U.current?.scrollToOffset({offset:0,animated:!1})},[y,h,W]);const O=R(()=>C.slice(0,v),[C,v]),Q=H(e=>{N(e)},[N]),oe=H(({item:e,index:t})=><Le index={t}distance={8}>
|
|
2
|
+
<Ae testID={`inspector.console.item.${t}`}item={e}searchStr={y}onPress={Q}/>
|
|
3
|
+
</Le>,[y,Q]),te=H((e,t)=>({length:148,offset:148*t,index:t}),[]),le=H((e,t)=>e?.id?.toString()??t.toString(),[]),re=R(()=>{const e=D.length,t=C.length;if(h.has("all")||!Array.from(h).some(B=>B!=="all"))return<S style={{paddingHorizontal:8,paddingTop:8,paddingBottom:3}}>
|
|
4
4
|
<A style={{fontFamily:z.interMedium,fontSize:11,color:o.grayTextWeak,letterSpacing:.2}}>
|
|
5
5
|
{t===e?`Showing ${e} logs`:`Showing ${t} of ${e} logs`}
|
|
6
6
|
</A>
|
|
7
|
-
</S>;{const B=Array.from(h).filter(
|
|
7
|
+
</S>;{const B=Array.from(h).filter(T=>T!=="all").map(T=>T==="user-log"?"Log":T==="analytics"?"Analytics":T.charAt(0).toUpperCase()+T.slice(1));return<S style={{paddingHorizontal:12,paddingTop:8,paddingBottom:3}}>
|
|
8
8
|
<A style={{fontFamily:z.interMedium,fontSize:11,color:o.grayTextWeak,letterSpacing:.2}}>
|
|
9
9
|
Filtered by {B.join(", ")} ({t} of {e} logs)
|
|
10
10
|
</A>
|
|
11
|
-
</S>}},[
|
|
11
|
+
</S>}},[D.length,C.length,h]),[M,Y]=F.useState(!1),ne=R(()=>["[AXIOS]","[API]","[GRAPHQL]","[REDUX]","[ANALYTICS]","[AUTH]","[NAV]","[STORAGE]","[PERF]","[WS]","[PUSH]","[PAYMENT]","[SYNC]","[BLE]","[LOCATION]","[TEST]","[DEBUG]"],[]),ie=R(()=>[{id:E.All,label:I("common.all","All"),count:x.all?.split("/")?.[0]??"0",color:o.purple,Icon:$e},{id:E.UserLog,label:I("console.log","Log"),count:x["user-log"]?.split("/")?.[0]??"0",color:o.teal600,Icon:De},{id:E.Info,label:I("console.info","Info"),count:x.info?.split("/")?.[0]??"0",color:o.sky600,Icon:We},{id:E.Warn,label:I("console.warning","Warn"),count:x.warn?.split("/")?.[0]??"0",color:o.amber600,Icon:Oe},{id:E.Error,label:I("console.error","Error"),count:x.error?.split("/")?.[0]??"0",color:o.errorColor,Icon:Me},{id:E.Analytics,label:I("console.analytics","Analytics"),count:x.analytics?.split("/")?.[0]??"0",color:o.violet600,Icon:Ne}],[x,I]);return<S style={{flex:1}}>
|
|
12
12
|
<S style={{backgroundColor:o.white,borderBottomWidth:1,borderBottomColor:o.dividerColor,paddingBottom:6}}>
|
|
13
|
-
<S style={[
|
|
14
|
-
<S style={[
|
|
15
|
-
<
|
|
16
|
-
<Ie placeholder={
|
|
13
|
+
<S style={[b.toolbarRow,{marginTop:12,marginBottom:8}]}>
|
|
14
|
+
<S style={[b.searchContainer,M&&{borderColor:o.purple,borderWidth:1.5}]}>
|
|
15
|
+
<Fe color={M?o.purple:o.grayTextWeak}size={16}/>
|
|
16
|
+
<Ie placeholder={I("console.searchPlaceholder")}placeholderTextColor={o.grayTextWeak}value={y}onChangeText={V}onFocus={()=>Y(!0)}onBlur={()=>Y(!1)}style={b.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
17
17
|
{y.length>0&&<S style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
18
18
|
<S style={{backgroundColor:`${o.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:2}}>
|
|
19
19
|
<A style={{color:o.purple,fontSize:10,fontFamily:z.interBold}}>
|
|
20
|
-
{
|
|
20
|
+
{C.length}
|
|
21
21
|
</A>
|
|
22
22
|
</S>
|
|
23
|
-
<Ce onPress={()=>
|
|
24
|
-
<
|
|
23
|
+
<Ce onPress={()=>V("")}hitSlop={10}style={b.clearBtn}>
|
|
24
|
+
<Pe color={o.grayTextWeak}size={14}/>
|
|
25
25
|
</Ce>
|
|
26
26
|
</S>}
|
|
27
27
|
</S>
|
|
28
28
|
|
|
29
|
-
<S style={
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
</
|
|
33
|
-
<
|
|
34
|
-
<He color={o.
|
|
35
|
-
</
|
|
29
|
+
<S style={b.toolbarRight}>
|
|
30
|
+
<P style={[b.toolbarBtn,{borderColor:`${o.purple}38`,backgroundColor:`${o.purple}0F`}]}onPress={()=>_(!0)}hitSlop={6}testID="inspector.console.exportBtn">
|
|
31
|
+
<Ue color={o.purple}size={15}/>
|
|
32
|
+
</P>
|
|
33
|
+
<P style={b.toolbarBtn}onPress={()=>q(e=>e==="newest"?"oldest":"newest")}hitSlop={10}>
|
|
34
|
+
<He color={o.grayTextStrong}size={18}direction={j==="newest"?"down":"up"}/>
|
|
35
|
+
</P>
|
|
36
|
+
<P style={[b.toolbarBtn,{borderColor:`${o.errorColor}38`,backgroundColor:`${o.errorColor}0F`}]}onPress={J}hitSlop={6}>
|
|
37
|
+
<Re color={o.errorColor}size={15}/>
|
|
38
|
+
</P>
|
|
36
39
|
</S>
|
|
37
40
|
</S>
|
|
38
41
|
|
|
39
42
|
|
|
40
|
-
{(
|
|
41
|
-
{
|
|
43
|
+
{(M||y.length>0)&&<K horizontal showsHorizontalScrollIndicator={!1}style={{marginBottom:6,maxHeight:30}}contentContainerStyle={{paddingHorizontal:8,flexDirection:"row",alignItems:"center",gap:6}}>
|
|
44
|
+
{ne.map(e=>{const t=y.includes(e);return<P key={e}onPress={()=>{V(t?l=>l.replace(e,"").trim():l=>l?`${l} ${e}`.trim():e)}}>
|
|
42
45
|
<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
46
|
<A style={{fontFamily:z.interBold,fontSize:10,color:t?o.white:o.purple}}>
|
|
44
47
|
{e}
|
|
45
48
|
</A>
|
|
46
49
|
</S>
|
|
47
|
-
</
|
|
48
|
-
</
|
|
50
|
+
</P>})}
|
|
51
|
+
</K>}
|
|
49
52
|
|
|
50
53
|
|
|
51
54
|
<S style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:8,gap:6}}>
|
|
52
|
-
<
|
|
53
|
-
{
|
|
54
|
-
<S style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:t?
|
|
55
|
-
<
|
|
55
|
+
<K horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
56
|
+
{ie.map(e=>{const t=e.id==="all"?h.has("all"):h.has(e.id)&&!h.has("all"),l=e.color||o.purple,B=t?o.white:l,T=e.Icon;return<P testID={`inspector.console.filter.${e.id}`}key={e.id}onPress={()=>{e.id==="all"?$(new Set(["all"])):$(ae=>{const L=new Set(ae);return L.delete("all"),L.has(e.id)?L.delete(e.id):L.add(e.id),L.size===0&&L.add("all"),L})}}>
|
|
57
|
+
<S style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:t?l:`${l}12`,borderWidth:1,borderColor:t?l:`${l}30`,gap:5}}>
|
|
58
|
+
<T size={11}color={B}/>
|
|
56
59
|
<A style={{fontFamily:z.interBold,fontSize:10.5,color:t?o.white:o.primaryBlack}}>
|
|
57
60
|
{e.label}
|
|
58
61
|
</A>
|
|
59
|
-
<S style={{backgroundColor:t?"rgba(255,255,255,0.25)":`${
|
|
60
|
-
<A style={{fontFamily:z.interBold,fontSize:9,color:t?o.white:
|
|
62
|
+
<S style={{backgroundColor:t?"rgba(255,255,255,0.25)":`${l}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8}}>
|
|
63
|
+
<A style={{fontFamily:z.interBold,fontSize:9,color:t?o.white:l}}>
|
|
61
64
|
{e.count}
|
|
62
65
|
</A>
|
|
63
66
|
</S>
|
|
64
67
|
</S>
|
|
65
|
-
</
|
|
66
|
-
</
|
|
68
|
+
</P>})}
|
|
69
|
+
</K>
|
|
67
70
|
</S>
|
|
68
71
|
</S>
|
|
69
72
|
|
|
70
|
-
<Se ref={U}data={
|
|
71
|
-
|
|
73
|
+
<Se ref={U}data={O}keyExtractor={le}ListHeaderComponent={re}renderItem={oe}getItemLayout={te}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}showsVerticalScrollIndicator={!1}nestedScrollEnabled={!0}ListEmptyComponent={<Ee isSearch={y.length>0||!h.has("all")}searchQuery={y}customTitle={y.length>0?"No matching console logs":"No console logs"}onClearSearch={()=>{V(""),$(new Set(["all"]))}}/>}ListFooterComponent={C.length>0?<Ve count={O.length}totalCount={C.length}label="logs"loadMoreStep={X}hasMore={O.length<C.length}onLoadMore={()=>G(e=>e+X)}/>:null}style={{flex:1}}contentContainerStyle={[b.listContent,{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
74
|
+
|
|
75
|
+
<Be visible={ee}onClose={()=>_(!1)}filteredLogs={C}allLogs={D}/>
|
|
76
|
+
</S>});export default ve;
|