@umituz/react-native-settings 4.20.53 → 4.20.54
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 +1 -1
- package/src/domains/about/presentation/components/AboutSettingItem.tsx +39 -86
- package/src/domains/about/presentation/hooks/useAboutInfo.ts +39 -101
- package/src/domains/about/presentation/hooks/useAboutInfo.types.ts +32 -0
- package/src/domains/about/utils/AppInfoFactory.ts +19 -0
- package/src/domains/about/utils/index.ts +2 -0
- package/src/domains/legal/index.ts +1 -0
- package/src/domains/legal/presentation/screens/LegalContentScreen.tsx +140 -0
- package/src/domains/legal/presentation/screens/PrivacyPolicyScreen.tsx +17 -155
- package/src/domains/legal/presentation/screens/TermsOfServiceScreen.tsx +17 -155
- package/src/presentation/components/SettingsItemCard.tsx +2 -2
- package/src/presentation/navigation/SettingsStackNavigator.tsx +50 -129
- package/src/presentation/navigation/components/wrappers/AboutScreenWrapper.tsx +13 -0
- package/src/presentation/navigation/components/wrappers/LegalScreenWrapper.tsx +50 -0
- package/src/presentation/navigation/components/wrappers/SettingsScreenWrapper.tsx +32 -0
- package/src/presentation/navigation/components/wrappers/index.ts +9 -0
- package/src/presentation/navigation/utils/index.ts +5 -0
- package/src/presentation/navigation/utils/navigationScreenOptions.ts +56 -0
- package/src/presentation/navigation/utils/navigationTranslations.ts +46 -0
- package/src/presentation/screens/components/SettingsHeader.tsx +1 -1
- package/src/presentation/screens/types/BaseTypes.ts +12 -0
- package/src/presentation/screens/types/ContentConfig.ts +82 -0
- package/src/presentation/screens/types/SettingsConfig.ts +6 -4
- package/src/presentation/screens/types/UserFeatureConfig.ts +137 -0
- package/src/presentation/screens/types/index.ts +10 -8
- package/src/presentation/screens/types/FeatureConfig.ts +0 -263
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Feature Configuration Types
|
|
3
|
-
* Core types for feature visibility and configuration
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { AppearanceTexts } from "../../../domains/appearance/types";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Feature visibility configuration
|
|
10
|
-
* - true: Always show (if navigation screen exists)
|
|
11
|
-
* - false: Never show
|
|
12
|
-
* - 'auto': Automatically detect (check if navigation screen exists and package is available)
|
|
13
|
-
*/
|
|
14
|
-
export type FeatureVisibility = boolean | "auto";
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Appearance Settings Configuration
|
|
18
|
-
*/
|
|
19
|
-
export interface AppearanceConfig {
|
|
20
|
-
/** Show appearance section */
|
|
21
|
-
enabled?: FeatureVisibility;
|
|
22
|
-
/** Custom navigation route for appearance screen */
|
|
23
|
-
route?: string;
|
|
24
|
-
/** Show theme toggle */
|
|
25
|
-
showTheme?: boolean;
|
|
26
|
-
/** Custom appearance title */
|
|
27
|
-
title?: string;
|
|
28
|
-
/** Custom appearance description */
|
|
29
|
-
description?: string;
|
|
30
|
-
/** Custom icon name (Ionicons) */
|
|
31
|
-
icon?: string;
|
|
32
|
-
/** Custom section title for grouping */
|
|
33
|
-
sectionTitle?: string;
|
|
34
|
-
/** Default route name when no custom route provided */
|
|
35
|
-
defaultRoute?: string;
|
|
36
|
-
/** Appearance screen texts (theme mode labels, descriptions, etc.) */
|
|
37
|
-
texts?: AppearanceTexts;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Language Settings Configuration
|
|
42
|
-
*/
|
|
43
|
-
export interface LanguageConfig {
|
|
44
|
-
/** Show language section */
|
|
45
|
-
enabled?: FeatureVisibility;
|
|
46
|
-
/** Custom navigation route for language selection screen */
|
|
47
|
-
route?: string;
|
|
48
|
-
/** Custom language title */
|
|
49
|
-
title?: string;
|
|
50
|
-
/** Custom language description */
|
|
51
|
-
description?: string;
|
|
52
|
-
/** Custom icon name (Ionicons) */
|
|
53
|
-
icon?: string;
|
|
54
|
-
/** Custom section title for grouping */
|
|
55
|
-
sectionTitle?: string;
|
|
56
|
-
/** Default language display when no language is detected */
|
|
57
|
-
defaultLanguageDisplay?: string;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Notifications Settings Configuration
|
|
62
|
-
*/
|
|
63
|
-
export interface NotificationsConfig {
|
|
64
|
-
/** Show notifications section */
|
|
65
|
-
enabled?: FeatureVisibility;
|
|
66
|
-
/** Show notification toggle switch */
|
|
67
|
-
showToggle?: boolean;
|
|
68
|
-
/** Initial toggle value */
|
|
69
|
-
initialValue?: boolean;
|
|
70
|
-
/** Toggle change handler */
|
|
71
|
-
onToggleChange?: (value: boolean) => void;
|
|
72
|
-
/** Custom navigation route for notifications screen */
|
|
73
|
-
route?: string;
|
|
74
|
-
/** Custom notifications title */
|
|
75
|
-
title?: string;
|
|
76
|
-
/** Custom notifications description */
|
|
77
|
-
description?: string;
|
|
78
|
-
/** Custom icon name (Ionicons) */
|
|
79
|
-
icon?: string;
|
|
80
|
-
/** Custom section title for grouping */
|
|
81
|
-
sectionTitle?: string;
|
|
82
|
-
/** Default route name when no custom route provided */
|
|
83
|
-
defaultRoute?: string;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* About Settings Configuration
|
|
88
|
-
*/
|
|
89
|
-
export interface AboutConfig {
|
|
90
|
-
/** Show about section */
|
|
91
|
-
enabled?: FeatureVisibility;
|
|
92
|
-
/** Custom navigation route for about screen */
|
|
93
|
-
route?: string;
|
|
94
|
-
/** Custom about title */
|
|
95
|
-
title?: string;
|
|
96
|
-
/** Custom about description */
|
|
97
|
-
description?: string;
|
|
98
|
-
/** Custom icon name (Ionicons) */
|
|
99
|
-
icon?: string;
|
|
100
|
-
/** Custom section title for grouping */
|
|
101
|
-
sectionTitle?: string;
|
|
102
|
-
/** Default route name when no custom route provided */
|
|
103
|
-
defaultRoute?: string;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Legal Settings Configuration
|
|
108
|
-
*/
|
|
109
|
-
export interface LegalConfig {
|
|
110
|
-
/** Show legal section */
|
|
111
|
-
enabled?: FeatureVisibility;
|
|
112
|
-
/** Custom navigation route for legal screen */
|
|
113
|
-
route?: string;
|
|
114
|
-
/** Custom legal title */
|
|
115
|
-
title?: string;
|
|
116
|
-
/** Custom legal description */
|
|
117
|
-
description?: string;
|
|
118
|
-
/** Custom icon name (Ionicons) */
|
|
119
|
-
icon?: string;
|
|
120
|
-
/** Custom section title for grouping */
|
|
121
|
-
sectionTitle?: string;
|
|
122
|
-
/** Default route name when no custom route provided */
|
|
123
|
-
defaultRoute?: string;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Disclaimer Settings Configuration
|
|
128
|
-
*/
|
|
129
|
-
export interface DisclaimerConfig {
|
|
130
|
-
/** Show disclaimer section */
|
|
131
|
-
enabled?: FeatureVisibility;
|
|
132
|
-
/** Custom navigation route for disclaimer screen */
|
|
133
|
-
route?: string;
|
|
134
|
-
/** Custom disclaimer title */
|
|
135
|
-
title?: string;
|
|
136
|
-
/** Custom disclaimer description */
|
|
137
|
-
description?: string;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* User Profile Settings Configuration
|
|
142
|
-
*/
|
|
143
|
-
export interface UserProfileConfig {
|
|
144
|
-
/** Show user profile header */
|
|
145
|
-
enabled?: boolean;
|
|
146
|
-
/** Custom display name for anonymous users */
|
|
147
|
-
anonymousDisplayName?: string;
|
|
148
|
-
/** Custom avatar service URL */
|
|
149
|
-
avatarServiceUrl?: string;
|
|
150
|
-
/** Navigation route for account settings (shows chevron if set) */
|
|
151
|
-
accountSettingsRoute?: string;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
import type { FeedbackType } from "../../../domains/feedback/domain/entities/FeedbackEntity";
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Feedback Settings Configuration
|
|
158
|
-
*/
|
|
159
|
-
export interface FeedbackConfig {
|
|
160
|
-
/** Enable feedback feature */
|
|
161
|
-
enabled?: boolean;
|
|
162
|
-
/** Custom title for the feedback section */
|
|
163
|
-
title?: string;
|
|
164
|
-
/** Custom label for the feedback item */
|
|
165
|
-
description?: string;
|
|
166
|
-
/** Custom icon name (Ionicons) */
|
|
167
|
-
icon?: string;
|
|
168
|
-
/** Custom section title for grouping */
|
|
169
|
-
sectionTitle?: string;
|
|
170
|
-
/** Initial feedback type */
|
|
171
|
-
initialType?: FeedbackType;
|
|
172
|
-
/** Feedback submission handler */
|
|
173
|
-
onSubmit?: (data: { type: any; rating: number; description: string; title: string }) => Promise<void>;
|
|
174
|
-
/** Custom handler to open feedback screen (overrides default modal) */
|
|
175
|
-
onPress?: () => void;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export interface FAQConfig {
|
|
179
|
-
/** Enable FAQ feature */
|
|
180
|
-
enabled?: boolean;
|
|
181
|
-
/** Custom title for the FAQ section */
|
|
182
|
-
title?: string;
|
|
183
|
-
/** Custom label for the FAQ button */
|
|
184
|
-
description?: string;
|
|
185
|
-
/** Custom icon name (Ionicons) */
|
|
186
|
-
icon?: string;
|
|
187
|
-
/** Custom section title for grouping */
|
|
188
|
-
sectionTitle?: string;
|
|
189
|
-
/** FAQ items passed from app */
|
|
190
|
-
items?: any[];
|
|
191
|
-
/** Handler to open FAQ screen */
|
|
192
|
-
onPress?: () => void;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export interface RatingConfig {
|
|
196
|
-
/** Enable rating feature */
|
|
197
|
-
enabled?: boolean;
|
|
198
|
-
/** Custom title for the rating section */
|
|
199
|
-
title?: string;
|
|
200
|
-
/** Custom label for the rate app button */
|
|
201
|
-
description?: string;
|
|
202
|
-
/** Store URL for direct linking (optional) */
|
|
203
|
-
storeUrl?: string;
|
|
204
|
-
/** Custom handler for rating action (e.g. open store review) */
|
|
205
|
-
onRate?: () => void;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Cloud Sync Settings Configuration
|
|
210
|
-
*/
|
|
211
|
-
export interface CloudSyncConfig {
|
|
212
|
-
/** Enable cloud sync feature */
|
|
213
|
-
enabled?: FeatureVisibility;
|
|
214
|
-
/** Custom title for the sync section */
|
|
215
|
-
title?: string;
|
|
216
|
-
/** Custom description for the sync toggle */
|
|
217
|
-
description?: string;
|
|
218
|
-
/** Custom icon name (Ionicons) */
|
|
219
|
-
icon?: string;
|
|
220
|
-
/** Custom section title for grouping */
|
|
221
|
-
sectionTitle?: string;
|
|
222
|
-
/** Firestore collection name */
|
|
223
|
-
collectionName?: string;
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Subscription Settings Configuration
|
|
227
|
-
*/
|
|
228
|
-
export interface SubscriptionConfig {
|
|
229
|
-
/** Show subscription section */
|
|
230
|
-
enabled?: FeatureVisibility;
|
|
231
|
-
/** Custom title for the subscription section */
|
|
232
|
-
title?: string;
|
|
233
|
-
/** Custom label for the subscription item */
|
|
234
|
-
description?: string;
|
|
235
|
-
/** Custom icon name (Ionicons) */
|
|
236
|
-
icon?: string;
|
|
237
|
-
/** Custom section title for grouping */
|
|
238
|
-
sectionTitle?: string;
|
|
239
|
-
/** Handler to open subscription screen */
|
|
240
|
-
onPress?: () => void;
|
|
241
|
-
/** Whether user is premium (to show active status) */
|
|
242
|
-
isPremium?: boolean;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Wallet Settings Configuration
|
|
247
|
-
*/
|
|
248
|
-
export interface WalletConfig {
|
|
249
|
-
/** Show wallet section */
|
|
250
|
-
enabled?: FeatureVisibility;
|
|
251
|
-
/** Custom title for the wallet section */
|
|
252
|
-
title?: string;
|
|
253
|
-
/** Custom label for the wallet item */
|
|
254
|
-
description?: string;
|
|
255
|
-
/** Custom icon name (Ionicons) */
|
|
256
|
-
icon?: string;
|
|
257
|
-
/** Custom section title for grouping */
|
|
258
|
-
sectionTitle?: string;
|
|
259
|
-
/** Navigation route for wallet screen */
|
|
260
|
-
route?: string;
|
|
261
|
-
/** Current balance to display */
|
|
262
|
-
balance?: number;
|
|
263
|
-
}
|