@umituz/react-native-settings 5.0.0 → 5.1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-settings",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "Complete settings hub for React Native apps - consolidated package with settings, localization, about, legal, appearance, feedback, FAQs, rating, and gamification",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -74,7 +74,7 @@
74
74
  "@types/react": "~19.1.10",
75
75
  "@typescript-eslint/eslint-plugin": "^7.18.0",
76
76
  "@typescript-eslint/parser": "^7.18.0",
77
- "@umituz/react-native-auth": "latest",
77
+ "@umituz/react-native-auth": "^4.1.0",
78
78
  "@umituz/react-native-design-system": "latest",
79
79
  "@umituz/react-native-firebase": "latest",
80
80
  "@umituz/react-native-sentry": "latest",
@@ -49,6 +49,7 @@ export interface SettingsScreenConfigResult {
49
49
  translatedFaqData: FAQData | undefined;
50
50
  isLoading: boolean;
51
51
  isAuthReady: boolean;
52
+ PasswordPromptComponent: React.ReactNode;
52
53
  }
53
54
 
54
55
  export const useSettingsScreenConfig = (
@@ -74,7 +75,7 @@ export const useSettingsScreenConfig = (
74
75
  const userProfileData = useUserProfile({});
75
76
 
76
77
  // Use centralized auth handlers
77
- const { handleRatePress, handleSignOut, handleDeleteAccount, handleSignIn } =
78
+ const { handleRatePress, handleSignOut, handleDeleteAccount, handleSignIn, PasswordPromptComponent } =
78
79
  useAuthHandlers(appInfo, translations?.errors);
79
80
 
80
81
  // Use settings config factory
@@ -178,5 +179,6 @@ export const useSettingsScreenConfig = (
178
179
  translatedFaqData,
179
180
  isLoading: loading,
180
181
  isAuthReady,
182
+ PasswordPromptComponent,
181
183
  };
182
184
  };
@@ -51,6 +51,8 @@ export interface SettingsScreenProps {
51
51
  gamificationConfig?: import("../../domains/gamification").GamificationSettingsConfig;
52
52
  /** Show header (default: true) */
53
53
  showHeader?: boolean;
54
+ /** Password prompt modal component */
55
+ PasswordPromptComponent?: React.ReactNode;
54
56
  }
55
57
 
56
58
  export const SettingsScreen: React.FC<SettingsScreenProps> = (props) => {
@@ -69,6 +71,7 @@ export const SettingsScreen: React.FC<SettingsScreenProps> = (props) => {
69
71
  featureOptions,
70
72
  devSettings,
71
73
  gamificationConfig,
74
+ PasswordPromptComponent,
72
75
  } = props;
73
76
 
74
77
  const {
@@ -94,21 +97,24 @@ export const SettingsScreen: React.FC<SettingsScreenProps> = (props) => {
94
97
  ) : undefined;
95
98
 
96
99
  return (
97
- <ScreenLayout header={header}>
98
- {children ?? (
99
- <SettingsContent
100
- normalizedConfig={normalizedConfig}
101
- features={features}
102
- showUserProfile={shouldShowUserProfile}
103
- userProfile={userProfile}
104
- showFooter={showFooter}
105
- footerText={footerText}
106
- appVersion={appVersion}
107
- customSections={customSections}
108
- devSettings={devSettings}
109
- gamificationConfig={gamificationConfig}
110
- />
111
- )}
112
- </ScreenLayout>
100
+ <>
101
+ <ScreenLayout header={header}>
102
+ {children ?? (
103
+ <SettingsContent
104
+ normalizedConfig={normalizedConfig}
105
+ features={features}
106
+ showUserProfile={shouldShowUserProfile}
107
+ userProfile={userProfile}
108
+ showFooter={showFooter}
109
+ footerText={footerText}
110
+ appVersion={appVersion}
111
+ customSections={customSections}
112
+ devSettings={devSettings}
113
+ gamificationConfig={gamificationConfig}
114
+ />
115
+ )}
116
+ </ScreenLayout>
117
+ {PasswordPromptComponent}
118
+ </>
113
119
  );
114
120
  };
@@ -24,7 +24,7 @@ export const useAuthHandlers = (appInfo: AppInfo, translations?: SettingsTransla
24
24
  const { signOut } = useAuth();
25
25
  const { showAuthModal } = useAuthModalStore();
26
26
 
27
- const { deleteAccount: deleteAccountFromAuth } = useAccountManagement({
27
+ const { deleteAccount: deleteAccountFromAuth, PasswordPromptComponent } = useAccountManagement({
28
28
  passwordPromptTitle: translations?.deleteAccountTitle || "Confirm Account Deletion",
29
29
  passwordPromptMessage: translations?.deleteAccountMessage || "Please enter your password to permanently delete your account. This action cannot be undone.",
30
30
  passwordPromptCancel: translations?.cancel || "Cancel",
@@ -97,5 +97,6 @@ export const useAuthHandlers = (appInfo: AppInfo, translations?: SettingsTransla
97
97
  handleSignOut,
98
98
  handleDeleteAccount,
99
99
  handleSignIn,
100
+ PasswordPromptComponent,
100
101
  };
101
102
  };