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.
@@ -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.31.0'
20
+ spec.dependency "PurchasesHybridCommonUI", '17.33.0'
21
21
  spec.swift_version = '5.7'
22
22
  end
@@ -59,7 +59,7 @@ android {
59
59
  minSdkVersion getExtOrIntegerDefault("minSdkVersion")
60
60
  targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
61
61
  versionCode 1
62
- versionName '9.7.6'
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.31.0'
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 _purchasesTypescriptInternal = require("@revenuecat/purchases-typescript-internal");
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 _purchasesTypescriptInternal.PAYWALL_RESULT.NOT_PRESENTED;
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 _purchasesTypescriptInternal.PAYWALL_RESULT.NOT_PRESENTED;
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":["_purchasesTypescriptInternal","require","previewNativeModuleRNPaywalls","exports","presentPaywall","PAYWALL_RESULT","NOT_PRESENTED","presentPaywallIfNeeded","previewNativeModuleRNCustomerCenter","presentCustomerCenter"],"sourceRoot":"../../../src","sources":["preview/nativeModules.ts"],"mappings":";;;;;;AAAA,IAAAA,4BAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACO,MAAMC,6BAA6B,GAAAC,OAAA,CAAAD,6BAAA,GAAG;EAEzCE,cAAc,EAAEA,CAAA,KAAM;IAClB,OAAOC,2CAAc,CAACC,aAAa;EACvC,CAAC;EAEDC,sBAAsB,EAAEA,CAAA,KAAM;IAC1B,OAAOF,2CAAc,CAACC,aAAa;EACvC;AAEJ,CAAC;AAEM,MAAME,mCAAmC,GAAAL,OAAA,CAAAK,mCAAA,GAAG;EAE/CC,qBAAqB,EAAEA,CAAA,KAAM;IACzB,OAAO,IAAI;EACf;AAEJ,CAAC","ignoreList":[]}
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 { PAYWALL_RESULT } from "@revenuecat/purchases-typescript-internal";
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 PAYWALL_RESULT.NOT_PRESENTED;
7
+ presentPaywall: async (offeringIdentifier, presentedOfferingContext, _displayCloseButton, _fontFamily) => {
8
+ return await PurchasesCommon.getInstance().presentPaywall({
9
+ offeringIdentifier,
10
+ presentedOfferingContext
11
+ });
10
12
  },
11
- presentPaywallIfNeeded: () => {
12
- return PAYWALL_RESULT.NOT_PRESENTED;
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":["PAYWALL_RESULT","previewNativeModuleRNPaywalls","presentPaywall","NOT_PRESENTED","presentPaywallIfNeeded","previewNativeModuleRNCustomerCenter","presentCustomerCenter"],"sourceRoot":"../../../src","sources":["preview/nativeModules.ts"],"mappings":"AAAA,SAASA,cAAc,QAAQ,2CAA2C;;AAE1E;AACA;AACA;AACA;AACA,OAAO,MAAMC,6BAA6B,GAAG;EAEzCC,cAAc,EAAEA,CAAA,KAAM;IAClB,OAAOF,cAAc,CAACG,aAAa;EACvC,CAAC;EAEDC,sBAAsB,EAAEA,CAAA,KAAM;IAC1B,OAAOJ,cAAc,CAACG,aAAa;EACvC;AAEJ,CAAC;AAED,OAAO,MAAME,mCAAmC,GAAG;EAE/CC,qBAAqB,EAAEA,CAAA,KAAM;IACzB,OAAO,IAAI;EACf;AAEJ,CAAC","ignoreList":[]}
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":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAA;AAE1E;;;GAGG;AACH,eAAO,MAAM,6BAA6B;;;CAUzC,CAAA;AAED,eAAO,MAAM,mCAAmC;;CAM/C,CAAA"}
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.7.6",
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.7.6",
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.31.0"
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
- return PAYWALL_RESULT.NOT_PRESENTED
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
- return PAYWALL_RESULT.NOT_PRESENTED
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
  }