react-native-inapp-inspector 2.4.2 → 2.5.1
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/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.settings/org.eclipse.buildship.core.prefs +13 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +523 -2
- package/dist/commonjs/capture.d.ts +2 -0
- package/dist/commonjs/capture.js +1 -1
- package/dist/commonjs/components/AnalyticsDetail.js +23 -23
- package/dist/commonjs/components/AnalyticsEventCard.js +1 -1
- package/dist/commonjs/components/AnalyticsGraph.js +44 -44
- package/dist/commonjs/components/AnimatedBrandOwl.js +32 -32
- package/dist/commonjs/components/AppHeaderLogo.js +6 -6
- package/dist/commonjs/components/BrandCircleIcon.js +28 -28
- package/dist/commonjs/components/BrandSquareIcon.js +33 -33
- package/dist/commonjs/components/ConsoleLogCard.js +1 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +2 -2
- package/dist/commonjs/components/Inspector/ConfirmationModal.js +23 -25
- package/dist/commonjs/components/Inspector/ConsoleTab.js +5 -5
- package/dist/commonjs/components/Inspector/CrashTab.js +44 -11
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +1 -1
- package/dist/commonjs/components/Inspector/FabLauncher.js +30 -25
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +54 -0
- package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
- package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.js +234 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +137 -127
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.d.ts +1 -1
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.js +114 -32
- package/dist/commonjs/components/Inspector/MainScreen.js +26 -19
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +38 -35
- package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +36 -0
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +345 -123
- package/dist/commonjs/components/Inspector/NetworkTab.js +14 -14
- package/dist/commonjs/components/Inspector/PushCard.js +1 -1
- package/dist/commonjs/components/Inspector/PushDetail.js +9 -9
- package/dist/commonjs/components/Inspector/PushTab.js +3 -3
- package/dist/commonjs/components/Inspector/ReduxTab.js +9 -7
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +43 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +102 -73
- package/dist/commonjs/components/Inspector/SocketCard.js +1 -1
- package/dist/commonjs/components/Inspector/SocketDetail.js +73 -63
- package/dist/commonjs/components/Inspector/SocketTab.js +4 -4
- package/dist/commonjs/components/Inspector/StorageTab.js +10 -10
- package/dist/commonjs/components/Inspector/SupportModal.js +2 -2
- package/dist/commonjs/components/Inspector/SupportPage.js +1 -1
- package/dist/commonjs/components/JsonViewer.js +47 -45
- package/dist/commonjs/components/LogCard.js +22 -20
- package/dist/commonjs/components/ModuleErrorBoundary.js +5 -5
- package/dist/commonjs/components/NetworkIcons.d.ts +27 -0
- package/dist/commonjs/components/NetworkIcons.js +103 -5
- package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
- package/dist/commonjs/constants/telemetryConfig.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/crash.d.ts +1 -1
- package/dist/commonjs/crash.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.d.ts +2 -1
- package/dist/commonjs/customHooks/crashHandler.js +7 -7
- package/dist/commonjs/editor.d.ts +13 -0
- package/dist/commonjs/editor.js +1 -0
- package/dist/commonjs/helpers/index.d.ts +1 -0
- package/dist/commonjs/helpers/index.js +1 -1
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/helpers/telemetry.js +1 -1
- package/dist/commonjs/i18n/index.js +1 -1
- package/dist/commonjs/i18n/locales/ar.json +1 -1
- package/dist/commonjs/i18n/locales/bn.json +1 -1
- package/dist/commonjs/i18n/locales/de.json +1 -1
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -1
- package/dist/commonjs/i18n/locales/fr.json +1 -1
- package/dist/commonjs/i18n/locales/gu.json +1 -1
- package/dist/commonjs/i18n/locales/hi.json +1 -1
- package/dist/commonjs/i18n/locales/id.json +1 -1
- package/dist/commonjs/i18n/locales/it.json +1 -1
- package/dist/commonjs/i18n/locales/ja.json +1 -1
- package/dist/commonjs/i18n/locales/kn.json +1 -1
- package/dist/commonjs/i18n/locales/ko.json +1 -1
- package/dist/commonjs/i18n/locales/ml.json +1 -1
- package/dist/commonjs/i18n/locales/mr.json +1 -1
- package/dist/commonjs/i18n/locales/nl.json +1 -1
- package/dist/commonjs/i18n/locales/pa.json +1 -1
- package/dist/commonjs/i18n/locales/pl.json +1 -1
- package/dist/commonjs/i18n/locales/pt.json +1 -1
- package/dist/commonjs/i18n/locales/ru.json +1 -1
- package/dist/commonjs/i18n/locales/ta.json +1 -1
- package/dist/commonjs/i18n/locales/te.json +1 -1
- package/dist/commonjs/i18n/locales/tr.json +1 -1
- package/dist/commonjs/i18n/locales/vi.json +1 -1
- package/dist/commonjs/i18n/locales/zh.json +1 -1
- package/dist/commonjs/index.d.ts +4 -1
- package/dist/commonjs/index.js +3 -3
- package/dist/commonjs/native/NativeInspector.d.ts +3 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +4 -0
- package/dist/commonjs/styles/AppColors.d.ts +42 -2
- package/dist/commonjs/styles/AppColors.js +1 -1
- package/dist/commonjs/styles/common.js +1 -1
- package/dist/commonjs/styles/index.d.ts +7 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/editor.d.ts +96 -0
- package/dist/commonjs/types/editor.js +1 -0
- package/dist/commonjs/types/interfaces.d.ts +21 -0
- package/dist/esm/capture.d.ts +2 -0
- package/dist/esm/capture.js +1 -1
- package/dist/esm/components/AnalyticsDetail.js +31 -31
- package/dist/esm/components/AnalyticsEventCard.js +1 -1
- package/dist/esm/components/AnalyticsGraph.js +74 -74
- package/dist/esm/components/AnimatedBrandOwl.js +114 -114
- package/dist/esm/components/AppHeaderLogo.js +7 -7
- package/dist/esm/components/BrandCircleIcon.js +70 -70
- package/dist/esm/components/BrandSquareIcon.js +61 -61
- package/dist/esm/components/ConsoleLogCard.js +1 -1
- package/dist/esm/components/Inspector/AnalyticsTab.js +14 -14
- package/dist/esm/components/Inspector/ConfirmationModal.js +23 -25
- package/dist/esm/components/Inspector/ConsoleTab.js +17 -17
- package/dist/esm/components/Inspector/CrashTab.js +202 -169
- package/dist/esm/components/Inspector/DeviceInfoTab.js +75 -75
- package/dist/esm/components/Inspector/FabLauncher.js +56 -51
- package/dist/esm/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
- package/dist/esm/components/Inspector/FloatingCaptureWidget.js +54 -0
- package/dist/esm/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
- package/dist/esm/components/Inspector/GlobalCrashScreenModal.js +234 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +162 -152
- package/dist/esm/components/Inspector/LanguageSelectorModal.d.ts +1 -1
- package/dist/esm/components/Inspector/LanguageSelectorModal.js +140 -58
- package/dist/esm/components/Inspector/MainScreen.js +61 -54
- package/dist/esm/components/Inspector/MediaGalleryTab.js +55 -52
- package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +36 -0
- package/dist/esm/components/Inspector/MediaPreviewModal.js +345 -123
- package/dist/esm/components/Inspector/NetworkTab.js +74 -74
- package/dist/esm/components/Inspector/PushCard.js +1 -1
- package/dist/esm/components/Inspector/PushDetail.js +18 -18
- package/dist/esm/components/Inspector/PushTab.js +1 -1
- package/dist/esm/components/Inspector/ReduxTab.js +18 -16
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +43 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +224 -195
- package/dist/esm/components/Inspector/SocketCard.js +8 -8
- package/dist/esm/components/Inspector/SocketDetail.js +106 -96
- package/dist/esm/components/Inspector/SocketTab.js +18 -18
- package/dist/esm/components/Inspector/StorageTab.js +47 -47
- package/dist/esm/components/Inspector/SupportModal.js +64 -64
- package/dist/esm/components/Inspector/SupportPage.js +5 -5
- package/dist/esm/components/JsonViewer.js +51 -49
- package/dist/esm/components/LogCard.js +41 -39
- package/dist/esm/components/ModuleErrorBoundary.js +10 -10
- package/dist/esm/components/NetworkIcons.d.ts +27 -0
- package/dist/esm/components/NetworkIcons.js +101 -3
- package/dist/esm/constants/telemetryConfig.d.ts +3 -3
- package/dist/esm/constants/telemetryConfig.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/crash.d.ts +1 -1
- package/dist/esm/crash.js +1 -1
- package/dist/esm/customHooks/crashHandler.d.ts +2 -1
- package/dist/esm/customHooks/crashHandler.js +7 -7
- package/dist/esm/editor.d.ts +13 -0
- package/dist/esm/editor.js +1 -0
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +4 -4
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/helpers/telemetry.js +1 -1
- package/dist/esm/i18n/index.js +1 -1
- package/dist/esm/i18n/locales/ar.json +1 -1
- package/dist/esm/i18n/locales/bn.json +1 -1
- package/dist/esm/i18n/locales/de.json +1 -1
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -1
- package/dist/esm/i18n/locales/fr.json +1 -1
- package/dist/esm/i18n/locales/gu.json +1 -1
- package/dist/esm/i18n/locales/hi.json +1 -1
- package/dist/esm/i18n/locales/id.json +1 -1
- package/dist/esm/i18n/locales/it.json +1 -1
- package/dist/esm/i18n/locales/ja.json +1 -1
- package/dist/esm/i18n/locales/kn.json +1 -1
- package/dist/esm/i18n/locales/ko.json +1 -1
- package/dist/esm/i18n/locales/ml.json +1 -1
- package/dist/esm/i18n/locales/mr.json +1 -1
- package/dist/esm/i18n/locales/nl.json +1 -1
- package/dist/esm/i18n/locales/pa.json +1 -1
- package/dist/esm/i18n/locales/pl.json +1 -1
- package/dist/esm/i18n/locales/pt.json +1 -1
- package/dist/esm/i18n/locales/ru.json +1 -1
- package/dist/esm/i18n/locales/ta.json +1 -1
- package/dist/esm/i18n/locales/te.json +1 -1
- package/dist/esm/i18n/locales/tr.json +1 -1
- package/dist/esm/i18n/locales/vi.json +1 -1
- package/dist/esm/i18n/locales/zh.json +1 -1
- package/dist/esm/index.d.ts +4 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/native/NativeInspector.d.ts +3 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +4 -0
- package/dist/esm/styles/AppColors.d.ts +42 -2
- package/dist/esm/styles/AppColors.js +1 -1
- package/dist/esm/styles/common.js +1 -1
- package/dist/esm/styles/index.d.ts +7 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/editor.d.ts +96 -0
- package/dist/esm/types/editor.js +1 -0
- package/dist/esm/types/interfaces.d.ts +21 -0
- package/editor.d.ts +1 -0
- package/editor.js +1 -0
- package/ios/NetworkInspectorModule.mm +429 -0
- package/package.json +10 -1
- package/react-native-inapp-inspector.podspec +1 -1
- package/src/native/NativeInspector.ts +57 -4
- package/src/native/NativeNetworkInspector.ts +4 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(r,o,t,l){l===void 0&&(l=t);var a=Object.getOwnPropertyDescriptor(o,t);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[t]}}),Object.defineProperty(r,l,a)}):(function(r,o,t,l){l===void 0&&(l=t),r[l]=o[t]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(r,o){Object.defineProperty(r,"default",{enumerable:!0,value:o})}):function(r,o){r.default=o}),__importStar=this&&this.__importStar||(function(){var r=function(o){return r=Object.getOwnPropertyNames||function(t){var l=[];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(l[l.length]=a);return l},r(o)};return function(o){if(o&&o.__esModule)return o;var t={};if(o!=null)for(var l=r(o),a=0;a<l.length;a++)l[a]!=="default"&&__createBinding(t,o,l[a]);return __setModuleDefault(t,o),t}})(),__importDefault=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.StorageTab=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),TouchableScale_1=__importDefault(require("../TouchableScale")),EndOfListFooter_1=__importDefault(require("../EndOfListFooter")),ConfirmationModal_1=require("./ConfirmationModal"),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),i18n_1=require("../../i18n"),NetworkIcons_1=require("../NetworkIcons"),storageInspector_1=require("../../customHooks/storageInspector"),helpers_1=require("../../helpers"),toast_1=require("../../helpers/toast"),getTypeBadge=r=>{switch(r){case"json":return{label:"JSON",color:AppColors_1.AppColors.purple,bg:`${AppColors_1.AppColors.purple}16`};case"number":return{label:"NUM",color:AppColors_1.AppColors.warningIconGold,bg:`${AppColors_1.AppColors.warningIconGold}16`};case"boolean":return{label:"BOOL",color:AppColors_1.AppColors.emerald500,bg:`${AppColors_1.AppColors.emerald500}16`};case"null":return{label:"NULL",color:AppColors_1.AppColors.grayTextWeak,bg:`${AppColors_1.AppColors.grayTextWeak}16`};default:return{label:"STR",color:AppColors_1.AppColors.blue500,bg:`${AppColors_1.AppColors.blue500}16`}}},StorageEntryCard=react_1.default.memo(function({entry:o,isExpanded:t,onToggleExpand:l,onCopy:a,onEdit:
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(r,o,t,l){l===void 0&&(l=t);var a=Object.getOwnPropertyDescriptor(o,t);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[t]}}),Object.defineProperty(r,l,a)}):(function(r,o,t,l){l===void 0&&(l=t),r[l]=o[t]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(r,o){Object.defineProperty(r,"default",{enumerable:!0,value:o})}):function(r,o){r.default=o}),__importStar=this&&this.__importStar||(function(){var r=function(o){return r=Object.getOwnPropertyNames||function(t){var l=[];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(l[l.length]=a);return l},r(o)};return function(o){if(o&&o.__esModule)return o;var t={};if(o!=null)for(var l=r(o),a=0;a<l.length;a++)l[a]!=="default"&&__createBinding(t,o,l[a]);return __setModuleDefault(t,o),t}})(),__importDefault=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.StorageTab=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),TouchableScale_1=__importDefault(require("../TouchableScale")),EndOfListFooter_1=__importDefault(require("../EndOfListFooter")),ConfirmationModal_1=require("./ConfirmationModal"),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),i18n_1=require("../../i18n"),NetworkIcons_1=require("../NetworkIcons"),storageInspector_1=require("../../customHooks/storageInspector"),helpers_1=require("../../helpers"),toast_1=require("../../helpers/toast"),getTypeBadge=r=>{switch(r){case"json":return{label:"JSON",color:AppColors_1.AppColors.purple,bg:`${AppColors_1.AppColors.purple}16`};case"number":return{label:"NUM",color:AppColors_1.AppColors.warningIconGold,bg:`${AppColors_1.AppColors.warningIconGold}16`};case"boolean":return{label:"BOOL",color:AppColors_1.AppColors.emerald500,bg:`${AppColors_1.AppColors.emerald500}16`};case"null":return{label:"NULL",color:AppColors_1.AppColors.grayTextWeak,bg:`${AppColors_1.AppColors.grayTextWeak}16`};default:return{label:"STR",color:AppColors_1.AppColors.blue500,bg:`${AppColors_1.AppColors.blue500}16`}}},StorageEntryCard=react_1.default.memo(function({entry:o,isExpanded:t,onToggleExpand:l,onCopy:a,onEdit:_,onDelete:i,badge:d}){const w=(0,react_1.useMemo)(()=>o.byteSize<1024?`${o.byteSize.toLocaleString()} B`:`${(o.byteSize/1024).toLocaleString(void 0,{minimumFractionDigits:1,maximumFractionDigits:1})} KB`,[o.byteSize]),h=(0,react_1.useMemo)(()=>{if(!t)return o.value.length>250?o.value.slice(0,250)+"...":o.value;if(o.type==="json")try{const s=o.parsedValue??JSON.parse(o.value);return JSON.stringify(s,null,2)}catch{return o.value}return o.value},[t,o.value,o.type,o.parsedValue]);return<react_native_1.View style={styles.entryCard}>
|
|
2
2
|
|
|
3
3
|
<react_native_1.View style={styles.entryHeader}>
|
|
4
4
|
<react_native_1.View style={{flex:1,marginRight:8}}>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<NetworkIcons_1.CopyIcon size={12}color={AppColors_1.AppColors.grayText}/>
|
|
22
22
|
</TouchableScale_1.default>
|
|
23
23
|
|
|
24
|
-
<TouchableScale_1.default hitSlop={6}onPress={()=>
|
|
24
|
+
<TouchableScale_1.default hitSlop={6}onPress={()=>_(o)}style={styles.entryActionBtn}>
|
|
25
25
|
<NetworkIcons_1.PencilIcon size={12}color={AppColors_1.AppColors.purple}/>
|
|
26
26
|
</TouchableScale_1.default>
|
|
27
27
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
<TouchableScale_1.default onPress={()=>l(o.key)}style={styles.valuePreviewBox}>
|
|
36
36
|
<react_native_1.Text style={styles.valuePreviewText}numberOfLines={t?void 0:3}selectable={t}>
|
|
37
|
-
{
|
|
37
|
+
{h}
|
|
38
38
|
</react_native_1.Text>
|
|
39
39
|
{o.value.length>80&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4,marginTop:4}}>
|
|
40
40
|
<react_native_1.Text style={styles.expandHint}>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<NetworkIcons_1.ChevronIcon direction={t?"up":"down"}size={10}color={AppColors_1.AppColors.purple}/>
|
|
44
44
|
</react_native_1.View>}
|
|
45
45
|
</TouchableScale_1.default>
|
|
46
|
-
</react_native_1.View>}),DEFAULT_PAGE_SIZE=50,LOAD_MORE_STEP=10;exports.StorageTab=react_1.default.memo(()=>{const{t:r}=(0,i18n_1.useTranslation)(),o=(0,react_1.useRef)(null),[t,l]=(0,react_1.useState)("asyncStorage"),[a,
|
|
46
|
+
</react_native_1.View>}),DEFAULT_PAGE_SIZE=50,LOAD_MORE_STEP=10;exports.StorageTab=react_1.default.memo(()=>{const{t:r}=(0,i18n_1.useTranslation)(),o=(0,react_1.useRef)(null),[t,l]=(0,react_1.useState)("asyncStorage"),[a,_]=(0,react_1.useState)("default"),[i,d]=(0,react_1.useState)([]),[w,h]=(0,react_1.useState)(!0),[s,B]=(0,react_1.useState)(""),[V,F]=(0,react_1.useState)(DEFAULT_PAGE_SIZE),[z,L]=(0,react_1.useState)({});(0,react_1.useEffect)(()=>{F(DEFAULT_PAGE_SIZE),o.current?.scrollToOffset({offset:0,animated:!1})},[s,t,a]);const[O,C]=(0,react_1.useState)(!1),[x,P]=(0,react_1.useState)("create"),[f,k]=(0,react_1.useState)(""),[T,v]=(0,react_1.useState)(""),[u,S]=(0,react_1.useState)("string"),[I,c]=(0,react_1.useState)(null),M=(0,react_1.useMemo)(()=>(0,storageInspector_1.getRegisteredMMKVInstanceIds)(),[]),g=(0,react_1.useCallback)(async()=>{h(!0);try{const e=await(0,storageInspector_1.fetchStorageEntries)(t,t==="mmkv"?a:void 0);d(e)}catch{d([])}finally{h(!1)}},[t,a]);(0,react_1.useEffect)(()=>(g(),(0,storageInspector_1.subscribeToStorageChanges)(g)),[g]);const $=e=>{L(n=>({...n,[e]:!n[e]}))},E=()=>{P("create"),k(""),v(""),S("string"),c(null),C(!0)},R=e=>{P("edit"),k(e.key),v(e.value),S(e.type==="json"?"json":e.type==="number"?"number":e.type==="boolean"?"boolean":"string"),c(null),C(!0)},[m,A]=(0,react_1.useState)({visible:!1,title:"",message:"",onConfirm:()=>{}}),K=e=>{A({visible:!0,title:r("storage.deleteKeyTitle","Delete Key"),message:r("storage.deleteKeyMessage",{key:e,defaultValue:`Are you sure you want to delete key "${e}"?`}),confirmText:r("common.clear","Delete"),cancelText:r("common.cancel","Cancel"),onConfirm:async()=>{A(y=>({...y,visible:!1})),await(0,storageInspector_1.removeStorageEntry)(t,e,t==="mmkv"?a:void 0)?((0,toast_1.showToast)(`Deleted "${e}"`),g()):(0,toast_1.showToast)(`Failed to delete "${e}"`)}})},W=()=>{A({visible:!0,title:r("storage.clearTitle","Clear Storage Driver"),message:r("storage.clearMessage",{driver:t==="asyncStorage"?"AsyncStorage":"MMKV",defaultValue:`Are you sure you want to delete all keys in ${t==="asyncStorage"?"AsyncStorage":"MMKV"}?`}),confirmText:r("storage.clearConfirm","Clear All"),cancelText:r("common.cancel","Cancel"),onConfirm:async()=>{A(n=>({...n,visible:!1})),await(0,storageInspector_1.clearStorageDriver)(t,t==="mmkv"?a:void 0)&&((0,toast_1.showToast)(r("storage.cleared","All storage keys wiped")),g())}})},N=async()=>{if(!f.trim()){(0,toast_1.showToast)(r("storage.keyNameEmpty","Key name cannot be empty"));return}let e=T;if(u==="json")try{const y=JSON.parse(T);e=JSON.stringify(y)}catch(y){c("Invalid JSON: "+y.message);return}else if(u==="number"&&isNaN(Number(T))){c("Value must be a valid number");return}await(0,storageInspector_1.setStorageEntry)(t,f.trim(),e,t==="mmkv"?a:void 0)?((0,toast_1.showToast)(x==="create"?`Added "${f.trim()}"`:`Updated "${f.trim()}"`),C(!1),g()):(0,toast_1.showToast)(r("storage.saveError","Error saving storage key"))},j=()=>{try{const e=JSON.parse(T);v(JSON.stringify(e,null,2)),c(null),S("json"),(0,toast_1.showToast)(r("storage.beautifyJson","Formatted JSON"))}catch{c("Cannot format: invalid JSON syntax")}},p=(0,react_1.useMemo)(()=>{if(!s.trim())return i;const e=s.toLowerCase().trim().split(/\s+/).filter(Boolean);return i.filter(n=>{const y=`${n.key} ${n.value}`.toLowerCase();return e.every(q=>y.includes(q))})},[i,s]),b=(0,react_1.useMemo)(()=>i.reduce((e,n)=>e+n.byteSize,0),[i]),H=(0,react_1.useMemo)(()=>b<1024?`${b.toLocaleString()} B`:b<1024*1024?`${(b/1024).toLocaleString(void 0,{minimumFractionDigits:1,maximumFractionDigits:1})} KB`:`${(b/(1024*1024)).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})} MB`,[b]),D=(0,react_1.useCallback)(e=>{(0,helpers_1.copyToClipboard)(e.value,e.key),(0,toast_1.showToast)(`Copied value of "${e.key}"`)},[]),J=(0,react_1.useCallback)(({item:e})=><StorageEntryCard entry={e}isExpanded={!!z[e.key]}onToggleExpand={$}onCopy={D}onEdit={R}onDelete={K}badge={getTypeBadge(e.type)}/>,[z,D]);return<react_native_1.View style={styles.container}>
|
|
47
47
|
|
|
48
48
|
<react_native_1.View style={styles.driverTabsWrapper}>
|
|
49
49
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={styles.driverTabsContainer}>
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
{t==="mmkv"&&M.length>1&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4,marginLeft:6}}>
|
|
76
|
-
{M.map(e=><TouchableScale_1.default key={e}onPress={()=>
|
|
76
|
+
{M.map(e=><TouchableScale_1.default key={e}onPress={()=>_(e)}style={[styles.instancePill,a===e&&styles.instancePillActive]}>
|
|
77
77
|
<react_native_1.Text style={[styles.instancePillText,a===e&&styles.instancePillTextActive]}>
|
|
78
78
|
{e}
|
|
79
79
|
</react_native_1.Text>
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
<react_native_1.ActivityIndicator size="small"color={AppColors_1.AppColors.purple}/>
|
|
130
130
|
<react_native_1.Text style={styles.loadingText}>{r("storage.loading","Loading storage entries...")}</react_native_1.Text>
|
|
131
131
|
</react_native_1.View>:<>
|
|
132
|
-
<react_native_1.FlatList ref={o}data={p.slice(0,V)}keyExtractor={e=>e.key}renderItem={J}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}style={styles.scrollArea}contentContainerStyle={p.length===0?styles.emptyScrollContent:styles.scrollContent}showsVerticalScrollIndicator={!1}ListEmptyComponent={<react_native_1.View style={styles.emptyContainer}>
|
|
132
|
+
<react_native_1.FlatList ref={o}data={p.slice(0,V)}keyExtractor={e=>e.key}renderItem={J}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}style={[styles.scrollArea,{flex:1}]}contentContainerStyle={[p.length===0?styles.emptyScrollContent:styles.scrollContent,{flexGrow:1}]}showsVerticalScrollIndicator={!1}nestedScrollEnabled={!0}keyboardShouldPersistTaps="handled"ListEmptyComponent={<react_native_1.View style={styles.emptyContainer}>
|
|
133
133
|
<react_native_1.View style={styles.emptyIconWrap}>
|
|
134
134
|
<NetworkIcons_1.DatabaseIcon size={28}color={AppColors_1.AppColors.grayTextWeak}/>
|
|
135
135
|
</react_native_1.View>
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
<react_native_1.View style={styles.modalCard}>
|
|
154
154
|
<react_native_1.View style={styles.modalHeader}>
|
|
155
155
|
<react_native_1.Text style={styles.modalTitle}>
|
|
156
|
-
{
|
|
156
|
+
{x==="create"?"Add Storage Key":`Edit: ${f}`}
|
|
157
157
|
</react_native_1.Text>
|
|
158
158
|
<TouchableScale_1.default onPress={()=>C(!1)}hitSlop={8}>
|
|
159
159
|
<NetworkIcons_1.ClearIcon size={16}color={AppColors_1.AppColors.grayText}/>
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
|
|
164
164
|
<react_native_1.View style={styles.inputGroup}>
|
|
165
165
|
<react_native_1.Text style={styles.inputLabel}>{r("storage.keyName","KEY NAME").toUpperCase()}</react_native_1.Text>
|
|
166
|
-
<react_native_1.TextInput value={f}onChangeText={k}placeholder="e.g. user_session, auth_token"placeholderTextColor={AppColors_1.AppColors.grayTextWeak}editable={
|
|
166
|
+
<react_native_1.TextInput value={f}onChangeText={k}placeholder="e.g. user_session, auth_token"placeholderTextColor={AppColors_1.AppColors.grayTextWeak}editable={x==="create"}style={[styles.textInput,x==="edit"&&styles.textInputDisabled]}autoCapitalize="none"/>
|
|
167
167
|
</react_native_1.View>
|
|
168
168
|
|
|
169
169
|
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
</TouchableScale_1.default>}
|
|
176
176
|
</react_native_1.View>
|
|
177
177
|
<react_native_1.View style={styles.typeSelectorStrip}>
|
|
178
|
-
{["string","json","number","boolean"].map(e=>{const n=u===e;return<TouchableScale_1.default key={e}onPress={()=>{
|
|
178
|
+
{["string","json","number","boolean"].map(e=>{const n=u===e;return<TouchableScale_1.default key={e}onPress={()=>{S(e),c(null)}}style={[styles.typePill,n&&styles.typePillActive]}>
|
|
179
179
|
<react_native_1.Text style={[styles.typePillText,n&&styles.typePillTextActive]}>
|
|
180
180
|
{e.toUpperCase()}
|
|
181
181
|
</react_native_1.Text>
|
|
@@ -208,4 +208,4 @@
|
|
|
208
208
|
</react_native_1.Modal>
|
|
209
209
|
|
|
210
210
|
<ConfirmationModal_1.ConfirmationModal visible={m.visible}title={m.title}message={m.message}confirmText={m.confirmText}cancelText={m.cancelText}isDestructive={!0}icon="trash"onConfirm={m.onConfirm}onCancel={()=>A(e=>({...e,visible:!1}))}/>
|
|
211
|
-
</react_native_1.View>});const styles=react_native_1.StyleSheet.create({container:{flex:1,backgroundColor:AppColors_1.AppColors.grayBackground},driverTabsWrapper:{backgroundColor:AppColors_1.AppColors.primaryLight,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,paddingVertical:8},driverTabsContainer:{paddingHorizontal:
|
|
211
|
+
</react_native_1.View>});const styles=react_native_1.StyleSheet.create({container:{flex:1,backgroundColor:AppColors_1.AppColors.grayBackground},driverTabsWrapper:{backgroundColor:AppColors_1.AppColors.primaryLight,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,paddingVertical:8},driverTabsContainer:{paddingHorizontal:8,flexDirection:"row",alignItems:"center",gap:6},driverTabPill:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},driverTabPillActive:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},driverTabText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.grayText},driverTabTextActive:{color:AppColors_1.AppColors.white},driverCountBadge:{backgroundColor:"rgba(255, 255, 255, 0.25)",paddingHorizontal:5,paddingVertical:1,borderRadius:8},driverCountText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.white},instancePill:{paddingHorizontal:7,paddingVertical:3,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.purple}14`,borderWidth:1,borderColor:`${AppColors_1.AppColors.purple}30`},instancePillActive:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},instancePillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.purple},instancePillTextActive:{color:AppColors_1.AppColors.white},actionBar:{flexDirection:"row",alignItems:"center",paddingHorizontal:8,paddingVertical:8,backgroundColor:AppColors_1.AppColors.primaryLight,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,gap:6},searchBar:{flex:1,flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:8,paddingHorizontal:9,paddingVertical:react_native_1.Platform.OS==="ios"?6:2,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,gap:6},searchInput:{flex:1,fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:12,color:AppColors_1.AppColors.primaryBlack,padding:0},addKeyBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:10,paddingVertical:6,borderRadius:8,backgroundColor:AppColors_1.AppColors.purple},addKeyBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.white},actionIconBtn:{width:30,height:30,borderRadius:8,alignItems:"center",justifyContent:"center",backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},statsStrip:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:8,paddingVertical:5,backgroundColor:`${AppColors_1.AppColors.grayBorderSecondary}40`},statsText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10,color:AppColors_1.AppColors.grayText},statsSubtext:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.purple},scrollArea:{flex:1},scrollContent:{padding:8,gap:8,paddingBottom:100},emptyScrollContent:{flexGrow:1,justifyContent:"center",alignItems:"center",padding:24,paddingBottom:60},entryCard:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:10,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,padding:10,gap:8,shadowColor:AppColors_1.AppColors.black,shadowOpacity:.02,shadowRadius:3,shadowOffset:{width:0,height:1},elevation:1},entryHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},entryKey:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12.5,color:AppColors_1.AppColors.primaryBlack},typeBadge:{paddingHorizontal:5,paddingVertical:1,borderRadius:4,borderWidth:1},typeBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5},sizeText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.grayTextWeak},entryActions:{flexDirection:"row",alignItems:"center",gap:5},entryActionBtn:{padding:5,borderRadius:5,backgroundColor:AppColors_1.AppColors.grayBackground},valuePreviewBox:{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:6,padding:8,borderWidth:1,borderColor:`${AppColors_1.AppColors.grayBorderSecondary}80`},valuePreviewText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11,color:AppColors_1.AppColors.primaryBlack,lineHeight:16},expandHint:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.purple,marginTop:4},loadingContainer:{flex:1,alignItems:"center",justifyContent:"center",gap:8},loadingText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:12,color:AppColors_1.AppColors.grayText},emptyContainer:{padding:24,alignItems:"center",justifyContent:"center"},emptyIconWrap:{width:56,height:56,borderRadius:28,backgroundColor:`${AppColors_1.AppColors.grayBorderSecondary}40`,alignItems:"center",justifyContent:"center",marginBottom:12},emptyTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:14,color:AppColors_1.AppColors.primaryBlack,marginBottom:4},emptySubtitle:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11.5,color:AppColors_1.AppColors.grayText,textAlign:"center",maxWidth:280},connectGuideCard:{marginTop:20,width:"100%",backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:10,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,padding:12,gap:6},connectGuideTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.purple},connectGuideCode:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.grayText,lineHeight:15},modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",padding:16},modalCard:{width:"100%",maxWidth:400,backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:14,padding:16,gap:12,shadowColor:AppColors_1.AppColors.black,shadowOpacity:.2,shadowRadius:10,shadowOffset:{width:0,height:4},elevation:5},modalHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.dividerColor,paddingBottom:10},modalTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:14,color:AppColors_1.AppColors.primaryBlack},inputGroup:{gap:4},inputLabel:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak,letterSpacing:.5},textInput:{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:8,paddingHorizontal:10,paddingVertical:8,fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:12,color:AppColors_1.AppColors.primaryBlack,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},textInputDisabled:{backgroundColor:`${AppColors_1.AppColors.grayBorderSecondary}40`,color:AppColors_1.AppColors.grayText},textAreaInput:{minHeight:90,maxHeight:160,fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:11},typeSelectorStrip:{flexDirection:"row",alignItems:"center",gap:6},typePill:{flex:1,alignItems:"center",paddingVertical:6,borderRadius:6,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},typePillActive:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},typePillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.grayText},typePillTextActive:{color:AppColors_1.AppColors.white},formatJsonBtn:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10,color:AppColors_1.AppColors.purple},errorText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10,color:AppColors_1.AppColors.errorColor,marginTop:2},modalActions:{flexDirection:"row",alignItems:"center",gap:10,marginTop:4},cancelBtn:{flex:1,alignItems:"center",paddingVertical:10,borderRadius:8,backgroundColor:AppColors_1.AppColors.grayBackground,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary},cancelBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.grayText},saveBtn:{flex:1.5,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:5,paddingVertical:10,borderRadius:8,backgroundColor:AppColors_1.AppColors.purple},saveBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.white}});exports.default=exports.StorageTab;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<TouchableScale_1.default onPress={()=>o("https://github.com/sponsors/vengatmacuser")}style={[styles.itemCard,styles.itemCardHighlight]}>
|
|
31
31
|
<react_native_1.View style={[styles.itemIconWrap,styles.sponsorIconWrap]}>
|
|
32
|
-
<
|
|
32
|
+
<NetworkIcons_1.HeartIcon size={20}color={AppColors_1.AppColors.pink600}fill={AppColors_1.AppColors.pink600}/>
|
|
33
33
|
</react_native_1.View>
|
|
34
34
|
<react_native_1.View style={styles.itemTextCol}>
|
|
35
35
|
<react_native_1.View style={styles.itemTitleRow}>
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
|
|
101
101
|
<TouchableScale_1.default onPress={()=>o("mailto:vengatmacuser@gmail.com")}style={styles.itemCard}>
|
|
102
102
|
<react_native_1.View style={[styles.itemIconWrap,styles.contactIconWrap]}>
|
|
103
|
-
<
|
|
103
|
+
<NetworkIcons_1.MailIcon size={18}color={AppColors_1.AppColors.purple}/>
|
|
104
104
|
</react_native_1.View>
|
|
105
105
|
<react_native_1.View style={styles.itemTextCol}>
|
|
106
106
|
<react_native_1.Text style={styles.itemTitle}>
|
|
@@ -204,7 +204,7 @@ https://github.com/vengatmacuser/react-native-inapp-inspector`,url:"https://gith
|
|
|
204
204
|
|
|
205
205
|
<react_native_1.View style={styles.authorActionsRow}>
|
|
206
206
|
<TouchableScale_1.default onPress={()=>o("mailto:vengatmacuser@gmail.com")}style={styles.authorActionBtn}>
|
|
207
|
-
<
|
|
207
|
+
<NetworkIcons_1.MailIcon size={14}color={AppColors_1.AppColors.purple}/>
|
|
208
208
|
<react_native_1.Text style={styles.authorActionText}>
|
|
209
209
|
{e("support.sendEmail","Send Email")}
|
|
210
210
|
</react_native_1.Text>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,l,o){o===void 0&&(o=l);var r=Object.getOwnPropertyDescriptor(t,l);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,o,r)}):(function(e,t,l,o){o===void 0&&(o=l),e[o]=t[l]})),__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(l){var o=[];for(var r in l)Object.prototype.hasOwnProperty.call(l,r)&&(o[o.length]=r);return o},e(t)};return function(t){if(t&&t.__esModule)return t;var l={};if(t!=null)for(var o=e(t),r=0;r<o.length;r++)o[r]!=="default"&&__createBinding(l,t,o[r]);return __setModuleDefault(l,t),l}})(),__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"),AppColors_1=require("../styles/AppColors"),AppFonts_1=require("../styles/AppFonts"),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:AppColors_1.AppColors.errorColor,bg:AppColors_1.AppColors.errorCardBg,border:AppColors_1.AppColors.errorBorder}:e===void 0?{label:"undef",color:AppColors_1.AppColors.errorColor,bg:AppColors_1.AppColors.errorCardBg,border:AppColors_1.AppColors.errorBorder}:Array.isArray(e)?{label:`arr[${e.length}]`,color:AppColors_1.AppColors.blue600,bg:AppColors_1.AppColors.blueBg,border:AppColors_1.AppColors.sky100}:typeof e=="object"?{label:`obj{${Object.keys(e).length}}`,color:AppColors_1.AppColors.violet600,bg:AppColors_1.AppColors.purple50,border:AppColors_1.AppColors.purple200}:typeof e=="number"?{label:"num",color:AppColors_1.AppColors.amber600,bg:AppColors_1.AppColors.amber100,border:AppColors_1.AppColors.amber200}:typeof e=="boolean"?{label:"bool",color:AppColors_1.AppColors.pink600,bg:AppColors_1.AppColors.roseBg,border:AppColors_1.AppColors.roseBorder}:{label:"str",color:AppColors_1.AppColors.emerald600,bg:AppColors_1.AppColors.emeraldBg,border:AppColors_1.AppColors.emeraldBorder},RawValueText=react_1.default.memo(({text:e,search:t,detectLinks:l})=>{const o=e.trim();let r=localStyles.rawMonospaceText;return o.startsWith('"')?r=localStyles.syntaxString:o==="null"||o.startsWith("null,")||o==="undefined"?r=localStyles.syntaxNull:o==="true"||o.startsWith("true,")||o==="false"||o.startsWith("false,")?r=localStyles.syntaxBoolean:/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?,?$/.test(o)&&(r=localStyles.syntaxNumber),<HighlightText_1.default text={e}search={t}detectLinks={l}style={r}selectable={!0}highlightStyle={localStyles.highlight}/>}),RawJsonLine=react_1.default.memo(({line:e,search:t,detectLinks:l})=>{const o=e.match(/^(\s+)(.*)$/),r=o?o[1]:"",d=o?o[2]:e,u=r?r.replace(/ /g,"\xB7 ").replace(/ /g,"\xB7"):"",
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,l,o){o===void 0&&(o=l);var r=Object.getOwnPropertyDescriptor(t,l);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,o,r)}):(function(e,t,l,o){o===void 0&&(o=l),e[o]=t[l]})),__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(l){var o=[];for(var r in l)Object.prototype.hasOwnProperty.call(l,r)&&(o[o.length]=r);return o},e(t)};return function(t){if(t&&t.__esModule)return t;var l={};if(t!=null)for(var o=e(t),r=0;r<o.length;r++)o[r]!=="default"&&__createBinding(l,t,o[r]);return __setModuleDefault(l,t),l}})(),__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"),AppColors_1=require("../styles/AppColors"),AppFonts_1=require("../styles/AppFonts"),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:AppColors_1.AppColors.errorColor,bg:AppColors_1.AppColors.errorCardBg,border:AppColors_1.AppColors.errorBorder}:e===void 0?{label:"undef",color:AppColors_1.AppColors.errorColor,bg:AppColors_1.AppColors.errorCardBg,border:AppColors_1.AppColors.errorBorder}:Array.isArray(e)?{label:`arr[${e.length}]`,color:AppColors_1.AppColors.blue600,bg:AppColors_1.AppColors.blueBg,border:AppColors_1.AppColors.sky100}:typeof e=="object"?{label:`obj{${Object.keys(e).length}}`,color:AppColors_1.AppColors.violet600,bg:AppColors_1.AppColors.purple50,border:AppColors_1.AppColors.purple200}:typeof e=="number"?{label:"num",color:AppColors_1.AppColors.amber600,bg:AppColors_1.AppColors.amber100,border:AppColors_1.AppColors.amber200}:typeof e=="boolean"?{label:"bool",color:AppColors_1.AppColors.pink600,bg:AppColors_1.AppColors.roseBg,border:AppColors_1.AppColors.roseBorder}:{label:"str",color:AppColors_1.AppColors.emerald600,bg:AppColors_1.AppColors.emeraldBg,border:AppColors_1.AppColors.emeraldBorder},RawValueText=react_1.default.memo(({text:e,search:t,detectLinks:l})=>{const o=e.trim();let r=localStyles.rawMonospaceText;return o.startsWith('"')?r=localStyles.syntaxString:o==="null"||o.startsWith("null,")||o==="undefined"?r=localStyles.syntaxNull:o==="true"||o.startsWith("true,")||o==="false"||o.startsWith("false,")?r=localStyles.syntaxBoolean:/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?,?$/.test(o)&&(r=localStyles.syntaxNumber),<HighlightText_1.default text={e}search={t}detectLinks={l}style={r}selectable={!0}highlightStyle={localStyles.highlight}/>}),RawJsonLine=react_1.default.memo(({line:e,search:t,detectLinks:l})=>{const o=e.match(/^(\s+)(.*)$/),r=o?o[1]:"",d=o?o[2]:e,u=r?r.replace(/ /g,"\xB7 ").replace(/ /g,"\xB7"):"",a=d.match(/^("(?:[^"\\]|\\.)*")(\s*:\s*)(.*)$/);if(a){const c=a[1],y=a[2],i=a[3];return<react_native_1.View style={localStyles.rawLineContentRow}>
|
|
2
2
|
{u.length>0&&<react_native_1.Text style={localStyles.indentDots}>{u}</react_native_1.Text>}
|
|
3
|
-
<HighlightText_1.default text={
|
|
3
|
+
<HighlightText_1.default text={c}search={t}style={localStyles.syntaxKey}selectable={!0}highlightStyle={localStyles.highlight}/>
|
|
4
4
|
<react_native_1.Text style={localStyles.syntaxColon}>{y}</react_native_1.Text>
|
|
5
|
-
<RawValueText text={
|
|
5
|
+
<RawValueText text={i}search={t}detectLinks={l}/>
|
|
6
6
|
</react_native_1.View>}return<react_native_1.View style={localStyles.rawLineContentRow}>
|
|
7
7
|
{u.length>0&&<react_native_1.Text style={localStyles.indentDots}>{u}</react_native_1.Text>}
|
|
8
8
|
<RawValueText text={d}search={t}detectLinks={l}/>
|
|
9
|
-
</react_native_1.View>}),JsonTableRow=react_1.default.memo(({itemKey:e,val:t,search:l,index:o})=>{const[r,d]=(0,react_1.useState)(!1),u=t!==null&&typeof t=="object",
|
|
10
|
-
`)||
|
|
9
|
+
</react_native_1.View>}),JsonTableRow=react_1.default.memo(({itemKey:e,val:t,search:l,index:o})=>{const[r,d]=(0,react_1.useState)(!1),u=t!==null&&typeof t=="object",a=getTypeDetails(t);let c="";if(t===null)c="null";else if(t===void 0)c="undefined";else if(u)try{c=JSON.stringify(t,null,2)}catch{c=String(t)}else c=String(t);const y=c.includes(`
|
|
10
|
+
`)||c.length>80;return<react_native_1.View style={[localStyles.tableRow,o%2===1&&localStyles.tableRowAlt]}>
|
|
11
11
|
|
|
12
12
|
<react_native_1.View style={localStyles.tableColKey}>
|
|
13
13
|
<HighlightText_1.default text={e}search={l}style={localStyles.tableCellKey}highlightStyle={localStyles.highlight}/>
|
|
14
|
-
<react_native_1.View style={[localStyles.typePill,{backgroundColor:
|
|
15
|
-
<react_native_1.Text style={[localStyles.typePillText,{color:
|
|
16
|
-
{
|
|
14
|
+
<react_native_1.View style={[localStyles.typePill,{backgroundColor:a.bg,borderColor:a.border}]}>
|
|
15
|
+
<react_native_1.Text style={[localStyles.typePillText,{color:a.color}]}>
|
|
16
|
+
{a.label}
|
|
17
17
|
</react_native_1.Text>
|
|
18
18
|
</react_native_1.View>
|
|
19
19
|
</react_native_1.View>
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
|
|
22
22
|
<react_native_1.View style={localStyles.tableColVal}>
|
|
23
23
|
<react_native_1.View style={u?localStyles.tableCodeBox:void 0}>
|
|
24
|
-
<HighlightText_1.default text={
|
|
24
|
+
<HighlightText_1.default text={c}search={l}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={r?void 0:3}selectable={!0}/>
|
|
25
25
|
</react_native_1.View>
|
|
26
|
-
{y&&<react_native_1.TouchableOpacity onPress={()=>d(
|
|
26
|
+
{y&&<react_native_1.TouchableOpacity onPress={()=>d(i=>!i)}hitSlop={6}style={localStyles.showMoreBtn}>
|
|
27
27
|
<react_native_1.Text style={localStyles.showMoreText}>
|
|
28
28
|
{r?"Collapse":"Expand"}
|
|
29
29
|
</react_native_1.Text>
|
|
30
|
-
<NetworkIcons_1.ChevronIcon direction={r?"up":"down"}size={9}color=
|
|
30
|
+
<NetworkIcons_1.ChevronIcon direction={r?"up":"down"}size={9}color={AppColors_1.AppColors.purple}/>
|
|
31
31
|
</react_native_1.TouchableOpacity>}
|
|
32
32
|
</react_native_1.View>
|
|
33
|
-
</react_native_1.View>}),JsonViewer=react_1.default.memo(({data:e,search:t,forceOpen:l,defaultExpandDepth:o=1,wrap:r,fullHeight:d=!1,maxHeight:u,mode:
|
|
34
|
-
`):[""],[A]),q=(0,react_1.useMemo)(()=>
|
|
35
|
-
`).length:1,[
|
|
33
|
+
</react_native_1.View>}),JsonViewer=react_1.default.memo(({data:e,search:t,forceOpen:l,defaultExpandDepth:o=1,wrap:r,fullHeight:d=!1,maxHeight:u,mode:a,onModeChange:c,hideTabs:y=!1})=>{const{t:i}=(0,i18n_1.useTranslation)(),[O,B]=(0,react_1.useState)(a??"raw"),[z,R]=(0,react_1.useState)(!1),[f,k]=(0,react_1.useState)(r??!0),[w,N]=(0,react_1.useState)("compact"),[b,F]=(0,react_1.useState)(l),[D,M]=(0,react_1.useState)(!1),s=c&&a?a:O,m=n=>{B(n),c&&c(n)};(0,react_1.useEffect)(()=>{r!==void 0&&k(r)},[r]),(0,react_1.useEffect)(()=>{l!==void 0&&F(l)},[l]),(0,react_1.useEffect)(()=>{a&&B(a)},[a]);const g=(0,react_1.useMemo)(()=>{if(e==null)return"";if(typeof e=="string"){const n=e.trim();try{const p=JSON.parse(n);return JSON.stringify(p,null,2)}catch{return e}}try{return JSON.stringify(e,null,2)??""}catch{return String(e)||""}},[e]),S=(0,react_1.useMemo)(()=>{if(typeof e=="string"){const n=e.trim();try{const p=JSON.parse(n);return JSON.stringify(p)}catch{return e}}try{return JSON.stringify(e)??""}catch{return String(e)||""}},[e]),H=w==="formatted"?g:S,I=5e4,h=typeof H=="string"?H:"",j=h.length>I&&!D,A=j?h.slice(0,I):h,V=(0,react_1.useMemo)(()=>A?A.split(`
|
|
34
|
+
`):[""],[A]),q=(0,react_1.useMemo)(()=>s==="raw"?V.length:g?g.split(`
|
|
35
|
+
`).length:1,[s,V.length,g]),J=(0,react_1.useMemo)(()=>(0,helpers_1.getSize)(e),[e]),L=(0,react_1.useCallback)(()=>{(0,NativeInspector_1.triggerNativeHaptic)("success"),(0,helpers_1.copyToClipboard)(w==="compact"?S:g,"JSON"),R(!0),setTimeout(()=>R(!1),1200)},[w,S,g]),v=typeof e=="object"&&e!==null,E=e==null||v&&Object.keys(e).length===0,W=()=>{if(!v)return<react_native_1.View style={localStyles.tableRow}>
|
|
36
36
|
<react_native_1.View style={localStyles.tableColKey}>
|
|
37
37
|
<react_native_1.Text style={localStyles.tableCellKey}>
|
|
38
|
-
{
|
|
38
|
+
{i("network.jsonViewer.value")}
|
|
39
39
|
</react_native_1.Text>
|
|
40
40
|
</react_native_1.View>
|
|
41
41
|
<react_native_1.View style={localStyles.tableColVal}>
|
|
@@ -43,15 +43,17 @@
|
|
|
43
43
|
</react_native_1.View>
|
|
44
44
|
</react_native_1.View>;let n=Object.keys(e);if(t&&t.trim().length>0){const p=t.trim().toLowerCase();n=n.filter(x=>{const T=e[x],K=typeof T=="object"&&T!==null?JSON.stringify(T):String(T);return x.toLowerCase().includes(p)||K.toLowerCase().includes(p)})}return n.length===0?<react_native_1.View style={localStyles.emptyContainer}>
|
|
45
45
|
<react_native_1.Text style={localStyles.emptyText}>
|
|
46
|
-
{t&&t.trim().length>0?"No matching keys or values found":
|
|
46
|
+
{t&&t.trim().length>0?i("network.jsonViewer.noMatchingKeys","No matching keys or values found"):i("network.jsonViewer.emptyTable")}
|
|
47
47
|
</react_native_1.Text>
|
|
48
48
|
</react_native_1.View>:<react_native_1.View style={localStyles.tableView}>
|
|
49
49
|
|
|
50
50
|
<react_native_1.View style={localStyles.tableHeaderRow}>
|
|
51
51
|
<react_native_1.Text style={[localStyles.tableHeaderCell,{flex:2}]}>
|
|
52
|
-
KEY / PROPERTY
|
|
52
|
+
{i("network.jsonViewer.keyProperty","KEY / PROPERTY")}
|
|
53
|
+
</react_native_1.Text>
|
|
54
|
+
<react_native_1.Text style={[localStyles.tableHeaderCell,{flex:3}]}>
|
|
55
|
+
{i("network.jsonViewer.value","VALUE")}
|
|
53
56
|
</react_native_1.Text>
|
|
54
|
-
<react_native_1.Text style={[localStyles.tableHeaderCell,{flex:3}]}>VALUE</react_native_1.Text>
|
|
55
57
|
</react_native_1.View>
|
|
56
58
|
{n.map((p,x)=><JsonTableRow key={p}index={x}itemKey={p}val={e[p]}search={t}/>)}
|
|
57
59
|
</react_native_1.View>},C=<TreeNode_1.default data={e}search={t}forceOpen={b}defaultExpandDepth={b?99:o}/>,_=()=><react_native_1.View style={localStyles.rawLinesWrapper}>
|
|
@@ -68,7 +70,7 @@
|
|
|
68
70
|
<RawJsonLine line={n}search={t}detectLinks={h.length<2e4}/>
|
|
69
71
|
</react_native_1.View>
|
|
70
72
|
</react_native_1.View>)}
|
|
71
|
-
</react_native_1.View>,
|
|
73
|
+
</react_native_1.View>,P=()=>j?<react_native_1.TouchableOpacity onPress={()=>M(!0)}activeOpacity={.8}style={localStyles.truncationBanner}>
|
|
72
74
|
<react_native_1.Text style={localStyles.truncationText}>
|
|
73
75
|
Showing first 50 KB ({Math.round(h.length/1024)} KB
|
|
74
76
|
total) · Tap to load full payload
|
|
@@ -78,24 +80,24 @@
|
|
|
78
80
|
<react_native_1.View style={localStyles.snippetHeader}>
|
|
79
81
|
|
|
80
82
|
{!y&&<react_native_1.View style={localStyles.snippetTabs}>
|
|
81
|
-
<TouchableScale_1.default onPress={()=>m("raw")}style={[localStyles.snippetTabBtn,
|
|
82
|
-
<NetworkIcons_1.RawIcon color={
|
|
83
|
-
<react_native_1.Text style={[localStyles.snippetTabText,
|
|
84
|
-
{
|
|
83
|
+
<TouchableScale_1.default onPress={()=>m("raw")}style={[localStyles.snippetTabBtn,s==="raw"&&localStyles.snippetTabBtnActive]}>
|
|
84
|
+
<NetworkIcons_1.RawIcon color={s==="raw"?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}size={11.5}/>
|
|
85
|
+
<react_native_1.Text style={[localStyles.snippetTabText,s==="raw"&&localStyles.snippetTabTextActive]}>
|
|
86
|
+
{i("network.jsonViewer.raw","Raw")}
|
|
85
87
|
</react_native_1.Text>
|
|
86
88
|
</TouchableScale_1.default>
|
|
87
89
|
|
|
88
|
-
<TouchableScale_1.default onPress={()=>m("pretty")}style={[localStyles.snippetTabBtn,
|
|
89
|
-
<NetworkIcons_1.PrettyIcon color={
|
|
90
|
-
<react_native_1.Text style={[localStyles.snippetTabText,
|
|
91
|
-
{
|
|
90
|
+
<TouchableScale_1.default onPress={()=>m("pretty")}style={[localStyles.snippetTabBtn,s==="pretty"&&localStyles.snippetTabBtnActive]}>
|
|
91
|
+
<NetworkIcons_1.PrettyIcon color={s==="pretty"?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}size={11.5}/>
|
|
92
|
+
<react_native_1.Text style={[localStyles.snippetTabText,s==="pretty"&&localStyles.snippetTabTextActive]}>
|
|
93
|
+
{i("network.jsonViewer.pretty","Pretty")}
|
|
92
94
|
</react_native_1.Text>
|
|
93
95
|
</TouchableScale_1.default>
|
|
94
96
|
|
|
95
|
-
<TouchableScale_1.default onPress={()=>m("table")}style={[localStyles.snippetTabBtn,
|
|
96
|
-
<NetworkIcons_1.TableIcon color={
|
|
97
|
-
<react_native_1.Text style={[localStyles.snippetTabText,
|
|
98
|
-
{
|
|
97
|
+
<TouchableScale_1.default onPress={()=>m("table")}style={[localStyles.snippetTabBtn,s==="table"&&localStyles.snippetTabBtnActive]}>
|
|
98
|
+
<NetworkIcons_1.TableIcon color={s==="table"?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}size={11.5}/>
|
|
99
|
+
<react_native_1.Text style={[localStyles.snippetTabText,s==="table"&&localStyles.snippetTabTextActive]}>
|
|
100
|
+
{i("network.jsonViewer.table","Table")}
|
|
99
101
|
</react_native_1.Text>
|
|
100
102
|
</TouchableScale_1.default>
|
|
101
103
|
</react_native_1.View>}
|
|
@@ -103,24 +105,24 @@
|
|
|
103
105
|
|
|
104
106
|
<react_native_1.View style={localStyles.headerRight}>
|
|
105
107
|
|
|
106
|
-
{
|
|
108
|
+
{s==="raw"&&<>
|
|
107
109
|
<TouchableScale_1.default onPress={()=>N(n=>n==="compact"?"formatted":"compact")}style={[localStyles.toolToggleBtn,w==="compact"&&localStyles.toolToggleBtnActive]}>
|
|
108
110
|
<react_native_1.Text style={[localStyles.toolToggleText,w==="compact"&&localStyles.toolToggleTextActive]}>
|
|
109
|
-
{
|
|
111
|
+
{i("jsonViewer.min","Min")}
|
|
110
112
|
</react_native_1.Text>
|
|
111
113
|
</TouchableScale_1.default>
|
|
112
114
|
|
|
113
|
-
<TouchableScale_1.default onPress={()=>
|
|
115
|
+
<TouchableScale_1.default onPress={()=>k(n=>!n)}style={[localStyles.toolToggleBtn,f&&localStyles.toolToggleBtnActive]}>
|
|
114
116
|
<react_native_1.Text style={[localStyles.toolToggleText,f&&localStyles.toolToggleTextActive]}>
|
|
115
|
-
{
|
|
117
|
+
{i("jsonViewer.wrap","Wrap")}
|
|
116
118
|
</react_native_1.Text>
|
|
117
119
|
</TouchableScale_1.default>
|
|
118
120
|
</>}
|
|
119
121
|
|
|
120
122
|
|
|
121
|
-
{
|
|
123
|
+
{s==="pretty"&&v&&<TouchableScale_1.default onPress={()=>F(n=>!n)}style={[localStyles.toolToggleBtn,b&&localStyles.toolToggleBtnActive]}>
|
|
122
124
|
<react_native_1.Text style={[localStyles.toolToggleText,b&&localStyles.toolToggleTextActive]}>
|
|
123
|
-
{b?
|
|
125
|
+
{b?i("jsonViewer.fold","Fold"):i("jsonViewer.expand","Expand")}
|
|
124
126
|
</react_native_1.Text>
|
|
125
127
|
</TouchableScale_1.default>}
|
|
126
128
|
|
|
@@ -134,9 +136,9 @@
|
|
|
134
136
|
|
|
135
137
|
<react_native_1.View style={[localStyles.editorBody,d&&{flex:1,maxHeight:void 0},!d&&u!=null&&{maxHeight:u}]}>
|
|
136
138
|
|
|
137
|
-
{
|
|
139
|
+
{s==="pretty"&&(E?<react_native_1.View style={localStyles.emptyContainer}>
|
|
138
140
|
<react_native_1.Text style={localStyles.emptyText}>
|
|
139
|
-
{
|
|
141
|
+
{i("network.jsonViewer.emptyPayload")}
|
|
140
142
|
</react_native_1.Text>
|
|
141
143
|
</react_native_1.View>:f?d?<react_native_1.ScrollView style={{flex:1}}contentContainerStyle={localStyles.prettyContainer}showsVerticalScrollIndicator={!0}>
|
|
142
144
|
{C}
|
|
@@ -149,7 +151,7 @@
|
|
|
149
151
|
</react_native_1.ScrollView>)}
|
|
150
152
|
|
|
151
153
|
|
|
152
|
-
{
|
|
154
|
+
{s==="raw"&&(d?<react_native_1.ScrollView style={localStyles.fullHeightScrollView}contentContainerStyle={localStyles.fullHeightScrollContent}showsVerticalScrollIndicator={!0}showsHorizontalScrollIndicator={!1}>
|
|
153
155
|
{f?<react_native_1.View style={localStyles.rawEditorFullWidth}>
|
|
154
156
|
{_()}
|
|
155
157
|
</react_native_1.View>:<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!0}contentContainerStyle={localStyles.rawHorizontalContent}>
|
|
@@ -157,7 +159,7 @@
|
|
|
157
159
|
{_()}
|
|
158
160
|
</react_native_1.View>
|
|
159
161
|
</react_native_1.ScrollView>}
|
|
160
|
-
{
|
|
162
|
+
{P()}
|
|
161
163
|
</react_native_1.ScrollView>:<react_native_1.View style={localStyles.rawEditorAutoHeight}>
|
|
162
164
|
{f?<react_native_1.View style={localStyles.rawEditorFullWidth}>
|
|
163
165
|
{_()}
|
|
@@ -166,12 +168,12 @@
|
|
|
166
168
|
{_()}
|
|
167
169
|
</react_native_1.View>
|
|
168
170
|
</react_native_1.ScrollView>}
|
|
169
|
-
{
|
|
171
|
+
{P()}
|
|
170
172
|
</react_native_1.View>)}
|
|
171
173
|
|
|
172
174
|
|
|
173
|
-
{
|
|
174
|
-
{
|
|
175
|
-
</react_native_1.ScrollView>:<react_native_1.View style={localStyles.tableView}>{
|
|
175
|
+
{s==="table"&&(d?<react_native_1.ScrollView style={{flex:1}}contentContainerStyle={{flexGrow:1}}showsVerticalScrollIndicator={!0}>
|
|
176
|
+
{W()}
|
|
177
|
+
</react_native_1.ScrollView>:<react_native_1.View style={localStyles.tableView}>{W()}</react_native_1.View>)}
|
|
176
178
|
</react_native_1.View>
|
|
177
179
|
</react_native_1.View>}),localStyles=react_native_1.StyleSheet.create({container:{backgroundColor:AppColors_1.AppColors.white,borderRadius:12,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,overflow:"hidden",shadowColor:AppColors_1.AppColors.brandPurple,shadowOpacity:.04,shadowRadius:6,shadowOffset:{width:0,height:2},elevation:2,width:"100%"},snippetHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:AppColors_1.AppColors.grayBackground,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.grayBorderSecondary,paddingHorizontal:8,paddingVertical:5,gap:6,minHeight:38},headerLeft:{flexDirection:"row",alignItems:"center",gap:5,flexShrink:1,minWidth:0},langBadge:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.white,borderRadius:6,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,paddingHorizontal:6,paddingVertical:2.5,gap:4.5},langDot:{width:5,height:5,borderRadius:2.5,backgroundColor:AppColors_1.AppColors.emerald500},langBadgeText:{fontFamily:monoFont,fontSize:9.5,color:AppColors_1.AppColors.primaryBlack,fontWeight:"700",letterSpacing:.3},metaBadge:{backgroundColor:AppColors_1.AppColors.white,borderRadius:6,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,paddingHorizontal:6,paddingVertical:2.5,flexShrink:1},metaBadgeText:{fontFamily:monoFont,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak,fontWeight:"600"},headerRight:{flexDirection:"row",alignItems:"center",gap:4.5,flexShrink:0},snippetTabs:{flexDirection:"row",alignItems:"center",backgroundColor:`${AppColors_1.AppColors.slate200}80`,borderRadius:8,padding:2.5,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,gap:2},snippetTabBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingVertical:3.5,paddingHorizontal:8,borderRadius:6},snippetTabBtnActive:{backgroundColor:AppColors_1.AppColors.brandPurple,shadowColor:AppColors_1.AppColors.brandPurple,shadowOffset:{width:0,height:1},shadowOpacity:.25,shadowRadius:2,elevation:1},snippetTabText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:10.5,color:AppColors_1.AppColors.grayText},snippetTabTextActive:{color:AppColors_1.AppColors.white,fontFamily:AppFonts_1.AppFonts.interBold},toolToggleBtn:{paddingHorizontal:8,paddingVertical:3.5,borderRadius:6,backgroundColor:AppColors_1.AppColors.white,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,alignItems:"center",justifyContent:"center"},toolToggleBtnActive:{backgroundColor:AppColors_1.AppColors.purpleShade50,borderColor:`${AppColors_1.AppColors.brandPurple}60`},toolToggleText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:10.5,color:AppColors_1.AppColors.grayText},toolToggleTextActive:{color:AppColors_1.AppColors.brandPurple,fontFamily:AppFonts_1.AppFonts.interBold},copyBtn:{width:27,height:27,borderRadius:6,backgroundColor:AppColors_1.AppColors.white,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,alignItems:"center",justifyContent:"center"},copyBtnSuccess:{borderColor:AppColors_1.AppColors.greenMintBorder,backgroundColor:AppColors_1.AppColors.greenMintBg},editorBody:{backgroundColor:AppColors_1.AppColors.white,minHeight:80},prettyContainer:{padding:10,minWidth:"100%",backgroundColor:AppColors_1.AppColors.white},fullHeightScrollView:{flex:1},fullHeightScrollContent:{flexGrow:1},rawEditorAutoHeight:{width:"100%"},rawEditorFullWidth:{width:"100%"},rawHorizontalContent:{minWidth:"100%"},rawLinesWrapper:{paddingVertical:6,backgroundColor:AppColors_1.AppColors.white,width:"100%"},rawCodeLineRow:{flexDirection:"row",alignItems:"flex-start",minHeight:20,width:"100%"},gutterCell:{width:38,paddingRight:8,paddingTop:1,alignItems:"flex-end",justifyContent:"flex-start",borderRightWidth:1,borderRightColor:AppColors_1.AppColors.grayBorderSecondary,backgroundColor:AppColors_1.AppColors.grayBackground,userSelect:"none"},gutterNumber:{fontFamily:monoFont,fontSize:11,lineHeight:18,color:AppColors_1.AppColors.slate400,textAlign:"right"},rawTextCell:{flex:1,paddingLeft:8,paddingRight:8,paddingTop:1,alignItems:"flex-start"},rawLineContentRow:{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap",minHeight:18},indentDots:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.gray300,letterSpacing:.5},rawMonospaceText:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.slate900},syntaxKey:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.syntaxKey,fontWeight:"700"},syntaxColon:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.syntaxColon,marginRight:4},syntaxString:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.syntaxString},syntaxNumber:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.syntaxNumber},syntaxBoolean:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.syntaxBoolean},syntaxNull:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.syntaxNull,fontStyle:"italic"},truncationBanner:{margin:10,backgroundColor:AppColors_1.AppColors.purple50,paddingVertical:8,paddingHorizontal:12,borderRadius:6,alignItems:"center",borderWidth:1,borderColor:AppColors_1.AppColors.purple200},truncationText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:11,color:AppColors_1.AppColors.brandPurple},tableView:{flex:1,width:"100%"},tableHeaderRow:{flexDirection:"row",backgroundColor:AppColors_1.AppColors.slate100,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.slate200,paddingVertical:7,paddingHorizontal:12},tableHeaderCell:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.slate600,letterSpacing:.5,textTransform:"uppercase"},tableRow:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.slate100,paddingVertical:8,paddingHorizontal:12,alignItems:"flex-start",backgroundColor:AppColors_1.AppColors.white},tableRowAlt:{backgroundColor:AppColors_1.AppColors.slate50},tableColKey:{flex:2,paddingRight:8},tableColVal:{flex:3},tableCellKey:{fontFamily:monoFont,fontSize:11.5,fontWeight:"700",color:AppColors_1.AppColors.brandPurple},typePill:{alignSelf:"flex-start",borderRadius:4,borderWidth:1,paddingHorizontal:4,paddingVertical:1,marginTop:3},typePillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9},tableCellValue:{fontFamily:monoFont,fontSize:11.5,color:AppColors_1.AppColors.slate900,lineHeight:17},tableCodeBox:{backgroundColor:AppColors_1.AppColors.slate100,borderRadius:6,borderWidth:1,borderColor:AppColors_1.AppColors.slate200,padding:6},showMoreBtn:{flexDirection:"row",alignItems:"center",gap:4,alignSelf:"flex-start",marginTop:4,paddingVertical:2,paddingHorizontal:4},showMoreText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:10.5,color:AppColors_1.AppColors.brandPurple},emptyContainer:{padding:24,alignItems:"center",justifyContent:"center"},emptyText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:12,color:AppColors_1.AppColors.slate500},highlight:{backgroundColor:AppColors_1.AppColors.yellow200,color:AppColors_1.AppColors.yellow800,fontFamily:monoFont,fontWeight:"700",borderRadius:2,paddingHorizontal:2}});exports.default=JsonViewer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,a,n){n===void 0&&(n=a);var o=Object.getOwnPropertyDescriptor(t,a);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,o)}):(function(e,t,a,n){n===void 0&&(n=a),e[n]=t[a]})),__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(a){var n=[];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var a={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&__createBinding(a,t,n[o]);return __setModuleDefault(a,t),a}})(),__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"),react_native_svg_1=__importStar(require("react-native-svg")),AppColors_1=require("../styles/AppColors"),constants_1=require("../constants"),helpers_1=require("../helpers"),NetworkIcons_1=require("./NetworkIcons"),AppFonts_1=require("../styles/AppFonts"),HighlightText_1=__importDefault(require("./HighlightText")),TouchableScale_1=__importDefault(require("./TouchableScale")),i18n_1=require("../i18n");function LogCard({item:e,onPress:t,timelineMinStart:a,timelineTotalRange:n,isNew:o,isSelected:h,onToggleSelect:_,searchStr:
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,a,n){n===void 0&&(n=a);var o=Object.getOwnPropertyDescriptor(t,a);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,o)}):(function(e,t,a,n){n===void 0&&(n=a),e[n]=t[a]})),__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(a){var n=[];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var a={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&__createBinding(a,t,n[o]);return __setModuleDefault(a,t),a}})(),__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"),react_native_svg_1=__importStar(require("react-native-svg")),AppColors_1=require("../styles/AppColors"),constants_1=require("../constants"),helpers_1=require("../helpers"),NetworkIcons_1=require("./NetworkIcons"),AppFonts_1=require("../styles/AppFonts"),HighlightText_1=__importDefault(require("./HighlightText")),TouchableScale_1=__importDefault(require("./TouchableScale")),i18n_1=require("../i18n");function LogCard({item:e,onPress:t,timelineMinStart:a,timelineTotalRange:n,isNew:o,isSelected:h,onToggleSelect:_,searchStr:C}){const{t:p}=(0,i18n_1.useTranslation)(),f=constants_1.METHOD_COLORS[e.method]??constants_1.METHOD_COLORS.ALL,l=(0,react_1.useMemo)(()=>{try{const r=new URL(e.url),d=r.host,w=r.pathname+(r.search?r.search:""),V=r.protocol==="https:";return{host:d,path:w||"/",isHttps:V}}catch{const r=e.url.toLowerCase().startsWith("https:"),d=(0,helpers_1.getPath)(e.url);return{host:(0,helpers_1.getBaseUrl)(e.url).replace(/^https?:\/\//,""),path:d||e.url,isHttps:r}}},[e.url]),b=r=>{r?.stopPropagation?.(),react_native_1.Alert.alert(p("common.openInBrowser")||"Open in Browser",`${p("common.openInBrowserPrompt")||"Are you sure you want to open this URL in your external browser?"}
|
|
2
2
|
|
|
3
|
-
${e.url}`,[{text:p("common.cancel")||"Cancel",style:"cancel"},{text:p("common.open")||"Open",onPress:()=>{react_native_1.Linking.canOpenURL(e.url).then(d=>{d?react_native_1.Linking.openURL(e.url):react_native_1.Linking.openURL(e.url).catch(()=>{})}).catch(()=>{})}}])},
|
|
4
|
-
<TouchableScale_1.default onPress={t}style={[styles.card,{borderLeftWidth:3.5,borderLeftColor:y,backgroundColor:
|
|
3
|
+
${e.url}`,[{text:p("common.cancel")||"Cancel",style:"cancel"},{text:p("common.open")||"Open",onPress:()=>{react_native_1.Linking.canOpenURL(e.url).then(d=>{d?react_native_1.Linking.openURL(e.url):react_native_1.Linking.openURL(e.url).catch(()=>{})}).catch(()=>{})}}])},i=e.status===0||e.status!=null&&e.status>=400,s=e.status==null,u=(0,helpers_1.getStatusColor)(e.status),c=(0,helpers_1.getDurationColor)(e.duration),y=s?AppColors_1.AppColors.darkOrange:i?AppColors_1.AppColors.errorColor:AppColors_1.AppColors.greenColor,g=(0,react_1.useRef)(new react_native_1.Animated.Value(o?.35:0)).current;(0,react_1.useEffect)(()=>{o&&react_native_1.Animated.timing(g,{toValue:0,duration:1200,useNativeDriver:!0}).start()},[o,g]);const x=()=>{if(s)return"...";if(e.status===0||e.status==null)return p("network.statusFailed")||"FAILED";const r=typeof e.status=="number"?e.status:parseInt(String(e.status||0),10);return r===200?"200 OK":r===201?"201 Created":r===204?"204 No Content":r===304?"304 Not Modified":r===400?"400 Bad Req":r===401?"401 Unauth":r===403?"403 Forbidden":r===404?"404 Not Found":r===500?"500 Error":String(e.status)},A=()=>{if(s)return<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.darkOrange}size={10}/>;const r=typeof e.status=="number"?e.status:parseInt(String(e.status||0),10);return r>=200&&r<300?<NetworkIcons_1.CircleCheckIcon color={AppColors_1.AppColors.greenColor}size={10}/>:r>=300&&r<400?<NetworkIcons_1.RepeatIcon color={AppColors_1.AppColors.amber700}size={10}/>:r>=400&&r<500?<NetworkIcons_1.CircleAlertIcon color={AppColors_1.AppColors.darkOrange}size={10}/>:<NetworkIcons_1.CircleXIcon color={AppColors_1.AppColors.errorColor}size={10}/>},T=(0,helpers_1.formatDateTime)(e.startTime),v=e.url.split("?")[0].toLowerCase().endsWith(".json");return<react_native_1.View style={styles.container}>
|
|
4
|
+
<TouchableScale_1.default onPress={t}style={[styles.card,{borderLeftWidth:3.5,borderLeftColor:y,backgroundColor:i?AppColors_1.AppColors.errorCardBg:AppColors_1.AppColors.white}]}>
|
|
5
5
|
<react_native_1.View style={styles.cardBody}>
|
|
6
6
|
|
|
7
7
|
<react_native_1.View style={styles.cardHeaderRow}>
|
|
@@ -14,7 +14,7 @@ ${e.url}`,[{text:p("common.cancel")||"Cancel",style:"cancel"},{text:p("common.op
|
|
|
14
14
|
|
|
15
15
|
<react_native_1.Text style={styles.serialNumber}>#{e.id+1}</react_native_1.Text>
|
|
16
16
|
|
|
17
|
-
<react_native_1.View style={[styles.methodBadge,{backgroundColor:
|
|
17
|
+
<react_native_1.View style={[styles.methodBadge,{backgroundColor:f}]}>
|
|
18
18
|
<react_native_1.Text style={styles.methodBadgeText}>
|
|
19
19
|
{e.method}
|
|
20
20
|
</react_native_1.Text>
|
|
@@ -35,9 +35,9 @@ ${e.url}`,[{text:p("common.cancel")||"Cancel",style:"cancel"},{text:p("common.op
|
|
|
35
35
|
</react_native_1.View>
|
|
36
36
|
|
|
37
37
|
<react_native_1.View style={styles.cardHeaderRight}>
|
|
38
|
-
<react_native_1.View style={[styles.statusPill,{backgroundColor:
|
|
38
|
+
<react_native_1.View style={[styles.statusPill,{backgroundColor:i?`${AppColors_1.AppColors.errorColor}14`:s?`${AppColors_1.AppColors.darkOrange}14`:`${u}14`,borderColor:i?`${AppColors_1.AppColors.errorColor}33`:s?`${AppColors_1.AppColors.darkOrange}33`:`${u}33`}]}>
|
|
39
39
|
{A()}
|
|
40
|
-
<react_native_1.Text style={[styles.statusPillText,{color:
|
|
40
|
+
<react_native_1.Text style={[styles.statusPillText,{color:i?AppColors_1.AppColors.errorColor:s?AppColors_1.AppColors.darkOrange:u}]}>
|
|
41
41
|
{x()}
|
|
42
42
|
</react_native_1.Text>
|
|
43
43
|
</react_native_1.View>
|
|
@@ -50,8 +50,16 @@ ${e.url}`,[{text:p("common.cancel")||"Cancel",style:"cancel"},{text:p("common.op
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
<react_native_1.View style={styles.urlBox}>
|
|
53
|
+
|
|
53
54
|
<react_native_1.View style={styles.urlMainRow}>
|
|
54
|
-
<
|
|
55
|
+
<react_native_1.View style={styles.hostRow}>
|
|
56
|
+
<react_native_1.View style={[styles.protoBadge,{backgroundColor:l.isHttps?`${AppColors_1.AppColors.emerald600}12`:`${AppColors_1.AppColors.amber600}12`,borderColor:l.isHttps?`${AppColors_1.AppColors.emerald600}2B`:`${AppColors_1.AppColors.amber600}2B`}]}>
|
|
57
|
+
<react_native_1.Text style={[styles.protoBadgeText,{color:l.isHttps?AppColors_1.AppColors.emerald600:AppColors_1.AppColors.amber700}]}>
|
|
58
|
+
{l.isHttps?"HTTPS":"HTTP"}
|
|
59
|
+
</react_native_1.Text>
|
|
60
|
+
</react_native_1.View>
|
|
61
|
+
<HighlightText_1.default text={l.host||e.url}search={C}style={styles.hostText}highlightStyle={styles.highlight}numberOfLines={1}ellipsizeMode="tail"/>
|
|
62
|
+
</react_native_1.View>
|
|
55
63
|
<react_native_1.View style={styles.urlBadgeRow}>
|
|
56
64
|
{v&&<react_native_1.View style={styles.jsonBadge}>
|
|
57
65
|
<react_native_1.Text style={styles.jsonBadgeText}>.json</react_native_1.Text>
|
|
@@ -62,15 +70,9 @@ ${e.url}`,[{text:p("common.cancel")||"Cancel",style:"cancel"},{text:p("common.op
|
|
|
62
70
|
</react_native_1.View>
|
|
63
71
|
</react_native_1.View>
|
|
64
72
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
{i.isHttps?"HTTPS":"HTTP"}
|
|
69
|
-
</react_native_1.Text>
|
|
70
|
-
</react_native_1.View>
|
|
71
|
-
<react_native_1.Text style={styles.hostText}numberOfLines={1}ellipsizeMode="tail">
|
|
72
|
-
{i.host||e.url}
|
|
73
|
-
</react_native_1.Text>
|
|
73
|
+
|
|
74
|
+
<react_native_1.View style={styles.slugRow}>
|
|
75
|
+
<HighlightText_1.default text={l.path}search={C}style={styles.pathText}highlightStyle={styles.highlight}numberOfLines={1}ellipsizeMode="middle"/>
|
|
74
76
|
</react_native_1.View>
|
|
75
77
|
</react_native_1.View>
|
|
76
78
|
|
|
@@ -91,7 +93,7 @@ ${e.url}`,[{text:p("common.cancel")||"Cancel",style:"cancel"},{text:p("common.op
|
|
|
91
93
|
</react_native_1.Text>
|
|
92
94
|
</react_native_1.View>}
|
|
93
95
|
|
|
94
|
-
{e.duration!=null&&!
|
|
96
|
+
{e.duration!=null&&!i&&<react_native_1.View style={[styles.metaStatChip,{backgroundColor:`${c}12`,borderColor:`${c}2E`}]}>
|
|
95
97
|
<NetworkIcons_1.ClockIcon color={c}size={9}/>
|
|
96
98
|
<react_native_1.Text style={[styles.metaStatText,{color:c}]}>
|
|
97
99
|
{e.duration}ms
|
|
@@ -102,10 +104,10 @@ ${e.url}`,[{text:p("common.cancel")||"Cancel",style:"cancel"},{text:p("common.op
|
|
|
102
104
|
|
|
103
105
|
|
|
104
106
|
<react_native_1.View style={styles.waterfallContainer}>
|
|
105
|
-
{typeof e.duration=="number"&&e.duration>0&&!
|
|
107
|
+
{typeof e.duration=="number"&&e.duration>0&&!i&&<react_native_1.View style={[styles.waterfallBar,{width:`${Math.min(100,Math.max(6,e.duration/1200*100))}%`,backgroundColor:c}]}/>}
|
|
106
108
|
</react_native_1.View>
|
|
107
109
|
</react_native_1.View>
|
|
108
110
|
|
|
109
|
-
{o&&<react_native_1.Animated.View pointerEvents="none"style={[react_native_1.StyleSheet.absoluteFill,{backgroundColor:
|
|
111
|
+
{o&&<react_native_1.Animated.View pointerEvents="none"style={[react_native_1.StyleSheet.absoluteFill,{backgroundColor:f,opacity:g}]}/>}
|
|
110
112
|
</TouchableScale_1.default>
|
|
111
|
-
</react_native_1.View>}const styles=react_native_1.StyleSheet.create({container:{paddingHorizontal:8,paddingVertical:4,height:126,justifyContent:"center"},card:{height:118,alignSelf:"stretch",borderRadius:10,overflow:"hidden",borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,shadowColor:AppColors_1.AppColors.shadowColorString},cardBody:{height:"100%",paddingHorizontal:
|
|
113
|
+
</react_native_1.View>}const styles=react_native_1.StyleSheet.create({container:{paddingHorizontal:8,paddingVertical:4,height:126,justifyContent:"center"},card:{height:118,alignSelf:"stretch",borderRadius:10,overflow:"hidden",borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,shadowColor:AppColors_1.AppColors.shadowColorString},cardBody:{height:"100%",paddingHorizontal:8,paddingTop:8,paddingBottom:6,justifyContent:"space-between"},cardHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:22,minHeight:22,maxHeight:22},cardHeaderLeft:{flexDirection:"row",alignItems:"center",flex:1,marginRight:4,gap:4.5,minWidth:0,overflow:"hidden"},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},smallCheckbox:{width:15,height:15,borderRadius:4,borderWidth:1.5,borderColor:AppColors_1.AppColors.grayTextWeak,alignItems:"center",justifyContent:"center",backgroundColor:AppColors_1.AppColors.white},smallCheckboxChecked:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},serialNumber:{fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.grayTextWeak,fontSize:10},methodBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:5,alignItems:"center",justifyContent:"center"},methodBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,lineHeight:12,letterSpacing:.5,color:AppColors_1.AppColors.white},chip:{paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4,borderWidth:1},chipText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9,lineHeight:12},statusPill:{flexDirection:"row",alignItems:"center",gap:3.5,paddingHorizontal:6,paddingVertical:2,borderRadius:6,borderWidth:1,flexShrink:0},statusPillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,lineHeight:12},globeBtn:{padding:3,borderRadius:4,backgroundColor:`${AppColors_1.AppColors.grayTextWeak}12`,alignItems:"center",justifyContent:"center"},urlBox:{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:7,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,paddingHorizontal:7,paddingVertical:4.5,height:48,minHeight:48,maxHeight:48,justifyContent:"center",gap:2.5,overflow:"hidden"},urlMainRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:4,minHeight:16},hostRow:{flexDirection:"row",alignItems:"center",gap:5,flex:1,minWidth:0},protoBadge:{paddingHorizontal:4,paddingVertical:1,borderRadius:3.5,borderWidth:1},protoBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8,lineHeight:10},hostText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11.5,lineHeight:15,color:AppColors_1.AppColors.primaryBlack,flex:1},urlBadgeRow:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},jsonBadge:{backgroundColor:`${AppColors_1.AppColors.darkOrange}14`,borderColor:`${AppColors_1.AppColors.darkOrange}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},jsonBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:AppColors_1.AppColors.darkOrange},dupBadge:{backgroundColor:`${AppColors_1.AppColors.purple}14`,borderColor:`${AppColors_1.AppColors.purple}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},dupBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:AppColors_1.AppColors.purple},slugRow:{flexDirection:"row",alignItems:"center",minHeight:15},pathText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10.5,lineHeight:14,color:AppColors_1.AppColors.slate600||AppColors_1.AppColors.grayText,flex:1},highlight:{backgroundColor:AppColors_1.AppColors.yellowHighlight,color:AppColors_1.AppColors.primaryBlack,borderRadius:2},cardFooterRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:18,minHeight:18,maxHeight:18,gap:4},footerLeft:{flexDirection:"row",alignItems:"center",gap:4.5,flex:1,minWidth:0,overflow:"hidden"},footerRight:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},cardDateRow:{flexDirection:"row",alignItems:"center",gap:3.5},cardDateText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,lineHeight:13,color:AppColors_1.AppColors.slate400},metaStatChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:AppColors_1.AppColors.violetSoftBg,borderColor:AppColors_1.AppColors.violetSoftBorder,borderWidth:1,paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4},metaStatText:{fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.violetSoftText,fontSize:9,lineHeight:12},waterfallContainer:{height:2.5,width:"100%",backgroundColor:AppColors_1.AppColors.graySurface,borderRadius:1.5,overflow:"hidden",marginTop:2},waterfallBar:{height:"100%",borderRadius:1.5}});function areLogCardPropsEqual(e,t){return e.item===t.item&&e.isSelected===t.isSelected&&e.isNew===t.isNew&&e.searchStr===t.searchStr&&e.timelineMinStart===t.timelineMinStart&&e.timelineTotalRange===t.timelineTotalRange&&e.onPress===t.onPress&&e.onToggleSelect===t.onToggleSelect}exports.default=react_1.default.memo(LogCard,areLogCardPropsEqual);
|