@umituz/react-native-settings 4.20.56 → 4.20.58

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 (49) hide show
  1. package/README.md +146 -4
  2. package/package.json +1 -2
  3. package/src/__tests__/setup.ts +1 -4
  4. package/src/application/README.md +322 -0
  5. package/src/domains/about/README.md +452 -0
  6. package/src/domains/about/presentation/hooks/README.md +350 -0
  7. package/src/domains/appearance/README.md +596 -0
  8. package/src/domains/appearance/hooks/README.md +366 -0
  9. package/src/domains/appearance/infrastructure/services/README.md +455 -0
  10. package/src/domains/appearance/presentation/components/README.md +493 -0
  11. package/src/domains/cloud-sync/README.md +451 -0
  12. package/src/domains/cloud-sync/presentation/components/README.md +493 -0
  13. package/src/domains/dev/README.md +477 -0
  14. package/src/domains/disclaimer/README.md +421 -0
  15. package/src/domains/disclaimer/presentation/components/README.md +394 -0
  16. package/src/domains/faqs/README.md +586 -0
  17. package/src/domains/feedback/README.md +565 -0
  18. package/src/domains/feedback/presentation/hooks/README.md +428 -0
  19. package/src/domains/legal/README.md +549 -0
  20. package/src/domains/rating/README.md +452 -0
  21. package/src/domains/rating/presentation/components/README.md +475 -0
  22. package/src/domains/video-tutorials/README.md +482 -0
  23. package/src/domains/video-tutorials/presentation/components/README.md +433 -0
  24. package/src/infrastructure/README.md +509 -0
  25. package/src/infrastructure/repositories/README.md +475 -0
  26. package/src/infrastructure/services/README.md +510 -0
  27. package/src/presentation/components/README.md +482 -0
  28. package/src/presentation/components/SettingsErrorBoundary/README.md +455 -0
  29. package/src/presentation/components/SettingsFooter/README.md +446 -0
  30. package/src/presentation/components/SettingsItemCard/README.md +457 -0
  31. package/src/presentation/components/SettingsSection/README.md +421 -0
  32. package/src/presentation/hooks/README.md +413 -0
  33. package/src/presentation/hooks/mutations/README.md +430 -0
  34. package/src/presentation/hooks/queries/README.md +441 -0
  35. package/src/presentation/navigation/README.md +532 -0
  36. package/src/presentation/navigation/components/README.md +330 -0
  37. package/src/presentation/navigation/hooks/README.md +399 -0
  38. package/src/presentation/navigation/utils/README.md +442 -0
  39. package/src/presentation/screens/README.md +525 -0
  40. package/src/presentation/screens/components/SettingsContent/README.md +404 -0
  41. package/src/presentation/screens/components/SettingsHeader/README.md +322 -0
  42. package/src/presentation/screens/components/sections/CustomSettingsList/README.md +388 -0
  43. package/src/presentation/screens/components/sections/FeatureSettingsSection/README.md +232 -0
  44. package/src/presentation/screens/components/sections/IdentitySettingsSection/README.md +325 -0
  45. package/src/presentation/screens/components/sections/ProfileSectionLoader/README.md +480 -0
  46. package/src/presentation/screens/components/sections/SupportSettingsSection/README.md +391 -0
  47. package/src/presentation/screens/hooks/README.md +383 -0
  48. package/src/presentation/screens/types/README.md +439 -0
  49. package/src/presentation/screens/utils/README.md +288 -0
@@ -0,0 +1,433 @@
1
+ # Video Tutorials Components
2
+
3
+ Components for displaying video tutorials including cards, sections, and the main tutorials screen.
4
+
5
+ ## Components
6
+
7
+ ### VideoTutorialCard
8
+
9
+ Card component for displaying individual video tutorials with thumbnails, titles, and metadata.
10
+
11
+ ```tsx
12
+ import { VideoTutorialCard } from '@umituz/react-native-settings';
13
+
14
+ function TutorialsList() {
15
+ const tutorial = {
16
+ id: '1',
17
+ title: 'Getting Started with Settings',
18
+ description: 'Learn how to configure your app settings',
19
+ thumbnail: 'https://example.com/thumb.jpg',
20
+ duration: '5:30',
21
+ views: 1234,
22
+ };
23
+
24
+ return (
25
+ <VideoTutorialCard
26
+ tutorial={tutorial}
27
+ onPress={() => playTutorial(tutorial.id)}
28
+ />
29
+ );
30
+ }
31
+ ```
32
+
33
+ #### Props
34
+
35
+ | Prop | Type | Default | Description |
36
+ |------|------|---------|-------------|
37
+ | `tutorial` | `VideoTutorial` | **Required** | Tutorial data object |
38
+ | `onPress` | `() => void` | `undefined` | Press handler |
39
+ | `showDuration` | `boolean` | `true` | Show video duration |
40
+ | `showViews` | `boolean` | `true` | Show view count |
41
+ | `style` | `ViewStyle` | `undefined` | Custom container style |
42
+
43
+ #### Example
44
+
45
+ ```tsx
46
+ <VideoTutorialCard
47
+ tutorial={{
48
+ id: '1',
49
+ title: 'Advanced Settings',
50
+ description: 'Deep dive into settings configuration',
51
+ thumbnail: 'https://example.com/thumb.jpg',
52
+ duration: '10:15',
53
+ views: 5678,
54
+ publishedAt: new Date('2024-01-01'),
55
+ }}
56
+ onPress={() => navigation.navigate('VideoPlayer', { tutorialId: '1' })}
57
+ showDuration={true}
58
+ showViews={true}
59
+ />
60
+ ```
61
+
62
+ ### VideoTutorialSection
63
+
64
+ Section component for grouping related video tutorials with a header.
65
+
66
+ ```tsx
67
+ import { VideoTutorialSection } from '@umituz/react-native-settings';
68
+
69
+ function FeaturedSection() {
70
+ const tutorials = [
71
+ { id: '1', title: 'Tutorial 1', thumbnail: '...' },
72
+ { id: '2', title: 'Tutorial 2', thumbnail: '...' },
73
+ ];
74
+
75
+ return (
76
+ <VideoTutorialSection
77
+ title="Featured Tutorials"
78
+ tutorials={tutorials}
79
+ horizontal={true}
80
+ onTutorialPress={(tutorial) => playTutorial(tutorial)}
81
+ />
82
+ );
83
+ }
84
+ ```
85
+
86
+ #### Props
87
+
88
+ | Prop | Type | Default | Description |
89
+ |------|------|---------|-------------|
90
+ | `title` | `string` | **Required** | Section title |
91
+ | `tutorials` | `VideoTutorial[]` | **Required** | Array of tutorials |
92
+ | `horizontal` | `boolean` | `false` | Horizontal scroll |
93
+ | `onTutorialPress` | `(tutorial: VideoTutorial) => void` | `undefined` | Press handler |
94
+ | `style` | `ViewStyle` | `undefined` | Custom container style |
95
+
96
+ #### Example
97
+
98
+ ```tsx
99
+ <VideoTutorialSection
100
+ title="Getting Started"
101
+ tutorials={gettingStartedTutorials}
102
+ horizontal={true}
103
+ onTutorialPress={(tutorial) => {
104
+ Analytics.track('tutorial_opened', { id: tutorial.id });
105
+ navigation.navigate('VideoPlayer', { tutorial });
106
+ }}
107
+ />
108
+ ```
109
+
110
+ ### VideoTutorialsScreen
111
+
112
+ Main screen component for browsing all video tutorials with search and categories.
113
+
114
+ ```tsx
115
+ import { VideoTutorialsScreen } from '@umituz/react-native-settings';
116
+
117
+ function TutorialsScreen() {
118
+ return (
119
+ <VideoTutorialsScreen
120
+ categories={tutorialCategories}
121
+ tutorials={allTutorials}
122
+ featuredTutorials={featuredTutorials}
123
+ onTutorialPress={handleTutorialPress}
124
+ />
125
+ );
126
+ }
127
+ ```
128
+
129
+ #### Props
130
+
131
+ | Prop | Type | Default | Description |
132
+ |------|------|---------|-------------|
133
+ | `categories` | `TutorialCategory[]` | `[]` | Tutorial categories |
134
+ | `tutorials` | `VideoTutorial[]` | `[]` | All tutorials |
135
+ | `featuredTutorials` | `VideoTutorial[]` | `[]` | Featured tutorials |
136
+ | `onTutorialPress` | `(tutorial: VideoTutorial) => void` | **Required** | Press handler |
137
+ | `showSearch` | `boolean` | `true` | Show search bar |
138
+ | `showFeatured` | `boolean` | `true` | Show featured section |
139
+
140
+ #### Example
141
+
142
+ ```tsx
143
+ <VideoTutorialsScreen
144
+ categories={[
145
+ { id: 'getting-started', title: 'Getting Started', count: 5 },
146
+ { id: 'advanced', title: 'Advanced', count: 8 },
147
+ ]}
148
+ tutorials={allTutorials}
149
+ featuredTutorials={[tutorial1, tutorial2, tutorial3]}
150
+ onTutorialPress={(tutorial) => {
151
+ navigation.navigate('VideoPlayer', { tutorialId: tutorial.id });
152
+ }}
153
+ showSearch={true}
154
+ showFeatured={true}
155
+ />
156
+ ```
157
+
158
+ ## Data Types
159
+
160
+ ### VideoTutorial
161
+
162
+ ```typescript
163
+ interface VideoTutorial {
164
+ id: string;
165
+ title: string;
166
+ description?: string;
167
+ thumbnail: string;
168
+ duration?: string; // e.g., "5:30"
169
+ views?: number;
170
+ publishedAt?: Date;
171
+ categoryId?: string;
172
+ url?: string; // Video URL
173
+ isExternal?: boolean; // Open in external app
174
+ }
175
+ ```
176
+
177
+ ### TutorialCategory
178
+
179
+ ```typescript
180
+ interface TutorialCategory {
181
+ id: string;
182
+ title: string;
183
+ description?: string;
184
+ thumbnail?: string;
185
+ count?: number; // Number of tutorials in category
186
+ }
187
+ ```
188
+
189
+ ## Examples
190
+
191
+ ### Basic Tutorial Card
192
+
193
+ ```tsx
194
+ <VideoTutorialCard
195
+ tutorial={{
196
+ id: '1',
197
+ title: 'Introduction to Settings',
198
+ thumbnail: 'https://example.com/thumb1.jpg',
199
+ }}
200
+ onPress={() => console.log('Pressed')}
201
+ />
202
+ ```
203
+
204
+ ### Detailed Tutorial Card
205
+
206
+ ```tsx
207
+ <VideoTutorialCard
208
+ tutorial={{
209
+ id: '2',
210
+ title: 'Advanced Configuration',
211
+ description: 'Learn advanced settings options',
212
+ thumbnail: 'https://example.com/thumb2.jpg',
213
+ duration: '12:45',
214
+ views: 3456,
215
+ publishedAt: new Date('2024-01-15'),
216
+ }}
217
+ onPress={() => playTutorial('2')}
218
+ showDuration={true}
219
+ showViews={true}
220
+ />
221
+ ```
222
+
223
+ ### Horizontal Section
224
+
225
+ ```tsx
226
+ <VideoTutorialSection
227
+ title="Featured"
228
+ tutorials={featuredTutorials}
229
+ horizontal={true}
230
+ onTutorialPress={(tutorial) => {
231
+ navigation.navigate('VideoPlayer', { tutorialId: tutorial.id });
232
+ }}
233
+ />
234
+ ```
235
+
236
+ ### Vertical Section
237
+
238
+ ```tsx
239
+ <VideoTutorialSection
240
+ title="All Tutorials"
241
+ tutorials={allTutorials}
242
+ horizontal={false}
243
+ onTutorialPress={(tutorial) => {
244
+ navigation.navigate('VideoPlayer', { tutorialId: tutorial.id });
245
+ }}
246
+ />
247
+ ```
248
+
249
+ ### Complete Screen
250
+
251
+ ```tsx
252
+ function TutorialsScreenWrapper() {
253
+ const [searchQuery, setSearchQuery] = useState('');
254
+ const [selectedCategory, setSelectedCategory] = useState<string | null>(null);
255
+
256
+ const filteredTutorials = useMemo(() => {
257
+ return allTutorials.filter(tutorial => {
258
+ const matchesSearch = tutorial.title.toLowerCase().includes(searchQuery.toLowerCase());
259
+ const matchesCategory = !selectedCategory || tutorial.categoryId === selectedCategory;
260
+ return matchesSearch && matchesCategory;
261
+ });
262
+ }, [searchQuery, selectedCategory]);
263
+
264
+ return (
265
+ <VideoTutorialsScreen
266
+ categories={categories}
267
+ tutorials={filteredTutorials}
268
+ featuredTutorials={featuredTutorials}
269
+ onTutorialPress={handleTutorialPress}
270
+ showSearch={true}
271
+ showFeatured={true}
272
+ />
273
+ );
274
+ }
275
+ ```
276
+
277
+ ### External Videos
278
+
279
+ ```tsx
280
+ <VideoTutorialCard
281
+ tutorial={{
282
+ id: 'yt-1',
283
+ title: 'Video Tutorial on YouTube',
284
+ thumbnail: 'https://img.youtube.com/vi/VIDEO_ID/maxresdefault.jpg',
285
+ duration: '8:20',
286
+ url: 'https://youtube.com/watch?v=VIDEO_ID',
287
+ isExternal: true,
288
+ }}
289
+ onPress={(tutorial) => {
290
+ if (tutorial.isExternal && tutorial.url) {
291
+ Linking.openURL(tutorial.url);
292
+ }
293
+ }}
294
+ />
295
+ ```
296
+
297
+ ## Styling
298
+
299
+ ### Card Styles
300
+
301
+ ```tsx
302
+ <VideoTutorialCard
303
+ tutorial={tutorial}
304
+ style={{
305
+ width: 280,
306
+ marginHorizontal: 8,
307
+ borderRadius: 12,
308
+ overflow: 'hidden',
309
+ }}
310
+ />
311
+ ```
312
+
313
+ ### Thumbnail Styles
314
+
315
+ Thumbnails are displayed with aspect ratio preserved:
316
+
317
+ ```tsx
318
+ <Image
319
+ source={{ uri: tutorial.thumbnail }}
320
+ style={{
321
+ width: '100%',
322
+ aspectRatio: 16 / 9,
323
+ backgroundColor: '#f0f0f0',
324
+ }}
325
+ />
326
+ ```
327
+
328
+ ### Overlay Information
329
+
330
+ Duration and views are overlaid on the thumbnail:
331
+
332
+ ```tsx
333
+ <View style={styles.overlay}>
334
+ <View style={styles.duration}>
335
+ <Text style={styles.durationText}>{tutorial.duration}</Text>
336
+ </View>
337
+ <View style={styles.views}>
338
+ <Ionicons name="eye-outline" size={14} color="white" />
339
+ <Text style={styles.viewsText}>{formatViews(tutorial.views)}</Text>
340
+ </View>
341
+ </View>
342
+ ```
343
+
344
+ ## Loading States
345
+
346
+ ### Skeleton Loading
347
+
348
+ ```tsx
349
+ function TutorialCardSkeleton() {
350
+ return (
351
+ <View style={styles.skeleton}>
352
+ <View style={styles.thumbnailSkeleton} />
353
+ <View style={styles.titleSkeleton} />
354
+ <View style={styles.descriptionSkeleton} />
355
+ </View>
356
+ );
357
+ }
358
+
359
+ function TutorialsList() {
360
+ const { data, isLoading } = useTutorials();
361
+
362
+ if (isLoading) {
363
+ return (
364
+ <ScrollView horizontal>
365
+ <TutorialCardSkeleton />
366
+ <TutorialCardSkeleton />
367
+ <TutorialCardSkeleton />
368
+ </ScrollView>
369
+ );
370
+ }
371
+
372
+ return (
373
+ <VideoTutorialSection
374
+ title="Tutorials"
375
+ tutorials={data}
376
+ horizontal={true}
377
+ />
378
+ );
379
+ }
380
+ ```
381
+
382
+ ## Empty States
383
+
384
+ ### No Tutorials
385
+
386
+ ```tsx
387
+ function EmptyTutorials() {
388
+ return (
389
+ <View style={styles.emptyContainer}>
390
+ <Ionicons name="videocam-outline" size={64} color="#ccc" />
391
+ <Text style={styles.emptyTitle}>No Tutorials</Text>
392
+ <Text style={styles.emptyMessage}>
393
+ Check back later for new tutorials
394
+ </Text>
395
+ </View>
396
+ );
397
+ }
398
+ ```
399
+
400
+ ### No Search Results
401
+
402
+ ```tsx
403
+ function NoSearchResults({ query }) {
404
+ return (
405
+ <View style={styles.emptyContainer}>
406
+ <Ionicons name="search-outline" size={64} color="#ccc" />
407
+ <Text style={styles.emptyTitle}>No Results</Text>
408
+ <Text style={styles.emptyMessage}>
409
+ No tutorials found for "{query}"
410
+ </Text>
411
+ </View>
412
+ );
413
+ }
414
+ ```
415
+
416
+ ## Best Practices
417
+
418
+ 1. **Thumbnails**: Use high-quality thumbnails (16:9 aspect ratio)
419
+ 2. **Duration**: Always show video duration
420
+ 3. **Metadata**: Include views and publish date
421
+ 4. **External**: Mark external videos clearly
422
+ 5. **Loading**: Show skeleton loaders while loading
423
+ 6. **Empty**: Provide meaningful empty states
424
+ 7. **Accessibility**: Add proper accessibility labels
425
+
426
+ ## Related
427
+
428
+ - **Video Tutorials Domain**: Video tutorials domain documentation
429
+ - **VideoTutorialsScreen**: Main screen component
430
+
431
+ ## License
432
+
433
+ MIT