@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
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Settings Section Component
|
|
3
|
-
* Single Responsibility: Render a settings section with title and container
|
|
4
|
-
*/
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { View, Text, StyleSheet } from "react-native";
|
|
7
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system-theme";
|
|
8
|
-
export const SettingsSection = ({ title, children, }) => {
|
|
9
|
-
const tokens = useAppDesignTokens();
|
|
10
|
-
const colors = tokens.colors;
|
|
11
|
-
return (<View style={[styles.container, { backgroundColor: colors.surface }]}>
|
|
12
|
-
<Text style={[styles.title, { color: colors.textPrimary }]}>
|
|
13
|
-
{title}
|
|
14
|
-
</Text>
|
|
15
|
-
<View style={styles.content}>
|
|
16
|
-
{children}
|
|
17
|
-
</View>
|
|
18
|
-
</View>);
|
|
19
|
-
};
|
|
20
|
-
const styles = StyleSheet.create({
|
|
21
|
-
container: {
|
|
22
|
-
marginBottom: 16,
|
|
23
|
-
borderRadius: 12,
|
|
24
|
-
overflow: "hidden",
|
|
25
|
-
},
|
|
26
|
-
title: {
|
|
27
|
-
fontSize: 18,
|
|
28
|
-
fontWeight: "600",
|
|
29
|
-
paddingHorizontal: 16,
|
|
30
|
-
paddingTop: 16,
|
|
31
|
-
paddingBottom: 8,
|
|
32
|
-
},
|
|
33
|
-
content: {
|
|
34
|
-
borderRadius: 0,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=SettingsSection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsSection.js","sourceRoot":"","sources":["../../../src/presentation/components/SettingsSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAS9E,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,KAAK,EACL,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,kBAAkB,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAE7B,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,eAAe,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CACnE;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CACzD;QAAA,CAAC,KAAK,CACR;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAC1B;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,EAAE;QAChB,QAAQ,EAAE,QAAQ;KACnB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,CAAC;KACjB;IACD,OAAO,EAAE;QACP,YAAY,EAAE,CAAC;KAChB;CACF,CAAC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Storage Clear Setting Component
|
|
3
|
-
* Single Responsibility: Display storage clear setting (DEV only)
|
|
4
|
-
* Only visible in __DEV__ mode
|
|
5
|
-
*/
|
|
6
|
-
import React from "react";
|
|
7
|
-
export interface StorageClearSettingProps {
|
|
8
|
-
title?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
onPress?: () => void;
|
|
11
|
-
iconColor?: string;
|
|
12
|
-
titleColor?: string;
|
|
13
|
-
isLast?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare const StorageClearSetting: React.FC<StorageClearSettingProps>;
|
|
16
|
-
//# sourceMappingURL=StorageClearSetting.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageClearSetting.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/StorageClearSetting.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA6BlE,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Storage Clear Setting Component
|
|
3
|
-
* Single Responsibility: Display storage clear setting (DEV only)
|
|
4
|
-
* Only visible in __DEV__ mode
|
|
5
|
-
*/
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { Trash2 } from "lucide-react-native";
|
|
8
|
-
import { SettingItem } from "./SettingItem";
|
|
9
|
-
export const StorageClearSetting = ({ title, description, onPress, iconColor, titleColor, isLast = false, }) => {
|
|
10
|
-
// Default values for DEV mode
|
|
11
|
-
const defaultTitle = title || "Clear All Storage";
|
|
12
|
-
const defaultDescription = description || "Clear all local storage data (DEV only)";
|
|
13
|
-
const defaultIconColor = iconColor || "#EF4444";
|
|
14
|
-
const defaultTitleColor = titleColor || "#EF4444";
|
|
15
|
-
// Only render in DEV mode
|
|
16
|
-
if (!__DEV__) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
return (<SettingItem icon={Trash2} title={defaultTitle} value={defaultDescription} onPress={onPress} iconColor={defaultIconColor} titleColor={defaultTitleColor} isLast={isLast}/>);
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=StorageClearSetting.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageClearSetting.js","sourceRoot":"","sources":["../../../src/presentation/components/StorageClearSetting.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAW5C,MAAM,CAAC,MAAM,mBAAmB,GAAuC,CAAC,EACtE,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,EACT,UAAU,EACV,MAAM,GAAG,KAAK,GACf,EAAE,EAAE;IACH,8BAA8B;IAC9B,MAAM,YAAY,GAAG,KAAK,IAAI,mBAAmB,CAAC;IAClD,MAAM,kBAAkB,GAAG,WAAW,IAAI,yCAAyC,CAAC;IACpF,MAAM,gBAAgB,GAAG,SAAS,IAAI,SAAS,CAAC;IAChD,MAAM,iBAAiB,GAAG,UAAU,IAAI,SAAS,CAAC;IAClD,0BAA0B;IAC1B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,WAAW,CACV,IAAI,CAAC,CAAC,MAAM,CAAC,CACb,KAAK,CAAC,CAAC,YAAY,CAAC,CACpB,KAAK,CAAC,CAAC,kBAAkB,CAAC,CAC1B,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAC5B,UAAU,CAAC,CAAC,iBAAiB,CAAC,CAC9B,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* User Profile Header Component
|
|
3
|
-
* Displays user avatar, name, and ID
|
|
4
|
-
* Works for both guest and authenticated users
|
|
5
|
-
*/
|
|
6
|
-
import React from "react";
|
|
7
|
-
export interface UserProfileHeaderProps {
|
|
8
|
-
/** User display name */
|
|
9
|
-
displayName?: string;
|
|
10
|
-
/** User ID */
|
|
11
|
-
userId?: string;
|
|
12
|
-
/** Whether user is guest */
|
|
13
|
-
isGuest?: boolean;
|
|
14
|
-
/** Avatar URL (optional) */
|
|
15
|
-
avatarUrl?: string;
|
|
16
|
-
/** Navigation route for account settings */
|
|
17
|
-
accountSettingsRoute?: string;
|
|
18
|
-
/** Custom onPress handler */
|
|
19
|
-
onPress?: () => void;
|
|
20
|
-
/** Custom guest user display name */
|
|
21
|
-
guestDisplayName?: string;
|
|
22
|
-
/** Custom avatar service URL */
|
|
23
|
-
avatarServiceUrl?: string;
|
|
24
|
-
/** Default user display name when no displayName provided */
|
|
25
|
-
defaultUserDisplayName?: string;
|
|
26
|
-
/** Default guest display name */
|
|
27
|
-
defaultGuestDisplayName?: string;
|
|
28
|
-
}
|
|
29
|
-
export declare const UserProfileHeader: React.FC<UserProfileHeaderProps>;
|
|
30
|
-
//# sourceMappingURL=UserProfileHeader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserProfileHeader.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/UserProfileHeader.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAgC,MAAM,OAAO,CAAC;AAOrD,MAAM,WAAW,sBAAsB;IACrC,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gCAAgC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6DAA6D;IAC7D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iCAAiC;IACjC,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAoG9D,CAAC"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* User Profile Header Component
|
|
3
|
-
* Displays user avatar, name, and ID
|
|
4
|
-
* Works for both guest and authenticated users
|
|
5
|
-
*/
|
|
6
|
-
import React, { useState, useCallback } from "react";
|
|
7
|
-
import { View, TouchableOpacity, StyleSheet, Image } from "react-native";
|
|
8
|
-
import { ChevronRight } from "lucide-react-native";
|
|
9
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system-theme";
|
|
10
|
-
import { AtomicText } from "@umituz/react-native-design-system-atoms";
|
|
11
|
-
import { useNavigation } from "@react-navigation/native";
|
|
12
|
-
export const UserProfileHeader = ({ displayName, userId, isGuest = false, avatarUrl, accountSettingsRoute, onPress, guestDisplayName, avatarServiceUrl, defaultUserDisplayName, defaultGuestDisplayName, }) => {
|
|
13
|
-
const tokens = useAppDesignTokens();
|
|
14
|
-
const navigation = useNavigation();
|
|
15
|
-
const colors = tokens.colors;
|
|
16
|
-
const spacing = tokens.spacing;
|
|
17
|
-
const [imageError, setImageError] = useState(false);
|
|
18
|
-
const finalDisplayName = displayName || (isGuest ? guestDisplayName || defaultGuestDisplayName || "Guest" : defaultUserDisplayName || "User");
|
|
19
|
-
const avatarName = isGuest ? guestDisplayName || defaultGuestDisplayName || defaultGuestDisplayName || "Guest" : finalDisplayName;
|
|
20
|
-
const defaultAvatarService = avatarServiceUrl || "https://ui-avatars.com/api";
|
|
21
|
-
const finalAvatarUrl = (imageError ? null : avatarUrl) ||
|
|
22
|
-
`${defaultAvatarService}/?name=${encodeURIComponent(avatarName)}&background=${colors.primary.replace("#", "")}&color=fff&size=64`;
|
|
23
|
-
const handlePress = useCallback(() => {
|
|
24
|
-
if (onPress) {
|
|
25
|
-
onPress();
|
|
26
|
-
}
|
|
27
|
-
else if (accountSettingsRoute) {
|
|
28
|
-
navigation.navigate(accountSettingsRoute);
|
|
29
|
-
}
|
|
30
|
-
}, [onPress, accountSettingsRoute, navigation]);
|
|
31
|
-
const shouldShowChevron = !!(onPress || accountSettingsRoute);
|
|
32
|
-
const isPressable = !!(onPress || accountSettingsRoute);
|
|
33
|
-
const containerStyle = [
|
|
34
|
-
styles.container,
|
|
35
|
-
{
|
|
36
|
-
backgroundColor: colors.surface,
|
|
37
|
-
paddingHorizontal: spacing.md,
|
|
38
|
-
paddingVertical: spacing.md,
|
|
39
|
-
marginHorizontal: spacing.md,
|
|
40
|
-
},
|
|
41
|
-
];
|
|
42
|
-
const content = (<>
|
|
43
|
-
<View style={styles.content}>
|
|
44
|
-
<View style={[styles.avatarContainer, { borderColor: `${colors.primary}30` }]}>
|
|
45
|
-
{finalAvatarUrl ? (<Image source={{ uri: finalAvatarUrl }} style={styles.avatar} onError={() => setImageError(true)}/>) : (<View style={[styles.avatarFallback, { backgroundColor: `${colors.primary}20` }]}>
|
|
46
|
-
<AtomicText type="headlineMedium" color="primary" style={styles.avatarText}>
|
|
47
|
-
{avatarName.charAt(0).toUpperCase()}
|
|
48
|
-
</AtomicText>
|
|
49
|
-
</View>)}
|
|
50
|
-
</View>
|
|
51
|
-
<View style={[styles.textContainer, { marginLeft: spacing.md }]}>
|
|
52
|
-
<AtomicText type="headlineSmall" style={[styles.name, { color: colors.textPrimary }]} numberOfLines={1}>
|
|
53
|
-
{finalDisplayName}
|
|
54
|
-
</AtomicText>
|
|
55
|
-
</View>
|
|
56
|
-
</View>
|
|
57
|
-
{shouldShowChevron && (<View style={[styles.chevronContainer, { marginLeft: spacing.sm }]}>
|
|
58
|
-
<ChevronRight size={22} color={colors.textSecondary} strokeWidth={2.5}/>
|
|
59
|
-
</View>)}
|
|
60
|
-
</>);
|
|
61
|
-
if (isPressable) {
|
|
62
|
-
return (<TouchableOpacity style={containerStyle} onPress={handlePress} activeOpacity={0.7}>
|
|
63
|
-
{content}
|
|
64
|
-
</TouchableOpacity>);
|
|
65
|
-
}
|
|
66
|
-
return <View style={containerStyle}>{content}</View>;
|
|
67
|
-
};
|
|
68
|
-
const styles = StyleSheet.create({
|
|
69
|
-
container: {
|
|
70
|
-
flexDirection: "row",
|
|
71
|
-
alignItems: "center",
|
|
72
|
-
justifyContent: "space-between",
|
|
73
|
-
marginTop: 0,
|
|
74
|
-
marginBottom: 0,
|
|
75
|
-
borderRadius: 20,
|
|
76
|
-
minHeight: 80,
|
|
77
|
-
},
|
|
78
|
-
content: {
|
|
79
|
-
flexDirection: "row",
|
|
80
|
-
alignItems: "center",
|
|
81
|
-
flex: 1,
|
|
82
|
-
},
|
|
83
|
-
avatarContainer: {
|
|
84
|
-
width: 64,
|
|
85
|
-
height: 64,
|
|
86
|
-
borderRadius: 32,
|
|
87
|
-
borderWidth: 2,
|
|
88
|
-
overflow: "hidden",
|
|
89
|
-
backgroundColor: "transparent",
|
|
90
|
-
},
|
|
91
|
-
avatar: {
|
|
92
|
-
width: "100%",
|
|
93
|
-
height: "100%",
|
|
94
|
-
},
|
|
95
|
-
avatarFallback: {
|
|
96
|
-
width: "100%",
|
|
97
|
-
height: "100%",
|
|
98
|
-
justifyContent: "center",
|
|
99
|
-
alignItems: "center",
|
|
100
|
-
},
|
|
101
|
-
avatarText: {
|
|
102
|
-
fontWeight: "700",
|
|
103
|
-
},
|
|
104
|
-
textContainer: {
|
|
105
|
-
flex: 1,
|
|
106
|
-
},
|
|
107
|
-
name: {
|
|
108
|
-
fontWeight: "700",
|
|
109
|
-
},
|
|
110
|
-
id: {
|
|
111
|
-
fontWeight: "500",
|
|
112
|
-
opacity: 0.7,
|
|
113
|
-
},
|
|
114
|
-
chevronContainer: {
|
|
115
|
-
justifyContent: "center",
|
|
116
|
-
alignItems: "center",
|
|
117
|
-
},
|
|
118
|
-
});
|
|
119
|
-
//# sourceMappingURL=UserProfileHeader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserProfileH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,UAAU,EAAE;QACV,UAAU,EAAE,KAAK;KAClB;IACD,aAAa,EAAE;QACb,IAAI,EAAE,CAAC;KACR;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,KAAK;KAClB;IACD,EAAE,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,GAAG;KACb;IACD,gBAAgB,EAAE;QAChB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Appearance Settings Screen
|
|
3
|
-
* Advanced appearance settings with theme customization and custom colors
|
|
4
|
-
* Uses @umituz/react-native-appearance package
|
|
5
|
-
*/
|
|
6
|
-
import { AppearanceScreen } from "@umituz/react-native-appearance";
|
|
7
|
-
export { AppearanceScreen };
|
|
8
|
-
//# sourceMappingURL=AppearanceScreen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AppearanceScreen.d.ts","sourceRoot":"","sources":["../../../src/presentation/screens/AppearanceScreen.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Appearance Settings Screen
|
|
3
|
-
* Advanced appearance settings with theme customization and custom colors
|
|
4
|
-
* Uses @umituz/react-native-appearance package
|
|
5
|
-
*/
|
|
6
|
-
import { AppearanceScreen } from "@umituz/react-native-appearance";
|
|
7
|
-
export { AppearanceScreen };
|
|
8
|
-
//# sourceMappingURL=AppearanceScreen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AppearanceScreen.js","sourceRoot":"","sources":["../../../src/presentation/screens/AppearanceScreen.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Settings Screen
|
|
3
|
-
* Presentation layer - Composition only, no business logic
|
|
4
|
-
*/
|
|
5
|
-
import React from "react";
|
|
6
|
-
import type { SettingsConfig, CustomSettingsSection } from "./types";
|
|
7
|
-
export interface SettingsScreenProps {
|
|
8
|
-
config?: SettingsConfig;
|
|
9
|
-
/** Show user profile header */
|
|
10
|
-
showUserProfile?: boolean;
|
|
11
|
-
/** User profile props */
|
|
12
|
-
userProfile?: {
|
|
13
|
-
displayName?: string;
|
|
14
|
-
userId?: string;
|
|
15
|
-
isGuest?: boolean;
|
|
16
|
-
avatarUrl?: string;
|
|
17
|
-
accountSettingsRoute?: string;
|
|
18
|
-
onPress?: () => void;
|
|
19
|
-
guestDisplayName?: string;
|
|
20
|
-
avatarServiceUrl?: string;
|
|
21
|
-
};
|
|
22
|
-
/** Show footer with version */
|
|
23
|
-
showFooter?: boolean;
|
|
24
|
-
/** Custom footer text */
|
|
25
|
-
footerText?: string;
|
|
26
|
-
/** Custom sections to render */
|
|
27
|
-
customSections?: CustomSettingsSection[];
|
|
28
|
-
/** Show close button in header */
|
|
29
|
-
showCloseButton?: boolean;
|
|
30
|
-
/** Custom close handler */
|
|
31
|
-
onClose?: () => void;
|
|
32
|
-
/** Feature detection options */
|
|
33
|
-
featureOptions?: {
|
|
34
|
-
notificationServiceAvailable?: boolean;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export declare const SettingsScreen: React.FC<SettingsScreenProps>;
|
|
38
|
-
//# sourceMappingURL=SettingsScreen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsScreen.d.ts","sourceRoot":"","sources":["../../../src/presentation/screens/SettingsScreen.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErE,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,+BAA+B;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yBAAyB;IACzB,WAAW,CAAC,EAAE;QACZ,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF,+BAA+B;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,cAAc,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACzC,kCAAkC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gCAAgC;IAChC,cAAc,CAAC,EAAE;QACf,4BAA4B,CAAC,EAAE,OAAO,CAAC;KACxC,CAAC;CACH;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAyCxD,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Settings Screen
|
|
3
|
-
* Presentation layer - Composition only, no business logic
|
|
4
|
-
*/
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { View, StatusBar, StyleSheet } from "react-native";
|
|
7
|
-
import { useNavigation } from "@react-navigation/native";
|
|
8
|
-
import { useDesignSystemTheme, useAppDesignTokens, } from "@umituz/react-native-design-system-theme";
|
|
9
|
-
import { SettingsHeader } from "./components/SettingsHeader";
|
|
10
|
-
import { SettingsContent } from "./components/SettingsContent";
|
|
11
|
-
import { SettingsErrorBoundary } from "../components/SettingsErrorBoundary";
|
|
12
|
-
import { normalizeSettingsConfig } from "./utils/normalizeConfig";
|
|
13
|
-
import { useFeatureDetection } from "./hooks/useFeatureDetection";
|
|
14
|
-
export const SettingsScreen = ({ config = {}, showUserProfile = false, userProfile, showFooter = true, footerText, customSections = [], showCloseButton = false, onClose, featureOptions, }) => {
|
|
15
|
-
const navigation = useNavigation();
|
|
16
|
-
const { themeMode } = useDesignSystemTheme();
|
|
17
|
-
const tokens = useAppDesignTokens();
|
|
18
|
-
const isDark = themeMode === "dark";
|
|
19
|
-
const colors = tokens.colors;
|
|
20
|
-
const normalizedConfig = normalizeSettingsConfig(config);
|
|
21
|
-
const features = useFeatureDetection(normalizedConfig, navigation, featureOptions);
|
|
22
|
-
return (<View style={[styles.container, { backgroundColor: colors.backgroundPrimary }]}>
|
|
23
|
-
<StatusBar barStyle={isDark ? "light-content" : "dark-content"}/>
|
|
24
|
-
|
|
25
|
-
<SettingsHeader showCloseButton={showCloseButton} onClose={onClose}/>
|
|
26
|
-
|
|
27
|
-
<SettingsErrorBoundary>
|
|
28
|
-
<SettingsContent normalizedConfig={normalizedConfig} features={features} showUserProfile={showUserProfile} userProfile={userProfile} showFooter={showFooter} footerText={footerText} customSections={customSections} showCloseButton={showCloseButton}/>
|
|
29
|
-
</SettingsErrorBoundary>
|
|
30
|
-
</View>);
|
|
31
|
-
};
|
|
32
|
-
const styles = StyleSheet.create({
|
|
33
|
-
container: {
|
|
34
|
-
flex: 1,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=SettingsScreen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsScreen.js","sourceRoot":"","sources":["../../../src/presentation/screens/SettingsScreen.tsx"],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MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAC7E;MAAA,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,EAE/D;;MAAA,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,EAEnE;;MAAA,CAAC,qBAAqB,CACpB;QAAA,CAAC,eAAe,CACd,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,CACnC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,eAAe,CAAC,CAAC,eAAe,CAAC,EAErC;MAAA,EAAE,qBAAqB,CACzB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* About & Legal Section Component
|
|
3
|
-
* Single Responsibility: Render about and legal settings section
|
|
4
|
-
*/
|
|
5
|
-
import React from "react";
|
|
6
|
-
import type { AboutConfig, LegalConfig } from "../types";
|
|
7
|
-
interface AboutLegalSectionProps {
|
|
8
|
-
showAbout: boolean;
|
|
9
|
-
showLegal: boolean;
|
|
10
|
-
aboutConfig?: AboutConfig;
|
|
11
|
-
legalConfig?: LegalConfig;
|
|
12
|
-
}
|
|
13
|
-
export declare const AboutLegalSection: React.FC<AboutLegalSectionProps>;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=AboutLegalSection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AboutLegalSection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/components/AboutLegalSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEzD,UAAU,sBAAsB;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAUD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA4C9D,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* About & Legal Section Component
|
|
3
|
-
* Single Responsibility: Render about and legal settings section
|
|
4
|
-
*/
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { Info, FileText } from "lucide-react-native";
|
|
7
|
-
import { useNavigation } from "@react-navigation/native";
|
|
8
|
-
import { useLocalization } from "@umituz/react-native-localization";
|
|
9
|
-
import { SettingItem } from "../../components/SettingItem";
|
|
10
|
-
import { SettingsSection } from "../../components/SettingsSection";
|
|
11
|
-
export const AboutLegalSection = ({ showAbout, showLegal, aboutConfig, legalConfig, }) => {
|
|
12
|
-
const navigation = useNavigation();
|
|
13
|
-
const { t } = useLocalization();
|
|
14
|
-
if (!showAbout && !showLegal) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
const aboutRoute = aboutConfig?.route || aboutConfig?.defaultRoute || "About";
|
|
18
|
-
const aboutTitle = aboutConfig?.title || t("settings.about.title");
|
|
19
|
-
const aboutDescription = aboutConfig?.description || t("settings.about.description");
|
|
20
|
-
const legalRoute = legalConfig?.route || legalConfig?.defaultRoute || "Legal";
|
|
21
|
-
const legalTitle = legalConfig?.title || t("settings.legal.title");
|
|
22
|
-
const legalDescription = legalConfig?.description || t("settings.legal.description");
|
|
23
|
-
return (<SettingsSection title={t("settings.sections.about")}>
|
|
24
|
-
{showAbout && (<SettingItem icon={Info} title={aboutTitle} value={aboutDescription} onPress={() => navigation.navigate(aboutRoute)}/>)}
|
|
25
|
-
{showLegal && (<SettingItem icon={FileText} title={legalTitle} value={legalDescription} onPress={() => navigation.navigate(legalRoute)} isLast={true}/>)}
|
|
26
|
-
</SettingsSection>);
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=AboutLegalSection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AboutLegalSection.js","sourceRoot":"","sources":["../../../../src/presentation/screens/components/AboutLegalSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAkBnE,MAAM,CAAC,MAAM,iBAAiB,GAAqC,CAAC,EAClE,SAAS,EACT,SAAS,EACT,WAAW,EACX,WAAW,GACZ,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,aAAa,EAAkB,CAAC;IACnD,MAAM,EAAE,CAAC,EAAE,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,UAAU,GAAG,WAAW,EAAE,KAAK,IAAI,WAAW,EAAE,YAAY,IAAI,OAAO,CAAC;IAC9E,MAAM,UAAU,GAAG,WAAW,EAAE,KAAK,IAAI,CAAC,CAAC,sBAAsB,CAAC,CAAC;IACnE,MAAM,gBAAgB,GACpB,WAAW,EAAE,WAAW,IAAI,CAAC,CAAC,4BAA4B,CAAC,CAAC;IAE9D,MAAM,UAAU,GAAG,WAAW,EAAE,KAAK,IAAI,WAAW,EAAE,YAAY,IAAI,OAAO,CAAC;IAC9E,MAAM,UAAU,GAAG,WAAW,EAAE,KAAK,IAAI,CAAC,CAAC,sBAAsB,CAAC,CAAC;IACnE,MAAM,gBAAgB,GACpB,WAAW,EAAE,WAAW,IAAI,CAAC,CAAC,4BAA4B,CAAC,CAAC;IAE9D,OAAO,CACL,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CACnD;MAAA,CAAC,SAAS,IAAI,CACZ,CAAC,WAAW,CACV,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,UAAU,CAAC,CAClB,KAAK,CAAC,CAAC,gBAAgB,CAAC,CACxB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAoB,CAAC,CAAC,EACzD,CACH,CACD;MAAA,CAAC,SAAS,IAAI,CACZ,CAAC,WAAW,CACV,IAAI,CAAC,CAAC,QAAQ,CAAC,CACf,KAAK,CAAC,CAAC,UAAU,CAAC,CAClB,KAAK,CAAC,CAAC,gBAAgB,CAAC,CACxB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAoB,CAAC,CAAC,CACzD,MAAM,CAAC,CAAC,IAAI,CAAC,EACb,CACH,CACH;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Appearance Section Component
|
|
3
|
-
* Single Responsibility: Render appearance settings section (theme customization)
|
|
4
|
-
*/
|
|
5
|
-
import React from "react";
|
|
6
|
-
import type { AppearanceConfig } from "../types";
|
|
7
|
-
interface AppearanceSectionProps {
|
|
8
|
-
config?: AppearanceConfig;
|
|
9
|
-
}
|
|
10
|
-
export declare const AppearanceSection: React.FC<AppearanceSectionProps>;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=AppearanceSection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AppearanceSection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/components/AppearanceSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,UAAU,sBAAsB;IAC9B,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAoB9D,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Appearance Section Component
|
|
3
|
-
* Single Responsibility: Render appearance settings section (theme customization)
|
|
4
|
-
*/
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { Palette } from "lucide-react-native";
|
|
7
|
-
import { useNavigation } from "@react-navigation/native";
|
|
8
|
-
import { useLocalization } from "@umituz/react-native-localization";
|
|
9
|
-
import { SettingItem } from "../../components/SettingItem";
|
|
10
|
-
import { SettingsSection } from "../../components/SettingsSection";
|
|
11
|
-
export const AppearanceSection = ({ config, }) => {
|
|
12
|
-
const navigation = useNavigation();
|
|
13
|
-
const { t } = useLocalization();
|
|
14
|
-
const route = config?.route || config?.defaultRoute || "Appearance";
|
|
15
|
-
const title = config?.title || t("settings.appearance.title");
|
|
16
|
-
const description = config?.description || t("settings.appearance.description");
|
|
17
|
-
return (<SettingsSection title={t("settings.sections.app.title")}>
|
|
18
|
-
<SettingItem icon={Palette} title={title} value={description} onPress={() => navigation.navigate(route)}/>
|
|
19
|
-
</SettingsSection>);
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=AppearanceSection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AppearanceSection.js","sourceRoot":"","sources":["../../../../src/presentation/screens/components/AppearanceSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAOnE,MAAM,CAAC,MAAM,iBAAiB,GAAqC,CAAC,EAClE,MAAM,GACP,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,EAAE,CAAC,EAAE,GAAG,eAAe,EAAE,CAAC;IAEhC,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,MAAM,EAAE,YAAY,IAAI,YAAY,CAAC;IACpE,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC,CAAC,2BAA2B,CAAC,CAAC;IAC9D,MAAM,WAAW,GAAG,MAAM,EAAE,WAAW,IAAI,CAAC,CAAC,iCAAiC,CAAC,CAAC;IAEhF,OAAO,CACL,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CACvD;MAAA,CAAC,WAAW,CACV,IAAI,CAAC,CAAC,OAAO,CAAC,CACd,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,WAAW,CAAC,CACnB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAc,CAAC,CAAC,EAEvD;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Language Section Component
|
|
3
|
-
* Single Responsibility: Render language settings section
|
|
4
|
-
*/
|
|
5
|
-
import React from "react";
|
|
6
|
-
import type { LanguageConfig } from "../types";
|
|
7
|
-
interface LanguageSectionProps {
|
|
8
|
-
config?: LanguageConfig;
|
|
9
|
-
}
|
|
10
|
-
export declare const LanguageSection: React.FC<LanguageSectionProps>;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=LanguageSection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/components/LanguageSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,UAAU,oBAAoB;IAC5B,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA0B1D,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Language Section Component
|
|
3
|
-
* Single Responsibility: Render language settings section
|
|
4
|
-
*/
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { Languages } from "lucide-react-native";
|
|
7
|
-
import { useNavigation } from "@react-navigation/native";
|
|
8
|
-
import { useLocalization, getLanguageByCode } from "@umituz/react-native-localization";
|
|
9
|
-
import { SettingItem } from "../../components/SettingItem";
|
|
10
|
-
import { SettingsSection } from "../../components/SettingsSection";
|
|
11
|
-
export const LanguageSection = ({ config, }) => {
|
|
12
|
-
const navigation = useNavigation();
|
|
13
|
-
const { t, currentLanguage } = useLocalization();
|
|
14
|
-
const route = config?.route || "LanguageSelection";
|
|
15
|
-
const title = config?.title || t("settings.language");
|
|
16
|
-
const description = config?.description || "";
|
|
17
|
-
const currentLang = getLanguageByCode(currentLanguage);
|
|
18
|
-
const defaultLanguageDisplay = config?.defaultLanguageDisplay || "English";
|
|
19
|
-
const languageDisplay = currentLang
|
|
20
|
-
? `${currentLang.flag} ${currentLang.nativeName}`
|
|
21
|
-
: defaultLanguageDisplay;
|
|
22
|
-
return (<SettingsSection title={t("settings.sections.app.title")}>
|
|
23
|
-
<SettingItem icon={Languages} title={title} value={languageDisplay} onPress={() => navigation.navigate(route)}/>
|
|
24
|
-
</SettingsSection>);
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=LanguageSection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSection.js","sourceRoot":"","sources":["../../../../src/presentation/screens/components/LanguageSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAOnE,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,MAAM,GACP,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,EAAE,CAAC,EAAE,eAAe,EAAE,GAAG,eAAe,EAAE,CAAC;IAEjD,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,mBAAmB,CAAC;IACnD,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC,CAAC,mBAAmB,CAAC,CAAC;IACtD,MAAM,WAAW,GAAG,MAAM,EAAE,WAAW,IAAI,EAAE,CAAC;IAE9C,MAAM,WAAW,GAAG,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACvD,MAAM,sBAAsB,GAAG,MAAM,EAAE,sBAAsB,IAAI,SAAS,CAAC;IAC3E,MAAM,eAAe,GAAG,WAAW;QACjC,CAAC,CAAC,GAAG,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,UAAU,EAAE;QACjD,CAAC,CAAC,sBAAsB,CAAC;IAE3B,OAAO,CACL,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CACvD;MAAA,CAAC,WAAW,CACV,IAAI,CAAC,CAAC,SAAS,CAAC,CAChB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,eAAe,CAAC,CACvB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAc,CAAC,CAAC,EAEvD;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Notifications Section Component
|
|
3
|
-
* Single Responsibility: Render notifications settings section
|
|
4
|
-
*/
|
|
5
|
-
import React from "react";
|
|
6
|
-
import type { NotificationsConfig } from "../types";
|
|
7
|
-
interface NotificationsSectionProps {
|
|
8
|
-
config?: NotificationsConfig;
|
|
9
|
-
}
|
|
10
|
-
export declare const NotificationsSection: React.FC<NotificationsSectionProps>;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=NotificationsSection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsSection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/components/NotificationsSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAA2C,MAAM,OAAO,CAAC;AAMhE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAiBpD,UAAU,yBAAyB;IACjC,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA+DpE,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Notifications Section Component
|
|
3
|
-
* Single Responsibility: Render notifications settings section
|
|
4
|
-
*/
|
|
5
|
-
import React, { useState, useEffect, useCallback } from "react";
|
|
6
|
-
import { Bell } from "lucide-react-native";
|
|
7
|
-
import { useNavigation } from "@react-navigation/native";
|
|
8
|
-
import { useLocalization } from "@umituz/react-native-localization";
|
|
9
|
-
import { SettingItem } from "../../components/SettingItem";
|
|
10
|
-
import { SettingsSection } from "../../components/SettingsSection";
|
|
11
|
-
// Optional notification service
|
|
12
|
-
let notificationService = null;
|
|
13
|
-
try {
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
15
|
-
const module = require("@umituz/react-native-notifications");
|
|
16
|
-
if (module?.notificationService && typeof module.notificationService === 'object') {
|
|
17
|
-
notificationService = module.notificationService;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
catch {
|
|
21
|
-
// Package not available
|
|
22
|
-
}
|
|
23
|
-
export const NotificationsSection = ({ config, }) => {
|
|
24
|
-
const navigation = useNavigation();
|
|
25
|
-
const { t } = useLocalization();
|
|
26
|
-
const [notificationsEnabled, setNotificationsEnabled] = useState(config?.initialValue ?? true);
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
if (config?.initialValue !== undefined) {
|
|
29
|
-
setNotificationsEnabled(config.initialValue);
|
|
30
|
-
}
|
|
31
|
-
}, [config?.initialValue]);
|
|
32
|
-
const handleToggle = useCallback(async (value) => {
|
|
33
|
-
if (notificationService && !value) {
|
|
34
|
-
const hasPermissions = await notificationService.hasPermissions?.();
|
|
35
|
-
if (!hasPermissions) {
|
|
36
|
-
await notificationService.requestPermissions?.();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
setNotificationsEnabled(value);
|
|
40
|
-
config?.onToggleChange?.(value);
|
|
41
|
-
}, [config?.onToggleChange]);
|
|
42
|
-
const handlePress = useCallback(async () => {
|
|
43
|
-
if (notificationService) {
|
|
44
|
-
const hasPermissions = await notificationService.hasPermissions?.();
|
|
45
|
-
if (!hasPermissions) {
|
|
46
|
-
await notificationService.requestPermissions?.();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
navigation.navigate(config?.route || config?.defaultRoute || "Notifications");
|
|
50
|
-
}, [navigation, config?.route, config?.defaultRoute]);
|
|
51
|
-
const title = config?.title || t("settings.notifications.title");
|
|
52
|
-
const description = config?.description || t("settings.notifications.description");
|
|
53
|
-
const showToggle = config?.showToggle ?? true;
|
|
54
|
-
return (<SettingsSection title={t("settings.sections.general")}>
|
|
55
|
-
{showToggle ? (<SettingItem icon={Bell} title={title} showSwitch={true} switchValue={notificationsEnabled} onSwitchChange={handleToggle} isLast={true}/>) : (<SettingItem icon={Bell} title={title} value={description} onPress={handlePress} isLast={true}/>)}
|
|
56
|
-
</SettingsSection>);
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=NotificationsSection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsSection.js","sourceRoot":"","sources":["../../../../src/presentation/screens/components/NotificationsSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAGnE,gCAAgC;AAChC,IA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