react-native-inapp-inspector 1.1.12 → 1.1.13
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/dist/commonjs/components/AnalyticsDetail.js +64 -21
- package/dist/commonjs/components/HighlightText.js +1 -1
- package/dist/commonjs/components/JsonViewer.d.ts +3 -1
- package/dist/commonjs/components/JsonViewer.js +327 -9
- package/dist/commonjs/components/MetaAccordion.d.ts +10 -1
- package/dist/commonjs/components/MetaAccordion.js +121 -24
- package/dist/commonjs/components/NetworkIcons.d.ts +1 -0
- package/dist/commonjs/components/NetworkIcons.js +8 -1
- package/dist/commonjs/components/ReduxTreeView.d.ts +12 -3
- package/dist/commonjs/components/ReduxTreeView.js +1096 -278
- package/dist/commonjs/components/SectionHeader.d.ts +1 -1
- package/dist/commonjs/components/SectionHeader.js +7 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/reduxLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/reduxLogger.js +2 -0
- package/dist/commonjs/helpers/index.d.ts +1 -0
- package/dist/commonjs/helpers/index.js +15 -1
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
- package/dist/commonjs/helpers/settingsStore.js +4 -0
- package/dist/commonjs/index.js +110 -91
- package/dist/commonjs/types/index.d.ts +3 -0
- package/dist/esm/components/AnalyticsDetail.js +64 -21
- package/dist/esm/components/HighlightText.js +3 -3
- package/dist/esm/components/JsonViewer.d.ts +3 -1
- package/dist/esm/components/JsonViewer.js +295 -10
- package/dist/esm/components/MetaAccordion.d.ts +10 -1
- package/dist/esm/components/MetaAccordion.js +90 -26
- package/dist/esm/components/NetworkIcons.d.ts +1 -0
- package/dist/esm/components/NetworkIcons.js +6 -0
- package/dist/esm/components/ReduxTreeView.d.ts +12 -3
- package/dist/esm/components/ReduxTreeView.js +1095 -279
- package/dist/esm/components/SectionHeader.d.ts +1 -1
- package/dist/esm/components/SectionHeader.js +8 -2
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/reduxLogger.d.ts +2 -0
- package/dist/esm/customHooks/reduxLogger.js +2 -0
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +14 -1
- package/dist/esm/helpers/settingsStore.d.ts +1 -0
- package/dist/esm/helpers/settingsStore.js +3 -0
- package/dist/esm/index.js +111 -92
- package/dist/esm/types/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,9 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 =
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
7
40
|
const react_native_1 = require("react-native");
|
|
8
41
|
// Constants
|
|
9
42
|
const constants_1 = require("../constants");
|
|
@@ -13,13 +46,52 @@ const useAccordion_1 = __importDefault(require("../customHooks/useAccordion"));
|
|
|
13
46
|
const helpers_1 = require("../helpers");
|
|
14
47
|
// Assets
|
|
15
48
|
const NetworkIcons_1 = require("./NetworkIcons");
|
|
49
|
+
// Components
|
|
50
|
+
const TouchableScale_1 = __importDefault(require("./TouchableScale"));
|
|
16
51
|
// Stylesheet
|
|
17
52
|
const AppColors_1 = require("../styles/AppColors");
|
|
18
|
-
const styles_1 = __importDefault(require("../styles"));
|
|
19
53
|
const AppFonts_1 = require("../styles/AppFonts");
|
|
54
|
+
const styles_1 = __importDefault(require("../styles"));
|
|
20
55
|
const MetaAccordion = ({ status, statusColor, duration, size, triggeredAt, method, contentType, url, }) => {
|
|
56
|
+
const [urlExpanded, setUrlExpanded] = (0, react_1.useState)(false);
|
|
21
57
|
const { toggleOpen, chevronStyle, bodyStyle } = (0, useAccordion_1.default)(true, 400, 390);
|
|
22
58
|
const isFailed = status === 0 || status == null;
|
|
59
|
+
const renderFormattedUrl = (rawUrl) => {
|
|
60
|
+
if (!rawUrl)
|
|
61
|
+
return '—';
|
|
62
|
+
try {
|
|
63
|
+
const doubleSlashIndex = rawUrl.indexOf('//');
|
|
64
|
+
let temp = rawUrl;
|
|
65
|
+
let protocol = '';
|
|
66
|
+
if (doubleSlashIndex !== -1) {
|
|
67
|
+
protocol = rawUrl.substring(0, doubleSlashIndex + 2);
|
|
68
|
+
temp = rawUrl.substring(doubleSlashIndex + 2);
|
|
69
|
+
}
|
|
70
|
+
const slashIndex = temp.indexOf('/');
|
|
71
|
+
let host = temp;
|
|
72
|
+
let pathAndSearch = '';
|
|
73
|
+
if (slashIndex !== -1) {
|
|
74
|
+
host = temp.substring(0, slashIndex);
|
|
75
|
+
pathAndSearch = temp.substring(slashIndex);
|
|
76
|
+
}
|
|
77
|
+
const queryIndex = pathAndSearch.indexOf('?');
|
|
78
|
+
let pathname = pathAndSearch;
|
|
79
|
+
let search = '';
|
|
80
|
+
if (queryIndex !== -1) {
|
|
81
|
+
pathname = pathAndSearch.substring(0, queryIndex);
|
|
82
|
+
search = pathAndSearch.substring(queryIndex);
|
|
83
|
+
}
|
|
84
|
+
return (<react_native_1.Text style={{ lineHeight: 16 }}>
|
|
85
|
+
{protocol ? (<react_native_1.Text style={{ color: '#94A3B8', fontFamily: AppFonts_1.AppFonts.interRegular }}>{protocol}</react_native_1.Text>) : null}
|
|
86
|
+
<react_native_1.Text style={{ color: AppColors_1.AppColors.purple, fontFamily: AppFonts_1.AppFonts.interBold }}>{host}</react_native_1.Text>
|
|
87
|
+
<react_native_1.Text style={{ color: '#334155', fontFamily: AppFonts_1.AppFonts.interMedium }}>{pathname}</react_native_1.Text>
|
|
88
|
+
{search ? (<react_native_1.Text style={{ color: '#0D9488', fontFamily: AppFonts_1.AppFonts.interRegular }}>{search}</react_native_1.Text>) : null}
|
|
89
|
+
</react_native_1.Text>);
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return rawUrl;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
23
95
|
return (<react_native_1.View style={styles_1.default.metaContainer}>
|
|
24
96
|
<react_native_1.Pressable onPress={toggleOpen} hitSlop={12}>
|
|
25
97
|
<react_native_1.View style={styles_1.default.metaHeader}>
|
|
@@ -145,29 +217,54 @@ const MetaAccordion = ({ status, statusColor, duration, size, triggeredAt, metho
|
|
|
145
217
|
</react_native_1.View>
|
|
146
218
|
<react_native_1.View style={styles_1.default.metaDivider}/>
|
|
147
219
|
|
|
148
|
-
<react_native_1.View style={[styles_1.default.metaRow, { alignItems: 'flex-start' }]}>
|
|
149
|
-
<react_native_1.View style={
|
|
150
|
-
<
|
|
151
|
-
|
|
220
|
+
<react_native_1.View style={[styles_1.default.metaRow, { alignItems: 'flex-start', flexDirection: 'column', gap: 6 }]}>
|
|
221
|
+
<react_native_1.View style={{ flexDirection: 'row', justifyContent: 'space-between', width: '100%', alignItems: 'center' }}>
|
|
222
|
+
<react_native_1.View style={styles_1.default.metaLabelRow}>
|
|
223
|
+
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
224
|
+
<react_native_1.Text style={styles_1.default.metaLabel}>Full URL</react_native_1.Text>
|
|
225
|
+
</react_native_1.View>
|
|
226
|
+
|
|
227
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
|
|
228
|
+
{url && url.length > 50 && (<TouchableScale_1.default onPress={() => setUrlExpanded(prev => !prev)} hitSlop={8}>
|
|
229
|
+
<react_native_1.Text style={{
|
|
230
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
231
|
+
fontSize: 10.5,
|
|
232
|
+
color: AppColors_1.AppColors.purple,
|
|
233
|
+
}}>
|
|
234
|
+
{urlExpanded ? 'Show Less' : 'Show More'}
|
|
235
|
+
</react_native_1.Text>
|
|
236
|
+
</TouchableScale_1.default>)}
|
|
237
|
+
|
|
238
|
+
{url && (<TouchableScale_1.default onPress={() => (0, helpers_1.handleOpenExternalLink)(url)} hitSlop={8}>
|
|
239
|
+
<react_native_1.Text style={{
|
|
240
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
241
|
+
fontSize: 10.5,
|
|
242
|
+
color: AppColors_1.AppColors.purple,
|
|
243
|
+
textDecorationLine: 'underline',
|
|
244
|
+
}}>
|
|
245
|
+
Open
|
|
246
|
+
</react_native_1.Text>
|
|
247
|
+
</TouchableScale_1.default>)}
|
|
248
|
+
</react_native_1.View>
|
|
249
|
+
</react_native_1.View>
|
|
250
|
+
|
|
251
|
+
<react_native_1.View style={{
|
|
252
|
+
backgroundColor: '#F8FAFC',
|
|
253
|
+
borderRadius: 8,
|
|
254
|
+
padding: 8,
|
|
255
|
+
borderWidth: 1.5,
|
|
256
|
+
borderColor: '#E2E8F0',
|
|
257
|
+
width: '100%',
|
|
258
|
+
marginTop: 2,
|
|
259
|
+
}}>
|
|
260
|
+
<react_native_1.Text selectable={true} numberOfLines={urlExpanded ? undefined : 2} ellipsizeMode="tail" style={{
|
|
261
|
+
fontSize: 11,
|
|
262
|
+
textAlign: 'left',
|
|
263
|
+
lineHeight: 16.5,
|
|
264
|
+
}}>
|
|
265
|
+
{renderFormattedUrl(url)}
|
|
266
|
+
</react_native_1.Text>
|
|
152
267
|
</react_native_1.View>
|
|
153
|
-
<react_native_1.Text selectable={true} numberOfLines={3} ellipsizeMode="tail" onPress={() => {
|
|
154
|
-
if (url) {
|
|
155
|
-
react_native_1.Linking.openURL(url).catch(() => { });
|
|
156
|
-
}
|
|
157
|
-
}} style={[
|
|
158
|
-
styles_1.default.metaValue,
|
|
159
|
-
{
|
|
160
|
-
fontSize: 11.5,
|
|
161
|
-
color: url ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayTextWeak,
|
|
162
|
-
textDecorationLine: url ? 'underline' : 'none',
|
|
163
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
164
|
-
flex: 1,
|
|
165
|
-
textAlign: 'right',
|
|
166
|
-
lineHeight: 16,
|
|
167
|
-
},
|
|
168
|
-
]}>
|
|
169
|
-
{url || '—'}
|
|
170
|
-
</react_native_1.Text>
|
|
171
268
|
</react_native_1.View>
|
|
172
269
|
</react_native_1.View>
|
|
173
270
|
</react_native_1.Animated.View>
|
|
@@ -50,3 +50,4 @@ export declare const WarningTriangleIcon: ({ color, size, }: any) => React.JSX.E
|
|
|
50
50
|
export declare const ErrorCircleIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
51
51
|
export declare const TrendingUpIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
52
52
|
export declare const MotionIcon: ({ color, size, }: any) => React.JSX.Element;
|
|
53
|
+
export declare const SortIcon: ({ ascending, color, size, }: any) => React.JSX.Element;
|
|
@@ -37,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.TrendingUpIcon = exports.ErrorCircleIcon = exports.WarningTriangleIcon = exports.InfoCircleIcon = exports.UserIcon = exports.LayersIcon = exports.WipeIcon = exports.FolderIcon = exports.SettingsIcon = exports.EyeIcon = exports.JsIcon = exports.CssIcon = exports.HtmlIcon = exports.BrandSquareIcon = exports.BrandCircleIcon = exports.MoonIcon = exports.SunIcon = exports.DebugIcon = exports.InsightsIcon = exports.AnalyticsIcon = exports.WhiteBackNavigation = exports.CloseWhite = exports.DownloadIcon = exports.FilterIcon = exports.ChevronIcon = exports.SortArrowIcon = exports.GlobeIcon = exports.DiffIcon = exports.SignalIcon = exports.ExportIcon = exports.HeaderPauseIcon = exports.TrashIcon = exports.FailIcon = exports.CheckIcon = exports.TerminalIcon = exports.FetchIcon = exports.CopyIcon = exports.HeadersIcon = exports.ResponseIcon = exports.RequestIcon = exports.SizeIcon = exports.StatusIcon = exports.CalendarIcon = exports.ClockIcon = exports.ClearIcon = exports.SearchIcon = exports.ExpandCollapseIcon = exports.ScreenIcon = exports.MapPinIcon = exports.EmptyRadarIcon = void 0;
|
|
40
|
-
exports.MotionIcon = void 0;
|
|
40
|
+
exports.SortIcon = exports.MotionIcon = void 0;
|
|
41
41
|
const react_1 = __importDefault(require("react"));
|
|
42
42
|
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
43
43
|
// Stylesheet
|
|
@@ -393,3 +393,10 @@ const MotionIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, })
|
|
|
393
393
|
</react_native_svg_1.default>);
|
|
394
394
|
};
|
|
395
395
|
exports.MotionIcon = MotionIcon;
|
|
396
|
+
const SortIcon = ({ ascending, color = AppColors_1.AppColors.purple, size = 14, }) => {
|
|
397
|
+
return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
398
|
+
<react_native_svg_1.Path d="M12 4l-6 6h12z" fill={ascending ? color : AppColors_1.AppColors.grayTextWeak}/>
|
|
399
|
+
<react_native_svg_1.Path d="M12 20l6-6H6z" fill={!ascending ? color : AppColors_1.AppColors.grayTextWeak}/>
|
|
400
|
+
</react_native_svg_1.default>);
|
|
401
|
+
};
|
|
402
|
+
exports.SortIcon = SortIcon;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const ReduxTreeView: ({ state, lastActionMap, search, }: {
|
|
2
|
+
export declare const ReduxTreeView: ({ state, actionHistory, lastActionMap, search, onSearchChange, autoRefresh, onToggleAutoRefresh, onClearHistory, onDetailOpenChange, selectedSliceKey, onSelectSliceKey, selectedActionId, onSelectActionId, }: {
|
|
4
3
|
state: any;
|
|
5
|
-
|
|
4
|
+
actionHistory?: any[];
|
|
5
|
+
lastActionMap?: Record<string, any>;
|
|
6
6
|
search?: string;
|
|
7
|
+
onSearchChange?: (val: string) => void;
|
|
8
|
+
autoRefresh?: boolean;
|
|
9
|
+
onToggleAutoRefresh?: () => void;
|
|
10
|
+
onClearHistory?: () => void;
|
|
11
|
+
onDetailOpenChange?: (isOpen: boolean) => void;
|
|
12
|
+
selectedSliceKey?: string | null;
|
|
13
|
+
onSelectSliceKey?: (key: string | null) => void;
|
|
14
|
+
selectedActionId?: number | null;
|
|
15
|
+
onSelectActionId?: (id: number | null) => void;
|
|
7
16
|
}) => React.JSX.Element;
|