@umituz/react-native-settings 4.20.58 → 4.20.60
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/.github/ISSUE_TEMPLATE/bug_report.md +51 -0
- package/.github/ISSUE_TEMPLATE/documentation.md +52 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +63 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +84 -0
- package/AI_AGENT_GUIDELINES.md +367 -0
- package/ARCHITECTURE.md +246 -0
- package/CHANGELOG.md +67 -0
- package/CODE_OF_CONDUCT.md +75 -0
- package/CONTRIBUTING.md +107 -0
- package/DOCUMENTATION_MIGRATION.md +319 -0
- package/DOCUMENTATION_TEMPLATE.md +155 -0
- package/LICENSE +21 -0
- package/README.md +321 -498
- package/SECURITY.md +98 -0
- package/SETTINGS_SCREEN_GUIDE.md +185 -0
- package/TESTING.md +358 -0
- package/package.json +13 -2
- package/src/application/README.md +85 -271
- package/src/domains/about/README.md +85 -440
- package/src/domains/about/presentation/hooks/README.md +93 -348
- package/src/domains/appearance/README.md +95 -584
- package/src/domains/appearance/hooks/README.md +95 -303
- package/src/domains/appearance/infrastructure/services/README.md +83 -397
- package/src/domains/appearance/presentation/components/README.md +95 -489
- package/src/domains/cloud-sync/README.md +73 -439
- package/src/domains/cloud-sync/presentation/components/README.md +95 -493
- package/src/domains/dev/README.md +71 -457
- package/src/domains/disclaimer/README.md +77 -411
- package/src/domains/disclaimer/presentation/components/README.md +95 -392
- package/src/domains/faqs/README.md +86 -574
- package/src/domains/feedback/README.md +79 -553
- package/src/domains/feedback/presentation/hooks/README.md +93 -426
- package/src/domains/legal/README.md +88 -537
- package/src/domains/rating/README.md +73 -440
- package/src/domains/rating/presentation/components/README.md +95 -475
- package/src/domains/video-tutorials/README.md +77 -470
- package/src/domains/video-tutorials/presentation/components/README.md +95 -431
- package/src/infrastructure/README.md +78 -425
- package/src/infrastructure/repositories/README.md +88 -420
- package/src/infrastructure/services/README.md +74 -460
- package/src/presentation/components/README.md +97 -480
- package/src/presentation/components/SettingsErrorBoundary/README.md +48 -436
- package/src/presentation/components/SettingsFooter/README.md +48 -427
- package/src/presentation/components/SettingsItemCard/README.md +152 -391
- package/src/presentation/components/SettingsItemCard/STRATEGY.md +164 -0
- package/src/presentation/components/SettingsSection/README.md +47 -401
- package/src/presentation/hooks/README.md +95 -389
- package/src/presentation/hooks/mutations/README.md +99 -376
- package/src/presentation/hooks/queries/README.md +111 -353
- package/src/presentation/navigation/README.md +70 -502
- package/src/presentation/navigation/SettingsStackNavigator.tsx +2 -0
- package/src/presentation/navigation/components/README.md +70 -295
- package/src/presentation/navigation/components/wrappers/SettingsScreenWrapper.tsx +3 -0
- package/src/presentation/navigation/hooks/README.md +75 -367
- package/src/presentation/navigation/types.ts +1 -0
- package/src/presentation/navigation/utils/README.md +100 -380
- package/src/presentation/screens/README.md +53 -504
- package/src/presentation/screens/SettingsScreen.tsx +4 -2
- package/src/presentation/screens/components/SettingsContent/README.md +53 -382
- package/src/presentation/screens/components/SettingsHeader/README.md +48 -303
- package/src/presentation/screens/components/sections/CustomSettingsList/README.md +47 -359
- package/src/presentation/screens/components/sections/FeatureSettingsSection/README.md +81 -176
- package/src/presentation/screens/components/sections/IdentitySettingsSection/README.md +40 -297
- package/src/presentation/screens/components/sections/ProfileSectionLoader/README.md +47 -451
- package/src/presentation/screens/components/sections/SupportSettingsSection/README.md +45 -361
- package/src/presentation/screens/hooks/README.md +64 -354
- package/src/presentation/screens/types/README.md +79 -409
- package/src/presentation/screens/utils/README.md +65 -255
|
@@ -1,439 +1,109 @@
|
|
|
1
1
|
# Settings Screen Types
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Types
|
|
6
|
-
|
|
7
|
-
### SettingsConfig
|
|
8
|
-
|
|
9
|
-
Main configuration object for the settings screen.
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
interface SettingsConfig {
|
|
13
|
-
appearance?: FeatureVisibility | AppearanceConfig;
|
|
14
|
-
language?: FeatureVisibility | LanguageConfig;
|
|
15
|
-
notifications?: FeatureVisibility | NotificationsConfig;
|
|
16
|
-
about?: FeatureVisibility | AboutConfig;
|
|
17
|
-
legal?: FeatureVisibility | LegalConfig;
|
|
18
|
-
disclaimer?: FeatureVisibility | DisclaimerConfig;
|
|
19
|
-
userProfile?: boolean | UserProfileConfig;
|
|
20
|
-
feedback?: FeatureVisibility | FeedbackConfig;
|
|
21
|
-
rating?: FeatureVisibility | RatingConfig;
|
|
22
|
-
faqs?: FeatureVisibility | FAQConfig;
|
|
23
|
-
cloudSync?: FeatureVisibility | CloudSyncConfig;
|
|
24
|
-
subscription?: FeatureVisibility | SubscriptionConfig;
|
|
25
|
-
wallet?: FeatureVisibility | WalletConfig;
|
|
26
|
-
emptyStateText?: string;
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
#### Usage Examples
|
|
31
|
-
|
|
32
|
-
**Simple Configuration:**
|
|
33
|
-
|
|
34
|
-
```typescript
|
|
35
|
-
const config: SettingsConfig = {
|
|
36
|
-
appearance: true,
|
|
37
|
-
language: true,
|
|
38
|
-
notifications: 'auto',
|
|
39
|
-
about: false,
|
|
40
|
-
};
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
**Advanced Configuration:**
|
|
44
|
-
|
|
45
|
-
```typescript
|
|
46
|
-
const config: SettingsConfig = {
|
|
47
|
-
appearance: {
|
|
48
|
-
enabled: true,
|
|
49
|
-
route: 'CustomAppearance',
|
|
50
|
-
showThemeSection: true,
|
|
51
|
-
showColorsSection: true,
|
|
52
|
-
},
|
|
53
|
-
language: {
|
|
54
|
-
enabled: 'auto',
|
|
55
|
-
route: 'LanguageSelection',
|
|
56
|
-
showFlags: true,
|
|
57
|
-
},
|
|
58
|
-
subscription: {
|
|
59
|
-
enabled: true,
|
|
60
|
-
title: 'Upgrade to Pro',
|
|
61
|
-
onPress: () => navigation.navigate('Upgrade'),
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### FeatureVisibility
|
|
67
|
-
|
|
68
|
-
Feature enablement type:
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
type FeatureVisibility = boolean | 'auto';
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
- `true`: Always show feature
|
|
75
|
-
- `false`: Never show feature
|
|
76
|
-
- `'auto'`: Automatically detect based on navigation
|
|
77
|
-
|
|
78
|
-
### NormalizedConfig
|
|
79
|
-
|
|
80
|
-
Normalized configuration with consistent structure:
|
|
81
|
-
|
|
82
|
-
```typescript
|
|
83
|
-
interface NormalizedConfig {
|
|
84
|
-
appearance: {
|
|
85
|
-
enabled: boolean;
|
|
86
|
-
config?: AppearanceConfig;
|
|
87
|
-
};
|
|
88
|
-
language: {
|
|
89
|
-
enabled: boolean;
|
|
90
|
-
config?: LanguageConfig;
|
|
91
|
-
};
|
|
92
|
-
notifications: {
|
|
93
|
-
enabled: boolean;
|
|
94
|
-
config?: NotificationsConfig;
|
|
95
|
-
};
|
|
96
|
-
// ... other features
|
|
97
|
-
}
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### CustomSettingsSection
|
|
101
|
-
|
|
102
|
-
Type for custom settings sections:
|
|
103
|
-
|
|
104
|
-
```typescript
|
|
105
|
-
interface CustomSettingsSection {
|
|
106
|
-
id?: string;
|
|
107
|
-
title: string;
|
|
108
|
-
order?: number;
|
|
109
|
-
content?: ReactNode;
|
|
110
|
-
items?: CustomSettingsItem[];
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### CustomSettingsItem
|
|
115
|
-
|
|
116
|
-
Type for custom settings items:
|
|
117
|
-
|
|
118
|
-
```typescript
|
|
119
|
-
interface CustomSettingsItem {
|
|
120
|
-
id?: string;
|
|
121
|
-
title: string;
|
|
122
|
-
subtitle?: string;
|
|
123
|
-
icon: IconName;
|
|
124
|
-
onPress?: () => void;
|
|
125
|
-
rightIcon?: IconName;
|
|
126
|
-
iconBgColor?: string;
|
|
127
|
-
iconColor?: string;
|
|
128
|
-
}
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
## Content Configuration Types
|
|
132
|
-
|
|
133
|
-
### AppearanceConfig
|
|
134
|
-
|
|
135
|
-
```typescript
|
|
136
|
-
interface AppearanceConfig {
|
|
137
|
-
enabled?: FeatureVisibility;
|
|
138
|
-
route?: string;
|
|
139
|
-
showThemeSection?: boolean;
|
|
140
|
-
showColorsSection?: boolean;
|
|
141
|
-
showPreviewSection?: boolean;
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### LanguageConfig
|
|
146
|
-
|
|
147
|
-
```typescript
|
|
148
|
-
interface LanguageConfig {
|
|
149
|
-
enabled?: FeatureVisibility;
|
|
150
|
-
route?: string;
|
|
151
|
-
showFlags?: boolean;
|
|
152
|
-
}
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### NotificationsConfig
|
|
3
|
+
## Purpose
|
|
156
4
|
|
|
157
|
-
|
|
158
|
-
interface NotificationsConfig {
|
|
159
|
-
enabled?: FeatureVisibility;
|
|
160
|
-
route?: string;
|
|
161
|
-
showQuietHours?: boolean;
|
|
162
|
-
showCategories?: boolean;
|
|
163
|
-
}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### AboutConfig
|
|
167
|
-
|
|
168
|
-
```typescript
|
|
169
|
-
interface AboutConfig {
|
|
170
|
-
enabled?: FeatureVisibility;
|
|
171
|
-
route?: string;
|
|
172
|
-
appName?: string;
|
|
173
|
-
version?: string;
|
|
174
|
-
buildNumber?: string;
|
|
175
|
-
developer?: string;
|
|
176
|
-
contactEmail?: string;
|
|
177
|
-
websiteUrl?: string;
|
|
178
|
-
websiteDisplay?: string;
|
|
179
|
-
moreAppsUrl?: string;
|
|
180
|
-
}
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
### LegalConfig
|
|
184
|
-
|
|
185
|
-
```typescript
|
|
186
|
-
interface LegalConfig {
|
|
187
|
-
enabled?: FeatureVisibility;
|
|
188
|
-
route?: string;
|
|
189
|
-
showPrivacy?: boolean;
|
|
190
|
-
showTerms?: boolean;
|
|
191
|
-
showEula?: boolean;
|
|
192
|
-
privacyPolicyUrl?: string;
|
|
193
|
-
termsOfServiceUrl?: string;
|
|
194
|
-
eulaUrl?: string;
|
|
195
|
-
}
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### DisclaimerConfig
|
|
199
|
-
|
|
200
|
-
```typescript
|
|
201
|
-
interface DisclaimerConfig {
|
|
202
|
-
enabled?: FeatureVisibility;
|
|
203
|
-
route?: string;
|
|
204
|
-
title?: string;
|
|
205
|
-
message?: string;
|
|
206
|
-
shortMessage?: string;
|
|
207
|
-
}
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
## User Feature Types
|
|
211
|
-
|
|
212
|
-
### UserProfileConfig
|
|
213
|
-
|
|
214
|
-
```typescript
|
|
215
|
-
interface UserProfileConfig {
|
|
216
|
-
displayName?: string;
|
|
217
|
-
userId?: string;
|
|
218
|
-
isAnonymous?: boolean;
|
|
219
|
-
avatarUrl?: string;
|
|
220
|
-
accountSettingsRoute?: string;
|
|
221
|
-
onPress?: () => void;
|
|
222
|
-
anonymousDisplayName?: string;
|
|
223
|
-
avatarServiceUrl?: string;
|
|
224
|
-
}
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### FeedbackConfig
|
|
228
|
-
|
|
229
|
-
```typescript
|
|
230
|
-
interface FeedbackConfig {
|
|
231
|
-
enabled?: FeatureVisibility;
|
|
232
|
-
title?: string;
|
|
233
|
-
description?: string;
|
|
234
|
-
feedbackTypes?: FeedbackType[];
|
|
235
|
-
}
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
### RatingConfig
|
|
239
|
-
|
|
240
|
-
```typescript
|
|
241
|
-
interface RatingConfig {
|
|
242
|
-
enabled?: FeatureVisibility;
|
|
243
|
-
title?: string;
|
|
244
|
-
description?: string;
|
|
245
|
-
storeUrl?: string;
|
|
246
|
-
}
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### FAQConfig
|
|
250
|
-
|
|
251
|
-
```typescript
|
|
252
|
-
interface FAQConfig {
|
|
253
|
-
enabled?: FeatureVisibility;
|
|
254
|
-
title?: string;
|
|
255
|
-
description?: string;
|
|
256
|
-
categories?: FAQCategory[];
|
|
257
|
-
}
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### SubscriptionConfig
|
|
261
|
-
|
|
262
|
-
```typescript
|
|
263
|
-
interface SubscriptionConfig {
|
|
264
|
-
enabled?: FeatureVisibility;
|
|
265
|
-
title?: string;
|
|
266
|
-
description?: string;
|
|
267
|
-
icon?: string;
|
|
268
|
-
onPress?: () => void;
|
|
269
|
-
sectionTitle?: string;
|
|
270
|
-
}
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
### WalletConfig
|
|
274
|
-
|
|
275
|
-
```typescript
|
|
276
|
-
interface WalletConfig {
|
|
277
|
-
enabled?: FeatureVisibility;
|
|
278
|
-
title?: string;
|
|
279
|
-
description?: string;
|
|
280
|
-
icon?: string;
|
|
281
|
-
route?: string;
|
|
282
|
-
sectionTitle?: string;
|
|
283
|
-
}
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
### CloudSyncConfig
|
|
287
|
-
|
|
288
|
-
```typescript
|
|
289
|
-
interface CloudSyncConfig {
|
|
290
|
-
enabled?: FeatureVisibility;
|
|
291
|
-
title?: string;
|
|
292
|
-
description?: string;
|
|
293
|
-
}
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
## Base Types
|
|
297
|
-
|
|
298
|
-
### BaseTypes.ts
|
|
299
|
-
|
|
300
|
-
```typescript
|
|
301
|
-
type FeatureVisibility = boolean | 'auto';
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### ContentConfig.ts
|
|
305
|
-
|
|
306
|
-
```typescript
|
|
307
|
-
export interface AppearanceConfig { ... }
|
|
308
|
-
export interface LanguageConfig { ... }
|
|
309
|
-
export interface NotificationsConfig { ... }
|
|
310
|
-
export interface AboutConfig { ... }
|
|
311
|
-
export interface LegalConfig { ... }
|
|
312
|
-
export interface DisclaimerConfig { ... }
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
### UserFeatureConfig.ts
|
|
5
|
+
TypeScript type definitions for settings screen configuration, components, and utilities.
|
|
316
6
|
|
|
317
|
-
|
|
318
|
-
export interface UserProfileConfig { ... }
|
|
319
|
-
export interface FeedbackConfig { ... }
|
|
320
|
-
export interface RatingConfig { ... }
|
|
321
|
-
export interface FAQConfig { ... }
|
|
322
|
-
export interface CloudSyncConfig { ... }
|
|
323
|
-
export interface SubscriptionConfig { ... }
|
|
324
|
-
export interface WalletConfig { ... }
|
|
325
|
-
```
|
|
7
|
+
## File Paths
|
|
326
8
|
|
|
327
|
-
|
|
9
|
+
- **Base Types**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/presentation/screens/types/BaseTypes.ts`
|
|
10
|
+
- **Content Config**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/presentation/screens/types/ContentConfig.ts`
|
|
11
|
+
- **User Features**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/presentation/screens/types/UserFeatureConfig.ts`
|
|
12
|
+
- **Custom Sections**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/presentation/screens/types/CustomSection.ts`
|
|
13
|
+
- **Settings Config**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/presentation/screens/types/SettingsConfig.ts`
|
|
14
|
+
- **Index**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/presentation/screens/types/index.ts`
|
|
328
15
|
|
|
329
|
-
|
|
16
|
+
## Strategy
|
|
330
17
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}
|
|
18
|
+
1. **Type Safety**: Provides comprehensive TypeScript types for all settings functionality
|
|
19
|
+
2. **Config Validation**: Ensures configuration objects are properly typed
|
|
20
|
+
3. **Modular Organization**: Separates types by feature domain
|
|
21
|
+
4. **Reusability**: Exports types for use across the application
|
|
22
|
+
5. **Documentation**: Types serve as inline documentation
|
|
337
23
|
|
|
338
|
-
|
|
339
|
-
if (isAppearanceConfig(config.appearance)) {
|
|
340
|
-
console.log(config.appearance.route); // TypeScript knows this exists
|
|
341
|
-
}
|
|
342
|
-
```
|
|
24
|
+
## Restrictions (Forbidden)
|
|
343
25
|
|
|
344
|
-
###
|
|
26
|
+
### DO NOT
|
|
27
|
+
- ❌ DO NOT use `any` type for configuration objects
|
|
28
|
+
- ❌ DO NOT bypass type checking with type assertions
|
|
29
|
+
- ❌ DO NOT create duplicate type definitions
|
|
345
30
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
if (value === 'auto') return true; // Will be detected
|
|
351
|
-
if (typeof value === 'boolean') return value;
|
|
352
|
-
if (value?.enabled === 'auto') return true;
|
|
353
|
-
return value?.enabled === true;
|
|
354
|
-
}
|
|
31
|
+
### NEVER
|
|
32
|
+
- ❌ NEVER use config objects without proper typing
|
|
33
|
+
- ❌ NEVER assume optional properties exist without checking
|
|
34
|
+
- ❌ NEVER mix config types (e.g., pass AppearanceConfig where LanguageConfig expected)
|
|
355
35
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
```
|
|
36
|
+
### AVOID
|
|
37
|
+
- ❌ AVOID creating overly complex nested types
|
|
38
|
+
- ❌ AVOID circular type dependencies
|
|
39
|
+
- ❌ AVOID type definitions that don't match actual usage
|
|
361
40
|
|
|
362
|
-
##
|
|
41
|
+
## Rules (Mandatory)
|
|
363
42
|
|
|
364
|
-
|
|
43
|
+
### ALWAYS
|
|
44
|
+
- ✅ ALWAYS use proper TypeScript types for config objects
|
|
45
|
+
- ✅ ALWAYS use type guards for checking config object types
|
|
46
|
+
- ✅ MUST provide type exports for public API
|
|
47
|
+
- ✅ MUST keep types in sync with actual usage
|
|
365
48
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
export * from './UserFeatureConfig';
|
|
371
|
-
export * from './CustomSection';
|
|
372
|
-
export * from './SettingsConfig';
|
|
373
|
-
```
|
|
49
|
+
### MUST
|
|
50
|
+
- ✅ MUST use FeatureVisibility type for feature enablement
|
|
51
|
+
- ✅ MUST validate config at runtime when needed
|
|
52
|
+
- ✅ MUST use proper generics for reusable types
|
|
374
53
|
|
|
375
|
-
|
|
54
|
+
### SHOULD
|
|
55
|
+
- ✅ SHOULD use type aliases for common patterns
|
|
56
|
+
- ✅ SHOULD document complex types with comments
|
|
57
|
+
- ✅ SHOULD keep types simple and focused
|
|
376
58
|
|
|
377
|
-
|
|
59
|
+
## AI Agent Guidelines
|
|
378
60
|
|
|
379
|
-
|
|
380
|
-
|
|
61
|
+
1. **File Reference**: When modifying types, refer to files in `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/presentation/screens/types/`
|
|
62
|
+
2. **Type Safety**: Always use types from this module, never create inline types
|
|
63
|
+
3. **FeatureVisibility**: Understand the three values: true (enabled), false (disabled), 'auto' (detect)
|
|
64
|
+
4. **Type Guards**: Use type guards to safely check config object types
|
|
65
|
+
5. **Exports**: Import types from the main index file for consistency
|
|
381
66
|
|
|
382
|
-
|
|
383
|
-
appearance: {
|
|
384
|
-
enabled: true,
|
|
385
|
-
route: 'CustomAppearance',
|
|
386
|
-
showThemeSection: true,
|
|
387
|
-
showColorsSection: false,
|
|
388
|
-
},
|
|
389
|
-
};
|
|
390
|
-
```
|
|
67
|
+
## Type Reference
|
|
391
68
|
|
|
392
|
-
###
|
|
69
|
+
### Core Types
|
|
393
70
|
|
|
394
|
-
|
|
395
|
-
|
|
71
|
+
**FeatureVisibility**: `boolean | 'auto'`
|
|
72
|
+
- true: Always show feature
|
|
73
|
+
- false: Never show feature
|
|
74
|
+
- 'auto': Automatically detect based on navigation
|
|
396
75
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
title: 'CUSTOM SECTION',
|
|
400
|
-
order: 1,
|
|
401
|
-
items: [
|
|
402
|
-
{
|
|
403
|
-
id: 'item1',
|
|
404
|
-
title: 'Custom Item',
|
|
405
|
-
icon: 'settings-outline',
|
|
406
|
-
onPress: () => console.log('Pressed'),
|
|
407
|
-
},
|
|
408
|
-
],
|
|
409
|
-
};
|
|
410
|
-
```
|
|
76
|
+
**SettingsConfig**: Main configuration interface with all features
|
|
77
|
+
- Supports boolean, 'auto', or object config for each feature
|
|
411
78
|
|
|
412
|
-
|
|
79
|
+
**NormalizedConfig**: Normalized structure with enabled flags and config objects
|
|
80
|
+
- Consistent format for all features
|
|
81
|
+
- Used internally after normalization
|
|
413
82
|
|
|
414
|
-
|
|
415
|
-
import { normalizeSettingsConfig } from '@umituz/react-native-settings';
|
|
416
|
-
import type { NormalizedConfig } from '@umituz/react-native-settings';
|
|
83
|
+
### Feature Config Types
|
|
417
84
|
|
|
418
|
-
|
|
419
|
-
|
|
85
|
+
**AppearanceConfig**: Appearance settings configuration
|
|
86
|
+
**LanguageConfig**: Language selection configuration
|
|
87
|
+
**NotificationsConfig**: Notification settings configuration
|
|
88
|
+
**AboutConfig**: About screen configuration
|
|
89
|
+
**LegalConfig**: Legal screen configuration
|
|
420
90
|
|
|
421
|
-
|
|
91
|
+
### User Feature Types
|
|
422
92
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
7. **Generic Types**: Leverage generics for reusability
|
|
93
|
+
**UserProfileConfig**: User profile display configuration
|
|
94
|
+
**FeedbackConfig**: Feedback functionality configuration
|
|
95
|
+
**RatingConfig**: App rating prompt configuration
|
|
96
|
+
**FAQConfig**: FAQ section configuration
|
|
97
|
+
**SubscriptionConfig**: Subscription/upgrade configuration
|
|
98
|
+
**WalletConfig**: Wallet settings configuration
|
|
430
99
|
|
|
431
|
-
|
|
100
|
+
### Custom Types
|
|
432
101
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
- **SettingsScreen**: Main screen component
|
|
102
|
+
**CustomSettingsSection**: Custom section definition
|
|
103
|
+
**CustomSettingsItem**: Custom item within a section
|
|
436
104
|
|
|
437
|
-
##
|
|
105
|
+
## Related Components
|
|
438
106
|
|
|
439
|
-
|
|
107
|
+
- **normalizeSettingsConfig**: Uses these types for normalization
|
|
108
|
+
- **SettingsScreen**: Uses these types for props
|
|
109
|
+
- **useFeatureDetection**: Uses these types for feature flags
|