react-native-inapp-inspector 2.3.14 → 2.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/components/AnimatedEntrance.js +3 -3
- package/dist/commonjs/components/ConsoleLogCard.js +174 -100
- package/dist/commonjs/components/Inspector/ConsoleTab.js +25 -16
- package/dist/commonjs/components/Inspector/CrashTab.js +19 -5
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +198 -98
- package/dist/commonjs/components/Inspector/InspectorHeader.js +2 -2
- package/dist/commonjs/components/Inspector/MainScreen.js +56 -56
- package/dist/commonjs/components/Inspector/NetworkTab.js +1 -335
- package/dist/commonjs/components/Inspector/PerformanceTab.js +32 -6
- package/dist/commonjs/components/Inspector/ReduxTab.js +3 -1
- package/dist/commonjs/components/Inspector/StorageTab.js +23 -5
- package/dist/commonjs/components/JsonViewer.js +14 -2
- package/dist/commonjs/components/LogCard.js +428 -227
- 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/searchQueryParser.d.ts +1 -1
- package/dist/commonjs/helpers/searchQueryParser.js +37 -291
- package/dist/commonjs/index.js +141 -27
- package/dist/esm/components/AnimatedEntrance.js +3 -3
- package/dist/esm/components/ConsoleLogCard.js +141 -100
- package/dist/esm/components/Inspector/ConsoleTab.js +25 -16
- package/dist/esm/components/Inspector/CrashTab.js +19 -5
- package/dist/esm/components/Inspector/DeviceInfoTab.js +198 -98
- package/dist/esm/components/Inspector/InspectorHeader.js +3 -3
- package/dist/esm/components/Inspector/MainScreen.js +56 -56
- package/dist/esm/components/Inspector/NetworkTab.js +2 -336
- package/dist/esm/components/Inspector/PerformanceTab.js +32 -6
- package/dist/esm/components/Inspector/ReduxTab.js +3 -1
- package/dist/esm/components/Inspector/StorageTab.js +23 -5
- package/dist/esm/components/JsonViewer.js +14 -2
- package/dist/esm/components/LogCard.js +422 -221
- 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/searchQueryParser.d.ts +1 -1
- package/dist/esm/helpers/searchQueryParser.js +37 -291
- package/dist/esm/index.js +141 -27
- package/package.json +1 -1
- package/src/components/AnimatedEntrance.tsx +3 -3
- package/src/components/ConsoleLogCard.tsx +154 -103
- package/src/components/Inspector/ConsoleTab.tsx +27 -18
- package/src/components/Inspector/CrashTab.tsx +19 -5
- package/src/components/Inspector/DeviceInfoTab.tsx +224 -102
- package/src/components/Inspector/InspectorHeader.tsx +5 -3
- package/src/components/Inspector/MainScreen.tsx +2 -3
- package/src/components/Inspector/NetworkTab.tsx +1 -402
- package/src/components/Inspector/PerformanceTab.tsx +36 -7
- package/src/components/Inspector/ReduxTab.tsx +9 -1
- package/src/components/Inspector/StorageTab.tsx +27 -7
- package/src/components/JsonViewer.tsx +15 -2
- package/src/components/LogCard.tsx +528 -339
- 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/searchQueryParser.ts +40 -285
- package/src/index.tsx +332 -211
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, {useState} from 'react';
|
|
2
2
|
import {useTranslation} from '../i18n';
|
|
3
3
|
import {
|
|
4
4
|
Pressable,
|
|
@@ -101,8 +101,8 @@ const getLogMessageWithBadges = (
|
|
|
101
101
|
style={[
|
|
102
102
|
styles.prefixTag,
|
|
103
103
|
{
|
|
104
|
-
backgroundColor: `${dec.color}
|
|
105
|
-
borderColor: `${dec.color}
|
|
104
|
+
backgroundColor: `${dec.color}14`,
|
|
105
|
+
borderColor: `${dec.color}33`,
|
|
106
106
|
},
|
|
107
107
|
]}>
|
|
108
108
|
<IconComp color={dec.color} size={10} />
|
|
@@ -141,6 +141,7 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({
|
|
|
141
141
|
}: ConsoleLogCardProps) {
|
|
142
142
|
const {setSelectedLog} = useInspector();
|
|
143
143
|
const {t} = useTranslation();
|
|
144
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
144
145
|
const jsonContent = getJsonContent(item.message);
|
|
145
146
|
const isAnalyticsError = item.message
|
|
146
147
|
.toLowerCase()
|
|
@@ -157,52 +158,52 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({
|
|
|
157
158
|
if (isAnalyticsError || type === 'error' || method === 'error') {
|
|
158
159
|
return {
|
|
159
160
|
border: AppColors.errorColor,
|
|
160
|
-
badgeBg: AppColors.
|
|
161
|
-
badgeText: AppColors.
|
|
161
|
+
badgeBg: `${AppColors.errorColor}18`,
|
|
162
|
+
badgeText: AppColors.errorColor,
|
|
162
163
|
label: 'ERROR',
|
|
163
|
-
cardBg:
|
|
164
|
-
methodBorder: AppColors.
|
|
165
|
-
methodBg: AppColors.
|
|
166
|
-
methodText: AppColors.
|
|
164
|
+
cardBg: '#FFF8F8',
|
|
165
|
+
methodBorder: `${AppColors.errorColor}30`,
|
|
166
|
+
methodBg: `${AppColors.errorColor}12`,
|
|
167
|
+
methodText: AppColors.errorColor,
|
|
167
168
|
textColor: AppColors.redErrorText,
|
|
168
169
|
};
|
|
169
170
|
}
|
|
170
171
|
if (type === 'warn' || method === 'warn') {
|
|
171
172
|
return {
|
|
172
173
|
border: AppColors.amber600,
|
|
173
|
-
badgeBg: AppColors.
|
|
174
|
-
badgeText: AppColors.
|
|
174
|
+
badgeBg: `${AppColors.amber600}18`,
|
|
175
|
+
badgeText: AppColors.amber800,
|
|
175
176
|
label: 'WARN',
|
|
176
|
-
cardBg:
|
|
177
|
-
methodBorder: AppColors.
|
|
178
|
-
methodBg: AppColors.
|
|
179
|
-
methodText: AppColors.
|
|
180
|
-
textColor: AppColors.
|
|
177
|
+
cardBg: '#FFFDF5',
|
|
178
|
+
methodBorder: `${AppColors.amber600}33`,
|
|
179
|
+
methodBg: `${AppColors.amber600}14`,
|
|
180
|
+
methodText: AppColors.amber800,
|
|
181
|
+
textColor: AppColors.amber800,
|
|
181
182
|
};
|
|
182
183
|
}
|
|
183
184
|
if (type === 'debug' || method === 'debug') {
|
|
184
185
|
return {
|
|
185
186
|
border: AppColors.purple500,
|
|
186
|
-
badgeBg: AppColors.
|
|
187
|
-
badgeText: AppColors.
|
|
187
|
+
badgeBg: `${AppColors.purple500}18`,
|
|
188
|
+
badgeText: AppColors.purple,
|
|
188
189
|
label: 'DEBUG',
|
|
189
|
-
cardBg:
|
|
190
|
-
methodBorder: AppColors.
|
|
191
|
-
methodBg: AppColors.
|
|
192
|
-
methodText: AppColors.
|
|
190
|
+
cardBg: '#FAF8FD',
|
|
191
|
+
methodBorder: `${AppColors.purple500}33`,
|
|
192
|
+
methodBg: `${AppColors.purple500}12`,
|
|
193
|
+
methodText: AppColors.purple,
|
|
193
194
|
textColor: AppColors.purpleText,
|
|
194
195
|
};
|
|
195
196
|
}
|
|
196
197
|
if (type === 'info' || method === 'info') {
|
|
197
198
|
return {
|
|
198
199
|
border: AppColors.sky500,
|
|
199
|
-
badgeBg: AppColors.
|
|
200
|
-
badgeText: AppColors.
|
|
200
|
+
badgeBg: `${AppColors.sky500}18`,
|
|
201
|
+
badgeText: AppColors.sky600,
|
|
201
202
|
label: 'INFO',
|
|
202
|
-
cardBg:
|
|
203
|
-
methodBorder: AppColors.
|
|
204
|
-
methodBg: AppColors.
|
|
205
|
-
methodText: AppColors.
|
|
203
|
+
cardBg: '#F8FAFC',
|
|
204
|
+
methodBorder: `${AppColors.sky500}33`,
|
|
205
|
+
methodBg: `${AppColors.sky500}12`,
|
|
206
|
+
methodText: AppColors.sky600,
|
|
206
207
|
textColor: AppColors.blue800,
|
|
207
208
|
};
|
|
208
209
|
}
|
|
@@ -210,10 +211,10 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({
|
|
|
210
211
|
// Default / Standard console.log
|
|
211
212
|
return {
|
|
212
213
|
border: AppColors.indigo500,
|
|
213
|
-
badgeBg: AppColors.
|
|
214
|
+
badgeBg: `${AppColors.indigo500}15`,
|
|
214
215
|
badgeText: AppColors.indigo600Alt,
|
|
215
216
|
label: 'LOG',
|
|
216
|
-
cardBg: AppColors.
|
|
217
|
+
cardBg: AppColors.white,
|
|
217
218
|
methodBorder: AppColors.dividerColor,
|
|
218
219
|
methodBg: AppColors.indigo50,
|
|
219
220
|
methodText: AppColors.indigo600Alt,
|
|
@@ -231,6 +232,11 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({
|
|
|
231
232
|
setSelectedLog(item);
|
|
232
233
|
};
|
|
233
234
|
|
|
235
|
+
const toggleExpand = (e?: any) => {
|
|
236
|
+
e?.stopPropagation?.();
|
|
237
|
+
setIsExpanded(prev => !prev);
|
|
238
|
+
};
|
|
239
|
+
|
|
234
240
|
return (
|
|
235
241
|
<View style={styles.container}>
|
|
236
242
|
<Pressable
|
|
@@ -244,6 +250,7 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({
|
|
|
244
250
|
},
|
|
245
251
|
pressed && styles.cardPressed,
|
|
246
252
|
]}>
|
|
253
|
+
{/* Header Row */}
|
|
247
254
|
<View style={styles.cardHeader}>
|
|
248
255
|
<View style={styles.headerLeft}>
|
|
249
256
|
<View style={[styles.typeChip, {backgroundColor: colors.badgeBg}]}>
|
|
@@ -275,12 +282,12 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({
|
|
|
275
282
|
style={[
|
|
276
283
|
styles.metaChip,
|
|
277
284
|
{
|
|
278
|
-
backgroundColor: AppColors.
|
|
279
|
-
borderColor: AppColors.
|
|
285
|
+
backgroundColor: `${AppColors.teal600}14`,
|
|
286
|
+
borderColor: `${AppColors.teal600}33`,
|
|
280
287
|
},
|
|
281
288
|
]}>
|
|
282
289
|
<Text
|
|
283
|
-
style={[styles.metaChipText, {color: AppColors.
|
|
290
|
+
style={[styles.metaChipText, {color: AppColors.teal600, fontFamily: AppFonts.interBold}]}>
|
|
284
291
|
{Array.isArray(jsonContent.data)
|
|
285
292
|
? `Array[${jsonContent.data.length}]`
|
|
286
293
|
: `Object{${Object.keys(jsonContent.data).length}}`}
|
|
@@ -312,6 +319,7 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({
|
|
|
312
319
|
</View>
|
|
313
320
|
</View>
|
|
314
321
|
|
|
322
|
+
{/* Body Content */}
|
|
315
323
|
<View style={styles.cardBody}>
|
|
316
324
|
{jsonContent ? (
|
|
317
325
|
<>
|
|
@@ -321,7 +329,7 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({
|
|
|
321
329
|
searchStr,
|
|
322
330
|
[styles.messageText, {color: AppColors.primaryBlack}],
|
|
323
331
|
styles.highlight,
|
|
324
|
-
2,
|
|
332
|
+
isExpanded ? undefined : 2,
|
|
325
333
|
)
|
|
326
334
|
) : null}
|
|
327
335
|
{jsonPreview && (
|
|
@@ -334,8 +342,23 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({
|
|
|
334
342
|
{color: AppColors.primaryBlack},
|
|
335
343
|
]}
|
|
336
344
|
detectLinks={false}
|
|
337
|
-
numberOfLines={
|
|
345
|
+
numberOfLines={isExpanded ? undefined : 4}
|
|
338
346
|
/>
|
|
347
|
+
{jsonPreview.text.split('\n').length > 4 && (
|
|
348
|
+
<Pressable
|
|
349
|
+
onPress={toggleExpand}
|
|
350
|
+
hitSlop={6}
|
|
351
|
+
style={styles.expandToggle}>
|
|
352
|
+
<Text style={styles.expandToggleText}>
|
|
353
|
+
{isExpanded ? 'Show less' : 'Show full preview'}
|
|
354
|
+
</Text>
|
|
355
|
+
<ChevronIcon
|
|
356
|
+
color={AppColors.purple}
|
|
357
|
+
size={11}
|
|
358
|
+
direction={isExpanded ? 'up' : 'down'}
|
|
359
|
+
/>
|
|
360
|
+
</Pressable>
|
|
361
|
+
)}
|
|
339
362
|
</View>
|
|
340
363
|
)}
|
|
341
364
|
</>
|
|
@@ -345,16 +368,17 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({
|
|
|
345
368
|
searchStr,
|
|
346
369
|
[styles.messageText, {color: AppColors.primaryBlack}],
|
|
347
370
|
styles.highlight,
|
|
348
|
-
|
|
371
|
+
isExpanded ? undefined : 4,
|
|
349
372
|
)
|
|
350
373
|
)}
|
|
351
374
|
</View>
|
|
352
375
|
|
|
376
|
+
{/* Footer Row */}
|
|
353
377
|
<View style={styles.cardFooter}>
|
|
354
378
|
<View style={styles.footerLeft}>
|
|
355
|
-
<Text style={styles.
|
|
379
|
+
<Text style={styles.footerId}>#{item.id + 1}</Text>
|
|
356
380
|
<View style={styles.footerDot} />
|
|
357
|
-
<Text style={styles.
|
|
381
|
+
<Text style={styles.footerTime}>{formatTime(item.timestamp)}</Text>
|
|
358
382
|
{parsedCaller && (
|
|
359
383
|
<>
|
|
360
384
|
<View style={styles.footerDot} />
|
|
@@ -364,57 +388,40 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({
|
|
|
364
388
|
openInVSCode(
|
|
365
389
|
parsedCaller.rawFilePath ||
|
|
366
390
|
parsedCaller.fullPath ||
|
|
367
|
-
|
|
391
|
+
parsedCaller.fileName,
|
|
368
392
|
parsedCaller.lineNumber,
|
|
369
393
|
parsedCaller.columnNumber,
|
|
370
394
|
);
|
|
371
395
|
}}
|
|
372
396
|
hitSlop={8}
|
|
373
|
-
style={
|
|
374
|
-
flexDirection: 'row',
|
|
375
|
-
alignItems: 'center',
|
|
376
|
-
gap: 4,
|
|
377
|
-
maxWidth: 185,
|
|
378
|
-
backgroundColor: `${AppColors.sky600}10`,
|
|
379
|
-
borderColor: `${AppColors.sky600}2B`,
|
|
380
|
-
borderWidth: 1,
|
|
381
|
-
borderRadius: 5,
|
|
382
|
-
paddingHorizontal: 5,
|
|
383
|
-
paddingVertical: 1.5,
|
|
384
|
-
}}>
|
|
397
|
+
style={styles.callerPill}>
|
|
385
398
|
{parsedCaller.fileExt && parsedCaller.fileExt !== 'other' && (
|
|
386
399
|
<View
|
|
387
|
-
style={
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
: `${AppColors.teal600}22`,
|
|
392
|
-
borderRadius: 3,
|
|
393
|
-
paddingHorizontal: 3.5,
|
|
394
|
-
paddingVertical: 0.5,
|
|
395
|
-
}}>
|
|
396
|
-
<Text
|
|
397
|
-
style={{
|
|
398
|
-
fontFamily: AppFonts.interBold,
|
|
399
|
-
fontSize: 8,
|
|
400
|
-
color:
|
|
400
|
+
style={[
|
|
401
|
+
styles.extBadge,
|
|
402
|
+
{
|
|
403
|
+
backgroundColor:
|
|
401
404
|
parsedCaller.fileExt === 'tsx' || parsedCaller.fileExt === 'ts'
|
|
402
|
-
? AppColors.brandPurple
|
|
403
|
-
: AppColors.teal600
|
|
404
|
-
}
|
|
405
|
+
? `${AppColors.brandPurple}22`
|
|
406
|
+
: `${AppColors.teal600}22`,
|
|
407
|
+
},
|
|
408
|
+
]}>
|
|
409
|
+
<Text
|
|
410
|
+
style={[
|
|
411
|
+
styles.extBadgeText,
|
|
412
|
+
{
|
|
413
|
+
color:
|
|
414
|
+
parsedCaller.fileExt === 'tsx' || parsedCaller.fileExt === 'ts'
|
|
415
|
+
? AppColors.brandPurple
|
|
416
|
+
: AppColors.teal600,
|
|
417
|
+
},
|
|
418
|
+
]}>
|
|
405
419
|
{parsedCaller.fileExt.toUpperCase()}
|
|
406
420
|
</Text>
|
|
407
421
|
</View>
|
|
408
422
|
)}
|
|
409
423
|
<Text
|
|
410
|
-
style={
|
|
411
|
-
styles.footerText,
|
|
412
|
-
{
|
|
413
|
-
fontFamily: AppFonts.interBold,
|
|
414
|
-
color: AppColors.sky600,
|
|
415
|
-
fontSize: 9.5,
|
|
416
|
-
},
|
|
417
|
-
]}
|
|
424
|
+
style={styles.callerFileName}
|
|
418
425
|
numberOfLines={1}
|
|
419
426
|
ellipsizeMode="middle">
|
|
420
427
|
{parsedCaller.fileName}
|
|
@@ -464,32 +471,34 @@ export const ConsoleLogCard = React.memo(function ConsoleLogCard({
|
|
|
464
471
|
|
|
465
472
|
const styles = StyleSheet.create({
|
|
466
473
|
container: {
|
|
467
|
-
paddingHorizontal:
|
|
468
|
-
paddingVertical:
|
|
474
|
+
paddingHorizontal: 10,
|
|
475
|
+
paddingVertical: 3.5,
|
|
469
476
|
},
|
|
470
477
|
card: {
|
|
471
478
|
alignSelf: 'stretch',
|
|
472
|
-
borderRadius:
|
|
479
|
+
borderRadius: 11,
|
|
473
480
|
borderWidth: 1,
|
|
474
481
|
borderColor: AppColors.grayBorderSecondary,
|
|
475
482
|
borderLeftWidth: 3.5,
|
|
476
|
-
|
|
477
|
-
|
|
483
|
+
paddingHorizontal: 12,
|
|
484
|
+
paddingTop: 10,
|
|
485
|
+
paddingBottom: 9,
|
|
486
|
+
backgroundColor: AppColors.white,
|
|
478
487
|
shadowColor: AppColors.black,
|
|
479
|
-
shadowOpacity: 0.
|
|
480
|
-
shadowRadius:
|
|
481
|
-
shadowOffset: {width: 0, height:
|
|
482
|
-
elevation:
|
|
488
|
+
shadowOpacity: 0.04,
|
|
489
|
+
shadowRadius: 3,
|
|
490
|
+
shadowOffset: {width: 0, height: 1.5},
|
|
491
|
+
elevation: 1.5,
|
|
483
492
|
},
|
|
484
493
|
cardPressed: {
|
|
485
|
-
opacity: 0.
|
|
486
|
-
transform: [{scale: 0.
|
|
494
|
+
opacity: 0.88,
|
|
495
|
+
transform: [{scale: 0.995}],
|
|
487
496
|
},
|
|
488
497
|
cardHeader: {
|
|
489
498
|
flexDirection: 'row',
|
|
490
499
|
justifyContent: 'space-between',
|
|
491
500
|
alignItems: 'center',
|
|
492
|
-
marginBottom:
|
|
501
|
+
marginBottom: 6,
|
|
493
502
|
gap: 8,
|
|
494
503
|
},
|
|
495
504
|
headerLeft: {
|
|
@@ -502,7 +511,7 @@ const styles = StyleSheet.create({
|
|
|
502
511
|
headerRight: {
|
|
503
512
|
flexDirection: 'row',
|
|
504
513
|
alignItems: 'center',
|
|
505
|
-
gap:
|
|
514
|
+
gap: 6,
|
|
506
515
|
},
|
|
507
516
|
typeChip: {
|
|
508
517
|
flexDirection: 'row',
|
|
@@ -524,7 +533,7 @@ const styles = StyleSheet.create({
|
|
|
524
533
|
},
|
|
525
534
|
metaChip: {
|
|
526
535
|
paddingHorizontal: 6,
|
|
527
|
-
paddingVertical: 2
|
|
536
|
+
paddingVertical: 2,
|
|
528
537
|
borderRadius: 6,
|
|
529
538
|
borderWidth: 1,
|
|
530
539
|
},
|
|
@@ -534,12 +543,7 @@ const styles = StyleSheet.create({
|
|
|
534
543
|
letterSpacing: 0.2,
|
|
535
544
|
},
|
|
536
545
|
cardBody: {
|
|
537
|
-
|
|
538
|
-
paddingHorizontal: 10,
|
|
539
|
-
paddingVertical: 8,
|
|
540
|
-
borderRadius: 9,
|
|
541
|
-
borderWidth: 1,
|
|
542
|
-
borderColor: AppColors.grayBorderSecondary,
|
|
546
|
+
paddingVertical: 2,
|
|
543
547
|
},
|
|
544
548
|
messageText: {
|
|
545
549
|
fontFamily: AppFonts.interMedium,
|
|
@@ -555,10 +559,11 @@ const styles = StyleSheet.create({
|
|
|
555
559
|
jsonPreviewContainer: {
|
|
556
560
|
marginTop: 6,
|
|
557
561
|
backgroundColor: AppColors.grayBackground,
|
|
558
|
-
borderRadius:
|
|
562
|
+
borderRadius: 8,
|
|
559
563
|
borderWidth: 1,
|
|
560
564
|
borderColor: AppColors.grayBorderSecondary,
|
|
561
|
-
|
|
565
|
+
paddingHorizontal: 9,
|
|
566
|
+
paddingVertical: 7,
|
|
562
567
|
},
|
|
563
568
|
jsonPreviewText: {
|
|
564
569
|
fontFamily: AppFonts.interRegular,
|
|
@@ -566,11 +571,29 @@ const styles = StyleSheet.create({
|
|
|
566
571
|
color: AppColors.primaryBlack,
|
|
567
572
|
lineHeight: 16,
|
|
568
573
|
},
|
|
574
|
+
expandToggle: {
|
|
575
|
+
flexDirection: 'row',
|
|
576
|
+
alignItems: 'center',
|
|
577
|
+
justifyContent: 'center',
|
|
578
|
+
gap: 4,
|
|
579
|
+
marginTop: 5,
|
|
580
|
+
paddingVertical: 2,
|
|
581
|
+
borderTopWidth: 1,
|
|
582
|
+
borderTopColor: AppColors.dividerColor,
|
|
583
|
+
},
|
|
584
|
+
expandToggleText: {
|
|
585
|
+
fontFamily: AppFonts.interBold,
|
|
586
|
+
fontSize: 10,
|
|
587
|
+
color: AppColors.purple,
|
|
588
|
+
},
|
|
569
589
|
cardFooter: {
|
|
570
590
|
flexDirection: 'row',
|
|
571
591
|
alignItems: 'center',
|
|
572
592
|
justifyContent: 'space-between',
|
|
573
|
-
marginTop:
|
|
593
|
+
marginTop: 7,
|
|
594
|
+
paddingTop: 6,
|
|
595
|
+
borderTopWidth: 1,
|
|
596
|
+
borderTopColor: `${AppColors.dividerColor}88`,
|
|
574
597
|
gap: 6,
|
|
575
598
|
},
|
|
576
599
|
footerLeft: {
|
|
@@ -592,14 +615,42 @@ const styles = StyleSheet.create({
|
|
|
592
615
|
backgroundColor: AppColors.grayTextWeak,
|
|
593
616
|
opacity: 0.6,
|
|
594
617
|
},
|
|
595
|
-
|
|
596
|
-
fontFamily: AppFonts.
|
|
618
|
+
footerId: {
|
|
619
|
+
fontFamily: AppFonts.interBold,
|
|
620
|
+
fontSize: 10,
|
|
621
|
+
color: AppColors.grayTextWeak,
|
|
622
|
+
},
|
|
623
|
+
footerTime: {
|
|
624
|
+
fontFamily: AppFonts.interMedium,
|
|
597
625
|
fontSize: 10,
|
|
598
626
|
color: AppColors.grayTextWeak,
|
|
599
627
|
letterSpacing: 0.1,
|
|
600
628
|
},
|
|
601
|
-
|
|
602
|
-
|
|
629
|
+
callerPill: {
|
|
630
|
+
flexDirection: 'row',
|
|
631
|
+
alignItems: 'center',
|
|
632
|
+
gap: 4,
|
|
633
|
+
maxWidth: 185,
|
|
634
|
+
backgroundColor: `${AppColors.sky600}10`,
|
|
635
|
+
borderColor: `${AppColors.sky600}2B`,
|
|
636
|
+
borderWidth: 1,
|
|
637
|
+
borderRadius: 5,
|
|
638
|
+
paddingHorizontal: 5,
|
|
639
|
+
paddingVertical: 1.5,
|
|
640
|
+
},
|
|
641
|
+
extBadge: {
|
|
642
|
+
borderRadius: 3,
|
|
643
|
+
paddingHorizontal: 3.5,
|
|
644
|
+
paddingVertical: 0.5,
|
|
645
|
+
},
|
|
646
|
+
extBadgeText: {
|
|
647
|
+
fontFamily: AppFonts.interBold,
|
|
648
|
+
fontSize: 8,
|
|
649
|
+
},
|
|
650
|
+
callerFileName: {
|
|
651
|
+
fontFamily: AppFonts.interBold,
|
|
652
|
+
color: AppColors.sky600,
|
|
653
|
+
fontSize: 9.5,
|
|
603
654
|
},
|
|
604
655
|
footerBadge: {
|
|
605
656
|
paddingHorizontal: 6,
|
|
@@ -74,19 +74,25 @@ const ConsoleTab = React.memo(() => {
|
|
|
74
74
|
!Array.from(logFilters).some(f => f !== 'all');
|
|
75
75
|
if (isAllSelected) {
|
|
76
76
|
return (
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
<View style={{paddingHorizontal: 12, paddingTop: 8, paddingBottom: 3}}>
|
|
78
|
+
<Text
|
|
79
|
+
style={{
|
|
80
|
+
fontFamily: AppFonts.interMedium,
|
|
81
|
+
fontSize: 11,
|
|
82
|
+
color: AppColors.grayTextWeak,
|
|
83
|
+
letterSpacing: 0.2,
|
|
84
|
+
}}>
|
|
85
|
+
{filtered === total
|
|
86
|
+
? `Showing ${total} logs`
|
|
87
|
+
: `Showing ${filtered} of ${total} logs`}
|
|
88
|
+
</Text>
|
|
89
|
+
</View>
|
|
84
90
|
);
|
|
85
91
|
} else {
|
|
86
92
|
const activeFilterNames = Array.from(logFilters)
|
|
87
93
|
.filter(f => f !== 'all')
|
|
88
94
|
.map(f => {
|
|
89
|
-
if (f === 'user-log') return '
|
|
95
|
+
if (f === 'user-log') return 'Log';
|
|
90
96
|
if (f === 'analytics') return 'Analytics';
|
|
91
97
|
return (
|
|
92
98
|
(f as string).charAt(0).toUpperCase() +
|
|
@@ -94,14 +100,17 @@ const ConsoleTab = React.memo(() => {
|
|
|
94
100
|
);
|
|
95
101
|
});
|
|
96
102
|
return (
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
<View style={{paddingHorizontal: 12, paddingTop: 8, paddingBottom: 3}}>
|
|
104
|
+
<Text
|
|
105
|
+
style={{
|
|
106
|
+
fontFamily: AppFonts.interMedium,
|
|
107
|
+
fontSize: 11,
|
|
108
|
+
color: AppColors.grayTextWeak,
|
|
109
|
+
letterSpacing: 0.2,
|
|
110
|
+
}}>
|
|
111
|
+
Filtered by {activeFilterNames.join(', ')} ({filtered} of {total} logs)
|
|
112
|
+
</Text>
|
|
113
|
+
</View>
|
|
105
114
|
);
|
|
106
115
|
}
|
|
107
116
|
}, [visibleConsoleLogs.length, filteredConsoleLogs.length, logFilters]);
|
|
@@ -684,7 +693,7 @@ const ConsoleTab = React.memo(() => {
|
|
|
684
693
|
ListEmptyComponent={
|
|
685
694
|
<EmptyState
|
|
686
695
|
isSearch={
|
|
687
|
-
logSearch.length > 0 || logFilters.
|
|
696
|
+
logSearch.length > 0 || !logFilters.has('all')
|
|
688
697
|
}
|
|
689
698
|
searchQuery={logSearch}
|
|
690
699
|
customTitle={
|
|
@@ -694,7 +703,7 @@ const ConsoleTab = React.memo(() => {
|
|
|
694
703
|
}
|
|
695
704
|
onClearSearch={() => {
|
|
696
705
|
setLogSearch('');
|
|
697
|
-
setLogFilters(new Set());
|
|
706
|
+
setLogFilters(new Set(['all']));
|
|
698
707
|
}}
|
|
699
708
|
/>
|
|
700
709
|
}
|
|
@@ -556,15 +556,29 @@ const CrashTab = React.memo(() => {
|
|
|
556
556
|
<View style={localStyles.emptyIconCircle}>
|
|
557
557
|
<ShieldAlertIcon size={38} color={AppColors.greenColor} />
|
|
558
558
|
</View>
|
|
559
|
-
<Text style={localStyles.emptyTitle}>
|
|
559
|
+
<Text style={localStyles.emptyTitle}>
|
|
560
|
+
{searchQuery.length > 0
|
|
561
|
+
? 'No matching crash entries'
|
|
562
|
+
: filterType !== 'all' || !isCrashFiltersDefault(crashFilters)
|
|
563
|
+
? 'No crashes match filters'
|
|
564
|
+
: t('crash.emptyTitle')}
|
|
565
|
+
</Text>
|
|
560
566
|
<Text style={localStyles.emptySub}>
|
|
561
567
|
{searchQuery
|
|
562
|
-
?
|
|
568
|
+
? `No crash entries matched "${searchQuery}"`
|
|
569
|
+
: filterType !== 'all' || !isCrashFiltersDefault(crashFilters)
|
|
570
|
+
? 'Try adjusting your filters or search keywords.'
|
|
563
571
|
: t('crash.emptySubtitle')}
|
|
564
572
|
</Text>
|
|
565
|
-
{searchQuery.length > 0
|
|
573
|
+
{(searchQuery.length > 0 ||
|
|
574
|
+
filterType !== 'all' ||
|
|
575
|
+
!isCrashFiltersDefault(crashFilters)) && (
|
|
566
576
|
<TouchableScale
|
|
567
|
-
onPress={() =>
|
|
577
|
+
onPress={() => {
|
|
578
|
+
setSearchQuery('');
|
|
579
|
+
setFilterType('all');
|
|
580
|
+
setCrashFilters(DEFAULT_CRASH_FILTERS);
|
|
581
|
+
}}
|
|
568
582
|
style={{
|
|
569
583
|
marginTop: 10,
|
|
570
584
|
paddingHorizontal: 14,
|
|
@@ -578,7 +592,7 @@ const CrashTab = React.memo(() => {
|
|
|
578
592
|
fontSize: 11.5,
|
|
579
593
|
color: AppColors.white,
|
|
580
594
|
}}>
|
|
581
|
-
Clear Search
|
|
595
|
+
Clear Search & Filters
|
|
582
596
|
</Text>
|
|
583
597
|
</TouchableScale>
|
|
584
598
|
)}
|