@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.
- package/dist/components/button/ButtonNode.svelte +1 -1
- package/dist/components/package/Package.svelte +3 -3
- package/dist/components/paywall/Paywall.svelte +6 -7
- package/dist/components/purchase-button/PurchaseButton.svelte +1 -1
- package/dist/types/paywall-component-interaction.d.ts +14 -14
- package/package.json +1 -1
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
componentType: "package_selection_sheet",
|
|
128
128
|
componentName: action.sheet?.name ?? props.name,
|
|
129
129
|
componentValue: "open",
|
|
130
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
|
|
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
|
-
|
|
217
|
+
rootSelectedPackageId: $selectedPackageId,
|
|
218
218
|
};
|
|
219
219
|
} else {
|
|
220
220
|
if (sheet) {
|
|
221
|
-
const
|
|
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
|
-
|
|
228
|
-
|
|
226
|
+
currentPackageId: $selectedPackageId,
|
|
227
|
+
resultingPackageId,
|
|
229
228
|
});
|
|
230
|
-
selectedPackageId.set(
|
|
229
|
+
selectedPackageId.set(resultingPackageId);
|
|
231
230
|
}
|
|
232
231
|
sheet = undefined;
|
|
233
232
|
}
|
|
@@ -12,9 +12,9 @@ interface IndexedTransition {
|
|
|
12
12
|
defaultIndex: number;
|
|
13
13
|
}
|
|
14
14
|
interface PackageTransition {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
currentPackageId: string;
|
|
37
|
+
currentProductId?: string;
|
|
38
|
+
resultingPackageId?: string;
|
|
39
|
+
resultingProductId?: string;
|
|
40
40
|
};
|
|
41
41
|
export type PackageSelectionSheetInteractionData = ComponentInteractionBase<"package_selection_sheet"> & {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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"];
|