@reportwright/engine 0.0.0-stage → 0.12.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.
Files changed (79) hide show
  1. package/CHANGELOG.md +233 -0
  2. package/LICENSE +23 -0
  3. package/README.md +105 -2
  4. package/dist/index.js +22548 -0
  5. package/dist/pdfstreamworker.js +38 -0
  6. package/dist/types/packages/engine/entry.d.ts +125 -0
  7. package/dist/types/src/designer/tableGen.d.ts +119 -0
  8. package/dist/types/src/engine/data/guard.d.ts +50 -0
  9. package/dist/types/src/engine/data/index.d.ts +120 -0
  10. package/dist/types/src/engine/data/odata.d.ts +35 -0
  11. package/dist/types/src/engine/data/stream.d.ts +48 -0
  12. package/dist/types/src/engine/data/xml.d.ts +108 -0
  13. package/dist/types/src/engine/expr/evaluate.d.ts +183 -0
  14. package/dist/types/src/engine/expr/format.d.ts +122 -0
  15. package/dist/types/src/engine/expr/javafmt.d.ts +26 -0
  16. package/dist/types/src/engine/expr/parser.d.ts +29 -0
  17. package/dist/types/src/engine/image.d.ts +107 -0
  18. package/dist/types/src/engine/index.d.ts +239 -0
  19. package/dist/types/src/engine/items/barcode.d.ts +121 -0
  20. package/dist/types/src/engine/items/cells.d.ts +11 -0
  21. package/dist/types/src/engine/items/chart-kit.d.ts +75 -0
  22. package/dist/types/src/engine/items/chart-more.d.ts +52 -0
  23. package/dist/types/src/engine/items/chart-round.d.ts +28 -0
  24. package/dist/types/src/engine/items/chart.d.ts +42 -0
  25. package/dist/types/src/engine/items/hpage.d.ts +33 -0
  26. package/dist/types/src/engine/items/index.d.ts +117 -0
  27. package/dist/types/src/engine/items/map.d.ts +11 -0
  28. package/dist/types/src/engine/items/paint.d.ts +138 -0
  29. package/dist/types/src/engine/items/pivot.d.ts +45 -0
  30. package/dist/types/src/engine/items/rich.d.ts +105 -0
  31. package/dist/types/src/engine/items/toc.d.ts +10 -0
  32. package/dist/types/src/engine/items/visuals.d.ts +5 -0
  33. package/dist/types/src/engine/layout.d.ts +24 -0
  34. package/dist/types/src/engine/paged.d.ts +19 -0
  35. package/dist/types/src/engine/paginate/index.d.ts +17 -0
  36. package/dist/types/src/engine/reuse.d.ts +120 -0
  37. package/dist/types/src/engine/schema/report.schema.d.ts +2421 -0
  38. package/dist/types/src/engine/schema/template.d.ts +212 -0
  39. package/dist/types/src/engine/schema/validate.d.ts +21 -0
  40. package/dist/types/src/engine/stream.d.ts +54 -0
  41. package/dist/types/src/engine/style.d.ts +70 -0
  42. package/dist/types/src/engine/text/fonts.d.ts +96 -0
  43. package/dist/types/src/engine/text/measure.d.ts +145 -0
  44. package/dist/types/src/engine/text/rich.d.ts +48 -0
  45. package/dist/types/src/engine/text/shaper.d.ts +20 -0
  46. package/dist/types/src/engine/units.d.ts +53 -0
  47. package/dist/types/src/engine/url.d.ts +23 -0
  48. package/dist/types/src/exporters/color.d.ts +9 -0
  49. package/dist/types/src/exporters/csv.d.ts +44 -0
  50. package/dist/types/src/exporters/deadline.d.ts +6 -0
  51. package/dist/types/src/exporters/docx.d.ts +19 -0
  52. package/dist/types/src/exporters/encrypt.d.ts +39 -0
  53. package/dist/types/src/exporters/figures.d.ts +112 -0
  54. package/dist/types/src/exporters/html.d.ts +24 -0
  55. package/dist/types/src/exporters/htmldata.d.ts +32 -0
  56. package/dist/types/src/exporters/pdf.d.ts +45 -0
  57. package/dist/types/src/exporters/pdfa.d.ts +42 -0
  58. package/dist/types/src/exporters/pdfpaint.d.ts +107 -0
  59. package/dist/types/src/exporters/pdfstream.d.ts +198 -0
  60. package/dist/types/src/exporters/pdfstreamtags.d.ts +38 -0
  61. package/dist/types/src/exporters/pdfua.d.ts +17 -0
  62. package/dist/types/src/exporters/png.d.ts +10 -0
  63. package/dist/types/src/exporters/pptx.d.ts +14 -0
  64. package/dist/types/src/exporters/regions.d.ts +30 -0
  65. package/dist/types/src/exporters/subset.d.ts +5 -0
  66. package/dist/types/src/exporters/svg.d.ts +26 -0
  67. package/dist/types/src/exporters/svgimage.d.ts +33 -0
  68. package/dist/types/src/exporters/xlsx.d.ts +61 -0
  69. package/dist/types/src/exporters/xlsxchart.d.ts +26 -0
  70. package/dist/types/src/exporters/xlsxwriter.d.ts +83 -0
  71. package/dist/types/src/importers/xml.d.ts +34 -0
  72. package/examples/stream-1m.mjs +87 -0
  73. package/index.d.ts +3 -0
  74. package/package.json +79 -4
  75. package/pool/index.d.ts +23 -0
  76. package/pool/index.js +85 -0
  77. package/pool/worker.js +27 -0
  78. package/report.d.ts +638 -0
  79. package/schema.json +2517 -0
package/schema.json ADDED
@@ -0,0 +1,2517 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/MrArun005/reportwright/blob/main/src/engine/schema/report.schema.js",
4
+ "title": "ReportWright report definition",
5
+ "$ref": "#/$defs/Report",
6
+ "$defs": {
7
+ "Expr": {
8
+ "x-ts-decl": "export type Expr<T = string | number | boolean> = T | `=${string}`;",
9
+ "description": "A literal value or an expression (\"=Sum(Fields.amount)\")."
10
+ },
11
+ "Style": {
12
+ "type": "object",
13
+ "properties": {
14
+ "fontFamily": {
15
+ "type": "string"
16
+ },
17
+ "fontSize": {
18
+ "x-ts": "number | string"
19
+ },
20
+ "fontWeight": {
21
+ "x-ts": "'normal' | 'bold' | number | string"
22
+ },
23
+ "fontStyle": {
24
+ "x-ts": "'normal' | 'italic' | string"
25
+ },
26
+ "color": {
27
+ "type": "string"
28
+ },
29
+ "backgroundColor": {
30
+ "type": "string"
31
+ },
32
+ "backgroundImage": {
33
+ "type": "string"
34
+ },
35
+ "backgroundFit": {
36
+ "x-ts": "'contain' | 'cover' | 'fill' | string"
37
+ },
38
+ "textAlign": {
39
+ "x-ts": "'left' | 'center' | 'right' | 'justify' | 'auto' | string"
40
+ },
41
+ "verticalAlign": {
42
+ "x-ts": "'top' | 'middle' | 'bottom' | string"
43
+ },
44
+ "textDecoration": {
45
+ "type": "string"
46
+ },
47
+ "lineHeight": {
48
+ "x-ts": "number | string"
49
+ },
50
+ "padding": {
51
+ "x-ts": "number | [number, number, number, number] | string"
52
+ },
53
+ "border": {
54
+ "type": "string"
55
+ },
56
+ "borderTop": {
57
+ "type": "string"
58
+ },
59
+ "borderRight": {
60
+ "type": "string"
61
+ },
62
+ "borderBottom": {
63
+ "type": "string"
64
+ },
65
+ "borderLeft": {
66
+ "type": "string"
67
+ },
68
+ "format": {
69
+ "type": "string"
70
+ },
71
+ "writingMode": {
72
+ "type": "string"
73
+ },
74
+ "stroke": {
75
+ "type": "string"
76
+ },
77
+ "strokeWidth": {
78
+ "x-ts": "number | string"
79
+ },
80
+ "strokeDash": {
81
+ "type": "string"
82
+ },
83
+ "fill": {
84
+ "type": "string"
85
+ },
86
+ "radius": {
87
+ "x-ts": "number | string"
88
+ }
89
+ },
90
+ "additionalProperties": true,
91
+ "description": "Text and box style. Values may also be expressions. Unknown keys are allowed (newer engine versions add more)."
92
+ },
93
+ "Action": {
94
+ "description": "What a click does: open a URL, drill to another report, jump to a bookmark, or set parameters and run again.",
95
+ "anyOf": [
96
+ {
97
+ "type": "object",
98
+ "properties": {
99
+ "type": {
100
+ "const": "none"
101
+ }
102
+ },
103
+ "required": [
104
+ "type"
105
+ ]
106
+ },
107
+ {
108
+ "type": "object",
109
+ "properties": {
110
+ "type": {
111
+ "const": "url"
112
+ },
113
+ "url": {
114
+ "x-ts": "Expr<string>"
115
+ }
116
+ },
117
+ "required": [
118
+ "type",
119
+ "url"
120
+ ]
121
+ },
122
+ {
123
+ "type": "object",
124
+ "properties": {
125
+ "type": {
126
+ "const": "report"
127
+ },
128
+ "report": {
129
+ "x-ts": "Expr<string>"
130
+ },
131
+ "params": {
132
+ "x-ts": "Record<string, Expr>",
133
+ "type": "object"
134
+ }
135
+ },
136
+ "required": [
137
+ "type",
138
+ "report"
139
+ ]
140
+ },
141
+ {
142
+ "type": "object",
143
+ "properties": {
144
+ "type": {
145
+ "const": "bookmark"
146
+ },
147
+ "target": {
148
+ "x-ts": "Expr<string>"
149
+ }
150
+ },
151
+ "required": [
152
+ "type",
153
+ "target"
154
+ ]
155
+ },
156
+ {
157
+ "type": "object",
158
+ "properties": {
159
+ "type": {
160
+ "const": "params"
161
+ },
162
+ "params": {
163
+ "x-ts": "Record<string, Expr>",
164
+ "type": "object"
165
+ },
166
+ "toggle": {
167
+ "type": "boolean"
168
+ }
169
+ },
170
+ "required": [
171
+ "type",
172
+ "params"
173
+ ]
174
+ }
175
+ ]
176
+ },
177
+ "ItemBase": {
178
+ "type": "object",
179
+ "properties": {
180
+ "id": {
181
+ "type": "string"
182
+ },
183
+ "name": {
184
+ "type": "string"
185
+ },
186
+ "x": {
187
+ "type": "number"
188
+ },
189
+ "y": {
190
+ "type": "number"
191
+ },
192
+ "w": {
193
+ "type": "number"
194
+ },
195
+ "h": {
196
+ "type": "number"
197
+ },
198
+ "style": {
199
+ "$ref": "#/$defs/Style"
200
+ },
201
+ "styleName": {
202
+ "type": "string"
203
+ },
204
+ "hidden": {
205
+ "x-ts": "Expr<boolean>"
206
+ },
207
+ "dataSet": {
208
+ "x-ts": "string | null"
209
+ },
210
+ "alt": {
211
+ "type": "string",
212
+ "description": "alternative text for screen readers (accessible PDF, Word, HTML)"
213
+ },
214
+ "keepTogether": {
215
+ "type": "boolean"
216
+ },
217
+ "pageBreakBefore": {
218
+ "type": "boolean"
219
+ },
220
+ "pageBreakAfter": {
221
+ "type": "boolean"
222
+ },
223
+ "bookmark": {
224
+ "x-ts": "Expr<string>"
225
+ },
226
+ "tooltip": {
227
+ "x-ts": "Expr<string>"
228
+ },
229
+ "action": {
230
+ "$ref": "#/$defs/Action"
231
+ }
232
+ },
233
+ "required": [
234
+ "x",
235
+ "y",
236
+ "w",
237
+ "h"
238
+ ],
239
+ "x-internal": true
240
+ },
241
+ "TextBox": {
242
+ "allOf": [
243
+ {
244
+ "$ref": "#/$defs/ItemBase"
245
+ },
246
+ {
247
+ "type": "object",
248
+ "properties": {
249
+ "type": {
250
+ "const": "textbox"
251
+ },
252
+ "value": {
253
+ "x-ts": "Expr"
254
+ },
255
+ "canGrow": {
256
+ "type": "boolean"
257
+ },
258
+ "canShrink": {
259
+ "type": "boolean"
260
+ },
261
+ "shrinkToFit": {
262
+ "type": "boolean"
263
+ },
264
+ "minFontSize": {
265
+ "type": "number"
266
+ },
267
+ "shrinkStep": {
268
+ "type": "number"
269
+ },
270
+ "rotate": {
271
+ "type": "number"
272
+ },
273
+ "headingLevel": {
274
+ "x-ts": "1 | 2 | 3 | 4 | 5 | 6 | '1' | '2' | '3' | '4' | '5' | '6'",
275
+ "enum": [
276
+ 1,
277
+ 2,
278
+ 3,
279
+ 4,
280
+ 5,
281
+ 6,
282
+ "1",
283
+ "2",
284
+ "3",
285
+ "4",
286
+ "5",
287
+ "6"
288
+ ],
289
+ "description": "1–6: listed by a table of contents with source \"headings\""
290
+ },
291
+ "dir": {
292
+ "enum": [
293
+ "ltr",
294
+ "rtl",
295
+ "auto"
296
+ ],
297
+ "description": "text direction: auto (default) from the first strong character"
298
+ }
299
+ },
300
+ "required": [
301
+ "type"
302
+ ]
303
+ }
304
+ ]
305
+ },
306
+ "RichText": {
307
+ "allOf": [
308
+ {
309
+ "$ref": "#/$defs/ItemBase"
310
+ },
311
+ {
312
+ "type": "object",
313
+ "properties": {
314
+ "type": {
315
+ "const": "richtext"
316
+ },
317
+ "value": {
318
+ "type": "string"
319
+ },
320
+ "htmlFromData": {
321
+ "type": "boolean"
322
+ },
323
+ "canGrow": {
324
+ "type": "boolean"
325
+ },
326
+ "canShrink": {
327
+ "type": "boolean"
328
+ },
329
+ "listIndent": {
330
+ "type": "number"
331
+ },
332
+ "paragraphSpacing": {
333
+ "type": "number"
334
+ }
335
+ },
336
+ "required": [
337
+ "type"
338
+ ]
339
+ }
340
+ ]
341
+ },
342
+ "Image": {
343
+ "allOf": [
344
+ {
345
+ "$ref": "#/$defs/ItemBase"
346
+ },
347
+ {
348
+ "type": "object",
349
+ "properties": {
350
+ "type": {
351
+ "const": "image"
352
+ },
353
+ "src": {
354
+ "x-ts": "Expr<string>",
355
+ "description": "URL, data URI, \"embedded:name\" (the report's images), or a field holding base64 text or bytes"
356
+ },
357
+ "fit": {
358
+ "enum": [
359
+ "contain",
360
+ "cover",
361
+ "fill",
362
+ "clip"
363
+ ]
364
+ },
365
+ "autoSize": {
366
+ "type": "boolean",
367
+ "description": "size the box to the image (96 dpi); data and embedded images only"
368
+ }
369
+ },
370
+ "required": [
371
+ "type"
372
+ ]
373
+ }
374
+ ]
375
+ },
376
+ "Line": {
377
+ "allOf": [
378
+ {
379
+ "$ref": "#/$defs/ItemBase"
380
+ },
381
+ {
382
+ "type": "object",
383
+ "properties": {
384
+ "type": {
385
+ "const": "line"
386
+ },
387
+ "direction": {
388
+ "enum": [
389
+ "down",
390
+ "up"
391
+ ]
392
+ }
393
+ },
394
+ "required": [
395
+ "type"
396
+ ]
397
+ }
398
+ ]
399
+ },
400
+ "Shape": {
401
+ "allOf": [
402
+ {
403
+ "$ref": "#/$defs/ItemBase"
404
+ },
405
+ {
406
+ "type": "object",
407
+ "properties": {
408
+ "type": {
409
+ "const": "shape"
410
+ },
411
+ "shape": {
412
+ "enum": [
413
+ "rect",
414
+ "ellipse"
415
+ ]
416
+ }
417
+ },
418
+ "required": [
419
+ "type"
420
+ ]
421
+ }
422
+ ]
423
+ },
424
+ "SortSpec": {
425
+ "type": "object",
426
+ "description": "One sort key: the rows (or groups) are ordered by by, ascending or descending.",
427
+ "properties": {
428
+ "by": {
429
+ "x-ts": "Expr",
430
+ "description": "the expression to sort by, e.g. =Fields.name"
431
+ },
432
+ "dir": {
433
+ "enum": [
434
+ "asc",
435
+ "desc"
436
+ ],
437
+ "description": "asc (default) or desc"
438
+ }
439
+ },
440
+ "required": [
441
+ "by"
442
+ ],
443
+ "additionalProperties": false
444
+ },
445
+ "TableCell": {
446
+ "type": "object",
447
+ "properties": {
448
+ "value": {
449
+ "x-ts": "Expr"
450
+ },
451
+ "sortBy": {
452
+ "x-ts": "Expr",
453
+ "description": "a header cell's interactive sort: the viewer orders the rows by this expression when the header is clicked"
454
+ },
455
+ "style": {
456
+ "$ref": "#/$defs/Style"
457
+ },
458
+ "colSpan": {
459
+ "type": "number",
460
+ "description": "columns this cell spans. Either list one entry per column (null under the span), or omit the spanned cells (RDL/HTML style: a row with fewer cells than columns)"
461
+ },
462
+ "rowSpan": {
463
+ "type": "number",
464
+ "description": "merged down over this many rows of the same band (header, a group's rows, one record's detail rows, footer)"
465
+ },
466
+ "item": {
467
+ "$ref": "#/$defs/Item",
468
+ "description": "an item laid out inside the cell, scoped to the row (a related data set gets that row's children)"
469
+ },
470
+ "action": {
471
+ "$ref": "#/$defs/Action"
472
+ }
473
+ },
474
+ "additionalProperties": true
475
+ },
476
+ "TableRow": {
477
+ "type": "object",
478
+ "properties": {
479
+ "cells": {
480
+ "type": "array",
481
+ "items": {
482
+ "x-ts": "TableCell | null",
483
+ "anyOf": [
484
+ {
485
+ "$ref": "#/$defs/TableCell"
486
+ },
487
+ {
488
+ "type": "null"
489
+ }
490
+ ]
491
+ }
492
+ },
493
+ "height": {
494
+ "type": "number"
495
+ },
496
+ "style": {
497
+ "$ref": "#/$defs/Style"
498
+ }
499
+ },
500
+ "required": [
501
+ "cells"
502
+ ],
503
+ "additionalProperties": true
504
+ },
505
+ "TableGroup": {
506
+ "type": "object",
507
+ "properties": {
508
+ "expr": {
509
+ "type": "string"
510
+ },
511
+ "name": {
512
+ "type": "string"
513
+ },
514
+ "header": {
515
+ "type": "array",
516
+ "items": {
517
+ "$ref": "#/$defs/TableRow"
518
+ }
519
+ },
520
+ "footer": {
521
+ "type": "array",
522
+ "items": {
523
+ "$ref": "#/$defs/TableRow"
524
+ }
525
+ },
526
+ "sort": {
527
+ "enum": [
528
+ "asc",
529
+ "desc",
530
+ "none"
531
+ ],
532
+ "description": "orders the groups by their value (asc or desc); sortBy orders them by an expression"
533
+ },
534
+ "sortBy": {
535
+ "x-ts": "Expr",
536
+ "description": "orders the groups by this expression, evaluated in each group's scope (e.g. =Sum(Fields.amount)); the interactive sort on a header wins"
537
+ },
538
+ "pageBreak": {
539
+ "type": "string"
540
+ },
541
+ "collapsible": {
542
+ "type": "boolean"
543
+ },
544
+ "initiallyCollapsed": {
545
+ "type": "boolean"
546
+ },
547
+ "parent": {
548
+ "x-ts": "Expr",
549
+ "description": "recursive hierarchy: the parent's id; expr is the node's id. Level() is the depth."
550
+ },
551
+ "indent": {
552
+ "type": "number"
553
+ },
554
+ "expandLevels": {
555
+ "type": "number"
556
+ },
557
+ "newSection": {
558
+ "type": "boolean",
559
+ "description": "each instance starts on a new page and restarts Globals.PageNumber / TotalPages"
560
+ }
561
+ },
562
+ "required": [
563
+ "expr"
564
+ ],
565
+ "additionalProperties": true
566
+ },
567
+ "Table": {
568
+ "allOf": [
569
+ {
570
+ "$ref": "#/$defs/ItemBase"
571
+ },
572
+ {
573
+ "type": "object",
574
+ "properties": {
575
+ "type": {
576
+ "const": "table"
577
+ },
578
+ "columns": {
579
+ "type": "array",
580
+ "items": {
581
+ "type": "object",
582
+ "properties": {
583
+ "width": {
584
+ "type": "number"
585
+ }
586
+ },
587
+ "required": [
588
+ "width"
589
+ ],
590
+ "additionalProperties": true
591
+ }
592
+ },
593
+ "header": {
594
+ "type": "array",
595
+ "items": {
596
+ "$ref": "#/$defs/TableRow"
597
+ }
598
+ },
599
+ "groups": {
600
+ "type": "array",
601
+ "items": {
602
+ "$ref": "#/$defs/TableGroup"
603
+ }
604
+ },
605
+ "detail": {
606
+ "type": "array",
607
+ "items": {
608
+ "$ref": "#/$defs/TableRow"
609
+ }
610
+ },
611
+ "footer": {
612
+ "type": "array",
613
+ "items": {
614
+ "$ref": "#/$defs/TableRow"
615
+ }
616
+ },
617
+ "repeatHeader": {
618
+ "type": "boolean"
619
+ },
620
+ "widowControl": {
621
+ "type": "boolean",
622
+ "description": "Default true: a group of four or more rows never leaves one of its rows alone at a page foot or head, and a group of two or three rows that fits a page moves whole to the next page. false lets a break fall anywhere inside a group."
623
+ },
624
+ "fitColumns": {
625
+ "type": "boolean",
626
+ "description": "Column widths from the content: the header, the first 50 rows and the footer, in proportion, filling the table's width. Columns without a width are measured anyway."
627
+ },
628
+ "noRowsText": {
629
+ "type": "string"
630
+ },
631
+ "sort": {
632
+ "type": "array",
633
+ "items": {
634
+ "$ref": "#/$defs/SortSpec"
635
+ },
636
+ "description": "rows ordered by these entries, in order"
637
+ },
638
+ "filters": {
639
+ "type": "array",
640
+ "items": {}
641
+ },
642
+ "printAtBottom": {
643
+ "type": "boolean",
644
+ "description": "the footer at the bottom of the page the table ends on"
645
+ },
646
+ "overflow": {
647
+ "enum": [
648
+ "clip",
649
+ "paginate",
650
+ "shrink"
651
+ ],
652
+ "description": "wider than the page: continue on the next page set, repeating the first repeatColumns columns"
653
+ },
654
+ "repeatColumns": {
655
+ "type": "number"
656
+ },
657
+ "pageOrder": {
658
+ "enum": [
659
+ "down",
660
+ "across"
661
+ ]
662
+ },
663
+ "overflowTo": {
664
+ "type": "string",
665
+ "description": "fixed frame: continue rows in"
666
+ }
667
+ },
668
+ "required": [
669
+ "type",
670
+ "columns"
671
+ ]
672
+ }
673
+ ]
674
+ },
675
+ "Container": {
676
+ "allOf": [
677
+ {
678
+ "$ref": "#/$defs/ItemBase"
679
+ },
680
+ {
681
+ "type": "object",
682
+ "properties": {
683
+ "type": {
684
+ "const": "container"
685
+ },
686
+ "items": {
687
+ "type": "array",
688
+ "items": {
689
+ "$ref": "#/$defs/Item"
690
+ }
691
+ }
692
+ },
693
+ "required": [
694
+ "type",
695
+ "items"
696
+ ]
697
+ }
698
+ ]
699
+ },
700
+ "List": {
701
+ "allOf": [
702
+ {
703
+ "$ref": "#/$defs/ItemBase"
704
+ },
705
+ {
706
+ "type": "object",
707
+ "properties": {
708
+ "type": {
709
+ "const": "list"
710
+ },
711
+ "items": {
712
+ "type": "array",
713
+ "items": {
714
+ "$ref": "#/$defs/Item"
715
+ }
716
+ },
717
+ "groupBy": {
718
+ "x-ts": "Expr<string>"
719
+ },
720
+ "pageBreakBetween": {
721
+ "type": "boolean"
722
+ },
723
+ "sort": {
724
+ "type": "array",
725
+ "items": {
726
+ "$ref": "#/$defs/SortSpec"
727
+ },
728
+ "description": "rows ordered by these entries, in order"
729
+ },
730
+ "filters": {
731
+ "type": "array",
732
+ "items": {}
733
+ },
734
+ "columns": {
735
+ "type": "number",
736
+ "description": "records across (a grid list)"
737
+ },
738
+ "columnGap": {
739
+ "type": "number"
740
+ },
741
+ "newSection": {
742
+ "type": "boolean"
743
+ },
744
+ "groupAdjacent": {
745
+ "type": "boolean",
746
+ "description": "a new group at every change (not sorted)"
747
+ },
748
+ "inheritRows": {
749
+ "type": "boolean",
750
+ "description": "rows of the enclosing list row"
751
+ }
752
+ },
753
+ "required": [
754
+ "type",
755
+ "items"
756
+ ]
757
+ }
758
+ ]
759
+ },
760
+ "CheckBox": {
761
+ "allOf": [
762
+ {
763
+ "$ref": "#/$defs/ItemBase"
764
+ },
765
+ {
766
+ "type": "object",
767
+ "properties": {
768
+ "type": {
769
+ "const": "checkbox"
770
+ },
771
+ "value": {
772
+ "x-ts": "Expr<boolean>"
773
+ },
774
+ "text": {
775
+ "x-ts": "Expr<string>"
776
+ }
777
+ },
778
+ "required": [
779
+ "type"
780
+ ]
781
+ }
782
+ ]
783
+ },
784
+ "ChartAxis": {
785
+ "type": "object",
786
+ "properties": {
787
+ "title": {
788
+ "type": "string"
789
+ },
790
+ "format": {
791
+ "type": "string"
792
+ },
793
+ "min": {
794
+ "type": "number"
795
+ },
796
+ "max": {
797
+ "type": "number"
798
+ },
799
+ "log": {
800
+ "type": "boolean"
801
+ },
802
+ "gridlines": {
803
+ "type": "boolean"
804
+ },
805
+ "labelAngle": {
806
+ "type": "number",
807
+ "description": "category axis only: turn the labels, e.g. -45"
808
+ },
809
+ "reversed": {
810
+ "type": "boolean"
811
+ }
812
+ }
813
+ },
814
+ "ChartSeries": {
815
+ "type": "object",
816
+ "properties": {
817
+ "name": {
818
+ "type": "string"
819
+ },
820
+ "value": {
821
+ "x-ts": "Expr"
822
+ },
823
+ "color": {
824
+ "type": "string"
825
+ },
826
+ "type": {
827
+ "enum": [
828
+ "column",
829
+ "bar",
830
+ "line",
831
+ "area"
832
+ ],
833
+ "description": "combo charts: draw this series as columns, a line or an area"
834
+ },
835
+ "axis": {
836
+ "enum": [
837
+ "primary",
838
+ "secondary"
839
+ ]
840
+ },
841
+ "low": {
842
+ "x-ts": "Expr",
843
+ "description": "a range series (low + high), or with open + close a candlestick / OHLC series"
844
+ },
845
+ "high": {
846
+ "x-ts": "Expr"
847
+ },
848
+ "open": {
849
+ "x-ts": "Expr"
850
+ },
851
+ "close": {
852
+ "x-ts": "Expr"
853
+ },
854
+ "size": {
855
+ "x-ts": "Expr",
856
+ "description": "bubble size, per row"
857
+ },
858
+ "line": {
859
+ "enum": [
860
+ "straight",
861
+ "smooth",
862
+ "step"
863
+ ]
864
+ }
865
+ },
866
+ "additionalProperties": true
867
+ },
868
+ "ChartOverlay": {
869
+ "anyOf": [
870
+ {
871
+ "type": "object",
872
+ "properties": {
873
+ "type": {
874
+ "const": "trend"
875
+ },
876
+ "kind": {
877
+ "enum": [
878
+ "linear",
879
+ "exp",
880
+ "poly"
881
+ ]
882
+ },
883
+ "order": {
884
+ "type": "number"
885
+ },
886
+ "series": {
887
+ "type": "number"
888
+ },
889
+ "color": {
890
+ "type": "string"
891
+ },
892
+ "label": {
893
+ "type": "string"
894
+ }
895
+ },
896
+ "required": [
897
+ "type"
898
+ ]
899
+ },
900
+ {
901
+ "type": "object",
902
+ "properties": {
903
+ "type": {
904
+ "const": "movingAverage"
905
+ },
906
+ "period": {
907
+ "type": "number"
908
+ },
909
+ "series": {
910
+ "type": "number"
911
+ },
912
+ "color": {
913
+ "type": "string"
914
+ },
915
+ "label": {
916
+ "type": "string"
917
+ }
918
+ },
919
+ "required": [
920
+ "type"
921
+ ]
922
+ },
923
+ {
924
+ "type": "object",
925
+ "properties": {
926
+ "type": {
927
+ "const": "line"
928
+ },
929
+ "value": {
930
+ "x-ts": "number | Expr"
931
+ },
932
+ "axis": {
933
+ "enum": [
934
+ "primary",
935
+ "secondary"
936
+ ]
937
+ },
938
+ "color": {
939
+ "type": "string"
940
+ },
941
+ "label": {
942
+ "type": "string"
943
+ },
944
+ "showValue": {
945
+ "type": "boolean"
946
+ }
947
+ },
948
+ "required": [
949
+ "type",
950
+ "value"
951
+ ]
952
+ },
953
+ {
954
+ "type": "object",
955
+ "properties": {
956
+ "type": {
957
+ "const": "band"
958
+ },
959
+ "from": {
960
+ "x-ts": "number | Expr"
961
+ },
962
+ "to": {
963
+ "x-ts": "number | Expr"
964
+ },
965
+ "axis": {
966
+ "enum": [
967
+ "primary",
968
+ "secondary"
969
+ ]
970
+ },
971
+ "color": {
972
+ "type": "string"
973
+ },
974
+ "label": {
975
+ "type": "string"
976
+ }
977
+ },
978
+ "required": [
979
+ "type",
980
+ "from",
981
+ "to"
982
+ ]
983
+ }
984
+ ]
985
+ },
986
+ "ChartPalette": {
987
+ "enum": [
988
+ "default",
989
+ "office",
990
+ "colorblind",
991
+ "vivid",
992
+ "pastel",
993
+ "ocean",
994
+ "sunset",
995
+ "forest",
996
+ "berry",
997
+ "earth",
998
+ "grayscale",
999
+ "highContrast"
1000
+ ]
1001
+ },
1002
+ "Chart": {
1003
+ "allOf": [
1004
+ {
1005
+ "$ref": "#/$defs/ItemBase"
1006
+ },
1007
+ {
1008
+ "type": "object",
1009
+ "properties": {
1010
+ "type": {
1011
+ "const": "chart"
1012
+ },
1013
+ "chartType": {
1014
+ "enum": [
1015
+ "column",
1016
+ "bar",
1017
+ "line",
1018
+ "area",
1019
+ "pie",
1020
+ "donut",
1021
+ "scatter",
1022
+ "bubble",
1023
+ "radar",
1024
+ "polar",
1025
+ "candlestick",
1026
+ "ohlc",
1027
+ "gauge",
1028
+ "funnel",
1029
+ "treemap",
1030
+ "histogram",
1031
+ "boxplot",
1032
+ "waterfall",
1033
+ "gantt"
1034
+ ]
1035
+ },
1036
+ "title": {
1037
+ "x-ts": "Expr<string>"
1038
+ },
1039
+ "category": {
1040
+ "x-ts": "Expr<string>"
1041
+ },
1042
+ "categorySort": {
1043
+ "enum": [
1044
+ "asc",
1045
+ "desc"
1046
+ ]
1047
+ },
1048
+ "categoryFormat": {
1049
+ "type": "string"
1050
+ },
1051
+ "series": {
1052
+ "type": "array",
1053
+ "items": {
1054
+ "$ref": "#/$defs/ChartSeries"
1055
+ }
1056
+ },
1057
+ "seriesGroup": {
1058
+ "x-ts": "Expr<string>"
1059
+ },
1060
+ "stacked": {
1061
+ "x-ts": "boolean | 'percent'"
1062
+ },
1063
+ "showValues": {
1064
+ "type": "boolean"
1065
+ },
1066
+ "valueFormat": {
1067
+ "type": "string"
1068
+ },
1069
+ "legend": {
1070
+ "enum": [
1071
+ "bottom",
1072
+ "none"
1073
+ ]
1074
+ },
1075
+ "xValue": {
1076
+ "x-ts": "Expr"
1077
+ },
1078
+ "pointAction": {
1079
+ "$ref": "#/$defs/Action"
1080
+ },
1081
+ "pointColor": {
1082
+ "x-ts": "Expr<string>"
1083
+ },
1084
+ "tooltips": {
1085
+ "type": "boolean"
1086
+ },
1087
+ "xTitle": {
1088
+ "type": "string"
1089
+ },
1090
+ "fontSize": {
1091
+ "type": "number"
1092
+ },
1093
+ "background": {
1094
+ "type": "string"
1095
+ },
1096
+ "maxCategories": {
1097
+ "type": "number"
1098
+ },
1099
+ "outliers": {
1100
+ "enum": [
1101
+ "clip",
1102
+ "none"
1103
+ ],
1104
+ "description": "Scatter and bubble. clip: the axes stop at the 1st and 99th percentiles; points beyond are drawn at the edge with a ring and a warning. none: the full range. Unset: clip when 20 or more points have an extreme spread (full range over 5x the 1st-99th percentile range), else none"
1105
+ },
1106
+ "line": {
1107
+ "enum": [
1108
+ "straight",
1109
+ "smooth",
1110
+ "step"
1111
+ ]
1112
+ },
1113
+ "axes": {
1114
+ "type": "object",
1115
+ "properties": {
1116
+ "x": {
1117
+ "$ref": "#/$defs/ChartAxis"
1118
+ },
1119
+ "y": {
1120
+ "$ref": "#/$defs/ChartAxis"
1121
+ },
1122
+ "y2": {
1123
+ "$ref": "#/$defs/ChartAxis"
1124
+ }
1125
+ }
1126
+ },
1127
+ "overlays": {
1128
+ "type": "array",
1129
+ "items": {
1130
+ "$ref": "#/$defs/ChartOverlay"
1131
+ }
1132
+ },
1133
+ "labelTemplate": {
1134
+ "type": "string",
1135
+ "description": "{value} {category} {series} {percent}, or an =expression in the point's scope"
1136
+ },
1137
+ "labelPosition": {
1138
+ "enum": [
1139
+ "outside",
1140
+ "inside",
1141
+ "center"
1142
+ ]
1143
+ },
1144
+ "palette": {
1145
+ "x-ts": "ChartPalette | string[]"
1146
+ },
1147
+ "colorByCategory": {
1148
+ "type": "boolean",
1149
+ "description": "opt-in: each category (pie, donut, funnel slices; seriesGroup series) keeps one colour in every chart of the report that sets it; off: colours by position"
1150
+ },
1151
+ "animation": {
1152
+ "enum": [
1153
+ "none",
1154
+ "grow",
1155
+ "fade"
1156
+ ],
1157
+ "description": "viewer only; exports stay static"
1158
+ },
1159
+ "upColor": {
1160
+ "type": "string"
1161
+ },
1162
+ "downColor": {
1163
+ "type": "string"
1164
+ },
1165
+ "binCount": {
1166
+ "type": "number",
1167
+ "description": "number of bins (empty: automatic)"
1168
+ },
1169
+ "binWidth": {
1170
+ "type": "number",
1171
+ "description": "bin width (instead of a number of bins)"
1172
+ },
1173
+ "showMean": {
1174
+ "type": "boolean",
1175
+ "description": "mark the mean"
1176
+ },
1177
+ "waterfallTotals": {
1178
+ "x-ts": "Expr",
1179
+ "description": "subtotal bar when (e.g. =Fields.isTotal)"
1180
+ },
1181
+ "showTotal": {
1182
+ "type": "boolean",
1183
+ "description": "total bar at the end"
1184
+ },
1185
+ "totalLabel": {
1186
+ "type": "string",
1187
+ "description": "total bar label"
1188
+ },
1189
+ "totalColor": {
1190
+ "type": "string",
1191
+ "description": "total colour"
1192
+ },
1193
+ "ganttStart": {
1194
+ "x-ts": "Expr",
1195
+ "description": "bar start (date or number)"
1196
+ },
1197
+ "ganttEnd": {
1198
+ "x-ts": "Expr",
1199
+ "description": "bar end (date or number)"
1200
+ },
1201
+ "ganttToday": {
1202
+ "type": "boolean",
1203
+ "description": "today line"
1204
+ },
1205
+ "todayColor": {
1206
+ "type": "string",
1207
+ "description": "today line colour"
1208
+ },
1209
+ "gaugeShape": {
1210
+ "enum": [
1211
+ "half",
1212
+ "threeQuarter",
1213
+ "full"
1214
+ ],
1215
+ "description": "gauge shape"
1216
+ },
1217
+ "gaugeIndicator": {
1218
+ "enum": [
1219
+ "needle",
1220
+ "pointer",
1221
+ "bar"
1222
+ ],
1223
+ "description": "value shown by"
1224
+ },
1225
+ "pointerColor": {
1226
+ "type": "string",
1227
+ "description": "needle or pointer colour"
1228
+ },
1229
+ "gaugeTicks": {
1230
+ "type": "boolean",
1231
+ "description": "tick marks and values"
1232
+ }
1233
+ },
1234
+ "required": [
1235
+ "type"
1236
+ ]
1237
+ }
1238
+ ]
1239
+ },
1240
+ "FormField": {
1241
+ "allOf": [
1242
+ {
1243
+ "$ref": "#/$defs/ItemBase"
1244
+ },
1245
+ {
1246
+ "type": "object",
1247
+ "properties": {
1248
+ "type": {
1249
+ "const": "field"
1250
+ },
1251
+ "kind": {
1252
+ "enum": [
1253
+ "text",
1254
+ "multiline",
1255
+ "checkbox",
1256
+ "choice"
1257
+ ]
1258
+ },
1259
+ "fieldName": {
1260
+ "x-ts": "Expr<string>"
1261
+ },
1262
+ "value": {
1263
+ "x-ts": "Expr"
1264
+ },
1265
+ "options": {
1266
+ "x-ts": "Expr"
1267
+ },
1268
+ "required": {
1269
+ "type": "boolean"
1270
+ },
1271
+ "readOnly": {
1272
+ "type": "boolean"
1273
+ }
1274
+ },
1275
+ "required": [
1276
+ "type"
1277
+ ]
1278
+ }
1279
+ ]
1280
+ },
1281
+ "MapItem": {
1282
+ "allOf": [
1283
+ {
1284
+ "$ref": "#/$defs/ItemBase"
1285
+ },
1286
+ {
1287
+ "type": "object",
1288
+ "properties": {
1289
+ "type": {
1290
+ "const": "map"
1291
+ },
1292
+ "geojson": {
1293
+ "type": "string"
1294
+ },
1295
+ "geometry": {
1296
+ "x-ts": "Expr"
1297
+ },
1298
+ "shapeKey": {
1299
+ "x-ts": "Expr<string>"
1300
+ },
1301
+ "valueDataSet": {
1302
+ "type": "string"
1303
+ },
1304
+ "valueKey": {
1305
+ "x-ts": "Expr<string>"
1306
+ },
1307
+ "value": {
1308
+ "x-ts": "Expr<number>"
1309
+ },
1310
+ "valueFormat": {
1311
+ "type": "string"
1312
+ },
1313
+ "colorLow": {
1314
+ "type": "string"
1315
+ },
1316
+ "colorHigh": {
1317
+ "type": "string"
1318
+ },
1319
+ "legend": {
1320
+ "enum": [
1321
+ "bottom",
1322
+ "none"
1323
+ ]
1324
+ },
1325
+ "pointDataSet": {
1326
+ "type": "string"
1327
+ },
1328
+ "lat": {
1329
+ "x-ts": "Expr<number>"
1330
+ },
1331
+ "lon": {
1332
+ "x-ts": "Expr<number>"
1333
+ },
1334
+ "pointSize": {
1335
+ "x-ts": "Expr<number>"
1336
+ },
1337
+ "pointLabel": {
1338
+ "x-ts": "Expr<string>"
1339
+ },
1340
+ "pointColor": {
1341
+ "type": "string"
1342
+ },
1343
+ "colorScale": {
1344
+ "enum": [
1345
+ "continuous",
1346
+ "classes"
1347
+ ],
1348
+ "description": "colour scale"
1349
+ },
1350
+ "classes": {
1351
+ "type": "number",
1352
+ "description": "number of classes (2–9)"
1353
+ },
1354
+ "lineColor": {
1355
+ "type": "string",
1356
+ "description": "lines: colour (LineString shapes)"
1357
+ },
1358
+ "lineWidth": {
1359
+ "type": "number",
1360
+ "description": "lines: width (pt)"
1361
+ },
1362
+ "regionAction": {
1363
+ "$ref": "#/$defs/Action",
1364
+ "description": "click on a region"
1365
+ },
1366
+ "tooltips": {
1367
+ "type": "boolean",
1368
+ "description": "tooltips on hover"
1369
+ }
1370
+ },
1371
+ "required": [
1372
+ "type"
1373
+ ]
1374
+ }
1375
+ ]
1376
+ },
1377
+ "Sparkline": {
1378
+ "allOf": [
1379
+ {
1380
+ "$ref": "#/$defs/ItemBase"
1381
+ },
1382
+ {
1383
+ "type": "object",
1384
+ "properties": {
1385
+ "type": {
1386
+ "const": "sparkline"
1387
+ },
1388
+ "category": {
1389
+ "x-ts": "Expr"
1390
+ },
1391
+ "value": {
1392
+ "x-ts": "Expr<number>"
1393
+ },
1394
+ "color": {
1395
+ "type": "string"
1396
+ },
1397
+ "style": {
1398
+ "x-ts": "'line' | 'column' | 'area' | 'winloss'",
1399
+ "enum": [
1400
+ "line",
1401
+ "column",
1402
+ "area",
1403
+ "winloss"
1404
+ ]
1405
+ },
1406
+ "bandLow": {
1407
+ "x-ts": "Expr<number>"
1408
+ },
1409
+ "bandHigh": {
1410
+ "x-ts": "Expr<number>"
1411
+ },
1412
+ "bandColor": {
1413
+ "type": "string"
1414
+ },
1415
+ "negColor": {
1416
+ "type": "string"
1417
+ },
1418
+ "negativeColor": {
1419
+ "type": "string",
1420
+ "description": "data bars: the colour of a bar with a negative value (default #dc2626)"
1421
+ }
1422
+ },
1423
+ "required": [
1424
+ "type"
1425
+ ]
1426
+ }
1427
+ ]
1428
+ },
1429
+ "DataBar": {
1430
+ "allOf": [
1431
+ {
1432
+ "$ref": "#/$defs/ItemBase"
1433
+ },
1434
+ {
1435
+ "type": "object",
1436
+ "properties": {
1437
+ "type": {
1438
+ "const": "databar"
1439
+ },
1440
+ "value": {
1441
+ "x-ts": "Expr<number>"
1442
+ },
1443
+ "max": {
1444
+ "x-ts": "Expr<number>"
1445
+ },
1446
+ "color": {
1447
+ "type": "string"
1448
+ },
1449
+ "negativeColor": {
1450
+ "type": "string",
1451
+ "description": "the colour of a bar with a negative value (default #dc2626)"
1452
+ }
1453
+ },
1454
+ "required": [
1455
+ "type"
1456
+ ]
1457
+ }
1458
+ ]
1459
+ },
1460
+ "Bullet": {
1461
+ "allOf": [
1462
+ {
1463
+ "$ref": "#/$defs/ItemBase"
1464
+ },
1465
+ {
1466
+ "type": "object",
1467
+ "properties": {
1468
+ "type": {
1469
+ "const": "bullet"
1470
+ },
1471
+ "value": {
1472
+ "x-ts": "Expr<number>"
1473
+ },
1474
+ "max": {
1475
+ "x-ts": "Expr<number>"
1476
+ },
1477
+ "target": {
1478
+ "x-ts": "Expr<number>"
1479
+ },
1480
+ "color": {
1481
+ "type": "string"
1482
+ }
1483
+ },
1484
+ "required": [
1485
+ "type"
1486
+ ]
1487
+ }
1488
+ ]
1489
+ },
1490
+ "IconSet": {
1491
+ "allOf": [
1492
+ {
1493
+ "$ref": "#/$defs/ItemBase"
1494
+ },
1495
+ {
1496
+ "type": "object",
1497
+ "properties": {
1498
+ "type": {
1499
+ "const": "iconset"
1500
+ },
1501
+ "value": {
1502
+ "x-ts": "Expr<number>"
1503
+ },
1504
+ "iconSet": {
1505
+ "enum": [
1506
+ "trafficLights",
1507
+ "arrows",
1508
+ "symbols",
1509
+ "flags",
1510
+ "ratings"
1511
+ ]
1512
+ },
1513
+ "lower": {
1514
+ "x-ts": "Expr<number>"
1515
+ },
1516
+ "upper": {
1517
+ "x-ts": "Expr<number>"
1518
+ },
1519
+ "reverse": {
1520
+ "type": "boolean",
1521
+ "description": "reverse order (higher is worse)"
1522
+ }
1523
+ },
1524
+ "required": [
1525
+ "type"
1526
+ ]
1527
+ }
1528
+ ]
1529
+ },
1530
+ "RangeBar": {
1531
+ "allOf": [
1532
+ {
1533
+ "$ref": "#/$defs/ItemBase"
1534
+ },
1535
+ {
1536
+ "type": "object",
1537
+ "properties": {
1538
+ "type": {
1539
+ "const": "rangebar"
1540
+ },
1541
+ "low": {
1542
+ "x-ts": "Expr<number>"
1543
+ },
1544
+ "high": {
1545
+ "x-ts": "Expr<number>"
1546
+ },
1547
+ "min": {
1548
+ "x-ts": "Expr<number>"
1549
+ },
1550
+ "max": {
1551
+ "x-ts": "Expr<number>"
1552
+ },
1553
+ "color": {
1554
+ "type": "string"
1555
+ }
1556
+ },
1557
+ "required": [
1558
+ "type"
1559
+ ]
1560
+ }
1561
+ ]
1562
+ },
1563
+ "Barcode": {
1564
+ "allOf": [
1565
+ {
1566
+ "$ref": "#/$defs/ItemBase"
1567
+ },
1568
+ {
1569
+ "type": "object",
1570
+ "properties": {
1571
+ "type": {
1572
+ "const": "barcode"
1573
+ },
1574
+ "symbology": {
1575
+ "type": "string",
1576
+ "description": "a bwip-js id: code128, qrcode, datamatrix, pdf417, ean13, gs1-128, …"
1577
+ },
1578
+ "value": {
1579
+ "x-ts": "Expr<string>"
1580
+ },
1581
+ "showText": {
1582
+ "type": "boolean"
1583
+ },
1584
+ "captionPosition": {
1585
+ "enum": [
1586
+ "below",
1587
+ "above"
1588
+ ]
1589
+ },
1590
+ "quietZone": {
1591
+ "type": "number",
1592
+ "description": "points of white around the code"
1593
+ },
1594
+ "rotate": {
1595
+ "x-ts": "0 | 90 | 180 | 270 | '0' | '90' | '180' | '270'",
1596
+ "enum": [
1597
+ 0,
1598
+ 90,
1599
+ 180,
1600
+ 270,
1601
+ "0",
1602
+ "90",
1603
+ "180",
1604
+ "270"
1605
+ ]
1606
+ },
1607
+ "qrErrorLevel": {
1608
+ "enum": [
1609
+ "L",
1610
+ "M",
1611
+ "Q",
1612
+ "H"
1613
+ ]
1614
+ },
1615
+ "qrVersion": {
1616
+ "type": "number"
1617
+ },
1618
+ "qrMask": {
1619
+ "type": "number"
1620
+ },
1621
+ "dmShape": {
1622
+ "enum": [
1623
+ "square",
1624
+ "rectangle"
1625
+ ]
1626
+ },
1627
+ "dmSize": {
1628
+ "type": "string"
1629
+ },
1630
+ "pdfColumns": {
1631
+ "type": "number"
1632
+ },
1633
+ "pdfRows": {
1634
+ "type": "number"
1635
+ },
1636
+ "pdfErrorLevel": {
1637
+ "type": "number"
1638
+ },
1639
+ "pdfCompact": {
1640
+ "type": "boolean"
1641
+ },
1642
+ "aztecLayers": {
1643
+ "type": "number"
1644
+ },
1645
+ "aztecErrorPercent": {
1646
+ "type": "number"
1647
+ },
1648
+ "maxiMode": {
1649
+ "type": "number"
1650
+ },
1651
+ "checkDigit": {
1652
+ "type": "boolean"
1653
+ },
1654
+ "barRatio": {
1655
+ "type": "number"
1656
+ }
1657
+ },
1658
+ "required": [
1659
+ "type"
1660
+ ]
1661
+ }
1662
+ ]
1663
+ },
1664
+ "PivotGroup": {
1665
+ "type": "object",
1666
+ "properties": {
1667
+ "expr": {
1668
+ "x-ts": "Expr"
1669
+ },
1670
+ "name": {
1671
+ "type": "string"
1672
+ },
1673
+ "label": {
1674
+ "x-ts": "Expr<string>"
1675
+ },
1676
+ "format": {
1677
+ "type": "string"
1678
+ },
1679
+ "sort": {
1680
+ "enum": [
1681
+ "asc",
1682
+ "desc",
1683
+ "none"
1684
+ ]
1685
+ },
1686
+ "sortBy": {
1687
+ "x-ts": "Expr"
1688
+ },
1689
+ "total": {
1690
+ "enum": [
1691
+ "none",
1692
+ "before",
1693
+ "after"
1694
+ ],
1695
+ "description": "a total of this group's instances inside the group above (the first group's total is the grand total)"
1696
+ },
1697
+ "totalLabel": {
1698
+ "type": "string"
1699
+ },
1700
+ "collapsible": {
1701
+ "type": "boolean"
1702
+ },
1703
+ "initiallyCollapsed": {
1704
+ "type": "boolean"
1705
+ },
1706
+ "width": {
1707
+ "type": "number",
1708
+ "description": "row groups: the header column's width and title"
1709
+ },
1710
+ "header": {
1711
+ "type": "string"
1712
+ },
1713
+ "style": {
1714
+ "$ref": "#/$defs/Style"
1715
+ }
1716
+ },
1717
+ "required": [
1718
+ "expr"
1719
+ ]
1720
+ },
1721
+ "PivotValue": {
1722
+ "type": "object",
1723
+ "properties": {
1724
+ "value": {
1725
+ "x-ts": "Expr"
1726
+ },
1727
+ "name": {
1728
+ "type": "string"
1729
+ },
1730
+ "label": {
1731
+ "type": "string"
1732
+ },
1733
+ "format": {
1734
+ "type": "string"
1735
+ },
1736
+ "show": {
1737
+ "enum": [
1738
+ "value",
1739
+ "percentOfTotal",
1740
+ "percentOfRow",
1741
+ "percentOfColumn"
1742
+ ]
1743
+ },
1744
+ "width": {
1745
+ "type": "number"
1746
+ },
1747
+ "style": {
1748
+ "$ref": "#/$defs/Style"
1749
+ }
1750
+ },
1751
+ "required": [
1752
+ "value"
1753
+ ]
1754
+ },
1755
+ "Matrix": {
1756
+ "allOf": [
1757
+ {
1758
+ "$ref": "#/$defs/ItemBase"
1759
+ },
1760
+ {
1761
+ "type": "object",
1762
+ "properties": {
1763
+ "type": {
1764
+ "const": "matrix"
1765
+ },
1766
+ "rowGroups": {
1767
+ "type": "array",
1768
+ "items": {
1769
+ "$ref": "#/$defs/PivotGroup"
1770
+ },
1771
+ "description": "the tablix form: nested row and column groups, several values"
1772
+ },
1773
+ "columnGroups": {
1774
+ "type": "array",
1775
+ "items": {
1776
+ "$ref": "#/$defs/PivotGroup"
1777
+ }
1778
+ },
1779
+ "values": {
1780
+ "type": "array",
1781
+ "items": {
1782
+ "$ref": "#/$defs/PivotValue"
1783
+ }
1784
+ },
1785
+ "overflow": {
1786
+ "enum": [
1787
+ "paginate",
1788
+ "shrink",
1789
+ "clip"
1790
+ ]
1791
+ },
1792
+ "pageOrder": {
1793
+ "enum": [
1794
+ "down",
1795
+ "across"
1796
+ ]
1797
+ },
1798
+ "rowGroup": {
1799
+ "x-ts": "Expr<string>",
1800
+ "description": "the older single-group form (still read when the arrays are absent)"
1801
+ },
1802
+ "columnGroup": {
1803
+ "x-ts": "Expr<string>"
1804
+ },
1805
+ "value": {
1806
+ "x-ts": "Expr"
1807
+ },
1808
+ "valueFormat": {
1809
+ "type": "string"
1810
+ },
1811
+ "rowSort": {
1812
+ "enum": [
1813
+ "asc",
1814
+ "desc",
1815
+ "none"
1816
+ ]
1817
+ },
1818
+ "columnSort": {
1819
+ "enum": [
1820
+ "asc",
1821
+ "desc",
1822
+ "none"
1823
+ ]
1824
+ },
1825
+ "rowTotals": {
1826
+ "type": "boolean"
1827
+ },
1828
+ "columnTotals": {
1829
+ "type": "boolean"
1830
+ },
1831
+ "corner": {
1832
+ "type": "string"
1833
+ },
1834
+ "rowHeaderWidth": {
1835
+ "type": "number"
1836
+ },
1837
+ "columnWidth": {
1838
+ "type": "number"
1839
+ },
1840
+ "repeatHeader": {
1841
+ "type": "boolean"
1842
+ },
1843
+ "headerStyle": {
1844
+ "$ref": "#/$defs/Style"
1845
+ },
1846
+ "cellStyle": {
1847
+ "$ref": "#/$defs/Style"
1848
+ },
1849
+ "totalStyle": {
1850
+ "$ref": "#/$defs/Style"
1851
+ }
1852
+ },
1853
+ "required": [
1854
+ "type"
1855
+ ]
1856
+ }
1857
+ ]
1858
+ },
1859
+ "Subreport": {
1860
+ "allOf": [
1861
+ {
1862
+ "$ref": "#/$defs/ItemBase"
1863
+ },
1864
+ {
1865
+ "type": "object",
1866
+ "properties": {
1867
+ "type": {
1868
+ "const": "subreport"
1869
+ },
1870
+ "report": {
1871
+ "type": "string"
1872
+ },
1873
+ "params": {
1874
+ "x-ts": "Record<string, Expr>",
1875
+ "type": "object"
1876
+ }
1877
+ },
1878
+ "required": [
1879
+ "type",
1880
+ "report"
1881
+ ]
1882
+ }
1883
+ ]
1884
+ },
1885
+ "TableOfContents": {
1886
+ "allOf": [
1887
+ {
1888
+ "$ref": "#/$defs/ItemBase"
1889
+ },
1890
+ {
1891
+ "type": "object",
1892
+ "properties": {
1893
+ "type": {
1894
+ "const": "toc"
1895
+ },
1896
+ "title": {
1897
+ "type": "string"
1898
+ },
1899
+ "levels": {
1900
+ "type": "number"
1901
+ },
1902
+ "source": {
1903
+ "enum": [
1904
+ "bookmarks",
1905
+ "headings"
1906
+ ],
1907
+ "description": "bookmarks (default) or text boxes with a headingLevel"
1908
+ },
1909
+ "numbering": {
1910
+ "x-ts": "string | ('decimal' | 'roman' | 'alpha')[]",
1911
+ "description": "decimal, roman or alpha; one per level as an array or \"roman,alpha\" (the last repeats)"
1912
+ }
1913
+ },
1914
+ "required": [
1915
+ "type"
1916
+ ]
1917
+ }
1918
+ ]
1919
+ },
1920
+ "Item": {
1921
+ "anyOf": [
1922
+ {
1923
+ "$ref": "#/$defs/TextBox"
1924
+ },
1925
+ {
1926
+ "$ref": "#/$defs/RichText"
1927
+ },
1928
+ {
1929
+ "$ref": "#/$defs/Image"
1930
+ },
1931
+ {
1932
+ "$ref": "#/$defs/Line"
1933
+ },
1934
+ {
1935
+ "$ref": "#/$defs/Shape"
1936
+ },
1937
+ {
1938
+ "$ref": "#/$defs/Table"
1939
+ },
1940
+ {
1941
+ "$ref": "#/$defs/Container"
1942
+ },
1943
+ {
1944
+ "$ref": "#/$defs/List"
1945
+ },
1946
+ {
1947
+ "$ref": "#/$defs/CheckBox"
1948
+ },
1949
+ {
1950
+ "$ref": "#/$defs/Chart"
1951
+ },
1952
+ {
1953
+ "$ref": "#/$defs/FormField"
1954
+ },
1955
+ {
1956
+ "$ref": "#/$defs/MapItem"
1957
+ },
1958
+ {
1959
+ "$ref": "#/$defs/Sparkline"
1960
+ },
1961
+ {
1962
+ "$ref": "#/$defs/DataBar"
1963
+ },
1964
+ {
1965
+ "$ref": "#/$defs/Bullet"
1966
+ },
1967
+ {
1968
+ "$ref": "#/$defs/IconSet"
1969
+ },
1970
+ {
1971
+ "$ref": "#/$defs/RangeBar"
1972
+ },
1973
+ {
1974
+ "$ref": "#/$defs/Barcode"
1975
+ },
1976
+ {
1977
+ "$ref": "#/$defs/Matrix"
1978
+ },
1979
+ {
1980
+ "$ref": "#/$defs/Subreport"
1981
+ },
1982
+ {
1983
+ "$ref": "#/$defs/TableOfContents"
1984
+ }
1985
+ ]
1986
+ },
1987
+ "ItemType": {
1988
+ "x-ts-decl": "export type ItemType = Item['type'];"
1989
+ },
1990
+ "Band": {
1991
+ "type": "object",
1992
+ "properties": {
1993
+ "height": {
1994
+ "type": "number"
1995
+ },
1996
+ "items": {
1997
+ "type": "array",
1998
+ "items": {
1999
+ "$ref": "#/$defs/Item"
2000
+ }
2001
+ },
2002
+ "printOnFirstPage": {
2003
+ "type": "boolean"
2004
+ },
2005
+ "printOnLastPage": {
2006
+ "type": "boolean"
2007
+ },
2008
+ "columns": {
2009
+ "type": "object",
2010
+ "properties": {
2011
+ "count": {
2012
+ "type": "number"
2013
+ },
2014
+ "gap": {
2015
+ "type": "number"
2016
+ }
2017
+ },
2018
+ "required": [
2019
+ "count"
2020
+ ]
2021
+ }
2022
+ },
2023
+ "required": [
2024
+ "items"
2025
+ ]
2026
+ },
2027
+ "BodySection": {
2028
+ "description": "A body section with its own page settings (missing keys come from the report's page).",
2029
+ "allOf": [
2030
+ {
2031
+ "$ref": "#/$defs/Band"
2032
+ },
2033
+ {
2034
+ "type": "object",
2035
+ "properties": {
2036
+ "name": {
2037
+ "type": "string"
2038
+ },
2039
+ "page": {
2040
+ "x-ts": "Report['page']",
2041
+ "type": "object"
2042
+ }
2043
+ }
2044
+ }
2045
+ ]
2046
+ },
2047
+ "Field": {
2048
+ "type": "object",
2049
+ "properties": {
2050
+ "name": {
2051
+ "type": "string"
2052
+ },
2053
+ "type": {
2054
+ "enum": [
2055
+ "string",
2056
+ "number",
2057
+ "integer",
2058
+ "boolean",
2059
+ "date",
2060
+ "datetime"
2061
+ ],
2062
+ "description": "'string' keeps text as text: an ISO date string in it is not turned into a date"
2063
+ },
2064
+ "path": {
2065
+ "type": "string"
2066
+ },
2067
+ "expr": {
2068
+ "type": "string"
2069
+ }
2070
+ },
2071
+ "required": [
2072
+ "name"
2073
+ ]
2074
+ },
2075
+ "Parameter": {
2076
+ "type": "object",
2077
+ "properties": {
2078
+ "name": {
2079
+ "type": "string"
2080
+ },
2081
+ "type": {
2082
+ "enum": [
2083
+ "string",
2084
+ "number",
2085
+ "integer",
2086
+ "boolean",
2087
+ "date",
2088
+ "datetime"
2089
+ ]
2090
+ },
2091
+ "prompt": {
2092
+ "type": "string"
2093
+ },
2094
+ "default": {},
2095
+ "required": {
2096
+ "type": "boolean"
2097
+ },
2098
+ "multi": {
2099
+ "type": "boolean"
2100
+ },
2101
+ "hidden": {
2102
+ "type": "boolean"
2103
+ },
2104
+ "options": {
2105
+ "type": "array",
2106
+ "items": {
2107
+ "x-ts": "string | number | { value: unknown; label?: string }"
2108
+ }
2109
+ },
2110
+ "optionsFrom": {
2111
+ "type": "object",
2112
+ "properties": {
2113
+ "dataSet": {
2114
+ "type": "string"
2115
+ },
2116
+ "value": {
2117
+ "type": "string"
2118
+ },
2119
+ "label": {
2120
+ "type": "string"
2121
+ }
2122
+ },
2123
+ "required": [
2124
+ "dataSet",
2125
+ "value"
2126
+ ]
2127
+ },
2128
+ "editor": {
2129
+ "type": "string"
2130
+ }
2131
+ },
2132
+ "required": [
2133
+ "name"
2134
+ ],
2135
+ "additionalProperties": true
2136
+ },
2137
+ "DataSource": {
2138
+ "anyOf": [
2139
+ {
2140
+ "type": "object",
2141
+ "properties": {
2142
+ "name": {
2143
+ "type": "string"
2144
+ },
2145
+ "type": {
2146
+ "const": "json"
2147
+ },
2148
+ "data": {}
2149
+ },
2150
+ "required": [
2151
+ "name",
2152
+ "type",
2153
+ "data"
2154
+ ]
2155
+ },
2156
+ {
2157
+ "type": "object",
2158
+ "properties": {
2159
+ "name": {
2160
+ "type": "string"
2161
+ },
2162
+ "type": {
2163
+ "const": "csv"
2164
+ },
2165
+ "data": {
2166
+ "type": "string"
2167
+ },
2168
+ "url": {
2169
+ "type": "string"
2170
+ }
2171
+ },
2172
+ "required": [
2173
+ "name",
2174
+ "type"
2175
+ ],
2176
+ "additionalProperties": true
2177
+ },
2178
+ {
2179
+ "type": "object",
2180
+ "properties": {
2181
+ "name": {
2182
+ "type": "string"
2183
+ },
2184
+ "type": {
2185
+ "enum": [
2186
+ "rest",
2187
+ "graphql"
2188
+ ]
2189
+ },
2190
+ "url": {
2191
+ "type": "string"
2192
+ },
2193
+ "method": {
2194
+ "type": "string"
2195
+ },
2196
+ "headers": {
2197
+ "x-ts": "Record<string, string>",
2198
+ "type": "object"
2199
+ },
2200
+ "query": {
2201
+ "type": "string"
2202
+ }
2203
+ },
2204
+ "required": [
2205
+ "name",
2206
+ "type",
2207
+ "url"
2208
+ ],
2209
+ "additionalProperties": true
2210
+ },
2211
+ {
2212
+ "type": "object",
2213
+ "properties": {
2214
+ "name": {
2215
+ "type": "string"
2216
+ },
2217
+ "type": {
2218
+ "const": "sql"
2219
+ },
2220
+ "connection": {
2221
+ "type": "string"
2222
+ },
2223
+ "query": {
2224
+ "type": "string"
2225
+ }
2226
+ },
2227
+ "required": [
2228
+ "name",
2229
+ "type",
2230
+ "connection",
2231
+ "query"
2232
+ ],
2233
+ "additionalProperties": true
2234
+ }
2235
+ ]
2236
+ },
2237
+ "DataSet": {
2238
+ "type": "object",
2239
+ "properties": {
2240
+ "name": {
2241
+ "type": "string"
2242
+ },
2243
+ "source": {
2244
+ "type": "string"
2245
+ },
2246
+ "path": {
2247
+ "type": "string"
2248
+ },
2249
+ "detectDates": {
2250
+ "type": "boolean",
2251
+ "description": "false: strings that look like ISO dates stay text (default true: they become dates when fields are detected)"
2252
+ },
2253
+ "fields": {
2254
+ "type": "array",
2255
+ "items": {
2256
+ "$ref": "#/$defs/Field"
2257
+ },
2258
+ "description": "the fields, typed; none: detected from the rows"
2259
+ },
2260
+ "filters": {
2261
+ "type": "array",
2262
+ "items": {}
2263
+ },
2264
+ "sort": {
2265
+ "type": "array",
2266
+ "items": {
2267
+ "$ref": "#/$defs/SortSpec"
2268
+ },
2269
+ "description": "rows ordered by these entries, in order"
2270
+ }
2271
+ },
2272
+ "required": [
2273
+ "name",
2274
+ "source"
2275
+ ],
2276
+ "additionalProperties": true
2277
+ },
2278
+ "Report": {
2279
+ "description": "A ReportWright report definition (pagewright/report@1).",
2280
+ "type": "object",
2281
+ "properties": {
2282
+ "$schema": {
2283
+ "description": "pagewright/report@1; reportwright/report@1 is the same format under the new name.",
2284
+ "enum": [
2285
+ "pagewright/report@1",
2286
+ "reportwright/report@1"
2287
+ ]
2288
+ },
2289
+ "name": {
2290
+ "type": "string"
2291
+ },
2292
+ "description": {
2293
+ "type": "string"
2294
+ },
2295
+ "locale": {
2296
+ "type": "string"
2297
+ },
2298
+ "currency": {
2299
+ "type": "string",
2300
+ "description": "ISO 4217 code for C formats; none: the locale's own currency (en-IN: INR)"
2301
+ },
2302
+ "nonFinite": {
2303
+ "enum": [
2304
+ "blank",
2305
+ "error"
2306
+ ],
2307
+ "description": "how Infinity and NaN (1/0, 0/0) print: as SSRS (default), blank, or #Error"
2308
+ },
2309
+ "grouping": {
2310
+ "enum": [
2311
+ "always",
2312
+ "never"
2313
+ ],
2314
+ "description": "digit grouping of numbers: as the locale's rule (default, Intl/CLDR: es-ES 1234,50), always, or never"
2315
+ },
2316
+ "page": {
2317
+ "type": "object",
2318
+ "properties": {
2319
+ "size": {
2320
+ "x-ts": "'A4' | 'A3' | 'A5' | 'Letter' | 'Legal' | 'Pageless' | string | [number, number]"
2321
+ },
2322
+ "orientation": {
2323
+ "enum": [
2324
+ "portrait",
2325
+ "landscape"
2326
+ ]
2327
+ },
2328
+ "margins": {
2329
+ "x-ts": "[number, number, number, number] | number",
2330
+ "description": "top, right, bottom, left in points"
2331
+ },
2332
+ "width": {
2333
+ "type": "number"
2334
+ },
2335
+ "height": {
2336
+ "type": "number"
2337
+ }
2338
+ },
2339
+ "additionalProperties": true
2340
+ },
2341
+ "parameters": {
2342
+ "type": "array",
2343
+ "items": {
2344
+ "$ref": "#/$defs/Parameter"
2345
+ }
2346
+ },
2347
+ "parameterLayout": {},
2348
+ "liveParameters": {
2349
+ "type": "boolean"
2350
+ },
2351
+ "dataSources": {
2352
+ "type": "array",
2353
+ "items": {
2354
+ "$ref": "#/$defs/DataSource"
2355
+ }
2356
+ },
2357
+ "dataSets": {
2358
+ "type": "array",
2359
+ "items": {
2360
+ "$ref": "#/$defs/DataSet"
2361
+ }
2362
+ },
2363
+ "styles": {
2364
+ "type": "object",
2365
+ "properties": {
2366
+ "base": {
2367
+ "$ref": "#/$defs/Style"
2368
+ },
2369
+ "named": {
2370
+ "x-ts": "Record<string, Style>",
2371
+ "type": "object"
2372
+ }
2373
+ }
2374
+ },
2375
+ "images": {
2376
+ "x-ts": "Record<string, `data:image/${string}`>",
2377
+ "type": "object",
2378
+ "description": "images the report carries, by name, as data:image/… URIs; an image's src \"embedded:<name>\" uses one"
2379
+ },
2380
+ "sections": {
2381
+ "type": "object",
2382
+ "properties": {
2383
+ "pageHeader": {
2384
+ "$ref": "#/$defs/Band"
2385
+ },
2386
+ "body": {
2387
+ "x-ts": "Band | BodySection[]"
2388
+ },
2389
+ "pageFooter": {
2390
+ "$ref": "#/$defs/Band"
2391
+ }
2392
+ },
2393
+ "required": [
2394
+ "body"
2395
+ ]
2396
+ }
2397
+ },
2398
+ "required": [
2399
+ "$schema",
2400
+ "sections"
2401
+ ],
2402
+ "examples": [
2403
+ {
2404
+ "$schema": "pagewright/report@1",
2405
+ "name": "Invoice",
2406
+ "page": {
2407
+ "size": "A4",
2408
+ "margins": [
2409
+ 36,
2410
+ 36,
2411
+ 36,
2412
+ 36
2413
+ ]
2414
+ },
2415
+ "dataSources": [
2416
+ {
2417
+ "name": "orders",
2418
+ "type": "json",
2419
+ "data": {
2420
+ "rows": [
2421
+ {
2422
+ "customer": "Asha Rao",
2423
+ "amount": 1200.5
2424
+ }
2425
+ ]
2426
+ }
2427
+ }
2428
+ ],
2429
+ "dataSets": [
2430
+ {
2431
+ "name": "Rows",
2432
+ "source": "orders",
2433
+ "path": "$.rows"
2434
+ }
2435
+ ],
2436
+ "sections": {
2437
+ "body": {
2438
+ "items": [
2439
+ {
2440
+ "type": "textbox",
2441
+ "name": "Title",
2442
+ "x": 0,
2443
+ "y": 0,
2444
+ "w": 300,
2445
+ "h": 24,
2446
+ "value": "Invoice",
2447
+ "style": {
2448
+ "fontSize": 18,
2449
+ "fontWeight": "bold"
2450
+ }
2451
+ },
2452
+ {
2453
+ "type": "table",
2454
+ "name": "Lines",
2455
+ "x": 0,
2456
+ "y": 40,
2457
+ "w": 400,
2458
+ "h": 40,
2459
+ "dataSet": "Rows",
2460
+ "columns": [
2461
+ {
2462
+ "width": 250
2463
+ },
2464
+ {
2465
+ "width": 150
2466
+ }
2467
+ ],
2468
+ "header": [
2469
+ {
2470
+ "height": 18,
2471
+ "cells": [
2472
+ {
2473
+ "value": "Customer",
2474
+ "colSpan": 1
2475
+ },
2476
+ {
2477
+ "value": "Amount"
2478
+ }
2479
+ ]
2480
+ }
2481
+ ],
2482
+ "detail": [
2483
+ {
2484
+ "height": 18,
2485
+ "cells": [
2486
+ {
2487
+ "value": "=Fields.customer"
2488
+ },
2489
+ {
2490
+ "value": "=Fields.amount",
2491
+ "style": {
2492
+ "format": "C2"
2493
+ }
2494
+ }
2495
+ ]
2496
+ }
2497
+ ],
2498
+ "footer": [
2499
+ {
2500
+ "height": 18,
2501
+ "cells": [
2502
+ {
2503
+ "value": "Total",
2504
+ "colSpan": 2
2505
+ }
2506
+ ]
2507
+ }
2508
+ ]
2509
+ }
2510
+ ]
2511
+ }
2512
+ }
2513
+ }
2514
+ ]
2515
+ }
2516
+ }
2517
+ }