@json-to-office/core-docx 4.4.4 → 4.5.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/blocks/document.d.ts.map +1 -1
- package/dist/index.js +72 -21
- package/dist/index.js.map +1 -1
- package/dist/plugin/example/index.js +2 -1
- package/dist/plugin/example/index.js.map +1 -1
- package/dist/quality/rules.d.ts +11 -1
- package/dist/quality/rules.d.ts.map +1 -1
- package/dist/templates/blueprints/client-report.docx.blueprint.json +31 -17
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/quality/rules.d.ts
CHANGED
|
@@ -34,6 +34,13 @@ export declare const docxTableDesignRule: QualityRule<DocxQualityModel, DocxQual
|
|
|
34
34
|
* convention, and the theme that styles the slot never asks for it.
|
|
35
35
|
*/
|
|
36
36
|
export declare const docxRequiredChromeRule: QualityRule<DocxQualityModel, DocxQualityFact>;
|
|
37
|
+
/**
|
|
38
|
+
* A report that argues its numbers in prose. A data exhibit is a chart, or a
|
|
39
|
+
* table with at least two columns — a stat row is a summary, not an exhibit.
|
|
40
|
+
* Off by default; the client-report profile asks for one, because every
|
|
41
|
+
* brief in that archetype comes with numbers the reader will check.
|
|
42
|
+
*/
|
|
43
|
+
export declare const docxExhibitRequiredRule: QualityRule<DocxQualityModel, DocxQualityFact>;
|
|
37
44
|
/**
|
|
38
45
|
* A running head where the profile expects one: every top-level section from
|
|
39
46
|
* `fromSection` on must carry the parts in `required` — a header, a footer,
|
|
@@ -71,7 +78,7 @@ export declare const DOCX_QUALITY_PROFILES: {
|
|
|
71
78
|
readonly 'client-report': {
|
|
72
79
|
readonly id: "client-report";
|
|
73
80
|
readonly formats: readonly ["docx"];
|
|
74
|
-
readonly description: "Client or public-administration report: a running head with page numbers on every section after the cover, a takeaway and a source wherever a block declares them, no heading skipped, every size on the theme scale with at most eight in play,
|
|
81
|
+
readonly description: "Client or public-administration report: a running head with page numbers on every section after the cover, a takeaway and a source wherever a block declares them, no heading skipped, every size on the theme scale with at most eight in play, no page rendered empty or left half blank under the running head, and at least one chart or table.";
|
|
75
82
|
readonly rules: {
|
|
76
83
|
readonly 'docx/required-chrome': {
|
|
77
84
|
readonly parameters: {
|
|
@@ -105,6 +112,9 @@ export declare const DOCX_QUALITY_PROFILES: {
|
|
|
105
112
|
readonly 'rendered/page-underfilled': {
|
|
106
113
|
readonly severity: "warning";
|
|
107
114
|
};
|
|
115
|
+
readonly 'docx/exhibit-required': {
|
|
116
|
+
readonly enabled: true;
|
|
117
|
+
};
|
|
108
118
|
};
|
|
109
119
|
};
|
|
110
120
|
readonly 'executive-report': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/quality/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,aAAa,EAGb,KAAK,cAAc,EACnB,KAAK,WAAW,EAEhB,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAUV,eAAe,EACf,gBAAgB,EAQjB,MAAM,SAAS,CAAC;AAejB,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAC1C,gBAAgB,EAChB,eAAe,CA+DhB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAChD,gBAAgB,EAChB,eAAe,CAwChB,CAAC;AAsBF,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,gBAAgB,EAAE,eAAe,CA0F1E,CAAC;AA+BF,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAC9C,gBAAgB,EAChB,eAAe,CA+HhB,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAC7C,gBAAgB,EAChB,eAAe,CAuChB,CAAC;AAsBF,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,gBAAgB,EAAE,eAAe,CAgE1E,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAC3C,gBAAgB,EAChB,eAA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O,MAAM,uBAAuB,EAAE,WAAW,CAC/C,gBAAgB,EAChB,eAAe,CAuChB,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAC3C,gBAAgB,EAChB,eAAe,CA6ChB,CAAC;AAyEF;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,gBAAgB,EAAE,eAAe,CAgE1E,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,gBAAgB,EAAE,eAAe,CA2C1E,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,gBAAgB,EAAE,eAAe,CAyC1E,CAAC;AAEJ,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAC9C,gBAAgB,EAChB,eAAe,CAuBhB,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDiB,CAAC;AAEpD,eAAO,MAAM,4BAA4B,EAAE,cACA,CAAC;AAK5C;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,OAAO,GAChB,cAAc,GAAG,SAAS,CAO5B;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,cAAc,GAAG,SAAS,GACpC,cAAc,GAAG,SAAS,CAK5B;AAED,eAAO,MAAM,iBAAiB,kDAA8C,CAAC"}
|
|
@@ -61,8 +61,7 @@
|
|
|
61
61
|
"ref": "section-opener",
|
|
62
62
|
"slots": {
|
|
63
63
|
"number": "01",
|
|
64
|
-
"title": "{{Section title: the finding, as a statement}}"
|
|
65
|
-
"tracker": "{{Tracker: one word}}"
|
|
64
|
+
"title": "{{Section title: the finding, as a statement}}"
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
67
|
},
|
|
@@ -119,8 +118,7 @@
|
|
|
119
118
|
"ref": "section-opener",
|
|
120
119
|
"slots": {
|
|
121
120
|
"number": "02",
|
|
122
|
-
"title": "{{Section title: the finding, as a statement}}"
|
|
123
|
-
"tracker": "{{Tracker: one word}}"
|
|
121
|
+
"title": "{{Section title: the finding, as a statement}}"
|
|
124
122
|
}
|
|
125
123
|
}
|
|
126
124
|
},
|
|
@@ -192,8 +190,7 @@
|
|
|
192
190
|
"ref": "section-opener",
|
|
193
191
|
"slots": {
|
|
194
192
|
"number": "03",
|
|
195
|
-
"title": "{{Section title: the finding, as a statement}}"
|
|
196
|
-
"tracker": "{{Tracker: one word}}"
|
|
193
|
+
"title": "{{Section title: the finding, as a statement}}"
|
|
197
194
|
}
|
|
198
195
|
}
|
|
199
196
|
},
|
|
@@ -246,8 +243,7 @@
|
|
|
246
243
|
"ref": "section-opener",
|
|
247
244
|
"slots": {
|
|
248
245
|
"number": "04",
|
|
249
|
-
"title": "{{Section title: the finding, as a statement}}"
|
|
250
|
-
"tracker": "{{Tracker: one word}}"
|
|
246
|
+
"title": "{{Section title: the finding, as a statement}}"
|
|
251
247
|
}
|
|
252
248
|
}
|
|
253
249
|
},
|
|
@@ -268,7 +264,7 @@
|
|
|
268
264
|
]
|
|
269
265
|
},
|
|
270
266
|
"narrative": {
|
|
271
|
-
"description": "Argument-led: takeaways, then three sections of prose with one KPI row and one note as evidence, next steps last.",
|
|
267
|
+
"description": "Argument-led: takeaways, then three sections of prose with one KPI row and one note as evidence, next steps last; one data table in the analysis section carries the numbers the argument leans on.",
|
|
272
268
|
"whenToUse": "The brief is a position, an assessment or a recommendation with few numbers; the reader follows an argument.",
|
|
273
269
|
"pages": {
|
|
274
270
|
"min": 3,
|
|
@@ -318,8 +314,7 @@
|
|
|
318
314
|
"ref": "section-opener",
|
|
319
315
|
"slots": {
|
|
320
316
|
"number": "01",
|
|
321
|
-
"title": "{{Section title: the finding, as a statement}}"
|
|
322
|
-
"tracker": "{{Tracker: one word}}"
|
|
317
|
+
"title": "{{Section title: the finding, as a statement}}"
|
|
323
318
|
}
|
|
324
319
|
}
|
|
325
320
|
},
|
|
@@ -359,8 +354,7 @@
|
|
|
359
354
|
"ref": "section-opener",
|
|
360
355
|
"slots": {
|
|
361
356
|
"number": "02",
|
|
362
|
-
"title": "{{Section title: the finding, as a statement}}"
|
|
363
|
-
"tracker": "{{Tracker: one word}}"
|
|
357
|
+
"title": "{{Section title: the finding, as a statement}}"
|
|
364
358
|
}
|
|
365
359
|
}
|
|
366
360
|
},
|
|
@@ -397,8 +391,7 @@
|
|
|
397
391
|
"ref": "section-opener",
|
|
398
392
|
"slots": {
|
|
399
393
|
"number": "03",
|
|
400
|
-
"title": "{{Section title: the finding, as a statement}}"
|
|
401
|
-
"tracker": "{{Tracker: one word}}"
|
|
394
|
+
"title": "{{Section title: the finding, as a statement}}"
|
|
402
395
|
}
|
|
403
396
|
}
|
|
404
397
|
},
|
|
@@ -408,6 +401,28 @@
|
|
|
408
401
|
"text": "{{Body: two or three short paragraphs of evidence for the section title, each opening with its claim}}"
|
|
409
402
|
}
|
|
410
403
|
},
|
|
404
|
+
{
|
|
405
|
+
"name": "block",
|
|
406
|
+
"props": {
|
|
407
|
+
"ref": "data-table",
|
|
408
|
+
"slots": {
|
|
409
|
+
"title": "{{Table title: what it compares, and the period}}",
|
|
410
|
+
"labelHeader": "{{Row label}}",
|
|
411
|
+
"labels": ["{{Row 1}}", "{{Row 2}}", "{{Row 3}}"],
|
|
412
|
+
"columns": [
|
|
413
|
+
{
|
|
414
|
+
"header": "{{Measure (unit)}}",
|
|
415
|
+
"cells": ["{{0.0}}", "{{0.0}}", "{{0.0}}"]
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"header": "{{Change}}",
|
|
419
|
+
"cells": ["{{0.0}}", "{{0.0}}", "{{0.0}}"]
|
|
420
|
+
}
|
|
421
|
+
],
|
|
422
|
+
"source": "{{Source: system or document, date}}"
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
},
|
|
411
426
|
{
|
|
412
427
|
"name": "block",
|
|
413
428
|
"props": {
|
|
@@ -448,8 +463,7 @@
|
|
|
448
463
|
"ref": "section-opener",
|
|
449
464
|
"slots": {
|
|
450
465
|
"number": "04",
|
|
451
|
-
"title": "{{Section title: the finding, as a statement}}"
|
|
452
|
-
"tracker": "{{Tracker: one word}}"
|
|
466
|
+
"title": "{{Section title: the finding, as a statement}}"
|
|
453
467
|
}
|
|
454
468
|
}
|
|
455
469
|
},
|