react-native-inapp-inspector 2.3.8 → 2.3.10
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/Inspector/AnalyticsTab.js +27 -2
- package/dist/commonjs/components/Inspector/BundleTab.js +3 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.js +24 -1
- package/dist/commonjs/components/Inspector/CrashTab.js +30 -1
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.d.ts +7 -0
- package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +111 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +225 -108
- package/dist/commonjs/components/Inspector/NetworkDetail.js +2 -1
- package/dist/commonjs/components/Inspector/NetworkFilterModal.d.ts +19 -0
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +648 -0
- package/dist/commonjs/components/Inspector/NetworkTab.js +89 -147
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +1 -1
- package/dist/commonjs/components/Inspector/PerformanceTab.js +3 -0
- package/dist/commonjs/components/Inspector/ReduxTab.js +24 -1
- package/dist/commonjs/components/Inspector/SettingsPanel.js +73 -88
- package/dist/commonjs/components/Inspector/StorageTab.js +37 -11
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -0
- package/dist/commonjs/components/LogCard.js +35 -26
- package/dist/commonjs/components/NetworkIcons.d.ts +1 -0
- package/dist/commonjs/components/NetworkIcons.js +6 -1
- package/dist/commonjs/constants/index.js +3 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/helpers/telemetry.js +34 -0
- package/dist/commonjs/index.js +3 -0
- package/dist/commonjs/styles/index.d.ts +11 -0
- package/dist/commonjs/styles/index.js +20 -5
- package/dist/commonjs/types/enums.d.ts +3 -0
- package/dist/commonjs/types/enums.js +3 -0
- package/dist/esm/components/Inspector/AnalyticsTab.js +29 -4
- package/dist/esm/components/Inspector/BundleTab.js +3 -0
- package/dist/esm/components/Inspector/ConsoleTab.js +26 -3
- package/dist/esm/components/Inspector/CrashTab.js +32 -3
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.d.ts +7 -0
- package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +74 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +226 -109
- package/dist/esm/components/Inspector/NetworkDetail.js +2 -1
- package/dist/esm/components/Inspector/NetworkFilterModal.d.ts +19 -0
- package/dist/esm/components/Inspector/NetworkFilterModal.js +607 -0
- package/dist/esm/components/Inspector/NetworkTab.js +91 -149
- package/dist/esm/components/Inspector/NpmUpdateToast.js +1 -1
- package/dist/esm/components/Inspector/PerformanceTab.js +3 -0
- package/dist/esm/components/Inspector/ReduxTab.js +26 -3
- package/dist/esm/components/Inspector/SettingsPanel.js +73 -88
- package/dist/esm/components/Inspector/StorageTab.js +39 -13
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +2 -0
- package/dist/esm/components/LogCard.js +36 -27
- package/dist/esm/components/NetworkIcons.d.ts +1 -0
- package/dist/esm/components/NetworkIcons.js +4 -0
- package/dist/esm/constants/index.js +3 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/helpers/telemetry.js +34 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/styles/index.d.ts +11 -0
- package/dist/esm/styles/index.js +20 -5
- package/dist/esm/types/enums.d.ts +3 -0
- package/dist/esm/types/enums.js +3 -0
- package/package.json +2 -2
- package/src/components/Inspector/AnalyticsTab.tsx +71 -43
- package/src/components/Inspector/BundleTab.tsx +3 -0
- package/src/components/Inspector/ConsoleTab.tsx +28 -1
- package/src/components/Inspector/CrashTab.tsx +45 -14
- package/src/components/Inspector/FeatureUnderDevNotice.tsx +94 -0
- package/src/components/Inspector/InspectorHeader.tsx +257 -115
- package/src/components/Inspector/NetworkDetail.tsx +2 -1
- package/src/components/Inspector/NetworkFilterModal.tsx +710 -0
- package/src/components/Inspector/NetworkTab.tsx +127 -204
- package/src/components/Inspector/NpmUpdateToast.tsx +1 -1
- package/src/components/Inspector/PerformanceTab.tsx +3 -0
- package/src/components/Inspector/ReduxTab.tsx +28 -1
- package/src/components/Inspector/SettingsPanel.tsx +93 -132
- package/src/components/Inspector/StorageTab.tsx +56 -27
- package/src/components/Inspector/UpdateAvailableModal.tsx +2 -0
- package/src/components/LogCard.tsx +43 -31
- package/src/components/NetworkIcons.tsx +27 -0
- package/src/constants/index.ts +3 -0
- package/src/constants/version.ts +1 -1
- package/src/helpers/telemetry.ts +36 -0
- package/src/index.tsx +5 -0
- package/src/styles/index.ts +20 -5
- package/src/types/enums.ts +3 -0
|
@@ -236,29 +236,6 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
|
|
|
236
236
|
GQL
|
|
237
237
|
</react_native_1.Text>
|
|
238
238
|
</react_native_1.View>)}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
{item.duration != null && !isFailed && (<react_native_1.View style={[
|
|
242
|
-
styles_1.default.chip,
|
|
243
|
-
{
|
|
244
|
-
backgroundColor: `${durationColor}12`,
|
|
245
|
-
borderColor: `${durationColor}2E`,
|
|
246
|
-
paddingHorizontal: 4.5,
|
|
247
|
-
paddingVertical: 1,
|
|
248
|
-
borderRadius: 4,
|
|
249
|
-
},
|
|
250
|
-
]}>
|
|
251
|
-
<react_native_1.Text style={[
|
|
252
|
-
styles_1.default.chipText,
|
|
253
|
-
{
|
|
254
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
255
|
-
fontSize: 8.5,
|
|
256
|
-
color: durationColor,
|
|
257
|
-
},
|
|
258
|
-
]}>
|
|
259
|
-
{item.duration}ms
|
|
260
|
-
</react_native_1.Text>
|
|
261
|
-
</react_native_1.View>)}
|
|
262
239
|
</react_native_1.View>
|
|
263
240
|
|
|
264
241
|
<react_native_1.View style={[
|
|
@@ -277,6 +254,7 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
|
|
|
277
254
|
: isLoading
|
|
278
255
|
? `${AppColors_1.AppColors.darkOrange}30`
|
|
279
256
|
: `${statusColor}30`,
|
|
257
|
+
flexShrink: 0,
|
|
280
258
|
},
|
|
281
259
|
]}>
|
|
282
260
|
{renderStatusIcon()}
|
|
@@ -310,6 +288,7 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
|
|
|
310
288
|
alignItems: 'center',
|
|
311
289
|
justifyContent: 'center',
|
|
312
290
|
marginRight: 4,
|
|
291
|
+
flexShrink: 0,
|
|
313
292
|
}}>
|
|
314
293
|
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.skyBlue} size={11}/>
|
|
315
294
|
</react_native_1.View>
|
|
@@ -348,9 +327,39 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
|
|
|
348
327
|
|
|
349
328
|
|
|
350
329
|
<react_native_1.View style={styles_1.default.cardFooterRow}>
|
|
351
|
-
<react_native_1.View style={
|
|
352
|
-
<
|
|
353
|
-
|
|
330
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, flex: 1, minWidth: 0, marginRight: 8 }}>
|
|
331
|
+
<react_native_1.View style={[styles_1.default.cardDateRow, { flexShrink: 0 }]}>
|
|
332
|
+
<NetworkIcons_1.CalendarIcon color={AppColors_1.AppColors.grayTextWeak} size={10}/>
|
|
333
|
+
<react_native_1.Text style={styles_1.default.cardDateText}>{triggeredAt}</react_native_1.Text>
|
|
334
|
+
</react_native_1.View>
|
|
335
|
+
|
|
336
|
+
{item.caller && item.caller !== 'Unknown' && (<react_native_1.View style={[
|
|
337
|
+
styles_1.default.chip,
|
|
338
|
+
{
|
|
339
|
+
flexDirection: 'row',
|
|
340
|
+
alignItems: 'center',
|
|
341
|
+
gap: 3,
|
|
342
|
+
backgroundColor: `${AppColors_1.AppColors.skyBlue}14`,
|
|
343
|
+
borderColor: `${AppColors_1.AppColors.skyBlue}30`,
|
|
344
|
+
paddingHorizontal: 5,
|
|
345
|
+
paddingVertical: 1,
|
|
346
|
+
borderRadius: 4,
|
|
347
|
+
flexShrink: 1,
|
|
348
|
+
minWidth: 0,
|
|
349
|
+
},
|
|
350
|
+
]}>
|
|
351
|
+
<NetworkIcons_1.PinIcon color={AppColors_1.AppColors.skyBlue} size={8.5}/>
|
|
352
|
+
<react_native_1.Text style={[
|
|
353
|
+
styles_1.default.chipText,
|
|
354
|
+
{
|
|
355
|
+
color: AppColors_1.AppColors.skyBlue,
|
|
356
|
+
fontSize: 8.5,
|
|
357
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
358
|
+
},
|
|
359
|
+
]} numberOfLines={1} ellipsizeMode="middle">
|
|
360
|
+
{item.caller}
|
|
361
|
+
</react_native_1.Text>
|
|
362
|
+
</react_native_1.View>)}
|
|
354
363
|
</react_native_1.View>
|
|
355
364
|
|
|
356
365
|
<react_native_1.View style={styles_1.default.cardFooterRight}>
|
|
@@ -133,3 +133,4 @@ export declare const ShieldCheckIcon: ({ color, size, }: IconProps) => React.JSX
|
|
|
133
133
|
export declare const DatabaseIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
134
134
|
export declare const PencilIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
135
135
|
export declare const PlusIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
136
|
+
export declare const LockIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
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.CircleAlertIcon = exports.CircleXIcon = exports.CircleCheckIcon = 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
40
|
exports.DiagnosticsIcon = exports.StackTraceIcon = exports.LayoutIcon = exports.ChipIcon = exports.SkullIcon = exports.ShieldAlertIcon = exports.CrashIcon = exports.UserCheckIcon = exports.TargetGoalIcon = exports.RepeatIcon = exports.PinIcon = exports.HourglassIcon = exports.FlameIcon = exports.CodeBracketsIcon = exports.AndroidIcon = exports.AppleIcon = exports.LinkChainIcon = exports.GitHubIcon = exports.PackageBoxIcon = exports.ExternalLinkIcon = exports.MoneyIcon = exports.CartIcon = exports.TextAaIcon = exports.BrainIcon = exports.AtomIcon = exports.MapIcon = exports.SparkleIcon = exports.LightbulbIcon = exports.DocIcon = exports.FolderOpenIcon = exports.BanIcon = exports.BoltIcon = exports.PerformanceIcon = exports.ReduxIcon = exports.MetadataIcon = exports.StorageIcon = exports.RefreshCcwIcon = exports.TimelineIcon = exports.LiveStateIcon = exports.BundleIcon = exports.ForwardChevronIcon = exports.PackageIcon = exports.TableIcon = exports.RawIcon = exports.PrettyIcon = exports.SortIcon = exports.MotionIcon = exports.TrendingUpIcon = exports.ErrorCircleIcon = exports.WarningTriangleIcon = void 0;
|
|
41
|
-
exports.PlusIcon = exports.PencilIcon = exports.DatabaseIcon = exports.ShieldCheckIcon = exports.WifiIcon = exports.CpuIcon = exports.ChevronDownIcon = exports.ResetIcon = exports.NpmIcon = exports.TagIcon = exports.BugIcon = exports.AlertTriangleIcon = exports.SmartphoneIcon = exports.KeyIcon = exports.BarChartIcon = exports.DiceIcon = exports.ZapIcon = exports.FlaskIcon = exports.LoadingSpinnerIcon = exports.ListenerIcon = exports.AllFramesIcon = exports.AppFramesIcon = exports.RawJsonIcon = exports.TrailIcon = void 0;
|
|
41
|
+
exports.LockIcon = exports.PlusIcon = exports.PencilIcon = exports.DatabaseIcon = exports.ShieldCheckIcon = exports.WifiIcon = exports.CpuIcon = exports.ChevronDownIcon = exports.ResetIcon = exports.NpmIcon = exports.TagIcon = exports.BugIcon = exports.AlertTriangleIcon = exports.SmartphoneIcon = exports.KeyIcon = exports.BarChartIcon = exports.DiceIcon = exports.ZapIcon = exports.FlaskIcon = exports.LoadingSpinnerIcon = exports.ListenerIcon = exports.AllFramesIcon = exports.AppFramesIcon = exports.RawJsonIcon = exports.TrailIcon = void 0;
|
|
42
42
|
const react_1 = __importDefault(require("react"));
|
|
43
43
|
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
44
44
|
const AppColors_1 = require("../styles/AppColors");
|
|
@@ -894,3 +894,8 @@ const PlusIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) =>
|
|
|
894
894
|
<react_native_svg_1.Path d="M12 5v14M5 12h14" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
895
895
|
</react_native_svg_1.default>);
|
|
896
896
|
exports.PlusIcon = PlusIcon;
|
|
897
|
+
const LockIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
898
|
+
<react_native_svg_1.Rect x="3" y="11" width="18" height="11" rx="2" ry="2" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
899
|
+
<react_native_svg_1.Path d="M7 11V7a5 5 0 0 1 10 0v4" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
900
|
+
</react_native_svg_1.default>);
|
|
901
|
+
exports.LockIcon = LockIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "2.3.
|
|
1
|
+
export declare const LIB_VERSION = "2.3.10";
|
|
@@ -83,6 +83,36 @@ async function getOrCreateClientId() {
|
|
|
83
83
|
return `${Math.floor(100000000 + Math.random() * 900000000)}.${Math.floor(1000000000 + Math.random() * 9000000000)}`;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
function isDeviceEmulator() {
|
|
87
|
+
try {
|
|
88
|
+
if (react_native_1.Platform.OS === 'android') {
|
|
89
|
+
const c = react_native_1.Platform.constants || {};
|
|
90
|
+
const model = String(c.Model || '').toLowerCase();
|
|
91
|
+
const brand = String(c.Brand || '').toLowerCase();
|
|
92
|
+
const fingerprint = String(c.Fingerprint || '').toLowerCase();
|
|
93
|
+
const hardware = String(c.Hardware || '').toLowerCase();
|
|
94
|
+
const manufacturer = String(c.Manufacturer || '').toLowerCase();
|
|
95
|
+
return (model.includes('emulator') ||
|
|
96
|
+
model.includes('sdk') ||
|
|
97
|
+
model.includes('google_sdk') ||
|
|
98
|
+
model.includes('vbox') ||
|
|
99
|
+
brand.includes('generic') ||
|
|
100
|
+
fingerprint.startsWith('generic') ||
|
|
101
|
+
hardware.includes('goldfish') ||
|
|
102
|
+
hardware.includes('ranchu') ||
|
|
103
|
+
manufacturer.includes('genymotion'));
|
|
104
|
+
}
|
|
105
|
+
if (react_native_1.Platform.OS === 'ios') {
|
|
106
|
+
const c = react_native_1.Platform.constants || {};
|
|
107
|
+
const model = String(c.Model || '').toLowerCase();
|
|
108
|
+
return model.includes('simulator') || Boolean(c.isSimulator);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
86
116
|
function getSystemMetadata(environment) {
|
|
87
117
|
const rnConstants = react_native_1.Platform.constants;
|
|
88
118
|
const rnVersion = rnConstants?.reactNativeVersion
|
|
@@ -91,6 +121,7 @@ function getSystemMetadata(environment) {
|
|
|
91
121
|
const isHermes = Boolean(typeof global.HermesInternal === 'object' && global.HermesInternal !== null);
|
|
92
122
|
const isFabric = Boolean(global?.nativeFabricUIManager !== undefined);
|
|
93
123
|
const isDev = Boolean(typeof __DEV__ !== 'undefined' && __DEV__);
|
|
124
|
+
const isEmulator = isDeviceEmulator();
|
|
94
125
|
return {
|
|
95
126
|
lib_version: version_1.LIB_VERSION,
|
|
96
127
|
platform: react_native_1.Platform.OS,
|
|
@@ -99,6 +130,9 @@ function getSystemMetadata(environment) {
|
|
|
99
130
|
is_hermes: isHermes,
|
|
100
131
|
is_fabric: isFabric,
|
|
101
132
|
is_dev: isDev,
|
|
133
|
+
is_emulator: isEmulator,
|
|
134
|
+
device_type: isEmulator ? 'emulator' : 'real_device',
|
|
135
|
+
app_mode: isDev ? 'local_mode' : 'bundled_application',
|
|
102
136
|
environment: environment || (isDev ? 'DEV' : 'PROD'),
|
|
103
137
|
engagement_time_msec: 1000,
|
|
104
138
|
};
|
package/dist/commonjs/index.js
CHANGED
|
@@ -403,6 +403,9 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, appIcon, env
|
|
|
403
403
|
return false;
|
|
404
404
|
}, [latestNpmVersion]);
|
|
405
405
|
(0, react_1.useEffect)(() => {
|
|
406
|
+
if (typeof __DEV__ === 'undefined' || !__DEV__) {
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
406
409
|
let cancelled = false;
|
|
407
410
|
fetch('https://registry.npmjs.org/react-native-inapp-inspector/latest')
|
|
408
411
|
.then(res => (res.ok ? res.json() : null))
|
|
@@ -603,6 +603,7 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
603
603
|
alignItems: string;
|
|
604
604
|
justifyContent: string;
|
|
605
605
|
marginBottom: number;
|
|
606
|
+
minHeight: number;
|
|
606
607
|
};
|
|
607
608
|
cardHeaderLeft: {
|
|
608
609
|
flexDirection: string;
|
|
@@ -610,11 +611,13 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
610
611
|
flex: number;
|
|
611
612
|
marginRight: number;
|
|
612
613
|
gap: number;
|
|
614
|
+
minWidth: number;
|
|
613
615
|
};
|
|
614
616
|
cardHeaderRight: {
|
|
615
617
|
flexDirection: string;
|
|
616
618
|
alignItems: string;
|
|
617
619
|
gap: number;
|
|
620
|
+
flexShrink: number;
|
|
618
621
|
};
|
|
619
622
|
smallCheckbox: {
|
|
620
623
|
width: number;
|
|
@@ -701,6 +704,7 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
701
704
|
flexDirection: string;
|
|
702
705
|
alignItems: string;
|
|
703
706
|
flex: number;
|
|
707
|
+
minWidth: number;
|
|
704
708
|
gap: number;
|
|
705
709
|
};
|
|
706
710
|
slugTag: {
|
|
@@ -713,6 +717,7 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
713
717
|
paddingVertical: number;
|
|
714
718
|
borderRadius: number;
|
|
715
719
|
marginTop: number;
|
|
720
|
+
flexShrink: number;
|
|
716
721
|
};
|
|
717
722
|
slugText: {
|
|
718
723
|
fontFamily: string;
|
|
@@ -725,17 +730,20 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
725
730
|
flexDirection: string;
|
|
726
731
|
alignItems: string;
|
|
727
732
|
gap: number;
|
|
733
|
+
flexShrink: number;
|
|
728
734
|
};
|
|
729
735
|
cardFooterRow: {
|
|
730
736
|
flexDirection: string;
|
|
731
737
|
alignItems: string;
|
|
732
738
|
justifyContent: string;
|
|
733
739
|
marginTop: number;
|
|
740
|
+
minHeight: number;
|
|
734
741
|
};
|
|
735
742
|
cardDateRow: {
|
|
736
743
|
flexDirection: string;
|
|
737
744
|
alignItems: string;
|
|
738
745
|
gap: number;
|
|
746
|
+
flexShrink: number;
|
|
739
747
|
};
|
|
740
748
|
cardDateText: {
|
|
741
749
|
fontFamily: string;
|
|
@@ -747,6 +755,7 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
747
755
|
flexDirection: string;
|
|
748
756
|
alignItems: string;
|
|
749
757
|
gap: number;
|
|
758
|
+
flexShrink: number;
|
|
750
759
|
};
|
|
751
760
|
chip: {
|
|
752
761
|
flexDirection: string;
|
|
@@ -848,11 +857,13 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
|
|
|
848
857
|
alignItems: string;
|
|
849
858
|
justifyContent: string;
|
|
850
859
|
paddingBottom: number;
|
|
860
|
+
gap: number;
|
|
851
861
|
};
|
|
852
862
|
detailInfoRight: {
|
|
853
863
|
flexDirection: string;
|
|
854
864
|
alignItems: string;
|
|
855
865
|
gap: number;
|
|
866
|
+
flexShrink: number;
|
|
856
867
|
};
|
|
857
868
|
metaContainer: {
|
|
858
869
|
backgroundColor: string;
|
|
@@ -594,18 +594,21 @@ const getRawStyles = (colors) => ({
|
|
|
594
594
|
alignItems: 'center',
|
|
595
595
|
justifyContent: 'space-between',
|
|
596
596
|
marginBottom: 4,
|
|
597
|
+
minHeight: 22,
|
|
597
598
|
},
|
|
598
599
|
cardHeaderLeft: {
|
|
599
600
|
flexDirection: 'row',
|
|
600
601
|
alignItems: 'center',
|
|
601
602
|
flex: 1,
|
|
602
|
-
marginRight:
|
|
603
|
-
gap:
|
|
603
|
+
marginRight: 6,
|
|
604
|
+
gap: 5,
|
|
605
|
+
minWidth: 0,
|
|
604
606
|
},
|
|
605
607
|
cardHeaderRight: {
|
|
606
608
|
flexDirection: 'row',
|
|
607
609
|
alignItems: 'center',
|
|
608
610
|
gap: 5,
|
|
611
|
+
flexShrink: 0,
|
|
609
612
|
},
|
|
610
613
|
smallCheckbox: {
|
|
611
614
|
width: 15,
|
|
@@ -686,6 +689,7 @@ const getRawStyles = (colors) => ({
|
|
|
686
689
|
flexDirection: 'row',
|
|
687
690
|
alignItems: 'flex-start',
|
|
688
691
|
flex: 1,
|
|
692
|
+
minWidth: 0,
|
|
689
693
|
gap: 6,
|
|
690
694
|
},
|
|
691
695
|
slugTag: {
|
|
@@ -698,6 +702,7 @@ const getRawStyles = (colors) => ({
|
|
|
698
702
|
paddingVertical: 1.5,
|
|
699
703
|
borderRadius: 4,
|
|
700
704
|
marginTop: 1,
|
|
705
|
+
flexShrink: 0,
|
|
701
706
|
},
|
|
702
707
|
slugText: {
|
|
703
708
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
@@ -710,17 +715,20 @@ const getRawStyles = (colors) => ({
|
|
|
710
715
|
flexDirection: 'row',
|
|
711
716
|
alignItems: 'center',
|
|
712
717
|
gap: 4,
|
|
718
|
+
flexShrink: 0,
|
|
713
719
|
},
|
|
714
720
|
cardFooterRow: {
|
|
715
721
|
flexDirection: 'row',
|
|
716
722
|
alignItems: 'center',
|
|
717
723
|
justifyContent: 'space-between',
|
|
718
|
-
marginTop:
|
|
724
|
+
marginTop: 4,
|
|
725
|
+
minHeight: 18,
|
|
719
726
|
},
|
|
720
727
|
cardDateRow: {
|
|
721
728
|
flexDirection: 'row',
|
|
722
729
|
alignItems: 'center',
|
|
723
730
|
gap: 3.5,
|
|
731
|
+
flexShrink: 0,
|
|
724
732
|
},
|
|
725
733
|
cardDateText: {
|
|
726
734
|
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
@@ -732,6 +740,7 @@ const getRawStyles = (colors) => ({
|
|
|
732
740
|
flexDirection: 'row',
|
|
733
741
|
alignItems: 'center',
|
|
734
742
|
gap: 5,
|
|
743
|
+
flexShrink: 0,
|
|
735
744
|
},
|
|
736
745
|
chip: {
|
|
737
746
|
flexDirection: 'row',
|
|
@@ -823,9 +832,15 @@ const getRawStyles = (colors) => ({
|
|
|
823
832
|
flexDirection: 'row',
|
|
824
833
|
alignItems: 'center',
|
|
825
834
|
justifyContent: 'space-between',
|
|
826
|
-
paddingBottom:
|
|
835
|
+
paddingBottom: 8,
|
|
836
|
+
gap: 8,
|
|
837
|
+
},
|
|
838
|
+
detailInfoRight: {
|
|
839
|
+
flexDirection: 'row',
|
|
840
|
+
alignItems: 'center',
|
|
841
|
+
gap: 5,
|
|
842
|
+
flexShrink: 0,
|
|
827
843
|
},
|
|
828
|
-
detailInfoRight: { flexDirection: 'row', alignItems: 'center', gap: 6 },
|
|
829
844
|
metaContainer: {
|
|
830
845
|
backgroundColor: colors.primaryLight,
|
|
831
846
|
borderWidth: 1,
|
|
@@ -17,6 +17,9 @@ export declare const Method: {
|
|
|
17
17
|
readonly Put: "PUT";
|
|
18
18
|
readonly Patch: "PATCH";
|
|
19
19
|
readonly Delete: "DELETE";
|
|
20
|
+
readonly Query: "QUERY";
|
|
21
|
+
readonly Options: "OPTIONS";
|
|
22
|
+
readonly Head: "HEAD";
|
|
20
23
|
};
|
|
21
24
|
export type Method = (typeof Method)[keyof typeof Method];
|
|
22
25
|
export declare const StatusFilter: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback, useState, useMemo, useEffect } from 'react';
|
|
1
|
+
import React, { useCallback, useState, useMemo, useEffect, useRef } from 'react';
|
|
2
2
|
import { FlatList, Pressable, Text, TextInput, TouchableOpacity, View, } from 'react-native';
|
|
3
3
|
import { animateNextLayout, useInspector } from './InspectorContext';
|
|
4
4
|
import AnalyticsEventCard from '../AnalyticsEventCard';
|
|
@@ -13,7 +13,7 @@ import Svg, { Path, Rect, Line, Circle, G, Defs, LinearGradient as SvgLinearGrad
|
|
|
13
13
|
import TouchableScale from '../TouchableScale';
|
|
14
14
|
import { getCurrentUserId, getCurrentUserProperties, getDefaultEventParameters, getCollectionEnabled, } from '../../customHooks/analyticsLogger';
|
|
15
15
|
import { getEventCategory, } from '../../helpers';
|
|
16
|
-
import { LayersIcon, SearchIcon, ClearIcon, TrashIcon, HeaderPauseIcon, FilterIcon, CartIcon, GlobeIcon, BoltIcon, SparkleIcon, PinIcon, MoneyIcon, } from '../NetworkIcons';
|
|
16
|
+
import { LayersIcon, SearchIcon, ClearIcon, TrashIcon, HeaderPauseIcon, FilterIcon, CartIcon, GlobeIcon, BoltIcon, SparkleIcon, PinIcon, MoneyIcon, ChevronIcon, } from '../NetworkIcons';
|
|
17
17
|
const AnalyticsHeader = React.memo(() => {
|
|
18
18
|
const { t } = useTranslation();
|
|
19
19
|
const { analyticsEvents, filteredAnalyticsEvents, analyticsFilters, setAnalyticsFilters, analyticsHeaderExpanded, setAnalyticsHeaderExpanded, } = useInspector();
|
|
@@ -795,6 +795,7 @@ const AnalyticsHeader = React.memo(() => {
|
|
|
795
795
|
const AnalyticsTab = React.memo(() => {
|
|
796
796
|
const { t } = useTranslation();
|
|
797
797
|
const { filteredAnalyticsEvents, analyticsSearch, setAnalyticsSearch, handleDelete, selectedEvent, setSelectedEvent, newEventIds, logRouteMapRef, isAnalyticsLayoutReady, setIsAnalyticsLayoutReady, isAnalyticsPaused, setIsAnalyticsPaused, isAnalyticsFilterApplied, } = useInspector();
|
|
798
|
+
const listRef = useRef(null);
|
|
798
799
|
const [isFilterModalOpen, setIsFilterModalOpen] = useState(false);
|
|
799
800
|
const keyExtractor = useCallback((item, index) => item?.id?.toString() ?? index.toString(), []);
|
|
800
801
|
const renderItem = useCallback(({ item, index }) => {
|
|
@@ -922,7 +923,8 @@ const AnalyticsTab = React.memo(() => {
|
|
|
922
923
|
<AnalyticsFilterModal visible={isFilterModalOpen} onClose={() => setIsFilterModalOpen(false)}/>
|
|
923
924
|
|
|
924
925
|
<View style={{ flex: 1 }} onLayout={() => setIsAnalyticsLayoutReady(true)}>
|
|
925
|
-
{isAnalyticsLayoutReady ? (
|
|
926
|
+
{isAnalyticsLayoutReady ? (<>
|
|
927
|
+
<FlatList ref={listRef} data={filteredAnalyticsEvents} keyExtractor={keyExtractor} ListHeaderComponent={AnalyticsHeader} renderItem={renderItem} initialNumToRender={12} maxToRenderPerBatch={8} windowSize={5} removeClippedSubviews={true} renderToHardwareTextureAndroid={true} ListEmptyComponent={<EmptyState isSearch={analyticsSearch.length > 0} searchQuery={analyticsSearch} customTitle={analyticsSearch.length > 0
|
|
926
928
|
? 'No matching analytics events'
|
|
927
929
|
: 'No analytics events yet'} customSub={analyticsSearch.length > 0
|
|
928
930
|
? `No events matched "${analyticsSearch}"`
|
|
@@ -931,7 +933,30 @@ const AnalyticsTab = React.memo(() => {
|
|
|
931
933
|
filteredAnalyticsEvents.length === 0 && {
|
|
932
934
|
flexGrow: 1,
|
|
933
935
|
},
|
|
934
|
-
]} keyboardShouldPersistTaps="handled"/>
|
|
936
|
+
]} keyboardShouldPersistTaps="handled"/>
|
|
937
|
+
|
|
938
|
+
<TouchableScale onPress={() => {
|
|
939
|
+
try {
|
|
940
|
+
listRef.current?.scrollToOffset({
|
|
941
|
+
offset: 0,
|
|
942
|
+
animated: true,
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
catch {
|
|
946
|
+
try {
|
|
947
|
+
listRef.current?.scrollToIndex({
|
|
948
|
+
index: 0,
|
|
949
|
+
animated: true,
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
catch { }
|
|
953
|
+
}
|
|
954
|
+
}} hitSlop={12} style={styles.scrollTopBtn}>
|
|
955
|
+
<View style={{ transform: [{ rotate: '180deg' }] }}>
|
|
956
|
+
<ChevronIcon color={AppColors.white} size={18}/>
|
|
957
|
+
</View>
|
|
958
|
+
</TouchableScale>
|
|
959
|
+
</>) : null}
|
|
935
960
|
</View>
|
|
936
961
|
</>);
|
|
937
962
|
});
|
|
@@ -4,6 +4,7 @@ import { useTranslation, t } from '../../i18n';
|
|
|
4
4
|
import TouchableScale from '../TouchableScale';
|
|
5
5
|
import CopyButton from '../CopyButton';
|
|
6
6
|
import HighlightText from '../HighlightText';
|
|
7
|
+
import FeatureUnderDevNotice from './FeatureUnderDevNotice';
|
|
7
8
|
import { AppColors } from '../../styles/AppColors';
|
|
8
9
|
import { AppFonts } from '../../styles/AppFonts';
|
|
9
10
|
import { copyToClipboard } from '../../helpers';
|
|
@@ -788,6 +789,8 @@ const BundleTab = React.memo(() => {
|
|
|
788
789
|
</TouchableScale>
|
|
789
790
|
</View>
|
|
790
791
|
|
|
792
|
+
<FeatureUnderDevNotice featureName="Metro Bundle Analyzer"/>
|
|
793
|
+
|
|
791
794
|
|
|
792
795
|
|
|
793
796
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback, useMemo } from 'react';
|
|
1
|
+
import React, { useCallback, useMemo, useRef } from 'react';
|
|
2
2
|
import { FlatList, Pressable, ScrollView, Text, TextInput, View, } from 'react-native';
|
|
3
3
|
import { useInspector } from './InspectorContext';
|
|
4
4
|
import { useTranslation } from '../../i18n';
|
|
@@ -10,10 +10,11 @@ import EndOfListFooter from '../EndOfListFooter';
|
|
|
10
10
|
import styles from '../../styles';
|
|
11
11
|
import { AppColors } from '../../styles/AppColors';
|
|
12
12
|
import { AppFonts } from '../../styles/AppFonts';
|
|
13
|
-
import { SearchIcon, ClearIcon, SortArrowIcon, TrashIcon, LayersIcon, UserIcon, InfoCircleIcon, WarningTriangleIcon, ErrorCircleIcon, AnalyticsIcon, HeaderPauseIcon, } from '../NetworkIcons';
|
|
13
|
+
import { SearchIcon, ClearIcon, SortArrowIcon, TrashIcon, LayersIcon, UserIcon, InfoCircleIcon, WarningTriangleIcon, ErrorCircleIcon, AnalyticsIcon, HeaderPauseIcon, ChevronIcon, } from '../NetworkIcons';
|
|
14
14
|
const ConsoleTab = React.memo(() => {
|
|
15
15
|
const { t } = useTranslation();
|
|
16
16
|
const { logSearch, setLogSearch, logSortOrder, setLogSortOrder, handleDelete, logFilters, setLogFilters, logCounts, filteredConsoleLogs, visibleConsoleLogs, isConsolePaused, setIsConsolePaused, } = useInspector();
|
|
17
|
+
const listRef = useRef(null);
|
|
17
18
|
const renderItem = useCallback(({ item, index }) => (<AnimatedEntrance index={index} distance={8}>
|
|
18
19
|
<ConsoleLogCard item={item} searchStr={logSearch}/>
|
|
19
20
|
</AnimatedEntrance>), [logSearch]);
|
|
@@ -480,7 +481,7 @@ const ConsoleTab = React.memo(() => {
|
|
|
480
481
|
</ScrollView>
|
|
481
482
|
</View>
|
|
482
483
|
|
|
483
|
-
<FlatList data={filteredConsoleLogs} keyExtractor={keyExtractor} ListHeaderComponent={listHeader} renderItem={renderItem} initialNumToRender={12} maxToRenderPerBatch={8} windowSize={5} removeClippedSubviews={true} renderToHardwareTextureAndroid={true} ListEmptyComponent={<EmptyState isSearch={logSearch.length > 0 || logFilters.size > 0} searchQuery={logSearch} customTitle={logSearch.length > 0
|
|
484
|
+
<FlatList ref={listRef} data={filteredConsoleLogs} keyExtractor={keyExtractor} ListHeaderComponent={listHeader} renderItem={renderItem} initialNumToRender={12} maxToRenderPerBatch={8} windowSize={5} removeClippedSubviews={true} renderToHardwareTextureAndroid={true} ListEmptyComponent={<EmptyState isSearch={logSearch.length > 0 || logFilters.size > 0} searchQuery={logSearch} customTitle={logSearch.length > 0
|
|
484
485
|
? 'No matching console logs'
|
|
485
486
|
: 'No console logs'} onClearSearch={() => {
|
|
486
487
|
setLogSearch('');
|
|
@@ -489,6 +490,28 @@ const ConsoleTab = React.memo(() => {
|
|
|
489
490
|
styles.listContent,
|
|
490
491
|
filteredConsoleLogs.length === 0 && { flexGrow: 1 },
|
|
491
492
|
]} keyboardShouldPersistTaps="handled"/>
|
|
493
|
+
|
|
494
|
+
<TouchableScale onPress={() => {
|
|
495
|
+
try {
|
|
496
|
+
listRef.current?.scrollToOffset({
|
|
497
|
+
offset: 0,
|
|
498
|
+
animated: true,
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
catch {
|
|
502
|
+
try {
|
|
503
|
+
listRef.current?.scrollToIndex({
|
|
504
|
+
index: 0,
|
|
505
|
+
animated: true,
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
catch { }
|
|
509
|
+
}
|
|
510
|
+
}} hitSlop={12} style={styles.scrollTopBtn}>
|
|
511
|
+
<View style={{ transform: [{ rotate: '180deg' }] }}>
|
|
512
|
+
<ChevronIcon color={AppColors.white} size={18}/>
|
|
513
|
+
</View>
|
|
514
|
+
</TouchableScale>
|
|
492
515
|
</View>);
|
|
493
516
|
});
|
|
494
517
|
export default ConsoleTab;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import React, { useCallback, useMemo, useState } from 'react';
|
|
1
|
+
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { Alert, FlatList, ScrollView, StyleSheet, Text, TextInput, TouchableOpacity, View, } from 'react-native';
|
|
3
3
|
import { useTranslation } from '../../i18n';
|
|
4
4
|
import { useInspector } from './InspectorContext';
|
|
5
5
|
import TouchableScale from '../TouchableScale';
|
|
6
6
|
import AnimatedEntrance from '../AnimatedEntrance';
|
|
7
7
|
import EndOfListFooter from '../EndOfListFooter';
|
|
8
|
+
import FeatureUnderDevNotice from './FeatureUnderDevNotice';
|
|
8
9
|
import HighlightText from '../HighlightText';
|
|
10
|
+
import styles from '../../styles';
|
|
9
11
|
import { AppColors } from '../../styles/AppColors';
|
|
10
12
|
import { AppFonts } from '../../styles/AppFonts';
|
|
11
13
|
import { clearCrashRecords, } from '../../customHooks/crashHandler';
|
|
12
14
|
import CrashFilterModal, { DEFAULT_CRASH_FILTERS, isCrashFiltersDefault, } from './CrashFilterModal';
|
|
13
|
-
import { SearchIcon, ClearIcon, TrashIcon, TerminalIcon, LayersIcon, ClockIcon, ShieldAlertIcon, FlameIcon, JsIcon, HourglassIcon, SkullIcon, LayoutIcon, ChipIcon, AppleIcon, AndroidIcon, RepeatIcon, CodeBracketsIcon, FilterIcon, } from '../NetworkIcons';
|
|
15
|
+
import { SearchIcon, ClearIcon, TrashIcon, TerminalIcon, LayersIcon, ClockIcon, ShieldAlertIcon, FlameIcon, JsIcon, HourglassIcon, SkullIcon, LayoutIcon, ChipIcon, AppleIcon, AndroidIcon, RepeatIcon, CodeBracketsIcon, FilterIcon, ChevronIcon, } from '../NetworkIcons';
|
|
14
16
|
const getRelativeTime = (timestamp) => {
|
|
15
17
|
const now = Date.now();
|
|
16
18
|
const diff = Math.max(0, now - timestamp);
|
|
@@ -29,6 +31,7 @@ const getRelativeTime = (timestamp) => {
|
|
|
29
31
|
const CrashTab = React.memo(() => {
|
|
30
32
|
const { t } = useTranslation();
|
|
31
33
|
const { crashRecords, selectedCrash, setSelectedCrash } = useInspector();
|
|
34
|
+
const listRef = useRef(null);
|
|
32
35
|
const [searchQuery, setSearchQuery] = useState('');
|
|
33
36
|
const [filterType, setFilterType] = useState('all');
|
|
34
37
|
const [crashFilters, setCrashFilters] = useState(DEFAULT_CRASH_FILTERS);
|
|
@@ -349,6 +352,8 @@ const CrashTab = React.memo(() => {
|
|
|
349
352
|
</TouchableScale>
|
|
350
353
|
</View>
|
|
351
354
|
|
|
355
|
+
<FeatureUnderDevNotice featureName="Crash & Exception Sentinel"/>
|
|
356
|
+
|
|
352
357
|
|
|
353
358
|
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={localStyles.filterScrollContent}>
|
|
354
359
|
{[
|
|
@@ -403,7 +408,31 @@ const CrashTab = React.memo(() => {
|
|
|
403
408
|
Clear Search
|
|
404
409
|
</Text>
|
|
405
410
|
</TouchableScale>)}
|
|
406
|
-
</ScrollView>) : (
|
|
411
|
+
</ScrollView>) : (<>
|
|
412
|
+
<FlatList ref={listRef} data={filteredList} keyExtractor={item => item.id} renderItem={renderCard} initialNumToRender={12} maxToRenderPerBatch={8} windowSize={5} removeClippedSubviews={true} renderToHardwareTextureAndroid={true} contentContainerStyle={localStyles.listContent} showsVerticalScrollIndicator={false} ListFooterComponent={<EndOfListFooter />}/>
|
|
413
|
+
|
|
414
|
+
<TouchableScale onPress={() => {
|
|
415
|
+
try {
|
|
416
|
+
listRef.current?.scrollToOffset({
|
|
417
|
+
offset: 0,
|
|
418
|
+
animated: true,
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
catch {
|
|
422
|
+
try {
|
|
423
|
+
listRef.current?.scrollToIndex({
|
|
424
|
+
index: 0,
|
|
425
|
+
animated: true,
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
catch { }
|
|
429
|
+
}
|
|
430
|
+
}} hitSlop={12} style={styles.scrollTopBtn}>
|
|
431
|
+
<View style={{ transform: [{ rotate: '180deg' }] }}>
|
|
432
|
+
<ChevronIcon color={AppColors.white} size={18}/>
|
|
433
|
+
</View>
|
|
434
|
+
</TouchableScale>
|
|
435
|
+
</>)}
|
|
407
436
|
|
|
408
437
|
|
|
409
438
|
<CrashFilterModal visible={isFilterModalOpen} onClose={() => setIsFilterModalOpen(false)} filters={crashFilters} onApply={setCrashFilters} searchQuery={searchQuery}/>
|