react-native-inapp-inspector 2.4.1 → 2.5.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.
- 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 +605 -23
- 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/capture.d.ts +2 -0
- package/dist/commonjs/capture.js +1 -1
- package/dist/commonjs/components/AnalyticsDetail.js +23 -23
- package/dist/commonjs/components/AnalyticsEventCard.js +1 -1
- package/dist/commonjs/components/AnalyticsGraph.js +44 -44
- 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 +5 -3
- package/dist/commonjs/components/BrandCircleIcon.js +28 -28
- 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 +6 -6
- package/dist/commonjs/components/Inspector/ConfirmationModal.d.ts +13 -0
- package/dist/commonjs/components/Inspector/ConfirmationModal.js +30 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.js +12 -12
- package/dist/commonjs/components/Inspector/CrashTab.js +44 -9
- package/dist/commonjs/components/Inspector/DebuggingTab.js +17 -17
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +1 -1
- package/dist/commonjs/components/Inspector/FabLauncher.js +30 -33
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +2 -2
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +54 -0
- package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
- package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.js +234 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +137 -127
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.d.ts +15 -0
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.js +172 -0
- package/dist/commonjs/components/Inspector/MainScreen.js +55 -35
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +40 -35
- package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +36 -0
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +341 -135
- 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 +41 -32
- package/dist/commonjs/components/Inspector/PushTab.js +12 -12
- package/dist/commonjs/components/Inspector/ReduxDetail.js +32 -32
- package/dist/commonjs/components/Inspector/ReduxTab.js +10 -8
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +43 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +287 -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 +327 -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 +39 -37
- 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 +50 -48
- package/dist/commonjs/components/LogCard.d.ts +3 -2
- package/dist/commonjs/components/LogCard.js +27 -25
- package/dist/commonjs/components/LogSyntaxHighlighter.js +5 -5
- package/dist/commonjs/components/ModuleErrorBoundary.js +5 -5
- package/dist/commonjs/components/NetworkIcons.d.ts +42 -0
- package/dist/commonjs/components/NetworkIcons.js +139 -6
- 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/crash.d.ts +1 -1
- package/dist/commonjs/crash.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.d.ts +2 -1
- package/dist/commonjs/customHooks/crashHandler.js +7 -7
- package/dist/commonjs/customHooks/socketLogger.d.ts +26 -0
- package/dist/commonjs/customHooks/socketLogger.js +2 -0
- package/dist/commonjs/editor.d.ts +13 -0
- package/dist/commonjs/editor.js +1 -0
- package/dist/commonjs/helpers/index.d.ts +1 -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/helpers/telemetry.js +1 -1
- 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 +16 -13
- package/dist/commonjs/index.js +5 -4
- package/dist/commonjs/native/NativeInspector.d.ts +4 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +4 -0
- package/dist/commonjs/socket.d.ts +4 -0
- package/dist/commonjs/socket.js +1 -0
- package/dist/commonjs/styles/AppColors.d.ts +42 -2
- package/dist/commonjs/styles/AppColors.js +1 -1
- package/dist/commonjs/styles/common.js +1 -1
- package/dist/commonjs/styles/index.d.ts +30 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/editor.d.ts +96 -0
- package/dist/commonjs/types/editor.js +1 -0
- package/dist/commonjs/types/enums.d.ts +40 -0
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +143 -1
- package/dist/esm/capture.d.ts +2 -0
- package/dist/esm/capture.js +1 -1
- package/dist/esm/components/AnalyticsDetail.js +31 -31
- package/dist/esm/components/AnalyticsEventCard.js +1 -1
- package/dist/esm/components/AnalyticsGraph.js +74 -74
- 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/BrandCircleIcon.js +70 -70
- 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 +24 -24
- package/dist/esm/components/Inspector/ConfirmationModal.d.ts +13 -0
- package/dist/esm/components/Inspector/ConfirmationModal.js +30 -0
- package/dist/esm/components/Inspector/ConsoleTab.js +48 -48
- package/dist/esm/components/Inspector/CrashTab.js +203 -168
- package/dist/esm/components/Inspector/DebuggingTab.js +29 -29
- package/dist/esm/components/Inspector/DeviceInfoTab.js +75 -75
- package/dist/esm/components/Inspector/FabLauncher.js +57 -60
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +7 -7
- package/dist/esm/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
- package/dist/esm/components/Inspector/FloatingCaptureWidget.js +54 -0
- package/dist/esm/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
- package/dist/esm/components/Inspector/GlobalCrashScreenModal.js +234 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +162 -152
- package/dist/esm/components/Inspector/LanguageSelectorModal.d.ts +15 -0
- package/dist/esm/components/Inspector/LanguageSelectorModal.js +172 -0
- package/dist/esm/components/Inspector/MainScreen.js +130 -110
- package/dist/esm/components/Inspector/MediaGalleryTab.js +83 -78
- package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +36 -0
- package/dist/esm/components/Inspector/MediaPreviewModal.js +345 -139
- package/dist/esm/components/Inspector/NetworkTab.js +130 -130
- 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 +45 -36
- package/dist/esm/components/Inspector/PushTab.js +23 -23
- package/dist/esm/components/Inspector/ReduxDetail.js +42 -42
- package/dist/esm/components/Inspector/ReduxTab.js +20 -18
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +43 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +526 -378
- 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 +327 -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 +139 -137
- 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 +66 -64
- package/dist/esm/components/LogCard.d.ts +3 -2
- package/dist/esm/components/LogCard.js +57 -55
- package/dist/esm/components/LogSyntaxHighlighter.js +5 -5
- package/dist/esm/components/ModuleErrorBoundary.js +23 -23
- package/dist/esm/components/NetworkIcons.d.ts +42 -0
- package/dist/esm/components/NetworkIcons.js +139 -6
- 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/crash.d.ts +1 -1
- package/dist/esm/crash.js +1 -1
- package/dist/esm/customHooks/crashHandler.d.ts +2 -1
- package/dist/esm/customHooks/crashHandler.js +7 -7
- package/dist/esm/customHooks/socketLogger.d.ts +26 -0
- package/dist/esm/customHooks/socketLogger.js +2 -0
- package/dist/esm/editor.d.ts +13 -0
- package/dist/esm/editor.js +1 -0
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +4 -4
- 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/helpers/telemetry.js +1 -1
- 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 +16 -13
- package/dist/esm/index.js +8 -7
- package/dist/esm/native/NativeInspector.d.ts +4 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +4 -0
- package/dist/esm/socket.d.ts +4 -0
- package/dist/esm/socket.js +1 -0
- package/dist/esm/styles/AppColors.d.ts +42 -2
- package/dist/esm/styles/AppColors.js +1 -1
- package/dist/esm/styles/common.js +1 -1
- package/dist/esm/styles/index.d.ts +30 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/editor.d.ts +96 -0
- package/dist/esm/types/editor.js +1 -0
- package/dist/esm/types/enums.d.ts +40 -0
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/interfaces.d.ts +143 -1
- package/editor.d.ts +1 -0
- package/editor.js +1 -0
- package/ios/NetworkInspectorModule.mm +531 -12
- package/package.json +213 -2
- package/react-native-inapp-inspector.podspec +1 -1
- package/src/native/NativeInspector.ts +65 -4
- package/src/native/NativeNetworkInspector.ts +4 -0
|
@@ -1,153 +1,153 @@
|
|
|
1
|
-
import
|
|
2
|
-
<
|
|
3
|
-
</
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
</
|
|
7
|
-
<
|
|
8
|
-
{
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
</
|
|
13
|
-
<
|
|
14
|
-
<
|
|
15
|
-
{
|
|
16
|
-
</
|
|
17
|
-
<
|
|
18
|
-
Showing {
|
|
19
|
-
</
|
|
20
|
-
</
|
|
21
|
-
</
|
|
1
|
+
import j,{useCallback as se,useMemo as H,useRef as qe}from"react";import{FlatList as De,Pressable as He,ScrollView as We,Text as V,TextInput as Ge,View as S}from"react-native";import{useInspector as _e}from"./InspectorContext";import O from"../TouchableScale";import Te from"../AnimatedEntrance";import Qe from"../DomainHeader";import Ue from"../LogCard";import Ke from"../EmptyState";import Xe from"../EndOfListFooter";import Je from"./NetworkFilterModal";import b from"../../styles";import{AppColors as o}from"../../styles/AppColors";import{AppFonts as I}from"../../styles/AppFonts";import{METHOD_COLORS as ze}from"../../constants";import{useTranslation as Ye}from"../../i18n";import{SearchIcon as Ze,ClearIcon as So,TrashIcon as Co,SortArrowIcon as To,FilterIcon as Vo,ChevronIcon as Io,CheckIcon as Fo,CircleCheckIcon as Ro,CircleXIcon as Lo,LayersIcon as Ve,ClockIcon as Bo,RequestIcon as Po,ResponseIcon as Eo,AtomIcon as Mo}from"../NetworkIcons";const No=j.memo(()=>{const{groupedData:Q,loadMoreSection:ne,search:F,setSearch:U,setSearchScope:de,quickFilter:K,setQuickFilter:le,handleDelete:Ie,isGroupByPageEnabled:k,setIsGroupByPageEnabled:ke,selectedLogs:X,sortOrder:Fe,setSortOrder:J,statusFilters:R,setStatusFilters:v,methodFilters:L,setMethodFilters:W,latencyFilter:$,setLatencyFilter:Y,protocolFilter:A,setProtocolFilter:Z,networkSortBy:q,setNetworkSortBy:ee,filteredLogs:E,logs:G,toggleSectionFilter:ce,toggleSectionCollapse:ue,minStart:ge,totalRange:pe,newLogIds:he,toggleSelect:me,setSelected:ye,maxNetworkLogs:ae}=_e(),{t:oe}=Ye(),Re=qe(null),[Le,fe]=j.useState(!1),[we,Se]=j.useState(!1),[te,Ce]=j.useState(ae||50);j.useEffect(()=>{Ce(ae||50)},[F,K,ae]);const Be=H(()=>k?Q:Q.slice(0,te),[k,Q,te]),Pe=se(e=>e?.id?String(e.id):"",[]),M=H(()=>R.size>0&&!R.has("all")||L.size>0&&!L.has("all")||$!=="all"||A!=="all"||q!=="time_desc",[R,L,$,A,q]),Ee=H(()=>{let e=0;return R.size>0&&!R.has("all")&&(e+=R.size),L.size>0&&!L.has("all")&&(e+=L.size),$!=="all"&&e++,A!=="all"&&e++,q!=="time_desc"&&e++,e},[R,L,$,A,q]),Me=H(()=>({statusCodes:R.size>0?new Set(R):new Set(["all"]),methods:L.size>0?new Set(L):new Set(["all"]),latency:$,protocol:A,sortBy:q}),[R,L,$,A,q]),Ne=se(e=>{e.statusCodes.has("all")||e.statusCodes.size===0?v(new Set):v(new Set(e.statusCodes)),e.methods.has("all")||e.methods.size===0?W(new Set):W(new Set([...e.methods].map(T=>T))),Y(e.latency||"all"),Z(e.protocol||"all"),ee(e.sortBy||"time_desc"),e.sortBy==="time_asc"?J("oldest"):J("newest")},[v,W,Y,Z,ee,J]),B=H(()=>{let e=0,T=0,z=0,x=0,_=0,re=0;return G.forEach(C=>{const N=typeof C.status=="number"?C.status:parseInt(String(C.status),10);C.status===0||C.status==null||!isNaN(N)&&N>=400?e++:!isNaN(N)&&N>=200&&N<400&&T++,(C.duration||0)>=500&&z++;const P=(C.method||"").toUpperCase();P==="POST"&&x++,P==="GET"&&_++;const ie=(C.url||"").toLowerCase(),D=(C.client||"").toLowerCase();(ie.includes("graphql")||D.includes("graphql")||D.includes("apollo"))&&re++}),{all:G.length,errors:e,success:T,slow:z,post:x,get:_,graphql:re}},[G]),Oe=H(()=>[{id:"all",label:"All",count:B.all,color:o.purple},{id:"errors",label:"Errors",count:B.errors,color:o.errorColor},{id:"success",label:"2xx OK",count:B.success,color:o.greenColor},{id:"slow",label:"Slow >500ms",count:B.slow,color:o.warningIconGold},{id:"POST",label:"POST",count:B.post,color:ze.POST||o.blue500},{id:"GET",label:"GET",count:B.get,color:ze.GET||o.emerald500},{id:"graphql",label:"GraphQL",count:B.graphql,color:o.graphqlPink}],[B]),$e=se(({item:e,index:T})=>{if(e.type==="header")return<Te index={T}distance={8}>
|
|
2
|
+
<Qe pageName={e.pageName}color={e.color}stats={e.stats}activeFilters={e.activeFilters}onToggleFilter={ce}isCollapsed={e.isCollapsed}onToggleCollapse={ue}isFirst={e.isFirst}timestamp={e.timestamp}/>
|
|
3
|
+
</Te>;if(e.type==="loadMore"){const{pageName:re,color:C,remainingCount:N,totalCount:P,loadedCount:ie,loadMoreStep:D,hasMore:Ae}=e;return<S style={[b.treeNodeRow,b.treeNodeRowLast]}>
|
|
4
|
+
<S style={b.treeLines}>
|
|
5
|
+
<S style={[b.modernTreeLine,{borderColor:C},b.modernTreeLineLast]}/>
|
|
6
|
+
</S>
|
|
7
|
+
<S style={b.treeCardWrapper}>
|
|
8
|
+
{Ae?<O onPress={()=>ne(re,D||10)}hitSlop={6}style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:9,paddingHorizontal:12,marginVertical:3,marginRight:2,borderRadius:10,backgroundColor:`${C}14`,borderWidth:1.5,borderColor:`${C}40`,shadowColor:C,shadowOffset:{width:0,height:1.5},shadowOpacity:.1,shadowRadius:3,elevation:2}}>
|
|
9
|
+
<S style={{flexDirection:"row",alignItems:"center",gap:8}}>
|
|
10
|
+
<S style={{width:22,height:22,borderRadius:11,backgroundColor:C,alignItems:"center",justifyContent:"center",shadowColor:C,shadowOffset:{width:0,height:1},shadowOpacity:.25,shadowRadius:2,elevation:1}}>
|
|
11
|
+
<Io color={o.white}size={9}direction="down"/>
|
|
12
|
+
</S>
|
|
13
|
+
<S>
|
|
14
|
+
<V style={{fontFamily:I.interBold,fontSize:12,color:C}}>
|
|
15
|
+
{oe("footer.loadMoreRequests",{count:D,defaultValue:`Load ${D} More Requests`})}
|
|
16
|
+
</V>
|
|
17
|
+
<V style={{fontFamily:I.interRegular,fontSize:9.5,color:o.grayTextWeak,marginTop:1}}>
|
|
18
|
+
Showing {ie} of {P} requests
|
|
19
|
+
</V>
|
|
20
|
+
</S>
|
|
21
|
+
</S>
|
|
22
22
|
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
+{
|
|
26
|
-
</
|
|
27
|
-
<
|
|
23
|
+
<S style={{flexDirection:"row",alignItems:"center",backgroundColor:`${C}25`,paddingHorizontal:8,paddingVertical:4,borderRadius:8,borderWidth:1,borderColor:`${C}40`,gap:3}}>
|
|
24
|
+
<V style={{fontFamily:I.interBold,fontSize:10.5,color:C}}>
|
|
25
|
+
+{N}
|
|
26
|
+
</V>
|
|
27
|
+
<V style={{fontFamily:I.interRegular,fontSize:9,color:C}}>
|
|
28
28
|
more
|
|
29
|
-
</
|
|
30
|
-
</
|
|
31
|
-
</O>:<
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
</
|
|
36
|
-
<
|
|
37
|
-
{
|
|
38
|
-
</
|
|
39
|
-
</
|
|
29
|
+
</V>
|
|
30
|
+
</S>
|
|
31
|
+
</O>:<S style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:7,paddingHorizontal:11,marginVertical:3,marginRight:2,borderRadius:9,backgroundColor:`${C}0A`,borderWidth:1,borderColor:`${C}25`}}>
|
|
32
|
+
<S style={{flexDirection:"row",alignItems:"center",gap:7}}>
|
|
33
|
+
<S style={{width:17,height:17,borderRadius:8.5,backgroundColor:`${C}25`,alignItems:"center",justifyContent:"center"}}>
|
|
34
|
+
<Fo color={C}size={8}/>
|
|
35
|
+
</S>
|
|
36
|
+
<V style={{fontFamily:I.interMedium,fontSize:11,color:o.grayTextStrong}}>
|
|
37
|
+
{oe("footer.allLoaded",{count:P,defaultValue:`All ${P} requests loaded`})}
|
|
38
|
+
</V>
|
|
39
|
+
</S>
|
|
40
40
|
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
{
|
|
44
|
-
</
|
|
45
|
-
</
|
|
46
|
-
</
|
|
47
|
-
</
|
|
48
|
-
</
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
</
|
|
56
|
-
</
|
|
57
|
-
<
|
|
41
|
+
<S style={{backgroundColor:`${C}18`,paddingHorizontal:7,paddingVertical:2,borderRadius:6}}>
|
|
42
|
+
<V style={{fontFamily:I.interBold,fontSize:9.5,color:C}}>
|
|
43
|
+
{P}/{P}
|
|
44
|
+
</V>
|
|
45
|
+
</S>
|
|
46
|
+
</S>}
|
|
47
|
+
</S>
|
|
48
|
+
</S>}const{log:z,isLast:x,color:_}=e;return<Te index={T}distance={8}style={k?[b.treeNodeRow,x&&b.treeNodeRowLast]:{marginBottom:5,marginHorizontal:5}}>
|
|
49
|
+
{k&&<S style={b.treeLines}>
|
|
50
|
+
<S style={[b.modernTreeLine,{borderColor:_},x&&b.modernTreeLineLast]}/>
|
|
51
|
+
{!x&&<S style={[b.modernTreeBranch,{borderColor:_}]}/>}
|
|
52
|
+
</S>}
|
|
53
|
+
<S style={k?b.treeCardWrapper:{flex:1}}>
|
|
54
|
+
<Ue item={z}isSelected={X.has(z.id)}onToggleSelect={me}onPress={()=>{ye(z)}}timelineMinStart={ge}timelineTotalRange={pe}isNew={he.has(z.id)}searchStr={F}/>
|
|
55
|
+
</S>
|
|
56
|
+
</Te>},[k,ge,pe,he,X,me,F,ce,ue,ne,ye,oe]);return<S style={{flex:1}}>
|
|
57
|
+
<S style={{marginTop:6}}>
|
|
58
58
|
|
|
59
|
-
<
|
|
60
|
-
<
|
|
61
|
-
<
|
|
62
|
-
<
|
|
59
|
+
<S style={b.toolbarRow}>
|
|
60
|
+
<S style={[b.searchContainer,we&&{borderColor:o.purple,borderWidth:1.5}]}>
|
|
61
|
+
<Ze color={we?o.purple:o.grayTextWeak}size={15}/>
|
|
62
|
+
<Ge placeholder="Search URL, status, method, headers, body..."placeholderTextColor={o.grayTextWeak}value={F}onChangeText={U}onFocus={()=>Se(!0)}onBlur={()=>Se(!1)}style={b.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
63
63
|
|
|
64
|
-
{F.length>0&&<
|
|
65
|
-
<
|
|
66
|
-
<
|
|
67
|
-
{
|
|
68
|
-
</
|
|
69
|
-
</
|
|
70
|
-
<
|
|
71
|
-
<
|
|
72
|
-
</
|
|
73
|
-
</
|
|
74
|
-
</
|
|
64
|
+
{F.length>0&&<S style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
65
|
+
<S style={{backgroundColor:`${o.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
66
|
+
<V style={{color:o.purple,fontSize:9.5,fontFamily:I.interBold}}>
|
|
67
|
+
{E.length}
|
|
68
|
+
</V>
|
|
69
|
+
</S>
|
|
70
|
+
<He onPress={()=>U("")}hitSlop={10}style={b.clearBtn}>
|
|
71
|
+
<So color={o.grayTextWeak}size={13}/>
|
|
72
|
+
</He>
|
|
73
|
+
</S>}
|
|
74
|
+
</S>
|
|
75
75
|
|
|
76
|
-
<
|
|
77
|
-
<O style={[b.toolbarBtn,{borderColor:`${
|
|
78
|
-
<
|
|
79
|
-
{
|
|
80
|
-
<
|
|
81
|
-
{
|
|
82
|
-
</
|
|
83
|
-
</
|
|
76
|
+
<S style={b.toolbarRight}>
|
|
77
|
+
<O style={[b.toolbarBtn,{borderColor:`${o.errorColor}38`,backgroundColor:`${o.errorColor}0F`}]}onPress={Ie}hitSlop={6}>
|
|
78
|
+
<Co color={o.errorColor}size={15}/>
|
|
79
|
+
{X.size>0&&<S style={b.trashBadge}>
|
|
80
|
+
<V style={b.trashBadgeText}>
|
|
81
|
+
{X.size}
|
|
82
|
+
</V>
|
|
83
|
+
</S>}
|
|
84
84
|
</O>
|
|
85
85
|
|
|
86
|
-
<O style={b.toolbarBtn}onPress={()=>
|
|
87
|
-
<
|
|
86
|
+
<O style={[b.toolbarBtn,k&&{borderColor:o.purple,backgroundColor:`${o.purple}15`}]}onPress={()=>ke(e=>!e)}hitSlop={6}accessibilityLabel={k?"Page Accordion Grouping Enabled (Tap for Plain List)":"Plain List Enabled (Tap for Page Accordion)"}accessibilityRole="button">
|
|
87
|
+
<Ve color={k?o.purple:o.grayTextStrong}size={16}/>
|
|
88
|
+
{k&&<S style={b.activeFilterDot}/>}
|
|
88
89
|
</O>
|
|
89
90
|
|
|
90
|
-
<O style={
|
|
91
|
-
<
|
|
92
|
-
{(x.size>0||V.size>0)&&<C style={b.activeFilterDot}/>}
|
|
91
|
+
<O style={b.toolbarBtn}onPress={()=>J(e=>e==="newest"?"oldest":"newest")}hitSlop={10}>
|
|
92
|
+
<To direction={Fe==="newest"?"down":"up"}color={o.grayTextStrong}size={18}/>
|
|
93
93
|
</O>
|
|
94
|
-
</
|
|
95
|
-
</
|
|
94
|
+
</S>
|
|
95
|
+
</S>
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
<
|
|
99
|
-
<
|
|
100
|
-
{
|
|
101
|
-
<
|
|
102
|
-
{
|
|
103
|
-
{
|
|
104
|
-
{
|
|
105
|
-
{
|
|
106
|
-
{
|
|
107
|
-
{
|
|
108
|
-
{
|
|
109
|
-
<
|
|
110
|
-
{
|
|
111
|
-
</
|
|
112
|
-
<
|
|
113
|
-
<
|
|
114
|
-
{
|
|
115
|
-
</
|
|
116
|
-
</
|
|
117
|
-
</
|
|
98
|
+
<S style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:8,gap:6}}>
|
|
99
|
+
<We horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
100
|
+
{Oe.map(e=>{const T=K===e.id,z=e.color||o.purple,x=T?o.white:z;return<O key={e.id}onPress={()=>{le(T?"all":e.id)}}>
|
|
101
|
+
<S style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:T?z:`${z}12`,borderWidth:1,borderColor:T?z:`${z}30`,gap:5}}>
|
|
102
|
+
{e.id==="all"&&<Ve size={11}color={x}/>}
|
|
103
|
+
{e.id==="errors"&&<Lo size={11}color={x}/>}
|
|
104
|
+
{e.id==="success"&&<Ro size={11}color={x}/>}
|
|
105
|
+
{e.id==="slow"&&<Bo size={11}color={x}/>}
|
|
106
|
+
{e.id==="POST"&&<Po size={11}color={x}/>}
|
|
107
|
+
{e.id==="GET"&&<Eo size={11}color={x}/>}
|
|
108
|
+
{e.id==="graphql"&&<Mo size={11}color={x}/>}
|
|
109
|
+
<V style={{fontFamily:I.interBold,fontSize:10.5,color:T?o.white:o.primaryBlack}}>
|
|
110
|
+
{e.label}
|
|
111
|
+
</V>
|
|
112
|
+
<S style={{backgroundColor:T?"rgba(255,255,255,0.25)":`${z}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8}}>
|
|
113
|
+
<V style={{fontFamily:I.interBold,fontSize:9,color:T?o.white:z}}>
|
|
114
|
+
{e.count}
|
|
115
|
+
</V>
|
|
116
|
+
</S>
|
|
117
|
+
</S>
|
|
118
118
|
</O>})}
|
|
119
|
-
</
|
|
119
|
+
</We>
|
|
120
120
|
|
|
121
|
-
<O onPress={()=>
|
|
122
|
-
<
|
|
123
|
-
<
|
|
124
|
-
<
|
|
125
|
-
More Filters
|
|
126
|
-
</
|
|
127
|
-
{
|
|
128
|
-
<
|
|
129
|
-
{
|
|
130
|
-
</
|
|
131
|
-
</
|
|
132
|
-
</
|
|
121
|
+
<O onPress={()=>fe(!0)}style={{flexShrink:0}}>
|
|
122
|
+
<S style={{flexDirection:"row",alignItems:"center",paddingHorizontal:10,paddingVertical:4.5,borderRadius:8,backgroundColor:M?`${o.purple}20`:o.grayBackground,borderWidth:1,borderColor:M?o.purple:o.grayBorderSecondary,gap:5,shadowColor:o.black,shadowOpacity:.04,shadowRadius:2,shadowOffset:{width:0,height:1},elevation:1}}>
|
|
123
|
+
<Vo size={11}color={M?o.purple:o.grayText}/>
|
|
124
|
+
<V style={{fontFamily:I.interBold,fontSize:10.5,color:M?o.purple:o.grayText}}>
|
|
125
|
+
{oe("network.moreFilters","More Filters")}
|
|
126
|
+
</V>
|
|
127
|
+
{M&&<S style={{backgroundColor:o.purple,paddingHorizontal:4.5,paddingVertical:1,borderRadius:6}}>
|
|
128
|
+
<V style={{fontFamily:I.interBold,fontSize:8.5,color:o.white}}>
|
|
129
|
+
{Ee}
|
|
130
|
+
</V>
|
|
131
|
+
</S>}
|
|
132
|
+
</S>
|
|
133
133
|
</O>
|
|
134
|
-
</
|
|
134
|
+
</S>
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
{(
|
|
138
|
-
<
|
|
139
|
-
Showing {
|
|
140
|
-
</
|
|
141
|
-
<O onPress={()=>{
|
|
142
|
-
<
|
|
137
|
+
{(K!=="all"||F.trim().length>0||M||E.length!==G.length)&&<S style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginHorizontal:8,marginBottom:8,paddingHorizontal:8,paddingVertical:5.5,backgroundColor:`${o.purple}10`,borderRadius:8,borderWidth:1,borderColor:`${o.purple}25`}}>
|
|
138
|
+
<V style={{fontFamily:I.interMedium,fontSize:10.5,color:o.purple}}>
|
|
139
|
+
Showing {E.length} of {G.length} requests
|
|
140
|
+
</V>
|
|
141
|
+
<O onPress={()=>{U(""),le("all"),v(new Set),W(new Set),Y("all"),Z("all"),ee("time_desc"),de("all")}}>
|
|
142
|
+
<V style={{fontFamily:I.interBold,fontSize:10.5,color:o.errorColor}}>
|
|
143
143
|
Clear All Filters
|
|
144
|
-
</
|
|
144
|
+
</V>
|
|
145
145
|
</O>
|
|
146
|
-
</
|
|
147
|
-
</
|
|
146
|
+
</S>}
|
|
147
|
+
</S>
|
|
148
148
|
|
|
149
|
-
|
|
149
|
+
<De ref={Re}data={Be}keyExtractor={Pe}renderItem={$e}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}showsVerticalScrollIndicator={!1}nestedScrollEnabled={!0}ListEmptyComponent={<Ke isSearch={F.length>0||M||K!=="all"}searchQuery={F}customTitle={F.length>0?"No matching API requests":"No network activity"}onClearSearch={()=>{U(""),v(new Set),W(new Set),Y("all"),Z("all"),ee("time_desc"),le("all"),de("all")}}/>}ListFooterComponent={Q.length>0?<Xe count={k?E.length:Math.min(te,E.length)}totalCount={E.length}label="requests"hasMore={!k&&E.length>te}loadMoreStep={30}onLoadMore={()=>Ce(e=>e+30)}/>:null}style={{flex:1}}contentContainerStyle={[b.listContent,{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
150
150
|
|
|
151
151
|
|
|
152
|
-
<
|
|
153
|
-
</
|
|
152
|
+
<Je visible={Le}onClose={()=>fe(!1)}filters={Me}onApply={Ne}searchQuery={F}/>
|
|
153
|
+
</S>});export default No;
|
|
@@ -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:8,paddingTop:8,paddingBottom:6,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:4,gap:4.5,minWidth:0,overflow:"hidden"},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},serialNumber:{fontFamily:S.interBold,color:e.grayTextWeak,fontSize:10},methodBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:5,alignItems:"center",justifyContent:"center"},methodBadgeText:{fontFamily:S.interBold,fontSize:9.5,lineHeight:12,letterSpacing:.5,color:e.white},chip:{paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4,borderWidth:1},chipText:{fontFamily:S.interBold,fontSize:9,lineHeight:12},statusPill:{flexDirection:"row",alignItems:"center",gap:3.5,paddingHorizontal:6,paddingVertical:2,borderRadius:6,borderWidth:1,flexShrink:0},statusPillText:{fontFamily:S.interBold,fontSize:9.5,lineHeight:12},messageBox:{backgroundColor:e.grayBackground,borderRadius:7,borderWidth:1,borderColor:e.dividerColor,paddingHorizontal:7,paddingVertical:5,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:4},footerLeft:{flexDirection:"row",alignItems:"center",gap:4.5,flex:1,minWidth:0,overflow:"hidden"},footerRight:{flexDirection:"row",alignItems:"center",gap:4,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);
|