react-native-inapp-inspector 1.1.13 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -34
- package/dist/commonjs/assets/svgAssets.d.ts +3 -0
- package/dist/commonjs/assets/svgAssets.js +17 -0
- package/dist/commonjs/components/AnalyticsEventCard.d.ts +1 -14
- package/dist/commonjs/components/AnalyticsEventCard.js +120 -50
- package/dist/commonjs/components/AnalyticsGraph.d.ts +2 -6
- package/dist/commonjs/components/AnalyticsGraph.js +8 -8
- package/dist/commonjs/components/AnalyticsTabView.d.ts +15 -0
- package/dist/commonjs/components/AnalyticsTabView.js +157 -0
- package/dist/commonjs/components/AnimatedEntrance.d.ts +1 -1
- package/dist/commonjs/components/AnimatedEntrance.js +2 -2
- package/dist/commonjs/components/ApiDetailView.d.ts +22 -0
- package/dist/commonjs/components/ApiDetailView.js +304 -0
- package/dist/commonjs/components/ApisTabView.d.ts +33 -0
- package/dist/commonjs/components/ApisTabView.js +235 -0
- package/dist/commonjs/components/CodeSnippet.d.ts +1 -5
- package/dist/commonjs/components/CodeSnippet.js +34 -34
- package/dist/commonjs/components/ConsoleLogCard.d.ts +1 -8
- package/dist/commonjs/components/ConsoleLogCard.js +262 -442
- package/dist/commonjs/components/ConsoleLogDetailView.d.ts +9 -0
- package/dist/commonjs/components/ConsoleLogDetailView.js +278 -0
- package/dist/commonjs/components/ConsoleLogsTabView.d.ts +24 -0
- package/dist/commonjs/components/ConsoleLogsTabView.js +354 -0
- package/dist/commonjs/components/DiffViewer.js +4 -2
- package/dist/commonjs/components/DomainHeader.js +66 -41
- package/dist/commonjs/components/EmptyState.d.ts +2 -2
- package/dist/commonjs/components/EmptyState.js +2 -2
- package/dist/commonjs/components/EndOfListFooter.d.ts +8 -0
- package/dist/commonjs/components/EndOfListFooter.js +90 -0
- package/dist/commonjs/components/ErrorBoundary.d.ts +5 -14
- package/dist/commonjs/components/ErrorBoundary.js +28 -28
- package/dist/commonjs/components/FloatingBubble.d.ts +14 -0
- package/dist/commonjs/components/FloatingBubble.js +75 -0
- package/dist/commonjs/components/HeadersSection.js +5 -3
- package/dist/commonjs/components/HighlightText.d.ts +1 -1
- package/dist/commonjs/components/HighlightText.js +5 -7
- package/dist/commonjs/components/Inspector/AnalyticsTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +232 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.js +410 -0
- package/dist/commonjs/components/Inspector/FabLauncher.d.ts +3 -0
- package/dist/commonjs/components/Inspector/FabLauncher.js +54 -0
- package/dist/commonjs/components/Inspector/InsightsDashboard.d.ts +3 -0
- package/dist/commonjs/components/Inspector/InsightsDashboard.js +619 -0
- package/dist/commonjs/components/Inspector/InspectorContext.d.ts +5 -0
- package/dist/commonjs/components/Inspector/InspectorContext.js +18 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.d.ts +3 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +452 -0
- package/dist/commonjs/components/Inspector/LogDetail.d.ts +3 -0
- package/dist/commonjs/components/Inspector/LogDetail.js +963 -0
- package/dist/commonjs/components/Inspector/MainScreen.d.ts +3 -0
- package/dist/commonjs/components/Inspector/MainScreen.js +68 -0
- package/dist/commonjs/components/Inspector/NavigationTracker.d.ts +3 -0
- package/dist/commonjs/components/Inspector/NavigationTracker.js +12 -0
- package/dist/commonjs/components/Inspector/NetworkDetail.d.ts +3 -0
- package/dist/commonjs/components/Inspector/NetworkDetail.js +405 -0
- package/dist/commonjs/components/Inspector/NetworkTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/NetworkTab.js +281 -0
- package/dist/commonjs/components/Inspector/ReduxTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/ReduxTab.js +75 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.d.ts +3 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +1476 -0
- package/dist/commonjs/components/Inspector/TabBar.d.ts +3 -0
- package/dist/commonjs/components/Inspector/TabBar.js +95 -0
- package/dist/commonjs/components/Inspector/WebViewTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/WebViewTab.js +757 -0
- package/dist/commonjs/components/InspectorHeader.d.ts +19 -0
- package/dist/commonjs/components/InspectorHeader.js +329 -0
- package/dist/commonjs/components/InspectorTabBar.d.ts +16 -0
- package/dist/commonjs/components/InspectorTabBar.js +90 -0
- package/dist/commonjs/components/JsonViewer.d.ts +4 -1
- package/dist/commonjs/components/JsonViewer.js +110 -171
- package/dist/commonjs/components/LogCard.js +109 -86
- package/dist/commonjs/components/MetaAccordion.d.ts +1 -10
- package/dist/commonjs/components/MetaAccordion.js +23 -21
- package/dist/commonjs/components/NavigationTracker.d.ts +7 -0
- package/dist/commonjs/components/NavigationTracker.js +76 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +6 -0
- package/dist/commonjs/components/NetworkIcons.js +54 -8
- package/dist/commonjs/components/ReduxTabView.d.ts +9 -0
- package/dist/commonjs/components/ReduxTabView.js +56 -0
- package/dist/commonjs/components/ReduxTreeView.js +241 -200
- package/dist/commonjs/components/SegmentedTabs.d.ts +15 -0
- package/dist/commonjs/components/SegmentedTabs.js +52 -0
- package/dist/commonjs/components/SettingsView.d.ts +13 -0
- package/dist/commonjs/components/SettingsView.js +328 -0
- package/dist/commonjs/components/TouchableScale.d.ts +2 -2
- package/dist/commonjs/components/TouchableScale.js +2 -2
- package/dist/commonjs/components/TreeNode.js +2 -2
- package/dist/commonjs/constants/index.js +1 -12
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +8 -0
- package/dist/commonjs/customHooks/analyticsLogger.js +42 -1
- package/dist/commonjs/customHooks/consoleLogger.js +137 -13
- package/dist/commonjs/customHooks/networkLogger.d.ts +0 -1
- package/dist/commonjs/customHooks/networkLogger.js +0 -1
- package/dist/commonjs/customHooks/reduxLogger.d.ts +2 -9
- package/dist/commonjs/enums/index.d.ts +39 -0
- package/dist/commonjs/enums/index.js +50 -0
- package/dist/commonjs/helpers/index.d.ts +27 -1
- package/dist/commonjs/helpers/index.js +187 -12
- package/dist/commonjs/helpers/settingsStore.d.ts +2 -24
- package/dist/commonjs/i18n/en.json +144 -0
- package/dist/commonjs/i18n/index.d.ts +2 -0
- package/dist/commonjs/i18n/index.js +27 -0
- package/dist/commonjs/i18n/locales/en.json +314 -0
- package/dist/commonjs/index.d.ts +2 -3
- package/dist/commonjs/index.js +207 -4927
- package/dist/commonjs/styles/AppColors.d.ts +148 -0
- package/dist/commonjs/styles/AppColors.js +176 -0
- package/dist/commonjs/styles/common.d.ts +3 -0
- package/dist/commonjs/styles/common.js +201 -0
- package/dist/commonjs/styles/index.d.ts +219 -435
- package/dist/commonjs/styles/index.js +312 -488
- package/dist/commonjs/types/enums.d.ts +9 -0
- package/dist/commonjs/types/enums.js +4 -0
- package/dist/commonjs/types/index.d.ts +4 -111
- package/dist/commonjs/types/index.js +16 -0
- package/dist/commonjs/types/interfaces.d.ts +337 -0
- package/dist/commonjs/types/interfaces.js +2 -0
- package/dist/esm/assets/svgAssets.d.ts +3 -0
- package/dist/esm/assets/svgAssets.js +14 -0
- package/dist/esm/components/AnalyticsEventCard.d.ts +1 -14
- package/dist/esm/components/AnalyticsEventCard.js +118 -48
- package/dist/esm/components/AnalyticsGraph.d.ts +2 -6
- package/dist/esm/components/AnalyticsGraph.js +8 -8
- package/dist/esm/components/AnalyticsTabView.d.ts +15 -0
- package/dist/esm/components/AnalyticsTabView.js +151 -0
- package/dist/esm/components/AnimatedEntrance.d.ts +1 -1
- package/dist/esm/components/AnimatedEntrance.js +2 -2
- package/dist/esm/components/ApiDetailView.d.ts +22 -0
- package/dist/esm/components/ApiDetailView.js +264 -0
- package/dist/esm/components/ApisTabView.d.ts +33 -0
- package/dist/esm/components/ApisTabView.js +196 -0
- package/dist/esm/components/CodeSnippet.d.ts +1 -5
- package/dist/esm/components/CodeSnippet.js +34 -34
- package/dist/esm/components/ConsoleLogCard.d.ts +1 -8
- package/dist/esm/components/ConsoleLogCard.js +262 -409
- package/dist/esm/components/ConsoleLogDetailView.d.ts +9 -0
- package/dist/esm/components/ConsoleLogDetailView.js +271 -0
- package/dist/esm/components/ConsoleLogsTabView.d.ts +24 -0
- package/dist/esm/components/ConsoleLogsTabView.js +348 -0
- package/dist/esm/components/DiffViewer.js +4 -2
- package/dist/esm/components/DomainHeader.js +66 -41
- package/dist/esm/components/EmptyState.d.ts +2 -2
- package/dist/esm/components/EmptyState.js +2 -2
- package/dist/esm/components/EndOfListFooter.d.ts +8 -0
- package/dist/esm/components/EndOfListFooter.js +83 -0
- package/dist/esm/components/ErrorBoundary.d.ts +5 -14
- package/dist/esm/components/ErrorBoundary.js +29 -29
- package/dist/esm/components/FloatingBubble.d.ts +14 -0
- package/dist/esm/components/FloatingBubble.js +68 -0
- package/dist/esm/components/HeadersSection.js +5 -3
- package/dist/esm/components/HighlightText.d.ts +1 -1
- package/dist/esm/components/HighlightText.js +5 -7
- package/dist/esm/components/Inspector/AnalyticsTab.d.ts +3 -0
- package/dist/esm/components/Inspector/AnalyticsTab.js +194 -0
- package/dist/esm/components/Inspector/ConsoleTab.d.ts +3 -0
- package/dist/esm/components/Inspector/ConsoleTab.js +372 -0
- package/dist/esm/components/Inspector/FabLauncher.d.ts +3 -0
- package/dist/esm/components/Inspector/FabLauncher.js +49 -0
- package/dist/esm/components/Inspector/InsightsDashboard.d.ts +3 -0
- package/dist/esm/components/Inspector/InsightsDashboard.js +614 -0
- package/dist/esm/components/Inspector/InspectorContext.d.ts +5 -0
- package/dist/esm/components/Inspector/InspectorContext.js +13 -0
- package/dist/esm/components/Inspector/InspectorHeader.d.ts +3 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +447 -0
- package/dist/esm/components/Inspector/LogDetail.d.ts +3 -0
- package/dist/esm/components/Inspector/LogDetail.js +925 -0
- package/dist/esm/components/Inspector/MainScreen.d.ts +3 -0
- package/dist/esm/components/Inspector/MainScreen.js +63 -0
- package/dist/esm/components/Inspector/NavigationTracker.d.ts +3 -0
- package/dist/esm/components/Inspector/NavigationTracker.js +10 -0
- package/dist/esm/components/Inspector/NetworkDetail.d.ts +3 -0
- package/dist/esm/components/Inspector/NetworkDetail.js +367 -0
- package/dist/esm/components/Inspector/NetworkTab.d.ts +3 -0
- package/dist/esm/components/Inspector/NetworkTab.js +243 -0
- package/dist/esm/components/Inspector/ReduxTab.d.ts +3 -0
- package/dist/esm/components/Inspector/ReduxTab.js +70 -0
- package/dist/esm/components/Inspector/SettingsPanel.d.ts +3 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +1438 -0
- package/dist/esm/components/Inspector/TabBar.d.ts +3 -0
- package/dist/esm/components/Inspector/TabBar.js +90 -0
- package/dist/esm/components/Inspector/WebViewTab.d.ts +3 -0
- package/dist/esm/components/Inspector/WebViewTab.js +752 -0
- package/dist/esm/components/InspectorHeader.d.ts +19 -0
- package/dist/esm/components/InspectorHeader.js +323 -0
- package/dist/esm/components/InspectorTabBar.d.ts +16 -0
- package/dist/esm/components/InspectorTabBar.js +84 -0
- package/dist/esm/components/JsonViewer.d.ts +4 -1
- package/dist/esm/components/JsonViewer.js +111 -172
- package/dist/esm/components/LogCard.js +111 -88
- package/dist/esm/components/MetaAccordion.d.ts +1 -10
- package/dist/esm/components/MetaAccordion.js +23 -21
- package/dist/esm/components/NavigationTracker.d.ts +7 -0
- package/dist/esm/components/NavigationTracker.js +39 -0
- package/dist/esm/components/NetworkIcons.d.ts +6 -0
- package/dist/esm/components/NetworkIcons.js +46 -6
- package/dist/esm/components/ReduxTabView.d.ts +9 -0
- package/dist/esm/components/ReduxTabView.js +50 -0
- package/dist/esm/components/ReduxTreeView.js +243 -202
- package/dist/esm/components/SegmentedTabs.d.ts +15 -0
- package/dist/esm/components/SegmentedTabs.js +47 -0
- package/dist/esm/components/SettingsView.d.ts +13 -0
- package/dist/esm/components/SettingsView.js +321 -0
- package/dist/esm/components/TouchableScale.d.ts +2 -2
- package/dist/esm/components/TouchableScale.js +2 -2
- package/dist/esm/components/TreeNode.js +2 -2
- package/dist/esm/constants/index.js +1 -12
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.d.ts +8 -0
- package/dist/esm/customHooks/analyticsLogger.js +37 -0
- package/dist/esm/customHooks/consoleLogger.js +137 -13
- package/dist/esm/customHooks/networkLogger.d.ts +0 -1
- package/dist/esm/customHooks/networkLogger.js +0 -1
- package/dist/esm/customHooks/reduxLogger.d.ts +2 -9
- package/dist/esm/enums/index.d.ts +39 -0
- package/dist/esm/enums/index.js +47 -0
- package/dist/esm/helpers/index.d.ts +27 -1
- package/dist/esm/helpers/index.js +180 -11
- package/dist/esm/helpers/settingsStore.d.ts +2 -24
- package/dist/esm/i18n/en.json +144 -0
- package/dist/esm/i18n/index.d.ts +2 -0
- package/dist/esm/i18n/index.js +22 -0
- package/dist/esm/i18n/locales/en.json +314 -0
- package/dist/esm/index.d.ts +2 -3
- package/dist/esm/index.js +207 -4923
- package/dist/esm/styles/AppColors.d.ts +148 -0
- package/dist/esm/styles/AppColors.js +176 -0
- package/dist/esm/styles/common.d.ts +3 -0
- package/dist/esm/styles/common.js +197 -0
- package/dist/esm/styles/index.d.ts +219 -435
- package/dist/esm/styles/index.js +312 -488
- package/dist/esm/types/enums.d.ts +9 -0
- package/dist/esm/types/enums.js +3 -0
- package/dist/esm/types/index.d.ts +4 -111
- package/dist/esm/types/index.js +2 -1
- package/dist/esm/types/interfaces.d.ts +337 -0
- package/dist/esm/types/interfaces.js +1 -0
- package/example/App.tsx +88 -1
- package/example/android/app/build.gradle +29 -1
- package/example/android/app/src/main/java/com/example/MainApplication.kt +25 -0
- package/example/android/build.gradle +31 -4
- package/example/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/example/android/gradle.properties +1 -0
- package/example/android/settings.gradle +20 -1
- package/example/package-lock.json +1 -1
- package/package.json +3 -1
|
@@ -38,75 +38,70 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
40
|
const react_native_1 = require("react-native");
|
|
41
|
-
const
|
|
41
|
+
const react_i18next_1 = require("react-i18next");
|
|
42
42
|
// Components
|
|
43
43
|
const TreeNode_1 = __importDefault(require("./TreeNode"));
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
const
|
|
44
|
+
const SegmentedTabs_1 = __importDefault(require("./SegmentedTabs"));
|
|
45
|
+
const HighlightText_1 = __importDefault(require("./HighlightText"));
|
|
46
|
+
const NetworkIcons_1 = require("./NetworkIcons");
|
|
47
47
|
// Styles
|
|
48
48
|
const AppColors_1 = require("../styles/AppColors");
|
|
49
49
|
const AppFonts_1 = require("../styles/AppFonts");
|
|
50
50
|
const styles_1 = __importDefault(require("../styles"));
|
|
51
|
-
// ── Tab Icons ────────────────────────────────────────────────────────────────
|
|
52
|
-
const PrettyIcon = ({ color = '#94A3B8', size = 12 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 16 16" fill="none">
|
|
53
|
-
<react_native_svg_1.Path d="M5 3C3.9 3 3 3.9 3 5v1.5c0 .8-.7 1.5-1.5 1.5S0 7.3 0 6.5V5c0-2.8 2.2-5 5-5 .6 0 1 .4 1 1s-.4 1-1 1zm6 0c-1.1 0-2 .9-2 2v1.5c0 .8-.7 1.5-1.5 1.5S6 9.3 6 8.5V5c0-2.8 2.2-5 5-5 .6 0 1 .4 1 1s-.4 1-1 1z" fill={color} opacity={0.9}/>
|
|
54
|
-
<react_native_svg_1.Path d="M3 11v1.5c0 .8.7 1.5 1.5 1.5S6 13.3 6 12.5V11H3zm7 0v1.5c0 .8.7 1.5 1.5 1.5S13 13.3 13 12.5V11H10z" fill={color} opacity={0.6}/>
|
|
55
|
-
</react_native_svg_1.default>);
|
|
56
|
-
const RawIcon = ({ color = '#94A3B8', size = 12 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 16 16" fill="none">
|
|
57
|
-
<react_native_svg_1.Rect x="1" y="2" width="10" height="1.5" rx="0.75" fill={color} opacity={0.9}/>
|
|
58
|
-
<react_native_svg_1.Rect x="1" y="5.5" width="14" height="1.5" rx="0.75" fill={color} opacity={0.6}/>
|
|
59
|
-
<react_native_svg_1.Rect x="1" y="9" width="8" height="1.5" rx="0.75" fill={color} opacity={0.45}/>
|
|
60
|
-
<react_native_svg_1.Rect x="1" y="12.5" width="12" height="1.5" rx="0.75" fill={color} opacity={0.3}/>
|
|
61
|
-
</react_native_svg_1.default>);
|
|
62
|
-
const TableIcon = ({ color = '#94A3B8', size = 12 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 16 16" fill="none">
|
|
63
|
-
<react_native_svg_1.Rect x="1" y="1" width="14" height="14" rx="2" stroke={color} strokeWidth={1.2} opacity={0.7}/>
|
|
64
|
-
<react_native_svg_1.Path d="M1 5.5h14M1 10h14M5.5 1v14M10.5 1v14" stroke={color} strokeWidth={0.8} opacity={0.5}/>
|
|
65
|
-
</react_native_svg_1.default>);
|
|
66
51
|
// ── JsonViewer Component ─────────────────────────────────────────────────────
|
|
67
|
-
const JsonViewer = ({ data, search, forceOpen, defaultExpandDepth, wrap, fullHeight = false, onModeChange, }) => {
|
|
68
|
-
const
|
|
52
|
+
const JsonViewer = ({ data, search, forceOpen, defaultExpandDepth, wrap, fullHeight = false, maxHeight, mode: externalMode, onModeChange, hideTabs = false, }) => {
|
|
53
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
54
|
+
const [mode, setMode] = (0, react_1.useState)(externalMode || 'pretty');
|
|
55
|
+
const rawText = react_1.default.useMemo(() => {
|
|
56
|
+
if (typeof data === 'string') {
|
|
57
|
+
return data;
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
return JSON.stringify(data);
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return String(data);
|
|
64
|
+
}
|
|
65
|
+
}, [data]);
|
|
66
|
+
(0, react_1.useEffect)(() => {
|
|
67
|
+
if (externalMode) {
|
|
68
|
+
setMode(externalMode);
|
|
69
|
+
}
|
|
70
|
+
}, [externalMode]);
|
|
69
71
|
(0, react_1.useEffect)(() => {
|
|
70
72
|
onModeChange?.(mode);
|
|
71
73
|
}, [mode, onModeChange]);
|
|
74
|
+
const contentWrapperStyle = [
|
|
75
|
+
localStyles.contentWrapper,
|
|
76
|
+
{ backgroundColor: AppColors_1.AppColors.contentBg },
|
|
77
|
+
fullHeight && { flex: 1, maxHeight: undefined },
|
|
78
|
+
!fullHeight && maxHeight != null && { maxHeight },
|
|
79
|
+
];
|
|
80
|
+
const scrollStyle = [
|
|
81
|
+
localStyles.rawScroll,
|
|
82
|
+
!fullHeight && maxHeight != null && { maxHeight },
|
|
83
|
+
];
|
|
72
84
|
// Determine type and size details
|
|
73
85
|
const isObject = typeof data === 'object' && data !== null;
|
|
74
|
-
const
|
|
75
|
-
let typeLabel = typeof data;
|
|
76
|
-
let countLabel = '';
|
|
77
|
-
if (data === null) {
|
|
78
|
-
typeLabel = 'null';
|
|
79
|
-
}
|
|
80
|
-
else if (isArray) {
|
|
81
|
-
typeLabel = 'array';
|
|
82
|
-
countLabel = `${data.length} items`;
|
|
83
|
-
}
|
|
84
|
-
else if (isObject) {
|
|
85
|
-
typeLabel = 'object';
|
|
86
|
-
countLabel = `${Object.keys(data).length} keys`;
|
|
87
|
-
}
|
|
88
|
-
// Copy helper
|
|
89
|
-
const handleCopy = () => {
|
|
90
|
-
(0, helpers_1.copyToClipboard)(data, 'JSON data');
|
|
91
|
-
};
|
|
86
|
+
const isEmpty = isObject && Object.keys(data).length === 0;
|
|
92
87
|
// Render Table view (Key-Value flat table for root keys)
|
|
93
88
|
const renderTableMode = () => {
|
|
94
89
|
if (!isObject) {
|
|
95
90
|
return (<react_native_1.View style={localStyles.tableRow}>
|
|
96
|
-
<react_native_1.Text style={localStyles.tableCellKey}>value</react_native_1.Text>
|
|
91
|
+
<react_native_1.Text style={localStyles.tableCellKey}>{t('network.jsonViewer.value')}</react_native_1.Text>
|
|
97
92
|
<react_native_1.Text style={localStyles.tableCellValue}>{String(data)}</react_native_1.Text>
|
|
98
93
|
</react_native_1.View>);
|
|
99
94
|
}
|
|
100
95
|
const keys = Object.keys(data);
|
|
101
96
|
if (keys.length === 0) {
|
|
102
97
|
return (<react_native_1.View style={localStyles.emptyTable}>
|
|
103
|
-
<react_native_1.Text style={localStyles.emptyTableText}>
|
|
98
|
+
<react_native_1.Text style={localStyles.emptyTableText}>{t('network.jsonViewer.emptyTable')}</react_native_1.Text>
|
|
104
99
|
</react_native_1.View>);
|
|
105
100
|
}
|
|
106
101
|
return (<react_native_1.View style={localStyles.tableView}>
|
|
107
102
|
<react_native_1.View style={localStyles.tableHeaderRow}>
|
|
108
|
-
<react_native_1.Text style={[localStyles.tableHeaderCell, { flex: 2 }]}>
|
|
109
|
-
<react_native_1.Text style={[localStyles.tableHeaderCell, { flex: 3 }]}>
|
|
103
|
+
<react_native_1.Text style={[localStyles.tableHeaderCell, { flex: 2 }]}>{t('network.jsonViewer.key')}</react_native_1.Text>
|
|
104
|
+
<react_native_1.Text style={[localStyles.tableHeaderCell, { flex: 3 }]}>{t('network.jsonViewer.value')}</react_native_1.Text>
|
|
110
105
|
</react_native_1.View>
|
|
111
106
|
{keys.map((key) => {
|
|
112
107
|
const val = data[key];
|
|
@@ -135,68 +130,70 @@ const JsonViewer = ({ data, search, forceOpen, defaultExpandDepth, wrap, fullHei
|
|
|
135
130
|
// Tree View Content
|
|
136
131
|
const tree = (<TreeNode_1.default data={data} search={search} forceOpen={forceOpen} defaultExpandDepth={defaultExpandDepth}/>);
|
|
137
132
|
return (<react_native_1.View style={[localStyles.container, fullHeight && { flex: 1 }]}>
|
|
138
|
-
{/* ── Top Toolbar
|
|
139
|
-
<react_native_1.View style={localStyles.toolbar}>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
</react_native_1.View>
|
|
159
|
-
|
|
160
|
-
{/* Right Actions — badges & copy removed (caller provides header) */}
|
|
161
|
-
|
|
162
|
-
</react_native_1.View>
|
|
133
|
+
{/* ── Top Toolbar (Postman-style) ── */}
|
|
134
|
+
{!hideTabs && (<react_native_1.View style={localStyles.toolbar}>
|
|
135
|
+
<SegmentedTabs_1.default tabs={[
|
|
136
|
+
{
|
|
137
|
+
key: 'pretty',
|
|
138
|
+
label: t('network.jsonViewer.pretty'),
|
|
139
|
+
icon: (isActive) => (<NetworkIcons_1.PrettyIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.slate400} size={12}/>),
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
key: 'raw',
|
|
143
|
+
label: t('network.jsonViewer.raw'),
|
|
144
|
+
icon: (isActive) => (<NetworkIcons_1.RawIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.slate400} size={12}/>),
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
key: 'table',
|
|
148
|
+
label: t('network.jsonViewer.table'),
|
|
149
|
+
icon: (isActive) => (<NetworkIcons_1.TableIcon color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.slate400} size={12}/>),
|
|
150
|
+
},
|
|
151
|
+
]} activeKey={mode} onChange={key => setMode(key)}/>
|
|
152
|
+
</react_native_1.View>)}
|
|
163
153
|
|
|
164
154
|
{/* ── Main View Content Area (Royal Monospace Theme) ── */}
|
|
165
|
-
<react_native_1.View style={
|
|
166
|
-
{mode === 'pretty' && (
|
|
155
|
+
<react_native_1.View style={contentWrapperStyle}>
|
|
156
|
+
{mode === 'pretty' && (isEmpty ? (<react_native_1.View style={localStyles.emptyTable}>
|
|
157
|
+
<react_native_1.Text style={localStyles.emptyTableText}>
|
|
158
|
+
{t('network.emptyResponse')}
|
|
159
|
+
</react_native_1.Text>
|
|
160
|
+
</react_native_1.View>) : (wrap ? (fullHeight ? (<react_native_1.ScrollView style={{ flex: 1 }} contentContainerStyle={{ flexGrow: 1 }}>
|
|
167
161
|
<react_native_1.View style={[styles_1.default.codeBlock, { width: '100%' }]}>{tree}</react_native_1.View>
|
|
168
|
-
</react_native_1.ScrollView>) : (<react_native_1.
|
|
169
|
-
<react_native_1.View style={styles_1.default.codeBlock}>{tree}</react_native_1.View>
|
|
170
|
-
</react_native_1.ScrollView>) : (<react_native_1.ScrollView
|
|
162
|
+
</react_native_1.ScrollView>) : (<react_native_1.ScrollView style={scrollStyle} contentContainerStyle={{ flexGrow: 1 }}>
|
|
163
|
+
<react_native_1.View style={[styles_1.default.codeBlock, { width: '100%' }]}>{tree}</react_native_1.View>
|
|
164
|
+
</react_native_1.ScrollView>)) : (fullHeight ? (<react_native_1.ScrollView style={{ flex: 1 }} contentContainerStyle={{ flexGrow: 1 }}>
|
|
171
165
|
<react_native_1.View style={styles_1.default.codeBlock}>{tree}</react_native_1.View>
|
|
172
|
-
</react_native_1.ScrollView>)
|
|
166
|
+
</react_native_1.ScrollView>) : (<react_native_1.ScrollView style={scrollStyle}>
|
|
167
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={true} style={styles_1.default.codeBlockScroll}>
|
|
168
|
+
<react_native_1.View style={styles_1.default.codeBlock}>{tree}</react_native_1.View>
|
|
169
|
+
</react_native_1.ScrollView>
|
|
170
|
+
</react_native_1.ScrollView>))))}
|
|
173
171
|
|
|
174
|
-
{mode === 'raw' && (
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
</react_native_1.View>))}
|
|
172
|
+
{mode === 'raw' && (<react_native_1.ScrollView style={scrollStyle} contentContainerStyle={localStyles.rawContainer} showsVerticalScrollIndicator={true} nestedScrollEnabled={true}>
|
|
173
|
+
<HighlightText_1.default text={rawText} search={search} detectLinks={true} style={localStyles.rawPlainText} highlightStyle={{
|
|
174
|
+
backgroundColor: AppColors_1.AppColors.yellowHighlight,
|
|
175
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
176
|
+
borderRadius: 3,
|
|
177
|
+
paddingHorizontal: 2,
|
|
178
|
+
}}/>
|
|
179
|
+
</react_native_1.ScrollView>)}
|
|
183
180
|
|
|
184
|
-
{mode === 'table' && (fullHeight ? (<react_native_1.ScrollView style={
|
|
181
|
+
{mode === 'table' && (fullHeight ? (<react_native_1.ScrollView style={scrollStyle}>
|
|
185
182
|
{renderTableMode()}
|
|
186
|
-
</react_native_1.ScrollView>) : (<react_native_1.
|
|
183
|
+
</react_native_1.ScrollView>) : (<react_native_1.ScrollView style={scrollStyle}>
|
|
187
184
|
{renderTableMode()}
|
|
188
|
-
</react_native_1.
|
|
185
|
+
</react_native_1.ScrollView>))}
|
|
189
186
|
</react_native_1.View>
|
|
190
187
|
</react_native_1.View>);
|
|
191
188
|
};
|
|
192
189
|
const localStyles = react_native_1.StyleSheet.create({
|
|
193
190
|
container: {
|
|
194
|
-
backgroundColor:
|
|
191
|
+
backgroundColor: AppColors_1.AppColors.white,
|
|
195
192
|
borderRadius: 12,
|
|
196
193
|
borderWidth: 1.5,
|
|
197
|
-
borderColor:
|
|
194
|
+
borderColor: AppColors_1.AppColors.slate200,
|
|
198
195
|
overflow: 'hidden',
|
|
199
|
-
shadowColor:
|
|
196
|
+
shadowColor: AppColors_1.AppColors.black,
|
|
200
197
|
shadowOpacity: 0.04,
|
|
201
198
|
shadowRadius: 5,
|
|
202
199
|
shadowOffset: { width: 0, height: 2 },
|
|
@@ -207,123 +204,65 @@ const localStyles = react_native_1.StyleSheet.create({
|
|
|
207
204
|
flexDirection: 'row',
|
|
208
205
|
alignItems: 'center',
|
|
209
206
|
justifyContent: 'space-between',
|
|
210
|
-
backgroundColor:
|
|
207
|
+
backgroundColor: AppColors_1.AppColors.slate50,
|
|
211
208
|
borderBottomWidth: 1,
|
|
212
|
-
borderBottomColor:
|
|
209
|
+
borderBottomColor: AppColors_1.AppColors.slate200,
|
|
213
210
|
paddingHorizontal: 12,
|
|
214
211
|
paddingVertical: 8,
|
|
215
212
|
},
|
|
216
|
-
segmentedControl: {
|
|
217
|
-
flexDirection: 'row',
|
|
218
|
-
backgroundColor: '#E2E8F0',
|
|
219
|
-
borderRadius: 8,
|
|
220
|
-
padding: 2,
|
|
221
|
-
},
|
|
222
|
-
segButton: {
|
|
223
|
-
flexDirection: 'row',
|
|
224
|
-
alignItems: 'center',
|
|
225
|
-
gap: 4,
|
|
226
|
-
paddingHorizontal: 10,
|
|
227
|
-
paddingVertical: 5,
|
|
228
|
-
borderRadius: 6,
|
|
229
|
-
},
|
|
230
|
-
segButtonActive: {
|
|
231
|
-
backgroundColor: '#FFFFFF',
|
|
232
|
-
shadowColor: '#000',
|
|
233
|
-
shadowOpacity: 0.08,
|
|
234
|
-
shadowRadius: 2,
|
|
235
|
-
shadowOffset: { width: 0, height: 1 },
|
|
236
|
-
elevation: 1,
|
|
237
|
-
},
|
|
238
|
-
segText: {
|
|
239
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
240
|
-
fontSize: 9.5,
|
|
241
|
-
color: '#64748B',
|
|
242
|
-
letterSpacing: 0.3,
|
|
243
|
-
},
|
|
244
|
-
segTextActive: {
|
|
245
|
-
color: AppColors_1.AppColors.purple,
|
|
246
|
-
},
|
|
247
|
-
rightActions: {
|
|
248
|
-
flexDirection: 'row',
|
|
249
|
-
alignItems: 'center',
|
|
250
|
-
gap: 6,
|
|
251
|
-
},
|
|
252
|
-
badge: {
|
|
253
|
-
backgroundColor: 'rgba(104,75,155,0.06)',
|
|
254
|
-
borderWidth: 1,
|
|
255
|
-
borderColor: 'rgba(104,75,155,0.15)',
|
|
256
|
-
borderRadius: 5,
|
|
257
|
-
paddingHorizontal: 6,
|
|
258
|
-
paddingVertical: 2.5,
|
|
259
|
-
},
|
|
260
|
-
badgeText: {
|
|
261
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
262
|
-
fontSize: 9,
|
|
263
|
-
color: AppColors_1.AppColors.purple,
|
|
264
|
-
},
|
|
265
|
-
copyButton: {
|
|
266
|
-
width: 24,
|
|
267
|
-
height: 24,
|
|
268
|
-
borderRadius: 6,
|
|
269
|
-
backgroundColor: 'rgba(104,75,155,0.08)',
|
|
270
|
-
alignItems: 'center',
|
|
271
|
-
justifyContent: 'center',
|
|
272
|
-
},
|
|
273
213
|
contentWrapper: {
|
|
274
|
-
backgroundColor:
|
|
214
|
+
backgroundColor: AppColors_1.AppColors.white,
|
|
275
215
|
minHeight: 120,
|
|
276
|
-
maxHeight: 480,
|
|
277
216
|
},
|
|
278
217
|
rawScroll: {
|
|
279
218
|
flex: 1,
|
|
280
|
-
backgroundColor:
|
|
219
|
+
backgroundColor: AppColors_1.AppColors.paperBg, // Royal off-white paper tone
|
|
281
220
|
},
|
|
282
|
-
|
|
221
|
+
rawContainer: {
|
|
283
222
|
padding: 12,
|
|
284
223
|
},
|
|
285
|
-
|
|
286
|
-
fontFamily:
|
|
287
|
-
fontSize:
|
|
288
|
-
color:
|
|
289
|
-
lineHeight:
|
|
224
|
+
rawPlainText: {
|
|
225
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
226
|
+
fontSize: 12.5,
|
|
227
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
228
|
+
lineHeight: 18,
|
|
290
229
|
},
|
|
291
230
|
tableView: {
|
|
292
231
|
flex: 1,
|
|
293
232
|
},
|
|
294
233
|
tableHeaderRow: {
|
|
295
234
|
flexDirection: 'row',
|
|
296
|
-
backgroundColor:
|
|
235
|
+
backgroundColor: AppColors_1.AppColors.slate100,
|
|
297
236
|
borderBottomWidth: 1,
|
|
298
|
-
borderBottomColor:
|
|
237
|
+
borderBottomColor: AppColors_1.AppColors.slate200,
|
|
299
238
|
paddingVertical: 8,
|
|
300
239
|
paddingHorizontal: 12,
|
|
301
240
|
},
|
|
302
241
|
tableHeaderCell: {
|
|
303
242
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
304
|
-
fontSize:
|
|
305
|
-
color:
|
|
243
|
+
fontSize: 11,
|
|
244
|
+
color: AppColors_1.AppColors.slate600,
|
|
306
245
|
letterSpacing: 0.5,
|
|
307
246
|
textTransform: 'uppercase',
|
|
308
247
|
},
|
|
309
248
|
tableRow: {
|
|
310
249
|
flexDirection: 'row',
|
|
311
250
|
borderBottomWidth: 1,
|
|
312
|
-
borderBottomColor:
|
|
251
|
+
borderBottomColor: AppColors_1.AppColors.slate100,
|
|
313
252
|
paddingVertical: 10,
|
|
314
253
|
paddingHorizontal: 12,
|
|
315
254
|
alignItems: 'center',
|
|
316
255
|
},
|
|
317
256
|
tableCellKey: {
|
|
318
|
-
fontFamily:
|
|
319
|
-
fontSize:
|
|
320
|
-
|
|
321
|
-
color: '#0F172A',
|
|
257
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
258
|
+
fontSize: 12.5,
|
|
259
|
+
color: AppColors_1.AppColors.purple,
|
|
322
260
|
},
|
|
323
261
|
tableCellValue: {
|
|
324
|
-
fontFamily:
|
|
325
|
-
fontSize:
|
|
326
|
-
color:
|
|
262
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
263
|
+
fontSize: 12.5,
|
|
264
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
265
|
+
lineHeight: 18,
|
|
327
266
|
},
|
|
328
267
|
emptyTable: {
|
|
329
268
|
padding: 24,
|
|
@@ -332,8 +271,8 @@ const localStyles = react_native_1.StyleSheet.create({
|
|
|
332
271
|
},
|
|
333
272
|
emptyTableText: {
|
|
334
273
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
335
|
-
fontSize: 12,
|
|
336
|
-
color:
|
|
274
|
+
fontSize: 12.5,
|
|
275
|
+
color: AppColors_1.AppColors.slate400,
|
|
337
276
|
},
|
|
338
277
|
});
|
|
339
278
|
exports.default = JsonViewer;
|
|
@@ -43,11 +43,12 @@ const AppColors_1 = require("../styles/AppColors");
|
|
|
43
43
|
const constants_1 = require("../constants");
|
|
44
44
|
const helpers_1 = require("../helpers");
|
|
45
45
|
const NetworkIcons_1 = require("./NetworkIcons");
|
|
46
|
-
const AppFonts_1 = require("../styles/AppFonts");
|
|
47
46
|
const styles_1 = __importDefault(require("../styles"));
|
|
48
47
|
const HighlightText_1 = __importDefault(require("./HighlightText"));
|
|
49
48
|
const TouchableScale_1 = __importDefault(require("./TouchableScale"));
|
|
49
|
+
const react_i18next_1 = require("react-i18next");
|
|
50
50
|
const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineMinStart, timelineTotalRange, isNew, isSelected, onToggleSelect, searchStr, }) {
|
|
51
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
51
52
|
const methodColor = constants_1.METHOD_COLORS[item.method] ?? constants_1.METHOD_COLORS.ALL;
|
|
52
53
|
const isFailed = item.status === 0 || (item.status != null && item.status >= 400);
|
|
53
54
|
const isLoading = item.status == null;
|
|
@@ -76,85 +77,137 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
|
|
|
76
77
|
}, [isNew]);
|
|
77
78
|
const path = (0, helpers_1.getPath)(item.url);
|
|
78
79
|
const baseUrl = (0, helpers_1.getBaseUrl)(item.url) || item.url;
|
|
79
|
-
const
|
|
80
|
+
const cleanHost = baseUrl.replace(/^https?:\/\//, '');
|
|
81
|
+
const slug = path && path !== '/' ? path : item.url;
|
|
82
|
+
const showSlug = slug !== cleanHost;
|
|
80
83
|
const triggeredAt = (0, helpers_1.formatDateTime)(item.startTime);
|
|
81
84
|
const isJson = item.url.split('?')[0].toLowerCase().endsWith('.json');
|
|
82
85
|
return (<TouchableScale_1.default onPress={onPress} style={[
|
|
83
86
|
styles_1.default.card,
|
|
84
87
|
{
|
|
85
|
-
borderLeftWidth:
|
|
88
|
+
borderLeftWidth: 3.5,
|
|
86
89
|
borderLeftColor: cardStatusColor,
|
|
87
90
|
},
|
|
88
91
|
]}>
|
|
89
92
|
<react_native_1.View style={styles_1.default.cardBody}>
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
{/* Row 1: Header (Checkbox, Serial, Method Badge, Base URL / Host, Status Pill) */}
|
|
94
|
+
<react_native_1.View style={styles_1.default.cardHeaderRow}>
|
|
95
|
+
<react_native_1.View style={styles_1.default.cardHeaderLeft}>
|
|
96
|
+
<react_native_1.Pressable onPress={() => onToggleSelect(item.id)} hitSlop={12} style={[
|
|
92
97
|
styles_1.default.smallCheckbox,
|
|
93
98
|
isSelected && styles_1.default.smallCheckboxChecked,
|
|
94
99
|
]}>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
{isSelected && (<react_native_svg_1.default width={9} height={9} viewBox="0 0 24 24" fill="none">
|
|
101
|
+
<react_native_svg_1.Path d="M20 6L9 17l-5-5" stroke={AppColors_1.AppColors.white} strokeWidth="4" strokeLinecap="round" strokeLinejoin="round"/>
|
|
102
|
+
</react_native_svg_1.default>)}
|
|
103
|
+
</react_native_1.Pressable>
|
|
99
104
|
|
|
100
|
-
|
|
105
|
+
<react_native_1.Text style={styles_1.default.serialNumber}>#{item.id + 1}</react_native_1.Text>
|
|
101
106
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
<react_native_1.View style={[styles_1.default.methodBadge, { backgroundColor: methodColor }]}>
|
|
108
|
+
<react_native_1.Text style={[styles_1.default.methodBadgeText, { color: AppColors_1.AppColors.white }]}>
|
|
109
|
+
{item.method}
|
|
110
|
+
</react_native_1.Text>
|
|
111
|
+
</react_native_1.View>
|
|
112
|
+
|
|
113
|
+
<HighlightText_1.default text={cleanHost || item.url} search={searchStr} style={styles_1.default.cardHostText} highlightStyle={styles_1.default.highlight} numberOfLines={1} ellipsizeMode="tail"/>
|
|
114
|
+
</react_native_1.View>
|
|
115
|
+
|
|
116
|
+
<react_native_1.View style={[
|
|
117
|
+
styles_1.default.statusPill,
|
|
118
|
+
{
|
|
119
|
+
backgroundColor: isFailed
|
|
120
|
+
? `${AppColors_1.AppColors.errorColor}15`
|
|
121
|
+
: isLoading
|
|
122
|
+
? `${AppColors_1.AppColors.darkOrange}15`
|
|
123
|
+
: `${statusColor}15`,
|
|
124
|
+
borderColor: isFailed
|
|
125
|
+
? `${AppColors_1.AppColors.errorColor}30`
|
|
126
|
+
: isLoading
|
|
127
|
+
? `${AppColors_1.AppColors.darkOrange}30`
|
|
128
|
+
: `${statusColor}30`,
|
|
129
|
+
},
|
|
130
|
+
]}>
|
|
131
|
+
<react_native_1.Text style={[
|
|
132
|
+
styles_1.default.statusPillText,
|
|
133
|
+
{
|
|
134
|
+
color: isFailed
|
|
135
|
+
? AppColors_1.AppColors.errorColor
|
|
136
|
+
: isLoading
|
|
137
|
+
? AppColors_1.AppColors.darkOrange
|
|
138
|
+
: statusColor,
|
|
139
|
+
},
|
|
140
|
+
]}>
|
|
141
|
+
{isLoading
|
|
142
|
+
? '...'
|
|
143
|
+
: isFailed
|
|
144
|
+
? (item.status ? `${item.status}` : t('network.statusFailed'))
|
|
145
|
+
: item.status}
|
|
105
146
|
</react_native_1.Text>
|
|
106
147
|
</react_native_1.View>
|
|
148
|
+
</react_native_1.View>
|
|
107
149
|
|
|
108
|
-
|
|
150
|
+
{/* Row 2: Improved Slug Capsule Container */}
|
|
151
|
+
{showSlug && (<react_native_1.View style={styles_1.default.cardSlugBox}>
|
|
152
|
+
<react_native_1.View style={styles_1.default.slugLeft}>
|
|
153
|
+
<react_native_1.Text style={styles_1.default.slugTag}>PATH</react_native_1.Text>
|
|
154
|
+
<HighlightText_1.default text={slug} search={searchStr} style={styles_1.default.slugText} highlightStyle={styles_1.default.highlight} numberOfLines={1} ellipsizeMode="tail"/>
|
|
155
|
+
</react_native_1.View>
|
|
109
156
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
157
|
+
<react_native_1.View style={styles_1.default.slugRight}>
|
|
158
|
+
{isJson && (<react_native_1.View style={[
|
|
159
|
+
styles_1.default.chip,
|
|
160
|
+
{
|
|
161
|
+
backgroundColor: `${AppColors_1.AppColors.darkOrange}12`,
|
|
162
|
+
borderColor: `${AppColors_1.AppColors.darkOrange}28`,
|
|
163
|
+
},
|
|
164
|
+
]}>
|
|
165
|
+
<react_native_1.Text style={[styles_1.default.chipText, { color: AppColors_1.AppColors.darkOrange }]}>
|
|
166
|
+
.json
|
|
167
|
+
</react_native_1.Text>
|
|
168
|
+
</react_native_1.View>)}
|
|
169
|
+
|
|
170
|
+
{item.duplicateCount != null && item.duplicateCount > 1 && (<react_native_1.View style={[
|
|
171
|
+
styles_1.default.chip,
|
|
172
|
+
{
|
|
173
|
+
backgroundColor: `${AppColors_1.AppColors.purple}12`,
|
|
174
|
+
borderColor: `${AppColors_1.AppColors.purple}28`,
|
|
175
|
+
},
|
|
176
|
+
]}>
|
|
177
|
+
<react_native_1.Text style={[
|
|
178
|
+
styles_1.default.chipText,
|
|
179
|
+
{ color: AppColors_1.AppColors.purple, fontWeight: '700' },
|
|
180
|
+
]}>
|
|
181
|
+
×{item.duplicateCount}
|
|
182
|
+
</react_native_1.Text>
|
|
183
|
+
</react_native_1.View>)}
|
|
184
|
+
</react_native_1.View>
|
|
185
|
+
</react_native_1.View>)}
|
|
122
186
|
|
|
123
|
-
|
|
124
|
-
|
|
187
|
+
{/* Row 3: Footer (Timestamp on Left, Response Size & Duration on Right) */}
|
|
188
|
+
<react_native_1.View style={styles_1.default.cardFooterRow}>
|
|
189
|
+
<react_native_1.View style={styles_1.default.cardDateRow}>
|
|
190
|
+
<NetworkIcons_1.CalendarIcon color={AppColors_1.AppColors.grayTextWeak} size={10}/>
|
|
191
|
+
<react_native_1.Text style={styles_1.default.cardDateText}>{triggeredAt}</react_native_1.Text>
|
|
192
|
+
</react_native_1.View>
|
|
193
|
+
|
|
194
|
+
<react_native_1.View style={styles_1.default.cardFooterRight}>
|
|
195
|
+
{item.response != null && (<react_native_1.View style={[
|
|
125
196
|
styles_1.default.chip,
|
|
126
197
|
{
|
|
127
|
-
backgroundColor: `${AppColors_1.AppColors.purple}
|
|
128
|
-
borderColor: `${AppColors_1.AppColors.purple}
|
|
129
|
-
marginLeft: 6,
|
|
198
|
+
backgroundColor: `${AppColors_1.AppColors.purple}12`,
|
|
199
|
+
borderColor: `${AppColors_1.AppColors.purple}2E`,
|
|
130
200
|
},
|
|
131
201
|
]}>
|
|
132
|
-
|
|
202
|
+
<NetworkIcons_1.SizeIcon color={AppColors_1.AppColors.purple} size={9}/>
|
|
203
|
+
<react_native_1.Text style={[
|
|
133
204
|
styles_1.default.chipText,
|
|
134
|
-
{ color: AppColors_1.AppColors.purple,
|
|
205
|
+
{ color: AppColors_1.AppColors.purple, fontSize: 9.5 },
|
|
135
206
|
]}>
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
</react_native_1.View>
|
|
140
|
-
|
|
141
|
-
{showPathRow && (<react_native_1.View style={{ flexDirection: 'row', alignItems: 'flex-start', marginTop: 3, marginBottom: 5, paddingLeft: 30, gap: 6 }}>
|
|
142
|
-
<react_native_1.Text style={{ color: AppColors_1.AppColors.grayTextWeak, fontSize: 9, fontFamily: AppFonts_1.AppFonts.interBold, letterSpacing: 0.5, marginTop: 2.5 }}>PATH</react_native_1.Text>
|
|
143
|
-
<HighlightText_1.default text={path} search={searchStr} style={{
|
|
144
|
-
fontFamily: AppFonts_1.AppFonts.Sfprotext || 'System',
|
|
145
|
-
fontSize: 12,
|
|
146
|
-
color: AppColors_1.AppColors.grayText,
|
|
147
|
-
flex: 1,
|
|
148
|
-
}} highlightStyle={styles_1.default.highlight} numberOfLines={0}/>
|
|
149
|
-
</react_native_1.View>)}
|
|
150
|
-
|
|
151
|
-
<react_native_1.View style={styles_1.default.cardBottomRow}>
|
|
152
|
-
<react_native_1.View style={styles_1.default.cardDateRow}>
|
|
153
|
-
<NetworkIcons_1.CalendarIcon color={AppColors_1.AppColors.grayTextWeak} size={11}/>
|
|
154
|
-
<react_native_1.Text style={styles_1.default.cardDateText}>{triggeredAt}</react_native_1.Text>
|
|
155
|
-
</react_native_1.View>
|
|
207
|
+
{(0, helpers_1.getSize)(item.response)}
|
|
208
|
+
</react_native_1.Text>
|
|
209
|
+
</react_native_1.View>)}
|
|
156
210
|
|
|
157
|
-
<react_native_1.View style={styles_1.default.cardMetaRow}>
|
|
158
211
|
{item.duration != null && !isFailed && (<react_native_1.View style={[
|
|
159
212
|
styles_1.default.chip,
|
|
160
213
|
{
|
|
@@ -162,43 +215,13 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
|
|
|
162
215
|
borderColor: `${durationColor}30`,
|
|
163
216
|
},
|
|
164
217
|
]}>
|
|
165
|
-
<NetworkIcons_1.ClockIcon color={durationColor} size={
|
|
166
|
-
<react_native_1.Text style={[styles_1.default.chipText, { color: durationColor }]}>
|
|
218
|
+
<NetworkIcons_1.ClockIcon color={durationColor} size={9}/>
|
|
219
|
+
<react_native_1.Text style={[styles_1.default.chipText, { color: durationColor, fontSize: 9.5 }]}>
|
|
167
220
|
{item.duration}ms
|
|
168
221
|
</react_native_1.Text>
|
|
169
222
|
</react_native_1.View>)}
|
|
170
|
-
|
|
171
|
-
<react_native_1.View style={[
|
|
172
|
-
styles_1.default.chip,
|
|
173
|
-
{
|
|
174
|
-
backgroundColor: isFailed
|
|
175
|
-
? `${AppColors_1.AppColors.errorColor}15`
|
|
176
|
-
: `${statusColor}15`,
|
|
177
|
-
borderColor: isFailed
|
|
178
|
-
? `${AppColors_1.AppColors.errorColor}30`
|
|
179
|
-
: `${statusColor}30`,
|
|
180
|
-
},
|
|
181
|
-
]}>
|
|
182
|
-
<react_native_1.Text style={[
|
|
183
|
-
styles_1.default.chipText,
|
|
184
|
-
{ color: isFailed ? AppColors_1.AppColors.errorColor : statusColor },
|
|
185
|
-
]}>
|
|
186
|
-
{isFailed ? 'Failed' : item.status}
|
|
187
|
-
</react_native_1.Text>
|
|
188
|
-
</react_native_1.View>
|
|
189
223
|
</react_native_1.View>
|
|
190
224
|
</react_native_1.View>
|
|
191
|
-
|
|
192
|
-
<react_native_1.View style={styles_1.default.timelineTrack}>
|
|
193
|
-
<react_native_1.View style={[
|
|
194
|
-
styles_1.default.timelineBar,
|
|
195
|
-
{
|
|
196
|
-
left: `${Math.max(0, leftPercent)}%`,
|
|
197
|
-
width: `${Math.min(100, widthPercent)}%`,
|
|
198
|
-
backgroundColor: methodColor,
|
|
199
|
-
},
|
|
200
|
-
]}/>
|
|
201
|
-
</react_native_1.View>
|
|
202
225
|
</react_native_1.View>
|
|
203
226
|
<react_native_1.Animated.View pointerEvents="none" style={[
|
|
204
227
|
react_native_1.StyleSheet.absoluteFill,
|