@umituz/react-native-settings 4.20.55 → 4.20.57
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/README.md +145 -3
- package/package.json +1 -2
- package/src/application/README.md +322 -0
- package/src/domains/about/README.md +452 -0
- package/src/domains/about/presentation/hooks/README.md +350 -0
- package/src/domains/appearance/README.md +596 -0
- package/src/domains/appearance/hooks/README.md +366 -0
- package/src/domains/appearance/infrastructure/services/README.md +455 -0
- package/src/domains/cloud-sync/README.md +451 -0
- package/src/domains/cloud-sync/presentation/components/README.md +493 -0
- package/src/domains/dev/README.md +477 -0
- package/src/domains/disclaimer/README.md +421 -0
- package/src/domains/disclaimer/presentation/components/README.md +394 -0
- package/src/domains/faqs/README.md +586 -0
- package/src/domains/feedback/README.md +565 -0
- package/src/domains/feedback/presentation/hooks/README.md +428 -0
- package/src/domains/legal/README.md +549 -0
- package/src/domains/rating/README.md +452 -0
- package/src/domains/rating/presentation/components/README.md +475 -0
- package/src/domains/video-tutorials/README.md +482 -0
- package/src/domains/video-tutorials/presentation/components/README.md +433 -0
- package/src/infrastructure/README.md +509 -0
- package/src/infrastructure/repositories/README.md +475 -0
- package/src/infrastructure/services/README.md +510 -0
- package/src/presentation/components/README.md +482 -0
- package/src/presentation/components/SettingsErrorBoundary/README.md +461 -0
- package/src/presentation/components/SettingsFooter/README.md +446 -0
- package/src/presentation/components/SettingsItemCard/README.md +457 -0
- package/src/presentation/components/SettingsSection/README.md +421 -0
- package/src/presentation/hooks/README.md +413 -0
- package/src/presentation/hooks/mutations/README.md +430 -0
- package/src/presentation/hooks/queries/README.md +441 -0
- package/src/presentation/navigation/README.md +532 -0
- package/src/presentation/navigation/components/README.md +330 -0
- package/src/presentation/navigation/hooks/README.md +399 -0
- package/src/presentation/navigation/utils/README.md +442 -0
- package/src/presentation/screens/README.md +525 -0
- package/src/presentation/screens/components/SettingsContent/README.md +404 -0
- package/src/presentation/screens/components/SettingsHeader/README.md +322 -0
- package/src/presentation/screens/components/sections/CustomSettingsList/README.md +388 -0
- package/src/presentation/screens/components/sections/FeatureSettingsSection/README.md +232 -0
- package/src/presentation/screens/components/sections/IdentitySettingsSection/README.md +325 -0
- package/src/presentation/screens/components/sections/ProfileSectionLoader/README.md +480 -0
- package/src/presentation/screens/components/sections/SupportSettingsSection/README.md +391 -0
- package/src/presentation/screens/hooks/README.md +383 -0
- package/src/presentation/screens/types/README.md +439 -0
- package/src/presentation/screens/utils/README.md +288 -0
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
# Identity Settings Section
|
|
2
|
+
|
|
3
|
+
Section component that displays user identity-related settings including About and Legal information.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **About Section**: App information, version, developer details
|
|
8
|
+
- **Legal Section**: Privacy policy, terms of service, legal documents
|
|
9
|
+
- **Conditional Rendering**: Shows only enabled sections
|
|
10
|
+
- **Internationalization**: Full i18n support
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
This component is part of `@umituz/react-native-settings`.
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
### Basic Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { IdentitySettingsSection } from '@umituz/react-native-settings';
|
|
22
|
+
|
|
23
|
+
function MySettingsScreen() {
|
|
24
|
+
const normalizedConfig = {
|
|
25
|
+
about: { config: {} },
|
|
26
|
+
legal: { config: {} },
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const features = {
|
|
30
|
+
about: true,
|
|
31
|
+
legal: true,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<IdentitySettingsSection
|
|
36
|
+
normalizedConfig={normalizedConfig}
|
|
37
|
+
features={features}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Props
|
|
44
|
+
|
|
45
|
+
### IdentitySettingsSectionProps
|
|
46
|
+
|
|
47
|
+
| Prop | Type | Default | Description |
|
|
48
|
+
|------|------|---------|-------------|
|
|
49
|
+
| `normalizedConfig` | `NormalizedConfig` | **Required** | Normalized settings configuration |
|
|
50
|
+
| `features` | `FeatureFlags` | **Required** | Feature visibility flags |
|
|
51
|
+
|
|
52
|
+
### FeatureFlags
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
interface FeatureFlags {
|
|
56
|
+
about: boolean; // Show about section
|
|
57
|
+
legal: boolean; // Show legal section
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Component Structure
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
IdentitySettingsSection
|
|
65
|
+
├── AboutSection (if features.about)
|
|
66
|
+
│ ├── App Information
|
|
67
|
+
│ ├── Version
|
|
68
|
+
│ ├── Developer
|
|
69
|
+
│ └── Contact
|
|
70
|
+
└── LegalSection (if features.legal)
|
|
71
|
+
├── Privacy Policy
|
|
72
|
+
├── Terms of Service
|
|
73
|
+
└── EULA (if provided)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Examples
|
|
77
|
+
|
|
78
|
+
### All Identity Features
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
function FullIdentitySettings() {
|
|
82
|
+
const normalizedConfig = {
|
|
83
|
+
about: {
|
|
84
|
+
config: {
|
|
85
|
+
appName: 'My App',
|
|
86
|
+
version: '1.0.0',
|
|
87
|
+
developer: 'My Company',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
legal: {
|
|
91
|
+
config: {
|
|
92
|
+
privacyPolicyUrl: 'https://example.com/privacy',
|
|
93
|
+
termsOfServiceUrl: 'https://example.com/terms',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const features = {
|
|
99
|
+
about: true,
|
|
100
|
+
legal: true,
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
<IdentitySettingsSection
|
|
105
|
+
normalizedConfig={normalizedConfig}
|
|
106
|
+
features={features}
|
|
107
|
+
/>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### About Only
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
function AboutOnlySettings() {
|
|
116
|
+
const normalizedConfig = {
|
|
117
|
+
about: {
|
|
118
|
+
config: {
|
|
119
|
+
appName: 'My App',
|
|
120
|
+
version: '1.0.0',
|
|
121
|
+
showDeveloper: true,
|
|
122
|
+
showContact: true,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const features = {
|
|
128
|
+
about: true,
|
|
129
|
+
legal: false,
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
return (
|
|
133
|
+
<IdentitySettingsSection
|
|
134
|
+
normalizedConfig={normalizedConfig}
|
|
135
|
+
features={features}
|
|
136
|
+
/>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Legal Only
|
|
142
|
+
|
|
143
|
+
```tsx
|
|
144
|
+
function LegalOnlySettings() {
|
|
145
|
+
const normalizedConfig = {
|
|
146
|
+
legal: {
|
|
147
|
+
config: {
|
|
148
|
+
showPrivacy: true,
|
|
149
|
+
showTerms: true,
|
|
150
|
+
showEula: false,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const features = {
|
|
156
|
+
about: false,
|
|
157
|
+
legal: true,
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
<IdentitySettingsSection
|
|
162
|
+
normalizedConfig={normalizedConfig}
|
|
163
|
+
features={features}
|
|
164
|
+
/>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### With Custom Configuration
|
|
170
|
+
|
|
171
|
+
```tsx
|
|
172
|
+
function CustomIdentitySettings() {
|
|
173
|
+
const normalizedConfig = {
|
|
174
|
+
about: {
|
|
175
|
+
config: {
|
|
176
|
+
appName: 'Custom App',
|
|
177
|
+
version: '2.0.0',
|
|
178
|
+
developer: 'Custom Developer',
|
|
179
|
+
websiteUrl: 'https://custom.com',
|
|
180
|
+
supportEmail: 'support@custom.com',
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
legal: {
|
|
184
|
+
config: {
|
|
185
|
+
privacyPolicyContent: 'Our privacy policy...',
|
|
186
|
+
termsOfServiceContent: 'Our terms...',
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
return (
|
|
192
|
+
<IdentitySettingsSection
|
|
193
|
+
normalizedConfig={normalizedConfig}
|
|
194
|
+
features={{ about: true, legal: true }}
|
|
195
|
+
/>
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Sub-Components
|
|
201
|
+
|
|
202
|
+
### AboutSection
|
|
203
|
+
|
|
204
|
+
From About domain, displays app information.
|
|
205
|
+
|
|
206
|
+
```tsx
|
|
207
|
+
<AboutSection
|
|
208
|
+
config={{
|
|
209
|
+
appName: 'My App',
|
|
210
|
+
version: '1.0.0',
|
|
211
|
+
developer: 'My Company',
|
|
212
|
+
contactEmail: 'support@example.com',
|
|
213
|
+
websiteUrl: 'https://example.com',
|
|
214
|
+
}}
|
|
215
|
+
sectionTitle="ABOUT"
|
|
216
|
+
/>
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**AboutSection Props:**
|
|
220
|
+
|
|
221
|
+
- `appName`: Application name
|
|
222
|
+
- `version`: App version
|
|
223
|
+
- `buildNumber`: Build number
|
|
224
|
+
- `developer`: Developer/company name
|
|
225
|
+
- `contactEmail`: Support email
|
|
226
|
+
- `websiteUrl`: Website URL
|
|
227
|
+
- `actions`: Press handlers for email/website
|
|
228
|
+
|
|
229
|
+
### LegalSection
|
|
230
|
+
|
|
231
|
+
From Legal domain, displays legal document links.
|
|
232
|
+
|
|
233
|
+
```tsx
|
|
234
|
+
<LegalSection
|
|
235
|
+
config={{
|
|
236
|
+
title: 'Legal',
|
|
237
|
+
description: 'Important information',
|
|
238
|
+
privacyPolicyUrl: 'https://example.com/privacy',
|
|
239
|
+
termsOfServiceUrl: 'https://example.com/terms',
|
|
240
|
+
eulaUrl: 'https://example.com/eula',
|
|
241
|
+
}}
|
|
242
|
+
sectionTitle="LEGAL"
|
|
243
|
+
/>
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**LegalSection Props:**
|
|
247
|
+
|
|
248
|
+
- `privacyPolicyUrl`: Privacy policy URL or content
|
|
249
|
+
- `termsOfServiceUrl`: Terms URL or content
|
|
250
|
+
- `eulaUrl`: EULA URL or content (optional)
|
|
251
|
+
- `onPrivacyPress`: Custom privacy handler
|
|
252
|
+
- `onTermsPress`: Custom terms handler
|
|
253
|
+
- `onEulaPress`: Custom EULA handler
|
|
254
|
+
|
|
255
|
+
## Configuration
|
|
256
|
+
|
|
257
|
+
### About Configuration
|
|
258
|
+
|
|
259
|
+
```typescript
|
|
260
|
+
interface AboutConfig {
|
|
261
|
+
appName?: string;
|
|
262
|
+
version?: string;
|
|
263
|
+
buildNumber?: string;
|
|
264
|
+
developer?: string;
|
|
265
|
+
contactEmail?: string;
|
|
266
|
+
websiteUrl?: string;
|
|
267
|
+
websiteDisplay?: string;
|
|
268
|
+
moreAppsUrl?: string;
|
|
269
|
+
actions?: {
|
|
270
|
+
onEmailPress?: () => void;
|
|
271
|
+
onWebsitePress?: () => void;
|
|
272
|
+
onMoreAppsPress?: () => void;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Legal Configuration
|
|
278
|
+
|
|
279
|
+
```typescript
|
|
280
|
+
interface LegalConfig {
|
|
281
|
+
privacyPolicyUrl?: string;
|
|
282
|
+
termsOfServiceUrl?: string;
|
|
283
|
+
eulaUrl?: string;
|
|
284
|
+
privacyPolicyContent?: string;
|
|
285
|
+
termsOfServiceContent?: string;
|
|
286
|
+
eulaContent?: string;
|
|
287
|
+
onPrivacyPress?: () => void;
|
|
288
|
+
onTermsPress?: () => void;
|
|
289
|
+
onEulaPress?: () => void;
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Internationalization
|
|
294
|
+
|
|
295
|
+
Translation keys used:
|
|
296
|
+
|
|
297
|
+
```typescript
|
|
298
|
+
// About
|
|
299
|
+
t("settings.about.title")
|
|
300
|
+
t("settings.about.description")
|
|
301
|
+
|
|
302
|
+
// Legal
|
|
303
|
+
t("settings.legal.title")
|
|
304
|
+
t("settings.legal.description")
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
## Best Practices
|
|
308
|
+
|
|
309
|
+
1. **Separate Concerns**: Keep identity settings separate from other features
|
|
310
|
+
2. **Consistent Order**: About first, then Legal
|
|
311
|
+
3. **Navigation**: Provide proper navigation handlers
|
|
312
|
+
4. **URL Handling**: Handle both URLs and inline content
|
|
313
|
+
5. **Translation**: Use translation keys for all text
|
|
314
|
+
6. **Contact Info**: Always include contact information in About
|
|
315
|
+
7. **Legal Docs**: Include all required legal documents
|
|
316
|
+
|
|
317
|
+
## Related
|
|
318
|
+
|
|
319
|
+
- **About Domain**: App information features
|
|
320
|
+
- **Legal Domain**: Legal document features
|
|
321
|
+
- **Feature Settings**: Other setting sections
|
|
322
|
+
|
|
323
|
+
## License
|
|
324
|
+
|
|
325
|
+
MIT
|