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,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;
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.getEventColor = getEventColor;
|
|
40
|
+
const react_1 = __importStar(require("react"));
|
|
41
|
+
const react_native_1 = require("react-native");
|
|
42
|
+
const AppColors_1 = require("../styles/AppColors");
|
|
43
|
+
const AppFonts_1 = require("../styles/AppFonts");
|
|
44
|
+
const HighlightText_1 = __importDefault(require("./HighlightText"));
|
|
45
|
+
const TouchableScale_1 = __importDefault(require("./TouchableScale"));
|
|
46
|
+
// ─── Palette (Google Analytics colours) ───────────────────────────────────────
|
|
47
|
+
const EVENT_PALETTE = [
|
|
48
|
+
'#4285F4', // blue
|
|
49
|
+
'#34A853', // green
|
|
50
|
+
'#9C27B0', // purple
|
|
51
|
+
'#00897B', // teal
|
|
52
|
+
'#E53935', // red
|
|
53
|
+
'#F57C00', // orange
|
|
54
|
+
'#1565C0', // dark blue
|
|
55
|
+
'#2E7D32', // dark green
|
|
56
|
+
];
|
|
57
|
+
function getEventColor(name) {
|
|
58
|
+
let hash = 0;
|
|
59
|
+
for (let i = 0; i < name.length; i++) {
|
|
60
|
+
hash = (hash * 31 + name.charCodeAt(i)) | 0;
|
|
61
|
+
}
|
|
62
|
+
return EVENT_PALETTE[Math.abs(hash) % EVENT_PALETTE.length];
|
|
63
|
+
}
|
|
64
|
+
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
|
65
|
+
function formatTime(ts) {
|
|
66
|
+
const d = new Date(ts);
|
|
67
|
+
const hh = String(d.getHours()).padStart(2, '0');
|
|
68
|
+
const mm = String(d.getMinutes()).padStart(2, '0');
|
|
69
|
+
const ss = String(d.getSeconds()).padStart(2, '0');
|
|
70
|
+
const ms = String(d.getMilliseconds()).padStart(3, '0');
|
|
71
|
+
return `${hh}:${mm}:${ss}.${ms}`;
|
|
72
|
+
}
|
|
73
|
+
function formatGap(ms) {
|
|
74
|
+
if (ms < 1000)
|
|
75
|
+
return `+${ms}ms`;
|
|
76
|
+
const s = Math.round(ms / 1000);
|
|
77
|
+
if (s < 60)
|
|
78
|
+
return `+${s}s`;
|
|
79
|
+
const m = Math.floor(s / 60);
|
|
80
|
+
const rem = s % 60;
|
|
81
|
+
return rem > 0 ? `+${m}m ${rem}s` : `+${m}m`;
|
|
82
|
+
}
|
|
83
|
+
// ─── Component ────────────────────────────────────────────────────────────────
|
|
84
|
+
const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ event, onPress, isNew = false, searchStr = '', msSincePrev, computedScreenName, }) {
|
|
85
|
+
const color = getEventColor(event.name);
|
|
86
|
+
const paramCount = event.params ? Object.keys(event.params).length : 0;
|
|
87
|
+
const userPropCount = event.userProperties
|
|
88
|
+
? Object.keys(event.userProperties).length
|
|
89
|
+
: 0;
|
|
90
|
+
// Flash animation for newly logged events
|
|
91
|
+
const flashOpacity = (0, react_1.useRef)(new react_native_1.Animated.Value(isNew ? 1 : 0)).current;
|
|
92
|
+
(0, react_1.useEffect)(() => {
|
|
93
|
+
if (isNew) {
|
|
94
|
+
react_native_1.Animated.timing(flashOpacity, {
|
|
95
|
+
toValue: 0,
|
|
96
|
+
duration: 1200,
|
|
97
|
+
useNativeDriver: true,
|
|
98
|
+
}).start();
|
|
99
|
+
}
|
|
100
|
+
}, [isNew]);
|
|
101
|
+
const showGap = msSincePrev != null && msSincePrev >= 2000;
|
|
102
|
+
return (<react_native_1.View style={cardStyles.container}>
|
|
103
|
+
{/* ── Gap Indicator ─────────────────────────────────────────────────── */}
|
|
104
|
+
{showGap && (<react_native_1.View style={cardStyles.gapContainer}>
|
|
105
|
+
<react_native_1.Text style={cardStyles.gapText}>{formatGap(msSincePrev)}</react_native_1.Text>
|
|
106
|
+
</react_native_1.View>)}
|
|
107
|
+
|
|
108
|
+
{/* ── Main Card ─────────────────────────────────────────────────────── */}
|
|
109
|
+
<TouchableScale_1.default onPress={onPress} style={cardStyles.modernCard}>
|
|
110
|
+
<react_native_1.Animated.View style={[
|
|
111
|
+
react_native_1.StyleSheet.absoluteFill,
|
|
112
|
+
{
|
|
113
|
+
backgroundColor: color,
|
|
114
|
+
opacity: flashOpacity.interpolate({
|
|
115
|
+
inputRange: [0, 1],
|
|
116
|
+
outputRange: [0, 0.08],
|
|
117
|
+
}),
|
|
118
|
+
},
|
|
119
|
+
]}/>
|
|
120
|
+
|
|
121
|
+
{/* Top Row: Event Name & Timestamp */}
|
|
122
|
+
<react_native_1.View style={cardStyles.cardHeader}>
|
|
123
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
124
|
+
<react_native_1.View style={[
|
|
125
|
+
cardStyles.nameBadge,
|
|
126
|
+
{ backgroundColor: `${color}1A`, borderColor: `${color}30` },
|
|
127
|
+
]}>
|
|
128
|
+
<HighlightText_1.default text={event.name} search={searchStr} style={[cardStyles.eventName, { color: color }]} highlightStyle={cardStyles.highlight}/>
|
|
129
|
+
</react_native_1.View>
|
|
130
|
+
|
|
131
|
+
{event.count !== undefined ? (<react_native_1.View style={[
|
|
132
|
+
cardStyles.duplicateBadge,
|
|
133
|
+
event.count === 1 && {
|
|
134
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
135
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
136
|
+
},
|
|
137
|
+
]}>
|
|
138
|
+
<react_native_1.Text style={[
|
|
139
|
+
cardStyles.duplicateText,
|
|
140
|
+
event.count === 1 && { color: AppColors_1.AppColors.grayTextStrong },
|
|
141
|
+
]}>
|
|
142
|
+
{event.count}×{event.count > 1 ? ' Duplicate' : ''}
|
|
143
|
+
</react_native_1.Text>
|
|
144
|
+
</react_native_1.View>) : null}
|
|
145
|
+
</react_native_1.View>
|
|
146
|
+
<react_native_1.Text style={cardStyles.timestamp}>
|
|
147
|
+
{formatTime(event.timestamp)}
|
|
148
|
+
</react_native_1.Text>
|
|
149
|
+
</react_native_1.View>
|
|
150
|
+
|
|
151
|
+
{/* Bottom Row: Metadata Chips & Sparkline */}
|
|
152
|
+
<react_native_1.View style={cardStyles.cardBody}>
|
|
153
|
+
<react_native_1.View style={cardStyles.chipsRow}>
|
|
154
|
+
{computedScreenName ||
|
|
155
|
+
event.screenName ||
|
|
156
|
+
event.params?.firebase_screen ||
|
|
157
|
+
event.params?.screen_name ||
|
|
158
|
+
event.params?.firebase_screen_class ? (<react_native_1.View style={cardStyles.chip}>
|
|
159
|
+
<react_native_1.View style={[cardStyles.screenDot, { backgroundColor: color }]}/>
|
|
160
|
+
<react_native_1.Text style={cardStyles.chipText} numberOfLines={1}>
|
|
161
|
+
{computedScreenName ||
|
|
162
|
+
event.screenName ||
|
|
163
|
+
event.params?.firebase_screen ||
|
|
164
|
+
event.params?.screen_name ||
|
|
165
|
+
event.params?.firebase_screen_class}
|
|
166
|
+
</react_native_1.Text>
|
|
167
|
+
</react_native_1.View>) : null}
|
|
168
|
+
|
|
169
|
+
<react_native_1.View style={cardStyles.chip}>
|
|
170
|
+
<react_native_1.Text style={cardStyles.chipText}>
|
|
171
|
+
{'{} '} {paramCount} params
|
|
172
|
+
</react_native_1.Text>
|
|
173
|
+
</react_native_1.View>
|
|
174
|
+
|
|
175
|
+
{userPropCount > 0 && (<react_native_1.View style={cardStyles.chip}>
|
|
176
|
+
<react_native_1.Text style={cardStyles.chipText}>★ {userPropCount} props</react_native_1.Text>
|
|
177
|
+
</react_native_1.View>)}
|
|
178
|
+
</react_native_1.View>
|
|
179
|
+
|
|
180
|
+
{/* Inline Mini Graph for E-commerce Items */}
|
|
181
|
+
{(() => {
|
|
182
|
+
const items = event.params?.items;
|
|
183
|
+
if (!Array.isArray(items) || items.length === 0)
|
|
184
|
+
return null;
|
|
185
|
+
const prices = items
|
|
186
|
+
.map((item) => parseFloat(item.price || item.value))
|
|
187
|
+
.filter(p => !isNaN(p));
|
|
188
|
+
if (prices.length === 0)
|
|
189
|
+
return null;
|
|
190
|
+
const max = Math.max(...prices);
|
|
191
|
+
if (max === 0)
|
|
192
|
+
return null;
|
|
193
|
+
return (<react_native_1.View style={cardStyles.miniGraphWrapper}>
|
|
194
|
+
{prices.map((val, idx) => {
|
|
195
|
+
const hPct = (val / max) * 100;
|
|
196
|
+
return (<react_native_1.View key={idx} style={[
|
|
197
|
+
cardStyles.miniGraphBar,
|
|
198
|
+
{
|
|
199
|
+
height: `${Math.max(15, hPct)}%`,
|
|
200
|
+
backgroundColor: color,
|
|
201
|
+
},
|
|
202
|
+
]}/>);
|
|
203
|
+
})}
|
|
204
|
+
</react_native_1.View>);
|
|
205
|
+
})()}
|
|
206
|
+
</react_native_1.View>
|
|
207
|
+
</TouchableScale_1.default>
|
|
208
|
+
</react_native_1.View>);
|
|
209
|
+
});
|
|
210
|
+
// ─── Styles ───────────────────────────────────────────────────────────────────
|
|
211
|
+
const cardStyles = react_native_1.StyleSheet.create({
|
|
212
|
+
container: {
|
|
213
|
+
paddingHorizontal: 16,
|
|
214
|
+
paddingVertical: 4,
|
|
215
|
+
},
|
|
216
|
+
gapContainer: {
|
|
217
|
+
alignItems: 'center',
|
|
218
|
+
marginVertical: 4,
|
|
219
|
+
},
|
|
220
|
+
gapText: {
|
|
221
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
222
|
+
fontSize: 10,
|
|
223
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
224
|
+
letterSpacing: 0.5,
|
|
225
|
+
},
|
|
226
|
+
modernCard: {
|
|
227
|
+
backgroundColor: '#FFFFFF',
|
|
228
|
+
borderRadius: 8,
|
|
229
|
+
borderWidth: 1,
|
|
230
|
+
borderColor: '#EFEFEF',
|
|
231
|
+
padding: 12,
|
|
232
|
+
shadowColor: '#000',
|
|
233
|
+
shadowOpacity: 0.03,
|
|
234
|
+
shadowRadius: 3,
|
|
235
|
+
shadowOffset: { width: 0, height: 1 },
|
|
236
|
+
elevation: 1,
|
|
237
|
+
overflow: 'hidden',
|
|
238
|
+
},
|
|
239
|
+
cardHeader: {
|
|
240
|
+
flexDirection: 'row',
|
|
241
|
+
justifyContent: 'space-between',
|
|
242
|
+
alignItems: 'center',
|
|
243
|
+
marginBottom: 8,
|
|
244
|
+
},
|
|
245
|
+
nameBadge: {
|
|
246
|
+
paddingHorizontal: 8,
|
|
247
|
+
paddingVertical: 4,
|
|
248
|
+
borderRadius: 6,
|
|
249
|
+
borderWidth: 1,
|
|
250
|
+
},
|
|
251
|
+
eventName: {
|
|
252
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
253
|
+
fontSize: 12,
|
|
254
|
+
letterSpacing: 0.2,
|
|
255
|
+
},
|
|
256
|
+
timestamp: {
|
|
257
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
258
|
+
fontSize: 11,
|
|
259
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
260
|
+
},
|
|
261
|
+
highlight: {
|
|
262
|
+
backgroundColor: '#FFE44D',
|
|
263
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
264
|
+
borderRadius: 2,
|
|
265
|
+
},
|
|
266
|
+
cardBody: {
|
|
267
|
+
flexDirection: 'row',
|
|
268
|
+
alignItems: 'flex-end',
|
|
269
|
+
justifyContent: 'space-between',
|
|
270
|
+
},
|
|
271
|
+
chipsRow: {
|
|
272
|
+
flexDirection: 'row',
|
|
273
|
+
alignItems: 'center',
|
|
274
|
+
flexWrap: 'wrap',
|
|
275
|
+
gap: 8,
|
|
276
|
+
flex: 1,
|
|
277
|
+
},
|
|
278
|
+
chip: {
|
|
279
|
+
flexDirection: 'row',
|
|
280
|
+
alignItems: 'center',
|
|
281
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
282
|
+
paddingHorizontal: 6,
|
|
283
|
+
paddingVertical: 3,
|
|
284
|
+
borderRadius: 4,
|
|
285
|
+
borderWidth: 1,
|
|
286
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
287
|
+
},
|
|
288
|
+
chipText: {
|
|
289
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
290
|
+
fontSize: 10,
|
|
291
|
+
color: AppColors_1.AppColors.grayText,
|
|
292
|
+
},
|
|
293
|
+
screenDot: {
|
|
294
|
+
width: 6,
|
|
295
|
+
height: 6,
|
|
296
|
+
borderRadius: 3,
|
|
297
|
+
marginRight: 4,
|
|
298
|
+
},
|
|
299
|
+
duplicateBadge: {
|
|
300
|
+
backgroundColor: '#FFE4E6',
|
|
301
|
+
borderColor: '#FCC2D7',
|
|
302
|
+
borderWidth: 1,
|
|
303
|
+
paddingHorizontal: 6,
|
|
304
|
+
paddingVertical: 3,
|
|
305
|
+
borderRadius: 4,
|
|
306
|
+
},
|
|
307
|
+
duplicateText: {
|
|
308
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
309
|
+
fontSize: 9,
|
|
310
|
+
color: '#E11D48',
|
|
311
|
+
textTransform: 'uppercase',
|
|
312
|
+
letterSpacing: 0.5,
|
|
313
|
+
},
|
|
314
|
+
miniGraphWrapper: {
|
|
315
|
+
flexDirection: 'row',
|
|
316
|
+
alignItems: 'flex-end',
|
|
317
|
+
height: 18,
|
|
318
|
+
gap: 2,
|
|
319
|
+
marginLeft: 12,
|
|
320
|
+
},
|
|
321
|
+
miniGraphBar: {
|
|
322
|
+
width: 4,
|
|
323
|
+
borderRadius: 2,
|
|
324
|
+
opacity: 0.7,
|
|
325
|
+
},
|
|
326
|
+
});
|
|
327
|
+
exports.default = AnalyticsEventCard;
|