@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.
Files changed (47) hide show
  1. package/README.md +145 -3
  2. package/package.json +1 -2
  3. package/src/application/README.md +322 -0
  4. package/src/domains/about/README.md +452 -0
  5. package/src/domains/about/presentation/hooks/README.md +350 -0
  6. package/src/domains/appearance/README.md +596 -0
  7. package/src/domains/appearance/hooks/README.md +366 -0
  8. package/src/domains/appearance/infrastructure/services/README.md +455 -0
  9. package/src/domains/cloud-sync/README.md +451 -0
  10. package/src/domains/cloud-sync/presentation/components/README.md +493 -0
  11. package/src/domains/dev/README.md +477 -0
  12. package/src/domains/disclaimer/README.md +421 -0
  13. package/src/domains/disclaimer/presentation/components/README.md +394 -0
  14. package/src/domains/faqs/README.md +586 -0
  15. package/src/domains/feedback/README.md +565 -0
  16. package/src/domains/feedback/presentation/hooks/README.md +428 -0
  17. package/src/domains/legal/README.md +549 -0
  18. package/src/domains/rating/README.md +452 -0
  19. package/src/domains/rating/presentation/components/README.md +475 -0
  20. package/src/domains/video-tutorials/README.md +482 -0
  21. package/src/domains/video-tutorials/presentation/components/README.md +433 -0
  22. package/src/infrastructure/README.md +509 -0
  23. package/src/infrastructure/repositories/README.md +475 -0
  24. package/src/infrastructure/services/README.md +510 -0
  25. package/src/presentation/components/README.md +482 -0
  26. package/src/presentation/components/SettingsErrorBoundary/README.md +461 -0
  27. package/src/presentation/components/SettingsFooter/README.md +446 -0
  28. package/src/presentation/components/SettingsItemCard/README.md +457 -0
  29. package/src/presentation/components/SettingsSection/README.md +421 -0
  30. package/src/presentation/hooks/README.md +413 -0
  31. package/src/presentation/hooks/mutations/README.md +430 -0
  32. package/src/presentation/hooks/queries/README.md +441 -0
  33. package/src/presentation/navigation/README.md +532 -0
  34. package/src/presentation/navigation/components/README.md +330 -0
  35. package/src/presentation/navigation/hooks/README.md +399 -0
  36. package/src/presentation/navigation/utils/README.md +442 -0
  37. package/src/presentation/screens/README.md +525 -0
  38. package/src/presentation/screens/components/SettingsContent/README.md +404 -0
  39. package/src/presentation/screens/components/SettingsHeader/README.md +322 -0
  40. package/src/presentation/screens/components/sections/CustomSettingsList/README.md +388 -0
  41. package/src/presentation/screens/components/sections/FeatureSettingsSection/README.md +232 -0
  42. package/src/presentation/screens/components/sections/IdentitySettingsSection/README.md +325 -0
  43. package/src/presentation/screens/components/sections/ProfileSectionLoader/README.md +480 -0
  44. package/src/presentation/screens/components/sections/SupportSettingsSection/README.md +391 -0
  45. package/src/presentation/screens/hooks/README.md +383 -0
  46. package/src/presentation/screens/types/README.md +439 -0
  47. package/src/presentation/screens/utils/README.md +288 -0
@@ -0,0 +1,394 @@
1
+ # Disclaimer Components
2
+
3
+ Components for displaying legal disclaimers, warnings, and important information to users.
4
+
5
+ ## Components
6
+
7
+ ### DisclaimerCard
8
+
9
+ Compact card component for displaying disclaimer summary with expand/collapse functionality.
10
+
11
+ ```tsx
12
+ import { DisclaimerCard } from '@umituz/react-native-settings';
13
+
14
+ function SettingsScreen() {
15
+ return (
16
+ <DisclaimerCard
17
+ title="Important Notice"
18
+ message="Please read our terms and conditions"
19
+ icon="warning-outline"
20
+ onPress={() => navigation.navigate('Disclaimer')}
21
+ />
22
+ );
23
+ }
24
+ ```
25
+
26
+ #### Props
27
+
28
+ | Prop | Type | Default | Description |
29
+ |------|------|---------|-------------|
30
+ | `title` | `string` | **Required** | Card title |
31
+ | `message` | `string` | **Required** | Disclaimer message |
32
+ | `icon` | `IconName` | `'warning-outline'` | Warning icon |
33
+ | `iconColor` | `string` | `'#FF9800'` | Icon color |
34
+ | `onPress` | `() => void` | **Required** | Press handler |
35
+ | `style` | `ViewStyle` | `undefined` | Custom container style |
36
+
37
+ #### Example
38
+
39
+ ```tsx
40
+ <DisclaimerCard
41
+ title="Beta Version"
42
+ message="This is a beta version. Use at your own risk."
43
+ icon="alert-circle-outline"
44
+ iconColor="#F44336"
45
+ onPress={() => showDisclaimer()}
46
+ />
47
+ ```
48
+
49
+ ### DisclaimerModal
50
+
51
+ Full-screen modal component for displaying comprehensive disclaimer content.
52
+
53
+ ```tsx
54
+ import { DisclaimerModal } from '@umituz/react-native-settings';
55
+
56
+ function DisclaimerModalExample() {
57
+ const [visible, setVisible] = useState(false);
58
+
59
+ return (
60
+ <DisclaimerModal
61
+ visible={visible}
62
+ title="Disclaimer"
63
+ message="This is the full disclaimer text..."
64
+ onClose={() => setVisible(false)}
65
+ onAccept={() => {
66
+ acceptDisclaimer();
67
+ setVisible(false);
68
+ }}
69
+ />
70
+ );
71
+ }
72
+ ```
73
+
74
+ #### Props
75
+
76
+ | Prop | Type | Default | Description |
77
+ |------|------|---------|-------------|
78
+ | `visible` | `boolean` | **Required** | Modal visibility |
79
+ | `title` | `string` | **Required** | Modal title |
80
+ | `message` | `string` | **Required** | Disclaimer message |
81
+ | `onClose` | `() => void` | **Required** | Close handler |
82
+ | `onAccept` | `() => void` | **Required** | Accept handler |
83
+ | `acceptText` | `string` | `'I Accept'` | Accept button text |
84
+ | `closeText` | `string` | `'Close'` | Close button text |
85
+ | `scrollEnabled` | `boolean` | `true` | Enable content scroll |
86
+
87
+ #### Example
88
+
89
+ ```tsx
90
+ <DisclaimerModal
91
+ visible={showDisclaimer}
92
+ title="Terms of Service"
93
+ message="By using this app, you agree to our terms..."
94
+ onClose={() => setShowDisclaimer(false)}
95
+ onAccept={() => {
96
+ saveAcceptance();
97
+ setShowDisclaimer(false);
98
+ }}
99
+ acceptText="I Agree"
100
+ closeText="Decline"
101
+ />
102
+ ```
103
+
104
+ ### DisclaimerSetting
105
+
106
+ Combined card + modal component for integrated disclaimer display.
107
+
108
+ ```tsx
109
+ import { DisclaimerSetting } from '@umituz/react-native-settings';
110
+
111
+ function DisclaimerSettingExample() {
112
+ return (
113
+ <DisclaimerSetting
114
+ title="Legal Disclaimer"
115
+ message="Important legal information"
116
+ fullText="Full disclaimer text here..."
117
+ onAccept={() => saveAcceptance()}
118
+ />
119
+ );
120
+ }
121
+ ```
122
+
123
+ #### Props
124
+
125
+ | Prop | Type | Default | Description |
126
+ |------|------|---------|-------------|
127
+ | `title` | `string` | **Required** | Disclaimer title |
128
+ | `message` | `string` | **Required** | Short message |
129
+ | `fullText` | `string` | **Required** | Full disclaimer text |
130
+ | `onAccept` | `() => void` | **Required** | Accept handler |
131
+ | `icon` | `IconName` | `'warning-outline'` | Icon name |
132
+ | `showOnce` | `boolean` | `false` | Show only once |
133
+ | `storageKey` | `string` | `'disclaimer'` | Storage key |
134
+
135
+ #### Example
136
+
137
+ ```tsx
138
+ <DisclaimerSetting
139
+ title="Privacy Notice"
140
+ message="We care about your privacy"
141
+ fullText="This is the full privacy policy text..."
142
+ onAccept={() => {
143
+ AsyncStorage.setItem('privacy-accepted', 'true');
144
+ }}
145
+ showOnce={true}
146
+ storageKey="privacy-disclaimer-2024"
147
+ />
148
+ ```
149
+
150
+ ### DisclaimerScreen
151
+
152
+ Dedicated screen component for comprehensive disclaimers.
153
+
154
+ ```tsx
155
+ import { DisclaimerScreen } from '@umituz/react-native-settings';
156
+
157
+ function DisclaimerStack() {
158
+ return (
159
+ <Stack.Screen
160
+ name="Disclaimer"
161
+ component={DisclaimerScreen}
162
+ options={{ title: 'Disclaimer' }}
163
+ initialParams={{
164
+ title: 'Legal Disclaimer',
165
+ message: 'Full disclaimer content...',
166
+ }}
167
+ />
168
+ );
169
+ }
170
+ ```
171
+
172
+ #### Props
173
+
174
+ | Prop | Type | Default | Description |
175
+ |------|------|---------|-------------|
176
+ | `route` | `RouteProp` | **Required** | Route with params |
177
+ | `navigation` | `NavigationProp` | **Required** | Navigation object |
178
+
179
+ #### Route Params
180
+
181
+ ```typescript
182
+ interface DisclaimerScreenParams {
183
+ title: string;
184
+ message: string;
185
+ showAccept?: boolean;
186
+ onAccept?: () => void;
187
+ }
188
+ ```
189
+
190
+ ## Examples
191
+
192
+ ### One-Time Disclaimer
193
+
194
+ ```tsx
195
+ function OneTimeDisclaimer() {
196
+ const [hasAccepted, setHasAccepted] = useState(false);
197
+
198
+ useEffect(() => {
199
+ AsyncStorage.getItem('disclaimer-accepted').then(value => {
200
+ setHasAccepted(!!value);
201
+ });
202
+ }, []);
203
+
204
+ const handleAccept = async () => {
205
+ await AsyncStorage.setItem('disclaimer-accepted', new Date().toISOString());
206
+ setHasAccepted(true);
207
+ };
208
+
209
+ if (hasAccepted) {
210
+ return null;
211
+ }
212
+
213
+ return (
214
+ <DisclaimerModal
215
+ visible={!hasAccepted}
216
+ title="Welcome!"
217
+ message="Please read and accept our disclaimer"
218
+ fullText="Full disclaimer text..."
219
+ onClose={() => {}}
220
+ onAccept={handleAccept}
221
+ acceptText="I Accept"
222
+ />
223
+ );
224
+ }
225
+ ```
226
+
227
+ ### Versioned Disclaimer
228
+
229
+ ```tsx
230
+ function VersionedDisclaimer() {
231
+ const DISCLAIMER_VERSION = '2.0';
232
+
233
+ const checkDisclaimer = async () => {
234
+ const acceptedVersion = await AsyncStorage.getItem('disclaimer-version');
235
+ return acceptedVersion === DISCLAIMER_VERSION;
236
+ };
237
+
238
+ const acceptDisclaimer = async () => {
239
+ await AsyncStorage.setItem('disclaimer-version', DISCLAIMER_VERSION);
240
+ };
241
+
242
+ return (
243
+ <DisclaimerSetting
244
+ title="Updated Disclaimer"
245
+ message="Our disclaimer has been updated"
246
+ fullText="New disclaimer content..."
247
+ onAccept={acceptDisclaimer}
248
+ />
249
+ );
250
+ }
251
+ ```
252
+
253
+ ### Conditional Disclaimer
254
+
255
+ ```tsx
256
+ function ConditionalDisclaimer({ featureEnabled }) {
257
+ if (!featureEnabled) {
258
+ return (
259
+ <DisclaimerCard
260
+ title="Feature Unavailable"
261
+ message="This feature is not available in your region"
262
+ icon="lock-closed-outline"
263
+ onPress={() => {}}
264
+ />
265
+ );
266
+ }
267
+
268
+ return <FeatureContent />;
269
+ }
270
+ ```
271
+
272
+ ### Multiple Disclaimers
273
+
274
+ ```tsx
275
+ function DisclaimerStack() {
276
+ return (
277
+ <View>
278
+ <DisclaimerSetting
279
+ title="Privacy Policy"
280
+ message="We value your privacy"
281
+ fullText="Privacy policy..."
282
+ onAccept={() => {}}
283
+ storageKey="privacy"
284
+ />
285
+
286
+ <DisclaimerSetting
287
+ title="Terms of Service"
288
+ message="Please read our terms"
289
+ fullText="Terms of service..."
290
+ onAccept={() => {}}
291
+ storageKey="terms"
292
+ />
293
+
294
+ <DisclaimerSetting
295
+ title="Beta Warning"
296
+ message="This is beta software"
297
+ fullText="Beta warning..."
298
+ onAccept={() => {}}
299
+ storageKey="beta"
300
+ />
301
+ </View>
302
+ );
303
+ }
304
+ ```
305
+
306
+ ## Internationalization
307
+
308
+ ### Translation Keys
309
+
310
+ ```typescript
311
+ // Translation keys used
312
+ disclaimer.title = 'Disclaimer';
313
+ disclaimer.message = 'Important legal information';
314
+ disclaimer.accept = 'I Accept';
315
+ disclaimer.decline = 'Decline';
316
+ disclaimer.close = 'Close';
317
+ ```
318
+
319
+ ### Usage with i18n
320
+
321
+ ```tsx
322
+ import { useTranslation } from 'react-i18next';
323
+
324
+ function LocalizedDisclaimer() {
325
+ const { t } = useTranslation();
326
+
327
+ return (
328
+ <DisclaimerModal
329
+ visible={visible}
330
+ title={t('disclaimer.title')}
331
+ message={t('disclaimer.message')}
332
+ fullText={t('disclaimer.fullText')}
333
+ onClose={() => setVisible(false)}
334
+ onAccept={() => accept()}
335
+ acceptText={t('disclaimer.accept')}
336
+ closeText={t('disclaimer.decline')}
337
+ />
338
+ );
339
+ }
340
+ ```
341
+
342
+ ## Styling
343
+
344
+ ### Custom Card Styles
345
+
346
+ ```tsx
347
+ <DisclaimerCard
348
+ title="Custom Warning"
349
+ message="This is a custom styled disclaimer"
350
+ style={{
351
+ backgroundColor: '#FFF3E0',
352
+ borderLeftWidth: 4,
353
+ borderLeftColor: '#FF9800',
354
+ padding: 16,
355
+ }}
356
+ />
357
+ ```
358
+
359
+ ### Custom Modal Styles
360
+
361
+ ```tsx
362
+ <DisclaimerModal
363
+ visible={visible}
364
+ title="Disclaimer"
365
+ message="Content..."
366
+ containerStyle={{
367
+ backgroundColor: 'rgba(0, 0, 0, 0.8)',
368
+ }}
369
+ contentStyle={{
370
+ backgroundColor: 'white',
371
+ borderRadius: 16,
372
+ padding: 24,
373
+ }}
374
+ />
375
+ ```
376
+
377
+ ## Best Practices
378
+
379
+ 1. **Clarity**: Use clear, concise language
380
+ 2. **Visibility**: Make disclaimers prominent
381
+ 3. **Acceptance**: Require explicit acceptance
382
+ 4. **Storage**: Store acceptance properly
383
+ 5. **Versions**: Version your disclaimers
384
+ 6. **Updates**: Handle disclaimer updates
385
+ 7. **Legal**: Ensure legal compliance
386
+
387
+ ## Related
388
+
389
+ - **Disclaimer Domain**: Disclaimer domain documentation
390
+ - **Legal Domain**: Legal documents and policies
391
+
392
+ ## License
393
+
394
+ MIT