@murumets-ee/pdf 0.114.0 → 0.116.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.
@@ -0,0 +1,108 @@
1
+ import { ReactElement } from "react";
2
+
3
+ //#region src/sales-invoice.d.ts
4
+ /** The party issuing the invoice — printed as the letterhead. Blank fields are skipped. */
5
+ interface SalesInvoiceSeller {
6
+ name: string;
7
+ regNo?: string | undefined;
8
+ vatRegNo?: string | undefined;
9
+ address?: string | undefined;
10
+ email?: string | undefined;
11
+ phone?: string | undefined;
12
+ bankName?: string | undefined;
13
+ iban?: string | undefined;
14
+ }
15
+ /** The party being invoiced. Blank fields are skipped. */
16
+ interface SalesInvoiceBuyer {
17
+ name: string;
18
+ regNo?: string | undefined;
19
+ vatRegNo?: string | undefined;
20
+ address?: string | undefined;
21
+ email?: string | undefined;
22
+ }
23
+ /** One invoice line. Money is integer cents, VAT-exclusive unless named otherwise. */
24
+ interface SalesInvoiceLine {
25
+ description: string;
26
+ quantity: number;
27
+ /** Unit name, e.g. `pcs`. */
28
+ unit?: string | undefined;
29
+ unitPriceCents: number;
30
+ /** The line's VAT in cents, as the caller computed it — this document is not a tax engine. */
31
+ vatCents: number;
32
+ /** The VAT rate as a percentage, for the line and the summary. Absent: printed as "—". */
33
+ vatRatePercent?: number | undefined;
34
+ }
35
+ /** Every word the document prints. */
36
+ interface SalesInvoiceLabels {
37
+ title: string;
38
+ invoiceNo: string;
39
+ docDate: string;
40
+ dueDate: string;
41
+ referenceNo: string;
42
+ seller: string;
43
+ buyer: string;
44
+ regNo: string;
45
+ vatRegNo: string;
46
+ description: string;
47
+ quantity: string;
48
+ unitPrice: string;
49
+ vatRate: string;
50
+ lineTotal: string;
51
+ vatSummary: string;
52
+ net: string;
53
+ vat: string;
54
+ total: string;
55
+ payment: string;
56
+ bank: string;
57
+ iban: string;
58
+ page: string;
59
+ }
60
+ /** The English labels — the fallback a caller replaces for any other language. */
61
+ declare const ENGLISH_SALES_INVOICE_LABELS: SalesInvoiceLabels;
62
+ interface SalesInvoiceDocumentProps {
63
+ seller: SalesInvoiceSeller;
64
+ buyer: SalesInvoiceBuyer;
65
+ invoiceNo: string;
66
+ docDate: Date;
67
+ dueDate: Date;
68
+ referenceNo?: string | undefined;
69
+ headerComment?: string | undefined;
70
+ footerComment?: string | undefined;
71
+ lines: readonly SalesInvoiceLine[];
72
+ /** ISO 4217 code, e.g. `EUR`. */
73
+ currency: string;
74
+ /** BCP 47 locale for dates and money, e.g. `et`. An unknown one falls back to ISO formats. */
75
+ locale: string;
76
+ labels?: SalesInvoiceLabels | undefined;
77
+ /** Drawn diagonally across EVERY page, e.g. "SIMULATED — NOT A REAL INVOICE". */
78
+ watermark?: string | undefined;
79
+ /** The same statement as text, printed under the title — what a screen reader reads. */
80
+ notice?: string | undefined;
81
+ }
82
+ /** Integer cents as money in the invoice's locale; ISO-ish fallback for an unknown locale. */
83
+ declare function formatMoney(cents: number, currency: string, locale: string): string;
84
+ /** A line's VAT-exclusive total, rounded the way Merit rounds it (half away from zero). */
85
+ declare function lineNetCents(line: Pick<SalesInvoiceLine, 'quantity' | 'unitPriceCents'>): number;
86
+ /** Net, VAT and gross for a set of lines, plus the VAT grouped by rate. */
87
+ declare function salesInvoiceTotals(lines: readonly SalesInvoiceLine[]): {
88
+ netCents: number;
89
+ vatCents: number;
90
+ grossCents: number;
91
+ byRate: {
92
+ ratePercent: number | undefined;
93
+ netCents: number;
94
+ vatCents: number;
95
+ }[];
96
+ };
97
+ /**
98
+ * Build the sales-invoice document tree. Pass the result to `PdfRenderer.render`
99
+ * with a pinned `creationDate` (the invoice date is the natural one).
100
+ *
101
+ * A FUNCTION returning the `<Document>` element, not a component: the renderer
102
+ * pins metadata onto the root element and refuses anything but a `<Document>`,
103
+ * so `<SalesInvoiceDocument />` would be rejected as a wrapper it cannot see into.
104
+ */
105
+ declare function salesInvoiceDocument(props: SalesInvoiceDocumentProps): ReactElement;
106
+ //#endregion
107
+ export { ENGLISH_SALES_INVOICE_LABELS, SalesInvoiceBuyer, SalesInvoiceDocumentProps, SalesInvoiceLabels, SalesInvoiceLine, SalesInvoiceSeller, formatMoney, lineNetCents, salesInvoiceDocument, salesInvoiceTotals };
108
+ //# sourceMappingURL=sales-invoice.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sales-invoice.d.mts","names":[],"sources":["../src/sales-invoice.tsx"],"mappings":";;;;UAoCiB,kBAAA;EACf,IAAA;EACA,KAAA;EACA,QAAA;EACA,OAAA;EACA,KAAA;EACA,KAAA;EACA,QAAA;EACA,IAAA;AAAA;;UAIe,iBAAA;EACf,IAAA;EACA,KAAA;EACA,QAAA;EACA,OAAA;EACA,KAAA;AAAA;;UAIe,gBAAA;EACf,WAAA;EACA,QAAA;EAsBA;EApBA,IAAA;EACA,cAAA;EAsBA;EApBA,QAAA;EAsBA;EApBA,cAAA;AAAA;;UAIe,kBAAA;EACf,KAAA;EACA,SAAA;EACA,OAAA;EACA,OAAA;EACA,WAAA;EACA,MAAA;EACA,KAAA;EACA,KAAA;EACA,QAAA;EACA,WAAA;EACA,QAAA;EACA,SAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,GAAA;EACA,GAAA;EACA,KAAA;EACA,OAAA;EACA,IAAA;EACA,IAAA;EACA,IAAA;AAAA;;cAIW,4BAAA,EAA8B,kBAuB1C;AAAA,UAEgB,yBAAA;EACf,MAAA,EAAQ,kBAAA;EACR,KAAA,EAAO,iBAAA;EACP,SAAA;EACA,OAAA,EAAS,IAAA;EACT,OAAA,EAAS,IAAA;EACT,WAAA;EACA,aAAA;EACA,aAAA;EACA,KAAA,WAAgB,gBAAA;EAIhB;EAFA,QAAA;EAGS;EADT,MAAA;EACA,MAAA,GAAS,kBAAA;EAIH;EAFN,SAAA;EA4Ec;EA1Ed,MAAA;AAAA;;iBA0Ec,WAAA,CAAY,KAAA,UAAe,QAAA,UAAkB,MAAA;;iBAmC7C,YAAA,CAAa,IAAA,EAAM,IAAI,CAAC,gBAAA;;iBAMxB,kBAAA,CAAmB,KAAA,WAAgB,gBAAgB;EACjE,QAAA;EACA,QAAA;EACA,UAAA;EACA,MAAA;IAAU,WAAA;IAAiC,QAAA;IAAkB,QAAA;EAAA;AAAA;AAJ/D;;;;;;;;AAAA,iBAsDgB,oBAAA,CAAqB,KAAA,EAAO,yBAAA,GAA4B,YAAY"}
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./fonts-BJpPf-Da.mjs";import{Document as t,Page as n,StyleSheet as r,Text as i,View as a}from"./primitives.mjs";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";const l={title:`Invoice`,invoiceNo:`Invoice no.`,docDate:`Date`,dueDate:`Due date`,referenceNo:`Reference no.`,seller:`Seller`,buyer:`Buyer`,regNo:`Reg. code`,vatRegNo:`VAT no.`,description:`Description`,quantity:`Qty`,unitPrice:`Unit price`,vatRate:`VAT`,lineTotal:`Total`,vatSummary:`VAT summary`,net:`Total without VAT`,vat:`VAT`,total:`Total due`,payment:`Payment details`,bank:`Bank`,iban:`IBAN`,page:`Page`},u=r.create({page:{fontFamily:e,fontSize:10,paddingTop:48,paddingBottom:64,paddingHorizontal:48,color:`#111111`},letterhead:{flexDirection:`row`,justifyContent:`space-between`},sellerName:{fontSize:14,fontWeight:`bold`},small:{fontSize:9,color:`#555555`,marginTop:2,lineHeight:1.3},title:{fontSize:18,fontWeight:`bold`,marginTop:18},notice:{fontSize:10,fontWeight:`bold`,color:`#b42318`,marginTop:4},meta:{flexDirection:`row`,marginTop:14},metaCol:{flex:1,paddingRight:12},label:{fontSize:8,color:`#666666`,textTransform:`uppercase`,marginTop:6},value:{fontSize:10,marginTop:2,lineHeight:1.3},comment:{fontSize:10,marginTop:12,lineHeight:1.3},tableHead:{flexDirection:`row`,marginTop:18,paddingBottom:4,borderBottomWidth:1,borderBottomColor:`#111111`},row:{flexDirection:`row`,paddingVertical:5,borderBottomWidth:1,borderBottomColor:`#e0e0e0`},colDesc:{flex:1,paddingRight:6},colQty:{width:`10%`,textAlign:`right`},colPrice:{width:`15%`,textAlign:`right`},colVat:{width:`10%`,textAlign:`right`},colTotal:{width:`15%`,textAlign:`right`},headCell:{fontSize:8,color:`#333333`,textTransform:`uppercase`},cell:{fontSize:10,lineHeight:1.3},totals:{marginTop:12,marginLeft:`50%`},totalRow:{flexDirection:`row`,paddingVertical:2},totalLabel:{flex:1,fontSize:10,color:`#333333`},totalValue:{width:`40%`,fontSize:10,textAlign:`right`},grandLabel:{flex:1,fontSize:12,fontWeight:`bold`},grandValue:{width:`40%`,fontSize:12,fontWeight:`bold`,textAlign:`right`},section:{marginTop:18},watermark:{position:`absolute`,top:380,left:-200,right:-200,transform:`rotate(-35deg)`,opacity:.14},watermarkText:{fontSize:34,fontWeight:`bold`,color:`#b42318`,textAlign:`center`},footer:{position:`absolute`,bottom:32,left:48,right:48,fontSize:8,color:`#666666`,textAlign:`center`}});function d(e,t,n){let r=e/100;try{return new Intl.NumberFormat(n,{style:`currency`,currency:t}).format(r)}catch{return`${r.toFixed(2)} ${t}`}}function f(e,t){try{return new Intl.DateTimeFormat(t,{year:`numeric`,month:`2-digit`,day:`2-digit`,timeZone:`UTC`}).format(e)}catch{return e.toISOString().slice(0,10)}}function p(e,t){try{return new Intl.NumberFormat(t,{maximumFractionDigits:3}).format(e)}catch{return String(e)}}function m(e){let t=e.unitPriceCents*e.quantity;return Math.sign(t)*Math.round(Math.abs(t))}function h(e){let t=new Map,n=0,r=0;for(let i of e){let e=m(i);n+=e,r+=i.vatCents;let a=i.vatRatePercent===void 0?`—`:String(i.vatRatePercent),o=t.get(a)??{ratePercent:i.vatRatePercent,netCents:0,vatCents:0};o.netCents+=e,o.vatCents+=i.vatCents,t.set(a,o)}return{netCents:n,vatCents:r,grossCents:n+r,byRate:[...t.values()]}}function g(e){return e!==void 0&&e.trim()!==``}function _(e){return e===void 0?`—`:`${e}%`}function v(e,t){let n=[];return g(e.address)&&n.push(e.address),g(e.regNo)&&n.push(`${t.regNo}: ${e.regNo}`),g(e.vatRegNo)&&n.push(`${t.vatRegNo}: ${e.vatRegNo}`),g(e.email)&&n.push(e.email),`phone`in e&&g(e.phone)&&n.push(e.phone),n}function y(e){let r=e.labels??l,{currency:y,locale:b}=e,x=e=>d(e,y,b),S=h(e.lines),C=`${r.title} ${e.invoiceNo}`;return s(t,{title:C,author:e.seller.name,language:b,children:c(n,{size:`A4`,style:u.page,children:[e.watermark!==void 0&&e.watermark!==``?s(a,{fixed:!0,style:u.watermark,children:s(i,{style:u.watermarkText,children:e.watermark})}):null,s(a,{style:u.letterhead,children:c(a,{style:u.metaCol,children:[s(i,{style:u.sellerName,children:e.seller.name}),[...v(e.seller,r).entries()].map(([e,t])=>s(i,{style:u.small,children:t},`seller-${e}`))]})}),s(i,{style:u.title,children:C}),g(e.notice)?s(i,{style:u.notice,children:e.notice}):null,c(a,{style:u.meta,children:[c(a,{style:u.metaCol,children:[s(i,{style:u.label,children:r.buyer}),s(i,{style:u.value,children:e.buyer.name}),[...v(e.buyer,r).entries()].map(([e,t])=>s(i,{style:u.small,children:t},`buyer-${e}`))]}),c(a,{style:u.metaCol,children:[s(i,{style:u.label,children:r.invoiceNo}),s(i,{style:u.value,children:e.invoiceNo}),s(i,{style:u.label,children:r.docDate}),s(i,{style:u.value,children:f(e.docDate,b)}),s(i,{style:u.label,children:r.dueDate}),s(i,{style:u.value,children:f(e.dueDate,b)}),g(e.referenceNo)?c(o,{children:[s(i,{style:u.label,children:r.referenceNo}),s(i,{style:u.value,children:e.referenceNo})]}):null]})]}),g(e.headerComment)?s(i,{style:u.comment,children:e.headerComment}):null,c(a,{style:u.tableHead,fixed:!0,children:[s(i,{style:[u.headCell,u.colDesc],children:r.description}),s(i,{style:[u.headCell,u.colQty],children:r.quantity}),s(i,{style:[u.headCell,u.colPrice],children:r.unitPrice}),s(i,{style:[u.headCell,u.colVat],children:r.vatRate}),s(i,{style:[u.headCell,u.colTotal],children:r.lineTotal})]}),[...e.lines.entries()].map(([e,t])=>c(a,{style:u.row,wrap:!1,children:[s(i,{style:[u.cell,u.colDesc],children:t.description}),s(i,{style:[u.cell,u.colQty],children:g(t.unit)?`${p(t.quantity,b)} ${t.unit}`:p(t.quantity,b)}),s(i,{style:[u.cell,u.colPrice],children:x(t.unitPriceCents)}),s(i,{style:[u.cell,u.colVat],children:_(t.vatRatePercent)}),s(i,{style:[u.cell,u.colTotal],children:x(m(t))})]},e)),c(a,{style:u.totals,wrap:!1,children:[S.byRate.map(e=>c(a,{style:u.totalRow,children:[s(i,{style:u.totalLabel,children:`${r.vatSummary} ${_(e.ratePercent)}: ${x(e.netCents)}`}),s(i,{style:u.totalValue,children:x(e.vatCents)})]},`rate-${_(e.ratePercent)}`)),c(a,{style:u.totalRow,children:[s(i,{style:u.totalLabel,children:r.net}),s(i,{style:u.totalValue,children:x(S.netCents)})]}),c(a,{style:u.totalRow,children:[s(i,{style:u.totalLabel,children:r.vat}),s(i,{style:u.totalValue,children:x(S.vatCents)})]}),c(a,{style:u.totalRow,children:[s(i,{style:u.grandLabel,children:r.total}),s(i,{style:u.grandValue,children:x(S.grossCents)})]})]}),g(e.seller.iban)||g(e.seller.bankName)?c(a,{style:u.section,wrap:!1,children:[s(i,{style:u.label,children:r.payment}),g(e.seller.bankName)?s(i,{style:u.value,children:`${r.bank}: ${e.seller.bankName}`}):null,g(e.seller.iban)?s(i,{style:u.value,children:`${r.iban}: ${e.seller.iban}`}):null,g(e.referenceNo)?s(i,{style:u.value,children:`${r.referenceNo}: ${e.referenceNo}`}):null]}):null,g(e.footerComment)?s(i,{style:u.comment,children:e.footerComment}):null,s(i,{style:u.footer,fixed:!0,render:({pageNumber:t,totalPages:n})=>`${e.seller.name} · ${C} · ${r.page} ${t}/${n}`})]})})}export{l as ENGLISH_SALES_INVOICE_LABELS,d as formatMoney,m as lineNetCents,y as salesInvoiceDocument,h as salesInvoiceTotals};
2
+ //# sourceMappingURL=sales-invoice.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sales-invoice.mjs","names":[],"sources":["../src/sales-invoice.tsx"],"sourcesContent":["/**\n * A generic SALES INVOICE document — seller letterhead, buyer, lines, VAT\n * summary, totals, payment details, and an optional watermark on every page.\n *\n * Still domain-free in the sense `@murumets-ee/pdf` promises: it knows what an\n * invoice LOOKS like, not where one comes from. It names no entity, no storage\n * and no accounting system; the caller hands it plain values (money in integer\n * cents) and every word it prints. First caller: `@murumets-ee/merit`'s\n * simulated mode (lumi-demo D008), which has to produce the PDF Merit would.\n *\n * ## Words are props, never literals\n *\n * A document is rendered where there is no request locale, so every label is in\n * {@link SalesInvoiceLabels}, chosen by the caller for the invoice's language.\n * {@link ENGLISH_SALES_INVOICE_LABELS} is the fallback, not a default the caller\n * is meant to keep.\n *\n * ## The watermark is decoration; the notice is the statement\n *\n * A watermark is drawn as a page artifact a screen reader may skip, and it can\n * be cropped, so the same statement belongs in the TEXT of the document too:\n * pass {@link SalesInvoiceDocumentProps.notice} and it prints under the title.\n *\n * ## The react-pdf landmines (recorded in commerce's delivery-note-document.tsx)\n *\n * 1. No `lineHeight` on the `page` style — set it on text styles instead.\n * 2. A `fixed` element is ONE `<Text>` (or a View holding one), never a flex row.\n * 3. No `fontStyle: 'italic'` — only Noto Sans 400/700 is registered.\n * `DEFAULT_FONT_FAMILY` is imported from `./fonts.js`, the module that defines it.\n */\n\nimport type { ReactElement } from 'react'\nimport { DEFAULT_FONT_FAMILY } from './fonts.js'\nimport { Document, Page, StyleSheet, Text, View } from './primitives.js'\n\n/** The party issuing the invoice — printed as the letterhead. Blank fields are skipped. */\nexport interface SalesInvoiceSeller {\n name: string\n regNo?: string | undefined\n vatRegNo?: string | undefined\n address?: string | undefined\n email?: string | undefined\n phone?: string | undefined\n bankName?: string | undefined\n iban?: string | undefined\n}\n\n/** The party being invoiced. Blank fields are skipped. */\nexport interface SalesInvoiceBuyer {\n name: string\n regNo?: string | undefined\n vatRegNo?: string | undefined\n address?: string | undefined\n email?: string | undefined\n}\n\n/** One invoice line. Money is integer cents, VAT-exclusive unless named otherwise. */\nexport interface SalesInvoiceLine {\n description: string\n quantity: number\n /** Unit name, e.g. `pcs`. */\n unit?: string | undefined\n unitPriceCents: number\n /** The line's VAT in cents, as the caller computed it — this document is not a tax engine. */\n vatCents: number\n /** The VAT rate as a percentage, for the line and the summary. Absent: printed as \"—\". */\n vatRatePercent?: number | undefined\n}\n\n/** Every word the document prints. */\nexport interface SalesInvoiceLabels {\n title: string\n invoiceNo: string\n docDate: string\n dueDate: string\n referenceNo: string\n seller: string\n buyer: string\n regNo: string\n vatRegNo: string\n description: string\n quantity: string\n unitPrice: string\n vatRate: string\n lineTotal: string\n vatSummary: string\n net: string\n vat: string\n total: string\n payment: string\n bank: string\n iban: string\n page: string\n}\n\n/** The English labels — the fallback a caller replaces for any other language. */\nexport const ENGLISH_SALES_INVOICE_LABELS: SalesInvoiceLabels = {\n title: 'Invoice',\n invoiceNo: 'Invoice no.',\n docDate: 'Date',\n dueDate: 'Due date',\n referenceNo: 'Reference no.',\n seller: 'Seller',\n buyer: 'Buyer',\n regNo: 'Reg. code',\n vatRegNo: 'VAT no.',\n description: 'Description',\n quantity: 'Qty',\n unitPrice: 'Unit price',\n vatRate: 'VAT',\n lineTotal: 'Total',\n vatSummary: 'VAT summary',\n net: 'Total without VAT',\n vat: 'VAT',\n total: 'Total due',\n payment: 'Payment details',\n bank: 'Bank',\n iban: 'IBAN',\n page: 'Page',\n}\n\nexport interface SalesInvoiceDocumentProps {\n seller: SalesInvoiceSeller\n buyer: SalesInvoiceBuyer\n invoiceNo: string\n docDate: Date\n dueDate: Date\n referenceNo?: string | undefined\n headerComment?: string | undefined\n footerComment?: string | undefined\n lines: readonly SalesInvoiceLine[]\n /** ISO 4217 code, e.g. `EUR`. */\n currency: string\n /** BCP 47 locale for dates and money, e.g. `et`. An unknown one falls back to ISO formats. */\n locale: string\n labels?: SalesInvoiceLabels | undefined\n /** Drawn diagonally across EVERY page, e.g. \"SIMULATED — NOT A REAL INVOICE\". */\n watermark?: string | undefined\n /** The same statement as text, printed under the title — what a screen reader reads. */\n notice?: string | undefined\n}\n\nconst styles = StyleSheet.create({\n // ⚠️ No `lineHeight` here — landmine 1.\n page: {\n fontFamily: DEFAULT_FONT_FAMILY,\n fontSize: 10,\n paddingTop: 48,\n paddingBottom: 64,\n paddingHorizontal: 48,\n color: '#111111',\n },\n letterhead: { flexDirection: 'row', justifyContent: 'space-between' },\n sellerName: { fontSize: 14, fontWeight: 'bold' },\n small: { fontSize: 9, color: '#555555', marginTop: 2, lineHeight: 1.3 },\n title: { fontSize: 18, fontWeight: 'bold', marginTop: 18 },\n notice: { fontSize: 10, fontWeight: 'bold', color: '#b42318', marginTop: 4 },\n meta: { flexDirection: 'row', marginTop: 14 },\n metaCol: { flex: 1, paddingRight: 12 },\n label: { fontSize: 8, color: '#666666', textTransform: 'uppercase', marginTop: 6 },\n value: { fontSize: 10, marginTop: 2, lineHeight: 1.3 },\n comment: { fontSize: 10, marginTop: 12, lineHeight: 1.3 },\n tableHead: {\n flexDirection: 'row',\n marginTop: 18,\n paddingBottom: 4,\n borderBottomWidth: 1,\n borderBottomColor: '#111111',\n },\n row: {\n flexDirection: 'row',\n paddingVertical: 5,\n borderBottomWidth: 1,\n borderBottomColor: '#e0e0e0',\n },\n colDesc: { flex: 1, paddingRight: 6 },\n colQty: { width: '10%', textAlign: 'right' },\n colPrice: { width: '15%', textAlign: 'right' },\n colVat: { width: '10%', textAlign: 'right' },\n colTotal: { width: '15%', textAlign: 'right' },\n headCell: { fontSize: 8, color: '#333333', textTransform: 'uppercase' },\n cell: { fontSize: 10, lineHeight: 1.3 },\n totals: { marginTop: 12, marginLeft: '50%' },\n totalRow: { flexDirection: 'row', paddingVertical: 2 },\n totalLabel: { flex: 1, fontSize: 10, color: '#333333' },\n totalValue: { width: '40%', fontSize: 10, textAlign: 'right' },\n grandLabel: { flex: 1, fontSize: 12, fontWeight: 'bold' },\n grandValue: { width: '40%', fontSize: 12, fontWeight: 'bold', textAlign: 'right' },\n section: { marginTop: 18 },\n // ⚠️ ONE `<Text>` inside, never a flex row — landmine 2.\n // Wider than the page on purpose: the text must stay ONE line once rotated —\n // a box the page's width wraps and hyphenates it (\"IN-VOICE\").\n watermark: {\n position: 'absolute',\n top: 380,\n left: -200,\n right: -200,\n transform: 'rotate(-35deg)',\n opacity: 0.14,\n },\n watermarkText: { fontSize: 34, fontWeight: 'bold', color: '#b42318', textAlign: 'center' },\n footer: {\n position: 'absolute',\n bottom: 32,\n left: 48,\n right: 48,\n fontSize: 8,\n color: '#666666',\n textAlign: 'center',\n },\n})\n\n/** Integer cents as money in the invoice's locale; ISO-ish fallback for an unknown locale. */\nexport function formatMoney(cents: number, currency: string, locale: string): string {\n const amount = cents / 100\n try {\n return new Intl.NumberFormat(locale, { style: 'currency', currency }).format(amount)\n } catch {\n // Not an empty catch: a plain amount and the code IS the fallback — a\n // document with an unformatted price beats a render that throws.\n return `${amount.toFixed(2)} ${currency}`\n }\n}\n\nfunction formatDay(date: Date, locale: string): string {\n try {\n return new Intl.DateTimeFormat(locale, {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n timeZone: 'UTC',\n }).format(date)\n } catch {\n // Not an empty catch: the ISO day is always correct, and it is the fallback.\n return date.toISOString().slice(0, 10)\n }\n}\n\nfunction formatQuantity(quantity: number, locale: string): string {\n try {\n return new Intl.NumberFormat(locale, { maximumFractionDigits: 3 }).format(quantity)\n } catch {\n // Not an empty catch: `String()` is the fallback for an unknown locale.\n return String(quantity)\n }\n}\n\n/** A line's VAT-exclusive total, rounded the way Merit rounds it (half away from zero). */\nexport function lineNetCents(line: Pick<SalesInvoiceLine, 'quantity' | 'unitPriceCents'>): number {\n const raw = line.unitPriceCents * line.quantity\n return Math.sign(raw) * Math.round(Math.abs(raw))\n}\n\n/** Net, VAT and gross for a set of lines, plus the VAT grouped by rate. */\nexport function salesInvoiceTotals(lines: readonly SalesInvoiceLine[]): {\n netCents: number\n vatCents: number\n grossCents: number\n byRate: { ratePercent: number | undefined; netCents: number; vatCents: number }[]\n} {\n const byRate = new Map<\n string,\n { ratePercent: number | undefined; netCents: number; vatCents: number }\n >()\n let netCents = 0\n let vatCents = 0\n for (const line of lines) {\n const net = lineNetCents(line)\n netCents += net\n vatCents += line.vatCents\n const key = line.vatRatePercent === undefined ? '—' : String(line.vatRatePercent)\n const group = byRate.get(key) ?? { ratePercent: line.vatRatePercent, netCents: 0, vatCents: 0 }\n group.netCents += net\n group.vatCents += line.vatCents\n byRate.set(key, group)\n }\n return { netCents, vatCents, grossCents: netCents + vatCents, byRate: [...byRate.values()] }\n}\n\nfunction present(value: string | undefined): value is string {\n return value !== undefined && value.trim() !== ''\n}\n\nfunction rate(ratePercent: number | undefined): string {\n return ratePercent === undefined ? '—' : `${ratePercent}%`\n}\n\nfunction partyLines(\n party: SalesInvoiceSeller | SalesInvoiceBuyer,\n labels: SalesInvoiceLabels,\n): string[] {\n const out: string[] = []\n if (present(party.address)) out.push(party.address)\n if (present(party.regNo)) out.push(`${labels.regNo}: ${party.regNo}`)\n if (present(party.vatRegNo)) out.push(`${labels.vatRegNo}: ${party.vatRegNo}`)\n if (present(party.email)) out.push(party.email)\n if ('phone' in party && present(party.phone)) out.push(party.phone)\n return out\n}\n\n/**\n * Build the sales-invoice document tree. Pass the result to `PdfRenderer.render`\n * with a pinned `creationDate` (the invoice date is the natural one).\n *\n * A FUNCTION returning the `<Document>` element, not a component: the renderer\n * pins metadata onto the root element and refuses anything but a `<Document>`,\n * so `<SalesInvoiceDocument />` would be rejected as a wrapper it cannot see into.\n */\nexport function salesInvoiceDocument(props: SalesInvoiceDocumentProps): ReactElement {\n const labels = props.labels ?? ENGLISH_SALES_INVOICE_LABELS\n const { currency, locale } = props\n const money = (cents: number): string => formatMoney(cents, currency, locale)\n const totals = salesInvoiceTotals(props.lines)\n const title = `${labels.title} ${props.invoiceNo}`\n\n return (\n <Document title={title} author={props.seller.name} language={locale}>\n <Page size=\"A4\" style={styles.page}>\n {props.watermark !== undefined && props.watermark !== '' ? (\n <View fixed style={styles.watermark}>\n <Text style={styles.watermarkText}>{props.watermark}</Text>\n </View>\n ) : null}\n\n <View style={styles.letterhead}>\n <View style={styles.metaCol}>\n <Text style={styles.sellerName}>{props.seller.name}</Text>\n {[...partyLines(props.seller, labels).entries()].map(([position, line]) => (\n // Keyed by position: two party lines may read the same.\n <Text key={`seller-${position}`} style={styles.small}>\n {line}\n </Text>\n ))}\n </View>\n </View>\n\n <Text style={styles.title}>{title}</Text>\n {present(props.notice) ? <Text style={styles.notice}>{props.notice}</Text> : null}\n\n <View style={styles.meta}>\n <View style={styles.metaCol}>\n <Text style={styles.label}>{labels.buyer}</Text>\n <Text style={styles.value}>{props.buyer.name}</Text>\n {[...partyLines(props.buyer, labels).entries()].map(([position, line]) => (\n // Keyed by position: two party lines may read the same.\n <Text key={`buyer-${position}`} style={styles.small}>\n {line}\n </Text>\n ))}\n </View>\n <View style={styles.metaCol}>\n <Text style={styles.label}>{labels.invoiceNo}</Text>\n <Text style={styles.value}>{props.invoiceNo}</Text>\n <Text style={styles.label}>{labels.docDate}</Text>\n <Text style={styles.value}>{formatDay(props.docDate, locale)}</Text>\n <Text style={styles.label}>{labels.dueDate}</Text>\n <Text style={styles.value}>{formatDay(props.dueDate, locale)}</Text>\n {present(props.referenceNo) ? (\n <>\n <Text style={styles.label}>{labels.referenceNo}</Text>\n <Text style={styles.value}>{props.referenceNo}</Text>\n </>\n ) : null}\n </View>\n </View>\n\n {present(props.headerComment) ? (\n <Text style={styles.comment}>{props.headerComment}</Text>\n ) : null}\n\n <View style={styles.tableHead} fixed>\n <Text style={[styles.headCell, styles.colDesc]}>{labels.description}</Text>\n <Text style={[styles.headCell, styles.colQty]}>{labels.quantity}</Text>\n <Text style={[styles.headCell, styles.colPrice]}>{labels.unitPrice}</Text>\n <Text style={[styles.headCell, styles.colVat]}>{labels.vatRate}</Text>\n <Text style={[styles.headCell, styles.colTotal]}>{labels.lineTotal}</Text>\n </View>\n {[...props.lines.entries()].map(([position, line]) => (\n // `wrap={false}`: a line never splits across a page boundary. Keyed by\n // position: lines are a fixed, ordered list with no identity of their own.\n <View key={position} style={styles.row} wrap={false}>\n <Text style={[styles.cell, styles.colDesc]}>{line.description}</Text>\n <Text style={[styles.cell, styles.colQty]}>\n {present(line.unit)\n ? `${formatQuantity(line.quantity, locale)} ${line.unit}`\n : formatQuantity(line.quantity, locale)}\n </Text>\n <Text style={[styles.cell, styles.colPrice]}>{money(line.unitPriceCents)}</Text>\n <Text style={[styles.cell, styles.colVat]}>{rate(line.vatRatePercent)}</Text>\n <Text style={[styles.cell, styles.colTotal]}>{money(lineNetCents(line))}</Text>\n </View>\n ))}\n\n <View style={styles.totals} wrap={false}>\n {totals.byRate.map((group) => (\n <View key={`rate-${rate(group.ratePercent)}`} style={styles.totalRow}>\n <Text style={styles.totalLabel}>\n {`${labels.vatSummary} ${rate(group.ratePercent)}: ${money(group.netCents)}`}\n </Text>\n <Text style={styles.totalValue}>{money(group.vatCents)}</Text>\n </View>\n ))}\n <View style={styles.totalRow}>\n <Text style={styles.totalLabel}>{labels.net}</Text>\n <Text style={styles.totalValue}>{money(totals.netCents)}</Text>\n </View>\n <View style={styles.totalRow}>\n <Text style={styles.totalLabel}>{labels.vat}</Text>\n <Text style={styles.totalValue}>{money(totals.vatCents)}</Text>\n </View>\n <View style={styles.totalRow}>\n <Text style={styles.grandLabel}>{labels.total}</Text>\n <Text style={styles.grandValue}>{money(totals.grossCents)}</Text>\n </View>\n </View>\n\n {present(props.seller.iban) || present(props.seller.bankName) ? (\n <View style={styles.section} wrap={false}>\n <Text style={styles.label}>{labels.payment}</Text>\n {present(props.seller.bankName) ? (\n <Text style={styles.value}>{`${labels.bank}: ${props.seller.bankName}`}</Text>\n ) : null}\n {present(props.seller.iban) ? (\n <Text style={styles.value}>{`${labels.iban}: ${props.seller.iban}`}</Text>\n ) : null}\n {present(props.referenceNo) ? (\n <Text style={styles.value}>{`${labels.referenceNo}: ${props.referenceNo}`}</Text>\n ) : null}\n </View>\n ) : null}\n\n {present(props.footerComment) ? (\n <Text style={styles.comment}>{props.footerComment}</Text>\n ) : null}\n\n <Text\n style={styles.footer}\n fixed\n render={({ pageNumber, totalPages }) =>\n `${props.seller.name} · ${title} · ${labels.page} ${pageNumber}/${totalPages}`\n }\n />\n </Page>\n </Document>\n )\n}\n"],"mappings":"mMAgGA,MAAa,EAAmD,CAC9D,MAAO,UACP,UAAW,cACX,QAAS,OACT,QAAS,WACT,YAAa,gBACb,OAAQ,SACR,MAAO,QACP,MAAO,YACP,SAAU,UACV,YAAa,cACb,SAAU,MACV,UAAW,aACX,QAAS,MACT,UAAW,QACX,WAAY,cACZ,IAAK,oBACL,IAAK,MACL,MAAO,YACP,QAAS,kBACT,KAAM,OACN,KAAM,OACN,KAAM,MACR,EAuBM,EAAS,EAAW,OAAO,CAE/B,KAAM,CACJ,WAAY,EACZ,SAAU,GACV,WAAY,GACZ,cAAe,GACf,kBAAmB,GACnB,MAAO,SACT,EACA,WAAY,CAAE,cAAe,MAAO,eAAgB,eAAgB,EACpE,WAAY,CAAE,SAAU,GAAI,WAAY,MAAO,EAC/C,MAAO,CAAE,SAAU,EAAG,MAAO,UAAW,UAAW,EAAG,WAAY,GAAI,EACtE,MAAO,CAAE,SAAU,GAAI,WAAY,OAAQ,UAAW,EAAG,EACzD,OAAQ,CAAE,SAAU,GAAI,WAAY,OAAQ,MAAO,UAAW,UAAW,CAAE,EAC3E,KAAM,CAAE,cAAe,MAAO,UAAW,EAAG,EAC5C,QAAS,CAAE,KAAM,EAAG,aAAc,EAAG,EACrC,MAAO,CAAE,SAAU,EAAG,MAAO,UAAW,cAAe,YAAa,UAAW,CAAE,EACjF,MAAO,CAAE,SAAU,GAAI,UAAW,EAAG,WAAY,GAAI,EACrD,QAAS,CAAE,SAAU,GAAI,UAAW,GAAI,WAAY,GAAI,EACxD,UAAW,CACT,cAAe,MACf,UAAW,GACX,cAAe,EACf,kBAAmB,EACnB,kBAAmB,SACrB,EACA,IAAK,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,EAAO,KAAK,IAAI,EAAM,OAAO,UAAiB,CAAA,EAC3E,KACH,EAAQ,EAAM,OAAO,IAAI,EACxB,EAAC,EAAD,CAAM,MAAO,EAAO,eAAQ,GAAG,EAAO,KAAK,IAAI,EAAM,OAAO,MAAa,CAAA,EACvE,KACH,EAAQ,EAAM,WAAW,EACxB,EAAC,EAAD,CAAM,MAAO,EAAO,eAAQ,GAAG,EAAO,YAAY,IAAI,EAAM,aAAoB,CAAA,EAC9E,IACA,IACJ,KAEH,EAAQ,EAAM,aAAa,EAC1B,EAAC,EAAD,CAAM,MAAO,EAAO,iBAAU,EAAM,aAAoB,CAAA,EACtD,KAEJ,EAAC,EAAD,CACE,MAAO,EAAO,OACd,MAAA,GACA,QAAS,CAAE,aAAY,gBACrB,GAAG,EAAM,OAAO,KAAK,KAAK,EAAM,KAAK,EAAO,KAAK,GAAG,EAAW,GAAG,GAErE,CAAA,CACG,GACE,CAAA,CAEd"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@murumets-ee/pdf",
3
- "version": "0.114.0",
3
+ "version": "0.116.0",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -11,6 +11,10 @@
11
11
  "./primitives": {
12
12
  "types": "./dist/primitives.d.mts",
13
13
  "import": "./dist/primitives.mjs"
14
+ },
15
+ "./sales-invoice": {
16
+ "types": "./dist/sales-invoice.d.mts",
17
+ "import": "./dist/sales-invoice.mjs"
14
18
  }
15
19
  },
16
20
  "files": [