react-native-inapp-inspector 1.1.13 → 1.1.15
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 +9 -34
- package/dist/commonjs/assets/svgAssets.d.ts +3 -0
- package/dist/commonjs/assets/svgAssets.js +17 -0
- package/dist/commonjs/components/AnalyticsEventCard.d.ts +1 -14
- package/dist/commonjs/components/AnalyticsEventCard.js +120 -50
- package/dist/commonjs/components/AnalyticsGraph.d.ts +2 -6
- package/dist/commonjs/components/AnalyticsGraph.js +8 -8
- package/dist/commonjs/components/AnalyticsTabView.d.ts +15 -0
- package/dist/commonjs/components/AnalyticsTabView.js +157 -0
- package/dist/commonjs/components/AnimatedEntrance.d.ts +1 -1
- package/dist/commonjs/components/AnimatedEntrance.js +2 -2
- package/dist/commonjs/components/ApiDetailView.d.ts +22 -0
- package/dist/commonjs/components/ApiDetailView.js +304 -0
- package/dist/commonjs/components/ApisTabView.d.ts +33 -0
- package/dist/commonjs/components/ApisTabView.js +235 -0
- package/dist/commonjs/components/CodeSnippet.d.ts +1 -5
- package/dist/commonjs/components/CodeSnippet.js +34 -34
- package/dist/commonjs/components/ConsoleLogCard.d.ts +1 -8
- package/dist/commonjs/components/ConsoleLogCard.js +262 -442
- package/dist/commonjs/components/ConsoleLogDetailView.d.ts +9 -0
- package/dist/commonjs/components/ConsoleLogDetailView.js +278 -0
- package/dist/commonjs/components/ConsoleLogsTabView.d.ts +24 -0
- package/dist/commonjs/components/ConsoleLogsTabView.js +354 -0
- package/dist/commonjs/components/DiffViewer.js +4 -2
- package/dist/commonjs/components/DomainHeader.js +66 -41
- package/dist/commonjs/components/EmptyState.d.ts +2 -2
- package/dist/commonjs/components/EmptyState.js +2 -2
- package/dist/commonjs/components/EndOfListFooter.d.ts +8 -0
- package/dist/commonjs/components/EndOfListFooter.js +90 -0
- package/dist/commonjs/components/ErrorBoundary.d.ts +5 -14
- package/dist/commonjs/components/ErrorBoundary.js +28 -28
- package/dist/commonjs/components/FloatingBubble.d.ts +14 -0
- package/dist/commonjs/components/FloatingBubble.js +75 -0
- package/dist/commonjs/components/HeadersSection.js +5 -3
- package/dist/commonjs/components/HighlightText.d.ts +1 -1
- package/dist/commonjs/components/HighlightText.js +5 -7
- package/dist/commonjs/components/Inspector/AnalyticsTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +232 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.js +410 -0
- package/dist/commonjs/components/Inspector/FabLauncher.d.ts +3 -0
- package/dist/commonjs/components/Inspector/FabLauncher.js +54 -0
- package/dist/commonjs/components/Inspector/InsightsDashboard.d.ts +3 -0
- package/dist/commonjs/components/Inspector/InsightsDashboard.js +619 -0
- package/dist/commonjs/components/Inspector/InspectorContext.d.ts +5 -0
- package/dist/commonjs/components/Inspector/InspectorContext.js +18 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.d.ts +3 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +452 -0
- package/dist/commonjs/components/Inspector/LogDetail.d.ts +3 -0
- package/dist/commonjs/components/Inspector/LogDetail.js +963 -0
- package/dist/commonjs/components/Inspector/MainScreen.d.ts +3 -0
- package/dist/commonjs/components/Inspector/MainScreen.js +68 -0
- package/dist/commonjs/components/Inspector/NavigationTracker.d.ts +3 -0
- package/dist/commonjs/components/Inspector/NavigationTracker.js +12 -0
- package/dist/commonjs/components/Inspector/NetworkDetail.d.ts +3 -0
- package/dist/commonjs/components/Inspector/NetworkDetail.js +405 -0
- package/dist/commonjs/components/Inspector/NetworkTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/NetworkTab.js +281 -0
- package/dist/commonjs/components/Inspector/ReduxTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/ReduxTab.js +75 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.d.ts +3 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +1476 -0
- package/dist/commonjs/components/Inspector/TabBar.d.ts +3 -0
- package/dist/commonjs/components/Inspector/TabBar.js +95 -0
- package/dist/commonjs/components/Inspector/WebViewTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/WebViewTab.js +757 -0
- package/dist/commonjs/components/InspectorHeader.d.ts +19 -0
- package/dist/commonjs/components/InspectorHeader.js +329 -0
- package/dist/commonjs/components/InspectorTabBar.d.ts +16 -0
- package/dist/commonjs/components/InspectorTabBar.js +90 -0
- package/dist/commonjs/components/JsonViewer.d.ts +4 -1
- package/dist/commonjs/components/JsonViewer.js +110 -171
- package/dist/commonjs/components/LogCard.js +109 -86
- package/dist/commonjs/components/MetaAccordion.d.ts +1 -10
- package/dist/commonjs/components/MetaAccordion.js +23 -21
- package/dist/commonjs/components/NavigationTracker.d.ts +7 -0
- package/dist/commonjs/components/NavigationTracker.js +76 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +6 -0
- package/dist/commonjs/components/NetworkIcons.js +54 -8
- package/dist/commonjs/components/ReduxTabView.d.ts +9 -0
- package/dist/commonjs/components/ReduxTabView.js +56 -0
- package/dist/commonjs/components/ReduxTreeView.js +241 -200
- package/dist/commonjs/components/SegmentedTabs.d.ts +15 -0
- package/dist/commonjs/components/SegmentedTabs.js +52 -0
- package/dist/commonjs/components/SettingsView.d.ts +13 -0
- package/dist/commonjs/components/SettingsView.js +328 -0
- package/dist/commonjs/components/TouchableScale.d.ts +2 -2
- package/dist/commonjs/components/TouchableScale.js +2 -2
- package/dist/commonjs/components/TreeNode.js +2 -2
- package/dist/commonjs/constants/index.js +1 -12
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +8 -0
- package/dist/commonjs/customHooks/analyticsLogger.js +42 -1
- package/dist/commonjs/customHooks/consoleLogger.js +137 -13
- package/dist/commonjs/customHooks/networkLogger.d.ts +0 -1
- package/dist/commonjs/customHooks/networkLogger.js +0 -1
- package/dist/commonjs/customHooks/reduxLogger.d.ts +2 -9
- package/dist/commonjs/enums/index.d.ts +39 -0
- package/dist/commonjs/enums/index.js +50 -0
- package/dist/commonjs/helpers/index.d.ts +27 -1
- package/dist/commonjs/helpers/index.js +187 -12
- package/dist/commonjs/helpers/settingsStore.d.ts +2 -24
- package/dist/commonjs/i18n/en.json +144 -0
- package/dist/commonjs/i18n/index.d.ts +2 -0
- package/dist/commonjs/i18n/index.js +27 -0
- package/dist/commonjs/i18n/locales/en.json +314 -0
- package/dist/commonjs/index.d.ts +2 -3
- package/dist/commonjs/index.js +207 -4927
- package/dist/commonjs/styles/AppColors.d.ts +148 -0
- package/dist/commonjs/styles/AppColors.js +176 -0
- package/dist/commonjs/styles/common.d.ts +3 -0
- package/dist/commonjs/styles/common.js +201 -0
- package/dist/commonjs/styles/index.d.ts +219 -435
- package/dist/commonjs/styles/index.js +312 -488
- package/dist/commonjs/types/enums.d.ts +9 -0
- package/dist/commonjs/types/enums.js +4 -0
- package/dist/commonjs/types/index.d.ts +4 -111
- package/dist/commonjs/types/index.js +16 -0
- package/dist/commonjs/types/interfaces.d.ts +337 -0
- package/dist/commonjs/types/interfaces.js +2 -0
- package/dist/esm/assets/svgAssets.d.ts +3 -0
- package/dist/esm/assets/svgAssets.js +14 -0
- package/dist/esm/components/AnalyticsEventCard.d.ts +1 -14
- package/dist/esm/components/AnalyticsEventCard.js +118 -48
- package/dist/esm/components/AnalyticsGraph.d.ts +2 -6
- package/dist/esm/components/AnalyticsGraph.js +8 -8
- package/dist/esm/components/AnalyticsTabView.d.ts +15 -0
- package/dist/esm/components/AnalyticsTabView.js +151 -0
- package/dist/esm/components/AnimatedEntrance.d.ts +1 -1
- package/dist/esm/components/AnimatedEntrance.js +2 -2
- package/dist/esm/components/ApiDetailView.d.ts +22 -0
- package/dist/esm/components/ApiDetailView.js +264 -0
- package/dist/esm/components/ApisTabView.d.ts +33 -0
- package/dist/esm/components/ApisTabView.js +196 -0
- package/dist/esm/components/CodeSnippet.d.ts +1 -5
- package/dist/esm/components/CodeSnippet.js +34 -34
- package/dist/esm/components/ConsoleLogCard.d.ts +1 -8
- package/dist/esm/components/ConsoleLogCard.js +262 -409
- package/dist/esm/components/ConsoleLogDetailView.d.ts +9 -0
- package/dist/esm/components/ConsoleLogDetailView.js +271 -0
- package/dist/esm/components/ConsoleLogsTabView.d.ts +24 -0
- package/dist/esm/components/ConsoleLogsTabView.js +348 -0
- package/dist/esm/components/DiffViewer.js +4 -2
- package/dist/esm/components/DomainHeader.js +66 -41
- package/dist/esm/components/EmptyState.d.ts +2 -2
- package/dist/esm/components/EmptyState.js +2 -2
- package/dist/esm/components/EndOfListFooter.d.ts +8 -0
- package/dist/esm/components/EndOfListFooter.js +83 -0
- package/dist/esm/components/ErrorBoundary.d.ts +5 -14
- package/dist/esm/components/ErrorBoundary.js +29 -29
- package/dist/esm/components/FloatingBubble.d.ts +14 -0
- package/dist/esm/components/FloatingBubble.js +68 -0
- package/dist/esm/components/HeadersSection.js +5 -3
- package/dist/esm/components/HighlightText.d.ts +1 -1
- package/dist/esm/components/HighlightText.js +5 -7
- package/dist/esm/components/Inspector/AnalyticsTab.d.ts +3 -0
- package/dist/esm/components/Inspector/AnalyticsTab.js +194 -0
- package/dist/esm/components/Inspector/ConsoleTab.d.ts +3 -0
- package/dist/esm/components/Inspector/ConsoleTab.js +372 -0
- package/dist/esm/components/Inspector/FabLauncher.d.ts +3 -0
- package/dist/esm/components/Inspector/FabLauncher.js +49 -0
- package/dist/esm/components/Inspector/InsightsDashboard.d.ts +3 -0
- package/dist/esm/components/Inspector/InsightsDashboard.js +614 -0
- package/dist/esm/components/Inspector/InspectorContext.d.ts +5 -0
- package/dist/esm/components/Inspector/InspectorContext.js +13 -0
- package/dist/esm/components/Inspector/InspectorHeader.d.ts +3 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +447 -0
- package/dist/esm/components/Inspector/LogDetail.d.ts +3 -0
- package/dist/esm/components/Inspector/LogDetail.js +925 -0
- package/dist/esm/components/Inspector/MainScreen.d.ts +3 -0
- package/dist/esm/components/Inspector/MainScreen.js +63 -0
- package/dist/esm/components/Inspector/NavigationTracker.d.ts +3 -0
- package/dist/esm/components/Inspector/NavigationTracker.js +10 -0
- package/dist/esm/components/Inspector/NetworkDetail.d.ts +3 -0
- package/dist/esm/components/Inspector/NetworkDetail.js +367 -0
- package/dist/esm/components/Inspector/NetworkTab.d.ts +3 -0
- package/dist/esm/components/Inspector/NetworkTab.js +243 -0
- package/dist/esm/components/Inspector/ReduxTab.d.ts +3 -0
- package/dist/esm/components/Inspector/ReduxTab.js +70 -0
- package/dist/esm/components/Inspector/SettingsPanel.d.ts +3 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +1438 -0
- package/dist/esm/components/Inspector/TabBar.d.ts +3 -0
- package/dist/esm/components/Inspector/TabBar.js +90 -0
- package/dist/esm/components/Inspector/WebViewTab.d.ts +3 -0
- package/dist/esm/components/Inspector/WebViewTab.js +752 -0
- package/dist/esm/components/InspectorHeader.d.ts +19 -0
- package/dist/esm/components/InspectorHeader.js +323 -0
- package/dist/esm/components/InspectorTabBar.d.ts +16 -0
- package/dist/esm/components/InspectorTabBar.js +84 -0
- package/dist/esm/components/JsonViewer.d.ts +4 -1
- package/dist/esm/components/JsonViewer.js +111 -172
- package/dist/esm/components/LogCard.js +111 -88
- package/dist/esm/components/MetaAccordion.d.ts +1 -10
- package/dist/esm/components/MetaAccordion.js +23 -21
- package/dist/esm/components/NavigationTracker.d.ts +7 -0
- package/dist/esm/components/NavigationTracker.js +39 -0
- package/dist/esm/components/NetworkIcons.d.ts +6 -0
- package/dist/esm/components/NetworkIcons.js +46 -6
- package/dist/esm/components/ReduxTabView.d.ts +9 -0
- package/dist/esm/components/ReduxTabView.js +50 -0
- package/dist/esm/components/ReduxTreeView.js +243 -202
- package/dist/esm/components/SegmentedTabs.d.ts +15 -0
- package/dist/esm/components/SegmentedTabs.js +47 -0
- package/dist/esm/components/SettingsView.d.ts +13 -0
- package/dist/esm/components/SettingsView.js +321 -0
- package/dist/esm/components/TouchableScale.d.ts +2 -2
- package/dist/esm/components/TouchableScale.js +2 -2
- package/dist/esm/components/TreeNode.js +2 -2
- package/dist/esm/constants/index.js +1 -12
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.d.ts +8 -0
- package/dist/esm/customHooks/analyticsLogger.js +37 -0
- package/dist/esm/customHooks/consoleLogger.js +137 -13
- package/dist/esm/customHooks/networkLogger.d.ts +0 -1
- package/dist/esm/customHooks/networkLogger.js +0 -1
- package/dist/esm/customHooks/reduxLogger.d.ts +2 -9
- package/dist/esm/enums/index.d.ts +39 -0
- package/dist/esm/enums/index.js +47 -0
- package/dist/esm/helpers/index.d.ts +27 -1
- package/dist/esm/helpers/index.js +180 -11
- package/dist/esm/helpers/settingsStore.d.ts +2 -24
- package/dist/esm/i18n/en.json +144 -0
- package/dist/esm/i18n/index.d.ts +2 -0
- package/dist/esm/i18n/index.js +22 -0
- package/dist/esm/i18n/locales/en.json +314 -0
- package/dist/esm/index.d.ts +2 -3
- package/dist/esm/index.js +207 -4923
- package/dist/esm/styles/AppColors.d.ts +148 -0
- package/dist/esm/styles/AppColors.js +176 -0
- package/dist/esm/styles/common.d.ts +3 -0
- package/dist/esm/styles/common.js +197 -0
- package/dist/esm/styles/index.d.ts +219 -435
- package/dist/esm/styles/index.js +312 -488
- package/dist/esm/types/enums.d.ts +9 -0
- package/dist/esm/types/enums.js +3 -0
- package/dist/esm/types/index.d.ts +4 -111
- package/dist/esm/types/index.js +2 -1
- package/dist/esm/types/interfaces.d.ts +337 -0
- package/dist/esm/types/interfaces.js +1 -0
- package/example/App.tsx +88 -1
- package/example/android/app/build.gradle +29 -1
- package/example/android/app/src/main/java/com/example/MainApplication.kt +25 -0
- package/example/android/build.gradle +31 -4
- package/example/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/example/android/gradle.properties +1 -0
- package/example/android/settings.gradle +20 -1
- package/example/package-lock.json +1 -1
- package/package.json +3 -1
|
@@ -2,44 +2,85 @@ import React, { useEffect, useRef } from 'react';
|
|
|
2
2
|
import { Animated, StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
import { AppColors } from '../styles/AppColors';
|
|
4
4
|
import { AppFonts } from '../styles/AppFonts';
|
|
5
|
+
import { formatGap, formatTime } from '../helpers';
|
|
5
6
|
import HighlightText from './HighlightText';
|
|
6
7
|
import TouchableScale from './TouchableScale';
|
|
7
8
|
// ─── Palette (Google Analytics colours) ───────────────────────────────────────
|
|
8
9
|
const EVENT_PALETTE = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
AppColors.googleBlue, // blue
|
|
11
|
+
AppColors.googleGreen, // green
|
|
12
|
+
AppColors.googlePurple, // purple
|
|
13
|
+
AppColors.googleTeal, // teal
|
|
14
|
+
AppColors.googleRed, // red
|
|
15
|
+
AppColors.googleOrange, // orange
|
|
16
|
+
AppColors.blue700, // dark blue
|
|
17
|
+
AppColors.materialGreen, // dark green
|
|
17
18
|
];
|
|
18
19
|
export function getEventColor(name) {
|
|
20
|
+
const safeName = typeof name === 'string' ? name : String(name || '');
|
|
19
21
|
let hash = 0;
|
|
20
|
-
for (let i = 0; i <
|
|
21
|
-
hash = (hash * 31 +
|
|
22
|
+
for (let i = 0; i < safeName.length; i++) {
|
|
23
|
+
hash = (hash * 31 + safeName.charCodeAt(i)) | 0;
|
|
22
24
|
}
|
|
23
25
|
return EVENT_PALETTE[Math.abs(hash) % EVENT_PALETTE.length];
|
|
24
26
|
}
|
|
25
27
|
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
function getEventCategory(name) {
|
|
29
|
+
if (!name)
|
|
30
|
+
return 'Custom';
|
|
31
|
+
const lowercaseName = name.toLowerCase();
|
|
32
|
+
if (lowercaseName === 'screen_view' || lowercaseName === 'page_view') {
|
|
33
|
+
return 'Page View';
|
|
34
|
+
}
|
|
35
|
+
// Ecommerce events
|
|
36
|
+
const ecommerceEvents = [
|
|
37
|
+
'purchase', 'add_to_cart', 'begin_checkout', 'view_item',
|
|
38
|
+
'select_item', 'remove_from_cart', 'view_cart',
|
|
39
|
+
'add_shipping_info', 'add_payment_info', 'refund',
|
|
40
|
+
'view_item_list', 'select_promotion', 'view_promotion'
|
|
41
|
+
];
|
|
42
|
+
if (ecommerceEvents.includes(lowercaseName)) {
|
|
43
|
+
return 'Ecommerce';
|
|
44
|
+
}
|
|
45
|
+
// Firebase System Auto-events
|
|
46
|
+
const systemEvents = [
|
|
47
|
+
'first_open', 'session_start', 'user_engagement',
|
|
48
|
+
'app_clear_data', 'app_exception', 'app_update', 'os_update',
|
|
49
|
+
'notification_receive', 'notification_open', 'notification_dismiss',
|
|
50
|
+
'screen_active', 'screen_inactive'
|
|
51
|
+
];
|
|
52
|
+
if (systemEvents.includes(lowercaseName) || lowercaseName.startsWith('firebase_') || lowercaseName.startsWith('_')) {
|
|
53
|
+
return 'System';
|
|
54
|
+
}
|
|
55
|
+
return 'Custom';
|
|
33
56
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
57
|
+
function getCategoryColors(category) {
|
|
58
|
+
switch (category) {
|
|
59
|
+
case 'Page View':
|
|
60
|
+
return {
|
|
61
|
+
bg: AppColors.blueBg,
|
|
62
|
+
border: AppColors.blueBorder,
|
|
63
|
+
text: AppColors.blue800,
|
|
64
|
+
};
|
|
65
|
+
case 'Ecommerce':
|
|
66
|
+
return {
|
|
67
|
+
bg: AppColors.greenBg,
|
|
68
|
+
border: AppColors.greenBorder,
|
|
69
|
+
text: AppColors.materialGreen,
|
|
70
|
+
};
|
|
71
|
+
case 'System':
|
|
72
|
+
return {
|
|
73
|
+
bg: AppColors.greyBg,
|
|
74
|
+
border: AppColors.greyBorder,
|
|
75
|
+
text: AppColors.grey600,
|
|
76
|
+
};
|
|
77
|
+
default:
|
|
78
|
+
return {
|
|
79
|
+
bg: AppColors.purpleBg,
|
|
80
|
+
border: AppColors.purpleBorder,
|
|
81
|
+
text: AppColors.purpleText,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
43
84
|
}
|
|
44
85
|
// ─── Component ────────────────────────────────────────────────────────────────
|
|
45
86
|
const AnalyticsEventCard = React.memo(function AnalyticsEventCard({ event, onPress, isNew = false, searchStr = '', msSincePrev, computedScreenName, }) {
|
|
@@ -89,6 +130,19 @@ const AnalyticsEventCard = React.memo(function AnalyticsEventCard({ event, onPre
|
|
|
89
130
|
<HighlightText text={event.name} search={searchStr} style={[cardStyles.eventName, { color: color }]} highlightStyle={cardStyles.highlight}/>
|
|
90
131
|
</View>
|
|
91
132
|
|
|
133
|
+
{(() => {
|
|
134
|
+
const category = getEventCategory(event.name);
|
|
135
|
+
const tagColors = getCategoryColors(category);
|
|
136
|
+
return (<View style={[
|
|
137
|
+
cardStyles.categoryBadge,
|
|
138
|
+
{ backgroundColor: tagColors.bg, borderColor: tagColors.border },
|
|
139
|
+
]}>
|
|
140
|
+
<Text style={[cardStyles.categoryText, { color: tagColors.text }]}>
|
|
141
|
+
{category}
|
|
142
|
+
</Text>
|
|
143
|
+
</View>);
|
|
144
|
+
})()}
|
|
145
|
+
|
|
92
146
|
{event.count !== undefined ? (<View style={[
|
|
93
147
|
cardStyles.duplicateBadge,
|
|
94
148
|
event.count === 1 && {
|
|
@@ -112,20 +166,24 @@ const AnalyticsEventCard = React.memo(function AnalyticsEventCard({ event, onPre
|
|
|
112
166
|
{/* Bottom Row: Metadata Chips & Sparkline */}
|
|
113
167
|
<View style={cardStyles.cardBody}>
|
|
114
168
|
<View style={cardStyles.chipsRow}>
|
|
115
|
-
{
|
|
116
|
-
|
|
117
|
-
event.params?.firebase_screen ||
|
|
118
|
-
event.params?.screen_name ||
|
|
119
|
-
event.params?.firebase_screen_class ? (<View style={[cardStyles.chip, { backgroundColor: AppColors.grayBackground, borderColor: AppColors.grayBorderSecondary }]}>
|
|
120
|
-
<View style={[cardStyles.screenDot, { backgroundColor: color }]}/>
|
|
121
|
-
<Text style={[cardStyles.chipText, { color: AppColors.grayText }]} numberOfLines={1}>
|
|
122
|
-
{computedScreenName ||
|
|
169
|
+
{(() => {
|
|
170
|
+
const rawScreenName = computedScreenName ||
|
|
123
171
|
event.screenName ||
|
|
124
172
|
event.params?.firebase_screen ||
|
|
125
173
|
event.params?.screen_name ||
|
|
126
|
-
event.params?.firebase_screen_class
|
|
127
|
-
|
|
128
|
-
|
|
174
|
+
event.params?.firebase_screen_class;
|
|
175
|
+
if (!rawScreenName)
|
|
176
|
+
return null;
|
|
177
|
+
const screenNameStr = typeof rawScreenName === 'object'
|
|
178
|
+
? JSON.stringify(rawScreenName)
|
|
179
|
+
: String(rawScreenName);
|
|
180
|
+
return (<View style={[cardStyles.chip, { backgroundColor: AppColors.grayBackground, borderColor: AppColors.grayBorderSecondary }]}>
|
|
181
|
+
<View style={[cardStyles.screenDot, { backgroundColor: color }]}/>
|
|
182
|
+
<Text style={[cardStyles.chipText, { color: AppColors.grayText }]} numberOfLines={1}>
|
|
183
|
+
{screenNameStr}
|
|
184
|
+
</Text>
|
|
185
|
+
</View>);
|
|
186
|
+
})()}
|
|
129
187
|
|
|
130
188
|
<View style={[cardStyles.chip, { backgroundColor: AppColors.grayBackground, borderColor: AppColors.grayBorderSecondary }]}>
|
|
131
189
|
<Text style={[cardStyles.chipText, { color: AppColors.grayText }]}>
|
|
@@ -140,8 +198,8 @@ const AnalyticsEventCard = React.memo(function AnalyticsEventCard({ event, onPre
|
|
|
140
198
|
{(() => {
|
|
141
199
|
const items = event.params?.items;
|
|
142
200
|
if (Array.isArray(items) && items.length > 0) {
|
|
143
|
-
return (<View style={[cardStyles.chip, { backgroundColor:
|
|
144
|
-
<Text style={[cardStyles.chipText, { color:
|
|
201
|
+
return (<View style={[cardStyles.chip, { backgroundColor: AppColors.amberBg, borderColor: AppColors.amberBorder }]}>
|
|
202
|
+
<Text style={[cardStyles.chipText, { color: AppColors.amber700, fontFamily: AppFonts.interBold }]}>
|
|
145
203
|
🛒 {items.length} {items.length === 1 ? 'item' : 'items'}
|
|
146
204
|
</Text>
|
|
147
205
|
</View>);
|
|
@@ -155,8 +213,8 @@ const AnalyticsEventCard = React.memo(function AnalyticsEventCard({ event, onPre
|
|
|
155
213
|
const isPrimitive = typeof val === 'string' || typeof val === 'number';
|
|
156
214
|
if (isPrimitive) {
|
|
157
215
|
const currencyStr = typeof currency === 'string' || typeof currency === 'number' ? String(currency) : '';
|
|
158
|
-
return (<View style={[cardStyles.chip, { backgroundColor:
|
|
159
|
-
<Text style={[cardStyles.chipText, { color:
|
|
216
|
+
return (<View style={[cardStyles.chip, { backgroundColor: AppColors.emeraldBg, borderColor: AppColors.emeraldBorder }]}>
|
|
217
|
+
<Text style={[cardStyles.chipText, { color: AppColors.emerald600, fontFamily: AppFonts.interBold }]}>
|
|
160
218
|
💰 {String(val)} {currencyStr}
|
|
161
219
|
</Text>
|
|
162
220
|
</View>);
|
|
@@ -185,12 +243,12 @@ const cardStyles = StyleSheet.create({
|
|
|
185
243
|
letterSpacing: 0.5,
|
|
186
244
|
},
|
|
187
245
|
modernCard: {
|
|
188
|
-
backgroundColor:
|
|
246
|
+
backgroundColor: AppColors.white,
|
|
189
247
|
borderRadius: 8,
|
|
190
248
|
borderWidth: 1,
|
|
191
|
-
borderColor:
|
|
249
|
+
borderColor: AppColors.dividerColor,
|
|
192
250
|
padding: 8,
|
|
193
|
-
shadowColor:
|
|
251
|
+
shadowColor: AppColors.black,
|
|
194
252
|
shadowOpacity: 0.03,
|
|
195
253
|
shadowRadius: 3,
|
|
196
254
|
shadowOffset: { width: 0, height: 1 },
|
|
@@ -220,7 +278,7 @@ const cardStyles = StyleSheet.create({
|
|
|
220
278
|
color: AppColors.grayTextWeak,
|
|
221
279
|
},
|
|
222
280
|
highlight: {
|
|
223
|
-
backgroundColor:
|
|
281
|
+
backgroundColor: AppColors.yellowHighlight,
|
|
224
282
|
color: AppColors.primaryBlack,
|
|
225
283
|
borderRadius: 2,
|
|
226
284
|
},
|
|
@@ -258,8 +316,8 @@ const cardStyles = StyleSheet.create({
|
|
|
258
316
|
marginRight: 4,
|
|
259
317
|
},
|
|
260
318
|
duplicateBadge: {
|
|
261
|
-
backgroundColor:
|
|
262
|
-
borderColor:
|
|
319
|
+
backgroundColor: AppColors.roseBg,
|
|
320
|
+
borderColor: AppColors.roseBorder,
|
|
263
321
|
borderWidth: 1,
|
|
264
322
|
paddingHorizontal: 5,
|
|
265
323
|
paddingVertical: 2,
|
|
@@ -268,7 +326,19 @@ const cardStyles = StyleSheet.create({
|
|
|
268
326
|
duplicateText: {
|
|
269
327
|
fontFamily: AppFonts.interBold,
|
|
270
328
|
fontSize: 9,
|
|
271
|
-
color:
|
|
329
|
+
color: AppColors.rose600,
|
|
330
|
+
textTransform: 'uppercase',
|
|
331
|
+
letterSpacing: 0.5,
|
|
332
|
+
},
|
|
333
|
+
categoryBadge: {
|
|
334
|
+
borderWidth: 1,
|
|
335
|
+
paddingHorizontal: 5,
|
|
336
|
+
paddingVertical: 2,
|
|
337
|
+
borderRadius: 4,
|
|
338
|
+
},
|
|
339
|
+
categoryText: {
|
|
340
|
+
fontFamily: AppFonts.interBold,
|
|
341
|
+
fontSize: 9,
|
|
272
342
|
textTransform: 'uppercase',
|
|
273
343
|
letterSpacing: 0.5,
|
|
274
344
|
},
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
event: AnalyticsEvent;
|
|
5
|
-
accentColor: string;
|
|
6
|
-
}
|
|
7
|
-
declare const AnalyticsGraph: ({ event, accentColor }: Props) => React.JSX.Element;
|
|
2
|
+
import { AnalyticsGraphProps } from '../types';
|
|
3
|
+
declare const AnalyticsGraph: ({ event, accentColor }: AnalyticsGraphProps) => React.JSX.Element;
|
|
8
4
|
export default AnalyticsGraph;
|
|
@@ -53,7 +53,7 @@ const AnalyticsGraph = ({ event, accentColor }) => {
|
|
|
53
53
|
const typeData = [
|
|
54
54
|
{ label: 'Strings', value: paramTypes.string, color: AppColors.purple },
|
|
55
55
|
{ label: 'Numbers', value: paramTypes.number, color: AppColors.skyBlue },
|
|
56
|
-
{ label: 'Booleans', value: paramTypes.boolean, color:
|
|
56
|
+
{ label: 'Booleans', value: paramTypes.boolean, color: AppColors.amber500 }, // Amber
|
|
57
57
|
{ label: 'Objects', value: paramTypes.object, color: AppColors.greenColor },
|
|
58
58
|
].filter(d => d.value > 0);
|
|
59
59
|
strings.sort((a, b) => b.value - a.value);
|
|
@@ -94,7 +94,7 @@ const AnalyticsGraph = ({ event, accentColor }) => {
|
|
|
94
94
|
<BarChart data={filteredItems.map((item, i) => ({
|
|
95
95
|
label: item.item_name || item.item_id || `Item ${i + 1}`,
|
|
96
96
|
value: item.price,
|
|
97
|
-
}))} accentColor={AppColors.successGreen
|
|
97
|
+
}))} accentColor={AppColors.successGreen} maxBarWidth={maxBarWidth} isGradient={false}/>
|
|
98
98
|
</View>)}
|
|
99
99
|
</View>);
|
|
100
100
|
};
|
|
@@ -181,12 +181,12 @@ const GaugeChart = ({ data, accentColor, }) => {
|
|
|
181
181
|
paddingTop: 6,
|
|
182
182
|
paddingBottom: 6,
|
|
183
183
|
}}>
|
|
184
|
-
{data.map(
|
|
184
|
+
{data.map(d => {
|
|
185
185
|
const fillPct = Math.min(Math.abs(d.value) / maxVal, 1);
|
|
186
186
|
const strokeDashoffset = Math.max(circumference - fillPct * circumference, 0.001); // avoid exact 0
|
|
187
187
|
return (<View key={d.label} style={{ alignItems: 'center', width: 70 }}>
|
|
188
188
|
<Svg width="60" height="60" viewBox="0 0 60 60">
|
|
189
|
-
<Circle cx="30" cy="30" r={radius} stroke=
|
|
189
|
+
<Circle cx="30" cy="30" r={radius} stroke={AppColors.grayBorderSecondary} strokeWidth={stroke} fill="none"/>
|
|
190
190
|
<Circle cx="30" cy="30" r={radius} stroke={accentColor} strokeWidth={stroke} fill="none" strokeLinecap="round" strokeDasharray={circumference} strokeDashoffset={strokeDashoffset} rotation="-90" origin="30, 30"/>
|
|
191
191
|
</Svg>
|
|
192
192
|
<View style={{
|
|
@@ -248,12 +248,12 @@ const CalendarChart = ({ data, accentColor, }) => {
|
|
|
248
248
|
<View style={{
|
|
249
249
|
width: 58,
|
|
250
250
|
height: 62,
|
|
251
|
-
backgroundColor:
|
|
251
|
+
backgroundColor: AppColors.white,
|
|
252
252
|
borderRadius: 8,
|
|
253
253
|
borderWidth: 1,
|
|
254
254
|
borderColor: AppColors.grayBorderSecondary,
|
|
255
255
|
overflow: 'hidden',
|
|
256
|
-
shadowColor:
|
|
256
|
+
shadowColor: AppColors.black,
|
|
257
257
|
shadowOpacity: 0.05,
|
|
258
258
|
shadowRadius: 4,
|
|
259
259
|
shadowOffset: { width: 0, height: 2 },
|
|
@@ -269,7 +269,7 @@ const CalendarChart = ({ data, accentColor, }) => {
|
|
|
269
269
|
<Text style={{
|
|
270
270
|
fontFamily: AppFonts.interBold,
|
|
271
271
|
fontSize: 9,
|
|
272
|
-
color:
|
|
272
|
+
color: AppColors.white,
|
|
273
273
|
textTransform: 'uppercase',
|
|
274
274
|
letterSpacing: 0.5,
|
|
275
275
|
}}>
|
|
@@ -281,7 +281,7 @@ const CalendarChart = ({ data, accentColor, }) => {
|
|
|
281
281
|
flex: 1,
|
|
282
282
|
justifyContent: 'center',
|
|
283
283
|
alignItems: 'center',
|
|
284
|
-
backgroundColor:
|
|
284
|
+
backgroundColor: AppColors.grayBackground,
|
|
285
285
|
}}>
|
|
286
286
|
<Text style={{
|
|
287
287
|
fontFamily: AppFonts.interBold,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AnalyticsEvent } from '../types';
|
|
3
|
+
interface AnalyticsTabViewProps {
|
|
4
|
+
analyticsSearch: string;
|
|
5
|
+
onSetAnalyticsSearch: (val: string) => void;
|
|
6
|
+
onDeleteEvents: () => void;
|
|
7
|
+
selectedEvent: AnalyticsEvent | null;
|
|
8
|
+
onSelectEvent: (event: AnalyticsEvent | null) => void;
|
|
9
|
+
filteredAnalyticsEvents: AnalyticsEvent[];
|
|
10
|
+
visibleAnalyticsEvents: AnalyticsEvent[];
|
|
11
|
+
currentUserProperties: Record<string, any>;
|
|
12
|
+
currentUserId: string | null;
|
|
13
|
+
}
|
|
14
|
+
export declare const AnalyticsTabView: React.FC<AnalyticsTabViewProps>;
|
|
15
|
+
export default AnalyticsTabView;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FlatList, Pressable, Text, TextInput, View, } from 'react-native';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import TouchableScale from './TouchableScale';
|
|
5
|
+
import AnalyticsEventCard from './AnalyticsEventCard';
|
|
6
|
+
import AnalyticsDetail from './AnalyticsDetail';
|
|
7
|
+
import EmptyState from './EmptyState';
|
|
8
|
+
import AnimatedEntrance from './AnimatedEntrance';
|
|
9
|
+
import { SearchIcon, ClearIcon, WipeIcon, UserIcon, } from './NetworkIcons';
|
|
10
|
+
import { AppColors } from '../styles/AppColors';
|
|
11
|
+
import { AppFonts } from '../styles/AppFonts';
|
|
12
|
+
import styles from '../styles';
|
|
13
|
+
export const AnalyticsTabView = React.memo(({ analyticsSearch, onSetAnalyticsSearch, onDeleteEvents, selectedEvent, onSelectEvent, filteredAnalyticsEvents, visibleAnalyticsEvents, currentUserProperties, currentUserId, }) => {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
const [userPropsExpanded, setUserPropsExpanded] = React.useState(false);
|
|
16
|
+
const renderItem = React.useCallback(({ item, index }) => (<AnimatedEntrance index={index} distance={8}>
|
|
17
|
+
<AnalyticsEventCard event={item} searchStr={analyticsSearch} onPress={() => onSelectEvent(item)}/>
|
|
18
|
+
</AnimatedEntrance>), [analyticsSearch, onSelectEvent]);
|
|
19
|
+
const keyExtractor = React.useCallback((item, index) => item.id != null ? item.id.toString() : index.toString(), []);
|
|
20
|
+
const renderAnalyticsHeader = () => {
|
|
21
|
+
const hasProps = Object.keys(currentUserProperties ?? {}).length > 0;
|
|
22
|
+
const total = visibleAnalyticsEvents.length;
|
|
23
|
+
const filtered = filteredAnalyticsEvents.length;
|
|
24
|
+
return (<View style={{ paddingHorizontal: 16, paddingTop: 8, paddingBottom: 4 }}>
|
|
25
|
+
{(hasProps || currentUserId) && (<View style={{
|
|
26
|
+
backgroundColor: AppColors.primaryLight,
|
|
27
|
+
borderRadius: 10,
|
|
28
|
+
borderWidth: 1,
|
|
29
|
+
borderColor: AppColors.grayBorderSecondary,
|
|
30
|
+
marginBottom: 10,
|
|
31
|
+
overflow: 'hidden',
|
|
32
|
+
}}>
|
|
33
|
+
<Pressable onPress={() => setUserPropsExpanded(v => !v)} style={{
|
|
34
|
+
flexDirection: 'row',
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
justifyContent: 'space-between',
|
|
37
|
+
padding: 10,
|
|
38
|
+
backgroundColor: AppColors.grayBackground,
|
|
39
|
+
}}>
|
|
40
|
+
<View style={{
|
|
41
|
+
flexDirection: 'row',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
gap: 6,
|
|
44
|
+
}}>
|
|
45
|
+
<UserIcon color={AppColors.purple} size={14}/>
|
|
46
|
+
<Text style={{
|
|
47
|
+
fontFamily: AppFonts.interBold,
|
|
48
|
+
fontSize: 12,
|
|
49
|
+
color: AppColors.primaryBlack,
|
|
50
|
+
}}>
|
|
51
|
+
{t('analytics.user_context')}
|
|
52
|
+
</Text>
|
|
53
|
+
{currentUserId && (<View style={{
|
|
54
|
+
backgroundColor: 'rgba(104,75,155,0.1)',
|
|
55
|
+
paddingHorizontal: 6,
|
|
56
|
+
paddingVertical: 1,
|
|
57
|
+
borderRadius: 4,
|
|
58
|
+
}}>
|
|
59
|
+
<Text style={{
|
|
60
|
+
fontFamily: AppFonts.interBold,
|
|
61
|
+
fontSize: 9,
|
|
62
|
+
color: AppColors.purple,
|
|
63
|
+
}}>
|
|
64
|
+
{t('analytics.id')}: {currentUserId}
|
|
65
|
+
</Text>
|
|
66
|
+
</View>)}
|
|
67
|
+
</View>
|
|
68
|
+
<Text style={{
|
|
69
|
+
fontFamily: AppFonts.interMedium,
|
|
70
|
+
fontSize: 11,
|
|
71
|
+
color: AppColors.purple,
|
|
72
|
+
}}>
|
|
73
|
+
{userPropsExpanded ? t('analytics.hide_props') : t('analytics.show_props')}
|
|
74
|
+
</Text>
|
|
75
|
+
</Pressable>
|
|
76
|
+
|
|
77
|
+
{userPropsExpanded && hasProps && (<View style={{
|
|
78
|
+
padding: 10,
|
|
79
|
+
borderTopWidth: 1,
|
|
80
|
+
borderTopColor: AppColors.dividerColor,
|
|
81
|
+
gap: 4,
|
|
82
|
+
}}>
|
|
83
|
+
{Object.entries(currentUserProperties ?? {}).map(([k, v]) => (<View key={k} style={{
|
|
84
|
+
flexDirection: 'row',
|
|
85
|
+
justifyContent: 'space-between',
|
|
86
|
+
}}>
|
|
87
|
+
<Text style={{
|
|
88
|
+
fontFamily: AppFonts.interMedium,
|
|
89
|
+
fontSize: 11,
|
|
90
|
+
color: AppColors.grayTextWeak,
|
|
91
|
+
}}>
|
|
92
|
+
{k}
|
|
93
|
+
</Text>
|
|
94
|
+
<Text style={{
|
|
95
|
+
fontFamily: AppFonts.interBold,
|
|
96
|
+
fontSize: 11,
|
|
97
|
+
color: AppColors.primaryBlack,
|
|
98
|
+
}}>
|
|
99
|
+
{String(v)}
|
|
100
|
+
</Text>
|
|
101
|
+
</View>))}
|
|
102
|
+
</View>)}
|
|
103
|
+
</View>)}
|
|
104
|
+
|
|
105
|
+
<Text style={[styles.resultCount, { marginBottom: 4 }]}>
|
|
106
|
+
{t('filters.showing_analytics', { filtered, total })}
|
|
107
|
+
</Text>
|
|
108
|
+
</View>);
|
|
109
|
+
};
|
|
110
|
+
return (<View style={{ flex: 1 }}>
|
|
111
|
+
{selectedEvent != null ? (<AnalyticsDetail event={selectedEvent} onClose={() => onSelectEvent(null)}/>) : (<View style={{ flex: 1 }}>
|
|
112
|
+
<View style={{
|
|
113
|
+
backgroundColor: AppColors.white,
|
|
114
|
+
borderBottomWidth: 1,
|
|
115
|
+
borderBottomColor: AppColors.dividerColor,
|
|
116
|
+
paddingBottom: 6,
|
|
117
|
+
}}>
|
|
118
|
+
<View style={[
|
|
119
|
+
styles.toolbarRow,
|
|
120
|
+
{ marginTop: 12, marginBottom: 8 },
|
|
121
|
+
]}>
|
|
122
|
+
<View style={styles.searchContainer}>
|
|
123
|
+
<SearchIcon color={AppColors.grayTextWeak} size={16}/>
|
|
124
|
+
<TextInput placeholder={t('search.analytics_placeholder')} placeholderTextColor={AppColors.grayTextWeak} value={analyticsSearch} onChangeText={onSetAnalyticsSearch} style={styles.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
125
|
+
{analyticsSearch.length > 0 && (<Pressable onPress={() => onSetAnalyticsSearch('')} hitSlop={10} style={styles.clearBtn}>
|
|
126
|
+
<ClearIcon color={AppColors.grayTextWeak} size={14}/>
|
|
127
|
+
</Pressable>)}
|
|
128
|
+
</View>
|
|
129
|
+
|
|
130
|
+
<View style={styles.toolbarRight}>
|
|
131
|
+
<TouchableScale style={[
|
|
132
|
+
styles.toolbarBtn,
|
|
133
|
+
{
|
|
134
|
+
borderColor: 'rgba(255,46,87,0.22)',
|
|
135
|
+
backgroundColor: 'rgba(255,46,87,0.06)',
|
|
136
|
+
},
|
|
137
|
+
]} onPress={onDeleteEvents} hitSlop={6}>
|
|
138
|
+
<WipeIcon color={AppColors.errorColor} size={15}/>
|
|
139
|
+
</TouchableScale>
|
|
140
|
+
</View>
|
|
141
|
+
</View>
|
|
142
|
+
</View>
|
|
143
|
+
|
|
144
|
+
<FlatList data={filteredAnalyticsEvents} keyExtractor={keyExtractor} ListHeaderComponent={renderAnalyticsHeader} renderItem={renderItem} initialNumToRender={15} maxToRenderPerBatch={15} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState isSearch={analyticsSearch.length > 0}/>} contentContainerStyle={[
|
|
145
|
+
styles.listContent,
|
|
146
|
+
filteredAnalyticsEvents.length === 0 && { flexGrow: 1 },
|
|
147
|
+
]} keyboardShouldPersistTaps="handled"/>
|
|
148
|
+
</View>)}
|
|
149
|
+
</View>);
|
|
150
|
+
});
|
|
151
|
+
export default AnalyticsTabView;
|
|
@@ -8,5 +8,5 @@ interface AnimatedEntranceProps {
|
|
|
8
8
|
index?: number;
|
|
9
9
|
style?: ViewStyle | ViewStyle[];
|
|
10
10
|
}
|
|
11
|
-
declare const AnimatedEntrance:
|
|
11
|
+
declare const AnimatedEntrance: React.NamedExoticComponent<AnimatedEntranceProps>;
|
|
12
12
|
export default AnimatedEntrance;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import { Animated } from 'react-native';
|
|
3
|
-
const AnimatedEntrance = ({ children, delay = 0, distance = 10, duration = 220, index = 0, style, })
|
|
3
|
+
const AnimatedEntrance = React.memo(function AnimatedEntrance({ children, delay = 0, distance = 10, duration = 220, index = 0, style, }) {
|
|
4
4
|
const progress = useRef(new Animated.Value(0)).current;
|
|
5
5
|
useEffect(() => {
|
|
6
6
|
progress.setValue(0);
|
|
@@ -33,5 +33,5 @@ const AnimatedEntrance = ({ children, delay = 0, distance = 10, duration = 220,
|
|
|
33
33
|
]}>
|
|
34
34
|
{children}
|
|
35
35
|
</Animated.View>);
|
|
36
|
-
};
|
|
36
|
+
});
|
|
37
37
|
export default AnimatedEntrance;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NetworkLog } from '../types';
|
|
3
|
+
import { ApiDetailTab } from '../enums';
|
|
4
|
+
interface ApiDetailViewProps {
|
|
5
|
+
selected: NetworkLog;
|
|
6
|
+
apiDetailActiveTab: ApiDetailTab | 'metadata' | 'headers' | 'request' | 'response';
|
|
7
|
+
onSetApiDetailActiveTab: (tab: ApiDetailTab | 'metadata' | 'headers' | 'request' | 'response') => void;
|
|
8
|
+
detailSearch: string;
|
|
9
|
+
onSetDetailSearch: (val: string) => void;
|
|
10
|
+
reqExpanded: boolean;
|
|
11
|
+
onToggleReqExpanded: () => void;
|
|
12
|
+
resExpanded: boolean;
|
|
13
|
+
onToggleResExpanded: () => void;
|
|
14
|
+
showReqDiff: boolean;
|
|
15
|
+
onToggleShowReqDiff: () => void;
|
|
16
|
+
showResDiff: boolean;
|
|
17
|
+
onToggleShowResDiff: () => void;
|
|
18
|
+
prevRequestData: any;
|
|
19
|
+
prevResponseData: any;
|
|
20
|
+
}
|
|
21
|
+
export declare const ApiDetailView: React.FC<ApiDetailViewProps>;
|
|
22
|
+
export default ApiDetailView;
|