@umituz/react-native-subscription 2.27.133 → 2.27.135
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/package.json +1 -1
- package/src/domains/subscription/presentation/components/details/PremiumDetailsCard.tsx +1 -1
- package/src/domains/subscription/presentation/screens/SubscriptionDetailScreen.tsx +1 -1
- package/src/domains/subscription/presentation/screens/SubscriptionDetailScreen.types.ts +8 -1
- package/src/domains/subscription/presentation/screens/components/UpgradePrompt.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-subscription",
|
|
3
|
-
"version": "2.27.
|
|
3
|
+
"version": "2.27.135",
|
|
4
4
|
"description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -28,7 +28,7 @@ export const PremiumDetailsCard: React.FC<PremiumDetailsCardProps> = ({
|
|
|
28
28
|
onUpgrade,
|
|
29
29
|
}) => {
|
|
30
30
|
const tokens = useAppDesignTokens();
|
|
31
|
-
const showCredits = credits && credits.length > 0;
|
|
31
|
+
const showCredits = isPremium && credits && credits.length > 0;
|
|
32
32
|
|
|
33
33
|
return (
|
|
34
34
|
<View style={[styles.card, { backgroundColor: tokens.colors.surface }]}>
|
|
@@ -55,7 +55,7 @@ export const SubscriptionDetailScreen: React.FC<SubscriptionDetailScreenProps> =
|
|
|
55
55
|
)}
|
|
56
56
|
{showCredits && config.credits && (
|
|
57
57
|
<CreditsList
|
|
58
|
-
credits={config.credits
|
|
58
|
+
credits={config.credits}
|
|
59
59
|
title={config.translations.usageTitle || config.translations.creditsTitle}
|
|
60
60
|
description={config.translations.creditsResetInfo}
|
|
61
61
|
remainingLabel={config.translations.remainingLabel}
|
|
@@ -29,6 +29,13 @@ export interface UpgradePromptConfig {
|
|
|
29
29
|
onUpgrade?: () => void;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
export interface CreditInfo {
|
|
33
|
+
id: string;
|
|
34
|
+
label: string;
|
|
35
|
+
current: number;
|
|
36
|
+
total: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
32
39
|
export interface SubscriptionDetailConfig {
|
|
33
40
|
display: SubscriptionDisplayFlags;
|
|
34
41
|
statusType: "active" | "expired" | "none" | "canceled";
|
|
@@ -36,7 +43,7 @@ export interface SubscriptionDetailConfig {
|
|
|
36
43
|
expirationDate?: string;
|
|
37
44
|
purchaseDate?: string;
|
|
38
45
|
daysRemaining?: number | null;
|
|
39
|
-
credits?: readonly
|
|
46
|
+
credits?: readonly CreditInfo[];
|
|
40
47
|
translations: SubscriptionDetailTranslations;
|
|
41
48
|
upgradePrompt?: UpgradePromptConfig;
|
|
42
49
|
onClose?: () => void;
|
|
@@ -40,8 +40,8 @@ export const UpgradePrompt: React.FC<UpgradePromptProps> = ({ title, subtitle, b
|
|
|
40
40
|
</View>
|
|
41
41
|
{benefits && benefits.length > 0 && (
|
|
42
42
|
<View style={styles.benefitsCard}>
|
|
43
|
-
{benefits.map((benefit
|
|
44
|
-
<View key={
|
|
43
|
+
{benefits.map((benefit) => (
|
|
44
|
+
<View key={benefit.text} style={styles.benefitItem}>
|
|
45
45
|
<View style={styles.benefitIconWrapper}>
|
|
46
46
|
<AtomicIcon name={benefit.icon || "checkmark-circle-outline"} customSize={16} color="primary" />
|
|
47
47
|
</View>
|