react-native-inapp-inspector 2.3.23 → 2.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/components/AnalyticsDetail.js +8 -8
- package/dist/commonjs/components/AnalyticsEventCard.js +11 -8
- package/dist/commonjs/components/AppHeaderLogo.js +1 -1
- package/dist/commonjs/components/BrandSquareIcon.js +12 -12
- package/dist/commonjs/components/ConsoleLogCard.d.ts +1 -0
- package/dist/commonjs/components/ConsoleLogCard.js +92 -80
- package/dist/commonjs/components/EndOfListFooter.d.ts +5 -1
- package/dist/commonjs/components/EndOfListFooter.js +27 -5
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +30 -298
- package/dist/commonjs/components/Inspector/ConsoleTab.js +38 -93
- package/dist/commonjs/components/Inspector/CrashDetail.js +12 -12
- package/dist/commonjs/components/Inspector/CrashTab.js +43 -33
- package/dist/commonjs/components/Inspector/DebuggingTab.js +9 -9
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +54 -52
- package/dist/commonjs/components/Inspector/InspectorHeader.js +1 -1
- package/dist/commonjs/components/Inspector/LogDetail.js +6 -6
- package/dist/commonjs/components/Inspector/MainScreen.js +23 -25
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +1 -1
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +3 -3
- package/dist/commonjs/components/Inspector/NetworkTab.js +31 -31
- package/dist/commonjs/components/Inspector/NpmStarPrompt.js +3 -3
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +21 -22
- package/dist/commonjs/components/Inspector/ReduxDetail.js +1 -1
- package/dist/commonjs/components/Inspector/ReduxTab.js +110 -97
- package/dist/commonjs/components/Inspector/SettingsPanel.js +48 -100
- package/dist/commonjs/components/Inspector/StorageTab.js +56 -52
- package/dist/commonjs/components/Inspector/TabBar.js +29 -26
- package/dist/commonjs/components/JsonViewer.js +169 -164
- package/dist/commonjs/components/LogCard.js +34 -38
- package/dist/commonjs/components/LogSyntaxHighlighter.js +3 -3
- package/dist/commonjs/components/SegmentedTabs.d.ts +4 -1
- package/dist/commonjs/components/SegmentedTabs.js +8 -8
- package/dist/commonjs/constants/index.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/networkLogger.js +1 -2
- package/dist/commonjs/helpers/index.d.ts +6 -0
- package/dist/commonjs/helpers/index.js +4 -4
- package/dist/commonjs/helpers/memoryManager.d.ts +0 -1
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/remoteConfig.js +1 -1
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/i18n/index.d.ts +35 -0
- package/dist/commonjs/i18n/index.js +1 -1
- package/dist/commonjs/i18n/locales/ar.json +1 -0
- package/dist/commonjs/i18n/locales/de.json +1 -0
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -0
- package/dist/commonjs/i18n/locales/fr.json +1 -0
- package/dist/commonjs/i18n/locales/hi.json +1 -0
- package/dist/commonjs/i18n/locales/ja.json +1 -0
- package/dist/commonjs/i18n/locales/ko.json +1 -0
- package/dist/commonjs/i18n/locales/pt.json +1 -0
- package/dist/commonjs/i18n/locales/ru.json +1 -0
- package/dist/commonjs/i18n/locales/zh.json +1 -0
- package/dist/commonjs/index.d.ts +2 -4
- package/dist/commonjs/index.js +2 -2
- package/dist/commonjs/styles/AppColors.d.ts +40 -0
- package/dist/commonjs/styles/AppColors.js +1 -1
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/enums.d.ts +0 -20
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/esm/components/AnalyticsDetail.js +75 -75
- package/dist/esm/components/AnalyticsEventCard.js +20 -17
- package/dist/esm/components/AppHeaderLogo.js +5 -5
- package/dist/esm/components/BrandSquareIcon.js +39 -39
- package/dist/esm/components/ConsoleLogCard.d.ts +1 -0
- package/dist/esm/components/ConsoleLogCard.js +98 -86
- package/dist/esm/components/EndOfListFooter.d.ts +5 -1
- package/dist/esm/components/EndOfListFooter.js +36 -14
- package/dist/esm/components/Inspector/AnalyticsTab.js +47 -315
- package/dist/esm/components/Inspector/ConsoleTab.js +61 -116
- package/dist/esm/components/Inspector/CrashDetail.js +49 -49
- package/dist/esm/components/Inspector/CrashTab.js +75 -65
- package/dist/esm/components/Inspector/DebuggingTab.js +31 -31
- package/dist/esm/components/Inspector/DeviceInfoTab.js +146 -144
- package/dist/esm/components/Inspector/InspectorHeader.js +5 -5
- package/dist/esm/components/Inspector/LogDetail.js +1 -1
- package/dist/esm/components/Inspector/MainScreen.js +51 -53
- package/dist/esm/components/Inspector/MediaGalleryTab.js +1 -1
- package/dist/esm/components/Inspector/MediaPreviewModal.js +31 -31
- package/dist/esm/components/Inspector/NetworkTab.js +63 -63
- package/dist/esm/components/Inspector/NpmStarPrompt.js +42 -42
- package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -46
- package/dist/esm/components/Inspector/ReduxDetail.js +1 -1
- package/dist/esm/components/Inspector/ReduxTab.js +163 -150
- package/dist/esm/components/Inspector/SettingsPanel.js +136 -188
- package/dist/esm/components/Inspector/StorageTab.js +88 -84
- package/dist/esm/components/Inspector/TabBar.js +37 -34
- package/dist/esm/components/JsonViewer.js +173 -168
- package/dist/esm/components/LogCard.js +38 -42
- package/dist/esm/components/LogSyntaxHighlighter.js +1 -1
- package/dist/esm/components/SegmentedTabs.d.ts +4 -1
- package/dist/esm/components/SegmentedTabs.js +8 -8
- package/dist/esm/constants/index.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/networkLogger.js +1 -2
- package/dist/esm/helpers/index.d.ts +6 -0
- package/dist/esm/helpers/index.js +4 -4
- package/dist/esm/helpers/memoryManager.d.ts +0 -1
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/remoteConfig.js +1 -1
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/i18n/index.d.ts +35 -0
- package/dist/esm/i18n/index.js +1 -1
- package/dist/esm/i18n/locales/ar.json +1 -0
- package/dist/esm/i18n/locales/de.json +1 -0
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -0
- package/dist/esm/i18n/locales/fr.json +1 -0
- package/dist/esm/i18n/locales/hi.json +1 -0
- package/dist/esm/i18n/locales/ja.json +1 -0
- package/dist/esm/i18n/locales/ko.json +1 -0
- package/dist/esm/i18n/locales/pt.json +1 -0
- package/dist/esm/i18n/locales/ru.json +1 -0
- package/dist/esm/i18n/locales/zh.json +1 -0
- package/dist/esm/index.d.ts +2 -4
- package/dist/esm/index.js +5 -5
- package/dist/esm/styles/AppColors.d.ts +40 -0
- package/dist/esm/styles/AppColors.js +1 -1
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/enums.d.ts +0 -20
- package/dist/esm/types/enums.js +1 -1
- package/package.json +1 -15
- package/dist/commonjs/bundle.d.ts +0 -2
- package/dist/commonjs/bundle.js +0 -1
- package/dist/commonjs/components/Inspector/BundleTab.d.ts +0 -48
- package/dist/commonjs/components/Inspector/BundleTab.js +0 -1297
- package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +0 -27
- package/dist/commonjs/components/Inspector/PerformanceTab.js +0 -454
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +0 -115
- package/dist/commonjs/customHooks/bundleAnalyzer.js +0 -1
- package/dist/commonjs/customHooks/performanceTracker.d.ts +0 -144
- package/dist/commonjs/customHooks/performanceTracker.js +0 -63
- package/dist/commonjs/performance.d.ts +0 -2
- package/dist/commonjs/performance.js +0 -1
- package/dist/esm/bundle.d.ts +0 -2
- package/dist/esm/bundle.js +0 -1
- package/dist/esm/components/Inspector/BundleTab.d.ts +0 -48
- package/dist/esm/components/Inspector/BundleTab.js +0 -1297
- package/dist/esm/components/Inspector/PerformanceTab.d.ts +0 -27
- package/dist/esm/components/Inspector/PerformanceTab.js +0 -454
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +0 -115
- package/dist/esm/customHooks/bundleAnalyzer.js +0 -1
- package/dist/esm/customHooks/performanceTracker.d.ts +0 -144
- package/dist/esm/customHooks/performanceTracker.js +0 -63
- package/dist/esm/performance.d.ts +0 -2
- package/dist/esm/performance.js +0 -1
|
@@ -1,99 +1,111 @@
|
|
|
1
|
-
import z
|
|
2
|
-
<T style={{flexDirection:"row",
|
|
3
|
-
{
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
{
|
|
7
|
-
</
|
|
1
|
+
import z from"react";import{useTranslation as G}from"../i18n";import{Pressable as K,StyleSheet as Y,Text as E,View as T}from"react-native";import{AppColors as r}from"../styles/AppColors";import{AppFonts as B}from"../styles/AppFonts";import{formatTime as X,getJsonContent as J,getJsonPreviewText as Q,parseStackLine as Z,openInVSCode as q,getSize as _,getCleanCallerDisplay as ee}from"../helpers";import Te from"./TouchableScale";import N from"./LogSyntaxHighlighter";import{ForwardChevronIcon as Ce,ExternalLinkIcon as Ie,FlaskIcon as he,ZapIcon as V,GlobeIcon as xe,DiceIcon as ye,AtomIcon as M,BarChartIcon as Se,KeyIcon as me,SmartphoneIcon as Ee,AlertTriangleIcon as Be,BugIcon as Re,TagIcon as Ae,MapPinIcon as $,StorageIcon as Oe,SignalIcon as Pe,FlameIcon as we,MoneyIcon as ke,CircleCheckIcon as U,CircleAlertIcon as Ne,CircleXIcon as Le,RefreshCcwIcon as He,PerformanceIcon as Ve,ChipIcon as Fe,SettingsIcon as De,TerminalIcon as ze,InfoCircleIcon as W,ShieldAlertIcon as Me,LayoutIcon as $e,ClockIcon as Ue,SizeIcon as We}from"./NetworkIcons";import{useInspector as Ge}from"./Inspector/InspectorContext";const ve=(w,C,O,F,L)=>{if(!w)return null;const x=/^((?:\[[^\]]+\]\s*)+)/,k=w.match(x);if(k){const I=k[1],D=w.substring(I.length),h=I.match(/\[[^\]]+\]/g)||[],H=P=>{const e=P.replace(/[\[\]]/g,"").trim().toUpperCase();return e==="AXIOS"?{color:r.emerald600,Icon:V,label:"AXIOS"}:e==="API"||e==="FETCH"||e==="HTTP"||e==="REST"||e==="NETWORK"?{color:r.sky600,Icon:xe,label:e}:e==="GRAPHQL"||e==="GQL"||e==="APOLLO"||e==="MUTATION"||e==="QUERY"?{color:r.pink500,Icon:M,label:e}:e==="WS"||e==="WEBSOCKET"||e==="SOCKET"||e==="SOCKET.IO"||e==="REALTIME"?{color:r.cyan600,Icon:Pe,label:e}:e==="REDUX"||e==="STORE"||e==="STATE"||e==="ZUSTAND"||e==="MOBX"||e==="RECOIL"||e==="ACTION"||e==="DISPATCH"?{color:r.violet600,Icon:M,label:e}:e==="ANALYTICS"||e==="FIREBASE"||e==="GA4"||e==="GA"||e==="SEGMENT"||e==="MIXPANEL"||e==="POSTHOG"||e==="TRACK"||e==="EVENT"?{color:r.teal600,Icon:Se,label:e}:e==="AUTH"||e==="TOKEN"||e==="SESSION"||e==="JWT"||e==="LOGIN"||e==="LOGOUT"||e==="USER"?{color:r.amber600,Icon:me,label:e}:e==="SECURITY"||e==="SHIELD"||e==="PERMISSION"||e==="PERMISSIONS"?{color:r.indigo600Alt,Icon:Me,label:e}:e==="NAV"||e==="NAVIGATION"||e==="ROUTE"||e==="SCREEN"||e==="ROUTER"||e==="DEEPLINK"?{color:r.indigo600Alt,Icon:$,label:e}:e==="STORAGE"||e==="ASYNCSTORAGE"||e==="MMKV"||e==="SQLITE"||e==="DB"||e==="DATABASE"||e==="REALM"||e==="CACHE"?{color:r.purple500,Icon:Oe,label:e}:e==="PERF"||e==="RENDER"||e==="PERFORMANCE"||e==="FPS"||e==="MEMORY"?{color:r.violet500,Icon:Ve,label:e}:e==="INIT"||e==="BOOT"||e==="STARTUP"||e==="LIFECYCLE"||e==="MOUNT"||e==="UNMOUNT"?{color:r.blue600,Icon:V,label:e}:e==="SYNC"||e==="REFRESH"||e==="BACKGROUND"||e==="JOB"||e==="WORKER"?{color:r.sky600,Icon:He,label:e}:e==="PUSH"||e==="NOTIF"||e==="NOTIFICATION"||e==="FCM"||e==="APNS"?{color:r.darkOrange,Icon:we,label:e}:e==="PAY"||e==="PAYMENT"||e==="STRIPE"||e==="IAP"||e==="BILLING"||e==="CHECKOUT"||e==="CART"?{color:r.emerald600,Icon:ke,label:e}:e==="DEVICE"||e==="HARDWARE"||e==="BLE"||e==="BLUETOOTH"||e==="NFC"||e==="SENSOR"?{color:r.slate600,Icon:Fe,label:e}:e==="LOCATION"||e==="GPS"||e==="GEO"?{color:r.emerald600,Icon:$,label:e}:e==="APP"?{color:r.indigo600Alt,Icon:Ee,label:"APP"}:e==="UI"||e==="VIEW"||e==="THEME"||e==="STYLE"||e==="LAYOUT"?{color:r.pink600,Icon:$e,label:e}:e==="TEST"||e==="MOCK"||e==="SPEC"?{color:r.emerald500,Icon:he,label:"TEST"}:e==="SAMPLE"||e==="BATCH"?{color:r.indigo600Alt,Icon:ye,label:e}:e==="CONFIG"||e==="ENV"||e==="SETTINGS"?{color:r.slate700,Icon:De,label:e}:e==="DEBUG"||e==="TRACE"?{color:r.purpleText,Icon:ze,label:e}:e==="INFO"?{color:r.sky600,Icon:W,label:"INFO"}:e==="SUCCESS"||e==="OK"||e==="DONE"||e==="PASSED"?{color:r.green600,Icon:U,label:e}:e==="WARN"||e==="WARNING"?{color:r.amber600,Icon:Be,label:"WARN"}:e==="ERROR"||e==="CRASH"||e==="BUG"||e==="FATAL"||e==="EXCEPTION"||e==="FAIL"?{color:r.red600,Icon:Re,label:e==="CRASH"||e==="BUG"||e==="FATAL"||e==="EXCEPTION"||e==="FAIL"?e:"ERROR"}:{color:r.slate600,Icon:Ae,label:e}};return<T style={{flexDirection:"column",gap:2}}>
|
|
2
|
+
<T style={{flexDirection:"row",gap:4,overflow:"hidden"}}>
|
|
3
|
+
{h.slice(0,2).map((P,e)=>{const R=H(P),S=R.Icon;return<T key={e}style={[o.prefixTag,{backgroundColor:`${R.color}12`,borderColor:`${R.color}30`}]}>
|
|
4
|
+
<S color={R.color}size={8.5}/>
|
|
5
|
+
<E style={[o.prefixTagText,{color:R.color}]}>
|
|
6
|
+
{R.label}
|
|
7
|
+
</E>
|
|
8
8
|
</T>})}
|
|
9
9
|
</T>
|
|
10
|
-
<
|
|
11
|
-
</T>}return<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<T style={
|
|
16
|
-
<T style={
|
|
17
|
-
<
|
|
18
|
-
#{
|
|
19
|
-
</
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<T style={[
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
<N text={D}search={C}style={O}numberOfLines={1}detectLinks={!1}/>
|
|
11
|
+
</T>}return<N text={w}search={C}style={O}numberOfLines={L||2}detectLinks={!1}/>};export const ConsoleLogCard=z.memo(function({item:C,searchStr:O=""}){const{setSelectedLog:F}=Ge(),{t:L}=G(),x=J(C.message),k=C.message.toLowerCase().includes("[analytics error]"),I=z.useMemo(()=>{const S=ee(C.caller);if(!S)return null;const A=Z(C.caller,!0);return{...A,display:S.display,fileName:S.fileName,lineNumber:S.lineNumber||A.lineNumber}},[C.caller]),h=(()=>{const S=(C.type||"log").toLowerCase(),A=(C.sourceMethod||S).toLowerCase();return k||S==="error"||A==="error"?{badgeColor:r.errorColor,border:r.errorColor,badgeBg:`${r.errorColor}18`,badgeText:r.errorColor,label:"ERROR",cardBg:r.errorCardBg,statusPillBg:`${r.errorColor}14`,statusPillBorder:`${r.errorColor}33`,statusPillText:r.errorColor,StatusIcon:Le}:S==="warn"||A==="warn"?{badgeColor:r.darkOrange,border:r.darkOrange,badgeBg:`${r.darkOrange}18`,badgeText:r.darkOrange,label:"WARN",cardBg:r.warnCardBg,statusPillBg:`${r.darkOrange}14`,statusPillBorder:`${r.darkOrange}33`,statusPillText:r.darkOrange,StatusIcon:Ne}:S==="debug"||A==="debug"?{badgeColor:r.purple,border:r.purple,badgeBg:`${r.purple}18`,badgeText:r.purple,label:"DEBUG",cardBg:r.purpleTintBg,statusPillBg:`${r.purple}14`,statusPillBorder:`${r.purple}33`,statusPillText:r.purple,StatusIcon:V}:A==="info"||S==="info"&&A!=="log"?{badgeColor:r.sky600,border:r.sky600,badgeBg:`${r.sky600}18`,badgeText:r.sky600,label:"INFO",cardBg:r.blueTintBg,statusPillBg:`${r.sky600}14`,statusPillBorder:`${r.sky600}33`,statusPillText:r.sky600,StatusIcon:W}:{badgeColor:r.brandPurple,border:r.brandPurple,badgeBg:`${r.brandPurple}15`,badgeText:r.brandPurple,label:"LOG",cardBg:r.white,statusPillBg:`${r.brandPurple}12`,statusPillBorder:`${r.brandPurple}2E`,statusPillText:r.brandPurple,StatusIcon:U}})(),H=h.StatusIcon,P=x?Q(x.data):null,e=()=>{F(C)},R=("sourceMethod"in C?C.sourceMethod:void 0)||C.type||"log";return<T style={o.container}>
|
|
12
|
+
<Te onPress={e}style={[o.card,{borderLeftWidth:3.5,borderLeftColor:h.border,backgroundColor:h.cardBg}]}>
|
|
13
|
+
<T style={o.cardBody}>
|
|
14
|
+
|
|
15
|
+
<T style={o.cardHeaderRow}>
|
|
16
|
+
<T style={o.cardHeaderLeft}>
|
|
17
|
+
<E style={o.serialNumber}>
|
|
18
|
+
#{C.id!=null?C.id+1:1}
|
|
19
|
+
</E>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
<T style={[o.methodBadge,{backgroundColor:h.badgeColor}]}>
|
|
23
|
+
<E style={o.methodBadgeText}>{h.label}</E>
|
|
24
|
+
</T>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<T style={[o.chip,{backgroundColor:`${h.badgeColor}12`,borderColor:`${h.badgeColor}2E`}]}>
|
|
28
|
+
<E style={[o.chipText,{color:h.badgeColor}]}numberOfLines={1}>
|
|
29
|
+
console.{R}
|
|
30
|
+
</E>
|
|
31
|
+
</T>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
{x&&<T style={[o.chip,{backgroundColor:`${r.teal600}14`,borderColor:`${r.teal600}33`}]}>
|
|
35
|
+
<E style={[o.chipText,{color:r.teal600}]}>
|
|
36
|
+
{Array.isArray(x.data)?`Array[${x.data.length}]`:`Object{${Object.keys(x.data).length}}`}
|
|
37
|
+
</E>
|
|
38
|
+
</T>}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
{"duplicateCount"in C&&C.duplicateCount!=null&&C.duplicateCount>1&&<T style={o.dupBadge}>
|
|
42
|
+
<E style={o.dupBadgeText}>
|
|
43
|
+
×{C.duplicateCount}
|
|
44
|
+
</E>
|
|
45
|
+
</T>}
|
|
26
46
|
</T>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<T style={o.cardHeaderRight}>
|
|
50
|
+
<T style={[o.statusPill,{backgroundColor:h.statusPillBg,borderColor:h.statusPillBorder}]}>
|
|
51
|
+
<H color={h.statusPillText}size={9.5}/>
|
|
52
|
+
<E style={[o.statusPillText,{color:h.statusPillText}]}>
|
|
53
|
+
{h.label}
|
|
54
|
+
</E>
|
|
55
|
+
</T>
|
|
56
|
+
<Ce color={r.grayTextWeak}size={13}/>
|
|
32
57
|
</T>
|
|
33
|
-
{C&&<T style={[r.metaChip,{backgroundColor:`${o.teal600}14`,borderColor:`${o.teal600}33`}]}>
|
|
34
|
-
<I style={[r.metaChipText,{color:o.teal600,fontFamily:b.interBold}]}>
|
|
35
|
-
{Array.isArray(C.data)?`Array[${C.data.length}]`:`Object{${Object.keys(C.data).length}}`}
|
|
36
|
-
</I>
|
|
37
|
-
</T>}
|
|
38
|
-
{"duplicateCount"in t&&t.duplicateCount!=null&&t.duplicateCount>1&&<T style={[r.metaChip,{backgroundColor:`${o.purple}1A`,borderColor:`${o.purple}3D`}]}>
|
|
39
|
-
<I style={[r.metaChipText,{color:o.purple,fontFamily:b.interBold}]}>
|
|
40
|
-
×{t.duplicateCount}
|
|
41
|
-
</I>
|
|
42
|
-
</T>}
|
|
43
58
|
</T>
|
|
44
59
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
60
|
+
|
|
61
|
+
<T style={o.messageBox}>
|
|
62
|
+
{x?<T style={o.jsonPreviewRow}>
|
|
63
|
+
{x.header?<N text={x.header}search={O}style={o.messageText}detectLinks={!1}numberOfLines={1}/>:null}
|
|
64
|
+
{P&&<N text={P.text.replace(/\s+/g," ")}search={O}style={o.jsonPreviewText}detectLinks={!1}numberOfLines={x.header?2:3}/>}
|
|
65
|
+
</T>:ve(C.message,O,o.messageText,o.highlight,3)}
|
|
48
66
|
</T>
|
|
49
|
-
</T>
|
|
50
67
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
{h?"Show less":"Show full preview"}
|
|
61
|
-
</I>
|
|
62
|
-
<D color={o.purple}size={11}direction={h?"up":"down"}/>
|
|
63
|
-
</N>}
|
|
64
|
-
</T>}
|
|
65
|
-
</>:$(t.message,E,[r.messageText,{color:o.primaryBlack}],r.highlight,h?void 0:4)}
|
|
66
|
-
</T>
|
|
68
|
+
|
|
69
|
+
<T style={o.cardFooterRow}>
|
|
70
|
+
<T style={o.footerLeft}>
|
|
71
|
+
<T style={o.cardDateRow}>
|
|
72
|
+
<Ue color={r.grayTextWeak}size={10}/>
|
|
73
|
+
<E style={o.cardDateText}numberOfLines={1}>
|
|
74
|
+
{X(C.timestamp)}
|
|
75
|
+
</E>
|
|
76
|
+
</T>
|
|
67
77
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
{u&&<>
|
|
74
|
-
<T style={r.footerDot}/>
|
|
75
|
-
<N onPress={y=>{y.stopPropagation?.(),Q(u.rawFilePath||u.fullPath||u.fileName,u.lineNumber,u.columnNumber)}}hitSlop={8}style={r.callerPill}>
|
|
76
|
-
{u.fileExt&&u.fileExt!=="other"&&<T style={[r.extBadge,{backgroundColor:u.fileExt==="tsx"||u.fileExt==="ts"?`${o.brandPurple}22`:`${o.teal600}22`}]}>
|
|
77
|
-
<I style={[r.extBadgeText,{color:u.fileExt==="tsx"||u.fileExt==="ts"?o.brandPurple:o.teal600}]}>
|
|
78
|
-
{u.fileExt.toUpperCase()}
|
|
79
|
-
</I>
|
|
78
|
+
{I&&<K onPress={S=>{S.stopPropagation?.(),q(I.rawFilePath||I.fullPath||I.fileName,I.lineNumber,I.columnNumber)}}hitSlop={8}style={o.callerChip}>
|
|
79
|
+
{I.fileExt&&I.fileExt!=="other"&&<T style={[o.extBadge,{backgroundColor:I.fileExt==="tsx"||I.fileExt==="ts"?`${r.brandPurple}22`:`${r.teal600}22`}]}>
|
|
80
|
+
<E style={[o.extBadgeText,{color:I.fileExt==="tsx"||I.fileExt==="ts"?r.brandPurple:r.teal600}]}>
|
|
81
|
+
{I.fileExt.toUpperCase()}
|
|
82
|
+
</E>
|
|
80
83
|
</T>}
|
|
81
|
-
<
|
|
82
|
-
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
<E style={o.callerChipText}numberOfLines={1}ellipsizeMode="middle">
|
|
85
|
+
{I.display}
|
|
86
|
+
</E>
|
|
87
|
+
<Ie color={r.sky600}size={8}/>
|
|
88
|
+
</K>}
|
|
89
|
+
</T>
|
|
90
|
+
|
|
91
|
+
<T style={o.footerRight}>
|
|
92
|
+
{x&&<T style={o.metaStatChip}>
|
|
93
|
+
<We color={r.purple}size={8.5}/>
|
|
94
|
+
<E style={o.metaStatText}>
|
|
95
|
+
{_(x.data)}
|
|
96
|
+
</E>
|
|
97
|
+
</T>}
|
|
98
|
+
|
|
99
|
+
{k&&<T style={[o.chip,{backgroundColor:`${r.skyBlue}15`,borderColor:`${r.skyBlue}30`}]}>
|
|
100
|
+
<E style={[o.chipText,{color:r.skyBlue}]}>
|
|
101
|
+
{L("console.analyticsBadge")||"ANALYTICS"}
|
|
102
|
+
</E>
|
|
103
|
+
</T>}
|
|
104
|
+
</T>
|
|
88
105
|
</T>
|
|
89
106
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
<I style={[r.footerBadgeText,{color:o.skyBlue}]}>
|
|
93
|
-
{S("console.analyticsBadge")}
|
|
94
|
-
</I>
|
|
95
|
-
</T>
|
|
96
|
-
</T>}
|
|
107
|
+
|
|
108
|
+
<T style={[o.bottomAccentBar,{backgroundColor:`${h.border}35`}]}/>
|
|
97
109
|
</T>
|
|
98
|
-
</
|
|
99
|
-
</T>});const
|
|
110
|
+
</Te>
|
|
111
|
+
</T>});const o=Y.create({container:{paddingHorizontal:8,paddingVertical:4,height:148,justifyContent:"center"},card:{height:140,alignSelf:"stretch",borderRadius:10,overflow:"hidden",borderWidth:1,borderColor:r.dividerColor,shadowColor:r.shadowColorString},cardBody:{height:"100%",paddingHorizontal:12,paddingTop:10,paddingBottom:8,justifyContent:"space-between"},cardHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:22,minHeight:22,maxHeight:22},cardHeaderLeft:{flexDirection:"row",alignItems:"center",flex:1,marginRight:8,gap:6,minWidth:0,overflow:"hidden"},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},serialNumber:{fontFamily:B.interBold,color:r.grayTextWeak,fontSize:10},methodBadge:{paddingHorizontal:7,paddingVertical:2.5,borderRadius:5,alignItems:"center",justifyContent:"center"},methodBadgeText:{fontFamily:B.interBold,fontSize:9.5,lineHeight:12,letterSpacing:.5,color:r.white},chip:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,borderWidth:1},chipText:{fontFamily:B.interBold,fontSize:9,lineHeight:12},dupBadge:{backgroundColor:`${r.purple}14`,borderColor:`${r.purple}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},dupBadgeText:{fontFamily:B.interBold,fontSize:8.5,color:r.purple},statusPill:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:7,paddingVertical:2.5,borderRadius:6,borderWidth:1,flexShrink:0},statusPillText:{fontFamily:B.interBold,fontSize:10,lineHeight:13},messageBox:{backgroundColor:r.grayBackground,borderRadius:7,borderWidth:1,borderColor:r.dividerColor,paddingHorizontal:10,paddingVertical:6,height:68,minHeight:68,maxHeight:68,justifyContent:"center",gap:2,overflow:"hidden"},messageText:{fontFamily:B.interMedium,fontSize:12,color:r.primaryBlack,lineHeight:17},highlight:{backgroundColor:r.yellowHighlight,color:r.primaryBlack,borderRadius:2},jsonPreviewRow:{flexDirection:"column",justifyContent:"center",gap:2},jsonPreviewText:{fontFamily:B.interMedium,fontSize:11,color:r.teal700,lineHeight:15},cardFooterRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:18,minHeight:18,maxHeight:18,gap:6},footerLeft:{flexDirection:"row",alignItems:"center",gap:6,flex:1,minWidth:0,overflow:"hidden"},footerRight:{flexDirection:"row",alignItems:"center",gap:5,flexShrink:0},cardDateRow:{flexDirection:"row",alignItems:"center",gap:3.5},cardDateText:{fontFamily:B.interRegular,fontSize:10,lineHeight:13,color:r.slate400},callerChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:r.skySoftBg,borderColor:r.skySoftBorder,borderWidth:1,paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,flexShrink:1,minWidth:0},extBadge:{borderRadius:3,paddingHorizontal:3,paddingVertical:.5},extBadgeText:{fontFamily:B.interBold,fontSize:7.5},callerChipText:{color:r.skySoftText,fontSize:9,lineHeight:12,fontFamily:B.interBold},metaStatChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:r.violetSoftBg,borderColor:r.violetSoftBorder,borderWidth:1,paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4},metaStatText:{fontFamily:B.interBold,color:r.violetSoftText,fontSize:9,lineHeight:12},prefixTag:{flexDirection:"row",alignItems:"center",gap:2.5,paddingHorizontal:5,paddingVertical:1.5,borderRadius:3.5,borderWidth:1},prefixTagText:{fontFamily:B.interBold,fontSize:8.5,letterSpacing:.3},bottomAccentBar:{height:2.5,width:"100%",borderRadius:1.5,marginTop:2}});export default ConsoleLogCard;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface EndOfListFooterProps {
|
|
2
|
+
export interface EndOfListFooterProps {
|
|
3
3
|
count?: number;
|
|
4
|
+
totalCount?: number;
|
|
4
5
|
label?: string;
|
|
5
6
|
message?: string;
|
|
7
|
+
hasMore?: boolean;
|
|
8
|
+
onLoadMore?: () => void;
|
|
9
|
+
loadMoreStep?: number;
|
|
6
10
|
}
|
|
7
11
|
export declare const EndOfListFooter: React.FC<EndOfListFooterProps>;
|
|
8
12
|
export default EndOfListFooter;
|
|
@@ -1,15 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<T style={o.messageText}>{k}</T>
|
|
8
|
-
{w!=null&&w>0&&<C style={o.countBadge}>
|
|
9
|
-
<T style={o.countText}>
|
|
10
|
-
{w} {b?w===1?b.replace(/s$/,""):b:""}
|
|
1
|
+
import $ from"react";import{Platform as H,StyleSheet as j,Text as B,View as T}from"react-native";import{AppColors as o}from"../styles/AppColors";import{AppFonts as V}from"../styles/AppFonts";import{CheckIcon as A,ChevronIcon as D}from"./NetworkIcons";import E from"./TouchableScale";import{useTranslation as Y}from"../i18n";export const EndOfListFooter=$.memo(({count:C,totalCount:S,label:M="items",message:O,hasMore:F=!1,onLoadMore:z,loadMoreStep:v=10})=>{const{t:I}=Y(),L=O??I("footer.endOfList","You've reached the end of the list"),W=F||S!=null&&C!=null&&C<S&&!!z,P=S!=null&&C!=null?Math.max(0,S-C):v,R=Math.min(P||v,v);if(W&&z)return<T style={e.container}>
|
|
2
|
+
<T style={e.dividerLine}/>
|
|
3
|
+
<T style={e.loadMoreContainer}>
|
|
4
|
+
<E onPress={z}hitSlop={6}style={e.loadMoreBtn}>
|
|
5
|
+
<T style={e.loadMoreIconWrap}>
|
|
6
|
+
<D color={o.white}size={9}direction="down"/>
|
|
11
7
|
</T>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
<B style={e.loadMoreBtnText}>
|
|
9
|
+
{I("footer.loadMore",{count:R,defaultValue:`Load ${R} More`})}
|
|
10
|
+
</B>
|
|
11
|
+
{S!=null&&C!=null&&<T style={e.loadMoreCountBadge}>
|
|
12
|
+
<B style={e.loadMoreCountText}>
|
|
13
|
+
{C}/{S}
|
|
14
|
+
</B>
|
|
15
|
+
</T>}
|
|
16
|
+
</E>
|
|
17
|
+
{S!=null&&C!=null&&<B style={e.loadMoreSubtitle}>
|
|
18
|
+
{I("footer.showingOf",{count:C,total:S,label:M,defaultValue:`Showing ${C} of ${S} ${M}`})}
|
|
19
|
+
</B>}
|
|
20
|
+
</T>
|
|
21
|
+
<T style={e.dividerLine}/>
|
|
22
|
+
</T>;const k=C??S;return<T style={e.container}>
|
|
23
|
+
<T style={e.dividerLine}/>
|
|
24
|
+
<T style={e.badgePill}>
|
|
25
|
+
<T style={e.iconCircle}>
|
|
26
|
+
<A color={o.purple}size={8}/>
|
|
27
|
+
</T>
|
|
28
|
+
<B style={e.messageText}>{L}</B>
|
|
29
|
+
{k!=null&&k>0&&<T style={e.countBadge}>
|
|
30
|
+
<B style={e.countText}>
|
|
31
|
+
{k}{" "}
|
|
32
|
+
{M?k===1?M.replace(/s$/,""):M:""}
|
|
33
|
+
</B>
|
|
34
|
+
</T>}
|
|
35
|
+
</T>
|
|
36
|
+
<T style={e.dividerLine}/>
|
|
37
|
+
</T>});const e=j.create({container:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingHorizontal:16,paddingTop:14,paddingBottom:H.OS==="ios"?40:28,gap:8},dividerLine:{flex:1,height:1,backgroundColor:o.dividerColor,opacity:.7},loadMoreContainer:{alignItems:"center",gap:5},loadMoreBtn:{flexDirection:"row",alignItems:"center",backgroundColor:o.brandPurple,paddingVertical:6,paddingHorizontal:12,borderRadius:20,gap:6,shadowColor:o.brandPurple,shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:4,elevation:2,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.2)"},loadMoreIconWrap:{width:15,height:15,borderRadius:7.5,backgroundColor:"rgba(255, 255, 255, 0.25)",alignItems:"center",justifyContent:"center"},loadMoreBtnText:{fontFamily:V.interBold,fontSize:11,color:o.white,letterSpacing:.2},loadMoreCountBadge:{backgroundColor:"rgba(255, 255, 255, 0.2)",paddingHorizontal:5,paddingVertical:1,borderRadius:10},loadMoreCountText:{fontFamily:V.interBold,fontSize:9.5,color:o.white},loadMoreSubtitle:{fontFamily:V.interMedium,fontSize:10,color:o.grayTextWeak,letterSpacing:.1},badgePill:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:10,paddingVertical:5,borderRadius:999,backgroundColor:o.primaryLight,borderWidth:1,borderColor:o.grayBorderSecondary,shadowColor:o.black,shadowOffset:{width:0,height:1},shadowOpacity:.04,shadowRadius:2,elevation:1},iconCircle:{width:14,height:14,borderRadius:7,backgroundColor:`${o.purple}18`,alignItems:"center",justifyContent:"center"},messageText:{fontFamily:V.interMedium,fontSize:11,color:o.grayTextWeak,letterSpacing:.1},countBadge:{paddingHorizontal:5,paddingVertical:1,borderRadius:6,backgroundColor:o.grayBackground,borderWidth:1,borderColor:o.grayBorderSecondary},countText:{fontFamily:V.interBold,fontSize:9.5,color:o.grayTextStrong}});export default EndOfListFooter;
|