@formancy/report-core 0.2.0 → 0.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.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import { AggregateDef, AssetRef, Component, ComponentKind, DatasetContract, DatasetRole, FieldContract, FieldType, Format, GROUP_KEY, Margins, Orientation, PageSizeName, ParameterDef, PrintStyle, RegionName, ReportDefinition, ReportError, SortKey, TableColumn, TableFooterCell, TableFooterRow, TableGroup, ValueScope } from "@formancy/report-spec";
1
+ import { AggregateDef, AssetRef, ChartSeries, Component, ComponentKind, DatasetContract, DatasetRole, EInvoice, Expression, FacturXInvoice, FieldContract, FieldType, Format, Margins, Orientation, PageSizeName, ParameterDef, PaymentPart, PrintStyle, RegionName, ReportDefinition, ReportError, SortKey, TableColumn, TableFooterCell, TableFooterRow, TableGroup, ValueScope, WordExpressionSite, XRechnungInvoice } from "@formancy/report-spec";
2
2
  import { DeclaredType, Program, SourceSpan } from "@formancy/expressions";
3
- //#region src/outcome.d.ts
4
3
  /**
5
4
  * Why an edit was refused, as stable codes. A code is for a program -- the
6
5
  * builder decides what to say and where -- and the message is for a person.
@@ -8,7 +7,7 @@ import { DeclaredType, Program, SourceSpan } from "@formancy/expressions";
8
7
  * new reason gets a new code. Each has a case in `outcome.test.ts` that is
9
8
  * refused with it, which does not compile while one is missing.
10
9
  */
11
- export declare const REFUSAL_CODES: readonly ["not-found", "not-a-container", "invalid-location", "index-out-of-range", "into-itself", "kind-mismatch", "immutable-property", "already-declared", "unknown-command", "invalid-arguments", "invalid-document", "stale-document"];
10
+ export declare const REFUSAL_CODES: readonly ["not-found", "not-a-container", "invalid-location", "index-out-of-range", "into-itself", "kind-mismatch", "immutable-property", "already-declared", "unknown-command", "invalid-arguments", "invalid-document", "stale-document", "read-from-data", "read-by-part"];
12
11
  type RefusalCode = (typeof REFUSAL_CODES)[number];
13
12
  interface Refusal {
14
13
  readonly ok: false;
@@ -28,8 +27,6 @@ type CommandOutcome<E extends object = object> = ({
28
27
  } & Readonly<E>) | Refusal;
29
28
  /** An edit, bound to its arguments: what the session applies. */
30
29
  type Command<E extends object = object> = (report: ReportDefinition) => CommandOutcome<E>;
31
- //#endregion
32
- //#region src/lists.d.ts
33
30
  /**
34
31
  * A change to some of an object's properties. A value sets a property;
35
32
  * `null` removes one that is optional. A required property cannot be given
@@ -40,8 +37,6 @@ type Command<E extends object = object> = (report: ReportDefinition) => CommandO
40
37
  * removal written with undefined would arrive as no change at all.
41
38
  */
42
39
  type Patch<T> = { readonly [K in keyof T]?: undefined extends T[K] ? Exclude<T[K], undefined> | null : T[K]; };
43
- //#endregion
44
- //#region src/tree.d.ts
45
40
  /**
46
41
  * Where a component goes: a position in a region's list, or in the list a
47
42
  * container holds -- a section's, a keep-together block's, or one column's
@@ -55,8 +50,6 @@ interface Location {
55
50
  readonly column?: number;
56
51
  readonly index: number;
57
52
  }
58
- //#endregion
59
- //#region src/commands/components.d.ts
60
53
  /**
61
54
  * A change to a component of kind `K`: any of its own properties, but never
62
55
  * its id or its kind. Typed per kind, so a patch for a text cannot carry a
@@ -93,8 +86,6 @@ export declare function nextComponentId(report: ReportDefinition, prefix: string
93
86
  export declare function duplicateComponent(report: ReportDefinition, id: string): CommandOutcome<{
94
87
  readonly id: string;
95
88
  }>;
96
- //#endregion
97
- //#region src/commands/declarations.d.ts
98
89
  export declare function putStyle(report: ReportDefinition, id: string, style: Omit<PrintStyle, 'id'>): CommandOutcome;
99
90
  export declare function removeStyle(report: ReportDefinition, id: string): CommandOutcome;
100
91
  export declare function putParameter(report: ReportDefinition, id: string, parameter: Omit<ParameterDef, 'id'>): CommandOutcome;
@@ -124,8 +115,6 @@ export declare function putDataset(report: ReportDefinition, slot: DatasetRole,
124
115
  export declare function removeDataset(report: ReportDefinition, slot: DatasetRole): CommandOutcome;
125
116
  export declare function putField(report: ReportDefinition, slot: DatasetRole, fieldId: string, field: Omit<FieldContract, 'id'>): CommandOutcome;
126
117
  export declare function removeField(report: ReportDefinition, slot: DatasetRole, fieldId: string): CommandOutcome;
127
- //#endregion
128
- //#region src/commands/document.d.ts
129
118
  export declare function setTitle(report: ReportDefinition, title: string): CommandOutcome;
130
119
  export declare function setLocale(report: ReportDefinition, locale: string): CommandOutcome;
131
120
  /** A change to the page: its size, its orientation, any of its margins. */
@@ -141,8 +130,94 @@ export declare function setPage(report: ReportDefinition, patch: PagePatch): Com
141
130
  * records it as one undo step like any other.
142
131
  */
143
132
  export declare function replaceDocument(_report: ReportDefinition, next: ReportDefinition): CommandOutcome;
144
- //#endregion
145
- //#region src/commands/table.d.ts
133
+ /**
134
+ * A change to some of an e-invoice's terms, but never its kind: `null`
135
+ * removes an optional one, as JSON carries a removal. A term of the other
136
+ * kind -- an XRechnung's version in a Factur-X invoice -- is the
137
+ * validator's to refuse.
138
+ */
139
+ type EInvoicePatch = Patch<Omit<FacturXInvoice, 'kind'>> & Patch<Pick<XRechnungInvoice, 'version'>>;
140
+ /** The report with `invoice` for its e-invoice: added where it has none, in place of the one it has otherwise. */
141
+ export declare function putEInvoice(report: ReportDefinition, invoice: EInvoice): CommandOutcome;
142
+ /** The report without its e-invoice. */
143
+ export declare function removeEInvoice(report: ReportDefinition): CommandOutcome;
144
+ /** The report's e-invoice with `patch` applied; its kind never changes in place. */
145
+ export declare function updateEInvoice(report: ReportDefinition, patch: EInvoicePatch): CommandOutcome;
146
+ /**
147
+ * The report with `account` as the account its e-invoice names (BT-84)
148
+ * and every payment code printed with it asks to be paid to -- its
149
+ * QR-bill's and each EPC QR code's, shown or hidden -- each as one literal
150
+ * run, as typed: one edit, so one undo step, where an edit of any one of
151
+ * them alone is refused, since report-spec holds each code to BT-84 (0027).
152
+ * Refused where the report has no e-invoice, whose codes share no account,
153
+ * or one that names no account; and where one of them reads its account
154
+ * from the data, which this would write over. Whether the account is one
155
+ * each place takes -- an IBAN of SEPA's, a QR-bill's of Switzerland or
156
+ * Liechtenstein, no QR-IBAN in euro -- the validator says, each place by
157
+ * its own rule. A BIC is left as it is: no rule holds a code's to BT-86.
158
+ */
159
+ export declare function setPaymentAccount(report: ReportDefinition, account: string): CommandOutcome;
160
+ /** The report with `components` for page 1's own header: added where it has none, in place of the one it has otherwise; none, page 1 prints no header. */
161
+ export declare function putFirstPageHeader(report: ReportDefinition, components: readonly Component[]): CommandOutcome;
162
+ /** The report without page 1's own header, what it holds with it: page 1 prints the page header again. */
163
+ export declare function removeFirstPageHeader(report: ReportDefinition): CommandOutcome;
164
+ /** A change to some of a bill's properties, but never its kind: `null` removes an optional one, as JSON carries a removal. */
165
+ type PaymentPartPatch = Patch<Omit<PaymentPart, 'kind'>>;
166
+ /** The report with `part` for its payment part: added where it has none, in place of the one it has otherwise. */
167
+ export declare function putPaymentPart(report: ReportDefinition, part: PaymentPart): CommandOutcome;
168
+ /** The report without its payment part. */
169
+ export declare function removePaymentPart(report: ReportDefinition): CommandOutcome;
170
+ /** The report's payment part with `patch` applied; its kind never changes in place. */
171
+ export declare function updatePaymentPart(report: ReportDefinition, patch: PaymentPartPatch): CommandOutcome;
172
+ /** What reads each field of one report, from one walk of it and one reading of each of its expressions (0048). */
173
+ interface FieldReaders {
174
+ /** The field removed with everything that reads it: what `removeFieldWithReaders` gives, without walking the report again. */
175
+ readonly removal: (slot: DatasetRole, fieldId: string) => CommandOutcome<{
176
+ readonly removed: readonly string[];
177
+ }>;
178
+ /**
179
+ * The expressions, by the JSON Pointer to their `cel`, whose compilation
180
+ * a change of the field's type, or of whether it may be null, can
181
+ * change: each that reads it, each that reads an aggregate that reads
182
+ * it, in turn, and, for a field a table is grouped by, each that reads
183
+ * that table's group's key (0062). `compileReport(report, them)`
184
+ * compiles them alone.
185
+ */
186
+ readonly expressions: (slot: DatasetRole, fieldId: string) => ReadonlySet<string>;
187
+ }
188
+ /** What reads each field of `report`, walked once and its expressions read once, for a review that asks of many fields. */
189
+ export declare function fieldReaders(report: ReportDefinition): FieldReaders;
190
+ /**
191
+ * The field `fieldId` of the dataset in `slot` removed, with every
192
+ * component, column, style rule, footer cell and row, sort key, group and
193
+ * aggregate that reads it, and every reader of such an aggregate, as one
194
+ * edit; and what went, as JSON Pointers into the report before it, in
195
+ * document order, the aggregates and the field last. Refused as
196
+ * `not-found` for a field the dataset does not declare, and as
197
+ * `read-by-part` for one the payment part or the e-invoice reads.
198
+ */
199
+ export declare function removeFieldWithReaders(report: ReportDefinition, slot: DatasetRole, fieldId: string): CommandOutcome<{
200
+ readonly removed: readonly string[];
201
+ }>;
202
+ /** A language added, its words not yet written: every word is then missing in it, which the diagnostics say. Refused for the report's own and for one it has. */
203
+ export declare function addLanguage(report: ReportDefinition, locale: string): CommandOutcome;
204
+ /** A language removed with its words; the last leaves the report without translations. */
205
+ export declare function removeLanguage(report: ReportDefinition, locale: string): CommandOutcome;
206
+ /**
207
+ * `word` -- a word of the report's own language -- written as `text` in
208
+ * `locale`, or, for null, its translation there taken back. A word the
209
+ * report prints nowhere is refused, unless its translation is taken back:
210
+ * one kept for a word the report no longer prints is said unused, and
211
+ * removed by this.
212
+ */
213
+ export declare function translateWord(report: ReportDefinition, locale: string, word: string, text: string | null): CommandOutcome;
214
+ /**
215
+ * The expression whose source is `cel`, standing where a word does,
216
+ * written as `expression` in `locale`, or, for null, its translation
217
+ * there taken back. Whether it prints words, and whether the translation
218
+ * prints what it does, the diagnostics say (0063).
219
+ */
220
+ export declare function translateExpression(report: ReportDefinition, locale: string, cel: string, expression: Expression | null): CommandOutcome;
146
221
  /** Which footer rows: those under the whole table, or those under each group. */
147
222
  type FooterRows = 'totals' | 'groupFooter';
148
223
  export declare function insertColumn(report: ReportDefinition, tableId: string, index: number, column: TableColumn): CommandOutcome;
@@ -165,9 +240,60 @@ export declare function updateFooterRow(report: ReportDefinition, tableId: strin
165
240
  /** Puts the cell of `cell.column` into a footer row: replacing that column's cell where it is, or appending it. */
166
241
  export declare function putFooterCell(report: ReportDefinition, tableId: string, which: FooterRows, rowIndex: number, cell: TableFooterCell): CommandOutcome;
167
242
  export declare function removeFooterCell(report: ReportDefinition, tableId: string, which: FooterRows, rowIndex: number, columnId: string): CommandOutcome;
168
- //#endregion
169
- //#region src/commands/registry.d.ts
243
+ /** Every command a batch may hold: every command but the batch. */
244
+ declare const STEPS: Readonly<{
245
+ setTitle: typeof setTitle;
246
+ setLocale: typeof setLocale;
247
+ setPage: typeof setPage;
248
+ replaceDocument: typeof replaceDocument;
249
+ putStyle: typeof putStyle;
250
+ removeStyle: typeof removeStyle;
251
+ putDataset: typeof putDataset;
252
+ removeDataset: typeof removeDataset;
253
+ putField: typeof putField;
254
+ removeField: typeof removeField;
255
+ putParameter: typeof putParameter;
256
+ removeParameter: typeof removeParameter;
257
+ moveParameter: typeof moveParameter;
258
+ addAsset: typeof addAsset;
259
+ putAsset: typeof putAsset;
260
+ removeAsset: typeof removeAsset;
261
+ putAggregate: typeof putAggregate;
262
+ removeAggregate: typeof removeAggregate;
263
+ insertComponent: typeof insertComponent;
264
+ removeComponent: typeof removeComponent;
265
+ moveComponent: typeof moveComponent;
266
+ updateComponent: typeof updateComponent;
267
+ duplicateComponent: typeof duplicateComponent;
268
+ insertColumn: typeof insertColumn;
269
+ removeColumn: typeof removeColumn;
270
+ moveColumn: typeof moveColumn;
271
+ updateColumn: typeof updateColumn;
272
+ setGroup: typeof setGroup;
273
+ setSort: typeof setSort;
274
+ insertFooterRow: typeof insertFooterRow;
275
+ removeFooterRow: typeof removeFooterRow;
276
+ moveFooterRow: typeof moveFooterRow;
277
+ updateFooterRow: typeof updateFooterRow;
278
+ putFooterCell: typeof putFooterCell;
279
+ removeFooterCell: typeof removeFooterCell;
280
+ putFirstPageHeader: typeof putFirstPageHeader;
281
+ removeFirstPageHeader: typeof removeFirstPageHeader;
282
+ putPaymentPart: typeof putPaymentPart;
283
+ updatePaymentPart: typeof updatePaymentPart;
284
+ removePaymentPart: typeof removePaymentPart;
285
+ putEInvoice: typeof putEInvoice;
286
+ updateEInvoice: typeof updateEInvoice;
287
+ removeEInvoice: typeof removeEInvoice;
288
+ setPaymentAccount: typeof setPaymentAccount;
289
+ removeFieldWithReaders: typeof removeFieldWithReaders;
290
+ addLanguage: typeof addLanguage;
291
+ removeLanguage: typeof removeLanguage;
292
+ translateWord: typeof translateWord;
293
+ translateExpression: typeof translateExpression;
294
+ }>;
170
295
  export declare const COMMANDS: Readonly<{
296
+ batch: typeof batch;
171
297
  setTitle: typeof setTitle;
172
298
  setLocale: typeof setLocale;
173
299
  setPage: typeof setPage;
@@ -203,8 +329,44 @@ export declare const COMMANDS: Readonly<{
203
329
  updateFooterRow: typeof updateFooterRow;
204
330
  putFooterCell: typeof putFooterCell;
205
331
  removeFooterCell: typeof removeFooterCell;
332
+ putFirstPageHeader: typeof putFirstPageHeader;
333
+ removeFirstPageHeader: typeof removeFirstPageHeader;
334
+ putPaymentPart: typeof putPaymentPart;
335
+ updatePaymentPart: typeof updatePaymentPart;
336
+ removePaymentPart: typeof removePaymentPart;
337
+ putEInvoice: typeof putEInvoice;
338
+ updateEInvoice: typeof updateEInvoice;
339
+ removeEInvoice: typeof removeEInvoice;
340
+ setPaymentAccount: typeof setPaymentAccount;
341
+ removeFieldWithReaders: typeof removeFieldWithReaders;
342
+ addLanguage: typeof addLanguage;
343
+ removeLanguage: typeof removeLanguage;
344
+ translateWord: typeof translateWord;
345
+ translateExpression: typeof translateExpression;
206
346
  }>;
207
347
  type CommandName = keyof typeof COMMANDS;
348
+ /** A command a batch may hold: any but a batch. */
349
+ type StepName = keyof typeof STEPS;
350
+ /**
351
+ * The commands that may change each part a report holds at its own level,
352
+ * in no region: its payment part (0022, 0039), by the three made to edit
353
+ * it, and its e-invoice (0027, 0044), by its own three; both by
354
+ * `setPaymentAccount`, which changes the account an e-invoice and its
355
+ * payment codes share in one edit; and either by `replaceDocument`, a
356
+ * paste, an import or a proposal that rewrote the report, whose document
357
+ * may hold another part than the one it replaces. Every other command
358
+ * keeps each part the very object it found; registry.test.ts holds both
359
+ * halves, reading which commands are which from here. A proposal that
360
+ * names one of these may change whom a payment reaches -- a replacement
361
+ * whatever else it changes, and `setPaymentAccount` always -- which 0039
362
+ * and 0044 ask a proposal's review to show above every other change, the
363
+ * part compared whole for a replacement, once proposals are reviewed. A
364
+ * batch may hold any of them, so it is listed for both (0048).
365
+ */
366
+ export declare const PART_COMMANDS: Readonly<{
367
+ paymentPart: readonly ["putPaymentPart", "updatePaymentPart", "removePaymentPart", "setPaymentAccount", "replaceDocument", "batch"];
368
+ eInvoice: readonly ["putEInvoice", "updateEInvoice", "removeEInvoice", "setPaymentAccount", "replaceDocument", "batch"];
369
+ }>;
208
370
  /** A command's arguments after the report. */
209
371
  type ArgumentsOf<F> = F extends ((report: ReportDefinition, ...rest: infer A) => unknown) ? A : never;
210
372
  /** A command as data: its name and its arguments after the report, typed per command. */
@@ -212,6 +374,18 @@ type CommandDescriptor = { readonly [N in CommandName]: {
212
374
  readonly command: N;
213
375
  readonly args: Readonly<ArgumentsOf<(typeof COMMANDS)[N]>>;
214
376
  }; }[CommandName];
377
+ /** A command a batch may hold, as data. */
378
+ type StepDescriptor = Exclude<CommandDescriptor, {
379
+ readonly command: 'batch';
380
+ }>;
381
+ /**
382
+ * Commands one batch holds. Chosen, not measured, as a proposal's bound
383
+ * (plan 16): the largest batch a review writes is a relabel, a command for
384
+ * the field and one for each text that says its label, far fewer; and a
385
+ * batch read from JSON is refused past it before any of it runs. What a
386
+ * batch at the bound costs is measured in 0048.
387
+ */
388
+ export declare const MAX_BATCH_COMMANDS = 1000;
215
389
  declare function isObject(value: unknown): value is Readonly<Record<string, unknown>>;
216
390
  declare function isLocation(value: unknown): boolean;
217
391
  /**
@@ -226,6 +400,10 @@ declare const SHAPES: {
226
400
  readonly is: (value: unknown) => value is string;
227
401
  readonly said: "a string";
228
402
  };
403
+ readonly textOrNull: {
404
+ readonly is: (value: unknown) => value is string | null;
405
+ readonly said: "a string, or null to remove it";
406
+ };
229
407
  readonly index: {
230
408
  readonly is: (value: unknown) => value is number;
231
409
  readonly said: "a number";
@@ -242,6 +420,10 @@ declare const SHAPES: {
242
420
  readonly is: (value: unknown) => value is any[] | null;
243
421
  readonly said: "a list, or null to remove it";
244
422
  };
423
+ readonly list: {
424
+ readonly is: (value: unknown) => value is any[];
425
+ readonly said: "a list";
426
+ };
245
427
  readonly location: {
246
428
  readonly is: typeof isLocation;
247
429
  readonly said: "a location: a region, an index, and a parent id and a column where it names them";
@@ -276,8 +458,20 @@ export declare const ARGUMENTS: { readonly [N in CommandName]: readonly Shape[];
276
458
  * the validator, as any edit's result does.
277
459
  */
278
460
  export declare function describedCommand(descriptor: CommandDescriptor): Command;
279
- //#endregion
280
- //#region src/draft.d.ts
461
+ /**
462
+ * The commands `steps` describe, run one after the other as one command:
463
+ * the report the last leaves, which the session then validates once, as a
464
+ * transaction's end; or the first refusal, word for word, and nothing
465
+ * after it runs. A step is checked as any descriptor is, and one that is
466
+ * no object, or is a batch itself, is refused; so is a batch of more than
467
+ * `MAX_BATCH_COMMANDS` commands, before any runs. Never throws on what a
468
+ * batch read from JSON holds: a step runs on the report the steps before
469
+ * it left, which nothing has validated yet -- a document replaced by one
470
+ * of nothing, a table inserted with no columns -- and a command written
471
+ * for a report the validator accepts may throw on that; such a step is
472
+ * refused, the batch with it.
473
+ */
474
+ export declare function batch(report: ReportDefinition, steps: readonly StepDescriptor[]): CommandOutcome;
281
475
  /** The working document inside a transaction, and the way to edit it. */
282
476
  interface Draft {
283
477
  /** The document as the edits so far have left it, which need not be valid. */
@@ -300,16 +494,12 @@ type Synchronous<R> = R & (R extends PromiseLike<unknown> ? never : unknown);
300
494
  * and `report` is left as it was. Throws as `drafted` does.
301
495
  */
302
496
  export declare function tryEdit<R>(report: ReportDefinition, run: (draft: Draft) => Synchronous<R>): CommandOutcome;
303
- //#endregion
304
- //#region src/snapshot.d.ts
305
497
  /**
306
498
  * Snapshots: the frozen documents a session holds, and the mutable copies
307
499
  * it hands out.
308
500
  */
309
501
  /** A deeply mutable copy of a readonly type: what `exportDocument` returns. */
310
502
  type Mutable<T> = T extends readonly (infer U)[] ? Mutable<U>[] : T extends object ? { -readonly [K in keyof T]: Mutable<T[K]>; } : T;
311
- //#endregion
312
- //#region src/session.d.ts
313
503
  /**
314
504
  * Undo steps a session keeps unless told otherwise; past it, the oldest is
315
505
  * dropped. Chosen, not measured: two hundred steps is longer than an
@@ -333,18 +523,18 @@ interface EditOptions {
333
523
  }
334
524
  interface ReportSession {
335
525
  /** The current document: frozen, and the same object until the next change. */
336
- document(): ReportDefinition;
526
+ document(this: void): ReportDefinition;
337
527
  /** Counts changes: one per committed edit, undo or redo. A refused edit, or one that changed nothing, is not one. */
338
528
  revision(): number;
339
529
  /** `reportHash` of the current document, what a save or a proposal is bound to. */
340
- hash(): string;
530
+ hash(this: void): string;
341
531
  /**
342
532
  * Calls `listener` after every change, synchronously, until the function
343
533
  * returned is called. A listener that throws does not stop the others;
344
534
  * once all have run, its error is thrown from the call that made the
345
535
  * change -- which has been made -- or an AggregateError when several threw.
346
536
  */
347
- subscribe(listener: () => void): () => void;
537
+ subscribe(this: void, listener: () => void): () => void;
348
538
  /**
349
539
  * Runs a command against the document and commits the result if the
350
540
  * validator accepts it. A command returns the next report and never edits
@@ -391,8 +581,6 @@ type SessionOpening = {
391
581
  * that is not a whole number from 0.
392
582
  */
393
583
  export declare function openReportSession(document: unknown, options?: SessionOptions): SessionOpening;
394
- //#endregion
395
- //#region src/locations.d.ts
396
584
  /**
397
585
  * Where the component `id` stands, as the location `moveComponent` and
398
586
  * `insertComponent` take: a move to it puts the component back where it
@@ -400,9 +588,11 @@ export declare function openReportSession(document: unknown, options?: SessionOp
400
588
  */
401
589
  export declare function locationOf(report: ReportDefinition, id: string): Location | undefined;
402
590
  /**
403
- * Every place a component could be put, in reading order: before each
404
- * component and at the end of each list, a container's places right after
405
- * the place before the container. Each is a location `insertComponent`
591
+ * Every place a component could be put, in reading order, in every region
592
+ * the report holds: before each component and at the end of each list, a
593
+ * container's places right after the place before the container. A region
594
+ * the report leaves out has none; it is given one by its own command
595
+ * (0060). Each is a location `insertComponent`
406
596
  * takes; whether the validator accepts what is put there is
407
597
  * `validLocations`' question.
408
598
  */
@@ -413,15 +603,13 @@ export declare function locations(report: ReportDefinition): Location[];
413
603
  * id of one the report holds, each location a move of it to gives one --
414
604
  * read, as `moveComponent` reads it, in the report without it. None for an
415
605
  * id the report lacks, or a component no place accepts, such as a second
416
- * detail table or one whose id is taken.
606
+ * table in a report that is an e-invoice (0062) or one whose id is taken.
417
607
  *
418
608
  * It validates the whole report once per place, so its cost is the
419
609
  * report's size times its number of places: a builder asks it when a drag
420
610
  * starts, not on every pointer move.
421
611
  */
422
612
  export declare function validLocations(report: ReportDefinition, subject: Component | string): Location[];
423
- //#endregion
424
- //#region src/diagnostics/codes.d.ts
425
613
  export declare const DIAGNOSTIC_SEVERITIES: {
426
614
  /** An expression that does not parse. */
427
615
  readonly 'expression-syntax': "error";
@@ -433,7 +621,7 @@ export declare const DIAGNOSTIC_SEVERITIES: {
433
621
  readonly 'expression-policy': "error";
434
622
  /** An expression that reads a name, or a member of one, that nothing declares, or a member of a single value; or an e-invoice's total where there is none, or where it is computed from. */
435
623
  readonly 'expression-unknown-name': "error";
436
- /** An expression that reads `row` or `group` where there is no row or group. */
624
+ /** An expression that reads `row`, `table` or `group` where there is no row, table or group. */
437
625
  readonly 'expression-out-of-scope': "error";
438
626
  /** An expression that reads an image field, which is drawn and never read. */
439
627
  readonly 'expression-unreadable-field': "error";
@@ -449,14 +637,18 @@ export declare const DIAGNOSTIC_SEVERITIES: {
449
637
  readonly 'expression-aggregate-type': "error";
450
638
  /** An aggregate whose expression reads its own total, directly or through other aggregates, or reads one that does: none of them can be computed. */
451
639
  readonly 'aggregate-cycle': "error";
452
- /** A number or currency format that prints a total at fewer places than its declared rounding keeps, so the total is rounded twice and the second rounding ignores the declared mode. */
640
+ /** A number or currency format that prints a total at fewer places than its declared rounding keeps -- an aggregate's, or a chart's series' -- so the total is rounded twice and the second rounding ignores the declared mode. */
453
641
  readonly 'format-rounds-again': "error";
454
- /** A rounding declared on an aggregate that computes an integer, a date or an instant, which have no places to round: the runtime refuses it. */
642
+ /** A rounding declared on an aggregate that computes an integer, a date or an instant, or on a chart's series that totals an integer, which have no places to round: the runtime refuses it. */
455
643
  readonly 'rounding-not-decimal': "error";
456
644
  /** A total an e-invoice's XML holds -- a document total, or a declared VAT category's basis or amount -- that no text or table of the page prints: the page would show another invoice than the one it carries. */
457
645
  readonly 'e-invoice-total-unprinted': "error";
458
646
  /** A format that prints what an e-invoice's XML holds otherwise: a total or a line's net amount at fewer than two places, or in another currency than the e-invoice's; a line's net price in another currency; a line's name in another case. The page would show another invoice than the one it carries. */
459
647
  readonly 'e-invoice-format-differs': "error";
648
+ /** A word of the report, or an expression that prints words, that a language it declares does not translate: a render in that language is refused, and never prints it in another (0063). */
649
+ readonly 'word-missing': "error";
650
+ /** A translated expression that would print another thing than the expression it translates: another type, other reads, or a value where the expression prints no words (0063). */
651
+ readonly 'translation-differs': "error";
460
652
  /** A print style nothing uses. */
461
653
  readonly 'unused-style': "warning";
462
654
  /** An asset nothing draws. */
@@ -471,6 +663,12 @@ export declare const DIAGNOSTIC_SEVERITIES: {
471
663
  readonly 'empty-body': "warning";
472
664
  /** A text that prints nothing: no runs, or only empty literal ones. */
473
665
  readonly 'empty-text': "warning";
666
+ /** A translation of a word, or of an expression, the report no longer prints: kept for nothing, and never printed (0063). */
667
+ readonly 'unused-translation': "warning";
668
+ /** A payment part that holds, written in the report, one of SIX's example accounts, or the creditor, the debtor or the QR reference a builder puts in from SIX's examples, which are no one's (0039). */
669
+ readonly 'example-payment-part': "warning";
670
+ /** A total row, under a table that prints only the rows its condition selects, that prints a total over every detail row: an aggregate over the report, or an expression that reads `totals` and not `table` (0062). Printed under those rows, it reads as theirs. */
671
+ readonly 'total-of-every-row': "warning";
474
672
  };
475
673
  type DiagnosticCode = keyof typeof DIAGNOSTIC_SEVERITIES;
476
674
  type DiagnosticSeverity = (typeof DIAGNOSTIC_SEVERITIES)[DiagnosticCode];
@@ -490,9 +688,9 @@ interface Diagnostic {
490
688
  readonly position?: SourceSpan;
491
689
  /** For an expression, what `@formancy/expressions` suggests writing instead, when it suggests something. */
492
690
  readonly hint?: string;
691
+ /** The language it is about, where it is one a translation declares: an error that names one refuses a render in that language alone (0063). */
692
+ readonly language?: string;
493
693
  }
494
- //#endregion
495
- //#region src/diagnostics/parts.d.ts
496
694
  /** An expression and how to compile it: the names its scope binds, and the policy of what it is for. */
497
695
  interface ExpressionSite {
498
696
  readonly cel: string;
@@ -529,8 +727,6 @@ interface InvoiceTerm {
529
727
  type PaymentAmount = 'a QR-bill' | 'an EPC QR code';
530
728
  /** Every expression in the report, each with the scope it is compiled in and what it is for. */
531
729
  export declare function expressionSites(report: ReportDefinition): readonly ExpressionSite[];
532
- //#endregion
533
- //#region src/expressions/members.d.ts
534
730
  /**
535
731
  * The type an expression reads each readable field and parameter type as.
536
732
  *
@@ -557,12 +753,20 @@ interface ExpressionMember {
557
753
  readonly nullable: boolean;
558
754
  }
559
755
  /** Every name the format binds, in some scope or in an e-invoice. A test holds this to the union of `EXPRESSION_NAMES` and `E_INVOICE_NAMES`. */
560
- export declare const SCOPE_NAMES: readonly ["params", "header", "row", "totals", "group", "invoice", "vatBasis", "vatAmount"];
756
+ export declare const SCOPE_NAMES: readonly ["params", "header", "row", "totals", "table", "group", "invoice", "vatBasis", "vatAmount"];
561
757
  type ScopeName = (typeof SCOPE_NAMES)[number];
562
- /** What each name holds in one report, member by member, in declaration order. */
563
- type Members = { readonly [N in ScopeName]: ReadonlyMap<string, ExpressionMember>; };
564
- //#endregion
565
- //#region src/expressions/compile-site.d.ts
758
+ /**
759
+ * What each name holds in one report, member by member, in declaration
760
+ * order; `group` the aggregates alone. A group's key, `group.key`, is its
761
+ * own table's, and two tables may group by fields of two types (0062), so
762
+ * each table that groups has its key in `groupKeys`, by the table's id,
763
+ * and a group's header and footer are compiled with their table's.
764
+ */
765
+ type Members = { readonly [N in ScopeName]: ReadonlyMap<string, ExpressionMember>; } & {
766
+ readonly groupKeys: ReadonlyMap<string, ExpressionMember>;
767
+ };
768
+ /** What a chart's `series` computes: the compiler's type of an aggregate of its function over the detail field it names. */
769
+ export declare function seriesType(report: ReportDefinition, series: ChartSeries): ExpressionMember;
566
770
  /** A member an expression reads, and how the runtime binds it. */
567
771
  interface ExpressionRead {
568
772
  /** The name and the member as the expression writes them: `row` and `amount` for `row.amount`. */
@@ -581,8 +785,6 @@ interface CompiledExpression {
581
785
  readonly program: Program;
582
786
  readonly reads: readonly ExpressionRead[];
583
787
  }
584
- //#endregion
585
- //#region src/expressions/compile-report.d.ts
586
788
  interface ReportCompilation {
587
789
  /** What each name holds in this report: every member an expression can read, with the type it is checked and bound as. */
588
790
  readonly members: Members;
@@ -593,10 +795,15 @@ interface ReportCompilation {
593
795
  /** Every reason an expression cannot be evaluated, in document order, the aggregates' last: what the runtime refuses the report for. */
594
796
  readonly diagnostics: readonly Diagnostic[];
595
797
  }
596
- /** Every expression in `report` -- a report the validator accepts -- compiled where it stands. */
597
- export declare function compileReport(report: ReportDefinition): ReportCompilation;
598
- //#endregion
599
- //#region src/expressions/values.d.ts
798
+ /**
799
+ * Every expression in `report` -- a report the validator accepts --
800
+ * compiled where it stands; or, with `only`, the expressions at those
801
+ * pointers to their `cel` alone, with every aggregate's and the
802
+ * e-invoice's paid amount, which what they read is computed from: what a
803
+ * review compiles of a resolution that changes one field's type, the
804
+ * expressions that change can reach (`fieldReaders`, 0048).
805
+ */
806
+ export declare function compileReport(report: ReportDefinition, only?: ReadonlySet<string>): ReportCompilation;
600
807
  /**
601
808
  * The data one evaluation reads, by name and member: `{ row: { amount:
602
809
  * '12.50' } }`. Each value as the format writes it -- an integer and a
@@ -620,21 +827,35 @@ type ExpressionValues = {
620
827
  * a defect, and is said as one: naming the member, never quoting the value.
621
828
  */
622
829
  export declare function expressionValues(expression: CompiledExpression, values: ExpressionValues): Record<string, unknown>;
623
- //#endregion
624
- //#region src/expressions/reproducible.d.ts
830
+ /** The name an expression reads each dataset's fields under: `header.<id>`, `row.<id>`. */
831
+ export declare const READ_AS: { readonly [R in DatasetRole]: 'header' | 'row'; };
625
832
  /** The functions whose value is not a function of the report's data. */
626
833
  export declare const UNREPRODUCIBLE_FUNCTIONS: readonly ["now", "today", "random"];
627
834
  type UnreproducibleFunction = (typeof UNREPRODUCIBLE_FUNCTIONS)[number];
628
- //#endregion
629
- //#region src/diagnostics/diagnose.d.ts
630
835
  /**
631
836
  * Every diagnostic for `report`, a report the validator accepts -- a
632
- * session's document is one. Expressions first, in document order, the
633
- * aggregates' last, then roundings, then the e-invoice's unprinted totals,
634
- * then content, then unused declarations in the order they are declared. The expressions' are `compileReport`'s,
635
- * so the editor reports exactly what the runtime refuses.
837
+ * session's document is one: its own language's first, in `diagnosis`'s
838
+ * order, then each translation's, in the order the report declares them,
839
+ * each naming its `language` (0063). An error that names none refuses
840
+ * every render; one that names a language refuses a render in that
841
+ * language alone.
636
842
  */
637
843
  export declare function diagnose(report: ReportDefinition): Diagnostic[];
638
- //#endregion
639
- export type { Command, CommandDescriptor, CommandName, CommandOutcome, CompiledExpression, ComponentPatch, Diagnostic, DiagnosticCode, DiagnosticSeverity, Draft, EditOptions, ExpressionMember, ExpressionRead, ExpressionSite, ExpressionValues, FooterRows, Location, Members, Mutable, PagePatch, Patch, Refusal, RefusalCode, ReportCompilation, ReportSession, ScopeName, SessionOpening, SessionOptions, Synchronous, UnreproducibleFunction };
844
+ /**
845
+ * Every expression run of `report` -- a report the validator accepts --
846
+ * where a word stands that prints words, in document order: what a
847
+ * language translates, as `word-missing` says of each, and what the
848
+ * builders mark and edit as a word (0063). The one verdict the diagnostics
849
+ * give, so that the two never disagree.
850
+ */
851
+ export declare function wordExpressions(report: ReportDefinition): readonly WordExpressionSite[];
852
+ /**
853
+ * Every diagnostic of `report` -- a report the validator accepts -- in
854
+ * `locale`, a language its translations declare, each naming it: what a
855
+ * render in that language is refused for, beside the report's own errors,
856
+ * which refuse every render. None for the report's own language, whose
857
+ * are `diagnose`'s, or for one it does not declare.
858
+ */
859
+ export declare function languageDiagnostics(report: ReportDefinition, locale: string): Diagnostic[];
860
+ export type { Command, CommandDescriptor, CommandName, CommandOutcome, CompiledExpression, ComponentPatch, Diagnostic, DiagnosticCode, DiagnosticSeverity, Draft, EInvoicePatch, EditOptions, ExpressionMember, ExpressionRead, ExpressionSite, ExpressionValues, FieldReaders, FooterRows, Location, Members, Mutable, PagePatch, Patch, PaymentPartPatch, Refusal, RefusalCode, ReportCompilation, ReportSession, ScopeName, SessionOpening, SessionOptions, StepDescriptor, StepName, Synchronous, UnreproducibleFunction };
640
861
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/outcome.ts","../src/lists.ts","../src/tree.ts","../src/commands/components.ts","../src/commands/declarations.ts","../src/commands/document.ts","../src/commands/table.ts","../src/commands/registry.ts","../src/draft.ts","../src/snapshot.ts","../src/session.ts","../src/locations.ts","../src/diagnostics/codes.ts","../src/diagnostics/parts.ts","../src/expressions/members.ts","../src/expressions/compile-site.ts","../src/expressions/compile-report.ts","../src/expressions/values.ts","../src/expressions/reproducible.ts","../src/diagnostics/diagnose.ts"],"mappings":";;;;;;;;;;qBAoBa;KA2BD,sBAAsB;UAEjB;WACN;WACA,MAAM;WACN;;WAEA;;WAEA;;WAEA,kBAAkB;;;KAIjB,eAAe;WAAyC;WAAmB,QAAQ;IAAqB,SAAS,MAAM;;KAGvH,QAAQ,8BAA8B,QAAQ,qBAAqB,eAAe;;;;;;;;;;;;KChDlF,MAAM,iBAAiB,WAAW,uBAAuB,EAAE,KAAK,QAAQ,EAAE,wBAAwB,EAAE;;;;;;;;UCC/F;WACN,QAAQ;;WAER;;WAEA;WACA;;;;;;;;;KCAC,eAAe,UAAU,iBAAiB,UAAU,gBAAgB,MAAM,KAAK,QAAQ;EAAa,MAAM;;wBAatG,gBAAgB,QAAQ,kBAAkB,UAAU,UAAU,WAAW,YAAY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WAEA;;WAEA;;WAEA,WAAW;;WAEX;;;;;UC7CM;WACN;WACA,OAAO;;WAEP;;WAEA;;WAEA;;WAEA;;WAEA,SAAS;;;;;;;;WAQT,OAAO;;WAEP,SAAS;;;UAIH;;WAEN;;WAEA,iBAAiB;;;KAIhB;;wBAkSI,gBAAgB,QAAQ,4BAA4B;;;;;;;;;;;;;;;;qBC5UvD,8BAA8B,KAAK,QAAQ,sBAAsB;;;;;;;;UAiB7D;WACN,MAAM;WACN;;;qBAIE;KAED,oBAAoB;;KAGpB,sBAAsB,KAAK,YAAY,oBAAoB;;;;UCpBtD;;WAEN,MAAM;WACN;;WAEA;;WAEA,MAAM;WACN;;;UAIM;WACN,MAAM;;WAEN,SAAS;WACT,gBAAgB;;;;UC7BV;;WAEN,SAAS;;WAET,aAAa,oBAAoB;;WAEjC;;WAEA,sBAAsB;;;wBAUjB,cAAc,QAAQ,mBAAmB;;;;;;;;;;;KCpB7C;YAA+B,eAAe,SAAS;;;;;;;;;;;;;wBAwEnD,iBAAiB,YAAY,oBAAoB,QAAQ,mBAAmB;;;;qBCvE/E;KAED,iCAAiC;;;;;;;;;;wBCP7B,SAAS,QAAQ,mBAAmB"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/outcome.ts","../src/lists.ts","../src/tree.ts","../src/commands/components.ts","../src/commands/declarations.ts","../src/commands/document.ts","../src/commands/e-invoice.ts","../src/commands/first-page-header.ts","../src/commands/payment-part.ts","../src/commands/readers.ts","../src/commands/translations.ts","../src/commands/table.ts","../src/commands/registry.ts","../src/draft.ts","../src/snapshot.ts","../src/session.ts","../src/locations.ts","../src/diagnostics/codes.ts","../src/diagnostics/parts.ts","../src/expressions/members.ts","../src/expressions/compile-site.ts","../src/expressions/compile-report.ts","../src/expressions/values.ts","../src/expressions/reads.ts","../src/expressions/reproducible.ts","../src/diagnostics/diagnose.ts","../src/diagnostics/words.ts"],"mappings":";;;;;;;;;qBAoBa;KA+BD,sBAAsB;UAEjB;WACN;WACA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