react-native-inapp-inspector 1.1.11 → 1.1.13
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 +93 -479
- package/dist/commonjs/components/AnalyticsEventCard.js +25 -25
- package/dist/commonjs/components/ConsoleLogCard.js +3 -1
- 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 -17
- package/dist/commonjs/components/ReduxTreeView.js +1045 -632
- package/dist/commonjs/components/SectionHeader.d.ts +1 -1
- package/dist/commonjs/components/SectionHeader.js +7 -1
- package/dist/commonjs/components/TouchableScale.js +8 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -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 +3 -0
- package/dist/commonjs/helpers/index.js +103 -1
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
- package/dist/commonjs/helpers/settingsStore.js +4 -0
- package/dist/commonjs/index.js +385 -339
- package/dist/commonjs/types/index.d.ts +3 -0
- package/dist/esm/components/AnalyticsDetail.js +94 -480
- package/dist/esm/components/AnalyticsEventCard.js +25 -25
- package/dist/esm/components/ConsoleLogCard.js +3 -1
- 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 -17
- package/dist/esm/components/ReduxTreeView.js +1047 -629
- package/dist/esm/components/SectionHeader.d.ts +1 -1
- package/dist/esm/components/SectionHeader.js +8 -2
- package/dist/esm/components/TouchableScale.js +9 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/reduxLogger.d.ts +2 -0
- package/dist/esm/customHooks/reduxLogger.js +2 -0
- package/dist/esm/helpers/index.d.ts +3 -0
- package/dist/esm/helpers/index.js +100 -1
- package/dist/esm/helpers/settingsStore.d.ts +1 -0
- package/dist/esm/helpers/settingsStore.js +3 -0
- package/dist/esm/index.js +389 -343
- package/dist/esm/types/index.d.ts +3 -0
- package/example/package-lock.json +33 -74
- package/example/package.json +1 -1
- package/package.json +1 -1
package/dist/commonjs/index.js
CHANGED
|
@@ -150,7 +150,8 @@ const NavigationTracker = ({ onStateChange }) => {
|
|
|
150
150
|
return null;
|
|
151
151
|
};
|
|
152
152
|
const animateNextLayout = () => {
|
|
153
|
-
|
|
153
|
+
// Disabled LayoutAnimation to prevent iOS NSRangeException crashes under Fabric
|
|
154
|
+
// and Android rendering performance freezes.
|
|
154
155
|
};
|
|
155
156
|
const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
156
157
|
// Set custom storage synchronously during render phase
|
|
@@ -174,7 +175,6 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
174
175
|
const [search, setSearch] = (0, react_1.useState)('');
|
|
175
176
|
const [detailSearch, setDetailSearch] = (0, react_1.useState)('');
|
|
176
177
|
const [reduxSearch, setReduxSearch] = (0, react_1.useState)('');
|
|
177
|
-
const [reduxActiveSubTab, setReduxActiveSubTab] = (0, react_1.useState)('timeline');
|
|
178
178
|
const [apiDetailActiveTab, setApiDetailActiveTab] = (0, react_1.useState)('response');
|
|
179
179
|
(0, react_1.useEffect)(() => {
|
|
180
180
|
react_native_1.LogBox.ignoreAllLogs(enabled);
|
|
@@ -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
|
|
@@ -232,7 +233,7 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
232
233
|
const [maxConsoleLogs, setMaxConsoleLogs] = (0, react_1.useState)(200);
|
|
233
234
|
const [showConsoleLevels, setShowConsoleLevels] = (0, react_1.useState)({
|
|
234
235
|
info: true,
|
|
235
|
-
warn:
|
|
236
|
+
warn: false,
|
|
236
237
|
error: true,
|
|
237
238
|
});
|
|
238
239
|
const visibleConsoleLogs = (0, react_1.useMemo)(() => {
|
|
@@ -741,7 +742,13 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
741
742
|
const task = react_native_1.InteractionManager.runAfterInteractions(() => {
|
|
742
743
|
setIsReady(true);
|
|
743
744
|
});
|
|
744
|
-
|
|
745
|
+
const fallbackTimer = setTimeout(() => {
|
|
746
|
+
setIsReady(true);
|
|
747
|
+
}, 350);
|
|
748
|
+
return () => {
|
|
749
|
+
task.cancel();
|
|
750
|
+
clearTimeout(fallbackTimer);
|
|
751
|
+
};
|
|
745
752
|
}
|
|
746
753
|
else {
|
|
747
754
|
setIsReady(false);
|
|
@@ -754,9 +761,10 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
754
761
|
(0, consoleLogger_1.setupConsoleLogger)();
|
|
755
762
|
(0, analyticsLogger_1.autoSetupAnalyticsLogger)();
|
|
756
763
|
let timeoutId;
|
|
764
|
+
let isFirstNetworkCall = true;
|
|
757
765
|
const unsubscribe = (0, networkLogger_1.subscribeNetworkLogs)((raw) => {
|
|
758
766
|
clearTimeout(timeoutId);
|
|
759
|
-
|
|
767
|
+
const updateNetworkState = () => {
|
|
760
768
|
const deduped = (0, helpers_1.deduplicateLogs)(raw);
|
|
761
769
|
const incoming = new Set(deduped.map(l => l.id));
|
|
762
770
|
const freshIds = new Set();
|
|
@@ -775,13 +783,24 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
775
783
|
setTimeout(() => setNewLogIds(new Set()), 1200);
|
|
776
784
|
}
|
|
777
785
|
setLogs(deduped);
|
|
778
|
-
}
|
|
786
|
+
};
|
|
787
|
+
if (isFirstNetworkCall) {
|
|
788
|
+
isFirstNetworkCall = false;
|
|
789
|
+
const deduped = (0, helpers_1.deduplicateLogs)(raw);
|
|
790
|
+
const incoming = new Set(deduped.map(l => l.id));
|
|
791
|
+
prevLogIdsRef.current = incoming;
|
|
792
|
+
setLogs(deduped);
|
|
793
|
+
}
|
|
794
|
+
else {
|
|
795
|
+
timeoutId = setTimeout(updateNetworkState, 250);
|
|
796
|
+
}
|
|
779
797
|
});
|
|
780
798
|
// ─── Analytics subscription ──────────────────────────────────────────────
|
|
781
799
|
let analyticsTimeoutId;
|
|
800
|
+
let isFirstAnalyticsCall = true;
|
|
782
801
|
const unsubscribeAnalytics = (0, analyticsLogger_1.subscribeAnalyticsEvents)((raw) => {
|
|
783
802
|
clearTimeout(analyticsTimeoutId);
|
|
784
|
-
|
|
803
|
+
const updateAnalyticsState = () => {
|
|
785
804
|
const incoming = new Set(raw.map(e => e.id));
|
|
786
805
|
const freshIds = new Set();
|
|
787
806
|
incoming.forEach(id => {
|
|
@@ -799,15 +818,31 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
799
818
|
setTimeout(() => setNewEventIds(new Set()), 1200);
|
|
800
819
|
}
|
|
801
820
|
setAnalyticsEvents(raw);
|
|
802
|
-
}
|
|
821
|
+
};
|
|
822
|
+
if (isFirstAnalyticsCall) {
|
|
823
|
+
isFirstAnalyticsCall = false;
|
|
824
|
+
const incoming = new Set(raw.map(e => e.id));
|
|
825
|
+
prevEventIdsRef.current = incoming;
|
|
826
|
+
setAnalyticsEvents(raw);
|
|
827
|
+
}
|
|
828
|
+
else {
|
|
829
|
+
analyticsTimeoutId = setTimeout(updateAnalyticsState, 200);
|
|
830
|
+
}
|
|
803
831
|
});
|
|
804
832
|
// ─── Console subscription ────────────────────────────────────────────────
|
|
805
833
|
let consoleTimeoutId;
|
|
834
|
+
let isFirstConsoleCall = true;
|
|
806
835
|
const unsubscribeConsole = (0, consoleLogger_1.subscribeConsoleLogs)((raw) => {
|
|
807
836
|
clearTimeout(consoleTimeoutId);
|
|
808
|
-
|
|
837
|
+
if (isFirstConsoleCall) {
|
|
838
|
+
isFirstConsoleCall = false;
|
|
809
839
|
setConsoleLogs(raw);
|
|
810
|
-
}
|
|
840
|
+
}
|
|
841
|
+
else {
|
|
842
|
+
consoleTimeoutId = setTimeout(() => {
|
|
843
|
+
setConsoleLogs(raw);
|
|
844
|
+
}, 200);
|
|
845
|
+
}
|
|
811
846
|
});
|
|
812
847
|
setWebViewLogs((0, webViewLogger_1.getWebViewLogs)());
|
|
813
848
|
setWebViewNavHistory((0, webViewLogger_1.getWebViewNavHistory)());
|
|
@@ -817,24 +852,34 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
817
852
|
setWebViewHtmlUrl((0, webViewLogger_1.getWebViewHtmlUrl)());
|
|
818
853
|
// ─── WebView subscription ────────────────────────────────────────────────
|
|
819
854
|
let webViewTimeoutId;
|
|
855
|
+
let isFirstWebViewCall = true;
|
|
820
856
|
const unsubscribeWebView = (0, webViewLogger_1.subscribeWebView)(() => {
|
|
821
857
|
clearTimeout(webViewTimeoutId);
|
|
822
|
-
|
|
858
|
+
const updateWebViewState = () => {
|
|
823
859
|
setWebViewLogs((0, webViewLogger_1.getWebViewLogs)());
|
|
824
860
|
setWebViewNavHistory((0, webViewLogger_1.getWebViewNavHistory)());
|
|
825
861
|
setWebViewHtml((0, webViewLogger_1.getWebViewHtml)());
|
|
826
862
|
setWebViewCss((0, webViewLogger_1.getWebViewCss)());
|
|
827
863
|
setWebViewJs((0, webViewLogger_1.getWebViewJs)());
|
|
828
864
|
setWebViewHtmlUrl((0, webViewLogger_1.getWebViewHtmlUrl)());
|
|
829
|
-
}
|
|
865
|
+
};
|
|
866
|
+
if (isFirstWebViewCall) {
|
|
867
|
+
isFirstWebViewCall = false;
|
|
868
|
+
updateWebViewState();
|
|
869
|
+
}
|
|
870
|
+
else {
|
|
871
|
+
webViewTimeoutId = setTimeout(updateWebViewState, 200);
|
|
872
|
+
}
|
|
830
873
|
});
|
|
831
|
-
|
|
874
|
+
const initialReduxState = (0, reduxLogger_1.getReduxState)();
|
|
875
|
+
setReduxState(initialReduxState && typeof initialReduxState === 'object' ? { ...initialReduxState } : initialReduxState);
|
|
832
876
|
setReduxActionHistory([...(0, reduxLogger_1.getActionHistory)()]);
|
|
833
877
|
setReduxLastActionMap({ ...(0, reduxLogger_1.getLastActionForReducer)() });
|
|
834
878
|
const unsubscribeRedux = (0, reduxLogger_1.subscribeReduxState)(() => {
|
|
835
879
|
// New references each time guarantee the Redux tab updates live, even when
|
|
836
880
|
// the root state object reference is unchanged or auto-refresh is paused.
|
|
837
|
-
|
|
881
|
+
const freshState = (0, reduxLogger_1.getReduxState)();
|
|
882
|
+
setReduxState(freshState && typeof freshState === 'object' ? { ...freshState } : freshState);
|
|
838
883
|
setReduxActionHistory([...(0, reduxLogger_1.getActionHistory)()]);
|
|
839
884
|
setReduxLastActionMap({ ...(0, reduxLogger_1.getLastActionForReducer)() });
|
|
840
885
|
});
|
|
@@ -2145,6 +2190,97 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
2145
2190
|
</TouchableScale_1.default>
|
|
2146
2191
|
</react_native_1.View>
|
|
2147
2192
|
|
|
2193
|
+
{/* Divider */}
|
|
2194
|
+
<react_native_1.View style={{
|
|
2195
|
+
height: 1,
|
|
2196
|
+
backgroundColor: AppColors_1.AppColors.dividerColor,
|
|
2197
|
+
}}/>
|
|
2198
|
+
|
|
2199
|
+
{/* Logs Console Levels */}
|
|
2200
|
+
<react_native_1.View style={{
|
|
2201
|
+
paddingVertical: 12,
|
|
2202
|
+
paddingHorizontal: 14,
|
|
2203
|
+
}}>
|
|
2204
|
+
<react_native_1.View style={{
|
|
2205
|
+
flexDirection: 'row',
|
|
2206
|
+
alignItems: 'center',
|
|
2207
|
+
gap: 8,
|
|
2208
|
+
}}>
|
|
2209
|
+
<react_native_1.View style={{
|
|
2210
|
+
width: 20,
|
|
2211
|
+
height: 20,
|
|
2212
|
+
borderRadius: 6,
|
|
2213
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
2214
|
+
borderWidth: 1,
|
|
2215
|
+
borderColor: 'rgba(104,75,155,0.2)',
|
|
2216
|
+
alignItems: 'center',
|
|
2217
|
+
justifyContent: 'center',
|
|
2218
|
+
}}>
|
|
2219
|
+
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={11}/>
|
|
2220
|
+
</react_native_1.View>
|
|
2221
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
2222
|
+
<react_native_1.Text style={{
|
|
2223
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2224
|
+
fontSize: 13,
|
|
2225
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
2226
|
+
}}>
|
|
2227
|
+
Logs Console Levels
|
|
2228
|
+
</react_native_1.Text>
|
|
2229
|
+
<react_native_1.Text style={{
|
|
2230
|
+
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2231
|
+
fontSize: 11,
|
|
2232
|
+
color: AppColors_1.AppColors.grayText,
|
|
2233
|
+
marginTop: 1,
|
|
2234
|
+
}}>
|
|
2235
|
+
Toggle which log levels are visible in the Logs tab
|
|
2236
|
+
</react_native_1.Text>
|
|
2237
|
+
</react_native_1.View>
|
|
2238
|
+
</react_native_1.View>
|
|
2239
|
+
|
|
2240
|
+
<react_native_1.View style={{
|
|
2241
|
+
flexDirection: 'row',
|
|
2242
|
+
gap: 8,
|
|
2243
|
+
marginTop: 10,
|
|
2244
|
+
}}>
|
|
2245
|
+
{([
|
|
2246
|
+
{ key: 'info', label: 'Info', color: '#3B82F6' },
|
|
2247
|
+
{ key: 'warn', label: 'Warning', color: '#F59E0B' },
|
|
2248
|
+
{ key: 'error', label: 'Error', color: '#EF4444' },
|
|
2249
|
+
]).map(level => {
|
|
2250
|
+
const isActive = showConsoleLevels[level.key];
|
|
2251
|
+
return (<TouchableScale_1.default key={level.key} onPress={() => setShowConsoleLevels(prev => ({
|
|
2252
|
+
...prev,
|
|
2253
|
+
[level.key]: !prev[level.key],
|
|
2254
|
+
}))} style={{
|
|
2255
|
+
flex: 1,
|
|
2256
|
+
flexDirection: 'row',
|
|
2257
|
+
alignItems: 'center',
|
|
2258
|
+
justifyContent: 'center',
|
|
2259
|
+
gap: 6,
|
|
2260
|
+
paddingVertical: 8,
|
|
2261
|
+
borderRadius: 8,
|
|
2262
|
+
borderWidth: 1.5,
|
|
2263
|
+
borderColor: isActive ? level.color : AppColors_1.AppColors.grayBorderSecondary,
|
|
2264
|
+
backgroundColor: isActive ? `${level.color}0D` : AppColors_1.AppColors.primaryLight,
|
|
2265
|
+
}}>
|
|
2266
|
+
<react_native_1.View style={{
|
|
2267
|
+
width: 8,
|
|
2268
|
+
height: 8,
|
|
2269
|
+
borderRadius: 4,
|
|
2270
|
+
backgroundColor: isActive ? level.color : AppColors_1.AppColors.grayBorderSecondary,
|
|
2271
|
+
}}/>
|
|
2272
|
+
<react_native_1.Text style={{
|
|
2273
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2274
|
+
fontSize: 11,
|
|
2275
|
+
color: isActive ? level.color : AppColors_1.AppColors.grayText,
|
|
2276
|
+
}}>
|
|
2277
|
+
{level.label}
|
|
2278
|
+
</react_native_1.Text>
|
|
2279
|
+
</TouchableScale_1.default>);
|
|
2280
|
+
})}
|
|
2281
|
+
</react_native_1.View>
|
|
2282
|
+
</react_native_1.View>
|
|
2283
|
+
|
|
2148
2284
|
{/* Divider */}
|
|
2149
2285
|
<react_native_1.View style={{
|
|
2150
2286
|
height: 1,
|
|
@@ -3474,129 +3610,8 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
3474
3610
|
<react_native_1.Text style={styles_1.default.emptySub}>Connected store state is empty.</react_native_1.Text>
|
|
3475
3611
|
</react_native_1.View>);
|
|
3476
3612
|
}
|
|
3477
|
-
// Build hierarchical tree: Store -> Reducers -> Action -> Data.
|
|
3478
|
-
// These come from component state (refreshed on every dispatch) so the view stays live.
|
|
3479
3613
|
const lastActionMap = reduxLastActionMap;
|
|
3480
|
-
const actionHistory = reduxActionHistory;
|
|
3481
3614
|
return (<react_native_1.ScrollView style={styles_1.default.detailScroll} contentContainerStyle={{ paddingBottom: 24 }}>
|
|
3482
|
-
{/* Tab View Selection Segments */}
|
|
3483
|
-
<react_native_1.View style={{
|
|
3484
|
-
flexDirection: 'row',
|
|
3485
|
-
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
3486
|
-
borderRadius: 10,
|
|
3487
|
-
padding: 3,
|
|
3488
|
-
marginHorizontal: 16,
|
|
3489
|
-
marginTop: 12,
|
|
3490
|
-
marginBottom: 12,
|
|
3491
|
-
borderWidth: 1,
|
|
3492
|
-
borderColor: AppColors_1.AppColors.dividerColor,
|
|
3493
|
-
}}>
|
|
3494
|
-
<react_native_1.TouchableOpacity onPress={() => {
|
|
3495
|
-
animateNextLayout();
|
|
3496
|
-
setReduxActiveSubTab('timeline');
|
|
3497
|
-
}} style={{
|
|
3498
|
-
flex: 1,
|
|
3499
|
-
paddingVertical: 6,
|
|
3500
|
-
alignItems: 'center',
|
|
3501
|
-
justifyContent: 'center',
|
|
3502
|
-
borderRadius: 8,
|
|
3503
|
-
backgroundColor: reduxActiveSubTab === 'timeline'
|
|
3504
|
-
? AppColors_1.AppColors.purple
|
|
3505
|
-
: 'transparent',
|
|
3506
|
-
}}>
|
|
3507
|
-
<react_native_1.View style={{
|
|
3508
|
-
flexDirection: 'row',
|
|
3509
|
-
alignItems: 'center',
|
|
3510
|
-
justifyContent: 'center',
|
|
3511
|
-
gap: 6,
|
|
3512
|
-
}}>
|
|
3513
|
-
<ReduxTreeView_1.ReduxTimelineIcon color={reduxActiveSubTab === 'timeline'
|
|
3514
|
-
? '#FFFFFF'
|
|
3515
|
-
: AppColors_1.AppColors.grayText} size={13}/>
|
|
3516
|
-
<react_native_1.Text style={{
|
|
3517
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3518
|
-
fontSize: 11,
|
|
3519
|
-
color: reduxActiveSubTab === 'timeline'
|
|
3520
|
-
? '#FFFFFF'
|
|
3521
|
-
: AppColors_1.AppColors.grayText,
|
|
3522
|
-
}}>
|
|
3523
|
-
Action Timeline
|
|
3524
|
-
</react_native_1.Text>
|
|
3525
|
-
<react_native_1.View style={{
|
|
3526
|
-
minWidth: 18,
|
|
3527
|
-
paddingHorizontal: 5,
|
|
3528
|
-
height: 16,
|
|
3529
|
-
borderRadius: 8,
|
|
3530
|
-
alignItems: 'center',
|
|
3531
|
-
justifyContent: 'center',
|
|
3532
|
-
backgroundColor: reduxActiveSubTab === 'timeline'
|
|
3533
|
-
? 'rgba(255,255,255,0.28)'
|
|
3534
|
-
: AppColors_1.AppColors.dividerColor,
|
|
3535
|
-
}}>
|
|
3536
|
-
<react_native_1.Text style={{
|
|
3537
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3538
|
-
fontSize: 9,
|
|
3539
|
-
color: reduxActiveSubTab === 'timeline'
|
|
3540
|
-
? '#FFFFFF'
|
|
3541
|
-
: AppColors_1.AppColors.grayText,
|
|
3542
|
-
}}>
|
|
3543
|
-
{actionHistory.length}
|
|
3544
|
-
</react_native_1.Text>
|
|
3545
|
-
</react_native_1.View>
|
|
3546
|
-
</react_native_1.View>
|
|
3547
|
-
</react_native_1.TouchableOpacity>
|
|
3548
|
-
<react_native_1.TouchableOpacity onPress={() => {
|
|
3549
|
-
animateNextLayout();
|
|
3550
|
-
setReduxActiveSubTab('tree');
|
|
3551
|
-
}} style={{
|
|
3552
|
-
flex: 1,
|
|
3553
|
-
paddingVertical: 6,
|
|
3554
|
-
alignItems: 'center',
|
|
3555
|
-
justifyContent: 'center',
|
|
3556
|
-
borderRadius: 8,
|
|
3557
|
-
backgroundColor: reduxActiveSubTab === 'tree' ? AppColors_1.AppColors.purple : 'transparent',
|
|
3558
|
-
}}>
|
|
3559
|
-
<react_native_1.View style={{
|
|
3560
|
-
flexDirection: 'row',
|
|
3561
|
-
alignItems: 'center',
|
|
3562
|
-
justifyContent: 'center',
|
|
3563
|
-
gap: 6,
|
|
3564
|
-
}}>
|
|
3565
|
-
<ReduxTreeView_1.ReduxTreeIcon color={reduxActiveSubTab === 'tree' ? '#FFFFFF' : AppColors_1.AppColors.grayText} size={13}/>
|
|
3566
|
-
<react_native_1.Text style={{
|
|
3567
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3568
|
-
fontSize: 11,
|
|
3569
|
-
color: reduxActiveSubTab === 'tree'
|
|
3570
|
-
? '#FFFFFF'
|
|
3571
|
-
: AppColors_1.AppColors.grayText,
|
|
3572
|
-
}}>
|
|
3573
|
-
Store Tree
|
|
3574
|
-
</react_native_1.Text>
|
|
3575
|
-
<react_native_1.View style={{
|
|
3576
|
-
minWidth: 18,
|
|
3577
|
-
paddingHorizontal: 5,
|
|
3578
|
-
height: 16,
|
|
3579
|
-
borderRadius: 8,
|
|
3580
|
-
alignItems: 'center',
|
|
3581
|
-
justifyContent: 'center',
|
|
3582
|
-
backgroundColor: reduxActiveSubTab === 'tree'
|
|
3583
|
-
? 'rgba(255,255,255,0.28)'
|
|
3584
|
-
: AppColors_1.AppColors.dividerColor,
|
|
3585
|
-
}}>
|
|
3586
|
-
<react_native_1.Text style={{
|
|
3587
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3588
|
-
fontSize: 9,
|
|
3589
|
-
color: reduxActiveSubTab === 'tree'
|
|
3590
|
-
? '#FFFFFF'
|
|
3591
|
-
: AppColors_1.AppColors.grayText,
|
|
3592
|
-
}}>
|
|
3593
|
-
{reducerKeys.length}
|
|
3594
|
-
</react_native_1.Text>
|
|
3595
|
-
</react_native_1.View>
|
|
3596
|
-
</react_native_1.View>
|
|
3597
|
-
</react_native_1.TouchableOpacity>
|
|
3598
|
-
</react_native_1.View>
|
|
3599
|
-
|
|
3600
3615
|
{/* Search Bar */}
|
|
3601
3616
|
<react_native_1.View style={{
|
|
3602
3617
|
flexDirection: 'row',
|
|
@@ -3604,15 +3619,14 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
3604
3619
|
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
3605
3620
|
borderRadius: 8,
|
|
3606
3621
|
marginHorizontal: 16,
|
|
3622
|
+
marginTop: 16,
|
|
3607
3623
|
marginBottom: 12,
|
|
3608
3624
|
paddingHorizontal: 10,
|
|
3609
3625
|
borderWidth: 1,
|
|
3610
3626
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
3611
3627
|
height: 36,
|
|
3612
3628
|
}}>
|
|
3613
|
-
<react_native_1.TextInput placeholder={
|
|
3614
|
-
? 'Search actions or payloads...'
|
|
3615
|
-
: 'Search Redux keys or values...'} placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={reduxSearch} onChangeText={setReduxSearch} style={{
|
|
3629
|
+
<react_native_1.TextInput placeholder="Search Redux keys or values..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={reduxSearch} onChangeText={setReduxSearch} style={{
|
|
3616
3630
|
flex: 1,
|
|
3617
3631
|
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
3618
3632
|
fontSize: 12,
|
|
@@ -3633,7 +3647,7 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
3633
3647
|
marginHorizontal: 16,
|
|
3634
3648
|
padding: 12,
|
|
3635
3649
|
}}>
|
|
3636
|
-
|
|
3650
|
+
<ReduxTreeView_1.ReduxTreeView state={reduxState} lastActionMap={lastActionMap} search={reduxSearch}/>
|
|
3637
3651
|
</react_native_1.View>
|
|
3638
3652
|
</react_native_1.ScrollView>);
|
|
3639
3653
|
};
|
|
@@ -3737,16 +3751,16 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
3737
3751
|
<NetworkIcons_1.WhiteBackNavigation />
|
|
3738
3752
|
</TouchableScale_1.default>
|
|
3739
3753
|
|
|
3740
|
-
{selected == null && selectedEvent == null ? (<
|
|
3754
|
+
{selected == null && selectedEvent == null ? (<TouchableScale_1.default onPress={() => setShowHeaderInfo(prev => !prev)} style={{
|
|
3741
3755
|
flexDirection: 'row',
|
|
3742
3756
|
alignItems: 'center',
|
|
3743
|
-
gap:
|
|
3757
|
+
gap: 10,
|
|
3744
3758
|
flex: 1,
|
|
3745
3759
|
}}>
|
|
3746
3760
|
<react_native_1.View style={{
|
|
3747
|
-
width:
|
|
3748
|
-
height:
|
|
3749
|
-
borderRadius:
|
|
3761
|
+
width: 38,
|
|
3762
|
+
height: 38,
|
|
3763
|
+
borderRadius: 19,
|
|
3750
3764
|
backgroundColor: 'rgba(255,255,255,0.13)',
|
|
3751
3765
|
borderWidth: 1.5,
|
|
3752
3766
|
borderColor: 'rgba(255,255,255,0.25)',
|
|
@@ -3757,94 +3771,13 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
3757
3771
|
shadowRadius: 4,
|
|
3758
3772
|
shadowOffset: { width: 0, height: 2 },
|
|
3759
3773
|
}}>
|
|
3760
|
-
<NetworkIcons_1.
|
|
3774
|
+
<NetworkIcons_1.BrandCircleIcon size={34}/>
|
|
3761
3775
|
</react_native_1.View>
|
|
3762
|
-
<react_native_1.View style={{ gap:
|
|
3763
|
-
<react_native_1.
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
flexDirection: 'row',
|
|
3768
|
-
alignItems: 'center',
|
|
3769
|
-
gap: 6,
|
|
3770
|
-
}}>
|
|
3771
|
-
{/* OS chip */}
|
|
3772
|
-
<react_native_1.View style={{
|
|
3773
|
-
flexDirection: 'row',
|
|
3774
|
-
alignItems: 'center',
|
|
3775
|
-
borderRadius: 6,
|
|
3776
|
-
overflow: 'hidden',
|
|
3777
|
-
borderWidth: 1,
|
|
3778
|
-
borderColor: 'rgba(255,255,255,0.18)',
|
|
3779
|
-
}}>
|
|
3780
|
-
<react_native_1.View style={{
|
|
3781
|
-
paddingHorizontal: 5,
|
|
3782
|
-
paddingVertical: 2,
|
|
3783
|
-
backgroundColor: 'rgba(255,255,255,0.28)',
|
|
3784
|
-
}}>
|
|
3785
|
-
<react_native_1.Text style={{
|
|
3786
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3787
|
-
fontSize: 9,
|
|
3788
|
-
color: '#FFFFFF',
|
|
3789
|
-
letterSpacing: 0.3,
|
|
3790
|
-
}}>
|
|
3791
|
-
{react_native_1.Platform.OS === 'ios' ? 'iOS' : 'Android'}
|
|
3792
|
-
</react_native_1.Text>
|
|
3793
|
-
</react_native_1.View>
|
|
3794
|
-
<react_native_1.View style={{
|
|
3795
|
-
paddingHorizontal: 5,
|
|
3796
|
-
paddingVertical: 2,
|
|
3797
|
-
backgroundColor: 'rgba(255,255,255,0.12)',
|
|
3798
|
-
}}>
|
|
3799
|
-
<react_native_1.Text style={{
|
|
3800
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
3801
|
-
fontSize: 9.5,
|
|
3802
|
-
color: 'rgba(255,255,255,0.92)',
|
|
3803
|
-
}}>
|
|
3804
|
-
{String(react_native_1.Platform.Version)}
|
|
3805
|
-
</react_native_1.Text>
|
|
3806
|
-
</react_native_1.View>
|
|
3807
|
-
</react_native_1.View>
|
|
3808
|
-
|
|
3809
|
-
{/* npm chip */}
|
|
3810
|
-
<react_native_1.View style={{
|
|
3811
|
-
flexDirection: 'row',
|
|
3812
|
-
alignItems: 'center',
|
|
3813
|
-
borderRadius: 6,
|
|
3814
|
-
overflow: 'hidden',
|
|
3815
|
-
borderWidth: 1,
|
|
3816
|
-
borderColor: 'rgba(255,255,255,0.18)',
|
|
3817
|
-
}}>
|
|
3818
|
-
<react_native_1.View style={{
|
|
3819
|
-
paddingHorizontal: 5,
|
|
3820
|
-
paddingVertical: 2,
|
|
3821
|
-
backgroundColor: 'rgba(255,255,255,0.28)',
|
|
3822
|
-
}}>
|
|
3823
|
-
<react_native_1.Text style={{
|
|
3824
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3825
|
-
fontSize: 9,
|
|
3826
|
-
color: '#FFFFFF',
|
|
3827
|
-
letterSpacing: 0.3,
|
|
3828
|
-
}}>
|
|
3829
|
-
npm
|
|
3830
|
-
</react_native_1.Text>
|
|
3831
|
-
</react_native_1.View>
|
|
3832
|
-
<react_native_1.View style={{
|
|
3833
|
-
paddingHorizontal: 5,
|
|
3834
|
-
paddingVertical: 2,
|
|
3835
|
-
backgroundColor: 'rgba(255,255,255,0.12)',
|
|
3836
|
-
}}>
|
|
3837
|
-
<react_native_1.Text style={{
|
|
3838
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
3839
|
-
fontSize: 9.5,
|
|
3840
|
-
color: 'rgba(255,255,255,0.92)',
|
|
3841
|
-
}}>
|
|
3842
|
-
v{constants_1.LIB_VERSION}
|
|
3843
|
-
</react_native_1.Text>
|
|
3844
|
-
</react_native_1.View>
|
|
3845
|
-
</react_native_1.View>
|
|
3846
|
-
|
|
3847
|
-
{/* #1 — pulsing dot when a newer version is on NPM */}
|
|
3776
|
+
<react_native_1.View style={{ gap: 2, flex: 1 }}>
|
|
3777
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
3778
|
+
<react_native_1.Text style={[styles_1.default.headerTitle]} numberOfLines={1}>
|
|
3779
|
+
{(0, helpers_1.getAppName)()}
|
|
3780
|
+
</react_native_1.Text>
|
|
3848
3781
|
{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}).`, [
|
|
3849
3782
|
{ text: 'Later', style: 'cancel' },
|
|
3850
3783
|
{
|
|
@@ -3867,8 +3800,120 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
3867
3800
|
}}/>
|
|
3868
3801
|
</react_native_1.Pressable>)}
|
|
3869
3802
|
</react_native_1.View>
|
|
3803
|
+
<react_native_1.View style={{
|
|
3804
|
+
flexDirection: 'row',
|
|
3805
|
+
alignItems: 'center',
|
|
3806
|
+
alignSelf: 'flex-start',
|
|
3807
|
+
backgroundColor: 'rgba(255,255,255,0.1)',
|
|
3808
|
+
borderRadius: 10,
|
|
3809
|
+
paddingHorizontal: 8,
|
|
3810
|
+
paddingVertical: 3,
|
|
3811
|
+
gap: 5,
|
|
3812
|
+
borderWidth: 1,
|
|
3813
|
+
borderColor: 'rgba(255,255,255,0.15)',
|
|
3814
|
+
}}>
|
|
3815
|
+
<react_native_1.View style={{
|
|
3816
|
+
width: 6,
|
|
3817
|
+
height: 6,
|
|
3818
|
+
borderRadius: 3,
|
|
3819
|
+
backgroundColor: '#4ADE80',
|
|
3820
|
+
}}/>
|
|
3821
|
+
<react_native_1.Text style={{
|
|
3822
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
3823
|
+
fontSize: 10,
|
|
3824
|
+
color: 'rgba(255, 255, 255, 0.85)',
|
|
3825
|
+
letterSpacing: 0.2,
|
|
3826
|
+
}} numberOfLines={1}>
|
|
3827
|
+
{(0, helpers_1.getBundleIdentifier)()}
|
|
3828
|
+
</react_native_1.Text>
|
|
3829
|
+
<react_native_1.Animated.View style={{
|
|
3830
|
+
transform: [{ rotate: showHeaderInfo ? '180deg' : '0deg' }],
|
|
3831
|
+
marginLeft: 2,
|
|
3832
|
+
}}>
|
|
3833
|
+
<NetworkIcons_1.ChevronIcon color="rgba(255,255,255,0.6)" size={12}/>
|
|
3834
|
+
</react_native_1.Animated.View>
|
|
3835
|
+
</react_native_1.View>
|
|
3836
|
+
{showHeaderInfo && (<react_native_1.View style={{
|
|
3837
|
+
flexDirection: 'row',
|
|
3838
|
+
alignItems: 'center',
|
|
3839
|
+
gap: 6,
|
|
3840
|
+
marginTop: 4,
|
|
3841
|
+
}}>
|
|
3842
|
+
<react_native_1.View style={{
|
|
3843
|
+
flexDirection: 'row',
|
|
3844
|
+
alignItems: 'center',
|
|
3845
|
+
borderRadius: 6,
|
|
3846
|
+
overflow: 'hidden',
|
|
3847
|
+
borderWidth: 1,
|
|
3848
|
+
borderColor: 'rgba(255,255,255,0.18)',
|
|
3849
|
+
}}>
|
|
3850
|
+
<react_native_1.View style={{
|
|
3851
|
+
paddingHorizontal: 5,
|
|
3852
|
+
paddingVertical: 2,
|
|
3853
|
+
backgroundColor: 'rgba(255,255,255,0.28)',
|
|
3854
|
+
}}>
|
|
3855
|
+
<react_native_1.Text style={{
|
|
3856
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3857
|
+
fontSize: 9,
|
|
3858
|
+
color: '#FFFFFF',
|
|
3859
|
+
letterSpacing: 0.3,
|
|
3860
|
+
}}>
|
|
3861
|
+
{react_native_1.Platform.OS === 'ios' ? 'iOS' : 'Android'}
|
|
3862
|
+
</react_native_1.Text>
|
|
3863
|
+
</react_native_1.View>
|
|
3864
|
+
<react_native_1.View style={{
|
|
3865
|
+
paddingHorizontal: 5,
|
|
3866
|
+
paddingVertical: 2,
|
|
3867
|
+
backgroundColor: 'rgba(255,255,255,0.12)',
|
|
3868
|
+
}}>
|
|
3869
|
+
<react_native_1.Text style={{
|
|
3870
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
3871
|
+
fontSize: 9.5,
|
|
3872
|
+
color: 'rgba(255,255,255,0.92)',
|
|
3873
|
+
}}>
|
|
3874
|
+
{String(react_native_1.Platform.Version)}
|
|
3875
|
+
</react_native_1.Text>
|
|
3876
|
+
</react_native_1.View>
|
|
3877
|
+
</react_native_1.View>
|
|
3878
|
+
<react_native_1.View style={{
|
|
3879
|
+
flexDirection: 'row',
|
|
3880
|
+
alignItems: 'center',
|
|
3881
|
+
borderRadius: 6,
|
|
3882
|
+
overflow: 'hidden',
|
|
3883
|
+
borderWidth: 1,
|
|
3884
|
+
borderColor: 'rgba(255,255,255,0.18)',
|
|
3885
|
+
}}>
|
|
3886
|
+
<react_native_1.View style={{
|
|
3887
|
+
paddingHorizontal: 5,
|
|
3888
|
+
paddingVertical: 2,
|
|
3889
|
+
backgroundColor: 'rgba(255,255,255,0.28)',
|
|
3890
|
+
}}>
|
|
3891
|
+
<react_native_1.Text style={{
|
|
3892
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
3893
|
+
fontSize: 9,
|
|
3894
|
+
color: '#FFFFFF',
|
|
3895
|
+
letterSpacing: 0.3,
|
|
3896
|
+
}}>
|
|
3897
|
+
npm
|
|
3898
|
+
</react_native_1.Text>
|
|
3899
|
+
</react_native_1.View>
|
|
3900
|
+
<react_native_1.View style={{
|
|
3901
|
+
paddingHorizontal: 5,
|
|
3902
|
+
paddingVertical: 2,
|
|
3903
|
+
backgroundColor: 'rgba(255,255,255,0.12)',
|
|
3904
|
+
}}>
|
|
3905
|
+
<react_native_1.Text style={{
|
|
3906
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
3907
|
+
fontSize: 9.5,
|
|
3908
|
+
color: 'rgba(255,255,255,0.92)',
|
|
3909
|
+
}}>
|
|
3910
|
+
v{constants_1.LIB_VERSION}
|
|
3911
|
+
</react_native_1.Text>
|
|
3912
|
+
</react_native_1.View>
|
|
3913
|
+
</react_native_1.View>
|
|
3914
|
+
</react_native_1.View>)}
|
|
3870
3915
|
</react_native_1.View>
|
|
3871
|
-
</
|
|
3916
|
+
</TouchableScale_1.default>) : null}
|
|
3872
3917
|
</react_native_1.View>
|
|
3873
3918
|
|
|
3874
3919
|
<react_native_1.View style={styles_1.default.headerCenter}>
|
|
@@ -4150,14 +4195,6 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
4150
4195
|
</react_native_1.Pressable>)}
|
|
4151
4196
|
</react_native_1.View>
|
|
4152
4197
|
{analyticsSubTab === 'ga_events' && (<react_native_1.View style={styles_1.default.toolbarRight}>
|
|
4153
|
-
<TouchableScale_1.default style={[
|
|
4154
|
-
styles_1.default.toolbarBtn,
|
|
4155
|
-
!hideScreenView && styles_1.default.toolbarBtnActive,
|
|
4156
|
-
]} onPress={() => setHideScreenView(prev => !prev)} hitSlop={10}>
|
|
4157
|
-
<NetworkIcons_1.ScreenIcon color={!hideScreenView
|
|
4158
|
-
? AppColors_1.AppColors.purple
|
|
4159
|
-
: AppColors_1.AppColors.grayTextStrong} size={18}/>
|
|
4160
|
-
</TouchableScale_1.default>
|
|
4161
4198
|
<TouchableScale_1.default style={{
|
|
4162
4199
|
flexDirection: 'row',
|
|
4163
4200
|
alignItems: 'center',
|
|
@@ -4288,109 +4325,118 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, }) => {
|
|
|
4288
4325
|
|
|
4289
4326
|
{isReady ? (activeTab === 'insights' ? (<react_native_1.ScrollView style={styles_1.default.insightsContainer} contentContainerStyle={styles_1.default.insightsContent} showsVerticalScrollIndicator={false}>
|
|
4290
4327
|
{renderInsightsDashboard()}
|
|
4291
|
-
</react_native_1.ScrollView>) : activeTab === 'analytics' ? (
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
<react_native_svg_1.default width={14} height={14} viewBox="0 0 24 24" fill={color}>
|
|
4313
|
-
<react_native_svg_1.Circle cx="12" cy="12" r="10" opacity="0.3"/>
|
|
4314
|
-
<react_native_svg_1.Path d="M7 14l3-3 4 4 6-6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" fill="none"/>
|
|
4315
|
-
</react_native_svg_1.default>
|
|
4316
|
-
</react_native_1.View>
|
|
4317
|
-
<react_native_1.Text style={styles_1.default.analyticsTopEventName} numberOfLines={2}>
|
|
4318
|
-
{name}
|
|
4328
|
+
</react_native_1.ScrollView>) : activeTab === 'analytics' ? (<react_native_1.View style={{ flex: 1 }}>
|
|
4329
|
+
{selectedEvent != null ? (<AnalyticsDetail_1.default event={selectedEvent}/>) : analyticsSubTab === 'top_events' ? (<react_native_1.FlatList data={topEventsArray} keyExtractor={item => item[0]} contentContainerStyle={[
|
|
4330
|
+
styles_1.default.listContent,
|
|
4331
|
+
{ paddingHorizontal: 16, paddingTop: 12 },
|
|
4332
|
+
]} renderItem={({ item: [name, count], index }) => {
|
|
4333
|
+
const maxCount = topEventsArray[0]?.[1] || 1;
|
|
4334
|
+
const pct = Math.max(6, (count / maxCount) * 100);
|
|
4335
|
+
const color = (0, AnalyticsEventCard_1.getEventColor)(name);
|
|
4336
|
+
return (<AnimatedEntrance_1.default index={index} distance={8} style={[
|
|
4337
|
+
styles_1.default.analyticsTopEventsCard,
|
|
4338
|
+
{ marginBottom: 6, paddingVertical: 10, paddingHorizontal: 12 },
|
|
4339
|
+
]}>
|
|
4340
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
|
|
4341
|
+
<react_native_1.Text style={{
|
|
4342
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
4343
|
+
fontSize: 11,
|
|
4344
|
+
color: color,
|
|
4345
|
+
width: 18,
|
|
4346
|
+
textAlign: 'center',
|
|
4347
|
+
}}>
|
|
4348
|
+
{index + 1}
|
|
4319
4349
|
</react_native_1.Text>
|
|
4350
|
+
<react_native_1.View style={{ flex: 1, gap: 4 }}>
|
|
4351
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
4352
|
+
<react_native_1.Text style={{
|
|
4353
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
4354
|
+
fontSize: 12.5,
|
|
4355
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
4356
|
+
flex: 1,
|
|
4357
|
+
}} numberOfLines={1}>
|
|
4358
|
+
{name}
|
|
4359
|
+
</react_native_1.Text>
|
|
4360
|
+
<react_native_1.Text style={{
|
|
4361
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
4362
|
+
fontSize: 12,
|
|
4363
|
+
color: color,
|
|
4364
|
+
marginLeft: 8,
|
|
4365
|
+
}}>
|
|
4366
|
+
{count}
|
|
4367
|
+
</react_native_1.Text>
|
|
4368
|
+
</react_native_1.View>
|
|
4369
|
+
<react_native_1.View style={{ height: 3, backgroundColor: AppColors_1.AppColors.grayBackground, borderRadius: 2, overflow: 'hidden' }}>
|
|
4370
|
+
<react_native_linear_gradient_1.default colors={[color, `${color}88`]} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }} style={{
|
|
4371
|
+
height: '100%',
|
|
4372
|
+
borderRadius: 2,
|
|
4373
|
+
width: `${pct}%`,
|
|
4374
|
+
}}/>
|
|
4375
|
+
</react_native_1.View>
|
|
4376
|
+
</react_native_1.View>
|
|
4320
4377
|
</react_native_1.View>
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
width: `${Math.max(6, (count / maxCount) * 100)}%`,
|
|
4326
|
-
},
|
|
4327
|
-
]}/>
|
|
4328
|
-
</react_native_1.View>
|
|
4329
|
-
<react_native_1.Text style={styles_1.default.analyticsTopEventCount}>
|
|
4330
|
-
{count}
|
|
4331
|
-
</react_native_1.Text>
|
|
4378
|
+
</AnimatedEntrance_1.default>);
|
|
4379
|
+
}} ListEmptyComponent={<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
4380
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
4381
|
+
<NetworkIcons_1.EmptyRadarIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
4332
4382
|
</react_native_1.View>
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
item.
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
if (routeInfo &&
|
|
4366
|
-
routeInfo.path !== 'Navigators') {
|
|
4367
|
-
const parts = routeInfo.path.split(' ➔ ');
|
|
4368
|
-
screenName = parts[parts.length - 1];
|
|
4383
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>No Top Events</react_native_1.Text>
|
|
4384
|
+
</react_native_1.View>}/>) : (<react_native_1.FlatList data={filteredAnalyticsEvents} keyExtractor={item => item.id.toString()} renderItem={({ item, index }) => {
|
|
4385
|
+
const prev = filteredAnalyticsEvents[index + 1];
|
|
4386
|
+
const next = filteredAnalyticsEvents[index - 1];
|
|
4387
|
+
const msSincePrev = prev
|
|
4388
|
+
? item.timestamp - prev.timestamp
|
|
4389
|
+
: undefined;
|
|
4390
|
+
const thisMin = Math.floor(item.timestamp / 60000);
|
|
4391
|
+
const nextMin = next
|
|
4392
|
+
? Math.floor(next.timestamp / 60000)
|
|
4393
|
+
: -1;
|
|
4394
|
+
const showTimestamp = index === 0 || thisMin !== nextMin;
|
|
4395
|
+
return (<AnimatedEntrance_1.default index={index} distance={8}>
|
|
4396
|
+
<AnalyticsEventCard_1.default event={item} onPress={() => {
|
|
4397
|
+
animateNextLayout();
|
|
4398
|
+
setSelectedEvent(item);
|
|
4399
|
+
}} isNew={newEventIds.has(item.id)} searchStr={analyticsSearch} isFirst={index === 0} isLast={index === filteredAnalyticsEvents.length - 1} msSincePrev={msSincePrev} showTimestamp={showTimestamp} computedScreenName={(() => {
|
|
4400
|
+
let screenName = item.screenName ||
|
|
4401
|
+
item.screenClass ||
|
|
4402
|
+
item.pageTitle ||
|
|
4403
|
+
item.pageLocation ||
|
|
4404
|
+
item.params?.firebase_screen ||
|
|
4405
|
+
item.params?.screen_name ||
|
|
4406
|
+
item.params?.firebase_screen_class ||
|
|
4407
|
+
item.params?.screen_class;
|
|
4408
|
+
const routeInfo = logRouteMapRef.current.get(item.id + 1000000);
|
|
4409
|
+
if (!screenName) {
|
|
4410
|
+
if (routeInfo &&
|
|
4411
|
+
routeInfo.path !== 'Navigators') {
|
|
4412
|
+
const parts = routeInfo.path.split(' ➔ ');
|
|
4413
|
+
screenName = parts[parts.length - 1];
|
|
4414
|
+
}
|
|
4369
4415
|
}
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
</react_native_1.
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
}
|
|
4393
|
-
|
|
4416
|
+
return screenName;
|
|
4417
|
+
})()}/>
|
|
4418
|
+
</AnimatedEntrance_1.default>);
|
|
4419
|
+
}} initialNumToRender={20} maxToRenderPerBatch={20} windowSize={5} removeClippedSubviews={false} ListEmptyComponent={<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
4420
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
4421
|
+
<NetworkIcons_1.EmptyRadarIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
4422
|
+
</react_native_1.View>
|
|
4423
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>
|
|
4424
|
+
{analyticsSearch.length > 0
|
|
4425
|
+
? 'No matching events'
|
|
4426
|
+
: 'No analytics events yet'}
|
|
4427
|
+
</react_native_1.Text>
|
|
4428
|
+
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
4429
|
+
{analyticsSearch.length > 0
|
|
4430
|
+
? 'Try adjusting your search.'
|
|
4431
|
+
: 'Call setupAnalyticsLogger(analytics()) at app start.'}
|
|
4432
|
+
</react_native_1.Text>
|
|
4433
|
+
</react_native_1.View>} contentContainerStyle={[
|
|
4434
|
+
styles_1.default.listContent,
|
|
4435
|
+
filteredAnalyticsEvents.length === 0 && {
|
|
4436
|
+
flexGrow: 1,
|
|
4437
|
+
},
|
|
4438
|
+
]} keyboardShouldPersistTaps="handled"/>)}
|
|
4439
|
+
</react_native_1.View>) : activeTab === 'apis' && selected == null ? (<react_native_1.View style={{ flex: 1 }}>
|
|
4394
4440
|
<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 }}>
|
|
4395
4441
|
<react_native_1.View style={styles_1.default.toolbarRow}>
|
|
4396
4442
|
<react_native_1.View style={styles_1.default.searchContainer}>
|