react-native-inapp-inspector 1.1.12 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/components/AnalyticsDetail.js +64 -21
- package/dist/commonjs/components/AnalyticsEventCard.js +100 -13
- package/dist/commonjs/components/HighlightText.js +1 -1
- package/dist/commonjs/components/JsonViewer.d.ts +3 -1
- package/dist/commonjs/components/JsonViewer.js +327 -9
- package/dist/commonjs/components/MetaAccordion.d.ts +10 -1
- package/dist/commonjs/components/MetaAccordion.js +121 -24
- package/dist/commonjs/components/NetworkIcons.d.ts +1 -0
- package/dist/commonjs/components/NetworkIcons.js +8 -1
- package/dist/commonjs/components/ReduxTreeView.d.ts +12 -3
- package/dist/commonjs/components/ReduxTreeView.js +1096 -278
- package/dist/commonjs/components/SectionHeader.d.ts +1 -1
- package/dist/commonjs/components/SectionHeader.js +7 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +8 -0
- package/dist/commonjs/customHooks/analyticsLogger.js +42 -1
- package/dist/commonjs/customHooks/reduxLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/reduxLogger.js +2 -0
- package/dist/commonjs/helpers/index.d.ts +1 -0
- package/dist/commonjs/helpers/index.js +15 -1
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
- package/dist/commonjs/helpers/settingsStore.js +4 -0
- package/dist/commonjs/index.d.ts +1 -1
- package/dist/commonjs/index.js +347 -444
- package/dist/commonjs/styles/index.d.ts +92 -33
- package/dist/commonjs/styles/index.js +101 -45
- package/dist/commonjs/types/index.d.ts +3 -0
- package/dist/esm/components/AnalyticsDetail.js +64 -21
- package/dist/esm/components/AnalyticsEventCard.js +100 -13
- package/dist/esm/components/HighlightText.js +3 -3
- package/dist/esm/components/JsonViewer.d.ts +3 -1
- package/dist/esm/components/JsonViewer.js +295 -10
- package/dist/esm/components/MetaAccordion.d.ts +10 -1
- package/dist/esm/components/MetaAccordion.js +90 -26
- package/dist/esm/components/NetworkIcons.d.ts +1 -0
- package/dist/esm/components/NetworkIcons.js +6 -0
- package/dist/esm/components/ReduxTreeView.d.ts +12 -3
- package/dist/esm/components/ReduxTreeView.js +1095 -279
- package/dist/esm/components/SectionHeader.d.ts +1 -1
- package/dist/esm/components/SectionHeader.js +8 -2
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.d.ts +8 -0
- package/dist/esm/customHooks/analyticsLogger.js +37 -0
- package/dist/esm/customHooks/reduxLogger.d.ts +2 -0
- package/dist/esm/customHooks/reduxLogger.js +2 -0
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +14 -1
- package/dist/esm/helpers/settingsStore.d.ts +1 -0
- package/dist/esm/helpers/settingsStore.js +3 -0
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +345 -446
- package/dist/esm/styles/index.d.ts +92 -33
- package/dist/esm/styles/index.js +101 -45
- package/dist/esm/types/index.d.ts +3 -0
- package/example/android/app/build.gradle +29 -1
- package/example/android/app/src/main/java/com/example/MainApplication.kt +25 -0
- package/example/android/build.gradle +31 -4
- package/example/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/example/android/gradle.properties +1 -0
- package/example/android/settings.gradle +20 -1
- package/example/package-lock.json +1 -1
- package/package.json +1 -1
package/dist/commonjs/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.clearActionHistory = exports.getActionHistory = exports.subscribeReduxState = exports.getReduxState = exports.inspectorReduxMiddleware = exports.connectReduxStore = exports.ErrorBoundary = exports.subscribeWebView = exports.clearWebViewData = exports.getWebViewHtmlUrl = exports.getWebViewJs = exports.getWebViewCss = exports.getWebViewHtml = exports.getWebViewNavHistory = exports.getWebViewLogs = exports.WebView = exports.clearAnalyticsEvents = exports.subscribeAnalyticsEvents = exports.logAnalyticsEvent = exports.setupAnalyticsLogger = exports.subscribeConsoleLogs = exports.clearConsoleLogs = exports.setupConsoleLogger = exports.addAxiosInterceptors = exports.subscribeNetworkLogs = exports.clearNetworkLogs = exports.setupNetworkLogger = void 0;
|
|
39
|
+
exports.clearActionHistory = exports.getActionHistory = exports.subscribeReduxState = exports.getReduxState = exports.inspectorReduxMiddleware = exports.connectReduxStore = exports.ErrorBoundary = exports.subscribeWebView = exports.clearWebViewData = exports.getWebViewHtmlUrl = exports.getWebViewJs = exports.getWebViewCss = exports.getWebViewHtml = exports.getWebViewNavHistory = exports.getWebViewLogs = exports.WebView = exports.getCollectionEnabled = exports.getDefaultEventParameters = exports.getCurrentUserId = exports.getCurrentUserProperties = exports.clearAnalyticsEvents = exports.subscribeAnalyticsEvents = exports.logAnalyticsEvent = exports.setupAnalyticsLogger = exports.subscribeConsoleLogs = exports.clearConsoleLogs = exports.setupConsoleLogger = exports.addAxiosInterceptors = exports.subscribeNetworkLogs = exports.clearNetworkLogs = exports.setupNetworkLogger = void 0;
|
|
40
40
|
const react_1 = __importStar(require("react"));
|
|
41
41
|
const react_native_1 = require("react-native");
|
|
42
42
|
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
@@ -77,7 +77,7 @@ const networkLogger_1 = require("./customHooks/networkLogger");
|
|
|
77
77
|
const consoleLogger_1 = require("./customHooks/consoleLogger");
|
|
78
78
|
const logFilters_1 = require("./customHooks/logFilters");
|
|
79
79
|
const analyticsLogger_1 = require("./customHooks/analyticsLogger");
|
|
80
|
-
const AnalyticsEventCard_1 =
|
|
80
|
+
const AnalyticsEventCard_1 = __importDefault(require("./components/AnalyticsEventCard"));
|
|
81
81
|
const AnalyticsDetail_1 = __importDefault(require("./components/AnalyticsDetail"));
|
|
82
82
|
const webViewLogger_1 = require("./customHooks/webViewLogger");
|
|
83
83
|
let OriginalWebView = null;
|
|
@@ -193,6 +193,7 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
193
193
|
const [sectionFilters, setSectionFilters] = (0, react_1.useState)({});
|
|
194
194
|
const [collapsedSections, setCollapsedSections] = (0, react_1.useState)(new Set());
|
|
195
195
|
const [showNetworkMenu, setShowNetworkMenu] = (0, react_1.useState)(false);
|
|
196
|
+
const [showHeaderInfo, setShowHeaderInfo] = (0, react_1.useState)(false);
|
|
196
197
|
const [showUiMenu, setShowUiMenu] = (0, react_1.useState)(false);
|
|
197
198
|
const [sortOrder, setSortOrder] = (0, react_1.useState)('newest');
|
|
198
199
|
// #7 — sort order for the Logs (console) tab
|
|
@@ -271,10 +272,10 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
271
272
|
const [settingsActiveSubTab, setSettingsActiveSubTab] = (0, react_1.useState)('module');
|
|
272
273
|
const [insightsActiveSubTab, setInsightsActiveSubTab] = (0, react_1.useState)('apis');
|
|
273
274
|
const [tabVisibility, setTabVisibility] = (0, react_1.useState)({
|
|
274
|
-
insights:
|
|
275
|
+
insights: false,
|
|
275
276
|
apis: true,
|
|
276
277
|
logs: true,
|
|
277
|
-
analytics:
|
|
278
|
+
analytics: true,
|
|
278
279
|
webview: false,
|
|
279
280
|
redux: false,
|
|
280
281
|
});
|
|
@@ -294,10 +295,10 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
294
295
|
setModalHeightPercent(90);
|
|
295
296
|
setModalAnimationType('slide');
|
|
296
297
|
setTabVisibility({
|
|
297
|
-
insights:
|
|
298
|
+
insights: false,
|
|
298
299
|
apis: true,
|
|
299
300
|
logs: true,
|
|
300
|
-
analytics:
|
|
301
|
+
analytics: true,
|
|
301
302
|
webview: false,
|
|
302
303
|
redux: false,
|
|
303
304
|
});
|
|
@@ -362,10 +363,10 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
362
363
|
const dt = saved.defaultTab;
|
|
363
364
|
const vis = {
|
|
364
365
|
...{
|
|
365
|
-
insights:
|
|
366
|
+
insights: false,
|
|
366
367
|
apis: true,
|
|
367
368
|
logs: true,
|
|
368
|
-
analytics:
|
|
369
|
+
analytics: true,
|
|
369
370
|
webview: false,
|
|
370
371
|
redux: false,
|
|
371
372
|
},
|
|
@@ -475,7 +476,6 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
475
476
|
});
|
|
476
477
|
};
|
|
477
478
|
const switchActiveTab = (0, react_1.useCallback)((key) => {
|
|
478
|
-
animateNextLayout();
|
|
479
479
|
setActiveTab(key);
|
|
480
480
|
}, []);
|
|
481
481
|
const navigateFromDashboard = (key) => {
|
|
@@ -529,8 +529,8 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
529
529
|
const [selectedEvent, setSelectedEvent] = (0, react_1.useState)(null);
|
|
530
530
|
const [analyticsSearch, setAnalyticsSearch] = (0, react_1.useState)('');
|
|
531
531
|
const [hideScreenView, setHideScreenView] = (0, react_1.useState)(true);
|
|
532
|
-
const [
|
|
533
|
-
const [
|
|
532
|
+
const [isAnalyticsLayoutReady, setIsAnalyticsLayoutReady] = (0, react_1.useState)(false);
|
|
533
|
+
const [analyticsHeaderExpanded, setAnalyticsHeaderExpanded] = (0, react_1.useState)(false);
|
|
534
534
|
const [newEventIds, setNewEventIds] = (0, react_1.useState)(new Set());
|
|
535
535
|
const prevEventIdsRef = (0, react_1.useRef)(new Set());
|
|
536
536
|
const [navState, setNavState] = (0, react_1.useState)(null);
|
|
@@ -726,6 +726,84 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
726
726
|
}).start();
|
|
727
727
|
}
|
|
728
728
|
}, [newLogIds]);
|
|
729
|
+
const renderAnalyticsHeader = () => {
|
|
730
|
+
const userId = (0, analyticsLogger_1.getCurrentUserId)();
|
|
731
|
+
const userProperties = (0, analyticsLogger_1.getCurrentUserProperties)();
|
|
732
|
+
const defaultParams = (0, analyticsLogger_1.getDefaultEventParameters)();
|
|
733
|
+
const isTrackingEnabled = (0, analyticsLogger_1.getCollectionEnabled)();
|
|
734
|
+
const hasUserProps = Object.keys(userProperties).length > 0;
|
|
735
|
+
const hasDefaultParams = Object.keys(defaultParams).length > 0;
|
|
736
|
+
const totalEvents = filteredAnalyticsEvents.length;
|
|
737
|
+
return (<react_native_1.View style={styles_1.default.analyticsHeaderCard}>
|
|
738
|
+
<react_native_1.View style={[styles_1.default.analyticsHeaderTop, !analyticsHeaderExpanded && { marginBottom: 0 }]}>
|
|
739
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
740
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
741
|
+
<react_native_1.Text style={styles_1.default.analyticsHeaderTitle}>Session Info</react_native_1.Text>
|
|
742
|
+
<react_native_1.View style={[
|
|
743
|
+
styles_1.default.statusDot,
|
|
744
|
+
{ backgroundColor: isTrackingEnabled ? AppColors_1.AppColors.greenColor : AppColors_1.AppColors.errorColor }
|
|
745
|
+
]}/>
|
|
746
|
+
<react_native_1.Text style={styles_1.default.statusText}>
|
|
747
|
+
{isTrackingEnabled ? 'Active' : 'Paused'}
|
|
748
|
+
</react_native_1.Text>
|
|
749
|
+
</react_native_1.View>
|
|
750
|
+
<react_native_1.Text style={styles_1.default.analyticsHeaderSubtitle} numberOfLines={1}>
|
|
751
|
+
{userId ? `User ID: ${userId}` : 'Anonymous Session'}
|
|
752
|
+
</react_native_1.Text>
|
|
753
|
+
</react_native_1.View>
|
|
754
|
+
|
|
755
|
+
<react_native_1.TouchableOpacity style={styles_1.default.analyticsHeaderToggle} activeOpacity={0.7} onPress={() => {
|
|
756
|
+
animateNextLayout();
|
|
757
|
+
setAnalyticsHeaderExpanded(!analyticsHeaderExpanded);
|
|
758
|
+
}}>
|
|
759
|
+
<react_native_1.Text style={styles_1.default.analyticsHeaderToggleText}>
|
|
760
|
+
{analyticsHeaderExpanded ? 'Collapse' : 'Expand'}
|
|
761
|
+
</react_native_1.Text>
|
|
762
|
+
</react_native_1.TouchableOpacity>
|
|
763
|
+
</react_native_1.View>
|
|
764
|
+
|
|
765
|
+
{analyticsHeaderExpanded && (<>
|
|
766
|
+
{/* Stats Row */}
|
|
767
|
+
<react_native_1.View style={styles_1.default.analyticsStatsRow}>
|
|
768
|
+
<react_native_1.View style={styles_1.default.analyticsStatBox}>
|
|
769
|
+
<react_native_1.Text style={styles_1.default.analyticsStatValue}>{totalEvents}</react_native_1.Text>
|
|
770
|
+
<react_native_1.Text style={styles_1.default.analyticsStatLabel}>Events</react_native_1.Text>
|
|
771
|
+
</react_native_1.View>
|
|
772
|
+
<react_native_1.View style={styles_1.default.analyticsStatBox}>
|
|
773
|
+
<react_native_1.Text style={styles_1.default.analyticsStatValue}>
|
|
774
|
+
{Object.keys(userProperties).length}
|
|
775
|
+
</react_native_1.Text>
|
|
776
|
+
<react_native_1.Text style={styles_1.default.analyticsStatLabel}>User Props</react_native_1.Text>
|
|
777
|
+
</react_native_1.View>
|
|
778
|
+
<react_native_1.View style={styles_1.default.analyticsStatBox}>
|
|
779
|
+
<react_native_1.Text style={styles_1.default.analyticsStatValue}>
|
|
780
|
+
{Object.keys(defaultParams).length}
|
|
781
|
+
</react_native_1.Text>
|
|
782
|
+
<react_native_1.Text style={styles_1.default.analyticsStatLabel}>Defaults</react_native_1.Text>
|
|
783
|
+
</react_native_1.View>
|
|
784
|
+
</react_native_1.View>
|
|
785
|
+
|
|
786
|
+
{/* Details Section */}
|
|
787
|
+
{(hasUserProps || hasDefaultParams) && (<react_native_1.View style={styles_1.default.analyticsHeaderDetails}>
|
|
788
|
+
{hasUserProps && (<react_native_1.View style={{ marginBottom: 10 }}>
|
|
789
|
+
<react_native_1.Text style={styles_1.default.detailsGroupTitle}>Active User Properties</react_native_1.Text>
|
|
790
|
+
{Object.entries(userProperties).map(([k, v]) => (<react_native_1.View key={k} style={styles_1.default.detailsRow}>
|
|
791
|
+
<react_native_1.Text style={styles_1.default.detailsKey} selectable={true}>{k}</react_native_1.Text>
|
|
792
|
+
<react_native_1.Text style={styles_1.default.detailsValue} selectable={true}>{String(v)}</react_native_1.Text>
|
|
793
|
+
</react_native_1.View>))}
|
|
794
|
+
</react_native_1.View>)}
|
|
795
|
+
|
|
796
|
+
{hasDefaultParams && (<react_native_1.View>
|
|
797
|
+
<react_native_1.Text style={styles_1.default.detailsGroupTitle}>Default Event Parameters</react_native_1.Text>
|
|
798
|
+
{Object.entries(defaultParams).map(([k, v]) => (<react_native_1.View key={k} style={styles_1.default.detailsRow}>
|
|
799
|
+
<react_native_1.Text style={styles_1.default.detailsKey} selectable={true}>{k}</react_native_1.Text>
|
|
800
|
+
<react_native_1.Text style={styles_1.default.detailsValue} selectable={true}>{String(v)}</react_native_1.Text>
|
|
801
|
+
</react_native_1.View>))}
|
|
802
|
+
</react_native_1.View>)}
|
|
803
|
+
</react_native_1.View>)}
|
|
804
|
+
</>)}
|
|
805
|
+
</react_native_1.View>);
|
|
806
|
+
};
|
|
729
807
|
// #6 — every time the inspector is opened, land on the chosen default tab.
|
|
730
808
|
(0, react_1.useEffect)(() => {
|
|
731
809
|
if (visible) {
|
|
@@ -894,6 +972,11 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
894
972
|
unsubscribeRedux();
|
|
895
973
|
};
|
|
896
974
|
}, []);
|
|
975
|
+
(0, react_1.useEffect)(() => {
|
|
976
|
+
if (activeTab !== 'analytics') {
|
|
977
|
+
setIsAnalyticsLayoutReady(false);
|
|
978
|
+
}
|
|
979
|
+
}, [activeTab]);
|
|
897
980
|
(0, react_1.useEffect)(() => {
|
|
898
981
|
setReqExpanded(undefined);
|
|
899
982
|
setResExpanded(undefined);
|
|
@@ -1237,15 +1320,6 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
1237
1320
|
analytics: `${searchedLogs.filter(l => l.message.toLowerCase().includes('[analytics error]')).length}/${total}`,
|
|
1238
1321
|
};
|
|
1239
1322
|
}, [visibleConsoleLogs, logSearch]);
|
|
1240
|
-
const topEventsArray = (0, react_1.useMemo)(() => {
|
|
1241
|
-
const freq = {};
|
|
1242
|
-
filteredAnalyticsEvents.forEach(e => {
|
|
1243
|
-
if (e.name === 'screen_view')
|
|
1244
|
-
return;
|
|
1245
|
-
freq[e.name] = (freq[e.name] || 0) + 1;
|
|
1246
|
-
});
|
|
1247
|
-
return Object.entries(freq).sort((a, b) => b[1] - a[1]);
|
|
1248
|
-
}, [filteredAnalyticsEvents]);
|
|
1249
1323
|
function closeModal() {
|
|
1250
1324
|
animateNextLayout();
|
|
1251
1325
|
setVisible(false);
|
|
@@ -3684,16 +3758,9 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
3684
3758
|
</react_native_1.Animated.View>
|
|
3685
3759
|
</react_native_1.View>
|
|
3686
3760
|
{(logs.length > 0 || analyticsEvents.length > 0) && (<react_native_1.Animated.View style={[
|
|
3687
|
-
styles_1.default.
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
]}>
|
|
3691
|
-
<react_native_1.Text style={styles_1.default.fabBadgeText}>
|
|
3692
|
-
{logs.length + analyticsEvents.length > 99
|
|
3693
|
-
? '99+'
|
|
3694
|
-
: logs.length + analyticsEvents.length}
|
|
3695
|
-
</react_native_1.Text>
|
|
3696
|
-
</react_native_1.Animated.View>)}
|
|
3761
|
+
styles_1.default.fabGreenDot,
|
|
3762
|
+
{ transform: [{ scale: unreadPulseAnim }] },
|
|
3763
|
+
]}/>)}
|
|
3697
3764
|
</TouchableScale_1.default>
|
|
3698
3765
|
</react_native_1.Animated.View>
|
|
3699
3766
|
|
|
@@ -3750,16 +3817,16 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
3750
3817
|
<NetworkIcons_1.WhiteBackNavigation />
|
|
3751
3818
|
</TouchableScale_1.default>
|
|
3752
3819
|
|
|
3753
|
-
{selected == null && selectedEvent == null ? (<
|
|
3820
|
+
{selected == null && selectedEvent == null ? (<TouchableScale_1.default onPress={() => setShowHeaderInfo(prev => !prev)} style={{
|
|
3754
3821
|
flexDirection: 'row',
|
|
3755
3822
|
alignItems: 'center',
|
|
3756
|
-
gap:
|
|
3823
|
+
gap: 10,
|
|
3757
3824
|
flex: 1,
|
|
3758
3825
|
}}>
|
|
3759
3826
|
<react_native_1.View style={{
|
|
3760
|
-
width:
|
|
3761
|
-
height:
|
|
3762
|
-
borderRadius:
|
|
3827
|
+
width: 38,
|
|
3828
|
+
height: 38,
|
|
3829
|
+
borderRadius: 19,
|
|
3763
3830
|
backgroundColor: 'rgba(255,255,255,0.13)',
|
|
3764
3831
|
borderWidth: 1.5,
|
|
3765
3832
|
borderColor: 'rgba(255,255,255,0.25)',
|
|
@@ -3770,17 +3837,13 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
3770
3837
|
shadowRadius: 4,
|
|
3771
3838
|
shadowOffset: { width: 0, height: 2 },
|
|
3772
3839
|
}}>
|
|
3773
|
-
<NetworkIcons_1.
|
|
3840
|
+
<NetworkIcons_1.BrandCircleIcon size={34}/>
|
|
3774
3841
|
</react_native_1.View>
|
|
3775
3842
|
<react_native_1.View style={{ gap: 2, flex: 1 }}>
|
|
3776
3843
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
3777
3844
|
<react_native_1.Text style={[styles_1.default.headerTitle]} numberOfLines={1}>
|
|
3778
|
-
{(0, helpers_1.getAppName)()}
|
|
3779
|
-
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 13, color: 'rgba(255,255,255,0.6)' }}>
|
|
3780
|
-
(Inspector)
|
|
3781
|
-
</react_native_1.Text>
|
|
3845
|
+
{(0, helpers_1.getAppName)()}
|
|
3782
3846
|
</react_native_1.Text>
|
|
3783
|
-
{/* #1 — pulsing dot when a newer version is on NPM */}
|
|
3784
3847
|
{updateAvailable && (<react_native_1.Pressable hitSlop={10} onPress={() => react_native_1.Alert.alert('Update Available', `react-native-inapp-inspector v${latestNpmVersion} is available on NPM (installed: v${constants_1.LIB_VERSION}).`, [
|
|
3785
3848
|
{ text: 'Later', style: 'cancel' },
|
|
3786
3849
|
{
|
|
@@ -3803,202 +3866,224 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
3803
3866
|
}}/>
|
|
3804
3867
|
</react_native_1.Pressable>)}
|
|
3805
3868
|
</react_native_1.View>
|
|
3806
|
-
<react_native_1.Text style={{
|
|
3807
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
3808
|
-
fontSize: 10.5,
|
|
3809
|
-
color: 'rgba(255, 255, 255, 0.6)',
|
|
3810
|
-
marginTop: 1,
|
|
3811
|
-
}} selectable={true} numberOfLines={1}>
|
|
3812
|
-
{(0, helpers_1.getBundleIdentifier)()}
|
|
3813
|
-
</react_native_1.Text>
|
|
3814
3869
|
<react_native_1.View style={{
|
|
3815
3870
|
flexDirection: 'row',
|
|
3816
3871
|
alignItems: 'center',
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
alignItems: 'center',
|
|
3824
|
-
borderRadius: 6,
|
|
3825
|
-
overflow: 'hidden',
|
|
3872
|
+
alignSelf: 'flex-start',
|
|
3873
|
+
backgroundColor: 'rgba(255,255,255,0.1)',
|
|
3874
|
+
borderRadius: 10,
|
|
3875
|
+
paddingHorizontal: 8,
|
|
3876
|
+
paddingVertical: 3,
|
|
3877
|
+
gap: 5,
|
|
3826
3878
|
borderWidth: 1,
|
|
3827
|
-
borderColor: 'rgba(255,255,255,0.
|
|
3828
|
-
}}>
|
|
3829
|
-
<react_native_1.View style={{
|
|
3830
|
-
paddingHorizontal: 5,
|
|
3831
|
-
paddingVertical: 2,
|
|
3832
|
-
backgroundColor: 'rgba(255,255,255,0.28)',
|
|
3833
|
-
}}>
|
|
3834
|
-
<react_native_1.Text style={{
|
|
3835
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3836
|
-
fontSize: 9,
|
|
3837
|
-
color: '#FFFFFF',
|
|
3838
|
-
letterSpacing: 0.3,
|
|
3839
|
-
}}>
|
|
3840
|
-
{react_native_1.Platform.OS === 'ios' ? 'iOS' : 'Android'}
|
|
3841
|
-
</react_native_1.Text>
|
|
3842
|
-
</react_native_1.View>
|
|
3843
|
-
<react_native_1.View style={{
|
|
3844
|
-
paddingHorizontal: 5,
|
|
3845
|
-
paddingVertical: 2,
|
|
3846
|
-
backgroundColor: 'rgba(255,255,255,0.12)',
|
|
3847
|
-
}}>
|
|
3848
|
-
<react_native_1.Text style={{
|
|
3849
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
3850
|
-
fontSize: 9.5,
|
|
3851
|
-
color: 'rgba(255,255,255,0.92)',
|
|
3879
|
+
borderColor: 'rgba(255,255,255,0.15)',
|
|
3852
3880
|
}}>
|
|
3853
|
-
{String(react_native_1.Platform.Version)}
|
|
3854
|
-
</react_native_1.Text>
|
|
3855
|
-
</react_native_1.View>
|
|
3856
|
-
</react_native_1.View>
|
|
3857
|
-
|
|
3858
|
-
{/* npm chip */}
|
|
3859
3881
|
<react_native_1.View style={{
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
borderRadius:
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3882
|
+
width: 6,
|
|
3883
|
+
height: 6,
|
|
3884
|
+
borderRadius: 3,
|
|
3885
|
+
backgroundColor: '#4ADE80',
|
|
3886
|
+
}}/>
|
|
3887
|
+
<react_native_1.Text style={{
|
|
3888
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
3889
|
+
fontSize: 10,
|
|
3890
|
+
color: 'rgba(255, 255, 255, 0.85)',
|
|
3891
|
+
letterSpacing: 0.2,
|
|
3892
|
+
}} numberOfLines={1}>
|
|
3893
|
+
{(0, helpers_1.getBundleIdentifier)()}
|
|
3894
|
+
</react_native_1.Text>
|
|
3895
|
+
<react_native_1.Animated.View style={{
|
|
3896
|
+
transform: [{ rotate: showHeaderInfo ? '180deg' : '0deg' }],
|
|
3897
|
+
marginLeft: 2,
|
|
3866
3898
|
}}>
|
|
3899
|
+
<NetworkIcons_1.ChevronIcon color="rgba(255,255,255,0.6)" size={12}/>
|
|
3900
|
+
</react_native_1.Animated.View>
|
|
3901
|
+
</react_native_1.View>
|
|
3902
|
+
{showHeaderInfo && (<react_native_1.View style={{
|
|
3903
|
+
flexDirection: 'row',
|
|
3904
|
+
alignItems: 'center',
|
|
3905
|
+
gap: 6,
|
|
3906
|
+
marginTop: 4,
|
|
3907
|
+
}}>
|
|
3867
3908
|
<react_native_1.View style={{
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3909
|
+
flexDirection: 'row',
|
|
3910
|
+
alignItems: 'center',
|
|
3911
|
+
borderRadius: 6,
|
|
3912
|
+
overflow: 'hidden',
|
|
3913
|
+
borderWidth: 1,
|
|
3914
|
+
borderColor: 'rgba(255,255,255,0.18)',
|
|
3915
|
+
}}>
|
|
3916
|
+
<react_native_1.View style={{
|
|
3917
|
+
paddingHorizontal: 5,
|
|
3918
|
+
paddingVertical: 2,
|
|
3919
|
+
backgroundColor: 'rgba(255,255,255,0.28)',
|
|
3920
|
+
}}>
|
|
3921
|
+
<react_native_1.Text style={{
|
|
3922
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3923
|
+
fontSize: 9,
|
|
3924
|
+
color: '#FFFFFF',
|
|
3925
|
+
letterSpacing: 0.3,
|
|
3926
|
+
}}>
|
|
3927
|
+
{react_native_1.Platform.OS === 'ios' ? 'iOS' : 'Android'}
|
|
3928
|
+
</react_native_1.Text>
|
|
3929
|
+
</react_native_1.View>
|
|
3930
|
+
<react_native_1.View style={{
|
|
3931
|
+
paddingHorizontal: 5,
|
|
3932
|
+
paddingVertical: 2,
|
|
3933
|
+
backgroundColor: 'rgba(255,255,255,0.12)',
|
|
3934
|
+
}}>
|
|
3935
|
+
<react_native_1.Text style={{
|
|
3936
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
3937
|
+
fontSize: 9.5,
|
|
3938
|
+
color: 'rgba(255,255,255,0.92)',
|
|
3939
|
+
}}>
|
|
3940
|
+
{String(react_native_1.Platform.Version)}
|
|
3941
|
+
</react_native_1.Text>
|
|
3942
|
+
</react_native_1.View>
|
|
3880
3943
|
</react_native_1.View>
|
|
3881
3944
|
<react_native_1.View style={{
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3945
|
+
flexDirection: 'row',
|
|
3946
|
+
alignItems: 'center',
|
|
3947
|
+
borderRadius: 6,
|
|
3948
|
+
overflow: 'hidden',
|
|
3949
|
+
borderWidth: 1,
|
|
3950
|
+
borderColor: 'rgba(255,255,255,0.18)',
|
|
3951
|
+
}}>
|
|
3952
|
+
<react_native_1.View style={{
|
|
3953
|
+
paddingHorizontal: 5,
|
|
3954
|
+
paddingVertical: 2,
|
|
3955
|
+
backgroundColor: 'rgba(255,255,255,0.28)',
|
|
3956
|
+
}}>
|
|
3957
|
+
<react_native_1.Text style={{
|
|
3958
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3959
|
+
fontSize: 9,
|
|
3960
|
+
color: '#FFFFFF',
|
|
3961
|
+
letterSpacing: 0.3,
|
|
3962
|
+
}}>
|
|
3963
|
+
npm
|
|
3964
|
+
</react_native_1.Text>
|
|
3965
|
+
</react_native_1.View>
|
|
3966
|
+
<react_native_1.View style={{
|
|
3967
|
+
paddingHorizontal: 5,
|
|
3968
|
+
paddingVertical: 2,
|
|
3969
|
+
backgroundColor: 'rgba(255,255,255,0.12)',
|
|
3970
|
+
}}>
|
|
3971
|
+
<react_native_1.Text style={{
|
|
3972
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
3973
|
+
fontSize: 9.5,
|
|
3974
|
+
color: 'rgba(255,255,255,0.92)',
|
|
3975
|
+
}}>
|
|
3976
|
+
v{constants_1.LIB_VERSION}
|
|
3977
|
+
</react_native_1.Text>
|
|
3978
|
+
</react_native_1.View>
|
|
3893
3979
|
</react_native_1.View>
|
|
3894
|
-
</react_native_1.View>
|
|
3895
|
-
</react_native_1.View>
|
|
3980
|
+
</react_native_1.View>)}
|
|
3896
3981
|
</react_native_1.View>
|
|
3897
|
-
</
|
|
3982
|
+
</TouchableScale_1.default>) : null}
|
|
3898
3983
|
</react_native_1.View>
|
|
3899
3984
|
|
|
3900
|
-
<react_native_1.View style={styles_1.default.headerCenter}>
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3985
|
+
{(selected != null || selectedEvent != null) && (<react_native_1.View style={styles_1.default.headerCenter}>
|
|
3986
|
+
{selected != null ? (<react_native_1.View style={styles_1.default.headerDetailCenter}>
|
|
3987
|
+
<react_native_1.View style={styles_1.default.headerDetailRow}>
|
|
3988
|
+
<react_native_1.View style={[
|
|
3989
|
+
styles_1.default.headerMethodBadge,
|
|
3990
|
+
{
|
|
3991
|
+
backgroundColor: constants_1.METHOD_COLORS[selected.method] ??
|
|
3992
|
+
AppColors_1.AppColors.grayText,
|
|
3993
|
+
},
|
|
3994
|
+
]}>
|
|
3995
|
+
<react_native_1.Text style={styles_1.default.headerMethodText}>
|
|
3996
|
+
{selected.method}
|
|
3997
|
+
</react_native_1.Text>
|
|
3998
|
+
</react_native_1.View>
|
|
3999
|
+
<react_native_1.Text style={styles_1.default.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
4000
|
+
{detailTitle}
|
|
3912
4001
|
</react_native_1.Text>
|
|
3913
4002
|
</react_native_1.View>
|
|
3914
|
-
<react_native_1.
|
|
3915
|
-
{
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
4003
|
+
<react_native_1.View style={styles_1.default.headerDetailSubRow}>
|
|
4004
|
+
<react_native_1.View style={{
|
|
4005
|
+
flexDirection: 'row',
|
|
4006
|
+
alignItems: 'center',
|
|
4007
|
+
gap: 5,
|
|
4008
|
+
paddingHorizontal: 8,
|
|
4009
|
+
paddingVertical: 3,
|
|
4010
|
+
borderRadius: 20,
|
|
4011
|
+
backgroundColor: `${(0, helpers_1.getStatusColor)(selected.status)}26`,
|
|
4012
|
+
borderWidth: 1,
|
|
4013
|
+
borderColor: `${(0, helpers_1.getStatusColor)(selected.status)}55`,
|
|
4014
|
+
}}>
|
|
4015
|
+
<react_native_1.View style={[
|
|
4016
|
+
styles_1.default.headerStatusDot,
|
|
4017
|
+
{
|
|
4018
|
+
backgroundColor: (0, helpers_1.getStatusColor)(selected.status),
|
|
4019
|
+
},
|
|
4020
|
+
]}/>
|
|
4021
|
+
<react_native_1.Text style={[
|
|
4022
|
+
styles_1.default.headerSubTitle,
|
|
4023
|
+
{ fontFamily: AppFonts_1.AppFonts.interBold },
|
|
4024
|
+
]}>
|
|
4025
|
+
{selected.status === 0
|
|
4026
|
+
? 'Failed'
|
|
4027
|
+
: selected.status ?? 'Pending'}
|
|
4028
|
+
</react_native_1.Text>
|
|
4029
|
+
</react_native_1.View>
|
|
4030
|
+
<react_native_1.View style={{
|
|
4031
|
+
flexDirection: 'row',
|
|
4032
|
+
alignItems: 'center',
|
|
4033
|
+
gap: 4,
|
|
4034
|
+
paddingHorizontal: 8,
|
|
4035
|
+
paddingVertical: 3,
|
|
4036
|
+
borderRadius: 20,
|
|
4037
|
+
backgroundColor: 'rgba(255,255,255,0.16)',
|
|
4038
|
+
}}>
|
|
4039
|
+
<NetworkIcons_1.ClockIcon color="#FFFFFF" size={11}/>
|
|
4040
|
+
<react_native_1.Text style={styles_1.default.headerSubTitle}>
|
|
4041
|
+
{selected.duration != null
|
|
4042
|
+
? `${selected.duration}ms`
|
|
4043
|
+
: '—'}
|
|
4044
|
+
</react_native_1.Text>
|
|
4045
|
+
</react_native_1.View>
|
|
4046
|
+
</react_native_1.View>
|
|
4047
|
+
</react_native_1.View>) : selectedEvent != null ? (<react_native_1.View style={styles_1.default.headerDetailCenter}>
|
|
4048
|
+
<react_native_1.View style={styles_1.default.headerDetailRow}>
|
|
3930
4049
|
<react_native_1.View style={[
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
4050
|
+
styles_1.default.headerMethodBadge,
|
|
4051
|
+
{
|
|
4052
|
+
backgroundColor: selectedEvent.source === 'firebase'
|
|
4053
|
+
? 'rgba(224,123,26,0.3)'
|
|
4054
|
+
: 'rgba(124,92,191,0.3)',
|
|
4055
|
+
},
|
|
4056
|
+
]}>
|
|
4057
|
+
<react_native_1.Text style={styles_1.default.headerMethodText}>
|
|
4058
|
+
{selectedEvent.source === 'firebase'
|
|
4059
|
+
? 'FB'
|
|
4060
|
+
: 'MAN'}
|
|
4061
|
+
</react_native_1.Text>
|
|
4062
|
+
</react_native_1.View>
|
|
4063
|
+
<react_native_1.Text style={styles_1.default.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
4064
|
+
{selectedEvent.name}
|
|
3943
4065
|
</react_native_1.Text>
|
|
3944
4066
|
</react_native_1.View>
|
|
3945
|
-
<react_native_1.View style={
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
<NetworkIcons_1.ClockIcon color="#FFFFFF" size={11}/>
|
|
4067
|
+
<react_native_1.View style={styles_1.default.headerDetailSubRow}>
|
|
4068
|
+
<react_native_1.View style={[
|
|
4069
|
+
styles_1.default.headerStatusDot,
|
|
4070
|
+
{
|
|
4071
|
+
backgroundColor: selectedEvent.source === 'firebase'
|
|
4072
|
+
? '#E07B1A'
|
|
4073
|
+
: AppColors_1.AppColors.purple,
|
|
4074
|
+
},
|
|
4075
|
+
]}/>
|
|
3955
4076
|
<react_native_1.Text style={styles_1.default.headerSubTitle}>
|
|
3956
|
-
{
|
|
3957
|
-
|
|
3958
|
-
|
|
4077
|
+
{Object.keys(selectedEvent.params).length} param
|
|
4078
|
+
{Object.keys(selectedEvent.params).length !== 1
|
|
4079
|
+
? 's'
|
|
4080
|
+
: ''}
|
|
4081
|
+
{' · '}
|
|
4082
|
+
{selectedEvent.source}
|
|
3959
4083
|
</react_native_1.Text>
|
|
3960
4084
|
</react_native_1.View>
|
|
3961
|
-
</react_native_1.View>
|
|
3962
|
-
|
|
3963
|
-
<react_native_1.View style={styles_1.default.headerDetailRow}>
|
|
3964
|
-
<react_native_1.View style={[
|
|
3965
|
-
styles_1.default.headerMethodBadge,
|
|
3966
|
-
{
|
|
3967
|
-
backgroundColor: selectedEvent.source === 'firebase'
|
|
3968
|
-
? 'rgba(224,123,26,0.3)'
|
|
3969
|
-
: 'rgba(124,92,191,0.3)',
|
|
3970
|
-
},
|
|
3971
|
-
]}>
|
|
3972
|
-
<react_native_1.Text style={styles_1.default.headerMethodText}>
|
|
3973
|
-
{selectedEvent.source === 'firebase'
|
|
3974
|
-
? 'FB'
|
|
3975
|
-
: 'MAN'}
|
|
3976
|
-
</react_native_1.Text>
|
|
3977
|
-
</react_native_1.View>
|
|
3978
|
-
<react_native_1.Text style={styles_1.default.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
3979
|
-
{selectedEvent.name}
|
|
3980
|
-
</react_native_1.Text>
|
|
3981
|
-
</react_native_1.View>
|
|
3982
|
-
<react_native_1.View style={styles_1.default.headerDetailSubRow}>
|
|
3983
|
-
<react_native_1.View style={[
|
|
3984
|
-
styles_1.default.headerStatusDot,
|
|
3985
|
-
{
|
|
3986
|
-
backgroundColor: selectedEvent.source === 'firebase'
|
|
3987
|
-
? '#E07B1A'
|
|
3988
|
-
: AppColors_1.AppColors.purple,
|
|
3989
|
-
},
|
|
3990
|
-
]}/>
|
|
3991
|
-
<react_native_1.Text style={styles_1.default.headerSubTitle}>
|
|
3992
|
-
{Object.keys(selectedEvent.params).length} param
|
|
3993
|
-
{Object.keys(selectedEvent.params).length !== 1
|
|
3994
|
-
? 's'
|
|
3995
|
-
: ''}
|
|
3996
|
-
{' · '}
|
|
3997
|
-
{selectedEvent.source}
|
|
3998
|
-
</react_native_1.Text>
|
|
3999
|
-
</react_native_1.View>
|
|
4000
|
-
</react_native_1.View>) : null}
|
|
4001
|
-
</react_native_1.View>
|
|
4085
|
+
</react_native_1.View>) : null}
|
|
4086
|
+
</react_native_1.View>)}
|
|
4002
4087
|
|
|
4003
4088
|
<react_native_1.View style={[
|
|
4004
4089
|
styles_1.default.headerRight,
|
|
@@ -4166,7 +4251,7 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
4166
4251
|
{/* ─── Search + Shared Toolbar for Analytics ──────────────────────── */}
|
|
4167
4252
|
<react_native_1.View style={[
|
|
4168
4253
|
styles_1.default.toolbarRow,
|
|
4169
|
-
{ marginTop: 12, marginBottom:
|
|
4254
|
+
{ marginTop: 12, marginBottom: 8 },
|
|
4170
4255
|
]}>
|
|
4171
4256
|
<react_native_1.View style={styles_1.default.searchContainer}>
|
|
4172
4257
|
<NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak} size={16}/>
|
|
@@ -4175,194 +4260,24 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
4175
4260
|
<NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
4176
4261
|
</react_native_1.Pressable>)}
|
|
4177
4262
|
</react_native_1.View>
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
alignItems: 'center',
|
|
4182
|
-
gap: 4,
|
|
4183
|
-
paddingHorizontal: 10,
|
|
4184
|
-
paddingVertical: 5,
|
|
4185
|
-
borderRadius: 8,
|
|
4186
|
-
backgroundColor: 'rgba(255,46,87,0.06)',
|
|
4187
|
-
borderWidth: 1,
|
|
4188
|
-
borderColor: 'rgba(255,46,87,0.15)',
|
|
4189
|
-
}} onPress={handleDelete} hitSlop={6}>
|
|
4190
|
-
<NetworkIcons_1.WipeIcon color={AppColors_1.AppColors.errorColor} size={13}/>
|
|
4191
|
-
<react_native_1.Text style={{
|
|
4192
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
4193
|
-
fontSize: 10.5,
|
|
4194
|
-
color: AppColors_1.AppColors.errorColor,
|
|
4195
|
-
}}>
|
|
4196
|
-
Clear
|
|
4197
|
-
</react_native_1.Text>
|
|
4198
|
-
</TouchableScale_1.default>
|
|
4199
|
-
</react_native_1.View>)}
|
|
4200
|
-
</react_native_1.View>
|
|
4201
|
-
|
|
4202
|
-
{/* ─── Secondary Tab Bar for Analytics ──────────────────────── */}
|
|
4203
|
-
<react_native_1.View style={{
|
|
4204
|
-
marginHorizontal: 16,
|
|
4205
|
-
marginTop: 4,
|
|
4206
|
-
marginBottom: 8,
|
|
4207
|
-
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
4208
|
-
borderRadius: 8,
|
|
4209
|
-
padding: 4,
|
|
4210
|
-
flexDirection: 'row',
|
|
4211
|
-
borderWidth: 1,
|
|
4212
|
-
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
4213
|
-
}}>
|
|
4214
|
-
<react_native_1.Pressable style={[
|
|
4215
|
-
{
|
|
4216
|
-
flex: 1,
|
|
4217
|
-
paddingVertical: 8,
|
|
4218
|
-
borderRadius: 6,
|
|
4219
|
-
alignItems: 'center',
|
|
4220
|
-
},
|
|
4221
|
-
analyticsSubTab === 'ga_events' && {
|
|
4222
|
-
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
4223
|
-
shadowColor: '#000',
|
|
4224
|
-
shadowOpacity: 0.1,
|
|
4225
|
-
shadowRadius: 3,
|
|
4226
|
-
shadowOffset: { width: 0, height: 1 },
|
|
4227
|
-
elevation: 2,
|
|
4228
|
-
},
|
|
4229
|
-
]} onPress={() => {
|
|
4230
|
-
animateNextLayout();
|
|
4231
|
-
setAnalyticsSubTab('ga_events');
|
|
4232
|
-
}}>
|
|
4233
|
-
<react_native_1.View style={{
|
|
4234
|
-
flexDirection: 'row',
|
|
4235
|
-
alignItems: 'center',
|
|
4236
|
-
gap: 6,
|
|
4237
|
-
}}>
|
|
4238
|
-
{/* #7 */}
|
|
4239
|
-
<NetworkIcons_1.AnalyticsIcon size={13} color={analyticsSubTab === 'ga_events'
|
|
4240
|
-
? AppColors_1.AppColors.purple
|
|
4241
|
-
: AppColors_1.AppColors.grayTextStrong}/>
|
|
4242
|
-
<react_native_1.Text style={[
|
|
4243
|
-
{
|
|
4244
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
4245
|
-
fontSize: 13,
|
|
4246
|
-
color: AppColors_1.AppColors.grayTextStrong,
|
|
4247
|
-
},
|
|
4248
|
-
analyticsSubTab === 'ga_events' && {
|
|
4249
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
4250
|
-
color: AppColors_1.AppColors.purple,
|
|
4251
|
-
},
|
|
4252
|
-
]}>
|
|
4253
|
-
GA Events (
|
|
4254
|
-
{analyticsSearch
|
|
4255
|
-
? filteredAnalyticsEvents.length
|
|
4256
|
-
: analyticsEvents.length}
|
|
4257
|
-
)
|
|
4258
|
-
</react_native_1.Text>
|
|
4259
|
-
</react_native_1.View>
|
|
4260
|
-
</react_native_1.Pressable>
|
|
4261
|
-
<react_native_1.Pressable style={[
|
|
4262
|
-
{
|
|
4263
|
-
flex: 1,
|
|
4264
|
-
paddingVertical: 8,
|
|
4265
|
-
borderRadius: 6,
|
|
4266
|
-
alignItems: 'center',
|
|
4267
|
-
},
|
|
4268
|
-
analyticsSubTab === 'top_events' && {
|
|
4269
|
-
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
4270
|
-
shadowColor: '#000',
|
|
4271
|
-
shadowOpacity: 0.1,
|
|
4272
|
-
shadowRadius: 3,
|
|
4273
|
-
shadowOffset: { width: 0, height: 1 },
|
|
4274
|
-
elevation: 2,
|
|
4275
|
-
},
|
|
4276
|
-
]} onPress={() => {
|
|
4277
|
-
animateNextLayout();
|
|
4278
|
-
setAnalyticsSubTab('top_events');
|
|
4279
|
-
}}>
|
|
4280
|
-
<react_native_1.View style={{
|
|
4281
|
-
flexDirection: 'row',
|
|
4282
|
-
alignItems: 'center',
|
|
4283
|
-
gap: 6,
|
|
4284
|
-
}}>
|
|
4285
|
-
{/* #7 */}
|
|
4286
|
-
<NetworkIcons_1.TrendingUpIcon size={13} color={analyticsSubTab === 'top_events'
|
|
4287
|
-
? AppColors_1.AppColors.purple
|
|
4288
|
-
: AppColors_1.AppColors.grayTextStrong}/>
|
|
4289
|
-
<react_native_1.Text style={[
|
|
4263
|
+
<react_native_1.View style={styles_1.default.toolbarRight}>
|
|
4264
|
+
<TouchableScale_1.default style={[
|
|
4265
|
+
styles_1.default.toolbarBtn,
|
|
4290
4266
|
{
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
color: AppColors_1.AppColors.grayTextStrong,
|
|
4294
|
-
},
|
|
4295
|
-
analyticsSubTab === 'top_events' && {
|
|
4296
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
4297
|
-
color: AppColors_1.AppColors.purple,
|
|
4267
|
+
borderColor: 'rgba(255,46,87,0.22)',
|
|
4268
|
+
backgroundColor: 'rgba(255,46,87,0.06)',
|
|
4298
4269
|
},
|
|
4299
|
-
]}>
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
</react_native_1.Pressable>
|
|
4270
|
+
]} onPress={handleDelete} hitSlop={6}>
|
|
4271
|
+
<NetworkIcons_1.WipeIcon color={AppColors_1.AppColors.errorColor} size={15}/>
|
|
4272
|
+
</TouchableScale_1.default>
|
|
4273
|
+
</react_native_1.View>
|
|
4304
4274
|
</react_native_1.View>
|
|
4305
4275
|
</react_native_1.View>)}
|
|
4306
4276
|
|
|
4307
4277
|
{isReady ? (activeTab === 'insights' ? (<react_native_1.ScrollView style={styles_1.default.insightsContainer} contentContainerStyle={styles_1.default.insightsContent} showsVerticalScrollIndicator={false}>
|
|
4308
4278
|
{renderInsightsDashboard()}
|
|
4309
|
-
</react_native_1.ScrollView>) : activeTab === 'analytics' ? (<react_native_1.View style={{ flex: 1 }}>
|
|
4310
|
-
{selectedEvent != null ? (<AnalyticsDetail_1.default event={selectedEvent}/>) :
|
|
4311
|
-
styles_1.default.listContent,
|
|
4312
|
-
{ paddingHorizontal: 16, paddingTop: 12 },
|
|
4313
|
-
]} renderItem={({ item: [name, count], index }) => {
|
|
4314
|
-
const maxCount = topEventsArray[0]?.[1] || 1;
|
|
4315
|
-
const pct = Math.max(6, (count / maxCount) * 100);
|
|
4316
|
-
const color = (0, AnalyticsEventCard_1.getEventColor)(name);
|
|
4317
|
-
return (<AnimatedEntrance_1.default index={index} distance={8} style={[
|
|
4318
|
-
styles_1.default.analyticsTopEventsCard,
|
|
4319
|
-
{ marginBottom: 6, paddingVertical: 10, paddingHorizontal: 12 },
|
|
4320
|
-
]}>
|
|
4321
|
-
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
|
|
4322
|
-
<react_native_1.Text style={{
|
|
4323
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
4324
|
-
fontSize: 11,
|
|
4325
|
-
color: color,
|
|
4326
|
-
width: 18,
|
|
4327
|
-
textAlign: 'center',
|
|
4328
|
-
}}>
|
|
4329
|
-
{index + 1}
|
|
4330
|
-
</react_native_1.Text>
|
|
4331
|
-
<react_native_1.View style={{ flex: 1, gap: 4 }}>
|
|
4332
|
-
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
4333
|
-
<react_native_1.Text style={{
|
|
4334
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
4335
|
-
fontSize: 12.5,
|
|
4336
|
-
color: AppColors_1.AppColors.primaryBlack,
|
|
4337
|
-
flex: 1,
|
|
4338
|
-
}} numberOfLines={1}>
|
|
4339
|
-
{name}
|
|
4340
|
-
</react_native_1.Text>
|
|
4341
|
-
<react_native_1.Text style={{
|
|
4342
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
4343
|
-
fontSize: 12,
|
|
4344
|
-
color: color,
|
|
4345
|
-
marginLeft: 8,
|
|
4346
|
-
}}>
|
|
4347
|
-
{count}
|
|
4348
|
-
</react_native_1.Text>
|
|
4349
|
-
</react_native_1.View>
|
|
4350
|
-
<react_native_1.View style={{ height: 3, backgroundColor: AppColors_1.AppColors.grayBackground, borderRadius: 2, overflow: 'hidden' }}>
|
|
4351
|
-
<react_native_linear_gradient_1.default colors={[color, `${color}88`]} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }} style={{
|
|
4352
|
-
height: '100%',
|
|
4353
|
-
borderRadius: 2,
|
|
4354
|
-
width: `${pct}%`,
|
|
4355
|
-
}}/>
|
|
4356
|
-
</react_native_1.View>
|
|
4357
|
-
</react_native_1.View>
|
|
4358
|
-
</react_native_1.View>
|
|
4359
|
-
</AnimatedEntrance_1.default>);
|
|
4360
|
-
}} ListEmptyComponent={<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
4361
|
-
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
4362
|
-
<NetworkIcons_1.EmptyRadarIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
4363
|
-
</react_native_1.View>
|
|
4364
|
-
<react_native_1.Text style={styles_1.default.emptyTitle}>No Top Events</react_native_1.Text>
|
|
4365
|
-
</react_native_1.View>}/>) : (<react_native_1.FlatList data={filteredAnalyticsEvents} keyExtractor={item => item.id.toString()} renderItem={({ item, index }) => {
|
|
4279
|
+
</react_native_1.ScrollView>) : activeTab === 'analytics' ? (<react_native_1.View style={{ flex: 1 }} onLayout={() => setIsAnalyticsLayoutReady(true)}>
|
|
4280
|
+
{selectedEvent != null ? (<AnalyticsDetail_1.default event={selectedEvent}/>) : isAnalyticsLayoutReady ? (<react_native_1.FlatList data={filteredAnalyticsEvents} keyExtractor={(item, index) => item?.id?.toString() ?? index.toString()} ListHeaderComponent={renderAnalyticsHeader} renderItem={({ item, index }) => {
|
|
4366
4281
|
const prev = filteredAnalyticsEvents[index + 1];
|
|
4367
4282
|
const next = filteredAnalyticsEvents[index - 1];
|
|
4368
4283
|
const msSincePrev = prev
|
|
@@ -4373,12 +4288,13 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
4373
4288
|
? Math.floor(next.timestamp / 60000)
|
|
4374
4289
|
: -1;
|
|
4375
4290
|
const showTimestamp = index === 0 || thisMin !== nextMin;
|
|
4376
|
-
return (<
|
|
4377
|
-
<AnalyticsEventCard_1.default event={item} onPress={() => {
|
|
4291
|
+
return (<AnalyticsEventCard_1.default event={item} onPress={() => {
|
|
4378
4292
|
animateNextLayout();
|
|
4379
4293
|
setSelectedEvent(item);
|
|
4380
4294
|
}} isNew={newEventIds.has(item.id)} searchStr={analyticsSearch} isFirst={index === 0} isLast={index === filteredAnalyticsEvents.length - 1} msSincePrev={msSincePrev} showTimestamp={showTimestamp} computedScreenName={(() => {
|
|
4381
|
-
|
|
4295
|
+
if (!item)
|
|
4296
|
+
return '';
|
|
4297
|
+
const rawScreenName = item.screenName ||
|
|
4382
4298
|
item.screenClass ||
|
|
4383
4299
|
item.pageTitle ||
|
|
4384
4300
|
item.pageLocation ||
|
|
@@ -4386,6 +4302,9 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
4386
4302
|
item.params?.screen_name ||
|
|
4387
4303
|
item.params?.firebase_screen_class ||
|
|
4388
4304
|
item.params?.screen_class;
|
|
4305
|
+
let screenName = typeof rawScreenName === 'string'
|
|
4306
|
+
? rawScreenName
|
|
4307
|
+
: (rawScreenName ? JSON.stringify(rawScreenName) : '');
|
|
4389
4308
|
const routeInfo = logRouteMapRef.current.get(item.id + 1000000);
|
|
4390
4309
|
if (!screenName) {
|
|
4391
4310
|
if (routeInfo &&
|
|
@@ -4395,8 +4314,7 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
4395
4314
|
}
|
|
4396
4315
|
}
|
|
4397
4316
|
return screenName;
|
|
4398
|
-
})()}/>
|
|
4399
|
-
</AnimatedEntrance_1.default>);
|
|
4317
|
+
})()}/>);
|
|
4400
4318
|
}} initialNumToRender={20} maxToRenderPerBatch={20} windowSize={5} removeClippedSubviews={false} ListEmptyComponent={<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
4401
4319
|
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
4402
4320
|
<NetworkIcons_1.EmptyRadarIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
@@ -4416,7 +4334,7 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
4416
4334
|
filteredAnalyticsEvents.length === 0 && {
|
|
4417
4335
|
flexGrow: 1,
|
|
4418
4336
|
},
|
|
4419
|
-
]} keyboardShouldPersistTaps="handled"/>)}
|
|
4337
|
+
]} keyboardShouldPersistTaps="handled"/>) : null}
|
|
4420
4338
|
</react_native_1.View>) : activeTab === 'apis' && selected == null ? (<react_native_1.View style={{ flex: 1 }}>
|
|
4421
4339
|
<react_native_1.FlatList ref={apisListRef} 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 }}>
|
|
4422
4340
|
<react_native_1.View style={styles_1.default.toolbarRow}>
|
|
@@ -4429,27 +4347,19 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
4429
4347
|
</react_native_1.View>
|
|
4430
4348
|
|
|
4431
4349
|
<react_native_1.View style={styles_1.default.toolbarRight}>
|
|
4432
|
-
<TouchableScale_1.default style={
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
4446
|
-
fontSize: 10.5,
|
|
4447
|
-
color: AppColors_1.AppColors.errorColor,
|
|
4448
|
-
}}>
|
|
4449
|
-
{selectedLogs.size > 0
|
|
4450
|
-
? `Delete (${selectedLogs.size})`
|
|
4451
|
-
: 'Clear'}
|
|
4452
|
-
</react_native_1.Text>
|
|
4350
|
+
<TouchableScale_1.default style={[
|
|
4351
|
+
styles_1.default.toolbarBtn,
|
|
4352
|
+
{
|
|
4353
|
+
borderColor: 'rgba(255,46,87,0.22)',
|
|
4354
|
+
backgroundColor: 'rgba(255,46,87,0.06)',
|
|
4355
|
+
},
|
|
4356
|
+
]} onPress={handleDelete} hitSlop={6}>
|
|
4357
|
+
<NetworkIcons_1.WipeIcon color={AppColors_1.AppColors.errorColor} size={15}/>
|
|
4358
|
+
{selectedLogs.size > 0 && (<react_native_1.View style={styles_1.default.trashBadge}>
|
|
4359
|
+
<react_native_1.Text style={styles_1.default.trashBadgeText}>
|
|
4360
|
+
{selectedLogs.size}
|
|
4361
|
+
</react_native_1.Text>
|
|
4362
|
+
</react_native_1.View>)}
|
|
4453
4363
|
</TouchableScale_1.default>
|
|
4454
4364
|
|
|
4455
4365
|
<TouchableScale_1.default style={styles_1.default.toolbarBtn} onPress={() => setSortOrder(o => o === 'newest' ? 'oldest' : 'newest')} hitSlop={10}>
|
|
@@ -4617,25 +4527,14 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
4617
4527
|
<TouchableScale_1.default style={styles_1.default.toolbarBtn} onPress={() => setLogSortOrder(o => o === 'newest' ? 'oldest' : 'newest')} hitSlop={10}>
|
|
4618
4528
|
<NetworkIcons_1.SortArrowIcon color={AppColors_1.AppColors.grayTextStrong} size={18} direction={logSortOrder === 'newest' ? 'down' : 'up'}/>
|
|
4619
4529
|
</TouchableScale_1.default>
|
|
4620
|
-
<TouchableScale_1.default style={
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
borderWidth: 1,
|
|
4629
|
-
borderColor: 'rgba(255,46,87,0.15)',
|
|
4630
|
-
}} onPress={handleDelete} hitSlop={6}>
|
|
4631
|
-
<NetworkIcons_1.WipeIcon color={AppColors_1.AppColors.errorColor} size={13}/>
|
|
4632
|
-
<react_native_1.Text style={{
|
|
4633
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
4634
|
-
fontSize: 10.5,
|
|
4635
|
-
color: AppColors_1.AppColors.errorColor,
|
|
4636
|
-
}}>
|
|
4637
|
-
Clear
|
|
4638
|
-
</react_native_1.Text>
|
|
4530
|
+
<TouchableScale_1.default style={[
|
|
4531
|
+
styles_1.default.toolbarBtn,
|
|
4532
|
+
{
|
|
4533
|
+
borderColor: 'rgba(255,46,87,0.22)',
|
|
4534
|
+
backgroundColor: 'rgba(255,46,87,0.06)',
|
|
4535
|
+
},
|
|
4536
|
+
]} onPress={handleDelete} hitSlop={6}>
|
|
4537
|
+
<NetworkIcons_1.WipeIcon color={AppColors_1.AppColors.errorColor} size={15}/>
|
|
4639
4538
|
</TouchableScale_1.default>
|
|
4640
4539
|
</react_native_1.View>
|
|
4641
4540
|
</react_native_1.View>
|
|
@@ -4906,7 +4805,7 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
4906
4805
|
</react_native_1.ScrollView>
|
|
4907
4806
|
</react_native_1.View>
|
|
4908
4807
|
|
|
4909
|
-
<react_native_1.FlatList data={filteredConsoleLogs} keyExtractor={item => item
|
|
4808
|
+
<react_native_1.FlatList data={filteredConsoleLogs} keyExtractor={(item, index) => item?.id?.toString() ?? index.toString()} ListHeaderComponent={(() => {
|
|
4910
4809
|
const total = visibleConsoleLogs.length;
|
|
4911
4810
|
const filtered = filteredConsoleLogs.length;
|
|
4912
4811
|
const isAllSelected = logFilters.has('all') ||
|
|
@@ -5981,6 +5880,10 @@ Object.defineProperty(exports, "setupAnalyticsLogger", { enumerable: true, get:
|
|
|
5981
5880
|
Object.defineProperty(exports, "logAnalyticsEvent", { enumerable: true, get: function () { return analyticsLogger_2.logAnalyticsEvent; } });
|
|
5982
5881
|
Object.defineProperty(exports, "subscribeAnalyticsEvents", { enumerable: true, get: function () { return analyticsLogger_2.subscribeAnalyticsEvents; } });
|
|
5983
5882
|
Object.defineProperty(exports, "clearAnalyticsEvents", { enumerable: true, get: function () { return analyticsLogger_2.clearAnalyticsEvents; } });
|
|
5883
|
+
Object.defineProperty(exports, "getCurrentUserProperties", { enumerable: true, get: function () { return analyticsLogger_2.getCurrentUserProperties; } });
|
|
5884
|
+
Object.defineProperty(exports, "getCurrentUserId", { enumerable: true, get: function () { return analyticsLogger_2.getCurrentUserId; } });
|
|
5885
|
+
Object.defineProperty(exports, "getDefaultEventParameters", { enumerable: true, get: function () { return analyticsLogger_2.getDefaultEventParameters; } });
|
|
5886
|
+
Object.defineProperty(exports, "getCollectionEnabled", { enumerable: true, get: function () { return analyticsLogger_2.getCollectionEnabled; } });
|
|
5984
5887
|
var webViewLogger_2 = require("./customHooks/webViewLogger");
|
|
5985
5888
|
Object.defineProperty(exports, "WebView", { enumerable: true, get: function () { return webViewLogger_2.WebView; } });
|
|
5986
5889
|
Object.defineProperty(exports, "getWebViewLogs", { enumerable: true, get: function () { return webViewLogger_2.getWebViewLogs; } });
|