@design.estate/dees-document 3.1.2 → 3.3.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,103 @@
1
+ const EN_unitNames = {
2
+ locale: "en",
3
+ names: {
4
+ // counts
5
+ C62: { one: "unit", other: "units" },
6
+ H87: { one: "piece", other: "pieces" },
7
+ XPP: { one: "piece", other: "pieces" },
8
+ PR: { one: "pair", other: "pairs" },
9
+ E48: { one: "service unit", other: "service units" },
10
+ LS: { one: "lump sum", other: "lump sums" },
11
+ // time
12
+ MIN: { one: "minute", other: "minutes" },
13
+ HUR: { one: "hour", other: "hours" },
14
+ DAY: { one: "day", other: "days" },
15
+ WEE: { one: "week", other: "weeks" },
16
+ MON: { one: "month", other: "months" },
17
+ ANN: { one: "year", other: "years" },
18
+ // mass
19
+ GRM: { one: "gram", other: "grams" },
20
+ KGM: { one: "kilogram", other: "kilograms" },
21
+ TNE: { one: "tonne", other: "tonnes" },
22
+ // length, area, volume
23
+ MTR: { one: "metre", other: "metres" },
24
+ KMT: { one: "kilometre", other: "kilometres" },
25
+ MTK: { one: "square metre", other: "square metres" },
26
+ MTQ: { one: "cubic metre", other: "cubic metres" },
27
+ LTR: { one: "litre", other: "litres" },
28
+ // energy
29
+ KWH: { one: "kilowatt hour", other: "kilowatt hours" },
30
+ },
31
+ };
32
+ const DE_unitNames = {
33
+ locale: "de",
34
+ names: {
35
+ // counts
36
+ C62: { one: "Einheit", other: "Einheiten" },
37
+ H87: { one: "Stück", other: "Stück" },
38
+ XPP: { one: "Stück", other: "Stück" },
39
+ PR: { one: "Paar", other: "Paar" },
40
+ E48: { one: "Leistungseinheit", other: "Leistungseinheiten" },
41
+ LS: { one: "Pauschale", other: "Pauschalen" },
42
+ // time
43
+ MIN: { one: "Minute", other: "Minuten" },
44
+ HUR: { one: "Stunde", other: "Stunden" },
45
+ DAY: { one: "Tag", other: "Tage" },
46
+ WEE: { one: "Woche", other: "Wochen" },
47
+ MON: { one: "Monat", other: "Monate" },
48
+ ANN: { one: "Jahr", other: "Jahre" },
49
+ // mass
50
+ GRM: { one: "Gramm", other: "Gramm" },
51
+ KGM: { one: "Kilogramm", other: "Kilogramm" },
52
+ TNE: { one: "Tonne", other: "Tonnen" },
53
+ // length, area, volume
54
+ MTR: { one: "Meter", other: "Meter" },
55
+ KMT: { one: "Kilometer", other: "Kilometer" },
56
+ MTK: { one: "Quadratmeter", other: "Quadratmeter" },
57
+ MTQ: { one: "Kubikmeter", other: "Kubikmeter" },
58
+ LTR: { one: "Liter", other: "Liter" },
59
+ // energy
60
+ KWH: { one: "Kilowattstunde", other: "Kilowattstunden" },
61
+ },
62
+ };
63
+ /**
64
+ * The decimals a quantity carries: those of its shortest representation, the
65
+ * one `String()` gives, so 12.5 has one and 1.0000001 has seven. NaN and
66
+ * Infinity have none. Capped at 100, the most `Intl` formats.
67
+ */
68
+ export const quantityFractionDigits = (quantity) => {
69
+ const digits = /^(\d+)(?:\.(\d+))?(?:e([+-]\d+))?$/.exec(String(Math.abs(quantity)));
70
+ if (!digits) {
71
+ return 0;
72
+ }
73
+ return Math.min(100, Math.max(0, (digits[2] ?? "").length - Number(digits[3] ?? 0)));
74
+ };
75
+ /** Unit names by document language code, keyed like `translation.languageCodeMap`. */
76
+ export const unitNameTables = {
77
+ EN: EN_unitNames,
78
+ DE: DE_unitNames,
79
+ };
80
+ /**
81
+ * The unit of a position as the document prints it: the name of a known code in
82
+ * the document's language, in the singular or plural the quantity asks for, and
83
+ * anything else as it is. The plural rules see every decimal the quantity
84
+ * carries, so 1.0001 hours are "hours", not "hour". A language without its own names takes the English
85
+ * ones, as `translation.translate()` does for every other word.
86
+ */
87
+ export const unitName = (languageCode, unitType, quantity) => {
88
+ const table = (languageCode && unitNameTables[languageCode]) || EN_unitNames;
89
+ const name = Object.hasOwn(table.names, unitType)
90
+ ? table.names[unitType]
91
+ : undefined;
92
+ if (!name) {
93
+ return unitType;
94
+ }
95
+ const fractionDigits = quantityFractionDigits(quantity);
96
+ return new Intl.PluralRules(table.locale, {
97
+ minimumFractionDigits: fractionDigits,
98
+ maximumFractionDigits: fractionDigits,
99
+ }).select(quantity) === "one"
100
+ ? name.one
101
+ : name.other;
102
+ };
103
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5pdG5hbWVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHNfc2hhcmVkL3VuaXRuYW1lcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQ0EsTUFBTSxZQUFZLEdBQW1CO0lBQ25DLE1BQU0sRUFBRSxJQUFJO0lBQ1osS0FBSyxFQUFFO1FBQ0wsU0FBUztRQUNULEdBQUcsRUFBRSxFQUFFLEdBQUcsRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLE9BQU8sRUFBRTtRQUNwQyxHQUFHLEVBQUUsRUFBRSxHQUFHLEVBQUUsT0FBTyxFQUFFLEtBQUssRUFBRSxRQUFRLEVBQUU7UUFDdEMsR0FBRyxFQUFFLEVBQUUsR0FBRyxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsUUFBUSxFQUFFO1FBQ3RDLEVBQUUsRUFBRSxFQUFFLEdBQUcsRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLE9BQU8sRUFBRTtRQUNuQyxHQUFHLEVBQUUsRUFBRSxHQUFHLEVBQUUsY0FBYyxFQUFFLEtBQUssRUFBRSxlQUFlLEVBQUU7UUFDcEQsRUFBRSxFQUFFLEVBQUUsR0FBRyxFQUFFLFVBQVUsRUFBRSxLQUFLLEVBQUUsV0FBVyxFQUFFO1FBQzNDLE9BQU87UUFDUCxHQUFHLEVBQUUsRUFBRSxHQUFHLEVBQUUsUUFBUSxFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUU7UUFDeEMsR0FBRyxFQUFFLEVBQUUsR0FBRyxFQUFFLE1BQU0sRUFBRSxLQUF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FBQyxDQUFDLFNBQVMsQ0FBQztJQUNkLElBQUksQ0FBQyxJQUFJLEVBQUUsQ0FBQztRQUNWLE9BQU8sUUFBUSxDQUFDO0lBQ2xCLENBQUM7SUFDRCxNQUFNLGNBQWMsR0FBRyxzQkFBc0IsQ0FBQyxRQUFRLENBQUMsQ0FBQztJQUN4RCxPQUFPLElBQUksSUFBSSxDQUFDLFdBQVcsQ0FBQyxLQUFLLENBQUMsTUFBTSxFQUFFO1FBQ3hDLHFCQUFxQixFQUFFLGNBQWM7UUFDckMscUJBQXFCLEVBQUUsY0FBYztLQUN0QyxDQUFDLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxLQUFLLEtBQUs7UUFDM0IsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHO1FBQ1YsQ0FBQyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUM7QUFDakIsQ0FBQyxDQUFDIn0=
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-document',
6
- version: '3.1.2',
6
+ version: '3.3.0',
7
7
  description: 'A sophisticated framework for dynamically generating and rendering business documents like invoices with modern web technologies, featuring PDF creation, templating, and automation.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHNfd2ViLzAwX2NvbW1pdGluZm9fZGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUNILE1BQU0sQ0FBQyxNQUFNLFVBQVUsR0FBRztJQUN4QixJQUFJLEVBQUUsOEJBQThCO0lBQ3BDLE9BQU8sRUFBRSxPQUFPO0lBQ2hCLFdBQVcsRUFBRSx1TEFBdUw7Q0FDck0sQ0FBQSJ9
@@ -19,6 +19,10 @@ export declare class DeContentInvoice extends DeesElement {
19
19
  * gates the number row and the period row of the letterhead.
20
20
  */
21
21
  private get accountingDoc();
22
+ /** The payment reminder this content prints, or null. */
23
+ private get paymentReminder();
24
+ /** The currency of the letter's amounts: an accounting document's or a reminder's. */
25
+ private get currency();
22
26
  /**
23
27
  * The document builds this element for every letter; one that is no
24
28
  * accounting document, and one of a type this version does not know, keep
@@ -35,6 +39,18 @@ export declare class DeContentInvoice extends DeesElement {
35
39
  * an unknown or missing currency falls back to a plain decimal number.
36
40
  */
37
41
  protected formatPrice(value: number): string;
42
+ /**
43
+ * Formats a quantity in the document's language with every decimal it
44
+ * carries: 12.5 prints as "12,5" in German and "12.5" in English, and no
45
+ * stated quantity is rounded. The decimals are those of the shortest
46
+ * representation of the number, the one `String()` gives, as the unit name
47
+ * counts them for its singular or plural.
48
+ */
49
+ protected formatQuantity(quantityArg: number): string;
50
+ /** Formats a rate in percent, with as many decimals as it states, up to four. */
51
+ protected formatPercent(percentArg: number): string;
52
+ /** Formats a day in the document's language and date style. */
53
+ protected formatDay(timestampArg: number): string;
38
54
  getTotalNet: () => number;
39
55
  getTotalGross: () => number;
40
56
  getVatGroups: () => {
@@ -58,9 +74,36 @@ export declare class DeContentInvoice extends DeesElement {
58
74
  * Apply pre-computed pagination offsets for thumbnail rendering
59
75
  */
60
76
  private applyOffsetTrimming;
61
- /** The due date, which only an accounting document has: it counts from its date. */
77
+ /**
78
+ * The due date, which only an accounting document and a payment reminder
79
+ * have: it counts `dueInDays` from the letter's date.
80
+ */
62
81
  private renderPaymentTerms;
82
+ /**
83
+ * The QR pay box. It is printed only when the payment has a valid EPC QR
84
+ * code: a euro amount to the sender's IBAN, which a document in another
85
+ * currency or without the sender's IBAN does not have.
86
+ */
63
87
  private renderPaymentInfo;
88
+ /**
89
+ * The reverse-charge statement. § 14a UStG requires the words
90
+ * "Steuerschuldnerschaft des Leistungsempfängers": Abs. 5 for a domestic
91
+ * supply whose recipient owes the tax under § 13b, Abs. 1 for a supply in
92
+ * another member state whose recipient owes the tax there, such as a
93
+ * business-to-business service under Art. 196 of the VAT Directive. They are
94
+ * printed on every reverse-charge document, and a document in another language adds its own
95
+ * line, in English "Reverse charge", the words of Art. 226 Nr. 11a of the VAT
96
+ * Directive (2006/112/EC).
97
+ */
98
+ private renderReverseChargeNote;
99
+ /**
100
+ * What makes a corrected invoice a correction (§ 31 Abs. 5 UStDV): its
101
+ * title, the invoice it corrects by number and issue date when the document
102
+ * states them ("spezifisch und eindeutig", Satz 2), and the details it
103
+ * supplies or corrects, in words. A received corrected invoice may name
104
+ * neither; then only the title is printed, and no reference is made up.
105
+ */
106
+ private renderCorrection;
64
107
  /** The earlier documents a correction answers, by number and, when known, by date. */
65
108
  private renderRelatedDocuments;
66
109
  /**
@@ -70,6 +113,51 @@ export declare class DeContentInvoice extends DeesElement {
70
113
  * paragraph in one piece could be taller than a page and would never fit.
71
114
  */
72
115
  private renderNotes;
116
+ /**
117
+ * The document a reminder claims, as the claims table and the charges name
118
+ * it: its kind and its number.
119
+ */
120
+ private claimLabel;
121
+ /**
122
+ * The ground of the claim: every reminded document with its number, its
123
+ * date, the date it fell due when it stated one, its gross total and what is
124
+ * still open on it.
125
+ */
126
+ private renderReminderClaims;
127
+ /**
128
+ * What a charge rests on, as the reminder states it: default interest its
129
+ * computation (principal, rate a year with the base rate and the surcharge
130
+ * points of § 288 Abs. 1 or 2 BGB, first and last day), the default lump sum
131
+ * its provision, and every charge the claim it accrues on. A cost with lump
132
+ * sums credited against it lists them (§ 288 Abs. 5 Satz 3 BGB); its amount
133
+ * is already the cost less them.
134
+ */
135
+ private renderChargeBasis;
136
+ /** One row per charge: its description, what it rests on, and its amount. */
137
+ private renderReminderCharges;
138
+ /** The sums of a reminder: the open claims, the charges and the total payable, without VAT. */
139
+ private renderReminderSums;
140
+ /**
141
+ * A payment reminder: the issuer's intro or the standard one, the reminded
142
+ * documents, the charges, the sums, the notes, the new payment deadline and
143
+ * the QR pay box for the total payable with the reminder's number.
144
+ */
145
+ private renderPaymentReminder;
73
146
  private renderReferencedContract;
74
147
  attachInvoiceDom(): Promise<void>;
148
+ /**
149
+ * Sizes the columns of a table to their widest cell. Every row is a grid of
150
+ * its own, so the rows only line up when a column has one width for all of
151
+ * them; each page renders every row before it is trimmed, so every page
152
+ * measures the same widths.
153
+ *
154
+ * A column is never narrower than its minimum. The widths the columns ask
155
+ * for beyond their minimums are granted out of the row's width less its
156
+ * fixed columns and the minimum of its flexible column (the description),
157
+ * in equal shares, so the table always fits the page. A cell whose text is
158
+ * still wider than its column, such as an amount beyond hundreds of
159
+ * billions, is set in a smaller font, down to 8 px, and wraps inside its
160
+ * column once that is not enough, so it never runs into its neighbour.
161
+ */
162
+ private fitColumns;
75
163
  }