@umituz/react-native-settings 5.3.53 → 5.3.55

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.3.53",
3
+ "version": "5.3.55",
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": "./dist/index.d.ts",
@@ -51,7 +51,7 @@ export const AboutScreen: React.FC<AboutScreenProps> = (props) => {
51
51
 
52
52
  if (loading) {
53
53
  return (
54
- <ScreenLayout header={header} testID={testID}>
54
+ <ScreenLayout edges={['top', 'bottom', 'left', 'right']} header={header} testID={testID}>
55
55
  <AtomicSpinner fullContainer size="lg" />
56
56
  </ScreenLayout>
57
57
  );
@@ -60,7 +60,7 @@ export const AboutScreen: React.FC<AboutScreenProps> = (props) => {
60
60
  if (error || !appInfo) {
61
61
  const errorText = error ? `${config.texts?.errorPrefix || ""} ${error}` : (config.texts?.noInfo || "");
62
62
  return (
63
- <ScreenLayout header={header} testID={testID}>
63
+ <ScreenLayout edges={['top', 'bottom', 'left', 'right']} header={header} testID={testID}>
64
64
  <AtomicText type="bodyMedium" color="error" style={{ textAlign: 'center', marginTop: 20 }}>
65
65
  {errorText}
66
66
  </AtomicText>
@@ -69,7 +69,7 @@ export const AboutScreen: React.FC<AboutScreenProps> = (props) => {
69
69
  }
70
70
 
71
71
  return (
72
- <ScreenLayout header={header} testID={testID}>
72
+ <ScreenLayout edges={['top', 'bottom', 'left', 'right']} header={header} testID={testID}>
73
73
  <AboutScreenContent
74
74
  {...props}
75
75
  appInfo={appInfo}
@@ -153,7 +153,8 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
153
153
  ]);
154
154
 
155
155
  return (
156
- <ScreenLayout
156
+ <ScreenLayout
157
+ edges={['top', 'bottom', 'left', 'right']}
157
158
  hideScrollIndicator
158
159
  header={
159
160
  <NavigationHeader
@@ -48,7 +48,7 @@ export const DisclaimerScreen: React.FC<DisclaimerScreenProps> = ({
48
48
  return (
49
49
  <ScreenLayout
50
50
  scrollable={true}
51
- edges={['bottom']}
51
+ edges={['top', 'bottom', 'left', 'right']}
52
52
  contentContainerStyle={styles.scrollContent}
53
53
  hideScrollIndicator={false}
54
54
  header={
@@ -79,7 +79,7 @@ export const FAQScreen: React.FC<FAQScreenProps> = ({
79
79
 
80
80
  return (
81
81
  <ScreenLayout
82
- edges={['bottom']}
82
+ edges={['top', 'bottom', 'left', 'right']}
83
83
  scrollable={true}
84
84
  header={header}
85
85
  contentContainerStyle={customStyles?.content}
@@ -151,7 +151,7 @@ export const FeatureRequestScreen: React.FC<FeatureRequestScreenProps> = ({ conf
151
151
 
152
152
  if (isLoading) {
153
153
  return (
154
- <ScreenLayout header={header} edges={['top', 'bottom']}>
154
+ <ScreenLayout header={header} edges={['top', 'bottom', 'left', 'right']}>
155
155
  <View style={styles.loadingContainer}>
156
156
  <ActivityIndicator size="large" color={tokens.colors.primary} />
157
157
  </View>
@@ -51,6 +51,7 @@ export const LegalScreen: React.FC<LegalScreenProps> = React.memo((props) => {
51
51
  return (
52
52
  <ScreenLayout
53
53
  testID={testID}
54
+ edges={['top', 'bottom', 'left', 'right']}
54
55
  hideScrollIndicator
55
56
  header={
56
57
  <NavigationHeader
@@ -2,16 +2,18 @@ import React, { useMemo } from 'react';
2
2
  import type { StackScreen } from "@umituz/react-native-design-system/molecules";
3
3
  import { LanguageSelectionScreen } from "../../../domains/localization";
4
4
  import { NotificationSettingsScreen } from "../../../domains/notifications";
5
+ import { SettingsScreen } from "../../screens/SettingsScreen";
6
+
5
7
  // AccountScreen is an optional peer — lazy require so the package works without @umituz/react-native-auth
6
- const AccountScreen: React.ComponentType<any> | null = (() => {
8
+ // Returns null if @umituz/react-native-auth is not installed
9
+ const getAccountScreen = (): React.ComponentType<any> | null => {
7
10
  try {
8
11
  return require("@umituz/react-native-auth").AccountScreen ?? null;
9
- } catch (error) {
10
- if (__DEV__) console.warn("[useSettingsScreens] @umituz/react-native-auth not available:", error);
12
+ } catch {
13
+ // Auth package not available, silently return null
11
14
  return null;
12
15
  }
13
- })();
14
- import { SettingsScreen } from "../../screens/SettingsScreen";
16
+ };
15
17
  import { AppearanceScreen } from "../../screens/AppearanceScreen";
16
18
  import { FAQScreen } from "../../../domains/faqs";
17
19
  import { AboutScreen } from "../../../domains/about";
@@ -132,8 +134,11 @@ export const useSettingsScreens = (props: UseSettingsScreensProps): StackScreen[
132
134
  });
133
135
 
134
136
  const accountScreen = createConditionalScreen(
135
- !!accountConfig && !!AccountScreen,
136
- () => createScreenWithProps("Account", AccountScreen, { config: accountConfig })
137
+ !!accountConfig && !!getAccountScreen(),
138
+ () => {
139
+ const AccountScreen = getAccountScreen();
140
+ return AccountScreen ? createScreenWithProps("Account", AccountScreen, { config: accountConfig }) : null;
141
+ }
137
142
  );
138
143
 
139
144
  const videoTutorialScreen = createScreenWithProps("VideoTutorial", VideoTutorialsScreen, {
@@ -3,9 +3,15 @@ import { View, StyleSheet } from "react-native";
3
3
  import { useAppNavigation } from "@umituz/react-native-design-system/molecules";
4
4
 
5
5
  // ProfileSection is an optional peer — lazy require so the package works without @umituz/react-native-auth
6
- const ProfileSection: React.ComponentType<any> | null = (() => {
7
- try { return require("@umituz/react-native-auth").ProfileSection ?? null; } catch { return null; }
8
- })();
6
+ // Returns null if @umituz/react-native-auth is not installed
7
+ const getProfileSection = (): React.ComponentType<any> | null => {
8
+ try {
9
+ return require("@umituz/react-native-auth").ProfileSection ?? null;
10
+ } catch {
11
+ // Auth package not available, silently return null
12
+ return null;
13
+ }
14
+ };
9
15
 
10
16
  export interface ProfileSectionLoaderProps {
11
17
  userProfile?: {
@@ -25,6 +31,7 @@ export interface ProfileSectionLoaderProps {
25
31
 
26
32
  export const ProfileSectionLoader: React.FC<ProfileSectionLoaderProps> = React.memo(({ userProfile, translations }) => {
27
33
  const navigation = useAppNavigation();
34
+ const ProfileSection = getProfileSection();
28
35
 
29
36
  const handlePress = React.useCallback(() => {
30
37
  if (!userProfile) return;