@umituz/react-native-subscription 2.14.99 → 2.14.100
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 +211 -394
- package/package.json +1 -1
- package/src/application/README.md +46 -225
- package/src/application/ports/README.md +42 -97
- package/src/domain/README.md +36 -384
- package/src/domain/constants/README.md +0 -56
- package/src/domain/entities/README.md +43 -169
- package/src/domain/errors/README.md +33 -287
- package/src/domain/value-objects/README.md +43 -179
- package/src/domains/README.md +50 -238
- package/src/domains/README.md.bak +274 -0
- package/src/domains/config/README.md +93 -383
- package/src/domains/config/domain/README.md +23 -376
- package/src/domains/config/domain/entities/README.md +34 -343
- package/src/domains/paywall/README.md +99 -369
- package/src/domains/paywall/components/README.md +34 -178
- package/src/domains/paywall/entities/README.md +34 -193
- package/src/domains/paywall/hooks/README.md +34 -122
- package/src/domains/wallet/README.md +34 -275
- package/src/domains/wallet/README.md.bak +209 -0
- package/src/domains/wallet/domain/README.md +34 -101
- package/src/domains/wallet/domain/entities/README.md +34 -115
- package/src/domains/wallet/domain/errors/README.md +34 -151
- package/src/domains/wallet/infrastructure/README.md +34 -89
- package/src/domains/wallet/presentation/components/README.md +34 -224
- package/src/domains/wallet/presentation/hooks/README.md +34 -248
- package/src/infrastructure/README.md +37 -496
- package/src/infrastructure/mappers/README.md +0 -13
- package/src/infrastructure/repositories/README.md +74 -360
- package/src/infrastructure/services/README.md +95 -370
- package/src/presentation/README.md +123 -408
- package/src/presentation/README.md.bak +172 -0
- package/src/presentation/components/README.md +151 -179
- package/src/presentation/components/README.md.bak +217 -0
- package/src/presentation/components/details/CreditRow.md +65 -310
- package/src/presentation/components/details/DetailRow.md +63 -255
- package/src/presentation/components/details/PremiumDetailsCard.md +65 -238
- package/src/presentation/components/details/PremiumStatusBadge.md +64 -239
- package/src/presentation/components/details/README.md +97 -447
- package/src/presentation/components/feedback/PaywallFeedbackModal.md +63 -287
- package/src/presentation/components/feedback/README.md +97 -445
- package/src/presentation/components/paywall/PaywallModal.md +66 -416
- package/src/presentation/components/paywall/README.md +50 -186
- package/src/presentation/components/sections/README.md +97 -466
- package/src/presentation/components/sections/SubscriptionSection.md +92 -244
- package/src/presentation/hooks/README.md +154 -741
- package/src/presentation/hooks/useAuthAwarePurchase.md +58 -325
- package/src/presentation/hooks/useAuthGate.md +61 -375
- package/src/presentation/hooks/useAuthSubscriptionSync.md +66 -370
- package/src/presentation/hooks/useCreditChecker.md +73 -378
- package/src/presentation/hooks/useCredits.md +74 -313
- package/src/presentation/hooks/useCredits.md.bak +231 -0
- package/src/presentation/hooks/useCreditsGate.md +66 -318
- package/src/presentation/hooks/useDeductCredit.md +0 -76
- package/src/presentation/hooks/useDevTestCallbacks.md +63 -394
- package/src/presentation/hooks/useFeatureGate.md +105 -150
- package/src/presentation/hooks/useFeatureGate.md.bak +284 -0
- package/src/presentation/hooks/useInitializeCredits.md +64 -430
- package/src/presentation/hooks/usePaywall.md +61 -306
- package/src/presentation/hooks/usePaywallOperations.md +64 -458
- package/src/presentation/hooks/usePaywallVisibility.md +67 -316
- package/src/presentation/hooks/usePremium.md +84 -226
- package/src/presentation/hooks/usePremiumGate.md +60 -395
- package/src/presentation/hooks/usePremiumWithCredits.md +64 -401
- package/src/presentation/hooks/useSubscription.md +66 -422
- package/src/presentation/hooks/useSubscriptionDetails.md +65 -410
- package/src/presentation/hooks/useSubscriptionGate.md +80 -164
- package/src/presentation/hooks/useSubscriptionSettingsConfig.md +66 -346
- package/src/presentation/hooks/useSubscriptionStatus.md +66 -396
- package/src/presentation/hooks/useUserTier.md +63 -328
- package/src/presentation/hooks/useUserTierWithRepository.md +64 -424
- package/src/presentation/screens/README.md +48 -190
- package/src/presentation/types/README.md +0 -16
- package/src/presentation/utils/README.md +0 -21
- package/src/revenuecat/README.md +99 -518
- package/src/revenuecat/application/README.md +35 -150
- package/src/revenuecat/application/ports/README.md +34 -162
- package/src/revenuecat/domain/README.md +42 -141
- package/src/revenuecat/domain/constants/README.md +34 -176
- package/src/revenuecat/domain/entities/README.md +34 -374
- package/src/revenuecat/domain/errors/README.md +47 -191
- package/src/revenuecat/domain/types/README.md +34 -366
- package/src/revenuecat/domain/value-objects/README.md +34 -434
- package/src/revenuecat/infrastructure/README.md +34 -43
- package/src/revenuecat/infrastructure/config/README.md +32 -23
- package/src/revenuecat/infrastructure/handlers/README.md +34 -211
- package/src/revenuecat/infrastructure/managers/README.md +34 -42
- package/src/revenuecat/infrastructure/services/README.md +35 -318
- package/src/revenuecat/infrastructure/utils/README.md +34 -375
- package/src/revenuecat/presentation/README.md +34 -176
- package/src/revenuecat/presentation/hooks/README.md +29 -35
- package/src/utils/README.md +38 -525
|
@@ -1,468 +1,99 @@
|
|
|
1
1
|
# Sections Components
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
inactive: 'Inactive',
|
|
101
|
-
expires: 'Expires on',
|
|
102
|
-
renews: 'Renews on',
|
|
103
|
-
manage: 'Manage Subscription',
|
|
104
|
-
upgrade: 'Upgrade to Premium',
|
|
105
|
-
lifetime: 'Lifetime Access',
|
|
106
|
-
}}
|
|
107
|
-
/>
|
|
108
|
-
|
|
109
|
-
{/* Diğer settingler */}
|
|
110
|
-
{/* ... */}
|
|
111
|
-
</ScrollView>
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## Özelleştirme
|
|
117
|
-
|
|
118
|
-
### Custom Styling
|
|
119
|
-
|
|
120
|
-
```typescript
|
|
121
|
-
import { StyleSheet } from 'react-native';
|
|
122
|
-
import { SubscriptionSection } from '@umituz/react-native-subscription';
|
|
123
|
-
|
|
124
|
-
const customStyles = StyleSheet.create({
|
|
125
|
-
container: {
|
|
126
|
-
backgroundColor: '#FF6B6B',
|
|
127
|
-
borderRadius: 12,
|
|
128
|
-
padding: 16,
|
|
129
|
-
margin: 16,
|
|
130
|
-
shadowColor: '#000',
|
|
131
|
-
shadowOffset: { width: 0, height: 2 },
|
|
132
|
-
shadowOpacity: 0.1,
|
|
133
|
-
shadowRadius: 4,
|
|
134
|
-
elevation: 3,
|
|
135
|
-
},
|
|
136
|
-
title: {
|
|
137
|
-
fontSize: 20,
|
|
138
|
-
fontWeight: 'bold',
|
|
139
|
-
color: '#FFFFFF',
|
|
140
|
-
},
|
|
141
|
-
status: {
|
|
142
|
-
fontSize: 14,
|
|
143
|
-
color: '#FFFFFF',
|
|
144
|
-
opacity: 0.9,
|
|
145
|
-
},
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
<SubscriptionSection
|
|
149
|
-
subscription={subscription}
|
|
150
|
-
onPress={handlePress}
|
|
151
|
-
style={customStyles.container}
|
|
152
|
-
titleStyle={customStyles.title}
|
|
153
|
-
statusStyle={customStyles.status}
|
|
154
|
-
/>
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
### Custom Actions
|
|
158
|
-
|
|
159
|
-
```typescript
|
|
160
|
-
import { SubscriptionSection } from '@umituz/react-native-subscription';
|
|
161
|
-
|
|
162
|
-
function CustomSubscriptionSection() {
|
|
163
|
-
const { subscription } = useSubscription();
|
|
164
|
-
|
|
165
|
-
const handlePress = () => {
|
|
166
|
-
if (subscription?.isPremium) {
|
|
167
|
-
// Premium kullanıcı: Detayları göster
|
|
168
|
-
navigation.navigate('SubscriptionDetail');
|
|
169
|
-
} else {
|
|
170
|
-
// Free kullanıcı: Paywall göster
|
|
171
|
-
navigation.navigate('Paywall');
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
const handleLongPress = () => {
|
|
176
|
-
// Long press ile hızlı yönetim
|
|
177
|
-
if (subscription?.isPremium) {
|
|
178
|
-
showManageOptions();
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
return (
|
|
183
|
-
<SubscriptionSection
|
|
184
|
-
subscription={subscription}
|
|
185
|
-
onPress={handlePress}
|
|
186
|
-
onLongPress={handleLongPress}
|
|
187
|
-
translations={{
|
|
188
|
-
title: 'My Plan',
|
|
189
|
-
status: subscription?.isActive ? 'Active' : 'Inactive',
|
|
190
|
-
manage: 'Manage',
|
|
191
|
-
upgrade: 'Upgrade',
|
|
192
|
-
}}
|
|
193
|
-
/>
|
|
194
|
-
);
|
|
195
|
-
}
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
## Durum Bazlı Gösterim
|
|
199
|
-
|
|
200
|
-
Farklı durumlar için farklı görünümler:
|
|
201
|
-
|
|
202
|
-
```typescript
|
|
203
|
-
import { SubscriptionSection } from '@umituz/react-native-subscription';
|
|
204
|
-
|
|
205
|
-
function StatusBasedSections() {
|
|
206
|
-
const { subscription } = useSubscription();
|
|
207
|
-
|
|
208
|
-
if (!subscription) {
|
|
209
|
-
// Loading state
|
|
210
|
-
return <SubscriptionSection.Loading />;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
if (subscription.isPremium) {
|
|
214
|
-
// Premium kullanıcı
|
|
215
|
-
return (
|
|
216
|
-
<SubscriptionSection
|
|
217
|
-
subscription={subscription}
|
|
218
|
-
showStatus={true}
|
|
219
|
-
showExpiration={true}
|
|
220
|
-
showManageButton={true}
|
|
221
|
-
onPress={() => navigation.navigate('PremiumDetail')}
|
|
222
|
-
translations={{
|
|
223
|
-
title: 'Premium Plan',
|
|
224
|
-
active: 'Active',
|
|
225
|
-
manage: 'Manage Subscription',
|
|
226
|
-
}}
|
|
227
|
-
/>
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// Free kullanıcı
|
|
232
|
-
return (
|
|
233
|
-
<SubscriptionSection
|
|
234
|
-
subscription={subscription}
|
|
235
|
-
showStatus={false}
|
|
236
|
-
onUpgradePress={() => navigation.navigate('Paywall')}
|
|
237
|
-
translations={{
|
|
238
|
-
title: 'Free Plan',
|
|
239
|
-
upgrade: 'Upgrade to Premium',
|
|
240
|
-
}}
|
|
241
|
-
/>
|
|
242
|
-
);
|
|
243
|
-
}
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
## Birden Fazla Section
|
|
247
|
-
|
|
248
|
-
Farklı abonelik türleri için:
|
|
249
|
-
|
|
250
|
-
```typescript
|
|
251
|
-
import { SubscriptionSection } from '@umituz/react-native-subscription';
|
|
252
|
-
|
|
253
|
-
function MultipleSections() {
|
|
254
|
-
const { subscription } = useSubscription();
|
|
255
|
-
|
|
256
|
-
return (
|
|
257
|
-
<ScrollView>
|
|
258
|
-
{/* Ana Abonelik */}
|
|
259
|
-
<SubscriptionSection
|
|
260
|
-
title="Main Subscription"
|
|
261
|
-
subscription={subscription}
|
|
262
|
-
onPress={() => navigation.navigate('MainSubscription')}
|
|
263
|
-
/>
|
|
264
|
-
|
|
265
|
-
{/* Kredi Paketi */}
|
|
266
|
-
<SubscriptionSection
|
|
267
|
-
title="Credits Balance"
|
|
268
|
-
subscription={{
|
|
269
|
-
type: 'credits',
|
|
270
|
-
isActive: true,
|
|
271
|
-
credits: 150,
|
|
272
|
-
}}
|
|
273
|
-
onPress={() => navigation.navigate('Credits')}
|
|
274
|
-
translations={{
|
|
275
|
-
title: 'Credits',
|
|
276
|
-
status: '150 credits available',
|
|
277
|
-
}}
|
|
278
|
-
/>
|
|
279
|
-
|
|
280
|
-
{/* Lifetime Plan */}
|
|
281
|
-
{subscription?.type === 'lifetime' && (
|
|
282
|
-
<SubscriptionSection
|
|
283
|
-
title="Lifetime Access"
|
|
284
|
-
subscription={subscription}
|
|
285
|
-
showExpiration={false}
|
|
286
|
-
translations={{
|
|
287
|
-
title: 'Lifetime',
|
|
288
|
-
status: 'Owned forever',
|
|
289
|
-
}}
|
|
290
|
-
/>
|
|
291
|
-
)}
|
|
292
|
-
</ScrollView>
|
|
293
|
-
);
|
|
294
|
-
}
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
## Refresh Support
|
|
298
|
-
|
|
299
|
-
Pull-to-refresh desteği:
|
|
300
|
-
|
|
301
|
-
```typescript
|
|
302
|
-
import React, { useState } from 'react';
|
|
303
|
-
import { ScrollView, RefreshControl } from 'react-native';
|
|
304
|
-
import { SubscriptionSection } from '@umituz/react-native-subscription';
|
|
305
|
-
|
|
306
|
-
function RefreshableSection() {
|
|
307
|
-
const { subscription, refetch, isLoading } = useSubscription();
|
|
308
|
-
const [refreshing, setRefreshing] = useState(false);
|
|
309
|
-
|
|
310
|
-
const handleRefresh = async () => {
|
|
311
|
-
setRefreshing(true);
|
|
312
|
-
await refetch();
|
|
313
|
-
setRefreshing(false);
|
|
314
|
-
};
|
|
315
|
-
|
|
316
|
-
return (
|
|
317
|
-
<ScrollView
|
|
318
|
-
refreshControl={
|
|
319
|
-
<RefreshControl
|
|
320
|
-
refreshing={refreshing || isLoading}
|
|
321
|
-
onRefresh={handleRefresh}
|
|
322
|
-
/>
|
|
323
|
-
}
|
|
324
|
-
>
|
|
325
|
-
<SubscriptionSection
|
|
326
|
-
subscription={subscription}
|
|
327
|
-
onPress={() => navigation.navigate('SubscriptionDetail')}
|
|
328
|
-
/>
|
|
329
|
-
</ScrollView>
|
|
330
|
-
);
|
|
331
|
-
}
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
## Best Practices
|
|
335
|
-
|
|
336
|
-
1. **Clear Status**: Durumun açık ve net olduğundan emin olun
|
|
337
|
-
2. **Action Buttons**: Uygun aksiyon butonları sağlayın
|
|
338
|
-
3. **Loading States**: Yüklenme durumlarını gösterin
|
|
339
|
-
4. **Error Handling**: Hata durumlarını graceful şekilde handle edin
|
|
340
|
-
5. **Accessibility**: Accessibility özelliklerini ekleyin
|
|
341
|
-
6. **Consistent Design**: Tüm section'larda tutarlı tasarım kullanın
|
|
342
|
-
7. **Deep Links**: Yönetim sayfalarına deep link ekleyin
|
|
343
|
-
|
|
344
|
-
## Örnek: Complete Implementation
|
|
345
|
-
|
|
346
|
-
```typescript
|
|
347
|
-
import React from 'react';
|
|
348
|
-
import {
|
|
349
|
-
View,
|
|
350
|
-
StyleSheet,
|
|
351
|
-
ScrollView,
|
|
352
|
-
RefreshControl,
|
|
353
|
-
Linking,
|
|
354
|
-
Platform,
|
|
355
|
-
} from 'react-native';
|
|
356
|
-
import {
|
|
357
|
-
SubscriptionSection,
|
|
358
|
-
useSubscription,
|
|
359
|
-
} from '@umituz/react-native-subscription';
|
|
360
|
-
|
|
361
|
-
export default function SettingsScreen() {
|
|
362
|
-
const { subscription, isLoading, refetch } = useSubscription();
|
|
363
|
-
const [refreshing, setRefreshing] = React.useState(false);
|
|
364
|
-
|
|
365
|
-
const handleRefresh = async () => {
|
|
366
|
-
setRefreshing(true);
|
|
367
|
-
await refetch();
|
|
368
|
-
setRefreshing(false);
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
const handleManageSubscription = () => {
|
|
372
|
-
const url =
|
|
373
|
-
Platform.OS === 'ios'
|
|
374
|
-
? 'https://apps.apple.com/account/subscriptions'
|
|
375
|
-
: 'https://play.google.com/store/account/subscriptions';
|
|
376
|
-
|
|
377
|
-
Linking.openURL(url).catch((err) =>
|
|
378
|
-
console.error('Cannot open URL:', err)
|
|
379
|
-
);
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
return (
|
|
383
|
-
<ScrollView
|
|
384
|
-
style={styles.container}
|
|
385
|
-
refreshControl={
|
|
386
|
-
<RefreshControl refreshing={refreshing} onRefresh={handleRefresh} />
|
|
387
|
-
}
|
|
388
|
-
>
|
|
389
|
-
{/* Header */}
|
|
390
|
-
<View style={styles.header}>
|
|
391
|
-
<Text style={styles.headerTitle}>Settings</Text>
|
|
392
|
-
</View>
|
|
393
|
-
|
|
394
|
-
{/* Subscription Section */}
|
|
395
|
-
<SubscriptionSection
|
|
396
|
-
title="Subscription"
|
|
397
|
-
subscription={subscription}
|
|
398
|
-
showStatus={true}
|
|
399
|
-
showExpiration={true}
|
|
400
|
-
showManageButton={subscription?.isPremium}
|
|
401
|
-
onPress={() => navigation.navigate('SubscriptionDetail')}
|
|
402
|
-
onManagePress={handleManageSubscription}
|
|
403
|
-
onUpgradePress={() => navigation.navigate('Paywall')}
|
|
404
|
-
translations={{
|
|
405
|
-
title: 'Subscription',
|
|
406
|
-
active: 'Active',
|
|
407
|
-
inactive: 'Inactive',
|
|
408
|
-
expires: 'Expires on',
|
|
409
|
-
renews: 'Renews on',
|
|
410
|
-
manage: 'Manage Subscription',
|
|
411
|
-
upgrade: 'Upgrade to Premium',
|
|
412
|
-
lifetime: 'Lifetime Access',
|
|
413
|
-
}}
|
|
414
|
-
/>
|
|
415
|
-
|
|
416
|
-
{/* Diğer ayarlar */}
|
|
417
|
-
{/* ... */}
|
|
418
|
-
</ScrollView>
|
|
419
|
-
);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
const styles = StyleSheet.create({
|
|
423
|
-
container: {
|
|
424
|
-
flex: 1,
|
|
425
|
-
backgroundColor: '#F5F5F5',
|
|
426
|
-
},
|
|
427
|
-
header: {
|
|
428
|
-
padding: 20,
|
|
429
|
-
backgroundColor: '#fff',
|
|
430
|
-
borderBottomWidth: 1,
|
|
431
|
-
borderBottomColor: '#E0E0E0',
|
|
432
|
-
},
|
|
433
|
-
headerTitle: {
|
|
434
|
-
fontSize: 28,
|
|
435
|
-
fontWeight: 'bold',
|
|
436
|
-
},
|
|
437
|
-
});
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
## Translations
|
|
441
|
-
|
|
442
|
-
Çoklu dil desteği:
|
|
443
|
-
|
|
444
|
-
```typescript
|
|
445
|
-
const translations = {
|
|
446
|
-
'en': {
|
|
447
|
-
title: 'Subscription',
|
|
448
|
-
active: 'Active',
|
|
449
|
-
inactive: 'Inactive',
|
|
450
|
-
expires: 'Expires on',
|
|
451
|
-
manage: 'Manage',
|
|
452
|
-
upgrade: 'Upgrade',
|
|
453
|
-
},
|
|
454
|
-
'tr': {
|
|
455
|
-
title: 'Abonelik',
|
|
456
|
-
active: 'Aktif',
|
|
457
|
-
inactive: 'Aktif değil',
|
|
458
|
-
expires: 'Son kullanma',
|
|
459
|
-
manage: 'Yönet',
|
|
460
|
-
upgrade: 'Yükselt',
|
|
461
|
-
},
|
|
462
|
-
};
|
|
463
|
-
|
|
464
|
-
<SubscriptionSection
|
|
465
|
-
subscription={subscription}
|
|
466
|
-
translations={translations[userLanguage]}
|
|
467
|
-
/>
|
|
468
|
-
```
|
|
3
|
+
Subscription-related section and card components.
|
|
4
|
+
|
|
5
|
+
## Location
|
|
6
|
+
|
|
7
|
+
- **Base Path**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-subscription/src/presentation/components/sections/`
|
|
8
|
+
- **Components**: `src/presentation/components/sections/`
|
|
9
|
+
|
|
10
|
+
## Strategy
|
|
11
|
+
|
|
12
|
+
### Section Components
|
|
13
|
+
|
|
14
|
+
Organized sections for subscription information display.
|
|
15
|
+
|
|
16
|
+
- **SubscriptionSection**: Subscription status and management section
|
|
17
|
+
- **Status Display**: Clear status indicators
|
|
18
|
+
- **Action Buttons**: Management and upgrade actions
|
|
19
|
+
- **Navigation Support**: Deep linking to detail screens
|
|
20
|
+
|
|
21
|
+
### Display Features
|
|
22
|
+
|
|
23
|
+
Comprehensive subscription information display.
|
|
24
|
+
|
|
25
|
+
- **Status Indicators**: Active/inactive status display
|
|
26
|
+
- **Expiration Dates**: Date formatting and display
|
|
27
|
+
- **Management Actions**: Subscription management buttons
|
|
28
|
+
- **Upgrade Options**: Premium upgrade prompts
|
|
29
|
+
|
|
30
|
+
### Interaction Design
|
|
31
|
+
|
|
32
|
+
User-friendly interaction patterns.
|
|
33
|
+
|
|
34
|
+
- **Press Actions**: Navigation to detail screens
|
|
35
|
+
- **Long Press**: Quick management options
|
|
36
|
+
- **Status-Based UI**: Different UI for different subscription states
|
|
37
|
+
- **Refresh Support**: Pull-to-refresh capabilities
|
|
38
|
+
|
|
39
|
+
### Customization
|
|
40
|
+
|
|
41
|
+
Flexible styling and behavior.
|
|
42
|
+
|
|
43
|
+
- **Custom Actions**: Custom action handlers
|
|
44
|
+
- **Style Props**: Custom styling support
|
|
45
|
+
- **Translation Support**: Multi-language support
|
|
46
|
+
- **Conditional Display**: Show/hide elements based on state
|
|
47
|
+
|
|
48
|
+
## Restrictions
|
|
49
|
+
|
|
50
|
+
### REQUIRED
|
|
51
|
+
|
|
52
|
+
- **Status Clarity**: Status must be clearly visible
|
|
53
|
+
- **Action Buttons**: Provide appropriate action buttons
|
|
54
|
+
- **Loading States**: Show loading indicators
|
|
55
|
+
- **Error Handling**: Handle errors gracefully
|
|
56
|
+
|
|
57
|
+
### PROHIBITED
|
|
58
|
+
|
|
59
|
+
- **Hardcoded Text**: All text must support translations
|
|
60
|
+
- **Missing Actions**: Never omit necessary actions
|
|
61
|
+
- **Ambiguous Status**: Status must be unambiguous
|
|
62
|
+
- **Blocking UI**: Never block app navigation
|
|
63
|
+
|
|
64
|
+
### CRITICAL
|
|
65
|
+
|
|
66
|
+
- **Deep Links**: Include management deep links
|
|
67
|
+
- **State Accuracy**: Display accurate subscription state
|
|
68
|
+
- **User Actions**: Provide clear action options
|
|
69
|
+
- **Platform Links**: Correct platform-specific management links
|
|
70
|
+
|
|
71
|
+
## AI Agent Guidelines
|
|
72
|
+
|
|
73
|
+
### When Modifying Section Components
|
|
74
|
+
|
|
75
|
+
1. **Component Interface**: Maintain consistent prop interfaces
|
|
76
|
+
2. **State Handling**: Proper state management
|
|
77
|
+
3. **Translations**: Ensure translation support
|
|
78
|
+
4. **Accessibility**: Include accessibility features
|
|
79
|
+
|
|
80
|
+
### When Adding Section Features
|
|
81
|
+
|
|
82
|
+
1. **Pattern Consistency**: Follow existing patterns
|
|
83
|
+
2. **Type Safety**: Define TypeScript types
|
|
84
|
+
3. **Documentation**: Document props and usage
|
|
85
|
+
4. **Testing**: Test with different subscription states
|
|
86
|
+
|
|
87
|
+
### When Fixing Section Component Bugs
|
|
88
|
+
|
|
89
|
+
1. **State Display**: Check state display logic
|
|
90
|
+
2. **Actions**: Verify action handlers
|
|
91
|
+
3. **Navigation**: Test navigation flows
|
|
92
|
+
4. **Edge Cases**: Test with null/undefined states
|
|
93
|
+
|
|
94
|
+
## Related Documentation
|
|
95
|
+
|
|
96
|
+
- [Details Components](/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-subscription/src/presentation/components/details/README.md)
|
|
97
|
+
- [Feedback Components](/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-subscription/src/presentation/components/feedback/README.md)
|
|
98
|
+
- [Presentation Components](/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-subscription/src/presentation/components/README.md)
|
|
99
|
+
- [Paywall Domain](/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-subscription/src/domains/paywall/README.md)
|