@voyantjs/checkout-ui 0.63.1 → 0.64.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect-payment-dialog.d.ts","sourceRoot":"","sources":["../../src/components/collect-payment-dialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collect-payment-dialog.d.ts","sourceRoot":"","sources":["../../src/components/collect-payment-dialog.tsx"],"names":[],"mappings":"AAkCA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAID,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,SAAS,EACT,SAAS,EACT,YAAY,GACb,EAAE,yBAAyB,2CAiK3B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { useCollectPayment } from "@voyantjs/checkout-react";
|
|
3
|
+
import { useCheckoutPaymentLinkConfig, useCollectPayment } from "@voyantjs/checkout-react";
|
|
4
|
+
import { buildPaymentLinkUrl } from "@voyantjs/finance/payment-link";
|
|
4
5
|
import { useBookingPaymentSchedules, } from "@voyantjs/finance-react";
|
|
5
6
|
import { formatMessage } from "@voyantjs/i18n";
|
|
6
7
|
import { Button } from "@voyantjs/ui/components/button";
|
|
@@ -104,8 +105,13 @@ function formatScheduleOption(schedule, typeLabels) {
|
|
|
104
105
|
}
|
|
105
106
|
function ResultPanel({ result }) {
|
|
106
107
|
const messages = useCheckoutUiMessagesOrDefault().collectPaymentDialog;
|
|
108
|
+
const configQuery = useCheckoutPaymentLinkConfig();
|
|
107
109
|
const sessionId = result.paymentSession?.id ?? null;
|
|
108
|
-
const landingUrl = sessionId && typeof window !== "undefined"
|
|
110
|
+
const landingUrl = sessionId && typeof window !== "undefined"
|
|
111
|
+
? buildPaymentLinkUrl(sessionId, {
|
|
112
|
+
baseUrl: configQuery.data?.publicCheckoutBaseUrl ?? window.location.origin,
|
|
113
|
+
})
|
|
114
|
+
: null;
|
|
109
115
|
if (!landingUrl) {
|
|
110
116
|
return (_jsx("div", { className: "rounded-xl border border-amber-500/40 bg-amber-500/5 p-5 text-sm", children: formatMessage(messages.result.noLink, {
|
|
111
117
|
sessionId: sessionId ?? messages.result.noSession,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/checkout-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.64.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"react": "^19.0.0",
|
|
45
45
|
"react-dom": "^19.0.0",
|
|
46
46
|
"sonner": "^2.0.0",
|
|
47
|
-
"@voyantjs/checkout": "0.
|
|
48
|
-
"@voyantjs/checkout-react": "0.
|
|
49
|
-
"@voyantjs/finance": "0.
|
|
50
|
-
"@voyantjs/finance-react": "0.
|
|
51
|
-
"@voyantjs/i18n": "0.
|
|
52
|
-
"@voyantjs/ui": "0.
|
|
47
|
+
"@voyantjs/checkout": "0.64.1",
|
|
48
|
+
"@voyantjs/checkout-react": "0.64.1",
|
|
49
|
+
"@voyantjs/finance": "0.64.1",
|
|
50
|
+
"@voyantjs/finance-react": "0.64.1",
|
|
51
|
+
"@voyantjs/i18n": "0.64.1",
|
|
52
|
+
"@voyantjs/ui": "0.64.1"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@tanstack/react-query": "^5.100.11",
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"sonner": "^2.0.7",
|
|
62
62
|
"typescript": "^6.0.2",
|
|
63
63
|
"vitest": "^4.1.2",
|
|
64
|
-
"@voyantjs/checkout": "0.
|
|
65
|
-
"@voyantjs/checkout-react": "0.
|
|
66
|
-
"@voyantjs/finance": "0.
|
|
67
|
-
"@voyantjs/finance-react": "0.
|
|
68
|
-
"@voyantjs/i18n": "0.
|
|
69
|
-
"@voyantjs/ui": "0.
|
|
64
|
+
"@voyantjs/checkout": "0.64.1",
|
|
65
|
+
"@voyantjs/checkout-react": "0.64.1",
|
|
66
|
+
"@voyantjs/finance": "0.64.1",
|
|
67
|
+
"@voyantjs/finance-react": "0.64.1",
|
|
68
|
+
"@voyantjs/i18n": "0.64.1",
|
|
69
|
+
"@voyantjs/ui": "0.64.1",
|
|
70
70
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
71
71
|
},
|
|
72
72
|
"files": [
|