react-native-inapp-inspector 1.0.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/LICENSE +21 -0
- package/README.md +97 -0
- package/dist/commonjs/components/AnalyticsDetail.d.ts +6 -0
- package/dist/commonjs/components/AnalyticsDetail.js +558 -0
- package/dist/commonjs/components/AnalyticsEventCard.d.ts +18 -0
- package/dist/commonjs/components/AnalyticsEventCard.js +327 -0
- package/dist/commonjs/components/AnalyticsGraph.d.ts +8 -0
- package/dist/commonjs/components/AnalyticsGraph.js +416 -0
- package/dist/commonjs/components/CodeSnippet.d.ts +8 -0
- package/dist/commonjs/components/CodeSnippet.js +427 -0
- package/dist/commonjs/components/ConsoleLogCard.d.ts +10 -0
- package/dist/commonjs/components/ConsoleLogCard.js +401 -0
- package/dist/commonjs/components/CopyButton.d.ts +4 -0
- package/dist/commonjs/components/CopyButton.js +69 -0
- package/dist/commonjs/components/DiffViewer.d.ts +7 -0
- package/dist/commonjs/components/DiffViewer.js +86 -0
- package/dist/commonjs/components/DomainHeader.d.ts +18 -0
- package/dist/commonjs/components/DomainHeader.js +136 -0
- package/dist/commonjs/components/EmptyState.d.ts +5 -0
- package/dist/commonjs/components/EmptyState.js +40 -0
- package/dist/commonjs/components/HeadersSection.d.ts +4 -0
- package/dist/commonjs/components/HeadersSection.js +155 -0
- package/dist/commonjs/components/HighlightText.d.ts +3 -0
- package/dist/commonjs/components/HighlightText.js +57 -0
- package/dist/commonjs/components/JsonViewer.d.ts +7 -0
- package/dist/commonjs/components/JsonViewer.js +19 -0
- package/dist/commonjs/components/LogCard.d.ts +4 -0
- package/dist/commonjs/components/LogCard.js +179 -0
- package/dist/commonjs/components/MetaAccordion.d.ts +4 -0
- package/dist/commonjs/components/MetaAccordion.js +113 -0
- package/dist/commonjs/components/MiniBarChart.d.ts +7 -0
- package/dist/commonjs/components/MiniBarChart.js +56 -0
- package/dist/commonjs/components/MiniLineChart.d.ts +6 -0
- package/dist/commonjs/components/MiniLineChart.js +58 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +31 -0
- package/dist/commonjs/components/NetworkIcons.js +245 -0
- package/dist/commonjs/components/SectionHeader.d.ts +4 -0
- package/dist/commonjs/components/SectionHeader.js +87 -0
- package/dist/commonjs/components/SourcePageCard.d.ts +4 -0
- package/dist/commonjs/components/SourcePageCard.js +132 -0
- package/dist/commonjs/components/TouchableScale.d.ts +9 -0
- package/dist/commonjs/components/TouchableScale.js +44 -0
- package/dist/commonjs/components/TreeNode.d.ts +4 -0
- package/dist/commonjs/components/TreeNode.js +140 -0
- package/dist/commonjs/constants/index.d.ts +7 -0
- package/dist/commonjs/constants/index.js +35 -0
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +21 -0
- package/dist/commonjs/customHooks/analyticsLogger.js +160 -0
- package/dist/commonjs/customHooks/consoleLogger.d.ts +5 -0
- package/dist/commonjs/customHooks/consoleLogger.js +141 -0
- package/dist/commonjs/customHooks/logFilters.d.ts +5 -0
- package/dist/commonjs/customHooks/logFilters.js +34 -0
- package/dist/commonjs/customHooks/networkLogger.d.ts +20 -0
- package/dist/commonjs/customHooks/networkLogger.js +272 -0
- package/dist/commonjs/customHooks/useAccordion.d.ts +17 -0
- package/dist/commonjs/customHooks/useAccordion.js +48 -0
- package/dist/commonjs/customHooks/webViewLogger.d.ts +22 -0
- package/dist/commonjs/customHooks/webViewLogger.js +412 -0
- package/dist/commonjs/helpers/index.d.ts +20 -0
- package/dist/commonjs/helpers/index.js +229 -0
- package/dist/commonjs/index.d.ts +7 -0
- package/dist/commonjs/index.js +2668 -0
- package/dist/commonjs/styles/AppColors.d.ts +27 -0
- package/dist/commonjs/styles/AppColors.js +30 -0
- package/dist/commonjs/styles/AppFonts.d.ts +7 -0
- package/dist/commonjs/styles/AppFonts.js +10 -0
- package/dist/commonjs/styles/index.d.ts +1488 -0
- package/dist/commonjs/styles/index.js +1357 -0
- package/dist/commonjs/types/index.d.ts +127 -0
- package/dist/commonjs/types/index.js +2 -0
- package/dist/esm/components/AnalyticsDetail.d.ts +6 -0
- package/dist/esm/components/AnalyticsDetail.js +520 -0
- package/dist/esm/components/AnalyticsEventCard.d.ts +18 -0
- package/dist/esm/components/AnalyticsEventCard.js +288 -0
- package/dist/esm/components/AnalyticsGraph.d.ts +8 -0
- package/dist/esm/components/AnalyticsGraph.js +378 -0
- package/dist/esm/components/CodeSnippet.d.ts +8 -0
- package/dist/esm/components/CodeSnippet.js +392 -0
- package/dist/esm/components/ConsoleLogCard.d.ts +10 -0
- package/dist/esm/components/ConsoleLogCard.js +362 -0
- package/dist/esm/components/CopyButton.d.ts +4 -0
- package/dist/esm/components/CopyButton.js +31 -0
- package/dist/esm/components/DiffViewer.d.ts +7 -0
- package/dist/esm/components/DiffViewer.js +48 -0
- package/dist/esm/components/DomainHeader.d.ts +18 -0
- package/dist/esm/components/DomainHeader.js +98 -0
- package/dist/esm/components/EmptyState.d.ts +5 -0
- package/dist/esm/components/EmptyState.js +35 -0
- package/dist/esm/components/HeadersSection.d.ts +4 -0
- package/dist/esm/components/HeadersSection.js +117 -0
- package/dist/esm/components/HighlightText.d.ts +3 -0
- package/dist/esm/components/HighlightText.js +52 -0
- package/dist/esm/components/JsonViewer.d.ts +7 -0
- package/dist/esm/components/JsonViewer.js +14 -0
- package/dist/esm/components/LogCard.d.ts +4 -0
- package/dist/esm/components/LogCard.js +141 -0
- package/dist/esm/components/MetaAccordion.d.ts +4 -0
- package/dist/esm/components/MetaAccordion.js +108 -0
- package/dist/esm/components/MiniBarChart.d.ts +7 -0
- package/dist/esm/components/MiniBarChart.js +18 -0
- package/dist/esm/components/MiniLineChart.d.ts +6 -0
- package/dist/esm/components/MiniLineChart.js +20 -0
- package/dist/esm/components/NetworkIcons.d.ts +31 -0
- package/dist/esm/components/NetworkIcons.js +176 -0
- package/dist/esm/components/SectionHeader.d.ts +4 -0
- package/dist/esm/components/SectionHeader.js +49 -0
- package/dist/esm/components/SourcePageCard.d.ts +4 -0
- package/dist/esm/components/SourcePageCard.js +94 -0
- package/dist/esm/components/TouchableScale.d.ts +9 -0
- package/dist/esm/components/TouchableScale.js +9 -0
- package/dist/esm/components/TreeNode.d.ts +4 -0
- package/dist/esm/components/TreeNode.js +102 -0
- package/dist/esm/constants/index.d.ts +7 -0
- package/dist/esm/constants/index.js +32 -0
- package/dist/esm/customHooks/analyticsLogger.d.ts +21 -0
- package/dist/esm/customHooks/analyticsLogger.js +152 -0
- package/dist/esm/customHooks/consoleLogger.d.ts +5 -0
- package/dist/esm/customHooks/consoleLogger.js +134 -0
- package/dist/esm/customHooks/logFilters.d.ts +5 -0
- package/dist/esm/customHooks/logFilters.js +31 -0
- package/dist/esm/customHooks/networkLogger.d.ts +20 -0
- package/dist/esm/customHooks/networkLogger.js +264 -0
- package/dist/esm/customHooks/useAccordion.d.ts +17 -0
- package/dist/esm/customHooks/useAccordion.js +46 -0
- package/dist/esm/customHooks/webViewLogger.d.ts +22 -0
- package/dist/esm/customHooks/webViewLogger.js +365 -0
- package/dist/esm/helpers/index.d.ts +20 -0
- package/dist/esm/helpers/index.js +207 -0
- package/dist/esm/index.d.ts +7 -0
- package/dist/esm/index.js +2611 -0
- package/dist/esm/styles/AppColors.d.ts +27 -0
- package/dist/esm/styles/AppColors.js +27 -0
- package/dist/esm/styles/AppFonts.d.ts +7 -0
- package/dist/esm/styles/AppFonts.js +7 -0
- package/dist/esm/styles/index.d.ts +1488 -0
- package/dist/esm/styles/index.js +1355 -0
- package/dist/esm/types/index.d.ts +127 -0
- package/dist/esm/types/index.js +1 -0
- package/fonts/Inter/Inter.ttc +0 -0
- package/fonts/Inter/InterVariable-Italic.ttf +0 -0
- package/fonts/Inter/InterVariable.ttf +0 -0
- package/fonts/Inter/LICENSE.txt +92 -0
- package/fonts/Inter/extras/otf/Inter-Black.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-BlackItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-Bold.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-BoldItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-ExtraBold.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-ExtraBoldItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-ExtraLight.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-ExtraLightItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-Italic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-Light.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-LightItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-Medium.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-MediumItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-Regular.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-SemiBold.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-SemiBoldItalic.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-Thin.otf +0 -0
- package/fonts/Inter/extras/otf/Inter-ThinItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Black.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-BlackItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Bold.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-BoldItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-ExtraBold.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-ExtraBoldItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-ExtraLight.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-ExtraLightItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Italic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Light.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-LightItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Medium.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-MediumItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Regular.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-SemiBold.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-SemiBoldItalic.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-Thin.otf +0 -0
- package/fonts/Inter/extras/otf/InterDisplay-ThinItalic.otf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Black.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-BlackItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Bold.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-BoldItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-ExtraBold.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-ExtraBoldItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-ExtraLight.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-ExtraLightItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Italic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Light.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-LightItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Medium.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-MediumItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Regular.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-SemiBold.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-SemiBoldItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-Thin.ttf +0 -0
- package/fonts/Inter/extras/ttf/Inter-ThinItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Black.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-BlackItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Bold.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-BoldItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-ExtraBold.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-ExtraBoldItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-ExtraLight.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-ExtraLightItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Italic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Light.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-LightItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Medium.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-MediumItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Regular.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-SemiBold.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-SemiBoldItalic.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-Thin.ttf +0 -0
- package/fonts/Inter/extras/ttf/InterDisplay-ThinItalic.ttf +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Black.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-BlackItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Bold.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-BoldItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-ExtraBold.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-ExtraBoldItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-ExtraLight.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-ExtraLightItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Italic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Light.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-LightItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Medium.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-MediumItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Regular.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-SemiBold.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-SemiBoldItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-Thin.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/Inter-ThinItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Black.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-BlackItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Bold.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-BoldItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-ExtraBold.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-ExtraBoldItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-ExtraLight.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-ExtraLightItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Italic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Light.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-LightItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Medium.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-MediumItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Regular.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-SemiBold.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-SemiBoldItalic.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-Thin.woff2 +0 -0
- package/fonts/Inter/extras/woff-hinted/InterDisplay-ThinItalic.woff2 +0 -0
- package/fonts/Inter/help.txt +165 -0
- package/fonts/Inter/web/Inter-Black.woff2 +0 -0
- package/fonts/Inter/web/Inter-BlackItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-Bold.woff2 +0 -0
- package/fonts/Inter/web/Inter-BoldItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-ExtraBold.woff2 +0 -0
- package/fonts/Inter/web/Inter-ExtraBoldItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-ExtraLight.woff2 +0 -0
- package/fonts/Inter/web/Inter-ExtraLightItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-Italic.woff2 +0 -0
- package/fonts/Inter/web/Inter-Light.woff2 +0 -0
- package/fonts/Inter/web/Inter-LightItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-Medium.woff2 +0 -0
- package/fonts/Inter/web/Inter-MediumItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-Regular.woff2 +0 -0
- package/fonts/Inter/web/Inter-SemiBold.woff2 +0 -0
- package/fonts/Inter/web/Inter-SemiBoldItalic.woff2 +0 -0
- package/fonts/Inter/web/Inter-Thin.woff2 +0 -0
- package/fonts/Inter/web/Inter-ThinItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Black.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-BlackItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Bold.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-BoldItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-ExtraBold.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-ExtraBoldItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-ExtraLight.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-ExtraLightItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Italic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Light.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-LightItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Medium.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-MediumItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Regular.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-SemiBold.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-SemiBoldItalic.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-Thin.woff2 +0 -0
- package/fonts/Inter/web/InterDisplay-ThinItalic.woff2 +0 -0
- package/fonts/Inter/web/InterVariable-Italic.woff2 +0 -0
- package/fonts/Inter/web/InterVariable.woff2 +0 -0
- package/fonts/Inter/web/inter.css +148 -0
- package/package.json +52 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ActiveTab = 'apis' | 'analytics' | 'logs' | 'webview';
|
|
3
|
+
export interface ConsoleLog {
|
|
4
|
+
id: number;
|
|
5
|
+
type: 'info' | 'warn' | 'error';
|
|
6
|
+
message: string;
|
|
7
|
+
timestamp: number;
|
|
8
|
+
caller?: string;
|
|
9
|
+
sourceMethod?: 'log' | 'info' | 'warn' | 'error';
|
|
10
|
+
}
|
|
11
|
+
export interface AnalyticsEvent {
|
|
12
|
+
id: number;
|
|
13
|
+
name: string;
|
|
14
|
+
screenName: string;
|
|
15
|
+
screenClass: string;
|
|
16
|
+
userId: string;
|
|
17
|
+
params: Record<string, any>;
|
|
18
|
+
userProperties: Record<string, any>;
|
|
19
|
+
timestamp: number;
|
|
20
|
+
source: 'firebase' | 'manual';
|
|
21
|
+
raw?: string;
|
|
22
|
+
trackingId?: string;
|
|
23
|
+
clientId?: string;
|
|
24
|
+
sessionId?: string;
|
|
25
|
+
pageTitle?: string;
|
|
26
|
+
pageLocation?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface NetworkLog {
|
|
29
|
+
id: number;
|
|
30
|
+
url: string;
|
|
31
|
+
method: string;
|
|
32
|
+
status: number | null;
|
|
33
|
+
duration: number | null;
|
|
34
|
+
startTime: number;
|
|
35
|
+
request?: unknown;
|
|
36
|
+
response?: unknown;
|
|
37
|
+
requestHeaders?: Record<string, string>;
|
|
38
|
+
responseHeaders?: Record<string, string>;
|
|
39
|
+
}
|
|
40
|
+
export interface RouteInfo {
|
|
41
|
+
path: string;
|
|
42
|
+
params: any;
|
|
43
|
+
}
|
|
44
|
+
export type Method = 'ALL' | 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
45
|
+
export type StatusFilter = 'ALL' | '2xx' | '3xx' | '4xx' | '5xx' | 'Failed';
|
|
46
|
+
export type SortOrder = 'newest' | 'oldest';
|
|
47
|
+
export type LocalFilter = 'success' | 'failed' | 'loading';
|
|
48
|
+
export type GroupedListItem = {
|
|
49
|
+
type: 'header';
|
|
50
|
+
id: string;
|
|
51
|
+
pageName: string;
|
|
52
|
+
color: string;
|
|
53
|
+
stats: {
|
|
54
|
+
success: number;
|
|
55
|
+
failed: number;
|
|
56
|
+
loading: number;
|
|
57
|
+
};
|
|
58
|
+
timestamp: number;
|
|
59
|
+
activeFilters: Set<LocalFilter>;
|
|
60
|
+
isCollapsed: boolean;
|
|
61
|
+
isFirst: boolean;
|
|
62
|
+
} | {
|
|
63
|
+
type: 'log';
|
|
64
|
+
id: number;
|
|
65
|
+
log: NetworkLog;
|
|
66
|
+
isLast: boolean;
|
|
67
|
+
color: string;
|
|
68
|
+
};
|
|
69
|
+
export type DiffResult = {
|
|
70
|
+
type: 'added' | 'removed' | 'changed';
|
|
71
|
+
path: string;
|
|
72
|
+
oldVal?: any;
|
|
73
|
+
newVal?: any;
|
|
74
|
+
};
|
|
75
|
+
export interface CopyButtonProps {
|
|
76
|
+
value: unknown;
|
|
77
|
+
label: string;
|
|
78
|
+
iconType?: 'copy' | 'terminal' | 'fetch';
|
|
79
|
+
}
|
|
80
|
+
export interface SectionHeaderProps {
|
|
81
|
+
title: string;
|
|
82
|
+
value: unknown;
|
|
83
|
+
expanded: boolean | undefined;
|
|
84
|
+
onToggleExpand: () => void;
|
|
85
|
+
showDiff?: boolean;
|
|
86
|
+
isDiffing?: boolean;
|
|
87
|
+
onToggleDiff?: () => void;
|
|
88
|
+
}
|
|
89
|
+
export interface TreeNodeProps {
|
|
90
|
+
data: unknown;
|
|
91
|
+
name?: string | number;
|
|
92
|
+
level?: number;
|
|
93
|
+
search?: string;
|
|
94
|
+
forceOpen?: boolean;
|
|
95
|
+
}
|
|
96
|
+
export interface LogCardProps {
|
|
97
|
+
item: NetworkLog;
|
|
98
|
+
onPress: () => void;
|
|
99
|
+
timelineMinStart: number;
|
|
100
|
+
timelineTotalRange: number;
|
|
101
|
+
isNew?: boolean;
|
|
102
|
+
isSelected: boolean;
|
|
103
|
+
onToggleSelect: (id: number) => void;
|
|
104
|
+
searchStr?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface MetaAccordionProps {
|
|
107
|
+
status: number | null;
|
|
108
|
+
statusColor: string;
|
|
109
|
+
duration: number | null;
|
|
110
|
+
size: string;
|
|
111
|
+
triggeredAt: string;
|
|
112
|
+
}
|
|
113
|
+
export interface HeadersSectionProps {
|
|
114
|
+
title: string;
|
|
115
|
+
headers: Record<string, string> | undefined;
|
|
116
|
+
search?: string;
|
|
117
|
+
resetKey?: string | number;
|
|
118
|
+
}
|
|
119
|
+
export interface SourcePageCardProps {
|
|
120
|
+
routeInfo: RouteInfo;
|
|
121
|
+
}
|
|
122
|
+
export interface SectionCardProps {
|
|
123
|
+
title?: string;
|
|
124
|
+
count?: number;
|
|
125
|
+
accentColor?: string;
|
|
126
|
+
children?: React.ReactNode;
|
|
127
|
+
}
|
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Pressable, ScrollView, StyleSheet, Text, TextInput, View, } from 'react-native';
|
|
3
|
+
import LinearGradient from 'react-native-linear-gradient';
|
|
4
|
+
// Components
|
|
5
|
+
import CopyButton from './CopyButton';
|
|
6
|
+
import JsonViewer from './JsonViewer';
|
|
7
|
+
// Icons
|
|
8
|
+
import { ClearIcon } from './NetworkIcons';
|
|
9
|
+
// Utils
|
|
10
|
+
import { AppFonts } from '../styles/AppFonts';
|
|
11
|
+
// Stylesheet
|
|
12
|
+
import { AppColors } from '../styles/AppColors';
|
|
13
|
+
import styles from '../styles';
|
|
14
|
+
import { getEventColor } from './AnalyticsEventCard';
|
|
15
|
+
// Helpers
|
|
16
|
+
import { formatDateTimeToAnalytics } from '../helpers';
|
|
17
|
+
// Sub Components
|
|
18
|
+
const ParamRowItem = ({ paramKey, value, }) => {
|
|
19
|
+
const isObject = typeof value === 'object' && value !== null;
|
|
20
|
+
const valStr = isObject ? JSON.stringify(value, null, 2) : String(value);
|
|
21
|
+
const [expanded, setExpanded] = useState(false);
|
|
22
|
+
const isLong = valStr.length > 80 || valStr.includes('\n') || isObject;
|
|
23
|
+
return (<View style={detailStyles.dataBox}>
|
|
24
|
+
<View style={detailStyles.dataBoxHeader}>
|
|
25
|
+
<Text style={detailStyles.dataBoxKey} numberOfLines={1}>
|
|
26
|
+
{paramKey}
|
|
27
|
+
</Text>
|
|
28
|
+
<CopyButton value={valStr} label={paramKey}/>
|
|
29
|
+
</View>
|
|
30
|
+
{expanded && isObject ? (<View style={detailStyles.jsonBlock}>
|
|
31
|
+
<JsonViewer data={value}/>
|
|
32
|
+
</View>) : (<Text style={detailStyles.dataBoxVal} selectable numberOfLines={expanded ? undefined : 2}>
|
|
33
|
+
{valStr}
|
|
34
|
+
</Text>)}
|
|
35
|
+
{isLong && (<Pressable onPress={() => setExpanded(!expanded)} style={detailStyles.showMoreBtn}>
|
|
36
|
+
<Text style={detailStyles.showMoreText}>
|
|
37
|
+
{expanded ? 'Show Less' : 'Show More'}
|
|
38
|
+
</Text>
|
|
39
|
+
</Pressable>)}
|
|
40
|
+
</View>);
|
|
41
|
+
};
|
|
42
|
+
const ParamTable = ({ data, emptyLabel, }) => {
|
|
43
|
+
const entries = Object.keys(data).map(key => ({
|
|
44
|
+
key,
|
|
45
|
+
value: data[key],
|
|
46
|
+
}));
|
|
47
|
+
if (entries.length === 0) {
|
|
48
|
+
return (<View style={detailStyles.emptyParams}>
|
|
49
|
+
<Text style={detailStyles.emptyParamsText}>
|
|
50
|
+
{emptyLabel ?? 'No parameters'}
|
|
51
|
+
</Text>
|
|
52
|
+
</View>);
|
|
53
|
+
}
|
|
54
|
+
return (<View style={detailStyles.paramList}>
|
|
55
|
+
{entries.map(({ key, value }) => (<ParamRowItem key={key} paramKey={key} value={value}/>))}
|
|
56
|
+
</View>);
|
|
57
|
+
};
|
|
58
|
+
const SectionCard = ({ title, children, count, accentColor = AppColors.purple, }) => {
|
|
59
|
+
if (!title) {
|
|
60
|
+
return (<View style={{ paddingHorizontal: 16, paddingTop: 12, paddingBottom: 20 }}>
|
|
61
|
+
{children}
|
|
62
|
+
</View>);
|
|
63
|
+
}
|
|
64
|
+
return (<View style={detailStyles.sectionCard}>
|
|
65
|
+
<View style={detailStyles.sectionHeader}>
|
|
66
|
+
<View style={detailStyles.sectionTitleRow}>
|
|
67
|
+
<View style={[
|
|
68
|
+
detailStyles.sectionAccentDot,
|
|
69
|
+
{ backgroundColor: accentColor },
|
|
70
|
+
]}/>
|
|
71
|
+
<Text style={detailStyles.sectionTitle}>{title.toUpperCase()}</Text>
|
|
72
|
+
</View>
|
|
73
|
+
{typeof count === 'number' && (<View style={[
|
|
74
|
+
detailStyles.countBadge,
|
|
75
|
+
{
|
|
76
|
+
borderColor: `${accentColor}55`,
|
|
77
|
+
backgroundColor: `${accentColor}12`,
|
|
78
|
+
},
|
|
79
|
+
]}>
|
|
80
|
+
<Text style={[detailStyles.countBadgeText, { color: accentColor }]}>
|
|
81
|
+
{count}
|
|
82
|
+
</Text>
|
|
83
|
+
</View>)}
|
|
84
|
+
</View>
|
|
85
|
+
<View style={{ paddingHorizontal: 14, paddingBottom: 14 }}>{children}</View>
|
|
86
|
+
</View>);
|
|
87
|
+
};
|
|
88
|
+
const AnalyticsDetail = ({ event, }) => {
|
|
89
|
+
const [search, setSearch] = useState('');
|
|
90
|
+
const [activeTab, setActiveTab] = useState('unformatted');
|
|
91
|
+
const SOURCE_COLORS = {
|
|
92
|
+
firebase: '#E07B1A',
|
|
93
|
+
manual: AppColors.purple,
|
|
94
|
+
};
|
|
95
|
+
const params = event.params ?? {};
|
|
96
|
+
const userProperties = event.userProperties ?? {};
|
|
97
|
+
const eventColor = getEventColor(event.name);
|
|
98
|
+
const sourceColor = SOURCE_COLORS[event.source] ?? AppColors.purple;
|
|
99
|
+
const paramCount = Object.keys(params).length;
|
|
100
|
+
const upCount = Object.keys(userProperties).length;
|
|
101
|
+
const topMetrics = [];
|
|
102
|
+
if (event.screenName) {
|
|
103
|
+
topMetrics.push({
|
|
104
|
+
key: 'Screen',
|
|
105
|
+
value: event.screenName,
|
|
106
|
+
color: AppColors.skyBlue,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if (event.userId) {
|
|
110
|
+
topMetrics.push({
|
|
111
|
+
key: 'User ID',
|
|
112
|
+
value: event.userId,
|
|
113
|
+
color: AppColors.greenColor,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
if (event.pageTitle) {
|
|
117
|
+
topMetrics.push({
|
|
118
|
+
key: 'Page',
|
|
119
|
+
value: event.pageTitle,
|
|
120
|
+
color: AppColors.purple,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
if (params?.primary_category) {
|
|
124
|
+
topMetrics.push({
|
|
125
|
+
key: 'Category',
|
|
126
|
+
value: String(params.primary_category),
|
|
127
|
+
color: AppColors.purple,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
if (params?.flow) {
|
|
131
|
+
topMetrics.push({
|
|
132
|
+
key: 'Flow',
|
|
133
|
+
value: String(params.flow),
|
|
134
|
+
color: AppColors.greenColor,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
if (params?.market_language) {
|
|
138
|
+
topMetrics.push({
|
|
139
|
+
key: 'Language',
|
|
140
|
+
value: String(params.market_language),
|
|
141
|
+
color: '#F59E0B',
|
|
142
|
+
}); // Amber
|
|
143
|
+
}
|
|
144
|
+
if (params?.tripType) {
|
|
145
|
+
topMetrics.push({
|
|
146
|
+
key: 'Trip Type',
|
|
147
|
+
value: String(params.tripType),
|
|
148
|
+
color: '#3B82F6',
|
|
149
|
+
}); // Blue
|
|
150
|
+
}
|
|
151
|
+
if (userProperties?.platform_type) {
|
|
152
|
+
topMetrics.push({
|
|
153
|
+
key: 'Platform',
|
|
154
|
+
value: String(userProperties.platform_type),
|
|
155
|
+
color: AppColors.skyBlue,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
if (userProperties?.login_status) {
|
|
159
|
+
topMetrics.push({
|
|
160
|
+
key: 'Login Status',
|
|
161
|
+
value: String(userProperties.login_status),
|
|
162
|
+
color: '#64748B',
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
topMetrics.unshift({
|
|
166
|
+
key: 'Source',
|
|
167
|
+
value: event.source,
|
|
168
|
+
color: sourceColor,
|
|
169
|
+
});
|
|
170
|
+
return (<ScrollView style={detailStyles.scroll} contentContainerStyle={detailStyles.content} showsVerticalScrollIndicator contentInsetAdjustmentBehavior="never" automaticallyAdjustContentInsets={false}>
|
|
171
|
+
<LinearGradient colors={[
|
|
172
|
+
`${eventColor}18`,
|
|
173
|
+
`${eventColor}06`,
|
|
174
|
+
AppColors.grayBackground,
|
|
175
|
+
]} style={detailStyles.hero}>
|
|
176
|
+
<View style={{
|
|
177
|
+
flexDirection: 'row',
|
|
178
|
+
width: '100%',
|
|
179
|
+
justifyContent: 'space-between',
|
|
180
|
+
alignItems: 'flex-start',
|
|
181
|
+
paddingHorizontal: 16,
|
|
182
|
+
paddingTop: 14,
|
|
183
|
+
marginBottom: 8,
|
|
184
|
+
}}>
|
|
185
|
+
<View style={{ flex: 1, paddingRight: 10 }}>
|
|
186
|
+
<Text style={{
|
|
187
|
+
fontFamily: AppFonts.interBold,
|
|
188
|
+
fontSize: 18,
|
|
189
|
+
color: AppColors.primaryBlack,
|
|
190
|
+
marginBottom: 4,
|
|
191
|
+
}} numberOfLines={2}>
|
|
192
|
+
{event.name}
|
|
193
|
+
</Text>
|
|
194
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
195
|
+
<View style={{
|
|
196
|
+
width: 8,
|
|
197
|
+
height: 8,
|
|
198
|
+
borderRadius: 4,
|
|
199
|
+
backgroundColor: sourceColor,
|
|
200
|
+
}}/>
|
|
201
|
+
<Text style={{
|
|
202
|
+
fontFamily: AppFonts.interMedium,
|
|
203
|
+
fontSize: 12,
|
|
204
|
+
color: AppColors.grayTextStrong,
|
|
205
|
+
}}>
|
|
206
|
+
{formatDateTimeToAnalytics(event.timestamp)}
|
|
207
|
+
</Text>
|
|
208
|
+
</View>
|
|
209
|
+
</View>
|
|
210
|
+
<CopyButton value={JSON.stringify({ name: event.name, params: params }, null, 2)} label="Copy JSON"/>
|
|
211
|
+
</View>
|
|
212
|
+
|
|
213
|
+
{topMetrics.length > 0 && (<ScrollView horizontal showsHorizontalScrollIndicator={false} style={detailStyles.metricsScroll} contentContainerStyle={detailStyles.metricsGrid}>
|
|
214
|
+
{topMetrics.map((item, idx) => (<View key={idx} style={[
|
|
215
|
+
detailStyles.metricCard,
|
|
216
|
+
{ borderLeftColor: item.color },
|
|
217
|
+
]}>
|
|
218
|
+
<Text style={detailStyles.metricLabel}>{item.key}</Text>
|
|
219
|
+
<Text style={[detailStyles.metricValue, { color: item.color }]} numberOfLines={1}>
|
|
220
|
+
{item.value}
|
|
221
|
+
</Text>
|
|
222
|
+
</View>))}
|
|
223
|
+
</ScrollView>)}
|
|
224
|
+
</LinearGradient>
|
|
225
|
+
|
|
226
|
+
<View style={detailStyles.tabRow}>
|
|
227
|
+
<Pressable style={[
|
|
228
|
+
detailStyles.tabButton,
|
|
229
|
+
activeTab === 'unformatted' && detailStyles.tabActive,
|
|
230
|
+
]} onPress={() => setActiveTab('unformatted')}>
|
|
231
|
+
<Text style={[
|
|
232
|
+
detailStyles.tabText,
|
|
233
|
+
activeTab === 'unformatted' && detailStyles.tabTextActive,
|
|
234
|
+
]}>
|
|
235
|
+
JSON Viewer
|
|
236
|
+
</Text>
|
|
237
|
+
</Pressable>
|
|
238
|
+
<Pressable style={[
|
|
239
|
+
detailStyles.tabButton,
|
|
240
|
+
activeTab === 'formatted' && detailStyles.tabActive,
|
|
241
|
+
]} onPress={() => setActiveTab('formatted')}>
|
|
242
|
+
<Text style={[
|
|
243
|
+
detailStyles.tabText,
|
|
244
|
+
activeTab === 'formatted' && detailStyles.tabTextActive,
|
|
245
|
+
]}>
|
|
246
|
+
Tabular View
|
|
247
|
+
</Text>
|
|
248
|
+
</Pressable>
|
|
249
|
+
</View>
|
|
250
|
+
|
|
251
|
+
{activeTab === 'unformatted' && (<View style={detailStyles.searchRow}>
|
|
252
|
+
<View style={styles.detailSearchBox}>
|
|
253
|
+
<TextInput placeholder="Search JSON data..." placeholderTextColor={AppColors.grayTextWeak} value={search} onChangeText={setSearch} style={styles.detailSearchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
254
|
+
{search.length > 0 && (<Pressable onPress={() => setSearch('')} hitSlop={10} style={{ padding: 8 }}>
|
|
255
|
+
<ClearIcon color={AppColors.grayTextWeak} size={14}/>
|
|
256
|
+
</Pressable>)}
|
|
257
|
+
</View>
|
|
258
|
+
</View>)}
|
|
259
|
+
|
|
260
|
+
{activeTab === 'formatted' && (<View style={{ gap: 10 }}>
|
|
261
|
+
{paramCount > 0 && (<SectionCard title="Event Parameters" count={paramCount} accentColor={eventColor}>
|
|
262
|
+
<ParamTable data={params} emptyLabel="No parameters"/>
|
|
263
|
+
</SectionCard>)}
|
|
264
|
+
|
|
265
|
+
{upCount > 0 && (<SectionCard title="User Properties" count={upCount} accentColor={AppColors.greenColor}>
|
|
266
|
+
<ParamTable data={userProperties} emptyLabel="No user properties"/>
|
|
267
|
+
</SectionCard>)}
|
|
268
|
+
</View>)}
|
|
269
|
+
|
|
270
|
+
{activeTab === 'unformatted' && (<SectionCard accentColor={AppColors.purple}>
|
|
271
|
+
<View style={[detailStyles.jsonBlock, { marginLeft: 0, marginTop: 0 }]}>
|
|
272
|
+
<JsonViewer data={{
|
|
273
|
+
name: event.name,
|
|
274
|
+
params: params,
|
|
275
|
+
...(upCount > 0
|
|
276
|
+
? {
|
|
277
|
+
userProperties: userProperties,
|
|
278
|
+
}
|
|
279
|
+
: {}),
|
|
280
|
+
}} search={search}/>
|
|
281
|
+
</View>
|
|
282
|
+
</SectionCard>)}
|
|
283
|
+
|
|
284
|
+
{/* Empty state */}
|
|
285
|
+
{paramCount === 0 && upCount === 0 && activeTab !== 'unformatted' && (<View style={detailStyles.emptyParams}>
|
|
286
|
+
<Text style={detailStyles.emptyParamsText}>
|
|
287
|
+
No parameters recorded for this event
|
|
288
|
+
</Text>
|
|
289
|
+
</View>)}
|
|
290
|
+
</ScrollView>);
|
|
291
|
+
};
|
|
292
|
+
const detailStyles = StyleSheet.create({
|
|
293
|
+
scroll: { flex: 1, backgroundColor: AppColors.grayBackground },
|
|
294
|
+
content: {
|
|
295
|
+
paddingTop: 0,
|
|
296
|
+
paddingBottom: 40,
|
|
297
|
+
},
|
|
298
|
+
hero: {
|
|
299
|
+
paddingTop: 0,
|
|
300
|
+
paddingBottom: 16,
|
|
301
|
+
paddingHorizontal: 0,
|
|
302
|
+
gap: 8,
|
|
303
|
+
marginTop: 0,
|
|
304
|
+
marginBottom: 0,
|
|
305
|
+
width: '100%',
|
|
306
|
+
alignSelf: 'stretch',
|
|
307
|
+
},
|
|
308
|
+
searchRow: {
|
|
309
|
+
paddingHorizontal: 16,
|
|
310
|
+
marginVertical: 6,
|
|
311
|
+
},
|
|
312
|
+
sectionCard: {
|
|
313
|
+
marginHorizontal: 0,
|
|
314
|
+
borderRadius: 12,
|
|
315
|
+
overflow: 'hidden',
|
|
316
|
+
borderWidth: 1,
|
|
317
|
+
borderColor: AppColors.grayBorderSecondary,
|
|
318
|
+
backgroundColor: AppColors.primaryLight,
|
|
319
|
+
shadowColor: '#000',
|
|
320
|
+
shadowOpacity: 0.04,
|
|
321
|
+
shadowRadius: 4,
|
|
322
|
+
shadowOffset: { width: 0, height: 1 },
|
|
323
|
+
elevation: 1,
|
|
324
|
+
},
|
|
325
|
+
sectionHeader: {
|
|
326
|
+
flexDirection: 'row',
|
|
327
|
+
alignItems: 'center',
|
|
328
|
+
justifyContent: 'space-between',
|
|
329
|
+
paddingHorizontal: 14,
|
|
330
|
+
paddingVertical: 12,
|
|
331
|
+
},
|
|
332
|
+
sectionTitleRow: {
|
|
333
|
+
flexDirection: 'row',
|
|
334
|
+
alignItems: 'center',
|
|
335
|
+
gap: 8,
|
|
336
|
+
flex: 1,
|
|
337
|
+
},
|
|
338
|
+
sectionAccentDot: {
|
|
339
|
+
width: 8,
|
|
340
|
+
height: 8,
|
|
341
|
+
borderRadius: 4,
|
|
342
|
+
},
|
|
343
|
+
sectionTitle: {
|
|
344
|
+
fontFamily: AppFonts.interBold,
|
|
345
|
+
fontSize: 13,
|
|
346
|
+
color: AppColors.primaryBlack,
|
|
347
|
+
},
|
|
348
|
+
sectionActions: {
|
|
349
|
+
flexDirection: 'row',
|
|
350
|
+
alignItems: 'center',
|
|
351
|
+
gap: 6,
|
|
352
|
+
},
|
|
353
|
+
countBadge: {
|
|
354
|
+
paddingHorizontal: 7,
|
|
355
|
+
paddingVertical: 2,
|
|
356
|
+
borderRadius: 8,
|
|
357
|
+
borderWidth: 1,
|
|
358
|
+
},
|
|
359
|
+
countBadgeText: {
|
|
360
|
+
fontFamily: AppFonts.interBold,
|
|
361
|
+
fontSize: 10,
|
|
362
|
+
},
|
|
363
|
+
paramList: {
|
|
364
|
+
gap: 8,
|
|
365
|
+
},
|
|
366
|
+
emptyParams: {
|
|
367
|
+
marginVertical: 12,
|
|
368
|
+
paddingVertical: 18,
|
|
369
|
+
paddingHorizontal: 14,
|
|
370
|
+
borderRadius: 10,
|
|
371
|
+
borderWidth: 1,
|
|
372
|
+
borderColor: AppColors.grayBorderSecondary,
|
|
373
|
+
backgroundColor: AppColors.primaryLight,
|
|
374
|
+
alignItems: 'center',
|
|
375
|
+
justifyContent: 'center',
|
|
376
|
+
},
|
|
377
|
+
emptyParamsText: {
|
|
378
|
+
fontFamily: AppFonts.interMedium,
|
|
379
|
+
fontSize: 13,
|
|
380
|
+
color: AppColors.grayTextWeak,
|
|
381
|
+
textAlign: 'center',
|
|
382
|
+
lineHeight: 18,
|
|
383
|
+
},
|
|
384
|
+
dataBox: {
|
|
385
|
+
backgroundColor: '#FFFFFF',
|
|
386
|
+
borderRadius: 8,
|
|
387
|
+
borderWidth: 1,
|
|
388
|
+
borderColor: '#E5E7EB',
|
|
389
|
+
padding: 12,
|
|
390
|
+
},
|
|
391
|
+
dataBoxHeader: {
|
|
392
|
+
flexDirection: 'row',
|
|
393
|
+
justifyContent: 'space-between',
|
|
394
|
+
alignItems: 'center',
|
|
395
|
+
marginBottom: 8,
|
|
396
|
+
},
|
|
397
|
+
dataBoxKey: {
|
|
398
|
+
fontFamily: AppFonts.interBold,
|
|
399
|
+
fontWeight: 'bold',
|
|
400
|
+
fontSize: 13,
|
|
401
|
+
color: AppColors.primaryBlack,
|
|
402
|
+
flex: 1,
|
|
403
|
+
paddingRight: 8,
|
|
404
|
+
},
|
|
405
|
+
dataBoxVal: {
|
|
406
|
+
fontFamily: AppFonts.interRegular,
|
|
407
|
+
fontSize: 13,
|
|
408
|
+
color: AppColors.primaryBlack,
|
|
409
|
+
lineHeight: 18,
|
|
410
|
+
},
|
|
411
|
+
showMoreBtn: {
|
|
412
|
+
marginTop: 8,
|
|
413
|
+
alignSelf: 'flex-start',
|
|
414
|
+
backgroundColor: '#F3F4F6',
|
|
415
|
+
paddingHorizontal: 10,
|
|
416
|
+
paddingVertical: 4,
|
|
417
|
+
borderRadius: 4,
|
|
418
|
+
},
|
|
419
|
+
showMoreText: {
|
|
420
|
+
fontFamily: AppFonts.interMedium,
|
|
421
|
+
fontSize: 11,
|
|
422
|
+
color: '#4B5563', // matching previous UI color
|
|
423
|
+
},
|
|
424
|
+
jsonBlock: {
|
|
425
|
+
padding: 12,
|
|
426
|
+
borderWidth: 1,
|
|
427
|
+
borderColor: '#E0E7FF',
|
|
428
|
+
borderRadius: 8,
|
|
429
|
+
backgroundColor: '#EEF2FF',
|
|
430
|
+
},
|
|
431
|
+
metricsScroll: {
|
|
432
|
+
height: 92,
|
|
433
|
+
overflow: 'visible',
|
|
434
|
+
},
|
|
435
|
+
metricsGrid: {
|
|
436
|
+
gap: 8,
|
|
437
|
+
marginTop: 4,
|
|
438
|
+
paddingHorizontal: 16,
|
|
439
|
+
paddingBottom: 14,
|
|
440
|
+
},
|
|
441
|
+
metricCard: {
|
|
442
|
+
backgroundColor: '#FFFFFF',
|
|
443
|
+
paddingVertical: 8,
|
|
444
|
+
paddingHorizontal: 10,
|
|
445
|
+
borderRadius: 6,
|
|
446
|
+
borderLeftWidth: 3,
|
|
447
|
+
width: 130, // fixed width for horizontal scrolling
|
|
448
|
+
shadowColor: '#000',
|
|
449
|
+
shadowOpacity: 0.04,
|
|
450
|
+
shadowRadius: 4,
|
|
451
|
+
shadowOffset: { width: 0, height: 2 },
|
|
452
|
+
elevation: 2,
|
|
453
|
+
alignItems: 'flex-start',
|
|
454
|
+
},
|
|
455
|
+
metricLabel: {
|
|
456
|
+
fontFamily: AppFonts.interMedium,
|
|
457
|
+
fontSize: 10,
|
|
458
|
+
color: AppColors.grayTextWeak,
|
|
459
|
+
textTransform: 'uppercase',
|
|
460
|
+
marginBottom: 4,
|
|
461
|
+
},
|
|
462
|
+
metricValue: {
|
|
463
|
+
fontFamily: AppFonts.interBold,
|
|
464
|
+
fontSize: 13,
|
|
465
|
+
},
|
|
466
|
+
tabRow: {
|
|
467
|
+
flexDirection: 'row',
|
|
468
|
+
marginHorizontal: 16,
|
|
469
|
+
marginTop: 6,
|
|
470
|
+
backgroundColor: '#E5E7EB',
|
|
471
|
+
borderRadius: 8,
|
|
472
|
+
padding: 4,
|
|
473
|
+
},
|
|
474
|
+
tabButton: {
|
|
475
|
+
flex: 1,
|
|
476
|
+
flexDirection: 'row',
|
|
477
|
+
alignItems: 'center',
|
|
478
|
+
justifyContent: 'center',
|
|
479
|
+
paddingVertical: 8,
|
|
480
|
+
borderRadius: 6,
|
|
481
|
+
gap: 6,
|
|
482
|
+
},
|
|
483
|
+
tabActive: {
|
|
484
|
+
backgroundColor: '#FFFFFF',
|
|
485
|
+
shadowColor: '#000',
|
|
486
|
+
shadowOpacity: 0.1,
|
|
487
|
+
shadowRadius: 2,
|
|
488
|
+
shadowOffset: { width: 0, height: 1 },
|
|
489
|
+
elevation: 2,
|
|
490
|
+
},
|
|
491
|
+
tabText: {
|
|
492
|
+
fontFamily: AppFonts.interMedium,
|
|
493
|
+
fontSize: 13,
|
|
494
|
+
color: AppColors.grayTextWeak,
|
|
495
|
+
},
|
|
496
|
+
tabTextActive: {
|
|
497
|
+
fontFamily: AppFonts.interBold,
|
|
498
|
+
color: AppColors.primaryBlack,
|
|
499
|
+
},
|
|
500
|
+
tabBadge: {
|
|
501
|
+
backgroundColor: '#D1D5DB',
|
|
502
|
+
paddingHorizontal: 6,
|
|
503
|
+
paddingVertical: 2,
|
|
504
|
+
borderRadius: 10,
|
|
505
|
+
},
|
|
506
|
+
tabBadgeActive: {
|
|
507
|
+
backgroundColor: AppColors.primaryLight,
|
|
508
|
+
borderWidth: 1,
|
|
509
|
+
borderColor: '#E5E7EB',
|
|
510
|
+
},
|
|
511
|
+
tabBadgeText: {
|
|
512
|
+
fontFamily: AppFonts.interBold,
|
|
513
|
+
fontSize: 10,
|
|
514
|
+
color: '#6B7280',
|
|
515
|
+
},
|
|
516
|
+
tabBadgeTextActive: {
|
|
517
|
+
color: AppColors.primaryBlack,
|
|
518
|
+
},
|
|
519
|
+
});
|
|
520
|
+
export default AnalyticsDetail;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AnalyticsEvent } from '../types';
|
|
3
|
+
export declare function getEventColor(name: string): string;
|
|
4
|
+
export interface AnalyticsEventCardProps {
|
|
5
|
+
event: AnalyticsEvent & {
|
|
6
|
+
count?: number;
|
|
7
|
+
};
|
|
8
|
+
onPress: () => void;
|
|
9
|
+
isNew?: boolean;
|
|
10
|
+
searchStr?: string;
|
|
11
|
+
isFirst: boolean;
|
|
12
|
+
isLast: boolean;
|
|
13
|
+
msSincePrev?: number;
|
|
14
|
+
showTimestamp?: boolean;
|
|
15
|
+
computedScreenName?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const AnalyticsEventCard: React.NamedExoticComponent<AnalyticsEventCardProps>;
|
|
18
|
+
export default AnalyticsEventCard;
|