@voyantjs/checkout-ui 0.62.3 → 0.63.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/collect-payment-dialog.d.ts +5 -7
- package/dist/components/collect-payment-dialog.d.ts.map +1 -1
- package/dist/components/collect-payment-dialog.js +55 -21
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +11 -2
- package/dist/i18n/messages.d.ts +8 -1
- package/dist/i18n/messages.d.ts.map +1 -1
- package/dist/i18n/ro.d.ts.map +1 -1
- package/dist/i18n/ro.js +11 -2
- package/package.json +13 -13
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Operator-side "
|
|
3
|
-
*
|
|
2
|
+
* Operator-side "Generate payment link" dialog. Bookings created via
|
|
3
|
+
* the new booking flow already land in `on_hold`, so the dialog skips
|
|
4
|
+
* the choose-flow step and goes straight to producing a link the
|
|
5
|
+
* operator can share. Optionally pre-fills the amount from a payment
|
|
6
|
+
* schedule (deposit / balance / etc.) when the booking has any.
|
|
4
7
|
*
|
|
5
8
|
* ```tsx
|
|
6
9
|
* <CollectPaymentDialog
|
|
@@ -11,11 +14,6 @@
|
|
|
11
14
|
* defaultAmountCents={booking.sellAmountCents}
|
|
12
15
|
* />
|
|
13
16
|
* ```
|
|
14
|
-
*
|
|
15
|
-
* Capabilities are pinned to `sendLink + bankTransfer` because the
|
|
16
|
-
* operator initiates the collection rather than the customer self-charging
|
|
17
|
-
* a saved card. Verticals that need additional flows (e.g. a "Charge to
|
|
18
|
-
* folio" extra) should compose `<PaymentStep>` directly.
|
|
19
17
|
*/
|
|
20
18
|
export interface CollectPaymentDialogProps {
|
|
21
19
|
open: boolean;
|
|
@@ -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":"AAiCA;;;;;;;;;;;;;;;;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,31 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useCollectPayment } from "@voyantjs/checkout-react";
|
|
4
|
+
import { useBookingPaymentSchedules, } from "@voyantjs/finance-react";
|
|
4
5
|
import { formatMessage } from "@voyantjs/i18n";
|
|
5
6
|
import { Button } from "@voyantjs/ui/components/button";
|
|
6
7
|
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "@voyantjs/ui/components/dialog";
|
|
7
8
|
import { Input } from "@voyantjs/ui/components/input";
|
|
8
9
|
import { Label } from "@voyantjs/ui/components/label";
|
|
10
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@voyantjs/ui/components/select";
|
|
9
11
|
import { CheckCircle2, Copy, ExternalLink, Loader2 } from "lucide-react";
|
|
10
|
-
import { useMemo, useState } from "react";
|
|
12
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
11
13
|
import { toast } from "sonner";
|
|
12
14
|
import { useCheckoutUiMessagesOrDefault } from "../i18n/provider.js";
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Operator dialog defaults to immediate-charge disabled. Templates that
|
|
16
|
-
* have wired a processor with stored-token support can override via
|
|
17
|
-
* `<PaymentStep>` directly; this dialog is the simple "produce a link to
|
|
18
|
-
* share" flow.
|
|
19
|
-
*/
|
|
20
|
-
const CAPABILITIES = {
|
|
21
|
-
chargeSavedCard: false,
|
|
22
|
-
newCard: false,
|
|
23
|
-
};
|
|
15
|
+
const FULL_AMOUNT_VALUE = "__full__";
|
|
24
16
|
export function CollectPaymentDialog({ open, onOpenChange, bookingId, defaultCurrency, defaultAmountCents, defaultPayerEmail, defaultPayerName, defaultPayerLanguage, returnUrl, cancelUrl, cardProvider, }) {
|
|
25
17
|
const messages = useCheckoutUiMessagesOrDefault().collectPaymentDialog;
|
|
26
18
|
const [amountCents, setAmountCents] = useState(defaultAmountCents ?? 0);
|
|
27
|
-
const [
|
|
19
|
+
const [scheduleId, setScheduleId] = useState(FULL_AMOUNT_VALUE);
|
|
28
20
|
const [result, setResult] = useState(null);
|
|
21
|
+
const schedulesQuery = useBookingPaymentSchedules(bookingId, { enabled: open });
|
|
22
|
+
// Only the open schedules are useful pre-fills. Paid / waived /
|
|
23
|
+
// cancelled / expired wouldn't represent money the customer still
|
|
24
|
+
// needs to send.
|
|
25
|
+
const schedules = useMemo(() => (schedulesQuery.data?.data ?? []).filter((s) => s.status === "pending" || s.status === "due"), [schedulesQuery.data?.data]);
|
|
29
26
|
const collect = useCollectPayment(bookingId, {
|
|
30
27
|
cardProvider,
|
|
31
28
|
payerEmail: defaultPayerEmail,
|
|
@@ -35,23 +32,29 @@ export function CollectPaymentDialog({ open, onOpenChange, bookingId, defaultCur
|
|
|
35
32
|
cancelUrl,
|
|
36
33
|
});
|
|
37
34
|
const amountInputValue = useMemo(() => (amountCents > 0 ? (amountCents / 100).toFixed(2) : ""), [amountCents]);
|
|
35
|
+
// Re-seed the amount from the latest props only on the closed→open
|
|
36
|
+
// transition. Watching state mid-flight would clobber manual edits.
|
|
37
|
+
const wasOpenRef = useRef(false);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (open && !wasOpenRef.current) {
|
|
40
|
+
setAmountCents(defaultAmountCents ?? 0);
|
|
41
|
+
setScheduleId(FULL_AMOUNT_VALUE);
|
|
42
|
+
}
|
|
43
|
+
wasOpenRef.current = open;
|
|
44
|
+
}, [open, defaultAmountCents]);
|
|
38
45
|
function reset() {
|
|
39
46
|
setAmountCents(defaultAmountCents ?? 0);
|
|
40
|
-
|
|
47
|
+
setScheduleId(FULL_AMOUNT_VALUE);
|
|
41
48
|
setResult(null);
|
|
42
49
|
collect.reset();
|
|
43
50
|
}
|
|
44
51
|
async function submit() {
|
|
45
|
-
if (!choice || choice.type !== "hold") {
|
|
46
|
-
toast.error(messages.validation.pickHold);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
52
|
if (amountCents <= 0) {
|
|
50
53
|
toast.error(messages.validation.amountAboveZero);
|
|
51
54
|
return;
|
|
52
55
|
}
|
|
53
56
|
try {
|
|
54
|
-
const data = await collect.mutateAsync({ choice, amountCents });
|
|
57
|
+
const data = await collect.mutateAsync({ choice: { type: "hold" }, amountCents });
|
|
55
58
|
setResult(data);
|
|
56
59
|
toast.success(messages.validation.linkReady);
|
|
57
60
|
}
|
|
@@ -63,10 +66,41 @@ export function CollectPaymentDialog({ open, onOpenChange, bookingId, defaultCur
|
|
|
63
66
|
onOpenChange(next);
|
|
64
67
|
if (!next)
|
|
65
68
|
reset();
|
|
66
|
-
}, children: _jsxs(DialogContent, { className: "max-w-xl", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: messages.title }), _jsx(DialogDescription, { children: messages.description })] }), result ? (_jsx(ResultPanel, { result: result })) : (_jsxs("div", { className: "flex flex-col gap-5", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { htmlFor: "collect-
|
|
69
|
+
}, children: _jsxs(DialogContent, { className: "max-w-xl", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: messages.title }), _jsx(DialogDescription, { children: messages.description })] }), result ? (_jsx(ResultPanel, { result: result })) : (_jsxs("div", { className: "flex flex-col gap-5", children: [schedules.length > 0 ? (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { htmlFor: "collect-schedule", children: messages.scheduleLabel }), _jsxs(Select, { value: scheduleId, onValueChange: (v) => {
|
|
70
|
+
const next = v ?? FULL_AMOUNT_VALUE;
|
|
71
|
+
setScheduleId(next);
|
|
72
|
+
if (next === FULL_AMOUNT_VALUE) {
|
|
73
|
+
setAmountCents(defaultAmountCents ?? 0);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
const schedule = schedules.find((s) => s.id === next);
|
|
77
|
+
if (schedule)
|
|
78
|
+
setAmountCents(schedule.amountCents);
|
|
79
|
+
}
|
|
80
|
+
}, children: [_jsx(SelectTrigger, { id: "collect-schedule", children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: FULL_AMOUNT_VALUE, children: formatMessage(messages.scheduleFullAmount, {
|
|
81
|
+
amount: formatAmount(defaultAmountCents ?? 0, defaultCurrency),
|
|
82
|
+
}) }), schedules.map((schedule) => (_jsx(SelectItem, { value: schedule.id, children: formatScheduleOption(schedule, messages.scheduleTypeLabels) }, schedule.id)))] })] }), _jsx("p", { className: "text-muted-foreground text-xs", children: messages.scheduleHelp })] })) : null, _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { htmlFor: "collect-amount", children: formatMessage(messages.amountLabel, { currency: defaultCurrency }) }), _jsx(Input, { id: "collect-amount", type: "number", inputMode: "decimal", step: "0.01", min: "0", value: amountInputValue, onChange: (e) => {
|
|
83
|
+
// Manual edit detaches the amount from the picked
|
|
84
|
+
// schedule so the user can charge a custom amount.
|
|
85
|
+
setScheduleId(FULL_AMOUNT_VALUE);
|
|
67
86
|
const raw = Number.parseFloat(e.target.value);
|
|
68
87
|
setAmountCents(Number.isFinite(raw) ? Math.round(raw * 100) : 0);
|
|
69
|
-
} }), _jsx("p", { className: "text-muted-foreground text-xs", children: messages.amountHelp })] })
|
|
88
|
+
} }), _jsx("p", { className: "text-muted-foreground text-xs", children: messages.amountHelp })] })] })), _jsx(DialogFooter, { children: result ? (_jsx(Button, { onClick: () => onOpenChange(false), children: messages.done })) : (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "outline", onClick: () => onOpenChange(false), disabled: collect.isPending, children: messages.cancel }), _jsxs(Button, { onClick: submit, disabled: collect.isPending || amountCents <= 0, children: [collect.isPending && _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), messages.generateLink] })] })) })] }) }));
|
|
89
|
+
}
|
|
90
|
+
function formatAmount(cents, currency) {
|
|
91
|
+
if (cents <= 0)
|
|
92
|
+
return `0 ${currency}`;
|
|
93
|
+
try {
|
|
94
|
+
return new Intl.NumberFormat(undefined, { style: "currency", currency }).format(cents / 100);
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
return `${(cents / 100).toFixed(2)} ${currency}`;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function formatScheduleOption(schedule, typeLabels) {
|
|
101
|
+
const typeLabel = typeLabels[schedule.scheduleType] ?? schedule.scheduleType;
|
|
102
|
+
const amount = formatAmount(schedule.amountCents, schedule.currency);
|
|
103
|
+
return `${typeLabel} • ${amount} • ${schedule.dueDate}`;
|
|
70
104
|
}
|
|
71
105
|
function ResultPanel({ result }) {
|
|
72
106
|
const messages = useCheckoutUiMessagesOrDefault().collectPaymentDialog;
|
package/dist/i18n/en.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAEvD,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAEvD,eAAO,MAAM,YAAY,EAAE,kBAgI1B,CAAA"}
|
package/dist/i18n/en.js
CHANGED
|
@@ -91,14 +91,23 @@ export const checkoutUiEn = {
|
|
|
91
91
|
},
|
|
92
92
|
collectPaymentDialog: {
|
|
93
93
|
title: "Generate payment link",
|
|
94
|
-
description: "
|
|
94
|
+
description: "Produce a payment link the customer can open to pay by card or bank transfer. Share it however you prefer (email, chat, etc.).",
|
|
95
|
+
scheduleLabel: "Charge",
|
|
96
|
+
scheduleHelp: "Pick a scheduled installment or the full amount. Edit the amount below for a custom charge.",
|
|
97
|
+
scheduleFullAmount: "Full amount ({amount})",
|
|
98
|
+
scheduleTypeLabels: {
|
|
99
|
+
deposit: "Deposit",
|
|
100
|
+
installment: "Installment",
|
|
101
|
+
balance: "Balance",
|
|
102
|
+
hold: "Hold",
|
|
103
|
+
other: "Other",
|
|
104
|
+
},
|
|
95
105
|
amountLabel: "Amount ({currency})",
|
|
96
106
|
amountHelp: "Defaults to the booking's sell amount. Override for a deposit or partial collection.",
|
|
97
107
|
cancel: "Cancel",
|
|
98
108
|
done: "Done",
|
|
99
109
|
generateLink: "Generate link",
|
|
100
110
|
validation: {
|
|
101
|
-
pickHold: "Pick 'Hold - generate payment link' to produce a shareable link.",
|
|
102
111
|
amountAboveZero: "Enter an amount above zero.",
|
|
103
112
|
linkReady: "Payment link ready - copy or share it with the customer.",
|
|
104
113
|
},
|
package/dist/i18n/messages.d.ts
CHANGED
|
@@ -85,13 +85,20 @@ export type CheckoutUiMessages = {
|
|
|
85
85
|
collectPaymentDialog: {
|
|
86
86
|
title: string;
|
|
87
87
|
description: string;
|
|
88
|
+
/** Picker label above the schedule dropdown. */
|
|
89
|
+
scheduleLabel: string;
|
|
90
|
+
/** Caption under the picker. */
|
|
91
|
+
scheduleHelp: string;
|
|
92
|
+
/** "Full amount ({amount})" option label. */
|
|
93
|
+
scheduleFullAmount: string;
|
|
94
|
+
/** Localized labels for each `payment_schedule_type` enum value. */
|
|
95
|
+
scheduleTypeLabels: Record<"deposit" | "installment" | "balance" | "hold" | "other", string>;
|
|
88
96
|
amountLabel: string;
|
|
89
97
|
amountHelp: string;
|
|
90
98
|
cancel: string;
|
|
91
99
|
done: string;
|
|
92
100
|
generateLink: string;
|
|
93
101
|
validation: {
|
|
94
|
-
pickHold: string;
|
|
95
102
|
amountAboveZero: string;
|
|
96
103
|
linkReady: string;
|
|
97
104
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/i18n/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAE/E,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAA;AAE1E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,sBAAsB,EAAE;QACtB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,CAAA;YACb,IAAI,EAAE,MAAM,CAAA;SACb,CAAA;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,MAAM,CAAA;YACnB,SAAS,EAAE,MAAM,CAAA;YACjB,WAAW,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AAE,MAAM,CAAA;SACjB,CAAA;KACF,CAAA;CACF,CAAA"}
|
package/dist/i18n/ro.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ro.d.ts","sourceRoot":"","sources":["../../src/i18n/ro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAEvD,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"ro.d.ts","sourceRoot":"","sources":["../../src/i18n/ro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAEvD,eAAO,MAAM,YAAY,EAAE,kBAiI1B,CAAA"}
|
package/dist/i18n/ro.js
CHANGED
|
@@ -91,14 +91,23 @@ export const checkoutUiRo = {
|
|
|
91
91
|
},
|
|
92
92
|
collectPaymentDialog: {
|
|
93
93
|
title: "Genereaza link de plata",
|
|
94
|
-
description: "
|
|
94
|
+
description: "Genereaza un link de plata pe care clientul il poate deschide pentru plata cu cardul sau transfer bancar. Distribuie-l cum preferi (email, chat etc.).",
|
|
95
|
+
scheduleLabel: "Incaseaza",
|
|
96
|
+
scheduleHelp: "Alege o transa din planul de plata sau suma totala. Editeaza suma de mai jos pentru o incasare personalizata.",
|
|
97
|
+
scheduleFullAmount: "Suma totala ({amount})",
|
|
98
|
+
scheduleTypeLabels: {
|
|
99
|
+
deposit: "Avans",
|
|
100
|
+
installment: "Transa",
|
|
101
|
+
balance: "Sold",
|
|
102
|
+
hold: "Retinere",
|
|
103
|
+
other: "Alta",
|
|
104
|
+
},
|
|
95
105
|
amountLabel: "Suma ({currency})",
|
|
96
106
|
amountHelp: "Implicit este suma de vanzare a rezervarii. Modifica pentru avans sau plata partiala.",
|
|
97
107
|
cancel: "Anuleaza",
|
|
98
108
|
done: "Gata",
|
|
99
109
|
generateLink: "Genereaza link",
|
|
100
110
|
validation: {
|
|
101
|
-
pickHold: "Alege 'Retine - genereaza link de plata' pentru a crea un link distribuibil.",
|
|
102
111
|
amountAboveZero: "Introdu o suma mai mare decat zero.",
|
|
103
112
|
linkReady: "Linkul de plata este gata - copiaza-l sau trimite-l clientului.",
|
|
104
113
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/checkout-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.63.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.63.1",
|
|
48
|
+
"@voyantjs/checkout-react": "0.63.1",
|
|
49
|
+
"@voyantjs/finance": "0.63.1",
|
|
50
|
+
"@voyantjs/finance-react": "0.63.1",
|
|
51
|
+
"@voyantjs/i18n": "0.63.1",
|
|
52
|
+
"@voyantjs/ui": "0.63.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.63.1",
|
|
65
|
+
"@voyantjs/checkout-react": "0.63.1",
|
|
66
|
+
"@voyantjs/finance": "0.63.1",
|
|
67
|
+
"@voyantjs/finance-react": "0.63.1",
|
|
68
|
+
"@voyantjs/i18n": "0.63.1",
|
|
69
|
+
"@voyantjs/ui": "0.63.1",
|
|
70
70
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
71
71
|
},
|
|
72
72
|
"files": [
|