@evotecit/officeimo 0.1.3 → 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 CHANGED
@@ -147,7 +147,7 @@ CSS classes and computed DOM styles are not copied automatically. CSV retains va
147
147
  | Footers | Structured exports preserve up to 16 physical rows; XLSX native table/filter constraints and CSV flattening apply. `includeFooter: false` omits footers | Same |
148
148
  | Server-side processing | Rejected unless `serverSide: "loaded"` acknowledges loaded rows only | Same |
149
149
 
150
- Qualified pairs are DataTables 2.3.7/Buttons 3.2.6 and DataTables 3.1.3/Buttons 4.1.2, including Select and ColReorder. TypeScript 5.9.3 consumer checks use bundler resolution. The newer pair has duplicate upstream declaration index signatures and requires `skipLibCheck`; OfficeIMO's declarations remain strictly checked. This declaration limit is separate from browser interoperability.
150
+ Qualified pairs are DataTables 2.3.7/Buttons 3.2.6 and DataTables 3.1.3/Buttons 4.1.2, including Select and ColReorder. TypeScript 7.0.2 consumer checks use bundler resolution. The newer pair has duplicate upstream declaration index signatures and requires `skipLibCheck`; OfficeIMO's declarations remain strictly checked. This declaration limit is separate from browser interoperability.
151
151
 
152
152
  `createDataTablesExport(DataTable, table, options)` exposes readonly `columns`, heading rows, optional footer, `rowCount` and a single-use async `rows` source. `headings: "structured"` additionally exposes `headerStructure`/`footerStructure` for the writers' span matrices. Selection/headings are captured immediately; batched body values are read during iteration. Each batch replaces bounded cell indexes through public API result-set operations, without rescanning the table's rows. Batched exports require one table per API instance. Keep table data and column layout stable until export finishes. `batchRows` defaults to 4,096; `maxBatchCells` defaults to 65,536, can lower the effective row count per batch and must fit one row. Cancellation is checked between cells and yielding occurs during formatting and between batches. A synchronous DataTables renderer cannot be interrupted while it runs.
153
153
 
@@ -161,7 +161,7 @@ Direct sink output avoids retaining the finished file. Blob exports and register
161
161
 
162
162
  DataTables and its DOM stay on the page. A host-owned worker can consume portable columns and bounded row batches from the source: request/acknowledge batches and output chunks rather than cloning the full matrix. Reconstruct `ExportCell` in the worker because structured cloning loses its brand. The [verification guide](../Build/BrowserExports/README.md#datatables-integration-and-comparisons) covers workers, cancellation, fallback and reproducible comparisons. Measurements describe the tested workload/browser, without a universal speed claim.
163
163
 
164
- ## CanopyX record exports
164
+ ## CanopyX exports
165
165
 
166
166
  The optional `@evotecit/officeimo/integrations/canopyx` entry consumes CanopyX's immutable `prepareExport` capture. CanopyX owns the accepted query, column order, selection, source paging, revision checks and resolved presentation. OfficeIMO owns file generation. Neither package imports the other at runtime, and importing the main OfficeIMO package does not load the adapter.
167
167
 
@@ -196,25 +196,39 @@ const blob = await exportCanopy(capture, "xlsx", {
196
196
  | Numeric format intent | Fraction digits from 0 through 10 and literal prefixes/suffixes become invariant Excel formats; text such as `Usage %` does not change a raw value of 17 into a percentage |
197
197
  | Canonical neutral tone | No override unless explicitly mapped in `tones`; cell styles override overlapping row-style properties |
198
198
  | Safe resolved links | Native XLSX relationships and PDF annotations; a hidden source URL column is not required |
199
+ | Relative navigation links | Text columns export the captured visible label, including null-valued links, without inventing an absolute URL; raw numeric and datetime columns retain their typed-value policy |
200
+ | History series | Raw captures export the captured latest scalar, or an empty value when none exists; display captures export the rendered cell text. No sparkline or historical-series reconstruction |
201
+ | Unmapped row and cell tones | Preserves status text and typed values without inventing a style; explicit `tones` mappings still apply |
199
202
  | `recordCount` | Checked against enumeration and used for detail progress, independently of dataset `total` and live `matched` |
200
203
  | Captured grouping | Validated contiguous half-open ranges, typed group identities and declared numeric aggregates feed the existing grouped XLSX/PDF writers |
204
+ | Explicit `request.pivot` | Preserves the frozen full-query projection, prefix summaries, descendants, Other and grand totals in captured order; never regroups or recomputes values |
201
205
  | No grouping snapshot | Flat records, even if the accepted query contains `groupBy` |
202
206
  | `about: true` | XLSX adds an `About` worksheet with captured revision, scope, UTC time, counts, selected IDs and the actual accepted export query |
203
207
 
204
208
  The width profile provides reproducible conversion; it does not promise pixel-identical rendering in native Excel. `columnOptions[id].width` overrides the XLSX character width, and `pdf.columnWidths` overrides PDF point widths. Right and nonleading pins retain their column order and require an explicit text fallback diagnostic. `columnOptions` applies only to selected IDs; native `columnOptions[id].format` remains the explicit Excel-format override.
205
209
 
210
+ For a pivot table, pass the frozen `prepareExport({ pivot: true, scope: "filtered", values: "raw" })` capture through the same entry point. Numeric cells retain their already-computed `mode` and native `numberFormat`: a fractional share stays numeric and receives a percent format without multiplying or parsing its text. Empty intersections need neither field; an explicit empty column format selects `General`. Row and column identities are opaque. `recordCount` counts physical projected rows, including summaries; `matched` still describes the underlying accepted records.
211
+
212
+ XLSX places pivot summaries above their descendants and to their left, preserving captured outline levels, hidden descendants and collapsed summaries. It does not add `SUBTOTAL` formulas, a table or an autofilter over the pre-aggregated projection. Captured pivot outlines and totals reject conflicting worksheet overrides. Pivot exports also reject XLSX `cellValueWriters` and PDF `footer.totals`, preserving frozen values and aggregates. PDF and CSV include the complete projection, including initially hidden descendants; `PIVOT_OUTLINES_XLSX_ONLY` reports that the interactive outline controls belong to Excel. PDF retains resolved display text, headings and normal fit/band policies. A malformed explicit pivot rejects instead of silently becoming an ordinary flat export.
213
+
214
+ The worksheet engine also exposes `outlineSummaryBelow` and `outlineSummaryRight` (both default to `true`) and `columnOutlines: [{ firstColumn, columnCount, level?, hidden?, collapsed? }]`. Column ranges use zero-based positions, must be disjoint and remain within the declared columns; outline levels are zero through seven. These settings work through both `Workbook` and the portable XLSX writers. Row outlines continue to use the synchronous `rowOutline` callback with an explicit `maxOutlineLevel`.
215
+
206
216
  XLSX maps the declared rule subset to editable data bars, two/three-stop color scales and row/cell highlights. The first matching tone wins within each row or cell target, and a cell tone overrides a row tone. Native cell visuals take precedence over row tints; their own declaration order is retained. Predicates support `and`/`or`, numeric `eq`/`ne`/`gt`/`ge`/`lt`/`le`, and null tests, within four levels and 64 nodes. Numeric operands use numbers, booleans or plain invariant numeric strings. Each comparison excludes null cells. Equality and inequality with boolean or numeric operands on text columns retain the raw value's type; string comparisons on text columns and separator/culture profiles are unsupported.
207
217
 
208
218
  Datetime rule filters require `datetime: "typed"` and the UTC XLSX clock. Operands use explicit-zone ISO timestamps at exact millisecond precision, or integer epoch milliseconds; the existing date writer converts them to native serials. Local, preserved-text and sub-millisecond predicate profiles report an unsupported diagnostic. Native numeric rules require numeric or null cells; datetime rules require ISO cells that the typed writer converts to native dates, or null. Numeric strings in numeric cells and numeric epoch values in datetime cells are unsupported native rule profiles and reject during enumeration, including text fallback. The flat source retains its raw values. Ordinary datetime output keeps its separate preservation policy below.
209
219
 
210
220
  `stopIfTrue` masks later highlight predicates across the whole row in the original declaration order. A captured rule sequence combining this behavior with native bars or scales is unsupported. Cell-tone and data-bar rules targeting the same column are also unsupported because the cell tone's fill depends on whether the bar resolves. Explicit text fallback omits either unsupported captured sequence and reports the loss. Native rule ranges cover only details, including with omitted or multilevel headers and in grouped reports. CSS variables and resolved `cell.format` properties are not parsed. The portable default rule palette is info `4472C4`, success `70AD47`, warning `FFC000` and danger `C00000`, with matching pale fills; explicit tone mappings override it.
211
221
 
212
- PDF defaults captured fitted tables to a landscape fit profile. `pdf.wideTable` can select the existing horizontal bands and repeated identifier columns instead. Group headings, repeated column headings and continuation context use the existing grouped layout. Supply embedding-permitted TrueType fonts through `pdf.fonts` for Unicode, and a declared language through `pdf.tagged` for tagged reports. XLSX's native rule declarations do not render PDF bars or scales: PDF reports that loss and requires `unsupportedPresentation: "text"` to accept it. This option does not remove typed values, resolved text or valid links.
222
+ PDF defaults to landscape without shrinking the font. Flat and pivot captures measure the selected PDF font against a bounded lookahead of up to 128 rows or 262,144 displayed UTF-16 code units, then replay that single source. Column minimums protect the longest sampled header/content word; numeric and date columns reserve their natural value width. Remaining width first satisfies full header/content preferences, then goes to text columns. If the minimums exceed the printable width, horizontal bands retain readable widths. A word wider than a page can still break at scalar boundaries; later rows use the writer's ordinary lossless wrapping. Explicit `pdf.columnWidths`, horizontal-band settings and shaping providers retain their own layout policy.
213
223
 
214
- Ordinary text-only grid/tree captures are accepted as flat output. Tree indentation does not create analytical groups. Genuine unsupported presentation diagnostics, unknown non-neutral tones and unsupported declarations reject by default in XLSX/PDF. Explicit `unsupportedPresentation: "text"` accepts their text fallback and reports each diagnostic through synchronous `onDiagnostic`. CSV defaults to text. No unbounded diagnostic list or whole-table body is retained.
224
+ Canopy PDF cells wrap independently of the grid's screen `wrap` setting. A seven-column grid with screen `wrap: false` still exports its full text, dates and numbers. An explicit `columnOptions[id].wrapText: false` retains strict nonwrapping behavior and rejects content that cannot fit; use suitable `pdf.columnWidths` or horizontal bands for that contract. Pivot summary and total rows are bold, and numeric columns default to right alignment. Raw numeric captures apply simple declared decimal/percentage/grouping formats to PDF text, retaining the sampled column's decimal separator and captured affixes. Complex native formats retain their resolved text. Missing values remain blank and computed zero values remain zero; neither is invented from the other. XLSX retains the captured screen wrapping unless overridden. Group headings, repeated column headings and continuation context use the existing grouped layout. Supply embedding-permitted TrueType fonts through `pdf.fonts` for Unicode, and a declared language through `pdf.tagged` for tagged reports. XLSX's native rule declarations do not render PDF bars or scales: PDF reports that loss and requires `unsupportedPresentation: "text"` to accept it. This option does not remove typed values, resolved text or valid links.
225
+
226
+ Ordinary text-only grid/tree captures are accepted as flat output. Tree indentation does not create analytical groups. Relative links, history-series presentation and unmapped row/cell tones use the scalar/text projections above and report their presentation loss through synchronous `onDiagnostic` when supplied. Genuine unsupported presentation diagnostics and unsupported declarations still reject by default in XLSX/PDF. Explicit `unsupportedPresentation: "text"` accepts their text fallback and reports each diagnostic through the same callback. CSV defaults to text. Unsafe hyperlinks remain rejected. No unbounded diagnostic list or whole-table body is retained.
215
227
 
216
228
  Grouping requires a raw capture with an exact count and complete scope-specific ranges and aggregate values. Up to four levels and 1,000 groups are supported. One aggregate operation per numeric column maps `sum`, `count`, `average`, `minimum` and `maximum` to the canonical report owner; numeric `count` ignores nulls. Captured sums and averages are checked using Canopy's compensated accumulation and empty-input convention. Native formulas calculate their own caches, which can differ by floating-point rounding; an empty native sum is zero. Range and declared-total mismatches still reject the export. Grouped sheets own their summary rows and cannot also use a native table, arbitrary heading matrix or footer. Existing grouped label callbacks remain caller-owned; omitted labels use the English defaults `Group`, `<label> total` and `Grand total`. `xlsx.sheet.includeHeader: false` omits the data header and its default freeze; explicit settings remain subject to the worksheet contract.
217
229
 
230
+ Captured group identity is checked against the original raw scalar before relative-link detail labels are written. Distinct raw identities with the same visible label remain separate groups.
231
+
218
232
  `about` metadata uses the technical capture field names with `Field` and `Value` headings. `About` is reserved when this worksheet is requested, and the data sheet must have another name. Metadata is limited to 65,536 UTF-16 units in total. Known cell text is validated before detail enumeration; `xlsx.oversizedText: "preserve"` retains the workbook's bounded overflow policy for longer values. Metadata and generated summary rows consume output resource limits, but progress and result `rows` count source details only. Selected/all query metadata describes the accepted export query; the adapter does not reconstruct the original live filter from `matched`.
219
233
 
220
234
  `datetime: "typed"` requires exact millisecond precision; `"text"` retains the original ISO value. The default `"preserve"` keeps finer timestamps and dates outside Excel's 1900–9999 range as text rather than rounding or dropping them. Typed Excel dates require an explicit time zone and default to the capture's UTC/local clock; `xlsx.dateMode` overrides it.