@umituz/react-native-settings 2.4.1 → 3.0.0
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 +5 -13
- package/src/presentation/components/SettingItem.tsx +4 -4
- package/lib/__tests__/setup.d.ts +0 -5
- package/lib/__tests__/setup.d.ts.map +0 -1
- package/lib/__tests__/setup.js +0 -143
- package/lib/__tests__/setup.js.map +0 -1
- package/lib/domain/repositories/ISettingsRepository.d.ts +0 -51
- package/lib/domain/repositories/ISettingsRepository.d.ts.map +0 -1
- package/lib/domain/repositories/ISettingsRepository.js +0 -8
- package/lib/domain/repositories/ISettingsRepository.js.map +0 -1
- package/lib/index.d.ts +0 -35
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -32
- package/lib/index.js.map +0 -1
- package/lib/infrastructure/storage/SettingsStore.d.ts +0 -36
- package/lib/infrastructure/storage/SettingsStore.d.ts.map +0 -1
- package/lib/infrastructure/storage/SettingsStore.js +0 -144
- package/lib/infrastructure/storage/SettingsStore.js.map +0 -1
- package/lib/presentation/components/CloudSyncSetting.d.ts +0 -16
- package/lib/presentation/components/CloudSyncSetting.d.ts.map +0 -1
- package/lib/presentation/components/CloudSyncSetting.js +0 -30
- package/lib/presentation/components/CloudSyncSetting.js.map +0 -1
- package/lib/presentation/components/DisclaimerCard.d.ts +0 -15
- package/lib/presentation/components/DisclaimerCard.d.ts.map +0 -1
- package/lib/presentation/components/DisclaimerCard.js +0 -73
- package/lib/presentation/components/DisclaimerCard.js.map +0 -1
- package/lib/presentation/components/DisclaimerModal.d.ts +0 -13
- package/lib/presentation/components/DisclaimerModal.d.ts.map +0 -1
- package/lib/presentation/components/DisclaimerModal.js +0 -62
- package/lib/presentation/components/DisclaimerModal.js.map +0 -1
- package/lib/presentation/components/DisclaimerSetting.d.ts +0 -39
- package/lib/presentation/components/DisclaimerSetting.d.ts.map +0 -1
- package/lib/presentation/components/DisclaimerSetting.js +0 -59
- package/lib/presentation/components/DisclaimerSetting.js.map +0 -1
- package/lib/presentation/components/SettingItem.d.ts +0 -45
- package/lib/presentation/components/SettingItem.d.ts.map +0 -1
- package/lib/presentation/components/SettingItem.js +0 -113
- package/lib/presentation/components/SettingItem.js.map +0 -1
- package/lib/presentation/components/SettingsErrorBoundary.d.ts +0 -23
- package/lib/presentation/components/SettingsErrorBoundary.d.ts.map +0 -1
- package/lib/presentation/components/SettingsErrorBoundary.js +0 -73
- package/lib/presentation/components/SettingsErrorBoundary.js.map +0 -1
- package/lib/presentation/components/SettingsFooter.d.ts +0 -11
- package/lib/presentation/components/SettingsFooter.d.ts.map +0 -1
- package/lib/presentation/components/SettingsFooter.js +0 -31
- package/lib/presentation/components/SettingsFooter.js.map +0 -1
- package/lib/presentation/components/SettingsSection.d.ts +0 -13
- package/lib/presentation/components/SettingsSection.d.ts.map +0 -1
- package/lib/presentation/components/SettingsSection.js +0 -37
- package/lib/presentation/components/SettingsSection.js.map +0 -1
- package/lib/presentation/components/StorageClearSetting.d.ts +0 -16
- package/lib/presentation/components/StorageClearSetting.d.ts.map +0 -1
- package/lib/presentation/components/StorageClearSetting.js +0 -21
- package/lib/presentation/components/StorageClearSetting.js.map +0 -1
- package/lib/presentation/components/UserProfileHeader.d.ts +0 -30
- package/lib/presentation/components/UserProfileHeader.d.ts.map +0 -1
- package/lib/presentation/components/UserProfileHeader.js +0 -119
- package/lib/presentation/components/UserProfileHeader.js.map +0 -1
- package/lib/presentation/screens/AppearanceScreen.d.ts +0 -8
- package/lib/presentation/screens/AppearanceScreen.d.ts.map +0 -1
- package/lib/presentation/screens/AppearanceScreen.js +0 -8
- package/lib/presentation/screens/AppearanceScreen.js.map +0 -1
- package/lib/presentation/screens/SettingsScreen.d.ts +0 -38
- package/lib/presentation/screens/SettingsScreen.d.ts.map +0 -1
- package/lib/presentation/screens/SettingsScreen.js +0 -37
- package/lib/presentation/screens/SettingsScreen.js.map +0 -1
- package/lib/presentation/screens/components/AboutLegalSection.d.ts +0 -15
- package/lib/presentation/screens/components/AboutLegalSection.d.ts.map +0 -1
- package/lib/presentation/screens/components/AboutLegalSection.js +0 -28
- package/lib/presentation/screens/components/AboutLegalSection.js.map +0 -1
- package/lib/presentation/screens/components/AppearanceSection.d.ts +0 -12
- package/lib/presentation/screens/components/AppearanceSection.d.ts.map +0 -1
- package/lib/presentation/screens/components/AppearanceSection.js +0 -21
- package/lib/presentation/screens/components/AppearanceSection.js.map +0 -1
- package/lib/presentation/screens/components/LanguageSection.d.ts +0 -12
- package/lib/presentation/screens/components/LanguageSection.d.ts.map +0 -1
- package/lib/presentation/screens/components/LanguageSection.js +0 -26
- package/lib/presentation/screens/components/LanguageSection.js.map +0 -1
- package/lib/presentation/screens/components/NotificationsSection.d.ts +0 -12
- package/lib/presentation/screens/components/NotificationsSection.d.ts.map +0 -1
- package/lib/presentation/screens/components/NotificationsSection.js +0 -58
- package/lib/presentation/screens/components/NotificationsSection.js.map +0 -1
- package/lib/presentation/screens/components/SettingsContent.d.ts +0 -36
- package/lib/presentation/screens/components/SettingsContent.d.ts.map +0 -1
- package/lib/presentation/screens/components/SettingsContent.js +0 -81
- package/lib/presentation/screens/components/SettingsContent.js.map +0 -1
- package/lib/presentation/screens/components/SettingsHeader.d.ts +0 -12
- package/lib/presentation/screens/components/SettingsHeader.d.ts.map +0 -1
- package/lib/presentation/screens/components/SettingsHeader.js +0 -59
- package/lib/presentation/screens/components/SettingsHeader.js.map +0 -1
- package/lib/presentation/screens/components/index.d.ts +0 -9
- package/lib/presentation/screens/components/index.d.ts.map +0 -1
- package/lib/presentation/screens/components/index.js +0 -9
- package/lib/presentation/screens/components/index.js.map +0 -1
- package/lib/presentation/screens/hooks/useFeatureDetection.d.ts +0 -21
- package/lib/presentation/screens/hooks/useFeatureDetection.d.ts.map +0 -1
- package/lib/presentation/screens/hooks/useFeatureDetection.js +0 -82
- package/lib/presentation/screens/hooks/useFeatureDetection.js.map +0 -1
- package/lib/presentation/screens/types/CustomSection.d.ts +0 -19
- package/lib/presentation/screens/types/CustomSection.d.ts.map +0 -1
- package/lib/presentation/screens/types/CustomSection.js +0 -6
- package/lib/presentation/screens/types/CustomSection.js.map +0 -1
- package/lib/presentation/screens/types/ExtendedConfig.d.ts +0 -68
- package/lib/presentation/screens/types/ExtendedConfig.d.ts.map +0 -1
- package/lib/presentation/screens/types/ExtendedConfig.js +0 -6
- package/lib/presentation/screens/types/ExtendedConfig.js.map +0 -1
- package/lib/presentation/screens/types/FeatureConfig.d.ts +0 -95
- package/lib/presentation/screens/types/FeatureConfig.d.ts.map +0 -1
- package/lib/presentation/screens/types/FeatureConfig.js +0 -6
- package/lib/presentation/screens/types/FeatureConfig.js.map +0 -1
- package/lib/presentation/screens/types/SettingsConfig.d.ts +0 -97
- package/lib/presentation/screens/types/SettingsConfig.d.ts.map +0 -1
- package/lib/presentation/screens/types/SettingsConfig.js +0 -6
- package/lib/presentation/screens/types/SettingsConfig.js.map +0 -1
- package/lib/presentation/screens/types/index.d.ts +0 -10
- package/lib/presentation/screens/types/index.d.ts.map +0 -1
- package/lib/presentation/screens/types/index.js +0 -6
- package/lib/presentation/screens/types/index.js.map +0 -1
- package/lib/presentation/screens/utils/normalizeConfig.d.ts +0 -44
- package/lib/presentation/screens/utils/normalizeConfig.d.ts.map +0 -1
- package/lib/presentation/screens/utils/normalizeConfig.js +0 -38
- package/lib/presentation/screens/utils/normalizeConfig.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-settings",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Settings management for React Native apps - user preferences, theme, language, notifications",
|
|
5
|
-
"main": "./
|
|
6
|
-
"types": "./
|
|
5
|
+
"main": "./src/index.ts",
|
|
6
|
+
"types": "./src/index.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "tsc --skipLibCheck",
|
|
9
8
|
"typecheck": "tsc --noEmit",
|
|
10
9
|
"lint": "tsc --noEmit",
|
|
11
|
-
"test": "jest",
|
|
12
|
-
"test:watch": "jest --watch",
|
|
13
|
-
"test:coverage": "jest --coverage",
|
|
14
|
-
"prepublishOnly": "npm run build",
|
|
15
10
|
"version:minor": "npm version minor -m 'chore: release v%s'",
|
|
16
11
|
"version:major": "npm version major -m 'chore: release v%s'"
|
|
17
12
|
},
|
|
@@ -42,8 +37,8 @@
|
|
|
42
37
|
"@umituz/react-native-design-system-typography": "latest",
|
|
43
38
|
"@umituz/react-native-localization": "latest",
|
|
44
39
|
"@umituz/react-native-storage": "latest",
|
|
40
|
+
"@expo/vector-icons": ">=14.0.0",
|
|
45
41
|
"expo-linear-gradient": "^15.0.7",
|
|
46
|
-
"lucide-react-native": "^0.468.0",
|
|
47
42
|
"react": ">=18.2.0",
|
|
48
43
|
"react-native": ">=0.74.0",
|
|
49
44
|
"react-native-safe-area-context": "~5.6.0",
|
|
@@ -73,8 +68,6 @@
|
|
|
73
68
|
"@umituz/react-native-notifications": "latest",
|
|
74
69
|
"@umituz/react-native-storage": "latest",
|
|
75
70
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
76
|
-
"jest": "^29.7.0",
|
|
77
|
-
"lucide-react-native": "^0.468.0",
|
|
78
71
|
"metro-react-native-babel-preset": "^0.77.0",
|
|
79
72
|
"react": "^18.2.0",
|
|
80
73
|
"react-native": "^0.74.0",
|
|
@@ -86,9 +79,8 @@
|
|
|
86
79
|
"access": "public"
|
|
87
80
|
},
|
|
88
81
|
"files": [
|
|
89
|
-
"lib",
|
|
90
82
|
"src",
|
|
91
83
|
"README.md",
|
|
92
84
|
"LICENSE"
|
|
93
85
|
]
|
|
94
|
-
}
|
|
86
|
+
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { View, Text, Pressable, StyleSheet, Switch } from "react-native";
|
|
9
|
-
import {
|
|
9
|
+
import { Feather } from "@expo/vector-icons";
|
|
10
10
|
import { useAppDesignTokens } from "@umituz/react-native-design-system-theme";
|
|
11
11
|
|
|
12
12
|
export interface SettingItemProps {
|
|
13
|
-
/** Icon component from
|
|
14
|
-
icon:
|
|
13
|
+
/** Icon component from @expo/vector-icons */
|
|
14
|
+
icon: React.ComponentType<{ size?: number; color?: string; name?: string }>;
|
|
15
15
|
/** Main title text */
|
|
16
16
|
title: string;
|
|
17
17
|
/** Optional description/value text */
|
|
@@ -130,7 +130,7 @@ export const SettingItem: React.FC<SettingItemProps> = ({
|
|
|
130
130
|
ios_backgroundColor={`${colors.textSecondary}30`}
|
|
131
131
|
/>
|
|
132
132
|
) : (
|
|
133
|
-
<
|
|
133
|
+
<Feather name="chevron-right" size={20} color={colors.textSecondary} />
|
|
134
134
|
)}
|
|
135
135
|
</View>
|
|
136
136
|
</Pressable>
|
package/lib/__tests__/setup.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/__tests__/setup.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
package/lib/__tests__/setup.js
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Jest Test Setup
|
|
3
|
-
* Mock all external dependencies
|
|
4
|
-
*/
|
|
5
|
-
// Mock React Native modules
|
|
6
|
-
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
|
|
7
|
-
// Mock design system packages
|
|
8
|
-
jest.mock('@umituz/react-native-design-system-theme', () => ({
|
|
9
|
-
useDesignSystemTheme: () => ({
|
|
10
|
-
themeMode: 'light',
|
|
11
|
-
}),
|
|
12
|
-
useAppDesignTokens: () => ({
|
|
13
|
-
colors: {
|
|
14
|
-
backgroundPrimary: '#ffffff',
|
|
15
|
-
primary: '#007AFF',
|
|
16
|
-
textPrimary: '#000000',
|
|
17
|
-
textSecondary: '#666666',
|
|
18
|
-
surface: '#f5f5f5',
|
|
19
|
-
borderLight: '#e0e0e0',
|
|
20
|
-
warning: '#FF9800',
|
|
21
|
-
},
|
|
22
|
-
spacing: {
|
|
23
|
-
md: 16,
|
|
24
|
-
},
|
|
25
|
-
typography: {
|
|
26
|
-
labelLarge: {
|
|
27
|
-
fontWeight: '500',
|
|
28
|
-
fontSize: 14,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
}),
|
|
32
|
-
withAlpha: jest.fn((color, alpha) => `${color}${alpha}`),
|
|
33
|
-
}));
|
|
34
|
-
jest.mock('@umituz/react-native-design-system-atoms', () => ({
|
|
35
|
-
AtomicText: ({ children, type, color, style, testID }) => {
|
|
36
|
-
const React = require('react');
|
|
37
|
-
const { Text } = require('react-native');
|
|
38
|
-
return React.createElement(Text, {
|
|
39
|
-
style,
|
|
40
|
-
testID: testID || `atomic-text-${type}-${color}`
|
|
41
|
-
}, children);
|
|
42
|
-
},
|
|
43
|
-
AtomicIcon: ({ name, color, size, style, testID }) => {
|
|
44
|
-
const React = require('react');
|
|
45
|
-
const { Text } = require('react-native');
|
|
46
|
-
return React.createElement(Text, {
|
|
47
|
-
style,
|
|
48
|
-
testID: testID || `atomic-icon-${name}-${color}-${size}`
|
|
49
|
-
}, `Icon: ${name}`);
|
|
50
|
-
},
|
|
51
|
-
}));
|
|
52
|
-
// Mock localization
|
|
53
|
-
jest.mock('@umituz/react-native-localization', () => ({
|
|
54
|
-
useLocalization: () => ({
|
|
55
|
-
t: (key) => key,
|
|
56
|
-
changeLanguage: jest.fn(),
|
|
57
|
-
currentLanguage: 'en-US',
|
|
58
|
-
}),
|
|
59
|
-
}));
|
|
60
|
-
// Mock storage
|
|
61
|
-
jest.mock('@umituz/react-native-storage', () => ({
|
|
62
|
-
storageRepository: {
|
|
63
|
-
getItem: jest.fn(),
|
|
64
|
-
setItem: jest.fn(),
|
|
65
|
-
removeItem: jest.fn(),
|
|
66
|
-
clear: jest.fn(),
|
|
67
|
-
},
|
|
68
|
-
StorageKey: {
|
|
69
|
-
SETTINGS: 'settings',
|
|
70
|
-
},
|
|
71
|
-
createUserKey: (key, userId) => `${key}_${userId}`,
|
|
72
|
-
unwrap: (result, defaultValue) => result.success ? result.data : defaultValue,
|
|
73
|
-
}));
|
|
74
|
-
// Mock lucide-react-native
|
|
75
|
-
jest.mock('lucide-react-native', () => ({
|
|
76
|
-
Cloud: 'Cloud',
|
|
77
|
-
Bell: 'Bell',
|
|
78
|
-
Palette: 'Palette',
|
|
79
|
-
ChevronRight: 'ChevronRight',
|
|
80
|
-
AlertTriangle: 'AlertTriangle',
|
|
81
|
-
Info: 'Info',
|
|
82
|
-
X: 'X',
|
|
83
|
-
ArrowRight: 'ArrowRight',
|
|
84
|
-
Settings: 'Settings',
|
|
85
|
-
}));
|
|
86
|
-
// Mock navigation
|
|
87
|
-
jest.mock('@react-navigation/native', () => ({
|
|
88
|
-
useNavigation: () => ({
|
|
89
|
-
navigate: jest.fn(),
|
|
90
|
-
goBack: jest.fn(),
|
|
91
|
-
getState: jest.fn(() => ({
|
|
92
|
-
routes: [{ name: 'Settings' }],
|
|
93
|
-
})),
|
|
94
|
-
setOptions: jest.fn(),
|
|
95
|
-
isFocused: jest.fn(() => true),
|
|
96
|
-
addListener: jest.fn(() => jest.fn()),
|
|
97
|
-
removeListener: jest.fn(),
|
|
98
|
-
}),
|
|
99
|
-
useFocusEffect: jest.fn(),
|
|
100
|
-
useIsFocused: jest.fn(() => true),
|
|
101
|
-
NavigationContainer: ({ children }) => children,
|
|
102
|
-
}));
|
|
103
|
-
// Mock safe area context
|
|
104
|
-
jest.mock('react-native-safe-area-context', () => ({
|
|
105
|
-
SafeAreaProvider: ({ children }) => children,
|
|
106
|
-
SafeAreaView: ({ children }) => children,
|
|
107
|
-
useSafeAreaInsets: () => ({
|
|
108
|
-
top: 0,
|
|
109
|
-
bottom: 0,
|
|
110
|
-
left: 0,
|
|
111
|
-
right: 0,
|
|
112
|
-
}),
|
|
113
|
-
}));
|
|
114
|
-
// Mock linear gradient
|
|
115
|
-
jest.mock('expo-linear-gradient', () => ({
|
|
116
|
-
LinearGradient: ({ children }) => children,
|
|
117
|
-
}));
|
|
118
|
-
// Mock notification service
|
|
119
|
-
jest.mock('@umituz/react-native-notifications', () => ({
|
|
120
|
-
notificationService: {
|
|
121
|
-
hasPermissions: jest.fn(() => Promise.resolve(true)),
|
|
122
|
-
requestPermissions: jest.fn(() => Promise.resolve()),
|
|
123
|
-
},
|
|
124
|
-
}));
|
|
125
|
-
// Mock appearance
|
|
126
|
-
jest.mock('@umituz/react-native-appearance', () => ({
|
|
127
|
-
useAppearance: () => ({
|
|
128
|
-
colorScheme: 'light',
|
|
129
|
-
setColorScheme: jest.fn(),
|
|
130
|
-
}),
|
|
131
|
-
}));
|
|
132
|
-
// Mock console methods in tests
|
|
133
|
-
global.console = {
|
|
134
|
-
...console,
|
|
135
|
-
warn: jest.fn(),
|
|
136
|
-
error: jest.fn(),
|
|
137
|
-
};
|
|
138
|
-
// Set up __DEV__ mock
|
|
139
|
-
Object.defineProperty(global, '__DEV__', {
|
|
140
|
-
value: true,
|
|
141
|
-
writable: true,
|
|
142
|
-
});
|
|
143
|
-
//# sourceMappingURL=setup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/__tests__/setup.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4BAA4B;AAC5B,IAAI,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;AAElE,8BAA8B;AAC9B,IAAI,CAAC,IAAI,CAAC,0CAA0C,EAAE,GAAG,EAAE,CAAC,CAAC;IAC3D,oBAAoB,EAAE,GAAG,EAAE,CAAC,CAAC;QAC3B,SAAS,EAAE,OAAO;KACnB,CAAC;IACF,kBAAkB,EAAE,GAAG,EAAE,CAAC,CAAC;QACzB,MAAM,EAAE;YACN,iBAAiB,EAAE,SAAS;YAC5B,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,SAAS;YACtB,aAAa,EAAE,SAAS;YACxB,OAAO,EAAE,SAAS;YAClB,WAAW,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AAG,EAAE,CAAC,CAAC;IACvC,cAAc,EAAE,CAAC,EAAE,QAAQ,EAAO,EAAE,EAAE,CAAC,QAAQ;CAChD,CAAC,CAAC,CAAC;AAEJ,4BAA4B;AAC5B,IAAI,CAAC,IAAI,CAAC,oCAAoC,EAAE,GAAG,EAAE,CAAC,CAAC;IACrD,mBAAmB,EAAE;QACnB,cAAc,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACpD,kBAAkB,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;KACrD;CACF,CAAC,CAAC,CAAC;AAEJ,kBAAkB;AAClB,IAAI,CAAC,IAAI,CAAC,iCAAiC,EAAE,GAAG,EAAE,CAAC,CAAC;IAClD,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;QACpB,WAAW,EAAE,OAAO;QACpB,cAAc,EAAE,IAAI,CAAC,EAAE,EAAE;KAC1B,CAAC;CACH,CAAC,CAAC,CAAC;AAEJ,gCAAgC;AAChC,MAAM,CAAC,OAAO,GAAG;IACf,GAAG,OAAO;IACV,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;IACf,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE;CACjB,CAAC;AAEF,sBAAsB;AACtB,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE;IACvC,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Settings Repository Interface
|
|
3
|
-
*
|
|
4
|
-
* Defines contracts for settings persistence and retrieval
|
|
5
|
-
* Pure business logic - no dependencies on external frameworks
|
|
6
|
-
*/
|
|
7
|
-
export interface UserSettings {
|
|
8
|
-
userId: string;
|
|
9
|
-
theme: 'light' | 'dark' | 'auto';
|
|
10
|
-
language: string;
|
|
11
|
-
notificationsEnabled: boolean;
|
|
12
|
-
emailNotifications: boolean;
|
|
13
|
-
pushNotifications: boolean;
|
|
14
|
-
soundEnabled: boolean;
|
|
15
|
-
vibrationEnabled: boolean;
|
|
16
|
-
privacyMode: boolean;
|
|
17
|
-
updatedAt: Date;
|
|
18
|
-
}
|
|
19
|
-
export interface SettingsError extends Error {
|
|
20
|
-
code: 'LOAD_FAILED' | 'SAVE_FAILED' | 'NOT_FOUND' | 'INVALID_DATA';
|
|
21
|
-
}
|
|
22
|
-
export type SettingsResult<T> = {
|
|
23
|
-
success: true;
|
|
24
|
-
data: T;
|
|
25
|
-
} | {
|
|
26
|
-
success: false;
|
|
27
|
-
error: SettingsError;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Settings Repository Interface
|
|
31
|
-
* Repository pattern for settings management
|
|
32
|
-
*/
|
|
33
|
-
export interface ISettingsRepository {
|
|
34
|
-
/**
|
|
35
|
-
* Load user settings from persistent storage
|
|
36
|
-
*/
|
|
37
|
-
loadSettings(userId: string): Promise<SettingsResult<UserSettings>>;
|
|
38
|
-
/**
|
|
39
|
-
* Save user settings to persistent storage
|
|
40
|
-
*/
|
|
41
|
-
saveSettings(settings: Partial<UserSettings>): Promise<SettingsResult<UserSettings>>;
|
|
42
|
-
/**
|
|
43
|
-
* Reset settings to default values
|
|
44
|
-
*/
|
|
45
|
-
resetSettings(userId: string): Promise<SettingsResult<UserSettings>>;
|
|
46
|
-
/**
|
|
47
|
-
* Get default settings for a user
|
|
48
|
-
*/
|
|
49
|
-
getDefaultSettings(userId: string): UserSettings;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=ISettingsRepository.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ISettingsRepository.d.ts","sourceRoot":"","sources":["../../../src/domain/repositories/ISettingsRepository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,IAAI,EAAE,aAAa,GAAG,aAAa,GAAG,WAAW,GAAG,cAAc,CAAC;CACpE;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC9B,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC;CACT,GAAG;IACF,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,aAAa,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC;IAEpE;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC;IAErF;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC;IAErE;;OAEG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAAC;CAClD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ISettingsRepository.js","sourceRoot":"","sources":["../../../src/domain/repositories/ISettingsRepository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
package/lib/index.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @umituz/react-native-settings - Public API
|
|
3
|
-
*
|
|
4
|
-
* Settings management for React Native apps
|
|
5
|
-
* User preferences, theme, language, notifications
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* import { useSettings, useSettingsStore, SettingsScreen, AppearanceScreen, LanguageSelectionScreen, SettingItem, DisclaimerSetting } from '@umituz/react-native-settings';
|
|
9
|
-
*/
|
|
10
|
-
export type { ISettingsRepository, UserSettings, SettingsError, SettingsResult, } from './domain/repositories/ISettingsRepository';
|
|
11
|
-
export { useSettingsStore, useSettings, } from './infrastructure/storage/SettingsStore';
|
|
12
|
-
export { SettingsScreen } from './presentation/screens/SettingsScreen';
|
|
13
|
-
export type { SettingsScreenProps } from './presentation/screens/SettingsScreen';
|
|
14
|
-
export { AppearanceScreen } from './presentation/screens/AppearanceScreen';
|
|
15
|
-
export type { SettingsConfig, CustomSettingsSection } from './presentation/screens/types';
|
|
16
|
-
export { SettingItem } from './presentation/components/SettingItem';
|
|
17
|
-
export type { SettingItemProps } from './presentation/components/SettingItem';
|
|
18
|
-
export { SettingsSection } from './presentation/components/SettingsSection';
|
|
19
|
-
export type { SettingsSectionProps } from './presentation/components/SettingsSection';
|
|
20
|
-
export { SettingsFooter } from './presentation/components/SettingsFooter';
|
|
21
|
-
export type { SettingsFooterProps } from './presentation/components/SettingsFooter';
|
|
22
|
-
export { UserProfileHeader } from './presentation/components/UserProfileHeader';
|
|
23
|
-
export type { UserProfileHeaderProps } from './presentation/components/UserProfileHeader';
|
|
24
|
-
export { DisclaimerSetting } from './presentation/components/DisclaimerSetting';
|
|
25
|
-
export type { DisclaimerSettingProps } from './presentation/components/DisclaimerSetting';
|
|
26
|
-
export { DisclaimerCard } from './presentation/components/DisclaimerCard';
|
|
27
|
-
export type { DisclaimerCardProps } from './presentation/components/DisclaimerCard';
|
|
28
|
-
export { DisclaimerModal } from './presentation/components/DisclaimerModal';
|
|
29
|
-
export type { DisclaimerModalProps } from './presentation/components/DisclaimerModal';
|
|
30
|
-
export { SettingsErrorBoundary } from './presentation/components/SettingsErrorBoundary';
|
|
31
|
-
export { CloudSyncSetting } from './presentation/components/CloudSyncSetting';
|
|
32
|
-
export type { CloudSyncSettingProps } from './presentation/components/CloudSyncSetting';
|
|
33
|
-
export { StorageClearSetting } from './presentation/components/StorageClearSetting';
|
|
34
|
-
export type { StorageClearSettingProps } from './presentation/components/StorageClearSetting';
|
|
35
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,cAAc,GACf,MAAM,2CAA2C,CAAC;AAMnD,OAAO,EACL,gBAAgB,EAChB,WAAW,GACZ,MAAM,wCAAwC,CAAC;AAMhD,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,YAAY,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAM3E,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAM1F,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,YAAY,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEtF,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,YAAY,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAEpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,YAAY,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAE1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,YAAY,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAE1F,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,YAAY,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAEpF,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,YAAY,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AAExF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,YAAY,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAExF,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,YAAY,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC"}
|
package/lib/index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @umituz/react-native-settings - Public API
|
|
3
|
-
*
|
|
4
|
-
* Settings management for React Native apps
|
|
5
|
-
* User preferences, theme, language, notifications
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* import { useSettings, useSettingsStore, SettingsScreen, AppearanceScreen, LanguageSelectionScreen, SettingItem, DisclaimerSetting } from '@umituz/react-native-settings';
|
|
9
|
-
*/
|
|
10
|
-
// =============================================================================
|
|
11
|
-
// INFRASTRUCTURE LAYER - Storage
|
|
12
|
-
// =============================================================================
|
|
13
|
-
export { useSettingsStore, useSettings, } from './infrastructure/storage/SettingsStore';
|
|
14
|
-
// =============================================================================
|
|
15
|
-
// PRESENTATION LAYER - Screens
|
|
16
|
-
// =============================================================================
|
|
17
|
-
export { SettingsScreen } from './presentation/screens/SettingsScreen';
|
|
18
|
-
export { AppearanceScreen } from './presentation/screens/AppearanceScreen';
|
|
19
|
-
// =============================================================================
|
|
20
|
-
// PRESENTATION LAYER - Components
|
|
21
|
-
// =============================================================================
|
|
22
|
-
export { SettingItem } from './presentation/components/SettingItem';
|
|
23
|
-
export { SettingsSection } from './presentation/components/SettingsSection';
|
|
24
|
-
export { SettingsFooter } from './presentation/components/SettingsFooter';
|
|
25
|
-
export { UserProfileHeader } from './presentation/components/UserProfileHeader';
|
|
26
|
-
export { DisclaimerSetting } from './presentation/components/DisclaimerSetting';
|
|
27
|
-
export { DisclaimerCard } from './presentation/components/DisclaimerCard';
|
|
28
|
-
export { DisclaimerModal } from './presentation/components/DisclaimerModal';
|
|
29
|
-
export { SettingsErrorBoundary } from './presentation/components/SettingsErrorBoundary';
|
|
30
|
-
export { CloudSyncSetting } from './presentation/components/CloudSyncSetting';
|
|
31
|
-
export { StorageClearSetting } from './presentation/components/StorageClearSetting';
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAaH,gFAAgF;AAChF,iCAAiC;AACjC,gFAAgF;AAEhF,OAAO,EACL,gBAAgB,EAChB,WAAW,GACZ,MAAM,wCAAwC,CAAC;AAEhD,gFAAgF;AAChF,+BAA+B;AAC/B,gFAAgF;AAEhF,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAQ3E,gFAAgF;AAChF,kCAAkC;AAClC,gFAAgF;AAEhF,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAGpE,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAG5E,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAG1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAGhF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAGhF,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAG1E,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAG5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AAExF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAG9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Settings Store - Zustand State Management
|
|
3
|
-
*
|
|
4
|
-
* Global settings state for app preferences
|
|
5
|
-
* Manages theme, language, notifications, and privacy settings
|
|
6
|
-
*
|
|
7
|
-
* DDD ARCHITECTURE: Uses @umituz/react-native-storage for all storage operations
|
|
8
|
-
* - Type-safe storage with StorageKey enum
|
|
9
|
-
* - Result pattern for error handling
|
|
10
|
-
* - Single source of truth for all storage
|
|
11
|
-
*/
|
|
12
|
-
import type { UserSettings } from '../../domain/repositories/ISettingsRepository';
|
|
13
|
-
interface SettingsStore {
|
|
14
|
-
settings: UserSettings | null;
|
|
15
|
-
loading: boolean;
|
|
16
|
-
error: string | null;
|
|
17
|
-
loadSettings: (userId: string) => Promise<void>;
|
|
18
|
-
updateSettings: (updates: Partial<UserSettings>) => Promise<void>;
|
|
19
|
-
resetSettings: (userId: string) => Promise<void>;
|
|
20
|
-
clearError: () => void;
|
|
21
|
-
}
|
|
22
|
-
export declare const useSettingsStore: import("zustand").UseBoundStore<import("zustand").StoreApi<SettingsStore>>;
|
|
23
|
-
/**
|
|
24
|
-
* Hook for accessing settings state
|
|
25
|
-
*/
|
|
26
|
-
export declare const useSettings: () => {
|
|
27
|
-
settings: UserSettings | null;
|
|
28
|
-
loading: boolean;
|
|
29
|
-
error: string | null;
|
|
30
|
-
loadSettings: (userId: string) => Promise<void>;
|
|
31
|
-
updateSettings: (updates: Partial<UserSettings>) => Promise<void>;
|
|
32
|
-
resetSettings: (userId: string) => Promise<void>;
|
|
33
|
-
clearError: () => void;
|
|
34
|
-
};
|
|
35
|
-
export {};
|
|
36
|
-
//# sourceMappingURL=SettingsStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsStore.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/SettingsStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAElF,UAAU,aAAa;IAErB,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AA4BD,eAAO,MAAM,gBAAgB,4EAiH1B,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,WAAW;;;;2BAtJC,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;8BACrB,OAAO,CAAC,YAAY,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;4BACzC,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;sBAC9B,IAAI;CAgKvB,CAAC"}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Settings Store - Zustand State Management
|
|
3
|
-
*
|
|
4
|
-
* Global settings state for app preferences
|
|
5
|
-
* Manages theme, language, notifications, and privacy settings
|
|
6
|
-
*
|
|
7
|
-
* DDD ARCHITECTURE: Uses @umituz/react-native-storage for all storage operations
|
|
8
|
-
* - Type-safe storage with StorageKey enum
|
|
9
|
-
* - Result pattern for error handling
|
|
10
|
-
* - Single source of truth for all storage
|
|
11
|
-
*/
|
|
12
|
-
import { create } from 'zustand';
|
|
13
|
-
import { storageRepository, StorageKey, createUserKey, unwrap } from '@umituz/react-native-storage';
|
|
14
|
-
const DEFAULT_OFFLINE_USER_ID = 'offline_user';
|
|
15
|
-
const DEFAULT_SETTINGS_CACHE = new Map();
|
|
16
|
-
const getDefaultSettings = (userId) => {
|
|
17
|
-
if (DEFAULT_SETTINGS_CACHE.has(userId)) {
|
|
18
|
-
return DEFAULT_SETTINGS_CACHE.get(userId);
|
|
19
|
-
}
|
|
20
|
-
const settings = {
|
|
21
|
-
userId,
|
|
22
|
-
theme: 'auto',
|
|
23
|
-
language: 'en-US',
|
|
24
|
-
notificationsEnabled: true,
|
|
25
|
-
emailNotifications: true,
|
|
26
|
-
pushNotifications: true,
|
|
27
|
-
soundEnabled: true,
|
|
28
|
-
vibrationEnabled: true,
|
|
29
|
-
privacyMode: false,
|
|
30
|
-
updatedAt: new Date(),
|
|
31
|
-
};
|
|
32
|
-
DEFAULT_SETTINGS_CACHE.set(userId, settings);
|
|
33
|
-
return settings;
|
|
34
|
-
};
|
|
35
|
-
export const useSettingsStore = create((set, get) => ({
|
|
36
|
-
settings: null,
|
|
37
|
-
loading: false,
|
|
38
|
-
error: null,
|
|
39
|
-
loadSettings: async (userId) => {
|
|
40
|
-
if (__DEV__) {
|
|
41
|
-
console.log('SettingsStore: Loading settings for user:', userId);
|
|
42
|
-
}
|
|
43
|
-
set({ loading: true, error: null });
|
|
44
|
-
try {
|
|
45
|
-
const defaultSettings = getDefaultSettings(userId);
|
|
46
|
-
const storageKey = createUserKey(StorageKey.SETTINGS, userId);
|
|
47
|
-
// ✅ DRY: Storage domain handles JSON parse, error handling
|
|
48
|
-
const result = await storageRepository.getItem(storageKey, defaultSettings);
|
|
49
|
-
const data = unwrap(result, defaultSettings);
|
|
50
|
-
// ✅ CLEAN CODE: Auto-save defaults if not exists
|
|
51
|
-
if (!result.success) {
|
|
52
|
-
await storageRepository.setItem(storageKey, defaultSettings);
|
|
53
|
-
}
|
|
54
|
-
set({
|
|
55
|
-
settings: data,
|
|
56
|
-
loading: false,
|
|
57
|
-
error: null,
|
|
58
|
-
});
|
|
59
|
-
if (__DEV__) {
|
|
60
|
-
console.log('SettingsStore: Settings loaded successfully');
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
catch (error) {
|
|
64
|
-
if (__DEV__) {
|
|
65
|
-
console.error('SettingsStore: Failed to load settings:', error);
|
|
66
|
-
}
|
|
67
|
-
set({ loading: false, error: 'Failed to load settings' });
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
updateSettings: async (updates) => {
|
|
71
|
-
if (__DEV__) {
|
|
72
|
-
console.log('SettingsStore: Updating settings with:', updates);
|
|
73
|
-
}
|
|
74
|
-
const { settings } = get();
|
|
75
|
-
// ✅ CLEAN CODE: Auto-initialize if settings not loaded
|
|
76
|
-
if (!settings) {
|
|
77
|
-
await get().loadSettings(DEFAULT_OFFLINE_USER_ID);
|
|
78
|
-
}
|
|
79
|
-
// ✅ DEFENSIVE: Verify settings loaded successfully
|
|
80
|
-
const currentSettings = get().settings;
|
|
81
|
-
if (!currentSettings) {
|
|
82
|
-
const errorMsg = 'Failed to initialize settings';
|
|
83
|
-
if (__DEV__) {
|
|
84
|
-
console.error('SettingsStore:', errorMsg);
|
|
85
|
-
}
|
|
86
|
-
set({ error: errorMsg });
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
set({ loading: true, error: null });
|
|
90
|
-
try {
|
|
91
|
-
const updatedSettings = {
|
|
92
|
-
...currentSettings,
|
|
93
|
-
...updates,
|
|
94
|
-
updatedAt: new Date(),
|
|
95
|
-
};
|
|
96
|
-
const storageKey = createUserKey(StorageKey.SETTINGS, currentSettings.userId);
|
|
97
|
-
// ✅ DRY: Storage domain replaces JSON.stringify + AsyncStorage + try/catch
|
|
98
|
-
const result = await storageRepository.setItem(storageKey, updatedSettings);
|
|
99
|
-
set({
|
|
100
|
-
settings: result.success ? updatedSettings : currentSettings,
|
|
101
|
-
loading: false,
|
|
102
|
-
error: null,
|
|
103
|
-
});
|
|
104
|
-
if (__DEV__) {
|
|
105
|
-
console.log('SettingsStore: Settings updated successfully');
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
catch (error) {
|
|
109
|
-
if (__DEV__) {
|
|
110
|
-
console.error('SettingsStore: Failed to update settings:', error);
|
|
111
|
-
}
|
|
112
|
-
set({ loading: false, error: 'Failed to update settings' });
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
resetSettings: async (userId) => {
|
|
116
|
-
set({ loading: true, error: null });
|
|
117
|
-
const defaultSettings = getDefaultSettings(userId);
|
|
118
|
-
const storageKey = createUserKey(StorageKey.SETTINGS, userId);
|
|
119
|
-
// ✅ DRY: Storage domain replaces JSON.stringify + AsyncStorage + try/catch
|
|
120
|
-
const result = await storageRepository.setItem(storageKey, defaultSettings);
|
|
121
|
-
set({
|
|
122
|
-
settings: result.success ? defaultSettings : get().settings,
|
|
123
|
-
loading: false,
|
|
124
|
-
error: null,
|
|
125
|
-
});
|
|
126
|
-
},
|
|
127
|
-
clearError: () => set({ error: null }),
|
|
128
|
-
}));
|
|
129
|
-
/**
|
|
130
|
-
* Hook for accessing settings state
|
|
131
|
-
*/
|
|
132
|
-
export const useSettings = () => {
|
|
133
|
-
const { settings, loading, error, loadSettings, updateSettings, resetSettings, clearError } = useSettingsStore();
|
|
134
|
-
return {
|
|
135
|
-
settings,
|
|
136
|
-
loading,
|
|
137
|
-
error,
|
|
138
|
-
loadSettings,
|
|
139
|
-
updateSettings,
|
|
140
|
-
resetSettings,
|
|
141
|
-
clearError,
|
|
142
|
-
};
|
|
143
|
-
};
|
|
144
|
-
//# sourceMappingURL=SettingsStore.js.map
|
|
@@ -1 +0,0 @@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ting Component
|
|
3
|
-
* Single Responsibility: Display cloud sync setting item
|
|
4
|
-
*/
|
|
5
|
-
import React from "react";
|
|
6
|
-
export interface CloudSyncSettingProps {
|
|
7
|
-
title?: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
isSyncing?: boolean;
|
|
10
|
-
lastSynced?: Date | null;
|
|
11
|
-
onPress?: () => void;
|
|
12
|
-
iconColor?: string;
|
|
13
|
-
titleColor?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const CloudSyncSetting: React.FC<CloudSyncSettingProps>;
|
|
16
|
-
//# sourceMappingURL=CloudSyncSetting.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CloudSyncSetting.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/CloudSyncSetting.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAsB,MAAM,OAAO,CAAC;AAK3C,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAqC5D,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cloud Sync Setting Component
|
|
3
|
-
* Single Responsibility: Display cloud sync setting item
|
|
4
|
-
*/
|
|
5
|
-
import React, { useCallback } from "react";
|
|
6
|
-
import { Cloud } from "lucide-react-native";
|
|
7
|
-
import { SettingItem } from "./SettingItem";
|
|
8
|
-
export const CloudSyncSetting = ({ title, description, isSyncing = false, lastSynced, onPress, iconColor, titleColor, }) => {
|
|
9
|
-
const formatLastSynced = useCallback((date) => {
|
|
10
|
-
if (!date)
|
|
11
|
-
return "never_synced";
|
|
12
|
-
const now = new Date();
|
|
13
|
-
const diff = now.getTime() - date.getTime();
|
|
14
|
-
const minutes = Math.floor(diff / 60000);
|
|
15
|
-
const hours = Math.floor(minutes / 60);
|
|
16
|
-
const days = Math.floor(hours / 24);
|
|
17
|
-
if (minutes < 1)
|
|
18
|
-
return "just_now";
|
|
19
|
-
if (minutes < 60)
|
|
20
|
-
return `${minutes}m_ago`;
|
|
21
|
-
if (hours < 24)
|
|
22
|
-
return `${hours}h_ago`;
|
|
23
|
-
if (days < 7)
|
|
24
|
-
return `${days}d_ago`;
|
|
25
|
-
return date.toLocaleDateString();
|
|
26
|
-
}, []);
|
|
27
|
-
const displayDescription = description || (isSyncing ? "syncing" : lastSynced ? `last_synced_${formatLastSynced(lastSynced)}` : "sync_to_cloud");
|
|
28
|
-
return (<SettingItem icon={Cloud} title={title || "cloud_sync"} value={displayDescription} onPress={onPress} iconColor={iconColor} titleColor={titleColor} disabled={isSyncing}/>);
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=CloudSyncSetting.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CloudSyncSetting.js","sourceRoot":"","sources":["../../../src/presentation/components/CloudSyncSetting.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAa5C,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,KAAK,EACL,WAAW,EACX,SAAS,GAAG,KAAK,EACjB,UAAU,EACV,OAAO,EACP,SAAS,EACT,UAAU,GACX,EAAE,EAAE;IACH,MAAM,gBAAgB,GAAG,WAAW,CAAC,CAAC,IAA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