@revenuecat/purchases-ui-js 4.7.0 → 4.7.1
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/workflows/Screen.svelte +13 -3
- package/dist/components/workflows/Screen.svelte.d.ts +3 -0
- package/dist/components/workflows/Workflow.svelte +9 -0
- package/dist/components/workflows/Workflow.svelte.d.ts +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -39,6 +39,9 @@
|
|
|
39
39
|
onCompleteWorkflowNavigate?: (
|
|
40
40
|
args: CompleteWorkflowNavigateArgs,
|
|
41
41
|
) => void | Promise<void>;
|
|
42
|
+
onNavigateToUrlClicked?: (url: string) => void;
|
|
43
|
+
onRestorePurchasesClicked?: () => void;
|
|
44
|
+
onVisitCustomerCenterClicked?: () => void;
|
|
42
45
|
walletButtonRender?: WalletButtonRender;
|
|
43
46
|
safeAreaFallbackColor?: ColorScheme | null;
|
|
44
47
|
}
|
|
@@ -60,6 +63,9 @@
|
|
|
60
63
|
onInputChanged,
|
|
61
64
|
onReservedAttributeChanged,
|
|
62
65
|
onCompleteWorkflowNavigate,
|
|
66
|
+
onNavigateToUrlClicked,
|
|
67
|
+
onRestorePurchasesClicked,
|
|
68
|
+
onVisitCustomerCenterClicked,
|
|
63
69
|
walletButtonRender,
|
|
64
70
|
safeAreaFallbackColor,
|
|
65
71
|
}: Props = $props();
|
|
@@ -76,14 +82,18 @@
|
|
|
76
82
|
{maxContentWidth}
|
|
77
83
|
{initialInputSelections}
|
|
78
84
|
onNavigateToUrlClicked={(url: string) => {
|
|
79
|
-
|
|
85
|
+
if (onNavigateToUrlClicked) {
|
|
86
|
+
onNavigateToUrlClicked(url);
|
|
87
|
+
} else {
|
|
88
|
+
window.open(url, "_blank");
|
|
89
|
+
}
|
|
80
90
|
}}
|
|
81
91
|
{onCompleteWorkflowNavigate}
|
|
82
|
-
onVisitCustomerCenterClicked={() =>
|
|
92
|
+
onVisitCustomerCenterClicked={() => onVisitCustomerCenterClicked?.()}
|
|
83
93
|
{onBackClicked}
|
|
84
94
|
{onNavigateToPage}
|
|
85
95
|
{onClose}
|
|
86
|
-
onRestorePurchasesClicked={() =>
|
|
96
|
+
onRestorePurchasesClicked={() => onRestorePurchasesClicked?.()}
|
|
87
97
|
onActionTriggered={(actionId: string) => {
|
|
88
98
|
onActionTriggered?.(actionId);
|
|
89
99
|
}}
|
|
@@ -25,6 +25,9 @@ interface Props {
|
|
|
25
25
|
onInputChanged?: (fieldId: string, value: string, actionId?: string) => void;
|
|
26
26
|
onReservedAttributeChanged?: (reservedAttribute: ReservedAttribute, value: string) => void;
|
|
27
27
|
onCompleteWorkflowNavigate?: (args: CompleteWorkflowNavigateArgs) => void | Promise<void>;
|
|
28
|
+
onNavigateToUrlClicked?: (url: string) => void;
|
|
29
|
+
onRestorePurchasesClicked?: () => void;
|
|
30
|
+
onVisitCustomerCenterClicked?: () => void;
|
|
28
31
|
walletButtonRender?: WalletButtonRender;
|
|
29
32
|
safeAreaFallbackColor?: ColorScheme | null;
|
|
30
33
|
}
|
|
@@ -38,6 +38,9 @@
|
|
|
38
38
|
onCompleteWorkflowNavigate?: (
|
|
39
39
|
args: CompleteWorkflowNavigateArgs,
|
|
40
40
|
) => void | Promise<void>;
|
|
41
|
+
onNavigateToUrlClicked?: (url: string) => void;
|
|
42
|
+
onRestorePurchasesClicked?: () => void;
|
|
43
|
+
onVisitCustomerCenterClicked?: () => void;
|
|
41
44
|
onComponentInteraction?: OnComponentInteraction;
|
|
42
45
|
onClose?: () => void;
|
|
43
46
|
onExitBack?: () => void;
|
|
@@ -59,6 +62,9 @@
|
|
|
59
62
|
onInputChanged,
|
|
60
63
|
onReservedAttributeChanged,
|
|
61
64
|
onCompleteWorkflowNavigate,
|
|
65
|
+
onNavigateToUrlClicked,
|
|
66
|
+
onRestorePurchasesClicked,
|
|
67
|
+
onVisitCustomerCenterClicked,
|
|
62
68
|
onComponentInteraction,
|
|
63
69
|
onClose,
|
|
64
70
|
onExitBack,
|
|
@@ -122,6 +128,9 @@
|
|
|
122
128
|
{onInputChanged}
|
|
123
129
|
{onReservedAttributeChanged}
|
|
124
130
|
{onCompleteWorkflowNavigate}
|
|
131
|
+
{onNavigateToUrlClicked}
|
|
132
|
+
{onRestorePurchasesClicked}
|
|
133
|
+
{onVisitCustomerCenterClicked}
|
|
125
134
|
{onComponentInteraction}
|
|
126
135
|
onNavigateToPage={handleNavigateToPage}
|
|
127
136
|
onBackClicked={handleBackClicked}
|
|
@@ -23,6 +23,9 @@ interface Props {
|
|
|
23
23
|
onInputChanged?: (fieldId: string, value: string, actionId?: string) => void;
|
|
24
24
|
onReservedAttributeChanged?: (reservedAttribute: ReservedAttribute, value: string) => void;
|
|
25
25
|
onCompleteWorkflowNavigate?: (args: CompleteWorkflowNavigateArgs) => void | Promise<void>;
|
|
26
|
+
onNavigateToUrlClicked?: (url: string) => void;
|
|
27
|
+
onRestorePurchasesClicked?: () => void;
|
|
28
|
+
onVisitCustomerCenterClicked?: () => void;
|
|
26
29
|
onComponentInteraction?: OnComponentInteraction;
|
|
27
30
|
onClose?: () => void;
|
|
28
31
|
onExitBack?: () => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export { type WorkflowData, type WorkflowStep } from "./types/workflow";
|
|
|
22
22
|
export { type InitialInputSelections } from "./stores/inputValidation";
|
|
23
23
|
export { type UIConfig } from "./types/ui-config";
|
|
24
24
|
export { type WalletButtonRender, type WalletButtonTheme, } from "./types/wallet";
|
|
25
|
-
export { type CustomVariables, CustomVariableValue, type VariableDictionary, type PackageInfo, } from "./types/variables";
|
|
25
|
+
export { type CustomVariables, CustomVariableValue, mergeCustomVariables, type VariableDictionary, type PackageInfo, } from "./types/variables";
|
|
26
26
|
export type { CompleteWorkflowNavigateArgs, CompleteWorkflowUrlQueryParams, } from "./types/components/button";
|
|
27
27
|
export * from "./ui/globals";
|
|
28
28
|
export { default as Button } from "./ui/molecules/button.svelte";
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,6 @@ export {} from "./types/workflow";
|
|
|
23
23
|
export {} from "./stores/inputValidation";
|
|
24
24
|
export {} from "./types/ui-config";
|
|
25
25
|
export {} from "./types/wallet";
|
|
26
|
-
export { CustomVariableValue, } from "./types/variables";
|
|
26
|
+
export { CustomVariableValue, mergeCustomVariables, } from "./types/variables";
|
|
27
27
|
export * from "./ui/globals";
|
|
28
28
|
export { default as Button } from "./ui/molecules/button.svelte";
|