@evotecit/officeimo 0.1.2 → 0.1.4
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/README.md +59 -51
- package/bundles/officeimo-canopyx.js +1553 -314
- package/bundles/officeimo-canopyx.mjs +1497 -269
- package/bundles/officeimo-csv.js +18 -15
- package/bundles/officeimo-csv.mjs +16 -13
- package/bundles/officeimo-datatables.js +463 -301
- package/bundles/officeimo-datatables.mjs +420 -259
- package/bundles/officeimo-pdf.js +148 -65
- package/bundles/officeimo-pdf.mjs +124 -41
- package/bundles/officeimo-xlsx.js +177 -101
- package/bundles/officeimo-xlsx.mjs +149 -74
- package/bundles/officeimo.js +461 -299
- package/bundles/officeimo.mjs +419 -258
- package/dist/csv/index.js +16 -13
- package/dist/integrations/canopyx/diagnostics.d.ts +3 -0
- package/dist/integrations/canopyx/diagnostics.js +17 -0
- package/dist/integrations/canopyx/grouping.d.ts +6 -0
- package/dist/integrations/canopyx/grouping.js +198 -0
- package/dist/integrations/canopyx/index.d.ts +2 -2
- package/dist/integrations/canopyx/index.js +89 -15
- package/dist/integrations/canopyx/metadata.d.ts +4 -0
- package/dist/integrations/canopyx/metadata.js +51 -0
- package/dist/integrations/canopyx/pdf-layout.d.ts +5 -0
- package/dist/integrations/canopyx/pdf-layout.js +97 -0
- package/dist/integrations/canopyx/pdf-number.d.ts +3 -0
- package/dist/integrations/canopyx/pdf-number.js +64 -0
- package/dist/integrations/canopyx/pivot.d.ts +15 -0
- package/dist/integrations/canopyx/pivot.js +67 -0
- package/dist/integrations/canopyx/presentation.d.ts +8 -0
- package/dist/integrations/canopyx/presentation.js +40 -0
- package/dist/integrations/canopyx/rule-predicates.d.ts +3 -0
- package/dist/integrations/canopyx/rule-predicates.js +110 -0
- package/dist/integrations/canopyx/rules.d.ts +6 -0
- package/dist/integrations/canopyx/rules.js +176 -0
- package/dist/integrations/canopyx/source.js +69 -31
- package/dist/integrations/canopyx/types.d.ts +134 -10
- package/dist/integrations/canopyx/workbook.d.ts +6 -0
- package/dist/integrations/canopyx/workbook.js +52 -0
- package/dist/opc/index.js +9 -0
- package/dist/pdf/font-resources.js +33 -14
- package/dist/pdf/pages.js +60 -14
- package/dist/pdf/table-band-flow.js +7 -2
- package/dist/pdf/table-band-plan.js +9 -1
- package/dist/pdf/table-layout.js +6 -2
- package/dist/pdf/table-structure.js +9 -8
- package/dist/xlsx/index.d.ts +1 -1
- package/dist/xlsx/options.js +1 -1
- package/dist/xlsx/outlines.d.ts +3 -0
- package/dist/xlsx/outlines.js +39 -0
- package/dist/xlsx/types.d.ts +9 -0
- package/dist/xlsx/values.js +11 -2
- package/dist/xlsx/workbook.js +2 -0
- package/dist/xlsx/worksheet.js +14 -6
- package/package.json +2 -2
|
@@ -1111,29 +1111,32 @@ const { captureCsvOptions } = _m19;
|
|
|
1111
1111
|
|
|
1112
1112
|
|
|
1113
1113
|
|
|
1114
|
-
function csvField(value, delimiter, protect, quote, booleanText
|
|
1115
|
-
|
|
1116
|
-
value = nullValue;
|
|
1114
|
+
function csvField(value, delimiter, protect, quote, booleanText) {
|
|
1115
|
+
const kind = typeof value;
|
|
1117
1116
|
let text;
|
|
1118
1117
|
if (value == null)
|
|
1119
1118
|
text = "";
|
|
1119
|
+
else if (kind === "string")
|
|
1120
|
+
text = value;
|
|
1121
|
+
else if (kind === "number") {
|
|
1122
|
+
text = Number.isFinite(value) ? String(value) : "";
|
|
1123
|
+
// Numeric text has no CSV delimiter, quote or line break to escape.
|
|
1124
|
+
return quote === "all" ? '"' + text + '"' : text;
|
|
1125
|
+
}
|
|
1126
|
+
else if (kind === "boolean")
|
|
1127
|
+
text = booleanText[value ? "true" : "false"];
|
|
1120
1128
|
else if (isDate(value))
|
|
1121
1129
|
text = Number.isFinite(value.getTime()) ? value.toISOString() : "";
|
|
1122
|
-
else if (typeof value === "boolean")
|
|
1123
|
-
text = booleanText[value ? "true" : "false"];
|
|
1124
|
-
else if (typeof value === "number")
|
|
1125
|
-
text = Number.isFinite(value) ? String(value) : "";
|
|
1126
|
-
else if (typeof value === "string")
|
|
1127
|
-
text = value;
|
|
1128
1130
|
else {
|
|
1129
1131
|
if (typeof value.then === "function")
|
|
1130
1132
|
void Promise.resolve(value).catch(() => { });
|
|
1131
1133
|
throw new TypeError("CSV cells and formatter results must be synchronous strings, numbers, booleans, Dates or null.");
|
|
1132
1134
|
}
|
|
1133
|
-
|
|
1135
|
+
// Only ASCII spaces, controls and markers through @ can begin the protected prefix.
|
|
1136
|
+
if (protect && (kind === "string" || kind === "boolean") && text.charCodeAt(0) <= 64 && /^ *[=+\-@\t\r\n]/.test(text))
|
|
1134
1137
|
text = "'" + text;
|
|
1135
|
-
return quote === "all" || (quote === "strings" &&
|
|
1136
|
-
? '"' + text.replace(/"/g, '""') + '"' : text;
|
|
1138
|
+
return quote === "all" || (quote === "strings" && kind === "string") || text.includes(delimiter) || /["\r\n]/.test(text)
|
|
1139
|
+
? '"' + (text.includes('"') ? text.replace(/"/g, '""') : text) + '"' : text;
|
|
1137
1140
|
}
|
|
1138
1141
|
async function writeCsvTo(rows, destination, configuration) {
|
|
1139
1142
|
const options = captureCsvOptions(configuration);
|
|
@@ -1185,7 +1188,7 @@ async function write(rows, sink, options) {
|
|
|
1185
1188
|
value = options.nullValue;
|
|
1186
1189
|
budget.cell(typeof value === "boolean" ? booleanText[value ? "true" : "false"] : value);
|
|
1187
1190
|
checkAbort(signal);
|
|
1188
|
-
text += (i ? delimiter : "") + csvField(value, delimiter, protect, quote, booleanText
|
|
1191
|
+
text += (i ? delimiter : "") + csvField(value, delimiter, protect, quote, booleanText);
|
|
1189
1192
|
if (text.length >= buffer.chunkSize || (i & 127) === 127 && taskYieldDue()) {
|
|
1190
1193
|
if (buffer.append(text))
|
|
1191
1194
|
return buffer.flush().then(() => record(values, header, i + 1, snapshot));
|
|
@@ -1879,7 +1882,16 @@ class OpcPackage {
|
|
|
1879
1882
|
throw new OfficeIMOError("INVALID_STATE", "OPC package is finalized."); }
|
|
1880
1883
|
reserve(uri, type) {
|
|
1881
1884
|
this.open();
|
|
1885
|
+
// OPC part names become ZIP entry names. Reject oversized and deeply nested
|
|
1886
|
+
// names before collecting every ancestor prefix.
|
|
1887
|
+
if (typeof uri === "string" && uri.length > 65536)
|
|
1888
|
+
throw new OfficeIMOError("RESOURCE_LIMIT", "OPC part name exceeds the ZIP entry-name limit.");
|
|
1882
1889
|
uri = partUri(uri);
|
|
1890
|
+
let depth = 0;
|
|
1891
|
+
for (let index = 0; index < uri.length; index++) {
|
|
1892
|
+
if (uri[index] === "/" && ++depth > 64)
|
|
1893
|
+
throw new OfficeIMOError("RESOURCE_LIMIT", "OPC part name exceeds the directory-depth limit.");
|
|
1894
|
+
}
|
|
1883
1895
|
if (/\/_rels(?:\/|$)/i.test(uri) || uri.toLowerCase() === "/[content_types].xml")
|
|
1884
1896
|
throw new TypeError("Package metadata part names are reserved.");
|
|
1885
1897
|
const key = uri.toLowerCase();
|
|
@@ -2558,14 +2570,23 @@ function columnName(index) {
|
|
|
2558
2570
|
return name;
|
|
2559
2571
|
}
|
|
2560
2572
|
function clipName(text, length) { return text.slice(0, length).replace(/[\ud800-\udbff]$/, ""); }
|
|
2573
|
+
function trimSheetNameEdges(text) {
|
|
2574
|
+
let start = 0, end = text.length;
|
|
2575
|
+
const removable = (character) => character === "'" || /\s/u.test(character);
|
|
2576
|
+
while (start < end && removable(text[start]))
|
|
2577
|
+
start++;
|
|
2578
|
+
while (end > start && removable(text[end - 1]))
|
|
2579
|
+
end--;
|
|
2580
|
+
return text.slice(start, end);
|
|
2581
|
+
}
|
|
2561
2582
|
function sheetName(requested, names, policy, register = true) {
|
|
2562
2583
|
if (typeof requested !== "string")
|
|
2563
2584
|
throw new TypeError("Sheet name must be a string.");
|
|
2564
2585
|
// Validate and deduplicate the decoded literal value, before ST_Xstring attribute encoding.
|
|
2565
2586
|
// A requested _xHHHH_ token is literal text; the serializer protects its leading underscore.
|
|
2566
|
-
let base = cleanXml(requested, policy).replace(/[\[\]:*?/\\]/g, "_")
|
|
2587
|
+
let base = trimSheetNameEdges(cleanXml(requested, policy).replace(/[\[\]:*?/\\]/g, "_"));
|
|
2567
2588
|
// Clipping can expose an internal apostrophe or the reserved History name.
|
|
2568
|
-
base = clipName(base, 31)
|
|
2589
|
+
base = trimSheetNameEdges(clipName(base, 31));
|
|
2569
2590
|
if (!base)
|
|
2570
2591
|
base = "Sheet";
|
|
2571
2592
|
if (base.toLowerCase() === "history")
|
|
@@ -2595,7 +2616,52 @@ const _exports = Object.freeze({ Cell: Cell, assertXlsxValue: assertXlsxValue, c
|
|
|
2595
2616
|
return _exports;
|
|
2596
2617
|
})();
|
|
2597
2618
|
|
|
2598
|
-
const
|
|
2619
|
+
const _m34 = (() => {
|
|
2620
|
+
const { captureFields } = _m10;
|
|
2621
|
+
|
|
2622
|
+
/** Capture bounded disjoint ranges before asynchronous serialization; absent columns stay visible. */
|
|
2623
|
+
function captureColumnOutlines(input, columns) {
|
|
2624
|
+
if (input === undefined)
|
|
2625
|
+
return undefined;
|
|
2626
|
+
if (!Array.isArray(input) || input.length > columns)
|
|
2627
|
+
throw new TypeError("Column outlines must be bounded, non-overlapping ranges.");
|
|
2628
|
+
let end = 0;
|
|
2629
|
+
return Object.freeze(input.map(range => {
|
|
2630
|
+
if (!range || typeof range !== "object")
|
|
2631
|
+
throw new TypeError("Column outlines require range metadata.");
|
|
2632
|
+
return captureFields(range, ["firstColumn", "columnCount", "level", "hidden", "collapsed"]);
|
|
2633
|
+
}).sort((a, b) => a.firstColumn - b.firstColumn).map(range => {
|
|
2634
|
+
const { firstColumn, columnCount, level = 0, hidden, collapsed } = range;
|
|
2635
|
+
if (!Number.isSafeInteger(firstColumn) || firstColumn < end || !Number.isSafeInteger(columnCount) || columnCount < 1 || firstColumn + columnCount > columns)
|
|
2636
|
+
throw new RangeError("Column outline ranges must be disjoint and within the declared columns.");
|
|
2637
|
+
if (!Number.isInteger(level) || level < 0 || level > 7)
|
|
2638
|
+
throw new RangeError("Column outline level must be from zero through seven.");
|
|
2639
|
+
for (const flag of [hidden, collapsed])
|
|
2640
|
+
if (flag !== undefined && typeof flag !== "boolean")
|
|
2641
|
+
throw new TypeError("Column outline flags must be booleans.");
|
|
2642
|
+
end = firstColumn + columnCount;
|
|
2643
|
+
return Object.freeze({ firstColumn, columnCount, level, ...(hidden === undefined ? {} : { hidden }), ...(collapsed === undefined ? {} : { collapsed }) });
|
|
2644
|
+
}));
|
|
2645
|
+
}
|
|
2646
|
+
/** @internal Positions are captured even when a sheet has only column outlines. */
|
|
2647
|
+
function validateOutlinePositions(options) {
|
|
2648
|
+
for (const flag of [options.outlineSummaryBelow, options.outlineSummaryRight])
|
|
2649
|
+
if (flag !== undefined && typeof flag !== "boolean")
|
|
2650
|
+
throw new TypeError("Outline summary positions must be booleans.");
|
|
2651
|
+
}
|
|
2652
|
+
/** @internal Resolve at most 16,384 columns once, without retaining any worksheet body. */
|
|
2653
|
+
function columnOutlineMap(ranges) {
|
|
2654
|
+
const result = new Map();
|
|
2655
|
+
for (const range of ranges ?? [])
|
|
2656
|
+
for (let index = range.firstColumn; index < range.firstColumn + range.columnCount; index++)
|
|
2657
|
+
result.set(index, range);
|
|
2658
|
+
return result;
|
|
2659
|
+
}
|
|
2660
|
+
const _exports = Object.freeze({ captureColumnOutlines: captureColumnOutlines, validateOutlinePositions: validateOutlinePositions, columnOutlineMap: columnOutlineMap });
|
|
2661
|
+
return _exports;
|
|
2662
|
+
})();
|
|
2663
|
+
|
|
2664
|
+
const _m37 = (() => {
|
|
2599
2665
|
const { ChunkedTextSink } = _m3;
|
|
2600
2666
|
|
|
2601
2667
|
const { escapeXml, xmlDeclaration } = _m25;
|
|
@@ -2707,14 +2773,14 @@ const _exports = Object.freeze({ chartNamespace: chartNamespace, chartContentTyp
|
|
|
2707
2773
|
return _exports;
|
|
2708
2774
|
})();
|
|
2709
2775
|
|
|
2710
|
-
const
|
|
2776
|
+
const _m36 = (() => {
|
|
2711
2777
|
const { cleanXml, escapeXml, escapeOoxmlAttribute, xmlDeclaration } = _m25;
|
|
2712
2778
|
|
|
2713
2779
|
const { copyExportLink } = _m7;
|
|
2714
2780
|
|
|
2715
2781
|
const { officeRelationshipsNamespace } = _m22;
|
|
2716
2782
|
|
|
2717
|
-
const { chartAnchorXml } =
|
|
2783
|
+
const { chartAnchorXml } = _m37;
|
|
2718
2784
|
|
|
2719
2785
|
const { captureFields } = _m10;
|
|
2720
2786
|
|
|
@@ -2784,10 +2850,10 @@ const _exports = Object.freeze({ copyDrawingAnchor: copyDrawingAnchor, cellPosit
|
|
|
2784
2850
|
return _exports;
|
|
2785
2851
|
})();
|
|
2786
2852
|
|
|
2787
|
-
const
|
|
2853
|
+
const _m39 = (() => {
|
|
2788
2854
|
const { OfficeIMOError } = _m2;
|
|
2789
2855
|
|
|
2790
|
-
const { cellPosition } =
|
|
2856
|
+
const { cellPosition } = _m36;
|
|
2791
2857
|
|
|
2792
2858
|
function indexRows(regions) {
|
|
2793
2859
|
if (!regions.length)
|
|
@@ -2888,7 +2954,7 @@ const _exports = Object.freeze({ MergeRegions: MergeRegions });
|
|
|
2888
2954
|
return _exports;
|
|
2889
2955
|
})();
|
|
2890
2956
|
|
|
2891
|
-
const
|
|
2957
|
+
const _m40 = (() => {
|
|
2892
2958
|
const { ExportCell } = _m5;
|
|
2893
2959
|
|
|
2894
2960
|
const { tableSpans } = _m17;
|
|
@@ -2924,7 +2990,7 @@ const _exports = Object.freeze({ StructuredRows: StructuredRows });
|
|
|
2924
2990
|
return _exports;
|
|
2925
2991
|
})();
|
|
2926
2992
|
|
|
2927
|
-
const
|
|
2993
|
+
const _m38 = (() => {
|
|
2928
2994
|
const { ExportCell } = _m5;
|
|
2929
2995
|
|
|
2930
2996
|
const { isDate } = _m6;
|
|
@@ -2935,13 +3001,13 @@ const { FormulaCell } = _m33;
|
|
|
2935
3001
|
|
|
2936
3002
|
const { escapeOoxmlAttribute } = _m25;
|
|
2937
3003
|
|
|
2938
|
-
const { MergeRegions } =
|
|
3004
|
+
const { MergeRegions } = _m39;
|
|
2939
3005
|
|
|
2940
3006
|
const { OfficeIMOError } = _m2;
|
|
2941
3007
|
|
|
2942
3008
|
const { createTotals } = _m12;
|
|
2943
3009
|
|
|
2944
|
-
const { StructuredRows } =
|
|
3010
|
+
const { StructuredRows } = _m40;
|
|
2945
3011
|
|
|
2946
3012
|
/** @internal A computed formula with a numeric cache; no public arbitrary-formula input. */
|
|
2947
3013
|
class ComputedTotal {
|
|
@@ -3124,7 +3190,7 @@ const _exports = Object.freeze({ ComputedTotal: ComputedTotal, ReportLayout: Rep
|
|
|
3124
3190
|
return _exports;
|
|
3125
3191
|
})();
|
|
3126
3192
|
|
|
3127
|
-
const
|
|
3193
|
+
const _m42 = (() => {
|
|
3128
3194
|
const { columnName } = _m32;
|
|
3129
3195
|
|
|
3130
3196
|
/** @internal Data-column selectors use stable keys or one-based worksheet columns. */
|
|
@@ -3154,7 +3220,7 @@ const _exports = Object.freeze({ resolveDataColumn: resolveDataColumn, qualified
|
|
|
3154
3220
|
return _exports;
|
|
3155
3221
|
})();
|
|
3156
3222
|
|
|
3157
|
-
const
|
|
3223
|
+
const _m43 = (() => {
|
|
3158
3224
|
const { OfficeIMOError } = _m2;
|
|
3159
3225
|
|
|
3160
3226
|
const { columnName } = _m32;
|
|
@@ -3200,18 +3266,18 @@ const _exports = Object.freeze({ retainDataRowRanges: retainDataRowRanges, dataR
|
|
|
3200
3266
|
return _exports;
|
|
3201
3267
|
})();
|
|
3202
3268
|
|
|
3203
|
-
const
|
|
3269
|
+
const _m41 = (() => {
|
|
3204
3270
|
const { cleanXml, escapeXml, escapeOoxmlAttribute } = _m25;
|
|
3205
3271
|
|
|
3206
|
-
const { cellPosition } =
|
|
3272
|
+
const { cellPosition } = _m36;
|
|
3207
3273
|
|
|
3208
3274
|
const { colorArgb } = _m30;
|
|
3209
3275
|
|
|
3210
3276
|
const { fields, optionalBoolean, differentialXml } = _m31;
|
|
3211
3277
|
|
|
3212
|
-
const { resolveDataColumn } =
|
|
3278
|
+
const { resolveDataColumn } = _m42;
|
|
3213
3279
|
|
|
3214
|
-
const { dataRowReference } =
|
|
3280
|
+
const { dataRowReference } = _m43;
|
|
3215
3281
|
|
|
3216
3282
|
function target(range, columns) {
|
|
3217
3283
|
if (typeof range === "string") {
|
|
@@ -3369,7 +3435,7 @@ const _exports = Object.freeze({ prepareConditionalFormats: prepareConditionalFo
|
|
|
3369
3435
|
return _exports;
|
|
3370
3436
|
})();
|
|
3371
3437
|
|
|
3372
|
-
const
|
|
3438
|
+
const _m44 = (() => {
|
|
3373
3439
|
const { OfficeIMOError } = _m2;
|
|
3374
3440
|
|
|
3375
3441
|
const { checkAbort } = _m4;
|
|
@@ -3378,9 +3444,9 @@ const { cleanXml, escapeOoxmlAttribute, escapeXml } = _m25;
|
|
|
3378
3444
|
|
|
3379
3445
|
const { fields, optionalBoolean } = _m31;
|
|
3380
3446
|
|
|
3381
|
-
const { resolveDataColumn } =
|
|
3447
|
+
const { resolveDataColumn } = _m42;
|
|
3382
3448
|
|
|
3383
|
-
const { dataRowReference } =
|
|
3449
|
+
const { dataRowReference } = _m43;
|
|
3384
3450
|
|
|
3385
3451
|
function message(value, maximum, name) {
|
|
3386
3452
|
if (value === undefined)
|
|
@@ -3472,7 +3538,7 @@ const _exports = Object.freeze({ prepareDataValidations: prepareDataValidations,
|
|
|
3472
3538
|
return _exports;
|
|
3473
3539
|
})();
|
|
3474
3540
|
|
|
3475
|
-
const
|
|
3541
|
+
const _m35 = (() => {
|
|
3476
3542
|
const { checkAbort, consumeRows, inputRows, pause, taskYieldDue } = _m4;
|
|
3477
3543
|
|
|
3478
3544
|
const { ChunkedTextSink, BlobByteSink } = _m3;
|
|
@@ -3493,25 +3559,27 @@ const { Cell, cellText, columnName, inlineText, excelDate, copyValue } = _m32;
|
|
|
3493
3559
|
|
|
3494
3560
|
const { spreadsheetNamespace, colorArgb, validateStylePatch, copyStylePatch } = _m29;
|
|
3495
3561
|
|
|
3496
|
-
const { copyHyperlink, copyImage, hyperlinksXml, cellPosition } =
|
|
3562
|
+
const { copyHyperlink, copyImage, hyperlinksXml, cellPosition } = _m36;
|
|
3497
3563
|
|
|
3498
3564
|
const { ExportCell, assertScalar } = _m5;
|
|
3499
3565
|
|
|
3500
|
-
const { ReportLayout, ComputedTotal, printXml } =
|
|
3566
|
+
const { ReportLayout, ComputedTotal, printXml } = _m38;
|
|
3501
3567
|
|
|
3502
3568
|
const { cleanXml } = _m25;
|
|
3503
3569
|
|
|
3504
|
-
const { ConditionalFormats, prepareConditionalFormats } =
|
|
3570
|
+
const { ConditionalFormats, prepareConditionalFormats } = _m41;
|
|
3505
3571
|
|
|
3506
3572
|
const { isDate } = _m6;
|
|
3507
3573
|
|
|
3508
3574
|
const { FormulaCell, formulaXml, isSubtotalFormula } = _m33;
|
|
3509
3575
|
|
|
3510
|
-
const { prepareDataValidations, dataValidationsXml } =
|
|
3576
|
+
const { prepareDataValidations, dataValidationsXml } = _m44;
|
|
3577
|
+
|
|
3578
|
+
const { qualifiedCell, qualifiedColumnRange, resolveDataColumn } = _m42;
|
|
3511
3579
|
|
|
3512
|
-
const {
|
|
3580
|
+
const { dataRowRanges, dataRowCount } = _m43;
|
|
3513
3581
|
|
|
3514
|
-
const {
|
|
3582
|
+
const { captureColumnOutlines, columnOutlineMap, validateOutlinePositions } = _m34;
|
|
3515
3583
|
|
|
3516
3584
|
const maximumHyperlinks = 65530;
|
|
3517
3585
|
function checkHyperlinkCount(count) {
|
|
@@ -3643,6 +3711,8 @@ class Worksheet {
|
|
|
3643
3711
|
throw new TypeError("Row and style callbacks must be functions.");
|
|
3644
3712
|
if (options.maxOutlineLevel !== undefined && (!Number.isInteger(options.maxOutlineLevel) || options.maxOutlineLevel < 0 || options.maxOutlineLevel > 7))
|
|
3645
3713
|
throw new RangeError("Maximum outline level must be an integer from zero through seven.");
|
|
3714
|
+
validateOutlinePositions(options);
|
|
3715
|
+
captureColumnOutlines(options.columnOutlines, columns.length);
|
|
3646
3716
|
if (options.rowOutline && options.maxOutlineLevel === undefined)
|
|
3647
3717
|
throw new TypeError("A row outline callback requires maxOutlineLevel before streamed rows are written.");
|
|
3648
3718
|
if (!options.rowOutline && options.maxOutlineLevel !== undefined)
|
|
@@ -3927,17 +3997,22 @@ class Worksheet {
|
|
|
3927
3997
|
const buffer = this.buffer = new ChunkedTextSink(this.entry, this.book.settings.signal), opts = this.options;
|
|
3928
3998
|
const x = opts.freezeColumns ?? 0, y = opts.freezeHeader ? this.headerRows : 0;
|
|
3929
3999
|
const pane = x && y ? "bottomRight" : x ? "topRight" : "bottomLeft", cell = columnName(x + 1) + (y + 1);
|
|
4000
|
+
const outlines = columnOutlineMap(opts.columnOutlines), hasOutline = !!opts.rowOutline || outlines.size > 0;
|
|
4001
|
+
const maxColumnLevel = Math.max(0, ...Array.from(outlines.values(), value => value.level ?? 0));
|
|
3930
4002
|
await buffer.write(xmlDeclaration + '<worksheet xmlns="' + spreadsheetNamespace + '" xmlns:r="' + officeRelationshipsNamespace + '">' +
|
|
3931
|
-
(opts.print ||
|
|
4003
|
+
(opts.print || hasOutline ? '<sheetPr>' + (hasOutline ? '<outlinePr summaryBelow="' + (opts.outlineSummaryBelow === false ? "0" : "1") + '"' + (opts.outlineSummaryRight === undefined ? "" : ' summaryRight="' + (opts.outlineSummaryRight ? "1" : "0") + '"') + ' showOutlineSymbols="1"/>' : "") + (opts.print ? '<pageSetUpPr fitToPage="1"/>' : "") + '</sheetPr>' : "") + '<sheetViews><sheetView workbookViewId="0">' +
|
|
3932
4004
|
(x || y ? '<pane' + (x ? ' xSplit="' + x + '"' : "") + (y ? ' ySplit="' + y + '"' : "") + ' topLeftCell="' + cell + '" activePane="' + pane + '" state="frozen"/><selection pane="' + pane + '" activeCell="' + cell + '" sqref="' + cell + '"/>' : "") + '</sheetView></sheetViews>' +
|
|
3933
|
-
(
|
|
4005
|
+
(hasOutline ? '<sheetFormatPr defaultRowHeight="15"' + (opts.rowOutline ? ' outlineLevelRow="' + opts.maxOutlineLevel + '"' : "") + (outlines.size ? ' outlineLevelCol="' + maxColumnLevel + '"' : "") + '/>' : ""));
|
|
3934
4006
|
const defaultWidth = opts.defaultColumnWidth ?? (this.table ? 20 : undefined);
|
|
3935
|
-
if (this.columns.some((_, i) => this.layout.widths[i] !== undefined || defaultWidth !== undefined)) {
|
|
4007
|
+
if (this.columns.some((_, i) => this.layout.widths[i] !== undefined || defaultWidth !== undefined || outlines.has(i))) {
|
|
3936
4008
|
await buffer.write('<cols>');
|
|
3937
4009
|
for (let i = 0; i < this.columns.length; i++) {
|
|
3938
|
-
const width = this.layout.widths[i] ?? defaultWidth;
|
|
3939
|
-
if (width !== undefined)
|
|
3940
|
-
await buffer.write('<col min="' + (i + 1) + '" max="' + (i + 1) + '"
|
|
4010
|
+
const width = this.layout.widths[i] ?? defaultWidth, outline = outlines.get(i);
|
|
4011
|
+
if (width !== undefined || outline)
|
|
4012
|
+
await buffer.write('<col min="' + (i + 1) + '" max="' + (i + 1) + '"' +
|
|
4013
|
+
(width === undefined ? "" : ' width="' + width + '" customWidth="1"') +
|
|
4014
|
+
(outline?.level ? ' outlineLevel="' + outline.level + '"' : "") + (outline?.hidden ? ' hidden="1"' : "") +
|
|
4015
|
+
(outline?.collapsed ? ' collapsed="1"' : "") + '/>');
|
|
3941
4016
|
}
|
|
3942
4017
|
await buffer.write('</cols>');
|
|
3943
4018
|
}
|
|
@@ -4198,7 +4273,7 @@ const _exports = Object.freeze({ Worksheet: Worksheet });
|
|
|
4198
4273
|
return _exports;
|
|
4199
4274
|
})();
|
|
4200
4275
|
|
|
4201
|
-
const
|
|
4276
|
+
const _m45 = (() => {
|
|
4202
4277
|
const { escapeOoxmlAttribute, escapeXml, xmlDeclaration } = _m25;
|
|
4203
4278
|
|
|
4204
4279
|
const { cellText, columnName } = _m32;
|
|
@@ -4209,7 +4284,7 @@ const { ExportCell } = _m5;
|
|
|
4209
4284
|
|
|
4210
4285
|
const { Cell } = _m32;
|
|
4211
4286
|
|
|
4212
|
-
const { totalFormula } =
|
|
4287
|
+
const { totalFormula } = _m38;
|
|
4213
4288
|
|
|
4214
4289
|
function defineTable(id, options, columns, policy) {
|
|
4215
4290
|
const name = options.name ?? "Table" + id;
|
|
@@ -4244,7 +4319,7 @@ const _exports = Object.freeze({ defineTable: defineTable, tableXml: tableXml })
|
|
|
4244
4319
|
return _exports;
|
|
4245
4320
|
})();
|
|
4246
4321
|
|
|
4247
|
-
const
|
|
4322
|
+
const _m46 = (() => {
|
|
4248
4323
|
const { OfficeIMOError } = _m2;
|
|
4249
4324
|
|
|
4250
4325
|
const { cleanXml } = _m25;
|
|
@@ -4311,13 +4386,13 @@ const _exports = Object.freeze({ TextOverflow: TextOverflow, clipText: clipText
|
|
|
4311
4386
|
return _exports;
|
|
4312
4387
|
})();
|
|
4313
4388
|
|
|
4314
|
-
const
|
|
4389
|
+
const _m47 = (() => {
|
|
4315
4390
|
const { captureFields } = _m10;
|
|
4316
4391
|
|
|
4317
4392
|
/** @internal The workbook owner captures these settings before validation or adapter merging. */
|
|
4318
4393
|
const workbookOptionFields = ["signal", "onProgress", "limits", "sink", "dateMode", "compression", "invalidCharacterPolicy", "appProperties", "cellValueWriters", "oversizedText", "creator", "title", "subject", "description", "created", "modified"];
|
|
4319
4394
|
/** @internal Worksheet settings also used by the portable sheet owner. */
|
|
4320
|
-
const sheetOptionFields = ["columns", "includeHeader", "headerRows", "freezeHeader", "autoFilter", "boldHeader", "headerFill", "headerStyle", "alternatingRowStyle", "rowStyle", "cellStyle", "rowOutline", "maxOutlineLevel", "rowHeight", "headerHeight", "defaultColumnWidth", "freezeColumns", "table", "autoSize", "footer", "print", "title", "mergedCells", "hyperlinks", "conditionalFormats", "dataValidation"];
|
|
4395
|
+
const sheetOptionFields = ["columns", "includeHeader", "headerRows", "freezeHeader", "autoFilter", "boldHeader", "headerFill", "headerStyle", "alternatingRowStyle", "rowStyle", "cellStyle", "rowOutline", "maxOutlineLevel", "outlineSummaryBelow", "outlineSummaryRight", "columnOutlines", "rowHeight", "headerHeight", "defaultColumnWidth", "freezeColumns", "table", "autoSize", "footer", "print", "title", "mergedCells", "hyperlinks", "conditionalFormats", "dataValidation"];
|
|
4321
4396
|
/** @internal Includes inherited format-specific ceilings before a wrapper combines stream settings. */
|
|
4322
4397
|
const workbookLimitFields = ["maxRows", "maxCells", "maxTextCharacters", "maxOutputBytes", "maxStyles", "maxSheets", "maxOverflowCharacters", "maxHyperlinks", "maxImageBytes", "maxBufferedCells", "maxBufferedCharacters", "maxMergedRanges", "maxConditionalFormats", "maxDifferentialStyles", "maxCharts", "maxChartPoints", "maxChartTextCharacters", "maxFormulaCharacters", "maxDataValidations", "maxValidationTextCharacters"];
|
|
4323
4398
|
/** @internal Capture the workbook's known ceilings without dropping supported prototype fields. */
|
|
@@ -4333,7 +4408,7 @@ const _exports = Object.freeze({ workbookOptionFields: workbookOptionFields, she
|
|
|
4333
4408
|
return _exports;
|
|
4334
4409
|
})();
|
|
4335
4410
|
|
|
4336
|
-
const
|
|
4411
|
+
const _m49 = (() => {
|
|
4337
4412
|
const { checkAbort } = _m4;
|
|
4338
4413
|
|
|
4339
4414
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
@@ -4464,18 +4539,18 @@ const _exports = Object.freeze({ captureChartRange: captureChartRange, prepareCh
|
|
|
4464
4539
|
return _exports;
|
|
4465
4540
|
})();
|
|
4466
4541
|
|
|
4467
|
-
const
|
|
4542
|
+
const _m48 = (() => {
|
|
4468
4543
|
const { checkAbort } = _m4;
|
|
4469
4544
|
|
|
4470
4545
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
4471
4546
|
|
|
4472
4547
|
const { cleanXml } = _m25;
|
|
4473
4548
|
|
|
4474
|
-
const { copyDrawingAnchor } =
|
|
4549
|
+
const { copyDrawingAnchor } = _m36;
|
|
4475
4550
|
|
|
4476
4551
|
const { captureFields } = _m10;
|
|
4477
4552
|
|
|
4478
|
-
const { captureChartRange, prepareChartBinding } =
|
|
4553
|
+
const { captureChartRange, prepareChartBinding } = _m49;
|
|
4479
4554
|
|
|
4480
4555
|
function fields(value, allowed, context) {
|
|
4481
4556
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
@@ -4657,25 +4732,27 @@ const { copyColumns } = _m11;
|
|
|
4657
4732
|
|
|
4658
4733
|
const { captureFields } = _m10;
|
|
4659
4734
|
|
|
4735
|
+
const { captureColumnOutlines } = _m34;
|
|
4736
|
+
|
|
4660
4737
|
const { captureTableSpans } = _m17;
|
|
4661
4738
|
|
|
4662
4739
|
const { assertExportValue } = _m5;
|
|
4663
4740
|
|
|
4664
|
-
const { Worksheet } =
|
|
4741
|
+
const { Worksheet } = _m35;
|
|
4665
4742
|
|
|
4666
|
-
const { defineTable, tableXml } =
|
|
4743
|
+
const { defineTable, tableXml } = _m45;
|
|
4667
4744
|
|
|
4668
|
-
const { copyHyperlink, drawingXml, drawingContentType } =
|
|
4745
|
+
const { copyHyperlink, drawingXml, drawingContentType } = _m36;
|
|
4669
4746
|
|
|
4670
|
-
const { TextOverflow } =
|
|
4747
|
+
const { TextOverflow } = _m46;
|
|
4671
4748
|
|
|
4672
|
-
const { captureWorkbookOptions, sheetOptionFields } =
|
|
4749
|
+
const { captureWorkbookOptions, sheetOptionFields } = _m47;
|
|
4673
4750
|
|
|
4674
|
-
const { prepareChart } =
|
|
4751
|
+
const { prepareChart } = _m48;
|
|
4675
4752
|
|
|
4676
|
-
const { qualifiedColumnRange, resolveDataColumn } =
|
|
4753
|
+
const { qualifiedColumnRange, resolveDataColumn } = _m42;
|
|
4677
4754
|
|
|
4678
|
-
const { chartContentType, writeChartXml } =
|
|
4755
|
+
const { chartContentType, writeChartXml } = _m37;
|
|
4679
4756
|
|
|
4680
4757
|
const xlsxMime = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
4681
4758
|
const formatType = (name) => "application/vnd.openxmlformats-officedocument.spreadsheetml." + name + "+xml";
|
|
@@ -4686,6 +4763,7 @@ function captureSheet(options, policy) {
|
|
|
4686
4763
|
const footer = captured.footer && captureFields(captured.footer, ["rows", "values", "totals", "style"]);
|
|
4687
4764
|
const print = captured.print && captureFields(captured.print, ["paper", "orientation", "fitToWidth", "fitToHeight", "repeatHeaders", "margins", "header", "footer"]);
|
|
4688
4765
|
return { ...captured, columns,
|
|
4766
|
+
...(captured.columnOutlines === undefined ? {} : { columnOutlines: captureColumnOutlines(captured.columnOutlines, columns.length) }),
|
|
4689
4767
|
...(captured.headerRows === undefined ? {} : { headerRows: captureTableSpans(captured.headerRows, columns.length) }),
|
|
4690
4768
|
...(footer ? { footer: { ...footer,
|
|
4691
4769
|
...(footer.rows === undefined ? {} : { rows: captureTableSpans(footer.rows, columns.length) }),
|
|
@@ -5115,10 +5193,10 @@ const _exports = Object.freeze({ Workbook: Workbook });
|
|
|
5115
5193
|
return _exports;
|
|
5116
5194
|
})();
|
|
5117
5195
|
|
|
5118
|
-
const
|
|
5196
|
+
const _m51 = (() => {
|
|
5119
5197
|
const { ExportCell, assertScalar } = _m5;
|
|
5120
5198
|
|
|
5121
|
-
const { captureWorkbookOptions, sheetOptionFields } =
|
|
5199
|
+
const { captureWorkbookOptions, sheetOptionFields } = _m47;
|
|
5122
5200
|
|
|
5123
5201
|
const { captureFields } = _m10;
|
|
5124
5202
|
|
|
@@ -5167,18 +5245,18 @@ const _exports = Object.freeze({ portableSheet: portableSheet, portableWorkbook:
|
|
|
5167
5245
|
return _exports;
|
|
5168
5246
|
})();
|
|
5169
5247
|
|
|
5170
|
-
const
|
|
5248
|
+
const _m50 = (() => {
|
|
5171
5249
|
const { withDestination } = _m3;
|
|
5172
5250
|
|
|
5173
5251
|
const { copyColumns } = _m11;
|
|
5174
5252
|
|
|
5175
5253
|
const { Workbook } = _m21;
|
|
5176
5254
|
|
|
5177
|
-
const { portableSheet, portableWorkbook } =
|
|
5255
|
+
const { portableSheet, portableWorkbook } = _m51;
|
|
5178
5256
|
|
|
5179
5257
|
const { captureFields } = _m10;
|
|
5180
5258
|
|
|
5181
|
-
const { sheetOptionFields, workbookOptionFields } =
|
|
5259
|
+
const { sheetOptionFields, workbookOptionFields } = _m47;
|
|
5182
5260
|
|
|
5183
5261
|
function prepare(options) {
|
|
5184
5262
|
options = captureFields(options, [...workbookOptionFields, "columns", "sheet"]);
|
|
@@ -5225,7 +5303,7 @@ const _exports = Object.freeze({ writeXlsx: writeXlsx, writeXlsxTo: writeXlsxTo
|
|
|
5225
5303
|
return _exports;
|
|
5226
5304
|
})();
|
|
5227
5305
|
|
|
5228
|
-
const
|
|
5306
|
+
const _m53 = (() => {
|
|
5229
5307
|
const { assertGroupedReportSource } = _m8;
|
|
5230
5308
|
|
|
5231
5309
|
const { captureFields } = _m10;
|
|
@@ -5234,11 +5312,11 @@ const { OfficeIMOError } = _m2;
|
|
|
5234
5312
|
|
|
5235
5313
|
const { fields } = _m31;
|
|
5236
5314
|
|
|
5237
|
-
const { sheetOptionFields } =
|
|
5315
|
+
const { sheetOptionFields } = _m47;
|
|
5238
5316
|
|
|
5239
|
-
const { portableSheet } =
|
|
5317
|
+
const { portableSheet } = _m51;
|
|
5240
5318
|
|
|
5241
|
-
const { resolveDataColumn } =
|
|
5319
|
+
const { resolveDataColumn } = _m42;
|
|
5242
5320
|
|
|
5243
5321
|
const { copyStylePatch } = _m29;
|
|
5244
5322
|
|
|
@@ -5317,7 +5395,7 @@ const _exports = Object.freeze({ groupedOptionFields: groupedOptionFields, prepa
|
|
|
5317
5395
|
return _exports;
|
|
5318
5396
|
})();
|
|
5319
5397
|
|
|
5320
|
-
const
|
|
5398
|
+
const _m52 = (() => {
|
|
5321
5399
|
const { groupedReportOperation } = _m8;
|
|
5322
5400
|
|
|
5323
5401
|
const { checkAbort, withAbort } = _m4;
|
|
@@ -5332,11 +5410,11 @@ const { FormulaCell } = _m33;
|
|
|
5332
5410
|
|
|
5333
5411
|
const { columnName } = _m32;
|
|
5334
5412
|
|
|
5335
|
-
const { captureWorkbookLimits, workbookOptionFields } =
|
|
5413
|
+
const { captureWorkbookLimits, workbookOptionFields } = _m47;
|
|
5336
5414
|
|
|
5337
|
-
const { retainDataRowRanges } =
|
|
5415
|
+
const { retainDataRowRanges } = _m43;
|
|
5338
5416
|
|
|
5339
|
-
const { groupedOptionFields, prepareGroupedSheet } =
|
|
5417
|
+
const { groupedOptionFields, prepareGroupedSheet } = _m53;
|
|
5340
5418
|
|
|
5341
5419
|
const subtotalOperations = { average: 1, count: 2, max: 4, min: 5, sum: 9 };
|
|
5342
5420
|
function label(value) {
|
|
@@ -5495,11 +5573,11 @@ return _exports;
|
|
|
5495
5573
|
|
|
5496
5574
|
const _m20 = (() => {
|
|
5497
5575
|
|
|
5498
|
-
const _exports = Object.freeze({ Workbook: _m21.Workbook, writeXlsx:
|
|
5576
|
+
const _exports = Object.freeze({ Workbook: _m21.Workbook, writeXlsx: _m50.writeXlsx, writeXlsxTo: _m50.writeXlsxTo, writeGroupedXlsx: _m52.writeGroupedXlsx, writeGroupedXlsxTo: _m52.writeGroupedXlsxTo, addGroupedXlsx: _m52.addGroupedXlsx, createGroupedReport: _m8.createGroupedReport, Worksheet: _m35.Worksheet, Cell: _m32.Cell, FormulaCell: _m33.FormulaCell, StyleRegistry: _m29.StyleRegistry, NumberFormats: _m29.NumberFormats, saveBlob: _m1.saveBlob, ExportCell: _m5.ExportCell });
|
|
5499
5577
|
return _exports;
|
|
5500
5578
|
})();
|
|
5501
5579
|
|
|
5502
|
-
const
|
|
5580
|
+
const _m58 = (() => {
|
|
5503
5581
|
const { captureFields } = _m10;
|
|
5504
5582
|
|
|
5505
5583
|
/** Pure validation shared by document settings and named paragraph styles. */
|
|
@@ -5533,10 +5611,10 @@ const _exports = Object.freeze({ positive: positive, color: color, presentation:
|
|
|
5533
5611
|
return _exports;
|
|
5534
5612
|
})();
|
|
5535
5613
|
|
|
5536
|
-
const
|
|
5614
|
+
const _m57 = (() => {
|
|
5537
5615
|
const { OfficeIMOError } = _m2;
|
|
5538
5616
|
|
|
5539
|
-
const { positive, presentation } =
|
|
5617
|
+
const { positive, presentation } = _m58;
|
|
5540
5618
|
|
|
5541
5619
|
const fields = ["fontSize", "presentation", "keepTogether", "keepWithNext", "spaceBefore", "spaceAfter"];
|
|
5542
5620
|
const presentationFields = ["bold", "italic", "color", "alignment"];
|
|
@@ -5606,7 +5684,7 @@ const _exports = Object.freeze({ captureParagraphStyle: captureParagraphStyle, c
|
|
|
5606
5684
|
return _exports;
|
|
5607
5685
|
})();
|
|
5608
5686
|
|
|
5609
|
-
const
|
|
5687
|
+
const _m56 = (() => {
|
|
5610
5688
|
const { OfficeIMOError } = _m2;
|
|
5611
5689
|
|
|
5612
5690
|
const { ExportBudget } = _m9;
|
|
@@ -5619,11 +5697,11 @@ const { copyExportValue } = _m13;
|
|
|
5619
5697
|
|
|
5620
5698
|
const { captureFields } = _m10;
|
|
5621
5699
|
|
|
5622
|
-
const { captureParagraphStyles } =
|
|
5700
|
+
const { captureParagraphStyles } = _m57;
|
|
5623
5701
|
|
|
5624
5702
|
const { captureBooleanText } = _m18;
|
|
5625
5703
|
|
|
5626
|
-
const { positive, color, presentation } =
|
|
5704
|
+
const { positive, color, presentation } = _m58;
|
|
5627
5705
|
|
|
5628
5706
|
|
|
5629
5707
|
|
|
@@ -5813,11 +5891,11 @@ function settings(input, document = false) {
|
|
|
5813
5891
|
repeatedColumns: document ? Object.freeze([]) : repeatedColumns(options.wideTable, columns),
|
|
5814
5892
|
limits: { ...limits, ...(maxImageWorkingBytes === undefined ? {} : { maxImageWorkingBytes }) }, budget };
|
|
5815
5893
|
}
|
|
5816
|
-
const _exports = Object.freeze({ positive:
|
|
5894
|
+
const _exports = Object.freeze({ positive: _m58.positive, color: _m58.color, presentation: _m58.presentation, pdfOptionFields: pdfOptionFields, pdfLimitFields: pdfLimitFields, capturePdfOptions: capturePdfOptions, capturePdfLimits: capturePdfLimits, captureWideTable: captureWideTable, settings: settings });
|
|
5817
5895
|
return _exports;
|
|
5818
5896
|
})();
|
|
5819
5897
|
|
|
5820
|
-
const
|
|
5898
|
+
const _m61 = (() => {
|
|
5821
5899
|
/** @internal One type byte, an eight-byte offset/container number and a two-byte generation/index. */
|
|
5822
5900
|
const pdfXrefEntryBytes = 11;
|
|
5823
5901
|
function unsigned(bytes, offset, value, width) {
|
|
@@ -5852,12 +5930,12 @@ const _exports = Object.freeze({ pdfXrefEntryBytes: pdfXrefEntryBytes, pdfXrefCh
|
|
|
5852
5930
|
return _exports;
|
|
5853
5931
|
})();
|
|
5854
5932
|
|
|
5855
|
-
const
|
|
5933
|
+
const _m60 = (() => {
|
|
5856
5934
|
const { checkAbort, withAbort, pause, taskYieldDue } = _m4;
|
|
5857
5935
|
|
|
5858
5936
|
const { OfficeIMOError } = _m2;
|
|
5859
5937
|
|
|
5860
|
-
const { pdfXrefChunks, pdfXrefEntryBytes } =
|
|
5938
|
+
const { pdfXrefChunks, pdfXrefEntryBytes } = _m61;
|
|
5861
5939
|
|
|
5862
5940
|
const compactObjectCount = 256, compactObjectBytes = 32768;
|
|
5863
5941
|
const compactIndexChunkEntries = 4096;
|
|
@@ -6180,7 +6258,7 @@ const _exports = Object.freeze({ pdfNumber: pdfNumber, unicodeHex: unicodeHex, P
|
|
|
6180
6258
|
return _exports;
|
|
6181
6259
|
})();
|
|
6182
6260
|
|
|
6183
|
-
const
|
|
6261
|
+
const _m65 = (() => {
|
|
6184
6262
|
/** @internal Bounded big-endian reader used for caller-provided TrueType programs. */
|
|
6185
6263
|
class FontReader {
|
|
6186
6264
|
bytes;
|
|
@@ -6209,8 +6287,8 @@ const _exports = Object.freeze({ FontReader: FontReader, checksum: checksum, ali
|
|
|
6209
6287
|
return _exports;
|
|
6210
6288
|
})();
|
|
6211
6289
|
|
|
6212
|
-
const
|
|
6213
|
-
const { align4 } =
|
|
6290
|
+
const _m66 = (() => {
|
|
6291
|
+
const { align4 } = _m65;
|
|
6214
6292
|
|
|
6215
6293
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
6216
6294
|
|
|
@@ -6433,12 +6511,12 @@ const _exports = Object.freeze({ subsetTrueType: subsetTrueType, subsetTrueTypeC
|
|
|
6433
6511
|
return _exports;
|
|
6434
6512
|
})();
|
|
6435
6513
|
|
|
6436
|
-
const
|
|
6514
|
+
const _m64 = (() => {
|
|
6437
6515
|
const { NotSupportedError } = _m2;
|
|
6438
6516
|
|
|
6439
|
-
const { FontReader } =
|
|
6517
|
+
const { FontReader } = _m65;
|
|
6440
6518
|
|
|
6441
|
-
const { subsetTrueType, subsetTrueTypeCooperatively } =
|
|
6519
|
+
const { subsetTrueType, subsetTrueTypeCooperatively } = _m66;
|
|
6442
6520
|
|
|
6443
6521
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
6444
6522
|
|
|
@@ -6677,8 +6755,8 @@ const _exports = Object.freeze({ TrueTypeFont: TrueTypeFont });
|
|
|
6677
6755
|
return _exports;
|
|
6678
6756
|
})();
|
|
6679
6757
|
|
|
6680
|
-
const
|
|
6681
|
-
const { TrueTypeFont } =
|
|
6758
|
+
const _m63 = (() => {
|
|
6759
|
+
const { TrueTypeFont } = _m64;
|
|
6682
6760
|
|
|
6683
6761
|
const { beginTask, checkAbort } = _m4;
|
|
6684
6762
|
|
|
@@ -6740,7 +6818,7 @@ const _exports = Object.freeze({ fontProgram: fontProgram, PdfFont: PdfFont });
|
|
|
6740
6818
|
return _exports;
|
|
6741
6819
|
})();
|
|
6742
6820
|
|
|
6743
|
-
const
|
|
6821
|
+
const _m68 = (() => {
|
|
6744
6822
|
// Generated by scripts/pdf-widths.mjs from OfficeIMO.Pdf's Adobe AFM-derived metrics.
|
|
6745
6823
|
const helveticaWidths = new Map([
|
|
6746
6824
|
[32, [278, 278]],
|
|
@@ -7062,12 +7140,12 @@ const _exports = Object.freeze({ helveticaWidths: helveticaWidths });
|
|
|
7062
7140
|
return _exports;
|
|
7063
7141
|
})();
|
|
7064
7142
|
|
|
7065
|
-
const
|
|
7143
|
+
const _m67 = (() => {
|
|
7066
7144
|
const { OfficeIMOError } = _m2;
|
|
7067
7145
|
|
|
7068
|
-
const { PdfFont, fontProgram } =
|
|
7146
|
+
const { PdfFont, fontProgram } = _m63;
|
|
7069
7147
|
|
|
7070
|
-
const { helveticaWidths } =
|
|
7148
|
+
const { helveticaWidths } = _m68;
|
|
7071
7149
|
|
|
7072
7150
|
const winAnsiExtras = new Map([0x20ac, 0, 0x201a, 0x192, 0x201e, 0x2026, 0x2020, 0x2021, 0x2c6, 0x2030, 0x160, 0x2039, 0x152, 0, 0x17d, 0, 0, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x2dc, 0x2122, 0x161, 0x203a, 0x153, 0, 0x17e, 0x178].map((cp, i) => [cp, i + 128]));
|
|
7073
7151
|
/** @internal Called after scalar support succeeds when encoding a standard-font run. */
|
|
@@ -7130,18 +7208,19 @@ const _exports = Object.freeze({ standardCode: standardCode, resolveScalar: reso
|
|
|
7130
7208
|
return _exports;
|
|
7131
7209
|
})();
|
|
7132
7210
|
|
|
7133
|
-
const
|
|
7211
|
+
const _m62 = (() => {
|
|
7134
7212
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
7135
7213
|
|
|
7136
|
-
const { fontProgram } =
|
|
7214
|
+
const { fontProgram } = _m63;
|
|
7137
7215
|
|
|
7138
|
-
const { resolveScalar, selectFont, standardCode, validateFonts } =
|
|
7216
|
+
const { resolveScalar, selectFont, standardCode, validateFonts } = _m67;
|
|
7139
7217
|
|
|
7140
|
-
const { pdfNumber, unicodeHex } =
|
|
7218
|
+
const { pdfNumber, unicodeHex } = _m60;
|
|
7141
7219
|
|
|
7142
7220
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
7143
7221
|
|
|
7144
|
-
const
|
|
7222
|
+
const hexBytes = Object.freeze(Array.from({ length: 256 }, (_, byte) => byte.toString(16).padStart(2, "0")));
|
|
7223
|
+
function cidHex(cid) { return hexBytes[cid >>> 8] + hexBytes[cid & 255]; }
|
|
7145
7224
|
class PdfFontResource {
|
|
7146
7225
|
index;
|
|
7147
7226
|
bold;
|
|
@@ -7172,12 +7251,16 @@ class PdfFontResource {
|
|
|
7172
7251
|
width(scalar) {
|
|
7173
7252
|
if (this.shared)
|
|
7174
7253
|
return this.shared.width(scalar);
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7254
|
+
if (this.program) {
|
|
7255
|
+
const existing = this.mappings.get(scalar);
|
|
7256
|
+
if (existing)
|
|
7257
|
+
return existing.width;
|
|
7258
|
+
}
|
|
7259
|
+
else {
|
|
7260
|
+
const standard = this.standardWidths.get(scalar);
|
|
7261
|
+
if (standard !== undefined)
|
|
7262
|
+
return standard;
|
|
7263
|
+
}
|
|
7181
7264
|
const resolved = resolveScalar(scalar, this.program, this.bold);
|
|
7182
7265
|
if (!resolved.supported) {
|
|
7183
7266
|
if (resolved.code === "unpaired-surrogate")
|
|
@@ -7190,7 +7273,8 @@ class PdfFontResource {
|
|
|
7190
7273
|
}
|
|
7191
7274
|
if (this.mappings.size >= 65535)
|
|
7192
7275
|
throw new OfficeIMOError("RESOURCE_LIMIT", "A PDF font supports at most 65,535 distinct Unicode scalars.");
|
|
7193
|
-
const
|
|
7276
|
+
const cid = this.mappings.size + 1;
|
|
7277
|
+
const mapping = { cid, hex: cidHex(cid), glyph: resolved.glyph, width: resolved.width, text: String.fromCodePoint(scalar) };
|
|
7194
7278
|
this.mappings.set(scalar, mapping);
|
|
7195
7279
|
return mapping.width;
|
|
7196
7280
|
}
|
|
@@ -7203,8 +7287,20 @@ class PdfFontResource {
|
|
|
7203
7287
|
let hex = "";
|
|
7204
7288
|
for (const char of text) {
|
|
7205
7289
|
const cp = char.codePointAt(0);
|
|
7206
|
-
this.
|
|
7207
|
-
|
|
7290
|
+
if (this.program) {
|
|
7291
|
+
let mapping = this.mappings.get(cp);
|
|
7292
|
+
// Layout normally registered the scalar already; validate only a newly painted scalar.
|
|
7293
|
+
if (!mapping) {
|
|
7294
|
+
this.width(cp);
|
|
7295
|
+
mapping = this.mappings.get(cp);
|
|
7296
|
+
}
|
|
7297
|
+
hex += mapping.hex;
|
|
7298
|
+
}
|
|
7299
|
+
else {
|
|
7300
|
+
if (!this.standardWidths.has(cp))
|
|
7301
|
+
this.width(cp);
|
|
7302
|
+
hex += hexBytes[standardCode(cp)];
|
|
7303
|
+
}
|
|
7208
7304
|
}
|
|
7209
7305
|
return "<" + hex + ">";
|
|
7210
7306
|
}
|
|
@@ -7219,10 +7315,11 @@ class PdfFontResource {
|
|
|
7219
7315
|
if (!mapping) {
|
|
7220
7316
|
if (this.mappings.size >= 65535)
|
|
7221
7317
|
throw new OfficeIMOError("RESOURCE_LIMIT", "A PDF font supports at most 65,535 distinct CID mappings.");
|
|
7222
|
-
|
|
7318
|
+
const cid = this.mappings.size + 1;
|
|
7319
|
+
mapping = { cid, hex: cidHex(cid), glyph, width: this.program.widths[glyph], text };
|
|
7223
7320
|
this.mappings.set(key, mapping);
|
|
7224
7321
|
}
|
|
7225
|
-
return "<" + mapping.
|
|
7322
|
+
return "<" + mapping.hex + ">";
|
|
7226
7323
|
}
|
|
7227
7324
|
async write(objects, compression) {
|
|
7228
7325
|
checkAbort(this.signal);
|
|
@@ -7271,7 +7368,7 @@ class PdfFontResource {
|
|
|
7271
7368
|
const batch = mapped.slice(i, i + 100);
|
|
7272
7369
|
cmap += batch.length + " beginbfchar\n";
|
|
7273
7370
|
for (const [, m] of batch)
|
|
7274
|
-
cmap += "<" + m.
|
|
7371
|
+
cmap += "<" + m.hex + "> <" + unicodeHex(m.text) + ">\n";
|
|
7275
7372
|
cmap += "endbfchar\n";
|
|
7276
7373
|
if (taskYieldDue())
|
|
7277
7374
|
await pause();
|
|
@@ -7322,7 +7419,7 @@ class PdfFontResources {
|
|
|
7322
7419
|
if (!found)
|
|
7323
7420
|
this.explicitSelections.set(explicit, selections);
|
|
7324
7421
|
}
|
|
7325
|
-
const key =
|
|
7422
|
+
const key = (bold ? 2 : 0) | (italic ? 1 : 0), existing = selections.get(key);
|
|
7326
7423
|
if (existing)
|
|
7327
7424
|
return existing;
|
|
7328
7425
|
const { font, syntheticBold, syntheticItalic } = explicit ? { font: explicit, syntheticBold: bold, syntheticItalic: italic } : selectFont(this.fonts, bold, italic);
|
|
@@ -7342,7 +7439,7 @@ const _exports = Object.freeze({ PdfFontResource: PdfFontResource, PdfFontResour
|
|
|
7342
7439
|
return _exports;
|
|
7343
7440
|
})();
|
|
7344
7441
|
|
|
7345
|
-
const
|
|
7442
|
+
const _m70 = (() => {
|
|
7346
7443
|
const { OfficeIMOError } = _m2;
|
|
7347
7444
|
|
|
7348
7445
|
const { ExportCell, assertExportValue } = _m5;
|
|
@@ -7453,7 +7550,7 @@ const _exports = Object.freeze({ pdfBudgetText: pdfBudgetText, synchronousText:
|
|
|
7453
7550
|
return _exports;
|
|
7454
7551
|
})();
|
|
7455
7552
|
|
|
7456
|
-
const
|
|
7553
|
+
const _m72 = (() => {
|
|
7457
7554
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
7458
7555
|
|
|
7459
7556
|
const { checkAbort, pause, taskYieldDue, withAbort } = _m4;
|
|
@@ -7665,20 +7762,20 @@ const _exports = Object.freeze({ wrapShapedPdfText: wrapShapedPdfText });
|
|
|
7665
7762
|
return _exports;
|
|
7666
7763
|
})();
|
|
7667
7764
|
|
|
7668
|
-
const
|
|
7765
|
+
const _m71 = (() => {
|
|
7669
7766
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
7670
7767
|
|
|
7671
7768
|
const { copyExportLink } = _m7;
|
|
7672
7769
|
|
|
7673
7770
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
7674
7771
|
|
|
7675
|
-
const { presentation, color } =
|
|
7772
|
+
const { presentation, color } = _m56;
|
|
7676
7773
|
|
|
7677
|
-
const { wrapShapedPdfText } =
|
|
7774
|
+
const { wrapShapedPdfText } = _m72;
|
|
7678
7775
|
|
|
7679
|
-
const { PdfFont } =
|
|
7776
|
+
const { PdfFont } = _m63;
|
|
7680
7777
|
|
|
7681
|
-
const { pdfBudgetText } =
|
|
7778
|
+
const { pdfBudgetText } = _m70;
|
|
7682
7779
|
|
|
7683
7780
|
/** @internal Callers supply an owned, validated, frozen base presentation. A run list is a PDF presentation value, never an alternate shared table value model. */
|
|
7684
7781
|
function capturePdfText(value, base, settings, fonts, countEmpty = true, reserveBudget = true) {
|
|
@@ -7860,10 +7957,10 @@ const _exports = Object.freeze({ capturePdfText: capturePdfText, wrapPdfText: wr
|
|
|
7860
7957
|
return _exports;
|
|
7861
7958
|
})();
|
|
7862
7959
|
|
|
7863
|
-
const
|
|
7960
|
+
const _m73 = (() => {
|
|
7864
7961
|
const { OfficeIMOError } = _m2;
|
|
7865
7962
|
|
|
7866
|
-
const { wrapPdfText } =
|
|
7963
|
+
const { wrapPdfText } = _m71;
|
|
7867
7964
|
|
|
7868
7965
|
/** Plan without opening a source. Exact column widths never shrink in band mode. */
|
|
7869
7966
|
function planTableBands(widths, settings) {
|
|
@@ -7908,6 +8005,14 @@ async function projectBandRows(rows, band, widths, settings, fonts) {
|
|
|
7908
8005
|
for (const row of rows) {
|
|
7909
8006
|
const cells = [];
|
|
7910
8007
|
for (const cell of row.cells) {
|
|
8008
|
+
// Ordinary data and leaf headings keep their captured width and lines in every band.
|
|
8009
|
+
// Look up their physical position without allocating another per-row column index.
|
|
8010
|
+
if (cell.span === 1) {
|
|
8011
|
+
const first = band.columns.indexOf(cell.first);
|
|
8012
|
+
if (first >= 0)
|
|
8013
|
+
cells.push({ ...cell, source: cell.source ?? cell, first });
|
|
8014
|
+
continue;
|
|
8015
|
+
}
|
|
7911
8016
|
for (let first = 0; first < band.columns.length;) {
|
|
7912
8017
|
const source = band.columns[first];
|
|
7913
8018
|
if (source < cell.first || source >= cell.first + cell.span) {
|
|
@@ -7918,7 +8023,7 @@ async function projectBandRows(rows, band, widths, settings, fonts) {
|
|
|
7918
8023
|
while (end < band.columns.length && band.columns[end] === band.columns[end - 1] + 1 && band.columns[end] < cell.first + cell.span)
|
|
7919
8024
|
end++;
|
|
7920
8025
|
const width = band.columns.slice(first, end).reduce((sum, index) => sum + widths[index], 0);
|
|
7921
|
-
const lines =
|
|
8026
|
+
const lines = await wrapPdfText(cell.captured, fonts, settings.fontSize, width - settings.padding * 2, settings, cell.style.wrapText !== false);
|
|
7922
8027
|
cells.push({ ...cell, source: cell.source ?? cell, first, span: end - first, width, lines,
|
|
7923
8028
|
lineHeight: lines.reduce((height, line) => Math.max(height, line.lineHeight), cell.font.lineHeight(settings.fontSize)) });
|
|
7924
8029
|
first = end;
|
|
@@ -7950,7 +8055,7 @@ const _exports = Object.freeze({ planTableBands: planTableBands, projectBandRows
|
|
|
7950
8055
|
return _exports;
|
|
7951
8056
|
})();
|
|
7952
8057
|
|
|
7953
|
-
const
|
|
8058
|
+
const _m69 = (() => {
|
|
7954
8059
|
const { ExportCell } = _m5;
|
|
7955
8060
|
|
|
7956
8061
|
const { copyExportLink } = _m7;
|
|
@@ -7959,13 +8064,13 @@ const { tableSpans } = _m17;
|
|
|
7959
8064
|
|
|
7960
8065
|
const { createTotals } = _m12;
|
|
7961
8066
|
|
|
7962
|
-
const { presentation, positive } =
|
|
8067
|
+
const { presentation, positive } = _m56;
|
|
7963
8068
|
|
|
7964
|
-
const { displayText, pdfBudgetText } =
|
|
8069
|
+
const { displayText, pdfBudgetText } = _m70;
|
|
7965
8070
|
|
|
7966
|
-
const { capturePdfText, wrapPdfText } =
|
|
8071
|
+
const { capturePdfText, wrapPdfText } = _m71;
|
|
7967
8072
|
|
|
7968
|
-
const { planTableBands, projectBandRows, alignBandBlocks } =
|
|
8073
|
+
const { planTableBands, projectBandRows, alignBandBlocks } = _m73;
|
|
7969
8074
|
|
|
7970
8075
|
class PdfTableLayout {
|
|
7971
8076
|
settings;
|
|
@@ -8070,8 +8175,12 @@ class PdfTableLayout {
|
|
|
8070
8175
|
lines };
|
|
8071
8176
|
}
|
|
8072
8177
|
row(cells) {
|
|
8073
|
-
|
|
8074
|
-
|
|
8178
|
+
let lines = 1, lineHeight = this.lineHeight;
|
|
8179
|
+
for (let index = 0; index < cells.length; index++) {
|
|
8180
|
+
const cell = cells[index];
|
|
8181
|
+
lines = Math.max(lines, cell.lines.length);
|
|
8182
|
+
lineHeight = Math.max(lineHeight, cell.lineHeight);
|
|
8183
|
+
}
|
|
8075
8184
|
return { cells, lines, lineHeight, height: lines * lineHeight + this.settings.padding * 2 };
|
|
8076
8185
|
}
|
|
8077
8186
|
async headers() {
|
|
@@ -8180,7 +8289,7 @@ const _exports = Object.freeze({ PdfTableLayout: PdfTableLayout });
|
|
|
8180
8289
|
return _exports;
|
|
8181
8290
|
})();
|
|
8182
8291
|
|
|
8183
|
-
const
|
|
8292
|
+
const _m75 = (() => {
|
|
8184
8293
|
const { OfficeIMOError } = _m2;
|
|
8185
8294
|
|
|
8186
8295
|
const { checkAbort } = _m4;
|
|
@@ -8224,7 +8333,7 @@ class PdfTableBandFlow {
|
|
|
8224
8333
|
await this.flush();
|
|
8225
8334
|
}
|
|
8226
8335
|
async row(row, allowFirstFragment = false) {
|
|
8227
|
-
const { padding, fontSize, options } = this.layout.settings, minimumLines = this.layout.minimumRowLines(row), minimumHeight =
|
|
8336
|
+
const { padding, fontSize, options } = this.layout.settings, minimumLines = this.layout.minimumRowLines(row), minimumHeight = minimumLines * row.lineHeight + padding * 2;
|
|
8228
8337
|
if (minimumHeight > this.painter.firstFullCapacity + .001 || minimumHeight > this.painter.continuationCapacity + .001)
|
|
8229
8338
|
throw new RangeError("Repeated PDF identifiers must fit intact below the first and continued band headings/context.");
|
|
8230
8339
|
// Keep ordinary rows intact when they fit fresh. A kept heading/caption can deliberately
|
|
@@ -8258,9 +8367,14 @@ class PdfTableBandFlow {
|
|
|
8258
8367
|
let remaining = false;
|
|
8259
8368
|
const cells = rows[0].cells.map(cell => {
|
|
8260
8369
|
const source = this.layout.bands[index].columns[cell.first];
|
|
8261
|
-
const repeated = this.layout.repeatedColumn(source),
|
|
8370
|
+
const repeated = this.layout.repeatedColumn(source), reusable = cell.span === 1 && (cell.source?.span ?? 1) === 1 && (cell.rowSpan ?? 1) === 1 &&
|
|
8371
|
+
cell.height === undefined && first === 0 && (repeated || lines >= cell.lines.length);
|
|
8372
|
+
const visible = repeated || reusable ? cell.lines : cell.lines.slice(first, first + lines);
|
|
8262
8373
|
if (!repeated && (visible.length > 0 || cell.link !== undefined))
|
|
8263
8374
|
remaining = true;
|
|
8375
|
+
// A complete first fragment already owns these lines and their maximum font metrics.
|
|
8376
|
+
if (reusable)
|
|
8377
|
+
return cell;
|
|
8264
8378
|
const { height: _height, ...plain } = cell;
|
|
8265
8379
|
return { ...plain, lines: visible,
|
|
8266
8380
|
lineHeight: visible.reduce((value, line) => Math.max(value, line.lineHeight), cell.font.lineHeight(fontSize)),
|
|
@@ -8316,7 +8430,7 @@ const _exports = Object.freeze({ PdfTableBandFlow: PdfTableBandFlow });
|
|
|
8316
8430
|
return _exports;
|
|
8317
8431
|
})();
|
|
8318
8432
|
|
|
8319
|
-
const
|
|
8433
|
+
const _m76 = (() => {
|
|
8320
8434
|
/** @internal Source-cell identities survive page fragments and horizontal band projections.
|
|
8321
8435
|
* Only column headers and still-owned row objects remain reachable from this table owner. */
|
|
8322
8436
|
class PdfTableStructure {
|
|
@@ -8368,30 +8482,31 @@ class PdfTableStructure {
|
|
|
8368
8482
|
return row.cells.map(cell => this.cells.get(cell));
|
|
8369
8483
|
const rowId = this.structure.element("TR", parent);
|
|
8370
8484
|
this.rows.set(row, rowId);
|
|
8371
|
-
const headers = row.cells.map((cell, index) => rowHeaderIndex === undefined ? cell.rowHeader === true : index === rowHeaderIndex);
|
|
8372
8485
|
// Allocate in source order, then resolve every row header before associating even earlier data cells.
|
|
8373
8486
|
// Generated summary labels override detail roles so numeric subtotal cells never become row headers.
|
|
8374
8487
|
const ids = row.cells.map((cell, index) => {
|
|
8375
|
-
const
|
|
8488
|
+
const header = rowHeaderIndex === undefined ? cell.rowHeader === true : index === rowHeaderIndex;
|
|
8489
|
+
const id = this.structure.element(header ? "TH" : "TD", rowId);
|
|
8376
8490
|
this.cells.set(cell, id);
|
|
8377
8491
|
return id;
|
|
8378
8492
|
});
|
|
8379
|
-
|
|
8493
|
+
let rowHeaders;
|
|
8380
8494
|
for (let index = 0; index < ids.length; index++)
|
|
8381
|
-
if (
|
|
8382
|
-
rowHeaders.push(await this.structure.identifier(ids[index]));
|
|
8495
|
+
if (rowHeaderIndex === undefined ? row.cells[index].rowHeader === true : index === rowHeaderIndex)
|
|
8496
|
+
(rowHeaders ??= []).push(await this.structure.identifier(ids[index]));
|
|
8383
8497
|
for (let index = 0; index < row.cells.length; index++) {
|
|
8384
8498
|
const cell = row.cells[index];
|
|
8385
|
-
if (!rowHeaders
|
|
8499
|
+
if (!rowHeaders && cell.span === 1 && (cell.rowSpan ?? 1) === 1) {
|
|
8386
8500
|
const attributes = this.ordinaryAttributes[cell.first] ??=
|
|
8387
8501
|
await this.structure.attributeReference(this.attributeDictionary(cell, this.associations(cell)));
|
|
8388
8502
|
this.structure.setAttributes(ids[index], attributes);
|
|
8389
8503
|
continue;
|
|
8390
8504
|
}
|
|
8391
8505
|
const associations = this.associations(cell);
|
|
8392
|
-
|
|
8506
|
+
const header = rowHeaderIndex === undefined ? cell.rowHeader === true : index === rowHeaderIndex;
|
|
8507
|
+
if (!header && rowHeaders)
|
|
8393
8508
|
associations.push(...rowHeaders);
|
|
8394
|
-
this.structure.setAttributes(ids[index], this.attributes(cell, associations,
|
|
8509
|
+
this.structure.setAttributes(ids[index], this.attributes(cell, associations, header ? "Row" : undefined));
|
|
8395
8510
|
}
|
|
8396
8511
|
return ids;
|
|
8397
8512
|
}
|
|
@@ -8429,10 +8544,10 @@ const _exports = Object.freeze({ PdfTableStructure: PdfTableStructure });
|
|
|
8429
8544
|
return _exports;
|
|
8430
8545
|
})();
|
|
8431
8546
|
|
|
8432
|
-
const
|
|
8547
|
+
const _m77 = (() => {
|
|
8433
8548
|
const { OfficeIMOError } = _m2;
|
|
8434
8549
|
|
|
8435
|
-
const { pdfNumber, unicodeHex } =
|
|
8550
|
+
const { pdfNumber, unicodeHex } = _m60;
|
|
8436
8551
|
|
|
8437
8552
|
const encoder = new TextEncoder();
|
|
8438
8553
|
/** @internal URI actions are byte strings; tooltips are Unicode PDF text strings. */
|
|
@@ -8474,10 +8589,10 @@ const _exports = Object.freeze({ linkAnnotation: linkAnnotation });
|
|
|
8474
8589
|
return _exports;
|
|
8475
8590
|
})();
|
|
8476
8591
|
|
|
8477
|
-
const
|
|
8592
|
+
const _m78 = (() => {
|
|
8478
8593
|
const { OfficeIMOError } = _m2;
|
|
8479
8594
|
|
|
8480
|
-
const { unicodeHex } =
|
|
8595
|
+
const { unicodeHex } = _m60;
|
|
8481
8596
|
|
|
8482
8597
|
const { captureFields } = _m10;
|
|
8483
8598
|
|
|
@@ -8522,8 +8637,8 @@ const _exports = Object.freeze({ captureBookmark: captureBookmark, captureSectio
|
|
|
8522
8637
|
return _exports;
|
|
8523
8638
|
})();
|
|
8524
8639
|
|
|
8525
|
-
const
|
|
8526
|
-
const { settings } =
|
|
8640
|
+
const _m79 = (() => {
|
|
8641
|
+
const { settings } = _m56;
|
|
8527
8642
|
|
|
8528
8643
|
/** @internal Every section derives from captured document defaults, never the preceding section. */
|
|
8529
8644
|
function sectionSettings(base, section) {
|
|
@@ -8540,28 +8655,28 @@ const _exports = Object.freeze({ sectionSettings: sectionSettings });
|
|
|
8540
8655
|
return _exports;
|
|
8541
8656
|
})();
|
|
8542
8657
|
|
|
8543
|
-
const
|
|
8658
|
+
const _m74 = (() => {
|
|
8544
8659
|
const { OfficeIMOError } = _m2;
|
|
8545
8660
|
|
|
8546
8661
|
const { checkAbort } = _m4;
|
|
8547
8662
|
|
|
8548
|
-
const { pdfNumber } =
|
|
8663
|
+
const { pdfNumber } = _m60;
|
|
8549
8664
|
|
|
8550
|
-
const { color } =
|
|
8665
|
+
const { color } = _m56;
|
|
8551
8666
|
|
|
8552
|
-
const { PdfTableBandFlow } =
|
|
8667
|
+
const { PdfTableBandFlow } = _m75;
|
|
8553
8668
|
|
|
8554
|
-
const { PdfTableStructure } =
|
|
8669
|
+
const { PdfTableStructure } = _m76;
|
|
8555
8670
|
|
|
8556
|
-
const { wrapText, wrapTextCooperatively, synchronousText, pdfBudgetText } =
|
|
8671
|
+
const { wrapText, wrapTextCooperatively, synchronousText, pdfBudgetText } = _m70;
|
|
8557
8672
|
|
|
8558
|
-
const { linkAnnotation } =
|
|
8673
|
+
const { linkAnnotation } = _m77;
|
|
8559
8674
|
|
|
8560
|
-
const { unicodeHex } =
|
|
8675
|
+
const { unicodeHex } = _m60;
|
|
8561
8676
|
|
|
8562
|
-
const { captureSection, captureBookmark } =
|
|
8677
|
+
const { captureSection, captureBookmark } = _m78;
|
|
8563
8678
|
|
|
8564
|
-
const { sectionSettings } =
|
|
8679
|
+
const { sectionSettings } = _m79;
|
|
8565
8680
|
|
|
8566
8681
|
/** @internal One page of drawing commands and O(page count) references, never the complete report body. */
|
|
8567
8682
|
class PdfPages {
|
|
@@ -8575,7 +8690,8 @@ class PdfPages {
|
|
|
8575
8690
|
outlines;
|
|
8576
8691
|
references = [];
|
|
8577
8692
|
current = 0;
|
|
8578
|
-
commands =
|
|
8693
|
+
commands = "";
|
|
8694
|
+
commandParts = [];
|
|
8579
8695
|
commandBytes = 0;
|
|
8580
8696
|
annotations = [];
|
|
8581
8697
|
hyperlinks = 0;
|
|
@@ -8593,6 +8709,12 @@ class PdfPages {
|
|
|
8593
8709
|
pendingBookmarks = [];
|
|
8594
8710
|
pageNumberWidth = 0;
|
|
8595
8711
|
colors = new Map();
|
|
8712
|
+
textFont;
|
|
8713
|
+
textSize = 0;
|
|
8714
|
+
textColor = "";
|
|
8715
|
+
textPrefix = "";
|
|
8716
|
+
rectangleLefts;
|
|
8717
|
+
rectangleColumns = [];
|
|
8596
8718
|
externalObjects = new Map();
|
|
8597
8719
|
bandFlow;
|
|
8598
8720
|
bandCellBudget = false;
|
|
@@ -8659,7 +8781,7 @@ class PdfPages {
|
|
|
8659
8781
|
}
|
|
8660
8782
|
add(command) {
|
|
8661
8783
|
this.retainPageBytes(command.length);
|
|
8662
|
-
this.commands
|
|
8784
|
+
this.commands += command;
|
|
8663
8785
|
}
|
|
8664
8786
|
retainPageBytes(length) {
|
|
8665
8787
|
this.commandBytes += length;
|
|
@@ -8679,9 +8801,17 @@ class PdfPages {
|
|
|
8679
8801
|
return this.structure ? "/Artifact << /Type /" + type + " >> BDC\n" + command + "EMC\n" : command;
|
|
8680
8802
|
}
|
|
8681
8803
|
text(text, font, size, x, baseline, foreground = "111827", element) {
|
|
8682
|
-
const n = pdfNumber
|
|
8683
|
-
|
|
8684
|
-
|
|
8804
|
+
const n = pdfNumber;
|
|
8805
|
+
if (font !== this.textFont || size !== this.textSize || foreground !== this.textColor) {
|
|
8806
|
+
const shear = font.syntheticItalic ? .213 : 0, rgb = this.rgb(foreground);
|
|
8807
|
+
// Keep one prefix, independent of report size. Resource identity includes synthetic styling.
|
|
8808
|
+
this.textPrefix = "q " + rgb + " rg " + rgb + " RG\nBT /" + font.name + " " + n(size) + " Tf " +
|
|
8809
|
+
(font.syntheticBold ? n(size * .025) + " w 2 Tr " : "0 Tr ") + "1 0 " + n(shear) + " 1 ";
|
|
8810
|
+
this.textFont = font;
|
|
8811
|
+
this.textSize = size;
|
|
8812
|
+
this.textColor = foreground;
|
|
8813
|
+
}
|
|
8814
|
+
const command = this.textPrefix + n(x) + " " + n(baseline) + " Tm " + font.encode(text) + " Tj ET Q\n";
|
|
8685
8815
|
this.add(this.structure && element !== undefined ? this.structure.mark(element) + command + "EMC\n" : this.artifact(command, "Pagination"));
|
|
8686
8816
|
}
|
|
8687
8817
|
link(link, x, bottom, width, height, element) {
|
|
@@ -8711,8 +8841,8 @@ class PdfPages {
|
|
|
8711
8841
|
for (const segment of line.segments) {
|
|
8712
8842
|
const registered = marks?.get(segment), owner = registered?.owner ?? (segment.link && this.structure && element !== undefined ? this.structure.link(element, segment.link) : element);
|
|
8713
8843
|
if (segment.glyphs) {
|
|
8714
|
-
const font = segment.font, n = pdfNumber, shear = font.syntheticItalic ? .213 : 0;
|
|
8715
|
-
let cursor = x, command = "q " +
|
|
8844
|
+
const font = segment.font, n = pdfNumber, shear = font.syntheticItalic ? .213 : 0, rgb = this.rgb(segment.color ?? "111827");
|
|
8845
|
+
let cursor = x, command = "q " + rgb + " rg " + rgb + " RG\nBT /" + font.name + " " + n(size) + " Tf " +
|
|
8716
8846
|
(font.syntheticBold ? n(size * .025) + " w 2 Tr " : "0 Tr ");
|
|
8717
8847
|
for (const glyph of segment.glyphs) {
|
|
8718
8848
|
command += "1 0 " + n(shear) + " 1 " + n(cursor + (glyph.xOffset + shear * glyph.yOffset) * size / 1000) + " " + n(baseline + glyph.yOffset * size / 1000) + " Tm " + font.encodeGlyph(glyph.id, glyph.logicalText) + " Tj\n";
|
|
@@ -8760,7 +8890,8 @@ class PdfPages {
|
|
|
8760
8890
|
this.current = this.objects.reserve();
|
|
8761
8891
|
this.references.push(this.current);
|
|
8762
8892
|
}
|
|
8763
|
-
this.commands =
|
|
8893
|
+
this.commands = "";
|
|
8894
|
+
this.commandParts = [];
|
|
8764
8895
|
this.annotations = [];
|
|
8765
8896
|
this.commandBytes = 0;
|
|
8766
8897
|
this.bodyAdded = false;
|
|
@@ -8843,15 +8974,32 @@ class PdfPages {
|
|
|
8843
8974
|
if (!this.layout)
|
|
8844
8975
|
throw new Error("A table layout is required before drawing rows.");
|
|
8845
8976
|
this.bodyAdded = true;
|
|
8846
|
-
const { padding, fontSize } = this.settings, n = pdfNumber, height = lineCount * row.lineHeight + padding * 2;
|
|
8977
|
+
const { padding, fontSize } = this.settings, n = pdfNumber, height = lineCount * row.lineHeight + padding * 2, lefts = this.layout.lefts;
|
|
8978
|
+
// One geometry token per active physical column; table/band changes release the old tokens.
|
|
8979
|
+
if (this.rectangleLefts !== lefts) {
|
|
8980
|
+
this.rectangleLefts = lefts;
|
|
8981
|
+
this.rectangleColumns = [];
|
|
8982
|
+
}
|
|
8983
|
+
let rectangleHeight, rectangleBottom = "", rectangleHeightText = "";
|
|
8847
8984
|
for (const [index, cell] of row.cells.entries()) {
|
|
8848
8985
|
if (this.bandCellBudget)
|
|
8849
8986
|
this.settings.budget.cell(this.settings.budget.limits.maxTextCharacters === undefined ? "" :
|
|
8850
8987
|
(cell.height === undefined ? cell.lines.slice(firstLine, firstLine + lineCount) : cell.lines).map(line => line.text).join(""));
|
|
8851
|
-
const x =
|
|
8988
|
+
const x = lefts[cell.first], cellHeight = cell.height ?? height;
|
|
8989
|
+
if (cellHeight !== rectangleHeight) {
|
|
8990
|
+
rectangleBottom = n(this.y - cellHeight);
|
|
8991
|
+
rectangleHeightText = n(cellHeight);
|
|
8992
|
+
rectangleHeight = cellHeight;
|
|
8993
|
+
}
|
|
8994
|
+
let horizontal = this.rectangleColumns[cell.first];
|
|
8995
|
+
if (!horizontal || horizontal.x !== x || horizontal.width !== cell.width) {
|
|
8996
|
+
horizontal = { x, width: cell.width, left: n(x), widthText: n(cell.width) };
|
|
8997
|
+
this.rectangleColumns[cell.first] = horizontal;
|
|
8998
|
+
}
|
|
8999
|
+
const rectangle = horizontal.left + " " + rectangleBottom + " " + horizontal.widthText + " " + rectangleHeightText;
|
|
8852
9000
|
if (cell.style.background)
|
|
8853
|
-
this.add(this.artifact("q " + this.rgb(cell.style.background) + " rg " +
|
|
8854
|
-
this.add(this.artifact("q 0.82 0.85 0.89 RG 0.4 w " +
|
|
9001
|
+
this.add(this.artifact("q " + this.rgb(cell.style.background) + " rg " + rectangle + " re f Q\n"));
|
|
9002
|
+
this.add(this.artifact("q 0.82 0.85 0.89 RG 0.4 w " + rectangle + " re S Q\n"));
|
|
8855
9003
|
const element = elements?.[index], artifact = cell.semanticArtifact || repeated[index], owner = cell.link && this.structure && element !== undefined ? this.structure.link(element, cell.link) : element;
|
|
8856
9004
|
for (let line = firstLine; line < Math.min(cell.lines.length, cell.height ? cell.lines.length : firstLine + lineCount); line++) {
|
|
8857
9005
|
const text = cell.lines[line], left = cell.style.alignment === "right" ? cell.width - padding - text.width : cell.style.alignment === "center" ? (cell.width - text.width) / 2 : padding;
|
|
@@ -8861,6 +9009,7 @@ class PdfPages {
|
|
|
8861
9009
|
this.link(cell.link, x, this.y - cellHeight, cell.width, cellHeight, owner);
|
|
8862
9010
|
}
|
|
8863
9011
|
this.y -= row.structured ? row.height : height;
|
|
9012
|
+
this.sealCommands();
|
|
8864
9013
|
}
|
|
8865
9014
|
async block(rows) {
|
|
8866
9015
|
if (this.bandFlow)
|
|
@@ -9186,9 +9335,22 @@ class PdfPages {
|
|
|
9186
9335
|
marker: { line: item.marker, gap: item.markerGap, ...(label === undefined ? {} : { owner: label }) } });
|
|
9187
9336
|
await this.structure?.complete(li);
|
|
9188
9337
|
}
|
|
9338
|
+
sealCommands() {
|
|
9339
|
+
if (this.commands) {
|
|
9340
|
+
this.commandParts.push(this.commands);
|
|
9341
|
+
this.commands = "";
|
|
9342
|
+
}
|
|
9343
|
+
}
|
|
9344
|
+
takeCommands() {
|
|
9345
|
+
this.sealCommands();
|
|
9346
|
+
const content = this.commandParts.join("");
|
|
9347
|
+
// Encoding and awaited delivery own the page value; the next page starts independently.
|
|
9348
|
+
this.commandParts = [];
|
|
9349
|
+
return content;
|
|
9350
|
+
}
|
|
9189
9351
|
async finishPage() {
|
|
9190
9352
|
const contents = this.objects.reserve(), { page, options } = this.settings;
|
|
9191
|
-
await this.objects.stream(contents, this.
|
|
9353
|
+
await this.objects.stream(contents, this.takeCommands(), "", options.compression !== false);
|
|
9192
9354
|
const annotations = [];
|
|
9193
9355
|
for (const annotation of this.annotations) {
|
|
9194
9356
|
annotations.push(annotation.id);
|
|
@@ -9200,7 +9362,6 @@ class PdfPages {
|
|
|
9200
9362
|
(annotations.length ? " /Annots [" + annotations.map(id => id + " 0 R").join(" ") + "]" : "") + " >>");
|
|
9201
9363
|
if (this.structure)
|
|
9202
9364
|
await this.structure.finishPage();
|
|
9203
|
-
this.commands = [];
|
|
9204
9365
|
this.annotations = [];
|
|
9205
9366
|
this.commandBytes = 0;
|
|
9206
9367
|
this.current = 0;
|
|
@@ -9235,7 +9396,7 @@ const _exports = Object.freeze({ PdfPages: PdfPages });
|
|
|
9235
9396
|
return _exports;
|
|
9236
9397
|
})();
|
|
9237
9398
|
|
|
9238
|
-
const
|
|
9399
|
+
const _m81 = (() => {
|
|
9239
9400
|
/** @internal Incremental PDF number tree: at most 64 entries/children per retained level. */
|
|
9240
9401
|
class PdfParentTree {
|
|
9241
9402
|
objects;
|
|
@@ -9297,14 +9458,14 @@ const _exports = Object.freeze({ PdfParentTree: PdfParentTree });
|
|
|
9297
9458
|
return _exports;
|
|
9298
9459
|
})();
|
|
9299
9460
|
|
|
9300
|
-
const
|
|
9461
|
+
const _m80 = (() => {
|
|
9301
9462
|
const { OfficeIMOError } = _m2;
|
|
9302
9463
|
|
|
9303
9464
|
const { checkAbort } = _m4;
|
|
9304
9465
|
|
|
9305
|
-
const { unicodeHex } =
|
|
9466
|
+
const { unicodeHex } = _m60;
|
|
9306
9467
|
|
|
9307
|
-
const { PdfParentTree } =
|
|
9468
|
+
const { PdfParentTree } = _m81;
|
|
9308
9469
|
|
|
9309
9470
|
/** Same-page marked content uses integer K; cross-page MCR and annotation OBJR stay explicit. */
|
|
9310
9471
|
function structureChild(child) {
|
|
@@ -9608,12 +9769,12 @@ const _exports = Object.freeze({ PdfStructure: PdfStructure, graphicAlternative:
|
|
|
9608
9769
|
return _exports;
|
|
9609
9770
|
})();
|
|
9610
9771
|
|
|
9611
|
-
const
|
|
9772
|
+
const _m82 = (() => {
|
|
9612
9773
|
const { OfficeIMOError } = _m2;
|
|
9613
9774
|
|
|
9614
9775
|
const { checkAbort } = _m4;
|
|
9615
9776
|
|
|
9616
|
-
const { pdfNumber, unicodeHex } =
|
|
9777
|
+
const { pdfNumber, unicodeHex } = _m60;
|
|
9617
9778
|
|
|
9618
9779
|
/** @internal Bounded native bookmarks; destinations are captured only when their content is painted. */
|
|
9619
9780
|
class PdfOutlines {
|
|
@@ -9671,18 +9832,18 @@ const _exports = Object.freeze({ PdfOutlines: PdfOutlines });
|
|
|
9671
9832
|
return _exports;
|
|
9672
9833
|
})();
|
|
9673
9834
|
|
|
9674
|
-
const
|
|
9675
|
-
const { PdfObjects, unicodeHex } =
|
|
9835
|
+
const _m59 = (() => {
|
|
9836
|
+
const { PdfObjects, unicodeHex } = _m60;
|
|
9676
9837
|
|
|
9677
|
-
const { PdfFontResources } =
|
|
9838
|
+
const { PdfFontResources } = _m62;
|
|
9678
9839
|
|
|
9679
|
-
const { PdfTableLayout } =
|
|
9840
|
+
const { PdfTableLayout } = _m69;
|
|
9680
9841
|
|
|
9681
|
-
const { PdfPages } =
|
|
9842
|
+
const { PdfPages } = _m74;
|
|
9682
9843
|
|
|
9683
|
-
const { PdfStructure } =
|
|
9844
|
+
const { PdfStructure } = _m80;
|
|
9684
9845
|
|
|
9685
|
-
const { PdfOutlines } =
|
|
9846
|
+
const { PdfOutlines } = _m82;
|
|
9686
9847
|
|
|
9687
9848
|
/** One resource/catalog owner shared by table convenience exports and composed documents. */
|
|
9688
9849
|
class PdfWriteSession {
|
|
@@ -9737,7 +9898,7 @@ const _exports = Object.freeze({ PdfWriteSession: PdfWriteSession });
|
|
|
9737
9898
|
return _exports;
|
|
9738
9899
|
})();
|
|
9739
9900
|
|
|
9740
|
-
const
|
|
9901
|
+
const _m55 = (() => {
|
|
9741
9902
|
const { BlobByteSink, withDestination } = _m3;
|
|
9742
9903
|
|
|
9743
9904
|
const { beginTask, checkAbort, consumeRows, pause, taskYieldDue } = _m4;
|
|
@@ -9746,9 +9907,9 @@ const { notifyProgress } = _m14;
|
|
|
9746
9907
|
|
|
9747
9908
|
const { createRowProjector } = _m11;
|
|
9748
9909
|
|
|
9749
|
-
const { settings } =
|
|
9910
|
+
const { settings } = _m56;
|
|
9750
9911
|
|
|
9751
|
-
const { PdfWriteSession } =
|
|
9912
|
+
const { PdfWriteSession } = _m59;
|
|
9752
9913
|
|
|
9753
9914
|
async function writePdf(rows, configuration) {
|
|
9754
9915
|
const sink = new BlobByteSink();
|
|
@@ -9805,7 +9966,7 @@ const _exports = Object.freeze({ writePdf: writePdf, writePdfTo: writePdfTo });
|
|
|
9805
9966
|
return _exports;
|
|
9806
9967
|
})();
|
|
9807
9968
|
|
|
9808
|
-
const
|
|
9969
|
+
const _m86 = (() => {
|
|
9809
9970
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
9810
9971
|
|
|
9811
9972
|
const { checkAbort, pause, taskYieldDue, withAbort } = _m4;
|
|
@@ -10072,12 +10233,12 @@ const _exports = Object.freeze({ pngPixels: pngPixels });
|
|
|
10072
10233
|
return _exports;
|
|
10073
10234
|
})();
|
|
10074
10235
|
|
|
10075
|
-
const
|
|
10236
|
+
const _m85 = (() => {
|
|
10076
10237
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
10077
10238
|
|
|
10078
10239
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
10079
10240
|
|
|
10080
|
-
const { pngPixels } =
|
|
10241
|
+
const { pngPixels } = _m86;
|
|
10081
10242
|
|
|
10082
10243
|
/** Shared document image resources; source objects are captured on first consumption. */
|
|
10083
10244
|
class PdfDocumentImages {
|
|
@@ -10205,14 +10366,14 @@ const _exports = Object.freeze({ PdfDocumentImages: PdfDocumentImages });
|
|
|
10205
10366
|
return _exports;
|
|
10206
10367
|
})();
|
|
10207
10368
|
|
|
10208
|
-
const
|
|
10369
|
+
const _m87 = (() => {
|
|
10209
10370
|
const { OfficeIMOError } = _m2;
|
|
10210
10371
|
|
|
10211
10372
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
10212
10373
|
|
|
10213
|
-
const { color, positive } =
|
|
10374
|
+
const { color, positive } = _m56;
|
|
10214
10375
|
|
|
10215
|
-
const { pdfNumber: n } =
|
|
10376
|
+
const { pdfNumber: n } = _m60;
|
|
10216
10377
|
|
|
10217
10378
|
/** Capture and serialize one bounded display path, with no markup parser or resource loading. */
|
|
10218
10379
|
async function vectorCommands(block, settings, used) {
|
|
@@ -10291,14 +10452,14 @@ const _exports = Object.freeze({ vectorCommands: vectorCommands });
|
|
|
10291
10452
|
return _exports;
|
|
10292
10453
|
})();
|
|
10293
10454
|
|
|
10294
|
-
const
|
|
10455
|
+
const _m88 = (() => {
|
|
10295
10456
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
10296
10457
|
|
|
10297
10458
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
10298
10459
|
|
|
10299
|
-
const { color, positive } =
|
|
10460
|
+
const { color, positive } = _m56;
|
|
10300
10461
|
|
|
10301
|
-
const { pdfNumber: n } =
|
|
10462
|
+
const { pdfNumber: n } = _m60;
|
|
10302
10463
|
|
|
10303
10464
|
/** Portable drawings are an exact schema: unsupported data must never be silently discarded. */
|
|
10304
10465
|
function record(value, keys, name) {
|
|
@@ -10537,20 +10698,20 @@ const _exports = Object.freeze({ checkDrawingBlock: checkDrawingBlock, prepareDr
|
|
|
10537
10698
|
return _exports;
|
|
10538
10699
|
})();
|
|
10539
10700
|
|
|
10540
|
-
const
|
|
10701
|
+
const _m89 = (() => {
|
|
10541
10702
|
const { OfficeIMOError } = _m2;
|
|
10542
10703
|
|
|
10543
|
-
const { capturePdfText, wrapPdfText } =
|
|
10704
|
+
const { capturePdfText, wrapPdfText } = _m71;
|
|
10544
10705
|
|
|
10545
|
-
const { positive } =
|
|
10706
|
+
const { positive } = _m56;
|
|
10546
10707
|
|
|
10547
|
-
const { resolveParagraphStyle } =
|
|
10708
|
+
const { resolveParagraphStyle } = _m57;
|
|
10548
10709
|
|
|
10549
|
-
const { captureBookmark } =
|
|
10710
|
+
const { captureBookmark } = _m78;
|
|
10550
10711
|
|
|
10551
10712
|
const { captureFields } = _m10;
|
|
10552
10713
|
|
|
10553
|
-
const { pdfBudgetText } =
|
|
10714
|
+
const { pdfBudgetText } = _m70;
|
|
10554
10715
|
|
|
10555
10716
|
/** @internal Copy public paragraph input before any cooperative layout or source enumeration. */
|
|
10556
10717
|
function captureParagraph(block, settings, fonts, budgetOnPaint = false) {
|
|
@@ -10620,12 +10781,12 @@ const _exports = Object.freeze({ captureParagraph: captureParagraph, captureCapt
|
|
|
10620
10781
|
return _exports;
|
|
10621
10782
|
})();
|
|
10622
10783
|
|
|
10623
|
-
const
|
|
10624
|
-
const { capturePdfText, wrapPdfText } =
|
|
10784
|
+
const _m90 = (() => {
|
|
10785
|
+
const { capturePdfText, wrapPdfText } = _m71;
|
|
10625
10786
|
|
|
10626
|
-
const { captureParagraph, prepareParagraph } =
|
|
10787
|
+
const { captureParagraph, prepareParagraph } = _m89;
|
|
10627
10788
|
|
|
10628
|
-
const { resolveParagraphStyle } =
|
|
10789
|
+
const { resolveParagraphStyle } = _m57;
|
|
10629
10790
|
|
|
10630
10791
|
function captureListOptions(block, settings) {
|
|
10631
10792
|
const { items, ordered = false, start: inputStart, itemStyle, indent, markerGap } = block;
|
|
@@ -10677,14 +10838,14 @@ const _exports = Object.freeze({ captureListOptions: captureListOptions, prepare
|
|
|
10677
10838
|
return _exports;
|
|
10678
10839
|
})();
|
|
10679
10840
|
|
|
10680
|
-
const
|
|
10841
|
+
const _m92 = (() => {
|
|
10681
10842
|
const { assertGroupedReportSource } = _m8;
|
|
10682
10843
|
|
|
10683
10844
|
const { captureFields } = _m10;
|
|
10684
10845
|
|
|
10685
|
-
const { captureWideTable } =
|
|
10846
|
+
const { captureWideTable } = _m56;
|
|
10686
10847
|
|
|
10687
|
-
const { presentation } =
|
|
10848
|
+
const { presentation } = _m58;
|
|
10688
10849
|
|
|
10689
10850
|
/** @internal Capture schemas shared by the block factory and standalone convenience writers. */
|
|
10690
10851
|
const groupedPdfLabelFields = ["labelColumn", "subtotalLabel", "grandTotalLabel", "includeGrandTotal", "continuationLabel", "groupHeadingLevel"];
|
|
@@ -10726,22 +10887,22 @@ const _exports = Object.freeze({ groupedPdfLabelFields: groupedPdfLabelFields, g
|
|
|
10726
10887
|
return _exports;
|
|
10727
10888
|
})();
|
|
10728
10889
|
|
|
10729
|
-
const
|
|
10890
|
+
const _m91 = (() => {
|
|
10730
10891
|
const { assertGroupedReportSource, groupedReportOperation } = _m8;
|
|
10731
10892
|
|
|
10732
10893
|
const { consumeRows } = _m4;
|
|
10733
10894
|
|
|
10734
10895
|
const { ExportCell } = _m5;
|
|
10735
10896
|
|
|
10736
|
-
const { captureGroupedPdfTableOptions } =
|
|
10897
|
+
const { captureGroupedPdfTableOptions } = _m92;
|
|
10737
10898
|
|
|
10738
|
-
const { settings } =
|
|
10899
|
+
const { settings } = _m56;
|
|
10739
10900
|
|
|
10740
|
-
const { PdfTableLayout } =
|
|
10901
|
+
const { PdfTableLayout } = _m69;
|
|
10741
10902
|
|
|
10742
|
-
const { captureCaption, captureParagraph, prepareParagraph } =
|
|
10903
|
+
const { captureCaption, captureParagraph, prepareParagraph } = _m89;
|
|
10743
10904
|
|
|
10744
|
-
const { synchronousText } =
|
|
10905
|
+
const { synchronousText } = _m70;
|
|
10745
10906
|
|
|
10746
10907
|
/** @internal Render one analytical source in the existing document session. Retain one detail row and
|
|
10747
10908
|
* at most four closing subtotals. All captions, rows, pages, bytes and fonts use the document owners. */
|
|
@@ -10983,7 +11144,7 @@ const _exports = Object.freeze({ renderGroupedPdfTable: renderGroupedPdfTable })
|
|
|
10983
11144
|
return _exports;
|
|
10984
11145
|
})();
|
|
10985
11146
|
|
|
10986
|
-
const
|
|
11147
|
+
const _m84 = (() => {
|
|
10987
11148
|
const { BlobByteSink, withDestination } = _m3;
|
|
10988
11149
|
|
|
10989
11150
|
const { OfficeIMOError } = _m2;
|
|
@@ -10996,29 +11157,29 @@ const { copyColumns, createRowProjector } = _m11;
|
|
|
10996
11157
|
|
|
10997
11158
|
const { captureFields } = _m10;
|
|
10998
11159
|
|
|
10999
|
-
const { settings, captureWideTable } =
|
|
11160
|
+
const { settings, captureWideTable } = _m56;
|
|
11000
11161
|
|
|
11001
|
-
const { pdfNumber: n } =
|
|
11162
|
+
const { pdfNumber: n } = _m60;
|
|
11002
11163
|
|
|
11003
|
-
const { PdfTableLayout } =
|
|
11164
|
+
const { PdfTableLayout } = _m69;
|
|
11004
11165
|
|
|
11005
|
-
const { PdfWriteSession } =
|
|
11166
|
+
const { PdfWriteSession } = _m59;
|
|
11006
11167
|
|
|
11007
|
-
const { PdfDocumentImages } =
|
|
11168
|
+
const { PdfDocumentImages } = _m85;
|
|
11008
11169
|
|
|
11009
|
-
const { vectorCommands } =
|
|
11170
|
+
const { vectorCommands } = _m87;
|
|
11010
11171
|
|
|
11011
|
-
const { graphicAlternative } =
|
|
11172
|
+
const { graphicAlternative } = _m80;
|
|
11012
11173
|
|
|
11013
|
-
const { checkDrawingBlock, prepareDrawing } =
|
|
11174
|
+
const { checkDrawingBlock, prepareDrawing } = _m88;
|
|
11014
11175
|
|
|
11015
|
-
const { captureParagraph, captureCaption, prepareParagraph, checkParagraphBuffer, paragraphStartHeight } =
|
|
11176
|
+
const { captureParagraph, captureCaption, prepareParagraph, checkParagraphBuffer, paragraphStartHeight } = _m89;
|
|
11016
11177
|
|
|
11017
|
-
const { captureListOptions, prepareListItem } =
|
|
11178
|
+
const { captureListOptions, prepareListItem } = _m90;
|
|
11018
11179
|
|
|
11019
|
-
const { captureSection } =
|
|
11180
|
+
const { captureSection } = _m78;
|
|
11020
11181
|
|
|
11021
|
-
const { renderGroupedPdfTable } =
|
|
11182
|
+
const { renderGroupedPdfTable } = _m91;
|
|
11022
11183
|
|
|
11023
11184
|
const tableOptionFields = ["columns", "includeHeader", "headerRows", "footer", "headerPresentation", "footerPresentation", "alternateRowColor", "columnWidths", "wideTable", "formatValue", "formatRuns"];
|
|
11024
11185
|
/** Capture typed columns for a single-use table source in a composed document. */
|
|
@@ -11276,18 +11437,18 @@ const _exports = Object.freeze({ pdfTable: pdfTable, writePdfDocument: writePdfD
|
|
|
11276
11437
|
return _exports;
|
|
11277
11438
|
})();
|
|
11278
11439
|
|
|
11279
|
-
const
|
|
11440
|
+
const _m83 = (() => {
|
|
11280
11441
|
const { assertGroupedReportSource } = _m8;
|
|
11281
11442
|
|
|
11282
11443
|
const { BlobByteSink } = _m3;
|
|
11283
11444
|
|
|
11284
|
-
const { writePdfDocumentTo } =
|
|
11445
|
+
const { writePdfDocumentTo } = _m84;
|
|
11285
11446
|
|
|
11286
|
-
const { pdfOptionFields } =
|
|
11447
|
+
const { pdfOptionFields } = _m56;
|
|
11287
11448
|
|
|
11288
11449
|
const { captureFields } = _m10;
|
|
11289
11450
|
|
|
11290
|
-
const { pdfGroupedTable, groupedPdfLabelFields, groupedPdfTableFields } =
|
|
11451
|
+
const { pdfGroupedTable, groupedPdfLabelFields, groupedPdfTableFields } = _m92;
|
|
11291
11452
|
|
|
11292
11453
|
|
|
11293
11454
|
|
|
@@ -11321,14 +11482,14 @@ async function writeGroupedPdfTo(report, destination, configuration) {
|
|
|
11321
11482
|
delete documentOptions.footer;
|
|
11322
11483
|
return writePdfDocumentTo([pdfGroupedTable(report, tableOptions)], destination, documentOptions);
|
|
11323
11484
|
}
|
|
11324
|
-
const _exports = Object.freeze({ pdfGroupedTable:
|
|
11485
|
+
const _exports = Object.freeze({ pdfGroupedTable: _m92.pdfGroupedTable, writeGroupedPdf: writeGroupedPdf, writeGroupedPdfTo: writeGroupedPdfTo });
|
|
11325
11486
|
return _exports;
|
|
11326
11487
|
})();
|
|
11327
11488
|
|
|
11328
|
-
const
|
|
11329
|
-
const { fontProgram } =
|
|
11489
|
+
const _m93 = (() => {
|
|
11490
|
+
const { fontProgram } = _m63;
|
|
11330
11491
|
|
|
11331
|
-
const { resolveScalar, selectFont, validateFonts } =
|
|
11492
|
+
const { resolveScalar, selectFont, validateFonts } = _m67;
|
|
11332
11493
|
|
|
11333
11494
|
/**
|
|
11334
11495
|
* Check one text run against the writer's selected font and scalar-layout rules.
|
|
@@ -11364,13 +11525,13 @@ const _exports = Object.freeze({ preflightPdfText: preflightPdfText });
|
|
|
11364
11525
|
return _exports;
|
|
11365
11526
|
})();
|
|
11366
11527
|
|
|
11367
|
-
const
|
|
11528
|
+
const _m54 = (() => {
|
|
11368
11529
|
|
|
11369
|
-
const _exports = Object.freeze({ writePdf:
|
|
11530
|
+
const _exports = Object.freeze({ writePdf: _m55.writePdf, writePdfTo: _m55.writePdfTo, writeGroupedPdf: _m83.writeGroupedPdf, writeGroupedPdfTo: _m83.writeGroupedPdfTo, pdfGroupedTable: _m83.pdfGroupedTable, createGroupedReport: _m8.createGroupedReport, writePdfDocument: _m84.writePdfDocument, writePdfDocumentTo: _m84.writePdfDocumentTo, pdfTable: _m84.pdfTable, PdfFont: _m63.PdfFont, preflightPdfText: _m93.preflightPdfText, ExportCell: _m5.ExportCell, saveBlob: _m1.saveBlob });
|
|
11370
11531
|
return _exports;
|
|
11371
11532
|
})();
|
|
11372
11533
|
|
|
11373
|
-
const
|
|
11534
|
+
const _m94 = (() => {
|
|
11374
11535
|
/** @internal Runtime-checked calls across the optional third-party API boundary. */
|
|
11375
11536
|
function call(owner, name, ...args) {
|
|
11376
11537
|
const fn = member(owner, name);
|
|
@@ -11402,12 +11563,12 @@ const _exports = Object.freeze({ call: call, member: member, array: array, index
|
|
|
11402
11563
|
return _exports;
|
|
11403
11564
|
})();
|
|
11404
11565
|
|
|
11405
|
-
const
|
|
11566
|
+
const _m95 = (() => {
|
|
11406
11567
|
const { ExportCell, assertExportValue } = _m5;
|
|
11407
11568
|
|
|
11408
11569
|
const { tableSpans } = _m17;
|
|
11409
11570
|
|
|
11410
|
-
const { member } =
|
|
11571
|
+
const { member } = _m94;
|
|
11411
11572
|
|
|
11412
11573
|
/** @internal */
|
|
11413
11574
|
function value(input) {
|
|
@@ -11475,7 +11636,7 @@ const _exports = Object.freeze({ value: value, text: text, headings: headings })
|
|
|
11475
11636
|
return _exports;
|
|
11476
11637
|
})();
|
|
11477
11638
|
|
|
11478
|
-
const
|
|
11639
|
+
const _m96 = (() => {
|
|
11479
11640
|
const { checkAbort, pause, rowsFromBatches, taskYieldDue } = _m4;
|
|
11480
11641
|
|
|
11481
11642
|
const { ExportBudget } = _m9;
|
|
@@ -11484,9 +11645,9 @@ const { captureFields } = _m10;
|
|
|
11484
11645
|
|
|
11485
11646
|
const { columnOptionFields, copyColumns } = _m11;
|
|
11486
11647
|
|
|
11487
|
-
const { array, call, indexes, member } =
|
|
11648
|
+
const { array, call, indexes, member } = _m94;
|
|
11488
11649
|
|
|
11489
|
-
const { headings, text, value } =
|
|
11650
|
+
const { headings, text, value } = _m95;
|
|
11490
11651
|
|
|
11491
11652
|
function safeOptions(options) {
|
|
11492
11653
|
options = captureFields(options, ["rows", "columns", "modifier", "orthogonal", "stripHtml", "stripNewlines", "decodeEntities", "escapeExcelFormula", "trim", "format", "customizeData"]);
|
|
@@ -11692,16 +11853,16 @@ const _exports = Object.freeze({ createDataTablesExport: createDataTablesExport,
|
|
|
11692
11853
|
return _exports;
|
|
11693
11854
|
})();
|
|
11694
11855
|
|
|
11695
|
-
const
|
|
11856
|
+
const _m97 = (() => {
|
|
11696
11857
|
const { captureFields } = _m10;
|
|
11697
11858
|
|
|
11698
11859
|
const { ExportBudget } = _m9;
|
|
11699
11860
|
|
|
11700
11861
|
const { captureCsvOptions: captureCsv } = _m19;
|
|
11701
11862
|
|
|
11702
|
-
const { capturePdfOptions: capturePdf, capturePdfLimits, pdfLimitFields } =
|
|
11863
|
+
const { capturePdfOptions: capturePdf, capturePdfLimits, pdfLimitFields } = _m56;
|
|
11703
11864
|
|
|
11704
|
-
const { captureWorkbookLimits, workbookLimitFields, workbookOptionFields, sheetOptionFields } =
|
|
11865
|
+
const { captureWorkbookLimits, workbookLimitFields, workbookOptionFields, sheetOptionFields } = _m47;
|
|
11705
11866
|
|
|
11706
11867
|
const limitFields = [...new Set([...workbookLimitFields, ...pdfLimitFields])];
|
|
11707
11868
|
const portableWorkbookFields = workbookOptionFields.filter((key) => key !== "sink");
|
|
@@ -11745,19 +11906,19 @@ const { writeCsvTo } = _m15;
|
|
|
11745
11906
|
|
|
11746
11907
|
const { writeXlsxTo } = _m20;
|
|
11747
11908
|
|
|
11748
|
-
const { writePdfTo } =
|
|
11909
|
+
const { writePdfTo } = _m54;
|
|
11749
11910
|
|
|
11750
|
-
const { portableSheet, portableWorkbook } =
|
|
11911
|
+
const { portableSheet, portableWorkbook } = _m51;
|
|
11751
11912
|
|
|
11752
|
-
const { call, member } =
|
|
11913
|
+
const { call, member } = _m94;
|
|
11753
11914
|
|
|
11754
|
-
const { value } =
|
|
11915
|
+
const { value } = _m95;
|
|
11755
11916
|
|
|
11756
|
-
const { captureDataTablesExport } =
|
|
11917
|
+
const { captureDataTablesExport } = _m96;
|
|
11757
11918
|
|
|
11758
11919
|
const { captureFields } = _m10;
|
|
11759
11920
|
|
|
11760
|
-
const { captureCommonLimits, captureXlsxOptions, captureCsvOptions, capturePdfOptions, mergeAdapterLimits } =
|
|
11921
|
+
const { captureCommonLimits, captureXlsxOptions, captureCsvOptions, capturePdfOptions, mergeAdapterLimits } = _m97;
|
|
11761
11922
|
|
|
11762
11923
|
|
|
11763
11924
|
|
|
@@ -11918,7 +12079,7 @@ function registerDataTablesButtons(host, options = {}) {
|
|
|
11918
12079
|
};
|
|
11919
12080
|
}
|
|
11920
12081
|
}
|
|
11921
|
-
const _exports = Object.freeze({ createDataTablesExport:
|
|
12082
|
+
const _exports = Object.freeze({ createDataTablesExport: _m96.createDataTablesExport, ExportCell: _m5.ExportCell, PdfFont: _m63.PdfFont, writeDataTableTo: writeDataTableTo, exportDataTable: exportDataTable, registerDataTablesButtons: registerDataTablesButtons });
|
|
11922
12083
|
return _exports;
|
|
11923
12084
|
})();
|
|
11924
12085
|
const { createDataTablesExport, ExportCell, PdfFont, writeDataTableTo, exportDataTable, registerDataTablesButtons } = _m0;
|