@umituz/react-native-settings 5.3.40 → 5.3.41

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.
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Feature Request Entity
3
+ * Represents a community feature request that all users can see and vote on
4
+ */
5
+ export type FeatureRequestStatus = 'pending' | 'planned' | 'review' | 'completed' | 'dismissed';
6
+ export type VoteType = 'up' | 'down';
7
+ export interface FeatureRequestItem {
8
+ id: string;
9
+ title: string;
10
+ description: string;
11
+ type: string;
12
+ status: FeatureRequestStatus;
13
+ votes: number;
14
+ commentCount: number;
15
+ createdBy: string;
16
+ isAnonymous: boolean;
17
+ platform: string;
18
+ createdAt: string;
19
+ updatedAt: string;
20
+ }
21
+ export interface FeatureRequestVote {
22
+ type: VoteType;
23
+ votedAt: string;
24
+ }
25
+ export interface FeatureRequestSubmitData {
26
+ title: string;
27
+ description: string;
28
+ type: string;
29
+ rating?: number;
30
+ }
31
+ export interface FeatureRequestDataProvider {
32
+ /** Fetch all feature requests */
33
+ fetchRequests: () => Promise<FeatureRequestItem[]>;
34
+ /** Fetch current user's votes */
35
+ fetchUserVotes: (userId: string) => Promise<Record<string, VoteType>>;
36
+ /** Vote on a feature request */
37
+ onVote: (requestId: string, userId: string, type: VoteType) => Promise<void>;
38
+ /** Submit a new feature request */
39
+ onSubmit: (data: FeatureRequestSubmitData) => Promise<void>;
40
+ /** Current user ID (can be anonymous UID) */
41
+ userId: string | null;
42
+ }
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * Feedback Domain
3
- * User feedback, bug reports
3
+ * User feedback, bug reports, feature requests
4
4
  */
5
5
  export * from './presentation/components/FeedbackForm';
6
6
  export * from './presentation/components/FeedbackModal';
7
7
  export * from './presentation/components/SupportSection';
8
8
  export * from './presentation/hooks/useFeedbackForm';
9
9
  export * from './domain/entities/FeedbackEntity';
10
+ export * from './domain/entities/FeatureRequestEntity';
10
11
  export * from './domain/repositories/IFeedbackRepository';
@@ -1,2 +1,12 @@
1
1
  import React from "react";
2
- export declare const FeatureRequestScreen: React.FC<any>;
2
+ import type { FeatureRequestDataProvider } from "../../domain/entities/FeatureRequestEntity";
3
+ interface FeatureRequestScreenProps {
4
+ config?: {
5
+ translations?: Record<string, any>;
6
+ dataProvider?: FeatureRequestDataProvider;
7
+ onSubmit?: (data: any) => Promise<void>;
8
+ };
9
+ texts: any;
10
+ }
11
+ export declare const FeatureRequestScreen: React.FC<FeatureRequestScreenProps>;
12
+ export {};
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import type { SettingsConfig, SettingsTranslations } from "../screens/types";
9
9
  import type { FeedbackFormData } from "../utils/config-creators";
10
+ import type { FeatureRequestDataProvider } from "../../domains/feedback/domain/entities/FeatureRequestEntity";
10
11
  import type { AppInfo, FAQData, UserProfileDisplay, AdditionalScreen, AccountConfig } from "../navigation/types";
11
12
  export interface SettingsFeatures {
12
13
  notifications?: boolean;
@@ -26,6 +27,7 @@ export interface UseSettingsScreenConfigParams {
26
27
  faqData?: FAQData;
27
28
  isPremium: boolean;
28
29
  onFeedbackSubmit: (data: FeedbackFormData) => Promise<void>;
30
+ featureRequestDataProvider?: FeatureRequestDataProvider;
29
31
  additionalScreens?: AdditionalScreen[];
30
32
  features?: SettingsFeatures;
31
33
  translations?: SettingsTranslations;
@@ -128,6 +128,31 @@ export interface SettingsTranslations {
128
128
  description?: string;
129
129
  };
130
130
  };
131
+ /** Feature Request Screen translations */
132
+ feedback?: {
133
+ screen_title?: string;
134
+ tabs?: {
135
+ all?: string;
136
+ my?: string;
137
+ roadmap?: string;
138
+ };
139
+ banner?: {
140
+ title?: string;
141
+ subtitle?: string;
142
+ };
143
+ trending?: string;
144
+ voter_count?: string;
145
+ comment_count?: string;
146
+ new_idea?: string;
147
+ empty?: string;
148
+ status?: {
149
+ planned?: string;
150
+ review?: string;
151
+ completed?: string;
152
+ pending?: string;
153
+ dismissed?: string;
154
+ };
155
+ };
131
156
  feedbackModal?: {
132
157
  title?: string;
133
158
  ratingLabel?: string;
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import type { FeatureVisibility } from "./BaseTypes";
6
6
  import type { FeedbackType } from "../../../domains/feedback/domain/entities/FeedbackEntity";
7
+ import type { FeatureRequestDataProvider } from "../../../domains/feedback/domain/entities/FeatureRequestEntity";
7
8
  import type { FAQCategory } from "../../../domains/faqs/domain/entities/FAQEntity";
8
9
  import type { SettingsStackParamList } from "../../navigation/types";
9
10
  /**
@@ -46,6 +47,8 @@ export interface FeedbackConfig {
46
47
  }) => Promise<void>;
47
48
  /** Custom handler to open feedback screen (overrides default modal) */
48
49
  onPress?: () => void;
50
+ /** Data provider for feature request screen (fetching, voting, submitting) */
51
+ dataProvider?: FeatureRequestDataProvider;
49
52
  }
50
53
  /**
51
54
  * FAQ Settings Configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-settings",
3
- "version": "5.3.40",
3
+ "version": "5.3.41",
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",
@@ -123,6 +123,31 @@ export interface SettingsTranslations {
123
123
  description?: string;
124
124
  };
125
125
  };
126
+ /** Feature Request Screen translations */
127
+ feedback?: {
128
+ screen_title?: string;
129
+ tabs?: {
130
+ all?: string;
131
+ my?: string;
132
+ roadmap?: string;
133
+ };
134
+ banner?: {
135
+ title?: string;
136
+ subtitle?: string;
137
+ };
138
+ trending?: string;
139
+ voter_count?: string;
140
+ comment_count?: string;
141
+ new_idea?: string;
142
+ empty?: string;
143
+ status?: {
144
+ planned?: string;
145
+ review?: string;
146
+ completed?: string;
147
+ pending?: string;
148
+ dismissed?: string;
149
+ };
150
+ };
126
151
  feedbackModal?: {
127
152
  title?: string;
128
153
  ratingLabel?: string;