@umituz/react-native-settings 5.3.72 → 5.3.74

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 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 now provides empty exports for backward compatibility.
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<any> | null;
11
- export declare const ProfileSection: React.ComponentType<any> | null;
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 = any;
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 declare const LanguageSelectionScreen: React.FC<LanguageSelectionScreenProps>;
7
+ export interface LanguageSelectionProps extends LanguageSelectionScreenProps {
8
+ showHeader?: boolean;
9
+ }
10
+ export declare const LanguageSelectionScreen: React.FC<LanguageSelectionProps>;
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * useAppRating Hook
3
3
  * React hook for app rating system
4
+ * Lazy loads expo-store-review to reduce bundle size
4
5
  */
5
6
  import type { RatingConfig, UseAppRatingResult } from "../../domain/entities/RatingConfig";
6
7
  /**
@@ -18,7 +18,7 @@ export interface BaseConfigType {
18
18
  * Configuration parameters for creating a settings item config
19
19
  */
20
20
  export interface ConfigCreatorParams {
21
- icon: string;
21
+ icon?: string;
22
22
  routeOrOnPress?: string | (() => void);
23
23
  defaultRoute?: string;
24
24
  }
@@ -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: IconName;
7
+ icon?: IconName;
8
8
  onPress?: () => void;
9
9
  containerStyle?: StyleProp<ViewStyle>;
10
10
  sectionTitle?: string;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { type IconName } from "@umituz/react-native-design-system/atoms";
3
3
  export interface SettingsItemCardContentProps {
4
- icon: IconName;
4
+ icon?: IconName;
5
5
  title: string;
6
6
  description?: string;
7
7
  iconBgColor: 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?: any;
11
+ navigation?: Record<string, unknown>;
12
12
  }
13
13
  export declare const useSettingsScreens: (props: UseSettingsScreensProps) => StackScreen[];
@@ -45,4 +45,5 @@ export interface SettingsContentProps {
45
45
  devSettings?: DevSettingsProps;
46
46
  gamificationConfig?: GamificationSettingsConfig;
47
47
  navigation?: any;
48
+ currentLanguage?: string;
48
49
  }
@@ -33,4 +33,5 @@ export declare function useSettingsScreen({ config, showUserProfile, featureOpti
33
33
  shouldShowUserProfile: boolean;
34
34
  appVersion: string;
35
35
  handleClose: () => void;
36
+ currentLanguage: string;
36
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-settings",
3
- "version": "5.3.72",
3
+ "version": "5.3.74",
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
- name={isSelected ? "checkmark-circle-outline" : "ellipse-outline"}
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, FlatList } 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,51 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
152
153
  texts?.previewSectionDescription,
153
154
  ]);
154
155
 
156
+ // Prepare data for FlatList
157
+ const sectionsData = useMemo(() => {
158
+ const items: Array<{ id: string; component: React.ReactNode }> = [];
159
+
160
+ if (headerComponentMemo) {
161
+ items.push({ id: 'header', component: headerComponentMemo });
162
+ }
163
+ if (themeSectionMemo) {
164
+ items.push({ id: 'theme', component: themeSectionMemo });
165
+ }
166
+ if (colorsSectionMemo) {
167
+ items.push({ id: 'colors', component: colorsSectionMemo });
168
+ }
169
+ if (previewSectionMemo) {
170
+ items.push({ id: 'preview', component: previewSectionMemo });
171
+ }
172
+
173
+ return items;
174
+ }, [headerComponentMemo, themeSectionMemo, colorsSectionMemo, previewSectionMemo]);
175
+
176
+ const renderItem = useCallback(({ item }: { item: { id: string; component: React.ReactNode } }) => {
177
+ return <View style={{ paddingHorizontal: tokens.spacing.lg }}>{item.component}</View>;
178
+ }, [tokens.spacing.lg]);
179
+
180
+ const keyExtractor = useCallback((item: { id: string; component: React.ReactNode }) => item.id, []);
181
+
155
182
  return (
156
183
  <ScreenLayout
157
184
  edges={['top', 'bottom', 'left', 'right']}
158
- hideScrollIndicator
159
185
  header={
160
- <NavigationHeader
161
- title={texts?.title || ""}
162
- onBackPress={() => navigation.goBack()}
186
+ <NavigationHeader
187
+ title={texts?.title || ""}
188
+ onBackPress={() => navigation.goBack()}
163
189
  />
164
190
  }
165
191
  >
166
- {headerComponentMemo}
167
- {themeSectionMemo}
168
- {colorsSectionMemo}
169
- {previewSectionMemo}
192
+ <FlatList
193
+ data={sectionsData}
194
+ renderItem={renderItem}
195
+ keyExtractor={keyExtractor}
196
+ showsVerticalScrollIndicator={false}
197
+ contentContainerStyle={{
198
+ paddingBottom: tokens.spacing['2xl'],
199
+ }}
200
+ />
170
201
  </ScreenLayout>
171
202
  );
172
203
  };