@umituz/react-native-settings 4.21.16 → 4.21.18

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": "4.21.16",
3
+ "version": "4.21.18",
4
4
  "description": "Complete settings hub for React Native apps - consolidated package with settings, about, legal, appearance, feedback, FAQs, rating, and gamification",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -35,11 +35,9 @@
35
35
  "url": "https://github.com/umituz/react-native-settings"
36
36
  },
37
37
  "dependencies": {
38
- "@umituz/react-native-auth": "latest",
39
- "@umituz/react-native-design-system": "latest",
40
- "@umituz/react-native-localization": "latest",
41
- "@umituz/react-native-storage": "latest",
42
- "@umituz/react-native-tanstack": "latest",
38
+ "@umituz/react-native-auth": "*",
39
+ "@umituz/react-native-design-system": "*",
40
+ "@umituz/react-native-localization": "*",
43
41
  "firebase": "^12.7.0"
44
42
  },
45
43
  "peerDependencies": {
@@ -1,4 +1,4 @@
1
- import { storageRepository, unwrap } from "@umituz/react-native-storage";
1
+ import { storageRepository, unwrap } from "@umituz/react-native-design-system";
2
2
  import { IAppearanceRepository } from "../../application/ports/IAppearanceRepository";
3
3
  import { AppearanceSettings } from "../../types";
4
4
 
@@ -6,7 +6,13 @@
6
6
  */
7
7
 
8
8
  import React, { useMemo, useCallback } from "react";
9
- import { ScreenLayout, useAppDesignTokens } from "@umituz/react-native-design-system";
9
+ // @ts-ignore - Optional peer dependency
10
+ import { useNavigation } from "@react-navigation/native";
11
+ import {
12
+ ScreenLayout,
13
+ useAppDesignTokens,
14
+ NavigationHeader
15
+ } from "@umituz/react-native-design-system";
10
16
  import { useLocalization } from "@umituz/react-native-localization";
11
17
  import { useAppearance, useAppearanceActions } from "../../hooks";
12
18
  import {
@@ -33,6 +39,7 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
33
39
  showColorsSection = true,
34
40
  showPreviewSection = true,
35
41
  }) => {
42
+ const navigation = useNavigation();
36
43
  const tokens = useAppDesignTokens();
37
44
  const { t } = useLocalization();
38
45
  const { themeMode } = useAppearance();
@@ -152,7 +159,15 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
152
159
  ]);
153
160
 
154
161
  return (
155
- <ScreenLayout hideScrollIndicator>
162
+ <ScreenLayout
163
+ hideScrollIndicator
164
+ header={
165
+ <NavigationHeader
166
+ title={t("settings.appearance.title")}
167
+ onBackPress={() => navigation.goBack()}
168
+ />
169
+ }
170
+ >
156
171
  {headerComponentMemo}
157
172
  {themeSectionMemo}
158
173
  {colorsSectionMemo}
@@ -9,8 +9,7 @@
9
9
 
10
10
  import React from "react";
11
11
  import { Alert } from "react-native";
12
- import { useAppDesignTokens } from "@umituz/react-native-design-system";
13
- import { storageRepository } from "@umituz/react-native-storage";
12
+ import { useAppDesignTokens, storageRepository } from "@umituz/react-native-design-system";
14
13
  import { SettingsSection } from "../../../../presentation/components/SettingsSection";
15
14
  import { SettingsItemCard } from "../../../../presentation/components/SettingsItemCard";
16
15
 
@@ -3,7 +3,7 @@
3
3
  * Zustand store with persist middleware
4
4
  */
5
5
 
6
- import { createStore } from "@umituz/react-native-storage";
6
+ import { createStore } from "@umituz/react-native-design-system";
7
7
  import type {
8
8
  GamificationState,
9
9
  GamificationActions,
@@ -2,7 +2,7 @@
2
2
  * Simple notification settings hook
3
3
  */
4
4
 
5
- import { createStore } from '@umituz/react-native-storage';
5
+ import { createStore } from '@umituz/react-native-design-system';
6
6
 
7
7
  interface NotificationSettingsState {
8
8
  notificationsEnabled: boolean;
@@ -4,7 +4,7 @@
4
4
  * NO backend, NO user IDs, NO notification history
5
5
  */
6
6
 
7
- import { createStore } from '@umituz/react-native-storage';
7
+ import { createStore } from '@umituz/react-native-design-system';
8
8
 
9
9
  interface NotificationsState {
10
10
  hasPermissions: boolean;
@@ -5,7 +5,16 @@
5
5
 
6
6
  import React from 'react';
7
7
  import { View } from 'react-native';
8
- import { AtomicCard, ScreenLayout, AtomicSpinner } from '@umituz/react-native-design-system';
8
+ // @ts-ignore - Optional peer dependency
9
+ import { useNavigation } from '@react-navigation/native';
10
+ import {
11
+ AtomicCard,
12
+ ScreenLayout,
13
+ AtomicSpinner,
14
+ NavigationHeader,
15
+ useAppDesignTokens
16
+ } from '@umituz/react-native-design-system';
17
+ import { useLocalization } from '@umituz/react-native-localization';
9
18
  import { QuietHoursCard } from '../../quietHours/presentation/components/QuietHoursCard';
10
19
  import { SettingRow } from '../components/SettingRow';
11
20
  import { RemindersNavRow } from '../components/RemindersNavRow';
@@ -15,7 +24,6 @@ import { useReminders } from '../../reminders/infrastructure/storage/RemindersSt
15
24
  import { useQuietHoursActions } from '../../quietHours/infrastructure/hooks/useQuietHoursActions';
16
25
  import type { NotificationSettingsTranslations, QuietHoursTranslations } from '../../infrastructure/services/types';
17
26
  import { createStyles } from './NotificationSettingsScreen.styles';
18
- import { useAppDesignTokens } from '@umituz/react-native-design-system';
19
27
  // @ts-ignore - Optional peer dependency
20
28
  import DateTimePicker from '@react-native-community/datetimepicker';
21
29
 
@@ -30,7 +38,9 @@ export const NotificationSettingsScreen: React.FC<NotificationSettingsScreenProp
30
38
  quietHoursTranslations,
31
39
  onHapticFeedback,
32
40
  }) => {
41
+ const navigation = useNavigation();
33
42
  const tokens = useAppDesignTokens();
43
+ const { t } = useLocalization();
34
44
  const styles = createStyles(tokens);
35
45
  const reminders = useReminders();
36
46
  const { setStartTime, setEndTime } = useQuietHoursActions();
@@ -55,16 +65,33 @@ export const NotificationSettingsScreen: React.FC<NotificationSettingsScreenProp
55
65
  // Navigate to reminders screen when implemented
56
66
  };
57
67
 
68
+ const headerTitle = translations.screenTitle || t("settings.notifications.title");
69
+
58
70
  if (isLoading) {
59
71
  return (
60
- <ScreenLayout>
72
+ <ScreenLayout
73
+ header={
74
+ <NavigationHeader
75
+ title={headerTitle}
76
+ onBackPress={() => navigation.goBack()}
77
+ />
78
+ }
79
+ >
61
80
  <AtomicSpinner size="lg" color="primary" fullContainer />
62
81
  </ScreenLayout>
63
82
  );
64
83
  }
65
84
 
66
85
  return (
67
- <ScreenLayout hideScrollIndicator>
86
+ <ScreenLayout
87
+ hideScrollIndicator
88
+ header={
89
+ <NavigationHeader
90
+ title={headerTitle}
91
+ onBackPress={() => navigation.goBack()}
92
+ />
93
+ }
94
+ >
68
95
  <View style={styles.container}>
69
96
  <AtomicCard style={styles.card}>
70
97
  <SettingRow
@@ -3,7 +3,7 @@
3
3
  * Manages reminder state with AsyncStorage persistence
4
4
  */
5
5
 
6
- import { createStore } from '@umituz/react-native-storage';
6
+ import { createStore } from '@umituz/react-native-design-system';
7
7
  import type { Reminder, QuietHoursConfig, NotificationPreferences } from '../../../infrastructure/services/types';
8
8
 
9
9
  // ============================================================================
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Settings Repository Implementation
3
3
  *
4
- * Handles data access for user settings using @umituz/react-native-storage
4
+ * Handles data access for user settings using @umituz/react-native-design-system
5
5
  */
6
6
 
7
- import { storageRepository, StorageKey, createUserKey } from '@umituz/react-native-storage';
7
+ import { storageRepository, StorageKey, createUserKey } from '@umituz/react-native-design-system';
8
8
  import type { ISettingsRepository, UserSettings, SettingsResult } from '../../application/ports/ISettingsRepository';
9
9
 
10
10
  export class SettingsRepository implements ISettingsRepository {
@@ -99,7 +99,7 @@ export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = ({
99
99
  <Stack.Screen
100
100
  name="Appearance"
101
101
  component={AppearanceScreen}
102
- options={{ headerTitle: t("settings.appearance.title") }}
102
+ options={{ headerShown: false }}
103
103
  />
104
104
 
105
105
  <Stack.Screen name="About" options={{ headerTitle: t("settings.about.title") }}>
@@ -112,7 +112,7 @@ export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = ({
112
112
 
113
113
  <Stack.Screen
114
114
  name="Notifications"
115
- options={{ headerTitle: t("settings.notifications.title") }}
115
+ options={{ headerShown: false }}
116
116
  >
117
117
  {() => (
118
118
  <NotificationSettingsScreen
@@ -166,10 +166,11 @@ export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = ({
166
166
 
167
167
  <Stack.Screen
168
168
  name="LanguageSelection"
169
- options={{ headerTitle: t("settings.language.title") }}
169
+ options={{ headerShown: false }}
170
170
  >
171
171
  {() => (
172
172
  <LanguageSelectionScreen
173
+ headerTitle={t("settings.language.title")}
173
174
  searchPlaceholder={t("settings.languageSelection.searchPlaceholder")}
174
175
  />
175
176
  )}