react-native-purchases-ui 9.7.6 → 9.8.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 +2 -2
- package/lib/commonjs/preview/nativeModules.js +12 -5
- package/lib/commonjs/preview/nativeModules.js.map +1 -1
- package/lib/module/preview/nativeModules.js +12 -6
- package/lib/module/preview/nativeModules.js.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/preview/nativeModules.d.ts +2 -2
- package/lib/typescript/src/preview/nativeModules.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/index.tsx +2 -2
- package/src/preview/nativeModules.ts +23 -4
package/RNPaywalls.podspec
CHANGED
|
@@ -17,6 +17,6 @@ Pod::Spec.new do |spec|
|
|
|
17
17
|
spec.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
|
|
18
18
|
|
|
19
19
|
spec.dependency "React-Core"
|
|
20
|
-
spec.dependency "PurchasesHybridCommonUI", '17.
|
|
20
|
+
spec.dependency "PurchasesHybridCommonUI", '17.33.0'
|
|
21
21
|
spec.swift_version = '5.7'
|
|
22
22
|
end
|
package/android/build.gradle
CHANGED
|
@@ -59,7 +59,7 @@ android {
|
|
|
59
59
|
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
|
|
60
60
|
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
|
61
61
|
versionCode 1
|
|
62
|
-
versionName '9.
|
|
62
|
+
versionName '9.8.0'
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
buildTypes {
|
|
@@ -91,7 +91,7 @@ dependencies {
|
|
|
91
91
|
//noinspection GradleDynamicVersion
|
|
92
92
|
implementation "com.facebook.react:react-native:+"
|
|
93
93
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
94
|
-
implementation 'com.revenuecat.purchases:purchases-hybrid-common-ui:17.
|
|
94
|
+
implementation 'com.revenuecat.purchases:purchases-hybrid-common-ui:17.33.0'
|
|
95
95
|
implementation 'androidx.compose.ui:ui-android:1.5.4'
|
|
96
96
|
implementation "androidx.appcompat:appcompat:1.6.1"
|
|
97
97
|
}
|
|
@@ -4,17 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.previewNativeModuleRNPaywalls = exports.previewNativeModuleRNCustomerCenter = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _purchasesJsHybridMappings = require("@revenuecat/purchases-js-hybrid-mappings");
|
|
8
8
|
/**
|
|
9
9
|
* Preview implementation of the native module for Preview API mode, i.e. for environments where native modules are not available
|
|
10
10
|
* (like Expo Go).
|
|
11
11
|
*/
|
|
12
12
|
const previewNativeModuleRNPaywalls = exports.previewNativeModuleRNPaywalls = {
|
|
13
|
-
presentPaywall: () => {
|
|
14
|
-
return
|
|
13
|
+
presentPaywall: async (offeringIdentifier, presentedOfferingContext, _displayCloseButton, _fontFamily) => {
|
|
14
|
+
return await _purchasesJsHybridMappings.PurchasesCommon.getInstance().presentPaywall({
|
|
15
|
+
offeringIdentifier,
|
|
16
|
+
presentedOfferingContext
|
|
17
|
+
});
|
|
15
18
|
},
|
|
16
|
-
presentPaywallIfNeeded: () => {
|
|
17
|
-
return
|
|
19
|
+
presentPaywallIfNeeded: async (requiredEntitlementIdentifier, offeringIdentifier, presentedOfferingContext, _displayCloseButton, _fontFamily) => {
|
|
20
|
+
return await _purchasesJsHybridMappings.PurchasesCommon.getInstance().presentPaywall({
|
|
21
|
+
requiredEntitlementIdentifier,
|
|
22
|
+
offeringIdentifier,
|
|
23
|
+
presentedOfferingContext
|
|
24
|
+
});
|
|
18
25
|
}
|
|
19
26
|
};
|
|
20
27
|
const previewNativeModuleRNCustomerCenter = exports.previewNativeModuleRNCustomerCenter = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_purchasesJsHybridMappings","require","previewNativeModuleRNPaywalls","exports","presentPaywall","offeringIdentifier","presentedOfferingContext","_displayCloseButton","_fontFamily","PurchasesCommon","getInstance","presentPaywallIfNeeded","requiredEntitlementIdentifier","previewNativeModuleRNCustomerCenter","presentCustomerCenter"],"sourceRoot":"../../../src","sources":["preview/nativeModules.ts"],"mappings":";;;;;;AAAA,IAAAA,0BAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACO,MAAMC,6BAA6B,GAAAC,OAAA,CAAAD,6BAAA,GAAG;EAEzCE,cAAc,EAAE,MAAAA,CACZC,kBAA2B,EAC3BC,wBAAkD,EAClDC,mBAA6B,EAC7BC,WAA2B,KACD;IAC1B,OAAO,MAAMC,0CAAe,CAACC,WAAW,CAAC,CAAC,CAACN,cAAc,CAAC;MACtDC,kBAAkB;MAClBC;IACJ,CAAC,CAAC;EACN,CAAC;EAEDK,sBAAsB,EAAE,MAAAA,CACpBC,6BAAqC,EACrCP,kBAA2B,EAC3BC,wBAAkD,EAClDC,mBAA6B,EAC7BC,WAA2B,KACD;IAC1B,OAAO,MAAMC,0CAAe,CAACC,WAAW,CAAC,CAAC,CAACN,cAAc,CAAC;MACtDQ,6BAA6B;MAC7BP,kBAAkB;MAClBC;IACJ,CAAC,CAAC;EACN;AAEJ,CAAC;AAEM,MAAMO,mCAAmC,GAAAV,OAAA,CAAAU,mCAAA,GAAG;EAE/CC,qBAAqB,EAAEA,CAAA,KAAM;IACzB,OAAO,IAAI;EACf;AAEJ,CAAC","ignoreList":[]}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { PurchasesCommon } from "@revenuecat/purchases-js-hybrid-mappings";
|
|
3
2
|
/**
|
|
4
3
|
* Preview implementation of the native module for Preview API mode, i.e. for environments where native modules are not available
|
|
5
4
|
* (like Expo Go).
|
|
6
5
|
*/
|
|
7
6
|
export const previewNativeModuleRNPaywalls = {
|
|
8
|
-
presentPaywall: () => {
|
|
9
|
-
return
|
|
7
|
+
presentPaywall: async (offeringIdentifier, presentedOfferingContext, _displayCloseButton, _fontFamily) => {
|
|
8
|
+
return await PurchasesCommon.getInstance().presentPaywall({
|
|
9
|
+
offeringIdentifier,
|
|
10
|
+
presentedOfferingContext
|
|
11
|
+
});
|
|
10
12
|
},
|
|
11
|
-
presentPaywallIfNeeded: () => {
|
|
12
|
-
return
|
|
13
|
+
presentPaywallIfNeeded: async (requiredEntitlementIdentifier, offeringIdentifier, presentedOfferingContext, _displayCloseButton, _fontFamily) => {
|
|
14
|
+
return await PurchasesCommon.getInstance().presentPaywall({
|
|
15
|
+
requiredEntitlementIdentifier,
|
|
16
|
+
offeringIdentifier,
|
|
17
|
+
presentedOfferingContext
|
|
18
|
+
});
|
|
13
19
|
}
|
|
14
20
|
};
|
|
15
21
|
export const previewNativeModuleRNCustomerCenter = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["PurchasesCommon","previewNativeModuleRNPaywalls","presentPaywall","offeringIdentifier","presentedOfferingContext","_displayCloseButton","_fontFamily","getInstance","presentPaywallIfNeeded","requiredEntitlementIdentifier","previewNativeModuleRNCustomerCenter","presentCustomerCenter"],"sourceRoot":"../../../src","sources":["preview/nativeModules.ts"],"mappings":"AAAA,SAASA,eAAe,QAAQ,0CAA0C;AAG1E;AACA;AACA;AACA;AACA,OAAO,MAAMC,6BAA6B,GAAG;EAEzCC,cAAc,EAAE,MAAAA,CACZC,kBAA2B,EAC3BC,wBAAkD,EAClDC,mBAA6B,EAC7BC,WAA2B,KACD;IAC1B,OAAO,MAAMN,eAAe,CAACO,WAAW,CAAC,CAAC,CAACL,cAAc,CAAC;MACtDC,kBAAkB;MAClBC;IACJ,CAAC,CAAC;EACN,CAAC;EAEDI,sBAAsB,EAAE,MAAAA,CACpBC,6BAAqC,EACrCN,kBAA2B,EAC3BC,wBAAkD,EAClDC,mBAA6B,EAC7BC,WAA2B,KACD;IAC1B,OAAO,MAAMN,eAAe,CAACO,WAAW,CAAC,CAAC,CAACL,cAAc,CAAC;MACtDO,6BAA6B;MAC7BN,kBAAkB;MAClBC;IACJ,CAAC,CAAC;EACN;AAEJ,CAAC;AAED,OAAO,MAAMM,mCAAmC,GAAG;EAE/CC,qBAAqB,EAAEA,CAAA,KAAM;IACzB,OAAO,IAAI;EACf;AAEJ,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ export { PAYWALL_RESULT } from "@revenuecat/purchases-typescript-internal";
|
|
|
5
5
|
export interface PresentPaywallParams {
|
|
6
6
|
/**
|
|
7
7
|
* Whether to display the close button or not.
|
|
8
|
-
* Only available for original template paywalls. Ignored for V2 Paywalls.
|
|
8
|
+
* Only available for original template paywalls. Ignored for V2 Paywalls and web.
|
|
9
9
|
*/
|
|
10
10
|
displayCloseButton?: boolean;
|
|
11
11
|
/**
|
|
@@ -21,7 +21,7 @@ export interface PresentPaywallParams {
|
|
|
21
21
|
* - Bold: MyFont_bold.ttf/MyFont_bold.otf
|
|
22
22
|
* - Italic: MyFont_italic.ttf/MyFont_italic.otf
|
|
23
23
|
* - Bold and Italic: MyFont_bold_italic.ttf/MyFont_bold_italic.otf
|
|
24
|
-
* Only available for original template paywalls. Ignored for V2 Paywalls.
|
|
24
|
+
* Only available for original template paywalls. Ignored for V2 Paywalls and web.
|
|
25
25
|
*/
|
|
26
26
|
fontFamily?: string | null;
|
|
27
27
|
}
|
|
@@ -4,8 +4,8 @@ import { PAYWALL_RESULT } from "@revenuecat/purchases-typescript-internal";
|
|
|
4
4
|
* (like Expo Go).
|
|
5
5
|
*/
|
|
6
6
|
export declare const previewNativeModuleRNPaywalls: {
|
|
7
|
-
presentPaywall: () => PAYWALL_RESULT
|
|
8
|
-
presentPaywallIfNeeded: () => PAYWALL_RESULT
|
|
7
|
+
presentPaywall: (offeringIdentifier?: string, presentedOfferingContext?: Record<string, unknown>, _displayCloseButton?: boolean, _fontFamily?: string | null) => Promise<PAYWALL_RESULT>;
|
|
8
|
+
presentPaywallIfNeeded: (requiredEntitlementIdentifier: string, offeringIdentifier?: string, presentedOfferingContext?: Record<string, unknown>, _displayCloseButton?: boolean, _fontFamily?: string | null) => Promise<PAYWALL_RESULT>;
|
|
9
9
|
};
|
|
10
10
|
export declare const previewNativeModuleRNCustomerCenter: {
|
|
11
11
|
presentCustomerCenter: () => null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nativeModules.d.ts","sourceRoot":"","sources":["../../../../src/preview/nativeModules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nativeModules.d.ts","sourceRoot":"","sources":["../../../../src/preview/nativeModules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAA;AAE1E;;;GAGG;AACH,eAAO,MAAM,6BAA6B;0CAGb,MAAM,6BACA,OAAO,MAAM,EAAE,OAAO,CAAC,wBAC5B,OAAO,gBACf,MAAM,GAAG,IAAI,KAC5B,QAAQ,cAAc,CAAC;4DAQS,MAAM,uBAChB,MAAM,6BACA,OAAO,MAAM,EAAE,OAAO,CAAC,wBAC5B,OAAO,gBACf,MAAM,GAAG,IAAI,KAC5B,QAAQ,cAAc,CAAC;CAQ7B,CAAA;AAED,eAAO,MAAM,mCAAmC;;CAM/C,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-purchases-ui",
|
|
3
3
|
"title": "React Native Purchases UI",
|
|
4
|
-
"version": "9.
|
|
4
|
+
"version": "9.8.0",
|
|
5
5
|
"description": "React Native in-app purchases and subscriptions made easy. Supports iOS and Android.",
|
|
6
6
|
"main": "lib/commonjs/index",
|
|
7
7
|
"module": "lib/module/index",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"react": "*",
|
|
80
80
|
"react-native": ">= 0.73.0",
|
|
81
|
-
"react-native-purchases": "9.
|
|
81
|
+
"react-native-purchases": "9.8.0",
|
|
82
82
|
"react-native-web": "*"
|
|
83
83
|
},
|
|
84
84
|
"peerDependenciesMeta": {
|
|
@@ -123,6 +123,6 @@
|
|
|
123
123
|
]
|
|
124
124
|
},
|
|
125
125
|
"dependencies": {
|
|
126
|
-
"@revenuecat/purchases-typescript-internal": "17.
|
|
126
|
+
"@revenuecat/purchases-typescript-internal": "17.33.0"
|
|
127
127
|
}
|
|
128
128
|
}
|
package/src/index.tsx
CHANGED
|
@@ -164,7 +164,7 @@ const InternalPaywallFooterView: React.FC<InternalFooterPaywallViewProps> = ({
|
|
|
164
164
|
export interface PresentPaywallParams {
|
|
165
165
|
/**
|
|
166
166
|
* Whether to display the close button or not.
|
|
167
|
-
* Only available for original template paywalls. Ignored for V2 Paywalls.
|
|
167
|
+
* Only available for original template paywalls. Ignored for V2 Paywalls and web.
|
|
168
168
|
*/
|
|
169
169
|
displayCloseButton?: boolean;
|
|
170
170
|
|
|
@@ -182,7 +182,7 @@ export interface PresentPaywallParams {
|
|
|
182
182
|
* - Bold: MyFont_bold.ttf/MyFont_bold.otf
|
|
183
183
|
* - Italic: MyFont_italic.ttf/MyFont_italic.otf
|
|
184
184
|
* - Bold and Italic: MyFont_bold_italic.ttf/MyFont_bold_italic.otf
|
|
185
|
-
* Only available for original template paywalls. Ignored for V2 Paywalls.
|
|
185
|
+
* Only available for original template paywalls. Ignored for V2 Paywalls and web.
|
|
186
186
|
*/
|
|
187
187
|
fontFamily?: string | null;
|
|
188
188
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PurchasesCommon } from "@revenuecat/purchases-js-hybrid-mappings"
|
|
1
2
|
import { PAYWALL_RESULT } from "@revenuecat/purchases-typescript-internal"
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -6,12 +7,30 @@ import { PAYWALL_RESULT } from "@revenuecat/purchases-typescript-internal"
|
|
|
6
7
|
*/
|
|
7
8
|
export const previewNativeModuleRNPaywalls = {
|
|
8
9
|
|
|
9
|
-
presentPaywall: (
|
|
10
|
-
|
|
10
|
+
presentPaywall: async (
|
|
11
|
+
offeringIdentifier?: string,
|
|
12
|
+
presentedOfferingContext?: Record<string, unknown>,
|
|
13
|
+
_displayCloseButton?: boolean,
|
|
14
|
+
_fontFamily?: string | null,
|
|
15
|
+
): Promise<PAYWALL_RESULT> => {
|
|
16
|
+
return await PurchasesCommon.getInstance().presentPaywall({
|
|
17
|
+
offeringIdentifier,
|
|
18
|
+
presentedOfferingContext,
|
|
19
|
+
}) as PAYWALL_RESULT;
|
|
11
20
|
},
|
|
12
21
|
|
|
13
|
-
presentPaywallIfNeeded: (
|
|
14
|
-
|
|
22
|
+
presentPaywallIfNeeded: async (
|
|
23
|
+
requiredEntitlementIdentifier: string,
|
|
24
|
+
offeringIdentifier?: string,
|
|
25
|
+
presentedOfferingContext?: Record<string, unknown>,
|
|
26
|
+
_displayCloseButton?: boolean,
|
|
27
|
+
_fontFamily?: string | null,
|
|
28
|
+
): Promise<PAYWALL_RESULT> => {
|
|
29
|
+
return await PurchasesCommon.getInstance().presentPaywall({
|
|
30
|
+
requiredEntitlementIdentifier,
|
|
31
|
+
offeringIdentifier,
|
|
32
|
+
presentedOfferingContext,
|
|
33
|
+
}) as PAYWALL_RESULT;
|
|
15
34
|
},
|
|
16
35
|
|
|
17
36
|
}
|