@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.
Files changed (251) hide show
  1. package/dist/account.d.ts +27 -0
  2. package/dist/application/ports/ISettingsRepository.d.ts +45 -0
  3. package/dist/domains/about/domain/entities/AppInfo.d.ts +76 -0
  4. package/dist/domains/about/domain/repositories/IAboutRepository.d.ts +19 -0
  5. package/dist/domains/about/index.d.ts +10 -0
  6. package/dist/domains/about/infrastructure/repositories/AboutRepository.d.ts +18 -0
  7. package/dist/domains/about/presentation/components/AboutContent.d.ts +14 -0
  8. package/dist/domains/about/presentation/components/AboutHeader.d.ts +21 -0
  9. package/dist/domains/about/presentation/components/AboutSection.d.ts +14 -0
  10. package/dist/domains/about/presentation/components/AboutSettingItem.d.ts +39 -0
  11. package/dist/domains/about/presentation/hooks/useAboutInfo.d.ts +2 -0
  12. package/dist/domains/about/presentation/hooks/useAboutInfo.types.d.ts +29 -0
  13. package/dist/domains/about/presentation/screens/AboutScreen.d.ts +21 -0
  14. package/dist/domains/about/presentation/screens/AboutScreenContent.d.ts +15 -0
  15. package/dist/domains/about/utils/AppInfoFactory.d.ts +9 -0
  16. package/dist/domains/appearance/data/colorPalettes.d.ts +25 -0
  17. package/dist/domains/appearance/hooks/useAppearance.d.ts +11 -0
  18. package/dist/domains/appearance/hooks/useAppearanceActions.d.ts +9 -0
  19. package/dist/domains/appearance/index.d.ts +9 -0
  20. package/dist/domains/appearance/presentation/components/AppearanceHeader.d.ts +18 -0
  21. package/dist/domains/appearance/presentation/components/AppearancePreview.d.ts +21 -0
  22. package/dist/domains/appearance/presentation/components/AppearanceSection.d.ts +16 -0
  23. package/dist/domains/appearance/presentation/components/ColorPicker.d.ts +15 -0
  24. package/dist/domains/appearance/presentation/components/CustomColorsSection.d.ts +25 -0
  25. package/dist/domains/appearance/presentation/components/ThemeModeSection.d.ts +24 -0
  26. package/dist/domains/appearance/presentation/components/ThemeOption.d.ts +20 -0
  27. package/dist/domains/appearance/presentation/components/index.d.ts +6 -0
  28. package/dist/domains/appearance/presentation/screens/AppearanceScreen.d.ts +16 -0
  29. package/dist/domains/appearance/types/index.d.ts +48 -0
  30. package/dist/domains/cloud-sync/index.d.ts +6 -0
  31. package/dist/domains/cloud-sync/presentation/components/CloudSyncSetting.d.ts +14 -0
  32. package/dist/domains/dev/index.d.ts +14 -0
  33. package/dist/domains/dev/presentation/components/DevSettingsSection.d.ts +34 -0
  34. package/dist/domains/dev/presentation/components/EnvViewerSetting.d.ts +20 -0
  35. package/dist/domains/dev/presentation/components/StorageClearSetting.d.ts +13 -0
  36. package/dist/domains/dev/presentation/screens/EnvViewerScreen.d.ts +12 -0
  37. package/dist/domains/dev/types.d.ts +22 -0
  38. package/dist/domains/disclaimer/index.d.ts +17 -0
  39. package/dist/domains/disclaimer/presentation/components/DisclaimerCard.d.ts +14 -0
  40. package/dist/domains/disclaimer/presentation/components/DisclaimerModal.d.ts +12 -0
  41. package/dist/domains/disclaimer/presentation/components/DisclaimerSetting.d.ts +34 -0
  42. package/dist/domains/disclaimer/presentation/screens/DisclaimerScreen.d.ts +27 -0
  43. package/dist/domains/faqs/domain/entities/FAQEntity.d.ts +21 -0
  44. package/dist/domains/faqs/domain/services/FAQSearchService.d.ts +12 -0
  45. package/dist/domains/faqs/index.d.ts +8 -0
  46. package/dist/domains/faqs/presentation/components/FAQCategory.d.ts +21 -0
  47. package/dist/domains/faqs/presentation/components/FAQEmptyState.d.ts +20 -0
  48. package/dist/domains/faqs/presentation/components/FAQItem.d.ts +24 -0
  49. package/dist/domains/faqs/presentation/components/FAQSearchBar.d.ts +18 -0
  50. package/dist/domains/faqs/presentation/components/index.d.ts +11 -0
  51. package/dist/domains/faqs/presentation/hooks/index.d.ts +5 -0
  52. package/dist/domains/faqs/presentation/hooks/useFAQExpansion.d.ts +12 -0
  53. package/dist/domains/faqs/presentation/hooks/useFAQSearch.d.ts +12 -0
  54. package/dist/domains/faqs/presentation/screens/FAQScreen.d.ts +33 -0
  55. package/dist/domains/feedback/domain/entities/FeedbackEntity.d.ts +25 -0
  56. package/dist/domains/feedback/domain/repositories/IFeedbackRepository.d.ts +20 -0
  57. package/dist/domains/feedback/index.d.ts +10 -0
  58. package/dist/domains/feedback/presentation/components/FeedbackForm.d.ts +7 -0
  59. package/dist/domains/feedback/presentation/components/FeedbackForm.styles.d.ts +48 -0
  60. package/dist/domains/feedback/presentation/components/FeedbackFormProps.d.ts +26 -0
  61. package/dist/domains/feedback/presentation/components/FeedbackModal.d.ts +23 -0
  62. package/dist/domains/feedback/presentation/components/SupportSection.d.ts +62 -0
  63. package/dist/domains/feedback/presentation/hooks/useFeedbackForm.d.ts +19 -0
  64. package/dist/domains/feedback/presentation/screens/FeatureRequestScreen.d.ts +2 -0
  65. package/dist/domains/gamification/components/AchievementCard.d.ts +23 -0
  66. package/dist/domains/gamification/components/AchievementItem.d.ts +7 -0
  67. package/dist/domains/gamification/components/AchievementToast.d.ts +21 -0
  68. package/dist/domains/gamification/components/GamificationScreen/AchievementsList.d.ts +17 -0
  69. package/dist/domains/gamification/components/GamificationScreen/GamificationScreen.d.ts +11 -0
  70. package/dist/domains/gamification/components/GamificationScreen/GamificationScreenWithConfig.d.ts +11 -0
  71. package/dist/domains/gamification/components/GamificationScreen/StatsGrid.d.ts +16 -0
  72. package/dist/domains/gamification/components/GamificationScreen/index.d.ts +17 -0
  73. package/dist/domains/gamification/components/GamificationScreen/styles.d.ts +40 -0
  74. package/dist/domains/gamification/components/GamificationScreen/types.d.ts +42 -0
  75. package/dist/domains/gamification/components/LevelProgress.d.ts +27 -0
  76. package/dist/domains/gamification/components/PointsBadge.d.ts +16 -0
  77. package/dist/domains/gamification/components/StatsCard.d.ts +20 -0
  78. package/dist/domains/gamification/components/StreakDisplay.d.ts +21 -0
  79. package/dist/domains/gamification/components/index.d.ts +14 -0
  80. package/dist/domains/gamification/components/styles/achievementItemStyles.d.ts +71 -0
  81. package/dist/domains/gamification/components/types/AchievementItemProps.d.ts +22 -0
  82. package/dist/domains/gamification/hooks/useGamification.d.ts +22 -0
  83. package/dist/domains/gamification/index.d.ts +13 -0
  84. package/dist/domains/gamification/store/gamificationStore.d.ts +6 -0
  85. package/dist/domains/gamification/types/index.d.ts +99 -0
  86. package/dist/domains/gamification/utils/calculations.d.ts +10 -0
  87. package/dist/domains/legal/domain/entities/LegalConfig.d.ts +28 -0
  88. package/dist/domains/legal/domain/services/ContentValidationService.d.ts +19 -0
  89. package/dist/domains/legal/domain/services/StyleCacheService.d.ts +38 -0
  90. package/dist/domains/legal/domain/services/UrlHandlerService.d.ts +32 -0
  91. package/dist/domains/legal/index.d.ts +8 -0
  92. package/dist/domains/legal/presentation/components/LegalDocumentsList.d.ts +21 -0
  93. package/dist/domains/legal/presentation/components/LegalItem.d.ts +35 -0
  94. package/dist/domains/legal/presentation/components/LegalScreenHeader.d.ts +12 -0
  95. package/dist/domains/legal/presentation/components/LegalSection.d.ts +14 -0
  96. package/dist/domains/legal/presentation/screens/LegalContentScreen.d.ts +19 -0
  97. package/dist/domains/legal/presentation/screens/LegalScreen.d.ts +24 -0
  98. package/dist/domains/legal/presentation/screens/PrivacyPolicyScreen.d.ts +15 -0
  99. package/dist/domains/legal/presentation/screens/TermsOfServiceScreen.d.ts +15 -0
  100. package/dist/domains/localization/domain/repositories/ILocalizationRepository.d.ts +16 -0
  101. package/dist/domains/localization/index.d.ts +16 -0
  102. package/dist/domains/localization/infrastructure/components/LanguageSwitcher.d.ts +19 -0
  103. package/dist/domains/localization/infrastructure/components/LanguageSwitcher.styles.d.ts +37 -0
  104. package/dist/domains/localization/infrastructure/components/useLanguageNavigation.d.ts +4 -0
  105. package/dist/domains/localization/infrastructure/components/useLanguageSwitcher.d.ts +13 -0
  106. package/dist/domains/localization/infrastructure/config/DeviceLocale.d.ts +10 -0
  107. package/dist/domains/localization/infrastructure/config/I18nInitializer.d.ts +14 -0
  108. package/dist/domains/localization/infrastructure/config/LanguageQuery.d.ts +10 -0
  109. package/dist/domains/localization/infrastructure/config/LocaleMapping.d.ts +5 -0
  110. package/dist/domains/localization/infrastructure/config/NamespaceResolver.d.ts +11 -0
  111. package/dist/domains/localization/infrastructure/config/ResourceBuilder.d.ts +10 -0
  112. package/dist/domains/localization/infrastructure/config/TranslationLoader.d.ts +16 -0
  113. package/dist/domains/localization/infrastructure/config/constants/defaultLanguages.d.ts +6 -0
  114. package/dist/domains/localization/infrastructure/config/i18n.d.ts +7 -0
  115. package/dist/domains/localization/infrastructure/config/languages.d.ts +7 -0
  116. package/dist/domains/localization/infrastructure/hooks/useLanguageSelection.d.ts +11 -0
  117. package/dist/domains/localization/infrastructure/hooks/useLocalization.d.ts +12 -0
  118. package/dist/domains/localization/infrastructure/hooks/useTranslation.d.ts +23 -0
  119. package/dist/domains/localization/infrastructure/repository/LanguageRepository.d.ts +18 -0
  120. package/dist/domains/localization/infrastructure/storage/LanguageInitializer.d.ts +20 -0
  121. package/dist/domains/localization/infrastructure/storage/LanguageSwitcher.d.ts +16 -0
  122. package/dist/domains/localization/infrastructure/storage/LocalizationStore.d.ts +6 -0
  123. package/dist/domains/localization/infrastructure/storage/localizationStoreUtils.d.ts +44 -0
  124. package/dist/domains/localization/infrastructure/storage/types/Language.d.ts +12 -0
  125. package/dist/domains/localization/infrastructure/storage/types/LocalizationState.d.ts +22 -0
  126. package/dist/domains/localization/presentation/components/LanguageItem.d.ts +23 -0
  127. package/dist/domains/localization/presentation/components/LanguageItem.styles.d.ts +30 -0
  128. package/dist/domains/localization/presentation/components/LanguageSection.d.ts +15 -0
  129. package/dist/domains/localization/presentation/providers/LocalizationManager.d.ts +12 -0
  130. package/dist/domains/localization/presentation/screens/LanguageSelectionScreen.d.ts +7 -0
  131. package/dist/domains/localization/presentation/screens/LanguageSelectionScreen.styles.d.ts +7 -0
  132. package/dist/domains/localization/presentation/screens/LanguageSelectionScreen.types.d.ts +26 -0
  133. package/dist/domains/notifications/index.d.ts +46 -0
  134. package/dist/domains/notifications/infrastructure/config/notificationsConfig.d.ts +19 -0
  135. package/dist/domains/notifications/infrastructure/hooks/useNotificationSettings.d.ts +8 -0
  136. package/dist/domains/notifications/infrastructure/services/NotificationBadgeManager.d.ts +4 -0
  137. package/dist/domains/notifications/infrastructure/services/NotificationManager.d.ts +23 -0
  138. package/dist/domains/notifications/infrastructure/services/NotificationPermissions.d.ts +5 -0
  139. package/dist/domains/notifications/infrastructure/services/NotificationScheduler.d.ts +7 -0
  140. package/dist/domains/notifications/infrastructure/services/NotificationService.d.ts +31 -0
  141. package/dist/domains/notifications/infrastructure/services/types.d.ts +147 -0
  142. package/dist/domains/notifications/infrastructure/storage/UnifiedNotificationStore.d.ts +42 -0
  143. package/dist/domains/notifications/infrastructure/utils/idGenerator.d.ts +6 -0
  144. package/dist/domains/notifications/infrastructure/utils/triggerBuilder.d.ts +6 -0
  145. package/dist/domains/notifications/presentation/components/NotificationsSection.d.ts +16 -0
  146. package/dist/domains/notifications/presentation/components/RemindersNavRow.d.ts +12 -0
  147. package/dist/domains/notifications/presentation/components/RemindersNavRow.styles.d.ts +34 -0
  148. package/dist/domains/notifications/presentation/components/SettingRow.d.ts +14 -0
  149. package/dist/domains/notifications/presentation/hooks/useNotificationSettingsUI.d.ts +13 -0
  150. package/dist/domains/notifications/presentation/hooks/useTimePicker.d.ts +21 -0
  151. package/dist/domains/notifications/presentation/screens/NotificationSettingsScreen.d.ts +12 -0
  152. package/dist/domains/notifications/presentation/screens/NotificationSettingsScreen.styles.d.ts +26 -0
  153. package/dist/domains/notifications/presentation/screens/NotificationsScreen.d.ts +18 -0
  154. package/dist/domains/notifications/quietHours/infrastructure/hooks/useQuietHoursActions.d.ts +13 -0
  155. package/dist/domains/notifications/quietHours/presentation/components/QuietHoursCard.d.ts +14 -0
  156. package/dist/domains/notifications/reminders/infrastructure/config/reminderPresets.d.ts +24 -0
  157. package/dist/domains/notifications/reminders/infrastructure/hooks/useReminderActions.d.ts +11 -0
  158. package/dist/domains/notifications/reminders/presentation/components/FormButton.d.ts +12 -0
  159. package/dist/domains/notifications/reminders/presentation/components/FrequencySelector.d.ts +14 -0
  160. package/dist/domains/notifications/reminders/presentation/components/ReminderForm.constants.d.ts +28 -0
  161. package/dist/domains/notifications/reminders/presentation/components/ReminderForm.d.ts +7 -0
  162. package/dist/domains/notifications/reminders/presentation/components/ReminderForm.styles.d.ts +31 -0
  163. package/dist/domains/notifications/reminders/presentation/components/ReminderItem.d.ts +20 -0
  164. package/dist/domains/notifications/reminders/presentation/components/TimePresetSelector.d.ts +20 -0
  165. package/dist/domains/notifications/reminders/presentation/components/WeekdaySelector.d.ts +11 -0
  166. package/dist/domains/notifications/reminders/presentation/screens/ReminderListScreen.d.ts +13 -0
  167. package/dist/domains/rating/application/services/RatingService.d.ts +33 -0
  168. package/dist/domains/rating/domain/entities/Rating.d.ts +15 -0
  169. package/dist/domains/rating/domain/entities/RatingConfig.d.ts +120 -0
  170. package/dist/domains/rating/index.d.ts +12 -0
  171. package/dist/domains/rating/infrastructure/storage/RatingStorage.d.ts +50 -0
  172. package/dist/domains/rating/presentation/components/RatingPromptModal.d.ts +16 -0
  173. package/dist/domains/rating/presentation/components/StarRating.d.ts +13 -0
  174. package/dist/domains/rating/presentation/hooks/useAppRating.d.ts +9 -0
  175. package/dist/domains/video-tutorials/index.d.ts +18 -0
  176. package/dist/domains/video-tutorials/presentation/components/VideoTutorialCard.d.ts +13 -0
  177. package/dist/domains/video-tutorials/presentation/components/VideoTutorialSection.d.ts +25 -0
  178. package/dist/domains/video-tutorials/presentation/screens/VideoTutorialsScreen.d.ts +25 -0
  179. package/dist/domains/video-tutorials/types/index.d.ts +26 -0
  180. package/dist/index.d.ts +41 -0
  181. package/dist/infrastructure/repositories/SettingsRepository.d.ts +12 -0
  182. package/dist/infrastructure/services/SettingsService.d.ts +14 -0
  183. package/dist/infrastructure/utils/configFactory.d.ts +39 -0
  184. package/dist/infrastructure/utils/constants/textLimits.d.ts +16 -0
  185. package/dist/infrastructure/utils/sanitizers.d.ts +13 -0
  186. package/dist/infrastructure/utils/validation/core.d.ts +8 -0
  187. package/dist/infrastructure/utils/validation/formValidators.d.ts +26 -0
  188. package/dist/infrastructure/utils/validation/index.d.ts +5 -0
  189. package/dist/infrastructure/utils/validators.d.ts +21 -0
  190. package/dist/presentation/components/SettingsFooter.d.ts +7 -0
  191. package/dist/presentation/components/SettingsItemCard.d.ts +22 -0
  192. package/dist/presentation/components/SettingsNavigationItem.d.ts +67 -0
  193. package/dist/presentation/components/SettingsSection.d.ts +6 -0
  194. package/dist/presentation/components/settings/SettingsItemCardContent.d.ts +12 -0
  195. package/dist/presentation/components/settings/SettingsItemCardRightElement.d.ts +11 -0
  196. package/dist/presentation/components/settings/SettingsItemCardSection.d.ts +5 -0
  197. package/dist/presentation/hooks/mutations/useSettingsMutations.d.ts +20 -0
  198. package/dist/presentation/hooks/queries/useSettingsQuery.d.ts +7 -0
  199. package/dist/presentation/hooks/useSettings.d.ts +26 -0
  200. package/dist/presentation/hooks/useSettingsScreenConfig.d.ts +41 -0
  201. package/dist/presentation/navigation/SettingsStackNavigator.d.ts +9 -0
  202. package/dist/presentation/navigation/hooks/index.d.ts +5 -0
  203. package/dist/presentation/navigation/hooks/useNavigationHandlers.d.ts +14 -0
  204. package/dist/presentation/navigation/hooks/useSettingsNavigation.d.ts +22 -0
  205. package/dist/presentation/navigation/hooks/useSettingsScreens.d.ts +12 -0
  206. package/dist/presentation/navigation/types.d.ts +135 -0
  207. package/dist/presentation/navigation/utils/index.d.ts +5 -0
  208. package/dist/presentation/navigation/utils/navigationHelpers.d.ts +13 -0
  209. package/dist/presentation/navigation/utils/navigationTranslations.d.ts +35 -0
  210. package/dist/presentation/screens/AppearanceScreen.d.ts +6 -0
  211. package/dist/presentation/screens/SettingsScreen.d.ts +49 -0
  212. package/dist/presentation/screens/components/SettingsContent.d.ts +3 -0
  213. package/dist/presentation/screens/components/SettingsHeader.d.ts +8 -0
  214. package/dist/presentation/screens/components/sections/CustomSettingsList.d.ts +7 -0
  215. package/dist/presentation/screens/components/sections/FeatureSettingsSection.d.ts +13 -0
  216. package/dist/presentation/screens/components/sections/IdentitySettingsSection.d.ts +12 -0
  217. package/dist/presentation/screens/components/sections/ProfileSectionLoader.d.ts +17 -0
  218. package/dist/presentation/screens/components/sections/SupportSettingsSection.d.ts +13 -0
  219. package/dist/presentation/screens/components/types/SettingsContentProps.d.ts +47 -0
  220. package/dist/presentation/screens/components/utils/featureChecker.d.ts +10 -0
  221. package/dist/presentation/screens/hooks/useFeatureDetection.d.ts +28 -0
  222. package/dist/presentation/screens/hooks/useSettingsScreen.d.ts +36 -0
  223. package/dist/presentation/screens/types/BaseTypes.d.ts +11 -0
  224. package/dist/presentation/screens/types/ContentConfig.d.ts +76 -0
  225. package/dist/presentation/screens/types/CustomSection.d.ts +38 -0
  226. package/dist/presentation/screens/types/SettingsConfig.d.ts +122 -0
  227. package/dist/presentation/screens/types/SettingsTranslations.d.ts +159 -0
  228. package/dist/presentation/screens/types/UserFeatureConfig.d.ts +178 -0
  229. package/dist/presentation/screens/types/index.d.ts +11 -0
  230. package/dist/presentation/screens/utils/normalizeConfig.d.ts +68 -0
  231. package/dist/presentation/utils/accountConfigUtils.d.ts +34 -0
  232. package/dist/presentation/utils/config-creators/base-configs.d.ts +26 -0
  233. package/dist/presentation/utils/config-creators/feature-configs.d.ts +17 -0
  234. package/dist/presentation/utils/config-creators/index.d.ts +7 -0
  235. package/dist/presentation/utils/config-creators/support-configs.d.ts +19 -0
  236. package/dist/presentation/utils/config-creators/types.d.ts +20 -0
  237. package/dist/presentation/utils/faqTranslator.d.ts +3 -0
  238. package/dist/presentation/utils/index.d.ts +8 -0
  239. package/dist/presentation/utils/screenFactory.d.ts +26 -0
  240. package/dist/presentation/utils/settingsConfigFactory.d.ts +33 -0
  241. package/dist/presentation/utils/userProfileUtils.d.ts +20 -0
  242. package/dist/utils/appUtils.d.ts +4 -0
  243. package/dist/utils/devUtils.d.ts +31 -0
  244. package/dist/utils/errorUtils.d.ts +22 -0
  245. package/dist/utils/hooks/useAsyncStateUpdate.d.ts +35 -0
  246. package/dist/utils/hooks/useMountSafety.d.ts +1 -0
  247. package/package.json +1 -1
  248. package/src/domains/feedback/presentation/screens/FeatureRequestScreen.tsx +449 -0
  249. package/src/presentation/navigation/hooks/useSettingsScreens.ts +29 -9
  250. package/src/presentation/navigation/types.ts +1 -0
  251. package/src/presentation/screens/components/sections/SupportSettingsSection.tsx +1 -1
@@ -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,4 @@
1
+ /**
2
+ * Gets the current app version from Expo constants
3
+ */
4
+ export declare function getAppVersion(): string;
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-settings",
3
- "version": "5.3.37",
3
+ "version": "5.3.38",
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": "./dist/index.d.ts",
@@ -0,0 +1,449 @@
1
+ import React, { useState, useMemo } from "react";
2
+ import {
3
+ View,
4
+ StyleSheet,
5
+ TouchableOpacity,
6
+ ScrollView,
7
+ FlatList,
8
+ Image,
9
+ } from "react-native";
10
+ import {
11
+ AtomicText,
12
+ AtomicIcon,
13
+ AtomicButton,
14
+ } from "@umituz/react-native-design-system/atoms";
15
+ import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
16
+ import { ScreenLayout } from "@umituz/react-native-design-system/layouts";
17
+ import { FeedbackModal } from "../components/FeedbackModal";
18
+ import type { FeedbackType, FeedbackRating } from "../../domain/entities/FeedbackEntity";
19
+
20
+ interface FeatureRequest {
21
+ id: string;
22
+ title: string;
23
+ description: string;
24
+ votes: number;
25
+ status: 'planned' | 'review' | 'completed';
26
+ comments: number;
27
+ userAvatars: string[];
28
+ voted: 'up' | 'down' | null;
29
+ }
30
+
31
+ const MOCK_REQUESTS: FeatureRequest[] = [
32
+ {
33
+ id: "1",
34
+ title: "AI Music Generation",
35
+ description: "Add the ability to generate background tracks for videos using simple text prompts or mood selectors.",
36
+ votes: 1250,
37
+ status: 'planned',
38
+ comments: 24,
39
+ userAvatars: ["https://i.pravatar.cc/100?u=1", "https://i.pravatar.cc/100?u=2"],
40
+ voted: null,
41
+ },
42
+ {
43
+ id: "2",
44
+ title: "Couple Video Templates",
45
+ description: "Specific cinematic transition templates designed for couples' vlogs and anniversary montages.",
46
+ votes: 842,
47
+ status: 'review',
48
+ comments: 8,
49
+ userAvatars: ["https://i.pravatar.cc/100?u=3"],
50
+ voted: null,
51
+ },
52
+ {
53
+ id: "3",
54
+ title: "4K Export Support",
55
+ description: "Allow users to export generated AI videos in high-quality 4K resolution.",
56
+ votes: 2100,
57
+ status: 'completed',
58
+ comments: 42,
59
+ userAvatars: ["https://i.pravatar.cc/100?u=4", "https://i.pravatar.cc/100?u=5"],
60
+ voted: null,
61
+ },
62
+ {
63
+ id: "4",
64
+ title: "Dark Mode Editor",
65
+ description: "Make the entire editing interface dark for better focus during late-night creative sessions.",
66
+ votes: 156,
67
+ status: 'planned',
68
+ comments: 5,
69
+ userAvatars: ["https://i.pravatar.cc/100?u=6"],
70
+ voted: null,
71
+ }
72
+ ];
73
+
74
+ export const FeatureRequestScreen: React.FC<any> = ({ config, texts }) => {
75
+ const tokens = useAppDesignTokens();
76
+ const [requests, setRequests] = useState(MOCK_REQUESTS);
77
+ const [activeTab, setActiveTab] = useState<'all' | 'my' | 'roadmap'>('all');
78
+ const [isModalVisible, setIsModalVisible] = useState(false);
79
+
80
+ // Use passed translations if available
81
+ const t = config?.translations || {};
82
+ const screenTitle = t.screen_title || "Feedback & Features";
83
+ const trendingTitle = t.trending || "Trending Requests";
84
+ const bannerTitle = t.banner?.title || "Community Active";
85
+ const bannerSub = t.banner?.subtitle || "1.2k users voting right now";
86
+ const newIdeaLabel = t.new_idea || "NEW IDEA?";
87
+
88
+ const tabLabels = {
89
+ all: t.tabs?.all || "All Requests",
90
+ my: t.tabs?.my || "My Feedback",
91
+ roadmap: t.tabs?.roadmap || "Roadmap",
92
+ };
93
+
94
+ const statusLabels = {
95
+ planned: t.status?.planned || "Planned",
96
+ review: t.status?.review || "Under Review",
97
+ completed: t.status?.completed || "Completed",
98
+ };
99
+
100
+ const handleVote = (id: string, type: 'up' | 'down') => {
101
+ setRequests(prev => prev.map(req => {
102
+ if (req.id === id) {
103
+ // Simplified voting logic for mock
104
+ let newVotes = req.votes;
105
+ if (req.voted === type) {
106
+ newVotes -= type === 'up' ? 1 : -1;
107
+ return { ...req, votes: newVotes, voted: null };
108
+ } else {
109
+ if (req.voted !== null) {
110
+ newVotes += type === 'up' ? 2 : -2;
111
+ } else {
112
+ newVotes += type === 'up' ? 1 : -1;
113
+ }
114
+ return { ...req, votes: newVotes, voted: type };
115
+ }
116
+ }
117
+ return req;
118
+ }));
119
+ };
120
+
121
+ const getStatusColor = (status: FeatureRequest['status']) => {
122
+ switch (status) {
123
+ case 'planned': return '#3b82f6';
124
+ case 'review': return '#f59e0b';
125
+ case 'completed': return '#10b981';
126
+ default: return tokens.colors.textSecondary;
127
+ }
128
+ };
129
+
130
+ const renderRequestItem = ({ item }: { item: FeatureRequest }) => (
131
+ <View style={[styles.card, { backgroundColor: tokens.colors.surfaceSecondary, borderColor: tokens.colors.borderLight }]}>
132
+ <View style={styles.voteColumn}>
133
+ <TouchableOpacity onPress={() => handleVote(item.id, 'up')}>
134
+ <AtomicIcon
135
+ name="expand-less"
136
+ size="md"
137
+ color={item.voted === 'up' ? "primary" : "textSecondary" as any}
138
+ />
139
+ </TouchableOpacity>
140
+ <AtomicText style={[styles.voteCount, { color: item.voted === 'up' ? tokens.colors.primary : tokens.colors.textPrimary }]}>
141
+ {item.votes}
142
+ </AtomicText>
143
+ <TouchableOpacity onPress={() => handleVote(item.id, 'down')}>
144
+ <AtomicIcon
145
+ name="expand-more"
146
+ size="md"
147
+ color={item.voted === 'down' ? "primary" : "textSecondary" as any}
148
+ />
149
+ </TouchableOpacity>
150
+ </View>
151
+
152
+ <View style={styles.cardContent}>
153
+ <View style={styles.cardHeader}>
154
+ <AtomicText style={styles.cardTitle}>{item.title}</AtomicText>
155
+ <View style={[styles.statusBadge, { backgroundColor: getStatusColor(item.status) + '20', borderColor: getStatusColor(item.status) + '40' }]}>
156
+ <AtomicText style={[styles.statusText, { color: getStatusColor(item.status) }]}>
157
+ {(statusLabels[item.status] || item.status).toUpperCase()}
158
+ </AtomicText>
159
+ </View>
160
+ </View>
161
+
162
+ <AtomicText style={[styles.cardDescription, { color: tokens.colors.textSecondary }]}>
163
+ {item.description}
164
+ </AtomicText>
165
+
166
+ <View style={styles.cardFooter}>
167
+ <View style={styles.avatarGroup}>
168
+ {item.userAvatars.map((url, i) => (
169
+ <Image key={i} source={{ uri: url }} style={[styles.avatar, { borderColor: tokens.colors.surfaceSecondary }]} />
170
+ ))}
171
+ {item.comments > 5 && (
172
+ <View style={[styles.avatarMore, { backgroundColor: tokens.colors.surfaceVariant }]}>
173
+ <AtomicText style={styles.avatarMoreText}>+{item.comments}</AtomicText>
174
+ </View>
175
+ )}
176
+ </View>
177
+ <AtomicText style={[styles.commentCount, { color: tokens.colors.textTertiary }]}>
178
+ {item.comments} {t.comment_count?.replace('{{count}}', '') || 'comments'}
179
+ </AtomicText>
180
+ </View>
181
+ </View>
182
+ </View>
183
+ );
184
+
185
+ const header = (
186
+ <View style={styles.header}>
187
+ <AtomicText style={styles.headerTitle}>{screenTitle}</AtomicText>
188
+ <TouchableOpacity
189
+ style={[styles.addButton, { backgroundColor: tokens.colors.primary }]}
190
+ onPress={() => setIsModalVisible(true)}
191
+ >
192
+ <AtomicIcon name="plus" size="sm" color="onPrimary" />
193
+ </TouchableOpacity>
194
+ </View>
195
+ );
196
+
197
+ return (
198
+ <ScreenLayout header={header} edges={['top', 'bottom']}>
199
+ <View style={styles.tabsContainer}>
200
+ {(['all', 'my', 'roadmap'] as const).map((tab) => (
201
+ <TouchableOpacity
202
+ key={tab}
203
+ onPress={() => setActiveTab(tab)}
204
+ style={[styles.tab, activeTab === tab && { borderBottomColor: tokens.colors.primary }]}
205
+ >
206
+ <AtomicText style={[styles.tabLabel, activeTab === tab && { color: tokens.colors.primary, fontWeight: '700' }]}>
207
+ {tabLabels[tab]}
208
+ </AtomicText>
209
+ </TouchableOpacity>
210
+ ))}
211
+ </View>
212
+
213
+ <ScrollView style={styles.container} showsVerticalScrollIndicator={false}>
214
+ <View style={[styles.banner, { backgroundColor: tokens.colors.primary + '10', borderColor: tokens.colors.primary + '20' }]}>
215
+ <View style={styles.bannerIconContainer}>
216
+ <AtomicIcon name="users" size="lg" color="primary" />
217
+ <View style={styles.pulseDot} />
218
+ </View>
219
+ <View>
220
+ <AtomicText style={styles.bannerTitle}>{bannerTitle}</AtomicText>
221
+ <AtomicText style={[styles.bannerSub, { color: tokens.colors.textSecondary }]}>
222
+ {bannerSub}
223
+ </AtomicText>
224
+ </View>
225
+ </View>
226
+
227
+ <AtomicText style={styles.sectionTitle}>{trendingTitle}</AtomicText>
228
+
229
+ <FlatList
230
+ data={requests}
231
+ renderItem={renderRequestItem}
232
+ keyExtractor={item => item.id}
233
+ scrollEnabled={false}
234
+ contentContainerStyle={styles.listContent}
235
+ />
236
+ </ScrollView>
237
+
238
+ {isModalVisible && (
239
+ <FeedbackModal
240
+ visible={isModalVisible}
241
+ onClose={() => setIsModalVisible(false)}
242
+ onSubmit={async (data: any) => {
243
+ console.log("Submitted:", data);
244
+ setIsModalVisible(false);
245
+ // Add to mock list for "live" feel
246
+ const newReq: FeatureRequest = {
247
+ id: Date.now().toString(),
248
+ title: data.title || "New Request",
249
+ description: data.description,
250
+ votes: 1,
251
+ status: 'review',
252
+ comments: 0,
253
+ userAvatars: ["https://i.pravatar.cc/100?u=me"],
254
+ voted: 'up',
255
+ };
256
+ setRequests(prev => [newReq, ...prev]);
257
+ }}
258
+ texts={texts}
259
+ initialType="feature_request"
260
+ />
261
+ )}
262
+
263
+ <View style={styles.floatingHint}>
264
+ <View style={[styles.hintBadge, { backgroundColor: tokens.colors.primary }]}>
265
+ <AtomicText style={styles.hintText}>{newIdeaLabel}</AtomicText>
266
+ </View>
267
+ </View>
268
+ </ScreenLayout>
269
+ );
270
+ };
271
+
272
+ const styles = StyleSheet.create({
273
+ container: {
274
+ padding: 16,
275
+ },
276
+ header: {
277
+ flexDirection: 'row',
278
+ alignItems: 'center',
279
+ justifyContent: 'space-between',
280
+ paddingHorizontal: 16,
281
+ paddingVertical: 12,
282
+ },
283
+ headerTitle: {
284
+ fontSize: 20,
285
+ fontWeight: '800',
286
+ },
287
+ addButton: {
288
+ width: 36,
289
+ height: 36,
290
+ borderRadius: 12,
291
+ alignItems: 'center',
292
+ justifyContent: 'center',
293
+ },
294
+ tabsContainer: {
295
+ flexDirection: 'row',
296
+ paddingHorizontal: 16,
297
+ borderBottomWidth: 1,
298
+ borderBottomColor: 'rgba(255,255,255,0.05)',
299
+ },
300
+ tab: {
301
+ paddingVertical: 12,
302
+ paddingHorizontal: 16,
303
+ borderBottomWidth: 2,
304
+ borderBottomColor: 'transparent',
305
+ },
306
+ tabLabel: {
307
+ fontSize: 14,
308
+ fontWeight: '600',
309
+ color: 'rgba(255,255,255,0.5)',
310
+ },
311
+ banner: {
312
+ flexDirection: 'row',
313
+ alignItems: 'center',
314
+ padding: 16,
315
+ borderRadius: 16,
316
+ borderWidth: 1,
317
+ gap: 12,
318
+ marginBottom: 20,
319
+ },
320
+ bannerIconContainer: {
321
+ position: 'relative',
322
+ },
323
+ pulseDot: {
324
+ position: 'absolute',
325
+ top: 0,
326
+ right: 0,
327
+ width: 8,
328
+ height: 8,
329
+ borderRadius: 4,
330
+ backgroundColor: '#10b981',
331
+ },
332
+ bannerTitle: {
333
+ fontSize: 14,
334
+ fontWeight: '700',
335
+ },
336
+ bannerSub: {
337
+ fontSize: 12,
338
+ },
339
+ sectionTitle: {
340
+ fontSize: 18,
341
+ fontWeight: '700',
342
+ marginBottom: 16,
343
+ },
344
+ listContent: {
345
+ gap: 12,
346
+ paddingBottom: 40,
347
+ },
348
+ card: {
349
+ flexDirection: 'row',
350
+ padding: 16,
351
+ borderRadius: 16,
352
+ borderWidth: 1,
353
+ gap: 12,
354
+ },
355
+ voteColumn: {
356
+ alignItems: 'center',
357
+ gap: 4,
358
+ width: 40,
359
+ },
360
+ voteCount: {
361
+ fontSize: 13,
362
+ fontWeight: '800',
363
+ },
364
+ cardContent: {
365
+ flex: 1,
366
+ gap: 8,
367
+ },
368
+ cardHeader: {
369
+ flexDirection: 'row',
370
+ justifyContent: 'space-between',
371
+ alignItems: 'flex-start',
372
+ gap: 8,
373
+ },
374
+ cardTitle: {
375
+ fontSize: 15,
376
+ fontWeight: '700',
377
+ flex: 1,
378
+ },
379
+ statusBadge: {
380
+ paddingHorizontal: 8,
381
+ paddingVertical: 2,
382
+ borderRadius: 8,
383
+ borderWidth: 1,
384
+ },
385
+ statusText: {
386
+ fontSize: 9,
387
+ fontWeight: '900',
388
+ },
389
+ cardDescription: {
390
+ fontSize: 13,
391
+ lineHeight: 18,
392
+ },
393
+ cardFooter: {
394
+ flexDirection: 'row',
395
+ alignItems: 'center',
396
+ justifyContent: 'space-between',
397
+ marginTop: 4,
398
+ },
399
+ avatarGroup: {
400
+ flexDirection: 'row',
401
+ alignItems: 'center',
402
+ },
403
+ avatar: {
404
+ width: 24,
405
+ height: 24,
406
+ borderRadius: 12,
407
+ borderWidth: 2,
408
+ marginLeft: -8,
409
+ },
410
+ avatarMore: {
411
+ width: 24,
412
+ height: 24,
413
+ borderRadius: 12,
414
+ alignItems: 'center',
415
+ justifyContent: 'center',
416
+ marginLeft: -8,
417
+ borderWidth: 2,
418
+ borderColor: 'transparent',
419
+ },
420
+ avatarMoreText: {
421
+ fontSize: 8,
422
+ fontWeight: '800',
423
+ },
424
+ commentCount: {
425
+ fontSize: 11,
426
+ },
427
+ floatingHint: {
428
+ position: 'absolute',
429
+ bottom: 40,
430
+ right: 16,
431
+ zIndex: 100,
432
+ },
433
+ hintBadge: {
434
+ paddingHorizontal: 12,
435
+ paddingVertical: 6,
436
+ borderRadius: 20,
437
+ shadowColor: '#000',
438
+ shadowOffset: { width: 0, height: 4 },
439
+ shadowOpacity: 0.3,
440
+ shadowRadius: 4,
441
+ elevation: 8,
442
+ },
443
+ hintText: {
444
+ color: '#fff',
445
+ fontSize: 10,
446
+ fontWeight: '900',
447
+ textTransform: 'uppercase',
448
+ }
449
+ });