@umituz/react-native-localization 3.5.58 → 3.5.60

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-localization",
3
- "version": "3.5.58",
3
+ "version": "3.5.60",
4
4
  "description": "Generic localization system for React Native apps with i18n support",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
package/src/index.ts CHANGED
@@ -32,6 +32,7 @@ export {
32
32
 
33
33
  // Presentation
34
34
  export { LanguageSelectionScreen } from './presentation/screens/LanguageSelectionScreen';
35
+ export type { LanguageSelectionScreenProps } from './presentation/screens/LanguageSelectionScreen.types';
35
36
  export { LanguageSection } from './presentation/components/LanguageSection';
36
37
  export type { LanguageSectionProps, LanguageSectionConfig } from './presentation/components/LanguageSection';
37
38
 
@@ -1,11 +1,11 @@
1
1
  // @ts-ignore - Optional peer dependency
2
- import { useNavigation } from '@react-navigation/native';
2
+ import { useAppNavigation } from '@umituz/react-native-design-system';
3
3
  import { useLocalization } from '../hooks/useLocalization';
4
4
  import { languageRepository } from '../repository/LanguageRepository';
5
5
 
6
6
 
7
7
  export const useLanguageNavigation = (navigationScreen: string) => {
8
- const navigation = useNavigation();
8
+ const navigation = useAppNavigation();
9
9
  const { currentLanguage } = useLocalization();
10
10
  const currentLang = languageRepository.getLanguageByCode(currentLanguage) || languageRepository.getDefaultLanguage();
11
11
 
@@ -1,12 +1,11 @@
1
1
  import React from 'react';
2
2
  import { View, StyleSheet, type ViewStyle } from 'react-native';
3
3
  // @ts-ignore - Optional peer dependency
4
- import { useNavigation } from '@react-navigation/native';
5
- // @ts-ignore - Optional peer dependency
6
4
  import {
7
5
  useAppDesignTokens,
8
6
  AtomicText,
9
- ListItem
7
+ ListItem,
8
+ useAppNavigation,
10
9
  } from '@umituz/react-native-design-system';
11
10
  import { useLocalization } from '../../infrastructure/hooks/useLocalization';
12
11
  import { getLanguageByCode } from '../../infrastructure/config/languages';
@@ -29,7 +28,7 @@ export const LanguageSection: React.FC<LanguageSectionProps> = ({
29
28
  containerStyle,
30
29
  sectionTitle,
31
30
  }) => {
32
- const navigation = useNavigation();
31
+ const navigation = useAppNavigation();
33
32
  const tokens = useAppDesignTokens();
34
33
  const { t, currentLanguage } = useLocalization();
35
34
 
@@ -6,41 +6,19 @@
6
6
  import React from 'react';
7
7
  import { FlatList } from 'react-native';
8
8
  // @ts-ignore - Optional peer dependency
9
- import { useNavigation } from '@react-navigation/native';
10
- // @ts-ignore - Optional peer dependency
11
9
  import {
12
10
  useAppDesignTokens,
13
11
  SearchBar,
14
12
  ScreenLayout,
15
- NavigationHeader
13
+ NavigationHeader,
14
+ useAppNavigation,
16
15
  } from '@umituz/react-native-design-system';
17
16
  import { useLanguageSelection } from '../../infrastructure/hooks/useLanguageSelection';
18
17
  import { LanguageItem } from '../components/LanguageItem';
19
18
  import type { Language } from '../../infrastructure/storage/types/Language';
19
+ import type { LanguageSelectionScreenProps } from './LanguageSelectionScreen.types';
20
20
  import { styles } from './LanguageSelectionScreen.styles';
21
21
 
22
- interface LanguageSelectionScreenProps {
23
- renderLanguageItem?: (item: Language, isSelected: boolean, onSelect: (code: string) => void) => React.ReactNode;
24
- renderSearchInput?: (value: string, onChange: (value: string) => void, placeholder: string) => React.ReactNode;
25
- headerTitle?: string;
26
- onBackPress?: () => void;
27
- styles?: {
28
- container?: any;
29
- searchContainer?: any;
30
- languageItem?: any;
31
- languageContent?: any;
32
- languageText?: any;
33
- flag?: any;
34
- nativeName?: any;
35
- searchInput?: any;
36
- searchIcon?: any;
37
- clearButton?: any;
38
- listContent?: any;
39
- };
40
- searchPlaceholder?: string;
41
- testID?: string;
42
- }
43
-
44
22
  export const LanguageSelectionScreen: React.FC<LanguageSelectionScreenProps> = ({
45
23
  renderLanguageItem,
46
24
  renderSearchInput,
@@ -50,7 +28,7 @@ export const LanguageSelectionScreen: React.FC<LanguageSelectionScreenProps> = (
50
28
  searchPlaceholder = "settings.languageSelection.searchPlaceholder",
51
29
  testID = 'language-selection-screen',
52
30
  }) => {
53
- const navigation = useNavigation();
31
+ const navigation = useAppNavigation();
54
32
  const tokens = useAppDesignTokens();
55
33
  const {
56
34
  searchQuery,
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Language Selection Screen Types
3
+ */
4
+
5
+ import type { Language } from '../../infrastructure/storage/types/Language';
6
+
7
+ export interface LanguageSelectionScreenProps {
8
+ renderLanguageItem?: (item: Language, isSelected: boolean, onSelect: (code: string) => void) => React.ReactNode;
9
+ renderSearchInput?: (value: string, onChange: (value: string) => void, placeholder: string) => React.ReactNode;
10
+ headerTitle?: string;
11
+ onBackPress?: () => void;
12
+ styles?: {
13
+ container?: object;
14
+ searchContainer?: object;
15
+ languageItem?: object;
16
+ languageContent?: object;
17
+ languageText?: object;
18
+ flag?: object;
19
+ nativeName?: object;
20
+ searchInput?: object;
21
+ searchIcon?: object;
22
+ clearButton?: object;
23
+ listContent?: object;
24
+ };
25
+ searchPlaceholder?: string;
26
+ testID?: string;
27
+ }