react-native-inapp-inspector 2.3.25 → 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.
- package/README.md +26 -5
- package/dist/commonjs/components/AnalyticsDetail.js +9 -6
- package/dist/commonjs/components/AppHeaderLogo.js +4 -6
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +11 -15
- package/dist/commonjs/components/Inspector/ConsoleTab.js +11 -14
- package/dist/commonjs/components/Inspector/CrashDetail.js +7 -6
- package/dist/commonjs/components/Inspector/CrashTab.js +14 -14
- package/dist/commonjs/components/Inspector/DebuggingTab.js +6 -6
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +77 -43
- package/dist/commonjs/components/Inspector/FabLauncher.js +8 -9
- package/dist/commonjs/components/Inspector/InspectorHeader.js +93 -70
- package/dist/commonjs/components/Inspector/LogDetail.js +10 -7
- package/dist/commonjs/components/Inspector/MainScreen.js +67 -29
- package/dist/commonjs/components/Inspector/NetworkDetail.js +29 -28
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/NetworkTab.js +87 -85
- package/dist/commonjs/components/Inspector/PushCard.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushCard.js +89 -0
- package/dist/commonjs/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushDetail.js +190 -0
- package/dist/commonjs/components/Inspector/PushTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/PushTab.js +45 -0
- package/dist/commonjs/components/Inspector/ReduxDetail.js +16 -13
- package/dist/commonjs/components/Inspector/ReduxTab.js +13 -23
- package/dist/commonjs/components/Inspector/SettingsPanel.js +253 -105
- package/dist/commonjs/components/Inspector/StorageTab.js +35 -35
- package/dist/commonjs/components/Inspector/TabBar.js +9 -8
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -2
- package/dist/commonjs/components/JsonViewer.js +77 -90
- package/dist/commonjs/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/commonjs/components/ModuleErrorBoundary.js +33 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +3 -3
- package/dist/commonjs/components/NetworkIcons.js +10 -6
- package/dist/commonjs/components/SegmentedTabs.d.ts +4 -1
- package/dist/commonjs/components/SegmentedTabs.js +12 -8
- package/dist/commonjs/components/ShareButton.d.ts +11 -0
- package/dist/commonjs/components/ShareButton.js +6 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.js +4 -4
- package/dist/commonjs/customHooks/networkLogger.js +1 -1
- package/dist/commonjs/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/commonjs/customHooks/pushNotificationLogger.js +1 -0
- package/dist/commonjs/helpers/memoryManager.d.ts +2 -1
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.d.ts +13 -0
- package/dist/commonjs/helpers/shareFormatter.js +7 -0
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/index.d.ts +5 -2
- package/dist/commonjs/index.js +4 -4
- package/dist/commonjs/push.d.ts +4 -0
- package/dist/commonjs/push.js +1 -0
- package/dist/commonjs/types/enums.d.ts +30 -0
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/index.d.ts +10 -0
- package/dist/commonjs/types/interfaces.d.ts +63 -7
- package/dist/esm/components/AnalyticsDetail.js +28 -25
- package/dist/esm/components/AppHeaderLogo.js +5 -7
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +14 -14
- package/dist/esm/components/Inspector/AnalyticsTab.js +35 -39
- package/dist/esm/components/Inspector/ConsoleTab.js +50 -53
- package/dist/esm/components/Inspector/CrashDetail.js +11 -10
- package/dist/esm/components/Inspector/CrashTab.js +14 -14
- package/dist/esm/components/Inspector/DebuggingTab.js +10 -10
- package/dist/esm/components/Inspector/DeviceInfoTab.js +208 -174
- package/dist/esm/components/Inspector/FabLauncher.js +41 -42
- package/dist/esm/components/Inspector/InspectorHeader.js +138 -115
- package/dist/esm/components/Inspector/LogDetail.js +24 -21
- package/dist/esm/components/Inspector/MainScreen.js +100 -62
- package/dist/esm/components/Inspector/NetworkDetail.js +88 -87
- package/dist/esm/components/Inspector/NetworkFilterModal.js +8 -8
- package/dist/esm/components/Inspector/NetworkTab.js +136 -134
- package/dist/esm/components/Inspector/PushCard.d.ts +4 -0
- package/dist/esm/components/Inspector/PushCard.js +89 -0
- package/dist/esm/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/esm/components/Inspector/PushDetail.js +190 -0
- package/dist/esm/components/Inspector/PushTab.d.ts +3 -0
- package/dist/esm/components/Inspector/PushTab.js +45 -0
- package/dist/esm/components/Inspector/ReduxDetail.js +40 -37
- package/dist/esm/components/Inspector/ReduxTab.js +103 -113
- package/dist/esm/components/Inspector/SettingsPanel.js +406 -258
- package/dist/esm/components/Inspector/StorageTab.js +158 -158
- package/dist/esm/components/Inspector/TabBar.js +28 -27
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +1 -1
- package/dist/esm/components/JsonViewer.js +101 -114
- package/dist/esm/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/esm/components/ModuleErrorBoundary.js +33 -0
- package/dist/esm/components/NetworkIcons.d.ts +3 -3
- package/dist/esm/components/NetworkIcons.js +7 -3
- package/dist/esm/components/SegmentedTabs.d.ts +4 -1
- package/dist/esm/components/SegmentedTabs.js +12 -8
- package/dist/esm/components/ShareButton.d.ts +11 -0
- package/dist/esm/components/ShareButton.js +6 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/crashHandler.js +6 -6
- package/dist/esm/customHooks/networkLogger.js +1 -1
- package/dist/esm/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/esm/customHooks/pushNotificationLogger.js +1 -0
- package/dist/esm/helpers/memoryManager.d.ts +2 -1
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/settingsStore.d.ts +1 -0
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/helpers/shareFormatter.d.ts +13 -0
- package/dist/esm/helpers/shareFormatter.js +7 -0
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/index.d.ts +5 -2
- package/dist/esm/index.js +7 -7
- package/dist/esm/push.d.ts +4 -0
- package/dist/esm/push.js +1 -0
- package/dist/esm/types/enums.d.ts +30 -0
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/index.d.ts +10 -0
- package/dist/esm/types/interfaces.d.ts +63 -7
- package/package.json +53 -10
- package/src/native/NativeInspector.ts +0 -1
- package/dist/commonjs/components/BrandSquareIcon.d.ts +0 -5
- package/dist/commonjs/components/BrandSquareIcon.js +0 -112
- package/dist/esm/components/BrandSquareIcon.d.ts +0 -5
- package/dist/esm/components/BrandSquareIcon.js +0 -112
|
@@ -1,78 +1,80 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(
|
|
2
|
-
<DomainHeader_1.default pageName={e.pageName}color={e.color}stats={e.stats}activeFilters={e.activeFilters}onToggleFilter={
|
|
3
|
-
</AnimatedEntrance_1.default>;const{
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(a,r,o,l){l===void 0&&(l=o);var i=Object.getOwnPropertyDescriptor(r,o);(!i||("get"in i?!r.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return r[o]}}),Object.defineProperty(a,l,i)}):(function(a,r,o,l){l===void 0&&(l=o),a[l]=r[o]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(a,r){Object.defineProperty(a,"default",{enumerable:!0,value:r})}):function(a,r){a.default=r}),__importStar=this&&this.__importStar||(function(){var a=function(r){return a=Object.getOwnPropertyNames||function(o){var l=[];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(l[l.length]=i);return l},a(r)};return function(r){if(r&&r.__esModule)return r;var o={};if(r!=null)for(var l=a(r),i=0;i<l.length;i++)l[i]!=="default"&&__createBinding(o,r,l[i]);return __setModuleDefault(o,r),o}})(),__importDefault=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),InspectorContext_1=require("./InspectorContext"),TouchableScale_1=__importDefault(require("../TouchableScale")),AnimatedEntrance_1=__importDefault(require("../AnimatedEntrance")),DomainHeader_1=__importDefault(require("../DomainHeader")),LogCard_1=__importDefault(require("../LogCard")),EmptyState_1=__importDefault(require("../EmptyState")),EndOfListFooter_1=__importDefault(require("../EndOfListFooter")),NetworkFilterModal_1=__importDefault(require("./NetworkFilterModal")),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),constants_1=require("../../constants"),i18n_1=require("../../i18n"),NetworkIcons_1=require("../NetworkIcons"),NetworkTab=react_1.default.memo(()=>{const{groupedData:a,loadMoreSection:r,search:o,setSearch:l,setSearchScope:i,quickFilter:A,setQuickFilter:V,handleDelete:D,selectedLogs:b,sortOrder:z,setSortOrder:m,statusFilters:c,setStatusFilters:C,methodFilters:d,setMethodFilters:_,filteredLogs:w,logs:h,toggleSectionFilter:I,toggleSectionCollapse:R,minStart:O,totalRange:q,newLogIds:k,toggleSelect:L,setSelected:B}=(0,InspectorContext_1.useInspector)(),{t:v}=(0,i18n_1.useTranslation)(),N=(0,react_1.useRef)(null),[$,x]=react_1.default.useState(!1),[P,M]=react_1.default.useState(!1),E=(0,react_1.useMemo)(()=>({statusCodes:c.size>0?new Set(c):new Set(["all"]),methods:d.size>0?new Set(d):new Set(["all"]),latency:"all",protocol:"all",sortBy:z==="newest"?"time_desc":"time_asc"}),[c,d,z]),H=(0,react_1.useCallback)(e=>{e.statusCodes.has("all")||e.statusCodes.size===0?C(new Set):C(new Set(e.statusCodes)),e.methods.has("all")||e.methods.size===0?_(new Set):_(new Set([...e.methods].map(n=>n))),e.sortBy==="time_asc"?m("oldest"):m("newest")},[C,_,m]),p=(0,react_1.useMemo)(()=>{let e=0,n=0,s=0,u=0,y=0,T=0;return h.forEach(t=>{const g=typeof t.status=="number"?t.status:parseInt(String(t.status),10);t.status===0||t.status==null||!isNaN(g)&&g>=400?e++:!isNaN(g)&&g>=200&&g<400&&n++,(t.duration||0)>=500&&s++;const f=(t.method||"").toUpperCase();f==="POST"&&u++,f==="GET"&&y++;const F=(t.url||"").toLowerCase(),S=(t.client||"").toLowerCase();(F.includes("graphql")||S.includes("graphql")||S.includes("apollo"))&&T++}),{all:h.length,errors:e,success:n,slow:s,post:u,get:y,graphql:T}},[h]),j=(0,react_1.useMemo)(()=>[{id:"all",label:"All",count:p.all,color:AppColors_1.AppColors.purple},{id:"errors",label:"Errors",count:p.errors,color:AppColors_1.AppColors.errorColor},{id:"success",label:"2xx OK",count:p.success,color:AppColors_1.AppColors.greenColor},{id:"slow",label:"Slow >500ms",count:p.slow,color:AppColors_1.AppColors.warningIconGold},{id:"POST",label:"POST",count:p.post,color:constants_1.METHOD_COLORS.POST||"#3B82F6"},{id:"GET",label:"GET",count:p.get,color:constants_1.METHOD_COLORS.GET||"#10B981"},{id:"graphql",label:"GraphQL",count:p.graphql,color:AppColors_1.AppColors.graphqlPink}],[p]),W=(0,react_1.useCallback)(({item:e,index:n})=>{if(e.type==="header")return<AnimatedEntrance_1.default index={n}distance={8}>
|
|
2
|
+
<DomainHeader_1.default pageName={e.pageName}color={e.color}stats={e.stats}activeFilters={e.activeFilters}onToggleFilter={I}isCollapsed={e.isCollapsed}onToggleCollapse={R}isFirst={e.isFirst}timestamp={e.timestamp}/>
|
|
3
|
+
</AnimatedEntrance_1.default>;if(e.type==="loadMore"){const{pageName:T,color:t,remainingCount:g,totalCount:f,loadedCount:F,loadMoreStep:S,hasMore:G}=e;return<react_native_1.View style={[styles_1.default.treeNodeRow,styles_1.default.treeNodeRowLast]}>
|
|
4
|
+
<react_native_1.View style={styles_1.default.treeLines}>
|
|
5
|
+
<react_native_1.View style={[styles_1.default.modernTreeLine,{borderColor:t},styles_1.default.modernTreeLineLast]}/>
|
|
6
|
+
</react_native_1.View>
|
|
7
|
+
<react_native_1.View style={styles_1.default.treeCardWrapper}>
|
|
8
|
+
{G?<TouchableScale_1.default onPress={()=>r(T,50)}hitSlop={6}style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:9,paddingHorizontal:12,marginVertical:3,marginRight:2,borderRadius:10,backgroundColor:`${t}14`,borderWidth:1.5,borderColor:`${t}40`,shadowColor:t,shadowOffset:{width:0,height:1.5},shadowOpacity:.1,shadowRadius:3,elevation:2}}>
|
|
9
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:8}}>
|
|
10
|
+
<react_native_1.View style={{width:22,height:22,borderRadius:11,backgroundColor:t,alignItems:"center",justifyContent:"center",shadowColor:t,shadowOffset:{width:0,height:1},shadowOpacity:.25,shadowRadius:2,elevation:1}}>
|
|
11
|
+
<NetworkIcons_1.ChevronIcon color={AppColors_1.AppColors.white}size={9}direction="down"/>
|
|
12
|
+
</react_native_1.View>
|
|
13
|
+
<react_native_1.View>
|
|
14
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:t}}>
|
|
15
|
+
{v("footer.loadMoreRequests",{count:S,defaultValue:`Load ${S} More Requests`})}
|
|
16
|
+
</react_native_1.Text>
|
|
17
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak,marginTop:1}}>
|
|
18
|
+
Showing {F} of {f} requests
|
|
19
|
+
</react_native_1.Text>
|
|
20
|
+
</react_native_1.View>
|
|
21
|
+
</react_native_1.View>
|
|
22
|
+
|
|
23
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",backgroundColor:`${t}25`,paddingHorizontal:8,paddingVertical:4,borderRadius:8,borderWidth:1,borderColor:`${t}40`,gap:3}}>
|
|
24
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:t}}>
|
|
25
|
+
+{g}
|
|
26
|
+
</react_native_1.Text>
|
|
27
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:9,color:t}}>
|
|
28
|
+
more
|
|
29
|
+
</react_native_1.Text>
|
|
30
|
+
</react_native_1.View>
|
|
31
|
+
</TouchableScale_1.default>:<react_native_1.View style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:7,paddingHorizontal:11,marginVertical:3,marginRight:2,borderRadius:9,backgroundColor:`${t}0A`,borderWidth:1,borderColor:`${t}25`}}>
|
|
32
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:7}}>
|
|
33
|
+
<react_native_1.View style={{width:17,height:17,borderRadius:8.5,backgroundColor:`${t}25`,alignItems:"center",justifyContent:"center"}}>
|
|
34
|
+
<NetworkIcons_1.CheckIcon color={t}size={8}/>
|
|
35
|
+
</react_native_1.View>
|
|
36
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.grayTextStrong}}>
|
|
37
|
+
{v("footer.allLoaded",{count:f,defaultValue:`All ${f} requests loaded`})}
|
|
38
|
+
</react_native_1.Text>
|
|
39
|
+
</react_native_1.View>
|
|
40
|
+
|
|
41
|
+
<react_native_1.View style={{backgroundColor:`${t}18`,paddingHorizontal:7,paddingVertical:2,borderRadius:6}}>
|
|
42
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:t}}>
|
|
43
|
+
{f}/{f}
|
|
44
|
+
</react_native_1.Text>
|
|
45
|
+
</react_native_1.View>
|
|
46
|
+
</react_native_1.View>}
|
|
47
|
+
</react_native_1.View>
|
|
48
|
+
</react_native_1.View>}const{log:s,isLast:u,color:y}=e;return<AnimatedEntrance_1.default index={n}distance={8}style={[styles_1.default.treeNodeRow,u&&styles_1.default.treeNodeRowLast]}>
|
|
4
49
|
<react_native_1.View style={styles_1.default.treeLines}>
|
|
5
|
-
<react_native_1.View style={[styles_1.default.modernTreeLine,{borderColor:
|
|
6
|
-
{!
|
|
50
|
+
<react_native_1.View style={[styles_1.default.modernTreeLine,{borderColor:y},u&&styles_1.default.modernTreeLineLast]}/>
|
|
51
|
+
{!u&&<react_native_1.View style={[styles_1.default.modernTreeBranch,{borderColor:y}]}/>}
|
|
7
52
|
</react_native_1.View>
|
|
8
53
|
<react_native_1.View style={styles_1.default.treeCardWrapper}>
|
|
9
|
-
<LogCard_1.default item={
|
|
54
|
+
<LogCard_1.default item={s}isSelected={b.has(s.id)}onToggleSelect={L}onPress={()=>{B(s)}}timelineMinStart={O}timelineTotalRange={q}isNew={k.has(s.id)}searchStr={o}/>
|
|
10
55
|
</react_native_1.View>
|
|
11
|
-
</AnimatedEntrance_1.default>},[
|
|
56
|
+
</AnimatedEntrance_1.default>},[O,q,k,b,L,o,I,R,r,B,v]);return<react_native_1.View style={{flex:1}}>
|
|
12
57
|
<react_native_1.View style={{marginTop:6}}>
|
|
13
58
|
|
|
14
|
-
{_!=null&&_.totalCount>0&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:8,paddingHorizontal:10,paddingVertical:5.5,marginHorizontal:12,marginBottom:6,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor}}>
|
|
15
|
-
|
|
16
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4.5}}>
|
|
17
|
-
<react_native_1.View style={{width:6,height:6,borderRadius:3,backgroundColor:_.successRate>=95?AppColors_1.AppColors.greenColor:_.successRate>=80?AppColors_1.AppColors.amber500:AppColors_1.AppColors.errorColor}}/>
|
|
18
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.primaryBlack}}>
|
|
19
|
-
{_.successRate}%
|
|
20
|
-
</react_native_1.Text>
|
|
21
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.grayTextWeak}}>
|
|
22
|
-
{L("network.successRate")}
|
|
23
|
-
</react_native_1.Text>
|
|
24
|
-
</react_native_1.View>
|
|
25
|
-
|
|
26
|
-
<react_native_1.View style={{width:1,height:11,backgroundColor:AppColors_1.AppColors.dividerColor}}/>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
30
|
-
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.purple}size={10}/>
|
|
31
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.purple}}>
|
|
32
|
-
{_.avgDuration}ms
|
|
33
|
-
</react_native_1.Text>
|
|
34
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.grayTextWeak}}>
|
|
35
|
-
{L("network.avgLatency")}
|
|
36
|
-
</react_native_1.Text>
|
|
37
|
-
</react_native_1.View>
|
|
38
|
-
|
|
39
|
-
<react_native_1.View style={{width:1,height:11,backgroundColor:AppColors_1.AppColors.dividerColor}}/>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
43
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.primaryBlack}}>
|
|
44
|
-
{_.p95}ms
|
|
45
|
-
</react_native_1.Text>
|
|
46
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.grayTextWeak}}>
|
|
47
|
-
P95
|
|
48
|
-
</react_native_1.Text>
|
|
49
|
-
</react_native_1.View>
|
|
50
|
-
</react_native_1.View>}
|
|
51
|
-
|
|
52
|
-
|
|
53
59
|
<react_native_1.View style={styles_1.default.toolbarRow}>
|
|
54
|
-
<react_native_1.View style={[styles_1.default.searchContainer,
|
|
55
|
-
<NetworkIcons_1.SearchIcon color={
|
|
56
|
-
<react_native_1.TextInput placeholder="Search URL, status, method, headers, body..."placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={
|
|
60
|
+
<react_native_1.View style={[styles_1.default.searchContainer,P&&{borderColor:AppColors_1.AppColors.purple,borderWidth:1.5}]}>
|
|
61
|
+
<NetworkIcons_1.SearchIcon color={P?AppColors_1.AppColors.purple:AppColors_1.AppColors.grayTextWeak}size={15}/>
|
|
62
|
+
<react_native_1.TextInput placeholder="Search URL, status, method, headers, body..."placeholderTextColor={AppColors_1.AppColors.grayTextWeak}value={o}onChangeText={l}onFocus={()=>M(!0)}onBlur={()=>M(!1)}style={styles_1.default.searchInput}autoCorrect={!1}autoCapitalize="none"/>
|
|
57
63
|
|
|
58
|
-
{
|
|
64
|
+
{o.length>0&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
59
65
|
<react_native_1.View style={{backgroundColor:`${AppColors_1.AppColors.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
60
66
|
<react_native_1.Text style={{color:AppColors_1.AppColors.purple,fontSize:9.5,fontFamily:AppFonts_1.AppFonts.interBold}}>
|
|
61
|
-
{
|
|
67
|
+
{w.length}
|
|
62
68
|
</react_native_1.Text>
|
|
63
69
|
</react_native_1.View>
|
|
64
|
-
<react_native_1.Pressable onPress={()=>
|
|
70
|
+
<react_native_1.Pressable onPress={()=>l("")}hitSlop={10}style={styles_1.default.clearBtn}>
|
|
65
71
|
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak}size={13}/>
|
|
66
72
|
</react_native_1.Pressable>
|
|
67
73
|
</react_native_1.View>}
|
|
68
74
|
</react_native_1.View>
|
|
69
75
|
|
|
70
76
|
<react_native_1.View style={styles_1.default.toolbarRight}>
|
|
71
|
-
<TouchableScale_1.default style={[styles_1.default.toolbarBtn,
|
|
72
|
-
<NetworkIcons_1.HeaderPauseIcon isPaused={F}color={F?AppColors_1.AppColors.darkOrange:AppColors_1.AppColors.grayTextStrong}size={16}/>
|
|
73
|
-
</TouchableScale_1.default>
|
|
74
|
-
|
|
75
|
-
<TouchableScale_1.default style={[styles_1.default.toolbarBtn,{borderColor:`${AppColors_1.AppColors.errorColor}38`,backgroundColor:`${AppColors_1.AppColors.errorColor}0F`}]}onPress={H}hitSlop={6}>
|
|
77
|
+
<TouchableScale_1.default style={[styles_1.default.toolbarBtn,{borderColor:`${AppColors_1.AppColors.errorColor}38`,backgroundColor:`${AppColors_1.AppColors.errorColor}0F`}]}onPress={D}hitSlop={6}>
|
|
76
78
|
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor}size={15}/>
|
|
77
79
|
{b.size>0&&<react_native_1.View style={styles_1.default.trashBadge}>
|
|
78
80
|
<react_native_1.Text style={styles_1.default.trashBadgeText}>
|
|
@@ -81,13 +83,13 @@
|
|
|
81
83
|
</react_native_1.View>}
|
|
82
84
|
</TouchableScale_1.default>
|
|
83
85
|
|
|
84
|
-
<TouchableScale_1.default style={styles_1.default.toolbarBtn}onPress={()=>
|
|
85
|
-
<NetworkIcons_1.SortArrowIcon direction={
|
|
86
|
+
<TouchableScale_1.default style={styles_1.default.toolbarBtn}onPress={()=>m(e=>e==="newest"?"oldest":"newest")}hitSlop={10}>
|
|
87
|
+
<NetworkIcons_1.SortArrowIcon direction={z==="newest"?"down":"up"}color={AppColors_1.AppColors.grayTextStrong}size={18}/>
|
|
86
88
|
</TouchableScale_1.default>
|
|
87
89
|
|
|
88
|
-
<TouchableScale_1.default style={[styles_1.default.toolbarBtn,(c.size>0||
|
|
89
|
-
<NetworkIcons_1.FilterIcon color={c.size>0||
|
|
90
|
-
{(c.size>0||
|
|
90
|
+
<TouchableScale_1.default style={[styles_1.default.toolbarBtn,(c.size>0||d.size>0)&&{borderColor:AppColors_1.AppColors.purple,backgroundColor:`${AppColors_1.AppColors.purple}15`}]}onPress={()=>x(!0)}hitSlop={6}>
|
|
91
|
+
<NetworkIcons_1.FilterIcon color={c.size>0||d.size>0?AppColors_1.AppColors.purple:AppColors_1.AppColors.grayTextStrong}size={16}/>
|
|
92
|
+
{(c.size>0||d.size>0)&&<react_native_1.View style={styles_1.default.activeFilterDot}/>}
|
|
91
93
|
</TouchableScale_1.default>
|
|
92
94
|
</react_native_1.View>
|
|
93
95
|
</react_native_1.View>
|
|
@@ -95,20 +97,20 @@
|
|
|
95
97
|
|
|
96
98
|
<react_native_1.View style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
|
|
97
99
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
98
|
-
{
|
|
99
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:
|
|
100
|
-
{e.id==="all"&&<NetworkIcons_1.LayersIcon size={11}color={
|
|
101
|
-
{e.id==="errors"&&<NetworkIcons_1.CircleXIcon size={11}color={
|
|
102
|
-
{e.id==="success"&&<NetworkIcons_1.CircleCheckIcon size={11}color={
|
|
103
|
-
{e.id==="slow"&&<NetworkIcons_1.ClockIcon size={11}color={
|
|
104
|
-
{e.id==="POST"&&<NetworkIcons_1.RequestIcon size={11}color={
|
|
105
|
-
{e.id==="GET"&&<NetworkIcons_1.ResponseIcon size={11}color={
|
|
106
|
-
{e.id==="graphql"&&<NetworkIcons_1.AtomIcon size={11}color={
|
|
107
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:
|
|
100
|
+
{j.map(e=>{const n=A===e.id,s=e.color||AppColors_1.AppColors.purple,u=n?AppColors_1.AppColors.white:s;return<TouchableScale_1.default key={e.id}onPress={()=>{V(n?"all":e.id)}}>
|
|
101
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:n?s:`${s}12`,borderWidth:1,borderColor:n?s:`${s}30`,gap:5}}>
|
|
102
|
+
{e.id==="all"&&<NetworkIcons_1.LayersIcon size={11}color={u}/>}
|
|
103
|
+
{e.id==="errors"&&<NetworkIcons_1.CircleXIcon size={11}color={u}/>}
|
|
104
|
+
{e.id==="success"&&<NetworkIcons_1.CircleCheckIcon size={11}color={u}/>}
|
|
105
|
+
{e.id==="slow"&&<NetworkIcons_1.ClockIcon size={11}color={u}/>}
|
|
106
|
+
{e.id==="POST"&&<NetworkIcons_1.RequestIcon size={11}color={u}/>}
|
|
107
|
+
{e.id==="GET"&&<NetworkIcons_1.ResponseIcon size={11}color={u}/>}
|
|
108
|
+
{e.id==="graphql"&&<NetworkIcons_1.AtomIcon size={11}color={u}/>}
|
|
109
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:n?AppColors_1.AppColors.white:AppColors_1.AppColors.primaryBlack}}>
|
|
108
110
|
{e.label}
|
|
109
111
|
</react_native_1.Text>
|
|
110
|
-
<react_native_1.View style={{backgroundColor:
|
|
111
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9,color:
|
|
112
|
+
<react_native_1.View style={{backgroundColor:n?"rgba(255,255,255,0.25)":`${s}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8}}>
|
|
113
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9,color:n?AppColors_1.AppColors.white:s}}>
|
|
112
114
|
{e.count}
|
|
113
115
|
</react_native_1.Text>
|
|
114
116
|
</react_native_1.View>
|
|
@@ -116,15 +118,15 @@
|
|
|
116
118
|
</TouchableScale_1.default>})}
|
|
117
119
|
</react_native_1.ScrollView>
|
|
118
120
|
|
|
119
|
-
<TouchableScale_1.default onPress={()=>
|
|
120
|
-
<react_native_1.View style={{flexDirection:"row",alignItems:"center",paddingHorizontal:10,paddingVertical:4.5,borderRadius:8,backgroundColor:c.size>0||
|
|
121
|
-
<NetworkIcons_1.FilterIcon size={11}color={c.size>0||
|
|
122
|
-
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:c.size>0||
|
|
121
|
+
<TouchableScale_1.default onPress={()=>x(!0)}style={{flexShrink:0}}>
|
|
122
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",paddingHorizontal:10,paddingVertical:4.5,borderRadius:8,backgroundColor:c.size>0||d.size>0?`${AppColors_1.AppColors.purple}20`:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:c.size>0||d.size>0?AppColors_1.AppColors.purple:AppColors_1.AppColors.grayBorderSecondary,gap:5,shadowColor:AppColors_1.AppColors.black,shadowOpacity:.04,shadowRadius:2,shadowOffset:{width:0,height:1},elevation:1}}>
|
|
123
|
+
<NetworkIcons_1.FilterIcon size={11}color={c.size>0||d.size>0?AppColors_1.AppColors.purple:AppColors_1.AppColors.grayText}/>
|
|
124
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:c.size>0||d.size>0?AppColors_1.AppColors.purple:AppColors_1.AppColors.grayText}}>
|
|
123
125
|
More Filters
|
|
124
126
|
</react_native_1.Text>
|
|
125
|
-
{(c.size>0||
|
|
127
|
+
{(c.size>0||d.size>0)&&<react_native_1.View style={{backgroundColor:AppColors_1.AppColors.purple,paddingHorizontal:4.5,paddingVertical:1,borderRadius:6}}>
|
|
126
128
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:AppColors_1.AppColors.white}}>
|
|
127
|
-
{c.size+
|
|
129
|
+
{c.size+d.size}
|
|
128
130
|
</react_native_1.Text>
|
|
129
131
|
</react_native_1.View>}
|
|
130
132
|
</react_native_1.View>
|
|
@@ -132,11 +134,11 @@
|
|
|
132
134
|
</react_native_1.View>
|
|
133
135
|
|
|
134
136
|
|
|
135
|
-
{(
|
|
137
|
+
{(A!=="all"||o.trim().length>0||c.size>0||d.size>0||w.length!==h.length)&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginHorizontal:12,marginBottom:8,paddingHorizontal:10,paddingVertical:5.5,backgroundColor:`${AppColors_1.AppColors.purple}10`,borderRadius:8,borderWidth:1,borderColor:`${AppColors_1.AppColors.purple}25`}}>
|
|
136
138
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10.5,color:AppColors_1.AppColors.purple}}>
|
|
137
|
-
Showing {
|
|
139
|
+
Showing {w.length} of {h.length} requests
|
|
138
140
|
</react_native_1.Text>
|
|
139
|
-
<TouchableScale_1.default onPress={()=>{
|
|
141
|
+
<TouchableScale_1.default onPress={()=>{l(""),V("all"),C(new Set),_(new Set)}}>
|
|
140
142
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.errorColor}}>
|
|
141
143
|
Clear All Filters
|
|
142
144
|
</react_native_1.Text>
|
|
@@ -144,8 +146,8 @@
|
|
|
144
146
|
</react_native_1.View>}
|
|
145
147
|
</react_native_1.View>
|
|
146
148
|
|
|
147
|
-
<react_native_1.FlatList ref={
|
|
149
|
+
<react_native_1.FlatList ref={N}data={a}keyExtractor={e=>e?.id?.toString()}renderItem={W}initialNumToRender={15}maxToRenderPerBatch={10}windowSize={9}removeClippedSubviews={react_native_1.Platform.OS==="android"}renderToHardwareTextureAndroid={!0}ListEmptyComponent={<EmptyState_1.default isSearch={o.length>0||c.size>0||d.size>0||A!=="all"}searchQuery={o}customTitle={o.length>0?"No matching API requests":"No network activity"}onClearSearch={()=>{l(""),C(new Set),_(new Set),V("all"),i("all")}}/>}ListFooterComponent={a.length>0?<EndOfListFooter_1.default count={w.length}totalCount={w.length}label="requests"/>:null}contentContainerStyle={[styles_1.default.listContent,w.length===0&&{flexGrow:1}]}keyboardShouldPersistTaps="handled"/>
|
|
148
150
|
|
|
149
151
|
|
|
150
|
-
<NetworkFilterModal_1.default visible={
|
|
152
|
+
<NetworkFilterModal_1.default visible={$}onClose={()=>x(!1)}filters={E}onApply={H}searchQuery={o}/>
|
|
151
153
|
</react_native_1.View>});exports.default=NetworkTab;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(r,e,l,t){t===void 0&&(t=l);var o=Object.getOwnPropertyDescriptor(e,l);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[l]}}),Object.defineProperty(r,t,o)}):(function(r,e,l,t){t===void 0&&(t=l),r[t]=e[l]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),__importStar=this&&this.__importStar||(function(){var r=function(e){return r=Object.getOwnPropertyNames||function(l){var t=[];for(var o in l)Object.prototype.hasOwnProperty.call(l,o)&&(t[t.length]=o);return t},r(e)};return function(e){if(e&&e.__esModule)return e;var l={};if(e!=null)for(var t=r(e),o=0;o<t.length;o++)t[o]!=="default"&&__createBinding(l,e,t[o]);return __setModuleDefault(l,e),l}})(),__importDefault=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),helpers_1=require("../../helpers"),NetworkIcons_1=require("../NetworkIcons"),HighlightText_1=__importDefault(require("../HighlightText")),TouchableScale_1=__importDefault(require("../TouchableScale")),getSourceColors=r=>{const e=(r||"").toLowerCase();return e.includes("salesforce")||e==="sfmc"?{badgeColor:AppColors_1.AppColors.sky600,border:AppColors_1.AppColors.sky600,cardBg:`${AppColors_1.AppColors.sky600}04`,label:"SALESFORCE"}:e.includes("fcm")||e.includes("firebase")?{badgeColor:AppColors_1.AppColors.firebaseOrange,border:AppColors_1.AppColors.firebaseOrange,cardBg:`${AppColors_1.AppColors.firebaseOrange}04`,label:"FCM"}:e.includes("apns")||e.includes("apple")?{badgeColor:AppColors_1.AppColors.slate700,border:AppColors_1.AppColors.slate700,cardBg:`${AppColors_1.AppColors.slate700}04`,label:"APNS"}:e.includes("expo")?{badgeColor:AppColors_1.AppColors.brandPurple,border:AppColors_1.AppColors.brandPurple,cardBg:`${AppColors_1.AppColors.brandPurple}04`,label:"EXPO"}:e.includes("notifee")?{badgeColor:AppColors_1.AppColors.pink500,border:AppColors_1.AppColors.pink500,cardBg:`${AppColors_1.AppColors.pink500}04`,label:"NOTIFEE"}:e.includes("onesignal")?{badgeColor:AppColors_1.AppColors.errorColor,border:AppColors_1.AppColors.errorColor,cardBg:`${AppColors_1.AppColors.errorColor}04`,label:"ONESIGNAL"}:{badgeColor:AppColors_1.AppColors.purple,border:AppColors_1.AppColors.purple,cardBg:`${AppColors_1.AppColors.purple}04`,label:(r||"PUSH").toUpperCase()}},getAppStatePill=(r,e)=>{if(e==="opened")return{label:"OPENED",text:AppColors_1.AppColors.brandPurple,bg:`${AppColors_1.AppColors.brandPurple}14`,border:`${AppColors_1.AppColors.brandPurple}30`,Icon:NetworkIcons_1.ExternalLinkIcon};const l=(r||"").toLowerCase();return l==="foreground"?{label:"FOREGROUND",text:AppColors_1.AppColors.greenColor,bg:`${AppColors_1.AppColors.greenColor}14`,border:`${AppColors_1.AppColors.greenColor}30`,Icon:NetworkIcons_1.SunIcon}:l==="background"?{label:"BACKGROUND",text:AppColors_1.AppColors.amber600,bg:`${AppColors_1.AppColors.amber600}14`,border:`${AppColors_1.AppColors.amber600}30`,Icon:NetworkIcons_1.MoonIcon}:{label:(r||"RECEIVED").toUpperCase(),text:AppColors_1.AppColors.grayTextWeak,bg:`${AppColors_1.AppColors.grayTextWeak}14`,border:`${AppColors_1.AppColors.grayTextWeak}30`,Icon:NetworkIcons_1.CloudPushIcon}},PushCard=react_1.default.memo(function({item:e,onPress:l,searchStr:t=""}){const o=(0,react_1.useMemo)(()=>getSourceColors(e.source),[e.source]),a=(0,react_1.useMemo)(()=>getAppStatePill(e.appState,e.action),[e.appState,e.action]),i=(0,react_1.useMemo)(()=>e.data?Object.keys(e.data).length:0,[e.data]),n=(0,react_1.useMemo)(()=>!!(e.data?.deepLink||e.data?.openDirectUrl||e.data?._od||e.customDomainAttributes?.openDirectUrl),[e.data,e.customDomainAttributes]),C=a.Icon;return<TouchableScale_1.default onPress={l}style={[styles.card,{borderLeftWidth:3.5,borderLeftColor:o.border,backgroundColor:o.cardBg}]}accessibilityRole="button"accessibilityLabel={`Push Notification: ${e.title||"Notification"}`}>
|
|
2
|
+
<react_native_1.View style={styles.cardBody}>
|
|
3
|
+
|
|
4
|
+
<react_native_1.View style={styles.cardHeaderRow}>
|
|
5
|
+
<react_native_1.View style={styles.cardHeaderLeft}>
|
|
6
|
+
<react_native_1.Text style={styles.serialNumber}>
|
|
7
|
+
#{e.id?e.id.replace(/^push_/,"").slice(-4):"1"}
|
|
8
|
+
</react_native_1.Text>
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<react_native_1.View style={[styles.methodBadge,{backgroundColor:o.badgeColor}]}>
|
|
12
|
+
<react_native_1.Text style={styles.methodBadgeText}>{o.label}</react_native_1.Text>
|
|
13
|
+
</react_native_1.View>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
<react_native_1.View style={[styles.chip,{backgroundColor:`${o.badgeColor}12`,borderColor:`${o.badgeColor}2E`}]}>
|
|
17
|
+
<react_native_1.Text style={[styles.chipText,{color:o.badgeColor}]}numberOfLines={1}>
|
|
18
|
+
push.{(e.source||"remote").toLowerCase()}
|
|
19
|
+
</react_native_1.Text>
|
|
20
|
+
</react_native_1.View>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
{i>0&&<react_native_1.View style={[styles.chip,{backgroundColor:`${AppColors_1.AppColors.teal600}14`,borderColor:`${AppColors_1.AppColors.teal600}33`}]}>
|
|
24
|
+
<react_native_1.Text style={[styles.chipText,{color:AppColors_1.AppColors.teal600}]}>
|
|
25
|
+
Payload{`{${i}}`}
|
|
26
|
+
</react_native_1.Text>
|
|
27
|
+
</react_native_1.View>}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
{n&&<react_native_1.View style={[styles.chip,{backgroundColor:`${AppColors_1.AppColors.brandPurple}14`,borderColor:`${AppColors_1.AppColors.brandPurple}33`}]}>
|
|
31
|
+
<react_native_1.Text style={[styles.chipText,{color:AppColors_1.AppColors.brandPurple}]}>
|
|
32
|
+
🔗 Link
|
|
33
|
+
</react_native_1.Text>
|
|
34
|
+
</react_native_1.View>}
|
|
35
|
+
</react_native_1.View>
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
<react_native_1.View style={styles.cardHeaderRight}>
|
|
39
|
+
<react_native_1.View style={[styles.statusPill,{backgroundColor:a.bg,borderColor:a.border}]}>
|
|
40
|
+
<C color={a.text}size={9.5}/>
|
|
41
|
+
<react_native_1.Text style={[styles.statusPillText,{color:a.text}]}>
|
|
42
|
+
{a.label}
|
|
43
|
+
</react_native_1.Text>
|
|
44
|
+
</react_native_1.View>
|
|
45
|
+
<NetworkIcons_1.ForwardChevronIcon color={AppColors_1.AppColors.grayTextWeak}size={13}/>
|
|
46
|
+
</react_native_1.View>
|
|
47
|
+
</react_native_1.View>
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
<react_native_1.View style={styles.messageBox}>
|
|
51
|
+
<HighlightText_1.default text={e.title||"(No Title)"}searchWords={t?[t]:[]}numberOfLines={1}style={styles.messageTitle}highlightStyle={styles.highlight}/>
|
|
52
|
+
<HighlightText_1.default text={e.body||"(No message body)"}searchWords={t?[t]:[]}numberOfLines={2}style={styles.messageBody}highlightStyle={styles.highlight}/>
|
|
53
|
+
</react_native_1.View>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<react_native_1.View style={styles.cardFooterRow}>
|
|
57
|
+
<react_native_1.View style={styles.footerLeft}>
|
|
58
|
+
<react_native_1.View style={styles.cardDateRow}>
|
|
59
|
+
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.slate400}size={10}/>
|
|
60
|
+
<react_native_1.Text style={styles.cardDateText}numberOfLines={1}>
|
|
61
|
+
{(0,helpers_1.formatTime)(e.timestamp)}
|
|
62
|
+
</react_native_1.Text>
|
|
63
|
+
</react_native_1.View>
|
|
64
|
+
|
|
65
|
+
{e.channelId?<react_native_1.View style={styles.callerChip}>
|
|
66
|
+
<NetworkIcons_1.BellIcon color={AppColors_1.AppColors.skySoftText}size={8.5}/>
|
|
67
|
+
<react_native_1.Text style={styles.callerChipText}numberOfLines={1}ellipsizeMode="middle">
|
|
68
|
+
{e.channelId}
|
|
69
|
+
</react_native_1.Text>
|
|
70
|
+
</react_native_1.View>:null}
|
|
71
|
+
|
|
72
|
+
{e.customDomainAttributes?.journeyName?<react_native_1.View style={[styles.callerChip,{backgroundColor:`${AppColors_1.AppColors.brandPurple}14`,borderColor:`${AppColors_1.AppColors.brandPurple}30`}]}>
|
|
73
|
+
<react_native_1.Text style={[styles.callerChipText,{color:AppColors_1.AppColors.brandPurple}]}numberOfLines={1}ellipsizeMode="middle">
|
|
74
|
+
{e.customDomainAttributes.journeyName}
|
|
75
|
+
</react_native_1.Text>
|
|
76
|
+
</react_native_1.View>:null}
|
|
77
|
+
</react_native_1.View>
|
|
78
|
+
|
|
79
|
+
<react_native_1.View style={styles.footerRight}>
|
|
80
|
+
{i>0&&<react_native_1.View style={styles.metaStatChip}>
|
|
81
|
+
<NetworkIcons_1.KeyIcon color={AppColors_1.AppColors.purple}size={8.5}/>
|
|
82
|
+
<react_native_1.Text style={styles.metaStatText}>
|
|
83
|
+
{i} {i===1?"key":"keys"}
|
|
84
|
+
</react_native_1.Text>
|
|
85
|
+
</react_native_1.View>}
|
|
86
|
+
</react_native_1.View>
|
|
87
|
+
</react_native_1.View>
|
|
88
|
+
</react_native_1.View>
|
|
89
|
+
</TouchableScale_1.default>}),styles=react_native_1.StyleSheet.create({card:{height:140,alignSelf:"stretch",borderRadius:10,overflow:"hidden",borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,shadowColor:AppColors_1.AppColors.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:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.grayTextWeak,fontSize:10},methodBadge:{paddingHorizontal:7,paddingVertical:2.5,borderRadius:5,alignItems:"center",justifyContent:"center"},methodBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,lineHeight:12,letterSpacing:.5,color:AppColors_1.AppColors.white},chip:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,borderWidth:1},chipText:{fontFamily:AppFonts_1.AppFonts.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:AppFonts_1.AppFonts.interBold,fontSize:10,lineHeight:13},messageBox:{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:7,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,paddingHorizontal:10,paddingVertical:6,height:68,minHeight:68,maxHeight:68,justifyContent:"center",gap:2,overflow:"hidden"},messageTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.primaryBlack,lineHeight:16},messageBody:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,color:AppColors_1.AppColors.grayText,lineHeight:15},highlight:{backgroundColor:AppColors_1.AppColors.yellowHighlight,color:AppColors_1.AppColors.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:AppFonts_1.AppFonts.interRegular,fontSize:10,lineHeight:13,color:AppColors_1.AppColors.slate400},callerChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:AppColors_1.AppColors.skySoftBg,borderColor:AppColors_1.AppColors.skySoftBorder,borderWidth:1,paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,flexShrink:1,minWidth:0},callerChipText:{color:AppColors_1.AppColors.skySoftText,fontSize:9,lineHeight:12,fontFamily:AppFonts_1.AppFonts.interBold},metaStatChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:`${AppColors_1.AppColors.purple}14`,borderColor:`${AppColors_1.AppColors.purple}2B`,borderWidth:1,paddingHorizontal:5,paddingVertical:1.5,borderRadius:4},metaStatText:{color:AppColors_1.AppColors.purple,fontSize:9,lineHeight:12,fontFamily:AppFonts_1.AppFonts.interBold}});PushCard.displayName="PushCard",exports.default=PushCard;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(o,e,t,r){r===void 0&&(r=t);var a=Object.getOwnPropertyDescriptor(e,t);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(o,r,a)}):(function(o,e,t,r){r===void 0&&(r=t),o[r]=e[t]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(o,e){Object.defineProperty(o,"default",{enumerable:!0,value:e})}):function(o,e){o.default=e}),__importStar=this&&this.__importStar||(function(){var o=function(e){return o=Object.getOwnPropertyNames||function(t){var r=[];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[r.length]=a);return r},o(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=o(e),a=0;a<r.length;a++)r[a]!=="default"&&__createBinding(t,e,r[a]);return __setModuleDefault(t,e),t}})(),__importDefault=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),helpers_1=require("../../helpers"),shareFormatter_1=require("../../helpers/shareFormatter"),ShareButton_1=__importDefault(require("../ShareButton")),CopyButton_1=__importDefault(require("../CopyButton")),JsonViewer_1=__importDefault(require("../JsonViewer")),SegmentedTabs_1=__importDefault(require("../SegmentedTabs")),NetworkIcons_1=require("../NetworkIcons"),PushDetail=react_1.default.memo(function({item:e}){const[t,r]=(0,react_1.useState)("preview"),a=(0,react_1.useMemo)(()=>e?(0,helpers_1.formatDateTime)(e.timestamp):"",[e]);if(!e)return null;const n=async()=>{await(0,shareFormatter_1.sharePushReport)(e)},p=[{key:"preview",label:"Preview",themeColor:AppColors_1.AppColors.brandPurple,icon:l=><NetworkIcons_1.EyeIcon size={12}color={l?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}/>},{key:"payload",label:"Custom Payload",themeColor:AppColors_1.AppColors.violet600,icon:l=><NetworkIcons_1.LayersIcon size={12}color={l?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}/>},{key:"headers",label:"Delivery Metadata",themeColor:AppColors_1.AppColors.teal600,icon:l=><NetworkIcons_1.MetadataIcon size={12}color={l?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}/>},{key:"raw",label:"Raw Payload",themeColor:AppColors_1.AppColors.sky600,icon:l=><NetworkIcons_1.RawJsonIcon size={12}color={l?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}/>}],s=(e.source||"PUSH").toUpperCase(),c=(e.appState||"STATE").toUpperCase(),d=!!(e.data?.deepLink||e.data?.openDirectUrl||e.data?._od||e.customDomainAttributes?.openDirectUrl),u=e.data?.deepLink||e.data?.openDirectUrl||e.data?._od||e.customDomainAttributes?.openDirectUrl||"";return<react_native_1.View style={{flex:1}}>
|
|
2
|
+
|
|
3
|
+
<react_native_1.View style={{paddingHorizontal:8,paddingTop:4}}>
|
|
4
|
+
<react_native_1.View style={styles_1.default.detailInfoBar}>
|
|
5
|
+
|
|
6
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:6,paddingBottom:8,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor}}>
|
|
7
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:5,flexWrap:"wrap",flex:1}}>
|
|
8
|
+
|
|
9
|
+
<react_native_1.View style={[styles_1.default.methodBadge,{backgroundColor:AppColors_1.AppColors.brandPurple,paddingHorizontal:8,paddingVertical:3.5,borderRadius:6,flexDirection:"row",alignItems:"center",gap:4}]}>
|
|
10
|
+
<NetworkIcons_1.CloudPushIcon size={10}color={AppColors_1.AppColors.white}/>
|
|
11
|
+
<react_native_1.Text style={[styles_1.default.methodBadgeText,{color:AppColors_1.AppColors.white,fontSize:10.5,fontFamily:AppFonts_1.AppFonts.interBold}]}>
|
|
12
|
+
{s}
|
|
13
|
+
</react_native_1.Text>
|
|
14
|
+
</react_native_1.View>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<react_native_1.View style={[styles_1.default.chip,{backgroundColor:e.appState==="foreground"?`${AppColors_1.AppColors.greenColor}18`:`${AppColors_1.AppColors.amber600}18`,borderColor:e.appState==="foreground"?`${AppColors_1.AppColors.greenColor}40`:`${AppColors_1.AppColors.amber600}40`,paddingHorizontal:6,paddingVertical:3,borderRadius:6}]}>
|
|
18
|
+
<react_native_1.Text style={[styles_1.default.chipText,{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:e.appState==="foreground"?AppColors_1.AppColors.greenColor:AppColors_1.AppColors.amber700}]}>
|
|
19
|
+
{c}
|
|
20
|
+
</react_native_1.Text>
|
|
21
|
+
</react_native_1.View>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
{e.action&&<react_native_1.View style={[styles_1.default.chip,{backgroundColor:`${AppColors_1.AppColors.purple}14`,borderColor:`${AppColors_1.AppColors.purple}30`,paddingHorizontal:6,paddingVertical:3,borderRadius:6}]}>
|
|
25
|
+
<react_native_1.Text style={[styles_1.default.chipText,{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.purple}]}>
|
|
26
|
+
{e.action.toUpperCase()}
|
|
27
|
+
</react_native_1.Text>
|
|
28
|
+
</react_native_1.View>}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
<react_native_1.View style={[styles_1.default.chip,{backgroundColor:`${AppColors_1.AppColors.brandPurple}10`,borderColor:`${AppColors_1.AppColors.brandPurple}25`,paddingHorizontal:7,paddingVertical:3,borderRadius:6,gap:4}]}>
|
|
32
|
+
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.brandPurple}size={10}/>
|
|
33
|
+
<react_native_1.Text style={[styles_1.default.chipText,{color:AppColors_1.AppColors.brandPurple,fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5}]}>
|
|
34
|
+
{a}
|
|
35
|
+
</react_native_1.Text>
|
|
36
|
+
</react_native_1.View>
|
|
37
|
+
</react_native_1.View>
|
|
38
|
+
</react_native_1.View>
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
<react_native_1.View style={{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:10,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,padding:10,marginTop:8,gap:8}}>
|
|
42
|
+
|
|
43
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"nowrap",gap:6}}>
|
|
44
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:6,flexShrink:1,minWidth:0}}>
|
|
45
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.grayTextWeak,letterSpacing:.4,textTransform:"uppercase"}}numberOfLines={1}>
|
|
46
|
+
{e.domain?e.domain.toUpperCase():"NOTIFICATION PAYLOAD"}
|
|
47
|
+
</react_native_1.Text>
|
|
48
|
+
</react_native_1.View>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:5,flexShrink:0}}>
|
|
52
|
+
<ShareButton_1.default onShare={n}/>
|
|
53
|
+
<CopyButton_1.default value={typeof e.rawPayload=="object"?JSON.stringify(e.rawPayload,null,2):JSON.stringify(e.data,null,2)}label="JSON"iconType="copy"/>
|
|
54
|
+
<CopyButton_1.default value={e.id||""}label="ID"iconType="copy"/>
|
|
55
|
+
</react_native_1.View>
|
|
56
|
+
</react_native_1.View>
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<react_native_1.View style={{gap:2}}>
|
|
60
|
+
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12.5,color:AppColors_1.AppColors.primaryBlack,lineHeight:18}}numberOfLines={2}selectable>
|
|
61
|
+
{e.title||"(No Title)"}
|
|
62
|
+
</react_native_1.Text>
|
|
63
|
+
{e.body?<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11.5,color:AppColors_1.AppColors.grayText,lineHeight:16}}numberOfLines={2}selectable>
|
|
64
|
+
{e.body}
|
|
65
|
+
</react_native_1.Text>:null}
|
|
66
|
+
{d?<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4,marginTop:2}}>
|
|
67
|
+
<react_native_1.Text style={{fontSize:10,fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.brandPurple}}>
|
|
68
|
+
🔗 LINK:
|
|
69
|
+
</react_native_1.Text>
|
|
70
|
+
<react_native_1.Text style={{fontSize:10.5,fontFamily:AppFonts_1.AppFonts.interRegular,color:AppColors_1.AppColors.sky600}}numberOfLines={1}>
|
|
71
|
+
{u}
|
|
72
|
+
</react_native_1.Text>
|
|
73
|
+
</react_native_1.View>:null}
|
|
74
|
+
</react_native_1.View>
|
|
75
|
+
</react_native_1.View>
|
|
76
|
+
</react_native_1.View>
|
|
77
|
+
</react_native_1.View>
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
<react_native_1.View style={{paddingHorizontal:8,paddingVertical:6}}>
|
|
81
|
+
<SegmentedTabs_1.default tabs={p}activeKey={t}onChange={l=>r(l)}scrollable={!0}/>
|
|
82
|
+
</react_native_1.View>
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
<react_native_1.View style={{flex:1,paddingHorizontal:8,paddingBottom:10}}>
|
|
86
|
+
{t==="preview"&&<react_native_1.ScrollView contentContainerStyle={detailStyles.scrollContent}>
|
|
87
|
+
|
|
88
|
+
<react_native_1.View style={detailStyles.mockupCard}>
|
|
89
|
+
<react_native_1.View style={detailStyles.mockupHeader}>
|
|
90
|
+
<react_native_1.View style={detailStyles.mockupAppIcon}>
|
|
91
|
+
<NetworkIcons_1.BellIcon size={12}color={AppColors_1.AppColors.white}/>
|
|
92
|
+
</react_native_1.View>
|
|
93
|
+
<react_native_1.Text style={detailStyles.mockupAppName}>
|
|
94
|
+
{e.domain||"App Notification"}
|
|
95
|
+
</react_native_1.Text>
|
|
96
|
+
<react_native_1.Text style={detailStyles.mockupTime}>• now</react_native_1.Text>
|
|
97
|
+
</react_native_1.View>
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
{e.imageUrl?<react_native_1.Image source={{uri:e.imageUrl}}style={detailStyles.mockupImage}resizeMode="cover"/>:null}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
<react_native_1.View style={{gap:2}}>
|
|
104
|
+
<react_native_1.Text style={detailStyles.mockupTitle}numberOfLines={2}>
|
|
105
|
+
{e.title||"(No Title)"}
|
|
106
|
+
</react_native_1.Text>
|
|
107
|
+
{e.subtitle?<react_native_1.Text style={detailStyles.mockupSubtitle}numberOfLines={1}>
|
|
108
|
+
{e.subtitle}
|
|
109
|
+
</react_native_1.Text>:null}
|
|
110
|
+
<react_native_1.Text style={detailStyles.mockupBody}>
|
|
111
|
+
{e.body||"(No message body provided in notification payload)"}
|
|
112
|
+
</react_native_1.Text>
|
|
113
|
+
</react_native_1.View>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
<react_native_1.View style={detailStyles.mockupFooterTags}>
|
|
117
|
+
{e.channelId?<react_native_1.View style={detailStyles.tagPill}>
|
|
118
|
+
<react_native_1.Text style={detailStyles.tagPillText}>Channel: {e.channelId}</react_native_1.Text>
|
|
119
|
+
</react_native_1.View>:null}
|
|
120
|
+
{e.sound?<react_native_1.View style={detailStyles.tagPill}>
|
|
121
|
+
<react_native_1.Text style={detailStyles.tagPillText}>🔊 {e.sound}</react_native_1.Text>
|
|
122
|
+
</react_native_1.View>:null}
|
|
123
|
+
{e.badge!=null?<react_native_1.View style={detailStyles.tagPill}>
|
|
124
|
+
<react_native_1.Text style={detailStyles.tagPillText}>Badge: {e.badge}</react_native_1.Text>
|
|
125
|
+
</react_native_1.View>:null}
|
|
126
|
+
{e.priority?<react_native_1.View style={detailStyles.tagPill}>
|
|
127
|
+
<react_native_1.Text style={detailStyles.tagPillText}>⚡ {e.priority}</react_native_1.Text>
|
|
128
|
+
</react_native_1.View>:null}
|
|
129
|
+
</react_native_1.View>
|
|
130
|
+
</react_native_1.View>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
{e.customDomainAttributes&&Object.keys(e.customDomainAttributes).length>0&&<react_native_1.View style={detailStyles.sectionCard}>
|
|
134
|
+
<react_native_1.Text style={detailStyles.sectionTitle}>🏢 Domain Specific Fields</react_native_1.Text>
|
|
135
|
+
{Object.entries(e.customDomainAttributes).map(([l,i])=><react_native_1.View key={l}style={detailStyles.keyValRow}>
|
|
136
|
+
<react_native_1.Text style={detailStyles.keyText}>{l}:</react_native_1.Text>
|
|
137
|
+
<react_native_1.Text style={detailStyles.valText}numberOfLines={2}>
|
|
138
|
+
{typeof i=="object"?JSON.stringify(i):String(i)}
|
|
139
|
+
</react_native_1.Text>
|
|
140
|
+
</react_native_1.View>)}
|
|
141
|
+
</react_native_1.View>}
|
|
142
|
+
</react_native_1.ScrollView>}
|
|
143
|
+
|
|
144
|
+
{t==="payload"&&<JsonViewer_1.default data={e.data&&Object.keys(e.data).length>0?e.data:{message:"No custom key-value data found in payload"}}fullHeight={!0}/>}
|
|
145
|
+
|
|
146
|
+
{t==="headers"&&<react_native_1.ScrollView contentContainerStyle={detailStyles.scrollContent}>
|
|
147
|
+
<react_native_1.View style={detailStyles.sectionCard}>
|
|
148
|
+
<react_native_1.Text style={detailStyles.sectionTitle}>⚙️ Delivery & Message Metadata</react_native_1.Text>
|
|
149
|
+
<react_native_1.View style={detailStyles.keyValRow}>
|
|
150
|
+
<react_native_1.Text style={detailStyles.keyText}>Message ID:</react_native_1.Text>
|
|
151
|
+
<react_native_1.Text style={detailStyles.valText}selectable>{e.id||"N/A"}</react_native_1.Text>
|
|
152
|
+
</react_native_1.View>
|
|
153
|
+
<react_native_1.View style={detailStyles.keyValRow}>
|
|
154
|
+
<react_native_1.Text style={detailStyles.keyText}>Source / Domain:</react_native_1.Text>
|
|
155
|
+
<react_native_1.Text style={detailStyles.valText}>{e.domain||e.source||"N/A"}</react_native_1.Text>
|
|
156
|
+
</react_native_1.View>
|
|
157
|
+
<react_native_1.View style={detailStyles.keyValRow}>
|
|
158
|
+
<react_native_1.Text style={detailStyles.keyText}>App State:</react_native_1.Text>
|
|
159
|
+
<react_native_1.Text style={detailStyles.valText}>{e.appState}</react_native_1.Text>
|
|
160
|
+
</react_native_1.View>
|
|
161
|
+
<react_native_1.View style={detailStyles.keyValRow}>
|
|
162
|
+
<react_native_1.Text style={detailStyles.keyText}>Action Type:</react_native_1.Text>
|
|
163
|
+
<react_native_1.Text style={detailStyles.valText}>{e.action}</react_native_1.Text>
|
|
164
|
+
</react_native_1.View>
|
|
165
|
+
<react_native_1.View style={detailStyles.keyValRow}>
|
|
166
|
+
<react_native_1.Text style={detailStyles.keyText}>Timestamp:</react_native_1.Text>
|
|
167
|
+
<react_native_1.Text style={detailStyles.valText}>{a}</react_native_1.Text>
|
|
168
|
+
</react_native_1.View>
|
|
169
|
+
<react_native_1.View style={detailStyles.keyValRow}>
|
|
170
|
+
<react_native_1.Text style={detailStyles.keyText}>Channel ID:</react_native_1.Text>
|
|
171
|
+
<react_native_1.Text style={detailStyles.valText}>{e.channelId||"default"}</react_native_1.Text>
|
|
172
|
+
</react_native_1.View>
|
|
173
|
+
<react_native_1.View style={detailStyles.keyValRow}>
|
|
174
|
+
<react_native_1.Text style={detailStyles.keyText}>Sound:</react_native_1.Text>
|
|
175
|
+
<react_native_1.Text style={detailStyles.valText}>{e.sound||"default"}</react_native_1.Text>
|
|
176
|
+
</react_native_1.View>
|
|
177
|
+
<react_native_1.View style={detailStyles.keyValRow}>
|
|
178
|
+
<react_native_1.Text style={detailStyles.keyText}>Badge Count:</react_native_1.Text>
|
|
179
|
+
<react_native_1.Text style={detailStyles.valText}>{e.badge!=null?e.badge:"None"}</react_native_1.Text>
|
|
180
|
+
</react_native_1.View>
|
|
181
|
+
<react_native_1.View style={detailStyles.keyValRow}>
|
|
182
|
+
<react_native_1.Text style={detailStyles.keyText}>Collapse Key:</react_native_1.Text>
|
|
183
|
+
<react_native_1.Text style={detailStyles.valText}>{e.collapseKey||"None"}</react_native_1.Text>
|
|
184
|
+
</react_native_1.View>
|
|
185
|
+
</react_native_1.View>
|
|
186
|
+
</react_native_1.ScrollView>}
|
|
187
|
+
|
|
188
|
+
{t==="raw"&&<JsonViewer_1.default data={e.rawPayload||e}fullHeight={!0}/>}
|
|
189
|
+
</react_native_1.View>
|
|
190
|
+
</react_native_1.View>}),detailStyles=react_native_1.StyleSheet.create({container:{flex:1,backgroundColor:AppColors_1.AppColors.white},headerBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:10,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,backgroundColor:AppColors_1.AppColors.white},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1},backBtn:{width:32,height:32,borderRadius:8,backgroundColor:AppColors_1.AppColors.grayBackground,alignItems:"center",justifyContent:"center",borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},titleWrap:{flex:1,gap:2},badgeRow:{flexDirection:"row",alignItems:"center",gap:5},sourceBadge:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:`${AppColors_1.AppColors.brandPurple}14`,paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,borderWidth:1,borderColor:`${AppColors_1.AppColors.brandPurple}30`},sourceBadgeText:{fontSize:9,fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.brandPurple},stateBadge:{backgroundColor:`${AppColors_1.AppColors.greenColor}14`,paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,borderWidth:1,borderColor:`${AppColors_1.AppColors.greenColor}30`},stateBadgeText:{fontSize:9,fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.greenColor},headerTitle:{fontSize:13,fontFamily:AppFonts_1.AppFonts.interSemiBold,color:AppColors_1.AppColors.primaryBlack},headerActions:{flexDirection:"row",alignItems:"center",gap:6},tabsContainer:{paddingHorizontal:10,paddingVertical:6,backgroundColor:AppColors_1.AppColors.grayBackground,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor},bodyContainer:{flex:1},scrollContent:{padding:12,gap:12},mockupCard:{backgroundColor:AppColors_1.AppColors.white,borderRadius:14,borderWidth:1,borderColor:AppColors_1.AppColors.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:AppColors_1.AppColors.brandPurple,alignItems:"center",justifyContent:"center"},mockupAppName:{fontSize:11,fontFamily:AppFonts_1.AppFonts.interSemiBold,color:AppColors_1.AppColors.primaryBlack,textTransform:"uppercase"},mockupTime:{fontSize:10,fontFamily:AppFonts_1.AppFonts.interRegular,color:AppColors_1.AppColors.grayTextWeak},mockupImage:{width:"100%",height:140,borderRadius:8,marginVertical:4},mockupTitle:{fontSize:14,fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.primaryBlack},mockupSubtitle:{fontSize:12,fontFamily:AppFonts_1.AppFonts.interMedium,color:AppColors_1.AppColors.grayText},mockupBody:{fontSize:12.5,fontFamily:AppFonts_1.AppFonts.interRegular,color:AppColors_1.AppColors.grayText,lineHeight:18},mockupFooterTags:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:6,marginTop:6,paddingTop:8,borderTopWidth:1,borderTopColor:AppColors_1.AppColors.dividerColor},tagPill:{backgroundColor:AppColors_1.AppColors.grayBackground,paddingHorizontal:6,paddingVertical:3,borderRadius:4,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},tagPillText:{fontSize:10,fontFamily:AppFonts_1.AppFonts.interMedium,color:AppColors_1.AppColors.grayText},sectionCard:{backgroundColor:AppColors_1.AppColors.white,borderRadius:12,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,padding:12,gap:8},sectionTitle:{fontSize:12,fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.primaryBlack,marginBottom:4},keyValRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:3,borderBottomWidth:.5,borderBottomColor:`${AppColors_1.AppColors.dividerColor}40`,gap:8},keyText:{fontSize:11,fontFamily:AppFonts_1.AppFonts.interMedium,color:AppColors_1.AppColors.grayTextWeak},valText:{fontSize:11,fontFamily:AppFonts_1.AppFonts.interSemiBold,color:AppColors_1.AppColors.primaryBlack,textAlign:"right",flexShrink:1}});PushDetail.displayName="PushDetail",exports.default=PushDetail;
|