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,401 @@
|
|
|
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.ConsoleLogCard = void 0;
|
|
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 CopyButton_1 = __importDefault(require("./CopyButton"));
|
|
46
|
+
const NetworkIcons_1 = require("./NetworkIcons");
|
|
47
|
+
const JsonViewer_1 = __importDefault(require("./JsonViewer"));
|
|
48
|
+
const formatTime = (ts) => {
|
|
49
|
+
const d = new Date(ts);
|
|
50
|
+
const hh = String(d.getHours()).padStart(2, '0');
|
|
51
|
+
const mm = String(d.getMinutes()).padStart(2, '0');
|
|
52
|
+
const ss = String(d.getSeconds()).padStart(2, '0');
|
|
53
|
+
const ms = String(d.getMilliseconds()).padStart(3, '0');
|
|
54
|
+
return `${hh}:${mm}:${ss}.${ms}`;
|
|
55
|
+
};
|
|
56
|
+
const getJsonContent = (message) => {
|
|
57
|
+
if (!message)
|
|
58
|
+
return null;
|
|
59
|
+
const indices = [];
|
|
60
|
+
for (let i = 0; i < message.length; i++) {
|
|
61
|
+
if (message[i] === '{' || message[i] === '[') {
|
|
62
|
+
indices.push(i);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
for (const index of indices) {
|
|
66
|
+
const candidate = message.substring(index).trim();
|
|
67
|
+
try {
|
|
68
|
+
const parsed = JSON.parse(candidate);
|
|
69
|
+
if (parsed !== null && typeof parsed === 'object') {
|
|
70
|
+
const header = message.substring(0, index).trim();
|
|
71
|
+
return { header, data: parsed };
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
// Ignore
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
};
|
|
80
|
+
const getJsonPreviewText = (data) => {
|
|
81
|
+
try {
|
|
82
|
+
const formatted = JSON.stringify(data, null, 2);
|
|
83
|
+
const lines = formatted.split('\n');
|
|
84
|
+
if (lines.length > 3) {
|
|
85
|
+
return {
|
|
86
|
+
text: lines.slice(0, 3).join('\n') + '\n...',
|
|
87
|
+
hasMore: true,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
text: formatted,
|
|
92
|
+
hasMore: false,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
catch (e) {
|
|
96
|
+
return {
|
|
97
|
+
text: String(data),
|
|
98
|
+
hasMore: false,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, searchStr = '', isWebView = false, }) {
|
|
103
|
+
const [expanded, setExpanded] = (0, react_1.useState)(false);
|
|
104
|
+
const jsonContent = getJsonContent(item.message);
|
|
105
|
+
const isAnalyticsError = item.message
|
|
106
|
+
.toLowerCase()
|
|
107
|
+
.includes('[analytics error]');
|
|
108
|
+
const isUserLog = !isWebView && item.sourceMethod === 'log';
|
|
109
|
+
const caller = 'caller' in item ? item.caller : undefined;
|
|
110
|
+
const getLogColors = () => {
|
|
111
|
+
if (isWebView) {
|
|
112
|
+
const label = item.type.toUpperCase();
|
|
113
|
+
switch (item.type) {
|
|
114
|
+
case 'error':
|
|
115
|
+
return {
|
|
116
|
+
border: AppColors_1.AppColors.errorColor,
|
|
117
|
+
badgeBg: `${AppColors_1.AppColors.errorColor}15`,
|
|
118
|
+
badgeText: AppColors_1.AppColors.errorColor,
|
|
119
|
+
label,
|
|
120
|
+
cardBg: '#FFF5F6',
|
|
121
|
+
};
|
|
122
|
+
case 'warn':
|
|
123
|
+
return {
|
|
124
|
+
border: AppColors_1.AppColors.lightOrange,
|
|
125
|
+
badgeBg: `${AppColors_1.AppColors.lightOrange}15`,
|
|
126
|
+
badgeText: AppColors_1.AppColors.darkOrange || AppColors_1.AppColors.lightOrange,
|
|
127
|
+
label,
|
|
128
|
+
cardBg: '#FFFDF6',
|
|
129
|
+
};
|
|
130
|
+
default:
|
|
131
|
+
return {
|
|
132
|
+
border: '#475569',
|
|
133
|
+
badgeBg: '#F1F5F9',
|
|
134
|
+
badgeText: '#475569',
|
|
135
|
+
label,
|
|
136
|
+
cardBg: '#F8FAFC',
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (isAnalyticsError) {
|
|
141
|
+
return {
|
|
142
|
+
border: AppColors_1.AppColors.skyBlue,
|
|
143
|
+
badgeBg: `${AppColors_1.AppColors.skyBlue}15`,
|
|
144
|
+
badgeText: AppColors_1.AppColors.skyBlue,
|
|
145
|
+
label: 'ERROR',
|
|
146
|
+
cardBg: '#E6F2FF', // light sky blue background for analytics errors
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
switch (item.type) {
|
|
150
|
+
case 'error':
|
|
151
|
+
return {
|
|
152
|
+
border: AppColors_1.AppColors.errorColor,
|
|
153
|
+
badgeBg: `${AppColors_1.AppColors.errorColor}15`,
|
|
154
|
+
badgeText: AppColors_1.AppColors.errorColor,
|
|
155
|
+
label: 'ERROR',
|
|
156
|
+
cardBg: '#FFF5F6', // light red background
|
|
157
|
+
};
|
|
158
|
+
case 'warn':
|
|
159
|
+
return {
|
|
160
|
+
border: AppColors_1.AppColors.lightOrange,
|
|
161
|
+
badgeBg: `${AppColors_1.AppColors.lightOrange}15`,
|
|
162
|
+
badgeText: AppColors_1.AppColors.darkOrange || AppColors_1.AppColors.lightOrange,
|
|
163
|
+
label: 'WARN',
|
|
164
|
+
cardBg: '#FFFDF6', // light yellow/orange background
|
|
165
|
+
};
|
|
166
|
+
default:
|
|
167
|
+
if (isUserLog) {
|
|
168
|
+
return {
|
|
169
|
+
border: '#475569',
|
|
170
|
+
badgeBg: '#E2E8F0',
|
|
171
|
+
badgeText: '#334155',
|
|
172
|
+
label: 'INFO',
|
|
173
|
+
cardBg: '#F1F5F9', // slate-blue / steel-blue background for user log
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
border: AppColors_1.AppColors.purple,
|
|
178
|
+
badgeBg: `${AppColors_1.AppColors.purple}15`,
|
|
179
|
+
badgeText: AppColors_1.AppColors.purple,
|
|
180
|
+
label: 'INFO',
|
|
181
|
+
cardBg: '#F9F5FF', // light purple background for general info
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const colors = getLogColors();
|
|
186
|
+
// Show limited lines unless expanded
|
|
187
|
+
const numLines = expanded ? undefined : 5;
|
|
188
|
+
const hasLongMessage = jsonContent
|
|
189
|
+
? getJsonPreviewText(jsonContent.data).hasMore ||
|
|
190
|
+
jsonContent.header.length > 120 ||
|
|
191
|
+
jsonContent.header.includes('\n')
|
|
192
|
+
: item.message.length > 120 || item.message.includes('\n');
|
|
193
|
+
return (<react_native_1.View style={styles.container}>
|
|
194
|
+
<react_native_1.View style={[
|
|
195
|
+
styles.card,
|
|
196
|
+
{
|
|
197
|
+
borderLeftWidth: 4,
|
|
198
|
+
borderLeftColor: colors.border,
|
|
199
|
+
backgroundColor: colors.cardBg,
|
|
200
|
+
},
|
|
201
|
+
]}>
|
|
202
|
+
<react_native_1.Pressable onPress={() => setExpanded(prev => !prev)} style={styles.cardHeader}>
|
|
203
|
+
<react_native_1.View style={styles.headerLeft}>
|
|
204
|
+
<CopyButton_1.default value={item.message} label="Log message"/>
|
|
205
|
+
<react_native_1.View style={[styles.badge, { backgroundColor: colors.badgeBg }]}>
|
|
206
|
+
<react_native_1.Text style={[styles.badgeText, { color: colors.badgeText }]}>
|
|
207
|
+
{colors.label}
|
|
208
|
+
</react_native_1.Text>
|
|
209
|
+
</react_native_1.View>
|
|
210
|
+
{isAnalyticsError && (<react_native_1.View style={[
|
|
211
|
+
styles.badge,
|
|
212
|
+
{ backgroundColor: `${AppColors_1.AppColors.skyBlue}15` },
|
|
213
|
+
]}>
|
|
214
|
+
<react_native_1.Text style={[styles.badgeText, { color: AppColors_1.AppColors.skyBlue }]}>
|
|
215
|
+
Analytics
|
|
216
|
+
</react_native_1.Text>
|
|
217
|
+
</react_native_1.View>)}
|
|
218
|
+
{isUserLog && (<react_native_1.View style={[
|
|
219
|
+
styles.badge,
|
|
220
|
+
{
|
|
221
|
+
backgroundColor: '#F3F4F6',
|
|
222
|
+
borderColor: '#D1D5DB',
|
|
223
|
+
borderWidth: 1,
|
|
224
|
+
},
|
|
225
|
+
]}>
|
|
226
|
+
<react_native_1.Text style={[styles.badgeText, { color: '#4B5563' }]}>
|
|
227
|
+
user-log
|
|
228
|
+
</react_native_1.Text>
|
|
229
|
+
</react_native_1.View>)}
|
|
230
|
+
{isWebView && (<react_native_1.View style={[
|
|
231
|
+
styles.badge,
|
|
232
|
+
{
|
|
233
|
+
backgroundColor: '#F1F5F9',
|
|
234
|
+
borderColor: '#E2E8F0',
|
|
235
|
+
borderWidth: 1,
|
|
236
|
+
},
|
|
237
|
+
]}>
|
|
238
|
+
<react_native_1.Text style={[styles.badgeText, { color: '#475569' }]}>
|
|
239
|
+
webview
|
|
240
|
+
</react_native_1.Text>
|
|
241
|
+
</react_native_1.View>)}
|
|
242
|
+
<react_native_1.Text style={styles.serialNumber}>#{item.id + 1}</react_native_1.Text>
|
|
243
|
+
<react_native_1.Text style={styles.timestamp}>{formatTime(item.timestamp)}</react_native_1.Text>
|
|
244
|
+
</react_native_1.View>
|
|
245
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
246
|
+
{caller && caller !== 'Unknown' && (<react_native_1.Text style={styles.callerText} numberOfLines={1} ellipsizeMode="middle">
|
|
247
|
+
{caller.split('/').pop() || caller}
|
|
248
|
+
</react_native_1.Text>)}
|
|
249
|
+
<react_native_1.View style={{ transform: [{ rotate: expanded ? '180deg' : '0deg' }] }}>
|
|
250
|
+
<NetworkIcons_1.ChevronIcon size={14} color={AppColors_1.AppColors.grayTextWeak}/>
|
|
251
|
+
</react_native_1.View>
|
|
252
|
+
</react_native_1.View>
|
|
253
|
+
</react_native_1.Pressable>
|
|
254
|
+
|
|
255
|
+
<react_native_1.View style={styles.cardBody}>
|
|
256
|
+
{jsonContent ? (<>
|
|
257
|
+
{jsonContent.header ? (<react_native_1.Pressable onPress={() => setExpanded(prev => !prev)}>
|
|
258
|
+
<HighlightText_1.default text={jsonContent.header} search={searchStr} style={styles.messageText} highlightStyle={styles.highlight} numberOfLines={numLines} detectLinks={true}/>
|
|
259
|
+
</react_native_1.Pressable>) : null}
|
|
260
|
+
{expanded ? (<react_native_1.View style={styles.jsonContainer}>
|
|
261
|
+
<JsonViewer_1.default data={jsonContent.data} search={searchStr} forceOpen={expanded}/>
|
|
262
|
+
</react_native_1.View>) : (<react_native_1.Pressable onPress={() => setExpanded(prev => !prev)} style={styles.jsonPreviewContainer}>
|
|
263
|
+
<HighlightText_1.default text={getJsonPreviewText(jsonContent.data).text} search={searchStr} style={styles.jsonPreviewText} highlightStyle={styles.highlight} detectLinks={true}/>
|
|
264
|
+
</react_native_1.Pressable>)}
|
|
265
|
+
</>) : (<react_native_1.Pressable onPress={() => setExpanded(prev => !prev)}>
|
|
266
|
+
<HighlightText_1.default text={item.message} search={searchStr} style={styles.messageText} highlightStyle={styles.highlight} numberOfLines={numLines} detectLinks={true}/>
|
|
267
|
+
</react_native_1.Pressable>)}
|
|
268
|
+
{hasLongMessage && (<react_native_1.Pressable onPress={() => setExpanded(prev => !prev)} style={styles.seeMoreBtn} hitSlop={8}>
|
|
269
|
+
<react_native_1.Text style={styles.seeMoreText}>
|
|
270
|
+
{expanded ? 'See Less' : 'See More'}
|
|
271
|
+
</react_native_1.Text>
|
|
272
|
+
</react_native_1.Pressable>)}
|
|
273
|
+
</react_native_1.View>
|
|
274
|
+
|
|
275
|
+
{caller && caller !== 'Unknown' && expanded && (<react_native_1.View style={styles.cardFooter}>
|
|
276
|
+
<react_native_1.Text style={styles.fullCallerText}>Caller: {caller}</react_native_1.Text>
|
|
277
|
+
</react_native_1.View>)}
|
|
278
|
+
</react_native_1.View>
|
|
279
|
+
</react_native_1.View>);
|
|
280
|
+
});
|
|
281
|
+
const styles = react_native_1.StyleSheet.create({
|
|
282
|
+
container: {
|
|
283
|
+
paddingHorizontal: 16,
|
|
284
|
+
paddingVertical: 4,
|
|
285
|
+
},
|
|
286
|
+
card: {
|
|
287
|
+
alignSelf: 'stretch',
|
|
288
|
+
backgroundColor: '#FFFFFF',
|
|
289
|
+
borderRadius: 8,
|
|
290
|
+
borderWidth: 1,
|
|
291
|
+
borderColor: '#EFEFEF',
|
|
292
|
+
padding: 12,
|
|
293
|
+
shadowColor: '#000',
|
|
294
|
+
shadowOpacity: 0.03,
|
|
295
|
+
shadowRadius: 3,
|
|
296
|
+
shadowOffset: { width: 0, height: 1 },
|
|
297
|
+
elevation: 1,
|
|
298
|
+
overflow: 'hidden',
|
|
299
|
+
},
|
|
300
|
+
cardHeader: {
|
|
301
|
+
alignSelf: 'stretch',
|
|
302
|
+
flexDirection: 'row',
|
|
303
|
+
justifyContent: 'space-between',
|
|
304
|
+
alignItems: 'center',
|
|
305
|
+
marginBottom: 8,
|
|
306
|
+
},
|
|
307
|
+
headerLeft: {
|
|
308
|
+
flexDirection: 'row',
|
|
309
|
+
alignItems: 'center',
|
|
310
|
+
gap: 8,
|
|
311
|
+
},
|
|
312
|
+
badge: {
|
|
313
|
+
paddingHorizontal: 6,
|
|
314
|
+
paddingVertical: 3,
|
|
315
|
+
borderRadius: 4,
|
|
316
|
+
},
|
|
317
|
+
badgeText: {
|
|
318
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
319
|
+
fontSize: 9,
|
|
320
|
+
letterSpacing: 0.5,
|
|
321
|
+
},
|
|
322
|
+
timestamp: {
|
|
323
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
324
|
+
fontSize: 11,
|
|
325
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
326
|
+
},
|
|
327
|
+
serialNumber: {
|
|
328
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
329
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
330
|
+
fontSize: 11,
|
|
331
|
+
},
|
|
332
|
+
callerText: {
|
|
333
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
334
|
+
fontSize: 10,
|
|
335
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
336
|
+
maxWidth: '50%',
|
|
337
|
+
},
|
|
338
|
+
cardBody: {
|
|
339
|
+
marginTop: 8,
|
|
340
|
+
backgroundColor: '#FFFFFF',
|
|
341
|
+
paddingHorizontal: 10,
|
|
342
|
+
paddingVertical: 8,
|
|
343
|
+
borderRadius: 6,
|
|
344
|
+
borderWidth: 1,
|
|
345
|
+
borderColor: '#EBECEF',
|
|
346
|
+
},
|
|
347
|
+
messageText: {
|
|
348
|
+
fontFamily: react_native_1.Platform.OS === 'ios' ? 'System' : 'sans-serif',
|
|
349
|
+
fontSize: 12,
|
|
350
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
351
|
+
lineHeight: 16,
|
|
352
|
+
},
|
|
353
|
+
highlight: {
|
|
354
|
+
backgroundColor: '#FFE44D',
|
|
355
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
356
|
+
borderRadius: 2,
|
|
357
|
+
},
|
|
358
|
+
jsonContainer: {
|
|
359
|
+
marginTop: 4,
|
|
360
|
+
backgroundColor: '#FFFFFF',
|
|
361
|
+
borderRadius: 4,
|
|
362
|
+
borderWidth: 1,
|
|
363
|
+
borderColor: '#E2E8F0',
|
|
364
|
+
padding: 6,
|
|
365
|
+
},
|
|
366
|
+
jsonPreviewContainer: {
|
|
367
|
+
marginTop: 4,
|
|
368
|
+
backgroundColor: '#FFFFFF',
|
|
369
|
+
borderRadius: 4,
|
|
370
|
+
borderWidth: 1,
|
|
371
|
+
borderColor: '#E2E8F0',
|
|
372
|
+
padding: 6,
|
|
373
|
+
},
|
|
374
|
+
jsonPreviewText: {
|
|
375
|
+
fontFamily: react_native_1.Platform.OS === 'ios' ? 'Menlo' : 'monospace',
|
|
376
|
+
fontSize: 11,
|
|
377
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
378
|
+
lineHeight: 15,
|
|
379
|
+
},
|
|
380
|
+
cardFooter: {
|
|
381
|
+
marginTop: 8,
|
|
382
|
+
paddingTop: 8,
|
|
383
|
+
borderTopWidth: 1,
|
|
384
|
+
borderTopColor: AppColors_1.AppColors.dividerColor,
|
|
385
|
+
},
|
|
386
|
+
fullCallerText: {
|
|
387
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
388
|
+
fontSize: 10,
|
|
389
|
+
color: AppColors_1.AppColors.grayText,
|
|
390
|
+
},
|
|
391
|
+
seeMoreBtn: {
|
|
392
|
+
marginTop: 6,
|
|
393
|
+
alignSelf: 'flex-start',
|
|
394
|
+
},
|
|
395
|
+
seeMoreText: {
|
|
396
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
397
|
+
fontSize: 11,
|
|
398
|
+
color: AppColors_1.AppColors.purple,
|
|
399
|
+
textDecorationLine: 'underline',
|
|
400
|
+
},
|
|
401
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
// Components
|
|
41
|
+
const TouchableScale_1 = __importDefault(require("./TouchableScale"));
|
|
42
|
+
// Helpers
|
|
43
|
+
const helpers_1 = require("../helpers");
|
|
44
|
+
// Assets
|
|
45
|
+
const NetworkIcons_1 = require("./NetworkIcons");
|
|
46
|
+
// Stylesheet
|
|
47
|
+
const AppColors_1 = require("../styles/AppColors");
|
|
48
|
+
const styles_1 = __importDefault(require("../styles"));
|
|
49
|
+
const CopyButton = ({ value, label, iconType = 'copy' }) => {
|
|
50
|
+
const [copied, setCopied] = (0, react_1.useState)(false);
|
|
51
|
+
const handlePress = () => {
|
|
52
|
+
(0, helpers_1.copyToClipboard)(value, label);
|
|
53
|
+
setCopied(true);
|
|
54
|
+
setTimeout(() => setCopied(false), 1200);
|
|
55
|
+
};
|
|
56
|
+
const containerStyle = [
|
|
57
|
+
styles_1.default.iconSquareBtn,
|
|
58
|
+
copied && styles_1.default.iconSquareBtnSuccess,
|
|
59
|
+
];
|
|
60
|
+
const IconComponent = iconType === 'terminal'
|
|
61
|
+
? NetworkIcons_1.TerminalIcon
|
|
62
|
+
: iconType === 'fetch'
|
|
63
|
+
? NetworkIcons_1.FetchIcon
|
|
64
|
+
: NetworkIcons_1.CopyIcon;
|
|
65
|
+
return (<TouchableScale_1.default onPress={handlePress} hitSlop={12} style={containerStyle}>
|
|
66
|
+
{copied ? (<NetworkIcons_1.CheckIcon color={AppColors_1.AppColors.greenColor} size={14}/>) : (<IconComponent color={AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
67
|
+
</TouchableScale_1.default>);
|
|
68
|
+
};
|
|
69
|
+
exports.default = CopyButton;
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
// Helpers
|
|
42
|
+
const helpers_1 = require("../helpers");
|
|
43
|
+
// Stylesheet
|
|
44
|
+
const AppColors_1 = require("../styles/AppColors");
|
|
45
|
+
const styles_1 = __importDefault(require("../styles"));
|
|
46
|
+
const DiffViewer = react_1.default.memo(({ oldData, newData, forceOpen, }) => {
|
|
47
|
+
const diffs = (0, react_1.useMemo)(() => (0, helpers_1.getDiff)(oldData, newData), [oldData, newData]);
|
|
48
|
+
if (forceOpen === false) {
|
|
49
|
+
return (<react_native_1.View style={styles_1.default.codeBlock}>
|
|
50
|
+
<react_native_1.Text style={[styles_1.default.codeText, { color: AppColors_1.AppColors.grayTextWeak }]}>
|
|
51
|
+
{'{ Diff hidden }'}
|
|
52
|
+
</react_native_1.Text>
|
|
53
|
+
</react_native_1.View>);
|
|
54
|
+
}
|
|
55
|
+
if (diffs.length === 0) {
|
|
56
|
+
return (<react_native_1.View style={styles_1.default.codeBlock}>
|
|
57
|
+
<react_native_1.Text style={styles_1.default.codeText}>No differences from previous API.</react_native_1.Text>
|
|
58
|
+
</react_native_1.View>);
|
|
59
|
+
}
|
|
60
|
+
return (<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={true} style={styles_1.default.codeBlockScroll}>
|
|
61
|
+
<react_native_1.View style={styles_1.default.diffBlock}>
|
|
62
|
+
{diffs.map((d, i) => {
|
|
63
|
+
const key = d.path === 'root' ? '' : `"${d.path}": `;
|
|
64
|
+
if (d.type === 'added') {
|
|
65
|
+
return (<react_native_1.Text key={i} selectable={true} style={styles_1.default.diffAdded}>
|
|
66
|
+
+ <react_native_1.Text style={styles_1.default.codeKey}>{key}</react_native_1.Text>
|
|
67
|
+
{JSON.stringify(d.newVal)}
|
|
68
|
+
</react_native_1.Text>);
|
|
69
|
+
}
|
|
70
|
+
if (d.type === 'removed') {
|
|
71
|
+
return (<react_native_1.Text key={i} selectable={true} style={styles_1.default.diffRemoved}>
|
|
72
|
+
- <react_native_1.Text style={styles_1.default.codeKey}>{key}</react_native_1.Text>
|
|
73
|
+
{JSON.stringify(d.oldVal)}
|
|
74
|
+
</react_native_1.Text>);
|
|
75
|
+
}
|
|
76
|
+
return (<react_native_1.Text key={i} selectable={true} style={styles_1.default.diffChanged}>
|
|
77
|
+
~ <react_native_1.Text style={styles_1.default.codeKey}>{key}</react_native_1.Text>
|
|
78
|
+
{JSON.stringify(d.oldVal)}{' '}
|
|
79
|
+
<react_native_1.Text style={{ color: AppColors_1.AppColors.grayTextWeak }}>➔</react_native_1.Text>{' '}
|
|
80
|
+
{JSON.stringify(d.newVal)}
|
|
81
|
+
</react_native_1.Text>);
|
|
82
|
+
})}
|
|
83
|
+
</react_native_1.View>
|
|
84
|
+
</react_native_1.ScrollView>);
|
|
85
|
+
});
|
|
86
|
+
exports.default = DiffViewer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LocalFilter } from '../types';
|
|
3
|
+
declare const DomainHeader: ({ pageName, color, stats, activeFilters, onToggleFilter, isCollapsed, onToggleCollapse, isFirst, timestamp, }: {
|
|
4
|
+
pageName: string;
|
|
5
|
+
color: string;
|
|
6
|
+
stats: {
|
|
7
|
+
success: number;
|
|
8
|
+
failed: number;
|
|
9
|
+
loading: number;
|
|
10
|
+
};
|
|
11
|
+
activeFilters: Set<LocalFilter>;
|
|
12
|
+
onToggleFilter: (pageName: string, filter: LocalFilter) => void;
|
|
13
|
+
isCollapsed: boolean;
|
|
14
|
+
onToggleCollapse: (pageName: string) => void;
|
|
15
|
+
isFirst: boolean;
|
|
16
|
+
timestamp: number;
|
|
17
|
+
}) => React.JSX.Element;
|
|
18
|
+
export default DomainHeader;
|