@revenuecat/purchases-ui-js 3.11.4 → 3.11.5

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.
@@ -127,7 +127,7 @@
127
127
  componentType: "package_selection_sheet",
128
128
  componentName: action.sheet?.name ?? props.name,
129
129
  componentValue: "open",
130
- currentPackageIdentifier: $selectedPackageId,
130
+ currentPackageId: $selectedPackageId,
131
131
  });
132
132
 
133
133
  const onclick = () => {
@@ -55,9 +55,9 @@
55
55
  componentType: "package",
56
56
  componentName: name,
57
57
  componentValue: package_id,
58
- originPackageIdentifier: originPackageId,
59
- destinationPackageIdentifier: package_id,
60
- defaultPackageIdentifier: defaultPackageId,
58
+ originPackageId,
59
+ destinationPackageId: package_id,
60
+ defaultPackageId,
61
61
  });
62
62
  };
63
63
 
@@ -165,7 +165,7 @@
165
165
 
166
166
  let sheet = $state<{
167
167
  props: SheetProps;
168
- rootSelectedPackageIdentifier?: string;
168
+ rootSelectedPackageId?: string;
169
169
  }>();
170
170
 
171
171
  const onButtonAction = (action: Action, actionId?: string) => {
@@ -214,20 +214,19 @@
214
214
  if (action.sheet) {
215
215
  sheet = {
216
216
  props: action.sheet,
217
- rootSelectedPackageIdentifier: $selectedPackageId,
217
+ rootSelectedPackageId: $selectedPackageId,
218
218
  };
219
219
  } else {
220
220
  if (sheet) {
221
- const resultingPackageIdentifier =
222
- sheet.rootSelectedPackageIdentifier;
221
+ const resultingPackageId = sheet.rootSelectedPackageId;
223
222
  emitComponentInteraction({
224
223
  componentType: "package_selection_sheet",
225
224
  componentName: sheet.props.name,
226
225
  componentValue: "close",
227
- currentPackageIdentifier: $selectedPackageId,
228
- resultingPackageIdentifier,
226
+ currentPackageId: $selectedPackageId,
227
+ resultingPackageId,
229
228
  });
230
- selectedPackageId.set(resultingPackageIdentifier);
229
+ selectedPackageId.set(resultingPackageId);
231
230
  }
232
231
  sheet = undefined;
233
232
  }
@@ -59,7 +59,7 @@
59
59
  componentName: props.name,
60
60
  componentValue: resolvedMethodType ?? props.action ?? "web_checkout",
61
61
  ...(componentURL ? { componentURL } : {}),
62
- currentPackageIdentifier: packageId,
62
+ currentPackageId: packageId,
63
63
  };
64
64
  };
65
65
 
@@ -12,9 +12,9 @@ interface IndexedTransition {
12
12
  defaultIndex: number;
13
13
  }
14
14
  interface PackageTransition {
15
- originPackageIdentifier?: string;
16
- destinationPackageIdentifier: string;
17
- defaultPackageIdentifier?: string;
15
+ originPackageId?: string;
16
+ destinationPackageId: string;
17
+ defaultPackageId?: string;
18
18
  }
19
19
  type ButtonInteractionValue = "workflow" | "navigate_to_url" | "navigate_back" | "restore_purchases" | "navigate_to_customer_center" | "screen_redirect" | "navigate_to_privacy_policy" | "navigate_to_terms" | "navigate_to_sheet" | "navigate_to_offer_code" | "navigate_to_web_paywall_link";
20
20
  export type TabInteractionData = ComponentInteractionBase<"tab"> & IndexedTransition;
@@ -27,22 +27,22 @@ export type TextInteractionData = ComponentInteractionBase<"text", "navigate_to_
27
27
  componentURL: string;
28
28
  };
29
29
  export type PackageInteractionData = ComponentInteractionBase<"package"> & PackageTransition & {
30
- originProductIdentifier?: string;
31
- destinationProductIdentifier?: string;
32
- defaultProductIdentifier?: string;
30
+ originProductId?: string;
31
+ destinationProductId?: string;
32
+ defaultProductId?: string;
33
33
  };
34
34
  export type PurchaseButtonInteractionData = ComponentInteractionBase<"purchase_button", PurchaseButtonMethod["type"]> & {
35
35
  componentURL?: string;
36
- currentPackageIdentifier: string;
37
- currentProductIdentifier?: string;
38
- resultingPackageIdentifier?: string;
39
- resultingProductIdentifier?: string;
36
+ currentPackageId: string;
37
+ currentProductId?: string;
38
+ resultingPackageId?: string;
39
+ resultingProductId?: string;
40
40
  };
41
41
  export type PackageSelectionSheetInteractionData = ComponentInteractionBase<"package_selection_sheet"> & {
42
- currentPackageIdentifier?: string;
43
- resultingPackageIdentifier?: string;
44
- currentProductIdentifier?: string;
45
- resultingProductIdentifier?: string;
42
+ currentPackageId?: string;
43
+ resultingPackageId?: string;
44
+ currentProductId?: string;
45
+ resultingProductId?: string;
46
46
  };
47
47
  export type ComponentInteractionData = TabInteractionData | SwitchInteractionData | CarouselInteractionData | ButtonInteractionData | TextInteractionData | PackageInteractionData | PurchaseButtonInteractionData | PackageSelectionSheetInteractionData;
48
48
  export type ComponentInteractionType = ComponentInteractionData["componentType"];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@revenuecat/purchases-ui-js",
3
3
  "description": "Web components for Paywalls. Powered by RevenueCat",
4
4
  "private": false,
5
- "version": "3.11.4",
5
+ "version": "3.11.5",
6
6
  "author": {
7
7
  "name": "RevenueCat, Inc."
8
8
  },