@umituz/react-native-settings 4.23.61 → 4.23.63

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.
Files changed (20) hide show
  1. package/package.json +1 -1
  2. package/src/domains/faqs/domain/services/FAQSearchService.ts +2 -2
  3. package/src/domains/feedback/domain/entities/FeedbackEntity.ts +0 -33
  4. package/src/domains/gamification/utils/calculations.ts +1 -1
  5. package/src/domains/localization/infrastructure/components/LanguageSwitcher.tsx +0 -1
  6. package/src/domains/localization/infrastructure/components/useLanguageNavigation.ts +0 -1
  7. package/src/domains/localization/infrastructure/storage/LanguageInitializer.ts +1 -1
  8. package/src/domains/localization/infrastructure/storage/LanguageSwitcher.ts +1 -1
  9. package/src/domains/localization/presentation/components/LanguageItem.tsx +0 -1
  10. package/src/domains/localization/presentation/components/LanguageSection.tsx +0 -1
  11. package/src/domains/localization/presentation/screens/LanguageSelectionScreen.tsx +0 -1
  12. package/src/domains/notifications/infrastructure/services/NotificationScheduler.ts +2 -2
  13. package/src/domains/notifications/infrastructure/utils/triggerBuilder.ts +2 -2
  14. package/src/domains/notifications/presentation/screens/NotificationSettingsScreen.tsx +0 -1
  15. package/src/domains/notifications/presentation/screens/NotificationsScreen.tsx +5 -5
  16. package/src/domains/notifications/reminders/infrastructure/config/reminderPresets.ts +1 -1
  17. package/src/infrastructure/repositories/SettingsRepository.ts +1 -1
  18. package/src/presentation/screens/components/GamificationSettingsItem.tsx +0 -1
  19. package/src/presentation/screens/components/SubscriptionSettingsItem.tsx +0 -1
  20. package/src/presentation/screens/components/WalletSettingsItem.tsx +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-settings",
3
- "version": "4.23.61",
3
+ "version": "4.23.63",
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",
@@ -50,10 +50,10 @@ export class FAQSearchService {
50
50
  }
51
51
 
52
52
  static sortByOrder(items: FAQItem[]): FAQItem[] {
53
- return [...items].sort((a, b) => (a.order || 0) - (b.order || 0));
53
+ return [...items].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
54
54
  }
55
55
 
56
56
  static sortCategoriesByOrder(categories: FAQCategory[]): FAQCategory[] {
57
- return [...categories].sort((a, b) => (a.order || 0) - (b.order || 0));
57
+ return [...categories].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
58
58
  }
59
59
  }
@@ -57,36 +57,3 @@ export function createFeedback(
57
57
  updatedAt: now,
58
58
  };
59
59
  }
60
-
61
- /**
62
- * Get feedback type label
63
- * @deprecated Use translation keys instead: `feedback.type.${type}`
64
- * This function is kept for backward compatibility but should not be used.
65
- * Use t(`feedback.type.${type}`) from useLocalization() instead.
66
- */
67
- export function getFeedbackTypeLabel(type: FeedbackType): string {
68
- // Return type key for translation
69
- return type;
70
- }
71
-
72
- export function getFeedbackTypeEmoji(type: FeedbackType): string {
73
- const emojis: Record<FeedbackType, string> = {
74
- general: '💬',
75
- bug_report: '🐛',
76
- feature_request: '✨',
77
- improvement: '🔧',
78
- other: '📝',
79
- };
80
- return emojis[type] || '📝';
81
- }
82
-
83
- export function getFeedbackTypeIcon(type: FeedbackType): string {
84
- const icons: Record<FeedbackType, string> = {
85
- general: 'message-circle',
86
- bug_report: 'bug',
87
- feature_request: 'sparkles',
88
- improvement: 'wrench',
89
- other: 'file-text',
90
- };
91
- return icons[type] || 'file-text';
92
- }
@@ -17,7 +17,7 @@ export const calculateLevel = (
17
17
  for (let i = 0; i < sortedLevels.length; i++) {
18
18
  if (points >= sortedLevels[i].minPoints) {
19
19
  currentLevelDef = sortedLevels[i];
20
- nextLevelDef = sortedLevels[i + 1] || null;
20
+ nextLevelDef = sortedLevels[i + 1] ?? null;
21
21
  }
22
22
  }
23
23
 
@@ -5,7 +5,6 @@
5
5
 
6
6
  import React, { useMemo } from 'react';
7
7
  import { TouchableOpacity, type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
8
- // @ts-ignore - Optional peer dependency
9
8
  import { useAppDesignTokens, AtomicText } from '@umituz/react-native-design-system';
10
9
  import { useLanguageSwitcher } from './useLanguageSwitcher';
11
10
  import { styles, DEFAULT_CONFIG_VALUES } from './LanguageSwitcher.styles';
@@ -1,4 +1,3 @@
1
- // @ts-ignore - Optional peer dependency
2
1
  import { useAppNavigation } from '@umituz/react-native-design-system';
3
2
  import { useLocalization } from '../hooks/useLocalization';
4
3
  import { languageRepository } from '../repository/LanguageRepository';
@@ -62,7 +62,7 @@ export class LanguageInitializer {
62
62
 
63
63
  return {
64
64
  languageCode: finalLanguageCode,
65
- isRTL: finalLanguageObj?.isRTL || false,
65
+ isRTL: finalLanguageObj?.isRTL ?? false,
66
66
  };
67
67
  }
68
68
 
@@ -46,7 +46,7 @@ export class LanguageSwitcher {
46
46
 
47
47
  return {
48
48
  languageCode,
49
- isRTL: language?.isRTL || false,
49
+ isRTL: language?.isRTL ?? false,
50
50
  };
51
51
  }
52
52
  }
@@ -13,7 +13,6 @@ import {
13
13
  type ViewStyle,
14
14
  type TextStyle,
15
15
  } from 'react-native';
16
- // @ts-ignore - Optional peer dependency
17
16
  import { useAppDesignTokens, AtomicText, AtomicIcon } from '@umituz/react-native-design-system';
18
17
  import type { Language } from '../../infrastructure/storage/types/Language';
19
18
  import { styles } from './LanguageItem.styles';
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { View, StyleSheet, type ViewStyle } from 'react-native';
3
- // @ts-ignore - Optional peer dependency
4
3
  import {
5
4
  useAppDesignTokens,
6
5
  AtomicText,
@@ -5,7 +5,6 @@
5
5
 
6
6
  import React from 'react';
7
7
  import { FlatList } from 'react-native';
8
- // @ts-ignore - Optional peer dependency
9
8
  import {
10
9
  useAppDesignTokens,
11
10
  SearchBar,
@@ -67,8 +67,8 @@ export class NotificationScheduler {
67
67
  return notifications.map(notification => ({
68
68
  identifier: notification.identifier,
69
69
  content: {
70
- title: notification.content.title || '',
71
- body: notification.content.body || '',
70
+ title: notification.content.title ?? '',
71
+ body: notification.content.body ?? '',
72
72
  data: notification.content.data as Record<string, unknown>,
73
73
  },
74
74
  trigger: notification.trigger,
@@ -26,7 +26,7 @@ export const buildTrigger = (reminder: Reminder): NotificationTrigger => {
26
26
  case 'weekly':
27
27
  return {
28
28
  type: 'weekly',
29
- weekday: weekday || 1,
29
+ weekday: weekday ?? 1,
30
30
  hour,
31
31
  minute,
32
32
  };
@@ -34,7 +34,7 @@ export const buildTrigger = (reminder: Reminder): NotificationTrigger => {
34
34
  case 'monthly':
35
35
  return {
36
36
  type: 'monthly',
37
- day: dayOfMonth || 1,
37
+ day: dayOfMonth ?? 1,
38
38
  hour,
39
39
  minute,
40
40
  };
@@ -23,7 +23,6 @@ import { useReminders } from '../../reminders/infrastructure/storage/RemindersSt
23
23
  import { useQuietHoursActions } from '../../quietHours/infrastructure/hooks/useQuietHoursActions';
24
24
  import type { NotificationSettingsTranslations, QuietHoursTranslations } from '../../infrastructure/services/types';
25
25
  import { createStyles } from './NotificationSettingsScreen.styles';
26
- // @ts-ignore - Optional peer dependency
27
26
  import DateTimePicker from '@react-native-community/datetimepicker';
28
27
 
29
28
  export interface NotificationSettingsScreenProps {
@@ -7,7 +7,7 @@
7
7
 
8
8
  import React, { useMemo } from 'react';
9
9
  import { View, StyleSheet } from 'react-native';
10
- import { AtomicIcon, AtomicCard, AtomicText, ScreenLayout, STATIC_TOKENS, AtomicSpinner, type IconColor } from '@umituz/react-native-design-system';
10
+ import { AtomicIcon, AtomicCard, AtomicText, ScreenLayout, BASE_TOKENS, AtomicSpinner, type IconColor } from '@umituz/react-native-design-system';
11
11
  import { Switch } from 'react-native';
12
12
  import { useAppDesignTokens } from '@umituz/react-native-design-system';
13
13
  import { useNotificationSettings } from '../../infrastructure/hooks/useNotificationSettings';
@@ -58,7 +58,7 @@ export const NotificationsScreen: React.FC<NotificationsScreenProps> = ({
58
58
  <AtomicText type="bodyLarge" style={{ color: tokens.colors.textPrimary }}>
59
59
  {translations.title}
60
60
  </AtomicText>
61
- <AtomicText type="bodySmall" style={{ color: tokens.colors.textSecondary, marginTop: STATIC_TOKENS.spacing.xs }}>
61
+ <AtomicText type="bodySmall" style={{ color: tokens.colors.textSecondary, marginTop: BASE_TOKENS.spacing.xs }}>
62
62
  {translations.description}
63
63
  </AtomicText>
64
64
  </View>
@@ -82,7 +82,7 @@ const getStyles = (tokens: DesignTokens) => StyleSheet.create({
82
82
  alignItems: 'center',
83
83
  },
84
84
  card: {
85
- padding: STATIC_TOKENS.spacing.lg,
85
+ padding: BASE_TOKENS.spacing.lg,
86
86
  backgroundColor: tokens.colors.surface,
87
87
  },
88
88
  settingItem: {
@@ -96,11 +96,11 @@ const getStyles = (tokens: DesignTokens) => StyleSheet.create({
96
96
  backgroundColor: tokens.colors.surfaceSecondary,
97
97
  justifyContent: 'center',
98
98
  alignItems: 'center',
99
- marginRight: STATIC_TOKENS.spacing.md,
99
+ marginRight: BASE_TOKENS.spacing.md,
100
100
  },
101
101
  textContainer: {
102
102
  flex: 1,
103
- marginRight: STATIC_TOKENS.spacing.md,
103
+ marginRight: BASE_TOKENS.spacing.md,
104
104
  },
105
105
  });
106
106
 
@@ -116,5 +116,5 @@ export const formatTime = (hour: number, minute: number): string => {
116
116
 
117
117
  export const parseTime = (timeString: string): { hour: number; minute: number } => {
118
118
  const [hour, minute] = timeString.split(':').map(Number);
119
- return { hour: hour || 0, minute: minute || 0 };
119
+ return { hour: hour ?? 0, minute: minute ?? 0 };
120
120
  };
@@ -36,7 +36,7 @@ export class SettingsRepository implements ISettingsRepository {
36
36
 
37
37
  return {
38
38
  success: true,
39
- data: result.data || defaults,
39
+ data: result.data ?? defaults,
40
40
  };
41
41
  } catch (error) {
42
42
  return {
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- // @ts-ignore - Optional peer dependency
3
2
  import { useAppNavigation } from "@umituz/react-native-design-system";
4
3
  import type { IconName } from "@umituz/react-native-design-system";
5
4
  import { SettingsItemCard } from "../../components/SettingsItemCard";
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- // @ts-ignore - Optional peer dependency
3
2
  import { useAppNavigation } from "@umituz/react-native-design-system";
4
3
  import { SettingsItemCard } from "../../components/SettingsItemCard";
5
4
  import type { IconName } from "@umituz/react-native-design-system";
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- // @ts-ignore - Optional peer dependency
3
2
  import { useAppNavigation } from "@umituz/react-native-design-system";
4
3
  import { SettingsItemCard } from "../../components/SettingsItemCard";
5
4
  import type { IconName } from "@umituz/react-native-design-system";