@umituz/react-native-settings 4.19.3 → 4.19.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-settings",
3
- "version": "4.19.3",
3
+ "version": "4.19.5",
4
4
  "description": "Complete settings hub for React Native apps - consolidated package with settings, about, legal, appearance, feedback, FAQs, and rating",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -55,8 +55,13 @@
55
55
  "devDependencies": {
56
56
  "@babel/plugin-transform-runtime": "^7.28.5",
57
57
  "@expo/vector-icons": "^15.0.0",
58
+ "@gorhom/bottom-sheet": "^5.2.8",
59
+ "@react-native-community/datetimepicker": "^8.5.1",
60
+ "@react-navigation/bottom-tabs": "^7.9.0",
58
61
  "@react-navigation/native": "^6.1.18",
59
62
  "@react-navigation/stack": "^6.4.1",
63
+ "@sentry/react-native": "^7.8.0",
64
+ "@sentry/types": "^10.32.1",
60
65
  "@tanstack/react-query": "^5.0.0",
61
66
  "@types/jest": "^29.5.14",
62
67
  "@types/react": "~19.1.10",
@@ -64,15 +69,40 @@
64
69
  "@typescript-eslint/parser": "^7.0.0",
65
70
  "@umituz/react-native-auth": "latest",
66
71
  "@umituz/react-native-design-system": "latest",
72
+ "@umituz/react-native-filesystem": "^2.1.7",
73
+ "@umituz/react-native-firebase": "^1.13.28",
74
+ "@umituz/react-native-haptics": "^1.0.3",
67
75
  "@umituz/react-native-localization": "latest",
68
76
  "@umituz/react-native-notifications": "latest",
69
77
  "@umituz/react-native-onboarding": "latest",
78
+ "@umituz/react-native-sentry": "^1.4.2",
70
79
  "@umituz/react-native-storage": "latest",
71
80
  "@umituz/react-native-tanstack": "latest",
81
+ "@umituz/react-native-uuid": "^1.2.2",
72
82
  "eslint": "^8.57.0",
83
+ "expo-apple-authentication": "^8.0.8",
84
+ "expo-application": "^7.0.8",
85
+ "expo-clipboard": "^8.0.8",
86
+ "expo-crypto": "^15.0.8",
87
+ "expo-device": "^8.0.10",
88
+ "expo-file-system": "^19.0.21",
89
+ "expo-haptics": "^15.0.8",
90
+ "expo-image": "^3.0.11",
91
+ "expo-linear-gradient": "^15.0.8",
92
+ "expo-localization": "^17.0.8",
93
+ "expo-notifications": "^0.32.15",
94
+ "expo-sharing": "^14.0.8",
95
+ "expo-video": "^3.0.15",
96
+ "i18next": "^25.7.3",
73
97
  "react": "19.1.0",
98
+ "react-i18next": "^16.5.0",
74
99
  "react-native": "0.81.5",
75
- "typescript": "^5.3.0"
100
+ "react-native-gesture-handler": "^2.30.0",
101
+ "react-native-reanimated": "^4.2.1",
102
+ "react-native-safe-area-context": "^5.6.2",
103
+ "rn-emoji-keyboard": "^1.7.0",
104
+ "typescript": "^5.3.0",
105
+ "zustand": "^5.0.9"
76
106
  },
77
107
  "publishConfig": {
78
108
  "access": "public"
@@ -8,3 +8,4 @@ export * from './presentation/components/AboutContent';
8
8
  export * from './presentation/components/AboutSection';
9
9
  export * from './presentation/components/AboutSettingItem';
10
10
  export * from './presentation/components/AboutHeader';
11
+ export * from './domain/entities/AppInfo';
package/src/index.ts CHANGED
@@ -86,6 +86,9 @@ export { SettingsErrorBoundary } from './presentation/components/SettingsErrorBo
86
86
  export { StorageClearSetting } from './presentation/components/StorageClearSetting';
87
87
  export type { StorageClearSettingProps } from './presentation/components/StorageClearSetting';
88
88
 
89
+ export { CloudSyncSetting } from './presentation/components/CloudSyncSetting';
90
+ export type { CloudSyncSettingProps } from './presentation/components/CloudSyncSetting';
91
+
89
92
  export { DevSettingsSection } from './presentation/components/DevSettingsSection';
90
93
  export type { DevSettingsProps } from './presentation/components/DevSettingsSection';
91
94
 
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Cloud Sync Setting Component
3
+ * Displays cloud sync status and allows triggering sync
4
+ */
5
+
6
+ import React, { useMemo } from "react";
7
+ import { SettingItem } from "./SettingItem";
8
+
9
+ export interface CloudSyncSettingProps {
10
+ title?: string;
11
+ description?: string;
12
+ isSyncing?: boolean;
13
+ lastSynced?: Date | null;
14
+ onPress?: () => void;
15
+ disabled?: boolean;
16
+ isLast?: boolean;
17
+ }
18
+
19
+ const formatLastSynced = (date: Date): string => {
20
+ const now = new Date();
21
+ const diffMs = now.getTime() - date.getTime();
22
+ const diffMinutes = Math.floor(diffMs / (1000 * 60));
23
+ const diffHours = Math.floor(diffMinutes / 60);
24
+ const diffDays = Math.floor(diffHours / 24);
25
+
26
+ if (diffMinutes < 1) {
27
+ return "last_synced_just_now";
28
+ }
29
+ if (diffMinutes < 60) {
30
+ return `last_synced_${diffMinutes}m_ago`;
31
+ }
32
+ if (diffHours < 24) {
33
+ return `last_synced_${diffHours}h_ago`;
34
+ }
35
+ return `last_synced_${diffDays}d_ago`;
36
+ };
37
+
38
+ export const CloudSyncSetting: React.FC<CloudSyncSettingProps> = ({
39
+ title = "cloud_sync",
40
+ description,
41
+ isSyncing = false,
42
+ lastSynced,
43
+ onPress,
44
+ disabled = false,
45
+ isLast = false,
46
+ }) => {
47
+ const displayValue = useMemo(() => {
48
+ if (isSyncing) {
49
+ return "syncing";
50
+ }
51
+ if (description) {
52
+ return description;
53
+ }
54
+ if (lastSynced) {
55
+ return formatLastSynced(lastSynced);
56
+ }
57
+ return undefined;
58
+ }, [isSyncing, description, lastSynced]);
59
+
60
+ return (
61
+ <SettingItem
62
+ icon="cloud"
63
+ title={title}
64
+ value={displayValue}
65
+ onPress={onPress}
66
+ disabled={disabled || isSyncing}
67
+ isLast={isLast}
68
+ />
69
+ );
70
+ };