@umituz/react-native-settings 5.3.72 → 5.3.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account.d.ts +4 -4
- package/dist/domains/localization/presentation/screens/LanguageSelectionScreen.d.ts +4 -1
- package/dist/domains/rating/presentation/hooks/useAppRating.d.ts +1 -0
- package/dist/infrastructure/utils/configFactory.d.ts +1 -1
- package/dist/presentation/components/SettingsItemCard.d.ts +1 -1
- package/dist/presentation/components/settings/SettingsItemCardContent.d.ts +1 -1
- package/dist/presentation/hooks/useSettingsScreenConfig.d.ts +16 -0
- package/dist/presentation/navigation/hooks/useSettingsScreens.d.ts +1 -1
- package/dist/presentation/screens/components/types/SettingsContentProps.d.ts +1 -0
- package/dist/presentation/screens/hooks/useSettingsScreen.d.ts +1 -0
- package/package.json +1 -1
- package/src/domains/appearance/presentation/components/ThemeOption.tsx +5 -1
- package/src/domains/appearance/presentation/screens/AppearanceScreen.tsx +18 -8
package/dist/account.d.ts
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* @umituz/react-native-settings/account
|
|
3
3
|
*
|
|
4
4
|
* NOTE: Auth has been removed from this application.
|
|
5
|
-
* This file
|
|
5
|
+
* This file provides empty exports for compatibility.
|
|
6
6
|
*
|
|
7
7
|
* Apps that use @umituz/react-native-auth should import directly from that package:
|
|
8
8
|
* import { AccountScreen, ProfileSection } from '@umituz/react-native-auth';
|
|
9
9
|
*/
|
|
10
|
-
export declare const AccountScreen: React.ComponentType<
|
|
11
|
-
export declare const ProfileSection: React.ComponentType<
|
|
10
|
+
export declare const AccountScreen: React.ComponentType<Record<string, never>> | null;
|
|
11
|
+
export declare const ProfileSection: React.ComponentType<Record<string, never>> | null;
|
|
12
12
|
export declare const useAuth: () => {
|
|
13
13
|
user: any;
|
|
14
14
|
loading: boolean;
|
|
@@ -22,7 +22,7 @@ export declare const useAuthHandlers: () => {
|
|
|
22
22
|
handleDeleteAccount: () => Promise<void>;
|
|
23
23
|
handleSignIn: () => Promise<void>;
|
|
24
24
|
};
|
|
25
|
-
export type AccountScreenConfig =
|
|
25
|
+
export type AccountScreenConfig = Record<string, never>;
|
|
26
26
|
export { useSettingsScreenConfig } from './presentation/hooks/useSettingsScreenConfig';
|
|
27
27
|
export type { UseSettingsScreenConfigParams, SettingsScreenConfigResult, SettingsFeatures, } from './presentation/hooks/useSettingsScreenConfig';
|
|
28
28
|
export type { AccountConfig } from './presentation/navigation/types';
|
|
@@ -4,4 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import type { LanguageSelectionScreenProps } from './LanguageSelectionScreen.types';
|
|
7
|
-
export
|
|
7
|
+
export interface LanguageSelectionProps extends LanguageSelectionScreenProps {
|
|
8
|
+
showHeader?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const LanguageSelectionScreen: React.FC<LanguageSelectionProps>;
|
|
@@ -4,7 +4,7 @@ import type { IconName } from "@umituz/react-native-design-system/atoms";
|
|
|
4
4
|
export interface SettingsItemCardProps {
|
|
5
5
|
title: string;
|
|
6
6
|
description?: string;
|
|
7
|
-
icon
|
|
7
|
+
icon?: IconName;
|
|
8
8
|
onPress?: () => void;
|
|
9
9
|
containerStyle?: StyleProp<ViewStyle>;
|
|
10
10
|
sectionTitle?: string;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* One-stop hook for settings screen configuration.
|
|
5
5
|
* Auth has been removed - this is a no-auth version.
|
|
6
6
|
*/
|
|
7
|
+
import { type AccountTranslations } from "../utils/accountConfigUtils";
|
|
7
8
|
import type { SettingsConfig, SettingsTranslations } from "../screens/types";
|
|
8
9
|
import type { FeedbackFormData } from "../utils/config-creators";
|
|
9
10
|
import type { AppInfo, FAQData, UserProfileDisplay, AdditionalScreen, AccountConfig } from "../navigation/types";
|
|
@@ -28,6 +29,21 @@ export interface UseSettingsScreenConfigParams {
|
|
|
28
29
|
additionalScreens?: AdditionalScreen[];
|
|
29
30
|
features?: SettingsFeatures;
|
|
30
31
|
translations?: SettingsTranslations;
|
|
32
|
+
/** Optional auth data for apps that use authentication */
|
|
33
|
+
auth?: {
|
|
34
|
+
user: {
|
|
35
|
+
displayName?: string;
|
|
36
|
+
userId?: string;
|
|
37
|
+
photoURL?: string;
|
|
38
|
+
isAnonymous?: boolean;
|
|
39
|
+
} | null;
|
|
40
|
+
isLoading?: boolean;
|
|
41
|
+
isAuthReady?: boolean;
|
|
42
|
+
onSignIn: () => void;
|
|
43
|
+
onLogout: () => Promise<void>;
|
|
44
|
+
onDeleteAccount: () => Promise<void>;
|
|
45
|
+
accountTranslations?: AccountTranslations;
|
|
46
|
+
};
|
|
31
47
|
}
|
|
32
48
|
export interface SettingsScreenConfigResult {
|
|
33
49
|
settingsConfig: SettingsConfig;
|
|
@@ -8,6 +8,6 @@ export interface UseSettingsScreensProps extends SettingsStackNavigatorProps {
|
|
|
8
8
|
legalProps: LegalScreenProps;
|
|
9
9
|
notificationTranslations: NotificationSettingsTranslations;
|
|
10
10
|
quietHoursTranslations: QuietHoursTranslations;
|
|
11
|
-
navigation?:
|
|
11
|
+
navigation?: Record<string, unknown>;
|
|
12
12
|
}
|
|
13
13
|
export declare const useSettingsScreens: (props: UseSettingsScreensProps) => StackScreen[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-settings",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.73",
|
|
4
4
|
"description": "Complete settings hub for React Native apps - consolidated package with settings, localization, about, legal, appearance, feedback, FAQs, rating, and gamification - expo-store-review and expo-device now lazy loaded",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -29,6 +29,10 @@ const addOpacityToHex = (hexColor: string, opacity: string): string => {
|
|
|
29
29
|
return `#${color}${opacity}`;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
// SVG paths for checkmark icons (work without external icon library)
|
|
33
|
+
const CHECKMARK_CIRCLE_PATH = "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z";
|
|
34
|
+
const CIRCLE_OUTLINE_PATH = "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z";
|
|
35
|
+
|
|
32
36
|
export const ThemeOption: React.FC<ThemeOptionProps> = React.memo(({
|
|
33
37
|
mode: _mode,
|
|
34
38
|
title,
|
|
@@ -65,7 +69,7 @@ export const ThemeOption: React.FC<ThemeOptionProps> = React.memo(({
|
|
|
65
69
|
) : null}
|
|
66
70
|
</View>
|
|
67
71
|
<AtomicIcon
|
|
68
|
-
|
|
72
|
+
svgPath={isSelected ? CHECKMARK_CIRCLE_PATH : CIRCLE_OUTLINE_PATH}
|
|
69
73
|
customSize={24}
|
|
70
74
|
customColor={isSelected ? tokens.colors.primary : tokens.colors.secondary}
|
|
71
75
|
/>
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, { useMemo, useCallback } from "react";
|
|
9
|
+
import { View, ScrollView } from "react-native";
|
|
9
10
|
import { ScreenLayout } from "@umituz/react-native-design-system/layouts";
|
|
10
11
|
import { NavigationHeader, useAppNavigation } from "@umituz/react-native-design-system/molecules";
|
|
11
12
|
import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
|
|
@@ -152,21 +153,30 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
|
|
|
152
153
|
texts?.previewSectionDescription,
|
|
153
154
|
]);
|
|
154
155
|
|
|
156
|
+
const contentStyle = useMemo(() => ({
|
|
157
|
+
paddingHorizontal: tokens.spacing.lg,
|
|
158
|
+
paddingBottom: tokens.spacing['2xl'],
|
|
159
|
+
}), [tokens.spacing]);
|
|
160
|
+
|
|
155
161
|
return (
|
|
156
162
|
<ScreenLayout
|
|
157
163
|
edges={['top', 'bottom', 'left', 'right']}
|
|
158
|
-
hideScrollIndicator
|
|
159
164
|
header={
|
|
160
|
-
<NavigationHeader
|
|
161
|
-
title={texts?.title || ""}
|
|
162
|
-
onBackPress={() => navigation.goBack()}
|
|
165
|
+
<NavigationHeader
|
|
166
|
+
title={texts?.title || ""}
|
|
167
|
+
onBackPress={() => navigation.goBack()}
|
|
163
168
|
/>
|
|
164
169
|
}
|
|
165
170
|
>
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
171
|
+
<ScrollView
|
|
172
|
+
showsVerticalScrollIndicator={false}
|
|
173
|
+
contentContainerStyle={contentStyle}
|
|
174
|
+
>
|
|
175
|
+
{headerComponentMemo}
|
|
176
|
+
{themeSectionMemo}
|
|
177
|
+
{colorsSectionMemo}
|
|
178
|
+
{previewSectionMemo}
|
|
179
|
+
</ScrollView>
|
|
170
180
|
</ScreenLayout>
|
|
171
181
|
);
|
|
172
182
|
};
|