react-native-inapp-inspector 2.3.8 → 2.3.9

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.
Files changed (53) hide show
  1. package/dist/commonjs/components/Inspector/AnalyticsTab.js +27 -2
  2. package/dist/commonjs/components/Inspector/BundleTab.js +3 -0
  3. package/dist/commonjs/components/Inspector/ConsoleTab.js +24 -1
  4. package/dist/commonjs/components/Inspector/CrashTab.js +30 -1
  5. package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.d.ts +7 -0
  6. package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +111 -0
  7. package/dist/commonjs/components/Inspector/InspectorHeader.js +225 -108
  8. package/dist/commonjs/components/Inspector/NpmUpdateToast.js +1 -1
  9. package/dist/commonjs/components/Inspector/PerformanceTab.js +3 -0
  10. package/dist/commonjs/components/Inspector/ReduxTab.js +24 -1
  11. package/dist/commonjs/components/Inspector/SettingsPanel.js +73 -88
  12. package/dist/commonjs/components/Inspector/StorageTab.js +37 -11
  13. package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -0
  14. package/dist/commonjs/components/LogCard.js +33 -3
  15. package/dist/commonjs/constants/version.d.ts +1 -1
  16. package/dist/commonjs/constants/version.js +1 -1
  17. package/dist/commonjs/helpers/telemetry.js +34 -0
  18. package/dist/commonjs/index.js +3 -0
  19. package/dist/esm/components/Inspector/AnalyticsTab.js +29 -4
  20. package/dist/esm/components/Inspector/BundleTab.js +3 -0
  21. package/dist/esm/components/Inspector/ConsoleTab.js +26 -3
  22. package/dist/esm/components/Inspector/CrashTab.js +32 -3
  23. package/dist/esm/components/Inspector/FeatureUnderDevNotice.d.ts +7 -0
  24. package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +74 -0
  25. package/dist/esm/components/Inspector/InspectorHeader.js +226 -109
  26. package/dist/esm/components/Inspector/NpmUpdateToast.js +1 -1
  27. package/dist/esm/components/Inspector/PerformanceTab.js +3 -0
  28. package/dist/esm/components/Inspector/ReduxTab.js +26 -3
  29. package/dist/esm/components/Inspector/SettingsPanel.js +73 -88
  30. package/dist/esm/components/Inspector/StorageTab.js +39 -13
  31. package/dist/esm/components/Inspector/UpdateAvailableModal.js +2 -0
  32. package/dist/esm/components/LogCard.js +34 -4
  33. package/dist/esm/constants/version.d.ts +1 -1
  34. package/dist/esm/constants/version.js +1 -1
  35. package/dist/esm/helpers/telemetry.js +34 -0
  36. package/dist/esm/index.js +3 -0
  37. package/package.json +1 -1
  38. package/src/components/Inspector/AnalyticsTab.tsx +71 -43
  39. package/src/components/Inspector/BundleTab.tsx +3 -0
  40. package/src/components/Inspector/ConsoleTab.tsx +28 -1
  41. package/src/components/Inspector/CrashTab.tsx +45 -14
  42. package/src/components/Inspector/FeatureUnderDevNotice.tsx +94 -0
  43. package/src/components/Inspector/InspectorHeader.tsx +257 -115
  44. package/src/components/Inspector/NpmUpdateToast.tsx +1 -1
  45. package/src/components/Inspector/PerformanceTab.tsx +3 -0
  46. package/src/components/Inspector/ReduxTab.tsx +28 -1
  47. package/src/components/Inspector/SettingsPanel.tsx +93 -132
  48. package/src/components/Inspector/StorageTab.tsx +56 -27
  49. package/src/components/Inspector/UpdateAvailableModal.tsx +2 -0
  50. package/src/components/LogCard.tsx +41 -4
  51. package/src/constants/version.ts +1 -1
  52. package/src/helpers/telemetry.ts +36 -0
  53. package/src/index.tsx +5 -0
@@ -1,16 +1,18 @@
1
- import React, { useCallback, useMemo, useState } from 'react';
1
+ import React, { useCallback, useMemo, useRef, useState } from 'react';
2
2
  import { Alert, FlatList, ScrollView, StyleSheet, Text, TextInput, TouchableOpacity, View, } from 'react-native';
3
3
  import { useTranslation } from '../../i18n';
4
4
  import { useInspector } from './InspectorContext';
5
5
  import TouchableScale from '../TouchableScale';
6
6
  import AnimatedEntrance from '../AnimatedEntrance';
7
7
  import EndOfListFooter from '../EndOfListFooter';
8
+ import FeatureUnderDevNotice from './FeatureUnderDevNotice';
8
9
  import HighlightText from '../HighlightText';
10
+ import styles from '../../styles';
9
11
  import { AppColors } from '../../styles/AppColors';
10
12
  import { AppFonts } from '../../styles/AppFonts';
11
13
  import { clearCrashRecords, } from '../../customHooks/crashHandler';
12
14
  import CrashFilterModal, { DEFAULT_CRASH_FILTERS, isCrashFiltersDefault, } from './CrashFilterModal';
13
- import { SearchIcon, ClearIcon, TrashIcon, TerminalIcon, LayersIcon, ClockIcon, ShieldAlertIcon, FlameIcon, JsIcon, HourglassIcon, SkullIcon, LayoutIcon, ChipIcon, AppleIcon, AndroidIcon, RepeatIcon, CodeBracketsIcon, FilterIcon, } from '../NetworkIcons';
15
+ import { SearchIcon, ClearIcon, TrashIcon, TerminalIcon, LayersIcon, ClockIcon, ShieldAlertIcon, FlameIcon, JsIcon, HourglassIcon, SkullIcon, LayoutIcon, ChipIcon, AppleIcon, AndroidIcon, RepeatIcon, CodeBracketsIcon, FilterIcon, ChevronIcon, } from '../NetworkIcons';
14
16
  const getRelativeTime = (timestamp) => {
15
17
  const now = Date.now();
16
18
  const diff = Math.max(0, now - timestamp);
@@ -29,6 +31,7 @@ const getRelativeTime = (timestamp) => {
29
31
  const CrashTab = React.memo(() => {
30
32
  const { t } = useTranslation();
31
33
  const { crashRecords, selectedCrash, setSelectedCrash } = useInspector();
34
+ const listRef = useRef(null);
32
35
  const [searchQuery, setSearchQuery] = useState('');
33
36
  const [filterType, setFilterType] = useState('all');
34
37
  const [crashFilters, setCrashFilters] = useState(DEFAULT_CRASH_FILTERS);
@@ -349,6 +352,8 @@ const CrashTab = React.memo(() => {
349
352
  </TouchableScale>
350
353
  </View>
351
354
 
355
+ <FeatureUnderDevNotice featureName="Crash & Exception Sentinel"/>
356
+
352
357
 
353
358
  <ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={localStyles.filterScrollContent}>
354
359
  {[
@@ -403,7 +408,31 @@ const CrashTab = React.memo(() => {
403
408
  Clear Search
404
409
  </Text>
405
410
  </TouchableScale>)}
406
- </ScrollView>) : (<FlatList data={filteredList} keyExtractor={item => item.id} renderItem={renderCard} initialNumToRender={12} maxToRenderPerBatch={8} windowSize={5} removeClippedSubviews={true} renderToHardwareTextureAndroid={true} contentContainerStyle={localStyles.listContent} showsVerticalScrollIndicator={false} ListFooterComponent={<EndOfListFooter />}/>)}
411
+ </ScrollView>) : (<>
412
+ <FlatList ref={listRef} data={filteredList} keyExtractor={item => item.id} renderItem={renderCard} initialNumToRender={12} maxToRenderPerBatch={8} windowSize={5} removeClippedSubviews={true} renderToHardwareTextureAndroid={true} contentContainerStyle={localStyles.listContent} showsVerticalScrollIndicator={false} ListFooterComponent={<EndOfListFooter />}/>
413
+
414
+ <TouchableScale onPress={() => {
415
+ try {
416
+ listRef.current?.scrollToOffset({
417
+ offset: 0,
418
+ animated: true,
419
+ });
420
+ }
421
+ catch {
422
+ try {
423
+ listRef.current?.scrollToIndex({
424
+ index: 0,
425
+ animated: true,
426
+ });
427
+ }
428
+ catch { }
429
+ }
430
+ }} hitSlop={12} style={styles.scrollTopBtn}>
431
+ <View style={{ transform: [{ rotate: '180deg' }] }}>
432
+ <ChevronIcon color={AppColors.white} size={18}/>
433
+ </View>
434
+ </TouchableScale>
435
+ </>)}
407
436
 
408
437
 
409
438
  <CrashFilterModal visible={isFilterModalOpen} onClose={() => setIsFilterModalOpen(false)} filters={crashFilters} onApply={setCrashFilters} searchQuery={searchQuery}/>
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface FeatureUnderDevNoticeProps {
3
+ featureName?: string;
4
+ compact?: boolean;
5
+ }
6
+ export declare const FeatureUnderDevNotice: React.FC<FeatureUnderDevNoticeProps>;
7
+ export default FeatureUnderDevNotice;
@@ -0,0 +1,74 @@
1
+ import React, { useState } from 'react';
2
+ import { StyleSheet, Text, View, Pressable } from 'react-native';
3
+ import { AppColors } from '../../styles/AppColors';
4
+ import { AppFonts } from '../../styles/AppFonts';
5
+ import { WarningTriangleIcon, ClearIcon } from '../NetworkIcons';
6
+ export const FeatureUnderDevNotice = ({ featureName, compact = false, }) => {
7
+ const [isDismissed, setIsDismissed] = useState(false);
8
+ if (isDismissed)
9
+ return null;
10
+ return (<View style={[styles.container, compact && styles.containerCompact]}>
11
+ <View style={styles.contentRow}>
12
+ <View style={styles.badgeWrap}>
13
+ <WarningTriangleIcon color={AppColors.warningIconGold} size={12}/>
14
+ <Text style={styles.badgeText}>IN ACTIVE DEVELOPMENT</Text>
15
+ </View>
16
+
17
+ <Pressable onPress={() => setIsDismissed(true)} hitSlop={8} style={styles.dismissBtn} accessible={true} accessibilityRole="button" accessibilityLabel="Dismiss notice">
18
+ <ClearIcon color={AppColors.grayTextWeak} size={11}/>
19
+ </Pressable>
20
+ </View>
21
+
22
+ <Text style={styles.messageText}>
23
+ {featureName ? `${featureName} is` : 'This module is'} currently in active
24
+ development. Results and metrics may vary in accuracy. We are continuously
25
+ improving this feature for upcoming releases.
26
+ </Text>
27
+ </View>);
28
+ };
29
+ const styles = StyleSheet.create({
30
+ container: {
31
+ marginHorizontal: 12,
32
+ marginTop: 8,
33
+ marginBottom: 6,
34
+ paddingHorizontal: 12,
35
+ paddingVertical: 9,
36
+ borderRadius: 8,
37
+ backgroundColor: `${AppColors.warningIconGold}12`,
38
+ borderWidth: 1,
39
+ borderColor: `${AppColors.warningIconGold}30`,
40
+ },
41
+ containerCompact: {
42
+ marginTop: 4,
43
+ marginBottom: 4,
44
+ paddingVertical: 7,
45
+ paddingHorizontal: 10,
46
+ },
47
+ contentRow: {
48
+ flexDirection: 'row',
49
+ alignItems: 'center',
50
+ justifyContent: 'space-between',
51
+ marginBottom: 4,
52
+ },
53
+ badgeWrap: {
54
+ flexDirection: 'row',
55
+ alignItems: 'center',
56
+ gap: 4.5,
57
+ },
58
+ badgeText: {
59
+ fontFamily: AppFonts.interBold,
60
+ fontSize: 9.5,
61
+ color: AppColors.warningIconGold,
62
+ letterSpacing: 0.4,
63
+ },
64
+ dismissBtn: {
65
+ padding: 2,
66
+ },
67
+ messageText: {
68
+ fontFamily: AppFonts.interRegular,
69
+ fontSize: 10.5,
70
+ color: AppColors.grayText,
71
+ lineHeight: 15,
72
+ },
73
+ });
74
+ export default FeatureUnderDevNotice;