@loczer/storefront-sdk 0.229.0 → 0.231.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/StorefrontContext.d.ts +0 -2
- package/dist/StorefrontContext.d.ts.map +1 -1
- package/dist/StorefrontProvider.d.ts +0 -1
- package/dist/StorefrontProvider.d.ts.map +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/{base-booking-C9kJFMIu.js → base-booking-BJXFzDM5.js} +0 -2
- package/dist/chunks/pkg/booking-engine/dist/schemas/{cart-inputs-epi7FXIk.js → cart-inputs-3lBblkB0.js} +0 -10
- package/dist/chunks/pkg/booking-engine/dist/{schemas-DW5gdDYz.js → schemas-JjiUWFIv.js} +2 -2
- package/dist/components/BookingBikeQuickAddCard/index.d.ts +3 -1
- package/dist/components/BookingBikeQuickAddCard/index.d.ts.map +1 -1
- package/dist/components/BookingBikeQuickAddCard/index.js +97 -85
- package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
- package/dist/components/BookingBikeVariantDialog/index.js +9 -7
- package/dist/components/ContractSaleDocument/InvoiceDetails.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/InvoiceDetails.js +126 -138
- package/dist/components/Footer/businessHoursStatus.js +1 -1
- package/dist/components/LanguageSelector/index.js +1 -1
- package/dist/components/StorefrontCartPanel/index.js +1 -1
- package/dist/i18n/en.d.ts +1 -4
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +2 -5
- package/dist/i18n/fr.d.ts +1 -4
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +3 -6
- package/dist/index.d.ts +14 -35
- package/dist/index.js +3 -3
- package/dist/lib/booking-period.js +1 -1
- package/dist/lib/booking.d.ts +6 -6
- package/dist/lib/booking.d.ts.map +1 -1
- package/dist/lib/booking.js +21 -21
- package/dist/lib/checkoutSubmit.d.ts +2 -6
- package/dist/lib/checkoutSubmit.d.ts.map +1 -1
- package/dist/lib/checkoutSubmit.js +3 -11
- package/dist/lib/pricing.js +1 -1
- package/dist/lib/storefrontAvailability.d.ts +12 -8
- package/dist/lib/storefrontAvailability.d.ts.map +1 -1
- package/dist/lib/storefrontAvailability.js +17 -7
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/BookingPage.js +202 -204
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +23 -25
- package/dist/pages/HomePage.js +8 -8
- package/dist/pages/ProductPage.d.ts.map +1 -1
- package/dist/pages/ProductPage.js +187 -181
- package/dist/pages/checkout/components/CheckoutDetailsCard.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutDetailsCard.js +4 -17
- package/dist/pages/checkout/types.d.ts +1 -2
- package/dist/pages/checkout/types.d.ts.map +1 -1
- package/dist/pages/checkout/types.js +1 -2
- package/dist/storefront.css +1 -1
- package/dist/storefrontSchemas.d.ts +0 -2
- package/dist/storefrontSchemas.d.ts.map +1 -1
- package/dist/storefrontSchemas.js +1 -2
- package/package.json +1 -1
|
@@ -8,7 +8,13 @@ function s(e) {
|
|
|
8
8
|
let t = e?.trim() ?? "";
|
|
9
9
|
return !t || t === "-" ? "" : t;
|
|
10
10
|
}
|
|
11
|
-
function c(e, t
|
|
11
|
+
function c(e, t) {
|
|
12
|
+
let n = e?.trim() ?? "";
|
|
13
|
+
if (!n) return "";
|
|
14
|
+
let r = t?.trim() ?? "", i = n.replace(/[^a-z\d]/gi, "").toLowerCase(), a = r.replace(/[^a-z\d]/gi, "").toLowerCase();
|
|
15
|
+
return !a || i.includes(a) ? n : `${n} ${r}`;
|
|
16
|
+
}
|
|
17
|
+
function l(e, t, n) {
|
|
12
18
|
let r = t.trim().toUpperCase();
|
|
13
19
|
try {
|
|
14
20
|
return new Intl.NumberFormat(n, {
|
|
@@ -19,7 +25,7 @@ function c(e, t, n) {
|
|
|
19
25
|
return `${e.toFixed(2)} ${r}`;
|
|
20
26
|
}
|
|
21
27
|
}
|
|
22
|
-
function
|
|
28
|
+
function u(e, t, n) {
|
|
23
29
|
let r = e instanceof Date ? e : new Date(e);
|
|
24
30
|
if (Number.isNaN(r.getTime())) return "-";
|
|
25
31
|
try {
|
|
@@ -35,9 +41,9 @@ function l(e, t, n) {
|
|
|
35
41
|
}).format(r);
|
|
36
42
|
}
|
|
37
43
|
}
|
|
38
|
-
function
|
|
39
|
-
let { t:
|
|
40
|
-
let n =
|
|
44
|
+
function d({ saleDocument: d, items: f, subtotal: p, tax: m, total: h, formatDate: g, documentLanguage: _, showInvoiceMeta: v = !0, showTotalsSection: y = !0, showNotesSection: b = !0, showAcceptanceSection: x = !0, documentQrCodeUrl: S, compact: C = !1 }) {
|
|
45
|
+
let { t: w } = a(), T = (t, n = {}) => e(w, _, t, n), E = (e, n = {}) => t(w, _, e, n), D = (e, t = {}) => {
|
|
46
|
+
let n = T(e, t), a = n.indexOf(" / ");
|
|
41
47
|
return a === -1 ? /* @__PURE__ */ r("span", { children: n }) : /* @__PURE__ */ i("span", {
|
|
42
48
|
className: "inline-flex flex-col text-left leading-snug",
|
|
43
49
|
children: [/* @__PURE__ */ r("span", { children: n.slice(0, a) }), /* @__PURE__ */ r("span", {
|
|
@@ -45,196 +51,178 @@ function u({ saleDocument: u, items: d, subtotal: f, tax: p, total: m, formatDat
|
|
|
45
51
|
children: n.slice(a + 3)
|
|
46
52
|
})]
|
|
47
53
|
});
|
|
48
|
-
},
|
|
49
|
-
O.description ? {
|
|
50
|
-
key: "description",
|
|
51
|
-
label: T("docs_contract_sale_legal_description_label"),
|
|
52
|
-
value: O.description
|
|
53
|
-
} : null,
|
|
54
|
-
O.companyRegistrationNumber ? {
|
|
55
|
-
key: "company-registration",
|
|
56
|
-
label: T("docs_contract_sale_legal_company_registration_label"),
|
|
57
|
-
value: O.companyRegistrationNumber
|
|
58
|
-
} : null,
|
|
59
|
-
O.establishmentRegistrationNumber ? {
|
|
60
|
-
key: "establishment-registration",
|
|
61
|
-
label: T("docs_contract_sale_legal_establishment_registration_label"),
|
|
62
|
-
value: O.establishmentRegistrationNumber
|
|
63
|
-
} : null,
|
|
64
|
-
O.vatNumber ? {
|
|
65
|
-
key: "vat-number",
|
|
66
|
-
label: T("docs_contract_sale_legal_vat_number_label"),
|
|
67
|
-
value: O.vatNumber
|
|
68
|
-
} : null,
|
|
69
|
-
O.tradeRegister ? {
|
|
70
|
-
key: "trade-register",
|
|
71
|
-
label: T("docs_contract_sale_legal_trade_register_label"),
|
|
72
|
-
value: O.tradeRegister
|
|
73
|
-
} : null
|
|
74
|
-
].filter((e) => e !== null) : [], N = s(u.recipient.address), P = u.recipient.email?.trim() ?? "", F = u.kind === "credit_note", I = w(F ? "docs_contract_sale_credit_note_title" : u.kind === "quote" ? "docs_contract_sale_quote_title" : "docs_contract_sale_invoice_title"), L = w(F ? "docs_contract_sale_credit_note_date_label" : u.kind === "quote" ? "docs_contract_sale_quote_date_label" : "docs_contract_sale_invoice_date_label"), R = w(F ? "docs_contract_sale_credit_note_recipient_label" : "docs_contract_sale_invoice_recipient_label"), z = F ? -1 : 1;
|
|
54
|
+
}, O = !y && !b && !x, k = d.issuer.legalIdentity, A = k?.legalName?.trim() || d.issuer.name, j = s(k?.registeredAddress || d.issuer.address), M = c(k?.tradeRegister, k?.companyRegistrationNumber), N = [k?.description?.trim(), M].filter((e) => !!e).join(", "), P = k?.vatNumber?.trim() ?? "", F = d.recipient.legalIdentity, I = F?.legalName?.trim() || d.recipient.name, L = s(F?.registeredAddress || d.recipient.address), R = c(F?.tradeRegister, F?.companyRegistrationNumber), z = [F?.description?.trim(), R].filter((e) => !!e).join(", "), B = F?.companyRegistrationNumber?.trim() ?? "", V = F?.establishmentRegistrationNumber?.trim() ?? "", H = F?.vatNumber?.trim() ?? "", U = d.recipient.email?.trim() ?? "", W = d.kind === "credit_note", G = T(W ? "docs_contract_sale_credit_note_title" : d.kind === "quote" ? "docs_contract_sale_quote_title" : "docs_contract_sale_invoice_title"), K = g(d.date), q = g(d.dueDate), J = d.kind === "invoice" && K === q, Y = T(W ? "docs_contract_sale_credit_note_date_label" : d.kind === "quote" ? "docs_contract_sale_quote_date_label" : J ? "docs_contract_sale_invoice_and_due_date_label" : "docs_contract_sale_invoice_date_label"), X = T(W ? "docs_contract_sale_credit_note_recipient_label" : "docs_contract_sale_invoice_recipient_label"), Z = W ? -1 : 1;
|
|
75
55
|
return /* @__PURE__ */ i("main", {
|
|
76
56
|
className: "flex flex-grow flex-col px-4 md:px-8",
|
|
77
57
|
children: [
|
|
78
|
-
|
|
79
|
-
className: o("grid",
|
|
58
|
+
v && /* @__PURE__ */ i("header", {
|
|
59
|
+
className: o("grid", C ? "mb-4 gap-3" : "mb-8 gap-6"),
|
|
80
60
|
children: [/* @__PURE__ */ i("div", {
|
|
81
|
-
className: o("grid md:grid-cols-2",
|
|
61
|
+
className: o("grid md:grid-cols-2", C ? "gap-3 md:gap-4" : "gap-6 md:gap-8"),
|
|
82
62
|
children: [/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ i("h1", {
|
|
83
|
-
className: o("flex flex-wrap items-baseline gap-x-2 gap-y-1 font-semibold text-foreground",
|
|
84
|
-
children: [/* @__PURE__ */ r("span", { children:
|
|
63
|
+
className: o("flex flex-wrap items-baseline gap-x-2 gap-y-1 font-semibold text-foreground", C ? "text-lg" : "text-xl"),
|
|
64
|
+
children: [/* @__PURE__ */ r("span", { children: G }), /* @__PURE__ */ i("span", {
|
|
85
65
|
className: "font-normal text-muted-foreground",
|
|
86
|
-
children: ["#",
|
|
66
|
+
children: ["#", d.saleDocumentNumber]
|
|
87
67
|
})]
|
|
88
|
-
}),
|
|
89
|
-
className: o(
|
|
68
|
+
}), S === void 0 ? null : /* @__PURE__ */ r("div", {
|
|
69
|
+
className: o(C ? "mt-2 h-16 w-16" : "mt-4 h-24 w-24"),
|
|
90
70
|
"data-testid": "contract-sale-document-public-url-qr-container",
|
|
91
|
-
children:
|
|
92
|
-
src:
|
|
93
|
-
alt:
|
|
71
|
+
children: S ? /* @__PURE__ */ r("img", {
|
|
72
|
+
src: S,
|
|
73
|
+
alt: w("docs_contract_sale_qr_alt"),
|
|
94
74
|
className: "block h-full w-full",
|
|
95
75
|
"data-testid": "contract-sale-document-public-url-qr"
|
|
96
76
|
}) : null
|
|
97
77
|
})] }), /* @__PURE__ */ i("div", {
|
|
98
|
-
className: o("md:text-right",
|
|
78
|
+
className: o("md:text-right", C ? "text-[13px] leading-[18px]" : "text-sm"),
|
|
99
79
|
children: [/* @__PURE__ */ i("div", {
|
|
100
|
-
className: "mb-2",
|
|
80
|
+
className: o(!J && "mb-2"),
|
|
101
81
|
children: [/* @__PURE__ */ r("p", {
|
|
102
82
|
className: "font-semibold text-foreground",
|
|
103
|
-
children:
|
|
83
|
+
children: Y
|
|
104
84
|
}), /* @__PURE__ */ r("p", {
|
|
105
85
|
className: "text-muted-foreground",
|
|
106
|
-
children:
|
|
86
|
+
children: K
|
|
107
87
|
})]
|
|
108
|
-
}), /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("p", {
|
|
88
|
+
}), J ? null : /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("p", {
|
|
109
89
|
className: "font-semibold text-foreground",
|
|
110
|
-
children:
|
|
90
|
+
children: T("docs_contract_sale_due_date_label")
|
|
111
91
|
}), /* @__PURE__ */ r("p", {
|
|
112
92
|
className: "text-muted-foreground",
|
|
113
|
-
children:
|
|
93
|
+
children: q
|
|
114
94
|
})] })]
|
|
115
95
|
})]
|
|
116
96
|
}), /* @__PURE__ */ i("div", {
|
|
117
|
-
className: o("grid md:grid-cols-2",
|
|
118
|
-
children: [
|
|
119
|
-
|
|
97
|
+
className: o("grid md:grid-cols-2", C ? "gap-3 md:gap-4" : "gap-6 md:gap-8"),
|
|
98
|
+
children: [/* @__PURE__ */ i("div", {
|
|
99
|
+
className: o(C ? "text-[13px] leading-[18px]" : "text-sm"),
|
|
100
|
+
"data-testid": k ? "contract-sale-document-issuer-legal-identity" : void 0,
|
|
101
|
+
children: [
|
|
120
102
|
/* @__PURE__ */ r("h2", {
|
|
121
|
-
className:
|
|
122
|
-
children: k
|
|
123
|
-
}),
|
|
124
|
-
A ? /* @__PURE__ */ r("p", {
|
|
125
|
-
className: "text-xs text-muted-foreground",
|
|
103
|
+
className: "font-semibold text-primary",
|
|
126
104
|
children: A
|
|
105
|
+
}),
|
|
106
|
+
N ? /* @__PURE__ */ r("p", {
|
|
107
|
+
className: "whitespace-nowrap text-muted-foreground",
|
|
108
|
+
children: N
|
|
109
|
+
}) : null,
|
|
110
|
+
P ? /* @__PURE__ */ i("p", {
|
|
111
|
+
className: "flex items-baseline gap-1 text-muted-foreground",
|
|
112
|
+
children: [/* @__PURE__ */ i("span", { children: [E("docs_contract_sale_legal_vat_number_label"), ":"] }), /* @__PURE__ */ r("span", { children: P })]
|
|
127
113
|
}) : null,
|
|
128
114
|
j ? /* @__PURE__ */ r("p", {
|
|
129
115
|
className: "text-muted-foreground whitespace-pre-line",
|
|
130
116
|
children: j
|
|
131
117
|
}) : null
|
|
132
|
-
]
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}) :
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
className: "
|
|
159
|
-
children: [/* @__PURE__ */
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
118
|
+
]
|
|
119
|
+
}), /* @__PURE__ */ i("div", {
|
|
120
|
+
className: o("md:text-right", C ? "text-[13px] leading-[18px]" : "text-sm"),
|
|
121
|
+
"data-testid": F ? "contract-sale-document-recipient-legal-identity" : void 0,
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ r("h3", {
|
|
124
|
+
className: "mb-2 font-semibold text-foreground",
|
|
125
|
+
children: X
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ r("p", {
|
|
128
|
+
className: "font-medium text-foreground",
|
|
129
|
+
children: I
|
|
130
|
+
}),
|
|
131
|
+
z ? /* @__PURE__ */ r("p", {
|
|
132
|
+
className: "text-muted-foreground",
|
|
133
|
+
children: z
|
|
134
|
+
}) : null,
|
|
135
|
+
!R && B ? /* @__PURE__ */ i("p", {
|
|
136
|
+
className: "text-muted-foreground",
|
|
137
|
+
children: [/* @__PURE__ */ i("span", { children: [E("docs_contract_sale_legal_company_registration_label"), ":"] }), /* @__PURE__ */ i("span", { children: [" ", B] })]
|
|
138
|
+
}) : null,
|
|
139
|
+
V ? /* @__PURE__ */ i("p", {
|
|
140
|
+
className: "text-muted-foreground",
|
|
141
|
+
children: [/* @__PURE__ */ i("span", { children: [E("docs_contract_sale_legal_establishment_registration_label"), ":"] }), /* @__PURE__ */ i("span", { children: [" ", V] })]
|
|
142
|
+
}) : null,
|
|
143
|
+
H ? /* @__PURE__ */ i("p", {
|
|
144
|
+
className: "text-muted-foreground",
|
|
145
|
+
children: [/* @__PURE__ */ i("span", { children: [E("docs_contract_sale_legal_vat_number_label"), ":"] }), /* @__PURE__ */ i("span", { children: [" ", H] })]
|
|
146
|
+
}) : null,
|
|
147
|
+
L ? /* @__PURE__ */ r("p", {
|
|
148
|
+
className: "text-muted-foreground whitespace-pre-line",
|
|
149
|
+
children: L
|
|
150
|
+
}) : null,
|
|
151
|
+
U ? /* @__PURE__ */ r("p", {
|
|
152
|
+
className: "text-muted-foreground",
|
|
153
|
+
children: U
|
|
154
|
+
}) : null
|
|
155
|
+
]
|
|
156
|
+
})]
|
|
169
157
|
})]
|
|
170
158
|
}),
|
|
171
|
-
|
|
172
|
-
className: o("border-
|
|
159
|
+
v && d.rental ? /* @__PURE__ */ r("section", {
|
|
160
|
+
className: o("border-t border-border", C ? "py-2" : "py-3"),
|
|
173
161
|
"data-testid": "contract-sale-document-rental-details",
|
|
174
162
|
children: /* @__PURE__ */ i("dl", {
|
|
175
|
-
className: o("grid",
|
|
163
|
+
className: o("grid", C ? "gap-0.5 text-[13px] leading-[18px]" : "gap-1 text-sm"),
|
|
176
164
|
children: [
|
|
177
165
|
/* @__PURE__ */ i("div", {
|
|
178
166
|
className: "flex items-baseline gap-1 whitespace-nowrap",
|
|
179
167
|
children: [/* @__PURE__ */ r("dt", {
|
|
180
168
|
className: "font-medium text-foreground",
|
|
181
|
-
children: /* @__PURE__ */ i("span", { children: [
|
|
169
|
+
children: /* @__PURE__ */ i("span", { children: [T("docs_contract_sale_booking_number_label"), ":"] })
|
|
182
170
|
}), /* @__PURE__ */ r("dd", {
|
|
183
171
|
className: "text-muted-foreground",
|
|
184
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
172
|
+
children: /* @__PURE__ */ r("span", { children: d.rental.bookingNumber })
|
|
185
173
|
})]
|
|
186
174
|
}),
|
|
187
175
|
/* @__PURE__ */ i("div", {
|
|
188
176
|
className: "flex items-baseline gap-1 whitespace-nowrap",
|
|
189
177
|
children: [/* @__PURE__ */ r("dt", {
|
|
190
178
|
className: "font-medium text-foreground",
|
|
191
|
-
children: /* @__PURE__ */ i("span", { children: [
|
|
179
|
+
children: /* @__PURE__ */ i("span", { children: [T("docs_contract_sale_rental_start_label"), ":"] })
|
|
192
180
|
}), /* @__PURE__ */ r("dd", {
|
|
193
181
|
className: "text-muted-foreground",
|
|
194
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
182
|
+
children: /* @__PURE__ */ r("span", { children: u(d.rental.start, _.legal, d.rental.timeZone) })
|
|
195
183
|
})]
|
|
196
184
|
}),
|
|
197
185
|
/* @__PURE__ */ i("div", {
|
|
198
186
|
className: "flex items-baseline gap-1 whitespace-nowrap",
|
|
199
187
|
children: [/* @__PURE__ */ r("dt", {
|
|
200
188
|
className: "font-medium text-foreground",
|
|
201
|
-
children: /* @__PURE__ */ i("span", { children: [
|
|
189
|
+
children: /* @__PURE__ */ i("span", { children: [T("docs_contract_sale_rental_end_label"), ":"] })
|
|
202
190
|
}), /* @__PURE__ */ r("dd", {
|
|
203
191
|
className: "text-muted-foreground",
|
|
204
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
192
|
+
children: /* @__PURE__ */ r("span", { children: u(d.rental.end, _.legal, d.rental.timeZone) })
|
|
205
193
|
})]
|
|
206
194
|
})
|
|
207
195
|
]
|
|
208
196
|
})
|
|
209
197
|
}) : null,
|
|
210
198
|
/* @__PURE__ */ i("section", {
|
|
211
|
-
className: o(
|
|
199
|
+
className: o(O ? "mb-0 flex flex-grow flex-col" : C ? "mb-4" : "mb-8"),
|
|
212
200
|
children: [/* @__PURE__ */ i("div", {
|
|
213
|
-
className: o("flex bg-muted font-semibold text-muted-foreground",
|
|
201
|
+
className: o("flex bg-muted font-semibold text-muted-foreground", C ? "p-2 text-sm leading-5" : "p-2 text-xs md:p-3 md:text-base"),
|
|
214
202
|
children: [
|
|
215
203
|
/* @__PURE__ */ r("div", {
|
|
216
204
|
className: "w-5/12 pr-2 md:w-1/2",
|
|
217
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
205
|
+
children: /* @__PURE__ */ r("span", { children: E("docs_contract_sale_description_label") })
|
|
218
206
|
}),
|
|
219
207
|
/* @__PURE__ */ r("div", {
|
|
220
208
|
className: "w-1/6 text-center",
|
|
221
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
209
|
+
children: /* @__PURE__ */ r("span", { children: E("docs_contract_sale_quantity_label") })
|
|
222
210
|
}),
|
|
223
211
|
/* @__PURE__ */ r("div", {
|
|
224
212
|
className: "w-3/12 text-right md:w-1/6",
|
|
225
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
213
|
+
children: /* @__PURE__ */ r("span", { children: E("docs_contract_sale_unit_price_label") })
|
|
226
214
|
}),
|
|
227
215
|
/* @__PURE__ */ r("div", {
|
|
228
216
|
className: "w-1/6 text-right",
|
|
229
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
217
|
+
children: /* @__PURE__ */ r("span", { children: E("docs_contract_sale_line_total_label") })
|
|
230
218
|
})
|
|
231
219
|
]
|
|
232
220
|
}), /* @__PURE__ */ r("div", {
|
|
233
|
-
className:
|
|
234
|
-
children:
|
|
235
|
-
let t = 1 + (e.taxRate ??
|
|
221
|
+
className: O ? "flex flex-1 flex-col" : "flex flex-col",
|
|
222
|
+
children: f.map((e) => {
|
|
223
|
+
let t = 1 + (e.taxRate ?? d.taxRate ?? 0);
|
|
236
224
|
return /* @__PURE__ */ i("div", {
|
|
237
|
-
className: o("flex items-center border-b border-border",
|
|
225
|
+
className: o("flex items-center border-b border-border", C ? "p-2 text-sm leading-5" : "p-2 text-sm md:p-3 md:text-base"),
|
|
238
226
|
children: [
|
|
239
227
|
/* @__PURE__ */ r("div", {
|
|
240
228
|
className: "w-5/12 pr-2 md:w-1/2",
|
|
@@ -252,19 +240,19 @@ function u({ saleDocument: u, items: d, subtotal: f, tax: p, total: m, formatDat
|
|
|
252
240
|
}),
|
|
253
241
|
/* @__PURE__ */ r("div", {
|
|
254
242
|
className: "w-3/12 text-right md:w-1/6",
|
|
255
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
243
|
+
children: /* @__PURE__ */ r("span", { children: l(e.unitPrice / t * Z, d.currency, _.customer) })
|
|
256
244
|
}),
|
|
257
245
|
/* @__PURE__ */ r("div", {
|
|
258
246
|
className: "w-1/6 text-right",
|
|
259
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
247
|
+
children: /* @__PURE__ */ r("span", { children: l(e.quantity * e.unitPrice / t * Z, d.currency, _.customer) })
|
|
260
248
|
})
|
|
261
249
|
]
|
|
262
250
|
}, e.id);
|
|
263
251
|
})
|
|
264
252
|
})]
|
|
265
253
|
}),
|
|
266
|
-
|
|
267
|
-
className: o("flex justify-end",
|
|
254
|
+
y && /* @__PURE__ */ r("section", {
|
|
255
|
+
className: o("flex justify-end", C ? "mb-6 text-sm leading-5" : "mb-16"),
|
|
268
256
|
children: /* @__PURE__ */ i("div", {
|
|
269
257
|
className: "w-full md:w-1/3",
|
|
270
258
|
children: [
|
|
@@ -272,56 +260,56 @@ function u({ saleDocument: u, items: d, subtotal: f, tax: p, total: m, formatDat
|
|
|
272
260
|
className: "mb-2 flex items-start justify-between gap-4",
|
|
273
261
|
children: [/* @__PURE__ */ r("span", {
|
|
274
262
|
className: "text-muted-foreground",
|
|
275
|
-
children:
|
|
263
|
+
children: D("docs_contract_sale_subtotal_label")
|
|
276
264
|
}), /* @__PURE__ */ r("span", {
|
|
277
265
|
className: "shrink-0 text-right font-semibold",
|
|
278
|
-
children:
|
|
266
|
+
children: l(p, d.currency, _.customer)
|
|
279
267
|
})]
|
|
280
268
|
}),
|
|
281
|
-
|
|
269
|
+
m !== 0 && /* @__PURE__ */ i("div", {
|
|
282
270
|
className: "mb-2 flex items-start justify-between gap-4",
|
|
283
271
|
children: [/* @__PURE__ */ r("span", {
|
|
284
272
|
className: "text-muted-foreground",
|
|
285
|
-
children:
|
|
273
|
+
children: D("docs_contract_sale_tax_label", { rate: ((d.taxRate ?? 0) * 100).toFixed(0) })
|
|
286
274
|
}), /* @__PURE__ */ r("span", {
|
|
287
275
|
className: "shrink-0 text-right font-semibold",
|
|
288
|
-
children:
|
|
276
|
+
children: l(m, d.currency, _.customer)
|
|
289
277
|
})]
|
|
290
278
|
}),
|
|
291
279
|
/* @__PURE__ */ i("div", {
|
|
292
280
|
className: "mt-2 flex items-start justify-between gap-4 border-t border-border pt-2",
|
|
293
281
|
children: [/* @__PURE__ */ r("span", {
|
|
294
|
-
className: o("font-bold",
|
|
295
|
-
children:
|
|
282
|
+
className: o("font-bold", C ? "text-lg" : "text-xl"),
|
|
283
|
+
children: D("docs_contract_sale_total_label")
|
|
296
284
|
}), /* @__PURE__ */ r("span", {
|
|
297
|
-
className: o("shrink-0 text-right font-bold",
|
|
298
|
-
children:
|
|
285
|
+
className: o("shrink-0 text-right font-bold", C ? "text-lg" : "text-xl"),
|
|
286
|
+
children: l(h, d.currency, _.customer)
|
|
299
287
|
})]
|
|
300
288
|
})
|
|
301
289
|
]
|
|
302
290
|
})
|
|
303
291
|
}),
|
|
304
|
-
|
|
305
|
-
className: o(
|
|
292
|
+
b && d.notes && /* @__PURE__ */ i("section", {
|
|
293
|
+
className: o(C ? "mb-6" : "mb-16"),
|
|
306
294
|
children: [/* @__PURE__ */ r("h3", {
|
|
307
|
-
className: o("border-b border-border font-semibold text-foreground",
|
|
308
|
-
children:
|
|
295
|
+
className: o("border-b border-border font-semibold text-foreground", C ? "mb-2 pb-1" : "mb-4 pb-2"),
|
|
296
|
+
children: T("docs_contract_sale_notes_title")
|
|
309
297
|
}), /* @__PURE__ */ r("div", {
|
|
310
298
|
className: "text-sm text-muted-foreground",
|
|
311
299
|
children: /* @__PURE__ */ r("p", {
|
|
312
300
|
className: "whitespace-pre-wrap break-words",
|
|
313
|
-
children:
|
|
301
|
+
children: d.notes
|
|
314
302
|
})
|
|
315
303
|
})]
|
|
316
304
|
}),
|
|
317
|
-
|
|
318
|
-
saleDocument:
|
|
319
|
-
documentLanguage:
|
|
320
|
-
formatDate:
|
|
321
|
-
compact:
|
|
305
|
+
x ? /* @__PURE__ */ r(n, {
|
|
306
|
+
saleDocument: d,
|
|
307
|
+
documentLanguage: _,
|
|
308
|
+
formatDate: g,
|
|
309
|
+
compact: C
|
|
322
310
|
}) : null
|
|
323
311
|
]
|
|
324
312
|
});
|
|
325
313
|
}
|
|
326
314
|
//#endregion
|
|
327
|
-
export {
|
|
315
|
+
export { d as InvoiceDetails };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveOpeningHoursForDate as e } from "../../chunks/pkg/booking-engine/dist/utils/opening-hours-period-TCyLhzZw.js";
|
|
2
|
-
import "../../chunks/pkg/booking-engine/dist/schemas-
|
|
2
|
+
import "../../chunks/pkg/booking-engine/dist/schemas-JjiUWFIv.js";
|
|
3
3
|
import { businessDateStringToDate as t, calendarDateToBusinessDateString as n, instantToBusinessDateTimeParts as r, normalizeBusinessDateString as i, parseTimeToMinutes as a } from "../../lib/booking-period.js";
|
|
4
4
|
//#region src/components/Footer/businessHoursStatus.ts
|
|
5
5
|
var o = 370, s = (e, r) => {
|
|
@@ -19,7 +19,7 @@ function u({ languages: u, className: d, align: f = "end" }) {
|
|
|
19
19
|
variant: "outline",
|
|
20
20
|
size: "sm",
|
|
21
21
|
"aria-label": p("language_selector_label"),
|
|
22
|
-
className: s("h-9 gap-1
|
|
22
|
+
className: s("h-9 gap-1 px-2 uppercase shadow-none focus-visible:ring-2", d),
|
|
23
23
|
"data-testid": "storefront-language-selector-trigger",
|
|
24
24
|
children: [/* @__PURE__ */ a("span", {
|
|
25
25
|
className: "flex items-center gap-1",
|
|
@@ -39,7 +39,7 @@ function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _,
|
|
|
39
39
|
}) : /* @__PURE__ */ o("ul", {
|
|
40
40
|
className: "divide-y divide-slate-200",
|
|
41
41
|
children: p.map((i) => {
|
|
42
|
-
let c = e(i.unitPriceMinor, A.language), l = i.insufficientCapacity === !0, u = i.availabilityIssue === "
|
|
42
|
+
let c = e(i.unitPriceMinor, A.language), l = i.insufficientCapacity === !0, u = i.availabilityIssue === "quantityUnavailable" ? k("availability_quantity_unavailable") : k("availability_out_of_stock");
|
|
43
43
|
return /* @__PURE__ */ s("li", {
|
|
44
44
|
className: "flex items-start justify-between gap-3 py-4 first:pt-0 last:pb-0",
|
|
45
45
|
children: [/* @__PURE__ */ s("div", {
|
package/dist/i18n/en.d.ts
CHANGED
|
@@ -212,10 +212,6 @@ export declare const storefront: {
|
|
|
212
212
|
checkout_estimated_total: string;
|
|
213
213
|
checkout_form_title: string;
|
|
214
214
|
checkout_form_description: string;
|
|
215
|
-
checkout_first_name_label: string;
|
|
216
|
-
checkout_first_name_placeholder: string;
|
|
217
|
-
checkout_last_name_label: string;
|
|
218
|
-
checkout_last_name_placeholder: string;
|
|
219
215
|
checkout_full_name_label: string;
|
|
220
216
|
checkout_full_name_placeholder: string;
|
|
221
217
|
checkout_email_label: string;
|
|
@@ -298,6 +294,7 @@ export declare const storefront: {
|
|
|
298
294
|
docs_contract_sale_credit_note_title: string;
|
|
299
295
|
docs_contract_sale_page_counter: string;
|
|
300
296
|
docs_contract_sale_invoice_date_label: string;
|
|
297
|
+
docs_contract_sale_invoice_and_due_date_label: string;
|
|
301
298
|
docs_contract_sale_quote_date_label: string;
|
|
302
299
|
docs_contract_sale_credit_note_date_label: string;
|
|
303
300
|
docs_contract_sale_due_date_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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2gBtB,CAAA"}
|
package/dist/i18n/en.js
CHANGED
|
@@ -213,10 +213,6 @@ var e = {
|
|
|
213
213
|
checkout_estimated_total: "Total",
|
|
214
214
|
checkout_form_title: "Your details",
|
|
215
215
|
checkout_form_description: "Enter your details for this booking, and add any useful information in the notes.",
|
|
216
|
-
checkout_first_name_label: "First name",
|
|
217
|
-
checkout_first_name_placeholder: "Jane",
|
|
218
|
-
checkout_last_name_label: "Last name",
|
|
219
|
-
checkout_last_name_placeholder: "Doe",
|
|
220
216
|
checkout_full_name_label: "Full name",
|
|
221
217
|
checkout_full_name_placeholder: "Jane Doe",
|
|
222
218
|
checkout_email_label: "Email",
|
|
@@ -299,6 +295,7 @@ var e = {
|
|
|
299
295
|
docs_contract_sale_credit_note_title: "Credit note",
|
|
300
296
|
docs_contract_sale_page_counter: "Page {{current_page}} of {{total_pages}}",
|
|
301
297
|
docs_contract_sale_invoice_date_label: "Invoice Date:",
|
|
298
|
+
docs_contract_sale_invoice_and_due_date_label: "Invoice and Due Date:",
|
|
302
299
|
docs_contract_sale_quote_date_label: "Quote Date:",
|
|
303
300
|
docs_contract_sale_credit_note_date_label: "Credit Note Date:",
|
|
304
301
|
docs_contract_sale_due_date_label: "Due Date:",
|
|
@@ -307,7 +304,7 @@ var e = {
|
|
|
307
304
|
docs_contract_sale_legal_description_label: "Description",
|
|
308
305
|
docs_contract_sale_legal_company_registration_label: "Company registration no.",
|
|
309
306
|
docs_contract_sale_legal_establishment_registration_label: "Establishment registration no.",
|
|
310
|
-
docs_contract_sale_legal_vat_number_label: "VAT
|
|
307
|
+
docs_contract_sale_legal_vat_number_label: "VAT",
|
|
311
308
|
docs_contract_sale_legal_trade_register_label: "Trade register",
|
|
312
309
|
docs_contract_sale_rental_details_title: "Rental details",
|
|
313
310
|
docs_contract_sale_booking_number_label: "Booking",
|
package/dist/i18n/fr.d.ts
CHANGED
|
@@ -213,10 +213,6 @@ export declare const storefront: {
|
|
|
213
213
|
checkout_estimated_total: string;
|
|
214
214
|
checkout_form_title: string;
|
|
215
215
|
checkout_form_description: string;
|
|
216
|
-
checkout_first_name_label: string;
|
|
217
|
-
checkout_first_name_placeholder: string;
|
|
218
|
-
checkout_last_name_label: string;
|
|
219
|
-
checkout_last_name_placeholder: string;
|
|
220
216
|
checkout_full_name_label: string;
|
|
221
217
|
checkout_full_name_placeholder: string;
|
|
222
218
|
checkout_email_label: string;
|
|
@@ -299,6 +295,7 @@ export declare const storefront: {
|
|
|
299
295
|
docs_contract_sale_credit_note_title: string;
|
|
300
296
|
docs_contract_sale_page_counter: string;
|
|
301
297
|
docs_contract_sale_invoice_date_label: string;
|
|
298
|
+
docs_contract_sale_invoice_and_due_date_label: string;
|
|
302
299
|
docs_contract_sale_quote_date_label: string;
|
|
303
300
|
docs_contract_sale_credit_note_date_label: string;
|
|
304
301
|
docs_contract_sale_due_date_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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4gBtB,CAAA"}
|
package/dist/i18n/fr.js
CHANGED
|
@@ -214,12 +214,8 @@ var e = {
|
|
|
214
214
|
checkout_estimated_total: "Total",
|
|
215
215
|
checkout_form_title: "Vos informations",
|
|
216
216
|
checkout_form_description: "Renseignez vos coordonnées pour votre réservation. N'hésitez pas à ajouter toute information utile dans les notes.",
|
|
217
|
-
checkout_first_name_label: "Prénom",
|
|
218
|
-
checkout_first_name_placeholder: "Jean",
|
|
219
|
-
checkout_last_name_label: "Nom",
|
|
220
|
-
checkout_last_name_placeholder: "Dupont",
|
|
221
217
|
checkout_full_name_label: "Nom complet",
|
|
222
|
-
checkout_full_name_placeholder: "
|
|
218
|
+
checkout_full_name_placeholder: "Prénom Nom",
|
|
223
219
|
checkout_email_label: "Email",
|
|
224
220
|
checkout_email_placeholder: "jean@example.com",
|
|
225
221
|
checkout_phone_label: "Téléphone",
|
|
@@ -300,6 +296,7 @@ var e = {
|
|
|
300
296
|
docs_contract_sale_credit_note_title: "Avoir",
|
|
301
297
|
docs_contract_sale_page_counter: "Page {{current_page}} sur {{total_pages}}",
|
|
302
298
|
docs_contract_sale_invoice_date_label: "Date de facture :",
|
|
299
|
+
docs_contract_sale_invoice_and_due_date_label: "Date et échéance :",
|
|
303
300
|
docs_contract_sale_quote_date_label: "Date du devis :",
|
|
304
301
|
docs_contract_sale_credit_note_date_label: "Date de l'avoir :",
|
|
305
302
|
docs_contract_sale_due_date_label: "Date d'échéance :",
|
|
@@ -308,7 +305,7 @@ var e = {
|
|
|
308
305
|
docs_contract_sale_legal_description_label: "Description",
|
|
309
306
|
docs_contract_sale_legal_company_registration_label: "N° d’immatriculation",
|
|
310
307
|
docs_contract_sale_legal_establishment_registration_label: "N° d’établissement",
|
|
311
|
-
docs_contract_sale_legal_vat_number_label: "
|
|
308
|
+
docs_contract_sale_legal_vat_number_label: "TVA",
|
|
312
309
|
docs_contract_sale_legal_trade_register_label: "Registre du commerce",
|
|
313
310
|
docs_contract_sale_rental_details_title: "Détails de la location",
|
|
314
311
|
docs_contract_sale_booking_number_label: "Réservation",
|