react-native-inapp-inspector 2.4.0 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ar.md +163 -0
- package/README.de.md +163 -0
- package/README.es.md +164 -0
- package/README.fr.md +163 -0
- package/README.hi.md +163 -0
- package/README.ja.md +180 -0
- package/README.ko.md +163 -0
- package/README.md +340 -243
- package/README.pt-BR.md +163 -0
- package/README.ru.md +163 -0
- package/README.zh-CN.md +387 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +82 -21
- package/assets/banner_dark.svg +186 -0
- package/assets/banner_light.svg +186 -0
- package/assets/icon_circle.svg +148 -0
- package/assets/icon_square.svg +369 -0
- package/assets/inapp_inspector_icon.gif +0 -0
- package/assets/inapp_inspector_icon_original.gif +0 -0
- package/assets/social_preview.png +0 -0
- package/assets/walkthrough.gif +0 -0
- package/dist/commonjs/components/AnimatedBrandOwl.d.ts +7 -0
- package/dist/commonjs/components/AnimatedBrandOwl.js +175 -0
- package/dist/commonjs/components/AppHeaderLogo.d.ts +1 -0
- package/dist/commonjs/components/AppHeaderLogo.js +7 -5
- package/dist/commonjs/components/BrandSquareIcon.d.ts +5 -0
- package/dist/commonjs/components/BrandSquareIcon.js +139 -0
- package/dist/commonjs/components/ConsoleLogCard.d.ts +2 -1
- package/dist/commonjs/components/ConsoleLogCard.js +23 -39
- package/dist/commonjs/components/Inspector/AboutModal.js +44 -54
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +16 -16
- package/dist/commonjs/components/Inspector/ConfirmationModal.d.ts +13 -0
- package/dist/commonjs/components/Inspector/ConfirmationModal.js +32 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.js +15 -15
- package/dist/commonjs/components/Inspector/CrashTab.js +25 -23
- package/dist/commonjs/components/Inspector/DebuggingTab.js +17 -17
- package/dist/commonjs/components/Inspector/FabLauncher.js +22 -30
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +2 -2
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.d.ts +15 -0
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.js +90 -0
- package/dist/commonjs/components/Inspector/MainScreen.js +46 -33
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +21 -19
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +85 -101
- package/dist/commonjs/components/Inspector/NetworkTab.js +50 -50
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +1 -1
- package/dist/commonjs/components/Inspector/PushCard.d.ts +3 -2
- package/dist/commonjs/components/Inspector/PushCard.js +5 -4
- package/dist/commonjs/components/Inspector/PushDetail.js +32 -23
- package/dist/commonjs/components/Inspector/PushTab.js +13 -13
- package/dist/commonjs/components/Inspector/ReduxDetail.js +32 -32
- package/dist/commonjs/components/Inspector/ReduxTab.js +14 -14
- package/dist/commonjs/components/Inspector/SettingsPanel.js +258 -139
- package/dist/commonjs/components/Inspector/SocketCard.d.ts +5 -0
- package/dist/commonjs/components/Inspector/SocketCard.js +116 -0
- package/dist/commonjs/components/Inspector/SocketDetail.d.ts +4 -0
- package/dist/commonjs/components/Inspector/SocketDetail.js +317 -0
- package/dist/commonjs/components/Inspector/SocketFilterModal.d.ts +13 -0
- package/dist/commonjs/components/Inspector/SocketFilterModal.js +69 -0
- package/dist/commonjs/components/Inspector/SocketTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/SocketTab.js +112 -0
- package/dist/commonjs/components/Inspector/StorageTab.js +34 -32
- package/dist/commonjs/components/Inspector/SupportModal.d.ts +7 -0
- package/dist/commonjs/components/Inspector/SupportModal.js +125 -0
- package/dist/commonjs/components/Inspector/SupportPage.d.ts +5 -0
- package/dist/commonjs/components/Inspector/SupportPage.js +227 -0
- package/dist/commonjs/components/Inspector/TabBar.js +24 -23
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +24 -24
- package/dist/commonjs/components/JsonViewer.js +7 -7
- package/dist/commonjs/components/LogCard.d.ts +3 -2
- package/dist/commonjs/components/LogCard.js +17 -14
- package/dist/commonjs/components/LogSyntaxHighlighter.js +5 -5
- package/dist/commonjs/components/ModuleErrorBoundary.js +2 -2
- package/dist/commonjs/components/NetworkIcons.d.ts +15 -0
- package/dist/commonjs/components/NetworkIcons.js +38 -3
- package/dist/commonjs/components/SegmentedTabs.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/socketLogger.d.ts +26 -0
- package/dist/commonjs/customHooks/socketLogger.js +2 -0
- package/dist/commonjs/helpers/index.js +3 -3
- package/dist/commonjs/helpers/memoryManager.d.ts +1 -0
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -1
- package/dist/commonjs/helpers/searchQueryParser.js +5 -1
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.d.ts +3 -1
- package/dist/commonjs/helpers/shareFormatter.js +8 -7
- package/dist/commonjs/i18n/index.d.ts +99 -1
- package/dist/commonjs/i18n/index.js +1 -1
- package/dist/commonjs/i18n/locales/ar.json +1 -1
- package/dist/commonjs/i18n/locales/bn.json +1 -0
- package/dist/commonjs/i18n/locales/de.json +1 -1
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -1
- package/dist/commonjs/i18n/locales/fr.json +1 -1
- package/dist/commonjs/i18n/locales/gu.json +1 -0
- package/dist/commonjs/i18n/locales/hi.json +1 -1
- package/dist/commonjs/i18n/locales/id.json +1 -0
- package/dist/commonjs/i18n/locales/it.json +1 -0
- package/dist/commonjs/i18n/locales/ja.json +1 -1
- package/dist/commonjs/i18n/locales/kn.json +1 -0
- package/dist/commonjs/i18n/locales/ko.json +1 -1
- package/dist/commonjs/i18n/locales/ml.json +1 -0
- package/dist/commonjs/i18n/locales/mr.json +1 -0
- package/dist/commonjs/i18n/locales/nl.json +1 -0
- package/dist/commonjs/i18n/locales/pa.json +1 -0
- package/dist/commonjs/i18n/locales/pl.json +1 -0
- package/dist/commonjs/i18n/locales/pt.json +1 -1
- package/dist/commonjs/i18n/locales/ru.json +1 -1
- package/dist/commonjs/i18n/locales/ta.json +1 -0
- package/dist/commonjs/i18n/locales/te.json +1 -0
- package/dist/commonjs/i18n/locales/tr.json +1 -0
- package/dist/commonjs/i18n/locales/vi.json +1 -0
- package/dist/commonjs/i18n/locales/zh.json +1 -1
- package/dist/commonjs/index.d.ts +13 -13
- package/dist/commonjs/index.js +5 -4
- package/dist/commonjs/native/NativeInspector.d.ts +1 -0
- package/dist/commonjs/socket.d.ts +4 -0
- package/dist/commonjs/socket.js +1 -0
- package/dist/commonjs/styles/index.d.ts +23 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/enums.d.ts +40 -0
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +122 -1
- package/dist/esm/components/AnimatedBrandOwl.d.ts +7 -0
- package/dist/esm/components/AnimatedBrandOwl.js +175 -0
- package/dist/esm/components/AppHeaderLogo.d.ts +1 -0
- package/dist/esm/components/AppHeaderLogo.js +7 -5
- package/dist/esm/components/BrandSquareIcon.d.ts +5 -0
- package/dist/esm/components/BrandSquareIcon.js +139 -0
- package/dist/esm/components/ConsoleLogCard.d.ts +2 -1
- package/dist/esm/components/ConsoleLogCard.js +61 -77
- package/dist/esm/components/Inspector/AboutModal.js +85 -95
- package/dist/esm/components/Inspector/AnalyticsTab.js +31 -31
- package/dist/esm/components/Inspector/ConfirmationModal.d.ts +13 -0
- package/dist/esm/components/Inspector/ConfirmationModal.js +32 -0
- package/dist/esm/components/Inspector/ConsoleTab.js +49 -49
- package/dist/esm/components/Inspector/CrashTab.js +40 -38
- package/dist/esm/components/Inspector/DebuggingTab.js +29 -29
- package/dist/esm/components/Inspector/FabLauncher.js +50 -58
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +7 -7
- package/dist/esm/components/Inspector/LanguageSelectorModal.d.ts +15 -0
- package/dist/esm/components/Inspector/LanguageSelectorModal.js +90 -0
- package/dist/esm/components/Inspector/MainScreen.js +123 -110
- package/dist/esm/components/Inspector/MediaGalleryTab.js +64 -62
- package/dist/esm/components/Inspector/MediaPreviewModal.js +107 -123
- package/dist/esm/components/Inspector/NetworkTab.js +90 -90
- package/dist/esm/components/Inspector/NpmUpdateToast.js +1 -1
- package/dist/esm/components/Inspector/PushCard.d.ts +3 -2
- package/dist/esm/components/Inspector/PushCard.js +23 -22
- package/dist/esm/components/Inspector/PushDetail.js +34 -25
- package/dist/esm/components/Inspector/PushTab.js +25 -25
- package/dist/esm/components/Inspector/ReduxDetail.js +42 -42
- package/dist/esm/components/Inspector/ReduxTab.js +35 -35
- package/dist/esm/components/Inspector/SettingsPanel.js +495 -376
- package/dist/esm/components/Inspector/SocketCard.d.ts +5 -0
- package/dist/esm/components/Inspector/SocketCard.js +116 -0
- package/dist/esm/components/Inspector/SocketDetail.d.ts +4 -0
- package/dist/esm/components/Inspector/SocketDetail.js +317 -0
- package/dist/esm/components/Inspector/SocketFilterModal.d.ts +13 -0
- package/dist/esm/components/Inspector/SocketFilterModal.js +69 -0
- package/dist/esm/components/Inspector/SocketTab.d.ts +3 -0
- package/dist/esm/components/Inspector/SocketTab.js +112 -0
- package/dist/esm/components/Inspector/StorageTab.js +136 -134
- package/dist/esm/components/Inspector/SupportModal.d.ts +7 -0
- package/dist/esm/components/Inspector/SupportModal.js +125 -0
- package/dist/esm/components/Inspector/SupportPage.d.ts +5 -0
- package/dist/esm/components/Inspector/SupportPage.js +227 -0
- package/dist/esm/components/Inspector/TabBar.js +36 -35
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +22 -22
- package/dist/esm/components/JsonViewer.js +55 -55
- package/dist/esm/components/LogCard.d.ts +3 -2
- package/dist/esm/components/LogCard.js +61 -58
- package/dist/esm/components/LogSyntaxHighlighter.js +5 -5
- package/dist/esm/components/ModuleErrorBoundary.js +23 -23
- package/dist/esm/components/NetworkIcons.d.ts +15 -0
- package/dist/esm/components/NetworkIcons.js +38 -3
- package/dist/esm/components/SegmentedTabs.js +7 -7
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/socketLogger.d.ts +26 -0
- package/dist/esm/customHooks/socketLogger.js +2 -0
- package/dist/esm/helpers/index.js +3 -3
- package/dist/esm/helpers/memoryManager.d.ts +1 -0
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/searchQueryParser.d.ts +1 -1
- package/dist/esm/helpers/searchQueryParser.js +5 -1
- package/dist/esm/helpers/settingsStore.d.ts +1 -0
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/helpers/shareFormatter.d.ts +3 -1
- package/dist/esm/helpers/shareFormatter.js +8 -7
- package/dist/esm/i18n/index.d.ts +99 -1
- package/dist/esm/i18n/index.js +1 -1
- package/dist/esm/i18n/locales/ar.json +1 -1
- package/dist/esm/i18n/locales/bn.json +1 -0
- package/dist/esm/i18n/locales/de.json +1 -1
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -1
- package/dist/esm/i18n/locales/fr.json +1 -1
- package/dist/esm/i18n/locales/gu.json +1 -0
- package/dist/esm/i18n/locales/hi.json +1 -1
- package/dist/esm/i18n/locales/id.json +1 -0
- package/dist/esm/i18n/locales/it.json +1 -0
- package/dist/esm/i18n/locales/ja.json +1 -1
- package/dist/esm/i18n/locales/kn.json +1 -0
- package/dist/esm/i18n/locales/ko.json +1 -1
- package/dist/esm/i18n/locales/ml.json +1 -0
- package/dist/esm/i18n/locales/mr.json +1 -0
- package/dist/esm/i18n/locales/nl.json +1 -0
- package/dist/esm/i18n/locales/pa.json +1 -0
- package/dist/esm/i18n/locales/pl.json +1 -0
- package/dist/esm/i18n/locales/pt.json +1 -1
- package/dist/esm/i18n/locales/ru.json +1 -1
- package/dist/esm/i18n/locales/ta.json +1 -0
- package/dist/esm/i18n/locales/te.json +1 -0
- package/dist/esm/i18n/locales/tr.json +1 -0
- package/dist/esm/i18n/locales/vi.json +1 -0
- package/dist/esm/i18n/locales/zh.json +1 -1
- package/dist/esm/index.d.ts +13 -13
- package/dist/esm/index.js +8 -7
- package/dist/esm/native/NativeInspector.d.ts +1 -0
- package/dist/esm/socket.d.ts +4 -0
- package/dist/esm/socket.js +1 -0
- package/dist/esm/styles/index.d.ts +23 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/enums.d.ts +40 -0
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/interfaces.d.ts +122 -1
- package/ios/NetworkInspectorModule.mm +102 -12
- package/package.json +204 -2
- package/src/native/NativeInspector.ts +8 -0
|
@@ -9,7 +9,7 @@ import{useState as N,useEffect as G,useRef as R}from"react";import{Animated as r
|
|
|
9
9
|
<C d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"stroke={i}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
10
10
|
<C d="M15 3h6v6"stroke={i}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
11
11
|
<C d="M10 14L21 3"stroke={i}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
12
|
-
</B>,H=7e3;export const NpmUpdateToast=()=>{const{t}=ie(),{updateAvailable:i,latestNpmVersion:V,showUpdateToast:O}=Q(),[_,U]=N(!1),[F,j]=N(!1),[W,E]=N(!1),I=R(new r.Value(60)).current,D=R(new r.Value(0)).current,z=R(new r.Value(1)).current,A=R(null);G(()=>(O&&i&&V&&!_&&(j(!0),r.parallel([r.spring(I,{toValue:0,friction:8,tension:40,useNativeDriver:!0}),r.timing(D,{toValue:1,duration:250,useNativeDriver:!0})]).start(),z.setValue(1),r.timing(z,{toValue:0,duration:H,useNativeDriver:!1}).start(),A.current=setTimeout(()=>{M()},H)),()=>{A.current&&clearTimeout(A.current)}),[O,i,V,_]);const M=()=>{r.parallel([r.timing(D,{toValue:0,duration:180,useNativeDriver:!0}),r.timing(I,{toValue:60,duration:180,useNativeDriver:!0})]).start(()=>{j(!1),U(!0)})},$=()=>{ee("npm install react-native-inapp-inspector@latest","Install Command"),E(!0),te("Copied npm install command!"),setTimeout(()=>{E(!1)},2e3)},Y=()=>{J.openURL("https://www.npmjs.com/package/react-native-inapp-inspector").catch(()=>{}),M()};if(typeof __DEV__>"u"||!__DEV__||!O||!F||!i||!V)return null;const q=z.interpolate({inputRange:[0,1],outputRange:["0%","100%"]});return<r.View style={[o.container,{opacity:D,transform:[{translateY:I}]}]}>
|
|
12
|
+
</B>,H=7e3;export const NpmUpdateToast=()=>{const{t}=ie(),{updateAvailable:i,latestNpmVersion:V,showUpdateToast:O}=Q(),[_,U]=N(!1),[F,j]=N(!1),[W,E]=N(!1),I=R(new r.Value(60)).current,D=R(new r.Value(0)).current,z=R(new r.Value(1)).current,A=R(null);G(()=>(O&&i&&V&&!_&&(j(!0),r.parallel([r.spring(I,{toValue:0,friction:8,tension:40,useNativeDriver:!0}),r.timing(D,{toValue:1,duration:250,useNativeDriver:!0})]).start(),z.setValue(1),r.timing(z,{toValue:0,duration:H,useNativeDriver:!1}).start(),A.current=setTimeout(()=>{M()},H)),()=>{A.current&&clearTimeout(A.current)}),[O,i,V,_]);const M=()=>{r.parallel([r.timing(D,{toValue:0,duration:180,useNativeDriver:!0}),r.timing(I,{toValue:60,duration:180,useNativeDriver:!0})]).start(()=>{j(!1),U(!0)})},$=()=>{ee("npm install react-native-inapp-inspector@latest","Install Command"),E(!0),te(t("about.copiedInstallCommand","Copied npm install command!")),setTimeout(()=>{E(!1)},2e3)},Y=()=>{J.openURL("https://www.npmjs.com/package/react-native-inapp-inspector").catch(()=>{}),M()};if(typeof __DEV__>"u"||!__DEV__||!O||!F||!i||!V)return null;const q=z.interpolate({inputRange:[0,1],outputRange:["0%","100%"]});return<r.View style={[o.container,{opacity:D,transform:[{translateY:I}]}]}>
|
|
13
13
|
<T style={o.contentRow}>
|
|
14
14
|
|
|
15
15
|
<T style={o.npmIconContainer}>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PushCardProps } from '../../types';
|
|
3
|
-
declare
|
|
4
|
-
|
|
3
|
+
declare function PushCard({ item, onPress, searchStr, }: PushCardProps): React.JSX.Element;
|
|
4
|
+
declare const _default: React.MemoExoticComponent<typeof PushCard>;
|
|
5
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import O,{useMemo as
|
|
1
|
+
import O,{useMemo as R}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 S}from"../../styles/AppFonts";import{useTranslation as W}from"../../i18n";import{formatTime as E}from"../../helpers";import{BellIcon as N,ClockIcon as A,ForwardChevronIcon as U,SunIcon as v,MoonIcon as M,CloudPushIcon as G,LinkChainIcon as K,ExternalLinkIcon as _,KeyIcon as X}from"../NetworkIcons";import $ from"../HighlightText";import J from"../TouchableScale";const Q=r=>{const t=(r||"").toLowerCase();return t.includes("salesforce")||t==="sfmc"?{badgeColor:e.sky600,border:e.sky600,cardBg:`${e.sky600}04`,label:"SALESFORCE"}:t.includes("fcm")||t.includes("firebase")?{badgeColor:e.firebaseOrange,border:e.firebaseOrange,cardBg:`${e.firebaseOrange}04`,label:"FCM"}:t.includes("apns")||t.includes("apple")?{badgeColor:e.slate700,border:e.slate700,cardBg:`${e.slate700}04`,label:"APNS"}:t.includes("expo")?{badgeColor:e.brandPurple,border:e.brandPurple,cardBg:`${e.brandPurple}04`,label:"EXPO"}:t.includes("notifee")?{badgeColor:e.pink500,border:e.pink500,cardBg:`${e.pink500}04`,label:"NOTIFEE"}:t.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:(r||"PUSH").toUpperCase()}},Y=(r,t)=>{if(t==="opened")return{label:"OPENED",text:e.brandPurple,bg:`${e.brandPurple}14`,border:`${e.brandPurple}30`,Icon:_};const B=(r||"").toLowerCase();return B==="foreground"?{label:"FOREGROUND",text:e.greenColor,bg:`${e.greenColor}14`,border:`${e.greenColor}30`,Icon:v}:B==="background"?{label:"BACKGROUND",text:e.amber600,bg:`${e.amber600}14`,border:`${e.amber600}30`,Icon:M}:{label:(r||"RECEIVED").toUpperCase(),text:e.grayTextWeak,bg:`${e.grayTextWeak}14`,border:`${e.grayTextWeak}30`,Icon:G}};function Z({item:r,onPress:t,searchStr:B=""}){const{t:D}=W(),I=R(()=>Q(r.source),[r.source]),P=R(()=>Y(r.appState,r.action),[r.appState,r.action]),H=R(()=>r.data?Object.keys(r.data).length:0,[r.data]),V=R(()=>!!(r.data?.deepLink||r.data?.openDirectUrl||r.data?._od||r.customDomainAttributes?.openDirectUrl),[r.data,r.customDomainAttributes]),L=P.Icon;return<J onPress={t}style={[o.card,{borderLeftWidth:3.5,borderLeftColor:I.border,backgroundColor:I.cardBg}]}accessibilityRole="button"accessibilityLabel={`Push Notification: ${r.title||"Notification"}`}>
|
|
2
2
|
<C style={o.cardBody}>
|
|
3
3
|
|
|
4
4
|
<C style={o.cardHeaderRow}>
|
|
@@ -8,57 +8,58 @@ import O,{useMemo as $}from"react";import{StyleSheet as F,Text as T,View as C}fr
|
|
|
8
8
|
</T>
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
<C style={[o.methodBadge,{backgroundColor:
|
|
12
|
-
<T style={o.methodBadgeText}>{
|
|
11
|
+
<C style={[o.methodBadge,{backgroundColor:I.badgeColor}]}>
|
|
12
|
+
<T style={o.methodBadgeText}>{I.label}</T>
|
|
13
13
|
</C>
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
<C style={[o.chip,{backgroundColor:`${
|
|
17
|
-
<T style={[o.chipText,{color:
|
|
16
|
+
<C style={[o.chip,{backgroundColor:`${I.badgeColor}12`,borderColor:`${I.badgeColor}2E`}]}>
|
|
17
|
+
<T style={[o.chipText,{color:I.badgeColor}]}numberOfLines={1}>
|
|
18
18
|
push.{(r.source||"remote").toLowerCase()}
|
|
19
19
|
</T>
|
|
20
20
|
</C>
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
{
|
|
23
|
+
{H>0&&<C style={[o.chip,{backgroundColor:`${e.teal600}14`,borderColor:`${e.teal600}33`}]}>
|
|
24
24
|
<T style={[o.chipText,{color:e.teal600}]}>
|
|
25
|
-
Payload{`{${
|
|
25
|
+
Payload{`{${H}}`}
|
|
26
26
|
</T>
|
|
27
27
|
</C>}
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
{
|
|
30
|
+
{V&&<C style={[o.chip,{backgroundColor:`${e.brandPurple}14`,borderColor:`${e.brandPurple}33`,flexDirection:"row",alignItems:"center",gap:3}]}>
|
|
31
|
+
<K size={10}color={e.brandPurple}/>
|
|
31
32
|
<T style={[o.chipText,{color:e.brandPurple}]}>
|
|
32
|
-
|
|
33
|
+
{D("push.link","Link")}
|
|
33
34
|
</T>
|
|
34
35
|
</C>}
|
|
35
36
|
</C>
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
<C style={o.cardHeaderRight}>
|
|
39
|
-
<C style={[o.statusPill,{backgroundColor:
|
|
40
|
-
<L color={
|
|
41
|
-
<T style={[o.statusPillText,{color:
|
|
42
|
-
{
|
|
40
|
+
<C style={[o.statusPill,{backgroundColor:P.bg,borderColor:P.border}]}>
|
|
41
|
+
<L color={P.text}size={9.5}/>
|
|
42
|
+
<T style={[o.statusPillText,{color:P.text}]}>
|
|
43
|
+
{P.label}
|
|
43
44
|
</T>
|
|
44
45
|
</C>
|
|
45
|
-
<
|
|
46
|
+
<U color={e.grayTextWeak}size={13}/>
|
|
46
47
|
</C>
|
|
47
48
|
</C>
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
<C style={o.messageBox}>
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
<$ text={r.title||"(No Title)"}searchWords={B?[B]:[]}numberOfLines={1}style={o.messageTitle}highlightStyle={o.highlight}/>
|
|
53
|
+
<$ text={r.body||"(No message body)"}searchWords={B?[B]:[]}numberOfLines={2}style={o.messageBody}highlightStyle={o.highlight}/>
|
|
53
54
|
</C>
|
|
54
55
|
|
|
55
56
|
|
|
56
57
|
<C style={o.cardFooterRow}>
|
|
57
58
|
<C style={o.footerLeft}>
|
|
58
59
|
<C style={o.cardDateRow}>
|
|
59
|
-
<
|
|
60
|
+
<A color={e.slate400}size={10}/>
|
|
60
61
|
<T style={o.cardDateText}numberOfLines={1}>
|
|
61
|
-
{
|
|
62
|
+
{E(r.timestamp)}
|
|
62
63
|
</T>
|
|
63
64
|
</C>
|
|
64
65
|
|
|
@@ -77,13 +78,13 @@ import O,{useMemo as $}from"react";import{StyleSheet as F,Text as T,View as C}fr
|
|
|
77
78
|
</C>
|
|
78
79
|
|
|
79
80
|
<C style={o.footerRight}>
|
|
80
|
-
{
|
|
81
|
-
<
|
|
81
|
+
{H>0&&<C style={o.metaStatChip}>
|
|
82
|
+
<X color={e.purple}size={8.5}/>
|
|
82
83
|
<T style={o.metaStatText}>
|
|
83
|
-
{
|
|
84
|
+
{H} {H===1?"key":"keys"}
|
|
84
85
|
</T>
|
|
85
86
|
</C>}
|
|
86
87
|
</C>
|
|
87
88
|
</C>
|
|
88
89
|
</C>
|
|
89
|
-
</
|
|
90
|
+
</J>}const 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:S.interBold,color:e.grayTextWeak,fontSize:10},methodBadge:{paddingHorizontal:7,paddingVertical:2.5,borderRadius:5,alignItems:"center",justifyContent:"center"},methodBadgeText:{fontFamily:S.interBold,fontSize:9.5,lineHeight:12,letterSpacing:.5,color:e.white},chip:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,borderWidth:1},chipText:{fontFamily:S.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:S.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:S.interBold,fontSize:12,color:e.primaryBlack,lineHeight:16},messageBody:{fontFamily:S.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:S.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:S.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:S.interBold}});function ee(r,t){return r.item===t.item&&r.searchStr===t.searchStr&&r.onPress===t.onPress}export default O.memo(Z,ee);
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import
|
|
1
|
+
import U,{useMemo as j,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 I from"../../styles";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as V}from"../../styles/AppFonts";import{useTranslation as _}from"../../i18n";import{formatDateTime as Y}from"../../helpers";import{sharePushReport as q}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,LinkChainIcon as Ie,VolumeIcon as De,BoltIcon as Pe,BuildingIcon as Re,SettingsIcon as Fe}from"../NetworkIcons";const A=U.memo(function({item:o}){const{t:B}=_(),[z,N]=J("preview"),v=j(()=>o?Y(o.timestamp):"",[o]);if(!o)return null;const W=async()=>{await q(o)},H=[{key:"preview",label:B("push.preview","Preview"),themeColor:e.brandPurple,icon:S=><Ce size={12}color={S?e.white:e.grayText}/>},{key:"payload",label:B("push.payload","Custom Payload"),themeColor:e.violet600,icon:S=><Ve size={12}color={S?e.white:e.grayText}/>},{key:"headers",label:B("push.deliveryMetadata","Delivery Metadata"),themeColor:e.teal600,icon:S=><Se size={12}color={S?e.white:e.grayText}/>},{key:"raw",label:B("push.rawPayload","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),M=o.data?.deepLink||o.data?.openDirectUrl||o.data?._od||o.customDomainAttributes?.openDirectUrl||"";return<C style={{flex:1}}>
|
|
2
2
|
|
|
3
3
|
<C style={{paddingHorizontal:8,paddingTop:4}}>
|
|
4
|
-
<C style={
|
|
4
|
+
<C style={I.detailInfoBar}>
|
|
5
5
|
|
|
6
6
|
<C style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:6,paddingBottom:8,borderBottomWidth:1,borderBottomColor:e.dividerColor}}>
|
|
7
7
|
<C style={{flexDirection:"row",alignItems:"center",gap:5,flexWrap:"wrap",flex:1}}>
|
|
8
8
|
|
|
9
|
-
<C style={[
|
|
9
|
+
<C style={[I.methodBadge,{backgroundColor:e.brandPurple,paddingHorizontal:8,paddingVertical:3.5,borderRadius:6,flexDirection:"row",alignItems:"center",gap:4}]}>
|
|
10
10
|
<Te size={10}color={e.white}/>
|
|
11
|
-
<T style={[
|
|
11
|
+
<T style={[I.methodBadgeText,{color:e.white,fontSize:10.5,fontFamily:V.interBold}]}>
|
|
12
12
|
{O}
|
|
13
13
|
</T>
|
|
14
14
|
</C>
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
<C style={[
|
|
18
|
-
<T style={[
|
|
17
|
+
<C style={[I.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={[I.chipText,{fontFamily:V.interBold,fontSize:9.5,color:o.appState==="foreground"?e.greenColor:e.amber700}]}>
|
|
19
19
|
{L}
|
|
20
20
|
</T>
|
|
21
21
|
</C>
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
{o.action&&<C style={[
|
|
25
|
-
<T style={[
|
|
24
|
+
{o.action&&<C style={[I.chip,{backgroundColor:`${e.purple}14`,borderColor:`${e.purple}30`,paddingHorizontal:6,paddingVertical:3,borderRadius:6}]}>
|
|
25
|
+
<T style={[I.chipText,{fontFamily:V.interBold,fontSize:9.5,color:e.purple}]}>
|
|
26
26
|
{o.action.toUpperCase()}
|
|
27
27
|
</T>
|
|
28
28
|
</C>}
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
<C style={[
|
|
31
|
+
<C style={[I.chip,{backgroundColor:`${e.brandPurple}10`,borderColor:`${e.brandPurple}25`,paddingHorizontal:7,paddingVertical:3,borderRadius:6,gap:4}]}>
|
|
32
32
|
<Z color={e.brandPurple}size={10}/>
|
|
33
|
-
<T style={[
|
|
34
|
-
{
|
|
33
|
+
<T style={[I.chipText,{color:e.brandPurple,fontFamily:V.interBold,fontSize:10.5}]}>
|
|
34
|
+
{v}
|
|
35
35
|
</T>
|
|
36
36
|
</C>
|
|
37
37
|
</C>
|
|
@@ -64,11 +64,12 @@ import j,{useMemo as M,useState as J}from"react";import{Image as K,ScrollView as
|
|
|
64
64
|
{o.body}
|
|
65
65
|
</T>:null}
|
|
66
66
|
{$?<C style={{flexDirection:"row",alignItems:"center",gap:4,marginTop:2}}>
|
|
67
|
+
<Ie size={11}color={e.brandPurple}/>
|
|
67
68
|
<T style={{fontSize:10,fontFamily:V.interBold,color:e.brandPurple}}>
|
|
68
|
-
|
|
69
|
+
{B("push.link","LINK")}:
|
|
69
70
|
</T>
|
|
70
71
|
<T style={{fontSize:10.5,fontFamily:V.interRegular,color:e.sky600}}numberOfLines={1}>
|
|
71
|
-
{
|
|
72
|
+
{M}
|
|
72
73
|
</T>
|
|
73
74
|
</C>:null}
|
|
74
75
|
</C>
|
|
@@ -91,9 +92,9 @@ import j,{useMemo as M,useState as J}from"react";import{Image as K,ScrollView as
|
|
|
91
92
|
<X size={12}color={e.white}/>
|
|
92
93
|
</C>
|
|
93
94
|
<T style={t.mockupAppName}>
|
|
94
|
-
{o.domain||"App Notification"}
|
|
95
|
+
{o.domain||B("push.appNotification","App Notification")}
|
|
95
96
|
</T>
|
|
96
|
-
<T style={t.mockupTime}>• now</T>
|
|
97
|
+
<T style={t.mockupTime}>• {B("push.now","now")}</T>
|
|
97
98
|
</C>
|
|
98
99
|
|
|
99
100
|
|
|
@@ -117,25 +118,30 @@ import j,{useMemo as M,useState as J}from"react";import{Image as K,ScrollView as
|
|
|
117
118
|
{o.channelId?<C style={t.tagPill}>
|
|
118
119
|
<T style={t.tagPillText}>Channel: {o.channelId}</T>
|
|
119
120
|
</C>:null}
|
|
120
|
-
{o.sound?<C style={t.tagPill}>
|
|
121
|
-
<
|
|
121
|
+
{o.sound?<C style={[t.tagPill,{flexDirection:"row",alignItems:"center",gap:4}]}>
|
|
122
|
+
<De size={11}color={e.violet600}/>
|
|
123
|
+
<T style={t.tagPillText}>{o.sound}</T>
|
|
122
124
|
</C>:null}
|
|
123
125
|
{o.badge!=null?<C style={t.tagPill}>
|
|
124
126
|
<T style={t.tagPillText}>Badge: {o.badge}</T>
|
|
125
127
|
</C>:null}
|
|
126
|
-
{o.priority?<C style={t.tagPill}>
|
|
127
|
-
<
|
|
128
|
+
{o.priority?<C style={[t.tagPill,{flexDirection:"row",alignItems:"center",gap:4}]}>
|
|
129
|
+
<Pe size={11}color={e.amber600}/>
|
|
130
|
+
<T style={t.tagPillText}>{o.priority}</T>
|
|
128
131
|
</C>:null}
|
|
129
132
|
</C>
|
|
130
133
|
</C>
|
|
131
134
|
|
|
132
135
|
|
|
133
136
|
{o.customDomainAttributes&&Object.keys(o.customDomainAttributes).length>0&&<C style={t.sectionCard}>
|
|
134
|
-
<
|
|
135
|
-
|
|
137
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:6,marginBottom:8}}>
|
|
138
|
+
<Re size={13}color={e.blue600}/>
|
|
139
|
+
<T style={t.sectionTitle}>{B("push.domainFields","Domain Specific Fields")}</T>
|
|
140
|
+
</C>
|
|
141
|
+
{Object.entries(o.customDomainAttributes).map(([S,D])=><C key={S}style={t.keyValRow}>
|
|
136
142
|
<T style={t.keyText}>{S}:</T>
|
|
137
143
|
<T style={t.valText}numberOfLines={2}>
|
|
138
|
-
{typeof
|
|
144
|
+
{typeof D=="object"?JSON.stringify(D):String(D)}
|
|
139
145
|
</T>
|
|
140
146
|
</C>)}
|
|
141
147
|
</C>}
|
|
@@ -145,7 +151,10 @@ import j,{useMemo as M,useState as J}from"react";import{Image as K,ScrollView as
|
|
|
145
151
|
|
|
146
152
|
{z==="headers"&&<P contentContainerStyle={t.scrollContent}>
|
|
147
153
|
<C style={t.sectionCard}>
|
|
148
|
-
<
|
|
154
|
+
<C style={{flexDirection:"row",alignItems:"center",gap:6,marginBottom:8}}>
|
|
155
|
+
<Fe size={13}color={e.slate600}/>
|
|
156
|
+
<T style={t.sectionTitle}>{B("push.deliveryMetadata","Delivery & Message Metadata")}</T>
|
|
157
|
+
</C>
|
|
149
158
|
<C style={t.keyValRow}>
|
|
150
159
|
<T style={t.keyText}>Message ID:</T>
|
|
151
160
|
<T style={t.valText}selectable>{o.id||"N/A"}</T>
|
|
@@ -164,7 +173,7 @@ import j,{useMemo as M,useState as J}from"react";import{Image as K,ScrollView as
|
|
|
164
173
|
</C>
|
|
165
174
|
<C style={t.keyValRow}>
|
|
166
175
|
<T style={t.keyText}>Timestamp:</T>
|
|
167
|
-
<T style={t.valText}>{
|
|
176
|
+
<T style={t.valText}>{v}</T>
|
|
168
177
|
</C>
|
|
169
178
|
<C style={t.keyValRow}>
|
|
170
179
|
<T style={t.keyText}>Channel ID:</T>
|
|
@@ -187,4 +196,4 @@ import j,{useMemo as M,useState as J}from"react";import{Image as K,ScrollView as
|
|
|
187
196
|
|
|
188
197
|
{z==="raw"&&<F data={o.rawPayload||o}fullHeight={!0}/>}
|
|
189
198
|
</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:
|
|
199
|
+
</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:e.black,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;
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import
|
|
2
|
-
<
|
|
3
|
-
</
|
|
1
|
+
import K,{useCallback as B,useMemo as F,useRef as ne,useState as U}from"react";import{FlatList as Ce,Platform as Se,Pressable as Pe,ScrollView as Te,StyleSheet as we,Text as Ie,TextInput as Be,View as C}from"react-native";import{useInspector as Re}from"./InspectorContext";import Le from"./PushCard";import A 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 G}from"../../styles/AppFonts";import{useTranslation as Ae}from"../../i18n";import{ClearIcon as Me,SearchIcon as Oe,TrashIcon as Ne,BellIcon as We,SunIcon as He,MoonIcon as $e,ExternalLinkIcon as De,CloudPushIcon as _e,BoltIcon as Qe}from"../NetworkIcons";const J=10,X=K.memo(()=>{const{t:x}=Ae(),{pushRecords:I,filteredPushRecords:P,pushSearch:r,setPushSearch:R,pushQuickFilter:T,setPushQuickFilter:M,setSelectedPush:O,clearAllPushLogs:Y,simulatePush:N,maxPushLogs:L}=Re(),Z=L||50,W=ne(null),[v,ee]=U(0),[H,$]=U(Z);K.useEffect(()=>{$(L||50),W.current?.scrollToOffset({offset:0,animated:!1})},[r,T,L]);const V=F(()=>P.slice(0,H),[P,H]),D=["salesforce","fcm","apns","deeplink","rich_media"],oe=B(()=>{const e=D[v%D.length];N(e),ee(o=>o+1)},[v,N]),_=F(()=>{let e=0,o=0,z=0;const w={};return I.forEach(E=>{const Q=(E.appState||"").toLowerCase();Q==="foreground"&&e++,Q==="background"&&o++,E.action==="opened"&&z++;const q=(E.source||"other").toLowerCase();w[q]=(w[q]||0)+1}),{all:I.length,foreground:e,background:o,opened:z,sources:w}},[I]),te=F(()=>{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=><He size={12}color={o}/>},{id:"background",label:"Background",color:t.darkOrange,icon:o=><$e size={12}color={o}/>},{id:"opened",label:"Opened",color:t.brandPurple,icon:o=><De size={12}color={o}/>}];return Object.entries(_.sources).forEach(([o,z])=>{z>0&&o!=="all"&&e.push({id:`source:${o}`,label:o.toUpperCase(),color:o==="salesforce"?t.sky600:t.brandPurple,icon:w=><_e size={12}color={w}/>})}),e},[_]),j=B(e=>{O(e)},[O]),re=B(({item:e,index:o})=><Ve index={o}distance={8}>
|
|
2
|
+
<Le item={e}searchStr={r}onPress={()=>j(e)}/>
|
|
3
|
+
</Ve>,[r,j]),le=B(e=>e.id||`push_${e.timestamp}`,[]);return<C style={{flex:1}}>
|
|
4
4
|
|
|
5
5
|
<C style={{marginTop:6}}>
|
|
6
6
|
<C style={S.toolbarRow}>
|
|
7
7
|
<C style={[S.searchContainer,{flex:1,marginRight:8,height:38}]}>
|
|
8
8
|
<C style={S.searchIcon}>
|
|
9
|
-
<
|
|
9
|
+
<Oe color={t.grayTextWeak}size={15}/>
|
|
10
10
|
</C>
|
|
11
|
-
<
|
|
12
|
-
{
|
|
13
|
-
<
|
|
14
|
-
<
|
|
15
|
-
</
|
|
11
|
+
<Be style={[S.searchInput,{paddingVertical:0}]}placeholder="Search notifications..."placeholderTextColor={t.grayTextWeak}value={r}onChangeText={R}autoCapitalize="none"autoCorrect={!1}returnKeyType="search"clearButtonMode="while-editing"/>
|
|
12
|
+
{r.length>0&&Se.OS==="android"&&<C style={{position:"absolute",right:8,top:0,bottom:0,justifyContent:"center"}}>
|
|
13
|
+
<Pe onPress={()=>R("")}hitSlop={10}style={S.clearBtn}>
|
|
14
|
+
<Me color={t.grayTextWeak}size={13}/>
|
|
15
|
+
</Pe>
|
|
16
16
|
</C>}
|
|
17
17
|
</C>
|
|
18
18
|
|
|
19
19
|
<C style={S.toolbarRight}>
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
</
|
|
20
|
+
<A style={[S.toolbarBtn,{backgroundColor:`${t.brandPurple}14`,borderColor:`${t.brandPurple}30`}]}onPress={oe}hitSlop={6}accessibilityRole="button"accessibilityLabel="Simulate incoming push notification">
|
|
21
|
+
<Qe color={t.brandPurple}size={15}/>
|
|
22
|
+
</A>
|
|
23
23
|
|
|
24
|
-
{
|
|
25
|
-
<
|
|
26
|
-
</
|
|
24
|
+
{I.length>0&&<A style={[S.toolbarBtn,{borderColor:`${t.errorColor}38`,backgroundColor:`${t.errorColor}0F`}]}onPress={Y}hitSlop={6}accessibilityRole="button"accessibilityLabel="Clear all push notification history">
|
|
25
|
+
<Ne color={t.errorColor}size={15}/>
|
|
26
|
+
</A>}
|
|
27
27
|
</C>
|
|
28
28
|
</C>
|
|
29
29
|
</C>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<C style={k.carouselWrapper}>
|
|
33
|
-
<
|
|
34
|
-
{
|
|
35
|
-
{
|
|
36
|
-
<
|
|
37
|
-
{
|
|
38
|
-
</
|
|
39
|
-
</
|
|
40
|
-
</
|
|
33
|
+
<Te horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={k.carouselContent}>
|
|
34
|
+
{te.map(e=>{const o=T===e.id;return<A key={e.id}onPress={()=>M(e.id)}style={[k.filterPill,o&&{backgroundColor:e.color,borderColor:e.color}]}>
|
|
35
|
+
{e.icon?e.icon(o?t.white:e.color):null}
|
|
36
|
+
<Ie style={[k.filterPillText,o&&{color:t.white}]}>
|
|
37
|
+
{e.label}
|
|
38
|
+
</Ie>
|
|
39
|
+
</A>})}
|
|
40
|
+
</Te>
|
|
41
41
|
</C>
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
<
|
|
45
|
-
</C>}),k=
|
|
44
|
+
<Ce ref={W}data={V}renderItem={re}keyExtractor={le}contentContainerStyle={k.listContent}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}showsVerticalScrollIndicator={!1}ListEmptyComponent={<Ee isSearch={!!(r||T!=="all")}searchQuery={r}customTitle={r||T!=="all"?x("push.noMatching","No matching push notifications"):x("push.noNotifications","No push notifications captured yet")}customSub={r||T!=="all"?x("push.adjustSearchFilter","Try adjusting your search query or filter chips."):x("push.noNotificationsDesc","Incoming or opened push payloads from any domain (Salesforce, FCM, APNs, etc.) will appear here automatically.")}onClearSearch={()=>{R(""),M("all")}}showReload={!1}/>}ListFooterComponent={P.length>0?<Fe count={V.length}totalCount={P.length}label="push notifications"loadMoreStep={J}hasMore={V.length<P.length}onLoadMore={()=>$(e=>e+J)}/>:null}/>
|
|
45
|
+
</C>}),k=we.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:G.interMedium,color:t.primaryBlack},countBadge:{paddingHorizontal:5,paddingVertical:1,borderRadius:10},countBadgeText:{fontSize:9.5,fontFamily:G.interBold},listContent:{padding:8,paddingBottom:24}});X.displayName="PushTab";export default X;
|