@loczer/storefront-sdk 0.177.0 → 0.179.0
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/chunks/ui/dist/Map/{MapContent-BqCzk6pD.js → MapContent-DUHBHUBa.js} +7 -7
- package/dist/chunks/ui/dist/Map/constants-DlJEohkl.js +4 -0
- package/dist/chunks/ui/dist/{Map-Cqn7INdm.js → Map-_kbTiMe4.js} +7 -7
- package/dist/chunks/ui/dist/Spinner/index-SbbUxcsT.js +48 -0
- package/dist/components/BookingBikeVariantDialog/index.js +12 -12
- package/dist/components/ContractSaleDocument/Invoice.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/Invoice.js +10 -10
- package/dist/components/ContractSaleDocument/InvoiceDetails.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/InvoiceDetails.js +57 -57
- package/dist/components/Map/index.js +1 -1
- package/dist/components/StorefrontCancellationPolicyNotice/index.js +11 -11
- package/dist/components/StorefrontCartPanel/index.js +7 -7
- package/dist/components/TestimonialsSection/index.d.ts.map +1 -1
- package/dist/components/TestimonialsSection/index.js +108 -117
- package/dist/components/payment/MollieCardFieldsForm.d.ts.map +1 -1
- package/dist/components/payment/MollieCardFieldsForm.js +16 -15
- package/dist/components/payment/StripeCardFieldsForm.d.ts.map +1 -1
- package/dist/components/payment/StripeCardFieldsForm.js +11 -10
- package/dist/i18n/en.d.ts +2 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +2 -0
- package/dist/i18n/fr.d.ts +2 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +2 -0
- package/dist/index.d.ts +9 -0
- package/dist/lib/contractSaleDocument.d.ts +2 -0
- package/dist/lib/contractSaleDocument.d.ts.map +1 -1
- package/dist/lib/contractSaleDocument.js +1 -1
- package/dist/lib/contractSaleDocumentApi.d.ts +3 -0
- package/dist/lib/contractSaleDocumentApi.d.ts.map +1 -1
- package/dist/lib/nameInitials.d.ts +3 -0
- package/dist/lib/nameInitials.d.ts.map +1 -0
- package/dist/lib/nameInitials.js +19 -0
- package/dist/pages/CheckoutPaymentPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPaymentPage.js +42 -41
- package/dist/pages/CheckoutSuccessPage.js +11 -11
- package/dist/pages/ContractSaleDocumentPage.d.ts +1 -1
- package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
- package/dist/pages/ContractSaleDocumentPage.js +29 -28
- package/dist/pages/HomePage.js +36 -36
- package/dist/pages/PaymentLinkPage.d.ts.map +1 -1
- package/dist/pages/PaymentLinkPage.js +44 -43
- package/dist/pages/PaymentLinkSuccessPage.d.ts.map +1 -1
- package/dist/pages/PaymentLinkSuccessPage.js +15 -14
- package/dist/pages/ProductPage.js +1 -1
- package/dist/pages/checkout/components/CheckoutCouponCard.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutCouponCard.js +36 -35
- package/dist/pages/checkout/components/CheckoutPaymentCard.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.js +10 -9
- package/dist/storefront.css +1 -1
- package/package.json +3 -2
- package/dist/chunks/ui/dist/Map/constants-AiBwXZf6.js +0 -4
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as u } from "react";
|
|
3
|
-
import { useStripe as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { useStripe as S, useElements as M, CardNumberElement as g, CardExpiryElement as w, CardCvcElement as F } from "@stripe/react-stripe-js";
|
|
4
|
+
import { Spinner as z } from "../../chunks/ui/dist/Spinner/index-SbbUxcsT.js";
|
|
5
|
+
import { CreditCard as j } from "lucide-react";
|
|
6
|
+
import { useTranslation as q } from "react-i18next";
|
|
6
7
|
import { Button as I } from "../../ui/button.js";
|
|
7
|
-
import { Input as
|
|
8
|
+
import { Input as B } from "../../ui/input.js";
|
|
8
9
|
import { Label as m } from "../../ui/label.js";
|
|
9
|
-
function
|
|
10
|
+
function O({
|
|
10
11
|
email: N = "",
|
|
11
12
|
requireEmail: v = !0,
|
|
12
13
|
disabled: h = !1,
|
|
@@ -14,7 +15,7 @@ function K({
|
|
|
14
15
|
submittingLabel: x,
|
|
15
16
|
onSubmit: C
|
|
16
17
|
}) {
|
|
17
|
-
const { t: r } =
|
|
18
|
+
const { t: r } = q(), d = S(), l = M(), [_, E] = u(""), [n, s] = u(!1), [y, a] = u(null);
|
|
18
19
|
return /* @__PURE__ */ t("form", { onSubmit: async (c) => {
|
|
19
20
|
if (c.preventDefault(), !d || !l) {
|
|
20
21
|
a(r("secure_payment_link.errors.stripe_not_ready"));
|
|
@@ -62,7 +63,7 @@ function K({
|
|
|
62
63
|
/* @__PURE__ */ t("div", { className: "space-y-1", children: [
|
|
63
64
|
/* @__PURE__ */ e(m, { htmlFor: "payment-cardholder-name", children: /* @__PURE__ */ e("span", { children: r("secure_payment_link.form.cardholder_name_label") }) }),
|
|
64
65
|
/* @__PURE__ */ e(
|
|
65
|
-
|
|
66
|
+
B,
|
|
66
67
|
{
|
|
67
68
|
id: "payment-cardholder-name",
|
|
68
69
|
value: _,
|
|
@@ -81,7 +82,7 @@ function K({
|
|
|
81
82
|
/* @__PURE__ */ t("div", { className: "grid gap-3 sm:grid-cols-2", children: [
|
|
82
83
|
/* @__PURE__ */ t("div", { className: "space-y-1", children: [
|
|
83
84
|
/* @__PURE__ */ e(m, { htmlFor: "payment-card-expiry", children: /* @__PURE__ */ e("span", { children: r("secure_payment_link.form.card_expiry_label") }) }),
|
|
84
|
-
/* @__PURE__ */ e("div", { className: "rounded-md border border-slate-200 bg-white px-3 py-2", children: /* @__PURE__ */ e(
|
|
85
|
+
/* @__PURE__ */ e("div", { className: "rounded-md border border-slate-200 bg-white px-3 py-2", children: /* @__PURE__ */ e(w, { id: "payment-card-expiry" }) })
|
|
85
86
|
] }),
|
|
86
87
|
/* @__PURE__ */ t("div", { className: "space-y-1", children: [
|
|
87
88
|
/* @__PURE__ */ e(m, { htmlFor: "payment-card-cvc", children: /* @__PURE__ */ e("span", { children: r("secure_payment_link.form.card_cvc_label") }) }),
|
|
@@ -90,11 +91,11 @@ function K({
|
|
|
90
91
|
] }),
|
|
91
92
|
y ? /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: /* @__PURE__ */ e("span", { children: y }) }) : null,
|
|
92
93
|
/* @__PURE__ */ t(I, { type: "submit", disabled: h || n || !d || !l, className: "gap-2", children: [
|
|
93
|
-
n ? /* @__PURE__ */ e(
|
|
94
|
+
n ? /* @__PURE__ */ e(z, { className: "size-4", "aria-hidden": "true" }) : /* @__PURE__ */ e(j, { className: "h-4 w-4", "aria-hidden": "true" }),
|
|
94
95
|
/* @__PURE__ */ e("span", { children: n ? x ?? r("secure_payment_link.form.submitting_button") : k ?? r("secure_payment_link.form.submit_button") })
|
|
95
96
|
] })
|
|
96
97
|
] });
|
|
97
98
|
}
|
|
98
99
|
export {
|
|
99
|
-
|
|
100
|
+
O as StripeCardFieldsForm
|
|
100
101
|
};
|
package/dist/i18n/en.d.ts
CHANGED
|
@@ -203,9 +203,11 @@ export declare const storefront: {
|
|
|
203
203
|
docs_contract_sale_download_pdf_error: string;
|
|
204
204
|
docs_contract_sale_qr_alt: string;
|
|
205
205
|
docs_contract_sale_invoice_title: string;
|
|
206
|
+
docs_contract_sale_quote_title: string;
|
|
206
207
|
docs_contract_sale_credit_note_title: string;
|
|
207
208
|
docs_contract_sale_page_counter: string;
|
|
208
209
|
docs_contract_sale_invoice_date_label: string;
|
|
210
|
+
docs_contract_sale_quote_date_label: string;
|
|
209
211
|
docs_contract_sale_credit_note_date_label: string;
|
|
210
212
|
docs_contract_sale_due_date_label: string;
|
|
211
213
|
docs_contract_sale_invoice_recipient_label: string;
|
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,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuZtB,CAAA"}
|
package/dist/i18n/en.js
CHANGED
|
@@ -203,9 +203,11 @@ const e = {
|
|
|
203
203
|
docs_contract_sale_download_pdf_error: "Unable to download this document PDF.",
|
|
204
204
|
docs_contract_sale_qr_alt: "QR code for the online document link",
|
|
205
205
|
docs_contract_sale_invoice_title: "Invoice",
|
|
206
|
+
docs_contract_sale_quote_title: "Quote",
|
|
206
207
|
docs_contract_sale_credit_note_title: "Credit note",
|
|
207
208
|
docs_contract_sale_page_counter: "Page {{current_page}} of {{total_pages}}",
|
|
208
209
|
docs_contract_sale_invoice_date_label: "Invoice Date:",
|
|
210
|
+
docs_contract_sale_quote_date_label: "Quote Date:",
|
|
209
211
|
docs_contract_sale_credit_note_date_label: "Credit Note Date:",
|
|
210
212
|
docs_contract_sale_due_date_label: "Due Date:",
|
|
211
213
|
docs_contract_sale_invoice_recipient_label: "Bill To:",
|
package/dist/i18n/fr.d.ts
CHANGED
|
@@ -203,9 +203,11 @@ export declare const storefront: {
|
|
|
203
203
|
docs_contract_sale_download_pdf_error: string;
|
|
204
204
|
docs_contract_sale_qr_alt: string;
|
|
205
205
|
docs_contract_sale_invoice_title: string;
|
|
206
|
+
docs_contract_sale_quote_title: string;
|
|
206
207
|
docs_contract_sale_credit_note_title: string;
|
|
207
208
|
docs_contract_sale_page_counter: string;
|
|
208
209
|
docs_contract_sale_invoice_date_label: string;
|
|
210
|
+
docs_contract_sale_quote_date_label: string;
|
|
209
211
|
docs_contract_sale_credit_note_date_label: string;
|
|
210
212
|
docs_contract_sale_due_date_label: string;
|
|
211
213
|
docs_contract_sale_invoice_recipient_label: string;
|
package/dist/i18n/fr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuZtB,CAAA"}
|
package/dist/i18n/fr.js
CHANGED
|
@@ -203,9 +203,11 @@ const e = {
|
|
|
203
203
|
docs_contract_sale_download_pdf_error: "Impossible de télécharger le PDF de ce document.",
|
|
204
204
|
docs_contract_sale_qr_alt: "QR code du lien du document en ligne",
|
|
205
205
|
docs_contract_sale_invoice_title: "Facture",
|
|
206
|
+
docs_contract_sale_quote_title: "Devis",
|
|
206
207
|
docs_contract_sale_credit_note_title: "Avoir",
|
|
207
208
|
docs_contract_sale_page_counter: "Page {{current_page}} sur {{total_pages}}",
|
|
208
209
|
docs_contract_sale_invoice_date_label: "Date de facture :",
|
|
210
|
+
docs_contract_sale_quote_date_label: "Date du devis :",
|
|
209
211
|
docs_contract_sale_credit_note_date_label: "Date de l'avoir :",
|
|
210
212
|
docs_contract_sale_due_date_label: "Date d'échéance :",
|
|
211
213
|
docs_contract_sale_invoice_recipient_label: "Facturé à :",
|
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export declare const acceptContractSaleDocumentResponseSchema: z.ZodObject<{
|
|
|
54
54
|
document: z.ZodOptional<z.ZodObject<{
|
|
55
55
|
id: z.ZodString;
|
|
56
56
|
kind: z.ZodEnum<{
|
|
57
|
+
quote: "quote";
|
|
57
58
|
invoice: "invoice";
|
|
58
59
|
credit_note: "credit_note";
|
|
59
60
|
}>;
|
|
@@ -948,6 +949,7 @@ export declare const contractSaleDocumentApiAcceptanceSchema: z.ZodObject<{
|
|
|
948
949
|
export declare const contractSaleDocumentApiSchema: z.ZodObject<{
|
|
949
950
|
id: z.ZodString;
|
|
950
951
|
kind: z.ZodEnum<{
|
|
952
|
+
quote: "quote";
|
|
951
953
|
invoice: "invoice";
|
|
952
954
|
credit_note: "credit_note";
|
|
953
955
|
}>;
|
|
@@ -1094,6 +1096,7 @@ export declare type ContractSaleDocumentData = z.infer<typeof contractSaleDocume
|
|
|
1094
1096
|
export declare type ContractSaleDocumentKind = z.infer<typeof contractSaleDocumentKindSchema>;
|
|
1095
1097
|
|
|
1096
1098
|
export declare const contractSaleDocumentKindSchema: z.ZodEnum<{
|
|
1099
|
+
quote: "quote";
|
|
1097
1100
|
invoice: "invoice";
|
|
1098
1101
|
credit_note: "credit_note";
|
|
1099
1102
|
}>;
|
|
@@ -1163,6 +1166,7 @@ export declare const contractSaleDocumentReferenceTypeSchema: z.ZodEnum<{
|
|
|
1163
1166
|
export declare const contractSaleDocumentSchema: z.ZodObject<{
|
|
1164
1167
|
id: z.ZodString;
|
|
1165
1168
|
kind: z.ZodEnum<{
|
|
1169
|
+
quote: "quote";
|
|
1166
1170
|
invoice: "invoice";
|
|
1167
1171
|
credit_note: "credit_note";
|
|
1168
1172
|
}>;
|
|
@@ -1604,6 +1608,7 @@ export declare const getContractSaleDocumentResponseSchema: z.ZodObject<{
|
|
|
1604
1608
|
document: z.ZodOptional<z.ZodObject<{
|
|
1605
1609
|
id: z.ZodString;
|
|
1606
1610
|
kind: z.ZodEnum<{
|
|
1611
|
+
quote: "quote";
|
|
1607
1612
|
invoice: "invoice";
|
|
1608
1613
|
credit_note: "credit_note";
|
|
1609
1614
|
}>;
|
|
@@ -3647,9 +3652,11 @@ export declare const storefrontEn: {
|
|
|
3647
3652
|
docs_contract_sale_download_pdf_error: string;
|
|
3648
3653
|
docs_contract_sale_qr_alt: string;
|
|
3649
3654
|
docs_contract_sale_invoice_title: string;
|
|
3655
|
+
docs_contract_sale_quote_title: string;
|
|
3650
3656
|
docs_contract_sale_credit_note_title: string;
|
|
3651
3657
|
docs_contract_sale_page_counter: string;
|
|
3652
3658
|
docs_contract_sale_invoice_date_label: string;
|
|
3659
|
+
docs_contract_sale_quote_date_label: string;
|
|
3653
3660
|
docs_contract_sale_credit_note_date_label: string;
|
|
3654
3661
|
docs_contract_sale_due_date_label: string;
|
|
3655
3662
|
docs_contract_sale_invoice_recipient_label: string;
|
|
@@ -4085,9 +4092,11 @@ export declare const storefrontFr: {
|
|
|
4085
4092
|
docs_contract_sale_download_pdf_error: string;
|
|
4086
4093
|
docs_contract_sale_qr_alt: string;
|
|
4087
4094
|
docs_contract_sale_invoice_title: string;
|
|
4095
|
+
docs_contract_sale_quote_title: string;
|
|
4088
4096
|
docs_contract_sale_credit_note_title: string;
|
|
4089
4097
|
docs_contract_sale_page_counter: string;
|
|
4090
4098
|
docs_contract_sale_invoice_date_label: string;
|
|
4099
|
+
docs_contract_sale_quote_date_label: string;
|
|
4091
4100
|
docs_contract_sale_credit_note_date_label: string;
|
|
4092
4101
|
docs_contract_sale_due_date_label: string;
|
|
4093
4102
|
docs_contract_sale_invoice_recipient_label: string;
|
|
@@ -74,6 +74,7 @@ export declare const contractSaleDocumentAcceptanceRecordSchema: z.ZodDiscrimina
|
|
|
74
74
|
date: z.ZodDate;
|
|
75
75
|
}, z.core.$strip>], "mode">;
|
|
76
76
|
export declare const contractSaleDocumentKindSchema: z.ZodEnum<{
|
|
77
|
+
quote: "quote";
|
|
77
78
|
invoice: "invoice";
|
|
78
79
|
credit_note: "credit_note";
|
|
79
80
|
}>;
|
|
@@ -98,6 +99,7 @@ export declare const contractSaleDocumentLanguageSchema: z.ZodObject<{
|
|
|
98
99
|
export declare const contractSaleDocumentSchema: z.ZodObject<{
|
|
99
100
|
id: z.ZodString;
|
|
100
101
|
kind: z.ZodEnum<{
|
|
102
|
+
quote: "quote";
|
|
101
103
|
invoice: "invoice";
|
|
102
104
|
credit_note: "credit_note";
|
|
103
105
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractSaleDocument.d.ts","sourceRoot":"","sources":["../../src/lib/contractSaleDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,iCAAiC,aAA2B,CAAA;AAEzE,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;iBAM5C,CAAA;AAEF,eAAO,MAAM,kCAAkC;;;;;iBAK7C,CAAA;AAEF,eAAO,MAAM,qCAAqC;;;;;;iBAMhD,CAAA;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;iBAG1C,CAAA;AAEF,eAAO,MAAM,yCAAyC;;;;EAA8C,C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AC7F,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAC3F,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAA;AACnG,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AACvF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAA;AAC3G,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAA;AACjG,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA;AAC/F,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,CAAA;AAC7G,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AACrF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAA;AACrG,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA"}
|
|
@@ -32,7 +32,7 @@ const o = t.string().trim().min(1), n = t.object({
|
|
|
32
32
|
}), d = t.discriminatedUnion("mode", [
|
|
33
33
|
l,
|
|
34
34
|
u
|
|
35
|
-
]), g = t.enum(["invoice", "credit_note"]), e = t.enum(["fr", "en"]), p = t.object({
|
|
35
|
+
]), g = t.enum(["quote", "invoice", "credit_note"]), e = t.enum(["fr", "en"]), p = t.object({
|
|
36
36
|
legal: e,
|
|
37
37
|
customer: e,
|
|
38
38
|
translation: e.optional()
|
|
@@ -41,6 +41,7 @@ export type ContractSaleDocumentApiAcceptanceRecord = z.infer<typeof contractSal
|
|
|
41
41
|
export declare const contractSaleDocumentApiSchema: z.ZodObject<{
|
|
42
42
|
id: z.ZodString;
|
|
43
43
|
kind: z.ZodEnum<{
|
|
44
|
+
quote: "quote";
|
|
44
45
|
invoice: "invoice";
|
|
45
46
|
credit_note: "credit_note";
|
|
46
47
|
}>;
|
|
@@ -194,6 +195,7 @@ export declare const getContractSaleDocumentResponseSchema: z.ZodObject<{
|
|
|
194
195
|
document: z.ZodOptional<z.ZodObject<{
|
|
195
196
|
id: z.ZodString;
|
|
196
197
|
kind: z.ZodEnum<{
|
|
198
|
+
quote: "quote";
|
|
197
199
|
invoice: "invoice";
|
|
198
200
|
credit_note: "credit_note";
|
|
199
201
|
}>;
|
|
@@ -332,6 +334,7 @@ export declare const acceptContractSaleDocumentResponseSchema: z.ZodObject<{
|
|
|
332
334
|
document: z.ZodOptional<z.ZodObject<{
|
|
333
335
|
id: z.ZodString;
|
|
334
336
|
kind: z.ZodEnum<{
|
|
337
|
+
quote: "quote";
|
|
335
338
|
invoice: "invoice";
|
|
336
339
|
credit_note: "credit_note";
|
|
337
340
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractSaleDocumentApi.d.ts","sourceRoot":"","sources":["../../src/lib/contractSaleDocumentApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAqBvB,eAAO,MAAM,uCAAuC;;;EAA8B,CAAA;AAClF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAA;AAEvG,eAAO,MAAM,mCAAmC;;;;;;;;iBAK9C,CAAA;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA;AAE/F,eAAO,MAAM,uCAAuC;;;iBAElD,CAAA;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAA;AAEvG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AAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAA;AAEvG,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKnD,CAAA;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nameInitials.d.ts","sourceRoot":"","sources":["../../src/lib/nameInitials.ts"],"names":[],"mappings":"AAOA,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAYrD;AAED,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIlE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { splitGraphemes as s } from "unicode-segmenter/grapheme";
|
|
2
|
+
function i(r) {
|
|
3
|
+
return Array.from(s(r));
|
|
4
|
+
}
|
|
5
|
+
function o(r) {
|
|
6
|
+
if (!r) return "?";
|
|
7
|
+
const t = r.trim().split(/[\s-]+/).filter(Boolean);
|
|
8
|
+
if (t.length === 0) return "?";
|
|
9
|
+
const e = i(t[0]), n = t.length > 1 ? i(t[t.length - 1])[0] : e[1];
|
|
10
|
+
return `${e[0] ?? ""}${n ?? ""}`.toUpperCase() || "?";
|
|
11
|
+
}
|
|
12
|
+
function p(r) {
|
|
13
|
+
const t = i(r.trim()).slice(0, 2);
|
|
14
|
+
return t.length === 0 ? "?" : t.map((e) => `${e}.`).join(" ");
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
p as formatInitialsWithPeriods,
|
|
18
|
+
o as getNameInitials
|
|
19
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutPaymentPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPaymentPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CheckoutPaymentPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPaymentPage.tsx"],"names":[],"mappings":"AAmGA,MAAM,CAAC,OAAO,UAAU,mBAAmB,4CA0V1C"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { useState as f, useRef as j, useEffect as
|
|
2
|
+
import { useState as f, useRef as j, useEffect as L, useMemo as K } from "react";
|
|
3
3
|
import { toast as G } from "@rpcbase/client";
|
|
4
4
|
import { useParams as J, useNavigate as Q, useSearchParams as V, Link as N } from "@rpcbase/router";
|
|
5
5
|
import { loadStripe as W } from "@stripe/stripe-js";
|
|
6
6
|
import { Elements as Z, useStripe as ee } from "@stripe/react-stripe-js";
|
|
7
|
-
import {
|
|
7
|
+
import { Spinner as te } from "../chunks/ui/dist/Spinner/index-SbbUxcsT.js";
|
|
8
|
+
import { AlertTriangle as O, ShieldCheck as re, CheckCircle2 as se, XCircle as ne, CircleDashed as ce, ArrowRight as ae } from "lucide-react";
|
|
8
9
|
import { useTranslation as E } from "react-i18next";
|
|
9
10
|
import { apiPost as ie } from "../lib/apiCall.js";
|
|
10
11
|
import { ROUTE as oe, responseSchema as le } from "../lib/checkoutPaymentSession.js";
|
|
@@ -14,9 +15,9 @@ import { MollieCardFieldsForm as de } from "../components/payment/MollieCardFiel
|
|
|
14
15
|
import { StripeCardFieldsForm as pe } from "../components/payment/StripeCardFieldsForm.js";
|
|
15
16
|
import { Button as S } from "../ui/button.js";
|
|
16
17
|
import { Card as y } from "../ui/card.js";
|
|
17
|
-
const he = {}, _e = () => he?.RB_PUBLIC_STRIPE_PUBLISHABLE_KEY?.trim() ?? "", fe = _e(), ye = 20, xe = 2500, ge = (t, u,
|
|
18
|
+
const he = {}, _e = () => he?.RB_PUBLIC_STRIPE_PUBLISHABLE_KEY?.trim() ?? "", fe = _e(), ye = 20, xe = 2500, ge = (t, u, c) => {
|
|
18
19
|
try {
|
|
19
|
-
return new Intl.NumberFormat(
|
|
20
|
+
return new Intl.NumberFormat(c, {
|
|
20
21
|
style: "currency",
|
|
21
22
|
currency: u.toUpperCase()
|
|
22
23
|
}).format(t / 100);
|
|
@@ -28,16 +29,16 @@ function ke({
|
|
|
28
29
|
clientSecret: t,
|
|
29
30
|
onSuccess: u
|
|
30
31
|
}) {
|
|
31
|
-
const { t:
|
|
32
|
+
const { t: c } = E(), _ = ee();
|
|
32
33
|
return /* @__PURE__ */ e(
|
|
33
34
|
pe,
|
|
34
35
|
{
|
|
35
36
|
requireEmail: !1,
|
|
36
|
-
submitLabel:
|
|
37
|
-
submittingLabel:
|
|
37
|
+
submitLabel: c("checkout_payment_authorize_button"),
|
|
38
|
+
submittingLabel: c("checkout_payment_authorizing_button"),
|
|
38
39
|
onSubmit: async ({ paymentMethodId: x }) => {
|
|
39
40
|
if (!_)
|
|
40
|
-
throw new Error(
|
|
41
|
+
throw new Error(c("secure_payment_link.errors.stripe_not_ready"));
|
|
41
42
|
const m = await _.confirmCardPayment(
|
|
42
43
|
t,
|
|
43
44
|
{
|
|
@@ -45,10 +46,10 @@ function ke({
|
|
|
45
46
|
}
|
|
46
47
|
);
|
|
47
48
|
if (m.error)
|
|
48
|
-
throw new Error(m.error.message ??
|
|
49
|
+
throw new Error(m.error.message ?? c("secure_payment_link.errors.payment_failed"));
|
|
49
50
|
const r = m.paymentIntent?.status;
|
|
50
51
|
if (r !== "succeeded" && r !== "processing" && r !== "requires_capture")
|
|
51
|
-
throw new Error(
|
|
52
|
+
throw new Error(c("secure_payment_link.errors.payment_failed"));
|
|
52
53
|
u();
|
|
53
54
|
}
|
|
54
55
|
}
|
|
@@ -57,42 +58,42 @@ function ke({
|
|
|
57
58
|
function be() {
|
|
58
59
|
const { t } = E();
|
|
59
60
|
return /* @__PURE__ */ n("div", { className: "flex min-h-48 items-center justify-center gap-2 text-sm text-slate-600", children: [
|
|
60
|
-
/* @__PURE__ */ e(
|
|
61
|
+
/* @__PURE__ */ e(te, { className: "size-4", "aria-hidden": "true" }),
|
|
61
62
|
/* @__PURE__ */ e("span", { children: t("secure_payment_link.form.loading_session") })
|
|
62
63
|
] });
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
-
const { t, i18n: u } = E(), { storeSlug:
|
|
65
|
+
function Fe() {
|
|
66
|
+
const { t, i18n: u } = E(), { storeSlug: c } = J(), _ = Q(), { clear: x } = me(), [m] = V(), [r, d] = f(null), [q, g] = f(!0), [I, k] = f(null), [D, X] = f(0), [A, U] = f(0), b = j(!1), l = j(null), p = m.get("checkout_session_id")?.trim() ?? "", $ = new URLSearchParams(m.toString());
|
|
66
67
|
$.delete("checkout_session_id");
|
|
67
|
-
const h = ue($).toString(), v = `/${
|
|
68
|
-
if (!
|
|
68
|
+
const h = ue($).toString(), v = `/${c ?? ""}/checkout${h ? `?${h}` : ""}`, P = `/${c ?? ""}/checkout/success${h ? `?${h}` : ""}`, R = async (a) => {
|
|
69
|
+
if (!c || !p)
|
|
69
70
|
throw new Error(t("checkout_payment_return_missing_session"));
|
|
70
71
|
const s = await ie(
|
|
71
72
|
oe,
|
|
72
73
|
{
|
|
73
|
-
storeSlug:
|
|
74
|
+
storeSlug: c,
|
|
74
75
|
checkoutSessionId: p,
|
|
75
76
|
returnSearch: h || void 0,
|
|
76
|
-
cardToken:
|
|
77
|
+
cardToken: a
|
|
77
78
|
}
|
|
78
79
|
);
|
|
79
80
|
return le.parse(s);
|
|
80
81
|
}, C = async () => {
|
|
81
82
|
b.current || (b.current = !0, G.success(t("checkout_success_toast")), await _(P, { replace: !0 }), x());
|
|
82
83
|
};
|
|
83
|
-
|
|
84
|
+
L(() => {
|
|
84
85
|
b.current = !1, l.current = null, d(null), g(!0), U(0);
|
|
85
|
-
}, [p]),
|
|
86
|
-
if (!
|
|
86
|
+
}, [p]), L(() => {
|
|
87
|
+
if (!c || !p) {
|
|
87
88
|
l.current = null, d(null), k(t("checkout_payment_return_missing_session")), g(!1);
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
|
-
let
|
|
91
|
+
let a = !1;
|
|
91
92
|
const s = l.current === null;
|
|
92
93
|
return g(s), k(null), (async () => {
|
|
93
94
|
try {
|
|
94
95
|
const i = await R();
|
|
95
|
-
if (
|
|
96
|
+
if (a) return;
|
|
96
97
|
if (!i.success) {
|
|
97
98
|
l.current = null, d(null), k(i.message || t("checkout_payment_return_status_error"));
|
|
98
99
|
return;
|
|
@@ -101,31 +102,31 @@ function Be() {
|
|
|
101
102
|
const F = i.paymentStatus;
|
|
102
103
|
(F === "authorized" || F === "succeeded") && !b.current && await C();
|
|
103
104
|
} catch (i) {
|
|
104
|
-
if (
|
|
105
|
+
if (a) return;
|
|
105
106
|
console.error("Failed to fetch checkout payment session", i), l.current = null, d(null), k(t("checkout_payment_return_status_error"));
|
|
106
107
|
} finally {
|
|
107
|
-
!
|
|
108
|
+
!a && s && g(!1);
|
|
108
109
|
}
|
|
109
110
|
})(), () => {
|
|
110
|
-
|
|
111
|
+
a = !0;
|
|
111
112
|
};
|
|
112
|
-
}, [p, x, _, h, D,
|
|
113
|
+
}, [p, x, _, h, D, c, P, t]);
|
|
113
114
|
const o = r?.paymentStatus ?? "pending";
|
|
114
|
-
|
|
115
|
+
L(() => {
|
|
115
116
|
if (o !== "pending" || r?.providerType === "stripe_connect_oauth" || A >= ye || !r?.payment?.id) return;
|
|
116
|
-
const
|
|
117
|
+
const a = window.setTimeout(() => {
|
|
117
118
|
U((s) => s + 1), X((s) => s + 1);
|
|
118
119
|
}, xe);
|
|
119
120
|
return () => {
|
|
120
|
-
window.clearTimeout(
|
|
121
|
+
window.clearTimeout(a);
|
|
121
122
|
};
|
|
122
123
|
}, [o, A, r?.payment?.id, r?.providerType]);
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
return !
|
|
124
|
+
const z = K(() => {
|
|
125
|
+
const a = r?.stripePublishableKey?.trim() || fe;
|
|
126
|
+
return !a || !r?.stripeAccountId ? null : W(a, {
|
|
126
127
|
stripeAccount: r.stripeAccountId
|
|
127
128
|
});
|
|
128
|
-
}, [r?.stripeAccountId, r?.stripePublishableKey]),
|
|
129
|
+
}, [r?.stripeAccountId, r?.stripePublishableKey]), M = K(() => {
|
|
129
130
|
if (r?.clientSecret)
|
|
130
131
|
return {
|
|
131
132
|
clientSecret: r.clientSecret
|
|
@@ -149,11 +150,11 @@ function Be() {
|
|
|
149
150
|
] }),
|
|
150
151
|
/* @__PURE__ */ e(N, { to: v, children: /* @__PURE__ */ e(S, { variant: "outline", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_return_back_to_checkout") }) }) })
|
|
151
152
|
] }) }) });
|
|
152
|
-
const B = typeof r.amountMinor == "number" && r.currency ? ge(r.amountMinor, r.currency, u.language) : null, w = o === "authorized" || o === "succeeded",
|
|
153
|
+
const B = typeof r.amountMinor == "number" && r.currency ? ge(r.amountMinor, r.currency, u.language) : null, w = o === "authorized" || o === "succeeded", T = o === "failed" || o === "cancelled", Y = w ? se : T ? ne : ce, H = w ? "text-success" : T ? "text-destructive" : "text-warning";
|
|
153
154
|
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-5xl px-4 py-10 sm:px-6", children: /* @__PURE__ */ n("div", { className: "grid gap-6 lg:grid-cols-[1fr_1fr]", children: [
|
|
154
155
|
/* @__PURE__ */ e(y, { className: "border-slate-200 bg-white p-5 shadow-sm", children: /* @__PURE__ */ n("div", { className: "space-y-5", children: [
|
|
155
|
-
/* @__PURE__ */ n("div", { className: "inline-flex items-center gap-2 rounded-full border border-
|
|
156
|
-
/* @__PURE__ */ e(
|
|
156
|
+
/* @__PURE__ */ n("div", { className: "inline-flex items-center gap-2 rounded-full border border-success-border bg-success-subtle px-3 py-1 text-xs font-medium text-success", children: [
|
|
157
|
+
/* @__PURE__ */ e(re, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
|
|
157
158
|
/* @__PURE__ */ e("span", { children: t("secure_payment_link.secured_badge") })
|
|
158
159
|
] }),
|
|
159
160
|
/* @__PURE__ */ n("div", { children: [
|
|
@@ -171,7 +172,7 @@ function Be() {
|
|
|
171
172
|
] }) : null
|
|
172
173
|
] })
|
|
173
174
|
] }) }),
|
|
174
|
-
/* @__PURE__ */ e(y, { className: "border-slate-200 bg-white p-5 shadow-sm", children: w ||
|
|
175
|
+
/* @__PURE__ */ e(y, { className: "border-slate-200 bg-white p-5 shadow-sm", children: w || T ? /* @__PURE__ */ n("div", { className: "space-y-6 text-center", children: [
|
|
175
176
|
/* @__PURE__ */ e("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-slate-100", children: /* @__PURE__ */ e(Y, { className: `h-6 w-6 ${H}`, "aria-hidden": "true" }) }),
|
|
176
177
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
177
178
|
/* @__PURE__ */ e("h2", { className: "text-xl font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: t(`secure_payment_link.success_titles.${o}`) }) }),
|
|
@@ -191,8 +192,8 @@ function Be() {
|
|
|
191
192
|
testmode: r.testmode === !0,
|
|
192
193
|
submitLabel: t("checkout_payment_authorize_button"),
|
|
193
194
|
submittingLabel: t("checkout_payment_authorizing_button"),
|
|
194
|
-
onSubmit: async (
|
|
195
|
-
const s = await R(
|
|
195
|
+
onSubmit: async (a) => {
|
|
196
|
+
const s = await R(a);
|
|
196
197
|
if (!s.success)
|
|
197
198
|
throw new Error(s.message || t("secure_payment_link.errors.payment_failed"));
|
|
198
199
|
if (l.current = s, d(s), s.paymentStatus === "authorized" || s.paymentStatus === "succeeded") {
|
|
@@ -206,7 +207,7 @@ function Be() {
|
|
|
206
207
|
}
|
|
207
208
|
}
|
|
208
209
|
) : /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: /* @__PURE__ */ e("span", { children: t("secure_payment_link.errors.session_failed") }) })
|
|
209
|
-
] }) : r.providerType === "stripe_connect_oauth" ? !r.clientSecret || !
|
|
210
|
+
] }) : r.providerType === "stripe_connect_oauth" ? !r.clientSecret || !z || !M ? /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: /* @__PURE__ */ e("span", { children: t("secure_payment_link.errors.missing_publishable_key") }) }) : /* @__PURE__ */ e(Z, { stripe: z, options: M, children: /* @__PURE__ */ e(
|
|
210
211
|
ke,
|
|
211
212
|
{
|
|
212
213
|
clientSecret: r.clientSecret,
|
|
@@ -218,5 +219,5 @@ function Be() {
|
|
|
218
219
|
] }) });
|
|
219
220
|
}
|
|
220
221
|
export {
|
|
221
|
-
|
|
222
|
+
Fe as default
|
|
222
223
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { useParams as m, useSearchParams as h, Link as a } from "@rpcbase/router";
|
|
3
|
-
import { CheckCircle2 as
|
|
3
|
+
import { CheckCircle2 as u, ArrowRight as d } from "lucide-react";
|
|
4
4
|
import { useTranslation as x } from "react-i18next";
|
|
5
5
|
import { resolveBookingSearchParamsFromSessionStorage as p } from "../lib/booking.js";
|
|
6
6
|
import { Button as o } from "../ui/button.js";
|
|
7
|
-
function
|
|
8
|
-
const { t: s } = x(), { storeSlug:
|
|
9
|
-
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */ e("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-
|
|
7
|
+
function N() {
|
|
8
|
+
const { t: s } = x(), { storeSlug: c } = m(), [i] = h(), t = p(i, c).toString(), l = `/${c ?? ""}/booking${t ? `?${t}` : ""}`, n = `/${c ?? ""}${t ? `?${t}` : ""}`;
|
|
9
|
+
return /* @__PURE__ */ e("div", { className: "mx-auto max-w-3xl px-4 py-14 sm:px-6", children: /* @__PURE__ */ r("div", { className: "rounded-xl border border-slate-200 bg-white p-5 shadow-sm sm:p-6", children: [
|
|
10
|
+
/* @__PURE__ */ e("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-success-subtle text-success", children: /* @__PURE__ */ e(u, { className: "h-6 w-6", "aria-hidden": "true" }) }),
|
|
11
11
|
/* @__PURE__ */ e("h1", { className: "mt-6 text-center text-2xl font-semibold tracking-tight text-slate-950", children: /* @__PURE__ */ e("span", { children: s("checkout_success_title") }) }),
|
|
12
12
|
/* @__PURE__ */ e("p", { className: "mt-2 text-center text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: s("checkout_success_description") }) }),
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */ e(a, { to:
|
|
15
|
-
/* @__PURE__ */ e(a, { to: n, children: /* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ r("div", { className: "mt-8 flex flex-col gap-3 sm:flex-row sm:justify-center", children: [
|
|
14
|
+
/* @__PURE__ */ e(a, { to: l, children: /* @__PURE__ */ e(o, { variant: "outline", className: "w-full sm:w-auto", children: /* @__PURE__ */ e("span", { children: s("checkout_success_back_to_products") }) }) }),
|
|
15
|
+
/* @__PURE__ */ e(a, { to: n, children: /* @__PURE__ */ r(o, { className: "w-full gap-2 sm:w-auto", children: [
|
|
16
16
|
/* @__PURE__ */ e("span", { children: s("checkout_success_back_home") }),
|
|
17
|
-
/* @__PURE__ */ e(
|
|
17
|
+
/* @__PURE__ */ e(d, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
18
18
|
] }) })
|
|
19
19
|
] })
|
|
20
20
|
] }) });
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
N as default
|
|
24
24
|
};
|
|
@@ -15,7 +15,7 @@ export declare const loader: ({ ctx, params }: import('@rpcbase/client').LoaderA
|
|
|
15
15
|
documentLanguage: StorefrontI18nLanguage | null;
|
|
16
16
|
document: {
|
|
17
17
|
id: string;
|
|
18
|
-
kind: "invoice" | "credit_note";
|
|
18
|
+
kind: "quote" | "invoice" | "credit_note";
|
|
19
19
|
saleDocumentNumber: string;
|
|
20
20
|
currency: string;
|
|
21
21
|
issuer: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractSaleDocumentPage.d.ts","sourceRoot":"","sources":["../../src/pages/ContractSaleDocumentPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContractSaleDocumentPage.d.ts","sourceRoot":"","sources":["../../src/pages/ContractSaleDocumentPage.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAmC,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAsLnG,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEA,CAAA;AAYnB,MAAM,CAAC,OAAO,UAAU,wBAAwB,4CAqP/C"}
|