react-native-inapp-inspector 2.3.25 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -5
- package/dist/commonjs/components/AnalyticsDetail.js +9 -6
- package/dist/commonjs/components/AppHeaderLogo.js +4 -6
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +18 -22
- package/dist/commonjs/components/Inspector/ConsoleTab.js +13 -16
- package/dist/commonjs/components/Inspector/CrashDetail.js +7 -6
- package/dist/commonjs/components/Inspector/CrashTab.js +23 -23
- package/dist/commonjs/components/Inspector/DebuggingTab.js +6 -6
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +77 -43
- package/dist/commonjs/components/Inspector/FabLauncher.js +8 -9
- package/dist/commonjs/components/Inspector/InspectorHeader.js +93 -70
- package/dist/commonjs/components/Inspector/LogDetail.js +10 -7
- package/dist/commonjs/components/Inspector/MainScreen.js +67 -29
- package/dist/commonjs/components/Inspector/NetworkDetail.js +29 -28
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/NetworkTab.js +87 -85
- package/dist/commonjs/components/Inspector/PushCard.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushCard.js +89 -0
- package/dist/commonjs/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushDetail.js +190 -0
- package/dist/commonjs/components/Inspector/PushTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/PushTab.js +45 -0
- package/dist/commonjs/components/Inspector/ReduxDetail.js +16 -13
- package/dist/commonjs/components/Inspector/ReduxTab.js +18 -28
- package/dist/commonjs/components/Inspector/SettingsPanel.js +253 -105
- package/dist/commonjs/components/Inspector/StorageTab.js +40 -40
- package/dist/commonjs/components/Inspector/TabBar.js +9 -8
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -2
- package/dist/commonjs/components/JsonViewer.js +77 -90
- package/dist/commonjs/components/LogCard.js +9 -6
- package/dist/commonjs/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/commonjs/components/ModuleErrorBoundary.js +33 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +3 -3
- package/dist/commonjs/components/NetworkIcons.js +10 -6
- package/dist/commonjs/components/SegmentedTabs.d.ts +4 -1
- package/dist/commonjs/components/SegmentedTabs.js +12 -8
- package/dist/commonjs/components/ShareButton.d.ts +11 -0
- package/dist/commonjs/components/ShareButton.js +6 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.js +4 -4
- package/dist/commonjs/customHooks/networkLogger.js +1 -1
- package/dist/commonjs/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/commonjs/customHooks/pushNotificationLogger.js +1 -0
- package/dist/commonjs/helpers/memoryManager.d.ts +2 -1
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.d.ts +13 -0
- package/dist/commonjs/helpers/shareFormatter.js +7 -0
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/index.d.ts +5 -2
- package/dist/commonjs/index.js +4 -4
- package/dist/commonjs/push.d.ts +4 -0
- package/dist/commonjs/push.js +1 -0
- package/dist/commonjs/types/enums.d.ts +30 -0
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/index.d.ts +10 -0
- package/dist/commonjs/types/interfaces.d.ts +63 -7
- package/dist/esm/components/AnalyticsDetail.js +28 -25
- package/dist/esm/components/AppHeaderLogo.js +5 -7
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +14 -14
- package/dist/esm/components/Inspector/AnalyticsTab.js +36 -40
- package/dist/esm/components/Inspector/ConsoleTab.js +52 -55
- package/dist/esm/components/Inspector/CrashDetail.js +11 -10
- package/dist/esm/components/Inspector/CrashTab.js +23 -23
- package/dist/esm/components/Inspector/DebuggingTab.js +10 -10
- package/dist/esm/components/Inspector/DeviceInfoTab.js +208 -174
- package/dist/esm/components/Inspector/FabLauncher.js +41 -42
- package/dist/esm/components/Inspector/InspectorHeader.js +138 -115
- package/dist/esm/components/Inspector/LogDetail.js +24 -21
- package/dist/esm/components/Inspector/MainScreen.js +100 -62
- package/dist/esm/components/Inspector/NetworkDetail.js +88 -87
- package/dist/esm/components/Inspector/NetworkFilterModal.js +8 -8
- package/dist/esm/components/Inspector/NetworkTab.js +136 -134
- package/dist/esm/components/Inspector/PushCard.d.ts +4 -0
- package/dist/esm/components/Inspector/PushCard.js +89 -0
- package/dist/esm/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/esm/components/Inspector/PushDetail.js +190 -0
- package/dist/esm/components/Inspector/PushTab.d.ts +3 -0
- package/dist/esm/components/Inspector/PushTab.js +45 -0
- package/dist/esm/components/Inspector/ReduxDetail.js +40 -37
- package/dist/esm/components/Inspector/ReduxTab.js +109 -119
- package/dist/esm/components/Inspector/SettingsPanel.js +406 -258
- package/dist/esm/components/Inspector/StorageTab.js +174 -174
- package/dist/esm/components/Inspector/TabBar.js +28 -27
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +1 -1
- package/dist/esm/components/JsonViewer.js +101 -114
- package/dist/esm/components/LogCard.js +25 -22
- package/dist/esm/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/esm/components/ModuleErrorBoundary.js +33 -0
- package/dist/esm/components/NetworkIcons.d.ts +3 -3
- package/dist/esm/components/NetworkIcons.js +7 -3
- package/dist/esm/components/SegmentedTabs.d.ts +4 -1
- package/dist/esm/components/SegmentedTabs.js +12 -8
- package/dist/esm/components/ShareButton.d.ts +11 -0
- package/dist/esm/components/ShareButton.js +6 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/crashHandler.js +6 -6
- package/dist/esm/customHooks/networkLogger.js +1 -1
- package/dist/esm/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/esm/customHooks/pushNotificationLogger.js +1 -0
- package/dist/esm/helpers/memoryManager.d.ts +2 -1
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/settingsStore.d.ts +1 -0
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/helpers/shareFormatter.d.ts +13 -0
- package/dist/esm/helpers/shareFormatter.js +7 -0
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/index.d.ts +5 -2
- package/dist/esm/index.js +7 -7
- package/dist/esm/push.d.ts +4 -0
- package/dist/esm/push.js +1 -0
- package/dist/esm/types/enums.d.ts +30 -0
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/index.d.ts +10 -0
- package/dist/esm/types/interfaces.d.ts +63 -7
- package/package.json +53 -10
- package/src/native/NativeInspector.ts +0 -1
- package/dist/commonjs/components/BrandSquareIcon.d.ts +0 -5
- package/dist/commonjs/components/BrandSquareIcon.js +0 -112
- package/dist/esm/components/BrandSquareIcon.d.ts +0 -5
- package/dist/esm/components/BrandSquareIcon.js +0 -112
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import j,{useMemo as M,useState as J}from"react";import{Image as K,ScrollView as P,StyleSheet as E,Text as T,View as C}from"react-native";import B from"../../styles";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as V}from"../../styles/AppFonts";import{formatDateTime as _}from"../../helpers";import{sharePushReport as Y}from"../../helpers/shareFormatter";import G from"../ShareButton";import R from"../CopyButton";import F from"../JsonViewer";import Q from"../SegmentedTabs";import{BellIcon as X,ClockIcon as Z,CloudPushIcon as Te,EyeIcon as Ce,LayersIcon as Ve,MetadataIcon as Se,RawJsonIcon as Be}from"../NetworkIcons";const A=j.memo(function({item:o}){const[z,N]=J("preview"),D=M(()=>o?_(o.timestamp):"",[o]);if(!o)return null;const W=async()=>{await Y(o)},H=[{key:"preview",label:"Preview",themeColor:e.brandPurple,icon:S=><Ce size={12}color={S?e.white:e.grayText}/>},{key:"payload",label:"Custom Payload",themeColor:e.violet600,icon:S=><Ve size={12}color={S?e.white:e.grayText}/>},{key:"headers",label:"Delivery Metadata",themeColor:e.teal600,icon:S=><Se size={12}color={S?e.white:e.grayText}/>},{key:"raw",label:"Raw Payload",themeColor:e.sky600,icon:S=><Be size={12}color={S?e.white:e.grayText}/>}],O=(o.source||"PUSH").toUpperCase(),L=(o.appState||"STATE").toUpperCase(),$=!!(o.data?.deepLink||o.data?.openDirectUrl||o.data?._od||o.customDomainAttributes?.openDirectUrl),U=o.data?.deepLink||o.data?.openDirectUrl||o.data?._od||o.customDomainAttributes?.openDirectUrl||"";return<C style={{flex:1}}>
|
|
2
|
+
|
|
3
|
+
<C style={{paddingHorizontal:8,paddingTop:4}}>
|
|
4
|
+
<C style={B.detailInfoBar}>
|
|
5
|
+
|
|
6
|
+
<C style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:6,paddingBottom:8,borderBottomWidth:1,borderBottomColor:e.dividerColor}}>
|
|
7
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:5,flexWrap:"wrap",flex:1}}>
|
|
8
|
+
|
|
9
|
+
<C style={[B.methodBadge,{backgroundColor:e.brandPurple,paddingHorizontal:8,paddingVertical:3.5,borderRadius:6,flexDirection:"row",alignItems:"center",gap:4}]}>
|
|
10
|
+
<Te size={10}color={e.white}/>
|
|
11
|
+
<T style={[B.methodBadgeText,{color:e.white,fontSize:10.5,fontFamily:V.interBold}]}>
|
|
12
|
+
{O}
|
|
13
|
+
</T>
|
|
14
|
+
</C>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<C style={[B.chip,{backgroundColor:o.appState==="foreground"?`${e.greenColor}18`:`${e.amber600}18`,borderColor:o.appState==="foreground"?`${e.greenColor}40`:`${e.amber600}40`,paddingHorizontal:6,paddingVertical:3,borderRadius:6}]}>
|
|
18
|
+
<T style={[B.chipText,{fontFamily:V.interBold,fontSize:9.5,color:o.appState==="foreground"?e.greenColor:e.amber700}]}>
|
|
19
|
+
{L}
|
|
20
|
+
</T>
|
|
21
|
+
</C>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
{o.action&&<C style={[B.chip,{backgroundColor:`${e.purple}14`,borderColor:`${e.purple}30`,paddingHorizontal:6,paddingVertical:3,borderRadius:6}]}>
|
|
25
|
+
<T style={[B.chipText,{fontFamily:V.interBold,fontSize:9.5,color:e.purple}]}>
|
|
26
|
+
{o.action.toUpperCase()}
|
|
27
|
+
</T>
|
|
28
|
+
</C>}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
<C style={[B.chip,{backgroundColor:`${e.brandPurple}10`,borderColor:`${e.brandPurple}25`,paddingHorizontal:7,paddingVertical:3,borderRadius:6,gap:4}]}>
|
|
32
|
+
<Z color={e.brandPurple}size={10}/>
|
|
33
|
+
<T style={[B.chipText,{color:e.brandPurple,fontFamily:V.interBold,fontSize:10.5}]}>
|
|
34
|
+
{D}
|
|
35
|
+
</T>
|
|
36
|
+
</C>
|
|
37
|
+
</C>
|
|
38
|
+
</C>
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
<C style={{backgroundColor:e.grayBackground,borderRadius:10,borderWidth:1,borderColor:e.dividerColor,padding:10,marginTop:8,gap:8}}>
|
|
42
|
+
|
|
43
|
+
<C style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"nowrap",gap:6}}>
|
|
44
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:6,flexShrink:1,minWidth:0}}>
|
|
45
|
+
<T style={{fontFamily:V.interBold,fontSize:10,color:e.grayTextWeak,letterSpacing:.4,textTransform:"uppercase"}}numberOfLines={1}>
|
|
46
|
+
{o.domain?o.domain.toUpperCase():"NOTIFICATION PAYLOAD"}
|
|
47
|
+
</T>
|
|
48
|
+
</C>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:5,flexShrink:0}}>
|
|
52
|
+
<G onShare={W}/>
|
|
53
|
+
<R value={typeof o.rawPayload=="object"?JSON.stringify(o.rawPayload,null,2):JSON.stringify(o.data,null,2)}label="JSON"iconType="copy"/>
|
|
54
|
+
<R value={o.id||""}label="ID"iconType="copy"/>
|
|
55
|
+
</C>
|
|
56
|
+
</C>
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<C style={{gap:2}}>
|
|
60
|
+
<T style={{fontFamily:V.interBold,fontSize:12.5,color:e.primaryBlack,lineHeight:18}}numberOfLines={2}selectable>
|
|
61
|
+
{o.title||"(No Title)"}
|
|
62
|
+
</T>
|
|
63
|
+
{o.body?<T style={{fontFamily:V.interRegular,fontSize:11.5,color:e.grayText,lineHeight:16}}numberOfLines={2}selectable>
|
|
64
|
+
{o.body}
|
|
65
|
+
</T>:null}
|
|
66
|
+
{$?<C style={{flexDirection:"row",alignItems:"center",gap:4,marginTop:2}}>
|
|
67
|
+
<T style={{fontSize:10,fontFamily:V.interBold,color:e.brandPurple}}>
|
|
68
|
+
🔗 LINK:
|
|
69
|
+
</T>
|
|
70
|
+
<T style={{fontSize:10.5,fontFamily:V.interRegular,color:e.sky600}}numberOfLines={1}>
|
|
71
|
+
{U}
|
|
72
|
+
</T>
|
|
73
|
+
</C>:null}
|
|
74
|
+
</C>
|
|
75
|
+
</C>
|
|
76
|
+
</C>
|
|
77
|
+
</C>
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
<C style={{paddingHorizontal:8,paddingVertical:6}}>
|
|
81
|
+
<Q tabs={H}activeKey={z}onChange={S=>N(S)}scrollable={!0}/>
|
|
82
|
+
</C>
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
<C style={{flex:1,paddingHorizontal:8,paddingBottom:10}}>
|
|
86
|
+
{z==="preview"&&<P contentContainerStyle={t.scrollContent}>
|
|
87
|
+
|
|
88
|
+
<C style={t.mockupCard}>
|
|
89
|
+
<C style={t.mockupHeader}>
|
|
90
|
+
<C style={t.mockupAppIcon}>
|
|
91
|
+
<X size={12}color={e.white}/>
|
|
92
|
+
</C>
|
|
93
|
+
<T style={t.mockupAppName}>
|
|
94
|
+
{o.domain||"App Notification"}
|
|
95
|
+
</T>
|
|
96
|
+
<T style={t.mockupTime}>• now</T>
|
|
97
|
+
</C>
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
{o.imageUrl?<K source={{uri:o.imageUrl}}style={t.mockupImage}resizeMode="cover"/>:null}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
<C style={{gap:2}}>
|
|
104
|
+
<T style={t.mockupTitle}numberOfLines={2}>
|
|
105
|
+
{o.title||"(No Title)"}
|
|
106
|
+
</T>
|
|
107
|
+
{o.subtitle?<T style={t.mockupSubtitle}numberOfLines={1}>
|
|
108
|
+
{o.subtitle}
|
|
109
|
+
</T>:null}
|
|
110
|
+
<T style={t.mockupBody}>
|
|
111
|
+
{o.body||"(No message body provided in notification payload)"}
|
|
112
|
+
</T>
|
|
113
|
+
</C>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
<C style={t.mockupFooterTags}>
|
|
117
|
+
{o.channelId?<C style={t.tagPill}>
|
|
118
|
+
<T style={t.tagPillText}>Channel: {o.channelId}</T>
|
|
119
|
+
</C>:null}
|
|
120
|
+
{o.sound?<C style={t.tagPill}>
|
|
121
|
+
<T style={t.tagPillText}>🔊 {o.sound}</T>
|
|
122
|
+
</C>:null}
|
|
123
|
+
{o.badge!=null?<C style={t.tagPill}>
|
|
124
|
+
<T style={t.tagPillText}>Badge: {o.badge}</T>
|
|
125
|
+
</C>:null}
|
|
126
|
+
{o.priority?<C style={t.tagPill}>
|
|
127
|
+
<T style={t.tagPillText}>⚡ {o.priority}</T>
|
|
128
|
+
</C>:null}
|
|
129
|
+
</C>
|
|
130
|
+
</C>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
{o.customDomainAttributes&&Object.keys(o.customDomainAttributes).length>0&&<C style={t.sectionCard}>
|
|
134
|
+
<T style={t.sectionTitle}>🏢 Domain Specific Fields</T>
|
|
135
|
+
{Object.entries(o.customDomainAttributes).map(([S,I])=><C key={S}style={t.keyValRow}>
|
|
136
|
+
<T style={t.keyText}>{S}:</T>
|
|
137
|
+
<T style={t.valText}numberOfLines={2}>
|
|
138
|
+
{typeof I=="object"?JSON.stringify(I):String(I)}
|
|
139
|
+
</T>
|
|
140
|
+
</C>)}
|
|
141
|
+
</C>}
|
|
142
|
+
</P>}
|
|
143
|
+
|
|
144
|
+
{z==="payload"&&<F data={o.data&&Object.keys(o.data).length>0?o.data:{message:"No custom key-value data found in payload"}}fullHeight={!0}/>}
|
|
145
|
+
|
|
146
|
+
{z==="headers"&&<P contentContainerStyle={t.scrollContent}>
|
|
147
|
+
<C style={t.sectionCard}>
|
|
148
|
+
<T style={t.sectionTitle}>⚙️ Delivery & Message Metadata</T>
|
|
149
|
+
<C style={t.keyValRow}>
|
|
150
|
+
<T style={t.keyText}>Message ID:</T>
|
|
151
|
+
<T style={t.valText}selectable>{o.id||"N/A"}</T>
|
|
152
|
+
</C>
|
|
153
|
+
<C style={t.keyValRow}>
|
|
154
|
+
<T style={t.keyText}>Source / Domain:</T>
|
|
155
|
+
<T style={t.valText}>{o.domain||o.source||"N/A"}</T>
|
|
156
|
+
</C>
|
|
157
|
+
<C style={t.keyValRow}>
|
|
158
|
+
<T style={t.keyText}>App State:</T>
|
|
159
|
+
<T style={t.valText}>{o.appState}</T>
|
|
160
|
+
</C>
|
|
161
|
+
<C style={t.keyValRow}>
|
|
162
|
+
<T style={t.keyText}>Action Type:</T>
|
|
163
|
+
<T style={t.valText}>{o.action}</T>
|
|
164
|
+
</C>
|
|
165
|
+
<C style={t.keyValRow}>
|
|
166
|
+
<T style={t.keyText}>Timestamp:</T>
|
|
167
|
+
<T style={t.valText}>{D}</T>
|
|
168
|
+
</C>
|
|
169
|
+
<C style={t.keyValRow}>
|
|
170
|
+
<T style={t.keyText}>Channel ID:</T>
|
|
171
|
+
<T style={t.valText}>{o.channelId||"default"}</T>
|
|
172
|
+
</C>
|
|
173
|
+
<C style={t.keyValRow}>
|
|
174
|
+
<T style={t.keyText}>Sound:</T>
|
|
175
|
+
<T style={t.valText}>{o.sound||"default"}</T>
|
|
176
|
+
</C>
|
|
177
|
+
<C style={t.keyValRow}>
|
|
178
|
+
<T style={t.keyText}>Badge Count:</T>
|
|
179
|
+
<T style={t.valText}>{o.badge!=null?o.badge:"None"}</T>
|
|
180
|
+
</C>
|
|
181
|
+
<C style={t.keyValRow}>
|
|
182
|
+
<T style={t.keyText}>Collapse Key:</T>
|
|
183
|
+
<T style={t.valText}>{o.collapseKey||"None"}</T>
|
|
184
|
+
</C>
|
|
185
|
+
</C>
|
|
186
|
+
</P>}
|
|
187
|
+
|
|
188
|
+
{z==="raw"&&<F data={o.rawPayload||o}fullHeight={!0}/>}
|
|
189
|
+
</C>
|
|
190
|
+
</C>}),t=E.create({container:{flex:1,backgroundColor:e.white},headerBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:10,borderBottomWidth:1,borderBottomColor:e.dividerColor,backgroundColor:e.white},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1},backBtn:{width:32,height:32,borderRadius:8,backgroundColor:e.grayBackground,alignItems:"center",justifyContent:"center",borderWidth:1,borderColor:e.dividerColor},titleWrap:{flex:1,gap:2},badgeRow:{flexDirection:"row",alignItems:"center",gap:5},sourceBadge:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:`${e.brandPurple}14`,paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,borderWidth:1,borderColor:`${e.brandPurple}30`},sourceBadgeText:{fontSize:9,fontFamily:V.interBold,color:e.brandPurple},stateBadge:{backgroundColor:`${e.greenColor}14`,paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,borderWidth:1,borderColor:`${e.greenColor}30`},stateBadgeText:{fontSize:9,fontFamily:V.interBold,color:e.greenColor},headerTitle:{fontSize:13,fontFamily:V.interSemiBold,color:e.primaryBlack},headerActions:{flexDirection:"row",alignItems:"center",gap:6},tabsContainer:{paddingHorizontal:10,paddingVertical:6,backgroundColor:e.grayBackground,borderBottomWidth:1,borderBottomColor:e.dividerColor},bodyContainer:{flex:1},scrollContent:{padding:12,gap:12},mockupCard:{backgroundColor:e.white,borderRadius:14,borderWidth:1,borderColor:e.dividerColor,padding:14,gap:8,shadowColor:"#000",shadowOpacity:.05,shadowOffset:{width:0,height:2},shadowRadius:6,elevation:2},mockupHeader:{flexDirection:"row",alignItems:"center",gap:6},mockupAppIcon:{width:20,height:20,borderRadius:5,backgroundColor:e.brandPurple,alignItems:"center",justifyContent:"center"},mockupAppName:{fontSize:11,fontFamily:V.interSemiBold,color:e.primaryBlack,textTransform:"uppercase"},mockupTime:{fontSize:10,fontFamily:V.interRegular,color:e.grayTextWeak},mockupImage:{width:"100%",height:140,borderRadius:8,marginVertical:4},mockupTitle:{fontSize:14,fontFamily:V.interBold,color:e.primaryBlack},mockupSubtitle:{fontSize:12,fontFamily:V.interMedium,color:e.grayText},mockupBody:{fontSize:12.5,fontFamily:V.interRegular,color:e.grayText,lineHeight:18},mockupFooterTags:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:6,marginTop:6,paddingTop:8,borderTopWidth:1,borderTopColor:e.dividerColor},tagPill:{backgroundColor:e.grayBackground,paddingHorizontal:6,paddingVertical:3,borderRadius:4,borderWidth:1,borderColor:e.dividerColor},tagPillText:{fontSize:10,fontFamily:V.interMedium,color:e.grayText},sectionCard:{backgroundColor:e.white,borderRadius:12,borderWidth:1,borderColor:e.dividerColor,padding:12,gap:8},sectionTitle:{fontSize:12,fontFamily:V.interBold,color:e.primaryBlack,marginBottom:4},keyValRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:3,borderBottomWidth:.5,borderBottomColor:`${e.dividerColor}40`,gap:8},keyText:{fontSize:11,fontFamily:V.interMedium,color:e.grayTextWeak},valText:{fontSize:11,fontFamily:V.interSemiBold,color:e.primaryBlack,textAlign:"right",flexShrink:1}});A.displayName="PushDetail";export default A;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import j,{useCallback as V,useMemo as E,useRef as le,useState as q}from"react";import{FlatList as Ce,Platform as K,Pressable as Se,ScrollView as Pe,StyleSheet as Te,Text as Ie,TextInput as Be,View as C}from"react-native";import{useInspector as Re}from"./InspectorContext";import Le from"./PushCard";import F from"../TouchableScale";import Ve from"../AnimatedEntrance";import Ee from"../EmptyState";import Fe from"../EndOfListFooter";import S from"../../styles";import{AppColors as t}from"../../styles/AppColors";import{AppFonts as U}from"../../styles/AppFonts";import{ClearIcon as Ae,SearchIcon as Me,TrashIcon as Oe,BellIcon as We,SunIcon as $e,MoonIcon as He,ExternalLinkIcon as Ne,CloudPushIcon as _e,BoltIcon as De}from"../NetworkIcons";const G=10,J=j.memo(()=>{const{pushRecords:x,filteredPushRecords:P,pushSearch:r,setPushSearch:z,pushQuickFilter:T,setPushQuickFilter:A,setSelectedPush:M,clearAllPushLogs:X,simulatePush:O,maxPushLogs:B}=Re(),Y=B||50,W=le(null),[v,Z]=q(0),[$,H]=q(Y);j.useEffect(()=>{H(B||50),W.current?.scrollToOffset({offset:0,animated:!1})},[r,T,B]);const R=E(()=>P.slice(0,$),[P,$]),N=["salesforce","fcm","apns","deeplink","rich_media"],ee=V(()=>{const e=N[v%N.length];O(e),Z(o=>o+1)},[v,O]),_=E(()=>{let e=0,o=0,I=0;const k={};return x.forEach(L=>{const D=(L.appState||"").toLowerCase();D==="foreground"&&e++,D==="background"&&o++,L.action==="opened"&&I++;const Q=(L.source||"other").toLowerCase();k[Q]=(k[Q]||0)+1}),{all:x.length,foreground:e,background:o,opened:I,sources:k}},[x]),oe=E(()=>{const e=[{id:"all",label:"All",color:t.purple,icon:o=><We size={12}color={o}/>},{id:"foreground",label:"Foreground",color:t.greenColor,icon:o=><$e size={12}color={o}/>},{id:"background",label:"Background",color:t.darkOrange,icon:o=><He size={12}color={o}/>},{id:"opened",label:"Opened",color:t.brandPurple,icon:o=><Ne size={12}color={o}/>}];return Object.entries(_.sources).forEach(([o,I])=>{I>0&&o!=="all"&&e.push({id:`source:${o}`,label:o.toUpperCase(),color:o==="salesforce"?t.sky600:t.brandPurple,icon:k=><_e size={12}color={k}/>})}),e},[_]),te=V(({item:e,index:o})=><Ve index={o}distance={8}>
|
|
2
|
+
<Le item={e}searchStr={r}onPress={()=>M(e)}/>
|
|
3
|
+
</Ve>,[r,M]),re=V(e=>e.id||`push_${e.timestamp}`,[]);return<C style={{flex:1}}>
|
|
4
|
+
|
|
5
|
+
<C style={{marginTop:6}}>
|
|
6
|
+
<C style={S.toolbarRow}>
|
|
7
|
+
<C style={[S.searchContainer,{flex:1,marginRight:8,height:38}]}>
|
|
8
|
+
<C style={S.searchIcon}>
|
|
9
|
+
<Me color={t.grayTextWeak}size={15}/>
|
|
10
|
+
</C>
|
|
11
|
+
<Be style={[S.searchInput,{paddingVertical:0}]}placeholder="Search notifications..."placeholderTextColor={t.grayTextWeak}value={r}onChangeText={z}autoCapitalize="none"autoCorrect={!1}returnKeyType="search"clearButtonMode="while-editing"/>
|
|
12
|
+
{r.length>0&&K.OS==="android"&&<C style={{position:"absolute",right:8,top:0,bottom:0,justifyContent:"center"}}>
|
|
13
|
+
<Se onPress={()=>z("")}hitSlop={10}style={S.clearBtn}>
|
|
14
|
+
<Ae color={t.grayTextWeak}size={13}/>
|
|
15
|
+
</Se>
|
|
16
|
+
</C>}
|
|
17
|
+
</C>
|
|
18
|
+
|
|
19
|
+
<C style={S.toolbarRight}>
|
|
20
|
+
<F style={[S.toolbarBtn,{backgroundColor:`${t.brandPurple}14`,borderColor:`${t.brandPurple}30`}]}onPress={ee}hitSlop={6}accessibilityRole="button"accessibilityLabel="Simulate incoming push notification">
|
|
21
|
+
<De color={t.brandPurple}size={15}/>
|
|
22
|
+
</F>
|
|
23
|
+
|
|
24
|
+
{x.length>0&&<F style={[S.toolbarBtn,{borderColor:`${t.errorColor}38`,backgroundColor:`${t.errorColor}0F`}]}onPress={X}hitSlop={6}accessibilityRole="button"accessibilityLabel="Clear all push notification history">
|
|
25
|
+
<Oe color={t.errorColor}size={15}/>
|
|
26
|
+
</F>}
|
|
27
|
+
</C>
|
|
28
|
+
</C>
|
|
29
|
+
</C>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<C style={w.carouselWrapper}>
|
|
33
|
+
<Pe horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={w.carouselContent}>
|
|
34
|
+
{oe.map(e=>{const o=T===e.id;return<F key={e.id}onPress={()=>A(e.id)}style={[w.filterPill,o&&{backgroundColor:e.color,borderColor:e.color}]}>
|
|
35
|
+
{e.icon?e.icon(o?t.white:e.color):null}
|
|
36
|
+
<Ie style={[w.filterPillText,o&&{color:t.white}]}>
|
|
37
|
+
{e.label}
|
|
38
|
+
</Ie>
|
|
39
|
+
</F>})}
|
|
40
|
+
</Pe>
|
|
41
|
+
</C>
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
<Ce ref={W}data={R}renderItem={te}keyExtractor={re}contentContainerStyle={w.listContent}initialNumToRender={15}maxToRenderPerBatch={20}windowSize={11}removeClippedSubviews={K.OS==="android"}ListEmptyComponent={<Ee isSearch={!!(r||T!=="all")}searchQuery={r}customTitle={r||T!=="all"?"No matching push notifications":"No push notifications captured yet"}customSub={r||T!=="all"?"Try adjusting your search query or filter chips.":"Incoming or opened push payloads from any domain (Salesforce, FCM, APNs, etc.) will appear here automatically."}onClearSearch={()=>{z(""),A("all")}}showReload={!1}/>}ListFooterComponent={P.length>0?<Fe count={R.length}totalCount={P.length}label="push notifications"loadMoreStep={G}hasMore={R.length<P.length}onLoadMore={()=>H(e=>e+G)}/>:null}/>
|
|
45
|
+
</C>}),w=Te.create({carouselWrapper:{paddingVertical:6,borderBottomWidth:1,borderBottomColor:t.dividerColor,backgroundColor:t.white},carouselContent:{paddingHorizontal:8,gap:6,flexDirection:"row",alignItems:"center"},filterPill:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:9,paddingVertical:4.5,borderRadius:20,backgroundColor:t.grayBackground,borderWidth:1,borderColor:t.dividerColor},filterPillText:{fontSize:11,fontFamily:U.interMedium,color:t.primaryBlack},countBadge:{paddingHorizontal:5,paddingVertical:1,borderRadius:10},countBadgeText:{fontSize:9.5,fontFamily:U.interBold},listContent:{padding:8,paddingBottom:24}});J.displayName="PushTab";export default J;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _e,{useState as E,useMemo as Ve,useEffect as et}from"react";import{Alert as ze,Platform as tt,Pressable as U,ScrollView as Z,StyleSheet as rt,Text as C,TextInput as Tt,ToastAndroid as Oe,TouchableOpacity as Ne,View as T}from"react-native";import{useTranslation as ht}from"../../i18n";import{useInspector as wt}from"./InspectorContext";import He from"../SegmentedTabs";import K from"../JsonViewer";import Me from"../DiffViewer";import Ee from"../CopyButton";import Ct from"../ShareButton";import St from"../TouchableScale";import Bt from"../HighlightText";import Vt from"../AnimatedEntrance";import{getActionHistory as zt}from"../../customHooks/reduxLogger";import{getSize as q,openInVSCode as _,parseStackLine as je}from"../../helpers";import{shareReduxReport as It}from"../../helpers/shareFormatter";import{getCustomStorage as $e}from"../../helpers/settingsStore";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as k}from"../../styles/AppFonts";import{TerminalIcon as Je,SearchIcon as Pt,ClearIcon as Wt,ClockIcon as Ie,LayersIcon as Ge,TrashIcon as Ue,ForwardChevronIcon as Rt,LiveStateIcon as Ke,TimelineIcon as Te,StorageIcon as Ce,MetadataIcon as Ft,BoltIcon as Pe,AtomIcon as Dt,ScreenIcon as At,ListenerIcon as Lt,DocIcon as We,ExternalLinkIcon as Se,CodeBracketsIcon as Ot}from"../NetworkIcons";const qe=z=>{switch(z){case"saga":return{label:"SAGA",renderIcon:(D,v=9)=><Dt color={D}size={v}/>,bg:e.purple100,text:e.brandPurple,border:e.purple200};case"thunk":return{label:"THUNK",renderIcon:(D,v=9)=><Pe color={D}size={v}/>,bg:e.amber100,text:e.amber800Warm,border:e.amber200};case"epic":return{label:"EPIC",renderIcon:(D,v=9)=><Je color={D}size={v}/>,bg:e.sky100,text:e.sky600,border:e.sky400};case"listener":return{label:"LISTENER",renderIcon:(D,v=9)=><Lt color={D}size={v}/>,bg:e.teal100,text:e.teal700,border:e.teal400};case"component":return{label:"UI DISPATCH",renderIcon:(D,v=9)=><At color={D}size={v}/>,bg:e.sky100,text:e.sky600,border:e.sky400};default:return{label:"DISPATCH",renderIcon:(D,v=9)=><Pe color={D}size={v}/>,bg:e.slate100,text:e.slate700,border:e.slate200}}},Nt=_e.memo(()=>{const{t:z}=ht(),{reduxState:D,reduxLastActionMap:v,selectedReduxSlice:W,selectedReduxAction:V}=wt(),[A,Re]=E(""),[O,ve]=E("live"),[Q,Qe]=E("payload"),[Fe,De]=E("raw"),[Xe,Ye]=E(null),[J,G]=E(!1),[X,N]=E(null),ke=Ve(()=>zt(),[v]),j=Ve(()=>W?ke.filter(B=>!B.affectedSlices||B.affectedSlices.length===0?!0:B.affectedSlices.includes(W)):ke,[ke,W]),Ae=Ve(()=>{if(!A.trim())return j;const B=A.toLowerCase();return j.filter(R=>R.type.toLowerCase().includes(B)||R.callerFile&&R.callerFile.toLowerCase().includes(B)||R.payload&&JSON.stringify(R.payload).toLowerCase().includes(B))},[j,A]);et(()=>{if(!W)return;async function B(){try{const R=$e();if(!R){G(!1),N(null);return}let F=await R.getItem(`persist:${W}`);if(F){try{N(JSON.parse(F))}catch{N(F)}G(!0);return}let I=await R.getItem("persist:root");if(I){const S=JSON.parse(I);if(S&&S[W]!==void 0){const P=S[W];try{N(typeof P=="string"?JSON.parse(P):P)}catch{N(P)}G(!0);return}}}catch{}G(!1),N(null)}B()},[W]);const Le=()=>{W&&ze.alert("Clear Persisted State",`Are you sure you want to delete persisted storage for slice "${W}"?`,[{text:"Cancel",style:"cancel"},{text:"Delete",style:"destructive",onPress:async()=>{try{const B=$e();if(!B)return;typeof B.removeItem=="function"?await B.removeItem(`persist:${W}`):await B.setItem(`persist:${W}`,""),G(!1),N(null),ve("live"),tt.OS==="android"?Oe.show("Persisted state cleared",Oe.SHORT):ze.alert("Cleared","Persisted state has been cleared.")}catch{ze.alert("Error","Failed to clear persisted state.")}}}])};if(W!=null){const B=D?.[W],R=B&&typeof B=="object"?Object.keys(B).length:typeof B<"u"?1:0,F=v[W],I=[{key:"live",label:z("redux.liveState","Live State"),icon:S=><Ke color={S?e.white:e.grayText}size={12}/>},{key:"timeline",label:`${z("redux.timeline","Timeline")} (${j.length})`,icon:S=><Te color={S?e.white:e.grayText}size={12}/>},{key:"persisted",label:J?z("redux.persisted","Persisted"):z("redux.storage","Storage"),icon:S=><Ce color={S?e.white:e.grayText}size={12}/>},{key:"metadata",label:z("redux.metadata","Metadata"),icon:S=><Ft color={S?e.white:e.grayText}size={12}/>}];return<T style={{flex:1,backgroundColor:e.grayBackground}}>
|
|
2
2
|
|
|
3
3
|
<T style={t.infoBar}>
|
|
4
4
|
<T style={t.infoTopRow}>
|
|
@@ -21,10 +21,10 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
21
21
|
{z("redux.inMemory","In-Memory").toUpperCase()}
|
|
22
22
|
</C>
|
|
23
23
|
</T>}
|
|
24
|
-
{
|
|
24
|
+
{F?.timestamp&&<T style={t.timePill}>
|
|
25
25
|
<Ie color={e.violet600}size={10}/>
|
|
26
26
|
<C style={t.timeText}>
|
|
27
|
-
{
|
|
27
|
+
{F.timestamp}
|
|
28
28
|
</C>
|
|
29
29
|
</T>}
|
|
30
30
|
</T>
|
|
@@ -36,7 +36,7 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
36
36
|
|
|
37
37
|
<T style={t.subStatsRow}>
|
|
38
38
|
<T style={[t.statPill,{backgroundColor:e.indigo50,borderColor:e.indigo400}]}>
|
|
39
|
-
<
|
|
39
|
+
<Ge color={e.indigo600Alt}size={11}/>
|
|
40
40
|
<C style={[t.statLabel,{color:e.indigo600Alt}]}>
|
|
41
41
|
{z("redux.keys","Keys")}:
|
|
42
42
|
</C>
|
|
@@ -61,26 +61,26 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
61
61
|
{j.length}
|
|
62
62
|
</C>
|
|
63
63
|
</T>
|
|
64
|
-
{
|
|
64
|
+
{F&&<T style={[t.statPill,{backgroundColor:e.amber100,borderColor:e.amber200,flexShrink:1,maxWidth:160}]}>
|
|
65
65
|
<Pe color={e.amber800Warm}size={11}/>
|
|
66
66
|
<C style={[t.statLabel,{color:e.amber800Warm}]}>
|
|
67
67
|
{z("redux.last","Last")}:
|
|
68
68
|
</C>
|
|
69
69
|
<C style={[t.statValue,{color:e.amber800Warm,flexShrink:1}]}numberOfLines={1}>
|
|
70
|
-
{
|
|
70
|
+
{F.type}
|
|
71
71
|
</C>
|
|
72
72
|
</T>}
|
|
73
73
|
</T>
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
<
|
|
76
|
+
<He tabs={I}activeKey={O}onChange={S=>ve(S)}style={{marginTop:10}}/>
|
|
77
77
|
</T>
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
{O!=="metadata"&&<T style={t.searchContainer}>
|
|
81
81
|
<Pt color={e.grayTextWeak}size={14}/>
|
|
82
|
-
<Tt placeholder={O==="timeline"?"Search action type, file, or payload...":"Search keys or values..."}placeholderTextColor={e.grayTextWeak}value={
|
|
83
|
-
{
|
|
82
|
+
<Tt placeholder={O==="timeline"?"Search action type, file, or payload...":"Search keys or values..."}placeholderTextColor={e.grayTextWeak}value={A}onChangeText={Re}style={t.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
83
|
+
{A.length>0&&<U onPress={()=>Re("")}hitSlop={10}>
|
|
84
84
|
<Wt color={e.grayTextWeak}size={14}/>
|
|
85
85
|
</U>}
|
|
86
86
|
</T>}
|
|
@@ -90,10 +90,10 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
90
90
|
{Ae.length===0?<T style={t.emptyBox}>
|
|
91
91
|
<Te color={e.grayTextWeak}size={28}/>
|
|
92
92
|
<C style={t.emptyBoxText}>
|
|
93
|
-
{
|
|
93
|
+
{A.trim()?"No actions matching your search query.":"No dispatched actions recorded for this slice yet."}
|
|
94
94
|
</C>
|
|
95
|
-
</T>:Ae.map((S,P)=>{const
|
|
96
|
-
<
|
|
95
|
+
</T>:Ae.map((S,P)=>{const H=Xe===S.id,$=qe(S.originType),Ze=S.callerFile?S.callerFile.split("/").pop():null;return<Vt key={S.id}index={P}distance={6}>
|
|
96
|
+
<St onPress={()=>Ye(H?null:S.id)}style={t.timelineCard}>
|
|
97
97
|
<T style={t.timelineHeader}>
|
|
98
98
|
<T style={{flexDirection:"row",alignItems:"center",gap:6,flex:1,minWidth:0,flexWrap:"wrap"}}>
|
|
99
99
|
<T style={t.actionBadge}>
|
|
@@ -109,7 +109,7 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
109
109
|
</C>
|
|
110
110
|
</T>
|
|
111
111
|
|
|
112
|
-
<
|
|
112
|
+
<Bt text={S.type}search={A}style={t.actionTitle}highlightStyle={t.highlight}/>
|
|
113
113
|
</T>
|
|
114
114
|
|
|
115
115
|
<T style={t.timePill}>
|
|
@@ -128,7 +128,7 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
128
128
|
{z("redux.triggeredFrom","Triggered From:")}
|
|
129
129
|
</C>
|
|
130
130
|
<C style={{fontFamily:k.interBold,fontSize:9.5,color:e.sky600}}numberOfLines={1}>
|
|
131
|
-
{
|
|
131
|
+
{Ze}:{S.callerLine||1}
|
|
132
132
|
</C>
|
|
133
133
|
</T>
|
|
134
134
|
|
|
@@ -141,7 +141,7 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
141
141
|
</T>}
|
|
142
142
|
|
|
143
143
|
|
|
144
|
-
{
|
|
144
|
+
{H?<T style={t.expandedContent}>
|
|
145
145
|
|
|
146
146
|
{S.stack?<T style={{marginBottom:12}}>
|
|
147
147
|
<C style={t.expandedSectionTitle}>
|
|
@@ -149,7 +149,7 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
149
149
|
</C>
|
|
150
150
|
<T style={{backgroundColor:e.grayBackground,borderRadius:8,padding:8,borderWidth:1,borderColor:e.dividerColor,gap:4}}>
|
|
151
151
|
{S.stack.split(`
|
|
152
|
-
`).map(
|
|
152
|
+
`).map(M=>M.trim()).filter(M=>M.length>0&&!M.includes("reduxLogger")&&!M.includes("inspectorReduxMiddleware")).slice(0,8).map((M,Be)=>{const L=je(M,Be===0),Y=L.frameType==="app";return<U key={Be}onPress={()=>{L.fileName!=="Unknown"&&_(L.fullPath||L.fileName,L.lineNumber,L.columnNumber)}}style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:3,borderBottomWidth:Be<7?.5:0,borderBottomColor:e.dividerColor}}>
|
|
153
153
|
<T style={{flex:1,minWidth:0}}>
|
|
154
154
|
<C style={{fontFamily:Y?k.interBold:k.interRegular,fontSize:9.5,color:Y?e.primaryBlack:e.grayTextWeak}}numberOfLines={1}>
|
|
155
155
|
{L.functionName||"anonymous"}
|
|
@@ -169,24 +169,24 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
169
169
|
<C style={t.expandedSectionTitle}>
|
|
170
170
|
{z("redux.actionPayload","Action Payload:")}
|
|
171
171
|
</C>
|
|
172
|
-
<K data={S.payload}search={
|
|
172
|
+
<K data={S.payload}search={A}forceOpen={!0}wrap={!0}/>
|
|
173
173
|
</T>}
|
|
174
174
|
|
|
175
175
|
<C style={t.expandedSectionTitle}>
|
|
176
176
|
{z("redux.stateChangesDiff","State Changes (Diff):")}
|
|
177
177
|
</C>
|
|
178
|
-
<
|
|
178
|
+
<Me oldData={S.prevState?.[W]||{}}newData={S.nextState?.[W]||{}}forceOpen={!0}/>
|
|
179
179
|
</T>:<T style={t.collapsedPrompt}>
|
|
180
180
|
<C style={t.collapsedPromptText}>
|
|
181
181
|
{z("redux.tapToInspectAction","Tap to inspect action payload & diff changes")}
|
|
182
182
|
</C>
|
|
183
183
|
<Rt color={e.grayTextWeak}size={12}/>
|
|
184
184
|
</T>}
|
|
185
|
-
</
|
|
186
|
-
</
|
|
185
|
+
</St>
|
|
186
|
+
</Vt>})}
|
|
187
187
|
</Z>:O==="metadata"?<Z style={{flex:1}}contentContainerStyle={{padding:12,paddingBottom:40}}keyboardShouldPersistTaps="handled">
|
|
188
188
|
<T style={t.metadataCard}>
|
|
189
|
-
{[{label:"Slice Name",value:W},{label:"Root Keys Count",value:`${R} keys`},{label:"In-Memory State Size",value:q(B)},{label:"Persistence Status",value:J?`Persisted (${q(X)})`:"Not Persisted (In-Memory)"},{label:"Dispatched Actions History",value:`${j.length} recorded actions`},{label:"Last Dispatched Action",value:
|
|
189
|
+
{[{label:"Slice Name",value:W},{label:"Root Keys Count",value:`${R} keys`},{label:"In-Memory State Size",value:q(B)},{label:"Persistence Status",value:J?`Persisted (${q(X)})`:"Not Persisted (In-Memory)"},{label:"Dispatched Actions History",value:`${j.length} recorded actions`},{label:"Last Dispatched Action",value:F?F.type:"None"},{label:"Last Action Timestamp",value:F?F.timestamp:"Initial"}].map((S,P)=><T key={P}style={[t.metaRow,P===6&&{borderBottomWidth:0}]}>
|
|
190
190
|
<C style={t.metaLabel}>{S.label}</C>
|
|
191
191
|
<C style={t.metaValue}selectable numberOfLines={2}>
|
|
192
192
|
{S.value}
|
|
@@ -194,7 +194,7 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
194
194
|
</T>)}
|
|
195
195
|
|
|
196
196
|
{J&&<Ne style={t.clearPersistBtn}onPress={Le}>
|
|
197
|
-
<
|
|
197
|
+
<Ue color={e.errorColor}size={14}/>
|
|
198
198
|
<C style={t.clearPersistText}>
|
|
199
199
|
Clear Persisted Storage For This Slice
|
|
200
200
|
</C>
|
|
@@ -211,7 +211,7 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
211
211
|
</C>
|
|
212
212
|
</T>
|
|
213
213
|
<Ne style={t.clearPersistMiniBtn}onPress={Le}>
|
|
214
|
-
<
|
|
214
|
+
<Ue color={e.errorColor}size={12}/>
|
|
215
215
|
<C style={t.clearPersistMiniText}>
|
|
216
216
|
Clear
|
|
217
217
|
</C>
|
|
@@ -219,7 +219,7 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
219
219
|
</T>
|
|
220
220
|
</T>
|
|
221
221
|
<T style={{flex:1,marginTop:8}}>
|
|
222
|
-
<K data={X}search={
|
|
222
|
+
<K data={X}search={A}forceOpen={A.length>0?!0:void 0}mode={Fe}onModeChange={De}fullHeight={!0}wrap={!0}/>
|
|
223
223
|
</T>
|
|
224
224
|
</T>:<T style={t.emptyBox}>
|
|
225
225
|
<Ce color={e.grayTextWeak}size={32}/>
|
|
@@ -232,9 +232,9 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
232
232
|
</C>
|
|
233
233
|
</T>}
|
|
234
234
|
</T>:<T style={{flex:1,padding:10}}>
|
|
235
|
-
<K data={B}search={
|
|
235
|
+
<K data={B}search={A}forceOpen={A.length>0?!0:void 0}mode={Fe}onModeChange={De}fullHeight={!0}wrap={!0}/>
|
|
236
236
|
</T>}
|
|
237
|
-
</T>}if(V!=null){const B=
|
|
237
|
+
</T>}if(V!=null){const B=qe(V.originType),R=V.callerFile?V.callerFile.split("/").pop():null,F=[{key:"payload",label:z("redux.payload","Payload"),icon:I=><Ot color={I?e.white:e.grayText}size={12}/>},{key:"diff",label:z("redux.diff","State Diff"),icon:I=><Te color={I?e.white:e.grayText}size={12}/>},{key:"stack",label:z("redux.callStack","Call Stack"),icon:I=><We color={I?e.white:e.grayText}size={12}/>},{key:"raw",label:"Raw Action",icon:I=><Ke color={I?e.white:e.grayText}size={12}/>}];return<T style={{flex:1,backgroundColor:e.grayBackground}}>
|
|
238
238
|
|
|
239
239
|
<T style={t.infoBar}>
|
|
240
240
|
<T style={t.infoTopRow}>
|
|
@@ -263,13 +263,16 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
263
263
|
</T>
|
|
264
264
|
|
|
265
265
|
|
|
266
|
-
<
|
|
266
|
+
<T style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
267
|
+
<Ct onShare={()=>It(V)}/>
|
|
268
|
+
<Ee value={()=>V}label="Copy Action"/>
|
|
269
|
+
</T>
|
|
267
270
|
</T>
|
|
268
271
|
|
|
269
272
|
|
|
270
273
|
<T style={t.subStatsRow}>
|
|
271
274
|
{V.affectedSlices&&V.affectedSlices.length>0&&<T style={[t.statPill,{backgroundColor:e.indigo50,borderColor:e.indigo400}]}>
|
|
272
|
-
<
|
|
275
|
+
<Ge color={e.indigo600Alt}size={11}/>
|
|
273
276
|
<C style={[t.statLabel,{color:e.indigo600Alt}]}>
|
|
274
277
|
Slices:
|
|
275
278
|
</C>
|
|
@@ -308,35 +311,35 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
308
311
|
</T>}
|
|
309
312
|
|
|
310
313
|
|
|
311
|
-
<
|
|
314
|
+
<He tabs={F}activeKey={Q}onChange={I=>Qe(I)}style={{marginTop:10}}/>
|
|
312
315
|
</T>
|
|
313
316
|
|
|
314
317
|
|
|
315
318
|
{Q==="payload"?<T style={{flex:1,padding:10}}>
|
|
316
|
-
{V.payload!==void 0?<K data={V.payload}search={
|
|
319
|
+
{V.payload!==void 0?<K data={V.payload}search={A}forceOpen={!0}fullHeight={!0}wrap={!0}/>:<T style={t.emptyBox}>
|
|
317
320
|
<C style={t.emptyBoxText}>
|
|
318
321
|
This action has no payload dispatched.
|
|
319
322
|
</C>
|
|
320
323
|
</T>}
|
|
321
324
|
</T>:Q==="diff"?<Z style={{flex:1}}contentContainerStyle={{padding:12,paddingBottom:40}}keyboardShouldPersistTaps="handled">
|
|
322
|
-
<
|
|
325
|
+
<Me oldData={V.prevState||{}}newData={V.nextState||{}}forceOpen={!0}/>
|
|
323
326
|
</Z>:Q==="stack"?<Z style={{flex:1}}contentContainerStyle={{padding:12,paddingBottom:40}}keyboardShouldPersistTaps="handled">
|
|
324
327
|
{V.stack?<T style={{backgroundColor:e.white,borderRadius:10,padding:10,borderWidth:1,borderColor:e.dividerColor}}>
|
|
325
328
|
<C style={t.expandedSectionTitle}>
|
|
326
329
|
Dispatched from call stack:
|
|
327
330
|
</C>
|
|
328
331
|
{V.stack.split(`
|
|
329
|
-
`).map(I=>I.trim()).filter(I=>I.length>0&&!I.includes("reduxLogger")&&!I.includes("inspectorReduxMiddleware")).map((I,S)=>{const P=je(I,S===0),
|
|
332
|
+
`).map(I=>I.trim()).filter(I=>I.length>0&&!I.includes("reduxLogger")&&!I.includes("inspectorReduxMiddleware")).map((I,S)=>{const P=je(I,S===0),H=P.frameType==="app";return<U key={S}onPress={()=>{P.fileName!=="Unknown"&&_(P.fullPath||P.fileName,P.lineNumber,P.columnNumber)}}style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:5,borderBottomWidth:.5,borderBottomColor:e.dividerColor}}>
|
|
330
333
|
<T style={{flex:1,minWidth:0}}>
|
|
331
|
-
<C style={{fontFamily:
|
|
334
|
+
<C style={{fontFamily:H?k.interBold:k.interRegular,fontSize:10.5,color:H?e.primaryBlack:e.grayTextWeak}}numberOfLines={1}>
|
|
332
335
|
{P.functionName||"anonymous"}
|
|
333
336
|
</C>
|
|
334
|
-
<C style={{fontFamily:k.interRegular,fontSize:9,color:
|
|
337
|
+
<C style={{fontFamily:k.interRegular,fontSize:9,color:H?e.sky600:e.grayTextWeak}}numberOfLines={1}>
|
|
335
338
|
{P.fileName}:{P.lineNumber||1}:
|
|
336
339
|
{P.columnNumber||1}
|
|
337
340
|
</C>
|
|
338
341
|
</T>
|
|
339
|
-
{
|
|
342
|
+
{H&&<Se color={e.sky600}size={11}/>}
|
|
340
343
|
</U>})}
|
|
341
344
|
</T>:<T style={t.emptyBox}>
|
|
342
345
|
<C style={t.emptyBoxText}>
|
|
@@ -347,7 +350,7 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
347
350
|
<K data={V}forceOpen={!0}fullHeight={!0}wrap={!0}/>
|
|
348
351
|
</T>}
|
|
349
352
|
</T>}return<T style={t.emptyBox}>
|
|
350
|
-
<
|
|
353
|
+
<Je color={e.purple}size={32}/>
|
|
351
354
|
<C style={t.emptyBoxTitle}>
|
|
352
355
|
No Redux Slice Selected
|
|
353
356
|
</C>
|
|
@@ -355,4 +358,4 @@ import Ze,{useState as E,useMemo as Ve,useEffect as _e}from"react";import{Alert
|
|
|
355
358
|
Select a slice from the Redux tab to inspect its state and dispatched
|
|
356
359
|
actions.
|
|
357
360
|
</C>
|
|
358
|
-
</T>}),t=
|
|
361
|
+
</T>}),t=rt.create({infoBar:{backgroundColor:e.white,padding:12,borderBottomWidth:1,borderBottomColor:e.dividerColor},infoTopRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:8},methodBadge:{paddingHorizontal:7,paddingVertical:2.5,borderRadius:5},methodBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.white,letterSpacing:.4},sliceNameText:{fontFamily:k.interBold,fontSize:14,color:e.primaryBlack,flexShrink:1},persistedChip:{flexDirection:"row",alignItems:"center",gap:3.5,backgroundColor:e.mintGreenBg,paddingHorizontal:6,paddingVertical:2,borderRadius:4,borderWidth:1,borderColor:e.mintGreenBorder},persistedChipText:{fontFamily:k.interBold,fontSize:9,color:e.mintGreenText},inMemoryChip:{backgroundColor:e.indigo50,paddingHorizontal:6,paddingVertical:2,borderRadius:4,borderWidth:1,borderColor:e.blueBorder},inMemoryChipText:{fontFamily:k.interBold,fontSize:9,color:e.indigo600Alt},subStatsRow:{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap"},statPill:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:e.grayBackground,paddingHorizontal:6,paddingVertical:2.5,borderRadius:5,borderWidth:1,borderColor:e.dividerColor},statPillText:{fontFamily:k.interMedium,fontSize:10,color:e.grayText},statLabel:{fontFamily:k.interBold,fontSize:10,color:e.grayTextWeak},statValue:{fontFamily:k.interBold,fontSize:10.5,color:e.primaryBlack},searchContainer:{flexDirection:"row",alignItems:"center",backgroundColor:e.white,borderRadius:8,marginHorizontal:12,marginTop:10,paddingHorizontal:10,borderWidth:1,borderColor:e.dividerColor,height:36,gap:8},searchInput:{flex:1,fontFamily:k.interRegular,fontSize:12,color:e.primaryBlack,padding:0},timelineCard:{backgroundColor:e.white,borderRadius:10,padding:12,marginBottom:8,borderWidth:1,borderColor:e.dividerColor,shadowColor:e.primaryBlack,shadowOffset:{width:0,height:1},shadowOpacity:.03,shadowRadius:3,elevation:1},timelineHeader:{flexDirection:"row",alignItems:"center",gap:8},actionBadge:{backgroundColor:e.indigo50,paddingHorizontal:6,paddingVertical:2,borderRadius:4,borderWidth:1,borderColor:e.blueBorder},actionBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.indigo600Alt},actionTitle:{flex:1,fontFamily:k.interBold,fontSize:12.5,color:e.primaryBlack},timePill:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:`${e.purple}14`,paddingHorizontal:6,paddingVertical:2,borderRadius:4},timeText:{fontFamily:k.interMedium,fontSize:10,color:e.purple},collapsedPrompt:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginTop:8,paddingTop:6,borderTopWidth:1,borderTopColor:e.dividerColor},collapsedPromptText:{fontFamily:k.interRegular,fontSize:10.5,color:e.grayTextWeak},expandedContent:{marginTop:10,paddingTop:10,borderTopWidth:1,borderTopColor:e.dividerColor},expandedSectionTitle:{fontFamily:k.interBold,fontSize:11,color:e.grayTextStrong,marginBottom:6},metadataCard:{backgroundColor:e.white,borderRadius:12,padding:12,borderWidth:1,borderColor:e.dividerColor,shadowColor:e.primaryBlack,shadowOffset:{width:0,height:1},shadowOpacity:.03,shadowRadius:3,elevation:1},metaRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:10,borderBottomWidth:1,borderBottomColor:e.dividerColor},metaLabel:{fontFamily:k.interMedium,fontSize:12,color:e.grayTextWeak},metaValue:{fontFamily:k.interBold,fontSize:12,color:e.primaryBlack,maxWidth:"60%",textAlign:"right"},persistedInfoCard:{backgroundColor:e.mintGreenBg,borderRadius:8,borderWidth:1,borderColor:e.mintGreenBorder,padding:10},persistedInfoTitle:{fontFamily:k.interBold,fontSize:11,color:e.mintGreenText},clearPersistMiniBtn:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:e.errorCardBg,paddingHorizontal:6,paddingVertical:2.5,borderRadius:4},clearPersistMiniText:{fontFamily:k.interBold,fontSize:9.5,color:e.errorColor},clearPersistBtn:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,backgroundColor:e.errorCardBg,borderWidth:1,borderColor:e.errorBorder,borderRadius:8,paddingVertical:10,marginTop:14},clearPersistText:{fontFamily:k.interBold,fontSize:12,color:e.errorColor},emptyBox:{backgroundColor:e.white,borderRadius:12,padding:24,alignItems:"center",justifyContent:"center",borderWidth:1,borderColor:e.dividerColor,margin:12,gap:8},emptyBoxTitle:{fontFamily:k.interBold,fontSize:14,color:e.primaryBlack},emptyBoxText:{fontFamily:k.interMedium,fontSize:12,color:e.grayTextWeak,textAlign:"center",lineHeight:18},highlight:{backgroundColor:e.yellowHighlight,color:e.amber800Warm,fontFamily:k.interBold}});export default Nt;
|