react-native-inapp-inspector 2.3.24 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/README.md +26 -5
  2. package/dist/commonjs/components/AnalyticsDetail.js +15 -12
  3. package/dist/commonjs/components/AnalyticsEventCard.js +11 -8
  4. package/dist/commonjs/components/AppHeaderLogo.js +4 -6
  5. package/dist/commonjs/components/ConsoleLogCard.d.ts +1 -0
  6. package/dist/commonjs/components/ConsoleLogCard.js +92 -80
  7. package/dist/commonjs/components/EndOfListFooter.d.ts +5 -1
  8. package/dist/commonjs/components/EndOfListFooter.js +27 -5
  9. package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +1 -1
  10. package/dist/commonjs/components/Inspector/AnalyticsTab.js +27 -299
  11. package/dist/commonjs/components/Inspector/ConsoleTab.js +36 -94
  12. package/dist/commonjs/components/Inspector/CrashDetail.js +11 -10
  13. package/dist/commonjs/components/Inspector/CrashTab.js +43 -33
  14. package/dist/commonjs/components/Inspector/DebuggingTab.js +13 -13
  15. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +107 -71
  16. package/dist/commonjs/components/Inspector/FabLauncher.js +8 -9
  17. package/dist/commonjs/components/Inspector/InspectorHeader.js +93 -70
  18. package/dist/commonjs/components/Inspector/LogDetail.js +10 -7
  19. package/dist/commonjs/components/Inspector/MainScreen.js +66 -30
  20. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +1 -1
  21. package/dist/commonjs/components/Inspector/MediaPreviewModal.js +3 -3
  22. package/dist/commonjs/components/Inspector/NetworkDetail.js +29 -28
  23. package/dist/commonjs/components/Inspector/NetworkFilterModal.js +1 -1
  24. package/dist/commonjs/components/Inspector/NetworkTab.js +87 -85
  25. package/dist/commonjs/components/Inspector/NpmStarPrompt.js +3 -3
  26. package/dist/commonjs/components/Inspector/NpmUpdateToast.js +21 -22
  27. package/dist/commonjs/components/Inspector/PushCard.d.ts +4 -0
  28. package/dist/commonjs/components/Inspector/PushCard.js +89 -0
  29. package/dist/commonjs/components/Inspector/PushDetail.d.ts +4 -0
  30. package/dist/commonjs/components/Inspector/PushDetail.js +190 -0
  31. package/dist/commonjs/components/Inspector/PushTab.d.ts +3 -0
  32. package/dist/commonjs/components/Inspector/PushTab.js +45 -0
  33. package/dist/commonjs/components/Inspector/ReduxDetail.js +16 -13
  34. package/dist/commonjs/components/Inspector/ReduxTab.js +109 -106
  35. package/dist/commonjs/components/Inspector/SettingsPanel.js +230 -134
  36. package/dist/commonjs/components/Inspector/StorageTab.js +55 -51
  37. package/dist/commonjs/components/Inspector/TabBar.js +30 -26
  38. package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -2
  39. package/dist/commonjs/components/JsonViewer.js +151 -159
  40. package/dist/commonjs/components/LogCard.js +34 -38
  41. package/dist/commonjs/components/LogSyntaxHighlighter.js +3 -3
  42. package/dist/commonjs/components/ModuleErrorBoundary.d.ts +24 -0
  43. package/dist/commonjs/components/ModuleErrorBoundary.js +33 -0
  44. package/dist/commonjs/components/NetworkIcons.d.ts +3 -3
  45. package/dist/commonjs/components/NetworkIcons.js +10 -6
  46. package/dist/commonjs/components/SegmentedTabs.d.ts +8 -2
  47. package/dist/commonjs/components/SegmentedTabs.js +11 -7
  48. package/dist/commonjs/components/ShareButton.d.ts +11 -0
  49. package/dist/commonjs/components/ShareButton.js +6 -0
  50. package/dist/commonjs/constants/index.js +1 -1
  51. package/dist/commonjs/constants/version.d.ts +1 -1
  52. package/dist/commonjs/constants/version.js +1 -1
  53. package/dist/commonjs/customHooks/crashHandler.js +4 -4
  54. package/dist/commonjs/customHooks/networkLogger.js +1 -2
  55. package/dist/commonjs/customHooks/pushNotificationLogger.d.ts +19 -0
  56. package/dist/commonjs/customHooks/pushNotificationLogger.js +1 -0
  57. package/dist/commonjs/helpers/index.d.ts +6 -0
  58. package/dist/commonjs/helpers/index.js +4 -4
  59. package/dist/commonjs/helpers/memoryManager.d.ts +2 -2
  60. package/dist/commonjs/helpers/memoryManager.js +1 -1
  61. package/dist/commonjs/helpers/remoteConfig.js +1 -1
  62. package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
  63. package/dist/commonjs/helpers/settingsStore.js +1 -1
  64. package/dist/commonjs/helpers/shareFormatter.d.ts +13 -0
  65. package/dist/commonjs/helpers/shareFormatter.js +7 -0
  66. package/dist/commonjs/i18n/index.d.ts +35 -0
  67. package/dist/commonjs/i18n/index.js +1 -1
  68. package/dist/commonjs/i18n/locales/ar.json +1 -0
  69. package/dist/commonjs/i18n/locales/de.json +1 -0
  70. package/dist/commonjs/i18n/locales/en.json +1 -1
  71. package/dist/commonjs/i18n/locales/es.json +1 -0
  72. package/dist/commonjs/i18n/locales/fr.json +1 -0
  73. package/dist/commonjs/i18n/locales/hi.json +1 -0
  74. package/dist/commonjs/i18n/locales/ja.json +1 -0
  75. package/dist/commonjs/i18n/locales/ko.json +1 -0
  76. package/dist/commonjs/i18n/locales/pt.json +1 -0
  77. package/dist/commonjs/i18n/locales/ru.json +1 -0
  78. package/dist/commonjs/i18n/locales/zh.json +1 -0
  79. package/dist/commonjs/index.d.ts +6 -5
  80. package/dist/commonjs/index.js +4 -4
  81. package/dist/commonjs/push.d.ts +4 -0
  82. package/dist/commonjs/push.js +1 -0
  83. package/dist/commonjs/styles/AppColors.d.ts +40 -0
  84. package/dist/commonjs/styles/AppColors.js +1 -1
  85. package/dist/commonjs/styles/index.js +1 -1
  86. package/dist/commonjs/types/enums.d.ts +30 -20
  87. package/dist/commonjs/types/enums.js +1 -1
  88. package/dist/commonjs/types/index.d.ts +10 -0
  89. package/dist/commonjs/types/interfaces.d.ts +63 -7
  90. package/dist/esm/components/AnalyticsDetail.js +84 -81
  91. package/dist/esm/components/AnalyticsEventCard.js +20 -17
  92. package/dist/esm/components/AppHeaderLogo.js +5 -7
  93. package/dist/esm/components/ConsoleLogCard.d.ts +1 -0
  94. package/dist/esm/components/ConsoleLogCard.js +98 -86
  95. package/dist/esm/components/EndOfListFooter.d.ts +5 -1
  96. package/dist/esm/components/EndOfListFooter.js +36 -14
  97. package/dist/esm/components/Inspector/AnalyticsFilterModal.js +14 -14
  98. package/dist/esm/components/Inspector/AnalyticsTab.js +44 -316
  99. package/dist/esm/components/Inspector/ConsoleTab.js +55 -113
  100. package/dist/esm/components/Inspector/CrashDetail.js +53 -52
  101. package/dist/esm/components/Inspector/CrashTab.js +74 -64
  102. package/dist/esm/components/Inspector/DebuggingTab.js +33 -33
  103. package/dist/esm/components/Inspector/DeviceInfoTab.js +174 -138
  104. package/dist/esm/components/Inspector/FabLauncher.js +41 -42
  105. package/dist/esm/components/Inspector/InspectorHeader.js +138 -115
  106. package/dist/esm/components/Inspector/LogDetail.js +24 -21
  107. package/dist/esm/components/Inspector/MainScreen.js +98 -62
  108. package/dist/esm/components/Inspector/MediaGalleryTab.js +1 -1
  109. package/dist/esm/components/Inspector/MediaPreviewModal.js +31 -31
  110. package/dist/esm/components/Inspector/NetworkDetail.js +88 -87
  111. package/dist/esm/components/Inspector/NetworkFilterModal.js +8 -8
  112. package/dist/esm/components/Inspector/NetworkTab.js +132 -130
  113. package/dist/esm/components/Inspector/NpmStarPrompt.js +42 -42
  114. package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -46
  115. package/dist/esm/components/Inspector/PushCard.d.ts +4 -0
  116. package/dist/esm/components/Inspector/PushCard.js +89 -0
  117. package/dist/esm/components/Inspector/PushDetail.d.ts +4 -0
  118. package/dist/esm/components/Inspector/PushDetail.js +190 -0
  119. package/dist/esm/components/Inspector/PushTab.d.ts +3 -0
  120. package/dist/esm/components/Inspector/PushTab.js +45 -0
  121. package/dist/esm/components/Inspector/ReduxDetail.js +40 -37
  122. package/dist/esm/components/Inspector/ReduxTab.js +155 -152
  123. package/dist/esm/components/Inspector/SettingsPanel.js +380 -284
  124. package/dist/esm/components/Inspector/StorageTab.js +177 -173
  125. package/dist/esm/components/Inspector/TabBar.js +38 -34
  126. package/dist/esm/components/Inspector/UpdateAvailableModal.js +1 -1
  127. package/dist/esm/components/JsonViewer.js +161 -169
  128. package/dist/esm/components/LogCard.js +38 -42
  129. package/dist/esm/components/LogSyntaxHighlighter.js +1 -1
  130. package/dist/esm/components/ModuleErrorBoundary.d.ts +24 -0
  131. package/dist/esm/components/ModuleErrorBoundary.js +33 -0
  132. package/dist/esm/components/NetworkIcons.d.ts +3 -3
  133. package/dist/esm/components/NetworkIcons.js +7 -3
  134. package/dist/esm/components/SegmentedTabs.d.ts +8 -2
  135. package/dist/esm/components/SegmentedTabs.js +12 -8
  136. package/dist/esm/components/ShareButton.d.ts +11 -0
  137. package/dist/esm/components/ShareButton.js +6 -0
  138. package/dist/esm/constants/index.js +1 -1
  139. package/dist/esm/constants/version.d.ts +1 -1
  140. package/dist/esm/constants/version.js +1 -1
  141. package/dist/esm/customHooks/crashHandler.js +6 -6
  142. package/dist/esm/customHooks/networkLogger.js +1 -2
  143. package/dist/esm/customHooks/pushNotificationLogger.d.ts +19 -0
  144. package/dist/esm/customHooks/pushNotificationLogger.js +1 -0
  145. package/dist/esm/helpers/index.d.ts +6 -0
  146. package/dist/esm/helpers/index.js +4 -4
  147. package/dist/esm/helpers/memoryManager.d.ts +2 -2
  148. package/dist/esm/helpers/memoryManager.js +1 -1
  149. package/dist/esm/helpers/remoteConfig.js +1 -1
  150. package/dist/esm/helpers/settingsStore.d.ts +1 -0
  151. package/dist/esm/helpers/settingsStore.js +1 -1
  152. package/dist/esm/helpers/shareFormatter.d.ts +13 -0
  153. package/dist/esm/helpers/shareFormatter.js +7 -0
  154. package/dist/esm/i18n/index.d.ts +35 -0
  155. package/dist/esm/i18n/index.js +1 -1
  156. package/dist/esm/i18n/locales/ar.json +1 -0
  157. package/dist/esm/i18n/locales/de.json +1 -0
  158. package/dist/esm/i18n/locales/en.json +1 -1
  159. package/dist/esm/i18n/locales/es.json +1 -0
  160. package/dist/esm/i18n/locales/fr.json +1 -0
  161. package/dist/esm/i18n/locales/hi.json +1 -0
  162. package/dist/esm/i18n/locales/ja.json +1 -0
  163. package/dist/esm/i18n/locales/ko.json +1 -0
  164. package/dist/esm/i18n/locales/pt.json +1 -0
  165. package/dist/esm/i18n/locales/ru.json +1 -0
  166. package/dist/esm/i18n/locales/zh.json +1 -0
  167. package/dist/esm/index.d.ts +6 -5
  168. package/dist/esm/index.js +7 -7
  169. package/dist/esm/push.d.ts +4 -0
  170. package/dist/esm/push.js +1 -0
  171. package/dist/esm/styles/AppColors.d.ts +40 -0
  172. package/dist/esm/styles/AppColors.js +1 -1
  173. package/dist/esm/styles/index.js +1 -1
  174. package/dist/esm/types/enums.d.ts +30 -20
  175. package/dist/esm/types/enums.js +1 -1
  176. package/dist/esm/types/index.d.ts +10 -0
  177. package/dist/esm/types/interfaces.d.ts +63 -7
  178. package/package.json +53 -24
  179. package/src/native/NativeInspector.ts +0 -1
  180. package/dist/commonjs/bundle.d.ts +0 -2
  181. package/dist/commonjs/bundle.js +0 -1
  182. package/dist/commonjs/components/BrandSquareIcon.d.ts +0 -5
  183. package/dist/commonjs/components/BrandSquareIcon.js +0 -112
  184. package/dist/commonjs/components/Inspector/BundleTab.d.ts +0 -48
  185. package/dist/commonjs/components/Inspector/BundleTab.js +0 -1297
  186. package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +0 -27
  187. package/dist/commonjs/components/Inspector/PerformanceTab.js +0 -454
  188. package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +0 -115
  189. package/dist/commonjs/customHooks/bundleAnalyzer.js +0 -1
  190. package/dist/commonjs/customHooks/performanceTracker.d.ts +0 -144
  191. package/dist/commonjs/customHooks/performanceTracker.js +0 -63
  192. package/dist/commonjs/performance.d.ts +0 -2
  193. package/dist/commonjs/performance.js +0 -1
  194. package/dist/esm/bundle.d.ts +0 -2
  195. package/dist/esm/bundle.js +0 -1
  196. package/dist/esm/components/BrandSquareIcon.d.ts +0 -5
  197. package/dist/esm/components/BrandSquareIcon.js +0 -112
  198. package/dist/esm/components/Inspector/BundleTab.d.ts +0 -48
  199. package/dist/esm/components/Inspector/BundleTab.js +0 -1297
  200. package/dist/esm/components/Inspector/PerformanceTab.d.ts +0 -27
  201. package/dist/esm/components/Inspector/PerformanceTab.js +0 -454
  202. package/dist/esm/customHooks/bundleAnalyzer.d.ts +0 -115
  203. package/dist/esm/customHooks/bundleAnalyzer.js +0 -1
  204. package/dist/esm/customHooks/performanceTracker.d.ts +0 -144
  205. package/dist/esm/customHooks/performanceTracker.js +0 -63
  206. package/dist/esm/performance.d.ts +0 -2
  207. package/dist/esm/performance.js +0 -1
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { PushCardProps } from '../../types';
3
+ declare const PushCard: React.NamedExoticComponent<PushCardProps>;
4
+ export default PushCard;
@@ -0,0 +1,89 @@
1
+ import O,{useMemo as $}from"react";import{StyleSheet as F,Text as T,View as C}from"react-native";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as k}from"../../styles/AppFonts";import{formatTime as W}from"../../helpers";import{BellIcon as N,ClockIcon as E,ForwardChevronIcon as A,KeyIcon as U,SunIcon as M,MoonIcon as G,ExternalLinkIcon as K,CloudPushIcon as _}from"../NetworkIcons";import D from"../HighlightText";import X from"../TouchableScale";const q=B=>{const r=(B||"").toLowerCase();return r.includes("salesforce")||r==="sfmc"?{badgeColor:e.sky600,border:e.sky600,cardBg:`${e.sky600}04`,label:"SALESFORCE"}:r.includes("fcm")||r.includes("firebase")?{badgeColor:e.firebaseOrange,border:e.firebaseOrange,cardBg:`${e.firebaseOrange}04`,label:"FCM"}:r.includes("apns")||r.includes("apple")?{badgeColor:e.slate700,border:e.slate700,cardBg:`${e.slate700}04`,label:"APNS"}:r.includes("expo")?{badgeColor:e.brandPurple,border:e.brandPurple,cardBg:`${e.brandPurple}04`,label:"EXPO"}:r.includes("notifee")?{badgeColor:e.pink500,border:e.pink500,cardBg:`${e.pink500}04`,label:"NOTIFEE"}:r.includes("onesignal")?{badgeColor:e.errorColor,border:e.errorColor,cardBg:`${e.errorColor}04`,label:"ONESIGNAL"}:{badgeColor:e.purple,border:e.purple,cardBg:`${e.purple}04`,label:(B||"PUSH").toUpperCase()}},J=(B,r)=>{if(r==="opened")return{label:"OPENED",text:e.brandPurple,bg:`${e.brandPurple}14`,border:`${e.brandPurple}30`,Icon:K};const P=(B||"").toLowerCase();return P==="foreground"?{label:"FOREGROUND",text:e.greenColor,bg:`${e.greenColor}14`,border:`${e.greenColor}30`,Icon:M}:P==="background"?{label:"BACKGROUND",text:e.amber600,bg:`${e.amber600}14`,border:`${e.amber600}30`,Icon:G}:{label:(B||"RECEIVED").toUpperCase(),text:e.grayTextWeak,bg:`${e.grayTextWeak}14`,border:`${e.grayTextWeak}30`,Icon:_}},V=O.memo(function({item:r,onPress:P,searchStr:R=""}){const S=$(()=>q(r.source),[r.source]),H=$(()=>J(r.appState,r.action),[r.appState,r.action]),I=$(()=>r.data?Object.keys(r.data).length:0,[r.data]),z=$(()=>!!(r.data?.deepLink||r.data?.openDirectUrl||r.data?._od||r.customDomainAttributes?.openDirectUrl),[r.data,r.customDomainAttributes]),L=H.Icon;return<X onPress={P}style={[o.card,{borderLeftWidth:3.5,borderLeftColor:S.border,backgroundColor:S.cardBg}]}accessibilityRole="button"accessibilityLabel={`Push Notification: ${r.title||"Notification"}`}>
2
+ <C style={o.cardBody}>
3
+
4
+ <C style={o.cardHeaderRow}>
5
+ <C style={o.cardHeaderLeft}>
6
+ <T style={o.serialNumber}>
7
+ #{r.id?r.id.replace(/^push_/,"").slice(-4):"1"}
8
+ </T>
9
+
10
+
11
+ <C style={[o.methodBadge,{backgroundColor:S.badgeColor}]}>
12
+ <T style={o.methodBadgeText}>{S.label}</T>
13
+ </C>
14
+
15
+
16
+ <C style={[o.chip,{backgroundColor:`${S.badgeColor}12`,borderColor:`${S.badgeColor}2E`}]}>
17
+ <T style={[o.chipText,{color:S.badgeColor}]}numberOfLines={1}>
18
+ push.{(r.source||"remote").toLowerCase()}
19
+ </T>
20
+ </C>
21
+
22
+
23
+ {I>0&&<C style={[o.chip,{backgroundColor:`${e.teal600}14`,borderColor:`${e.teal600}33`}]}>
24
+ <T style={[o.chipText,{color:e.teal600}]}>
25
+ Payload{`{${I}}`}
26
+ </T>
27
+ </C>}
28
+
29
+
30
+ {z&&<C style={[o.chip,{backgroundColor:`${e.brandPurple}14`,borderColor:`${e.brandPurple}33`}]}>
31
+ <T style={[o.chipText,{color:e.brandPurple}]}>
32
+ 🔗 Link
33
+ </T>
34
+ </C>}
35
+ </C>
36
+
37
+
38
+ <C style={o.cardHeaderRight}>
39
+ <C style={[o.statusPill,{backgroundColor:H.bg,borderColor:H.border}]}>
40
+ <L color={H.text}size={9.5}/>
41
+ <T style={[o.statusPillText,{color:H.text}]}>
42
+ {H.label}
43
+ </T>
44
+ </C>
45
+ <A color={e.grayTextWeak}size={13}/>
46
+ </C>
47
+ </C>
48
+
49
+
50
+ <C style={o.messageBox}>
51
+ <D text={r.title||"(No Title)"}searchWords={R?[R]:[]}numberOfLines={1}style={o.messageTitle}highlightStyle={o.highlight}/>
52
+ <D text={r.body||"(No message body)"}searchWords={R?[R]:[]}numberOfLines={2}style={o.messageBody}highlightStyle={o.highlight}/>
53
+ </C>
54
+
55
+
56
+ <C style={o.cardFooterRow}>
57
+ <C style={o.footerLeft}>
58
+ <C style={o.cardDateRow}>
59
+ <E color={e.slate400}size={10}/>
60
+ <T style={o.cardDateText}numberOfLines={1}>
61
+ {W(r.timestamp)}
62
+ </T>
63
+ </C>
64
+
65
+ {r.channelId?<C style={o.callerChip}>
66
+ <N color={e.skySoftText}size={8.5}/>
67
+ <T style={o.callerChipText}numberOfLines={1}ellipsizeMode="middle">
68
+ {r.channelId}
69
+ </T>
70
+ </C>:null}
71
+
72
+ {r.customDomainAttributes?.journeyName?<C style={[o.callerChip,{backgroundColor:`${e.brandPurple}14`,borderColor:`${e.brandPurple}30`}]}>
73
+ <T style={[o.callerChipText,{color:e.brandPurple}]}numberOfLines={1}ellipsizeMode="middle">
74
+ {r.customDomainAttributes.journeyName}
75
+ </T>
76
+ </C>:null}
77
+ </C>
78
+
79
+ <C style={o.footerRight}>
80
+ {I>0&&<C style={o.metaStatChip}>
81
+ <U color={e.purple}size={8.5}/>
82
+ <T style={o.metaStatText}>
83
+ {I} {I===1?"key":"keys"}
84
+ </T>
85
+ </C>}
86
+ </C>
87
+ </C>
88
+ </C>
89
+ </X>}),o=F.create({card:{height:140,alignSelf:"stretch",borderRadius:10,overflow:"hidden",borderWidth:1,borderColor:e.dividerColor,shadowColor:e.shadowColorString,marginBottom:6},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:k.interBold,color:e.grayTextWeak,fontSize:10},methodBadge:{paddingHorizontal:7,paddingVertical:2.5,borderRadius:5,alignItems:"center",justifyContent:"center"},methodBadgeText:{fontFamily:k.interBold,fontSize:9.5,lineHeight:12,letterSpacing:.5,color:e.white},chip:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,borderWidth:1},chipText:{fontFamily:k.interBold,fontSize:9,lineHeight:12},statusPill:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:7,paddingVertical:2.5,borderRadius:6,borderWidth:1,flexShrink:0},statusPillText:{fontFamily:k.interBold,fontSize:10,lineHeight:13},messageBox:{backgroundColor:e.grayBackground,borderRadius:7,borderWidth:1,borderColor:e.dividerColor,paddingHorizontal:10,paddingVertical:6,height:68,minHeight:68,maxHeight:68,justifyContent:"center",gap:2,overflow:"hidden"},messageTitle:{fontFamily:k.interBold,fontSize:12,color:e.primaryBlack,lineHeight:16},messageBody:{fontFamily:k.interRegular,fontSize:11,color:e.grayText,lineHeight:15},highlight:{backgroundColor:e.yellowHighlight,color:e.primaryBlack,borderRadius:2},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:k.interRegular,fontSize:10,lineHeight:13,color:e.slate400},callerChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:e.skySoftBg,borderColor:e.skySoftBorder,borderWidth:1,paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,flexShrink:1,minWidth:0},callerChipText:{color:e.skySoftText,fontSize:9,lineHeight:12,fontFamily:k.interBold},metaStatChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:`${e.purple}14`,borderColor:`${e.purple}2B`,borderWidth:1,paddingHorizontal:5,paddingVertical:1.5,borderRadius:4},metaStatText:{color:e.purple,fontSize:9,lineHeight:12,fontFamily:k.interBold}});V.displayName="PushCard";export default V;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { PushDetailProps } from '../../types';
3
+ declare const PushDetail: React.NamedExoticComponent<PushDetailProps>;
4
+ export default PushDetail;
@@ -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,3 @@
1
+ import React from 'react';
2
+ declare const PushTab: React.MemoExoticComponent<() => React.JSX.Element>;
3
+ export default PushTab;
@@ -0,0 +1,45 @@
1
+ import J,{useCallback as R,useMemo as H,useRef as X,useState as Y}from"react";import{FlatList as Z,Platform as M,Pressable as Co,ScrollView as So,StyleSheet as Po,Text as To,TextInput as Io,View as C}from"react-native";import{useInspector as zo}from"./InspectorContext";import Bo from"./PushCard";import V from"../TouchableScale";import Ro from"../AnimatedEntrance";import Vo from"../EmptyState";import Eo from"../EndOfListFooter";import S from"../../styles";import{AppColors as r}from"../../styles/AppColors";import{AppFonts as N}from"../../styles/AppFonts";import{ClearIcon as Fo,SearchIcon as Lo,TrashIcon as Ao,BellIcon as Wo,SunIcon as Oo,MoonIcon as $o,ExternalLinkIcon as Ho,CloudPushIcon as Mo,BoltIcon as No}from"../NetworkIcons";const Q=J.memo(()=>{const{pushRecords:w,filteredPushRecords:I,pushSearch:t,setPushSearch:z,pushQuickFilter:T,setPushQuickFilter:E,setSelectedPush:F,clearAllPushLogs:j,simulatePush:L}=zo(),_=X(null),[A,q]=Y(0),W=["salesforce","fcm","apns","deeplink","rich_media"],D=R(()=>{const o=W[A%W.length];L(o),q(e=>e+1)},[A,L]),v=H(()=>{let o=0,e=0,x=0;const P={};return w.forEach(B=>{const O=(B.appState||"").toLowerCase();O==="foreground"&&o++,O==="background"&&e++,B.action==="opened"&&x++;const $=(B.source||"other").toLowerCase();P[$]=(P[$]||0)+1}),{all:w.length,foreground:o,background:e,opened:x,sources:P}},[w]),K=H(()=>{const o=[{id:"all",label:"All",color:r.purple,icon:e=><Wo size={12}color={e}/>},{id:"foreground",label:"Foreground",color:r.greenColor,icon:e=><Oo size={12}color={e}/>},{id:"background",label:"Background",color:r.darkOrange,icon:e=><$o size={12}color={e}/>},{id:"opened",label:"Opened",color:r.brandPurple,icon:e=><Ho size={12}color={e}/>}];return Object.entries(v.sources).forEach(([e,x])=>{x>0&&e!=="all"&&o.push({id:`source:${e}`,label:e.toUpperCase(),color:e==="salesforce"?r.sky600:r.brandPurple,icon:P=><Mo size={12}color={P}/>})}),o},[v]),U=R(({item:o,index:e})=><Ro index={e}distance={8}>
2
+ <Bo item={o}searchStr={t}onPress={()=>F(o)}/>
3
+ </Ro>,[t,F]),G=R(o=>o.id||`push_${o.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
+ <Lo color={r.grayTextWeak}size={15}/>
10
+ </C>
11
+ <Io style={[S.searchInput,{paddingVertical:0}]}placeholder="Search notifications..."placeholderTextColor={r.grayTextWeak}value={t}onChangeText={z}autoCapitalize="none"autoCorrect={!1}returnKeyType="search"clearButtonMode="while-editing"/>
12
+ {t.length>0&&M.OS==="android"&&<C style={{position:"absolute",right:8,top:0,bottom:0,justifyContent:"center"}}>
13
+ <Co onPress={()=>z("")}hitSlop={10}style={S.clearBtn}>
14
+ <Fo color={r.grayTextWeak}size={13}/>
15
+ </Co>
16
+ </C>}
17
+ </C>
18
+
19
+ <C style={S.toolbarRight}>
20
+ <V style={[S.toolbarBtn,{backgroundColor:`${r.brandPurple}14`,borderColor:`${r.brandPurple}30`}]}onPress={D}hitSlop={6}accessibilityRole="button"accessibilityLabel="Simulate incoming push notification">
21
+ <No color={r.brandPurple}size={15}/>
22
+ </V>
23
+
24
+ {w.length>0&&<V style={[S.toolbarBtn,{borderColor:`${r.errorColor}38`,backgroundColor:`${r.errorColor}0F`}]}onPress={j}hitSlop={6}accessibilityRole="button"accessibilityLabel="Clear all push notification history">
25
+ <Ao color={r.errorColor}size={15}/>
26
+ </V>}
27
+ </C>
28
+ </C>
29
+ </C>
30
+
31
+
32
+ <C style={k.carouselWrapper}>
33
+ <So horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={k.carouselContent}>
34
+ {K.map(o=>{const e=T===o.id;return<V key={o.id}onPress={()=>E(o.id)}style={[k.filterPill,e&&{backgroundColor:o.color,borderColor:o.color}]}>
35
+ {o.icon?o.icon(e?r.white:o.color):null}
36
+ <To style={[k.filterPillText,e&&{color:r.white}]}>
37
+ {o.label}
38
+ </To>
39
+ </V>})}
40
+ </So>
41
+ </C>
42
+
43
+
44
+ <Z ref={_}data={I}renderItem={U}keyExtractor={G}contentContainerStyle={k.listContent}initialNumToRender={15}maxToRenderPerBatch={20}windowSize={11}removeClippedSubviews={M.OS==="android"}ListEmptyComponent={<Vo isSearch={!!(t||T!=="all")}searchQuery={t}customTitle={t||T!=="all"?"No matching push notifications":"No push notifications captured yet"}customSub={t||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(""),E("all")}}showReload={!1}/>}ListFooterComponent={I.length>0?<Eo totalCount={I.length}label="End of push notification history"/>:null}/>
45
+ </C>}),k=Po.create({carouselWrapper:{paddingVertical:6,borderBottomWidth:1,borderBottomColor:r.dividerColor,backgroundColor:r.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:r.grayBackground,borderWidth:1,borderColor:r.dividerColor},filterPillText:{fontSize:11,fontFamily:N.interMedium,color:r.primaryBlack},countBadge:{paddingHorizontal:5,paddingVertical:1,borderRadius:10},countBadgeText:{fontSize:9.5,fontFamily:N.interBold},listContent:{padding:8,paddingBottom:24}});Q.displayName="PushTab";export default Q;