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,136 @@
|
|
|
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
|
+
const react_1 = __importStar(require("react"));
|
|
40
|
+
const react_native_1 = require("react-native");
|
|
41
|
+
// Stylesheet
|
|
42
|
+
const AppColors_1 = require("../styles/AppColors");
|
|
43
|
+
// Helpers
|
|
44
|
+
const helpers_1 = require("../helpers");
|
|
45
|
+
// Assets
|
|
46
|
+
const NetworkIcons_1 = require("./NetworkIcons");
|
|
47
|
+
// Stylesheet
|
|
48
|
+
const styles_1 = __importDefault(require("../styles"));
|
|
49
|
+
const DomainHeader = ({ pageName, color, stats, activeFilters, onToggleFilter, isCollapsed, onToggleCollapse, isFirst, timestamp, }) => {
|
|
50
|
+
const chevronAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(isCollapsed ? 0 : 1)).current;
|
|
51
|
+
(0, react_1.useEffect)(() => {
|
|
52
|
+
react_native_1.Animated.timing(chevronAnim, {
|
|
53
|
+
toValue: isCollapsed ? 0 : 1,
|
|
54
|
+
duration: 220,
|
|
55
|
+
useNativeDriver: true,
|
|
56
|
+
}).start();
|
|
57
|
+
}, [isCollapsed]);
|
|
58
|
+
const chevronRotate = chevronAnim.interpolate({
|
|
59
|
+
inputRange: [0, 1],
|
|
60
|
+
outputRange: ['-90deg', '0deg'],
|
|
61
|
+
});
|
|
62
|
+
const visibleStats = ['success', 'failed', 'loading'];
|
|
63
|
+
return (<react_native_1.Pressable style={[styles_1.default.domainHeaderRow, !isFirst && styles_1.default.domainHeaderSeparator]} onPress={() => onToggleCollapse(pageName)}>
|
|
64
|
+
<react_native_1.View style={styles_1.default.domainHeaderLeft}>
|
|
65
|
+
<react_native_1.Animated.View style={{ transform: [{ rotate: chevronRotate }] }}>
|
|
66
|
+
<NetworkIcons_1.ChevronIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
67
|
+
</react_native_1.Animated.View>
|
|
68
|
+
<NetworkIcons_1.ScreenIcon color={color} size={16}/>
|
|
69
|
+
<react_native_1.View style={{ flex: 1, marginLeft: 6, justifyContent: 'center' }}>
|
|
70
|
+
<react_native_1.Text style={[styles_1.default.domainHeaderText, { color, marginLeft: 0 }]} numberOfLines={1}>
|
|
71
|
+
{pageName}
|
|
72
|
+
</react_native_1.Text>
|
|
73
|
+
<react_native_1.View style={styles_1.default.domainSubRow}>
|
|
74
|
+
<react_native_1.Text style={styles_1.default.domainTimestamp}>
|
|
75
|
+
{(0, helpers_1.formatDateTime)(timestamp)}
|
|
76
|
+
</react_native_1.Text>
|
|
77
|
+
</react_native_1.View>
|
|
78
|
+
</react_native_1.View>
|
|
79
|
+
</react_native_1.View>
|
|
80
|
+
|
|
81
|
+
<react_native_1.View style={styles_1.default.domainStatsGroup}>
|
|
82
|
+
{visibleStats.map((type, index) => {
|
|
83
|
+
const isLast = index === visibleStats.length - 1;
|
|
84
|
+
const isActive = activeFilters.has(type);
|
|
85
|
+
let IconComponent;
|
|
86
|
+
let activeColor = '';
|
|
87
|
+
let count = 0;
|
|
88
|
+
let bgStyle = {};
|
|
89
|
+
if (type === 'success') {
|
|
90
|
+
IconComponent = NetworkIcons_1.CheckIcon;
|
|
91
|
+
activeColor = AppColors_1.AppColors.greenColor;
|
|
92
|
+
count = stats.success;
|
|
93
|
+
bgStyle = {
|
|
94
|
+
backgroundColor: isActive
|
|
95
|
+
? `${AppColors_1.AppColors.greenColor}15`
|
|
96
|
+
: 'transparent',
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
else if (type === 'failed') {
|
|
100
|
+
IconComponent = NetworkIcons_1.FailIcon;
|
|
101
|
+
activeColor = AppColors_1.AppColors.errorColor;
|
|
102
|
+
count = stats.failed;
|
|
103
|
+
bgStyle = {
|
|
104
|
+
backgroundColor: isActive
|
|
105
|
+
? `${AppColors_1.AppColors.errorColor}15`
|
|
106
|
+
: 'transparent',
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
IconComponent = NetworkIcons_1.ClockIcon;
|
|
111
|
+
activeColor = AppColors_1.AppColors.darkOrange;
|
|
112
|
+
count = stats.loading;
|
|
113
|
+
bgStyle = {
|
|
114
|
+
backgroundColor: isActive
|
|
115
|
+
? `${AppColors_1.AppColors.darkOrange}15`
|
|
116
|
+
: 'transparent',
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
return (<react_native_1.Pressable key={type} onPress={() => onToggleFilter(pageName, type)} style={[
|
|
120
|
+
styles_1.default.groupBtnItem,
|
|
121
|
+
bgStyle,
|
|
122
|
+
!isLast && styles_1.default.groupBtnBorderRight,
|
|
123
|
+
]}>
|
|
124
|
+
<IconComponent color={isActive ? activeColor : AppColors_1.AppColors.grayTextWeak} size={type === 'failed' ? 8 : 10}/>
|
|
125
|
+
<react_native_1.Text style={[
|
|
126
|
+
styles_1.default.domainStatText,
|
|
127
|
+
{ color: isActive ? activeColor : AppColors_1.AppColors.grayTextWeak },
|
|
128
|
+
]}>
|
|
129
|
+
{count}
|
|
130
|
+
</react_native_1.Text>
|
|
131
|
+
</react_native_1.Pressable>);
|
|
132
|
+
})}
|
|
133
|
+
</react_native_1.View>
|
|
134
|
+
</react_native_1.Pressable>);
|
|
135
|
+
};
|
|
136
|
+
exports.default = DomainHeader;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
// Components
|
|
9
|
+
const TouchableScale_1 = __importDefault(require("./TouchableScale"));
|
|
10
|
+
// Assets
|
|
11
|
+
const NetworkIcons_1 = require("./NetworkIcons");
|
|
12
|
+
// Stylesheet
|
|
13
|
+
const AppColors_1 = require("../styles/AppColors");
|
|
14
|
+
const styles_1 = __importDefault(require("../styles"));
|
|
15
|
+
const EmptyState = ({ isSearch }) => {
|
|
16
|
+
const handleReload = () => {
|
|
17
|
+
if (__DEV__ && react_native_1.DevSettings && react_native_1.DevSettings.reload) {
|
|
18
|
+
react_native_1.DevSettings.reload();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
react_native_1.Alert.alert('Reload', 'App reload is typically only available in development mode.');
|
|
22
|
+
};
|
|
23
|
+
return (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
24
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
25
|
+
<NetworkIcons_1.EmptyRadarIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
26
|
+
</react_native_1.View>
|
|
27
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>
|
|
28
|
+
{isSearch ? 'No matching APIs' : 'No network activity'}
|
|
29
|
+
</react_native_1.Text>
|
|
30
|
+
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
31
|
+
{isSearch
|
|
32
|
+
? 'Try adjusting your filters or search.'
|
|
33
|
+
: 'Listening for incoming API calls...'}
|
|
34
|
+
</react_native_1.Text>
|
|
35
|
+
{!isSearch && (<TouchableScale_1.default style={styles_1.default.reloadBtn} onPress={handleReload}>
|
|
36
|
+
<react_native_1.Text style={styles_1.default.reloadBtnText}>Reload App</react_native_1.Text>
|
|
37
|
+
</TouchableScale_1.default>)}
|
|
38
|
+
</react_native_1.View>);
|
|
39
|
+
};
|
|
40
|
+
exports.default = EmptyState;
|
|
@@ -0,0 +1,155 @@
|
|
|
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
|
+
const react_1 = __importStar(require("react"));
|
|
40
|
+
const react_native_1 = require("react-native");
|
|
41
|
+
// Components
|
|
42
|
+
const CopyButton_1 = __importDefault(require("./CopyButton"));
|
|
43
|
+
const TouchableScale_1 = __importDefault(require("./TouchableScale"));
|
|
44
|
+
// Helpers
|
|
45
|
+
const helpers_1 = require("../helpers");
|
|
46
|
+
// Custom Hooks
|
|
47
|
+
const useAccordion_1 = __importDefault(require("../customHooks/useAccordion"));
|
|
48
|
+
// Assets
|
|
49
|
+
const NetworkIcons_1 = require("./NetworkIcons");
|
|
50
|
+
// Stylesheet
|
|
51
|
+
const AppColors_1 = require("../styles/AppColors");
|
|
52
|
+
const styles_1 = __importDefault(require("../styles"));
|
|
53
|
+
const HeaderRow = react_1.default.memo(function HeaderRow({ headerKey, value, isLast, index, }) {
|
|
54
|
+
const [expanded, setExpanded] = (0, react_1.useState)(false);
|
|
55
|
+
const isLong = value.length > 35;
|
|
56
|
+
const entryAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
|
|
57
|
+
(0, react_1.useEffect)(() => {
|
|
58
|
+
react_native_1.Animated.timing(entryAnim, {
|
|
59
|
+
toValue: 1,
|
|
60
|
+
duration: 220,
|
|
61
|
+
delay: index * 30,
|
|
62
|
+
useNativeDriver: true,
|
|
63
|
+
}).start();
|
|
64
|
+
}, []);
|
|
65
|
+
const rowAnimStyle = {
|
|
66
|
+
opacity: entryAnim,
|
|
67
|
+
transform: [
|
|
68
|
+
{
|
|
69
|
+
translateY: entryAnim.interpolate({
|
|
70
|
+
inputRange: [0, 1],
|
|
71
|
+
outputRange: [8, 0],
|
|
72
|
+
}),
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
};
|
|
76
|
+
return (<react_native_1.Animated.View style={[styles_1.default.htRow, !isLast && styles_1.default.htRowBorder, rowAnimStyle]}>
|
|
77
|
+
<react_native_1.View style={styles_1.default.htKeyCell}>
|
|
78
|
+
<react_native_1.Text style={styles_1.default.htKey} numberOfLines={2}>
|
|
79
|
+
{headerKey}
|
|
80
|
+
</react_native_1.Text>
|
|
81
|
+
</react_native_1.View>
|
|
82
|
+
<react_native_1.View style={styles_1.default.htCellDivider}/>
|
|
83
|
+
<react_native_1.Pressable style={styles_1.default.htValueCell} onPress={() => isLong && setExpanded(v => !v)} hitSlop={8}>
|
|
84
|
+
<react_native_1.Text style={styles_1.default.htValue} selectable numberOfLines={expanded ? undefined : 3}>
|
|
85
|
+
{value}
|
|
86
|
+
</react_native_1.Text>
|
|
87
|
+
{isLong && (<react_native_1.View style={styles_1.default.htExpandRow}>
|
|
88
|
+
<react_native_1.Text style={styles_1.default.htExpandText}>
|
|
89
|
+
{expanded ? '▲ less' : '▼ more'}
|
|
90
|
+
</react_native_1.Text>
|
|
91
|
+
</react_native_1.View>)}
|
|
92
|
+
</react_native_1.Pressable>
|
|
93
|
+
<TouchableScale_1.default onPress={() => (0, helpers_1.copyToClipboard)(value, headerKey)} hitSlop={8} style={styles_1.default.htCopyBtn}>
|
|
94
|
+
<NetworkIcons_1.CopyIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
95
|
+
</TouchableScale_1.default>
|
|
96
|
+
</react_native_1.Animated.View>);
|
|
97
|
+
});
|
|
98
|
+
const HeadersSection = ({ title, headers, search, resetKey, }) => {
|
|
99
|
+
const { toggleOpen, forceOpen, chevronStyle, bodyStyle } = (0, useAccordion_1.default)(false, 2400, 300);
|
|
100
|
+
(0, react_1.useEffect)(() => {
|
|
101
|
+
forceOpen(false);
|
|
102
|
+
}, [resetKey]);
|
|
103
|
+
const entries = (0, react_1.useMemo)(() => (headers ? Object.entries(headers) : []), [headers]);
|
|
104
|
+
const filtered = (0, react_1.useMemo)(() => {
|
|
105
|
+
if (!search)
|
|
106
|
+
return entries;
|
|
107
|
+
const q = search.toLowerCase();
|
|
108
|
+
return entries.filter(([k, v]) => k.toLowerCase().includes(q) || v.toLowerCase().includes(q));
|
|
109
|
+
}, [entries, search]);
|
|
110
|
+
if (entries.length === 0)
|
|
111
|
+
return null;
|
|
112
|
+
const isRequest = title.toLowerCase().includes('request') ||
|
|
113
|
+
title.toLowerCase().includes('api');
|
|
114
|
+
const accentColor = isRequest ? AppColors_1.AppColors.offerPurple : AppColors_1.AppColors.greenColor;
|
|
115
|
+
const accentBg = isRequest
|
|
116
|
+
? `${AppColors_1.AppColors.offerPurple}10`
|
|
117
|
+
: `${AppColors_1.AppColors.greenColor}10`;
|
|
118
|
+
return (<react_native_1.View style={[styles_1.default.htCard, { borderLeftColor: accentColor }]}>
|
|
119
|
+
<react_native_1.Pressable onPress={toggleOpen} hitSlop={10}>
|
|
120
|
+
<react_native_1.View style={styles_1.default.htCardHeader}>
|
|
121
|
+
<react_native_1.View style={[styles_1.default.htIconWrap, { backgroundColor: accentBg }]}>
|
|
122
|
+
<NetworkIcons_1.HeadersIcon color={accentColor}/>
|
|
123
|
+
</react_native_1.View>
|
|
124
|
+
<react_native_1.Text style={styles_1.default.htTitle}>{title}</react_native_1.Text>
|
|
125
|
+
<react_native_1.View style={[
|
|
126
|
+
styles_1.default.htBadge,
|
|
127
|
+
{ backgroundColor: accentBg, borderColor: accentColor },
|
|
128
|
+
]}>
|
|
129
|
+
<react_native_1.Text style={[styles_1.default.htBadgeText, { color: accentColor }]}>
|
|
130
|
+
{entries.length}
|
|
131
|
+
</react_native_1.Text>
|
|
132
|
+
</react_native_1.View>
|
|
133
|
+
<react_native_1.View style={styles_1.default.htHeaderSpacer}/>
|
|
134
|
+
<CopyButton_1.default value={headers} label={title}/>
|
|
135
|
+
<react_native_1.View style={styles_1.default.htChevronBtn}>
|
|
136
|
+
<react_native_1.Animated.View style={chevronStyle}>
|
|
137
|
+
<NetworkIcons_1.ChevronIcon color={AppColors_1.AppColors.grayTextStrong} size={14}/>
|
|
138
|
+
</react_native_1.Animated.View>
|
|
139
|
+
</react_native_1.View>
|
|
140
|
+
</react_native_1.View>
|
|
141
|
+
</react_native_1.Pressable>
|
|
142
|
+
|
|
143
|
+
<react_native_1.Animated.View style={bodyStyle}>
|
|
144
|
+
<react_native_1.View style={styles_1.default.htColHeadRow}>
|
|
145
|
+
<react_native_1.Text style={[styles_1.default.htColHead, { width: '30%' }]}>KEY</react_native_1.Text>
|
|
146
|
+
<react_native_1.Text style={[styles_1.default.htColHead, { flex: 1 }]}>VALUE</react_native_1.Text>
|
|
147
|
+
</react_native_1.View>
|
|
148
|
+
|
|
149
|
+
{filtered.length > 0 ? (filtered.map(([k, v], i) => (<HeaderRow key={k} headerKey={k} value={v} isLast={i === filtered.length - 1} index={i}/>))) : (<react_native_1.View style={styles_1.default.htEmpty}>
|
|
150
|
+
<react_native_1.Text style={styles_1.default.htEmptyText}>No matching headers</react_native_1.Text>
|
|
151
|
+
</react_native_1.View>)}
|
|
152
|
+
</react_native_1.Animated.View>
|
|
153
|
+
</react_native_1.View>);
|
|
154
|
+
};
|
|
155
|
+
exports.default = HeadersSection;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
// Helpers
|
|
9
|
+
const helpers_1 = require("../helpers");
|
|
10
|
+
const HighlightText = ({ text, search, style, highlightStyle, detectLinks, ...rest }) => {
|
|
11
|
+
const hasNumberOfLines = 'numberOfLines' in rest;
|
|
12
|
+
const numLines = hasNumberOfLines ? rest.numberOfLines : 1;
|
|
13
|
+
// Regex to detect absolute URLs
|
|
14
|
+
const URL_REGEX = /(https?:\/\/[^\s]+)/g;
|
|
15
|
+
const renderNormalOrHighlighted = (subText, keyPrefix) => {
|
|
16
|
+
if (!search) {
|
|
17
|
+
return <react_native_1.Text key={keyPrefix}>{subText}</react_native_1.Text>;
|
|
18
|
+
}
|
|
19
|
+
const regex = new RegExp(`(${(0, helpers_1.escapeRegex)(search)})`, 'gi');
|
|
20
|
+
const parts = subText.split(regex);
|
|
21
|
+
return (<react_native_1.Text key={keyPrefix}>
|
|
22
|
+
{parts.map((part, i) => part.toLowerCase() === search.toLowerCase() ? (<react_native_1.Text key={i} style={highlightStyle}>
|
|
23
|
+
{part}
|
|
24
|
+
</react_native_1.Text>) : (<react_native_1.Text key={i}>{part}</react_native_1.Text>))}
|
|
25
|
+
</react_native_1.Text>);
|
|
26
|
+
};
|
|
27
|
+
if (detectLinks && text) {
|
|
28
|
+
const parts = text.split(URL_REGEX);
|
|
29
|
+
return (<react_native_1.Text style={style} numberOfLines={numLines} {...rest}>
|
|
30
|
+
{parts.map((part, i) => {
|
|
31
|
+
if (part.match(URL_REGEX)) {
|
|
32
|
+
return (<react_native_1.Text key={`link-${i}`} style={{
|
|
33
|
+
color: '#007AFF', // skyBlue link color
|
|
34
|
+
textDecorationLine: 'underline',
|
|
35
|
+
}} onPress={() => {
|
|
36
|
+
react_native_1.Linking.openURL(part).catch(() => { });
|
|
37
|
+
}}>
|
|
38
|
+
{part}
|
|
39
|
+
</react_native_1.Text>);
|
|
40
|
+
}
|
|
41
|
+
return renderNormalOrHighlighted(part, `text-${i}`);
|
|
42
|
+
})}
|
|
43
|
+
</react_native_1.Text>);
|
|
44
|
+
}
|
|
45
|
+
if (!search)
|
|
46
|
+
return (<react_native_1.Text style={style} numberOfLines={numLines} {...rest}>
|
|
47
|
+
{text}
|
|
48
|
+
</react_native_1.Text>);
|
|
49
|
+
const regex = new RegExp(`(${(0, helpers_1.escapeRegex)(search)})`, 'gi');
|
|
50
|
+
const parts = text.split(regex);
|
|
51
|
+
return (<react_native_1.Text style={style} numberOfLines={numLines} {...rest}>
|
|
52
|
+
{parts.map((part, i) => part.toLowerCase() === search.toLowerCase() ? (<react_native_1.Text key={i} style={highlightStyle}>
|
|
53
|
+
{part}
|
|
54
|
+
</react_native_1.Text>) : (<react_native_1.Text key={i}>{part}</react_native_1.Text>))}
|
|
55
|
+
</react_native_1.Text>);
|
|
56
|
+
};
|
|
57
|
+
exports.default = HighlightText;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
// Components
|
|
9
|
+
const TreeNode_1 = __importDefault(require("./TreeNode"));
|
|
10
|
+
// Stylesheet
|
|
11
|
+
const styles_1 = __importDefault(require("../styles"));
|
|
12
|
+
const JsonViewer = ({ data, search, forceOpen, }) => {
|
|
13
|
+
return (<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={true} style={styles_1.default.codeBlockScroll}>
|
|
14
|
+
<react_native_1.View style={styles_1.default.codeBlock}>
|
|
15
|
+
<TreeNode_1.default data={data} search={search} forceOpen={forceOpen}/>
|
|
16
|
+
</react_native_1.View>
|
|
17
|
+
</react_native_1.ScrollView>);
|
|
18
|
+
};
|
|
19
|
+
exports.default = JsonViewer;
|
|
@@ -0,0 +1,179 @@
|
|
|
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
|
+
const react_1 = __importStar(require("react"));
|
|
40
|
+
const react_native_1 = require("react-native");
|
|
41
|
+
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
42
|
+
const AppColors_1 = require("../styles/AppColors");
|
|
43
|
+
const constants_1 = require("../constants");
|
|
44
|
+
const helpers_1 = require("../helpers");
|
|
45
|
+
const NetworkIcons_1 = require("./NetworkIcons");
|
|
46
|
+
const styles_1 = __importDefault(require("../styles"));
|
|
47
|
+
const HighlightText_1 = __importDefault(require("./HighlightText"));
|
|
48
|
+
const TouchableScale_1 = __importDefault(require("./TouchableScale"));
|
|
49
|
+
const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineMinStart, timelineTotalRange, isNew, isSelected, onToggleSelect, searchStr, }) {
|
|
50
|
+
const methodColor = constants_1.METHOD_COLORS[item.method] ?? constants_1.METHOD_COLORS.ALL;
|
|
51
|
+
const isFailed = item.status === 0 || (item.status != null && item.status >= 400);
|
|
52
|
+
const isLoading = item.status == null;
|
|
53
|
+
const statusColor = (0, helpers_1.getStatusColor)(item.status);
|
|
54
|
+
const durationColor = (0, helpers_1.getDurationColor)(item.duration);
|
|
55
|
+
const cardStatusColor = isLoading
|
|
56
|
+
? AppColors_1.AppColors.darkOrange
|
|
57
|
+
: isFailed
|
|
58
|
+
? AppColors_1.AppColors.errorColor
|
|
59
|
+
: AppColors_1.AppColors.greenColor;
|
|
60
|
+
const leftPercent = timelineTotalRange > 0
|
|
61
|
+
? ((item.startTime - timelineMinStart) / timelineTotalRange) * 100
|
|
62
|
+
: 0;
|
|
63
|
+
const widthPercent = timelineTotalRange > 0
|
|
64
|
+
? ((item.duration || 10) / timelineTotalRange) * 100
|
|
65
|
+
: 100;
|
|
66
|
+
const shimmerOpacity = (0, react_1.useRef)(new react_native_1.Animated.Value(isNew ? 0.35 : 0)).current;
|
|
67
|
+
(0, react_1.useEffect)(() => {
|
|
68
|
+
if (isNew) {
|
|
69
|
+
react_native_1.Animated.timing(shimmerOpacity, {
|
|
70
|
+
toValue: 0,
|
|
71
|
+
duration: 1200,
|
|
72
|
+
useNativeDriver: true,
|
|
73
|
+
}).start();
|
|
74
|
+
}
|
|
75
|
+
}, [isNew]);
|
|
76
|
+
const path = (0, helpers_1.getPath)(item.url);
|
|
77
|
+
const triggeredAt = (0, helpers_1.formatDateTime)(item.startTime);
|
|
78
|
+
const isJson = item.url.split('?')[0].toLowerCase().endsWith('.json');
|
|
79
|
+
return (<TouchableScale_1.default onPress={onPress} style={[
|
|
80
|
+
styles_1.default.card,
|
|
81
|
+
{
|
|
82
|
+
borderLeftWidth: 4,
|
|
83
|
+
borderLeftColor: cardStatusColor,
|
|
84
|
+
},
|
|
85
|
+
]}>
|
|
86
|
+
<react_native_1.View style={styles_1.default.cardBody}>
|
|
87
|
+
<react_native_1.View style={styles_1.default.cardTopRow}>
|
|
88
|
+
<react_native_1.Pressable onPress={() => onToggleSelect(item.id)} hitSlop={12} style={[
|
|
89
|
+
styles_1.default.smallCheckbox,
|
|
90
|
+
isSelected && styles_1.default.smallCheckboxChecked,
|
|
91
|
+
]}>
|
|
92
|
+
{isSelected && (<react_native_svg_1.default width={9} height={9} viewBox="0 0 24 24" fill="none">
|
|
93
|
+
<react_native_svg_1.Path d="M20 6L9 17l-5-5" stroke="#FFF" strokeWidth="4" strokeLinecap="round" strokeLinejoin="round"/>
|
|
94
|
+
</react_native_svg_1.default>)}
|
|
95
|
+
</react_native_1.Pressable>
|
|
96
|
+
|
|
97
|
+
<react_native_1.Text style={styles_1.default.serialNumber}>#{item.id + 1}</react_native_1.Text>
|
|
98
|
+
|
|
99
|
+
<react_native_1.View style={[styles_1.default.methodBadge, { backgroundColor: `${methodColor}15` }]}>
|
|
100
|
+
<react_native_1.Text style={[styles_1.default.methodBadgeText, { color: methodColor }]}>
|
|
101
|
+
{item.method}
|
|
102
|
+
</react_native_1.Text>
|
|
103
|
+
</react_native_1.View>
|
|
104
|
+
|
|
105
|
+
<HighlightText_1.default text={path} search={searchStr} style={styles_1.default.urlPathText} highlightStyle={styles_1.default.highlight}/>
|
|
106
|
+
|
|
107
|
+
{isJson && (<react_native_1.View style={[
|
|
108
|
+
styles_1.default.chip,
|
|
109
|
+
{
|
|
110
|
+
backgroundColor: `${AppColors_1.AppColors.darkOrange}15`,
|
|
111
|
+
borderColor: `${AppColors_1.AppColors.darkOrange}30`,
|
|
112
|
+
marginLeft: 6,
|
|
113
|
+
},
|
|
114
|
+
]}>
|
|
115
|
+
<react_native_1.Text style={[styles_1.default.chipText, { color: AppColors_1.AppColors.darkOrange }]}>
|
|
116
|
+
.json
|
|
117
|
+
</react_native_1.Text>
|
|
118
|
+
</react_native_1.View>)}
|
|
119
|
+
</react_native_1.View>
|
|
120
|
+
|
|
121
|
+
<react_native_1.View style={styles_1.default.cardBottomRow}>
|
|
122
|
+
<react_native_1.View style={styles_1.default.cardDateRow}>
|
|
123
|
+
<NetworkIcons_1.CalendarIcon color={AppColors_1.AppColors.grayTextWeak} size={11}/>
|
|
124
|
+
<react_native_1.Text style={styles_1.default.cardDateText}>{triggeredAt}</react_native_1.Text>
|
|
125
|
+
</react_native_1.View>
|
|
126
|
+
|
|
127
|
+
<react_native_1.View style={styles_1.default.cardMetaRow}>
|
|
128
|
+
{item.duration != null && !isFailed && (<react_native_1.View style={[
|
|
129
|
+
styles_1.default.chip,
|
|
130
|
+
{
|
|
131
|
+
backgroundColor: `${durationColor}15`,
|
|
132
|
+
borderColor: `${durationColor}30`,
|
|
133
|
+
},
|
|
134
|
+
]}>
|
|
135
|
+
<NetworkIcons_1.ClockIcon color={durationColor} size={10}/>
|
|
136
|
+
<react_native_1.Text style={[styles_1.default.chipText, { color: durationColor }]}>
|
|
137
|
+
{item.duration}ms
|
|
138
|
+
</react_native_1.Text>
|
|
139
|
+
</react_native_1.View>)}
|
|
140
|
+
|
|
141
|
+
<react_native_1.View style={[
|
|
142
|
+
styles_1.default.chip,
|
|
143
|
+
{
|
|
144
|
+
backgroundColor: isFailed
|
|
145
|
+
? `${AppColors_1.AppColors.errorColor}15`
|
|
146
|
+
: `${statusColor}15`,
|
|
147
|
+
borderColor: isFailed
|
|
148
|
+
? `${AppColors_1.AppColors.errorColor}30`
|
|
149
|
+
: `${statusColor}30`,
|
|
150
|
+
},
|
|
151
|
+
]}>
|
|
152
|
+
<react_native_1.Text style={[
|
|
153
|
+
styles_1.default.chipText,
|
|
154
|
+
{ color: isFailed ? AppColors_1.AppColors.errorColor : statusColor },
|
|
155
|
+
]}>
|
|
156
|
+
{isFailed ? 'Failed' : item.status}
|
|
157
|
+
</react_native_1.Text>
|
|
158
|
+
</react_native_1.View>
|
|
159
|
+
</react_native_1.View>
|
|
160
|
+
</react_native_1.View>
|
|
161
|
+
|
|
162
|
+
<react_native_1.View style={styles_1.default.timelineTrack}>
|
|
163
|
+
<react_native_1.View style={[
|
|
164
|
+
styles_1.default.timelineBar,
|
|
165
|
+
{
|
|
166
|
+
left: `${Math.max(0, leftPercent)}%`,
|
|
167
|
+
width: `${Math.min(100, widthPercent)}%`,
|
|
168
|
+
backgroundColor: methodColor,
|
|
169
|
+
},
|
|
170
|
+
]}/>
|
|
171
|
+
</react_native_1.View>
|
|
172
|
+
</react_native_1.View>
|
|
173
|
+
<react_native_1.Animated.View pointerEvents="none" style={[
|
|
174
|
+
react_native_1.StyleSheet.absoluteFill,
|
|
175
|
+
{ backgroundColor: methodColor, opacity: shimmerOpacity },
|
|
176
|
+
]}/>
|
|
177
|
+
</TouchableScale_1.default>);
|
|
178
|
+
});
|
|
179
|
+
exports.default = LogCard;
|