@umituz/react-native-settings 4.20.58 → 4.20.59

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 (64) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +51 -0
  2. package/.github/ISSUE_TEMPLATE/documentation.md +52 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +63 -0
  4. package/.github/PULL_REQUEST_TEMPLATE.md +84 -0
  5. package/AI_AGENT_GUIDELINES.md +367 -0
  6. package/ARCHITECTURE.md +246 -0
  7. package/CHANGELOG.md +67 -0
  8. package/CODE_OF_CONDUCT.md +75 -0
  9. package/CONTRIBUTING.md +107 -0
  10. package/DOCUMENTATION_MIGRATION.md +319 -0
  11. package/DOCUMENTATION_TEMPLATE.md +155 -0
  12. package/LICENSE +21 -0
  13. package/README.md +321 -498
  14. package/SECURITY.md +98 -0
  15. package/SETTINGS_SCREEN_GUIDE.md +185 -0
  16. package/TESTING.md +358 -0
  17. package/package.json +13 -2
  18. package/src/application/README.md +85 -271
  19. package/src/domains/about/README.md +85 -440
  20. package/src/domains/about/presentation/hooks/README.md +93 -348
  21. package/src/domains/appearance/README.md +95 -584
  22. package/src/domains/appearance/hooks/README.md +95 -303
  23. package/src/domains/appearance/infrastructure/services/README.md +83 -397
  24. package/src/domains/appearance/presentation/components/README.md +95 -489
  25. package/src/domains/cloud-sync/README.md +73 -439
  26. package/src/domains/cloud-sync/presentation/components/README.md +95 -493
  27. package/src/domains/dev/README.md +71 -457
  28. package/src/domains/disclaimer/README.md +77 -411
  29. package/src/domains/disclaimer/presentation/components/README.md +95 -392
  30. package/src/domains/faqs/README.md +86 -574
  31. package/src/domains/feedback/README.md +79 -553
  32. package/src/domains/feedback/presentation/hooks/README.md +93 -426
  33. package/src/domains/legal/README.md +88 -537
  34. package/src/domains/rating/README.md +73 -440
  35. package/src/domains/rating/presentation/components/README.md +95 -475
  36. package/src/domains/video-tutorials/README.md +77 -470
  37. package/src/domains/video-tutorials/presentation/components/README.md +95 -431
  38. package/src/infrastructure/README.md +78 -425
  39. package/src/infrastructure/repositories/README.md +88 -420
  40. package/src/infrastructure/services/README.md +74 -460
  41. package/src/presentation/components/README.md +97 -480
  42. package/src/presentation/components/SettingsErrorBoundary/README.md +48 -436
  43. package/src/presentation/components/SettingsFooter/README.md +48 -427
  44. package/src/presentation/components/SettingsItemCard/README.md +152 -391
  45. package/src/presentation/components/SettingsItemCard/STRATEGY.md +164 -0
  46. package/src/presentation/components/SettingsSection/README.md +47 -401
  47. package/src/presentation/hooks/README.md +95 -389
  48. package/src/presentation/hooks/mutations/README.md +99 -376
  49. package/src/presentation/hooks/queries/README.md +111 -353
  50. package/src/presentation/navigation/README.md +70 -502
  51. package/src/presentation/navigation/components/README.md +70 -295
  52. package/src/presentation/navigation/hooks/README.md +75 -367
  53. package/src/presentation/navigation/utils/README.md +100 -380
  54. package/src/presentation/screens/README.md +53 -504
  55. package/src/presentation/screens/components/SettingsContent/README.md +53 -382
  56. package/src/presentation/screens/components/SettingsHeader/README.md +48 -303
  57. package/src/presentation/screens/components/sections/CustomSettingsList/README.md +47 -359
  58. package/src/presentation/screens/components/sections/FeatureSettingsSection/README.md +81 -176
  59. package/src/presentation/screens/components/sections/IdentitySettingsSection/README.md +40 -297
  60. package/src/presentation/screens/components/sections/ProfileSectionLoader/README.md +47 -451
  61. package/src/presentation/screens/components/sections/SupportSettingsSection/README.md +45 -361
  62. package/src/presentation/screens/hooks/README.md +64 -354
  63. package/src/presentation/screens/types/README.md +79 -409
  64. package/src/presentation/screens/utils/README.md +65 -255
@@ -1,330 +1,105 @@
1
1
  # Navigation Components
2
2
 
3
- Screen wrapper components for integrating settings screens into React Navigation with proper props passing and configuration.
4
-
5
- ## Components
6
-
7
- ### SettingsScreenWrapper
8
-
9
- Wrapper component for the main Settings screen that injects configuration, navigation, and user profile props.
10
-
11
- ```tsx
12
- import { SettingsScreenWrapper } from '@umituz/react-native-settings';
3
+ ## Purpose
13
4
 
14
- <Stack.Screen
15
- name="Settings"
16
- component={SettingsScreenWrapper}
17
- options={{ headerShown: false }}
18
- />
19
- ```
20
-
21
- #### Props
22
-
23
- Automatically receives and injects:
24
- - `config`: Settings configuration from navigation params
25
- - `appInfo`: Application information object
26
- - `userProfile`: User profile data
27
- - `customSections`: Custom settings sections
28
- - `devSettings`: Development settings configuration
29
-
30
- ### LegalScreenWrapper
31
-
32
- Wrapper component for legal screens (Privacy Policy, Terms of Service, etc.) with content and styling configuration.
33
-
34
- ```tsx
35
- import { LegalScreenWrapper } from '@umituz/react-native-settings';
36
-
37
- <Stack.Screen
38
- name="PrivacyPolicy"
39
- component={LegalScreenWrapper}
40
- />
41
- ```
42
-
43
- #### Features
44
-
45
- - Dynamic document type from route params
46
- - Content injection from navigation
47
- - Custom styling support
48
- - Title and header configuration
5
+ Screen wrapper components for integrating settings screens into React Navigation with proper props passing and configuration.
49
6
 
50
- ### AboutScreenWrapper
7
+ ## File Paths
51
8
 
52
- Wrapper component for the About screen with app information and developer details.
9
+ - **Settings Wrapper**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/presentation/navigation/components/SettingsScreenWrapper.tsx`
10
+ - **Legal Wrapper**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/presentation/navigation/components/LegalScreenWrapper.tsx`
11
+ - **About Wrapper**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/presentation/navigation/components/AboutScreenWrapper.tsx`
53
12
 
54
- ```tsx
55
- import { AboutScreenWrapper } from '@umituz/react-native-settings';
13
+ ## Strategy
56
14
 
57
- <Stack.Screen
58
- name="About"
59
- component={AboutScreenWrapper}
60
- />
61
- ```
15
+ 1. **Props Injection**: Automatically injects configuration and navigation props into screens
16
+ 2. **Configuration Management**: Handles all screen configuration centrally
17
+ 3. **Type Safety**: Provides TypeScript types for all wrapper props
18
+ 4. **Consistency**: Ensures consistent props passing across all screens
19
+ 5. **Flexibility**: Supports custom configuration via route params
62
20
 
63
- #### Features
21
+ ## Restrictions (Forbidden)
64
22
 
65
- - App information injection
66
- - Developer details display
67
- - Contact information handling
68
- - Version and build number display
23
+ ### DO NOT
24
+ - DO NOT use screen components directly without wrappers
25
+ - DO NOT manually pass props to screen components
26
+ - DO NOT create custom screen wrappers without understanding the pattern
69
27
 
70
- ## Screen Registration
28
+ ### NEVER
29
+ - ❌ NEVER bypass wrappers for "simple" screens
30
+ - ❌ NEVER hardcode configuration in screen components
31
+ - ❌ NEVER use wrappers outside of NavigationContext
71
32
 
72
- ### Complete Navigation Setup
33
+ ### AVOID
34
+ - ❌ AVOID creating wrapper chains (keep it flat)
35
+ - ❌ AVOID mixing wrapper patterns
36
+ - ❌ AVOID complex prop drilling (wrappers handle this)
73
37
 
74
- ```tsx
75
- import { SettingsStackNavigator } from '@umituz/react-native-settings';
38
+ ## Rules (Mandatory)
76
39
 
77
- function App() {
78
- const appInfo = {
79
- name: 'My App',
80
- version: '1.0.0',
81
- buildNumber: '100',
82
- developer: 'My Company',
83
- websiteUrl: 'https://example.com',
84
- };
40
+ ### ALWAYS
41
+ - ALWAYS use screen wrappers for all settings screens
42
+ - ALWAYS pass configuration via initialParams or navigator props
43
+ - ✅ MUST use TypeScript types for wrapper props
44
+ - ✅ MUST keep wrappers focused on props injection only
85
45
 
86
- return (
87
- <NavigationContainer>
88
- <SettingsStackNavigator appInfo={appInfo} />
89
- </NavigationContainer>
90
- );
91
- }
92
- ```
46
+ ### MUST
47
+ - ✅ MUST extract configuration from route.params or navigator props
48
+ - MUST pass all required props to wrapped screen
49
+ - ✅ MUST handle missing configuration gracefully
93
50
 
94
- ### Manual Screen Registration
51
+ ### SHOULD
52
+ - ✅ SHOULD keep wrapper logic minimal (props injection only)
53
+ - ✅ SHOULD use consistent naming pattern for wrappers
54
+ - ✅ SHOULD test wrappers with various configurations
95
55
 
96
- ```tsx
97
- import { SettingsScreenWrapper, LegalScreenWrapper, AboutScreenWrapper } from '@umituz/react-native-settings';
56
+ ## AI Agent Guidelines
98
57
 
99
- <Stack.Navigator>
100
- <Stack.Screen
101
- name="Settings"
102
- component={SettingsScreenWrapper}
103
- options={{
104
- headerShown: false,
105
- presentation: 'card',
106
- }}
107
- />
108
- <Stack.Screen
109
- name="Appearance"
110
- component={AppearanceScreen}
111
- options={{ title: 'Appearance' }}
112
- />
113
- <Stack.Screen
114
- name="PrivacyPolicy"
115
- component={LegalScreenWrapper}
116
- options={{ title: 'Privacy Policy' }}
117
- />
118
- <Stack.Screen
119
- name="TermsOfService"
120
- component={LegalScreenWrapper}
121
- options={{ title: 'Terms of Service' }}
122
- />
123
- <Stack.Screen
124
- name="About"
125
- component={AboutScreenWrapper}
126
- options={{ title: 'About' }}
127
- />
128
- </Stack.Navigator>
129
- ```
58
+ 1. **File Reference**: When modifying wrappers, refer to `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/presentation/navigation/components/`
59
+ 2. **Wrapper Purpose**: Wrappers exist solely to inject props, not to add functionality
60
+ 3. **Config Flow**: Configuration flows from navigator props → route.params → screen props
61
+ 4. **Type Safety**: Always use proper TypeScript types for route params
62
+ 5. **Minimal Logic**: Keep wrappers simple, avoid complex business logic
130
63
 
131
- ## Props Injection
64
+ ## Component Reference
132
65
 
133
66
  ### SettingsScreenWrapper
134
67
 
135
- ```typescript
136
- interface SettingsScreenWrapperProps {
137
- route: {
138
- params: {
139
- config?: SettingsConfig;
140
- appInfo?: AppInfo;
141
- userProfile?: UserProfile;
142
- customSections?: CustomSettingsSection[];
143
- devSettings?: DevSettingsProps;
144
- showCloseButton?: boolean;
145
- };
146
- };
147
- navigation: any;
148
- }
149
- ```
150
-
151
- ### LegalScreenWrapper
68
+ **Purpose**: Wraps main settings screen with configuration and props
152
69
 
153
- ```typescript
154
- interface LegalScreenWrapperProps {
155
- route: {
156
- params: {
157
- documentType: 'privacy-policy' | 'terms-of-service' | 'eula';
158
- content?: string;
159
- title?: string;
160
- styles?: LegalContentStyles;
161
- };
162
- };
163
- }
164
- ```
165
-
166
- ### AboutScreenWrapper
167
-
168
- ```typescript
169
- interface AboutScreenWrapperProps {
170
- route: {
171
- params: {
172
- appInfo?: AppInfo;
173
- config?: AboutConfig;
174
- };
175
- };
176
- }
177
- ```
178
-
179
- ## Usage Examples
180
-
181
- ### With Custom Config
182
-
183
- ```tsx
184
- function SettingsStack() {
185
- const config = {
186
- appearance: true,
187
- language: true,
188
- notifications: 'auto',
189
- };
190
-
191
- const userProfile = {
192
- displayName: 'John Doe',
193
- email: 'john@example.com',
194
- avatarUrl: 'https://example.com/avatar.jpg',
195
- };
196
-
197
- return (
198
- <Stack.Screen
199
- name="Settings"
200
- component={SettingsScreenWrapper}
201
- initialParams={{ config, userProfile }}
202
- />
203
- );
204
- }
205
- ```
206
-
207
- ### With Custom Styling
208
-
209
- ```tsx
210
- function PrivacyStack() {
211
- const customStyles = {
212
- container: { backgroundColor: '#f5f5f5' },
213
- content: { fontSize: 16, lineHeight: 24 },
214
- header: { color: '#333' },
215
- };
216
-
217
- return (
218
- <Stack.Screen
219
- name="PrivacyPolicy"
220
- component={LegalScreenWrapper}
221
- initialParams={{
222
- documentType: 'privacy-policy',
223
- styles: customStyles,
224
- }}
225
- />
226
- );
227
- }
228
- ```
229
-
230
- ### With App Information
231
-
232
- ```tsx
233
- function AboutStack() {
234
- const appInfo = {
235
- name: 'My Application',
236
- version: '2.0.0',
237
- buildNumber: '200',
238
- developer: 'My Company LLC',
239
- contactEmail: 'support@example.com',
240
- websiteUrl: 'https://example.com',
241
- websiteDisplay: 'example.com',
242
- moreAppsUrl: 'https://example.com/apps',
243
- };
244
-
245
- return (
246
- <Stack.Screen
247
- name="About"
248
- component={AboutScreenWrapper}
249
- initialParams={{ appInfo }}
250
- />
251
- );
252
- }
253
- ```
70
+ **Injected Props**:
71
+ - `config`: Settings configuration
72
+ - `appInfo`: Application information
73
+ - `userProfile`: User profile data
74
+ - `customSections`: Custom settings sections
75
+ - `devSettings`: Development settings configuration
254
76
 
255
- ## Navigation Patterns
77
+ **Usage**: Use in Stack.Screen component
256
78
 
257
- ### Modal Presentation
79
+ ### LegalScreenWrapper
258
80
 
259
- ```tsx
260
- <Stack.Screen
261
- name="Settings"
262
- component={SettingsScreenWrapper}
263
- options={{
264
- presentation: 'modal',
265
- headerShown: false,
266
- cardStyle: { backgroundColor: 'transparent' },
267
- }}
268
- initialParams={{ showCloseButton: true }}
269
- />
270
- ```
81
+ **Purpose**: Wraps legal screens with content and styling configuration
271
82
 
272
- ### Custom Header
83
+ **Injected Props**:
84
+ - `documentType`: Type of legal document
85
+ - `content`: Document content
86
+ - `title`: Document title
87
+ - `styles`: Custom styling
273
88
 
274
- ```tsx
275
- <Stack.Screen
276
- name="Appearance"
277
- component={AppearanceScreen}
278
- options={{
279
- headerTitle: 'Appearance',
280
- headerStyle: { backgroundColor: '#fff' },
281
- headerTintColor: '#000',
282
- headerTitleStyle: { fontWeight: 'bold' },
283
- }}
284
- />
285
- ```
89
+ **Usage**: Use for Privacy Policy, Terms of Service, EULA screens
286
90
 
287
- ### Nested Navigation
91
+ ### AboutScreenWrapper
288
92
 
289
- ```tsx
290
- <Tab.Navigator>
291
- <Tab.Screen name="Home" component={HomeScreen} />
292
- <Tab.Screen
293
- name="Settings"
294
- options={{ headerShown: false }}
295
- >
296
- {() => (
297
- <SettingsStack>
298
- <Stack.Screen
299
- name="Settings"
300
- component={SettingsScreenWrapper}
301
- options={{ headerShown: false }}
302
- />
303
- <Stack.Screen
304
- name="Appearance"
305
- component={AppearanceScreen}
306
- />
307
- </SettingsStack>
308
- )}
309
- </Tab.Screen>
310
- </Tab.Navigator>
311
- ```
93
+ **Purpose**: Wraps about screen with app information
312
94
 
313
- ## Best Practices
95
+ **Injected Props**:
96
+ - `appInfo`: Application information object
97
+ - `config`: About screen configuration
314
98
 
315
- 1. **Use Wrappers**: Always use screen wrappers for proper props injection
316
- 2. **Type Safety**: Use TypeScript for navigation params
317
- 3. **Initial Params**: Pass configuration via initialParams
318
- 4. **Header Options**: Configure headers appropriately per screen
319
- 5. **Presentation**: Use modal presentation for settings on iOS
320
- 6. **Consistency**: Maintain consistent navigation patterns
99
+ **Usage**: Use for About screen
321
100
 
322
- ## Related
101
+ ## Related Components
323
102
 
324
- - **SettingsStackNavigator**: Main navigator component
103
+ - **SettingsStackNavigator**: Main navigator that uses these wrappers
325
104
  - **Navigation Hooks**: Navigation utility hooks
326
105
  - **Screen Components**: Individual screen implementations
327
-
328
- ## License
329
-
330
- MIT