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
|
@@ -39,99 +39,53 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
40
|
const react_native_1 = require("react-native");
|
|
41
41
|
const InspectorContext_1 = require("./InspectorContext");
|
|
42
|
-
const useAccordion_1 = __importDefault(require("../../customHooks/useAccordion"));
|
|
43
42
|
const TouchableScale_1 = __importDefault(require("../TouchableScale"));
|
|
44
43
|
const AnimatedEntrance_1 = __importDefault(require("../AnimatedEntrance"));
|
|
45
44
|
const DomainHeader_1 = __importDefault(require("../DomainHeader"));
|
|
46
45
|
const LogCard_1 = __importDefault(require("../LogCard"));
|
|
47
46
|
const EmptyState_1 = __importDefault(require("../EmptyState"));
|
|
48
47
|
const EndOfListFooter_1 = __importDefault(require("../EndOfListFooter"));
|
|
48
|
+
const NetworkFilterModal_1 = __importDefault(require("./NetworkFilterModal"));
|
|
49
49
|
const styles_1 = __importDefault(require("../../styles"));
|
|
50
50
|
const AppColors_1 = require("../../styles/AppColors");
|
|
51
51
|
const AppFonts_1 = require("../../styles/AppFonts");
|
|
52
52
|
const constants_1 = require("../../constants");
|
|
53
53
|
const i18n_1 = require("../../i18n");
|
|
54
54
|
const NetworkIcons_1 = require("../NetworkIcons");
|
|
55
|
-
const STATUS_META = {
|
|
56
|
-
ALL: { color: AppColors_1.AppColors.grayText, Icon: NetworkIcons_1.LayersIcon },
|
|
57
|
-
'2xx': { color: AppColors_1.AppColors.greenColor, Icon: NetworkIcons_1.CircleCheckIcon },
|
|
58
|
-
'200': { color: AppColors_1.AppColors.greenColor, Icon: NetworkIcons_1.CircleCheckIcon },
|
|
59
|
-
'3xx': { color: AppColors_1.AppColors.warningIconGold, Icon: NetworkIcons_1.CircleAlertIcon },
|
|
60
|
-
'300': { color: AppColors_1.AppColors.warningIconGold, Icon: NetworkIcons_1.CircleAlertIcon },
|
|
61
|
-
'4xx': { color: AppColors_1.AppColors.darkOrange, Icon: NetworkIcons_1.CircleAlertIcon },
|
|
62
|
-
'400': { color: AppColors_1.AppColors.darkOrange, Icon: NetworkIcons_1.CircleAlertIcon },
|
|
63
|
-
'404': { color: AppColors_1.AppColors.darkOrange, Icon: NetworkIcons_1.CircleAlertIcon },
|
|
64
|
-
'5xx': { color: AppColors_1.AppColors.errorColor, Icon: NetworkIcons_1.CircleXIcon },
|
|
65
|
-
'500': { color: AppColors_1.AppColors.errorColor, Icon: NetworkIcons_1.CircleXIcon },
|
|
66
|
-
Failed: { color: AppColors_1.AppColors.errorColor, Icon: NetworkIcons_1.CircleXIcon },
|
|
67
|
-
};
|
|
68
|
-
const getStatusMeta = (filter) => {
|
|
69
|
-
if (STATUS_META[filter])
|
|
70
|
-
return STATUS_META[filter];
|
|
71
|
-
const num = parseInt(filter, 10);
|
|
72
|
-
if (!isNaN(num)) {
|
|
73
|
-
if (num >= 200 && num < 300)
|
|
74
|
-
return { color: AppColors_1.AppColors.greenColor, Icon: NetworkIcons_1.CircleCheckIcon };
|
|
75
|
-
if (num >= 300 && num < 400)
|
|
76
|
-
return { color: AppColors_1.AppColors.warningIconGold, Icon: NetworkIcons_1.CircleAlertIcon };
|
|
77
|
-
if (num >= 400 && num < 500)
|
|
78
|
-
return { color: AppColors_1.AppColors.darkOrange, Icon: NetworkIcons_1.CircleAlertIcon };
|
|
79
|
-
if (num >= 500)
|
|
80
|
-
return { color: AppColors_1.AppColors.errorColor, Icon: NetworkIcons_1.CircleXIcon };
|
|
81
|
-
}
|
|
82
|
-
if (filter.startsWith('2'))
|
|
83
|
-
return { color: AppColors_1.AppColors.greenColor, Icon: NetworkIcons_1.CircleCheckIcon };
|
|
84
|
-
if (filter.startsWith('3'))
|
|
85
|
-
return { color: AppColors_1.AppColors.warningIconGold, Icon: NetworkIcons_1.CircleAlertIcon };
|
|
86
|
-
if (filter.startsWith('4'))
|
|
87
|
-
return { color: AppColors_1.AppColors.darkOrange, Icon: NetworkIcons_1.CircleAlertIcon };
|
|
88
|
-
if (filter.startsWith('5'))
|
|
89
|
-
return { color: AppColors_1.AppColors.errorColor, Icon: NetworkIcons_1.CircleXIcon };
|
|
90
|
-
return { color: AppColors_1.AppColors.grayText, Icon: NetworkIcons_1.LayersIcon };
|
|
91
|
-
};
|
|
92
|
-
const FilterChip = react_1.default.memo(({ label, color, Icon, badge, active, onPress, }) => {
|
|
93
|
-
const iconColor = active ? color : AppColors_1.AppColors.grayTextWeak;
|
|
94
|
-
return (<TouchableScale_1.default style={styles_1.default.statusFilterWrap} onPress={onPress} hitSlop={10}>
|
|
95
|
-
<react_native_1.View style={[
|
|
96
|
-
styles_1.default.statusFilterChip,
|
|
97
|
-
{
|
|
98
|
-
paddingHorizontal: 9,
|
|
99
|
-
paddingVertical: 5,
|
|
100
|
-
borderRadius: 7,
|
|
101
|
-
borderWidth: 1,
|
|
102
|
-
borderColor: active ? color : `${AppColors_1.AppColors.grayBorderSecondary}`,
|
|
103
|
-
backgroundColor: active ? `${color}14` : AppColors_1.AppColors.grayBackground,
|
|
104
|
-
},
|
|
105
|
-
active && {
|
|
106
|
-
shadowColor: color,
|
|
107
|
-
shadowOffset: { width: 0, height: 1 },
|
|
108
|
-
shadowOpacity: 0.2,
|
|
109
|
-
shadowRadius: 2,
|
|
110
|
-
elevation: 1.5,
|
|
111
|
-
},
|
|
112
|
-
]}>
|
|
113
|
-
{badge != null ? (<react_native_1.View style={[
|
|
114
|
-
styles_1.default.methodBadgeMini,
|
|
115
|
-
{ backgroundColor: badge },
|
|
116
|
-
]}/>) : (Icon && (<Icon color={iconColor} size={13}/>))}
|
|
117
|
-
<react_native_1.Text numberOfLines={1} style={[
|
|
118
|
-
styles_1.default.statusFilterText,
|
|
119
|
-
{
|
|
120
|
-
color: active ? color : AppColors_1.AppColors.grayText,
|
|
121
|
-
fontFamily: active ? AppFonts_1.AppFonts.interBold : AppFonts_1.AppFonts.interMedium,
|
|
122
|
-
},
|
|
123
|
-
]}>
|
|
124
|
-
{label}
|
|
125
|
-
</react_native_1.Text>
|
|
126
|
-
</react_native_1.View>
|
|
127
|
-
</TouchableScale_1.default>);
|
|
128
|
-
});
|
|
129
55
|
const NetworkTab = react_1.default.memo(() => {
|
|
130
56
|
const { groupedData, search, setSearch, searchScope, setSearchScope, isRegexSearch, setIsRegexSearch, isCaseSensitive, setIsCaseSensitive, quickFilter, setQuickFilter, handleDelete, selectedLogs, sortOrder, setSortOrder, statusFilters, setStatusFilters, methodFilters, setMethodFilters, availableMethods, filteredLogs, logs, toggleSectionFilter, toggleSectionCollapse, minStart, totalRange, newLogIds, toggleSelect, setSelected, isNetworkPaused, setIsNetworkPaused, } = (0, InspectorContext_1.useInspector)();
|
|
131
57
|
const { t } = (0, i18n_1.useTranslation)();
|
|
132
|
-
const filtersAccordion = (0, useAccordion_1.default)(false, 300, 260);
|
|
133
58
|
const apisListRef = (0, react_1.useRef)(null);
|
|
59
|
+
const [isFilterModalOpen, setIsFilterModalOpen] = react_1.default.useState(false);
|
|
134
60
|
const [isSearchFocused, setIsSearchFocused] = react_1.default.useState(false);
|
|
61
|
+
const modalFilterState = (0, react_1.useMemo)(() => ({
|
|
62
|
+
statusCodes: statusFilters.size > 0 ? new Set(statusFilters) : new Set(['all']),
|
|
63
|
+
methods: methodFilters.size > 0 ? new Set(methodFilters) : new Set(['all']),
|
|
64
|
+
latency: 'all',
|
|
65
|
+
protocol: 'all',
|
|
66
|
+
sortBy: sortOrder === 'newest' ? 'time_desc' : 'time_asc',
|
|
67
|
+
}), [statusFilters, methodFilters, sortOrder]);
|
|
68
|
+
const handleApplyNetworkFilters = (0, react_1.useCallback)((newFilters) => {
|
|
69
|
+
if (newFilters.statusCodes.has('all') ||
|
|
70
|
+
newFilters.statusCodes.size === 0) {
|
|
71
|
+
setStatusFilters(new Set());
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
setStatusFilters(new Set(newFilters.statusCodes));
|
|
75
|
+
}
|
|
76
|
+
if (newFilters.methods.has('all') || newFilters.methods.size === 0) {
|
|
77
|
+
setMethodFilters(new Set());
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
setMethodFilters(new Set([...newFilters.methods].map(m => m)));
|
|
81
|
+
}
|
|
82
|
+
if (newFilters.sortBy === 'time_asc') {
|
|
83
|
+
setSortOrder('oldest');
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
setSortOrder('newest');
|
|
87
|
+
}
|
|
88
|
+
}, [setStatusFilters, setMethodFilters, setSortOrder]);
|
|
135
89
|
const quickCounts = (0, react_1.useMemo)(() => {
|
|
136
90
|
let errorCount = 0;
|
|
137
91
|
let successCount = 0;
|
|
@@ -558,10 +512,12 @@ const NetworkTab = react_1.default.memo(() => {
|
|
|
558
512
|
|
|
559
513
|
<TouchableScale_1.default style={[
|
|
560
514
|
styles_1.default.toolbarBtn,
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
515
|
+
(statusFilters.size > 0 || methodFilters.size > 0) && {
|
|
516
|
+
borderColor: AppColors_1.AppColors.purple,
|
|
517
|
+
backgroundColor: `${AppColors_1.AppColors.purple}15`,
|
|
518
|
+
},
|
|
519
|
+
]} onPress={() => setIsFilterModalOpen(true)} hitSlop={6}>
|
|
520
|
+
<NetworkIcons_1.FilterIcon color={statusFilters.size > 0 || methodFilters.size > 0
|
|
565
521
|
? AppColors_1.AppColors.purple
|
|
566
522
|
: AppColors_1.AppColors.grayTextStrong} size={16}/>
|
|
567
523
|
{(statusFilters.size > 0 ||
|
|
@@ -723,6 +679,51 @@ const NetworkTab = react_1.default.memo(() => {
|
|
|
723
679
|
</react_native_1.View>
|
|
724
680
|
</TouchableScale_1.default>);
|
|
725
681
|
})}
|
|
682
|
+
|
|
683
|
+
<TouchableScale_1.default onPress={() => setIsFilterModalOpen(true)}>
|
|
684
|
+
<react_native_1.View style={{
|
|
685
|
+
flexDirection: 'row',
|
|
686
|
+
alignItems: 'center',
|
|
687
|
+
paddingHorizontal: 10,
|
|
688
|
+
paddingVertical: 4.5,
|
|
689
|
+
borderRadius: 8,
|
|
690
|
+
backgroundColor: statusFilters.size > 0 || methodFilters.size > 0
|
|
691
|
+
? `${AppColors_1.AppColors.purple}20`
|
|
692
|
+
: AppColors_1.AppColors.grayBackground,
|
|
693
|
+
borderWidth: 1,
|
|
694
|
+
borderColor: statusFilters.size > 0 || methodFilters.size > 0
|
|
695
|
+
? AppColors_1.AppColors.purple
|
|
696
|
+
: AppColors_1.AppColors.grayBorderSecondary,
|
|
697
|
+
gap: 5,
|
|
698
|
+
}}>
|
|
699
|
+
<NetworkIcons_1.FilterIcon size={11} color={statusFilters.size > 0 || methodFilters.size > 0
|
|
700
|
+
? AppColors_1.AppColors.purple
|
|
701
|
+
: AppColors_1.AppColors.grayText}/>
|
|
702
|
+
<react_native_1.Text style={{
|
|
703
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
704
|
+
fontSize: 10.5,
|
|
705
|
+
color: statusFilters.size > 0 || methodFilters.size > 0
|
|
706
|
+
? AppColors_1.AppColors.purple
|
|
707
|
+
: AppColors_1.AppColors.grayText,
|
|
708
|
+
}}>
|
|
709
|
+
More Filters
|
|
710
|
+
</react_native_1.Text>
|
|
711
|
+
{(statusFilters.size > 0 || methodFilters.size > 0) && (<react_native_1.View style={{
|
|
712
|
+
backgroundColor: AppColors_1.AppColors.purple,
|
|
713
|
+
paddingHorizontal: 4.5,
|
|
714
|
+
paddingVertical: 1,
|
|
715
|
+
borderRadius: 6,
|
|
716
|
+
}}>
|
|
717
|
+
<react_native_1.Text style={{
|
|
718
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
719
|
+
fontSize: 8.5,
|
|
720
|
+
color: AppColors_1.AppColors.white,
|
|
721
|
+
}}>
|
|
722
|
+
{statusFilters.size + methodFilters.size}
|
|
723
|
+
</react_native_1.Text>
|
|
724
|
+
</react_native_1.View>)}
|
|
725
|
+
</react_native_1.View>
|
|
726
|
+
</TouchableScale_1.default>
|
|
726
727
|
</react_native_1.ScrollView>
|
|
727
728
|
</react_native_1.View>
|
|
728
729
|
|
|
@@ -871,86 +872,24 @@ const NetworkTab = react_1.default.memo(() => {
|
|
|
871
872
|
</TouchableScale_1.default>
|
|
872
873
|
</react_native_1.View>)}
|
|
873
874
|
|
|
874
|
-
<react_native_1.Animated.View style={[
|
|
875
|
-
filtersAccordion.bodyStyle,
|
|
876
|
-
{ overflow: 'hidden' },
|
|
877
|
-
]}>
|
|
878
|
-
<react_native_1.View style={styles_1.default.filtersContainer}>
|
|
879
|
-
<react_native_1.Text style={styles_1.default.filtersHeading}>
|
|
880
|
-
STATUS
|
|
881
|
-
</react_native_1.Text>
|
|
882
|
-
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles_1.default.statusRowContent}>
|
|
883
|
-
{constants_1.STATUS_FILTERS.map(filter => {
|
|
884
|
-
const isAll = filter === 'ALL';
|
|
885
|
-
const active = isAll
|
|
886
|
-
? statusFilters.size === 0
|
|
887
|
-
: statusFilters.has(filter);
|
|
888
|
-
const meta = getStatusMeta(filter);
|
|
889
|
-
return (<FilterChip key={filter} label={filter} color={meta.color} Icon={meta.Icon} active={active} onPress={() => {
|
|
890
|
-
if (isAll) {
|
|
891
|
-
setStatusFilters(new Set());
|
|
892
|
-
}
|
|
893
|
-
else {
|
|
894
|
-
setStatusFilters(prev => {
|
|
895
|
-
const next = new Set(prev);
|
|
896
|
-
next.has(filter)
|
|
897
|
-
? next.delete(filter)
|
|
898
|
-
: next.add(filter);
|
|
899
|
-
return next;
|
|
900
|
-
});
|
|
901
|
-
}
|
|
902
|
-
}}/>);
|
|
903
|
-
})}
|
|
904
|
-
</react_native_1.ScrollView>
|
|
905
|
-
|
|
906
|
-
<react_native_1.Text style={[
|
|
907
|
-
styles_1.default.filtersHeading,
|
|
908
|
-
{ marginTop: 16 },
|
|
909
|
-
]}>
|
|
910
|
-
METHOD
|
|
911
|
-
</react_native_1.Text>
|
|
912
|
-
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles_1.default.statusRowContent}>
|
|
913
|
-
{availableMethods.map(filter => {
|
|
914
|
-
const isAll = filter === 'ALL';
|
|
915
|
-
const active = isAll
|
|
916
|
-
? methodFilters.size === 0
|
|
917
|
-
: methodFilters.has(filter);
|
|
918
|
-
const methodColor = constants_1.METHOD_COLORS[filter] ??
|
|
919
|
-
constants_1.METHOD_COLORS.ALL;
|
|
920
|
-
return (<FilterChip key={filter} label={filter} color={methodColor} badge={methodColor} active={active} onPress={() => {
|
|
921
|
-
if (isAll) {
|
|
922
|
-
setMethodFilters(new Set());
|
|
923
|
-
}
|
|
924
|
-
else {
|
|
925
|
-
setMethodFilters(prev => {
|
|
926
|
-
const next = new Set(prev);
|
|
927
|
-
next.has(filter)
|
|
928
|
-
? next.delete(filter)
|
|
929
|
-
: next.add(filter);
|
|
930
|
-
return next;
|
|
931
|
-
});
|
|
932
|
-
}
|
|
933
|
-
}}/>);
|
|
934
|
-
})}
|
|
935
|
-
</react_native_1.ScrollView>
|
|
936
|
-
</react_native_1.View>
|
|
937
|
-
</react_native_1.Animated.View>
|
|
938
|
-
|
|
939
875
|
{(search ||
|
|
940
876
|
statusFilters.size > 0 ||
|
|
941
|
-
methodFilters.size > 0
|
|
877
|
+
methodFilters.size > 0 ||
|
|
878
|
+
quickFilter !== 'all') && (<react_native_1.Text style={styles_1.default.resultCount}>
|
|
942
879
|
{filteredLogs.length === logs.length
|
|
943
880
|
? `${logs.length} requests`
|
|
944
881
|
: `${filteredLogs.length} of ${logs.length} filtered requests`}
|
|
945
882
|
</react_native_1.Text>)}
|
|
946
883
|
</react_native_1.View>} ListEmptyComponent={<EmptyState_1.default isSearch={search.length > 0 ||
|
|
947
884
|
statusFilters.size > 0 ||
|
|
948
|
-
methodFilters.size > 0
|
|
885
|
+
methodFilters.size > 0 ||
|
|
886
|
+
quickFilter !== 'all'} searchQuery={search} customTitle={search.length > 0
|
|
949
887
|
? 'No matching API requests'
|
|
950
888
|
: 'No network activity'} onClearSearch={() => {
|
|
951
889
|
setSearch('');
|
|
952
890
|
setStatusFilters(new Set());
|
|
953
891
|
setMethodFilters(new Set());
|
|
892
|
+
setQuickFilter('all');
|
|
954
893
|
setSearchScope('all');
|
|
955
894
|
}}/>} ListFooterComponent={groupedData.length > 0 ? (<EndOfListFooter_1.default count={filteredLogs.length} label="requests"/>) : null} contentContainerStyle={[
|
|
956
895
|
styles_1.default.listContent,
|
|
@@ -978,6 +917,9 @@ const NetworkTab = react_1.default.memo(() => {
|
|
|
978
917
|
<NetworkIcons_1.ChevronIcon color={AppColors_1.AppColors.white} size={18}/>
|
|
979
918
|
</react_native_1.View>
|
|
980
919
|
</TouchableScale_1.default>
|
|
920
|
+
|
|
921
|
+
|
|
922
|
+
<NetworkFilterModal_1.default visible={isFilterModalOpen} onClose={() => setIsFilterModalOpen(false)} filters={modalFilterState} onApply={handleApplyNetworkFilters} searchQuery={search}/>
|
|
981
923
|
</react_native_1.View>);
|
|
982
924
|
});
|
|
983
925
|
exports.default = NetworkTab;
|
|
@@ -128,7 +128,7 @@ const NpmUpdateToast = () => {
|
|
|
128
128
|
react_native_1.Linking.openURL('https://www.npmjs.com/package/react-native-inapp-inspector').catch(() => { });
|
|
129
129
|
handleDismiss();
|
|
130
130
|
};
|
|
131
|
-
if (!showUpdateToast || !visible || !updateAvailable || !latestNpmVersion)
|
|
131
|
+
if (typeof __DEV__ === 'undefined' || !__DEV__ || !showUpdateToast || !visible || !updateAvailable || !latestNpmVersion)
|
|
132
132
|
return null;
|
|
133
133
|
const progressWidth = progressAnim.interpolate({
|
|
134
134
|
inputRange: [0, 1],
|
|
@@ -43,6 +43,7 @@ const TouchableScale_1 = __importDefault(require("../TouchableScale"));
|
|
|
43
43
|
const CopyButton_1 = __importDefault(require("../CopyButton"));
|
|
44
44
|
const HighlightText_1 = __importDefault(require("../HighlightText"));
|
|
45
45
|
const EndOfListFooter_1 = __importDefault(require("../EndOfListFooter"));
|
|
46
|
+
const FeatureUnderDevNotice_1 = __importDefault(require("./FeatureUnderDevNotice"));
|
|
46
47
|
const AppColors_1 = require("../../styles/AppColors");
|
|
47
48
|
const AppFonts_1 = require("../../styles/AppFonts");
|
|
48
49
|
const i18n_1 = require("../../i18n");
|
|
@@ -394,6 +395,8 @@ const PerformanceTab = react_1.default.memo(() => {
|
|
|
394
395
|
</TouchableScale_1.default>
|
|
395
396
|
</react_native_1.View>
|
|
396
397
|
|
|
398
|
+
<FeatureUnderDevNotice_1.default featureName="Performance & FPS Profiler"/>
|
|
399
|
+
|
|
397
400
|
|
|
398
401
|
<react_native_1.View style={perfStyles.categoryScrollWrapper}>
|
|
399
402
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} style={perfStyles.categoryScrollView} contentContainerStyle={perfStyles.categoryScroll}>
|
|
@@ -98,6 +98,7 @@ const getOriginBadge = (originType) => {
|
|
|
98
98
|
const ReduxTab = react_1.default.memo(() => {
|
|
99
99
|
const { t } = (0, i18n_1.useTranslation)();
|
|
100
100
|
const { reduxState, reduxLastActionMap, reduxSearch, setReduxSearch, setSelectedReduxSlice, } = (0, InspectorContext_1.useInspector)();
|
|
101
|
+
const listRef = (0, react_1.useRef)(null);
|
|
101
102
|
const [sortMode, setSortMode] = (0, react_1.useState)('latest');
|
|
102
103
|
const [isReduxPaused, setIsReduxPaused] = (0, react_1.useState)(!(0, reduxLogger_1.getReduxAutoRefresh)());
|
|
103
104
|
const handleTogglePause = (0, react_1.useCallback)(() => {
|
|
@@ -491,10 +492,32 @@ const ReduxTab = react_1.default.memo(() => {
|
|
|
491
492
|
</react_native_1.View>
|
|
492
493
|
|
|
493
494
|
|
|
494
|
-
<react_native_1.FlatList data={filteredSlices} keyExtractor={item => item.id} renderItem={renderSliceItem} initialNumToRender={12} maxToRenderPerBatch={8} windowSize={5} removeClippedSubviews={true} renderToHardwareTextureAndroid={true} ListEmptyComponent={<EmptyState_1.default isSearch={reduxSearch.length > 0}/>} ListFooterComponent={filteredSlices.length > 0 ? (<EndOfListFooter_1.default count={filteredSlices.length} label="slices"/>) : null} contentContainerStyle={[
|
|
495
|
+
<react_native_1.FlatList ref={listRef} data={filteredSlices} keyExtractor={item => item.id} renderItem={renderSliceItem} initialNumToRender={12} maxToRenderPerBatch={8} windowSize={5} removeClippedSubviews={true} renderToHardwareTextureAndroid={true} ListEmptyComponent={<EmptyState_1.default isSearch={reduxSearch.length > 0}/>} ListFooterComponent={filteredSlices.length > 0 ? (<EndOfListFooter_1.default count={filteredSlices.length} label="slices"/>) : null} contentContainerStyle={[
|
|
495
496
|
reduxTabStyles.listContent,
|
|
496
497
|
filteredSlices.length === 0 && { flexGrow: 1 },
|
|
497
498
|
]} keyboardShouldPersistTaps="handled"/>
|
|
499
|
+
|
|
500
|
+
<TouchableScale_1.default onPress={() => {
|
|
501
|
+
try {
|
|
502
|
+
listRef.current?.scrollToOffset({
|
|
503
|
+
offset: 0,
|
|
504
|
+
animated: true,
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
catch {
|
|
508
|
+
try {
|
|
509
|
+
listRef.current?.scrollToIndex({
|
|
510
|
+
index: 0,
|
|
511
|
+
animated: true,
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
catch { }
|
|
515
|
+
}
|
|
516
|
+
}} hitSlop={12} style={styles_1.default.scrollTopBtn}>
|
|
517
|
+
<react_native_1.View style={{ transform: [{ rotate: '180deg' }] }}>
|
|
518
|
+
<NetworkIcons_1.ChevronIcon color={AppColors_1.AppColors.white} size={18}/>
|
|
519
|
+
</react_native_1.View>
|
|
520
|
+
</TouchableScale_1.default>
|
|
498
521
|
</react_native_1.View>);
|
|
499
522
|
});
|
|
500
523
|
const reduxTabStyles = react_native_1.StyleSheet.create({
|
|
@@ -313,11 +313,12 @@ const SettingsPanel = () => {
|
|
|
313
313
|
}}>
|
|
314
314
|
<react_native_1.ScrollView style={{ flex: 1 }} contentContainerStyle={{ padding: 16, paddingBottom: 100, gap: 14 }} showsVerticalScrollIndicator={false}>
|
|
315
315
|
|
|
316
|
+
|
|
316
317
|
<react_native_1.View style={{
|
|
317
|
-
flexDirection: 'row',
|
|
318
318
|
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
319
|
-
borderRadius:
|
|
320
|
-
|
|
319
|
+
borderRadius: 13,
|
|
320
|
+
paddingVertical: 4,
|
|
321
|
+
paddingHorizontal: 4,
|
|
321
322
|
borderWidth: 1,
|
|
322
323
|
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
323
324
|
shadowColor: AppColors_1.AppColors.black,
|
|
@@ -325,95 +326,79 @@ const SettingsPanel = () => {
|
|
|
325
326
|
shadowRadius: 4,
|
|
326
327
|
shadowOffset: { width: 0, height: 2 },
|
|
327
328
|
}}>
|
|
328
|
-
<
|
|
329
|
-
(0, InspectorContext_1.animateNextLayout)();
|
|
330
|
-
setSettingsActiveSubTab('module');
|
|
331
|
-
}} style={{
|
|
332
|
-
flex: 1,
|
|
333
|
-
paddingVertical: 9,
|
|
329
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
334
330
|
flexDirection: 'row',
|
|
335
331
|
alignItems: 'center',
|
|
336
|
-
justifyContent: 'center',
|
|
337
332
|
gap: 6,
|
|
338
|
-
|
|
339
|
-
backgroundColor: settingsActiveSubTab === 'module'
|
|
340
|
-
? AppColors_1.AppColors.purple
|
|
341
|
-
: 'transparent',
|
|
342
|
-
}}>
|
|
343
|
-
<NetworkIcons_1.LayersIcon color={settingsActiveSubTab === 'module'
|
|
344
|
-
? AppColors_1.AppColors.white
|
|
345
|
-
: AppColors_1.AppColors.grayText} size={13}/>
|
|
346
|
-
<react_native_1.Text style={{
|
|
347
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
348
|
-
fontSize: 12.5,
|
|
349
|
-
lineHeight: 16,
|
|
350
|
-
color: settingsActiveSubTab === 'module'
|
|
351
|
-
? AppColors_1.AppColors.white
|
|
352
|
-
: AppColors_1.AppColors.grayText,
|
|
353
|
-
}}>
|
|
354
|
-
{t('settings.modulesAndTools')}
|
|
355
|
-
</react_native_1.Text>
|
|
356
|
-
</TouchableScale_1.default>
|
|
357
|
-
|
|
358
|
-
<TouchableScale_1.default accessible={true} accessibilityRole="tab" accessibilityLabel={t('settings.uiPreferences')} accessibilityState={{ selected: settingsActiveSubTab === 'ui' }} onPress={() => {
|
|
359
|
-
(0, InspectorContext_1.animateNextLayout)();
|
|
360
|
-
setSettingsActiveSubTab('ui');
|
|
361
|
-
}} style={{
|
|
362
|
-
flex: 1,
|
|
363
|
-
paddingVertical: 9,
|
|
364
|
-
flexDirection: 'row',
|
|
365
|
-
alignItems: 'center',
|
|
366
|
-
justifyContent: 'center',
|
|
367
|
-
gap: 5,
|
|
368
|
-
borderRadius: 9,
|
|
369
|
-
backgroundColor: settingsActiveSubTab === 'ui'
|
|
370
|
-
? AppColors_1.AppColors.purple
|
|
371
|
-
: 'transparent',
|
|
372
|
-
}}>
|
|
373
|
-
<NetworkIcons_1.ScreenIcon color={settingsActiveSubTab === 'ui'
|
|
374
|
-
? AppColors_1.AppColors.white
|
|
375
|
-
: AppColors_1.AppColors.grayText} size={13}/>
|
|
376
|
-
<react_native_1.Text numberOfLines={1} style={{
|
|
377
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
378
|
-
fontSize: 12,
|
|
379
|
-
lineHeight: 16,
|
|
380
|
-
color: settingsActiveSubTab === 'ui'
|
|
381
|
-
? AppColors_1.AppColors.white
|
|
382
|
-
: AppColors_1.AppColors.grayText,
|
|
383
|
-
}}>
|
|
384
|
-
{t('settings.uiPreferences')}
|
|
385
|
-
</react_native_1.Text>
|
|
386
|
-
</TouchableScale_1.default>
|
|
387
|
-
|
|
388
|
-
<TouchableScale_1.default accessible={true} accessibilityRole="tab" accessibilityLabel={t('settings.ramLimits')} accessibilityState={{ selected: settingsActiveSubTab === 'limits' }} onPress={() => {
|
|
389
|
-
(0, InspectorContext_1.animateNextLayout)();
|
|
390
|
-
setSettingsActiveSubTab('limits');
|
|
391
|
-
}} style={{
|
|
392
|
-
flex: 1,
|
|
393
|
-
paddingVertical: 9,
|
|
394
|
-
flexDirection: 'row',
|
|
395
|
-
alignItems: 'center',
|
|
396
|
-
justifyContent: 'center',
|
|
397
|
-
gap: 5,
|
|
398
|
-
borderRadius: 9,
|
|
399
|
-
backgroundColor: settingsActiveSubTab === 'limits'
|
|
400
|
-
? AppColors_1.AppColors.purple
|
|
401
|
-
: 'transparent',
|
|
402
|
-
}}>
|
|
403
|
-
<NetworkIcons_1.BrainIcon color={settingsActiveSubTab === 'limits'
|
|
404
|
-
? AppColors_1.AppColors.white
|
|
405
|
-
: AppColors_1.AppColors.grayText} size={13}/>
|
|
406
|
-
<react_native_1.Text numberOfLines={1} style={{
|
|
407
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
408
|
-
fontSize: 12,
|
|
409
|
-
lineHeight: 16,
|
|
410
|
-
color: settingsActiveSubTab === 'limits'
|
|
411
|
-
? AppColors_1.AppColors.white
|
|
412
|
-
: AppColors_1.AppColors.grayText,
|
|
333
|
+
paddingHorizontal: 2,
|
|
413
334
|
}}>
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
335
|
+
{[
|
|
336
|
+
{
|
|
337
|
+
key: 'module',
|
|
338
|
+
label: t('settings.modulesAndTools', 'Modules & Tools'),
|
|
339
|
+
Icon: NetworkIcons_1.LayersIcon,
|
|
340
|
+
badge: `${allModules.filter(m => stagedTabVisibility?.[m.key] || m.key === 'apis').length}/${allModules.length}`,
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
key: 'ui',
|
|
344
|
+
label: t('settings.uiPreferences', 'UI Preferences'),
|
|
345
|
+
Icon: NetworkIcons_1.ScreenIcon,
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
key: 'limits',
|
|
349
|
+
label: t('settings.ramLimits', 'RAM & Limits'),
|
|
350
|
+
Icon: NetworkIcons_1.BrainIcon,
|
|
351
|
+
},
|
|
352
|
+
].map(tab => {
|
|
353
|
+
const isActive = settingsActiveSubTab === tab.key;
|
|
354
|
+
const IconComp = tab.Icon;
|
|
355
|
+
return (<TouchableScale_1.default key={tab.key} accessible={true} accessibilityRole="tab" accessibilityLabel={tab.label} accessibilityState={{ selected: isActive }} onPress={() => {
|
|
356
|
+
(0, InspectorContext_1.animateNextLayout)();
|
|
357
|
+
setSettingsActiveSubTab(tab.key);
|
|
358
|
+
}} style={{
|
|
359
|
+
paddingVertical: 8,
|
|
360
|
+
paddingHorizontal: 14,
|
|
361
|
+
flexDirection: 'row',
|
|
362
|
+
alignItems: 'center',
|
|
363
|
+
justifyContent: 'center',
|
|
364
|
+
gap: 6,
|
|
365
|
+
borderRadius: 9,
|
|
366
|
+
backgroundColor: isActive
|
|
367
|
+
? AppColors_1.AppColors.purple
|
|
368
|
+
: 'transparent',
|
|
369
|
+
}}>
|
|
370
|
+
<IconComp color={isActive ? AppColors_1.AppColors.white : AppColors_1.AppColors.grayText} size={13}/>
|
|
371
|
+
<react_native_1.Text style={{
|
|
372
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
373
|
+
fontSize: 12.5,
|
|
374
|
+
lineHeight: 16,
|
|
375
|
+
color: isActive
|
|
376
|
+
? AppColors_1.AppColors.white
|
|
377
|
+
: AppColors_1.AppColors.grayText,
|
|
378
|
+
}}>
|
|
379
|
+
{tab.label}
|
|
380
|
+
</react_native_1.Text>
|
|
381
|
+
{tab.badge && (<react_native_1.View style={{
|
|
382
|
+
backgroundColor: isActive
|
|
383
|
+
? 'rgba(255,255,255,0.25)'
|
|
384
|
+
: `${AppColors_1.AppColors.purple}18`,
|
|
385
|
+
paddingHorizontal: 5.5,
|
|
386
|
+
paddingVertical: 1,
|
|
387
|
+
borderRadius: 10,
|
|
388
|
+
}}>
|
|
389
|
+
<react_native_1.Text style={{
|
|
390
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
391
|
+
fontSize: 9.5,
|
|
392
|
+
color: isActive
|
|
393
|
+
? AppColors_1.AppColors.white
|
|
394
|
+
: AppColors_1.AppColors.purple,
|
|
395
|
+
}}>
|
|
396
|
+
{tab.badge}
|
|
397
|
+
</react_native_1.Text>
|
|
398
|
+
</react_native_1.View>)}
|
|
399
|
+
</TouchableScale_1.default>);
|
|
400
|
+
})}
|
|
401
|
+
</react_native_1.ScrollView>
|
|
417
402
|
</react_native_1.View>
|
|
418
403
|
|
|
419
404
|
{settingsActiveSubTab === 'module' && (<react_native_1.View style={{ gap: 12 }}>
|
|
@@ -40,6 +40,7 @@ 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"));
|
|
43
44
|
const AppColors_1 = require("../../styles/AppColors");
|
|
44
45
|
const AppFonts_1 = require("../../styles/AppFonts");
|
|
45
46
|
const i18n_1 = require("../../i18n");
|
|
@@ -134,6 +135,7 @@ const StorageEntryCard = react_1.default.memo(function StorageEntryCard({ entry,
|
|
|
134
135
|
});
|
|
135
136
|
exports.StorageTab = react_1.default.memo(() => {
|
|
136
137
|
const { t } = (0, i18n_1.useTranslation)();
|
|
138
|
+
const listRef = (0, react_1.useRef)(null);
|
|
137
139
|
const [activeDriver, setActiveDriver] = (0, react_1.useState)('asyncStorage');
|
|
138
140
|
const [activeMMKVId, setActiveMMKVId] = (0, react_1.useState)('default');
|
|
139
141
|
const [entries, setEntries] = (0, react_1.useState)([]);
|
|
@@ -399,19 +401,43 @@ exports.StorageTab = react_1.default.memo(() => {
|
|
|
399
401
|
{isLoading ? (<react_native_1.View style={styles.loadingContainer}>
|
|
400
402
|
<react_native_1.ActivityIndicator size="small" color={AppColors_1.AppColors.purple}/>
|
|
401
403
|
<react_native_1.Text style={styles.loadingText}>Loading storage entries...</react_native_1.Text>
|
|
402
|
-
</react_native_1.View>) : (
|
|
403
|
-
|
|
404
|
-
<
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
{
|
|
404
|
+
</react_native_1.View>) : (<>
|
|
405
|
+
<react_native_1.FlatList ref={listRef} data={filteredEntries} keyExtractor={item => item.key} renderItem={renderItem} initialNumToRender={10} maxToRenderPerBatch={10} windowSize={5} removeClippedSubviews={react_native_1.Platform.OS === 'android'} style={styles.scrollArea} contentContainerStyle={styles.scrollContent} showsVerticalScrollIndicator={false} ListEmptyComponent={<react_native_1.View style={styles.emptyContainer}>
|
|
406
|
+
<react_native_1.View style={styles.emptyIconWrap}>
|
|
407
|
+
<NetworkIcons_1.DatabaseIcon size={28} color={AppColors_1.AppColors.grayTextWeak}/>
|
|
408
|
+
</react_native_1.View>
|
|
409
|
+
<react_native_1.Text style={styles.emptyTitle}>
|
|
410
|
+
{search ? 'No matching keys found' : `No ${activeDriver === 'asyncStorage' ? 'AsyncStorage' : 'MMKV'} Keys`}
|
|
411
|
+
</react_native_1.Text>
|
|
412
|
+
<react_native_1.Text style={styles.emptySubtitle}>
|
|
413
|
+
{search
|
|
411
414
|
? 'Try modifying your search query'
|
|
412
415
|
: `Storage is auto-detected. Tap "+ Add" above to create your first ${activeDriver === 'asyncStorage' ? 'AsyncStorage' : 'MMKV'} key!`}
|
|
413
|
-
|
|
414
|
-
|
|
416
|
+
</react_native_1.Text>
|
|
417
|
+
</react_native_1.View>} ListFooterComponent={<react_native_1.View style={{ height: 60 }}/>}/>
|
|
418
|
+
|
|
419
|
+
<TouchableScale_1.default onPress={() => {
|
|
420
|
+
try {
|
|
421
|
+
listRef.current?.scrollToOffset({
|
|
422
|
+
offset: 0,
|
|
423
|
+
animated: true,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
catch {
|
|
427
|
+
try {
|
|
428
|
+
listRef.current?.scrollToIndex({
|
|
429
|
+
index: 0,
|
|
430
|
+
animated: true,
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
catch { }
|
|
434
|
+
}
|
|
435
|
+
}} hitSlop={12} style={styles_1.default.scrollTopBtn}>
|
|
436
|
+
<react_native_1.View style={{ transform: [{ rotate: '180deg' }] }}>
|
|
437
|
+
<NetworkIcons_1.ChevronIcon color={AppColors_1.AppColors.white} size={18}/>
|
|
438
|
+
</react_native_1.View>
|
|
439
|
+
</TouchableScale_1.default>
|
|
440
|
+
</>)}
|
|
415
441
|
|
|
416
442
|
|
|
417
443
|
<react_native_1.Modal visible={modalVisible} transparent animationType="fade" onRequestClose={() => setModalVisible(false)}>
|
|
@@ -68,6 +68,8 @@ const UpdateAvailableModal = ({ visible, latestVersion, onClose, }) => {
|
|
|
68
68
|
const fadeAnim = (0, react_1.useState)(new react_native_1.Animated.Value(0))[0];
|
|
69
69
|
const scaleAnim = (0, react_1.useState)(new react_native_1.Animated.Value(0.92))[0];
|
|
70
70
|
const installCommand = `npm install react-native-inapp-inspector@latest`;
|
|
71
|
+
if (typeof __DEV__ === 'undefined' || !__DEV__)
|
|
72
|
+
return null;
|
|
71
73
|
(0, react_1.useEffect)(() => {
|
|
72
74
|
if (visible) {
|
|
73
75
|
setCopied(false);
|