@umituz/react-native-settings 5.3.37 → 5.3.38
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/dist/account.d.ts +27 -0
- package/dist/application/ports/ISettingsRepository.d.ts +45 -0
- package/dist/domains/about/domain/entities/AppInfo.d.ts +76 -0
- package/dist/domains/about/domain/repositories/IAboutRepository.d.ts +19 -0
- package/dist/domains/about/index.d.ts +10 -0
- package/dist/domains/about/infrastructure/repositories/AboutRepository.d.ts +18 -0
- package/dist/domains/about/presentation/components/AboutContent.d.ts +14 -0
- package/dist/domains/about/presentation/components/AboutHeader.d.ts +21 -0
- package/dist/domains/about/presentation/components/AboutSection.d.ts +14 -0
- package/dist/domains/about/presentation/components/AboutSettingItem.d.ts +39 -0
- package/dist/domains/about/presentation/hooks/useAboutInfo.d.ts +2 -0
- package/dist/domains/about/presentation/hooks/useAboutInfo.types.d.ts +29 -0
- package/dist/domains/about/presentation/screens/AboutScreen.d.ts +21 -0
- package/dist/domains/about/presentation/screens/AboutScreenContent.d.ts +15 -0
- package/dist/domains/about/utils/AppInfoFactory.d.ts +9 -0
- package/dist/domains/appearance/data/colorPalettes.d.ts +25 -0
- package/dist/domains/appearance/hooks/useAppearance.d.ts +11 -0
- package/dist/domains/appearance/hooks/useAppearanceActions.d.ts +9 -0
- package/dist/domains/appearance/index.d.ts +9 -0
- package/dist/domains/appearance/presentation/components/AppearanceHeader.d.ts +18 -0
- package/dist/domains/appearance/presentation/components/AppearancePreview.d.ts +21 -0
- package/dist/domains/appearance/presentation/components/AppearanceSection.d.ts +16 -0
- package/dist/domains/appearance/presentation/components/ColorPicker.d.ts +15 -0
- package/dist/domains/appearance/presentation/components/CustomColorsSection.d.ts +25 -0
- package/dist/domains/appearance/presentation/components/ThemeModeSection.d.ts +24 -0
- package/dist/domains/appearance/presentation/components/ThemeOption.d.ts +20 -0
- package/dist/domains/appearance/presentation/components/index.d.ts +6 -0
- package/dist/domains/appearance/presentation/screens/AppearanceScreen.d.ts +16 -0
- package/dist/domains/appearance/types/index.d.ts +48 -0
- package/dist/domains/cloud-sync/index.d.ts +6 -0
- package/dist/domains/cloud-sync/presentation/components/CloudSyncSetting.d.ts +14 -0
- package/dist/domains/dev/index.d.ts +14 -0
- package/dist/domains/dev/presentation/components/DevSettingsSection.d.ts +34 -0
- package/dist/domains/dev/presentation/components/EnvViewerSetting.d.ts +20 -0
- package/dist/domains/dev/presentation/components/StorageClearSetting.d.ts +13 -0
- package/dist/domains/dev/presentation/screens/EnvViewerScreen.d.ts +12 -0
- package/dist/domains/dev/types.d.ts +22 -0
- package/dist/domains/disclaimer/index.d.ts +17 -0
- package/dist/domains/disclaimer/presentation/components/DisclaimerCard.d.ts +14 -0
- package/dist/domains/disclaimer/presentation/components/DisclaimerModal.d.ts +12 -0
- package/dist/domains/disclaimer/presentation/components/DisclaimerSetting.d.ts +34 -0
- package/dist/domains/disclaimer/presentation/screens/DisclaimerScreen.d.ts +27 -0
- package/dist/domains/faqs/domain/entities/FAQEntity.d.ts +21 -0
- package/dist/domains/faqs/domain/services/FAQSearchService.d.ts +12 -0
- package/dist/domains/faqs/index.d.ts +8 -0
- package/dist/domains/faqs/presentation/components/FAQCategory.d.ts +21 -0
- package/dist/domains/faqs/presentation/components/FAQEmptyState.d.ts +20 -0
- package/dist/domains/faqs/presentation/components/FAQItem.d.ts +24 -0
- package/dist/domains/faqs/presentation/components/FAQSearchBar.d.ts +18 -0
- package/dist/domains/faqs/presentation/components/index.d.ts +11 -0
- package/dist/domains/faqs/presentation/hooks/index.d.ts +5 -0
- package/dist/domains/faqs/presentation/hooks/useFAQExpansion.d.ts +12 -0
- package/dist/domains/faqs/presentation/hooks/useFAQSearch.d.ts +12 -0
- package/dist/domains/faqs/presentation/screens/FAQScreen.d.ts +33 -0
- package/dist/domains/feedback/domain/entities/FeedbackEntity.d.ts +25 -0
- package/dist/domains/feedback/domain/repositories/IFeedbackRepository.d.ts +20 -0
- package/dist/domains/feedback/index.d.ts +10 -0
- package/dist/domains/feedback/presentation/components/FeedbackForm.d.ts +7 -0
- package/dist/domains/feedback/presentation/components/FeedbackForm.styles.d.ts +48 -0
- package/dist/domains/feedback/presentation/components/FeedbackFormProps.d.ts +26 -0
- package/dist/domains/feedback/presentation/components/FeedbackModal.d.ts +23 -0
- package/dist/domains/feedback/presentation/components/SupportSection.d.ts +62 -0
- package/dist/domains/feedback/presentation/hooks/useFeedbackForm.d.ts +19 -0
- package/dist/domains/feedback/presentation/screens/FeatureRequestScreen.d.ts +2 -0
- package/dist/domains/gamification/components/AchievementCard.d.ts +23 -0
- package/dist/domains/gamification/components/AchievementItem.d.ts +7 -0
- package/dist/domains/gamification/components/AchievementToast.d.ts +21 -0
- package/dist/domains/gamification/components/GamificationScreen/AchievementsList.d.ts +17 -0
- package/dist/domains/gamification/components/GamificationScreen/GamificationScreen.d.ts +11 -0
- package/dist/domains/gamification/components/GamificationScreen/GamificationScreenWithConfig.d.ts +11 -0
- package/dist/domains/gamification/components/GamificationScreen/StatsGrid.d.ts +16 -0
- package/dist/domains/gamification/components/GamificationScreen/index.d.ts +17 -0
- package/dist/domains/gamification/components/GamificationScreen/styles.d.ts +40 -0
- package/dist/domains/gamification/components/GamificationScreen/types.d.ts +42 -0
- package/dist/domains/gamification/components/LevelProgress.d.ts +27 -0
- package/dist/domains/gamification/components/PointsBadge.d.ts +16 -0
- package/dist/domains/gamification/components/StatsCard.d.ts +20 -0
- package/dist/domains/gamification/components/StreakDisplay.d.ts +21 -0
- package/dist/domains/gamification/components/index.d.ts +14 -0
- package/dist/domains/gamification/components/styles/achievementItemStyles.d.ts +71 -0
- package/dist/domains/gamification/components/types/AchievementItemProps.d.ts +22 -0
- package/dist/domains/gamification/hooks/useGamification.d.ts +22 -0
- package/dist/domains/gamification/index.d.ts +13 -0
- package/dist/domains/gamification/store/gamificationStore.d.ts +6 -0
- package/dist/domains/gamification/types/index.d.ts +99 -0
- package/dist/domains/gamification/utils/calculations.d.ts +10 -0
- package/dist/domains/legal/domain/entities/LegalConfig.d.ts +28 -0
- package/dist/domains/legal/domain/services/ContentValidationService.d.ts +19 -0
- package/dist/domains/legal/domain/services/StyleCacheService.d.ts +38 -0
- package/dist/domains/legal/domain/services/UrlHandlerService.d.ts +32 -0
- package/dist/domains/legal/index.d.ts +8 -0
- package/dist/domains/legal/presentation/components/LegalDocumentsList.d.ts +21 -0
- package/dist/domains/legal/presentation/components/LegalItem.d.ts +35 -0
- package/dist/domains/legal/presentation/components/LegalScreenHeader.d.ts +12 -0
- package/dist/domains/legal/presentation/components/LegalSection.d.ts +14 -0
- package/dist/domains/legal/presentation/screens/LegalContentScreen.d.ts +19 -0
- package/dist/domains/legal/presentation/screens/LegalScreen.d.ts +24 -0
- package/dist/domains/legal/presentation/screens/PrivacyPolicyScreen.d.ts +15 -0
- package/dist/domains/legal/presentation/screens/TermsOfServiceScreen.d.ts +15 -0
- package/dist/domains/localization/domain/repositories/ILocalizationRepository.d.ts +16 -0
- package/dist/domains/localization/index.d.ts +16 -0
- package/dist/domains/localization/infrastructure/components/LanguageSwitcher.d.ts +19 -0
- package/dist/domains/localization/infrastructure/components/LanguageSwitcher.styles.d.ts +37 -0
- package/dist/domains/localization/infrastructure/components/useLanguageNavigation.d.ts +4 -0
- package/dist/domains/localization/infrastructure/components/useLanguageSwitcher.d.ts +13 -0
- package/dist/domains/localization/infrastructure/config/DeviceLocale.d.ts +10 -0
- package/dist/domains/localization/infrastructure/config/I18nInitializer.d.ts +14 -0
- package/dist/domains/localization/infrastructure/config/LanguageQuery.d.ts +10 -0
- package/dist/domains/localization/infrastructure/config/LocaleMapping.d.ts +5 -0
- package/dist/domains/localization/infrastructure/config/NamespaceResolver.d.ts +11 -0
- package/dist/domains/localization/infrastructure/config/ResourceBuilder.d.ts +10 -0
- package/dist/domains/localization/infrastructure/config/TranslationLoader.d.ts +16 -0
- package/dist/domains/localization/infrastructure/config/constants/defaultLanguages.d.ts +6 -0
- package/dist/domains/localization/infrastructure/config/i18n.d.ts +7 -0
- package/dist/domains/localization/infrastructure/config/languages.d.ts +7 -0
- package/dist/domains/localization/infrastructure/hooks/useLanguageSelection.d.ts +11 -0
- package/dist/domains/localization/infrastructure/hooks/useLocalization.d.ts +12 -0
- package/dist/domains/localization/infrastructure/hooks/useTranslation.d.ts +23 -0
- package/dist/domains/localization/infrastructure/repository/LanguageRepository.d.ts +18 -0
- package/dist/domains/localization/infrastructure/storage/LanguageInitializer.d.ts +20 -0
- package/dist/domains/localization/infrastructure/storage/LanguageSwitcher.d.ts +16 -0
- package/dist/domains/localization/infrastructure/storage/LocalizationStore.d.ts +6 -0
- package/dist/domains/localization/infrastructure/storage/localizationStoreUtils.d.ts +44 -0
- package/dist/domains/localization/infrastructure/storage/types/Language.d.ts +12 -0
- package/dist/domains/localization/infrastructure/storage/types/LocalizationState.d.ts +22 -0
- package/dist/domains/localization/presentation/components/LanguageItem.d.ts +23 -0
- package/dist/domains/localization/presentation/components/LanguageItem.styles.d.ts +30 -0
- package/dist/domains/localization/presentation/components/LanguageSection.d.ts +15 -0
- package/dist/domains/localization/presentation/providers/LocalizationManager.d.ts +12 -0
- package/dist/domains/localization/presentation/screens/LanguageSelectionScreen.d.ts +7 -0
- package/dist/domains/localization/presentation/screens/LanguageSelectionScreen.styles.d.ts +7 -0
- package/dist/domains/localization/presentation/screens/LanguageSelectionScreen.types.d.ts +26 -0
- package/dist/domains/notifications/index.d.ts +46 -0
- package/dist/domains/notifications/infrastructure/config/notificationsConfig.d.ts +19 -0
- package/dist/domains/notifications/infrastructure/hooks/useNotificationSettings.d.ts +8 -0
- package/dist/domains/notifications/infrastructure/services/NotificationBadgeManager.d.ts +4 -0
- package/dist/domains/notifications/infrastructure/services/NotificationManager.d.ts +23 -0
- package/dist/domains/notifications/infrastructure/services/NotificationPermissions.d.ts +5 -0
- package/dist/domains/notifications/infrastructure/services/NotificationScheduler.d.ts +7 -0
- package/dist/domains/notifications/infrastructure/services/NotificationService.d.ts +31 -0
- package/dist/domains/notifications/infrastructure/services/types.d.ts +147 -0
- package/dist/domains/notifications/infrastructure/storage/UnifiedNotificationStore.d.ts +42 -0
- package/dist/domains/notifications/infrastructure/utils/idGenerator.d.ts +6 -0
- package/dist/domains/notifications/infrastructure/utils/triggerBuilder.d.ts +6 -0
- package/dist/domains/notifications/presentation/components/NotificationsSection.d.ts +16 -0
- package/dist/domains/notifications/presentation/components/RemindersNavRow.d.ts +12 -0
- package/dist/domains/notifications/presentation/components/RemindersNavRow.styles.d.ts +34 -0
- package/dist/domains/notifications/presentation/components/SettingRow.d.ts +14 -0
- package/dist/domains/notifications/presentation/hooks/useNotificationSettingsUI.d.ts +13 -0
- package/dist/domains/notifications/presentation/hooks/useTimePicker.d.ts +21 -0
- package/dist/domains/notifications/presentation/screens/NotificationSettingsScreen.d.ts +12 -0
- package/dist/domains/notifications/presentation/screens/NotificationSettingsScreen.styles.d.ts +26 -0
- package/dist/domains/notifications/presentation/screens/NotificationsScreen.d.ts +18 -0
- package/dist/domains/notifications/quietHours/infrastructure/hooks/useQuietHoursActions.d.ts +13 -0
- package/dist/domains/notifications/quietHours/presentation/components/QuietHoursCard.d.ts +14 -0
- package/dist/domains/notifications/reminders/infrastructure/config/reminderPresets.d.ts +24 -0
- package/dist/domains/notifications/reminders/infrastructure/hooks/useReminderActions.d.ts +11 -0
- package/dist/domains/notifications/reminders/presentation/components/FormButton.d.ts +12 -0
- package/dist/domains/notifications/reminders/presentation/components/FrequencySelector.d.ts +14 -0
- package/dist/domains/notifications/reminders/presentation/components/ReminderForm.constants.d.ts +28 -0
- package/dist/domains/notifications/reminders/presentation/components/ReminderForm.d.ts +7 -0
- package/dist/domains/notifications/reminders/presentation/components/ReminderForm.styles.d.ts +31 -0
- package/dist/domains/notifications/reminders/presentation/components/ReminderItem.d.ts +20 -0
- package/dist/domains/notifications/reminders/presentation/components/TimePresetSelector.d.ts +20 -0
- package/dist/domains/notifications/reminders/presentation/components/WeekdaySelector.d.ts +11 -0
- package/dist/domains/notifications/reminders/presentation/screens/ReminderListScreen.d.ts +13 -0
- package/dist/domains/rating/application/services/RatingService.d.ts +33 -0
- package/dist/domains/rating/domain/entities/Rating.d.ts +15 -0
- package/dist/domains/rating/domain/entities/RatingConfig.d.ts +120 -0
- package/dist/domains/rating/index.d.ts +12 -0
- package/dist/domains/rating/infrastructure/storage/RatingStorage.d.ts +50 -0
- package/dist/domains/rating/presentation/components/RatingPromptModal.d.ts +16 -0
- package/dist/domains/rating/presentation/components/StarRating.d.ts +13 -0
- package/dist/domains/rating/presentation/hooks/useAppRating.d.ts +9 -0
- package/dist/domains/video-tutorials/index.d.ts +18 -0
- package/dist/domains/video-tutorials/presentation/components/VideoTutorialCard.d.ts +13 -0
- package/dist/domains/video-tutorials/presentation/components/VideoTutorialSection.d.ts +25 -0
- package/dist/domains/video-tutorials/presentation/screens/VideoTutorialsScreen.d.ts +25 -0
- package/dist/domains/video-tutorials/types/index.d.ts +26 -0
- package/dist/index.d.ts +41 -0
- package/dist/infrastructure/repositories/SettingsRepository.d.ts +12 -0
- package/dist/infrastructure/services/SettingsService.d.ts +14 -0
- package/dist/infrastructure/utils/configFactory.d.ts +39 -0
- package/dist/infrastructure/utils/constants/textLimits.d.ts +16 -0
- package/dist/infrastructure/utils/sanitizers.d.ts +13 -0
- package/dist/infrastructure/utils/validation/core.d.ts +8 -0
- package/dist/infrastructure/utils/validation/formValidators.d.ts +26 -0
- package/dist/infrastructure/utils/validation/index.d.ts +5 -0
- package/dist/infrastructure/utils/validators.d.ts +21 -0
- package/dist/presentation/components/SettingsFooter.d.ts +7 -0
- package/dist/presentation/components/SettingsItemCard.d.ts +22 -0
- package/dist/presentation/components/SettingsNavigationItem.d.ts +67 -0
- package/dist/presentation/components/SettingsSection.d.ts +6 -0
- package/dist/presentation/components/settings/SettingsItemCardContent.d.ts +12 -0
- package/dist/presentation/components/settings/SettingsItemCardRightElement.d.ts +11 -0
- package/dist/presentation/components/settings/SettingsItemCardSection.d.ts +5 -0
- package/dist/presentation/hooks/mutations/useSettingsMutations.d.ts +20 -0
- package/dist/presentation/hooks/queries/useSettingsQuery.d.ts +7 -0
- package/dist/presentation/hooks/useSettings.d.ts +26 -0
- package/dist/presentation/hooks/useSettingsScreenConfig.d.ts +41 -0
- package/dist/presentation/navigation/SettingsStackNavigator.d.ts +9 -0
- package/dist/presentation/navigation/hooks/index.d.ts +5 -0
- package/dist/presentation/navigation/hooks/useNavigationHandlers.d.ts +14 -0
- package/dist/presentation/navigation/hooks/useSettingsNavigation.d.ts +22 -0
- package/dist/presentation/navigation/hooks/useSettingsScreens.d.ts +12 -0
- package/dist/presentation/navigation/types.d.ts +135 -0
- package/dist/presentation/navigation/utils/index.d.ts +5 -0
- package/dist/presentation/navigation/utils/navigationHelpers.d.ts +13 -0
- package/dist/presentation/navigation/utils/navigationTranslations.d.ts +35 -0
- package/dist/presentation/screens/AppearanceScreen.d.ts +6 -0
- package/dist/presentation/screens/SettingsScreen.d.ts +49 -0
- package/dist/presentation/screens/components/SettingsContent.d.ts +3 -0
- package/dist/presentation/screens/components/SettingsHeader.d.ts +8 -0
- package/dist/presentation/screens/components/sections/CustomSettingsList.d.ts +7 -0
- package/dist/presentation/screens/components/sections/FeatureSettingsSection.d.ts +13 -0
- package/dist/presentation/screens/components/sections/IdentitySettingsSection.d.ts +12 -0
- package/dist/presentation/screens/components/sections/ProfileSectionLoader.d.ts +17 -0
- package/dist/presentation/screens/components/sections/SupportSettingsSection.d.ts +13 -0
- package/dist/presentation/screens/components/types/SettingsContentProps.d.ts +47 -0
- package/dist/presentation/screens/components/utils/featureChecker.d.ts +10 -0
- package/dist/presentation/screens/hooks/useFeatureDetection.d.ts +28 -0
- package/dist/presentation/screens/hooks/useSettingsScreen.d.ts +36 -0
- package/dist/presentation/screens/types/BaseTypes.d.ts +11 -0
- package/dist/presentation/screens/types/ContentConfig.d.ts +76 -0
- package/dist/presentation/screens/types/CustomSection.d.ts +38 -0
- package/dist/presentation/screens/types/SettingsConfig.d.ts +122 -0
- package/dist/presentation/screens/types/SettingsTranslations.d.ts +159 -0
- package/dist/presentation/screens/types/UserFeatureConfig.d.ts +178 -0
- package/dist/presentation/screens/types/index.d.ts +11 -0
- package/dist/presentation/screens/utils/normalizeConfig.d.ts +68 -0
- package/dist/presentation/utils/accountConfigUtils.d.ts +34 -0
- package/dist/presentation/utils/config-creators/base-configs.d.ts +26 -0
- package/dist/presentation/utils/config-creators/feature-configs.d.ts +17 -0
- package/dist/presentation/utils/config-creators/index.d.ts +7 -0
- package/dist/presentation/utils/config-creators/support-configs.d.ts +19 -0
- package/dist/presentation/utils/config-creators/types.d.ts +20 -0
- package/dist/presentation/utils/faqTranslator.d.ts +3 -0
- package/dist/presentation/utils/index.d.ts +8 -0
- package/dist/presentation/utils/screenFactory.d.ts +26 -0
- package/dist/presentation/utils/settingsConfigFactory.d.ts +33 -0
- package/dist/presentation/utils/userProfileUtils.d.ts +20 -0
- package/dist/utils/appUtils.d.ts +4 -0
- package/dist/utils/devUtils.d.ts +31 -0
- package/dist/utils/errorUtils.d.ts +22 -0
- package/dist/utils/hooks/useAsyncStateUpdate.d.ts +35 -0
- package/dist/utils/hooks/useMountSafety.d.ts +1 -0
- package/package.json +1 -1
- package/src/domains/feedback/presentation/screens/FeatureRequestScreen.tsx +449 -0
- package/src/presentation/navigation/hooks/useSettingsScreens.ts +29 -9
- package/src/presentation/navigation/types.ts +1 -0
- package/src/presentation/screens/components/sections/SupportSettingsSection.tsx +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legal Config
|
|
3
|
+
* Configuration for the Legal section
|
|
4
|
+
*/
|
|
5
|
+
export interface LegalConfig {
|
|
6
|
+
/** Section title */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** Section description */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Navigation route name */
|
|
11
|
+
route?: string;
|
|
12
|
+
/** Default navigation route name */
|
|
13
|
+
defaultRoute?: string;
|
|
14
|
+
/** Privacy Policy title */
|
|
15
|
+
privacyTitle?: string;
|
|
16
|
+
/** Terms of Service title */
|
|
17
|
+
termsTitle?: string;
|
|
18
|
+
/** EULA title */
|
|
19
|
+
eulaTitle?: string;
|
|
20
|
+
/** Privacy Policy URL */
|
|
21
|
+
privacyUrl?: string;
|
|
22
|
+
/** Terms of Service URL */
|
|
23
|
+
termsUrl?: string;
|
|
24
|
+
/** EULA URL */
|
|
25
|
+
eulaUrl?: string;
|
|
26
|
+
/** Custom onPress handler (overrides navigation) */
|
|
27
|
+
onPress?: () => void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content Validation Service
|
|
3
|
+
* Single Responsibility: Validate content and URL requirements
|
|
4
|
+
* Extracted from screens to follow SOLID principles
|
|
5
|
+
*/
|
|
6
|
+
export declare class ContentValidationService {
|
|
7
|
+
/**
|
|
8
|
+
* Check if content is valid
|
|
9
|
+
*/
|
|
10
|
+
static hasValidContent(content?: string, url?: string): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Check if URL section should be shown
|
|
13
|
+
*/
|
|
14
|
+
static shouldShowUrlSection(url?: string, onUrlPress?: () => void): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Check if legal item should be shown
|
|
17
|
+
*/
|
|
18
|
+
static shouldShowLegalItem(onPress?: () => void, title?: string): boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Style Cache Service
|
|
3
|
+
* Single Responsibility: Manage style caching to prevent memory leaks
|
|
4
|
+
* Extracted from components to follow SOLID principles
|
|
5
|
+
*/
|
|
6
|
+
import type { DesignTokens } from "@umituz/react-native-design-system/theme";
|
|
7
|
+
export interface StyleCacheOptions {
|
|
8
|
+
maxSize?: number;
|
|
9
|
+
cacheKey?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class StyleCacheService {
|
|
12
|
+
private static caches;
|
|
13
|
+
private static readonly DEFAULT_MAX_SIZE;
|
|
14
|
+
/**
|
|
15
|
+
* Get or create cached styles
|
|
16
|
+
*/
|
|
17
|
+
static getCachedStyles<T>(cacheName: string, cacheKey: string, styleFactory: () => T, maxSize?: number): T;
|
|
18
|
+
/**
|
|
19
|
+
* Clear specific cache
|
|
20
|
+
*/
|
|
21
|
+
static clearCache(cacheName: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* Clear all caches
|
|
24
|
+
*/
|
|
25
|
+
static clearAllCaches(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Get cache size
|
|
28
|
+
*/
|
|
29
|
+
static getCacheSize(cacheName: string): number;
|
|
30
|
+
/**
|
|
31
|
+
* Create cache key from design tokens
|
|
32
|
+
*/
|
|
33
|
+
static createTokenCacheKey(tokens: DesignTokens, additionalKeys?: Record<string, any>): string;
|
|
34
|
+
/**
|
|
35
|
+
* Create simple cache key
|
|
36
|
+
*/
|
|
37
|
+
static createSimpleCacheKey(key: string): string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* URL Handler Service
|
|
3
|
+
* Single Responsibility: Handle URL operations
|
|
4
|
+
* Extracted from screens to follow SOLID principles
|
|
5
|
+
* Performance optimized with caching and error handling
|
|
6
|
+
*/
|
|
7
|
+
export declare class UrlHandlerService {
|
|
8
|
+
/**
|
|
9
|
+
* Get Linking module - using static import for stability
|
|
10
|
+
*/
|
|
11
|
+
private static getLinkingModule;
|
|
12
|
+
/**
|
|
13
|
+
* Clean cache to prevent memory leaks
|
|
14
|
+
*/
|
|
15
|
+
private static cleanCache;
|
|
16
|
+
/**
|
|
17
|
+
* Validate URL format to prevent invalid operations
|
|
18
|
+
*/
|
|
19
|
+
private static isValidUrl;
|
|
20
|
+
/**
|
|
21
|
+
* Open URL in external browser with performance optimizations
|
|
22
|
+
*/
|
|
23
|
+
static openUrl(url: string): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Check if URL can be opened with caching
|
|
26
|
+
*/
|
|
27
|
+
static canOpenUrl(url: string): Promise<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Clear all caches (useful for testing or memory cleanup)
|
|
30
|
+
*/
|
|
31
|
+
static clearCache(): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legal Domain
|
|
3
|
+
* Terms, privacy policy, licenses
|
|
4
|
+
*/
|
|
5
|
+
export * from './presentation/screens/LegalScreen';
|
|
6
|
+
export * from './presentation/screens/PrivacyPolicyScreen';
|
|
7
|
+
export * from './presentation/screens/TermsOfServiceScreen';
|
|
8
|
+
export { LegalContentScreen } from './presentation/screens/LegalContentScreen';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legal Documents List Component
|
|
3
|
+
*
|
|
4
|
+
* Displays list of legal documents (Privacy, Terms, EULA).
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
interface LegalDocumentsListProps {
|
|
8
|
+
documentsHeader?: string;
|
|
9
|
+
privacyTitle?: string;
|
|
10
|
+
privacyDescription?: string;
|
|
11
|
+
termsTitle?: string;
|
|
12
|
+
termsDescription?: string;
|
|
13
|
+
eulaTitle?: string;
|
|
14
|
+
eulaDescription?: string;
|
|
15
|
+
onPrivacyPress?: () => void;
|
|
16
|
+
onTermsPress?: () => void;
|
|
17
|
+
onEulaPress?: () => void;
|
|
18
|
+
eulaUrl?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const LegalDocumentsList: React.FC<LegalDocumentsListProps>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LegalItem Component
|
|
3
|
+
*
|
|
4
|
+
* Single Responsibility: Display a single legal document item
|
|
5
|
+
* Reusable component for Privacy Policy, Terms of Service, and EULA items
|
|
6
|
+
*/
|
|
7
|
+
import React from "react";
|
|
8
|
+
export interface LegalItemProps {
|
|
9
|
+
/**
|
|
10
|
+
* Icon name from theme library (Ionicons)
|
|
11
|
+
* If not provided, will use emoji icon
|
|
12
|
+
*/
|
|
13
|
+
iconName?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Icon emoji or text (fallback if iconName not provided)
|
|
16
|
+
*/
|
|
17
|
+
icon?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Title text
|
|
20
|
+
*/
|
|
21
|
+
title: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optional description text
|
|
24
|
+
*/
|
|
25
|
+
description?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Callback when item is pressed
|
|
28
|
+
*/
|
|
29
|
+
onPress?: () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Test ID for E2E testing
|
|
32
|
+
*/
|
|
33
|
+
testID?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare const LegalItem: React.FC<LegalItemProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legal Screen Header Component
|
|
3
|
+
*
|
|
4
|
+
* Displays title and description for legal screen.
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
interface LegalScreenHeaderProps {
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const LegalScreenHeader: React.FC<LegalScreenHeaderProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
3
|
+
import { LegalConfig } from '../../domain/entities/LegalConfig';
|
|
4
|
+
export interface LegalSectionProps {
|
|
5
|
+
config?: LegalConfig;
|
|
6
|
+
onPress?: () => void;
|
|
7
|
+
containerStyle?: ViewStyle;
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
sectionTitle?: string;
|
|
11
|
+
noBackground?: boolean;
|
|
12
|
+
hideMargin?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const LegalSection: React.FC<LegalSectionProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Legal Content Screen Component
|
|
3
|
+
* Shared logic for legal document screens
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { StyleSheet } from "react-native";
|
|
7
|
+
import { type DesignTokens } from "@umituz/react-native-design-system/theme";
|
|
8
|
+
export interface LegalContentScreenProps {
|
|
9
|
+
content?: string;
|
|
10
|
+
url?: string;
|
|
11
|
+
title: string;
|
|
12
|
+
viewOnlineText?: string;
|
|
13
|
+
openText?: string;
|
|
14
|
+
onUrlPress?: () => void;
|
|
15
|
+
testID?: string;
|
|
16
|
+
styleCacheKey: string;
|
|
17
|
+
createStyles: (tokens: DesignTokens) => ReturnType<typeof StyleSheet.create>;
|
|
18
|
+
}
|
|
19
|
+
export declare const LegalContentScreen: React.FC<LegalContentScreenProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legal Screen Component
|
|
3
|
+
*
|
|
4
|
+
* Single Responsibility: Layout and orchestration of legal documents list
|
|
5
|
+
* Uses ScreenLayout from design system for consistent UI.
|
|
6
|
+
*/
|
|
7
|
+
import React from "react";
|
|
8
|
+
export interface LegalScreenProps {
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
documentsHeader?: string;
|
|
12
|
+
privacyTitle?: string;
|
|
13
|
+
privacyDescription?: string;
|
|
14
|
+
termsTitle?: string;
|
|
15
|
+
termsDescription?: string;
|
|
16
|
+
eulaTitle?: string;
|
|
17
|
+
eulaDescription?: string;
|
|
18
|
+
onPrivacyPress?: () => void;
|
|
19
|
+
onTermsPress?: () => void;
|
|
20
|
+
onEulaPress?: () => void;
|
|
21
|
+
eulaUrl?: string;
|
|
22
|
+
testID?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const LegalScreen: React.FC<LegalScreenProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Privacy Policy Screen Component
|
|
3
|
+
* Display Privacy Policy content
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
export interface PrivacyPolicyScreenProps {
|
|
7
|
+
content?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
title: string;
|
|
10
|
+
viewOnlineText?: string;
|
|
11
|
+
openText?: string;
|
|
12
|
+
onUrlPress?: () => void;
|
|
13
|
+
testID?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const PrivacyPolicyScreen: React.FC<PrivacyPolicyScreenProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terms of Service Screen Component
|
|
3
|
+
* Display Terms of Service content
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
export interface TermsOfServiceScreenProps {
|
|
7
|
+
content?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
title: string;
|
|
10
|
+
viewOnlineText?: string;
|
|
11
|
+
openText?: string;
|
|
12
|
+
onUrlPress?: () => void;
|
|
13
|
+
testID?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const TermsOfServiceScreen: React.FC<TermsOfServiceScreenProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Localization Repository Interface
|
|
3
|
+
* Defines language configuration and types
|
|
4
|
+
*/
|
|
5
|
+
export interface Language {
|
|
6
|
+
code: string;
|
|
7
|
+
name: string;
|
|
8
|
+
nativeName: string;
|
|
9
|
+
flag?: string;
|
|
10
|
+
isRTL?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ILocalizationRepository {
|
|
13
|
+
getSupportedLanguages(): Language[];
|
|
14
|
+
getLanguageByCode(code: string): Language | undefined;
|
|
15
|
+
isLanguageSupported(code: string): boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { LocalizationManager } from './presentation/providers/LocalizationManager';
|
|
2
|
+
export { useLocalization } from './infrastructure/hooks/useLocalization';
|
|
3
|
+
export { useLocalizationStore } from './infrastructure/storage/LocalizationStore';
|
|
4
|
+
export { useTranslationFunction } from './infrastructure/hooks/useTranslation';
|
|
5
|
+
export { useLanguageSelection } from './infrastructure/hooks/useLanguageSelection';
|
|
6
|
+
export { useLanguageSwitcher } from './infrastructure/components/useLanguageSwitcher';
|
|
7
|
+
export { useLanguageNavigation } from './infrastructure/components/useLanguageNavigation';
|
|
8
|
+
export { LanguageSwitcher } from './infrastructure/components/LanguageSwitcher';
|
|
9
|
+
export { LanguageSelectionScreen } from './presentation/screens/LanguageSelectionScreen';
|
|
10
|
+
export type { LanguageSelectionScreenProps } from './presentation/screens/LanguageSelectionScreen.types';
|
|
11
|
+
export { LanguageSection } from './presentation/components/LanguageSection';
|
|
12
|
+
export type { LanguageSectionProps, LanguageSectionConfig } from './presentation/components/LanguageSection';
|
|
13
|
+
export { default as i18n } from './infrastructure/config/i18n';
|
|
14
|
+
export { I18nInitializer } from './infrastructure/config/I18nInitializer';
|
|
15
|
+
export { DEFAULT_LANGUAGE, getLanguageByCode, isLanguageSupported, getDefaultLanguage, getDeviceLocale, searchLanguages, } from './infrastructure/config/languages';
|
|
16
|
+
export type { Language, ILocalizationRepository } from './domain/repositories/ILocalizationRepository';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Switcher Component
|
|
3
|
+
* Displays current language and allows switching
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
|
|
7
|
+
export interface LanguageSwitcherProps {
|
|
8
|
+
showName?: boolean;
|
|
9
|
+
showFlag?: boolean;
|
|
10
|
+
color?: string;
|
|
11
|
+
onPress?: () => void;
|
|
12
|
+
style?: StyleProp<ViewStyle>;
|
|
13
|
+
textStyle?: StyleProp<TextStyle>;
|
|
14
|
+
iconStyle?: StyleProp<TextStyle>;
|
|
15
|
+
testID?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
accessibilityLabel?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const LanguageSwitcher: React.FC<LanguageSwitcherProps>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Switcher Component Styles
|
|
3
|
+
*/
|
|
4
|
+
export declare const styles: {
|
|
5
|
+
container: {
|
|
6
|
+
flexDirection: "row";
|
|
7
|
+
alignItems: "center";
|
|
8
|
+
gap: number;
|
|
9
|
+
paddingHorizontal: number;
|
|
10
|
+
paddingVertical: number;
|
|
11
|
+
};
|
|
12
|
+
disabled: {
|
|
13
|
+
opacity: number;
|
|
14
|
+
};
|
|
15
|
+
flag: {
|
|
16
|
+
fontSize: number;
|
|
17
|
+
textAlign: "center";
|
|
18
|
+
};
|
|
19
|
+
languageName: {
|
|
20
|
+
fontSize: number;
|
|
21
|
+
fontWeight: "600";
|
|
22
|
+
textAlign: "center";
|
|
23
|
+
};
|
|
24
|
+
icon: {
|
|
25
|
+
fontSize: number;
|
|
26
|
+
textAlign: "center";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare const DEFAULT_CONFIG_VALUES: {
|
|
30
|
+
hitSlop: {
|
|
31
|
+
readonly top: 10;
|
|
32
|
+
readonly bottom: 10;
|
|
33
|
+
readonly left: 10;
|
|
34
|
+
readonly right: 10;
|
|
35
|
+
};
|
|
36
|
+
activeOpacity: number;
|
|
37
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Switcher Hook
|
|
3
|
+
* Manages the logic for the LanguageSwitcher component
|
|
4
|
+
*/
|
|
5
|
+
import type { Language } from '../storage/types/Language';
|
|
6
|
+
export interface UseLanguageSwitcherProps {
|
|
7
|
+
onPress?: () => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const useLanguageSwitcher: ({ onPress, disabled }: UseLanguageSwitcherProps) => {
|
|
11
|
+
currentLang: Language;
|
|
12
|
+
handlePress: () => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Device Locale Detection
|
|
3
|
+
* Detects and maps device locale to supported language
|
|
4
|
+
*/
|
|
5
|
+
export declare const DEFAULT_LANGUAGE = "en-US";
|
|
6
|
+
/**
|
|
7
|
+
* Get device locale and map it to supported language
|
|
8
|
+
* Called ONLY on first launch (when no saved language preference exists)
|
|
9
|
+
*/
|
|
10
|
+
export declare const getDeviceLocale: () => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* i18n Initializer
|
|
3
|
+
*
|
|
4
|
+
* Namespace-based i18n configuration
|
|
5
|
+
* Usage: t('namespace:key') e.g., t('common:cancel')
|
|
6
|
+
*/
|
|
7
|
+
export declare class I18nInitializer {
|
|
8
|
+
private static reactI18nextInitialized;
|
|
9
|
+
static initialize(appTranslations: Record<string, any>, languageCode?: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* Add translations at runtime
|
|
12
|
+
*/
|
|
13
|
+
static addTranslations(languageCode: string, namespaceResources: Record<string, any>): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Query Functions
|
|
3
|
+
* Provides functions to query and search languages
|
|
4
|
+
*/
|
|
5
|
+
import type { Language } from '../storage/types/Language';
|
|
6
|
+
export declare const getSupportedLanguages: () => Language[];
|
|
7
|
+
export declare const getLanguageByCode: (code: string) => Language | undefined;
|
|
8
|
+
export declare const isLanguageSupported: (code: string) => boolean;
|
|
9
|
+
export declare const getDefaultLanguage: () => Language;
|
|
10
|
+
export declare const searchLanguages: (query: string) => Language[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Namespace Resolver
|
|
3
|
+
* Resolves available namespaces from translations
|
|
4
|
+
*/
|
|
5
|
+
export declare class NamespaceResolver {
|
|
6
|
+
/**
|
|
7
|
+
* Get all available namespaces from package and app translations
|
|
8
|
+
*/
|
|
9
|
+
static getNamespaces(appTranslations: Record<string, any>, languageCode: string): string[];
|
|
10
|
+
static getDefaultNamespace(): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource Builder
|
|
3
|
+
* Builds i18n resources from package and app translations
|
|
4
|
+
*/
|
|
5
|
+
export declare class ResourceBuilder {
|
|
6
|
+
/**
|
|
7
|
+
* Build resources with package + app translations
|
|
8
|
+
*/
|
|
9
|
+
static buildResources(appTranslations: Record<string, any>, languageCode: string): Record<string, Record<string, any>>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translation Loader
|
|
3
|
+
*
|
|
4
|
+
* Loads package translations
|
|
5
|
+
*/
|
|
6
|
+
export declare class TranslationLoader {
|
|
7
|
+
/**
|
|
8
|
+
* Load package translations (empty by default - apps provide their own)
|
|
9
|
+
*/
|
|
10
|
+
static loadPackageTranslations(): Record<string, Record<string, unknown>>;
|
|
11
|
+
/**
|
|
12
|
+
* Deep merge translations (override wins)
|
|
13
|
+
*/
|
|
14
|
+
static mergeTranslations(base: Record<string, unknown>, override: Record<string, unknown>): Record<string, unknown>;
|
|
15
|
+
private static isObject;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Languages Configuration - Main Export
|
|
3
|
+
* Central export point for all language-related functionality
|
|
4
|
+
*/
|
|
5
|
+
export { DEFAULT_LANGUAGE, getDeviceLocale } from './DeviceLocale';
|
|
6
|
+
export { getSupportedLanguages, getLanguageByCode, isLanguageSupported, getDefaultLanguage, searchLanguages, } from './LanguageQuery';
|
|
7
|
+
export { LOCALE_MAPPING } from './LocaleMapping';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Selection Hook
|
|
3
|
+
* Manages language selection state and filtering with debounce
|
|
4
|
+
*/
|
|
5
|
+
export declare const useLanguageSelection: () => {
|
|
6
|
+
searchQuery: string;
|
|
7
|
+
setSearchQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
8
|
+
selectedCode: string;
|
|
9
|
+
filteredLanguages: import("../storage/types/Language").Language[];
|
|
10
|
+
handleLanguageSelect: (code: string, onComplete?: () => void) => Promise<void>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Language } from '../../domain/repositories/ILocalizationRepository';
|
|
2
|
+
export declare const useLocalization: () => {
|
|
3
|
+
t: (key: string, defaultValueOrOptions?: string | import("./useTranslation").TranslationOptions) => string;
|
|
4
|
+
currentLanguage: string;
|
|
5
|
+
currentLanguageObject: Language;
|
|
6
|
+
isRTL: boolean;
|
|
7
|
+
isInitialized: boolean;
|
|
8
|
+
setLanguage: (languageCode: string) => Promise<void>;
|
|
9
|
+
initialize: () => Promise<void>;
|
|
10
|
+
isLanguageSupported: (code: string) => boolean;
|
|
11
|
+
supportedLanguages: import("../storage/types/Language").Language[];
|
|
12
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translation Hook
|
|
3
|
+
*
|
|
4
|
+
* Provides translation function with proper language change reactivity.
|
|
5
|
+
* Keys use dot notation only: "namespace.key.subkey"
|
|
6
|
+
* The first segment before the dot is the i18next namespace.
|
|
7
|
+
*/
|
|
8
|
+
export interface TranslationOptions {
|
|
9
|
+
count?: number;
|
|
10
|
+
ns?: string | string[];
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Hook for translation functionality.
|
|
16
|
+
* Uses react-i18next for automatic language change reactivity.
|
|
17
|
+
*
|
|
18
|
+
* Keys must use dot notation: t('namespace.key.subkey')
|
|
19
|
+
* The first segment is the i18next namespace: t('common.ok'), t('settings.title')
|
|
20
|
+
*/
|
|
21
|
+
export declare const useTranslationFunction: () => {
|
|
22
|
+
t: (key: string, defaultValueOrOptions?: string | TranslationOptions) => string;
|
|
23
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Repository
|
|
3
|
+
* Manages language data with repository pattern
|
|
4
|
+
* Provides dynamic language management for multiple applications
|
|
5
|
+
*/
|
|
6
|
+
import type { Language } from '../storage/types/Language';
|
|
7
|
+
declare class LanguageRepository {
|
|
8
|
+
private languages;
|
|
9
|
+
registerLanguages(languages: Language[]): void;
|
|
10
|
+
getLanguages(): Language[];
|
|
11
|
+
clearLanguages(): void;
|
|
12
|
+
getLanguageByCode(code: string): Language | undefined;
|
|
13
|
+
searchLanguages(query: string): Language[];
|
|
14
|
+
isLanguageSupported(code: string): boolean;
|
|
15
|
+
getDefaultLanguage(): Language;
|
|
16
|
+
}
|
|
17
|
+
export declare const languageRepository: LanguageRepository;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Initializer
|
|
3
|
+
*
|
|
4
|
+
* Handles the initialization of localization system
|
|
5
|
+
* - Device locale detection
|
|
6
|
+
* - Language validation and fallback
|
|
7
|
+
* - i18n setup
|
|
8
|
+
*/
|
|
9
|
+
export declare class LanguageInitializer {
|
|
10
|
+
/**
|
|
11
|
+
* Initialize localization system
|
|
12
|
+
*/
|
|
13
|
+
static initialize(): Promise<{
|
|
14
|
+
languageCode: string;
|
|
15
|
+
isRTL: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
private static determineLanguageCode;
|
|
18
|
+
private static validateAndSetupLanguage;
|
|
19
|
+
private static setupFallbackLanguage;
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Switcher
|
|
3
|
+
*
|
|
4
|
+
* Handles switching between languages
|
|
5
|
+
* - Language validation
|
|
6
|
+
* - Persistence
|
|
7
|
+
*/
|
|
8
|
+
export declare class LanguageSwitcher {
|
|
9
|
+
/**
|
|
10
|
+
* Switch to a new language
|
|
11
|
+
*/
|
|
12
|
+
static switchLanguage(languageCode: string): Promise<{
|
|
13
|
+
languageCode: string;
|
|
14
|
+
isRTL: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Localization Store
|
|
3
|
+
* Manages localization state using createStore pattern for consistency
|
|
4
|
+
*/
|
|
5
|
+
import type { LocalizationState, LocalizationActions, LocalizationGetters } from "./types/LocalizationState";
|
|
6
|
+
export declare const useLocalizationStore: import("zustand").UseBoundStore<import("zustand").StoreApi<LocalizationState & LocalizationActions & LocalizationGetters>>;
|