@umituz/react-native-subscription 2.14.50 → 2.14.52
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/wallet/presentation/components/BalanceCard.tsx +1 -1
- package/src/domains/wallet/presentation/components/TransactionItem.tsx +9 -9
- package/src/domains/wallet/presentation/components/TransactionList.tsx +10 -12
- package/src/domains/wallet/presentation/screens/WalletScreen.tsx +12 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-subscription",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.52",
|
|
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",
|
|
@@ -33,16 +33,16 @@ export interface TransactionItemProps {
|
|
|
33
33
|
|
|
34
34
|
const getReasonIcon = (reason: TransactionReason): string => {
|
|
35
35
|
const iconMap: Record<TransactionReason, string> = {
|
|
36
|
-
purchase: "
|
|
37
|
-
usage: "
|
|
38
|
-
refund: "
|
|
39
|
-
bonus: "
|
|
40
|
-
subscription: "
|
|
41
|
-
admin: "
|
|
42
|
-
reward: "
|
|
43
|
-
expired: "
|
|
36
|
+
purchase: "shopping-cart",
|
|
37
|
+
usage: "zap",
|
|
38
|
+
refund: "rotate-ccw",
|
|
39
|
+
bonus: "gift",
|
|
40
|
+
subscription: "star",
|
|
41
|
+
admin: "shield",
|
|
42
|
+
reward: "award",
|
|
43
|
+
expired: "clock",
|
|
44
44
|
};
|
|
45
|
-
return iconMap[reason] || "
|
|
45
|
+
return iconMap[reason] || "circle";
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
const defaultDateFormatter = (timestamp: number): string => {
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
|
-
import { View, StyleSheet, ScrollView
|
|
9
|
+
import { View, StyleSheet, ScrollView } from "react-native";
|
|
10
10
|
import {
|
|
11
11
|
useAppDesignTokens,
|
|
12
12
|
AtomicText,
|
|
13
13
|
AtomicIcon,
|
|
14
|
+
AtomicSpinner,
|
|
14
15
|
} from "@umituz/react-native-design-system";
|
|
15
16
|
import type { CreditLog } from "../../domain/types/transaction.types";
|
|
16
17
|
import {
|
|
@@ -50,22 +51,19 @@ export const TransactionList: React.FC<TransactionListProps> = ({
|
|
|
50
51
|
>
|
|
51
52
|
{translations.title}
|
|
52
53
|
</AtomicText>
|
|
53
|
-
<AtomicIcon name="
|
|
54
|
+
<AtomicIcon name="history" size="md" color="secondary" />
|
|
54
55
|
</View>
|
|
55
56
|
|
|
56
57
|
{loading ? (
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{translations.loading}
|
|
64
|
-
</AtomicText>
|
|
65
|
-
</View>
|
|
58
|
+
<AtomicSpinner
|
|
59
|
+
size="lg"
|
|
60
|
+
color="primary"
|
|
61
|
+
text={translations.loading}
|
|
62
|
+
style={styles.stateContainer}
|
|
63
|
+
/>
|
|
66
64
|
) : transactions.length === 0 ? (
|
|
67
65
|
<View style={styles.stateContainer}>
|
|
68
|
-
<AtomicIcon name="
|
|
66
|
+
<AtomicIcon name="inbox" size="xl" color="secondary" />
|
|
69
67
|
<AtomicText
|
|
70
68
|
type="bodyMedium"
|
|
71
69
|
style={[styles.stateText, { color: tokens.colors.textSecondary }]}
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React from "react";
|
|
10
|
-
import { View, StyleSheet,
|
|
11
|
-
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
10
|
+
import { View, StyleSheet, TouchableOpacity } from "react-native";
|
|
12
11
|
import {
|
|
12
|
+
useSafeAreaInsets,
|
|
13
13
|
useAppDesignTokens,
|
|
14
14
|
AtomicText,
|
|
15
15
|
AtomicIcon,
|
|
16
|
+
AtomicSpinner,
|
|
16
17
|
ScreenLayout,
|
|
17
18
|
} from "@umituz/react-native-design-system";
|
|
18
19
|
import {
|
|
@@ -61,7 +62,7 @@ export const WalletScreen: React.FC<WalletScreenProps> = ({ config }) => {
|
|
|
61
62
|
hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
|
|
62
63
|
>
|
|
63
64
|
<AtomicIcon
|
|
64
|
-
name="
|
|
65
|
+
name="arrow-left"
|
|
65
66
|
size="lg"
|
|
66
67
|
customColor={tokens.colors.textPrimary}
|
|
67
68
|
/>
|
|
@@ -79,15 +80,13 @@ export const WalletScreen: React.FC<WalletScreenProps> = ({ config }) => {
|
|
|
79
80
|
const renderBalance = () => {
|
|
80
81
|
if (config.balanceLoading) {
|
|
81
82
|
return (
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
</AtomicText>
|
|
90
|
-
</View>
|
|
83
|
+
<AtomicSpinner
|
|
84
|
+
size="xl"
|
|
85
|
+
color="primary"
|
|
86
|
+
text={config.translations.loading}
|
|
87
|
+
fullContainer
|
|
88
|
+
style={styles.loadingContainer}
|
|
89
|
+
/>
|
|
91
90
|
);
|
|
92
91
|
}
|
|
93
92
|
|
|
@@ -135,13 +134,6 @@ const styles = StyleSheet.create({
|
|
|
135
134
|
marginRight: 16,
|
|
136
135
|
},
|
|
137
136
|
loadingContainer: {
|
|
138
|
-
|
|
139
|
-
alignItems: "center",
|
|
140
|
-
justifyContent: "center",
|
|
141
|
-
gap: 12,
|
|
142
|
-
},
|
|
143
|
-
loadingText: {
|
|
144
|
-
fontSize: 14,
|
|
145
|
-
fontWeight: "500",
|
|
137
|
+
minHeight: 200,
|
|
146
138
|
},
|
|
147
139
|
});
|