react-native-inapp-inspector 2.3.14 → 2.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/commonjs/components/AnimatedEntrance.js +3 -3
- package/dist/commonjs/components/ConsoleLogCard.js +174 -100
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +0 -22
- package/dist/commonjs/components/Inspector/ConsoleTab.js +25 -38
- package/dist/commonjs/components/Inspector/CrashTab.js +19 -28
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +198 -98
- package/dist/commonjs/components/Inspector/FeedbackModal.d.ts +7 -0
- package/dist/commonjs/components/Inspector/FeedbackModal.js +552 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +58 -6
- package/dist/commonjs/components/Inspector/MainScreen.js +100 -58
- package/dist/commonjs/components/Inspector/NetworkTab.js +26 -371
- package/dist/commonjs/components/Inspector/NpmStarPrompt.d.ts +3 -0
- package/dist/commonjs/components/Inspector/NpmStarPrompt.js +494 -0
- package/dist/commonjs/components/Inspector/PerformanceTab.js +40 -7
- package/dist/commonjs/components/Inspector/ReduxTab.js +3 -23
- package/dist/commonjs/components/Inspector/SettingsPanel.js +1035 -173
- package/dist/commonjs/components/Inspector/StorageTab.js +23 -28
- package/dist/commonjs/components/Inspector/TabBar.js +50 -15
- package/dist/commonjs/components/JsonViewer.js +14 -2
- package/dist/commonjs/components/LogCard.js +428 -227
- package/dist/commonjs/components/NetworkIcons.d.ts +5 -0
- package/dist/commonjs/components/NetworkIcons.js +33 -2
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.js +1 -1
- package/dist/commonjs/customHooks/consoleLogger.js +34 -2
- package/dist/commonjs/customHooks/crashHandler.js +1 -1
- package/dist/commonjs/customHooks/networkLogger.js +184 -26
- package/dist/commonjs/helpers/index.d.ts +1 -0
- package/dist/commonjs/helpers/index.js +1 -0
- package/dist/commonjs/helpers/remoteConfig.d.ts +4 -0
- package/dist/commonjs/helpers/remoteConfig.js +165 -0
- package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -1
- package/dist/commonjs/helpers/searchQueryParser.js +39 -291
- package/dist/commonjs/helpers/telemetry.d.ts +5 -0
- package/dist/commonjs/helpers/telemetry.js +339 -8
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +173 -29
- package/dist/commonjs/styles/AppFonts.d.ts +2 -0
- package/dist/commonjs/styles/AppFonts.js +1 -0
- package/dist/commonjs/styles/index.d.ts +22 -0
- package/dist/commonjs/styles/index.js +19 -0
- package/dist/commonjs/types/enums.d.ts +1 -0
- package/dist/commonjs/types/enums.js +1 -0
- package/dist/commonjs/types/interfaces.d.ts +12 -0
- package/dist/esm/components/AnimatedEntrance.js +3 -3
- package/dist/esm/components/ConsoleLogCard.js +141 -100
- package/dist/esm/components/Inspector/AnalyticsTab.js +1 -23
- package/dist/esm/components/Inspector/ConsoleTab.js +26 -39
- package/dist/esm/components/Inspector/CrashTab.js +20 -29
- package/dist/esm/components/Inspector/DeviceInfoTab.js +198 -98
- package/dist/esm/components/Inspector/FeedbackModal.d.ts +7 -0
- package/dist/esm/components/Inspector/FeedbackModal.js +515 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +60 -8
- package/dist/esm/components/Inspector/MainScreen.js +101 -59
- package/dist/esm/components/Inspector/NetworkTab.js +27 -372
- package/dist/esm/components/Inspector/NpmStarPrompt.d.ts +3 -0
- package/dist/esm/components/Inspector/NpmStarPrompt.js +454 -0
- package/dist/esm/components/Inspector/PerformanceTab.js +40 -7
- package/dist/esm/components/Inspector/ReduxTab.js +4 -24
- package/dist/esm/components/Inspector/SettingsPanel.js +1038 -176
- package/dist/esm/components/Inspector/StorageTab.js +23 -28
- package/dist/esm/components/Inspector/TabBar.js +50 -15
- package/dist/esm/components/JsonViewer.js +14 -2
- package/dist/esm/components/LogCard.js +422 -221
- package/dist/esm/components/NetworkIcons.d.ts +5 -0
- package/dist/esm/components/NetworkIcons.js +26 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.js +1 -1
- package/dist/esm/customHooks/consoleLogger.js +34 -2
- package/dist/esm/customHooks/crashHandler.js +1 -1
- package/dist/esm/customHooks/networkLogger.js +184 -26
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +1 -0
- package/dist/esm/helpers/remoteConfig.d.ts +4 -0
- package/dist/esm/helpers/remoteConfig.js +160 -0
- package/dist/esm/helpers/searchQueryParser.d.ts +1 -1
- package/dist/esm/helpers/searchQueryParser.js +39 -291
- package/dist/esm/helpers/telemetry.d.ts +5 -0
- package/dist/esm/helpers/telemetry.js +332 -9
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +171 -29
- package/dist/esm/styles/AppFonts.d.ts +2 -0
- package/dist/esm/styles/AppFonts.js +1 -0
- package/dist/esm/styles/index.d.ts +22 -0
- package/dist/esm/styles/index.js +19 -0
- package/dist/esm/types/enums.d.ts +1 -0
- package/dist/esm/types/enums.js +1 -0
- package/dist/esm/types/interfaces.d.ts +12 -0
- package/package.json +1 -1
- package/src/components/AnimatedEntrance.tsx +3 -3
- package/src/components/ConsoleLogCard.tsx +154 -103
- package/src/components/Inspector/AnalyticsTab.tsx +0 -23
- package/src/components/Inspector/ConsoleTab.tsx +27 -41
- package/src/components/Inspector/CrashTab.tsx +19 -28
- package/src/components/Inspector/DeviceInfoTab.tsx +224 -102
- package/src/components/Inspector/FeedbackModal.tsx +626 -0
- package/src/components/Inspector/InspectorHeader.tsx +83 -5
- package/src/components/Inspector/MainScreen.tsx +61 -6
- package/src/components/Inspector/NetworkTab.tsx +70 -480
- package/src/components/Inspector/NpmStarPrompt.tsx +532 -0
- package/src/components/Inspector/PerformanceTab.tsx +44 -8
- package/src/components/Inspector/ReduxTab.tsx +9 -24
- package/src/components/Inspector/SettingsPanel.tsx +1162 -197
- package/src/components/Inspector/StorageTab.tsx +27 -30
- package/src/components/Inspector/TabBar.tsx +57 -20
- package/src/components/JsonViewer.tsx +15 -2
- package/src/components/LogCard.tsx +528 -339
- package/src/components/NetworkIcons.tsx +92 -0
- package/src/constants/version.ts +1 -1
- package/src/customHooks/analyticsLogger.ts +1 -1
- package/src/customHooks/consoleLogger.ts +36 -3
- package/src/customHooks/crashHandler.ts +1 -1
- package/src/customHooks/networkLogger.ts +214 -26
- package/src/helpers/index.ts +1 -0
- package/src/helpers/remoteConfig.ts +212 -0
- package/src/helpers/searchQueryParser.ts +42 -284
- package/src/helpers/telemetry.ts +381 -10
- package/src/index.tsx +374 -211
- package/src/styles/AppFonts.ts +2 -0
- package/src/styles/index.ts +20 -1
- package/src/types/enums.ts +1 -0
- package/src/types/interfaces.ts +12 -0
|
@@ -40,7 +40,6 @@ exports.StorageTab = void 0;
|
|
|
40
40
|
const react_1 = __importStar(require("react"));
|
|
41
41
|
const react_native_1 = require("react-native");
|
|
42
42
|
const TouchableScale_1 = __importDefault(require("../TouchableScale"));
|
|
43
|
-
const styles_1 = __importDefault(require("../../styles"));
|
|
44
43
|
const AppColors_1 = require("../../styles/AppColors");
|
|
45
44
|
const AppFonts_1 = require("../../styles/AppFonts");
|
|
46
45
|
const i18n_1 = require("../../i18n");
|
|
@@ -271,8 +270,11 @@ exports.StorageTab = react_1.default.memo(() => {
|
|
|
271
270
|
const filteredEntries = (0, react_1.useMemo)(() => {
|
|
272
271
|
if (!search.trim())
|
|
273
272
|
return entries;
|
|
274
|
-
const
|
|
275
|
-
return entries.filter(e =>
|
|
273
|
+
const tokens = search.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
274
|
+
return entries.filter(e => {
|
|
275
|
+
const corpus = `${e.key} ${e.value}`.toLowerCase();
|
|
276
|
+
return tokens.every(tok => corpus.includes(tok));
|
|
277
|
+
});
|
|
276
278
|
}, [entries, search]);
|
|
277
279
|
const totalBytes = (0, react_1.useMemo)(() => {
|
|
278
280
|
return entries.reduce((sum, e) => sum + e.byteSize, 0);
|
|
@@ -410,36 +412,29 @@ exports.StorageTab = react_1.default.memo(() => {
|
|
|
410
412
|
<NetworkIcons_1.DatabaseIcon size={28} color={AppColors_1.AppColors.grayTextWeak}/>
|
|
411
413
|
</react_native_1.View>
|
|
412
414
|
<react_native_1.Text style={styles.emptyTitle}>
|
|
413
|
-
{search
|
|
415
|
+
{search.trim().length > 0
|
|
416
|
+
? 'No matching keys found'
|
|
417
|
+
: `No ${activeDriver === 'asyncStorage' ? 'AsyncStorage' : 'MMKV'} Keys`}
|
|
414
418
|
</react_native_1.Text>
|
|
415
419
|
<react_native_1.Text style={styles.emptySubtitle}>
|
|
416
|
-
{search
|
|
417
|
-
?
|
|
420
|
+
{search.trim().length > 0
|
|
421
|
+
? `No keys or values match "${search}"`
|
|
418
422
|
: `Storage is auto-detected. Tap "+ Add" above to create your first ${activeDriver === 'asyncStorage' ? 'AsyncStorage' : 'MMKV'} key!`}
|
|
419
423
|
</react_native_1.Text>
|
|
424
|
+
{search.trim().length > 0 && (<TouchableScale_1.default onPress={() => setSearch('')} style={{
|
|
425
|
+
marginTop: 12,
|
|
426
|
+
paddingHorizontal: 14,
|
|
427
|
+
paddingVertical: 6,
|
|
428
|
+
borderRadius: 8,
|
|
429
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
430
|
+
borderWidth: 1,
|
|
431
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
432
|
+
}}>
|
|
433
|
+
<react_native_1.Text style={{ color: AppColors_1.AppColors.brandPurple, fontSize: 12, fontFamily: AppFonts_1.AppFonts.interBold }}>
|
|
434
|
+
Clear Search
|
|
435
|
+
</react_native_1.Text>
|
|
436
|
+
</TouchableScale_1.default>)}
|
|
420
437
|
</react_native_1.View>} ListFooterComponent={<react_native_1.View style={{ height: 60 }}/>}/>
|
|
421
|
-
|
|
422
|
-
<TouchableScale_1.default onPress={() => {
|
|
423
|
-
try {
|
|
424
|
-
listRef.current?.scrollToOffset({
|
|
425
|
-
offset: 0,
|
|
426
|
-
animated: true,
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
catch {
|
|
430
|
-
try {
|
|
431
|
-
listRef.current?.scrollToIndex({
|
|
432
|
-
index: 0,
|
|
433
|
-
animated: true,
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
catch { }
|
|
437
|
-
}
|
|
438
|
-
}} hitSlop={12} style={styles_1.default.scrollTopBtn}>
|
|
439
|
-
<react_native_1.View style={{ transform: [{ rotate: '180deg' }] }}>
|
|
440
|
-
<NetworkIcons_1.ChevronIcon color={AppColors_1.AppColors.white} size={18}/>
|
|
441
|
-
</react_native_1.View>
|
|
442
|
-
</TouchableScale_1.default>
|
|
443
438
|
</>)}
|
|
444
439
|
|
|
445
440
|
|
|
@@ -8,6 +8,7 @@ const react_native_1 = require("react-native");
|
|
|
8
8
|
const InspectorContext_1 = require("./InspectorContext");
|
|
9
9
|
const styles_1 = __importDefault(require("../../styles"));
|
|
10
10
|
const AppColors_1 = require("../../styles/AppColors");
|
|
11
|
+
const AppFonts_1 = require("../../styles/AppFonts");
|
|
11
12
|
const TouchableScale_1 = __importDefault(require("../TouchableScale"));
|
|
12
13
|
const NetworkIcons_1 = require("../NetworkIcons");
|
|
13
14
|
const reduxLogger_1 = require("../../customHooks/reduxLogger");
|
|
@@ -21,60 +22,70 @@ const TabBar = react_1.default.memo(() => {
|
|
|
21
22
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{ paddingRight: 16 }}>
|
|
22
23
|
{[
|
|
23
24
|
{
|
|
25
|
+
id: 1,
|
|
24
26
|
key: 'apis',
|
|
25
27
|
label: 'APIs',
|
|
26
28
|
count: logs.length,
|
|
27
29
|
icon: 'apis',
|
|
28
30
|
},
|
|
29
31
|
{
|
|
32
|
+
id: 2,
|
|
30
33
|
key: 'logs',
|
|
31
34
|
label: 'Logs',
|
|
32
35
|
count: consoleLogs.length,
|
|
33
36
|
icon: 'logs',
|
|
34
37
|
},
|
|
35
38
|
{
|
|
39
|
+
id: 3,
|
|
36
40
|
key: 'analytics',
|
|
37
41
|
label: 'Analytics',
|
|
38
42
|
count: analyticsEvents.length,
|
|
39
43
|
icon: 'analytics',
|
|
40
44
|
},
|
|
41
45
|
{
|
|
46
|
+
id: 4,
|
|
42
47
|
key: 'redux',
|
|
43
48
|
label: 'Redux',
|
|
44
49
|
count: 0,
|
|
45
50
|
icon: 'redux',
|
|
46
51
|
},
|
|
47
52
|
{
|
|
48
|
-
|
|
49
|
-
|
|
53
|
+
id: 5,
|
|
54
|
+
key: 'storage',
|
|
55
|
+
label: 'Storage',
|
|
50
56
|
count: 0,
|
|
51
|
-
icon: '
|
|
57
|
+
icon: 'storage',
|
|
52
58
|
},
|
|
53
59
|
{
|
|
54
|
-
|
|
55
|
-
|
|
60
|
+
id: 6,
|
|
61
|
+
key: 'device',
|
|
62
|
+
label: 'Device',
|
|
56
63
|
count: 0,
|
|
57
|
-
icon: '
|
|
64
|
+
icon: 'device',
|
|
58
65
|
},
|
|
59
66
|
{
|
|
67
|
+
id: 7,
|
|
60
68
|
key: 'crash',
|
|
61
69
|
label: 'Crash',
|
|
62
70
|
count: crashRecords?.length || 0,
|
|
63
71
|
icon: 'crash',
|
|
64
72
|
},
|
|
65
73
|
{
|
|
66
|
-
|
|
67
|
-
|
|
74
|
+
id: 8,
|
|
75
|
+
key: 'bundle',
|
|
76
|
+
label: 'Bundle',
|
|
68
77
|
count: 0,
|
|
69
|
-
icon: '
|
|
78
|
+
icon: 'bundle',
|
|
70
79
|
},
|
|
71
80
|
{
|
|
72
|
-
|
|
73
|
-
|
|
81
|
+
id: 9,
|
|
82
|
+
key: 'performance',
|
|
83
|
+
label: 'Performance',
|
|
74
84
|
count: 0,
|
|
75
|
-
icon: '
|
|
85
|
+
icon: 'performance',
|
|
76
86
|
},
|
|
77
87
|
{
|
|
88
|
+
id: 10,
|
|
78
89
|
key: 'debugging',
|
|
79
90
|
label: 'Debugging',
|
|
80
91
|
count: 0,
|
|
@@ -124,12 +135,36 @@ const TabBar = react_1.default.memo(() => {
|
|
|
124
135
|
{tab.icon === 'logs' && (<NetworkIcons_1.TerminalIcon color={iconColor} size={14}/>)}
|
|
125
136
|
{tab.icon === 'analytics' && (<NetworkIcons_1.AnalyticsIcon color={iconColor} size={14}/>)}
|
|
126
137
|
{tab.icon === 'redux' && (<NetworkIcons_1.ReduxIcon color={iconColor} size={14}/>)}
|
|
138
|
+
{tab.icon === 'storage' && (<NetworkIcons_1.DatabaseIcon color={iconColor} size={14}/>)}
|
|
139
|
+
{tab.icon === 'device' && (<NetworkIcons_1.SmartphoneIcon color={iconColor} size={14}/>)}
|
|
140
|
+
{tab.icon === 'crash' && (<NetworkIcons_1.CrashIcon color={iconColor} size={14}/>)}
|
|
127
141
|
{tab.icon === 'bundle' && (<NetworkIcons_1.PackageIcon color={iconColor} size={14}/>)}
|
|
128
142
|
{tab.icon === 'performance' && (<NetworkIcons_1.PerformanceIcon color={iconColor} size={14}/>)}
|
|
129
|
-
{tab.icon === 'crash' && (<NetworkIcons_1.CrashIcon color={iconColor} size={14}/>)}
|
|
130
|
-
{tab.icon === 'device' && (<NetworkIcons_1.SmartphoneIcon color={iconColor} size={14}/>)}
|
|
131
|
-
{tab.icon === 'storage' && (<NetworkIcons_1.DatabaseIcon color={iconColor} size={14}/>)}
|
|
132
143
|
{tab.icon === 'debugging' && (<NetworkIcons_1.QrCodeIcon color={iconColor} size={14}/>)}
|
|
144
|
+
<react_native_1.View style={{
|
|
145
|
+
minWidth: 20,
|
|
146
|
+
height: 20,
|
|
147
|
+
paddingHorizontal: 4,
|
|
148
|
+
borderRadius: 10,
|
|
149
|
+
backgroundColor: isActive
|
|
150
|
+
? `${AppColors_1.AppColors.white}33`
|
|
151
|
+
: `${AppColors_1.AppColors.purple}1F`,
|
|
152
|
+
borderWidth: 1,
|
|
153
|
+
borderColor: isActive
|
|
154
|
+
? `${AppColors_1.AppColors.white}66`
|
|
155
|
+
: `${AppColors_1.AppColors.purple}40`,
|
|
156
|
+
alignItems: 'center',
|
|
157
|
+
justifyContent: 'center',
|
|
158
|
+
}}>
|
|
159
|
+
<react_native_1.Text style={{
|
|
160
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
161
|
+
fontSize: 9.5,
|
|
162
|
+
lineHeight: 12,
|
|
163
|
+
color: isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.purple,
|
|
164
|
+
}}>
|
|
165
|
+
#{tab.id}
|
|
166
|
+
</react_native_1.Text>
|
|
167
|
+
</react_native_1.View>
|
|
133
168
|
<react_native_1.Text numberOfLines={1} ellipsizeMode="tail" style={[
|
|
134
169
|
styles_1.default.contentTabButtonText,
|
|
135
170
|
isActive &&
|
|
@@ -149,10 +149,22 @@ const JsonViewer = react_1.default.memo(({ data, search, forceOpen, defaultExpan
|
|
|
149
149
|
<react_native_1.Text style={localStyles.tableCellValue}>{String(data)}</react_native_1.Text>
|
|
150
150
|
</react_native_1.View>);
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
let keys = Object.keys(data);
|
|
153
|
+
if (search && search.trim().length > 0) {
|
|
154
|
+
const q = search.trim().toLowerCase();
|
|
155
|
+
keys = keys.filter(key => {
|
|
156
|
+
const val = data[key];
|
|
157
|
+
const valStr = typeof val === 'object' && val !== null ? JSON.stringify(val) : String(val);
|
|
158
|
+
return key.toLowerCase().includes(q) || valStr.toLowerCase().includes(q);
|
|
159
|
+
});
|
|
160
|
+
}
|
|
153
161
|
if (keys.length === 0) {
|
|
154
162
|
return (<react_native_1.View style={localStyles.emptyTable}>
|
|
155
|
-
<react_native_1.Text style={localStyles.emptyTableText}>
|
|
163
|
+
<react_native_1.Text style={localStyles.emptyTableText}>
|
|
164
|
+
{search && search.trim().length > 0
|
|
165
|
+
? 'No matching keys or values found'
|
|
166
|
+
: t('network.jsonViewer.emptyTable')}
|
|
167
|
+
</react_native_1.Text>
|
|
156
168
|
</react_native_1.View>);
|
|
157
169
|
}
|
|
158
170
|
return (<react_native_1.View style={localStyles.tableView}>
|