@umituz/react-native-settings 4.16.5 → 4.16.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-settings",
3
- "version": "4.16.5",
3
+ "version": "4.16.7",
4
4
  "description": "Settings management for React Native apps - user preferences, theme, language, notifications",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -30,8 +30,8 @@
30
30
  "@react-navigation/native": ">=6.0.0",
31
31
  "@react-navigation/stack": ">=6.0.0",
32
32
  "@umituz/react-native-about": "^1.11.3",
33
- "@umituz/react-native-avatar": "*",
34
33
  "@umituz/react-native-appearance": "*",
34
+ "@umituz/react-native-avatar": "*",
35
35
  "@umituz/react-native-design-system": "*",
36
36
  "@umituz/react-native-design-system-atoms": "*",
37
37
  "@umituz/react-native-design-system-molecules": "*",
@@ -39,11 +39,15 @@
39
39
  "@umituz/react-native-design-system-responsive": "*",
40
40
  "@umituz/react-native-design-system-theme": "*",
41
41
  "@umituz/react-native-design-system-typography": "*",
42
+ "@umituz/react-native-exception": "latest",
43
+ "@umituz/react-native-feedback": "^1.3.0",
42
44
  "@umituz/react-native-legal": "*",
43
45
  "@umituz/react-native-localization": "*",
44
46
  "@umituz/react-native-notifications": "*",
45
47
  "@umituz/react-native-onboarding": "*",
48
+ "@umituz/react-native-rating": "*",
46
49
  "@umituz/react-native-storage": "*",
50
+ "lucide-react-native": "*",
47
51
  "react": ">=18.2.0",
48
52
  "react-native": ">=0.74.0",
49
53
  "react-native-safe-area-context": "~5.6.0",
@@ -73,10 +77,12 @@
73
77
  "@umituz/react-native-design-system-responsive": "latest",
74
78
  "@umituz/react-native-design-system-theme": "latest",
75
79
  "@umituz/react-native-design-system-typography": "latest",
80
+ "@umituz/react-native-feedback": "^1.3.0",
76
81
  "@umituz/react-native-legal": "^2.0.3",
77
82
  "@umituz/react-native-localization": "latest",
78
83
  "@umituz/react-native-notifications": "latest",
79
84
  "@umituz/react-native-onboarding": "^3.3.0",
85
+ "@umituz/react-native-rating": "^1.4.0",
80
86
  "@umituz/react-native-storage": "latest",
81
87
  "babel-plugin-module-resolver": "^5.0.2",
82
88
  "expo-constants": "^18.0.12",
@@ -96,4 +102,4 @@
96
102
  "README.md",
97
103
  "LICENSE"
98
104
  ]
99
- }
105
+ }
@@ -17,6 +17,8 @@ import { AboutSection } from "@umituz/react-native-about";
17
17
  import { LegalSection } from "@umituz/react-native-legal";
18
18
  import { AppearanceSection } from "@umituz/react-native-appearance";
19
19
  import { LanguageSection } from "@umituz/react-native-localization";
20
+ import { SupportSection } from "@umituz/react-native-feedback";
21
+ import { SettingItem } from "../../components/SettingItem";
20
22
  import type { NormalizedConfig } from "../utils/normalizeConfig";
21
23
  import type { CustomSettingsSection } from "../types";
22
24
 
@@ -56,6 +58,8 @@ interface SettingsContentProps {
56
58
  disclaimer: boolean;
57
59
  userProfile: boolean;
58
60
  subscription: boolean;
61
+ feedback: boolean;
62
+ rating: boolean;
59
63
  };
60
64
  showUserProfile?: boolean;
61
65
  userProfile?: {
@@ -102,6 +106,7 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
102
106
  features.legal ||
103
107
  features.disclaimer ||
104
108
  features.subscription ||
109
+ features.feedback ||
105
110
  customSections.length > 0,
106
111
  [features, customSections.length]
107
112
  );
@@ -215,6 +220,29 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
215
220
  />
216
221
  )}
217
222
 
223
+ {(features.feedback || features.rating) && (
224
+ <SupportSection
225
+ renderSection={(props: any) => <SettingsSection {...props} />}
226
+ renderItem={(props: any) => <SettingItem {...props} />}
227
+ feedbackConfig={{
228
+ enabled: features.feedback,
229
+ config: {
230
+ ...normalizedConfig.feedback.config,
231
+ title: normalizedConfig.feedback.config?.title || t("settings.support.title") || "Support",
232
+ description: normalizedConfig.feedback.config?.description || t("settings.feedback.description") || "Send Feedback",
233
+ }
234
+ }}
235
+ ratingConfig={{
236
+ enabled: features.rating,
237
+ config: {
238
+ ...normalizedConfig.rating.config,
239
+ title: normalizedConfig.rating.config?.title || t("settings.support.title") || "Support",
240
+ description: normalizedConfig.rating.config?.description || t("settings.rating.description") || "Rate Us",
241
+ }
242
+ }}
243
+ />
244
+ )}
245
+
218
246
  {features.disclaimer && DisclaimerSetting && (
219
247
  <DisclaimerSetting />
220
248
  )}
@@ -70,6 +70,8 @@ export function useFeatureDetection(
70
70
  disclaimer,
71
71
  userProfile,
72
72
  subscription,
73
+ feedback,
74
+ rating,
73
75
  } = normalizedConfig;
74
76
 
75
77
  const notificationServiceAvailable =
@@ -123,6 +125,8 @@ export function useFeatureDetection(
123
125
  subscription:
124
126
  subscription.enabled &&
125
127
  subscription.config?.sectionConfig !== undefined,
128
+ feedback: feedback.enabled,
129
+ rating: rating.enabled,
126
130
  };
127
131
  }, [normalizedConfig, navigation, options]);
128
132
  }
@@ -168,3 +168,34 @@ export interface SubscriptionConfig {
168
168
  onUpgrade?: () => void;
169
169
  };
170
170
  }
171
+
172
+ import type { FeedbackType } from "@umituz/react-native-feedback";
173
+
174
+ /**
175
+ * Feedback Settings Configuration
176
+ */
177
+ export interface FeedbackConfig {
178
+ /** Enable feedback feature */
179
+ enabled?: boolean;
180
+ /** Custom title for the feedback section */
181
+ title?: string;
182
+ /** Custom label for the feedback item */
183
+ description?: string;
184
+ /** Initial feedback type */
185
+ initialType?: FeedbackType;
186
+ /** Feedback submission handler */
187
+ onSubmit?: (data: { type: any; rating: number; description: string; title: string }) => Promise<void>;
188
+ }
189
+
190
+ export interface RatingConfig {
191
+ /** Enable rating feature */
192
+ enabled?: boolean;
193
+ /** Custom title for the rating section */
194
+ title?: string;
195
+ /** Custom label for the rate app button */
196
+ description?: string;
197
+ /** Store URL for direct linking (optional) */
198
+ storeUrl?: string;
199
+ /** Custom handler for rating action (e.g. open store review) */
200
+ onRate?: () => void;
201
+ }
@@ -13,6 +13,8 @@ import type {
13
13
  DisclaimerConfig,
14
14
  UserProfileConfig,
15
15
  SubscriptionConfig,
16
+ FeedbackConfig,
17
+ RatingConfig,
16
18
  } from "./FeatureConfig";
17
19
 
18
20
  /**
@@ -96,6 +98,17 @@ export interface SettingsConfig {
96
98
  */
97
99
  subscription?: FeatureVisibility | SubscriptionConfig;
98
100
 
101
+ /**
102
+ * Feedback settings
103
+ * @default 'auto'
104
+ */
105
+ feedback?: FeatureVisibility | FeedbackConfig;
106
+
107
+ /**
108
+ * Rating settings configuration
109
+ */
110
+ rating?: FeatureVisibility | RatingConfig;
111
+
99
112
  /**
100
113
  * Custom empty state text when no settings are available
101
114
  */
@@ -13,6 +13,8 @@ export type {
13
13
  DisclaimerConfig,
14
14
  UserProfileConfig,
15
15
  SubscriptionConfig,
16
+ FeedbackConfig,
17
+ RatingConfig,
16
18
  } from "./FeatureConfig";
17
19
  export type { SettingsConfig } from "./SettingsConfig";
18
20
  export type { CustomSettingsSection } from "./CustomSection";
@@ -13,6 +13,8 @@ import type {
13
13
  DisclaimerConfig,
14
14
  UserProfileConfig,
15
15
  SubscriptionConfig,
16
+ FeedbackConfig,
17
+ RatingConfig,
16
18
  SettingsConfig,
17
19
  } from "../types";
18
20
 
@@ -49,6 +51,14 @@ export interface NormalizedConfig {
49
51
  enabled: boolean;
50
52
  config?: SubscriptionConfig;
51
53
  };
54
+ feedback: {
55
+ enabled: boolean;
56
+ config?: FeedbackConfig;
57
+ };
58
+ rating: {
59
+ enabled: boolean;
60
+ config?: RatingConfig;
61
+ };
52
62
  }
53
63
 
54
64
  /**
@@ -91,6 +101,8 @@ export function normalizeSettingsConfig(
91
101
  disclaimer: normalizeConfigValue(config?.disclaimer, false),
92
102
  userProfile: normalizeConfigValue(config?.userProfile, false),
93
103
  subscription: normalizeConfigValue(config?.subscription, false),
104
+ feedback: normalizeConfigValue(config?.feedback, false),
105
+ rating: normalizeConfigValue(config?.rating, false),
94
106
  };
95
107
  }
96
108