@evotecit/officeimo 0.1.19 → 0.1.21
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 +6 -3
- package/bundles/officeimo-canopyx-adapter.js +121 -59
- package/bundles/officeimo-canopyx-adapter.min.js +1 -1
- package/bundles/officeimo-canopyx-adapter.min.mjs +1 -1
- package/bundles/officeimo-canopyx-adapter.mjs +108 -47
- package/bundles/officeimo-canopyx.js +177 -100
- package/bundles/officeimo-canopyx.min.js +1 -1
- package/bundles/officeimo-canopyx.min.mjs +1 -1
- package/bundles/officeimo-canopyx.mjs +144 -68
- package/bundles/officeimo-datatables-adapter.js +7 -7
- package/bundles/officeimo-datatables-adapter.min.js +1 -1
- package/bundles/officeimo-datatables-adapter.min.mjs +1 -1
- package/bundles/officeimo-datatables-adapter.mjs +3 -3
- package/bundles/officeimo-datatables.js +63 -48
- package/bundles/officeimo-datatables.min.js +1 -1
- package/bundles/officeimo-datatables.min.mjs +1 -1
- package/bundles/officeimo-datatables.mjs +39 -24
- package/bundles/officeimo-xlsx.js +59 -44
- package/bundles/officeimo-xlsx.min.js +1 -1
- package/bundles/officeimo-xlsx.min.mjs +1 -1
- package/bundles/officeimo-xlsx.mjs +39 -24
- package/bundles/officeimo.js +61 -46
- package/bundles/officeimo.min.js +1 -1
- package/bundles/officeimo.min.mjs +1 -1
- package/bundles/officeimo.mjs +40 -25
- package/dist/integrations/canopyx/index.js +4 -2
- package/dist/integrations/canopyx/pdf-number.js +9 -6
- package/dist/integrations/canopyx/rule-predicates.d.ts +1 -1
- package/dist/integrations/canopyx/rule-predicates.js +2 -1
- package/dist/integrations/canopyx/rules.d.ts +1 -1
- package/dist/integrations/canopyx/rules.js +11 -13
- package/dist/integrations/canopyx/source.js +44 -7
- package/dist/integrations/canopyx/tones.d.ts +10 -0
- package/dist/integrations/canopyx/tones.js +12 -0
- package/dist/integrations/canopyx/types.d.ts +8 -1
- package/dist/xlsx/options.js +1 -1
- package/dist/xlsx/portable.js +1 -1
- package/dist/xlsx/styles.js +28 -18
- package/dist/xlsx/types.d.ts +5 -1
- package/dist/xlsx/workbook.js +3 -1
- package/dist/xlsx/worksheet.js +5 -2
- package/package.json +1 -1
package/dist/xlsx/types.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { Compression } from "../zip/index.js";
|
|
|
6
6
|
import type { PackagePart, Relationship } from "../opc/index.js";
|
|
7
7
|
import type { CoreProperties, AppProperties } from "../opc/index.js";
|
|
8
8
|
import type { Cell } from "./values.js";
|
|
9
|
-
import type { CellStyle } from "./styles.js";
|
|
9
|
+
import type { Border, CellStyle } from "./styles.js";
|
|
10
10
|
import type { Hyperlink } from "./attachments.js";
|
|
11
11
|
import type { ExportValue } from "../core/presentation.js";
|
|
12
12
|
import type { ConditionalFormat } from "./conditional-types.js";
|
|
@@ -118,6 +118,10 @@ export interface SheetOptions<T = never> {
|
|
|
118
118
|
readonly autoFilter?: boolean;
|
|
119
119
|
readonly boldHeader?: boolean;
|
|
120
120
|
readonly headerFill?: string;
|
|
121
|
+
/** Header-row border edges, for example a thin bottom rule under the headings. Ignored when headerStyle is set. */
|
|
122
|
+
readonly headerBorder?: Border;
|
|
123
|
+
/** Wrap every header cell; omitted, a header wraps only when its column does. Ignored when headerStyle is set. */
|
|
124
|
+
readonly headerWrap?: boolean;
|
|
121
125
|
readonly headerStyle?: number;
|
|
122
126
|
/** Presentation patches retain column number/date formats. The second data row gets this patch first. */
|
|
123
127
|
readonly alternatingRowStyle?: CellStyle;
|
package/dist/xlsx/workbook.js
CHANGED
|
@@ -5,7 +5,7 @@ import { ChunkedTextSink } from "../core/sinks.js";
|
|
|
5
5
|
import { ExportBudget } from "../core/limits.js";
|
|
6
6
|
import { OpcPackage, officeRelationshipsNamespace, relationshipTypes, corePropertiesXml } from "../opc/index.js";
|
|
7
7
|
import { escapeOoxmlAttribute, cleanXml, xmlDeclaration } from "../xml/index.js";
|
|
8
|
-
import { StyleRegistry, spreadsheetNamespace } from "./styles.js";
|
|
8
|
+
import { StyleRegistry, spreadsheetNamespace, normalizeBorder } from "./styles.js";
|
|
9
9
|
import { sheetName, assertXlsxValue, copyValue } from "./values.js";
|
|
10
10
|
import { copyColumns } from "../internal/rows.js";
|
|
11
11
|
import { captureFields } from "../internal/capture.js";
|
|
@@ -31,6 +31,8 @@ function captureSheet(options, policy) {
|
|
|
31
31
|
return { ...captured, columns,
|
|
32
32
|
...(captured.columnOutlines === undefined ? {} : { columnOutlines: captureColumnOutlines(captured.columnOutlines, columns.length) }),
|
|
33
33
|
...(captured.headerRows === undefined ? {} : { headerRows: captureTableSpans(captured.headerRows, columns.length) }),
|
|
34
|
+
// Preflight and every header style read this one snapshot of the edges.
|
|
35
|
+
...(captured.headerBorder === undefined ? {} : { headerBorder: normalizeBorder(captured.headerBorder) }),
|
|
34
36
|
...(footer ? { footer: { ...footer,
|
|
35
37
|
...(footer.rows === undefined ? {} : { rows: captureTableSpans(footer.rows, columns.length) }),
|
|
36
38
|
...(footer.values === undefined ? {} : { values: footer.values.map(copyValue) }) } } : {}),
|
package/dist/xlsx/worksheet.js
CHANGED
|
@@ -87,8 +87,9 @@ export class Worksheet {
|
|
|
87
87
|
book.checkLinks(this.links.length);
|
|
88
88
|
this.declared = this.columns.map((column, i) => ({ column, letter: columnName(i + 1),
|
|
89
89
|
style: book.styles.forColumn(column), dateStyle: book.styles.forColumn(column, false, undefined, true),
|
|
90
|
-
headerStyle: this.headerRows ? options.headerStyle ?? book.styles.forColumn({ header: column.header,
|
|
91
|
-
...(column.
|
|
90
|
+
headerStyle: this.headerRows ? options.headerStyle ?? book.styles.forColumn({ header: column.header,
|
|
91
|
+
...((options.headerWrap ?? column.wrapText) === undefined ? {} : { wrapText: options.headerWrap ?? column.wrapText }),
|
|
92
|
+
...(column.alignment === undefined ? {} : { alignment: column.alignment }) }, options.boldHeader !== false, options.headerFill, false, options.headerBorder) : 0
|
|
92
93
|
}));
|
|
93
94
|
// Register conditional styles only after worksheet construction can no longer reject its options.
|
|
94
95
|
this.conditional = new ConditionalFormats(conditional, book.styles);
|
|
@@ -140,6 +141,8 @@ export class Worksheet {
|
|
|
140
141
|
throw new TypeError("A frozen header or autofilter requires a header row.");
|
|
141
142
|
if (options.headerFill !== undefined)
|
|
142
143
|
colorArgb(options.headerFill);
|
|
144
|
+
if (options.headerWrap !== undefined && typeof options.headerWrap !== "boolean")
|
|
145
|
+
throw new TypeError("headerWrap must be boolean.");
|
|
143
146
|
if (options.headerStyle !== undefined)
|
|
144
147
|
book.styles.validateStyle(options.headerStyle);
|
|
145
148
|
if (options.alternatingRowStyle !== undefined)
|