@loczer/storefront-sdk 0.228.0 → 0.230.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.
@@ -1 +1 @@
1
- {"version":3,"file":"InvoiceDetails.d.ts","sourceRoot":"","sources":["../../../src/components/ContractSaleDocument/InvoiceDetails.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EACpB,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,gCAAgC,CAAA;AAKvC,KAAK,mBAAmB,GAAG;IACzB,YAAY,EAAE,oBAAoB,CAAA;IAClC,KAAK,EAAE,4BAA4B,EAAE,CAAA;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,KAAK,MAAM,CAAA;IACpD,gBAAgB,EAAE,4BAA4B,CAAA;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AA0CD,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,GAAG,EACH,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,eAAsB,EACtB,iBAAwB,EACxB,gBAAuB,EACvB,qBAA4B,EAC5B,iBAAiB,EACjB,OAAe,GAChB,EAAE,mBAAmB,2CA8UrB"}
1
+ {"version":3,"file":"InvoiceDetails.d.ts","sourceRoot":"","sources":["../../../src/components/ContractSaleDocument/InvoiceDetails.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EACpB,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,gCAAgC,CAAA;AAKvC,KAAK,mBAAmB,GAAG;IACzB,YAAY,EAAE,oBAAoB,CAAA;IAClC,KAAK,EAAE,4BAA4B,EAAE,CAAA;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,KAAK,MAAM,CAAA;IACpD,gBAAgB,EAAE,4BAA4B,CAAA;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAwDD,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,GAAG,EACH,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,eAAsB,EACtB,iBAAwB,EACxB,gBAAuB,EACvB,qBAA4B,EAC5B,iBAAiB,EACjB,OAAe,GAChB,EAAE,mBAAmB,2CAuVrB"}
@@ -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, n) {
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 l(e, t, n) {
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 u({ saleDocument: u, items: d, subtotal: f, tax: p, total: m, formatDate: h, documentLanguage: g, showInvoiceMeta: _ = !0, showTotalsSection: v = !0, showNotesSection: y = !0, showAcceptanceSection: b = !0, documentQrCodeUrl: x, compact: S = !1 }) {
39
- let { t: C } = a(), w = (t, n = {}) => e(C, g, t, n), T = (e, n = {}) => t(C, g, e, n), E = (e, t = {}) => {
40
- let n = w(e, t), a = n.indexOf(" / ");
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,201 +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
- }, D = !v && !y && !b, O = u.issuer.legalIdentity, k = O?.legalName?.trim() || u.issuer.name, A = k === u.issuer.name ? "" : u.issuer.name, j = s(O?.registeredAddress || u.issuer.address), M = O ? [
49
- O.legalForm ? {
50
- key: "legal-form",
51
- label: T("docs_contract_sale_legal_form_label"),
52
- value: O.legalForm
53
- } : null,
54
- O.shareCapital ? {
55
- key: "share-capital",
56
- label: T("docs_contract_sale_legal_share_capital_label"),
57
- value: O.shareCapital
58
- } : null,
59
- O.companyRegistrationNumber ? {
60
- key: "company-registration",
61
- label: T("docs_contract_sale_legal_company_registration_label"),
62
- value: O.companyRegistrationNumber
63
- } : null,
64
- O.establishmentRegistrationNumber ? {
65
- key: "establishment-registration",
66
- label: T("docs_contract_sale_legal_establishment_registration_label"),
67
- value: O.establishmentRegistrationNumber
68
- } : null,
69
- O.vatNumber ? {
70
- key: "vat-number",
71
- label: T("docs_contract_sale_legal_vat_number_label"),
72
- value: O.vatNumber
73
- } : null,
74
- O.tradeRegister ? {
75
- key: "trade-register",
76
- label: T("docs_contract_sale_legal_trade_register_label"),
77
- value: O.tradeRegister
78
- } : null
79
- ].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;
80
55
  return /* @__PURE__ */ i("main", {
81
56
  className: "flex flex-grow flex-col px-4 md:px-8",
82
57
  children: [
83
- _ && /* @__PURE__ */ i("header", {
84
- className: o("grid", S ? "mb-4 gap-3" : "mb-8 gap-6"),
58
+ v && /* @__PURE__ */ i("header", {
59
+ className: o("grid", C ? "mb-4 gap-3" : "mb-8 gap-6"),
85
60
  children: [/* @__PURE__ */ i("div", {
86
- className: o("grid md:grid-cols-2", S ? "gap-3 md:gap-4" : "gap-6 md:gap-8"),
61
+ className: o("grid md:grid-cols-2", C ? "gap-3 md:gap-4" : "gap-6 md:gap-8"),
87
62
  children: [/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ i("h1", {
88
- className: o("flex flex-wrap items-baseline gap-x-2 gap-y-1 font-semibold text-foreground", S ? "text-lg" : "text-xl"),
89
- children: [/* @__PURE__ */ r("span", { children: I }), /* @__PURE__ */ i("span", {
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", {
90
65
  className: "font-normal text-muted-foreground",
91
- children: ["#", u.saleDocumentNumber]
66
+ children: ["#", d.saleDocumentNumber]
92
67
  })]
93
- }), x === void 0 ? null : /* @__PURE__ */ r("div", {
94
- className: o(S ? "mt-2 h-16 w-16" : "mt-4 h-24 w-24"),
68
+ }), S === void 0 ? null : /* @__PURE__ */ r("div", {
69
+ className: o(C ? "mt-2 h-16 w-16" : "mt-4 h-24 w-24"),
95
70
  "data-testid": "contract-sale-document-public-url-qr-container",
96
- children: x ? /* @__PURE__ */ r("img", {
97
- src: x,
98
- alt: C("docs_contract_sale_qr_alt"),
71
+ children: S ? /* @__PURE__ */ r("img", {
72
+ src: S,
73
+ alt: w("docs_contract_sale_qr_alt"),
99
74
  className: "block h-full w-full",
100
75
  "data-testid": "contract-sale-document-public-url-qr"
101
76
  }) : null
102
77
  })] }), /* @__PURE__ */ i("div", {
103
- className: o("md:text-right", S && "text-sm leading-5"),
78
+ className: o("md:text-right", C ? "text-[13px] leading-[18px]" : "text-sm"),
104
79
  children: [/* @__PURE__ */ i("div", {
105
- className: "mb-2",
80
+ className: o(!J && "mb-2"),
106
81
  children: [/* @__PURE__ */ r("p", {
107
82
  className: "font-semibold text-foreground",
108
- children: L
83
+ children: Y
109
84
  }), /* @__PURE__ */ r("p", {
110
85
  className: "text-muted-foreground",
111
- children: h(u.date)
86
+ children: K
112
87
  })]
113
- }), /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("p", {
88
+ }), J ? null : /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("p", {
114
89
  className: "font-semibold text-foreground",
115
- children: w("docs_contract_sale_due_date_label")
90
+ children: T("docs_contract_sale_due_date_label")
116
91
  }), /* @__PURE__ */ r("p", {
117
92
  className: "text-muted-foreground",
118
- children: h(u.dueDate)
93
+ children: q
119
94
  })] })]
120
95
  })]
121
96
  }), /* @__PURE__ */ i("div", {
122
- className: o("grid md:grid-cols-2", S ? "gap-3 md:gap-4" : "gap-6 md:gap-8"),
123
- children: [
124
- /* @__PURE__ */ i("div", { children: [
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: [
125
102
  /* @__PURE__ */ r("h2", {
126
- className: o("font-semibold text-primary", S ? "text-lg" : "text-xl"),
127
- children: k
128
- }),
129
- A ? /* @__PURE__ */ r("p", {
130
- className: "text-xs text-muted-foreground",
103
+ className: "font-semibold text-primary",
131
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 })]
132
113
  }) : null,
133
114
  j ? /* @__PURE__ */ r("p", {
134
115
  className: "text-muted-foreground whitespace-pre-line",
135
116
  children: j
136
117
  }) : null
137
- ] }),
138
- /* @__PURE__ */ i("div", {
139
- className: o("md:text-right", S && "text-sm leading-5"),
140
- children: [
141
- /* @__PURE__ */ r("h3", {
142
- className: "mb-2 font-semibold text-foreground",
143
- children: R
144
- }),
145
- /* @__PURE__ */ r("p", {
146
- className: "font-bold text-foreground",
147
- children: u.recipient.name
148
- }),
149
- N ? /* @__PURE__ */ r("p", {
150
- className: "text-muted-foreground whitespace-pre-line",
151
- children: N
152
- }) : null,
153
- P ? /* @__PURE__ */ r("p", {
154
- className: "text-muted-foreground",
155
- children: P
156
- }) : null
157
- ]
158
- }),
159
- M.length > 0 ? /* @__PURE__ */ r("dl", {
160
- className: "-mt-2.5 flex flex-wrap gap-x-2 gap-y-0.5 text-[11px] leading-4 text-muted-foreground md:col-span-2",
161
- "data-testid": "contract-sale-document-issuer-legal-identity",
162
- children: M.map((e) => /* @__PURE__ */ i("div", {
163
- className: "inline-flex min-w-0 gap-1",
164
- children: [/* @__PURE__ */ r("dt", {
165
- className: "font-medium text-foreground",
166
- children: /* @__PURE__ */ i("span", { children: [e.label, ":"] })
167
- }), /* @__PURE__ */ r("dd", {
168
- className: "break-words",
169
- children: /* @__PURE__ */ r("span", { children: e.value })
170
- })]
171
- }, e.key))
172
- }) : null
173
- ]
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
+ })]
174
157
  })]
175
158
  }),
176
- _ && u.rental ? /* @__PURE__ */ r("section", {
177
- className: o("border-y border-border", S ? "mb-3 py-2" : "mb-6 py-3"),
159
+ v && d.rental ? /* @__PURE__ */ r("section", {
160
+ className: o("border-t border-border", C ? "py-2" : "py-3"),
178
161
  "data-testid": "contract-sale-document-rental-details",
179
162
  children: /* @__PURE__ */ i("dl", {
180
- className: o("grid", S ? "gap-0.5 text-[13px] leading-[18px]" : "gap-1 text-sm"),
163
+ className: o("grid", C ? "gap-0.5 text-[13px] leading-[18px]" : "gap-1 text-sm"),
181
164
  children: [
182
165
  /* @__PURE__ */ i("div", {
183
166
  className: "flex items-baseline gap-1 whitespace-nowrap",
184
167
  children: [/* @__PURE__ */ r("dt", {
185
168
  className: "font-medium text-foreground",
186
- children: /* @__PURE__ */ i("span", { children: [w("docs_contract_sale_booking_number_label"), ":"] })
169
+ children: /* @__PURE__ */ i("span", { children: [T("docs_contract_sale_booking_number_label"), ":"] })
187
170
  }), /* @__PURE__ */ r("dd", {
188
171
  className: "text-muted-foreground",
189
- children: /* @__PURE__ */ r("span", { children: u.rental.bookingNumber })
172
+ children: /* @__PURE__ */ r("span", { children: d.rental.bookingNumber })
190
173
  })]
191
174
  }),
192
175
  /* @__PURE__ */ i("div", {
193
176
  className: "flex items-baseline gap-1 whitespace-nowrap",
194
177
  children: [/* @__PURE__ */ r("dt", {
195
178
  className: "font-medium text-foreground",
196
- children: /* @__PURE__ */ i("span", { children: [w("docs_contract_sale_rental_start_label"), ":"] })
179
+ children: /* @__PURE__ */ i("span", { children: [T("docs_contract_sale_rental_start_label"), ":"] })
197
180
  }), /* @__PURE__ */ r("dd", {
198
181
  className: "text-muted-foreground",
199
- children: /* @__PURE__ */ r("span", { children: l(u.rental.start, g.legal, u.rental.timeZone) })
182
+ children: /* @__PURE__ */ r("span", { children: u(d.rental.start, _.legal, d.rental.timeZone) })
200
183
  })]
201
184
  }),
202
185
  /* @__PURE__ */ i("div", {
203
186
  className: "flex items-baseline gap-1 whitespace-nowrap",
204
187
  children: [/* @__PURE__ */ r("dt", {
205
188
  className: "font-medium text-foreground",
206
- children: /* @__PURE__ */ i("span", { children: [w("docs_contract_sale_rental_end_label"), ":"] })
189
+ children: /* @__PURE__ */ i("span", { children: [T("docs_contract_sale_rental_end_label"), ":"] })
207
190
  }), /* @__PURE__ */ r("dd", {
208
191
  className: "text-muted-foreground",
209
- children: /* @__PURE__ */ r("span", { children: l(u.rental.end, g.legal, u.rental.timeZone) })
192
+ children: /* @__PURE__ */ r("span", { children: u(d.rental.end, _.legal, d.rental.timeZone) })
210
193
  })]
211
194
  })
212
195
  ]
213
196
  })
214
197
  }) : null,
215
198
  /* @__PURE__ */ i("section", {
216
- className: o(D ? "mb-0 flex flex-grow flex-col" : S ? "mb-4" : "mb-8"),
199
+ className: o(O ? "mb-0 flex flex-grow flex-col" : C ? "mb-4" : "mb-8"),
217
200
  children: [/* @__PURE__ */ i("div", {
218
- className: o("flex bg-muted font-semibold text-muted-foreground", S ? "p-2 text-sm leading-5" : "p-2 text-xs md:p-3 md:text-base"),
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"),
219
202
  children: [
220
203
  /* @__PURE__ */ r("div", {
221
204
  className: "w-5/12 pr-2 md:w-1/2",
222
- children: /* @__PURE__ */ r("span", { children: T("docs_contract_sale_description_label") })
205
+ children: /* @__PURE__ */ r("span", { children: E("docs_contract_sale_description_label") })
223
206
  }),
224
207
  /* @__PURE__ */ r("div", {
225
208
  className: "w-1/6 text-center",
226
- children: /* @__PURE__ */ r("span", { children: T("docs_contract_sale_quantity_label") })
209
+ children: /* @__PURE__ */ r("span", { children: E("docs_contract_sale_quantity_label") })
227
210
  }),
228
211
  /* @__PURE__ */ r("div", {
229
212
  className: "w-3/12 text-right md:w-1/6",
230
- children: /* @__PURE__ */ r("span", { children: T("docs_contract_sale_unit_price_label") })
213
+ children: /* @__PURE__ */ r("span", { children: E("docs_contract_sale_unit_price_label") })
231
214
  }),
232
215
  /* @__PURE__ */ r("div", {
233
216
  className: "w-1/6 text-right",
234
- children: /* @__PURE__ */ r("span", { children: T("docs_contract_sale_line_total_label") })
217
+ children: /* @__PURE__ */ r("span", { children: E("docs_contract_sale_line_total_label") })
235
218
  })
236
219
  ]
237
220
  }), /* @__PURE__ */ r("div", {
238
- className: D ? "flex flex-1 flex-col" : "flex flex-col",
239
- children: d.map((e) => {
240
- let t = 1 + (e.taxRate ?? u.taxRate ?? 0);
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);
241
224
  return /* @__PURE__ */ i("div", {
242
- className: o("flex items-center border-b border-border", S ? "p-2 text-sm leading-5" : "p-2 text-sm md:p-3 md:text-base"),
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"),
243
226
  children: [
244
227
  /* @__PURE__ */ r("div", {
245
228
  className: "w-5/12 pr-2 md:w-1/2",
@@ -257,19 +240,19 @@ function u({ saleDocument: u, items: d, subtotal: f, tax: p, total: m, formatDat
257
240
  }),
258
241
  /* @__PURE__ */ r("div", {
259
242
  className: "w-3/12 text-right md:w-1/6",
260
- children: /* @__PURE__ */ r("span", { children: c(e.unitPrice / t * z, u.currency, g.customer) })
243
+ children: /* @__PURE__ */ r("span", { children: l(e.unitPrice / t * Z, d.currency, _.customer) })
261
244
  }),
262
245
  /* @__PURE__ */ r("div", {
263
246
  className: "w-1/6 text-right",
264
- children: /* @__PURE__ */ r("span", { children: c(e.quantity * e.unitPrice / t * z, u.currency, g.customer) })
247
+ children: /* @__PURE__ */ r("span", { children: l(e.quantity * e.unitPrice / t * Z, d.currency, _.customer) })
265
248
  })
266
249
  ]
267
250
  }, e.id);
268
251
  })
269
252
  })]
270
253
  }),
271
- v && /* @__PURE__ */ r("section", {
272
- className: o("flex justify-end", S ? "mb-6 text-sm leading-5" : "mb-16"),
254
+ y && /* @__PURE__ */ r("section", {
255
+ className: o("flex justify-end", C ? "mb-6 text-sm leading-5" : "mb-16"),
273
256
  children: /* @__PURE__ */ i("div", {
274
257
  className: "w-full md:w-1/3",
275
258
  children: [
@@ -277,56 +260,56 @@ function u({ saleDocument: u, items: d, subtotal: f, tax: p, total: m, formatDat
277
260
  className: "mb-2 flex items-start justify-between gap-4",
278
261
  children: [/* @__PURE__ */ r("span", {
279
262
  className: "text-muted-foreground",
280
- children: E("docs_contract_sale_subtotal_label")
263
+ children: D("docs_contract_sale_subtotal_label")
281
264
  }), /* @__PURE__ */ r("span", {
282
265
  className: "shrink-0 text-right font-semibold",
283
- children: c(f, u.currency, g.customer)
266
+ children: l(p, d.currency, _.customer)
284
267
  })]
285
268
  }),
286
- p !== 0 && /* @__PURE__ */ i("div", {
269
+ m !== 0 && /* @__PURE__ */ i("div", {
287
270
  className: "mb-2 flex items-start justify-between gap-4",
288
271
  children: [/* @__PURE__ */ r("span", {
289
272
  className: "text-muted-foreground",
290
- children: E("docs_contract_sale_tax_label", { rate: ((u.taxRate ?? 0) * 100).toFixed(0) })
273
+ children: D("docs_contract_sale_tax_label", { rate: ((d.taxRate ?? 0) * 100).toFixed(0) })
291
274
  }), /* @__PURE__ */ r("span", {
292
275
  className: "shrink-0 text-right font-semibold",
293
- children: c(p, u.currency, g.customer)
276
+ children: l(m, d.currency, _.customer)
294
277
  })]
295
278
  }),
296
279
  /* @__PURE__ */ i("div", {
297
280
  className: "mt-2 flex items-start justify-between gap-4 border-t border-border pt-2",
298
281
  children: [/* @__PURE__ */ r("span", {
299
- className: o("font-bold", S ? "text-lg" : "text-xl"),
300
- children: E("docs_contract_sale_total_label")
282
+ className: o("font-bold", C ? "text-lg" : "text-xl"),
283
+ children: D("docs_contract_sale_total_label")
301
284
  }), /* @__PURE__ */ r("span", {
302
- className: o("shrink-0 text-right font-bold", S ? "text-lg" : "text-xl"),
303
- children: c(m, u.currency, g.customer)
285
+ className: o("shrink-0 text-right font-bold", C ? "text-lg" : "text-xl"),
286
+ children: l(h, d.currency, _.customer)
304
287
  })]
305
288
  })
306
289
  ]
307
290
  })
308
291
  }),
309
- y && u.notes && /* @__PURE__ */ i("section", {
310
- className: o(S ? "mb-6" : "mb-16"),
292
+ b && d.notes && /* @__PURE__ */ i("section", {
293
+ className: o(C ? "mb-6" : "mb-16"),
311
294
  children: [/* @__PURE__ */ r("h3", {
312
- className: o("border-b border-border font-semibold text-foreground", S ? "mb-2 pb-1" : "mb-4 pb-2"),
313
- children: w("docs_contract_sale_notes_title")
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")
314
297
  }), /* @__PURE__ */ r("div", {
315
298
  className: "text-sm text-muted-foreground",
316
299
  children: /* @__PURE__ */ r("p", {
317
300
  className: "whitespace-pre-wrap break-words",
318
- children: u.notes
301
+ children: d.notes
319
302
  })
320
303
  })]
321
304
  }),
322
- b ? /* @__PURE__ */ r(n, {
323
- saleDocument: u,
324
- documentLanguage: g,
325
- formatDate: h,
326
- compact: S
305
+ x ? /* @__PURE__ */ r(n, {
306
+ saleDocument: d,
307
+ documentLanguage: _,
308
+ formatDate: g,
309
+ compact: C
327
310
  }) : null
328
311
  ]
329
312
  });
330
313
  }
331
314
  //#endregion
332
- export { u as InvoiceDetails };
315
+ export { d as InvoiceDetails };
package/dist/i18n/en.d.ts CHANGED
@@ -298,13 +298,13 @@ export declare const storefront: {
298
298
  docs_contract_sale_credit_note_title: string;
299
299
  docs_contract_sale_page_counter: string;
300
300
  docs_contract_sale_invoice_date_label: string;
301
+ docs_contract_sale_invoice_and_due_date_label: string;
301
302
  docs_contract_sale_quote_date_label: string;
302
303
  docs_contract_sale_credit_note_date_label: string;
303
304
  docs_contract_sale_due_date_label: string;
304
305
  docs_contract_sale_invoice_recipient_label: string;
305
306
  docs_contract_sale_credit_note_recipient_label: string;
306
- docs_contract_sale_legal_form_label: string;
307
- docs_contract_sale_legal_share_capital_label: string;
307
+ docs_contract_sale_legal_description_label: string;
308
308
  docs_contract_sale_legal_company_registration_label: string;
309
309
  docs_contract_sale_legal_establishment_registration_label: string;
310
310
  docs_contract_sale_legal_vat_number_label: string;
package/dist/i18n/en.js CHANGED
@@ -299,16 +299,16 @@ var e = {
299
299
  docs_contract_sale_credit_note_title: "Credit note",
300
300
  docs_contract_sale_page_counter: "Page {{current_page}} of {{total_pages}}",
301
301
  docs_contract_sale_invoice_date_label: "Invoice Date:",
302
+ docs_contract_sale_invoice_and_due_date_label: "Invoice and Due Date:",
302
303
  docs_contract_sale_quote_date_label: "Quote Date:",
303
304
  docs_contract_sale_credit_note_date_label: "Credit Note Date:",
304
305
  docs_contract_sale_due_date_label: "Due Date:",
305
306
  docs_contract_sale_invoice_recipient_label: "Bill To:",
306
307
  docs_contract_sale_credit_note_recipient_label: "Issued To:",
307
- docs_contract_sale_legal_form_label: "Legal form",
308
- docs_contract_sale_legal_share_capital_label: "Share capital",
308
+ docs_contract_sale_legal_description_label: "Description",
309
309
  docs_contract_sale_legal_company_registration_label: "Company registration no.",
310
310
  docs_contract_sale_legal_establishment_registration_label: "Establishment registration no.",
311
- docs_contract_sale_legal_vat_number_label: "VAT no.",
311
+ docs_contract_sale_legal_vat_number_label: "VAT",
312
312
  docs_contract_sale_legal_trade_register_label: "Trade register",
313
313
  docs_contract_sale_rental_details_title: "Rental details",
314
314
  docs_contract_sale_booking_number_label: "Booking",
package/dist/i18n/fr.d.ts CHANGED
@@ -299,13 +299,13 @@ export declare const storefront: {
299
299
  docs_contract_sale_credit_note_title: string;
300
300
  docs_contract_sale_page_counter: string;
301
301
  docs_contract_sale_invoice_date_label: string;
302
+ docs_contract_sale_invoice_and_due_date_label: string;
302
303
  docs_contract_sale_quote_date_label: string;
303
304
  docs_contract_sale_credit_note_date_label: string;
304
305
  docs_contract_sale_due_date_label: string;
305
306
  docs_contract_sale_invoice_recipient_label: string;
306
307
  docs_contract_sale_credit_note_recipient_label: string;
307
- docs_contract_sale_legal_form_label: string;
308
- docs_contract_sale_legal_share_capital_label: string;
308
+ docs_contract_sale_legal_description_label: string;
309
309
  docs_contract_sale_legal_company_registration_label: string;
310
310
  docs_contract_sale_legal_establishment_registration_label: string;
311
311
  docs_contract_sale_legal_vat_number_label: string;
package/dist/i18n/fr.js CHANGED
@@ -300,16 +300,16 @@ var e = {
300
300
  docs_contract_sale_credit_note_title: "Avoir",
301
301
  docs_contract_sale_page_counter: "Page {{current_page}} sur {{total_pages}}",
302
302
  docs_contract_sale_invoice_date_label: "Date de facture :",
303
+ docs_contract_sale_invoice_and_due_date_label: "Date et échéance :",
303
304
  docs_contract_sale_quote_date_label: "Date du devis :",
304
305
  docs_contract_sale_credit_note_date_label: "Date de l'avoir :",
305
306
  docs_contract_sale_due_date_label: "Date d'échéance :",
306
307
  docs_contract_sale_invoice_recipient_label: "Facturé à :",
307
308
  docs_contract_sale_credit_note_recipient_label: "Émis à :",
308
- docs_contract_sale_legal_form_label: "Forme juridique",
309
- docs_contract_sale_legal_share_capital_label: "Capital social",
309
+ docs_contract_sale_legal_description_label: "Description",
310
310
  docs_contract_sale_legal_company_registration_label: "N° d’immatriculation",
311
311
  docs_contract_sale_legal_establishment_registration_label: "N° d’établissement",
312
- docs_contract_sale_legal_vat_number_label: "N° de TVA",
312
+ docs_contract_sale_legal_vat_number_label: "TVA",
313
313
  docs_contract_sale_legal_trade_register_label: "Registre du commerce",
314
314
  docs_contract_sale_rental_details_title: "Détails de la location",
315
315
  docs_contract_sale_booking_number_label: "Réservation",