@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,449 +1,99 @@
|
|
|
1
1
|
# Details 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
|
-
- Durum bazlı renkler
|
|
101
|
-
- Responsive tasarım
|
|
102
|
-
|
|
103
|
-
## DetailRow
|
|
104
|
-
|
|
105
|
-
Detay gösterimi için satır bileşeni.
|
|
106
|
-
|
|
107
|
-
### Kullanım
|
|
108
|
-
|
|
109
|
-
```typescript
|
|
110
|
-
import { DetailRow } from '@umituz/react-native-subscription';
|
|
111
|
-
|
|
112
|
-
<DetailRow
|
|
113
|
-
label="Subscription Type"
|
|
114
|
-
value="Annual Premium"
|
|
115
|
-
/>
|
|
116
|
-
|
|
117
|
-
<DetailRow
|
|
118
|
-
label="Price"
|
|
119
|
-
value="$79.99/year"
|
|
120
|
-
/>
|
|
121
|
-
|
|
122
|
-
<DetailRow
|
|
123
|
-
label="Status"
|
|
124
|
-
value="Active"
|
|
125
|
-
valueColor="green"
|
|
126
|
-
/>
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### Props
|
|
130
|
-
|
|
131
|
-
```typescript
|
|
132
|
-
interface DetailRowProps {
|
|
133
|
-
label: string;
|
|
134
|
-
value: string;
|
|
135
|
-
valueColor?: string;
|
|
136
|
-
style?: ViewStyle;
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## CreditRow
|
|
141
|
-
|
|
142
|
-
Kredi bakiyesi gösterimi için satır bileşeni.
|
|
143
|
-
|
|
144
|
-
### Kullanım
|
|
145
|
-
|
|
146
|
-
```typescript
|
|
147
|
-
import { CreditRow } from '@umituz/react-native-subscription';
|
|
148
|
-
|
|
149
|
-
<CreditRow
|
|
150
|
-
credits={150}
|
|
151
|
-
currency="USD"
|
|
152
|
-
showBalance={true}
|
|
153
|
-
/>
|
|
154
|
-
|
|
155
|
-
<CreditRow
|
|
156
|
-
credits={50}
|
|
157
|
-
currency="USD"
|
|
158
|
-
showBalance={false}
|
|
159
|
-
translations={{
|
|
160
|
-
credits: 'Credits',
|
|
161
|
-
balance: 'Balance',
|
|
162
|
-
}}
|
|
163
|
-
/>
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### Props
|
|
167
|
-
|
|
168
|
-
```typescript
|
|
169
|
-
interface CreditRowProps {
|
|
170
|
-
credits: number;
|
|
171
|
-
currency?: string;
|
|
172
|
-
showBalance?: boolean;
|
|
173
|
-
translations?: {
|
|
174
|
-
credits?: string;
|
|
175
|
-
balance?: string;
|
|
176
|
-
};
|
|
177
|
-
style?: ViewStyle;
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Birlikte Kullanım
|
|
182
|
-
|
|
183
|
-
```typescript
|
|
184
|
-
import React from 'react';
|
|
185
|
-
import { View, ScrollView } from 'react-native';
|
|
186
|
-
import {
|
|
187
|
-
PremiumDetailsCard,
|
|
188
|
-
PremiumStatusBadge,
|
|
189
|
-
DetailRow,
|
|
190
|
-
CreditRow,
|
|
191
|
-
} from '@umituz/react-native-subscription';
|
|
192
|
-
|
|
193
|
-
function SubscriptionDetailsScreen() {
|
|
194
|
-
const { subscription, credits } = useSubscription();
|
|
195
|
-
|
|
196
|
-
return (
|
|
197
|
-
<ScrollView>
|
|
198
|
-
{/* Durum Badge */}
|
|
199
|
-
<View style={styles.header}>
|
|
200
|
-
<PremiumStatusBadge
|
|
201
|
-
status={subscription?.type}
|
|
202
|
-
size="large"
|
|
203
|
-
showIcon={true}
|
|
204
|
-
/>
|
|
205
|
-
</View>
|
|
206
|
-
|
|
207
|
-
{/* Detay Kartı */}
|
|
208
|
-
<PremiumDetailsCard
|
|
209
|
-
status={subscription}
|
|
210
|
-
onManagePress={handleManage}
|
|
211
|
-
/>
|
|
212
|
-
|
|
213
|
-
{/* Ek Detaylar */}
|
|
214
|
-
<View style={styles.section}>
|
|
215
|
-
<DetailRow label="Plan" value="Annual Premium" />
|
|
216
|
-
<DetailRow label="Price" value="$79.99/year" />
|
|
217
|
-
<DetailRow
|
|
218
|
-
label="Status"
|
|
219
|
-
value={subscription?.isActive ? 'Active' : 'Inactive'}
|
|
220
|
-
valueColor={subscription?.isActive ? 'green' : 'red'}
|
|
221
|
-
/>
|
|
222
|
-
</View>
|
|
223
|
-
|
|
224
|
-
{/* Kredi Bakiyesi */}
|
|
225
|
-
<View style={styles.section}>
|
|
226
|
-
<CreditRow
|
|
227
|
-
credits={credits}
|
|
228
|
-
currency="USD"
|
|
229
|
-
showBalance={true}
|
|
230
|
-
/>
|
|
231
|
-
</View>
|
|
232
|
-
</ScrollView>
|
|
233
|
-
);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
const styles = StyleSheet.create({
|
|
237
|
-
header: {
|
|
238
|
-
padding: 16,
|
|
239
|
-
alignItems: 'center',
|
|
240
|
-
},
|
|
241
|
-
section: {
|
|
242
|
-
padding: 16,
|
|
243
|
-
backgroundColor: '#fff',
|
|
244
|
-
marginVertical: 8,
|
|
245
|
-
},
|
|
246
|
-
});
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
## Styling
|
|
250
|
-
|
|
251
|
-
Bileşen stilleri özelleştirilebilir:
|
|
252
|
-
|
|
253
|
-
```typescript
|
|
254
|
-
import { premiumDetailsCardStyles } from '@umituz/react-native-subscription';
|
|
255
|
-
|
|
256
|
-
// Kendi stilınızı kullanın
|
|
257
|
-
const customStyles = StyleSheet.create({
|
|
258
|
-
container: {
|
|
259
|
-
backgroundColor: 'custom-background',
|
|
260
|
-
borderRadius: 16,
|
|
261
|
-
padding: 20,
|
|
262
|
-
shadowColor: '#000',
|
|
263
|
-
shadowOffset: { width: 0, height: 2 },
|
|
264
|
-
shadowOpacity: 0.25,
|
|
265
|
-
shadowRadius: 3.84,
|
|
266
|
-
elevation: 5,
|
|
267
|
-
},
|
|
268
|
-
title: {
|
|
269
|
-
fontSize: 24,
|
|
270
|
-
fontWeight: 'bold',
|
|
271
|
-
color: '#FF6B6B',
|
|
272
|
-
},
|
|
273
|
-
});
|
|
274
|
-
|
|
275
|
-
<PremiumDetailsCard
|
|
276
|
-
style={customStyles.container}
|
|
277
|
-
status={status}
|
|
278
|
-
/>
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
## Translations
|
|
282
|
-
|
|
283
|
-
Tüm bileşenler çeviri desteği sunar:
|
|
284
|
-
|
|
285
|
-
```typescript
|
|
286
|
-
const translations = {
|
|
287
|
-
// PremiumDetailsCard
|
|
288
|
-
title: 'Premium',
|
|
289
|
-
active: 'Active',
|
|
290
|
-
inactive: 'Inactive',
|
|
291
|
-
expires: 'Expires on',
|
|
292
|
-
renews: 'Renews on',
|
|
293
|
-
manage: 'Manage Subscription',
|
|
294
|
-
upgrade: 'Upgrade to Premium',
|
|
295
|
-
lifetime: 'Lifetime Access',
|
|
296
|
-
|
|
297
|
-
// PremiumStatusBadge
|
|
298
|
-
guest: 'Guest',
|
|
299
|
-
free: 'Free',
|
|
300
|
-
premium: 'Premium',
|
|
301
|
-
|
|
302
|
-
// DetailRow & CreditRow
|
|
303
|
-
credits: 'Credits',
|
|
304
|
-
balance: 'Balance',
|
|
305
|
-
plan: 'Plan',
|
|
306
|
-
status: 'Status',
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
<PremiumDetailsCard
|
|
310
|
-
translations={translations}
|
|
311
|
-
status={status}
|
|
312
|
-
/>
|
|
313
|
-
|
|
314
|
-
<PremiumStatusBadge
|
|
315
|
-
status="premium"
|
|
316
|
-
translations={translations}
|
|
317
|
-
/>
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
## Best Practices
|
|
321
|
-
|
|
322
|
-
1. **Consistent Styling**: Tüm detay bileşenlerinde tutarlı stil kullanın
|
|
323
|
-
2. **Loading States**: Veri yüklenirken loading gösterin
|
|
324
|
-
3. **Error States**: Hata durumlarını kullanıcı dostu gösterin
|
|
325
|
-
4. **Accessibility**: Accessibility özelliklerini ekleyin
|
|
326
|
-
5. **Responsive**: Farklı ekran boyutlarında test edin
|
|
327
|
-
6. **Performance**: Gereksiz re-render'lardan kaçının
|
|
328
|
-
7. **Translations**: Her zaman çeviri desteği sağlayın
|
|
329
|
-
|
|
330
|
-
## Örnek Implementasyon
|
|
331
|
-
|
|
332
|
-
```typescript
|
|
333
|
-
import React, { useState } from 'react';
|
|
334
|
-
import {
|
|
335
|
-
View,
|
|
336
|
-
StyleSheet,
|
|
337
|
-
ActivityIndicator,
|
|
338
|
-
RefreshControl,
|
|
339
|
-
} from 'react-native';
|
|
340
|
-
import {
|
|
341
|
-
PremiumDetailsCard,
|
|
342
|
-
PremiumStatusBadge,
|
|
343
|
-
DetailRow,
|
|
344
|
-
CreditRow,
|
|
345
|
-
useSubscription,
|
|
346
|
-
useCredits,
|
|
347
|
-
} from '@umituz/react-native-subscription';
|
|
348
|
-
|
|
349
|
-
export default function MySubscriptionScreen() {
|
|
350
|
-
const { subscription, isLoading, refetch } = useSubscription();
|
|
351
|
-
const { credits } = useCredits();
|
|
352
|
-
const [refreshing, setRefreshing] = useState(false);
|
|
353
|
-
|
|
354
|
-
const handleRefresh = async () => {
|
|
355
|
-
setRefreshing(true);
|
|
356
|
-
await refetch();
|
|
357
|
-
setRefreshing(false);
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
if (isLoading) {
|
|
361
|
-
return (
|
|
362
|
-
<View style={styles.centered}>
|
|
363
|
-
<ActivityIndicator size="large" />
|
|
364
|
-
</View>
|
|
365
|
-
);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
return (
|
|
369
|
-
<ScrollView
|
|
370
|
-
style={styles.container}
|
|
371
|
-
refreshControl={
|
|
372
|
-
<RefreshControl refreshing={refreshing} onRefresh={handleRefresh} />
|
|
373
|
-
}
|
|
374
|
-
>
|
|
375
|
-
{/* Header */}
|
|
376
|
-
<View style={styles.header}>
|
|
377
|
-
<PremiumStatusBadge
|
|
378
|
-
status={subscription?.type || 'guest'}
|
|
379
|
-
size="large"
|
|
380
|
-
showIcon={true}
|
|
381
|
-
/>
|
|
382
|
-
</View>
|
|
383
|
-
|
|
384
|
-
{/* Premium Details */}
|
|
385
|
-
<PremiumDetailsCard
|
|
386
|
-
status={subscription}
|
|
387
|
-
onManagePress={() => console.log('Manage')}
|
|
388
|
-
onUpgradePress={() => console.log('Upgrade')}
|
|
389
|
-
style={styles.card}
|
|
390
|
-
/>
|
|
391
|
-
|
|
392
|
-
{/* Additional Details */}
|
|
393
|
-
<View style={styles.section}>
|
|
394
|
-
<DetailRow
|
|
395
|
-
label="Plan"
|
|
396
|
-
value={subscription?.productId || 'Free Plan'}
|
|
397
|
-
/>
|
|
398
|
-
<DetailRow
|
|
399
|
-
label="Status"
|
|
400
|
-
value={subscription?.isActive ? 'Active' : 'Inactive'}
|
|
401
|
-
valueColor={subscription?.isActive ? '#4CAF50' : '#F44336'}
|
|
402
|
-
/>
|
|
403
|
-
{subscription?.expirationDate && (
|
|
404
|
-
<DetailRow
|
|
405
|
-
label="Expires"
|
|
406
|
-
value={new Date(subscription.expirationDate).toLocaleDateString()}
|
|
407
|
-
/>
|
|
408
|
-
)}
|
|
409
|
-
</View>
|
|
410
|
-
|
|
411
|
-
{/* Credits */}
|
|
412
|
-
<View style={styles.section}>
|
|
413
|
-
<CreditRow
|
|
414
|
-
credits={credits}
|
|
415
|
-
currency="USD"
|
|
416
|
-
showBalance={true}
|
|
417
|
-
/>
|
|
418
|
-
</View>
|
|
419
|
-
</ScrollView>
|
|
420
|
-
);
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
const styles = StyleSheet.create({
|
|
424
|
-
container: {
|
|
425
|
-
flex: 1,
|
|
426
|
-
backgroundColor: '#F5F5F5',
|
|
427
|
-
},
|
|
428
|
-
centered: {
|
|
429
|
-
flex: 1,
|
|
430
|
-
justifyContent: 'center',
|
|
431
|
-
alignItems: 'center',
|
|
432
|
-
},
|
|
433
|
-
header: {
|
|
434
|
-
padding: 20,
|
|
435
|
-
alignItems: 'center',
|
|
436
|
-
backgroundColor: '#fff',
|
|
437
|
-
},
|
|
438
|
-
card: {
|
|
439
|
-
margin: 16,
|
|
440
|
-
},
|
|
441
|
-
section: {
|
|
442
|
-
backgroundColor: '#fff',
|
|
443
|
-
padding: 16,
|
|
444
|
-
marginHorizontal: 16,
|
|
445
|
-
marginBottom: 16,
|
|
446
|
-
borderRadius: 12,
|
|
447
|
-
},
|
|
448
|
-
});
|
|
449
|
-
```
|
|
3
|
+
UI components for displaying subscription and premium details.
|
|
4
|
+
|
|
5
|
+
## Location
|
|
6
|
+
|
|
7
|
+
- **Base Path**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-subscription/src/presentation/components/details/`
|
|
8
|
+
- **Components**: `src/presentation/components/details/`
|
|
9
|
+
|
|
10
|
+
## Strategy
|
|
11
|
+
|
|
12
|
+
### Component Architecture
|
|
13
|
+
|
|
14
|
+
Specialized components for subscription detail display.
|
|
15
|
+
|
|
16
|
+
- **PremiumDetailsCard**: Premium subscription details card
|
|
17
|
+
- **PremiumStatusBadge**: Status badge display
|
|
18
|
+
- **DetailRow**: Individual detail row component
|
|
19
|
+
- **CreditRow**: Credit balance display component
|
|
20
|
+
|
|
21
|
+
### Display Components
|
|
22
|
+
|
|
23
|
+
Structured information display components.
|
|
24
|
+
|
|
25
|
+
- **Subscription Status**: Active/inactive status display
|
|
26
|
+
- **Expiration Dates**: Date formatting and display
|
|
27
|
+
- **Product Information**: Plan and product details
|
|
28
|
+
- **Credit Balance**: Credit amount display
|
|
29
|
+
|
|
30
|
+
### Translation Support
|
|
31
|
+
|
|
32
|
+
Multi-language support for all displayed text.
|
|
33
|
+
|
|
34
|
+
- **Translation Props**: Optional translation overrides
|
|
35
|
+
- **Default Translations**: Built-in language support
|
|
36
|
+
- **Date Formatting**: Locale-aware date formatting
|
|
37
|
+
- **Currency Formatting**: Locale-aware currency display
|
|
38
|
+
|
|
39
|
+
### Styling System
|
|
40
|
+
|
|
41
|
+
Flexible styling and customization.
|
|
42
|
+
|
|
43
|
+
- **Style Props**: Custom style support
|
|
44
|
+
- **Theme Support**: Theme-aware styling
|
|
45
|
+
- **Responsive Design**: Adaptive layouts
|
|
46
|
+
- **Accessibility**: Accessibility features
|
|
47
|
+
|
|
48
|
+
## Restrictions
|
|
49
|
+
|
|
50
|
+
### REQUIRED
|
|
51
|
+
|
|
52
|
+
- **Loading States**: Show loading indicators while fetching data
|
|
53
|
+
- **Error States**: Handle and display errors appropriately
|
|
54
|
+
- **Translation Support**: Support multiple languages
|
|
55
|
+
- **Accessibility**: Include accessibility labels
|
|
56
|
+
|
|
57
|
+
### PROHIBITED
|
|
58
|
+
|
|
59
|
+
- **Hardcoded Text**: All text must support translations
|
|
60
|
+
- **Missing Null Checks**: Handle null/undefined values
|
|
61
|
+
- **Blocking UI**: Never block app flow
|
|
62
|
+
- **Assumed Data**: Never assume data exists
|
|
63
|
+
|
|
64
|
+
### CRITICAL
|
|
65
|
+
|
|
66
|
+
- **Data Validation**: Validate all displayed data
|
|
67
|
+
- **Edge Cases**: Handle missing or invalid data
|
|
68
|
+
- **Performance**: Optimize re-renders
|
|
69
|
+
- **User Experience**: Smooth interactions and transitions
|
|
70
|
+
|
|
71
|
+
## AI Agent Guidelines
|
|
72
|
+
|
|
73
|
+
### When Modifying Detail Components
|
|
74
|
+
|
|
75
|
+
1. **Component Props**: Maintain consistent prop interfaces
|
|
76
|
+
2. **Styling**: Preserve responsive design
|
|
77
|
+
3. **Translations**: Ensure translation support
|
|
78
|
+
4. **Testing**: Test with various data states
|
|
79
|
+
|
|
80
|
+
### When Adding New Detail Components
|
|
81
|
+
|
|
82
|
+
1. **Pattern Consistency**: Follow existing component patterns
|
|
83
|
+
2. **Type Safety**: Define TypeScript types
|
|
84
|
+
3. **Documentation**: Document props and usage
|
|
85
|
+
4. **Accessibility**: Include accessibility features
|
|
86
|
+
|
|
87
|
+
### When Fixing Detail Component Bugs
|
|
88
|
+
|
|
89
|
+
1. **Data Flow**: Check data flow and state
|
|
90
|
+
2. **Edge Cases**: Test with null/undefined
|
|
91
|
+
3. **Rendering**: Verify rendering logic
|
|
92
|
+
4. **Styling**: Check style application
|
|
93
|
+
|
|
94
|
+
## Related Documentation
|
|
95
|
+
|
|
96
|
+
- [Presentation Components](/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-subscription/src/presentation/components/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
|
+
- [Sections Components](/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-subscription/src/presentation/components/sections/README.md)
|
|
99
|
+
- [Paywall Domain](/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-subscription/src/domains/paywall/README.md)
|