react-native-purchases-ui 9.2.3 → 9.4.0
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/RNPaywalls.podspec +1 -1
- package/android/build.gradle +3 -3
- package/android/src/main/java/com/revenuecat/purchases/react/ui/BasePaywallViewManager.kt +25 -5
- package/android/src/main/java/com/revenuecat/purchases/react/ui/PaywallFooterViewManager.kt +7 -2
- package/android/src/main/java/com/revenuecat/purchases/react/ui/PaywallViewManager.kt +7 -2
- package/android/src/main/java/com/revenuecat/purchases/react/ui/RNCustomerCenterModule.kt +1 -2
- package/android/src/main/java/com/revenuecat/purchases/react/ui/RNPaywallsModule.kt +12 -3
- package/android/src/main/java/com/revenuecat/purchases/react/ui/RNPurchasesConverters.kt +27 -0
- package/android/src/main/java/com/revenuecat/purchases/react/ui/customercenter/events/CustomerCenterEventName.kt +2 -1
- package/android/src/main/java/com/revenuecat/purchases/react/ui/views/WrappedPaywallComposeView.kt +3 -2
- package/android/src/main/java/com/revenuecat/purchases/react/ui/views/WrappedPaywallFooterComposeView.kt +12 -2
- package/ios/CustomerCenterViewManager.m +6 -0
- package/ios/CustomerCenterViewWrapper.h +2 -0
- package/ios/CustomerCenterViewWrapper.m +24 -1
- package/ios/PaywallViewWrapper.m +45 -1
- package/ios/RNCustomerCenter.m +9 -0
- package/ios/RNPaywalls.m +8 -0
- package/lib/commonjs/index.js +35 -12
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/preview/previewComponents.js +35 -1
- package/lib/commonjs/preview/previewComponents.js.map +1 -1
- package/lib/module/index.js +36 -13
- package/lib/module/index.js.map +1 -1
- package/lib/module/preview/previewComponents.js +33 -0
- package/lib/module/preview/previewComponents.js.map +1 -1
- package/lib/typescript/src/index.d.ts +19 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/preview/previewComponents.d.ts +6 -0
- package/lib/typescript/src/preview/previewComponents.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/index.tsx +57 -12
- package/src/preview/previewComponents.tsx +47 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
|
2
|
+
import { View, Text, StyleSheet, TouchableOpacity, type ViewStyle, type StyleProp } from 'react-native';
|
3
3
|
import {
|
4
4
|
type CustomerInfo,
|
5
5
|
type PurchasesError,
|
@@ -168,4 +168,49 @@ const styles = StyleSheet.create({
|
|
168
168
|
color: '#999999',
|
169
169
|
textAlign: 'center',
|
170
170
|
},
|
171
|
-
});
|
171
|
+
});
|
172
|
+
|
173
|
+
export interface PreviewCustomerCenterProps {
|
174
|
+
style?: StyleProp<ViewStyle>;
|
175
|
+
onDismiss?: () => void;
|
176
|
+
}
|
177
|
+
|
178
|
+
export const PreviewCustomerCenter: React.FC<PreviewCustomerCenterProps> = ({
|
179
|
+
style,
|
180
|
+
onDismiss,
|
181
|
+
}) => {
|
182
|
+
const handleClose = () => {
|
183
|
+
onDismiss?.();
|
184
|
+
};
|
185
|
+
|
186
|
+
return (
|
187
|
+
<View style={[styles.container, style]}>
|
188
|
+
<View style={styles.header}>
|
189
|
+
<Text style={[styles.title]}>
|
190
|
+
Preview Customer Center
|
191
|
+
</Text>
|
192
|
+
<TouchableOpacity onPress={handleClose} style={styles.closeButton}>
|
193
|
+
<Text style={styles.closeButtonText}>✕</Text>
|
194
|
+
</TouchableOpacity>
|
195
|
+
</View>
|
196
|
+
|
197
|
+
<View style={styles.content}>
|
198
|
+
<Text style={[styles.notSupportedMessage]}>
|
199
|
+
Web customer center is not supported yet.
|
200
|
+
</Text>
|
201
|
+
<Text style={[styles.fakeMessage]}>
|
202
|
+
This is a fake preview implementation.
|
203
|
+
</Text>
|
204
|
+
<Text style={[styles.previewMode]}>
|
205
|
+
Currently in preview mode
|
206
|
+
</Text>
|
207
|
+
|
208
|
+
<TouchableOpacity style={styles.closePaywallButton} onPress={handleClose}>
|
209
|
+
<Text style={[styles.closePaywallButtonText]}>
|
210
|
+
Close Customer Center
|
211
|
+
</Text>
|
212
|
+
</TouchableOpacity>
|
213
|
+
</View>
|
214
|
+
</View>
|
215
|
+
);
|
216
|
+
};
|