react-native-inapp-inspector 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +203 -44
- package/dist/commonjs/components/AnimatedEntrance.d.ts +12 -0
- package/dist/commonjs/components/AnimatedEntrance.js +72 -0
- package/dist/commonjs/components/ConsoleLogCard.js +114 -29
- package/dist/commonjs/components/EmptyState.js +56 -5
- package/dist/commonjs/components/ReduxTreeView.js +96 -27
- package/dist/commonjs/components/TouchableScale.js +18 -2
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +1 -0
- package/dist/commonjs/customHooks/analyticsLogger.js +57 -17
- package/dist/commonjs/customHooks/networkLogger.d.ts +1 -1
- package/dist/commonjs/customHooks/networkLogger.js +54 -46
- package/dist/commonjs/index.js +1595 -822
- package/dist/esm/components/AnimatedEntrance.d.ts +12 -0
- package/dist/esm/components/AnimatedEntrance.js +37 -0
- package/dist/esm/components/ConsoleLogCard.js +116 -31
- package/dist/esm/components/EmptyState.js +24 -6
- package/dist/esm/components/ReduxTreeView.js +95 -29
- package/dist/esm/components/TouchableScale.js +18 -2
- package/dist/esm/customHooks/analyticsLogger.d.ts +1 -0
- package/dist/esm/customHooks/analyticsLogger.js +55 -16
- package/dist/esm/customHooks/networkLogger.d.ts +1 -1
- package/dist/esm/customHooks/networkLogger.js +56 -48
- package/dist/esm/index.js +1597 -824
- package/example/App.tsx +1 -3
- package/package.json +5 -3
package/dist/commonjs/index.js
CHANGED
|
@@ -59,6 +59,7 @@ const SourcePageCard_1 = __importDefault(require("./components/SourcePageCard"))
|
|
|
59
59
|
const ConsoleLogCard_1 = require("./components/ConsoleLogCard");
|
|
60
60
|
const HighlightText_1 = __importDefault(require("./components/HighlightText"));
|
|
61
61
|
const CodeSnippet_1 = __importDefault(require("./components/CodeSnippet"));
|
|
62
|
+
const AnimatedEntrance_1 = __importDefault(require("./components/AnimatedEntrance"));
|
|
62
63
|
// Helpers
|
|
63
64
|
const helpers_1 = require("./helpers");
|
|
64
65
|
// Assets
|
|
@@ -146,7 +147,10 @@ const NavigationTracker = ({ onStateChange }) => {
|
|
|
146
147
|
}, [navState, onStateChange]);
|
|
147
148
|
return null;
|
|
148
149
|
};
|
|
149
|
-
const
|
|
150
|
+
const animateNextLayout = () => {
|
|
151
|
+
react_native_1.LayoutAnimation.configureNext(react_native_1.LayoutAnimation.Presets.easeInEaseOut);
|
|
152
|
+
};
|
|
153
|
+
const NetworkInspector = ({ enabled = true, }) => {
|
|
150
154
|
const [isDark, setIsDark] = (0, react_1.useState)(false);
|
|
151
155
|
const [reduxState, setReduxState] = (0, react_1.useState)(null);
|
|
152
156
|
const [expandedReducers, setExpandedReducers] = (0, react_1.useState)({});
|
|
@@ -161,16 +165,11 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
161
165
|
const [reduxActiveSubTab, setReduxActiveSubTab] = (0, react_1.useState)('timeline');
|
|
162
166
|
const [apiDetailActiveTab, setApiDetailActiveTab] = (0, react_1.useState)('response');
|
|
163
167
|
(0, react_1.useEffect)(() => {
|
|
164
|
-
|
|
165
|
-
react_native_1.LogBox.ignoreAllLogs(true);
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
react_native_1.LogBox.ignoreAllLogs(false);
|
|
169
|
-
}
|
|
168
|
+
react_native_1.LogBox.ignoreAllLogs(enabled);
|
|
170
169
|
return () => {
|
|
171
170
|
react_native_1.LogBox.ignoreAllLogs(false);
|
|
172
171
|
};
|
|
173
|
-
}, [enabled
|
|
172
|
+
}, [enabled]);
|
|
174
173
|
(0, react_1.useEffect)(() => {
|
|
175
174
|
if (selected) {
|
|
176
175
|
setApiDetailActiveTab('response');
|
|
@@ -279,12 +278,18 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
279
278
|
const nextVal = !prev[key];
|
|
280
279
|
const newVisibility = { ...prev, [key]: nextVal };
|
|
281
280
|
if (!nextVal && activeTab === key) {
|
|
281
|
+
animateNextLayout();
|
|
282
282
|
setActiveTab('apis');
|
|
283
283
|
}
|
|
284
284
|
return newVisibility;
|
|
285
285
|
});
|
|
286
286
|
};
|
|
287
|
+
const switchActiveTab = (0, react_1.useCallback)((key) => {
|
|
288
|
+
animateNextLayout();
|
|
289
|
+
setActiveTab(key);
|
|
290
|
+
}, []);
|
|
287
291
|
const navigateFromDashboard = (key) => {
|
|
292
|
+
animateNextLayout();
|
|
288
293
|
setTabVisibility(prev => ({ ...prev, [key]: true }));
|
|
289
294
|
setActiveTab(key);
|
|
290
295
|
};
|
|
@@ -357,6 +362,11 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
357
362
|
const badgeAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
358
363
|
const activePulseAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0.4)).current;
|
|
359
364
|
const unreadPulseAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
365
|
+
(0, react_1.useEffect)(() => {
|
|
366
|
+
if (react_native_1.Platform.OS === 'android') {
|
|
367
|
+
react_native_1.UIManager.setLayoutAnimationEnabledExperimental?.(true);
|
|
368
|
+
}
|
|
369
|
+
}, []);
|
|
360
370
|
(0, react_1.useEffect)(() => {
|
|
361
371
|
const loop = react_native_1.Animated.loop(react_native_1.Animated.sequence([
|
|
362
372
|
react_native_1.Animated.timing(pulseAnim, {
|
|
@@ -432,7 +442,7 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
432
442
|
(0, networkLogger_1.setupNetworkLogger)();
|
|
433
443
|
(0, networkLogger_1.clearNetworkLogs)();
|
|
434
444
|
(0, consoleLogger_1.setupConsoleLogger)();
|
|
435
|
-
|
|
445
|
+
(0, analyticsLogger_1.autoSetupAnalyticsLogger)();
|
|
436
446
|
let timeoutId;
|
|
437
447
|
const unsubscribe = (0, networkLogger_1.subscribeNetworkLogs)((raw) => {
|
|
438
448
|
clearTimeout(timeoutId);
|
|
@@ -816,6 +826,7 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
816
826
|
return Object.entries(freq).sort((a, b) => b[1] - a[1]);
|
|
817
827
|
}, [filteredAnalyticsEvents]);
|
|
818
828
|
function closeModal() {
|
|
829
|
+
animateNextLayout();
|
|
819
830
|
setVisible(false);
|
|
820
831
|
setSelected(null);
|
|
821
832
|
setSelectedEvent(null);
|
|
@@ -933,12 +944,14 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
933
944
|
return next;
|
|
934
945
|
});
|
|
935
946
|
}, []);
|
|
936
|
-
const renderItem = (0, react_1.useCallback)(({ item }) => {
|
|
947
|
+
const renderItem = (0, react_1.useCallback)(({ item, index }) => {
|
|
937
948
|
if (item.type === 'header') {
|
|
938
|
-
return (<
|
|
949
|
+
return (<AnimatedEntrance_1.default index={index} distance={8}>
|
|
950
|
+
<DomainHeader_1.default pageName={item.pageName} color={item.color} stats={item.stats} activeFilters={item.activeFilters} onToggleFilter={toggleSectionFilter} isCollapsed={item.isCollapsed} onToggleCollapse={toggleSectionCollapse} isFirst={item.isFirst} timestamp={item.timestamp}/>
|
|
951
|
+
</AnimatedEntrance_1.default>);
|
|
939
952
|
}
|
|
940
953
|
const { log, isLast, color } = item;
|
|
941
|
-
return (<
|
|
954
|
+
return (<AnimatedEntrance_1.default index={index} distance={8} style={styles_1.default.treeNodeRow}>
|
|
942
955
|
<react_native_1.View style={styles_1.default.treeLines}>
|
|
943
956
|
<react_native_1.View style={[
|
|
944
957
|
styles_1.default.modernTreeLine,
|
|
@@ -948,9 +961,12 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
948
961
|
{!isLast && (<react_native_1.View style={[styles_1.default.modernTreeBranch, { borderColor: color }]}/>)}
|
|
949
962
|
</react_native_1.View>
|
|
950
963
|
<react_native_1.View style={styles_1.default.treeCardWrapper}>
|
|
951
|
-
<LogCard_1.default item={log} isSelected={selectedLogs.has(log.id)} onToggleSelect={toggleSelect} onPress={() =>
|
|
964
|
+
<LogCard_1.default item={log} isSelected={selectedLogs.has(log.id)} onToggleSelect={toggleSelect} onPress={() => {
|
|
965
|
+
animateNextLayout();
|
|
966
|
+
setSelected(log);
|
|
967
|
+
}} timelineMinStart={minStart} timelineTotalRange={totalRange} isNew={newLogIds.has(log.id)} searchStr={search}/>
|
|
952
968
|
</react_native_1.View>
|
|
953
|
-
</
|
|
969
|
+
</AnimatedEntrance_1.default>);
|
|
954
970
|
}, [
|
|
955
971
|
minStart,
|
|
956
972
|
totalRange,
|
|
@@ -976,8 +992,9 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
976
992
|
<react_native_linear_gradient_1.default colors={[AppColors_1.AppColors.purple, '#6B4EFF']} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }} style={styles_1.default.headerGradient}>
|
|
977
993
|
<react_native_1.View style={[styles_1.default.header, { paddingHorizontal: 16, gap: 12 }]}>
|
|
978
994
|
<TouchableScale_1.default onPress={() => {
|
|
995
|
+
animateNextLayout();
|
|
979
996
|
setSettingsPage(null);
|
|
980
|
-
|
|
997
|
+
switchActiveTab('apis');
|
|
981
998
|
}} hitSlop={12} style={{
|
|
982
999
|
padding: 8,
|
|
983
1000
|
borderRadius: 10,
|
|
@@ -988,8 +1005,21 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
988
1005
|
<NetworkIcons_1.WhiteBackNavigation color="#FFFFFF" size={16}/>
|
|
989
1006
|
</TouchableScale_1.default>
|
|
990
1007
|
<react_native_1.View style={{ flex: 1 }}>
|
|
991
|
-
<react_native_1.Text style={{
|
|
992
|
-
|
|
1008
|
+
<react_native_1.Text style={{
|
|
1009
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1010
|
+
fontSize: 17,
|
|
1011
|
+
color: '#FFFFFF',
|
|
1012
|
+
}}>
|
|
1013
|
+
Settings
|
|
1014
|
+
</react_native_1.Text>
|
|
1015
|
+
<react_native_1.Text style={{
|
|
1016
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
1017
|
+
fontSize: 11,
|
|
1018
|
+
color: 'rgba(255,255,255,0.75)',
|
|
1019
|
+
marginTop: 1,
|
|
1020
|
+
}}>
|
|
1021
|
+
Manage modules and preferences
|
|
1022
|
+
</react_native_1.Text>
|
|
993
1023
|
</react_native_1.View>
|
|
994
1024
|
<react_native_1.View style={{
|
|
995
1025
|
backgroundColor: 'rgba(255, 255, 255, 0.15)',
|
|
@@ -997,17 +1027,28 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
997
1027
|
paddingVertical: 4,
|
|
998
1028
|
borderRadius: 8,
|
|
999
1029
|
borderWidth: 1,
|
|
1000
|
-
borderColor: 'rgba(255, 255, 255, 0.1)'
|
|
1030
|
+
borderColor: 'rgba(255, 255, 255, 0.1)',
|
|
1001
1031
|
}}>
|
|
1002
|
-
<react_native_1.Text style={{
|
|
1032
|
+
<react_native_1.Text style={{
|
|
1033
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1034
|
+
fontSize: 10.5,
|
|
1035
|
+
color: '#FFFFFF',
|
|
1036
|
+
}}>
|
|
1037
|
+
v1.0.13
|
|
1038
|
+
</react_native_1.Text>
|
|
1003
1039
|
</react_native_1.View>
|
|
1004
1040
|
</react_native_1.View>
|
|
1005
1041
|
</react_native_linear_gradient_1.default>
|
|
1006
1042
|
|
|
1007
1043
|
<react_native_1.ScrollView style={{ flex: 1 }} contentContainerStyle={{ padding: 16, gap: 12 }}>
|
|
1008
|
-
|
|
1009
1044
|
{/* Tab list */}
|
|
1010
|
-
<react_native_1.View style={{
|
|
1045
|
+
<react_native_1.View style={{
|
|
1046
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1047
|
+
borderRadius: 12,
|
|
1048
|
+
borderWidth: 1,
|
|
1049
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1050
|
+
overflow: 'hidden',
|
|
1051
|
+
}}>
|
|
1011
1052
|
{/* Table Header */}
|
|
1012
1053
|
<react_native_1.View style={{
|
|
1013
1054
|
flexDirection: 'row',
|
|
@@ -1019,8 +1060,26 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1019
1060
|
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1020
1061
|
gap: 12,
|
|
1021
1062
|
}}>
|
|
1022
|
-
<react_native_1.Text style={{
|
|
1023
|
-
|
|
1063
|
+
<react_native_1.Text style={{
|
|
1064
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1065
|
+
fontSize: 10,
|
|
1066
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
1067
|
+
letterSpacing: 0.6,
|
|
1068
|
+
flex: 1,
|
|
1069
|
+
}}>
|
|
1070
|
+
MODULE
|
|
1071
|
+
</react_native_1.Text>
|
|
1072
|
+
<react_native_1.Text style={{
|
|
1073
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1074
|
+
fontSize: 10,
|
|
1075
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
1076
|
+
letterSpacing: 0.6,
|
|
1077
|
+
width: 90,
|
|
1078
|
+
textAlign: 'right',
|
|
1079
|
+
paddingRight: 4,
|
|
1080
|
+
}}>
|
|
1081
|
+
VISIBILITY
|
|
1082
|
+
</react_native_1.Text>
|
|
1024
1083
|
</react_native_1.View>
|
|
1025
1084
|
|
|
1026
1085
|
{settingsTabs.map((tab, idx) => {
|
|
@@ -1037,27 +1096,53 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1037
1096
|
gap: 12,
|
|
1038
1097
|
}}>
|
|
1039
1098
|
{/* Icon + Label — fills remaining space */}
|
|
1040
|
-
<react_native_1.View style={{
|
|
1099
|
+
<react_native_1.View style={{
|
|
1100
|
+
flex: 1,
|
|
1101
|
+
flexDirection: 'row',
|
|
1102
|
+
alignItems: 'center',
|
|
1103
|
+
gap: 8,
|
|
1104
|
+
}}>
|
|
1041
1105
|
{/* Small icon tile */}
|
|
1042
1106
|
<react_native_1.View style={{
|
|
1043
|
-
width: 20,
|
|
1044
|
-
|
|
1107
|
+
width: 20,
|
|
1108
|
+
height: 20,
|
|
1109
|
+
borderRadius: 6,
|
|
1110
|
+
backgroundColor: isLocked
|
|
1111
|
+
? AppColors_1.AppColors.grayBorderSecondary
|
|
1112
|
+
: AppColors_1.AppColors.purpleShade50,
|
|
1045
1113
|
borderWidth: 1,
|
|
1046
|
-
borderColor: isLocked
|
|
1047
|
-
|
|
1114
|
+
borderColor: isLocked
|
|
1115
|
+
? AppColors_1.AppColors.dividerColor
|
|
1116
|
+
: 'rgba(104,75,155,0.2)',
|
|
1117
|
+
alignItems: 'center',
|
|
1118
|
+
justifyContent: 'center',
|
|
1048
1119
|
}}>
|
|
1049
|
-
{tab.icon === 'insights' && <NetworkIcons_1.InsightsIcon color={isLocked
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
{tab.icon === '
|
|
1053
|
-
|
|
1054
|
-
|
|
1120
|
+
{tab.icon === 'insights' && (<NetworkIcons_1.InsightsIcon color={isLocked
|
|
1121
|
+
? AppColors_1.AppColors.grayTextWeak
|
|
1122
|
+
: AppColors_1.AppColors.purple} size={11}/>)}
|
|
1123
|
+
{tab.icon === 'apis' && (<NetworkIcons_1.SignalIcon color={isLocked
|
|
1124
|
+
? AppColors_1.AppColors.grayTextWeak
|
|
1125
|
+
: AppColors_1.AppColors.purple} size={11}/>)}
|
|
1126
|
+
{tab.icon === 'logs' && (<NetworkIcons_1.TerminalIcon color={isLocked
|
|
1127
|
+
? AppColors_1.AppColors.grayTextWeak
|
|
1128
|
+
: AppColors_1.AppColors.purple} size={11}/>)}
|
|
1129
|
+
{tab.icon === 'analytics' && (<NetworkIcons_1.AnalyticsIcon color={isLocked
|
|
1130
|
+
? AppColors_1.AppColors.grayTextWeak
|
|
1131
|
+
: AppColors_1.AppColors.purple} size={11}/>)}
|
|
1132
|
+
{tab.icon === 'webview' && (<NetworkIcons_1.GlobeIcon color={isLocked
|
|
1133
|
+
? AppColors_1.AppColors.grayTextWeak
|
|
1134
|
+
: AppColors_1.AppColors.purple} size={11}/>)}
|
|
1135
|
+
{tab.icon === 'redux' && (<NetworkIcons_1.TerminalIcon color={isLocked
|
|
1136
|
+
? AppColors_1.AppColors.grayTextWeak
|
|
1137
|
+
: AppColors_1.AppColors.purple} size={11}/>)}
|
|
1055
1138
|
</react_native_1.View>
|
|
1056
1139
|
{/* Label + Required badge */}
|
|
1057
1140
|
<react_native_1.Text style={{
|
|
1058
1141
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1059
1142
|
fontSize: 13,
|
|
1060
|
-
color: isLocked
|
|
1143
|
+
color: isLocked
|
|
1144
|
+
? AppColors_1.AppColors.grayText
|
|
1145
|
+
: AppColors_1.AppColors.primaryBlack,
|
|
1061
1146
|
}}>
|
|
1062
1147
|
{tab.label}
|
|
1063
1148
|
</react_native_1.Text>
|
|
@@ -1072,14 +1157,28 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1072
1157
|
borderColor: 'rgba(104,75,155,0.18)',
|
|
1073
1158
|
gap: 3,
|
|
1074
1159
|
}}>
|
|
1075
|
-
<react_native_1.View style={{
|
|
1076
|
-
|
|
1160
|
+
<react_native_1.View style={{
|
|
1161
|
+
width: 4,
|
|
1162
|
+
height: 4,
|
|
1163
|
+
borderRadius: 2,
|
|
1164
|
+
backgroundColor: AppColors_1.AppColors.purple,
|
|
1165
|
+
opacity: 0.7,
|
|
1166
|
+
}}/>
|
|
1167
|
+
<react_native_1.Text style={{
|
|
1168
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1169
|
+
fontSize: 8.5,
|
|
1170
|
+
color: AppColors_1.AppColors.purple,
|
|
1171
|
+
letterSpacing: 0.4,
|
|
1172
|
+
}}>
|
|
1077
1173
|
DEFAULT
|
|
1078
1174
|
</react_native_1.Text>
|
|
1079
1175
|
</react_native_1.View>)}
|
|
1080
1176
|
|
|
1081
1177
|
{/* Settings gear icon next to label */}
|
|
1082
|
-
<TouchableScale_1.default onPress={() =>
|
|
1178
|
+
<TouchableScale_1.default onPress={() => {
|
|
1179
|
+
animateNextLayout();
|
|
1180
|
+
setSettingsPage(tab.key);
|
|
1181
|
+
}} hitSlop={8} style={{
|
|
1083
1182
|
marginLeft: 4,
|
|
1084
1183
|
padding: 4,
|
|
1085
1184
|
borderRadius: 6,
|
|
@@ -1094,12 +1193,18 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1094
1193
|
</react_native_1.View>
|
|
1095
1194
|
|
|
1096
1195
|
{/* Visibility Switch in VISIBILITY column */}
|
|
1097
|
-
<react_native_1.View style={{
|
|
1196
|
+
<react_native_1.View style={{
|
|
1197
|
+
width: 90,
|
|
1198
|
+
alignItems: 'flex-end',
|
|
1199
|
+
justifyContent: 'center',
|
|
1200
|
+
}}>
|
|
1098
1201
|
<TouchableScale_1.default disabled={isLocked} onPress={() => toggleTabVisibility(tab.key)} style={{
|
|
1099
1202
|
width: 38,
|
|
1100
1203
|
height: 22,
|
|
1101
1204
|
borderRadius: 11,
|
|
1102
|
-
backgroundColor: isVisible
|
|
1205
|
+
backgroundColor: isVisible
|
|
1206
|
+
? AppColors_1.AppColors.purple
|
|
1207
|
+
: AppColors_1.AppColors.grayBorderSecondary,
|
|
1103
1208
|
padding: 2,
|
|
1104
1209
|
justifyContent: 'center',
|
|
1105
1210
|
alignItems: isVisible ? 'flex-end' : 'flex-start',
|
|
@@ -1122,8 +1227,22 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1122
1227
|
|
|
1123
1228
|
{/* Preferences Section */}
|
|
1124
1229
|
<react_native_1.View style={{ marginTop: 8 }}>
|
|
1125
|
-
<react_native_1.Text style={{
|
|
1126
|
-
|
|
1230
|
+
<react_native_1.Text style={{
|
|
1231
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1232
|
+
fontSize: 10,
|
|
1233
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
1234
|
+
letterSpacing: 0.6,
|
|
1235
|
+
marginBottom: 8,
|
|
1236
|
+
}}>
|
|
1237
|
+
PREFERENCES
|
|
1238
|
+
</react_native_1.Text>
|
|
1239
|
+
<react_native_1.View style={{
|
|
1240
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1241
|
+
borderRadius: 12,
|
|
1242
|
+
borderWidth: 1,
|
|
1243
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1244
|
+
overflow: 'hidden',
|
|
1245
|
+
}}>
|
|
1127
1246
|
<react_native_1.View style={{
|
|
1128
1247
|
flexDirection: 'row',
|
|
1129
1248
|
alignItems: 'center',
|
|
@@ -1132,13 +1251,21 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1132
1251
|
gap: 12,
|
|
1133
1252
|
}}>
|
|
1134
1253
|
{/* Icon + Label */}
|
|
1135
|
-
<react_native_1.View style={{
|
|
1254
|
+
<react_native_1.View style={{
|
|
1255
|
+
flex: 1,
|
|
1256
|
+
flexDirection: 'row',
|
|
1257
|
+
alignItems: 'center',
|
|
1258
|
+
gap: 8,
|
|
1259
|
+
}}>
|
|
1136
1260
|
<react_native_1.View style={{
|
|
1137
|
-
width: 20,
|
|
1261
|
+
width: 20,
|
|
1262
|
+
height: 20,
|
|
1263
|
+
borderRadius: 6,
|
|
1138
1264
|
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1139
1265
|
borderWidth: 1,
|
|
1140
1266
|
borderColor: 'rgba(104,75,155,0.2)',
|
|
1141
|
-
alignItems: 'center',
|
|
1267
|
+
alignItems: 'center',
|
|
1268
|
+
justifyContent: 'center',
|
|
1142
1269
|
}}>
|
|
1143
1270
|
{isDark ? (<NetworkIcons_1.SunIcon color={AppColors_1.AppColors.purple} size={11}/>) : (<NetworkIcons_1.MoonIcon color={AppColors_1.AppColors.purple} size={11}/>)}
|
|
1144
1271
|
</react_native_1.View>
|
|
@@ -1162,7 +1289,9 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1162
1289
|
width: 38,
|
|
1163
1290
|
height: 22,
|
|
1164
1291
|
borderRadius: 11,
|
|
1165
|
-
backgroundColor: isDark
|
|
1292
|
+
backgroundColor: isDark
|
|
1293
|
+
? AppColors_1.AppColors.purple
|
|
1294
|
+
: AppColors_1.AppColors.grayBorderSecondary,
|
|
1166
1295
|
padding: 2,
|
|
1167
1296
|
justifyContent: 'center',
|
|
1168
1297
|
alignItems: isDark ? 'flex-end' : 'flex-start',
|
|
@@ -1184,7 +1313,10 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1184
1313
|
</react_native_1.ScrollView>
|
|
1185
1314
|
</react_native_1.View>);
|
|
1186
1315
|
}
|
|
1187
|
-
const goBackToMain = () =>
|
|
1316
|
+
const goBackToMain = () => {
|
|
1317
|
+
animateNextLayout();
|
|
1318
|
+
setSettingsPage('main');
|
|
1319
|
+
};
|
|
1188
1320
|
const renderSubHeader = (title, icon, rightInfo) => (<react_native_1.View style={{
|
|
1189
1321
|
flexDirection: 'row',
|
|
1190
1322
|
alignItems: 'center',
|
|
@@ -1207,14 +1339,23 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1207
1339
|
<NetworkIcons_1.WhiteBackNavigation color={AppColors_1.AppColors.purple} size={16}/>
|
|
1208
1340
|
</TouchableScale_1.default>
|
|
1209
1341
|
{icon && (<react_native_1.View style={{
|
|
1210
|
-
width: 36,
|
|
1342
|
+
width: 36,
|
|
1343
|
+
height: 36,
|
|
1344
|
+
borderRadius: 10,
|
|
1211
1345
|
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1212
|
-
borderWidth: 1,
|
|
1213
|
-
|
|
1346
|
+
borderWidth: 1,
|
|
1347
|
+
borderColor: 'rgba(104,75,155,0.2)',
|
|
1348
|
+
alignItems: 'center',
|
|
1349
|
+
justifyContent: 'center',
|
|
1214
1350
|
}}>
|
|
1215
1351
|
{icon}
|
|
1216
1352
|
</react_native_1.View>)}
|
|
1217
|
-
<react_native_1.Text style={{
|
|
1353
|
+
<react_native_1.Text style={{
|
|
1354
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1355
|
+
fontSize: 18,
|
|
1356
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
1357
|
+
flex: 1,
|
|
1358
|
+
}}>
|
|
1218
1359
|
{title}
|
|
1219
1360
|
</react_native_1.Text>
|
|
1220
1361
|
{rightInfo ? (<react_native_1.View style={{
|
|
@@ -1225,7 +1366,11 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1225
1366
|
borderWidth: 1,
|
|
1226
1367
|
borderColor: 'rgba(104,75,155,0.15)',
|
|
1227
1368
|
}}>
|
|
1228
|
-
<react_native_1.Text style={{
|
|
1369
|
+
<react_native_1.Text style={{
|
|
1370
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1371
|
+
fontSize: 11,
|
|
1372
|
+
color: AppColors_1.AppColors.purple,
|
|
1373
|
+
}}>
|
|
1229
1374
|
{rightInfo}
|
|
1230
1375
|
</react_native_1.Text>
|
|
1231
1376
|
</react_native_1.View>) : null}
|
|
@@ -1242,18 +1387,31 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1242
1387
|
gap: 12,
|
|
1243
1388
|
}}>
|
|
1244
1389
|
<react_native_1.View style={{
|
|
1245
|
-
width: 36,
|
|
1390
|
+
width: 36,
|
|
1391
|
+
height: 36,
|
|
1392
|
+
borderRadius: 10,
|
|
1246
1393
|
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1247
|
-
borderWidth: 1,
|
|
1248
|
-
|
|
1394
|
+
borderWidth: 1,
|
|
1395
|
+
borderColor: 'rgba(104,75,155,0.18)',
|
|
1396
|
+
alignItems: 'center',
|
|
1397
|
+
justifyContent: 'center',
|
|
1249
1398
|
}}>
|
|
1250
1399
|
{opts.icon}
|
|
1251
1400
|
</react_native_1.View>
|
|
1252
1401
|
<react_native_1.View style={{ flex: 1 }}>
|
|
1253
|
-
<react_native_1.Text style={{
|
|
1402
|
+
<react_native_1.Text style={{
|
|
1403
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1404
|
+
fontSize: 14,
|
|
1405
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
1406
|
+
}}>
|
|
1254
1407
|
{opts.label}
|
|
1255
1408
|
</react_native_1.Text>
|
|
1256
|
-
{opts.description ? (<react_native_1.Text style={{
|
|
1409
|
+
{opts.description ? (<react_native_1.Text style={{
|
|
1410
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
1411
|
+
fontSize: 11,
|
|
1412
|
+
color: AppColors_1.AppColors.grayText,
|
|
1413
|
+
marginTop: 1,
|
|
1414
|
+
}}>
|
|
1257
1415
|
{opts.description}
|
|
1258
1416
|
</react_native_1.Text>) : null}
|
|
1259
1417
|
</react_native_1.View>
|
|
@@ -1275,14 +1433,20 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1275
1433
|
paddingVertical: 6,
|
|
1276
1434
|
alignItems: 'center',
|
|
1277
1435
|
borderRadius: 6,
|
|
1278
|
-
backgroundColor: isActive
|
|
1436
|
+
backgroundColor: isActive
|
|
1437
|
+
? AppColors_1.AppColors.purple
|
|
1438
|
+
: 'transparent',
|
|
1279
1439
|
}}>
|
|
1280
1440
|
<react_native_1.Text style={{
|
|
1281
1441
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1282
1442
|
fontSize: 11,
|
|
1283
1443
|
color: isActive ? '#FFFFFF' : AppColors_1.AppColors.grayText,
|
|
1284
1444
|
}}>
|
|
1285
|
-
{typeof opt === 'number' &&
|
|
1445
|
+
{typeof opt === 'number' &&
|
|
1446
|
+
opt >= 500 &&
|
|
1447
|
+
settingsPage === 'insights'
|
|
1448
|
+
? `${opt}ms`
|
|
1449
|
+
: opt}
|
|
1286
1450
|
</react_native_1.Text>
|
|
1287
1451
|
</TouchableScale_1.default>);
|
|
1288
1452
|
})}
|
|
@@ -1291,7 +1455,14 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1291
1455
|
if (settingsPage === 'apis') {
|
|
1292
1456
|
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1293
1457
|
{renderSubHeader('APIs Settings', <NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={16}/>, `Total: ${logs.length}`)}
|
|
1294
|
-
<react_native_1.View style={{
|
|
1458
|
+
<react_native_1.View style={{
|
|
1459
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1460
|
+
padding: 16,
|
|
1461
|
+
borderRadius: 12,
|
|
1462
|
+
borderWidth: 1,
|
|
1463
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1464
|
+
gap: 4,
|
|
1465
|
+
}}>
|
|
1295
1466
|
{renderSettingRow({
|
|
1296
1467
|
icon: <NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1297
1468
|
label: 'Max Request Logs',
|
|
@@ -1305,7 +1476,14 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1305
1476
|
})}
|
|
1306
1477
|
</react_native_1.View>
|
|
1307
1478
|
|
|
1308
|
-
<react_native_1.View style={{
|
|
1479
|
+
<react_native_1.View style={{
|
|
1480
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1481
|
+
borderRadius: 12,
|
|
1482
|
+
borderWidth: 1,
|
|
1483
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1484
|
+
padding: 16,
|
|
1485
|
+
marginTop: 12,
|
|
1486
|
+
}}>
|
|
1309
1487
|
{renderSettingRow({
|
|
1310
1488
|
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1311
1489
|
label: 'Clear Network Logs',
|
|
@@ -1316,8 +1494,21 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1316
1494
|
setSelected(null);
|
|
1317
1495
|
react_native_1.Alert.alert('Success', 'Network logs cleared.');
|
|
1318
1496
|
},
|
|
1319
|
-
right: (<react_native_1.View style={{
|
|
1320
|
-
|
|
1497
|
+
right: (<react_native_1.View style={{
|
|
1498
|
+
paddingHorizontal: 10,
|
|
1499
|
+
paddingVertical: 5,
|
|
1500
|
+
borderRadius: 7,
|
|
1501
|
+
backgroundColor: 'rgba(255,46,87,0.08)',
|
|
1502
|
+
borderWidth: 1,
|
|
1503
|
+
borderColor: 'rgba(255,46,87,0.2)',
|
|
1504
|
+
}}>
|
|
1505
|
+
<react_native_1.Text style={{
|
|
1506
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1507
|
+
fontSize: 11,
|
|
1508
|
+
color: AppColors_1.AppColors.errorColor,
|
|
1509
|
+
}}>
|
|
1510
|
+
Clear
|
|
1511
|
+
</react_native_1.Text>
|
|
1321
1512
|
</react_native_1.View>),
|
|
1322
1513
|
})}
|
|
1323
1514
|
</react_native_1.View>
|
|
@@ -1326,7 +1517,14 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1326
1517
|
if (settingsPage === 'logs') {
|
|
1327
1518
|
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1328
1519
|
{renderSubHeader('Logs Settings', <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>, `Total: ${consoleLogs.length}`)}
|
|
1329
|
-
<react_native_1.View style={{
|
|
1520
|
+
<react_native_1.View style={{
|
|
1521
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1522
|
+
padding: 16,
|
|
1523
|
+
borderRadius: 12,
|
|
1524
|
+
borderWidth: 1,
|
|
1525
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1526
|
+
gap: 4,
|
|
1527
|
+
}}>
|
|
1330
1528
|
{renderSettingRow({
|
|
1331
1529
|
icon: <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1332
1530
|
label: 'Max Console Logs',
|
|
@@ -1338,30 +1536,67 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1338
1536
|
},
|
|
1339
1537
|
})}
|
|
1340
1538
|
<react_native_1.View style={{ height: 1, backgroundColor: AppColors_1.AppColors.dividerColor }}/>
|
|
1341
|
-
<react_native_1.Text style={{
|
|
1539
|
+
<react_native_1.Text style={{
|
|
1540
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1541
|
+
fontSize: 13,
|
|
1542
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
1543
|
+
paddingTop: 4,
|
|
1544
|
+
}}>
|
|
1545
|
+
Log Levels
|
|
1546
|
+
</react_native_1.Text>
|
|
1342
1547
|
{['info', 'warn', 'error'].map((level, li) => {
|
|
1343
1548
|
const isLvlActive = showConsoleLevels[level];
|
|
1344
|
-
const levelColor = level === 'error'
|
|
1549
|
+
const levelColor = level === 'error'
|
|
1550
|
+
? AppColors_1.AppColors.errorColor
|
|
1551
|
+
: level === 'warn'
|
|
1552
|
+
? AppColors_1.AppColors.warningIconGold
|
|
1553
|
+
: AppColors_1.AppColors.skyBlue;
|
|
1345
1554
|
return renderSettingRow({
|
|
1346
|
-
icon: <react_native_1.View style={{
|
|
1555
|
+
icon: (<react_native_1.View style={{
|
|
1556
|
+
width: 10,
|
|
1557
|
+
height: 10,
|
|
1558
|
+
borderRadius: 5,
|
|
1559
|
+
backgroundColor: levelColor,
|
|
1560
|
+
}}/>),
|
|
1347
1561
|
label: `Show ${level.charAt(0).toUpperCase() + level.slice(1)} logs`,
|
|
1348
|
-
description: level === 'info'
|
|
1562
|
+
description: level === 'info'
|
|
1563
|
+
? 'Informational messages'
|
|
1564
|
+
: level === 'warn'
|
|
1565
|
+
? 'Warning messages'
|
|
1566
|
+
: 'Error messages',
|
|
1349
1567
|
isLast: level === 'error',
|
|
1350
|
-
onPress: () => setShowConsoleLevels(prev => ({
|
|
1568
|
+
onPress: () => setShowConsoleLevels(prev => ({
|
|
1569
|
+
...prev,
|
|
1570
|
+
[level]: !prev[level],
|
|
1571
|
+
})),
|
|
1351
1572
|
right: (<react_native_1.View style={{
|
|
1352
|
-
width: 22,
|
|
1573
|
+
width: 22,
|
|
1574
|
+
height: 22,
|
|
1575
|
+
borderRadius: 6,
|
|
1353
1576
|
borderWidth: 2,
|
|
1354
|
-
borderColor: isLvlActive
|
|
1355
|
-
|
|
1356
|
-
|
|
1577
|
+
borderColor: isLvlActive
|
|
1578
|
+
? AppColors_1.AppColors.purple
|
|
1579
|
+
: AppColors_1.AppColors.grayTextWeak,
|
|
1580
|
+
backgroundColor: isLvlActive
|
|
1581
|
+
? 'rgba(104, 75, 155, 0.1)'
|
|
1582
|
+
: 'transparent',
|
|
1583
|
+
alignItems: 'center',
|
|
1584
|
+
justifyContent: 'center',
|
|
1357
1585
|
}}>
|
|
1358
|
-
{isLvlActive && <NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>}
|
|
1586
|
+
{isLvlActive && (<NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>)}
|
|
1359
1587
|
</react_native_1.View>),
|
|
1360
1588
|
});
|
|
1361
1589
|
})}
|
|
1362
1590
|
</react_native_1.View>
|
|
1363
1591
|
|
|
1364
|
-
<react_native_1.View style={{
|
|
1592
|
+
<react_native_1.View style={{
|
|
1593
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1594
|
+
borderRadius: 12,
|
|
1595
|
+
borderWidth: 1,
|
|
1596
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1597
|
+
padding: 16,
|
|
1598
|
+
marginTop: 12,
|
|
1599
|
+
}}>
|
|
1365
1600
|
{renderSettingRow({
|
|
1366
1601
|
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1367
1602
|
label: 'Clear Console Logs',
|
|
@@ -1371,8 +1606,21 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1371
1606
|
(0, consoleLogger_1.clearConsoleLogs)();
|
|
1372
1607
|
react_native_1.Alert.alert('Success', 'Console logs cleared.');
|
|
1373
1608
|
},
|
|
1374
|
-
right: (<react_native_1.View style={{
|
|
1375
|
-
|
|
1609
|
+
right: (<react_native_1.View style={{
|
|
1610
|
+
paddingHorizontal: 10,
|
|
1611
|
+
paddingVertical: 5,
|
|
1612
|
+
borderRadius: 7,
|
|
1613
|
+
backgroundColor: 'rgba(255,46,87,0.08)',
|
|
1614
|
+
borderWidth: 1,
|
|
1615
|
+
borderColor: 'rgba(255,46,87,0.2)',
|
|
1616
|
+
}}>
|
|
1617
|
+
<react_native_1.Text style={{
|
|
1618
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1619
|
+
fontSize: 11,
|
|
1620
|
+
color: AppColors_1.AppColors.errorColor,
|
|
1621
|
+
}}>
|
|
1622
|
+
Clear
|
|
1623
|
+
</react_native_1.Text>
|
|
1376
1624
|
</react_native_1.View>),
|
|
1377
1625
|
})}
|
|
1378
1626
|
</react_native_1.View>
|
|
@@ -1381,7 +1629,14 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1381
1629
|
if (settingsPage === 'analytics') {
|
|
1382
1630
|
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1383
1631
|
{renderSubHeader('Analytics Settings', <NetworkIcons_1.AnalyticsIcon color={AppColors_1.AppColors.purple} size={16}/>, `Events: ${analyticsEvents.length}`)}
|
|
1384
|
-
<react_native_1.View style={{
|
|
1632
|
+
<react_native_1.View style={{
|
|
1633
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1634
|
+
padding: 16,
|
|
1635
|
+
borderRadius: 12,
|
|
1636
|
+
borderWidth: 1,
|
|
1637
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1638
|
+
gap: 4,
|
|
1639
|
+
}}>
|
|
1385
1640
|
{renderSettingRow({
|
|
1386
1641
|
icon: <NetworkIcons_1.AnalyticsIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1387
1642
|
label: 'Events Captured',
|
|
@@ -1389,7 +1644,14 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1389
1644
|
isLast: true,
|
|
1390
1645
|
})}
|
|
1391
1646
|
</react_native_1.View>
|
|
1392
|
-
<react_native_1.View style={{
|
|
1647
|
+
<react_native_1.View style={{
|
|
1648
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1649
|
+
borderRadius: 12,
|
|
1650
|
+
borderWidth: 1,
|
|
1651
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1652
|
+
padding: 16,
|
|
1653
|
+
marginTop: 12,
|
|
1654
|
+
}}>
|
|
1393
1655
|
{renderSettingRow({
|
|
1394
1656
|
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1395
1657
|
label: 'Clear Analytics History',
|
|
@@ -1400,8 +1662,21 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1400
1662
|
setSelectedEvent(null);
|
|
1401
1663
|
react_native_1.Alert.alert('Success', 'Analytics events cleared.');
|
|
1402
1664
|
},
|
|
1403
|
-
right: (<react_native_1.View style={{
|
|
1404
|
-
|
|
1665
|
+
right: (<react_native_1.View style={{
|
|
1666
|
+
paddingHorizontal: 10,
|
|
1667
|
+
paddingVertical: 5,
|
|
1668
|
+
borderRadius: 7,
|
|
1669
|
+
backgroundColor: 'rgba(255,46,87,0.08)',
|
|
1670
|
+
borderWidth: 1,
|
|
1671
|
+
borderColor: 'rgba(255,46,87,0.2)',
|
|
1672
|
+
}}>
|
|
1673
|
+
<react_native_1.Text style={{
|
|
1674
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1675
|
+
fontSize: 11,
|
|
1676
|
+
color: AppColors_1.AppColors.errorColor,
|
|
1677
|
+
}}>
|
|
1678
|
+
Clear
|
|
1679
|
+
</react_native_1.Text>
|
|
1405
1680
|
</react_native_1.View>),
|
|
1406
1681
|
})}
|
|
1407
1682
|
</react_native_1.View>
|
|
@@ -1410,25 +1685,46 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1410
1685
|
if (settingsPage === 'webview') {
|
|
1411
1686
|
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1412
1687
|
{renderSubHeader('WebView Settings', <NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={16}/>, `History: ${webViewNavHistory.length}`)}
|
|
1413
|
-
<react_native_1.View style={{
|
|
1688
|
+
<react_native_1.View style={{
|
|
1689
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1690
|
+
padding: 16,
|
|
1691
|
+
borderRadius: 12,
|
|
1692
|
+
borderWidth: 1,
|
|
1693
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1694
|
+
gap: 4,
|
|
1695
|
+
}}>
|
|
1414
1696
|
{renderSettingRow({
|
|
1415
1697
|
icon: <NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1416
1698
|
label: 'Capture CSS & JavaScript',
|
|
1417
1699
|
description: 'Extract stylesheet and script source from pages',
|
|
1418
1700
|
onPress: () => setWebViewCaptureCssJs(prev => !prev),
|
|
1419
1701
|
right: (<react_native_1.View style={{
|
|
1420
|
-
width: 22,
|
|
1702
|
+
width: 22,
|
|
1703
|
+
height: 22,
|
|
1704
|
+
borderRadius: 6,
|
|
1421
1705
|
borderWidth: 2,
|
|
1422
|
-
borderColor: webViewCaptureCssJs
|
|
1423
|
-
|
|
1424
|
-
|
|
1706
|
+
borderColor: webViewCaptureCssJs
|
|
1707
|
+
? AppColors_1.AppColors.purple
|
|
1708
|
+
: AppColors_1.AppColors.grayTextWeak,
|
|
1709
|
+
backgroundColor: webViewCaptureCssJs
|
|
1710
|
+
? 'rgba(104, 75, 155, 0.1)'
|
|
1711
|
+
: 'transparent',
|
|
1712
|
+
alignItems: 'center',
|
|
1713
|
+
justifyContent: 'center',
|
|
1425
1714
|
}}>
|
|
1426
|
-
{webViewCaptureCssJs && <NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>}
|
|
1715
|
+
{webViewCaptureCssJs && (<NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>)}
|
|
1427
1716
|
</react_native_1.View>),
|
|
1428
1717
|
isLast: true,
|
|
1429
1718
|
})}
|
|
1430
1719
|
</react_native_1.View>
|
|
1431
|
-
<react_native_1.View style={{
|
|
1720
|
+
<react_native_1.View style={{
|
|
1721
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1722
|
+
borderRadius: 12,
|
|
1723
|
+
borderWidth: 1,
|
|
1724
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1725
|
+
padding: 16,
|
|
1726
|
+
marginTop: 12,
|
|
1727
|
+
}}>
|
|
1432
1728
|
{renderSettingRow({
|
|
1433
1729
|
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1434
1730
|
label: 'Clear WebView Data',
|
|
@@ -1438,8 +1734,21 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1438
1734
|
(0, webViewLogger_1.clearWebViewData)();
|
|
1439
1735
|
react_native_1.Alert.alert('Success', 'WebView source history cleared.');
|
|
1440
1736
|
},
|
|
1441
|
-
right: (<react_native_1.View style={{
|
|
1442
|
-
|
|
1737
|
+
right: (<react_native_1.View style={{
|
|
1738
|
+
paddingHorizontal: 10,
|
|
1739
|
+
paddingVertical: 5,
|
|
1740
|
+
borderRadius: 7,
|
|
1741
|
+
backgroundColor: 'rgba(255,46,87,0.08)',
|
|
1742
|
+
borderWidth: 1,
|
|
1743
|
+
borderColor: 'rgba(255,46,87,0.2)',
|
|
1744
|
+
}}>
|
|
1745
|
+
<react_native_1.Text style={{
|
|
1746
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1747
|
+
fontSize: 11,
|
|
1748
|
+
color: AppColors_1.AppColors.errorColor,
|
|
1749
|
+
}}>
|
|
1750
|
+
Clear
|
|
1751
|
+
</react_native_1.Text>
|
|
1443
1752
|
</react_native_1.View>),
|
|
1444
1753
|
})}
|
|
1445
1754
|
</react_native_1.View>
|
|
@@ -1448,20 +1757,34 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1448
1757
|
if (settingsPage === 'redux') {
|
|
1449
1758
|
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1450
1759
|
{renderSubHeader('Redux Settings', <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>, `Reducers: ${Object.keys(reduxState || {}).length}`)}
|
|
1451
|
-
<react_native_1.View style={{
|
|
1760
|
+
<react_native_1.View style={{
|
|
1761
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1762
|
+
padding: 16,
|
|
1763
|
+
borderRadius: 12,
|
|
1764
|
+
borderWidth: 1,
|
|
1765
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1766
|
+
gap: 4,
|
|
1767
|
+
}}>
|
|
1452
1768
|
{renderSettingRow({
|
|
1453
1769
|
icon: <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1454
1770
|
label: 'Auto-refresh Store',
|
|
1455
1771
|
description: 'Automatically capture Redux store state updates',
|
|
1456
1772
|
onPress: () => setReduxAutoRefreshState(prev => !prev),
|
|
1457
1773
|
right: (<react_native_1.View style={{
|
|
1458
|
-
width: 22,
|
|
1774
|
+
width: 22,
|
|
1775
|
+
height: 22,
|
|
1776
|
+
borderRadius: 6,
|
|
1459
1777
|
borderWidth: 2,
|
|
1460
|
-
borderColor: reduxAutoRefresh
|
|
1461
|
-
|
|
1462
|
-
|
|
1778
|
+
borderColor: reduxAutoRefresh
|
|
1779
|
+
? AppColors_1.AppColors.purple
|
|
1780
|
+
: AppColors_1.AppColors.grayTextWeak,
|
|
1781
|
+
backgroundColor: reduxAutoRefresh
|
|
1782
|
+
? 'rgba(104, 75, 155, 0.1)'
|
|
1783
|
+
: 'transparent',
|
|
1784
|
+
alignItems: 'center',
|
|
1785
|
+
justifyContent: 'center',
|
|
1463
1786
|
}}>
|
|
1464
|
-
{reduxAutoRefresh && <NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>}
|
|
1787
|
+
{reduxAutoRefresh && (<NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>)}
|
|
1465
1788
|
</react_native_1.View>),
|
|
1466
1789
|
})}
|
|
1467
1790
|
<react_native_1.View style={{ height: 1, backgroundColor: AppColors_1.AppColors.dividerColor }}/>
|
|
@@ -1478,18 +1801,40 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1478
1801
|
})}
|
|
1479
1802
|
</react_native_1.View>
|
|
1480
1803
|
|
|
1481
|
-
<react_native_1.View style={{
|
|
1804
|
+
<react_native_1.View style={{
|
|
1805
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1806
|
+
borderRadius: 12,
|
|
1807
|
+
borderWidth: 1,
|
|
1808
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1809
|
+
padding: 16,
|
|
1810
|
+
marginTop: 12,
|
|
1811
|
+
}}>
|
|
1482
1812
|
{renderSettingRow({
|
|
1483
1813
|
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1484
1814
|
label: 'Clear Redux State',
|
|
1485
|
-
description: reduxState
|
|
1815
|
+
description: reduxState
|
|
1816
|
+
? 'Reset state snapshot in inspector'
|
|
1817
|
+
: 'No store snapshot stored',
|
|
1486
1818
|
isLast: true,
|
|
1487
1819
|
onPress: () => {
|
|
1488
1820
|
setReduxState(null);
|
|
1489
1821
|
react_native_1.Alert.alert('Success', 'Redux state snapshot cleared.');
|
|
1490
1822
|
},
|
|
1491
|
-
right: (<react_native_1.View style={{
|
|
1492
|
-
|
|
1823
|
+
right: (<react_native_1.View style={{
|
|
1824
|
+
paddingHorizontal: 10,
|
|
1825
|
+
paddingVertical: 5,
|
|
1826
|
+
borderRadius: 7,
|
|
1827
|
+
backgroundColor: 'rgba(255,46,87,0.08)',
|
|
1828
|
+
borderWidth: 1,
|
|
1829
|
+
borderColor: 'rgba(255,46,87,0.2)',
|
|
1830
|
+
}}>
|
|
1831
|
+
<react_native_1.Text style={{
|
|
1832
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1833
|
+
fontSize: 11,
|
|
1834
|
+
color: AppColors_1.AppColors.errorColor,
|
|
1835
|
+
}}>
|
|
1836
|
+
Clear
|
|
1837
|
+
</react_native_1.Text>
|
|
1493
1838
|
</react_native_1.View>),
|
|
1494
1839
|
})}
|
|
1495
1840
|
</react_native_1.View>
|
|
@@ -1498,7 +1843,14 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1498
1843
|
// Default return page is Insights settings
|
|
1499
1844
|
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1500
1845
|
{renderSubHeader('Insights Settings', <NetworkIcons_1.InsightsIcon color={AppColors_1.AppColors.purple} size={16}/>)}
|
|
1501
|
-
<react_native_1.View style={{
|
|
1846
|
+
<react_native_1.View style={{
|
|
1847
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1848
|
+
padding: 16,
|
|
1849
|
+
borderRadius: 12,
|
|
1850
|
+
borderWidth: 1,
|
|
1851
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1852
|
+
gap: 4,
|
|
1853
|
+
}}>
|
|
1502
1854
|
{renderSettingRow({
|
|
1503
1855
|
icon: <NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1504
1856
|
label: 'Slow Latency Warning',
|
|
@@ -1517,13 +1869,20 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1517
1869
|
isLast: true,
|
|
1518
1870
|
onPress: () => setInsightsShowConsoleAlerts(prev => !prev),
|
|
1519
1871
|
right: (<react_native_1.View style={{
|
|
1520
|
-
width: 22,
|
|
1872
|
+
width: 22,
|
|
1873
|
+
height: 22,
|
|
1874
|
+
borderRadius: 6,
|
|
1521
1875
|
borderWidth: 2,
|
|
1522
|
-
borderColor: insightsShowConsoleAlerts
|
|
1523
|
-
|
|
1524
|
-
|
|
1876
|
+
borderColor: insightsShowConsoleAlerts
|
|
1877
|
+
? AppColors_1.AppColors.purple
|
|
1878
|
+
: AppColors_1.AppColors.grayTextWeak,
|
|
1879
|
+
backgroundColor: insightsShowConsoleAlerts
|
|
1880
|
+
? 'rgba(104, 75, 155, 0.1)'
|
|
1881
|
+
: 'transparent',
|
|
1882
|
+
alignItems: 'center',
|
|
1883
|
+
justifyContent: 'center',
|
|
1525
1884
|
}}>
|
|
1526
|
-
{insightsShowConsoleAlerts && <NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>}
|
|
1885
|
+
{insightsShowConsoleAlerts && (<NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>)}
|
|
1527
1886
|
</react_native_1.View>),
|
|
1528
1887
|
})}
|
|
1529
1888
|
</react_native_1.View>
|
|
@@ -1531,10 +1890,14 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1531
1890
|
};
|
|
1532
1891
|
const renderInsightsDashboard = () => {
|
|
1533
1892
|
const apiTotal = logs.length;
|
|
1534
|
-
const apiErrors = logs.filter(l => (l.status != null && l.status >= 400) ||
|
|
1893
|
+
const apiErrors = logs.filter(l => (l.status != null && l.status >= 400) ||
|
|
1894
|
+
l.status === 0 ||
|
|
1895
|
+
l.status == null).length;
|
|
1535
1896
|
const apiSuccess = apiTotal - apiErrors;
|
|
1536
1897
|
const apiSuccessRate = apiTotal > 0 ? Math.round((apiSuccess / apiTotal) * 100) : 100;
|
|
1537
|
-
const durations = logs
|
|
1898
|
+
const durations = logs
|
|
1899
|
+
.filter(l => l.duration != null)
|
|
1900
|
+
.map(l => l.duration);
|
|
1538
1901
|
const avgTime = durations.length > 0
|
|
1539
1902
|
? Math.round(durations.reduce((a, b) => a + b, 0) / durations.length)
|
|
1540
1903
|
: null;
|
|
@@ -1544,11 +1907,13 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1544
1907
|
const logInfos = visibleConsoleLogs.filter(l => l.type === 'info').length;
|
|
1545
1908
|
const analyticsTotal = analyticsEvents.length;
|
|
1546
1909
|
const uniqueEvents = new Set(analyticsEvents.map(e => e.name)).size;
|
|
1547
|
-
const screenViews = analyticsEvents.filter(e => e.name === 'screen_view' ||
|
|
1910
|
+
const screenViews = analyticsEvents.filter(e => e.name === 'screen_view' ||
|
|
1911
|
+
e.name === 'page_view' ||
|
|
1912
|
+
e.name === 'firebase_screen_class').length;
|
|
1548
1913
|
const webviewTotal = webViewNavHistory.length;
|
|
1549
1914
|
return (<react_native_1.View style={styles_1.default.dashboardContainer}>
|
|
1550
1915
|
{/* Module 1: APIs */}
|
|
1551
|
-
{tabVisibility.apis && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() =>
|
|
1916
|
+
{tabVisibility.apis && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => switchActiveTab('apis')}>
|
|
1552
1917
|
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1553
1918
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1554
1919
|
<NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={18}/>
|
|
@@ -1562,13 +1927,19 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1562
1927
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Requests</react_native_1.Text>
|
|
1563
1928
|
</react_native_1.View>
|
|
1564
1929
|
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1565
|
-
<react_native_1.Text style={[
|
|
1930
|
+
<react_native_1.Text style={[
|
|
1931
|
+
styles_1.default.dashboardGridVal,
|
|
1932
|
+
apiSuccessRate < 90 && { color: AppColors_1.AppColors.warningIconGold },
|
|
1933
|
+
]}>
|
|
1566
1934
|
{apiSuccessRate}%
|
|
1567
1935
|
</react_native_1.Text>
|
|
1568
1936
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Success Rate</react_native_1.Text>
|
|
1569
1937
|
</react_native_1.View>
|
|
1570
1938
|
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1571
|
-
<react_native_1.Text style={[
|
|
1939
|
+
<react_native_1.Text style={[
|
|
1940
|
+
styles_1.default.dashboardGridVal,
|
|
1941
|
+
apiErrors > 0 && { color: AppColors_1.AppColors.errorColor },
|
|
1942
|
+
]}>
|
|
1572
1943
|
{apiErrors}
|
|
1573
1944
|
</react_native_1.Text>
|
|
1574
1945
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Errors</react_native_1.Text>
|
|
@@ -1583,7 +1954,7 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1583
1954
|
</TouchableScale_1.default>)}
|
|
1584
1955
|
|
|
1585
1956
|
{/* Module 2: Logs */}
|
|
1586
|
-
{tabVisibility.logs && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() =>
|
|
1957
|
+
{tabVisibility.logs && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => switchActiveTab('logs')}>
|
|
1587
1958
|
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1588
1959
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1589
1960
|
<NetworkIcons_1.TerminalIcon color="#0D9488" size={18}/>
|
|
@@ -1597,17 +1968,25 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1597
1968
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Total Logs</react_native_1.Text>
|
|
1598
1969
|
</react_native_1.View>
|
|
1599
1970
|
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1600
|
-
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#0D9488' }]}>
|
|
1971
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#0D9488' }]}>
|
|
1972
|
+
{logInfos}
|
|
1973
|
+
</react_native_1.Text>
|
|
1601
1974
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Info</react_native_1.Text>
|
|
1602
1975
|
</react_native_1.View>
|
|
1603
1976
|
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1604
|
-
<react_native_1.Text style={[
|
|
1977
|
+
<react_native_1.Text style={[
|
|
1978
|
+
styles_1.default.dashboardGridVal,
|
|
1979
|
+
logWarns > 0 && { color: AppColors_1.AppColors.warningIconGold },
|
|
1980
|
+
]}>
|
|
1605
1981
|
{logWarns}
|
|
1606
1982
|
</react_native_1.Text>
|
|
1607
1983
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Warnings</react_native_1.Text>
|
|
1608
1984
|
</react_native_1.View>
|
|
1609
1985
|
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1610
|
-
<react_native_1.Text style={[
|
|
1986
|
+
<react_native_1.Text style={[
|
|
1987
|
+
styles_1.default.dashboardGridVal,
|
|
1988
|
+
logErrors > 0 && { color: AppColors_1.AppColors.errorColor },
|
|
1989
|
+
]}>
|
|
1611
1990
|
{logErrors}
|
|
1612
1991
|
</react_native_1.Text>
|
|
1613
1992
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Errors</react_native_1.Text>
|
|
@@ -1616,11 +1995,13 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1616
1995
|
</TouchableScale_1.default>)}
|
|
1617
1996
|
|
|
1618
1997
|
{/* Module 3: Analytics */}
|
|
1619
|
-
{tabVisibility.analytics && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() =>
|
|
1998
|
+
{tabVisibility.analytics && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => switchActiveTab('analytics')}>
|
|
1620
1999
|
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1621
2000
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1622
2001
|
<NetworkIcons_1.AnalyticsIcon color="#EA580C" size={18}/>
|
|
1623
|
-
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>
|
|
2002
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>
|
|
2003
|
+
Analytics Events
|
|
2004
|
+
</react_native_1.Text>
|
|
1624
2005
|
</react_native_1.View>
|
|
1625
2006
|
<react_native_1.Text style={styles_1.default.dashboardModuleGoText}>View Details →</react_native_1.Text>
|
|
1626
2007
|
</react_native_1.View>
|
|
@@ -1630,7 +2011,9 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1630
2011
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Total Events</react_native_1.Text>
|
|
1631
2012
|
</react_native_1.View>
|
|
1632
2013
|
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1633
|
-
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#EA580C' }]}>
|
|
2014
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#EA580C' }]}>
|
|
2015
|
+
{uniqueEvents}
|
|
2016
|
+
</react_native_1.Text>
|
|
1634
2017
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Unique Names</react_native_1.Text>
|
|
1635
2018
|
</react_native_1.View>
|
|
1636
2019
|
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
@@ -1639,7 +2022,9 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1639
2022
|
</react_native_1.View>
|
|
1640
2023
|
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1641
2024
|
<react_native_1.Text style={styles_1.default.dashboardGridVal}>
|
|
1642
|
-
{analyticsTotal > 0
|
|
2025
|
+
{analyticsTotal > 0
|
|
2026
|
+
? Math.round(analyticsTotal / Math.max(1, logs.length / 5))
|
|
2027
|
+
: 0}
|
|
1643
2028
|
</react_native_1.Text>
|
|
1644
2029
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Events Ratio</react_native_1.Text>
|
|
1645
2030
|
</react_native_1.View>
|
|
@@ -1647,11 +2032,13 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1647
2032
|
</TouchableScale_1.default>)}
|
|
1648
2033
|
|
|
1649
2034
|
{/* Module 4: WebView */}
|
|
1650
|
-
{tabVisibility.webview && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() =>
|
|
2035
|
+
{tabVisibility.webview && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => switchActiveTab('webview')}>
|
|
1651
2036
|
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1652
2037
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1653
2038
|
<NetworkIcons_1.GlobeIcon color="#2563EB" size={18}/>
|
|
1654
|
-
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>
|
|
2039
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>
|
|
2040
|
+
WebView Captures
|
|
2041
|
+
</react_native_1.Text>
|
|
1655
2042
|
</react_native_1.View>
|
|
1656
2043
|
<react_native_1.Text style={styles_1.default.dashboardModuleGoText}>View Details →</react_native_1.Text>
|
|
1657
2044
|
</react_native_1.View>
|
|
@@ -1661,12 +2048,16 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1661
2048
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>History Size</react_native_1.Text>
|
|
1662
2049
|
</react_native_1.View>
|
|
1663
2050
|
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1664
|
-
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#16A34A' }]}>
|
|
2051
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#16A34A' }]}>
|
|
2052
|
+
Active
|
|
2053
|
+
</react_native_1.Text>
|
|
1665
2054
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Status</react_native_1.Text>
|
|
1666
2055
|
</react_native_1.View>
|
|
1667
2056
|
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1668
2057
|
<react_native_1.Text numberOfLines={1} style={styles_1.default.dashboardGridVal}>
|
|
1669
|
-
{webviewTotal > 0
|
|
2058
|
+
{webviewTotal > 0
|
|
2059
|
+
? `${webViewNavHistory[0]?.title?.substring(0, 10) ?? ''}...`
|
|
2060
|
+
: '—'}
|
|
1670
2061
|
</react_native_1.Text>
|
|
1671
2062
|
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Last URL</react_native_1.Text>
|
|
1672
2063
|
</react_native_1.View>
|
|
@@ -1674,38 +2065,73 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1674
2065
|
</TouchableScale_1.default>)}
|
|
1675
2066
|
|
|
1676
2067
|
{/* Module 5: Redux Store */}
|
|
1677
|
-
{tabVisibility.redux && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() =>
|
|
2068
|
+
{tabVisibility.redux && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => switchActiveTab('redux')}>
|
|
1678
2069
|
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1679
2070
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1680
2071
|
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={18}/>
|
|
1681
|
-
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>
|
|
2072
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>
|
|
2073
|
+
Redux Store State
|
|
2074
|
+
</react_native_1.Text>
|
|
1682
2075
|
</react_native_1.View>
|
|
1683
2076
|
<react_native_1.Text style={styles_1.default.dashboardModuleGoText}>View Details →</react_native_1.Text>
|
|
1684
2077
|
</react_native_1.View>
|
|
1685
2078
|
{reduxState ? (<react_native_1.View style={{ paddingHorizontal: 12, paddingBottom: 12, gap: 6 }}>
|
|
1686
|
-
<react_native_1.View style={{
|
|
1687
|
-
|
|
2079
|
+
<react_native_1.View style={{
|
|
2080
|
+
flexDirection: 'row',
|
|
2081
|
+
justifyContent: 'space-between',
|
|
2082
|
+
marginBottom: 4,
|
|
2083
|
+
}}>
|
|
2084
|
+
<react_native_1.Text style={{
|
|
2085
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2086
|
+
fontSize: 10,
|
|
2087
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
2088
|
+
letterSpacing: 0.5,
|
|
2089
|
+
}}>
|
|
1688
2090
|
REDUCER NAME
|
|
1689
2091
|
</react_native_1.Text>
|
|
1690
|
-
<react_native_1.Text style={{
|
|
2092
|
+
<react_native_1.Text style={{
|
|
2093
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2094
|
+
fontSize: 10,
|
|
2095
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
2096
|
+
letterSpacing: 0.5,
|
|
2097
|
+
}}>
|
|
1691
2098
|
SIZE / FIELDS
|
|
1692
2099
|
</react_native_1.Text>
|
|
1693
2100
|
</react_native_1.View>
|
|
1694
2101
|
{Object.keys(reduxState).map(key => {
|
|
1695
2102
|
const val = reduxState[key];
|
|
1696
|
-
const fieldsCount = typeof val === 'object' && val !== null
|
|
2103
|
+
const fieldsCount = typeof val === 'object' && val !== null
|
|
2104
|
+
? Object.keys(val).length
|
|
2105
|
+
: 0;
|
|
1697
2106
|
const sizeStr = (0, helpers_1.getSize)(val);
|
|
1698
|
-
return (<react_native_1.View key={key} style={{
|
|
1699
|
-
|
|
2107
|
+
return (<react_native_1.View key={key} style={{
|
|
2108
|
+
flexDirection: 'row',
|
|
2109
|
+
justifyContent: 'space-between',
|
|
2110
|
+
alignItems: 'center',
|
|
2111
|
+
paddingVertical: 2,
|
|
2112
|
+
}}>
|
|
2113
|
+
<react_native_1.Text style={{
|
|
2114
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2115
|
+
fontSize: 12,
|
|
2116
|
+
color: AppColors_1.AppColors.grayTextStrong,
|
|
2117
|
+
}}>
|
|
1700
2118
|
{key}
|
|
1701
2119
|
</react_native_1.Text>
|
|
1702
|
-
<react_native_1.Text style={{
|
|
2120
|
+
<react_native_1.Text style={{
|
|
2121
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2122
|
+
fontSize: 11,
|
|
2123
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
2124
|
+
}}>
|
|
1703
2125
|
{sizeStr} ({fieldsCount} fields)
|
|
1704
2126
|
</react_native_1.Text>
|
|
1705
2127
|
</react_native_1.View>);
|
|
1706
2128
|
})}
|
|
1707
2129
|
</react_native_1.View>) : (<react_native_1.View style={{ padding: 12, alignItems: 'center' }}>
|
|
1708
|
-
<react_native_1.Text style={{
|
|
2130
|
+
<react_native_1.Text style={{
|
|
2131
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2132
|
+
fontSize: 12,
|
|
2133
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
2134
|
+
}}>
|
|
1709
2135
|
No connected Redux store.
|
|
1710
2136
|
</react_native_1.Text>
|
|
1711
2137
|
</react_native_1.View>)}
|
|
@@ -1760,10 +2186,19 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1760
2186
|
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={20}/>
|
|
1761
2187
|
</react_native_1.View>
|
|
1762
2188
|
<react_native_1.View style={{ flex: 1 }}>
|
|
1763
|
-
<react_native_1.Text style={{
|
|
2189
|
+
<react_native_1.Text style={{
|
|
2190
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2191
|
+
fontSize: 13,
|
|
2192
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
2193
|
+
}}>
|
|
1764
2194
|
Redux Store Snapshot
|
|
1765
2195
|
</react_native_1.Text>
|
|
1766
|
-
<react_native_1.Text style={{
|
|
2196
|
+
<react_native_1.Text style={{
|
|
2197
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2198
|
+
fontSize: 11,
|
|
2199
|
+
color: AppColors_1.AppColors.grayText,
|
|
2200
|
+
marginTop: 2,
|
|
2201
|
+
}}>
|
|
1767
2202
|
Total size: {(0, helpers_1.getSize)(reduxState)} • {reducerKeys.length} Reducers
|
|
1768
2203
|
</react_native_1.Text>
|
|
1769
2204
|
</react_native_1.View>
|
|
@@ -1781,23 +2216,33 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1781
2216
|
borderWidth: 1,
|
|
1782
2217
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
1783
2218
|
}}>
|
|
1784
|
-
<react_native_1.TouchableOpacity onPress={() =>
|
|
2219
|
+
<react_native_1.TouchableOpacity onPress={() => {
|
|
2220
|
+
animateNextLayout();
|
|
2221
|
+
setReduxActiveSubTab('timeline');
|
|
2222
|
+
}} style={{
|
|
1785
2223
|
flex: 1,
|
|
1786
2224
|
paddingVertical: 6,
|
|
1787
2225
|
alignItems: 'center',
|
|
1788
2226
|
justifyContent: 'center',
|
|
1789
2227
|
borderRadius: 8,
|
|
1790
|
-
backgroundColor: reduxActiveSubTab === 'timeline'
|
|
2228
|
+
backgroundColor: reduxActiveSubTab === 'timeline'
|
|
2229
|
+
? AppColors_1.AppColors.purple
|
|
2230
|
+
: 'transparent',
|
|
1791
2231
|
}}>
|
|
1792
2232
|
<react_native_1.Text style={{
|
|
1793
2233
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1794
2234
|
fontSize: 11,
|
|
1795
|
-
color: reduxActiveSubTab === 'timeline'
|
|
2235
|
+
color: reduxActiveSubTab === 'timeline'
|
|
2236
|
+
? '#FFFFFF'
|
|
2237
|
+
: AppColors_1.AppColors.grayText,
|
|
1796
2238
|
}}>
|
|
1797
2239
|
⚡ Action Timeline
|
|
1798
2240
|
</react_native_1.Text>
|
|
1799
2241
|
</react_native_1.TouchableOpacity>
|
|
1800
|
-
<react_native_1.TouchableOpacity onPress={() =>
|
|
2242
|
+
<react_native_1.TouchableOpacity onPress={() => {
|
|
2243
|
+
animateNextLayout();
|
|
2244
|
+
setReduxActiveSubTab('tree');
|
|
2245
|
+
}} style={{
|
|
1801
2246
|
flex: 1,
|
|
1802
2247
|
paddingVertical: 6,
|
|
1803
2248
|
alignItems: 'center',
|
|
@@ -1828,7 +2273,9 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1828
2273
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
1829
2274
|
height: 36,
|
|
1830
2275
|
}}>
|
|
1831
|
-
<react_native_1.TextInput placeholder={reduxActiveSubTab === 'timeline'
|
|
2276
|
+
<react_native_1.TextInput placeholder={reduxActiveSubTab === 'timeline'
|
|
2277
|
+
? 'Search actions or payloads...'
|
|
2278
|
+
: 'Search Redux keys or values...'} placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={reduxSearch} onChangeText={setReduxSearch} style={{
|
|
1832
2279
|
flex: 1,
|
|
1833
2280
|
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
1834
2281
|
fontSize: 12,
|
|
@@ -1874,23 +2321,24 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1874
2321
|
<react_native_1.Modal visible={visible} animationType="slide" transparent>
|
|
1875
2322
|
{visible && (<ErrorBoundary_1.default onClose={closeModal}>
|
|
1876
2323
|
<react_native_1.View style={styles_1.default.modalBackdrop}>
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
2324
|
+
<react_native_1.Pressable style={styles_1.default.modalBackdropPressable} onPress={closeModal}/>
|
|
2325
|
+
<react_native_1.View style={styles_1.default.modalContentCard}>
|
|
2326
|
+
<react_native_1.StatusBar translucent backgroundColor="transparent" barStyle="light-content"/>
|
|
1880
2327
|
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
2328
|
+
<react_native_linear_gradient_1.default colors={[AppColors_1.AppColors.purple, '#6B4EFF']} style={styles_1.default.headerGradient}>
|
|
2329
|
+
<react_native_1.View style={styles_1.default.header}>
|
|
2330
|
+
<react_native_1.View style={[
|
|
1884
2331
|
styles_1.default.headerLeft,
|
|
1885
2332
|
{
|
|
1886
2333
|
flexDirection: 'row',
|
|
1887
2334
|
alignItems: 'center',
|
|
1888
2335
|
gap: 16,
|
|
1889
|
-
flex:
|
|
2336
|
+
flex: selected == null && selectedEvent == null ? 5 : 1,
|
|
1890
2337
|
},
|
|
1891
2338
|
]}>
|
|
1892
|
-
|
|
2339
|
+
<TouchableScale_1.default onPress={() => {
|
|
1893
2340
|
requestAnimationFrame(() => {
|
|
2341
|
+
animateNextLayout();
|
|
1894
2342
|
setSelected(null);
|
|
1895
2343
|
setSelectedEvent(null);
|
|
1896
2344
|
});
|
|
@@ -1899,14 +2347,19 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1899
2347
|
selected == null &&
|
|
1900
2348
|
selectedEvent == null && { display: 'none' },
|
|
1901
2349
|
]}>
|
|
1902
|
-
|
|
1903
|
-
|
|
2350
|
+
<NetworkIcons_1.WhiteBackNavigation />
|
|
2351
|
+
</TouchableScale_1.default>
|
|
1904
2352
|
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
2353
|
+
{selected == null && selectedEvent == null ? (<react_native_1.View style={{
|
|
2354
|
+
flexDirection: 'row',
|
|
2355
|
+
alignItems: 'center',
|
|
2356
|
+
gap: 14,
|
|
2357
|
+
flex: 1,
|
|
2358
|
+
}}>
|
|
2359
|
+
<react_native_1.View style={{
|
|
2360
|
+
width: 42,
|
|
2361
|
+
height: 42,
|
|
2362
|
+
borderRadius: 10,
|
|
1910
2363
|
backgroundColor: 'rgba(255,255,255,0.13)',
|
|
1911
2364
|
borderWidth: 1.5,
|
|
1912
2365
|
borderColor: 'rgba(255,255,255,0.25)',
|
|
@@ -1917,56 +2370,80 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1917
2370
|
shadowRadius: 4,
|
|
1918
2371
|
shadowOffset: { width: 0, height: 2 },
|
|
1919
2372
|
}}>
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
2373
|
+
<NetworkIcons_1.BrandSquareIcon size={36}/>
|
|
2374
|
+
</react_native_1.View>
|
|
2375
|
+
<react_native_1.View style={{ gap: 3 }}>
|
|
2376
|
+
<react_native_1.Text style={[
|
|
2377
|
+
styles_1.default.headerTitle,
|
|
2378
|
+
{ fontSize: 17, letterSpacing: 0.2 },
|
|
2379
|
+
]}>
|
|
2380
|
+
RN InApp Inspector
|
|
1928
2381
|
</react_native_1.Text>
|
|
2382
|
+
<react_native_1.View style={{
|
|
2383
|
+
flexDirection: 'row',
|
|
2384
|
+
alignItems: 'center',
|
|
2385
|
+
gap: 5,
|
|
2386
|
+
}}>
|
|
2387
|
+
<react_native_1.Animated.View style={{
|
|
2388
|
+
width: 6,
|
|
2389
|
+
height: 6,
|
|
2390
|
+
borderRadius: 3,
|
|
2391
|
+
backgroundColor: '#4ADE80',
|
|
2392
|
+
opacity: activePulseAnim,
|
|
2393
|
+
}}/>
|
|
2394
|
+
<react_native_1.Text style={{
|
|
2395
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2396
|
+
fontSize: 10,
|
|
2397
|
+
color: 'rgba(255,255,255,0.78)',
|
|
2398
|
+
letterSpacing: 0.3,
|
|
2399
|
+
}}>
|
|
2400
|
+
Active •{' '}
|
|
2401
|
+
{react_native_1.Platform.OS === 'ios' ? 'iOS' : 'Android'}{' '}
|
|
2402
|
+
(v1.0.13)
|
|
2403
|
+
</react_native_1.Text>
|
|
2404
|
+
</react_native_1.View>
|
|
1929
2405
|
</react_native_1.View>
|
|
1930
|
-
</react_native_1.View>
|
|
1931
|
-
|
|
1932
|
-
</react_native_1.View>
|
|
2406
|
+
</react_native_1.View>) : null}
|
|
2407
|
+
</react_native_1.View>
|
|
1933
2408
|
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
2409
|
+
<react_native_1.View style={styles_1.default.headerCenter}>
|
|
2410
|
+
{selected != null ? (<react_native_1.View style={styles_1.default.headerDetailCenter}>
|
|
2411
|
+
<react_native_1.View style={styles_1.default.headerDetailRow}>
|
|
2412
|
+
<react_native_1.View style={[
|
|
1938
2413
|
styles_1.default.headerMethodBadge,
|
|
1939
2414
|
{
|
|
1940
2415
|
backgroundColor: constants_1.METHOD_COLORS[selected.method] ??
|
|
1941
2416
|
AppColors_1.AppColors.grayText,
|
|
1942
2417
|
},
|
|
1943
2418
|
]}>
|
|
1944
|
-
|
|
1945
|
-
|
|
2419
|
+
<react_native_1.Text style={styles_1.default.headerMethodText}>
|
|
2420
|
+
{selected.method}
|
|
2421
|
+
</react_native_1.Text>
|
|
2422
|
+
</react_native_1.View>
|
|
2423
|
+
<react_native_1.Text style={styles_1.default.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
2424
|
+
{detailTitle}
|
|
1946
2425
|
</react_native_1.Text>
|
|
1947
2426
|
</react_native_1.View>
|
|
1948
|
-
<react_native_1.
|
|
1949
|
-
{
|
|
1950
|
-
</react_native_1.Text>
|
|
1951
|
-
</react_native_1.View>
|
|
1952
|
-
<react_native_1.View style={styles_1.default.headerDetailSubRow}>
|
|
1953
|
-
<react_native_1.View style={[
|
|
2427
|
+
<react_native_1.View style={styles_1.default.headerDetailSubRow}>
|
|
2428
|
+
<react_native_1.View style={[
|
|
1954
2429
|
styles_1.default.headerStatusDot,
|
|
1955
|
-
{
|
|
2430
|
+
{
|
|
2431
|
+
backgroundColor: (0, helpers_1.getStatusColor)(selected.status),
|
|
2432
|
+
},
|
|
1956
2433
|
]}/>
|
|
1957
|
-
|
|
1958
|
-
|
|
2434
|
+
<react_native_1.Text style={styles_1.default.headerSubTitle}>
|
|
2435
|
+
{selected.status === 0
|
|
1959
2436
|
? 'Failed'
|
|
1960
2437
|
: selected.status ?? 'Pending'}{' '}
|
|
1961
|
-
|
|
1962
|
-
|
|
2438
|
+
•{' '}
|
|
2439
|
+
{selected.duration != null
|
|
1963
2440
|
? `${selected.duration}ms`
|
|
1964
2441
|
: '-'}
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
2442
|
+
</react_native_1.Text>
|
|
2443
|
+
</react_native_1.View>
|
|
2444
|
+
</react_native_1.View>) : selectedEvent != null ? (<react_native_1.View style={styles_1.default.headerDetailCenter}>
|
|
2445
|
+
<react_native_1.View style={styles_1.default.headerDetailRow}>
|
|
2446
|
+
<react_native_1.View style={[
|
|
1970
2447
|
styles_1.default.headerMethodBadge,
|
|
1971
2448
|
{
|
|
1972
2449
|
backgroundColor: selectedEvent.source === 'firebase'
|
|
@@ -1974,16 +2451,18 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1974
2451
|
: 'rgba(124,92,191,0.3)',
|
|
1975
2452
|
},
|
|
1976
2453
|
]}>
|
|
1977
|
-
|
|
1978
|
-
|
|
2454
|
+
<react_native_1.Text style={styles_1.default.headerMethodText}>
|
|
2455
|
+
{selectedEvent.source === 'firebase'
|
|
2456
|
+
? 'FB'
|
|
2457
|
+
: 'MAN'}
|
|
2458
|
+
</react_native_1.Text>
|
|
2459
|
+
</react_native_1.View>
|
|
2460
|
+
<react_native_1.Text style={styles_1.default.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
2461
|
+
{selectedEvent.name}
|
|
1979
2462
|
</react_native_1.Text>
|
|
1980
2463
|
</react_native_1.View>
|
|
1981
|
-
<react_native_1.
|
|
1982
|
-
{
|
|
1983
|
-
</react_native_1.Text>
|
|
1984
|
-
</react_native_1.View>
|
|
1985
|
-
<react_native_1.View style={styles_1.default.headerDetailSubRow}>
|
|
1986
|
-
<react_native_1.View style={[
|
|
2464
|
+
<react_native_1.View style={styles_1.default.headerDetailSubRow}>
|
|
2465
|
+
<react_native_1.View style={[
|
|
1987
2466
|
styles_1.default.headerStatusDot,
|
|
1988
2467
|
{
|
|
1989
2468
|
backgroundColor: selectedEvent.source === 'firebase'
|
|
@@ -1991,68 +2470,119 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
1991
2470
|
: AppColors_1.AppColors.purple,
|
|
1992
2471
|
},
|
|
1993
2472
|
]}/>
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
2473
|
+
<react_native_1.Text style={styles_1.default.headerSubTitle}>
|
|
2474
|
+
{Object.keys(selectedEvent.params).length} param
|
|
2475
|
+
{Object.keys(selectedEvent.params).length !== 1
|
|
1997
2476
|
? 's'
|
|
1998
2477
|
: ''}
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2478
|
+
{' · '}
|
|
2479
|
+
{selectedEvent.source}
|
|
2480
|
+
</react_native_1.Text>
|
|
2481
|
+
</react_native_1.View>
|
|
2482
|
+
</react_native_1.View>) : null}
|
|
2483
|
+
</react_native_1.View>
|
|
2005
2484
|
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2485
|
+
<react_native_1.View style={styles_1.default.headerRight}>
|
|
2486
|
+
{selected == null && selectedEvent == null && (<TouchableScale_1.default onPress={() => setSettingsPage('main')} hitSlop={15} style={[
|
|
2487
|
+
styles_1.default.closeButtonSquare,
|
|
2488
|
+
{
|
|
2489
|
+
marginRight: 8,
|
|
2490
|
+
backgroundColor: 'rgba(255,255,255,0.15)',
|
|
2491
|
+
},
|
|
2492
|
+
]}>
|
|
2493
|
+
<NetworkIcons_1.SettingsIcon color="#FFFFFF" size={16}/>
|
|
2494
|
+
</TouchableScale_1.default>)}
|
|
2010
2495
|
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2496
|
+
<TouchableScale_1.default onPress={closeModal} hitSlop={15} style={styles_1.default.closeButtonSquare}>
|
|
2497
|
+
<NetworkIcons_1.CloseWhite size={16}/>
|
|
2498
|
+
</TouchableScale_1.default>
|
|
2499
|
+
</react_native_1.View>
|
|
2014
2500
|
</react_native_1.View>
|
|
2015
|
-
</
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
{
|
|
2022
|
-
|
|
2023
|
-
{
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2501
|
+
</react_native_linear_gradient_1.default>
|
|
2502
|
+
|
|
2503
|
+
{/* ─── Horizontal Scrollable Tab Bar inside Content ─── */}
|
|
2504
|
+
{selected == null &&
|
|
2505
|
+
selectedEvent == null &&
|
|
2506
|
+
settingsPage === null ? (<react_native_1.View style={styles_1.default.tabBarContainer}>
|
|
2507
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{ paddingRight: 16 }}>
|
|
2508
|
+
{[
|
|
2509
|
+
{
|
|
2510
|
+
key: 'insights',
|
|
2511
|
+
label: 'Insights',
|
|
2512
|
+
count: 0,
|
|
2513
|
+
icon: 'insights',
|
|
2514
|
+
},
|
|
2515
|
+
{
|
|
2516
|
+
key: 'apis',
|
|
2517
|
+
label: 'APIs',
|
|
2518
|
+
count: logs.length,
|
|
2519
|
+
icon: 'apis',
|
|
2520
|
+
},
|
|
2521
|
+
{
|
|
2522
|
+
key: 'logs',
|
|
2523
|
+
label: 'Logs',
|
|
2524
|
+
count: consoleLogs.length,
|
|
2525
|
+
icon: 'logs',
|
|
2526
|
+
},
|
|
2527
|
+
{
|
|
2528
|
+
key: 'analytics',
|
|
2529
|
+
label: 'Analytics',
|
|
2530
|
+
count: analyticsEvents.length,
|
|
2531
|
+
icon: 'analytics',
|
|
2532
|
+
},
|
|
2533
|
+
{
|
|
2534
|
+
key: 'webview',
|
|
2535
|
+
label: 'WebView',
|
|
2536
|
+
count: webViewNavHistory.length,
|
|
2537
|
+
icon: 'webview',
|
|
2538
|
+
},
|
|
2539
|
+
{
|
|
2540
|
+
key: 'redux',
|
|
2541
|
+
label: 'Redux',
|
|
2542
|
+
count: 0,
|
|
2543
|
+
icon: 'redux',
|
|
2544
|
+
},
|
|
2545
|
+
]
|
|
2546
|
+
.filter(tab => tabVisibility[tab.key])
|
|
2547
|
+
.map(tab => {
|
|
2029
2548
|
const isActive = activeTab === tab.key;
|
|
2030
|
-
const iconColor = isActive
|
|
2549
|
+
const iconColor = isActive
|
|
2550
|
+
? '#FFFFFF'
|
|
2551
|
+
: AppColors_1.AppColors.grayText;
|
|
2031
2552
|
const countLabel = tab.count > 9 ? '9+' : String(tab.count);
|
|
2032
|
-
const hasUnreadApis = activeTab !== 'apis' &&
|
|
2033
|
-
|
|
2553
|
+
const hasUnreadApis = activeTab !== 'apis' &&
|
|
2554
|
+
logs.length > lastReadApisCount;
|
|
2555
|
+
const hasUnreadLogs = activeTab !== 'logs' &&
|
|
2556
|
+
consoleLogs.length > lastReadLogsCount;
|
|
2034
2557
|
return (<TouchableScale_1.default key={tab.key} onPress={() => {
|
|
2035
2558
|
requestAnimationFrame(() => {
|
|
2036
|
-
|
|
2559
|
+
switchActiveTab(tab.key);
|
|
2037
2560
|
});
|
|
2038
2561
|
}} style={[
|
|
2039
2562
|
styles_1.default.contentTabButton,
|
|
2040
2563
|
isActive && styles_1.default.contentTabButtonActive,
|
|
2041
2564
|
]}>
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2565
|
+
<react_native_1.View style={{
|
|
2566
|
+
flexDirection: 'row',
|
|
2567
|
+
alignItems: 'center',
|
|
2568
|
+
gap: 6,
|
|
2569
|
+
}}>
|
|
2570
|
+
{tab.icon === 'insights' && (<NetworkIcons_1.InsightsIcon color={iconColor} size={14}/>)}
|
|
2571
|
+
{tab.icon === 'apis' && (<NetworkIcons_1.SignalIcon color={iconColor} size={14}/>)}
|
|
2572
|
+
{tab.icon === 'logs' && (<NetworkIcons_1.TerminalIcon color={iconColor} size={14}/>)}
|
|
2573
|
+
{tab.icon === 'analytics' && (<NetworkIcons_1.AnalyticsIcon color={iconColor} size={14}/>)}
|
|
2574
|
+
{tab.icon === 'webview' && (<NetworkIcons_1.GlobeIcon color={iconColor} size={14}/>)}
|
|
2575
|
+
{tab.icon === 'redux' && (<NetworkIcons_1.TerminalIcon color={iconColor} size={14}/>)}
|
|
2576
|
+
<react_native_1.Text numberOfLines={1} ellipsizeMode="tail" style={[
|
|
2050
2577
|
styles_1.default.contentTabButtonText,
|
|
2051
|
-
isActive &&
|
|
2578
|
+
isActive &&
|
|
2579
|
+
styles_1.default.contentTabButtonTextActive,
|
|
2052
2580
|
]}>
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2581
|
+
{tab.label}{' '}
|
|
2582
|
+
{tab.count > 0 ? `(${countLabel})` : ''}
|
|
2583
|
+
</react_native_1.Text>
|
|
2584
|
+
{((tab.key === 'apis' && hasUnreadApis) ||
|
|
2585
|
+
(tab.key === 'logs' && hasUnreadLogs)) && (<react_native_1.Animated.View style={{
|
|
2056
2586
|
width: 6,
|
|
2057
2587
|
height: 6,
|
|
2058
2588
|
borderRadius: 3,
|
|
@@ -2061,42 +2591,45 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2061
2591
|
alignSelf: 'center',
|
|
2062
2592
|
transform: [{ scale: unreadPulseAnim }],
|
|
2063
2593
|
}}/>)}
|
|
2064
|
-
|
|
2065
|
-
|
|
2594
|
+
</react_native_1.View>
|
|
2595
|
+
</TouchableScale_1.default>);
|
|
2066
2596
|
})}
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2597
|
+
</react_native_1.ScrollView>
|
|
2598
|
+
</react_native_1.View>) : null}
|
|
2071
2599
|
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
<react_native_1.View
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
{
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2600
|
+
{/* ─── Secondary Tab Bar for Analytics ──────────────────────── */}
|
|
2601
|
+
{isReady &&
|
|
2602
|
+
activeTab === 'analytics' &&
|
|
2603
|
+
selectedEvent == null && (<react_native_1.View>
|
|
2604
|
+
{/* ─── Search + Shared Toolbar for Analytics ──────────────────────── */}
|
|
2605
|
+
<react_native_1.View style={[
|
|
2606
|
+
styles_1.default.toolbarRow,
|
|
2607
|
+
{ marginTop: 12, marginBottom: 4 },
|
|
2608
|
+
]}>
|
|
2609
|
+
<react_native_1.View style={styles_1.default.searchContainer}>
|
|
2610
|
+
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak} size={16}/>
|
|
2611
|
+
<react_native_1.TextInput placeholder="Search events..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={analyticsSearch} onChangeText={setAnalyticsSearch} style={styles_1.default.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
2612
|
+
{analyticsSearch.length > 0 && (<react_native_1.Pressable onPress={() => setAnalyticsSearch('')} hitSlop={10} style={styles_1.default.clearBtn}>
|
|
2613
|
+
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
2614
|
+
</react_native_1.Pressable>)}
|
|
2615
|
+
</react_native_1.View>
|
|
2616
|
+
{analyticsSubTab === 'ga_events' && (<react_native_1.View style={styles_1.default.toolbarRight}>
|
|
2617
|
+
<TouchableScale_1.default style={[
|
|
2085
2618
|
styles_1.default.toolbarBtn,
|
|
2086
2619
|
!hideScreenView && styles_1.default.toolbarBtnActive,
|
|
2087
2620
|
]} onPress={() => setHideScreenView(prev => !prev)} hitSlop={10}>
|
|
2088
|
-
|
|
2621
|
+
<NetworkIcons_1.ScreenIcon color={!hideScreenView
|
|
2089
2622
|
? AppColors_1.AppColors.purple
|
|
2090
2623
|
: AppColors_1.AppColors.grayTextStrong} size={18}/>
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2624
|
+
</TouchableScale_1.default>
|
|
2625
|
+
<TouchableScale_1.default style={styles_1.default.toolbarBtn} onPress={handleDelete} hitSlop={10}>
|
|
2626
|
+
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.grayTextStrong} size={18}/>
|
|
2627
|
+
</TouchableScale_1.default>
|
|
2628
|
+
</react_native_1.View>)}
|
|
2629
|
+
</react_native_1.View>
|
|
2097
2630
|
|
|
2098
|
-
|
|
2099
|
-
|
|
2631
|
+
{/* ─── Secondary Tab Bar for Analytics ──────────────────────── */}
|
|
2632
|
+
<react_native_1.View style={{
|
|
2100
2633
|
marginHorizontal: 16,
|
|
2101
2634
|
marginTop: 4,
|
|
2102
2635
|
marginBottom: 8,
|
|
@@ -2107,7 +2640,7 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2107
2640
|
borderWidth: 1,
|
|
2108
2641
|
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
2109
2642
|
}}>
|
|
2110
|
-
|
|
2643
|
+
<react_native_1.Pressable style={[
|
|
2111
2644
|
{
|
|
2112
2645
|
flex: 1,
|
|
2113
2646
|
paddingVertical: 8,
|
|
@@ -2122,8 +2655,11 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2122
2655
|
shadowOffset: { width: 0, height: 1 },
|
|
2123
2656
|
elevation: 2,
|
|
2124
2657
|
},
|
|
2125
|
-
]} onPress={() =>
|
|
2126
|
-
|
|
2658
|
+
]} onPress={() => {
|
|
2659
|
+
animateNextLayout();
|
|
2660
|
+
setAnalyticsSubTab('ga_events');
|
|
2661
|
+
}}>
|
|
2662
|
+
<react_native_1.Text style={[
|
|
2127
2663
|
{
|
|
2128
2664
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2129
2665
|
fontSize: 13,
|
|
@@ -2134,14 +2670,14 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2134
2670
|
color: AppColors_1.AppColors.purple,
|
|
2135
2671
|
},
|
|
2136
2672
|
]}>
|
|
2137
|
-
|
|
2138
|
-
|
|
2673
|
+
GA Events (
|
|
2674
|
+
{analyticsSearch
|
|
2139
2675
|
? filteredAnalyticsEvents.length
|
|
2140
2676
|
: analyticsEvents.length}
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2677
|
+
)
|
|
2678
|
+
</react_native_1.Text>
|
|
2679
|
+
</react_native_1.Pressable>
|
|
2680
|
+
<react_native_1.Pressable style={[
|
|
2145
2681
|
{
|
|
2146
2682
|
flex: 1,
|
|
2147
2683
|
paddingVertical: 8,
|
|
@@ -2156,8 +2692,11 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2156
2692
|
shadowOffset: { width: 0, height: 1 },
|
|
2157
2693
|
elevation: 2,
|
|
2158
2694
|
},
|
|
2159
|
-
]} onPress={() =>
|
|
2160
|
-
|
|
2695
|
+
]} onPress={() => {
|
|
2696
|
+
animateNextLayout();
|
|
2697
|
+
setAnalyticsSubTab('top_events');
|
|
2698
|
+
}}>
|
|
2699
|
+
<react_native_1.Text style={[
|
|
2161
2700
|
{
|
|
2162
2701
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2163
2702
|
fontSize: 13,
|
|
@@ -2168,63 +2707,63 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2168
2707
|
color: AppColors_1.AppColors.purple,
|
|
2169
2708
|
},
|
|
2170
2709
|
]}>
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2710
|
+
Top Events ({topEventsArray.length})
|
|
2711
|
+
</react_native_1.Text>
|
|
2712
|
+
</react_native_1.Pressable>
|
|
2713
|
+
</react_native_1.View>
|
|
2714
|
+
</react_native_1.View>)}
|
|
2176
2715
|
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2716
|
+
{isReady ? (activeTab === 'insights' ? (<react_native_1.ScrollView style={styles_1.default.insightsContainer} contentContainerStyle={styles_1.default.insightsContent} showsVerticalScrollIndicator={false}>
|
|
2717
|
+
{renderInsightsDashboard()}
|
|
2718
|
+
</react_native_1.ScrollView>) : activeTab === 'analytics' ? (selectedEvent != null ? (<AnalyticsDetail_1.default event={selectedEvent}/>) : analyticsSubTab === 'top_events' ? (<react_native_1.FlatList data={topEventsArray} keyExtractor={item => item[0]} contentContainerStyle={[
|
|
2180
2719
|
styles_1.default.listContent,
|
|
2181
2720
|
{ paddingHorizontal: 16, paddingTop: 16 },
|
|
2182
|
-
]} renderItem={({ item: [name, count] }) => {
|
|
2721
|
+
]} renderItem={({ item: [name, count], index }) => {
|
|
2183
2722
|
const maxCount = topEventsArray[0]?.[1] || 1;
|
|
2184
2723
|
const color = (0, AnalyticsEventCard_1.getEventColor)(name);
|
|
2185
|
-
return (<
|
|
2724
|
+
return (<AnimatedEntrance_1.default index={index} distance={8} style={[
|
|
2186
2725
|
styles_1.default.analyticsTopEventsCard,
|
|
2187
2726
|
{ marginBottom: 12, paddingVertical: 16 },
|
|
2188
2727
|
]}>
|
|
2189
|
-
|
|
2190
|
-
|
|
2728
|
+
<react_native_1.View style={styles_1.default.analyticsTopEventRow}>
|
|
2729
|
+
<react_native_1.View style={{
|
|
2191
2730
|
flexDirection: 'row',
|
|
2192
2731
|
alignItems: 'center',
|
|
2193
2732
|
gap: 8,
|
|
2194
2733
|
flex: 1,
|
|
2195
2734
|
}}>
|
|
2196
|
-
|
|
2735
|
+
<react_native_1.View style={[
|
|
2197
2736
|
styles_1.default.analyticsIconCircle,
|
|
2198
2737
|
{ backgroundColor: `${color}1A` },
|
|
2199
2738
|
]}>
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2739
|
+
<react_native_svg_1.default width={14} height={14} viewBox="0 0 24 24" fill={color}>
|
|
2740
|
+
<react_native_svg_1.Circle cx="12" cy="12" r="10" opacity="0.3"/>
|
|
2741
|
+
<react_native_svg_1.Path d="M7 14l3-3 4 4 6-6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" fill="none"/>
|
|
2742
|
+
</react_native_svg_1.default>
|
|
2743
|
+
</react_native_1.View>
|
|
2744
|
+
<react_native_1.Text style={styles_1.default.analyticsTopEventName} numberOfLines={2}>
|
|
2745
|
+
{name}
|
|
2746
|
+
</react_native_1.Text>
|
|
2747
|
+
</react_native_1.View>
|
|
2748
|
+
<react_native_1.View style={styles_1.default.analyticsTopEventBarWrap}>
|
|
2749
|
+
<react_native_linear_gradient_1.default colors={[color, `${color}99`]} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }} style={[
|
|
2211
2750
|
styles_1.default.analyticsTopEventBar,
|
|
2212
2751
|
{
|
|
2213
2752
|
width: `${Math.max(6, (count / maxCount) * 100)}%`,
|
|
2214
2753
|
},
|
|
2215
2754
|
]}/>
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2755
|
+
</react_native_1.View>
|
|
2756
|
+
<react_native_1.Text style={styles_1.default.analyticsTopEventCount}>
|
|
2757
|
+
{count}
|
|
2758
|
+
</react_native_1.Text>
|
|
2759
|
+
</react_native_1.View>
|
|
2760
|
+
</AnimatedEntrance_1.default>);
|
|
2222
2761
|
}} ListEmptyComponent={<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2762
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
2763
|
+
<NetworkIcons_1.EmptyRadarIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
2764
|
+
</react_native_1.View>
|
|
2765
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>No Top Events</react_native_1.Text>
|
|
2766
|
+
</react_native_1.View>}/>) : (<react_native_1.FlatList data={filteredAnalyticsEvents} keyExtractor={item => item.id.toString()} renderItem={({ item, index }) => {
|
|
2228
2767
|
const prev = filteredAnalyticsEvents[index + 1];
|
|
2229
2768
|
const next = filteredAnalyticsEvents[index - 1];
|
|
2230
2769
|
const msSincePrev = prev
|
|
@@ -2235,7 +2774,11 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2235
2774
|
? Math.floor(next.timestamp / 60000)
|
|
2236
2775
|
: -1;
|
|
2237
2776
|
const showTimestamp = index === 0 || thisMin !== nextMin;
|
|
2238
|
-
return (<
|
|
2777
|
+
return (<AnimatedEntrance_1.default index={index} distance={8}>
|
|
2778
|
+
<AnalyticsEventCard_1.default event={item} onPress={() => {
|
|
2779
|
+
animateNextLayout();
|
|
2780
|
+
setSelectedEvent(item);
|
|
2781
|
+
}} isNew={newEventIds.has(item.id)} searchStr={analyticsSearch} isFirst={index === 0} isLast={index === filteredAnalyticsEvents.length - 1} msSincePrev={msSincePrev} showTimestamp={showTimestamp} computedScreenName={(() => {
|
|
2239
2782
|
let screenName = item.screenName ||
|
|
2240
2783
|
item.screenClass ||
|
|
2241
2784
|
item.pageTitle ||
|
|
@@ -2253,69 +2796,71 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2253
2796
|
}
|
|
2254
2797
|
}
|
|
2255
2798
|
return screenName;
|
|
2256
|
-
})()}/>
|
|
2799
|
+
})()}/>
|
|
2800
|
+
</AnimatedEntrance_1.default>);
|
|
2257
2801
|
}} initialNumToRender={20} maxToRenderPerBatch={20} windowSize={5} removeClippedSubviews ListEmptyComponent={<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2802
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
2803
|
+
<NetworkIcons_1.EmptyRadarIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
2804
|
+
</react_native_1.View>
|
|
2805
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>
|
|
2806
|
+
{analyticsSearch.length > 0
|
|
2263
2807
|
? 'No matching events'
|
|
2264
2808
|
: 'No analytics events yet'}
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2809
|
+
</react_native_1.Text>
|
|
2810
|
+
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
2811
|
+
{analyticsSearch.length > 0
|
|
2268
2812
|
? 'Try adjusting your search.'
|
|
2269
2813
|
: 'Call setupAnalyticsLogger(analytics()) at app start.'}
|
|
2270
|
-
|
|
2271
|
-
|
|
2814
|
+
</react_native_1.Text>
|
|
2815
|
+
</react_native_1.View>} contentContainerStyle={[
|
|
2272
2816
|
styles_1.default.listContent,
|
|
2273
|
-
filteredAnalyticsEvents.length === 0 && {
|
|
2817
|
+
filteredAnalyticsEvents.length === 0 && {
|
|
2818
|
+
flexGrow: 1,
|
|
2819
|
+
},
|
|
2274
2820
|
]} keyboardShouldPersistTaps="handled"/>)) : activeTab === 'apis' && selected == null ? (<react_native_1.FlatList data={groupedData} keyExtractor={item => item?.id?.toString()} renderItem={renderItem} initialNumToRender={10} maxToRenderPerBatch={10} windowSize={5} removeClippedSubviews={true} ListHeaderComponent={<react_native_1.View style={{ marginTop: 8 }}>
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
<react_native_1.View style={styles_1.default.toolbarRight}>
|
|
2285
|
-
<TouchableScale_1.default style={styles_1.default.toolbarBtn} onPress={handleDelete} hitSlop={10}>
|
|
2286
|
-
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.grayTextStrong} size={18}/>
|
|
2287
|
-
{selectedLogs.size > 0 && (<react_native_1.View style={styles_1.default.trashBadge}>
|
|
2288
|
-
<react_native_1.Text style={styles_1.default.trashBadgeText}>
|
|
2289
|
-
{selectedLogs.size}
|
|
2290
|
-
</react_native_1.Text>
|
|
2291
|
-
</react_native_1.View>)}
|
|
2292
|
-
</TouchableScale_1.default>
|
|
2821
|
+
<react_native_1.View style={styles_1.default.toolbarRow}>
|
|
2822
|
+
<react_native_1.View style={styles_1.default.searchContainer}>
|
|
2823
|
+
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak} size={16}/>
|
|
2824
|
+
<react_native_1.TextInput placeholder="Search endpoints..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={search} onChangeText={setSearch} style={styles_1.default.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
2825
|
+
{search.length > 0 && (<react_native_1.Pressable onPress={() => setSearch('')} hitSlop={10} style={styles_1.default.clearBtn}>
|
|
2826
|
+
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
2827
|
+
</react_native_1.Pressable>)}
|
|
2828
|
+
</react_native_1.View>
|
|
2293
2829
|
|
|
2830
|
+
<react_native_1.View style={styles_1.default.toolbarRight}>
|
|
2831
|
+
<TouchableScale_1.default style={styles_1.default.toolbarBtn} onPress={handleDelete} hitSlop={10}>
|
|
2832
|
+
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.grayTextStrong} size={18}/>
|
|
2833
|
+
{selectedLogs.size > 0 && (<react_native_1.View style={styles_1.default.trashBadge}>
|
|
2834
|
+
<react_native_1.Text style={styles_1.default.trashBadgeText}>
|
|
2835
|
+
{selectedLogs.size}
|
|
2836
|
+
</react_native_1.Text>
|
|
2837
|
+
</react_native_1.View>)}
|
|
2838
|
+
</TouchableScale_1.default>
|
|
2294
2839
|
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2840
|
+
<TouchableScale_1.default style={styles_1.default.toolbarBtn} onPress={() => setSortOrder(o => o === 'newest' ? 'oldest' : 'newest')} hitSlop={10}>
|
|
2841
|
+
<NetworkIcons_1.SortArrowIcon direction={sortOrder === 'newest' ? 'down' : 'up'} color={AppColors_1.AppColors.grayTextStrong} size={18}/>
|
|
2842
|
+
</TouchableScale_1.default>
|
|
2298
2843
|
|
|
2299
|
-
|
|
2844
|
+
<TouchableScale_1.default style={[
|
|
2300
2845
|
styles_1.default.toolbarBtn,
|
|
2301
2846
|
filtersAccordion.isOpen &&
|
|
2302
2847
|
styles_1.default.toolbarBtnActive,
|
|
2303
2848
|
]} onPress={filtersAccordion.toggleOpen} hitSlop={10}>
|
|
2304
|
-
|
|
2849
|
+
<NetworkIcons_1.FilterIcon color={filtersAccordion.isOpen
|
|
2305
2850
|
? AppColors_1.AppColors.purple
|
|
2306
2851
|
: AppColors_1.AppColors.grayTextStrong} size={18}/>
|
|
2307
|
-
|
|
2852
|
+
</TouchableScale_1.default>
|
|
2853
|
+
</react_native_1.View>
|
|
2308
2854
|
</react_native_1.View>
|
|
2309
|
-
</react_native_1.View>
|
|
2310
2855
|
|
|
2311
|
-
|
|
2856
|
+
<react_native_1.Animated.View style={[
|
|
2312
2857
|
filtersAccordion.bodyStyle,
|
|
2313
2858
|
{ overflow: 'hidden' },
|
|
2314
2859
|
]}>
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2860
|
+
<react_native_1.View style={styles_1.default.filtersContainer}>
|
|
2861
|
+
<react_native_1.Text style={styles_1.default.filtersHeading}>STATUS</react_native_1.Text>
|
|
2862
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles_1.default.statusRowContent}>
|
|
2863
|
+
{constants_1.STATUS_FILTERS.map(filter => {
|
|
2319
2864
|
const isAll = filter === 'ALL';
|
|
2320
2865
|
const active = isAll
|
|
2321
2866
|
? statusFilters.size === 0
|
|
@@ -2334,35 +2879,38 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2334
2879
|
});
|
|
2335
2880
|
}
|
|
2336
2881
|
}} hitSlop={10}>
|
|
2337
|
-
|
|
2882
|
+
{active ? (<react_native_1.View style={[
|
|
2338
2883
|
styles_1.default.statusFilterChip,
|
|
2339
2884
|
styles_1.default.statusFilterActive,
|
|
2340
2885
|
{ overflow: 'hidden' },
|
|
2341
2886
|
]}>
|
|
2342
|
-
|
|
2887
|
+
<react_native_linear_gradient_1.default colors={[
|
|
2343
2888
|
AppColors_1.AppColors.purpleShade50,
|
|
2344
2889
|
'#EAE5FF',
|
|
2345
2890
|
]} style={react_native_1.StyleSheet.absoluteFill} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }}/>
|
|
2346
|
-
|
|
2891
|
+
<react_native_1.Text style={[
|
|
2347
2892
|
styles_1.default.statusFilterText,
|
|
2348
2893
|
{ color: AppColors_1.AppColors.purple },
|
|
2349
2894
|
]}>
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2895
|
+
{filter}
|
|
2896
|
+
</react_native_1.Text>
|
|
2897
|
+
</react_native_1.View>) : (<react_native_1.View style={styles_1.default.statusFilterChip}>
|
|
2898
|
+
<react_native_1.Text style={styles_1.default.statusFilterText}>
|
|
2899
|
+
{filter}
|
|
2900
|
+
</react_native_1.Text>
|
|
2901
|
+
</react_native_1.View>)}
|
|
2902
|
+
</TouchableScale_1.default>);
|
|
2358
2903
|
})}
|
|
2359
|
-
|
|
2904
|
+
</react_native_1.ScrollView>
|
|
2360
2905
|
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2906
|
+
<react_native_1.Text style={[
|
|
2907
|
+
styles_1.default.filtersHeading,
|
|
2908
|
+
{ marginTop: 16 },
|
|
2909
|
+
]}>
|
|
2910
|
+
METHOD
|
|
2911
|
+
</react_native_1.Text>
|
|
2912
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles_1.default.statusRowContent}>
|
|
2913
|
+
{availableMethods.map(filter => {
|
|
2366
2914
|
const isAll = filter === 'ALL';
|
|
2367
2915
|
const active = isAll
|
|
2368
2916
|
? methodFilters.size === 0
|
|
@@ -2381,101 +2929,101 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2381
2929
|
});
|
|
2382
2930
|
}
|
|
2383
2931
|
}} hitSlop={10}>
|
|
2384
|
-
|
|
2932
|
+
{active ? (<react_native_1.View style={[
|
|
2385
2933
|
styles_1.default.statusFilterChip,
|
|
2386
2934
|
styles_1.default.statusFilterActive,
|
|
2387
2935
|
{ overflow: 'hidden' },
|
|
2388
2936
|
]}>
|
|
2389
|
-
|
|
2937
|
+
<react_native_linear_gradient_1.default colors={[
|
|
2390
2938
|
AppColors_1.AppColors.purpleShade50,
|
|
2391
2939
|
'#EAE5FF',
|
|
2392
2940
|
]} style={react_native_1.StyleSheet.absoluteFill} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }}/>
|
|
2393
|
-
|
|
2941
|
+
<react_native_1.Text style={[
|
|
2394
2942
|
styles_1.default.statusFilterText,
|
|
2395
2943
|
{ color: AppColors_1.AppColors.purple },
|
|
2396
2944
|
]}>
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2945
|
+
{filter}
|
|
2946
|
+
</react_native_1.Text>
|
|
2947
|
+
</react_native_1.View>) : (<react_native_1.View style={styles_1.default.statusFilterChip}>
|
|
2948
|
+
<react_native_1.Text style={styles_1.default.statusFilterText}>
|
|
2949
|
+
{filter}
|
|
2950
|
+
</react_native_1.Text>
|
|
2951
|
+
</react_native_1.View>)}
|
|
2952
|
+
</TouchableScale_1.default>);
|
|
2405
2953
|
})}
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2954
|
+
</react_native_1.ScrollView>
|
|
2955
|
+
</react_native_1.View>
|
|
2956
|
+
</react_native_1.Animated.View>
|
|
2409
2957
|
|
|
2410
|
-
|
|
2958
|
+
{(search ||
|
|
2411
2959
|
statusFilters.size > 0 ||
|
|
2412
2960
|
methodFilters.size > 0) && (<react_native_1.Text style={styles_1.default.resultCount}>
|
|
2413
|
-
|
|
2961
|
+
{filteredLogs.length === logs.length
|
|
2414
2962
|
? `${logs.length} requests`
|
|
2415
2963
|
: `${filteredLogs.length} of ${logs.length} filtered requests`}
|
|
2416
|
-
|
|
2417
|
-
|
|
2964
|
+
</react_native_1.Text>)}
|
|
2965
|
+
</react_native_1.View>} ListEmptyComponent={<EmptyState_1.default isSearch={search.length > 0 || statusFilters.size > 0}/>} contentContainerStyle={[
|
|
2418
2966
|
styles_1.default.listContent,
|
|
2419
2967
|
filteredLogs.length === 0 && { flexGrow: 1 },
|
|
2420
2968
|
]} keyboardShouldPersistTaps="handled"/>) : activeTab === 'logs' ? (<react_native_1.View style={{ flex: 1 }}>
|
|
2421
|
-
|
|
2969
|
+
<react_native_1.View style={{
|
|
2422
2970
|
backgroundColor: '#FFFFFF',
|
|
2423
2971
|
borderBottomWidth: 1,
|
|
2424
2972
|
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
2425
2973
|
paddingBottom: 6,
|
|
2426
2974
|
}}>
|
|
2427
|
-
|
|
2975
|
+
<react_native_1.View style={[
|
|
2428
2976
|
styles_1.default.toolbarRow,
|
|
2429
2977
|
{ marginTop: 12, marginBottom: 8 },
|
|
2430
2978
|
]}>
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2979
|
+
<react_native_1.View style={styles_1.default.searchContainer}>
|
|
2980
|
+
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak} size={16}/>
|
|
2981
|
+
<react_native_1.TextInput placeholder="Search logs..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={logSearch} onChangeText={setLogSearch} style={styles_1.default.searchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
2982
|
+
{logSearch.length > 0 && (<react_native_1.Pressable onPress={() => setLogSearch('')} hitSlop={10} style={styles_1.default.clearBtn}>
|
|
2983
|
+
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
2984
|
+
</react_native_1.Pressable>)}
|
|
2985
|
+
</react_native_1.View>
|
|
2438
2986
|
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2987
|
+
<react_native_1.View style={styles_1.default.toolbarRight}>
|
|
2988
|
+
<TouchableScale_1.default style={styles_1.default.toolbarBtn} onPress={handleDelete} hitSlop={10}>
|
|
2989
|
+
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.grayTextStrong} size={18}/>
|
|
2990
|
+
</TouchableScale_1.default>
|
|
2991
|
+
</react_native_1.View>
|
|
2992
|
+
</react_native_1.View>
|
|
2445
2993
|
|
|
2446
|
-
|
|
2994
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} style={{ marginVertical: 4, maxHeight: 46 }} contentContainerStyle={{
|
|
2447
2995
|
paddingHorizontal: 16,
|
|
2448
2996
|
paddingBottom: 4,
|
|
2449
2997
|
flexDirection: 'row',
|
|
2450
2998
|
alignItems: 'center',
|
|
2451
2999
|
gap: 8,
|
|
2452
3000
|
}}>
|
|
2453
|
-
|
|
3001
|
+
{(() => {
|
|
2454
3002
|
const active = logFilters.has('all');
|
|
2455
3003
|
return (<TouchableScale_1.default onPress={() => {
|
|
2456
3004
|
setLogFilters(new Set(['all']));
|
|
2457
3005
|
}}>
|
|
2458
|
-
|
|
3006
|
+
<react_native_1.View style={[
|
|
2459
3007
|
styles_1.default.statusFilterChip,
|
|
2460
3008
|
active && {
|
|
2461
3009
|
borderColor: AppColors_1.AppColors.purpleShade700,
|
|
2462
3010
|
backgroundColor: '#F4EBFF',
|
|
2463
3011
|
},
|
|
2464
3012
|
]}>
|
|
2465
|
-
|
|
3013
|
+
<react_native_1.Text numberOfLines={1} style={[
|
|
2466
3014
|
styles_1.default.statusFilterText,
|
|
2467
3015
|
active && {
|
|
2468
3016
|
color: AppColors_1.AppColors.purpleShade700,
|
|
2469
3017
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2470
3018
|
},
|
|
2471
3019
|
]}>
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
3020
|
+
All ({logCounts.all})
|
|
3021
|
+
</react_native_1.Text>
|
|
3022
|
+
</react_native_1.View>
|
|
3023
|
+
</TouchableScale_1.default>);
|
|
2476
3024
|
})()}
|
|
2477
3025
|
|
|
2478
|
-
|
|
3026
|
+
{(() => {
|
|
2479
3027
|
const active = logFilters.has('user-log');
|
|
2480
3028
|
return (<TouchableScale_1.default onPress={() => {
|
|
2481
3029
|
setLogFilters(prev => {
|
|
@@ -2489,27 +3037,27 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2489
3037
|
return next;
|
|
2490
3038
|
});
|
|
2491
3039
|
}}>
|
|
2492
|
-
|
|
3040
|
+
<react_native_1.View style={[
|
|
2493
3041
|
styles_1.default.statusFilterChip,
|
|
2494
3042
|
active && {
|
|
2495
3043
|
borderColor: '#64748B',
|
|
2496
3044
|
backgroundColor: '#F1F5F9',
|
|
2497
3045
|
},
|
|
2498
3046
|
]}>
|
|
2499
|
-
|
|
3047
|
+
<react_native_1.Text numberOfLines={1} style={[
|
|
2500
3048
|
styles_1.default.statusFilterText,
|
|
2501
3049
|
active && {
|
|
2502
3050
|
color: '#334155',
|
|
2503
3051
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2504
3052
|
},
|
|
2505
3053
|
]}>
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
3054
|
+
User Log ({logCounts['user-log']})
|
|
3055
|
+
</react_native_1.Text>
|
|
3056
|
+
</react_native_1.View>
|
|
3057
|
+
</TouchableScale_1.default>);
|
|
2510
3058
|
})()}
|
|
2511
3059
|
|
|
2512
|
-
|
|
3060
|
+
{(() => {
|
|
2513
3061
|
const active = logFilters.has('info');
|
|
2514
3062
|
return (<TouchableScale_1.default onPress={() => {
|
|
2515
3063
|
setLogFilters(prev => {
|
|
@@ -2523,27 +3071,27 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2523
3071
|
return next;
|
|
2524
3072
|
});
|
|
2525
3073
|
}}>
|
|
2526
|
-
|
|
3074
|
+
<react_native_1.View style={[
|
|
2527
3075
|
styles_1.default.statusFilterChip,
|
|
2528
3076
|
active && {
|
|
2529
3077
|
borderColor: AppColors_1.AppColors.purple,
|
|
2530
3078
|
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
2531
3079
|
},
|
|
2532
3080
|
]}>
|
|
2533
|
-
|
|
3081
|
+
<react_native_1.Text numberOfLines={1} style={[
|
|
2534
3082
|
styles_1.default.statusFilterText,
|
|
2535
3083
|
active && {
|
|
2536
3084
|
color: AppColors_1.AppColors.purple,
|
|
2537
3085
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2538
3086
|
},
|
|
2539
3087
|
]}>
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
3088
|
+
Info ({logCounts.info})
|
|
3089
|
+
</react_native_1.Text>
|
|
3090
|
+
</react_native_1.View>
|
|
3091
|
+
</TouchableScale_1.default>);
|
|
2544
3092
|
})()}
|
|
2545
3093
|
|
|
2546
|
-
|
|
3094
|
+
{(() => {
|
|
2547
3095
|
const active = logFilters.has('warn');
|
|
2548
3096
|
return (<TouchableScale_1.default onPress={() => {
|
|
2549
3097
|
setLogFilters(prev => {
|
|
@@ -2557,14 +3105,14 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2557
3105
|
return next;
|
|
2558
3106
|
});
|
|
2559
3107
|
}}>
|
|
2560
|
-
|
|
3108
|
+
<react_native_1.View style={[
|
|
2561
3109
|
styles_1.default.statusFilterChip,
|
|
2562
3110
|
active && {
|
|
2563
3111
|
borderColor: AppColors_1.AppColors.lightOrange,
|
|
2564
3112
|
backgroundColor: '#FFFDF6',
|
|
2565
3113
|
},
|
|
2566
3114
|
]}>
|
|
2567
|
-
|
|
3115
|
+
<react_native_1.Text numberOfLines={1} style={[
|
|
2568
3116
|
styles_1.default.statusFilterText,
|
|
2569
3117
|
active && {
|
|
2570
3118
|
color: AppColors_1.AppColors.darkOrange ||
|
|
@@ -2572,13 +3120,13 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2572
3120
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2573
3121
|
},
|
|
2574
3122
|
]}>
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
3123
|
+
Warning ({logCounts.warn})
|
|
3124
|
+
</react_native_1.Text>
|
|
3125
|
+
</react_native_1.View>
|
|
3126
|
+
</TouchableScale_1.default>);
|
|
2579
3127
|
})()}
|
|
2580
3128
|
|
|
2581
|
-
|
|
3129
|
+
{(() => {
|
|
2582
3130
|
const active = logFilters.has('error');
|
|
2583
3131
|
return (<TouchableScale_1.default onPress={() => {
|
|
2584
3132
|
setLogFilters(prev => {
|
|
@@ -2592,27 +3140,27 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2592
3140
|
return next;
|
|
2593
3141
|
});
|
|
2594
3142
|
}}>
|
|
2595
|
-
|
|
3143
|
+
<react_native_1.View style={[
|
|
2596
3144
|
styles_1.default.statusFilterChip,
|
|
2597
3145
|
active && {
|
|
2598
3146
|
borderColor: AppColors_1.AppColors.errorColor,
|
|
2599
3147
|
backgroundColor: '#FFF5F6',
|
|
2600
3148
|
},
|
|
2601
3149
|
]}>
|
|
2602
|
-
|
|
3150
|
+
<react_native_1.Text numberOfLines={1} style={[
|
|
2603
3151
|
styles_1.default.statusFilterText,
|
|
2604
3152
|
active && {
|
|
2605
3153
|
color: AppColors_1.AppColors.errorColor,
|
|
2606
3154
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2607
3155
|
},
|
|
2608
3156
|
]}>
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
3157
|
+
Error ({logCounts.error})
|
|
3158
|
+
</react_native_1.Text>
|
|
3159
|
+
</react_native_1.View>
|
|
3160
|
+
</TouchableScale_1.default>);
|
|
2613
3161
|
})()}
|
|
2614
3162
|
|
|
2615
|
-
|
|
3163
|
+
{(() => {
|
|
2616
3164
|
const active = logFilters.has('analytics');
|
|
2617
3165
|
return (<TouchableScale_1.default onPress={() => {
|
|
2618
3166
|
setLogFilters(prev => {
|
|
@@ -2626,29 +3174,29 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2626
3174
|
return next;
|
|
2627
3175
|
});
|
|
2628
3176
|
}}>
|
|
2629
|
-
|
|
3177
|
+
<react_native_1.View style={[
|
|
2630
3178
|
styles_1.default.statusFilterChip,
|
|
2631
3179
|
active && {
|
|
2632
3180
|
borderColor: AppColors_1.AppColors.skyBlue,
|
|
2633
3181
|
backgroundColor: `${AppColors_1.AppColors.skyBlue}15`,
|
|
2634
3182
|
},
|
|
2635
3183
|
]}>
|
|
2636
|
-
|
|
3184
|
+
<react_native_1.Text numberOfLines={1} style={[
|
|
2637
3185
|
styles_1.default.statusFilterText,
|
|
2638
3186
|
active && {
|
|
2639
3187
|
color: AppColors_1.AppColors.skyBlue,
|
|
2640
3188
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2641
3189
|
},
|
|
2642
3190
|
]}>
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
3191
|
+
Analytics ({logCounts.analytics})
|
|
3192
|
+
</react_native_1.Text>
|
|
3193
|
+
</react_native_1.View>
|
|
3194
|
+
</TouchableScale_1.default>);
|
|
2647
3195
|
})()}
|
|
2648
|
-
|
|
2649
|
-
|
|
3196
|
+
</react_native_1.ScrollView>
|
|
3197
|
+
</react_native_1.View>
|
|
2650
3198
|
|
|
2651
|
-
|
|
3199
|
+
<react_native_1.FlatList data={filteredConsoleLogs} keyExtractor={item => item.id.toString()} ListHeaderComponent={(() => {
|
|
2652
3200
|
const total = visibleConsoleLogs.length;
|
|
2653
3201
|
const filtered = filteredConsoleLogs.length;
|
|
2654
3202
|
const isAllSelected = logFilters.has('all') ||
|
|
@@ -2658,8 +3206,8 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2658
3206
|
styles_1.default.resultCount,
|
|
2659
3207
|
{ marginBottom: 4, marginTop: 12 },
|
|
2660
3208
|
]}>
|
|
2661
|
-
|
|
2662
|
-
|
|
3209
|
+
Showing ({filtered}/{total}) logs showing
|
|
3210
|
+
</react_native_1.Text>);
|
|
2663
3211
|
}
|
|
2664
3212
|
else {
|
|
2665
3213
|
const activeFilterNames = Array.from(logFilters)
|
|
@@ -2669,31 +3217,37 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2669
3217
|
return 'User Log';
|
|
2670
3218
|
if (f === 'analytics')
|
|
2671
3219
|
return 'Analytics';
|
|
2672
|
-
return f.charAt(0).toUpperCase() +
|
|
3220
|
+
return (f.charAt(0).toUpperCase() +
|
|
3221
|
+
f.slice(1));
|
|
2673
3222
|
});
|
|
2674
3223
|
return (<react_native_1.Text style={[
|
|
2675
3224
|
styles_1.default.resultCount,
|
|
2676
3225
|
{ marginBottom: 4, marginTop: 12 },
|
|
2677
3226
|
]}>
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
3227
|
+
Filtering with {activeFilterNames.join(', ')} (
|
|
3228
|
+
{filtered}/{total}) logs is showing
|
|
3229
|
+
</react_native_1.Text>);
|
|
2681
3230
|
}
|
|
2682
|
-
})()} renderItem={({ item }) => (<
|
|
3231
|
+
})()} renderItem={({ item, index }) => (<AnimatedEntrance_1.default index={index} distance={8}>
|
|
3232
|
+
<ConsoleLogCard_1.ConsoleLogCard item={item} searchStr={logSearch}/>
|
|
3233
|
+
</AnimatedEntrance_1.default>)} initialNumToRender={15} maxToRenderPerBatch={15} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState_1.default isSearch={logSearch.length > 0 || logFilters.size > 0}/>} contentContainerStyle={[
|
|
2683
3234
|
styles_1.default.listContent,
|
|
2684
3235
|
filteredConsoleLogs.length === 0 && { flexGrow: 1 },
|
|
2685
3236
|
]} keyboardShouldPersistTaps="handled"/>
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
3237
|
+
</react_native_1.View>) : activeTab === 'webview' ? (webViewNavHistory.length === 0 ? (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
3238
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
3239
|
+
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
3240
|
+
</react_native_1.View>
|
|
3241
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>
|
|
3242
|
+
No WebView Activity
|
|
3243
|
+
</react_native_1.Text>
|
|
3244
|
+
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
3245
|
+
Load a webpage within a connected WebView component to
|
|
3246
|
+
inspect pages, page source, and console logs.
|
|
3247
|
+
</react_native_1.Text>
|
|
3248
|
+
</react_native_1.View>) : (<react_native_1.View style={{ flex: 1 }}>
|
|
3249
|
+
{/* ─── Current Page Address Bar (Now on top) ─── */}
|
|
3250
|
+
{(() => {
|
|
2697
3251
|
const currentUrl = webViewNavHistory[0]?.url;
|
|
2698
3252
|
if (!currentUrl)
|
|
2699
3253
|
return null;
|
|
@@ -2705,7 +3259,7 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2705
3259
|
borderBottomWidth: 1,
|
|
2706
3260
|
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
2707
3261
|
}}>
|
|
2708
|
-
|
|
3262
|
+
<react_native_1.View style={{
|
|
2709
3263
|
flexDirection: 'row',
|
|
2710
3264
|
alignItems: 'center',
|
|
2711
3265
|
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
@@ -2716,27 +3270,42 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2716
3270
|
paddingVertical: 5,
|
|
2717
3271
|
gap: 8,
|
|
2718
3272
|
}}>
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
3273
|
+
{/* Left: Lock and HTTPS label */}
|
|
3274
|
+
<react_native_1.View style={{
|
|
3275
|
+
flexDirection: 'row',
|
|
3276
|
+
alignItems: 'center',
|
|
3277
|
+
gap: 4,
|
|
3278
|
+
}}>
|
|
3279
|
+
<react_native_1.Text style={{ fontSize: 11 }}>🔒</react_native_1.Text>
|
|
3280
|
+
<react_native_1.Text style={{
|
|
3281
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3282
|
+
fontSize: 9.5,
|
|
3283
|
+
color: AppColors_1.AppColors.greenColor,
|
|
3284
|
+
letterSpacing: 0.5,
|
|
3285
|
+
}}>
|
|
3286
|
+
HTTPS
|
|
3287
|
+
</react_native_1.Text>
|
|
3288
|
+
</react_native_1.View>
|
|
3289
|
+
<react_native_1.View style={{
|
|
3290
|
+
width: 1.5,
|
|
3291
|
+
height: 12,
|
|
3292
|
+
backgroundColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
3293
|
+
}}/>
|
|
2725
3294
|
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
3295
|
+
{/* Middle: URL text (Address style) */}
|
|
3296
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
3297
|
+
<HighlightText_1.default text={currentUrl} search={webViewSearch} numberOfLines={1} ellipsizeMode="tail" style={{
|
|
2729
3298
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2730
3299
|
fontSize: 11.5,
|
|
2731
3300
|
color: AppColors_1.AppColors.primaryBlack,
|
|
2732
3301
|
}} highlightStyle={styles_1.default.highlight} detectLinks={false}/>
|
|
2733
|
-
|
|
3302
|
+
</react_native_1.View>
|
|
2734
3303
|
|
|
2735
|
-
|
|
2736
|
-
|
|
3304
|
+
{/* Right: Copy Button */}
|
|
3305
|
+
<CopyButton_1.default value={currentUrl} label="URL"/>
|
|
2737
3306
|
|
|
2738
|
-
|
|
2739
|
-
|
|
3307
|
+
{/* Right: Globe Icon button to open browser */}
|
|
3308
|
+
<TouchableScale_1.default onPress={() => react_native_1.Linking.openURL(currentUrl)} hitSlop={8} style={{
|
|
2740
3309
|
width: 26,
|
|
2741
3310
|
height: 26,
|
|
2742
3311
|
borderRadius: 13,
|
|
@@ -2746,26 +3315,26 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2746
3315
|
alignItems: 'center',
|
|
2747
3316
|
justifyContent: 'center',
|
|
2748
3317
|
}}>
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
3318
|
+
<NetworkIcons_1.GlobeIcon size={11} color={AppColors_1.AppColors.purple}/>
|
|
3319
|
+
</TouchableScale_1.default>
|
|
3320
|
+
</react_native_1.View>
|
|
3321
|
+
</react_native_1.View>);
|
|
2753
3322
|
})()}
|
|
2754
3323
|
|
|
2755
|
-
|
|
2756
|
-
|
|
3324
|
+
{/* ─── WebView Sub-Tabs (Now below Address Bar) ─── */}
|
|
3325
|
+
<react_native_1.View style={{
|
|
2757
3326
|
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
2758
3327
|
borderBottomWidth: 1,
|
|
2759
3328
|
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
2760
3329
|
paddingVertical: 6,
|
|
2761
3330
|
}}>
|
|
2762
|
-
|
|
3331
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
2763
3332
|
paddingHorizontal: 12,
|
|
2764
3333
|
flexDirection: 'row',
|
|
2765
3334
|
gap: 8,
|
|
2766
3335
|
}}>
|
|
2767
|
-
|
|
2768
|
-
|
|
3336
|
+
{/* Sub-tab 1: Preview */}
|
|
3337
|
+
<react_native_1.Pressable style={[
|
|
2769
3338
|
{
|
|
2770
3339
|
paddingVertical: 6,
|
|
2771
3340
|
paddingHorizontal: 14,
|
|
@@ -2781,19 +3350,28 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2781
3350
|
backgroundColor: AppColors_1.AppColors.purple,
|
|
2782
3351
|
borderColor: AppColors_1.AppColors.purple,
|
|
2783
3352
|
},
|
|
2784
|
-
]} onPress={() =>
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
3353
|
+
]} onPress={() => {
|
|
3354
|
+
animateNextLayout();
|
|
3355
|
+
setWebViewSubTab('preview');
|
|
3356
|
+
}}>
|
|
3357
|
+
<NetworkIcons_1.EyeIcon color={webViewSubTab === 'preview'
|
|
3358
|
+
? '#FFFFFF'
|
|
3359
|
+
: AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
3360
|
+
<react_native_1.Text style={{
|
|
3361
|
+
fontFamily: webViewSubTab === 'preview'
|
|
3362
|
+
? AppFonts_1.AppFonts.interBold
|
|
3363
|
+
: AppFonts_1.AppFonts.interMedium,
|
|
2788
3364
|
fontSize: 12,
|
|
2789
|
-
color: webViewSubTab === 'preview'
|
|
3365
|
+
color: webViewSubTab === 'preview'
|
|
3366
|
+
? '#FFFFFF'
|
|
3367
|
+
: AppColors_1.AppColors.grayTextStrong,
|
|
2790
3368
|
}}>
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
3369
|
+
Preview
|
|
3370
|
+
</react_native_1.Text>
|
|
3371
|
+
</react_native_1.Pressable>
|
|
2794
3372
|
|
|
2795
|
-
|
|
2796
|
-
|
|
3373
|
+
{/* Sub-tab 2: Page Source */}
|
|
3374
|
+
<react_native_1.Pressable style={[
|
|
2797
3375
|
{
|
|
2798
3376
|
paddingVertical: 6,
|
|
2799
3377
|
paddingHorizontal: 14,
|
|
@@ -2809,19 +3387,28 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2809
3387
|
backgroundColor: AppColors_1.AppColors.purple,
|
|
2810
3388
|
borderColor: AppColors_1.AppColors.purple,
|
|
2811
3389
|
},
|
|
2812
|
-
]} onPress={() =>
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
3390
|
+
]} onPress={() => {
|
|
3391
|
+
animateNextLayout();
|
|
3392
|
+
setWebViewSubTab('html');
|
|
3393
|
+
}}>
|
|
3394
|
+
<NetworkIcons_1.HtmlIcon color={webViewSubTab === 'html'
|
|
3395
|
+
? '#FFFFFF'
|
|
3396
|
+
: AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
3397
|
+
<react_native_1.Text style={{
|
|
3398
|
+
fontFamily: webViewSubTab === 'html'
|
|
3399
|
+
? AppFonts_1.AppFonts.interBold
|
|
3400
|
+
: AppFonts_1.AppFonts.interMedium,
|
|
2816
3401
|
fontSize: 12,
|
|
2817
|
-
color: webViewSubTab === 'html'
|
|
3402
|
+
color: webViewSubTab === 'html'
|
|
3403
|
+
? '#FFFFFF'
|
|
3404
|
+
: AppColors_1.AppColors.grayTextStrong,
|
|
2818
3405
|
}}>
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
3406
|
+
Page Source
|
|
3407
|
+
</react_native_1.Text>
|
|
3408
|
+
</react_native_1.Pressable>
|
|
2822
3409
|
|
|
2823
|
-
|
|
2824
|
-
|
|
3410
|
+
{/* Sub-tab 3: History */}
|
|
3411
|
+
<react_native_1.Pressable style={[
|
|
2825
3412
|
{
|
|
2826
3413
|
paddingVertical: 6,
|
|
2827
3414
|
paddingHorizontal: 14,
|
|
@@ -2837,19 +3424,28 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2837
3424
|
backgroundColor: AppColors_1.AppColors.purple,
|
|
2838
3425
|
borderColor: AppColors_1.AppColors.purple,
|
|
2839
3426
|
},
|
|
2840
|
-
]} onPress={() =>
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
3427
|
+
]} onPress={() => {
|
|
3428
|
+
animateNextLayout();
|
|
3429
|
+
setWebViewSubTab('navigation');
|
|
3430
|
+
}}>
|
|
3431
|
+
<NetworkIcons_1.ClockIcon color={webViewSubTab === 'navigation'
|
|
3432
|
+
? '#FFFFFF'
|
|
3433
|
+
: AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
3434
|
+
<react_native_1.Text style={{
|
|
3435
|
+
fontFamily: webViewSubTab === 'navigation'
|
|
3436
|
+
? AppFonts_1.AppFonts.interBold
|
|
3437
|
+
: AppFonts_1.AppFonts.interMedium,
|
|
2844
3438
|
fontSize: 12,
|
|
2845
|
-
color: webViewSubTab === 'navigation'
|
|
3439
|
+
color: webViewSubTab === 'navigation'
|
|
3440
|
+
? '#FFFFFF'
|
|
3441
|
+
: AppColors_1.AppColors.grayTextStrong,
|
|
2846
3442
|
}}>
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
3443
|
+
History ({webViewNavHistory.length})
|
|
3444
|
+
</react_native_1.Text>
|
|
3445
|
+
</react_native_1.Pressable>
|
|
2850
3446
|
|
|
2851
|
-
|
|
2852
|
-
|
|
3447
|
+
{/* Sub-tab 4: Console */}
|
|
3448
|
+
<react_native_1.Pressable style={[
|
|
2853
3449
|
{
|
|
2854
3450
|
paddingVertical: 6,
|
|
2855
3451
|
paddingHorizontal: 14,
|
|
@@ -2865,23 +3461,32 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2865
3461
|
backgroundColor: AppColors_1.AppColors.purple,
|
|
2866
3462
|
borderColor: AppColors_1.AppColors.purple,
|
|
2867
3463
|
},
|
|
2868
|
-
]} onPress={() =>
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
3464
|
+
]} onPress={() => {
|
|
3465
|
+
animateNextLayout();
|
|
3466
|
+
setWebViewSubTab('console');
|
|
3467
|
+
}}>
|
|
3468
|
+
<NetworkIcons_1.TerminalIcon color={webViewSubTab === 'console'
|
|
3469
|
+
? '#FFFFFF'
|
|
3470
|
+
: AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
3471
|
+
<react_native_1.Text style={{
|
|
3472
|
+
fontFamily: webViewSubTab === 'console'
|
|
3473
|
+
? AppFonts_1.AppFonts.interBold
|
|
3474
|
+
: AppFonts_1.AppFonts.interMedium,
|
|
2872
3475
|
fontSize: 12,
|
|
2873
|
-
color: webViewSubTab === 'console'
|
|
3476
|
+
color: webViewSubTab === 'console'
|
|
3477
|
+
? '#FFFFFF'
|
|
3478
|
+
: AppColors_1.AppColors.grayTextStrong,
|
|
2874
3479
|
}}>
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
3480
|
+
Console ({webViewLogs.length})
|
|
3481
|
+
</react_native_1.Text>
|
|
3482
|
+
</react_native_1.Pressable>
|
|
3483
|
+
</react_native_1.ScrollView>
|
|
3484
|
+
</react_native_1.View>
|
|
2880
3485
|
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
3486
|
+
{webViewSubTab === 'html' ? (<react_native_1.View style={{ flex: 1 }}>
|
|
3487
|
+
{webViewHtml || webViewCss || webViewJs ? (<react_native_1.View style={{ flex: 1 }}>
|
|
3488
|
+
{/* Clear Inspect Banner */}
|
|
3489
|
+
{inspectedElement && (<react_native_1.View style={{
|
|
2885
3490
|
flexDirection: 'row',
|
|
2886
3491
|
alignItems: 'center',
|
|
2887
3492
|
justifyContent: 'space-between',
|
|
@@ -2891,36 +3496,44 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2891
3496
|
borderBottomWidth: 1,
|
|
2892
3497
|
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
2893
3498
|
}}>
|
|
2894
|
-
|
|
3499
|
+
<react_native_1.Text style={{
|
|
2895
3500
|
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2896
3501
|
fontSize: 11.5,
|
|
2897
3502
|
color: AppColors_1.AppColors.purple,
|
|
2898
3503
|
flex: 1,
|
|
2899
3504
|
}}>
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
3505
|
+
Inspecting element:{' '}
|
|
3506
|
+
<react_native_1.Text style={{
|
|
3507
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3508
|
+
}}>
|
|
3509
|
+
<{inspectedElement.tagName}
|
|
3510
|
+
{inspectedElement.id
|
|
3511
|
+
? ` id="${inspectedElement.id}"`
|
|
3512
|
+
: ''}
|
|
3513
|
+
{inspectedElement.className
|
|
3514
|
+
? ` class="${inspectedElement.className
|
|
3515
|
+
.trim()
|
|
3516
|
+
.split(/\s+/)[0]}"`
|
|
3517
|
+
: ''}
|
|
3518
|
+
>
|
|
3519
|
+
</react_native_1.Text>
|
|
3520
|
+
</react_native_1.Text>
|
|
3521
|
+
<react_native_1.Pressable onPress={() => setInspectedElement(null)} style={{
|
|
2909
3522
|
paddingHorizontal: 8,
|
|
2910
3523
|
paddingVertical: 4,
|
|
2911
3524
|
}}>
|
|
2912
|
-
|
|
3525
|
+
<react_native_1.Text style={{
|
|
2913
3526
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2914
3527
|
fontSize: 11,
|
|
2915
3528
|
color: AppColors_1.AppColors.purple,
|
|
2916
3529
|
}}>
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
3530
|
+
Clear Inspect
|
|
3531
|
+
</react_native_1.Text>
|
|
3532
|
+
</react_native_1.Pressable>
|
|
3533
|
+
</react_native_1.View>)}
|
|
2921
3534
|
|
|
2922
|
-
|
|
2923
|
-
|
|
3535
|
+
{/* Inner sub-tabs inside HTML source view */}
|
|
3536
|
+
<react_native_1.View style={{
|
|
2924
3537
|
flexDirection: 'row',
|
|
2925
3538
|
borderBottomWidth: 1,
|
|
2926
3539
|
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
@@ -2928,7 +3541,7 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2928
3541
|
paddingHorizontal: 12,
|
|
2929
3542
|
gap: 12,
|
|
2930
3543
|
}}>
|
|
2931
|
-
|
|
3544
|
+
{['html', 'css', 'javascript'].map(tab => {
|
|
2932
3545
|
const active = htmlSubTab === tab;
|
|
2933
3546
|
const label = tab === 'html'
|
|
2934
3547
|
? 'HTML'
|
|
@@ -2940,7 +3553,10 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2940
3553
|
: tab === 'css'
|
|
2941
3554
|
? '#2563EB' // Blue
|
|
2942
3555
|
: '#D97706'; // Dark Yellow/Amber
|
|
2943
|
-
return (<react_native_1.Pressable key={tab} onPress={() =>
|
|
3556
|
+
return (<react_native_1.Pressable key={tab} onPress={() => {
|
|
3557
|
+
animateNextLayout();
|
|
3558
|
+
setHtmlSubTab(tab);
|
|
3559
|
+
}} style={{
|
|
2944
3560
|
paddingVertical: 8,
|
|
2945
3561
|
paddingHorizontal: 4,
|
|
2946
3562
|
borderBottomWidth: 2,
|
|
@@ -2951,10 +3567,16 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2951
3567
|
alignItems: 'center',
|
|
2952
3568
|
gap: 4,
|
|
2953
3569
|
}}>
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
3570
|
+
{tab === 'html' && (<NetworkIcons_1.HtmlIcon color={active
|
|
3571
|
+
? activeColor
|
|
3572
|
+
: AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
3573
|
+
{tab === 'css' && (<NetworkIcons_1.CssIcon color={active
|
|
3574
|
+
? activeColor
|
|
3575
|
+
: AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
3576
|
+
{tab === 'javascript' && (<NetworkIcons_1.JsIcon color={active
|
|
3577
|
+
? activeColor
|
|
3578
|
+
: AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
3579
|
+
<react_native_1.Text style={{
|
|
2958
3580
|
fontFamily: active
|
|
2959
3581
|
? AppFonts_1.AppFonts.interBold
|
|
2960
3582
|
: AppFonts_1.AppFonts.interMedium,
|
|
@@ -2963,70 +3585,81 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
2963
3585
|
? activeColor
|
|
2964
3586
|
: AppColors_1.AppColors.grayTextWeak,
|
|
2965
3587
|
}}>
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
3588
|
+
{label}
|
|
3589
|
+
</react_native_1.Text>
|
|
3590
|
+
</react_native_1.Pressable>);
|
|
2969
3591
|
})}
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
3592
|
+
</react_native_1.View>
|
|
3593
|
+
<react_native_1.View style={{ flex: 1, padding: 12 }}>
|
|
3594
|
+
{!isHtmlTabReady ? (<react_native_1.View style={{
|
|
3595
|
+
flex: 1,
|
|
3596
|
+
justifyContent: 'center',
|
|
3597
|
+
alignItems: 'center',
|
|
3598
|
+
minHeight: 200,
|
|
3599
|
+
}}>
|
|
3600
|
+
<react_native_1.ActivityIndicator size="large" color={AppColors_1.AppColors.purple}/>
|
|
3601
|
+
</react_native_1.View>) : htmlSubTab === 'html' ? (webViewHtml ? (<CodeSnippet_1.default code={webViewHtml} language="html" search={getSearchTermForTab()}/>) : (<react_native_1.Text style={{
|
|
2975
3602
|
fontFamily: 'monospace',
|
|
2976
3603
|
fontSize: 11,
|
|
2977
3604
|
color: '#94A3B8',
|
|
2978
3605
|
padding: 12,
|
|
2979
3606
|
}}>
|
|
2980
|
-
|
|
2981
|
-
|
|
3607
|
+
No HTML content captured.
|
|
3608
|
+
</react_native_1.Text>)) : htmlSubTab === 'css' ? (webViewCss ? (<CodeSnippet_1.default code={webViewCss} language="css" search={getSearchTermForTab()}/>) : (<react_native_1.Text style={{
|
|
2982
3609
|
fontFamily: 'monospace',
|
|
2983
3610
|
fontSize: 11,
|
|
2984
3611
|
color: '#94A3B8',
|
|
2985
3612
|
padding: 12,
|
|
2986
3613
|
}}>
|
|
2987
|
-
|
|
2988
|
-
|
|
3614
|
+
No CSS styles detected on this page.
|
|
3615
|
+
</react_native_1.Text>)) : webViewJs ? (<CodeSnippet_1.default code={webViewJs} language="javascript" search={getSearchTermForTab()}/>) : (<react_native_1.Text style={{
|
|
2989
3616
|
fontFamily: 'monospace',
|
|
2990
3617
|
fontSize: 11,
|
|
2991
3618
|
color: '#94A3B8',
|
|
2992
3619
|
padding: 12,
|
|
2993
3620
|
}}>
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3621
|
+
No scripts detected on this page.
|
|
3622
|
+
</react_native_1.Text>)}
|
|
3623
|
+
</react_native_1.View>
|
|
3624
|
+
</react_native_1.View>) : (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
3625
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
3626
|
+
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
3627
|
+
</react_native_1.View>
|
|
3628
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>
|
|
3629
|
+
No Page Source Captured
|
|
3630
|
+
</react_native_1.Text>
|
|
3631
|
+
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
3632
|
+
Load a page in the WebView to inspect its
|
|
3633
|
+
HTML, CSS, or Javascript source.
|
|
3634
|
+
</react_native_1.Text>
|
|
3635
|
+
</react_native_1.View>)}
|
|
3636
|
+
</react_native_1.View>) : webViewSubTab === 'navigation' ? (<react_native_1.FlatList data={filteredNavHistory} keyExtractor={(item, index) => `${index}-${item.timestamp}`} style={{
|
|
3637
|
+
flex: 1,
|
|
3638
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
3639
|
+
}} ListHeaderComponent={<react_native_1.View style={{
|
|
3010
3640
|
paddingHorizontal: 16,
|
|
3011
3641
|
paddingTop: 12,
|
|
3012
3642
|
paddingBottom: 8,
|
|
3013
3643
|
}}>
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3644
|
+
<react_native_1.Text style={styles_1.default.resultCount}>
|
|
3645
|
+
Navigation History ({webViewNavHistory.length}
|
|
3646
|
+
)
|
|
3647
|
+
</react_native_1.Text>
|
|
3648
|
+
</react_native_1.View>} renderItem={({ item, index, }) => {
|
|
3018
3649
|
const isLatest = index === 0;
|
|
3019
3650
|
const formatNavTime = (ts) => {
|
|
3020
3651
|
const d = new Date(ts);
|
|
3021
3652
|
return `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`;
|
|
3022
3653
|
};
|
|
3023
|
-
return (<
|
|
3654
|
+
return (<AnimatedEntrance_1.default index={index} distance={8} style={{
|
|
3024
3655
|
marginHorizontal: 16,
|
|
3025
3656
|
marginVertical: 6,
|
|
3026
3657
|
borderRadius: 12,
|
|
3027
3658
|
borderWidth: 1,
|
|
3028
3659
|
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
3029
|
-
backgroundColor: isLatest
|
|
3660
|
+
backgroundColor: isLatest
|
|
3661
|
+
? AppColors_1.AppColors.purpleShade50
|
|
3662
|
+
: AppColors_1.AppColors.primaryLight,
|
|
3030
3663
|
padding: 14,
|
|
3031
3664
|
flexDirection: 'row',
|
|
3032
3665
|
alignItems: 'center',
|
|
@@ -3038,23 +3671,23 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
3038
3671
|
shadowRadius: 4,
|
|
3039
3672
|
elevation: 2,
|
|
3040
3673
|
}}>
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3674
|
+
<react_native_1.View style={{ flex: 1, gap: 8 }}>
|
|
3675
|
+
{/* Top row: Title and Badge */}
|
|
3676
|
+
<react_native_1.View style={{
|
|
3044
3677
|
flexDirection: 'row',
|
|
3045
3678
|
alignItems: 'center',
|
|
3046
3679
|
gap: 8,
|
|
3047
3680
|
flexWrap: 'wrap',
|
|
3048
3681
|
}}>
|
|
3049
|
-
|
|
3682
|
+
<react_native_1.Text numberOfLines={1} ellipsizeMode="tail" style={{
|
|
3050
3683
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3051
3684
|
fontSize: 14,
|
|
3052
3685
|
color: AppColors_1.AppColors.primaryBlack,
|
|
3053
3686
|
flexShrink: 1,
|
|
3054
3687
|
}}>
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3688
|
+
{item.title || 'Untitled Page'}
|
|
3689
|
+
</react_native_1.Text>
|
|
3690
|
+
{isLatest && (<react_native_1.View style={{
|
|
3058
3691
|
flexDirection: 'row',
|
|
3059
3692
|
alignItems: 'center',
|
|
3060
3693
|
gap: 4,
|
|
@@ -3063,65 +3696,100 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
3063
3696
|
paddingVertical: 3,
|
|
3064
3697
|
borderRadius: 12,
|
|
3065
3698
|
}}>
|
|
3066
|
-
|
|
3699
|
+
<react_native_1.View style={{
|
|
3067
3700
|
width: 6,
|
|
3068
3701
|
height: 6,
|
|
3069
3702
|
borderRadius: 3,
|
|
3070
3703
|
backgroundColor: AppColors_1.AppColors.greenBaggageText,
|
|
3071
3704
|
}}/>
|
|
3072
|
-
|
|
3705
|
+
<react_native_1.Text style={{
|
|
3073
3706
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3074
3707
|
fontSize: 9.5,
|
|
3075
3708
|
color: AppColors_1.AppColors.greenBaggageText,
|
|
3076
3709
|
}}>
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3710
|
+
Active
|
|
3711
|
+
</react_native_1.Text>
|
|
3712
|
+
</react_native_1.View>)}
|
|
3713
|
+
</react_native_1.View>
|
|
3081
3714
|
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3715
|
+
{/* Middle row: URL with Globe Icon */}
|
|
3716
|
+
<react_native_1.View style={{
|
|
3717
|
+
flexDirection: 'row',
|
|
3718
|
+
alignItems: 'center',
|
|
3719
|
+
gap: 6,
|
|
3720
|
+
}}>
|
|
3721
|
+
<NetworkIcons_1.GlobeIcon size={12} color={AppColors_1.AppColors.grayTextWeak}/>
|
|
3722
|
+
<HighlightText_1.default text={item.url} search={webViewSearch} numberOfLines={2} ellipsizeMode="tail" style={{
|
|
3086
3723
|
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
3087
3724
|
fontSize: 12,
|
|
3088
3725
|
color: AppColors_1.AppColors.grayText,
|
|
3089
3726
|
flex: 1,
|
|
3090
3727
|
}} highlightStyle={styles_1.default.highlight} detectLinks={true}/>
|
|
3091
|
-
|
|
3728
|
+
</react_native_1.View>
|
|
3092
3729
|
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3730
|
+
{/* Bottom row: Time */}
|
|
3731
|
+
<react_native_1.View style={{
|
|
3732
|
+
flexDirection: 'row',
|
|
3733
|
+
alignItems: 'center',
|
|
3734
|
+
gap: 6,
|
|
3735
|
+
}}>
|
|
3736
|
+
<NetworkIcons_1.ClockIcon size={11} color={AppColors_1.AppColors.grayTextWeak}/>
|
|
3737
|
+
<react_native_1.Text style={{
|
|
3738
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
3739
|
+
fontSize: 11,
|
|
3740
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
3741
|
+
}}>
|
|
3742
|
+
{formatNavTime(item.timestamp)}
|
|
3743
|
+
</react_native_1.Text>
|
|
3744
|
+
</react_native_1.View>
|
|
3745
|
+
</react_native_1.View>
|
|
3746
|
+
<CopyButton_1.default value={item.url} label="URL"/>
|
|
3747
|
+
</AnimatedEntrance_1.default>);
|
|
3103
3748
|
}} initialNumToRender={15} maxToRenderPerBatch={15} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState_1.default isSearch={webViewSearch.length > 0}/>} contentContainerStyle={[
|
|
3104
3749
|
styles_1.default.listContent,
|
|
3105
|
-
filteredNavHistory.length === 0 && {
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3750
|
+
filteredNavHistory.length === 0 && {
|
|
3751
|
+
flexGrow: 1,
|
|
3752
|
+
},
|
|
3753
|
+
]} keyboardShouldPersistTaps="handled"/>) : webViewSubTab === 'console' ? (<react_native_1.View style={{
|
|
3754
|
+
flex: 1,
|
|
3755
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
3756
|
+
}}>
|
|
3757
|
+
{webViewLogs.length > 0 ? (<react_native_1.FlatList data={webViewLogs} keyExtractor={(item) => String(item.id)} style={{ flex: 1 }} ListHeaderComponent={<react_native_1.View style={{
|
|
3758
|
+
paddingHorizontal: 16,
|
|
3759
|
+
paddingTop: 12,
|
|
3760
|
+
paddingBottom: 8,
|
|
3761
|
+
flexDirection: 'row',
|
|
3762
|
+
justifyContent: 'space-between',
|
|
3763
|
+
alignItems: 'center',
|
|
3764
|
+
}}>
|
|
3765
|
+
<react_native_1.Text style={styles_1.default.resultCount}>
|
|
3766
|
+
Console Logs ({webViewLogs.length})
|
|
3767
|
+
</react_native_1.Text>
|
|
3768
|
+
<TouchableScale_1.default onPress={() => (0, webViewLogger_1.clearWebViewData)()} style={{
|
|
3769
|
+
padding: 6,
|
|
3770
|
+
borderRadius: 6,
|
|
3771
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
3772
|
+
borderWidth: 1,
|
|
3773
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
3774
|
+
}}>
|
|
3775
|
+
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={14}/>
|
|
3776
|
+
</TouchableScale_1.default>
|
|
3777
|
+
</react_native_1.View>} renderItem={({ item }) => {
|
|
3778
|
+
const logColor = item.type === 'error'
|
|
3779
|
+
? AppColors_1.AppColors.errorColor
|
|
3780
|
+
: item.type === 'warn'
|
|
3781
|
+
? AppColors_1.AppColors.warningIconGold
|
|
3782
|
+
: item.type === 'info'
|
|
3783
|
+
? AppColors_1.AppColors.skyBlue
|
|
3784
|
+
: AppColors_1.AppColors.grayTextWeak;
|
|
3785
|
+
const bgColor = item.type === 'error'
|
|
3786
|
+
? 'rgba(255, 46, 87, 0.06)'
|
|
3787
|
+
: item.type === 'warn'
|
|
3788
|
+
? 'rgba(191, 162, 82, 0.08)'
|
|
3789
|
+
: AppColors_1.AppColors.primaryLight;
|
|
3122
3790
|
const d = new Date(item.timestamp);
|
|
3123
3791
|
const timeStr = `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`;
|
|
3124
|
-
return (<
|
|
3792
|
+
return (<AnimatedEntrance_1.default index={item.id} distance={8} style={{
|
|
3125
3793
|
marginHorizontal: 12,
|
|
3126
3794
|
marginVertical: 3,
|
|
3127
3795
|
borderRadius: 8,
|
|
@@ -3135,34 +3803,65 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
3135
3803
|
gap: 8,
|
|
3136
3804
|
alignItems: 'flex-start',
|
|
3137
3805
|
}}>
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3806
|
+
<react_native_1.View style={{ paddingTop: 1 }}>
|
|
3807
|
+
<NetworkIcons_1.TerminalIcon color={logColor} size={11}/>
|
|
3808
|
+
</react_native_1.View>
|
|
3809
|
+
<react_native_1.View style={{ flex: 1, gap: 3 }}>
|
|
3810
|
+
<react_native_1.View style={{
|
|
3811
|
+
flexDirection: 'row',
|
|
3812
|
+
alignItems: 'center',
|
|
3813
|
+
justifyContent: 'space-between',
|
|
3814
|
+
}}>
|
|
3815
|
+
<react_native_1.Text style={{
|
|
3816
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3817
|
+
fontSize: 10,
|
|
3818
|
+
color: logColor,
|
|
3819
|
+
textTransform: 'uppercase',
|
|
3820
|
+
letterSpacing: 0.5,
|
|
3821
|
+
}}>
|
|
3822
|
+
{item.type}
|
|
3823
|
+
</react_native_1.Text>
|
|
3824
|
+
<react_native_1.Text style={{
|
|
3825
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
3826
|
+
fontSize: 10,
|
|
3827
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
3828
|
+
}}>
|
|
3829
|
+
{timeStr}
|
|
3830
|
+
</react_native_1.Text>
|
|
3831
|
+
</react_native_1.View>
|
|
3832
|
+
<react_native_1.Text style={{
|
|
3833
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
3834
|
+
fontSize: 12,
|
|
3835
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
3836
|
+
lineHeight: 16,
|
|
3837
|
+
}}>
|
|
3838
|
+
{item.message}
|
|
3839
|
+
</react_native_1.Text>
|
|
3840
|
+
</react_native_1.View>
|
|
3841
|
+
</AnimatedEntrance_1.default>);
|
|
3842
|
+
}} initialNumToRender={20} maxToRenderPerBatch={20} windowSize={7} contentContainerStyle={[
|
|
3843
|
+
styles_1.default.listContent,
|
|
3844
|
+
webViewLogs.length === 0 && { flexGrow: 1 },
|
|
3845
|
+
]}/>) : (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
3846
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
3847
|
+
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
3153
3848
|
</react_native_1.View>
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
</react_native_1.
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3849
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>
|
|
3850
|
+
No Console Logs
|
|
3851
|
+
</react_native_1.Text>
|
|
3852
|
+
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
3853
|
+
Console logs from the WebView will appear
|
|
3854
|
+
here.
|
|
3855
|
+
</react_native_1.Text>
|
|
3856
|
+
</react_native_1.View>)}
|
|
3857
|
+
</react_native_1.View>) : (<react_native_1.View style={{
|
|
3858
|
+
flex: 1,
|
|
3859
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
3860
|
+
}}>
|
|
3861
|
+
{webViewHtml ? (OriginalWebView ? (<OriginalWebView source={{
|
|
3862
|
+
html: webViewHtml,
|
|
3863
|
+
baseUrl: webViewHtmlUrl,
|
|
3864
|
+
}} injectedJavaScript={previewInspectScript} onMessage={(event) => {
|
|
3166
3865
|
try {
|
|
3167
3866
|
const data = JSON.parse(event.nativeEvent.data);
|
|
3168
3867
|
if (data.type === 'preview-inspect') {
|
|
@@ -3177,27 +3876,39 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
3177
3876
|
}
|
|
3178
3877
|
}
|
|
3179
3878
|
catch (err) { }
|
|
3180
|
-
}} style={{ flex: 1 }}/>) : (<react_native_1.View style={{
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3879
|
+
}} style={{ flex: 1 }}/>) : (<react_native_1.View style={{
|
|
3880
|
+
flex: 1,
|
|
3881
|
+
justifyContent: 'center',
|
|
3882
|
+
alignItems: 'center',
|
|
3883
|
+
padding: 20,
|
|
3884
|
+
}}>
|
|
3885
|
+
<react_native_1.Text style={{
|
|
3886
|
+
color: AppColors_1.AppColors.grayText,
|
|
3887
|
+
textAlign: 'center',
|
|
3888
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
3889
|
+
}}>
|
|
3890
|
+
react-native-webview is not installed in the
|
|
3891
|
+
target project. Install it to enable Preview
|
|
3892
|
+
mode.
|
|
3893
|
+
</react_native_1.Text>
|
|
3894
|
+
</react_native_1.View>)) : (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
3895
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
3896
|
+
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
3897
|
+
</react_native_1.View>
|
|
3898
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>
|
|
3899
|
+
No Preview Available
|
|
3900
|
+
</react_native_1.Text>
|
|
3901
|
+
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
3902
|
+
Load a page in the WebView to see its visual
|
|
3903
|
+
preview.
|
|
3904
|
+
</react_native_1.Text>
|
|
3905
|
+
</react_native_1.View>)}
|
|
3906
|
+
</react_native_1.View>)}
|
|
3907
|
+
</react_native_1.View>)) : activeTab === 'redux' ? (renderReduxTab()) : (<react_native_1.View style={{ flex: 1 }}>
|
|
3908
|
+
{/* Non-scrollable details header */}
|
|
3909
|
+
<react_native_1.View style={{ paddingHorizontal: 6, paddingTop: 4 }}>
|
|
3910
|
+
<react_native_1.View style={styles_1.default.detailInfoBar}>
|
|
3911
|
+
{(() => {
|
|
3201
3912
|
let hostStr = '';
|
|
3202
3913
|
let pathStr = detailDisplayUrl;
|
|
3203
3914
|
let queryStr = '';
|
|
@@ -3226,31 +3937,29 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
3226
3937
|
}
|
|
3227
3938
|
catch (e) { }
|
|
3228
3939
|
return (<>
|
|
3229
|
-
|
|
3230
|
-
|
|
3940
|
+
<react_native_1.View style={styles_1.default.detailInfoTop}>
|
|
3941
|
+
<react_native_1.View style={{
|
|
3231
3942
|
flexDirection: 'row',
|
|
3232
3943
|
alignItems: 'center',
|
|
3233
3944
|
gap: 8,
|
|
3234
3945
|
}}>
|
|
3235
|
-
|
|
3946
|
+
<react_native_1.View style={[
|
|
3236
3947
|
styles_1.default.methodBadge,
|
|
3237
3948
|
{
|
|
3238
|
-
backgroundColor: `${constants_1.METHOD_COLORS[selected.method] ??
|
|
3239
|
-
constants_1.METHOD_COLORS.ALL}15`,
|
|
3949
|
+
backgroundColor: `${constants_1.METHOD_COLORS[selected.method] ?? constants_1.METHOD_COLORS.ALL}15`,
|
|
3240
3950
|
},
|
|
3241
3951
|
]}>
|
|
3242
|
-
|
|
3952
|
+
<react_native_1.Text style={[
|
|
3243
3953
|
styles_1.default.methodBadgeText,
|
|
3244
3954
|
{
|
|
3245
|
-
color: constants_1.METHOD_COLORS[selected.method] ??
|
|
3246
|
-
constants_1.METHOD_COLORS.ALL,
|
|
3955
|
+
color: constants_1.METHOD_COLORS[selected.method] ?? constants_1.METHOD_COLORS.ALL,
|
|
3247
3956
|
},
|
|
3248
3957
|
]}>
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3958
|
+
{selected.method}
|
|
3959
|
+
</react_native_1.Text>
|
|
3960
|
+
</react_native_1.View>
|
|
3252
3961
|
|
|
3253
|
-
|
|
3962
|
+
{selected.status != null && (<react_native_1.View style={[
|
|
3254
3963
|
styles_1.default.chip,
|
|
3255
3964
|
{
|
|
3256
3965
|
backgroundColor: selected.status === 0
|
|
@@ -3261,10 +3970,10 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
3261
3970
|
: `${(0, helpers_1.getStatusColor)(selected.status)}40`,
|
|
3262
3971
|
},
|
|
3263
3972
|
]}>
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3973
|
+
{selected.status === 0 ? (<NetworkIcons_1.FailIcon size={8} color={AppColors_1.AppColors.errorColor}/>) : (<react_native_svg_1.default width={6} height={6} viewBox="0 0 10 10" fill="none">
|
|
3974
|
+
<react_native_svg_1.Circle cx="5" cy="5" r="5" fill={(0, helpers_1.getStatusColor)(selected.status)}/>
|
|
3975
|
+
</react_native_svg_1.default>)}
|
|
3976
|
+
<react_native_1.Text style={[
|
|
3268
3977
|
styles_1.default.chipText,
|
|
3269
3978
|
{
|
|
3270
3979
|
color: selected.status === 0
|
|
@@ -3272,29 +3981,38 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
3272
3981
|
: (0, helpers_1.getStatusColor)(selected.status),
|
|
3273
3982
|
},
|
|
3274
3983
|
]}>
|
|
3275
|
-
|
|
3984
|
+
{selected.status === 0
|
|
3276
3985
|
? 'Failed'
|
|
3277
3986
|
: String(selected.status)}
|
|
3278
|
-
|
|
3279
|
-
|
|
3987
|
+
</react_native_1.Text>
|
|
3988
|
+
</react_native_1.View>)}
|
|
3280
3989
|
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3990
|
+
{selected.duration != null && (<react_native_1.View style={[
|
|
3991
|
+
styles_1.default.chip,
|
|
3992
|
+
{
|
|
3993
|
+
backgroundColor: 'rgba(104,75,155,0.08)',
|
|
3994
|
+
borderColor: 'rgba(104,75,155,0.18)',
|
|
3995
|
+
},
|
|
3996
|
+
]}>
|
|
3997
|
+
<react_native_1.Text style={[
|
|
3998
|
+
styles_1.default.chipText,
|
|
3999
|
+
{ color: AppColors_1.AppColors.purple },
|
|
4000
|
+
]}>
|
|
4001
|
+
{selected.duration}ms
|
|
4002
|
+
</react_native_1.Text>
|
|
4003
|
+
</react_native_1.View>)}
|
|
4004
|
+
</react_native_1.View>
|
|
4005
|
+
<react_native_1.View style={styles_1.default.detailInfoRight}>
|
|
4006
|
+
<TouchableScale_1.default style={styles_1.default.iconSquareBtn} onPress={() => react_native_1.Linking.openURL(detailDisplayUrl)} hitSlop={12}>
|
|
4007
|
+
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
4008
|
+
</TouchableScale_1.default>
|
|
4009
|
+
<CopyButton_1.default value={(0, helpers_1.getFetchCommand)(selected)} label="fetch()" iconType="fetch"/>
|
|
4010
|
+
<CopyButton_1.default value={(0, helpers_1.getCurlCommand)(selected)} label="cURL" iconType="terminal"/>
|
|
4011
|
+
<CopyButton_1.default value={detailDisplayUrl} label="URL"/>
|
|
4012
|
+
</react_native_1.View>
|
|
4013
|
+
</react_native_1.View>
|
|
3296
4014
|
|
|
3297
|
-
|
|
4015
|
+
<react_native_1.Pressable style={{
|
|
3298
4016
|
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
3299
4017
|
borderRadius: 10,
|
|
3300
4018
|
borderWidth: 1,
|
|
@@ -3302,28 +4020,59 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
3302
4020
|
padding: 10,
|
|
3303
4021
|
marginTop: 6,
|
|
3304
4022
|
}} onPress={() => react_native_1.Linking.openURL(detailDisplayUrl)}>
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
4023
|
+
<react_native_1.View style={{
|
|
4024
|
+
flexDirection: 'row',
|
|
4025
|
+
alignItems: 'center',
|
|
4026
|
+
justifyContent: 'space-between',
|
|
4027
|
+
marginBottom: 2,
|
|
4028
|
+
}}>
|
|
4029
|
+
<react_native_1.Text style={{
|
|
4030
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
4031
|
+
fontSize: 10,
|
|
4032
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
4033
|
+
flex: 1,
|
|
4034
|
+
}} numberOfLines={1}>
|
|
4035
|
+
{hostStr || 'API Endpoint'}
|
|
4036
|
+
</react_native_1.Text>
|
|
4037
|
+
{queryStr ? (<react_native_1.View style={{
|
|
4038
|
+
backgroundColor: 'rgba(104,75,155,0.08)',
|
|
4039
|
+
paddingHorizontal: 5,
|
|
4040
|
+
paddingVertical: 1,
|
|
4041
|
+
borderRadius: 4,
|
|
4042
|
+
}}>
|
|
4043
|
+
<react_native_1.Text style={{
|
|
4044
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
4045
|
+
fontSize: 8.5,
|
|
4046
|
+
color: AppColors_1.AppColors.purple,
|
|
4047
|
+
}}>
|
|
4048
|
+
Query Params
|
|
4049
|
+
</react_native_1.Text>
|
|
4050
|
+
</react_native_1.View>) : null}
|
|
4051
|
+
</react_native_1.View>
|
|
4052
|
+
<react_native_1.Text selectable={true} style={{
|
|
4053
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
4054
|
+
fontSize: 12,
|
|
4055
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
4056
|
+
marginTop: 2,
|
|
4057
|
+
}} numberOfLines={2}>
|
|
4058
|
+
{pathStr}
|
|
4059
|
+
</react_native_1.Text>
|
|
4060
|
+
{queryStr ? (<react_native_1.Text selectable={true} style={{
|
|
4061
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
4062
|
+
fontSize: 10,
|
|
4063
|
+
color: AppColors_1.AppColors.grayTextWeak,
|
|
4064
|
+
marginTop: 4,
|
|
4065
|
+
}} numberOfLines={1}>
|
|
4066
|
+
{queryStr}
|
|
4067
|
+
</react_native_1.Text>) : null}
|
|
4068
|
+
</react_native_1.Pressable>
|
|
4069
|
+
</>);
|
|
3321
4070
|
})()}
|
|
3322
|
-
|
|
3323
|
-
|
|
4071
|
+
</react_native_1.View>
|
|
4072
|
+
</react_native_1.View>
|
|
3324
4073
|
|
|
3325
|
-
|
|
3326
|
-
|
|
4074
|
+
{/* Sticky Segment Control */}
|
|
4075
|
+
<react_native_1.View style={{
|
|
3327
4076
|
flexDirection: 'row',
|
|
3328
4077
|
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
3329
4078
|
borderRadius: 10,
|
|
@@ -3334,7 +4083,12 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
3334
4083
|
borderWidth: 1,
|
|
3335
4084
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
3336
4085
|
}}>
|
|
3337
|
-
|
|
4086
|
+
{[
|
|
4087
|
+
'metadata',
|
|
4088
|
+
'headers',
|
|
4089
|
+
'request',
|
|
4090
|
+
'response',
|
|
4091
|
+
].map(tab => {
|
|
3338
4092
|
const isActive = apiDetailActiveTab === tab;
|
|
3339
4093
|
if (tab === 'request' && selected.request == null)
|
|
3340
4094
|
return null;
|
|
@@ -3348,7 +4102,9 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
3348
4102
|
return 'Response';
|
|
3349
4103
|
};
|
|
3350
4104
|
const getIcon = () => {
|
|
3351
|
-
const iconColor = isActive
|
|
4105
|
+
const iconColor = isActive
|
|
4106
|
+
? '#FFFFFF'
|
|
4107
|
+
: AppColors_1.AppColors.grayText;
|
|
3352
4108
|
if (tab === 'metadata')
|
|
3353
4109
|
return <NetworkIcons_1.StatusIcon color={iconColor}/>;
|
|
3354
4110
|
if (tab === 'headers')
|
|
@@ -3357,122 +4113,139 @@ const NetworkInspector = ({ enabled = true }) => {
|
|
|
3357
4113
|
return <NetworkIcons_1.RequestIcon color={iconColor}/>;
|
|
3358
4114
|
return <NetworkIcons_1.ResponseIcon color={iconColor}/>;
|
|
3359
4115
|
};
|
|
3360
|
-
return (<react_native_1.TouchableOpacity key={tab} onPress={() =>
|
|
4116
|
+
return (<react_native_1.TouchableOpacity key={tab} onPress={() => {
|
|
4117
|
+
animateNextLayout();
|
|
4118
|
+
setApiDetailActiveTab(tab);
|
|
4119
|
+
}} style={{
|
|
3361
4120
|
flex: 1,
|
|
3362
4121
|
paddingVertical: 6,
|
|
3363
4122
|
flexDirection: 'row',
|
|
3364
4123
|
alignItems: 'center',
|
|
3365
4124
|
justifyContent: 'center',
|
|
3366
4125
|
borderRadius: 8,
|
|
3367
|
-
backgroundColor: isActive
|
|
4126
|
+
backgroundColor: isActive
|
|
4127
|
+
? AppColors_1.AppColors.purple
|
|
4128
|
+
: 'transparent',
|
|
3368
4129
|
gap: 4,
|
|
3369
4130
|
}}>
|
|
3370
|
-
|
|
3371
|
-
|
|
4131
|
+
{getIcon()}
|
|
4132
|
+
<react_native_1.Text style={{
|
|
3372
4133
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3373
4134
|
fontSize: 10,
|
|
3374
|
-
color: isActive
|
|
4135
|
+
color: isActive
|
|
4136
|
+
? '#FFFFFF'
|
|
4137
|
+
: AppColors_1.AppColors.grayText,
|
|
3375
4138
|
}}>
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
4139
|
+
{getLabel()}
|
|
4140
|
+
</react_native_1.Text>
|
|
4141
|
+
</react_native_1.TouchableOpacity>);
|
|
3379
4142
|
})}
|
|
3380
|
-
|
|
4143
|
+
</react_native_1.View>
|
|
3381
4144
|
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
4145
|
+
{/* Scrollable Tab Content */}
|
|
4146
|
+
<react_native_1.ScrollView style={styles_1.default.detailScroll} contentContainerStyle={{
|
|
4147
|
+
paddingHorizontal: 6,
|
|
4148
|
+
paddingBottom: 24,
|
|
4149
|
+
}} showsVerticalScrollIndicator={true}>
|
|
4150
|
+
{apiDetailActiveTab === 'metadata' && (<>
|
|
4151
|
+
<MetaAccordion_1.default status={selected.status} statusColor={(0, helpers_1.getStatusColor)(selected.status)} duration={selected.duration} size={(0, helpers_1.getSize)(selected.response)} triggeredAt={(0, helpers_1.formatDateTime)(selected.startTime)} method={selected.method} contentType={selected.responseHeaders?.['content-type'] ||
|
|
3386
4152
|
selected.responseHeaders?.['Content-Type']} url={selected.url}/>
|
|
3387
4153
|
|
|
3388
|
-
|
|
4154
|
+
{(() => {
|
|
3389
4155
|
const routeInfo = logRouteMapRef.current.get(selected.id);
|
|
3390
4156
|
if (!routeInfo || routeInfo.path === 'Navigators')
|
|
3391
4157
|
return null;
|
|
3392
4158
|
return <SourcePageCard_1.default routeInfo={routeInfo}/>;
|
|
3393
4159
|
})()}
|
|
3394
4160
|
|
|
3395
|
-
|
|
4161
|
+
{(() => {
|
|
3396
4162
|
const cType = selected.responseHeaders?.['content-type'] ||
|
|
3397
4163
|
selected.responseHeaders?.['Content-Type'];
|
|
3398
4164
|
if (cType?.includes('image/')) {
|
|
3399
4165
|
return (<react_native_1.View style={styles_1.default.imagePreviewWrapper}>
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
4166
|
+
<react_native_1.Image source={{ uri: selected.url }} style={styles_1.default.imagePreview} resizeMode="contain"/>
|
|
4167
|
+
<TouchableScale_1.default style={styles_1.default.imageDownloadBtn} onPress={() => react_native_1.Linking.openURL(selected.url)} hitSlop={10}>
|
|
4168
|
+
<NetworkIcons_1.DownloadIcon color={AppColors_1.AppColors.purple} size={18}/>
|
|
4169
|
+
</TouchableScale_1.default>
|
|
4170
|
+
</react_native_1.View>);
|
|
3405
4171
|
}
|
|
3406
4172
|
return null;
|
|
3407
4173
|
})()}
|
|
3408
|
-
|
|
4174
|
+
</>)}
|
|
3409
4175
|
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
4176
|
+
{apiDetailActiveTab === 'headers' && (<>
|
|
4177
|
+
<react_native_1.View style={styles_1.default.detailSearchRow}>
|
|
4178
|
+
<react_native_1.View style={styles_1.default.detailSearchBox}>
|
|
4179
|
+
<react_native_1.TextInput placeholder="Search headers..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={detailSearch} onChangeText={setDetailSearch} style={styles_1.default.detailSearchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
4180
|
+
{detailSearch.length > 0 && (<react_native_1.Pressable onPress={() => setDetailSearch('')} hitSlop={10} style={{ padding: 8 }}>
|
|
4181
|
+
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
4182
|
+
</react_native_1.Pressable>)}
|
|
4183
|
+
</react_native_1.View>
|
|
4184
|
+
</react_native_1.View>
|
|
3419
4185
|
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
4186
|
+
<HeadersSection_1.default title="Request Headers" headers={selected.requestHeaders} search={detailSearch} resetKey={selected.id}/>
|
|
4187
|
+
<HeadersSection_1.default title="Response Headers" headers={selected.responseHeaders} search={detailSearch} resetKey={selected.id}/>
|
|
4188
|
+
</>)}
|
|
3423
4189
|
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
4190
|
+
{apiDetailActiveTab === 'request' &&
|
|
4191
|
+
selected.request != null && (<>
|
|
4192
|
+
<react_native_1.View style={styles_1.default.detailSearchRow}>
|
|
4193
|
+
<react_native_1.View style={styles_1.default.detailSearchBox}>
|
|
4194
|
+
<react_native_1.TextInput placeholder="Search request..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={detailSearch} onChangeText={setDetailSearch} style={styles_1.default.detailSearchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
4195
|
+
{detailSearch.length > 0 && (<react_native_1.Pressable onPress={() => setDetailSearch('')} hitSlop={10} style={{ padding: 8 }}>
|
|
4196
|
+
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
4197
|
+
</react_native_1.Pressable>)}
|
|
4198
|
+
</react_native_1.View>
|
|
4199
|
+
</react_native_1.View>
|
|
3433
4200
|
|
|
3434
|
-
|
|
3435
|
-
|
|
4201
|
+
<react_native_1.View style={styles_1.default.sectionContainer}>
|
|
4202
|
+
<SectionHeader_1.default title="Request" value={selected.request} expanded={reqExpanded} onToggleExpand={() => setReqExpanded(v => !v)} showDiff={prevRequestData != null} isDiffing={showReqDiff} onToggleDiff={() => {
|
|
3436
4203
|
setShowReqDiff(v => !v);
|
|
3437
4204
|
if (!reqExpanded && !showReqDiff)
|
|
3438
4205
|
setReqExpanded(true);
|
|
3439
4206
|
}}/>
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
4207
|
+
{showReqDiff ? (<DiffViewer_1.default oldData={prevRequestData} newData={selected.request} forceOpen={reqExpanded}/>) : (<JsonViewer_1.default data={selected.request} search={detailSearch} forceOpen={reqExpanded}/>)}
|
|
4208
|
+
</react_native_1.View>
|
|
4209
|
+
</>)}
|
|
3443
4210
|
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
4211
|
+
{apiDetailActiveTab === 'response' && (<>
|
|
4212
|
+
<react_native_1.View style={styles_1.default.detailSearchRow}>
|
|
4213
|
+
<react_native_1.View style={styles_1.default.detailSearchBox}>
|
|
4214
|
+
<react_native_1.TextInput placeholder="Search response..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={detailSearch} onChangeText={setDetailSearch} style={styles_1.default.detailSearchInput} autoCorrect={false} autoCapitalize="none"/>
|
|
4215
|
+
{detailSearch.length > 0 && (<react_native_1.Pressable onPress={() => setDetailSearch('')} hitSlop={10} style={{ padding: 8 }}>
|
|
4216
|
+
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
4217
|
+
</react_native_1.Pressable>)}
|
|
4218
|
+
</react_native_1.View>
|
|
4219
|
+
</react_native_1.View>
|
|
3453
4220
|
|
|
3454
|
-
|
|
3455
|
-
|
|
4221
|
+
<react_native_1.View style={styles_1.default.sectionContainer}>
|
|
4222
|
+
<SectionHeader_1.default title="Response" value={selected.response} expanded={resExpanded} onToggleExpand={() => setResExpanded(v => !v)} showDiff={prevResponseData != null} isDiffing={showResDiff} onToggleDiff={() => {
|
|
3456
4223
|
setShowResDiff(v => !v);
|
|
3457
4224
|
if (!resExpanded && !showResDiff)
|
|
3458
4225
|
setResExpanded(true);
|
|
3459
4226
|
}}/>
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
4227
|
+
{showResDiff ? (<DiffViewer_1.default oldData={prevResponseData} newData={selected.response} forceOpen={resExpanded}/>) : (<JsonViewer_1.default data={selected.response} search={detailSearch} forceOpen={resExpanded}/>)}
|
|
4228
|
+
</react_native_1.View>
|
|
4229
|
+
</>)}
|
|
4230
|
+
</react_native_1.ScrollView>
|
|
4231
|
+
</react_native_1.View>)) : (<react_native_1.View style={styles_1.default.empty}>
|
|
4232
|
+
<react_native_1.ActivityIndicator size="large" color={AppColors_1.AppColors.purple}/>
|
|
4233
|
+
<react_native_1.Text style={[styles_1.default.emptySub, { marginTop: 12 }]}>
|
|
4234
|
+
Loading logs...
|
|
4235
|
+
</react_native_1.Text>
|
|
4236
|
+
</react_native_1.View>)}
|
|
3470
4237
|
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
4238
|
+
{settingsPage !== null && (<react_native_1.View style={[
|
|
4239
|
+
react_native_1.StyleSheet.absoluteFill,
|
|
4240
|
+
{
|
|
4241
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
4242
|
+
zIndex: 99999,
|
|
4243
|
+
},
|
|
4244
|
+
]}>
|
|
4245
|
+
{renderSettings()}
|
|
4246
|
+
</react_native_1.View>)}
|
|
4247
|
+
</react_native_1.View>
|
|
3474
4248
|
</react_native_1.View>
|
|
3475
|
-
</react_native_1.View>
|
|
3476
4249
|
</ErrorBoundary_1.default>)}
|
|
3477
4250
|
</react_native_1.Modal>
|
|
3478
4251
|
</>);
|