@umituz/react-native-settings 5.3.30 → 5.3.32
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/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 +134 -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 +20 -18
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Screen Factory Utilities
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for creating stack screen configurations.
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
import type { StackScreen } from "@umituz/react-native-design-system/molecules";
|
|
8
|
+
import type { AdditionalScreen } from "../navigation/types";
|
|
9
|
+
/**
|
|
10
|
+
* Create a screen with props
|
|
11
|
+
*/
|
|
12
|
+
export declare function createScreenWithProps<P>(name: string, component: React.ComponentType<P>, props: P, options?: {
|
|
13
|
+
headerShown?: boolean;
|
|
14
|
+
}): StackScreen;
|
|
15
|
+
/**
|
|
16
|
+
* Convert additional screen to stack screen
|
|
17
|
+
*/
|
|
18
|
+
export declare function convertAdditionalScreen(screen: AdditionalScreen): StackScreen;
|
|
19
|
+
/**
|
|
20
|
+
* Create conditional screen
|
|
21
|
+
*/
|
|
22
|
+
export declare function createConditionalScreen(condition: boolean, screenFactory: () => StackScreen): StackScreen | null;
|
|
23
|
+
/**
|
|
24
|
+
* Combine screens excluding null values
|
|
25
|
+
*/
|
|
26
|
+
export declare function combineScreens(...screens: (StackScreen | null | StackScreen[])[]): StackScreen[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings Config Factory Utility
|
|
3
|
+
* Creates settings configuration based on feature flags
|
|
4
|
+
*/
|
|
5
|
+
import type { FeedbackFormData } from "./config-creators/types";
|
|
6
|
+
import type { SettingsConfig } from "../screens/types";
|
|
7
|
+
export interface SettingsConfigFactoryParams {
|
|
8
|
+
onFeedbackSubmit: (data: FeedbackFormData) => Promise<void>;
|
|
9
|
+
handleRatePress: () => void;
|
|
10
|
+
appStoreUrl: string;
|
|
11
|
+
isPremium: boolean;
|
|
12
|
+
features: {
|
|
13
|
+
notifications: boolean;
|
|
14
|
+
appearance: boolean;
|
|
15
|
+
language: boolean;
|
|
16
|
+
feedback: boolean;
|
|
17
|
+
rating: boolean;
|
|
18
|
+
faqs: boolean;
|
|
19
|
+
about: boolean;
|
|
20
|
+
legal: boolean;
|
|
21
|
+
gamification: boolean;
|
|
22
|
+
videoTutorial: boolean;
|
|
23
|
+
subscription: boolean;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Creates settings configuration based on enabled features
|
|
28
|
+
*/
|
|
29
|
+
export declare const createSettingsConfig: (params: SettingsConfigFactoryParams) => SettingsConfig;
|
|
30
|
+
/**
|
|
31
|
+
* Hook for creating settings config with memoization
|
|
32
|
+
*/
|
|
33
|
+
export declare const useSettingsConfigFactory: (params: SettingsConfigFactoryParams) => SettingsConfig;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User Profile Utilities
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for creating user profile configurations.
|
|
5
|
+
*/
|
|
6
|
+
import type { UserProfileDisplay } from "../navigation/types";
|
|
7
|
+
export interface UserProfileConfig {
|
|
8
|
+
displayName?: string;
|
|
9
|
+
userId?: string;
|
|
10
|
+
isAnonymous?: boolean;
|
|
11
|
+
avatarUrl?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CreateUserProfileParams {
|
|
14
|
+
profileData?: UserProfileConfig;
|
|
15
|
+
onSignIn?: () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create user profile display configuration
|
|
19
|
+
*/
|
|
20
|
+
export declare function createUserProfileDisplay(params: CreateUserProfileParams): UserProfileDisplay;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Development Mode Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides safe, standardized helpers for development-only code.
|
|
5
|
+
* All utilities check for __DEV__ existence to prevent runtime errors.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Safe development mode check
|
|
9
|
+
* Handles cases where __DEV__ is not defined
|
|
10
|
+
*
|
|
11
|
+
* @returns true if in development mode, false otherwise
|
|
12
|
+
*/
|
|
13
|
+
export declare const isDev: () => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Log only in development mode
|
|
16
|
+
*
|
|
17
|
+
* @param args - Arguments to log
|
|
18
|
+
*/
|
|
19
|
+
export declare const devLog: (...args: unknown[]) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Warn only in development mode
|
|
22
|
+
*
|
|
23
|
+
* @param args - Arguments to warn
|
|
24
|
+
*/
|
|
25
|
+
export declare const devWarn: (...args: unknown[]) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Error only in development mode
|
|
28
|
+
*
|
|
29
|
+
* @param args - Arguments to error
|
|
30
|
+
*/
|
|
31
|
+
export declare const devError: (...args: unknown[]) => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Utilities
|
|
3
|
+
* Centralized error message formatting and handling
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Format error message from unknown error type
|
|
7
|
+
* Handles Error instances, string errors, and unknown error types
|
|
8
|
+
*
|
|
9
|
+
* @param error - The error to format
|
|
10
|
+
* @returns Formatted error message string
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* try {
|
|
15
|
+
* await riskyOperation();
|
|
16
|
+
* } catch (err) {
|
|
17
|
+
* const message = formatErrorMessage(err);
|
|
18
|
+
* console.error(message);
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const formatErrorMessage: (error: unknown) => string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface AsyncStateOptions<T> {
|
|
2
|
+
/** Initial data value */
|
|
3
|
+
initialData?: T | null;
|
|
4
|
+
/** Callback invoked on successful operation */
|
|
5
|
+
onSuccess?: (data: T) => void;
|
|
6
|
+
/** Callback invoked on error */
|
|
7
|
+
onError?: (error: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface AsyncStateResult<T> {
|
|
10
|
+
/** Current data value */
|
|
11
|
+
data: T | null;
|
|
12
|
+
/** Loading state */
|
|
13
|
+
loading: boolean;
|
|
14
|
+
/** Error message if operation failed */
|
|
15
|
+
error: string | null;
|
|
16
|
+
/** Execute an async operation with automatic state management */
|
|
17
|
+
execute: (operation: () => Promise<T>) => Promise<T | null>;
|
|
18
|
+
/** Manually set data */
|
|
19
|
+
setData: (data: T | null) => void;
|
|
20
|
+
/** Manually set error */
|
|
21
|
+
setError: (error: string | null) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Hook for managing async operations with automatic state updates
|
|
25
|
+
*
|
|
26
|
+
* Features:
|
|
27
|
+
* - Automatic loading state management
|
|
28
|
+
* - Safe mounted state checks
|
|
29
|
+
* - Standardized error handling
|
|
30
|
+
* - Optional success/error callbacks
|
|
31
|
+
*
|
|
32
|
+
* @param options - Configuration options
|
|
33
|
+
* @returns Async state result with execute function
|
|
34
|
+
*/
|
|
35
|
+
export declare const useAsyncStateUpdate: <T = unknown>(options?: AsyncStateOptions<T>) => AsyncStateResult<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useMountSafety: () => import("react").RefObject<boolean>;
|
package/package.json
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-settings",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.32",
|
|
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
|
-
"types": "./
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"react-native": "./src/index.ts",
|
|
11
|
-
"types": "./
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
12
|
"default": "./src/index.ts"
|
|
13
13
|
},
|
|
14
14
|
"./localization": {
|
|
15
15
|
"react-native": "./src/domains/localization/index.ts",
|
|
16
|
-
"types": "./
|
|
16
|
+
"types": "./dist/domains/localization/index.d.ts",
|
|
17
17
|
"default": "./src/domains/localization/index.ts"
|
|
18
18
|
},
|
|
19
19
|
"./appearance": {
|
|
20
20
|
"react-native": "./src/domains/appearance/index.ts",
|
|
21
|
-
"types": "./
|
|
21
|
+
"types": "./dist/domains/appearance/index.d.ts",
|
|
22
22
|
"default": "./src/domains/appearance/index.ts"
|
|
23
23
|
},
|
|
24
24
|
"./feedback": {
|
|
25
25
|
"react-native": "./src/domains/feedback/index.ts",
|
|
26
|
-
"types": "./
|
|
26
|
+
"types": "./dist/domains/feedback/index.d.ts",
|
|
27
27
|
"default": "./src/domains/feedback/index.ts"
|
|
28
28
|
},
|
|
29
29
|
"./rating": {
|
|
30
30
|
"react-native": "./src/domains/rating/index.ts",
|
|
31
|
-
"types": "./
|
|
31
|
+
"types": "./dist/domains/rating/index.d.ts",
|
|
32
32
|
"default": "./src/domains/rating/index.ts"
|
|
33
33
|
},
|
|
34
34
|
"./gamification": {
|
|
35
35
|
"react-native": "./src/domains/gamification/index.ts",
|
|
36
|
-
"types": "./
|
|
36
|
+
"types": "./dist/domains/gamification/index.d.ts",
|
|
37
37
|
"default": "./src/domains/gamification/index.ts"
|
|
38
38
|
},
|
|
39
39
|
"./notifications": {
|
|
40
40
|
"react-native": "./src/domains/notifications/index.ts",
|
|
41
|
-
"types": "./
|
|
41
|
+
"types": "./dist/domains/notifications/index.d.ts",
|
|
42
42
|
"default": "./src/domains/notifications/index.ts"
|
|
43
43
|
},
|
|
44
44
|
"./about": {
|
|
45
45
|
"react-native": "./src/domains/about/index.ts",
|
|
46
|
-
"types": "./
|
|
46
|
+
"types": "./dist/domains/about/index.d.ts",
|
|
47
47
|
"default": "./src/domains/about/index.ts"
|
|
48
48
|
},
|
|
49
49
|
"./legal": {
|
|
50
50
|
"react-native": "./src/domains/legal/index.ts",
|
|
51
|
-
"types": "./
|
|
51
|
+
"types": "./dist/domains/legal/index.d.ts",
|
|
52
52
|
"default": "./src/domains/legal/index.ts"
|
|
53
53
|
},
|
|
54
54
|
"./faqs": {
|
|
55
55
|
"react-native": "./src/domains/faqs/index.ts",
|
|
56
|
-
"types": "./
|
|
56
|
+
"types": "./dist/domains/faqs/index.d.ts",
|
|
57
57
|
"default": "./src/domains/faqs/index.ts"
|
|
58
58
|
},
|
|
59
59
|
"./disclaimer": {
|
|
60
60
|
"react-native": "./src/domains/disclaimer/index.ts",
|
|
61
|
-
"types": "./
|
|
61
|
+
"types": "./dist/domains/disclaimer/index.d.ts",
|
|
62
62
|
"default": "./src/domains/disclaimer/index.ts"
|
|
63
63
|
},
|
|
64
64
|
"./cloud-sync": {
|
|
65
65
|
"react-native": "./src/domains/cloud-sync/index.ts",
|
|
66
|
-
"types": "./
|
|
66
|
+
"types": "./dist/domains/cloud-sync/index.d.ts",
|
|
67
67
|
"default": "./src/domains/cloud-sync/index.ts"
|
|
68
68
|
},
|
|
69
69
|
"./dev": {
|
|
70
70
|
"react-native": "./src/domains/dev/index.ts",
|
|
71
|
-
"types": "./
|
|
71
|
+
"types": "./dist/domains/dev/index.d.ts",
|
|
72
72
|
"default": "./src/domains/dev/index.ts"
|
|
73
73
|
},
|
|
74
74
|
"./video-tutorials": {
|
|
75
75
|
"react-native": "./src/domains/video-tutorials/index.ts",
|
|
76
|
-
"types": "./
|
|
76
|
+
"types": "./dist/domains/video-tutorials/index.d.ts",
|
|
77
77
|
"default": "./src/domains/video-tutorials/index.ts"
|
|
78
78
|
},
|
|
79
79
|
"./account": {
|
|
80
80
|
"react-native": "./src/account.ts",
|
|
81
|
-
"types": "./
|
|
81
|
+
"types": "./dist/account.d.ts",
|
|
82
82
|
"default": "./src/account.ts"
|
|
83
83
|
},
|
|
84
84
|
"./package.json": "./package.json"
|
|
@@ -87,7 +87,8 @@
|
|
|
87
87
|
"typecheck": "tsc --noEmit --skipLibCheck",
|
|
88
88
|
"lint": "eslint src",
|
|
89
89
|
"lint:fix": "eslint src --fix",
|
|
90
|
-
"vp": "npm version patch && npm publish && git push"
|
|
90
|
+
"vp": "npm version patch && npm publish && git push",
|
|
91
|
+
"build": "tsc --project tsconfig.build.json"
|
|
91
92
|
},
|
|
92
93
|
"keywords": [
|
|
93
94
|
"react-native",
|
|
@@ -201,6 +202,7 @@
|
|
|
201
202
|
"access": "public"
|
|
202
203
|
},
|
|
203
204
|
"files": [
|
|
205
|
+
"dist",
|
|
204
206
|
"src",
|
|
205
207
|
"README.md"
|
|
206
208
|
]
|