react-native-inapp-inspector 2.3.18 → 2.3.20
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/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +57 -0
- package/dist/commonjs/analytics.js +1 -24
- package/dist/commonjs/bundle.js +1 -16
- package/dist/commonjs/capture.d.ts +2 -0
- package/dist/commonjs/capture.js +1 -32
- package/dist/commonjs/components/AnalyticsDetail.js +92 -623
- package/dist/commonjs/components/AnalyticsEventCard.js +54 -350
- package/dist/commonjs/components/AnalyticsGraph.js +70 -370
- package/dist/commonjs/components/AnimatedEntrance.js +1 -11
- package/dist/commonjs/components/AppHeaderLogo.js +7 -134
- package/dist/commonjs/components/BrandCircleIcon.js +73 -118
- package/dist/commonjs/components/BrandSquareIcon.js +63 -108
- package/dist/commonjs/components/CodeSnippet.js +48 -623
- package/dist/commonjs/components/ConsoleLogCard.js +63 -537
- package/dist/commonjs/components/CopyButton.js +3 -89
- package/dist/commonjs/components/DiffViewer.js +19 -83
- package/dist/commonjs/components/DomainHeader.js +27 -127
- package/dist/commonjs/components/EmptyState.d.ts +1 -0
- package/dist/commonjs/components/EmptyState.js +10 -87
- package/dist/commonjs/components/EndOfListFooter.js +7 -81
- package/dist/commonjs/components/ErrorBoundary.js +72 -566
- package/dist/commonjs/components/HeadersSection.js +31 -110
- package/dist/commonjs/components/HighlightText.js +17 -58
- package/dist/commonjs/components/Inspector/AboutModal.d.ts +6 -0
- package/dist/commonjs/components/Inspector/AboutModal.js +351 -0
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +98 -797
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +284 -930
- package/dist/commonjs/components/Inspector/BundleTab.js +551 -2918
- package/dist/commonjs/components/Inspector/ConsoleTab.js +79 -492
- package/dist/commonjs/components/Inspector/CrashDetail.js +123 -672
- package/dist/commonjs/components/Inspector/CrashFilterModal.js +66 -498
- package/dist/commonjs/components/Inspector/CrashTab.js +98 -670
- package/dist/commonjs/components/Inspector/DebuggingTab.js +64 -871
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +143 -907
- package/dist/commonjs/components/Inspector/FabLauncher.js +85 -54
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +6 -99
- package/dist/commonjs/components/Inspector/FeedbackModal.d.ts +9 -0
- package/dist/commonjs/components/Inspector/FeedbackModal.js +167 -521
- package/dist/commonjs/components/Inspector/InspectorContext.js +1 -21
- package/dist/commonjs/components/Inspector/InspectorHeader.js +219 -1093
- package/dist/commonjs/components/Inspector/LogDetail.js +168 -994
- package/dist/commonjs/components/Inspector/MainScreen.js +60 -332
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +136 -278
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +134 -361
- package/dist/commonjs/components/Inspector/NavigationTracker.js +1 -12
- package/dist/commonjs/components/Inspector/NetworkDetail.js +96 -432
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +60 -576
- package/dist/commonjs/components/Inspector/NetworkTab.js +84 -514
- package/dist/commonjs/components/Inspector/NpmStarPrompt.js +17 -433
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +25 -298
- package/dist/commonjs/components/Inspector/PerformanceTab.js +182 -1397
- package/dist/commonjs/components/Inspector/ReduxDetail.js +188 -1089
- package/dist/commonjs/components/Inspector/ReduxTab.js +85 -701
- package/dist/commonjs/components/Inspector/SettingsPanel.js +431 -3431
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +11 -180
- package/dist/commonjs/components/Inspector/StorageTab.js +93 -826
- package/dist/commonjs/components/Inspector/TabBar.js +47 -183
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +34 -408
- package/dist/commonjs/components/JsonViewer.js +168 -380
- package/dist/commonjs/components/LogCard.js +57 -567
- package/dist/commonjs/components/LogSyntaxHighlighter.js +11 -130
- package/dist/commonjs/components/MetaAccordion.js +69 -238
- package/dist/commonjs/components/MiniBarChart.js +3 -56
- package/dist/commonjs/components/MiniLineChart.js +3 -58
- package/dist/commonjs/components/NetworkIcons.d.ts +7 -0
- package/dist/commonjs/components/NetworkIcons.js +479 -997
- package/dist/commonjs/components/QRCodeView.js +5 -79
- package/dist/commonjs/components/SectionHeader.js +15 -37
- package/dist/commonjs/components/SegmentedTabs.js +7 -61
- package/dist/commonjs/components/SkeletonPlaceholder.js +11 -180
- package/dist/commonjs/components/Slider.js +15 -243
- package/dist/commonjs/components/SourcePageCard.js +30 -89
- package/dist/commonjs/components/Toast.js +5 -147
- package/dist/commonjs/components/TouchableScale.js +3 -24
- package/dist/commonjs/components/TreeNode.js +55 -130
- package/dist/commonjs/console.js +1 -16
- package/dist/commonjs/constants/index.js +1 -32
- package/dist/commonjs/constants/telemetryConfig.js +1 -6
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -4
- package/dist/commonjs/crash.js +1 -23
- package/dist/commonjs/customHooks/analyticsLogger.js +1 -250
- package/dist/commonjs/customHooks/bundleAnalyzer.js +1 -957
- package/dist/commonjs/customHooks/consoleLogger.js +6 -445
- package/dist/commonjs/customHooks/crashHandler.js +7 -656
- package/dist/commonjs/customHooks/logFilters.js +1 -23
- package/dist/commonjs/customHooks/networkLogger.js +2 -536
- package/dist/commonjs/customHooks/performanceTracker.js +63 -750
- package/dist/commonjs/customHooks/reduxLogger.js +2 -313
- package/dist/commonjs/customHooks/storageInspector.js +1 -435
- package/dist/commonjs/customHooks/useAccordion.js +1 -18
- package/dist/commonjs/decorators/index.js +1 -100
- package/dist/commonjs/helpers/gaAnalyticsRegistry.js +1 -148
- package/dist/commonjs/helpers/index.js +8 -921
- package/dist/commonjs/helpers/memoryManager.js +1 -99
- package/dist/commonjs/helpers/qrGenerator.js +1 -367
- package/dist/commonjs/helpers/remoteConfig.js +1 -165
- package/dist/commonjs/helpers/searchQueryParser.js +1 -62
- package/dist/commonjs/helpers/settingsStore.js +1 -144
- package/dist/commonjs/helpers/telemetry.js +1 -501
- package/dist/commonjs/helpers/toast.js +1 -20
- package/dist/commonjs/i18n/index.js +1 -90
- package/dist/commonjs/i18n/locales/en.json +1 -1122
- package/dist/commonjs/index.js +5 -2153
- package/dist/commonjs/metro.js +6 -468
- package/dist/commonjs/native/NativeInspector.d.ts +3 -0
- package/dist/commonjs/native/NativeInspector.js +1 -402
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +1 -0
- package/dist/commonjs/native/NativeNetworkInspector.js +1 -4
- package/dist/commonjs/network.js +1 -13
- package/dist/commonjs/performance.js +1 -29
- package/dist/commonjs/redux.js +1 -20
- package/dist/commonjs/storage.js +1 -14
- package/dist/commonjs/styles/AppColors.js +1 -423
- package/dist/commonjs/styles/AppFonts.js +1 -17
- package/dist/commonjs/styles/common.js +1 -190
- package/dist/commonjs/styles/index.d.ts +6 -0
- package/dist/commonjs/styles/index.js +1 -1589
- package/dist/commonjs/types/enums.d.ts +2 -1
- package/dist/commonjs/types/enums.js +1 -150
- package/dist/commonjs/types/index.js +1 -18
- package/dist/commonjs/types/interfaces.d.ts +7 -0
- package/dist/commonjs/types/interfaces.js +1 -2
- package/dist/esm/analytics.js +1 -2
- package/dist/esm/bundle.js +1 -2
- package/dist/esm/capture.d.ts +2 -0
- package/dist/esm/capture.js +1 -29
- package/dist/esm/components/AnalyticsDetail.js +171 -664
- package/dist/esm/components/AnalyticsEventCard.js +77 -335
- package/dist/esm/components/AnalyticsGraph.js +95 -357
- package/dist/esm/components/AnimatedEntrance.js +1 -6
- package/dist/esm/components/AppHeaderLogo.js +7 -94
- package/dist/esm/components/BrandCircleIcon.js +114 -119
- package/dist/esm/components/BrandSquareIcon.js +73 -78
- package/dist/esm/components/CodeSnippet.js +58 -595
- package/dist/esm/components/ConsoleLogCard.js +91 -526
- package/dist/esm/components/CopyButton.js +3 -51
- package/dist/esm/components/DiffViewer.js +22 -48
- package/dist/esm/components/DomainHeader.js +43 -138
- package/dist/esm/components/EmptyState.d.ts +1 -0
- package/dist/esm/components/EmptyState.js +17 -56
- package/dist/esm/components/EndOfListFooter.js +15 -83
- package/dist/esm/components/ErrorBoundary.js +125 -582
- package/dist/esm/components/HeadersSection.js +52 -93
- package/dist/esm/components/HighlightText.js +17 -53
- package/dist/esm/components/Inspector/AboutModal.d.ts +6 -0
- package/dist/esm/components/Inspector/AboutModal.js +351 -0
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +225 -886
- package/dist/esm/components/Inspector/AnalyticsTab.js +296 -904
- package/dist/esm/components/Inspector/BundleTab.js +1175 -3502
- package/dist/esm/components/Inspector/ConsoleTab.js +113 -488
- package/dist/esm/components/Inspector/CrashDetail.js +236 -747
- package/dist/esm/components/Inspector/CrashFilterModal.js +149 -541
- package/dist/esm/components/Inspector/CrashTab.js +177 -711
- package/dist/esm/components/Inspector/DebuggingTab.js +156 -923
- package/dist/esm/components/Inspector/DeviceInfoTab.js +199 -924
- package/dist/esm/components/Inspector/FabLauncher.js +85 -49
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +14 -70
- package/dist/esm/components/Inspector/FeedbackModal.d.ts +9 -0
- package/dist/esm/components/Inspector/FeedbackModal.js +182 -499
- package/dist/esm/components/Inspector/InspectorContext.js +1 -12
- package/dist/esm/components/Inspector/InspectorHeader.js +309 -1145
- package/dist/esm/components/Inspector/LogDetail.js +235 -1023
- package/dist/esm/components/Inspector/MainScreen.js +86 -320
- package/dist/esm/components/Inspector/MediaGalleryTab.js +157 -259
- package/dist/esm/components/Inspector/MediaPreviewModal.js +153 -340
- package/dist/esm/components/Inspector/NavigationTracker.js +1 -10
- package/dist/esm/components/Inspector/NetworkDetail.js +141 -472
- package/dist/esm/components/Inspector/NetworkFilterModal.js +122 -597
- package/dist/esm/components/Inspector/NetworkTab.js +125 -517
- package/dist/esm/components/Inspector/NpmStarPrompt.js +58 -434
- package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -281
- package/dist/esm/components/Inspector/PerformanceTab.js +393 -1570
- package/dist/esm/components/Inspector/ReduxDetail.js +307 -1170
- package/dist/esm/components/Inspector/ReduxTab.js +144 -722
- package/dist/esm/components/Inspector/SettingsPanel.js +647 -3609
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +30 -163
- package/dist/esm/components/Inspector/StorageTab.js +172 -866
- package/dist/esm/components/Inspector/TabBar.js +52 -183
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +79 -416
- package/dist/esm/components/JsonViewer.js +179 -353
- package/dist/esm/components/LogCard.js +93 -565
- package/dist/esm/components/LogSyntaxHighlighter.js +11 -123
- package/dist/esm/components/MetaAccordion.js +136 -267
- package/dist/esm/components/MiniBarChart.js +3 -18
- package/dist/esm/components/MiniLineChart.js +3 -20
- package/dist/esm/components/NetworkIcons.d.ts +7 -0
- package/dist/esm/components/NetworkIcons.js +481 -817
- package/dist/esm/components/QRCodeView.js +8 -45
- package/dist/esm/components/SectionHeader.js +22 -39
- package/dist/esm/components/SegmentedTabs.js +8 -57
- package/dist/esm/components/SkeletonPlaceholder.js +30 -163
- package/dist/esm/components/Slider.js +24 -213
- package/dist/esm/components/SourcePageCard.js +65 -86
- package/dist/esm/components/Toast.js +10 -117
- package/dist/esm/components/TouchableScale.js +3 -19
- package/dist/esm/components/TreeNode.js +58 -95
- package/dist/esm/console.js +1 -2
- package/dist/esm/constants/index.js +1 -28
- package/dist/esm/constants/telemetryConfig.js +1 -3
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/crash.js +1 -2
- package/dist/esm/customHooks/analyticsLogger.js +1 -230
- package/dist/esm/customHooks/bundleAnalyzer.js +1 -944
- package/dist/esm/customHooks/consoleLogger.js +6 -432
- package/dist/esm/customHooks/crashHandler.js +7 -630
- package/dist/esm/customHooks/logFilters.js +1 -20
- package/dist/esm/customHooks/networkLogger.js +2 -519
- package/dist/esm/customHooks/performanceTracker.js +63 -723
- package/dist/esm/customHooks/reduxLogger.js +2 -293
- package/dist/esm/customHooks/storageInspector.js +1 -418
- package/dist/esm/customHooks/useAccordion.js +1 -16
- package/dist/esm/decorators/index.js +1 -95
- package/dist/esm/helpers/gaAnalyticsRegistry.js +1 -143
- package/dist/esm/helpers/index.js +8 -861
- package/dist/esm/helpers/memoryManager.js +1 -91
- package/dist/esm/helpers/qrGenerator.js +1 -364
- package/dist/esm/helpers/remoteConfig.js +1 -160
- package/dist/esm/helpers/searchQueryParser.js +1 -59
- package/dist/esm/helpers/settingsStore.js +1 -134
- package/dist/esm/helpers/telemetry.js +1 -489
- package/dist/esm/helpers/toast.js +1 -15
- package/dist/esm/i18n/index.js +1 -78
- package/dist/esm/i18n/locales/en.json +1 -1122
- package/dist/esm/index.js +7 -1967
- package/dist/esm/metro.js +6 -459
- package/dist/esm/native/NativeInspector.d.ts +3 -0
- package/dist/esm/native/NativeInspector.js +1 -370
- package/dist/esm/native/NativeNetworkInspector.d.ts +1 -0
- package/dist/esm/native/NativeNetworkInspector.js +1 -2
- package/dist/esm/network.js +1 -1
- package/dist/esm/performance.js +1 -2
- package/dist/esm/redux.js +1 -1
- package/dist/esm/storage.js +1 -1
- package/dist/esm/styles/AppColors.js +1 -417
- package/dist/esm/styles/AppFonts.js +1 -13
- package/dist/esm/styles/common.js +1 -186
- package/dist/esm/styles/index.d.ts +6 -0
- package/dist/esm/styles/index.js +1 -1551
- package/dist/esm/types/enums.d.ts +2 -1
- package/dist/esm/types/enums.js +1 -147
- package/dist/esm/types/index.js +1 -2
- package/dist/esm/types/interfaces.d.ts +7 -0
- package/dist/esm/types/interfaces.js +1 -1
- package/ios/NetworkInspectorModule.mm +253 -136
- package/package.json +5 -3
- package/react-native-inapp-inspector.podspec +1 -1
- package/src/native/NativeInspector.ts +17 -0
- package/src/native/NativeNetworkInspector.ts +1 -0
- package/src/analytics.ts +0 -35
- package/src/bundle.ts +0 -25
- package/src/capture.ts +0 -101
- package/src/components/AnalyticsDetail.tsx +0 -870
- package/src/components/AnalyticsEventCard.tsx +0 -444
- package/src/components/AnalyticsGraph.tsx +0 -583
- package/src/components/AnimatedEntrance.tsx +0 -20
- package/src/components/AppHeaderLogo.tsx +0 -143
- package/src/components/BrandCircleIcon.tsx +0 -144
- package/src/components/BrandSquareIcon.tsx +0 -184
- package/src/components/CodeSnippet.tsx +0 -725
- package/src/components/ConsoleLogCard.tsx +0 -679
- package/src/components/CopyButton.tsx +0 -87
- package/src/components/DiffViewer.tsx +0 -82
- package/src/components/DomainHeader.tsx +0 -224
- package/src/components/EmptyState.tsx +0 -95
- package/src/components/EndOfListFooter.tsx +0 -100
- package/src/components/ErrorBoundary.tsx +0 -688
- package/src/components/HeadersSection.tsx +0 -172
- package/src/components/HighlightText.tsx +0 -100
- package/src/components/Inspector/AnalyticsFilterModal.tsx +0 -1250
- package/src/components/Inspector/AnalyticsTab.tsx +0 -1362
- package/src/components/Inspector/BundleTab.tsx +0 -4768
- package/src/components/Inspector/ConsoleTab.tsx +0 -726
- package/src/components/Inspector/CrashDetail.tsx +0 -997
- package/src/components/Inspector/CrashFilterModal.tsx +0 -721
- package/src/components/Inspector/CrashTab.tsx +0 -933
- package/src/components/Inspector/DebuggingTab.tsx +0 -1103
- package/src/components/Inspector/DeviceInfoTab.tsx +0 -1397
- package/src/components/Inspector/FabLauncher.tsx +0 -80
- package/src/components/Inspector/FeatureUnderDevNotice.tsx +0 -94
- package/src/components/Inspector/FeedbackModal.tsx +0 -626
- package/src/components/Inspector/InspectorContext.tsx +0 -28
- package/src/components/Inspector/InspectorHeader.tsx +0 -1545
- package/src/components/Inspector/LogDetail.tsx +0 -1431
- package/src/components/Inspector/MainScreen.tsx +0 -459
- package/src/components/Inspector/MediaGalleryTab.tsx +0 -355
- package/src/components/Inspector/MediaPreviewModal.tsx +0 -435
- package/src/components/Inspector/NavigationTracker.tsx +0 -13
- package/src/components/Inspector/NetworkDetail.tsx +0 -795
- package/src/components/Inspector/NetworkFilterModal.tsx +0 -730
- package/src/components/Inspector/NetworkTab.tsx +0 -820
- package/src/components/Inspector/NpmStarPrompt.tsx +0 -532
- package/src/components/Inspector/NpmUpdateToast.tsx +0 -387
- package/src/components/Inspector/PerformanceTab.tsx +0 -1967
- package/src/components/Inspector/ReduxDetail.tsx +0 -1651
- package/src/components/Inspector/ReduxTab.tsx +0 -987
- package/src/components/Inspector/SettingsPanel.tsx +0 -4580
- package/src/components/Inspector/SkeletonPlaceholder.tsx +0 -206
- package/src/components/Inspector/StorageTab.tsx +0 -1159
- package/src/components/Inspector/TabBar.tsx +0 -263
- package/src/components/Inspector/UpdateAvailableModal.tsx +0 -555
- package/src/components/JsonViewer.tsx +0 -547
- package/src/components/LogCard.tsx +0 -694
- package/src/components/LogSyntaxHighlighter.tsx +0 -178
- package/src/components/MetaAccordion.tsx +0 -355
- package/src/components/MiniBarChart.tsx +0 -42
- package/src/components/MiniLineChart.tsx +0 -33
- package/src/components/NetworkIcons.tsx +0 -2599
- package/src/components/QRCodeView.tsx +0 -75
- package/src/components/SectionHeader.tsx +0 -101
- package/src/components/SegmentedTabs.tsx +0 -83
- package/src/components/SkeletonPlaceholder.tsx +0 -206
- package/src/components/Slider.tsx +0 -300
- package/src/components/SourcePageCard.tsx +0 -150
- package/src/components/Toast.tsx +0 -131
- package/src/components/TouchableScale.tsx +0 -61
- package/src/components/TreeNode.tsx +0 -171
- package/src/console.ts +0 -24
- package/src/constants/index.ts +0 -41
- package/src/constants/telemetryConfig.ts +0 -4
- package/src/constants/version.ts +0 -3
- package/src/crash.ts +0 -32
- package/src/customHooks/analyticsLogger.ts +0 -336
- package/src/customHooks/bundleAnalyzer.ts +0 -1256
- package/src/customHooks/consoleLogger.ts +0 -530
- package/src/customHooks/crashHandler.ts +0 -944
- package/src/customHooks/logFilters.ts +0 -32
- package/src/customHooks/networkLogger.ts +0 -624
- package/src/customHooks/performanceTracker.ts +0 -1014
- package/src/customHooks/reduxLogger.ts +0 -406
- package/src/customHooks/storageInspector.ts +0 -513
- package/src/customHooks/useAccordion.tsx +0 -27
- package/src/decorators/index.ts +0 -184
- package/src/helpers/gaAnalyticsRegistry.ts +0 -204
- package/src/helpers/index.ts +0 -1092
- package/src/helpers/memoryManager.ts +0 -138
- package/src/helpers/qrGenerator.ts +0 -430
- package/src/helpers/remoteConfig.ts +0 -212
- package/src/helpers/searchQueryParser.ts +0 -84
- package/src/helpers/settingsStore.ts +0 -171
- package/src/helpers/telemetry.ts +0 -568
- package/src/helpers/toast.ts +0 -17
- package/src/i18n/index.ts +0 -104
- package/src/i18n/locales/en.json +0 -1125
- package/src/index.tsx +0 -2635
- package/src/metro.ts +0 -598
- package/src/network.ts +0 -22
- package/src/performance.ts +0 -38
- package/src/redux.ts +0 -23
- package/src/storage.ts +0 -18
- package/src/styles/AppColors.ts +0 -455
- package/src/styles/AppFonts.ts +0 -26
- package/src/styles/common.ts +0 -209
- package/src/styles/index.ts +0 -1606
- package/src/types/enums.ts +0 -208
- package/src/types/index.ts +0 -34
- package/src/types/interfaces.ts +0 -530
|
@@ -1,397 +1,185 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 i18n_1 = require("../i18n");
|
|
42
|
-
const TreeNode_1 = __importDefault(require("./TreeNode"));
|
|
43
|
-
const SegmentedTabs_1 = __importDefault(require("./SegmentedTabs"));
|
|
44
|
-
const HighlightText_1 = __importDefault(require("./HighlightText"));
|
|
45
|
-
const CopyButton_1 = __importDefault(require("./CopyButton"));
|
|
46
|
-
const NetworkIcons_1 = require("./NetworkIcons");
|
|
47
|
-
const AppColors_1 = require("../styles/AppColors");
|
|
48
|
-
const AppFonts_1 = require("../styles/AppFonts");
|
|
49
|
-
const styles_1 = __importDefault(require("../styles"));
|
|
50
|
-
const JsonTableRow = react_1.default.memo(({ itemKey, val, search, }) => {
|
|
51
|
-
const [expanded, setExpanded] = (0, react_1.useState)(false);
|
|
52
|
-
const isObject = val !== null && typeof val === 'object';
|
|
53
|
-
let rawStr = '';
|
|
54
|
-
if (val === null) {
|
|
55
|
-
rawStr = 'null';
|
|
56
|
-
}
|
|
57
|
-
else if (val === undefined) {
|
|
58
|
-
rawStr = 'undefined';
|
|
59
|
-
}
|
|
60
|
-
else if (isObject) {
|
|
61
|
-
try {
|
|
62
|
-
rawStr = JSON.stringify(val, null, 2);
|
|
63
|
-
}
|
|
64
|
-
catch {
|
|
65
|
-
rawStr = String(val);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
rawStr = String(val);
|
|
70
|
-
}
|
|
71
|
-
const isMultiline = rawStr.includes('\n') || rawStr.length > 90;
|
|
72
|
-
return (<react_native_1.View style={localStyles.tableRow}>
|
|
73
|
-
<react_native_1.View style={{ flex: 2, paddingRight: 8 }}>
|
|
74
|
-
<HighlightText_1.default text={itemKey} search={search} style={localStyles.tableCellKey} highlightStyle={localStyles.highlight}/>
|
|
75
|
-
{isObject && (<react_native_1.Text style={localStyles.tableTypeBadge}>
|
|
76
|
-
{Array.isArray(val) ? `Array(${val.length})` : 'Object'}
|
|
77
|
-
</react_native_1.Text>)}
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,o)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[i.length]=o);return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var i=e(t),o=0;o<i.length;o++)i[o]!=="default"&&__createBinding(r,t,i[o]);return __setModuleDefault(r,t),r}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),i18n_1=require("../i18n"),TreeNode_1=__importDefault(require("./TreeNode")),HighlightText_1=__importDefault(require("./HighlightText")),TouchableScale_1=__importDefault(require("./TouchableScale")),NetworkIcons_1=require("./NetworkIcons"),helpers_1=require("../helpers"),NativeInspector_1=require("../native/NativeInspector"),monoFont=react_native_1.Platform.select({ios:"Menlo",android:"monospace",default:"monospace"}),getTypeDetails=e=>e===null?{label:"null",color:"#E11D48",bg:"#FFF1F2",border:"#FECDD3"}:e===void 0?{label:"undef",color:"#E11D48",bg:"#FFF1F2",border:"#FECDD3"}:Array.isArray(e)?{label:`arr[${e.length}]`,color:"#2563EB",bg:"#EFF6FF",border:"#BFDBFE"}:typeof e=="object"?{label:`obj{${Object.keys(e).length}}`,color:"#7C3AED",bg:"#F5F3FF",border:"#DDD6FE"}:typeof e=="number"?{label:"num",color:"#D97706",bg:"#FEF3C7",border:"#FDE68A"}:typeof e=="boolean"?{label:"bool",color:"#DB2777",bg:"#FDF2F8",border:"#FBCFE8"}:{label:"str",color:"#059669",bg:"#ECFDF5",border:"#A7F3D0"},JsonTableRow=react_1.default.memo(({itemKey:e,val:t,search:r,index:i})=>{const[o,u]=(0,react_1.useState)(!1),f=t!==null&&typeof t=="object",d=getTypeDetails(t);let c="";if(t===null)c="null";else if(t===void 0)c="undefined";else if(f)try{c=JSON.stringify(t,null,2)}catch{c=String(t)}else c=String(t);const F=c.includes(`
|
|
2
|
+
`)||c.length>80;return<react_native_1.View style={[localStyles.tableRow,i%2===1&&localStyles.tableRowAlt]}>
|
|
3
|
+
|
|
4
|
+
<react_native_1.View style={localStyles.tableColKey}>
|
|
5
|
+
<HighlightText_1.default text={e}search={r}style={localStyles.tableCellKey}highlightStyle={localStyles.highlight}/>
|
|
6
|
+
<react_native_1.View style={[localStyles.typePill,{backgroundColor:d.bg,borderColor:d.border}]}>
|
|
7
|
+
<react_native_1.Text style={[localStyles.typePillText,{color:d.color}]}>
|
|
8
|
+
{d.label}
|
|
9
|
+
</react_native_1.Text>
|
|
10
|
+
</react_native_1.View>
|
|
78
11
|
</react_native_1.View>
|
|
79
12
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{
|
|
13
|
+
|
|
14
|
+
<react_native_1.View style={localStyles.tableColVal}>
|
|
15
|
+
<react_native_1.View style={f?localStyles.tableCodeBox:void 0}>
|
|
16
|
+
<HighlightText_1.default text={c}search={r}style={[localStyles.tableCellValue,t==null?localStyles.syntaxNull:void 0,typeof t=="number"?localStyles.syntaxNumber:void 0,typeof t=="boolean"?localStyles.syntaxBoolean:void 0,typeof t=="string"?localStyles.syntaxString:void 0]}highlightStyle={localStyles.highlight}numberOfLines={o?void 0:3}selectable={!0}/>
|
|
17
|
+
</react_native_1.View>
|
|
18
|
+
{F&&<react_native_1.TouchableOpacity onPress={()=>u(y=>!y)}hitSlop={6}style={localStyles.showMoreBtn}>
|
|
86
19
|
<react_native_1.Text style={localStyles.showMoreText}>
|
|
87
|
-
{
|
|
20
|
+
{o?"Collapse":"Expand"}
|
|
88
21
|
</react_native_1.Text>
|
|
89
|
-
<NetworkIcons_1.ChevronIcon direction={
|
|
90
|
-
</react_native_1.TouchableOpacity>
|
|
22
|
+
<NetworkIcons_1.ChevronIcon direction={o?"up":"down"}size={9}color="#4F46E5"/>
|
|
23
|
+
</react_native_1.TouchableOpacity>}
|
|
91
24
|
</react_native_1.View>
|
|
92
|
-
</react_native_1.View>);
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
setInternalMode(newMode);
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
const rawText = react_1.default.useMemo(() => {
|
|
107
|
-
if (data === undefined || data === null) {
|
|
108
|
-
return '';
|
|
109
|
-
}
|
|
110
|
-
if (typeof data === 'string') {
|
|
111
|
-
return data;
|
|
112
|
-
}
|
|
113
|
-
try {
|
|
114
|
-
const stringified = JSON.stringify(data);
|
|
115
|
-
return stringified ?? '';
|
|
116
|
-
}
|
|
117
|
-
catch {
|
|
118
|
-
return String(data) || '';
|
|
119
|
-
}
|
|
120
|
-
}, [data]);
|
|
121
|
-
const [showFullRaw, setShowFullRaw] = (0, react_1.useState)(false);
|
|
122
|
-
const RAW_LIMIT = 50000;
|
|
123
|
-
const safeRawText = typeof rawText === 'string' ? rawText : '';
|
|
124
|
-
const isTruncated = safeRawText.length > RAW_LIMIT && !showFullRaw;
|
|
125
|
-
const displayRawText = isTruncated ? safeRawText.slice(0, RAW_LIMIT) : safeRawText;
|
|
126
|
-
(0, react_1.useEffect)(() => {
|
|
127
|
-
if (externalMode) {
|
|
128
|
-
setInternalMode(externalMode);
|
|
129
|
-
}
|
|
130
|
-
}, [externalMode]);
|
|
131
|
-
const contentWrapperStyle = [
|
|
132
|
-
localStyles.contentWrapper,
|
|
133
|
-
{ backgroundColor: AppColors_1.AppColors.contentBg },
|
|
134
|
-
fullHeight && { flex: 1, maxHeight: undefined },
|
|
135
|
-
!fullHeight && maxHeight != null && { maxHeight },
|
|
136
|
-
];
|
|
137
|
-
const scrollStyle = [
|
|
138
|
-
localStyles.rawScroll,
|
|
139
|
-
!fullHeight && maxHeight != null && { maxHeight },
|
|
140
|
-
];
|
|
141
|
-
const isObject = typeof data === 'object' && data !== null;
|
|
142
|
-
const isEmpty = data === null ||
|
|
143
|
-
data === undefined ||
|
|
144
|
-
(isObject && Object.keys(data).length === 0);
|
|
145
|
-
const renderTableMode = () => {
|
|
146
|
-
if (!isObject) {
|
|
147
|
-
return (<react_native_1.View style={localStyles.tableRow}>
|
|
148
|
-
<react_native_1.Text style={localStyles.tableCellKey}>{t('network.jsonViewer.value')}</react_native_1.Text>
|
|
149
|
-
<react_native_1.Text style={localStyles.tableCellValue}>{String(data)}</react_native_1.Text>
|
|
150
|
-
</react_native_1.View>);
|
|
151
|
-
}
|
|
152
|
-
let keys = Object.keys(data);
|
|
153
|
-
if (search && search.trim().length > 0) {
|
|
154
|
-
const q = search.trim().toLowerCase();
|
|
155
|
-
keys = keys.filter(key => {
|
|
156
|
-
const val = data[key];
|
|
157
|
-
const valStr = typeof val === 'object' && val !== null ? JSON.stringify(val) : String(val);
|
|
158
|
-
return key.toLowerCase().includes(q) || valStr.toLowerCase().includes(q);
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
if (keys.length === 0) {
|
|
162
|
-
return (<react_native_1.View style={localStyles.emptyTable}>
|
|
163
|
-
<react_native_1.Text style={localStyles.emptyTableText}>
|
|
164
|
-
{search && search.trim().length > 0
|
|
165
|
-
? 'No matching keys or values found'
|
|
166
|
-
: t('network.jsonViewer.emptyTable')}
|
|
25
|
+
</react_native_1.View>}),JsonViewer=react_1.default.memo(({data:e,search:t,forceOpen:r,defaultExpandDepth:i=1,wrap:o,fullHeight:u=!1,maxHeight:f,mode:d,onModeChange:c,hideTabs:F=!1})=>{const{t:y}=(0,i18n_1.useTranslation)(),[j,B]=(0,react_1.useState)(d??"pretty"),[E,D]=(0,react_1.useState)(!1),[b,O]=(0,react_1.useState)(o??!1),[T,z]=(0,react_1.useState)(r),a=c&&d?d:j,x=n=>{B(n),c&&c(n)};(0,react_1.useEffect)(()=>{o!==void 0&&O(o)},[o]),(0,react_1.useEffect)(()=>{r!==void 0&&z(r)},[r]);const g=(0,react_1.useMemo)(()=>{if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)??""}catch{return String(e)||""}},[e]),A=(0,react_1.useMemo)(()=>{if(typeof e=="string")return e;try{return JSON.stringify(e)??""}catch{return String(e)||""}},[e]),[H,R]=(0,react_1.useState)(!1),k=5e4,V=typeof g=="string"?g:"",C=V.length>k&&!H,S=C?V.slice(0,k):V,h=(0,react_1.useMemo)(()=>S?S.split(`
|
|
26
|
+
`):[""],[S]),I=h.length,P=(0,react_1.useMemo)(()=>(0,helpers_1.getSize)(e),[e]);(0,react_1.useEffect)(()=>{d&&B(d)},[d]);const N=()=>{(0,NativeInspector_1.triggerNativeHaptic)("success"),(0,helpers_1.copyToClipboard)(A||g,"JSON"),D(!0),setTimeout(()=>D(!1),1200)},m=typeof e=="object"&&e!==null,M=e==null||m&&Object.keys(e).length===0,W=()=>{if(!m)return<react_native_1.View style={localStyles.tableRow}>
|
|
27
|
+
<react_native_1.View style={localStyles.tableColKey}>
|
|
28
|
+
<react_native_1.Text style={localStyles.tableCellKey}>{y("network.jsonViewer.value")}</react_native_1.Text>
|
|
29
|
+
</react_native_1.View>
|
|
30
|
+
<react_native_1.View style={localStyles.tableColVal}>
|
|
31
|
+
<react_native_1.Text style={localStyles.tableCellValue}>{String(e)}</react_native_1.Text>
|
|
32
|
+
</react_native_1.View>
|
|
33
|
+
</react_native_1.View>;let n=Object.keys(e);if(t&&t.trim().length>0){const l=t.trim().toLowerCase();n=n.filter(s=>{const p=e[s],w=typeof p=="object"&&p!==null?JSON.stringify(p):String(p);return s.toLowerCase().includes(l)||w.toLowerCase().includes(l)})}return n.length===0?<react_native_1.View style={localStyles.emptyContainer}>
|
|
34
|
+
<react_native_1.Text style={localStyles.emptyText}>
|
|
35
|
+
{t&&t.trim().length>0?"No matching keys or values found":y("network.jsonViewer.emptyTable")}
|
|
167
36
|
</react_native_1.Text>
|
|
168
|
-
</react_native_1.View>
|
|
169
|
-
|
|
170
|
-
return (<react_native_1.View style={localStyles.tableView}>
|
|
37
|
+
</react_native_1.View>:<react_native_1.View style={localStyles.tableView}>
|
|
38
|
+
|
|
171
39
|
<react_native_1.View style={localStyles.tableHeaderRow}>
|
|
172
|
-
<react_native_1.Text style={[localStyles.tableHeaderCell,
|
|
173
|
-
<react_native_1.Text style={[localStyles.tableHeaderCell,
|
|
40
|
+
<react_native_1.Text style={[localStyles.tableHeaderCell,{flex:2}]}>KEY / PROPERTY</react_native_1.Text>
|
|
41
|
+
<react_native_1.Text style={[localStyles.tableHeaderCell,{flex:3}]}>VALUE</react_native_1.Text>
|
|
174
42
|
</react_native_1.View>
|
|
175
|
-
{
|
|
176
|
-
</react_native_1.View>
|
|
177
|
-
};
|
|
178
|
-
const tree = (<TreeNode_1.default data={data} search={search} forceOpen={forceOpen} defaultExpandDepth={defaultExpandDepth}/>);
|
|
179
|
-
return (<react_native_1.View style={[localStyles.container, fullHeight && { flex: 1 }]}>
|
|
43
|
+
{n.map((l,s)=><JsonTableRow key={l}index={s}itemKey={l}val={e[l]}search={t}/>)}
|
|
44
|
+
</react_native_1.View>},_=<TreeNode_1.default data={e}search={t}forceOpen={T}defaultExpandDepth={T?99:i}/>;return<react_native_1.View style={[localStyles.container,u&&{flex:1}]}>
|
|
180
45
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
46
|
+
<react_native_1.View style={localStyles.snippetHeader}>
|
|
47
|
+
|
|
48
|
+
<react_native_1.View style={localStyles.headerLeft}>
|
|
49
|
+
<react_native_1.View style={localStyles.langBadge}>
|
|
50
|
+
<react_native_1.Text style={localStyles.langBadgeText}>JSON</react_native_1.Text>
|
|
51
|
+
</react_native_1.View>
|
|
52
|
+
<react_native_1.View style={localStyles.metaBadge}>
|
|
53
|
+
<react_native_1.Text style={localStyles.metaBadgeText}numberOfLines={1}ellipsizeMode="tail">
|
|
54
|
+
{I} {I===1?"line":"lines"} · {P}
|
|
55
|
+
</react_native_1.Text>
|
|
56
|
+
</react_native_1.View>
|
|
57
|
+
</react_native_1.View>
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
<react_native_1.View style={localStyles.headerRight}>
|
|
61
|
+
{!F&&<react_native_1.View style={localStyles.snippetTabs}>
|
|
62
|
+
<react_native_1.TouchableOpacity onPress={()=>x("pretty")}activeOpacity={.7}hitSlop={{top:8,bottom:8,left:4,right:4}}style={[localStyles.snippetTabBtn,a==="pretty"&&localStyles.snippetTabBtnActive]}>
|
|
63
|
+
<NetworkIcons_1.PrettyIcon color={a==="pretty"?"#FFFFFF":"#64748B"}size={11}/>
|
|
64
|
+
<react_native_1.Text style={[localStyles.snippetTabText,a==="pretty"&&localStyles.snippetTabTextActive]}>
|
|
65
|
+
{y("network.jsonViewer.pretty")}
|
|
66
|
+
</react_native_1.Text>
|
|
67
|
+
</react_native_1.TouchableOpacity>
|
|
68
|
+
|
|
69
|
+
<react_native_1.TouchableOpacity onPress={()=>x("raw")}activeOpacity={.7}hitSlop={{top:8,bottom:8,left:4,right:4}}style={[localStyles.snippetTabBtn,a==="raw"&&localStyles.snippetTabBtnActive]}>
|
|
70
|
+
<NetworkIcons_1.RawIcon color={a==="raw"?"#FFFFFF":"#64748B"}size={11}/>
|
|
71
|
+
<react_native_1.Text style={[localStyles.snippetTabText,a==="raw"&&localStyles.snippetTabTextActive]}>
|
|
72
|
+
{y("network.jsonViewer.raw")}
|
|
73
|
+
</react_native_1.Text>
|
|
74
|
+
</react_native_1.TouchableOpacity>
|
|
75
|
+
|
|
76
|
+
<react_native_1.TouchableOpacity onPress={()=>x("table")}activeOpacity={.7}hitSlop={{top:8,bottom:8,left:4,right:4}}style={[localStyles.snippetTabBtn,a==="table"&&localStyles.snippetTabBtnActive]}>
|
|
77
|
+
<NetworkIcons_1.TableIcon color={a==="table"?"#FFFFFF":"#64748B"}size={11}/>
|
|
78
|
+
<react_native_1.Text style={[localStyles.snippetTabText,a==="table"&&localStyles.snippetTabTextActive]}>
|
|
79
|
+
{y("network.jsonViewer.table")}
|
|
80
|
+
</react_native_1.Text>
|
|
81
|
+
</react_native_1.TouchableOpacity>
|
|
82
|
+
</react_native_1.View>}
|
|
201
83
|
|
|
84
|
+
|
|
85
|
+
{a==="pretty"&&m&&<react_native_1.TouchableOpacity onPress={()=>z(n=>!n)}hitSlop={{top:6,bottom:6,left:4,right:4}}style={localStyles.toolToggleBtn}>
|
|
86
|
+
<react_native_1.Text style={localStyles.toolToggleText}>
|
|
87
|
+
{T?"Fold":"Expand"}
|
|
88
|
+
</react_native_1.Text>
|
|
89
|
+
</react_native_1.TouchableOpacity>}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
{a==="raw"&&<react_native_1.TouchableOpacity onPress={()=>O(n=>!n)}hitSlop={{top:6,bottom:6,left:4,right:4}}style={[localStyles.toolToggleBtn,b&&localStyles.toolToggleBtnActive]}>
|
|
93
|
+
<react_native_1.Text style={[localStyles.toolToggleText,b&&localStyles.toolToggleTextActive]}>
|
|
94
|
+
Wrap
|
|
95
|
+
</react_native_1.Text>
|
|
96
|
+
</react_native_1.TouchableOpacity>}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
<TouchableScale_1.default onPress={N}hitSlop={8}style={[localStyles.copyBtn,E&&localStyles.copyBtnSuccess]}>
|
|
100
|
+
{E?<NetworkIcons_1.CheckIcon color="#10B981"size={13}/>:<NetworkIcons_1.CopyIcon color="#64748B"size={13}/>}
|
|
101
|
+
</TouchableScale_1.default>
|
|
102
|
+
</react_native_1.View>
|
|
103
|
+
</react_native_1.View>
|
|
202
104
|
|
|
203
|
-
<react_native_1.View style={
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
105
|
+
<react_native_1.View style={[localStyles.editorBody,u&&{flex:1,maxHeight:void 0},!u&&f!=null&&{maxHeight:f}]}>
|
|
106
|
+
|
|
107
|
+
{a==="pretty"&&(M?<react_native_1.View style={localStyles.emptyContainer}>
|
|
108
|
+
<react_native_1.Text style={localStyles.emptyText}>
|
|
109
|
+
{y("network.jsonViewer.emptyPayload")}
|
|
207
110
|
</react_native_1.Text>
|
|
208
|
-
</react_native_1.View
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
111
|
+
</react_native_1.View>:b?u?<react_native_1.ScrollView style={{flex:1}}contentContainerStyle={localStyles.prettyContainer}>
|
|
112
|
+
{_}
|
|
113
|
+
</react_native_1.ScrollView>:<react_native_1.View style={localStyles.prettyContainer}>{_}</react_native_1.View>:u?<react_native_1.ScrollView style={{flex:1}}contentContainerStyle={{flexGrow:1}}>
|
|
114
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!0}contentContainerStyle={localStyles.prettyContainer}>
|
|
115
|
+
{_}
|
|
116
|
+
</react_native_1.ScrollView>
|
|
117
|
+
</react_native_1.ScrollView>:<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!0}contentContainerStyle={localStyles.prettyContainer}>
|
|
118
|
+
{_}
|
|
119
|
+
</react_native_1.ScrollView>)}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
{a==="raw"&&(u?<react_native_1.ScrollView style={{flex:1}}contentContainerStyle={{flexGrow:1}}showsVerticalScrollIndicator={!0}>
|
|
123
|
+
<react_native_1.View style={localStyles.rawEditorRow}>
|
|
124
|
+
|
|
125
|
+
<react_native_1.View style={localStyles.gutter}>
|
|
126
|
+
{h.map((n,l)=><react_native_1.Text key={l}style={localStyles.gutterNumber}>
|
|
127
|
+
{l+1}
|
|
128
|
+
</react_native_1.Text>)}
|
|
129
|
+
</react_native_1.View>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
<react_native_1.ScrollView horizontal={!b}showsHorizontalScrollIndicator={!0}style={{flex:1}}>
|
|
133
|
+
<react_native_1.View style={localStyles.rawTextContainer}>
|
|
134
|
+
{h.map((n,l)=>{const s=n.match(/^(\s+)(.*)$/);if(s){const p=s[1],w=s[2],v=p.replace(/ /g,"\xB7 ").replace(/ /g,"\xB7");return<react_native_1.View key={l}style={localStyles.rawCodeLineRow}>
|
|
135
|
+
<react_native_1.Text style={localStyles.indentDots}>{v}</react_native_1.Text>
|
|
136
|
+
<HighlightText_1.default text={w}search={t}detectLinks={g.length<2e4}style={localStyles.rawMonospaceText}selectable={!0}highlightStyle={localStyles.highlight}/>
|
|
137
|
+
</react_native_1.View>}return<react_native_1.View key={l}style={localStyles.rawCodeLineRow}>
|
|
138
|
+
<HighlightText_1.default text={n}search={t}detectLinks={g.length<2e4}style={localStyles.rawMonospaceText}selectable={!0}highlightStyle={localStyles.highlight}/>
|
|
139
|
+
</react_native_1.View>})}
|
|
140
|
+
</react_native_1.View>
|
|
141
|
+
</react_native_1.ScrollView>
|
|
142
|
+
</react_native_1.View>
|
|
217
143
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
color: AppColors_1.AppColors.primaryBlack,
|
|
222
|
-
borderRadius: 3,
|
|
223
|
-
paddingHorizontal: 2,
|
|
224
|
-
}}/>
|
|
225
|
-
{isTruncated && (<react_native_1.TouchableOpacity onPress={() => setShowFullRaw(true)} style={{
|
|
226
|
-
marginTop: 10,
|
|
227
|
-
backgroundColor: `${AppColors_1.AppColors.brandPurple}15`,
|
|
228
|
-
paddingVertical: 8,
|
|
229
|
-
paddingHorizontal: 12,
|
|
230
|
-
borderRadius: 6,
|
|
231
|
-
alignItems: 'center',
|
|
232
|
-
borderWidth: 1,
|
|
233
|
-
borderColor: `${AppColors_1.AppColors.brandPurple}30`,
|
|
234
|
-
}}>
|
|
235
|
-
<react_native_1.Text style={{
|
|
236
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
237
|
-
fontSize: 11,
|
|
238
|
-
color: AppColors_1.AppColors.brandPurple,
|
|
239
|
-
}}>
|
|
240
|
-
Showing first 50 KB ({Math.round(rawText.length / 1024)} KB total) · Tap to load full
|
|
144
|
+
{C&&<react_native_1.TouchableOpacity onPress={()=>R(!0)}style={localStyles.truncationBanner}>
|
|
145
|
+
<react_native_1.Text style={localStyles.truncationText}>
|
|
146
|
+
Showing first 50 KB ({Math.round(g.length/1024)} KB total) · Tap to load full payload
|
|
241
147
|
</react_native_1.Text>
|
|
242
|
-
</react_native_1.TouchableOpacity>
|
|
243
|
-
</react_native_1.ScrollView
|
|
244
|
-
<
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
148
|
+
</react_native_1.TouchableOpacity>}
|
|
149
|
+
</react_native_1.ScrollView>:<react_native_1.View>
|
|
150
|
+
<react_native_1.View style={localStyles.rawEditorRow}>
|
|
151
|
+
|
|
152
|
+
<react_native_1.View style={localStyles.gutter}>
|
|
153
|
+
{h.map((n,l)=><react_native_1.Text key={l}style={localStyles.gutterNumber}>
|
|
154
|
+
{l+1}
|
|
155
|
+
</react_native_1.Text>)}
|
|
156
|
+
</react_native_1.View>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
<react_native_1.ScrollView horizontal={!b}showsHorizontalScrollIndicator={!0}style={{flex:1}}>
|
|
160
|
+
<react_native_1.View style={localStyles.rawTextContainer}>
|
|
161
|
+
{h.map((n,l)=>{const s=n.match(/^(\s+)(.*)$/);if(s){const p=s[1],w=s[2],v=p.replace(/ /g,"\xB7 ").replace(/ /g,"\xB7");return<react_native_1.View key={l}style={localStyles.rawCodeLineRow}>
|
|
162
|
+
<react_native_1.Text style={localStyles.indentDots}>{v}</react_native_1.Text>
|
|
163
|
+
<HighlightText_1.default text={w}search={t}detectLinks={g.length<2e4}style={localStyles.rawMonospaceText}selectable={!0}highlightStyle={localStyles.highlight}/>
|
|
164
|
+
</react_native_1.View>}return<react_native_1.View key={l}style={localStyles.rawCodeLineRow}>
|
|
165
|
+
<HighlightText_1.default text={n}search={t}detectLinks={g.length<2e4}style={localStyles.rawMonospaceText}selectable={!0}highlightStyle={localStyles.highlight}/>
|
|
166
|
+
</react_native_1.View>})}
|
|
167
|
+
</react_native_1.View>
|
|
168
|
+
</react_native_1.ScrollView>
|
|
169
|
+
</react_native_1.View>
|
|
170
|
+
|
|
171
|
+
{C&&<react_native_1.TouchableOpacity onPress={()=>R(!0)}style={localStyles.truncationBanner}>
|
|
172
|
+
<react_native_1.Text style={localStyles.truncationText}>
|
|
173
|
+
Showing first 50 KB ({Math.round(g.length/1024)} KB total) · Tap to load full payload
|
|
266
174
|
</react_native_1.Text>
|
|
267
|
-
</react_native_1.TouchableOpacity>
|
|
268
|
-
</react_native_1.View>)
|
|
175
|
+
</react_native_1.TouchableOpacity>}
|
|
176
|
+
</react_native_1.View>)}
|
|
269
177
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
178
|
+
|
|
179
|
+
{a==="table"&&(u?<react_native_1.ScrollView style={{flex:1}}>
|
|
180
|
+
{W()}
|
|
181
|
+
</react_native_1.ScrollView>:<react_native_1.View style={localStyles.tableView}>
|
|
182
|
+
{W()}
|
|
183
|
+
</react_native_1.View>)}
|
|
275
184
|
</react_native_1.View>
|
|
276
|
-
</react_native_1.View>);
|
|
277
|
-
});
|
|
278
|
-
const localStyles = react_native_1.StyleSheet.create({
|
|
279
|
-
container: {
|
|
280
|
-
backgroundColor: AppColors_1.AppColors.white,
|
|
281
|
-
borderRadius: 12,
|
|
282
|
-
borderWidth: 1.5,
|
|
283
|
-
borderColor: AppColors_1.AppColors.slate200,
|
|
284
|
-
overflow: 'hidden',
|
|
285
|
-
shadowColor: AppColors_1.AppColors.black,
|
|
286
|
-
shadowOpacity: 0.04,
|
|
287
|
-
shadowRadius: 5,
|
|
288
|
-
shadowOffset: { width: 0, height: 2 },
|
|
289
|
-
elevation: 2,
|
|
290
|
-
width: '100%',
|
|
291
|
-
},
|
|
292
|
-
toolbar: {
|
|
293
|
-
flexDirection: 'row',
|
|
294
|
-
alignItems: 'center',
|
|
295
|
-
justifyContent: 'space-between',
|
|
296
|
-
backgroundColor: AppColors_1.AppColors.slate50,
|
|
297
|
-
borderBottomWidth: 1,
|
|
298
|
-
borderBottomColor: AppColors_1.AppColors.slate200,
|
|
299
|
-
paddingHorizontal: 12,
|
|
300
|
-
paddingVertical: 8,
|
|
301
|
-
},
|
|
302
|
-
contentWrapper: {
|
|
303
|
-
backgroundColor: AppColors_1.AppColors.white,
|
|
304
|
-
minHeight: 120,
|
|
305
|
-
},
|
|
306
|
-
rawScroll: {
|
|
307
|
-
flex: 1,
|
|
308
|
-
backgroundColor: AppColors_1.AppColors.paperBg,
|
|
309
|
-
},
|
|
310
|
-
rawContainer: {
|
|
311
|
-
padding: 12,
|
|
312
|
-
},
|
|
313
|
-
rawPlainText: {
|
|
314
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
315
|
-
fontSize: 12.5,
|
|
316
|
-
color: AppColors_1.AppColors.primaryBlack,
|
|
317
|
-
lineHeight: 18,
|
|
318
|
-
},
|
|
319
|
-
tableView: {
|
|
320
|
-
flex: 1,
|
|
321
|
-
},
|
|
322
|
-
tableHeaderRow: {
|
|
323
|
-
flexDirection: 'row',
|
|
324
|
-
backgroundColor: AppColors_1.AppColors.slate100,
|
|
325
|
-
borderBottomWidth: 1,
|
|
326
|
-
borderBottomColor: AppColors_1.AppColors.slate200,
|
|
327
|
-
paddingVertical: 8,
|
|
328
|
-
paddingHorizontal: 12,
|
|
329
|
-
},
|
|
330
|
-
tableHeaderCell: {
|
|
331
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
332
|
-
fontSize: 11,
|
|
333
|
-
color: AppColors_1.AppColors.slate600,
|
|
334
|
-
letterSpacing: 0.5,
|
|
335
|
-
textTransform: 'uppercase',
|
|
336
|
-
},
|
|
337
|
-
tableRow: {
|
|
338
|
-
flexDirection: 'row',
|
|
339
|
-
borderBottomWidth: 1,
|
|
340
|
-
borderBottomColor: AppColors_1.AppColors.slate100,
|
|
341
|
-
paddingVertical: 10,
|
|
342
|
-
paddingHorizontal: 12,
|
|
343
|
-
alignItems: 'center',
|
|
344
|
-
},
|
|
345
|
-
tableCellKey: {
|
|
346
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
347
|
-
fontSize: 12.5,
|
|
348
|
-
color: AppColors_1.AppColors.purple,
|
|
349
|
-
},
|
|
350
|
-
tableTypeBadge: {
|
|
351
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
352
|
-
fontSize: 9.5,
|
|
353
|
-
color: AppColors_1.AppColors.slate400,
|
|
354
|
-
marginTop: 2,
|
|
355
|
-
},
|
|
356
|
-
tableCellValue: {
|
|
357
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
358
|
-
fontSize: 12,
|
|
359
|
-
color: AppColors_1.AppColors.primaryBlack,
|
|
360
|
-
lineHeight: 17,
|
|
361
|
-
},
|
|
362
|
-
tableCellRawCode: {
|
|
363
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
364
|
-
fontSize: 11.5,
|
|
365
|
-
color: AppColors_1.AppColors.slate700,
|
|
366
|
-
backgroundColor: `${AppColors_1.AppColors.slate100}80`,
|
|
367
|
-
padding: 6,
|
|
368
|
-
borderRadius: 6,
|
|
369
|
-
},
|
|
370
|
-
showMoreBtn: {
|
|
371
|
-
alignSelf: 'flex-start',
|
|
372
|
-
marginTop: 4,
|
|
373
|
-
paddingVertical: 2,
|
|
374
|
-
paddingHorizontal: 4,
|
|
375
|
-
},
|
|
376
|
-
showMoreText: {
|
|
377
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
378
|
-
fontSize: 11,
|
|
379
|
-
color: AppColors_1.AppColors.purple,
|
|
380
|
-
},
|
|
381
|
-
emptyTable: {
|
|
382
|
-
padding: 24,
|
|
383
|
-
alignItems: 'center',
|
|
384
|
-
justifyContent: 'center',
|
|
385
|
-
},
|
|
386
|
-
emptyTableText: {
|
|
387
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
388
|
-
fontSize: 12.5,
|
|
389
|
-
color: AppColors_1.AppColors.slate400,
|
|
390
|
-
},
|
|
391
|
-
highlight: {
|
|
392
|
-
backgroundColor: '#FEF08A',
|
|
393
|
-
color: '#854D0E',
|
|
394
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
395
|
-
},
|
|
396
|
-
});
|
|
397
|
-
exports.default = JsonViewer;
|
|
185
|
+
</react_native_1.View>}),localStyles=react_native_1.StyleSheet.create({container:{backgroundColor:"#FFFFFF",borderRadius:12,borderWidth:1.5,borderColor:"#E2E8F0",overflow:"hidden",shadowColor:"#4F46E5",shadowOpacity:.05,shadowRadius:6,shadowOffset:{width:0,height:2},elevation:2,width:"100%"},snippetHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:"#F1F5F9",borderBottomWidth:1,borderBottomColor:"#E2E8F0",paddingHorizontal:8,paddingVertical:6,gap:6},headerLeft:{flexDirection:"row",alignItems:"center",gap:5,flexShrink:1,minWidth:0},langBadge:{backgroundColor:"#FFFFFF",borderRadius:4,borderWidth:1,borderColor:"#CBD5E1",paddingHorizontal:5,paddingVertical:2},langBadgeText:{fontFamily:monoFont,fontSize:9.5,color:"#475569",fontWeight:"700",letterSpacing:.4},metaBadge:{backgroundColor:"#FFFFFF",borderRadius:4,borderWidth:1,borderColor:"#CBD5E1",paddingHorizontal:5,paddingVertical:2,flexShrink:1},metaBadgeText:{fontFamily:monoFont,fontSize:9.5,color:"#64748B",fontWeight:"600"},metaStats:{fontFamily:monoFont,fontSize:9.5,color:"#64748B",flexShrink:1},headerRight:{flexDirection:"row",alignItems:"center",gap:5},snippetTabs:{flexDirection:"row",alignItems:"center",backgroundColor:"#E2E8F0",borderRadius:6,padding:2,borderWidth:1,borderColor:"#CBD5E1",gap:2},snippetTabBtn:{flexDirection:"row",alignItems:"center",gap:3.5,paddingVertical:2.5,paddingHorizontal:6,borderRadius:4},snippetTabBtnActive:{backgroundColor:"#4F46E5",shadowColor:"#4F46E5",shadowOffset:{width:0,height:1},shadowOpacity:.2,shadowRadius:2,elevation:1},snippetTabText:{fontFamily:monoFont,fontSize:9.5,color:"#64748B",fontWeight:"600"},snippetTabTextActive:{color:"#FFFFFF",fontWeight:"700"},toolToggleBtn:{paddingHorizontal:6,paddingVertical:2.5,borderRadius:5,backgroundColor:"#FFFFFF",borderWidth:1,borderColor:"#CBD5E1",alignItems:"center",justifyContent:"center"},toolToggleBtnActive:{backgroundColor:"#EEF2FF",borderColor:"#C7D2FE"},toolToggleText:{fontFamily:monoFont,fontSize:9.5,color:"#64748B",fontWeight:"600"},toolToggleTextActive:{color:"#4F46E5",fontWeight:"700"},copyBtn:{width:24,height:24,borderRadius:5,backgroundColor:"#FFFFFF",borderWidth:1,borderColor:"#CBD5E1",alignItems:"center",justifyContent:"center"},copyBtnSuccess:{borderColor:"#10B981",backgroundColor:"#ECFDF5"},editorBody:{backgroundColor:"#FFFFFF",minHeight:100},prettyContainer:{padding:12,minWidth:"100%",backgroundColor:"#FFFFFF"},rawEditorRow:{flexDirection:"row",alignItems:"stretch",minHeight:100},gutter:{backgroundColor:"#F1F5F9",borderRightWidth:1,borderRightColor:"#E2E8F0",paddingVertical:10,paddingHorizontal:8,alignItems:"flex-end",userSelect:"none"},gutterNumber:{fontFamily:monoFont,fontSize:11.5,height:18,lineHeight:18,color:"#94A3B8",textAlign:"right"},rawTextContainer:{paddingVertical:10,paddingHorizontal:12,backgroundColor:"#FFFFFF"},rawCodeLineRow:{flexDirection:"row",alignItems:"center",height:18},indentDots:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:"#CBD5E1",letterSpacing:.5},rawMonospaceText:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:"#0F172A"},truncationBanner:{margin:10,backgroundColor:"#EEF2FF",paddingVertical:8,paddingHorizontal:12,borderRadius:6,alignItems:"center",borderWidth:1,borderColor:"#C7D2FE"},truncationText:{fontFamily:monoFont,fontSize:10.5,color:"#4F46E5",fontWeight:"600"},tableView:{flex:1},tableHeaderRow:{flexDirection:"row",backgroundColor:"#F1F5F9",borderBottomWidth:1,borderBottomColor:"#E2E8F0",paddingVertical:7,paddingHorizontal:12},tableHeaderCell:{fontFamily:monoFont,fontSize:10,color:"#475569",fontWeight:"700",letterSpacing:.5},tableRow:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:"#F1F5F9",paddingVertical:8,paddingHorizontal:12,alignItems:"flex-start",backgroundColor:"#FFFFFF"},tableRowAlt:{backgroundColor:"#F8FAFC"},tableColKey:{flex:2,paddingRight:8},tableColVal:{flex:3},tableCellKey:{fontFamily:monoFont,fontSize:11.5,fontWeight:"700",color:"#4F46E5"},typePill:{alignSelf:"flex-start",borderRadius:4,borderWidth:1,paddingHorizontal:4,paddingVertical:1,marginTop:3},typePillText:{fontFamily:monoFont,fontSize:9,fontWeight:"700"},tableCellValue:{fontFamily:monoFont,fontSize:11.5,color:"#0F172A",lineHeight:17},tableCodeBox:{backgroundColor:"#F1F5F9",borderRadius:6,borderWidth:1,borderColor:"#E2E8F0",padding:6},showMoreBtn:{flexDirection:"row",alignItems:"center",gap:4,alignSelf:"flex-start",marginTop:4,paddingVertical:2,paddingHorizontal:4},showMoreText:{fontFamily:monoFont,fontSize:10,color:"#4F46E5",fontWeight:"600"},emptyContainer:{padding:24,alignItems:"center",justifyContent:"center"},emptyText:{fontFamily:monoFont,fontSize:11.5,color:"#64748B"},highlight:{backgroundColor:"#FEF08A",color:"#854D0E",fontFamily:monoFont,fontWeight:"700",borderRadius:2,paddingHorizontal:2},syntaxNull:{color:"#E11D48",fontStyle:"italic"},syntaxNumber:{color:"#D97706"},syntaxBoolean:{color:"#DB2777"},syntaxString:{color:"#059669"}});exports.default=JsonViewer;
|