react-native-inapp-inspector 2.3.9 → 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/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/LogCard.js +5 -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/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/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/LogCard.js +5 -26
- 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/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/NetworkDetail.tsx +2 -1
- package/src/components/Inspector/NetworkFilterModal.tsx +710 -0
- package/src/components/Inspector/NetworkTab.tsx +127 -204
- package/src/components/LogCard.tsx +5 -30
- package/src/components/NetworkIcons.tsx +27 -0
- package/src/constants/index.ts +3 -0
- package/src/constants/version.ts +1 -1
- 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;
|
|
@@ -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,8 +327,8 @@ 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={{ flexDirection: 'row', alignItems: 'center', gap: 6,
|
|
352
|
-
<react_native_1.View style={styles_1.default.cardDateRow}>
|
|
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 }]}>
|
|
353
332
|
<NetworkIcons_1.CalendarIcon color={AppColors_1.AppColors.grayTextWeak} size={10}/>
|
|
354
333
|
<react_native_1.Text style={styles_1.default.cardDateText}>{triggeredAt}</react_native_1.Text>
|
|
355
334
|
</react_native_1.View>
|
|
@@ -366,7 +345,7 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
|
|
|
366
345
|
paddingVertical: 1,
|
|
367
346
|
borderRadius: 4,
|
|
368
347
|
flexShrink: 1,
|
|
369
|
-
|
|
348
|
+
minWidth: 0,
|
|
370
349
|
},
|
|
371
350
|
]}>
|
|
372
351
|
<NetworkIcons_1.PinIcon color={AppColors_1.AppColors.skyBlue} size={8.5}/>
|
|
@@ -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";
|
|
@@ -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: {
|
|
@@ -44,7 +44,7 @@ const NetworkDetail = React.memo(() => {
|
|
|
44
44
|
return null;
|
|
45
45
|
return (<View style={{ flex: 1 }}>
|
|
46
46
|
|
|
47
|
-
<View style={{ paddingHorizontal:
|
|
47
|
+
<View style={{ paddingHorizontal: 8, paddingTop: 4 }}>
|
|
48
48
|
<View style={styles.detailInfoBar}>
|
|
49
49
|
{(() => {
|
|
50
50
|
let schemeStr = '';
|
|
@@ -94,6 +94,7 @@ const NetworkDetail = React.memo(() => {
|
|
|
94
94
|
gap: 6,
|
|
95
95
|
flexWrap: 'wrap',
|
|
96
96
|
flex: 1,
|
|
97
|
+
minWidth: 0,
|
|
97
98
|
}}>
|
|
98
99
|
|
|
99
100
|
<View style={[
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface NetworkFilterState {
|
|
3
|
+
statusCodes: Set<string>;
|
|
4
|
+
methods: Set<string>;
|
|
5
|
+
latency: 'all' | 'fast' | 'normal' | 'slow';
|
|
6
|
+
protocol: 'all' | 'https' | 'http';
|
|
7
|
+
sortBy: 'time_desc' | 'time_asc' | 'duration_desc' | 'duration_asc' | 'size_desc';
|
|
8
|
+
}
|
|
9
|
+
export declare const DEFAULT_NETWORK_FILTERS: NetworkFilterState;
|
|
10
|
+
export declare const isNetworkFiltersDefault: (f: NetworkFilterState) => boolean;
|
|
11
|
+
interface NetworkFilterModalProps {
|
|
12
|
+
visible: boolean;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
filters: NetworkFilterState;
|
|
15
|
+
onApply: (filters: NetworkFilterState) => void;
|
|
16
|
+
searchQuery?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const NetworkFilterModal: React.FC<NetworkFilterModalProps>;
|
|
19
|
+
export default NetworkFilterModal;
|