@sheetxl/io-xlsx 0.8.0-beta.10 → 0.8.0-beta.12
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/browser/esm/{BLXcoiDAaOMjFuhw.mjs → 9dwUocbOsJuAcmKn.mjs} +3021 -1986
- package/browser/esm/{xc_LzCPgHn-acgFZ.mjs → BIvDjK4Zl8bWRgl8.mjs} +2 -2
- package/browser/esm/CcH5ITJFTMVWUJO9.mjs +6154 -0
- package/browser/esm/{CI_CZI5m5-KkiAK5.mjs → D8k22TSWPd_RHEpj.mjs} +1798 -1009
- package/browser/esm/{BKT8OBj-bhQwdg49.mjs → DKnOwucZq4z9_-r-.mjs} +47 -10
- package/browser/esm/{2EOdn2WRK5y1L58S.mjs → DO75RoAQTgMuVzXv.mjs} +2 -2
- package/browser/esm/{NQIuOQIleHC4NUW6.mjs → DVLJTjJCGqrJUa8c.mjs} +587 -705
- package/browser/esm/DeMZN_qj__PKo4Wh.mjs +2265 -0
- package/browser/esm/{DXopGe8PrLWmwGaV.mjs → DsppUz-14Z7ti9i3.mjs} +1 -1
- package/browser/esm/{B-jb5SuiVh5NnBG_.mjs → aUBXbTh2r0u3x4Xo.mjs} +2 -2
- package/browser/esm/index.mjs +2 -2
- package/node/esm/BmIIQODk4dBVIXA4.mjs +4455 -0
- package/node/esm/{CHqRP_NjPpPd7m9L.mjs → C-e5AO_4TnGywT-m.mjs} +1 -1
- package/node/esm/C78E45n6j2E8rruH.mjs +5694 -0
- package/node/esm/CDKm5s3JE_d99TJw.mjs +2369 -0
- package/node/esm/{BmdmvgO5Zdgx-RWo.mjs → DCaAOfuW-w_dx_qd.mjs} +2 -2
- package/node/esm/{O5mti2R9drFOlXc7.mjs → DSgxL0sBZtWMydVl.mjs} +2 -2
- package/node/esm/DXusvwW73FUDSyvD.mjs +6367 -0
- package/node/esm/DsyuWxk3bdGhJUQN.mjs +2346 -0
- package/node/esm/index.mjs +64 -27
- package/package.json +3 -3
- package/types/src/AutoFilterRules.d.ts +8 -1
- package/types/src/DataTableFormula.d.ts +36 -0
- package/types/src/DefinedNameAttributes.d.ts +8 -0
- package/types/src/ExcelCompat.d.ts +15 -3
- package/types/src/KnownFonts.d.ts +50 -0
- package/types/src/LegacyFormula.d.ts +13 -0
- package/types/src/PageLayoutAttributes.d.ts +8 -0
- package/types/src/Plugin.d.ts +12 -0
- package/types/src/ProtectionAttributes.d.ts +2 -2
- package/types/src/SheetKinds.d.ts +57 -0
- package/types/src/SheetViewAttributes.d.ts +4 -0
- package/types/src/SortExtent.d.ts +16 -0
- package/types/src/Types.d.ts +11 -0
- package/types/src/XlsxHeader.d.ts +19 -0
- package/types/src/chart/ChartExXml.d.ts +38 -0
- package/types/src/chart/ChartPartXml.d.ts +47 -0
- package/types/src/chart/ChartSpaceXml.d.ts +37 -0
- package/types/src/chart/_XmlTree.d.ts +34 -0
- package/types/src/chart/_chartCodecs.d.ts +12 -0
- package/types/src/chart/_chartExCodecs.d.ts +7 -0
- package/types/src/chart/_chartExFold.d.ts +14 -0
- package/types/src/chart/_chartExMarkup.d.ts +236 -0
- package/types/src/chart/_chartExStyle.d.ts +22 -0
- package/types/src/chart/_codec.d.ts +78 -0
- package/types/src/chart/_drawingml.d.ts +10 -0
- package/types/src/chart/_xml.d.ts +70 -0
- package/types/src/reader/CellControls.d.ts +18 -0
- package/types/src/reader/DocumentPropertiesRead.d.ts +16 -0
- package/types/src/reader/DummyFunctionUnwrap.d.ts +2 -2
- package/types/src/reader/HeaderStyles.d.ts +15 -0
- package/types/src/reader/IsoDateCell.d.ts +20 -0
- package/types/src/reader/LibreOfficeDataTable.d.ts +12 -0
- package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
- package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +3 -3
- package/types/src/reader/domVisitors/CommentVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +3 -1
- package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +23 -8
- package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -1
- package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +27 -0
- package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
- package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
- package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +8 -0
- package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
- package/types/src/reader/domVisitors/index.d.ts +4 -34
- package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
- package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +46 -6
- package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +24 -8
- package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
- package/types/src/richValue/IRichValueHandler.d.ts +109 -0
- package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
- package/types/src/richValue/RichDataParts.d.ts +69 -0
- package/types/src/richValue/RichRecordWriter.d.ts +61 -0
- package/types/src/richValue/RichValueHandlers.d.ts +25 -0
- package/types/src/richValue/RichValueResolver.d.ts +54 -0
- package/types/src/richValue/WebImageRichValueHandler.d.ts +42 -0
- package/types/src/richValue/index.d.ts +7 -0
- package/types/src/utils/DrawingMLText.d.ts +2 -2
- package/types/src/utils/FormControls.d.ts +4 -4
- package/types/src/utils/SharedNames.d.ts +13 -0
- package/types/src/utils/SpreadsheetFont.d.ts +38 -0
- package/types/src/utils/VmlNoteShapes.d.ts +16 -23
- package/types/src/utils/VmlNoteStyle.d.ts +44 -0
- package/types/src/utils/VmlPrefixes.d.ts +24 -0
- package/types/src/writer/builder/PackageBuilder.d.ts +2 -0
- package/types/src/writer/builder/Types.d.ts +7 -0
- package/types/src/writer/emitters/CommentsEmitter.d.ts +3 -3
- package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
- package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +18 -0
- package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +4 -4
- package/types/src/writer/emitters/PropsCoreEmitter.d.ts +7 -2
- package/types/src/writer/emitters/PropsCustomEmitter.d.ts +15 -0
- package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
- package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
- package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
- package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
- package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
- package/types/src/writer/emitters/SharedStringsEmitter.d.ts +6 -3
- package/types/src/writer/emitters/SlicerEmitter.d.ts +8 -5
- package/types/src/writer/emitters/StylesEmitter.d.ts +2 -0
- package/types/src/writer/emitters/WorkbookEmitter.d.ts +5 -0
- package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
- package/types/src/writer/utils/AutoFilter.d.ts +1 -1
- package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
- package/types/src/writer/utils/DefaultRows.d.ts +38 -0
- package/types/src/writer/utils/DxfCollector.d.ts +11 -8
- package/types/src/writer/utils/HiddenFormulaXfs.d.ts +1 -1
- package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
- package/types/src/writer/utils/SheetStyleLayout.d.ts +86 -0
- package/types/src/writer/utils/TextUtils.d.ts +6 -1
- package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
- package/browser/esm/BPmehfSqdvgsLBsB.mjs +0 -5153
- package/node/esm/BpxxiZ2oKPkUSfdB.mjs +0 -2486
- package/node/esm/CtAF486aZqYzMeLM.mjs +0 -3651
- package/node/esm/QS_theNoeqNGLStj.mjs +0 -5298
- package/node/esm/nNQ7MG89sGKwkjMA.mjs +0 -4649
- package/types/src/legacyChart/OOXMLMappings.d.ts +0 -8
- package/types/src/legacyChart/OOXMLUtils.d.ts +0 -78
- package/types/src/legacyChart/ToOOXMLConverter.d.ts +0 -30
- package/types/src/reader/domVisitors/AxisVisitor.d.ts +0 -12
- package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts +0 -7
- package/types/src/reader/domVisitors/ChartVisitor.d.ts +0 -7
- package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts +0 -8
- package/types/src/reader/domVisitors/DataPointVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/LayoutVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/LegendVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/MarkerVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
- package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/SeriesVisitor.d.ts +0 -8
- package/types/src/reader/domVisitors/TitleVisitor.d.ts +0 -9
- package/types/src/writer/emitters/ChartColorsEmitter.d.ts +0 -7
- package/types/src/writer/emitters/ChartEmitter.d.ts +0 -14
- package/types/src/writer/emitters/ChartStyleEmitter.d.ts +0 -46
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
2
|
+
import { WrittenWebImage } from '../../richValue/WebImageRichValueHandler';
|
|
3
|
+
import { Emitter, EmitContext } from '../builder';
|
|
4
|
+
/** What {@link RichValueWebImageEmitter} writes: the pictures, and the workbook to fetch any without bytes through. */
|
|
5
|
+
export interface RichValueWebImages {
|
|
6
|
+
/** The pictures, in `WebImageIdentifier` order. */
|
|
7
|
+
images: readonly WrittenWebImage[];
|
|
8
|
+
workbook: IWorkbook;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Emits `rdRichValueWebImage.xml`: for each picture a `_webimage` value names, its source URL
|
|
12
|
+
* (`address`, an external hyperlink) and the picture itself (`blip`, a media part), as Excel keeps
|
|
13
|
+
* an `IMAGE`'s picture in the file.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* The picture is the value's resource; a value with none is fetched through the workbook, and a
|
|
17
|
+
* source with no picture to give is written with its address alone.
|
|
18
|
+
*/
|
|
19
|
+
export declare class RichValueWebImageEmitter extends Emitter<RichValueWebImages> {
|
|
20
|
+
constructor();
|
|
21
|
+
/** @inheritdoc IEmitter.emit */
|
|
22
|
+
emit(webImages: RichValueWebImages, ctx: EmitContext): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=RichValueWebImageEmitter.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITheme, RichText } from '@sheetxl/sdk';
|
|
2
2
|
import { Emitter, EmitContext } from '../builder';
|
|
3
3
|
export declare class SharedStringsEmitter extends Emitter<ModelHandle> {
|
|
4
4
|
constructor();
|
|
@@ -6,8 +6,11 @@ export declare class SharedStringsEmitter extends Emitter<ModelHandle> {
|
|
|
6
6
|
emit(sharedStrings: ModelHandle, ctx: EmitContext): Promise<void>;
|
|
7
7
|
}
|
|
8
8
|
type ModelHandle = {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
/** The strings, a `RichText` for one with runs. */
|
|
10
|
+
json: (string | RichText)[];
|
|
11
|
+
model: (string | RichText)[];
|
|
12
|
+
/** The workbook theme, for a run's theme color. */
|
|
13
|
+
theme?: ITheme;
|
|
11
14
|
};
|
|
12
15
|
export {};
|
|
13
16
|
//# sourceMappingURL=SharedStringsEmitter.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet, ISlicer, IWorkbook } from '@sheetxl/sdk';
|
|
2
2
|
import { Emitter, EmitContext, IXmlWriter } from '../builder';
|
|
3
3
|
/** The relationship a sheet has to its slicer part. */
|
|
4
4
|
export declare const REL_TYPE_SLICER = "http://schemas.microsoft.com/office/2007/relationships/slicer";
|
|
@@ -6,14 +6,14 @@ export declare const REL_TYPE_SLICER = "http://schemas.microsoft.com/office/2007
|
|
|
6
6
|
export declare const REL_TYPE_SLICER_CACHE = "http://schemas.microsoft.com/office/2007/relationships/slicerCache";
|
|
7
7
|
/** A sheet's slicer part: every table slicer placed on the sheet, in its movable order. */
|
|
8
8
|
export interface SlicersPartHandle {
|
|
9
|
-
sheet:
|
|
9
|
+
sheet: IWorksheet;
|
|
10
10
|
slicers: ISlicer[];
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* The table slicers placed on a sheet, in movable order: those whose source names a live table.
|
|
14
14
|
* A slicer that names none has no column to filter and no cache to write, so it is not written.
|
|
15
15
|
*/
|
|
16
|
-
export declare const collectSheetSlicers: (sheet:
|
|
16
|
+
export declare const collectSheetSlicers: (sheet: IWorksheet) => ISlicer[];
|
|
17
17
|
/**
|
|
18
18
|
* Writes a sheet's slicer part, `xl/slicers/slicerN.xml`: one `slicer` per table slicer placed on
|
|
19
19
|
* the sheet, as Excel writes them, each naming the cache the workbook writes for it.
|
|
@@ -44,7 +44,7 @@ export declare class SlicerCacheEmitter extends Emitter<ISlicer> {
|
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Schedules a cache part for every table slicer of the workbook, in sheet order and then movable
|
|
47
|
-
* order, and returns the relationship ids the workbook cites them by.
|
|
47
|
+
* order, and returns the relationship ids the workbook cites them by and the caches' names.
|
|
48
48
|
*
|
|
49
49
|
* @remarks
|
|
50
50
|
* Called by `WorkbookEmitter` **after** the sheets have been written, since a cache names its table
|
|
@@ -52,7 +52,10 @@ export declare class SlicerCacheEmitter extends Emitter<ISlicer> {
|
|
|
52
52
|
* scheduled is left out, with its slicer element still in the sheet's part; Excel repairs that
|
|
53
53
|
* rather than refuse the file.
|
|
54
54
|
*/
|
|
55
|
-
export declare const writeSlicerCaches: (ctx: EmitContext, workbook: IWorkbook) =>
|
|
55
|
+
export declare const writeSlicerCaches: (ctx: EmitContext, workbook: IWorkbook) => {
|
|
56
|
+
relIds: string[];
|
|
57
|
+
cacheNames: string[];
|
|
58
|
+
};
|
|
56
59
|
/**
|
|
57
60
|
* The sheet's `x15` slicer-list ext: schedules the sheet's slicer part and cites it. Written inside
|
|
58
61
|
* the worksheet's `extLst`, after the conditional formats and data validations, where Excel puts it.
|
|
@@ -8,6 +8,8 @@ export declare class StylesEmitter extends Emitter<ModelHandle> {
|
|
|
8
8
|
/** @inheritdoc IEmitter.emit */
|
|
9
9
|
emit(handle: ModelHandle, ctx: EmitContext): Promise<void>;
|
|
10
10
|
}
|
|
11
|
+
/** The namespace of the feature property bags and the xf complement. */
|
|
12
|
+
export declare const NS_FEATURE_PROPERTY_BAG = "http://schemas.microsoft.com/office/spreadsheetml/2022/featurepropertybag";
|
|
11
13
|
/**
|
|
12
14
|
* Writes ONE differential format.
|
|
13
15
|
*
|
|
@@ -16,6 +16,11 @@ export declare const SHARED_STATE_CALC_FEATURES = "calcFeatures";
|
|
|
16
16
|
* `sheetId`. See {@link resolveSheetPaths}.
|
|
17
17
|
*/
|
|
18
18
|
export declare const SHARED_STATE_SHEET_PARTS = "sheetParts";
|
|
19
|
+
/**
|
|
20
|
+
* Shared-states key under which `XLSXWriter` leaves whether the package being written can hold
|
|
21
|
+
* macros. See {@link writeOpaqueSheet}.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SHARED_STATE_MACRO_ENABLED = "macroEnabled";
|
|
19
24
|
/**
|
|
20
25
|
* Shared-states key under which `XLSXWriter` leaves the source package's external-link part paths,
|
|
21
26
|
* in `[n]` order. See {@link writeExternalReferences}.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
2
2
|
import { Emitter, EmitContext } from '../builder';
|
|
3
|
+
import { XlsxWorksheetJSON } from '../utils/SheetStyleLayout';
|
|
3
4
|
export declare const WorksheetKind = "worksheet";
|
|
4
5
|
/**
|
|
5
6
|
* Emits the worksheet.xml part.
|
|
@@ -10,9 +11,9 @@ export declare class WorksheetEmitter extends Emitter<ModelHandle> {
|
|
|
10
11
|
emit(handle: ModelHandle, ctx: EmitContext): Promise<void>;
|
|
11
12
|
}
|
|
12
13
|
type ModelHandle = {
|
|
13
|
-
model:
|
|
14
|
+
model: IWorksheet;
|
|
14
15
|
isSelected: boolean;
|
|
15
|
-
json:
|
|
16
|
+
json: XlsxWorksheetJSON;
|
|
16
17
|
};
|
|
17
18
|
export {};
|
|
18
19
|
//# sourceMappingURL=WorksheetEmitter.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ICondition, IRange, ITable, ISort, ICellRange, IFilter } from '@sheetxl/sdk';
|
|
2
2
|
import { EmitContext, IXmlWriter } from '../builder';
|
|
3
|
-
export declare const writeSortState: (ctx: EmitContext, xml: IXmlWriter, model: ITable, json: ISort.JSON, range: ICellRange, coords: IRange.Coords) => void;
|
|
3
|
+
export declare const writeSortState: (ctx: EmitContext, xml: IXmlWriter, model: ITable, json: ISort.JSON, range: ICellRange, coords: IRange.Coords, headerRows: number) => void;
|
|
4
4
|
export declare const writeAutoFilter: (ctx: EmitContext, xml: IXmlWriter, model: ITable, json: ITable.JSON, isAutoTable?: boolean) => void;
|
|
5
5
|
/** Writes one `customFilter`, taking its OOXML spelling from the border. */
|
|
6
6
|
export declare const writeCustomFilter: (ctx: EmitContext, xml: IXmlWriter, condition: ICondition.JSON) => void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ICellControl } from '@sheetxl/sdk';
|
|
2
|
+
export declare const CELL_CONTROL_COMPLEMENTS_SHARED_STATE = "cellControlComplements";
|
|
3
|
+
/**
|
|
4
|
+
* The cell controls a workbook's xfs carry.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* The model keeps a cell control apart from the cell's style (`ICellControl`); xlsx keeps it on the
|
|
8
|
+
* cell's xf as an `xfComplement`. So the writer's xf is a pair, a style and a control, and the two
|
|
9
|
+
* meet only there: the style layout mints an xf per pair, and this records which complement each xf
|
|
10
|
+
* carries and which control each complement stands for (what the `featurePropertyBag` part lists).
|
|
11
|
+
*/
|
|
12
|
+
export declare class CellControlComplements {
|
|
13
|
+
private _controls;
|
|
14
|
+
private _xfComplements;
|
|
15
|
+
/**
|
|
16
|
+
* The complement index for `control`, or `null` when xlsx cannot carry it.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Only Excel's checkbox has a file form; another type is dropped (the caller warns).
|
|
20
|
+
*/
|
|
21
|
+
getComplement(control: ICellControl.JSON): number | null;
|
|
22
|
+
/** The controls the complements stand for, by complement index. */
|
|
23
|
+
getControls(): readonly ICellControl.JSON[];
|
|
24
|
+
/** Records the complement each direct xf carries, by xf index, once the layout has minted them. */
|
|
25
|
+
setXfComplements(complements: readonly (number | undefined)[]): void;
|
|
26
|
+
/** The complement direct xf `xf` carries, or `null`. */
|
|
27
|
+
getXfComplement(xf: number): number | null;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=CellControlComplements.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ITypes } from '@sheetxl/sdk';
|
|
2
|
+
import { XlsxHeader, XlsxWorksheetJSON } from './SheetStyleLayout';
|
|
3
|
+
/** How the rows a sheet does not list are written (`sheetFormatPr`). */
|
|
4
|
+
export interface DefaultRows {
|
|
5
|
+
/** `defaultRowHeight`, in points. */
|
|
6
|
+
height: number;
|
|
7
|
+
/** `customHeight`: Excel uses `height` as is; otherwise it uses the Normal height plus the flags' pixels. */
|
|
8
|
+
custom: boolean;
|
|
9
|
+
/** `thickTop`: every row gives a pixel to a thick line above it. */
|
|
10
|
+
thickTop: boolean;
|
|
11
|
+
/** `thickBottom`: every row gives a pixel to a medium or thick line below it. */
|
|
12
|
+
thickBottom: boolean;
|
|
13
|
+
/** The row run written as the default instead of row by row, or `null` when there is none. */
|
|
14
|
+
run: ITypes.RunCoordValue<XlsxHeader> | null;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The row runs to write once `defaultRows.run` is the sheet's default: the other runs, and the rows
|
|
18
|
+
* no run lists, at the height they no longer get by default.
|
|
19
|
+
*/
|
|
20
|
+
export declare const listedRowRuns: (rows: ITypes.RunCoordValue<XlsxHeader>[], defaultRun: ITypes.RunCoordValue<XlsxHeader>, unlistedHeight: number, maxRows: number) => ITypes.RunCoordValue<XlsxHeader>[];
|
|
21
|
+
/**
|
|
22
|
+
* How a sheet's unlisted rows are written: Excel's `sheetFormatPr` is its cache of the row height
|
|
23
|
+
* every row shares, so the height that covers most of the sheet is written once there rather than as
|
|
24
|
+
* a row element per row.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Excel computes an unlisted row's height from the Normal font plus a pixel for each `thickTop`/
|
|
28
|
+
* `thickBottom` (`probe-sheet-thick-derive.ps1`); it moves the flags there only for a style on whole
|
|
29
|
+
* columns, and our export promotes a style on most of a column to one, so the default takes the flags
|
|
30
|
+
* of the run it replaces. A height those explain is written that way, so Excel keeps sizing the rows
|
|
31
|
+
* itself; any other is written as a custom height.
|
|
32
|
+
*
|
|
33
|
+
* @param normalHeight The Normal font's row height, in points.
|
|
34
|
+
* @param maxRows The sheet's row count.
|
|
35
|
+
* @returns `null` when the rows share no height but the Normal one.
|
|
36
|
+
*/
|
|
37
|
+
export declare const resolveDefaultRows: (json: XlsxWorksheetJSON, normalHeight: number, maxRows: number) => DefaultRows | null;
|
|
38
|
+
//# sourceMappingURL=DefaultRows.d.ts.map
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { ICellStyle } from '@sheetxl/sdk';
|
|
2
2
|
/**
|
|
3
|
-
* Accumulates
|
|
4
|
-
*
|
|
3
|
+
* Accumulates the differential styles (dxfs) a worksheet and its parts cite — conditional formats,
|
|
4
|
+
* color filters, color sorts — so the styles part, written after the worksheets, can include them
|
|
5
|
+
* in `<dxfs>`.
|
|
5
6
|
*
|
|
6
|
-
* Index contract:
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Index contract: collected dxfs take `0..count-1`; the table-style dxfs the styles emitter
|
|
8
|
+
* denormalizes are appended after and offset by {@link getCount}. This keeps the `dxfId` written
|
|
9
|
+
* into worksheet and table XML final at the time it is written.
|
|
9
10
|
*
|
|
10
|
-
* Shared via `EmitContext.getSharedStates()` under
|
|
11
|
-
* for the pattern).
|
|
11
|
+
* Shared via `EmitContext.getSharedStates()` under {@link DXFS_SHARED_STATE}; use
|
|
12
|
+
* {@link dxfCollectorOf} (see `MetadataCollector` for the pattern).
|
|
12
13
|
*/
|
|
13
14
|
export declare class DxfCollector {
|
|
14
15
|
private readonly _dxfs;
|
|
@@ -18,5 +19,7 @@ export declare class DxfCollector {
|
|
|
18
19
|
getDxfs(): readonly ICellStyle.JSON[];
|
|
19
20
|
getCount(): number;
|
|
20
21
|
}
|
|
21
|
-
export declare const
|
|
22
|
+
export declare const DXFS_SHARED_STATE = "dxfs";
|
|
23
|
+
/** The write's collector, created on first use. */
|
|
24
|
+
export declare const dxfCollectorOf: (sharedStates: Map<string, any>) => DxfCollector;
|
|
22
25
|
//# sourceMappingURL=DxfCollector.d.ts.map
|
|
@@ -3,7 +3,7 @@ export declare const HIDDEN_FORMULA_XFS_SHARED_STATE = "hiddenFormulaXfs";
|
|
|
3
3
|
/**
|
|
4
4
|
* The `hidden="1"` twins of cell xfs, for sheets whose protection hides formulas.
|
|
5
5
|
*
|
|
6
|
-
* xlsx has no sheet-level form of `
|
|
6
|
+
* xlsx has no sheet-level form of `IWorksheetProtection.showFormulas: false`; Excel only hides a formula
|
|
7
7
|
* whose format says `hidden="1"`. So a sheet that hides formulas writes every format it uses as a
|
|
8
8
|
* hidden variant, unless the format itself grants `showFormulas`. Variants are appended after the
|
|
9
9
|
* direct styles and shared by every sheet that asks for one. `cellXfs[0]` is never changed in place:
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Scalar } from '@sheetxl/sdk';
|
|
1
|
+
import { IWorkbook, Scalar } from '@sheetxl/sdk';
|
|
2
|
+
import { EmitContext } from '../builder';
|
|
3
|
+
import { RichItemText, RichStructureKey, RichStyleDef, RichValueKeyFlags, RichValueSink, RichValueStructureDef } from '../../richValue';
|
|
2
4
|
import { MetadataCollector } from './MetadataCollector';
|
|
3
5
|
/**
|
|
4
6
|
* Accumulates rich-value entries so that RichValueEmitter and
|
|
@@ -20,84 +22,33 @@ import { MetadataCollector } from './MetadataCollector';
|
|
|
20
22
|
* ## XML output relationship
|
|
21
23
|
*
|
|
22
24
|
* ```
|
|
23
|
-
* rdrichvaluestructure.xml – one <s> per
|
|
25
|
+
* rdrichvaluestructure.xml – one <s> per structure written
|
|
24
26
|
* rdrichvalue.xml – one <rv> per registered entry (s= → structure index)
|
|
25
27
|
* metadata.xml futureMetadata XLRICHVALUE – one <bk> per unique rdrichvalue entry
|
|
26
28
|
* metadata.xml valueMetadata – one <bk> per cell (vm= index)
|
|
27
29
|
* ```
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* OOXML primitive-value type codes used in `<k t="…">` attributes inside
|
|
31
|
-
* `<rvStructures>`.
|
|
32
|
-
*
|
|
33
|
-
* "d" - Date/Time (ISO-8601 string)
|
|
34
|
-
* "i" - Integer (32-bit signed)
|
|
35
|
-
* "b" - Boolean
|
|
36
|
-
* "e" - Error value
|
|
37
|
-
* "s" - Inline string
|
|
38
|
-
* "r" - Nested rich value
|
|
39
|
-
* "a" - Array data (rdarray.xml)
|
|
40
|
-
* "spb" - Supporting property bag
|
|
41
|
-
*/
|
|
42
|
-
export type RichPrimitiveType = 'd' | 'i' | 'b' | 'e' | 's' | 'r' | 'a' | 'spb';
|
|
43
|
-
/**
|
|
44
|
-
* One property slot in a rich-value schema.
|
|
45
30
|
*
|
|
46
|
-
*
|
|
47
|
-
* - `type` – OOXML primitive type (`t=` attribute on `<k>`).
|
|
48
|
-
* - `defaultValue` – Serialized fallback used when the property is absent or
|
|
49
|
-
* `undefined` on the raw value object. Defaults to `''`.
|
|
31
|
+
* What each value writes is its {@link IRichValueHandler}'s ({@link RichValueHandlers}).
|
|
50
32
|
*/
|
|
51
|
-
export type RichValueProp = [name: string, type: RichPrimitiveType, defaultValue?: string];
|
|
52
|
-
/**
|
|
53
|
-
* Base class (and usable concrete class) for rich-value handler/schema types.
|
|
54
|
-
*
|
|
55
|
-
* Instantiate directly for pure-schema handlers:
|
|
56
|
-
* ```ts
|
|
57
|
-
* const MyHandler = new RichValueHandler('_myType', [
|
|
58
|
-
* ['foo', 'i', '0'],
|
|
59
|
-
* ['bar', 's', ''],
|
|
60
|
-
* ]);
|
|
61
|
-
* ```
|
|
62
|
-
*
|
|
63
|
-
* Subclass and override {@link getValues} for handlers that need custom
|
|
64
|
-
* serialization logic.
|
|
65
|
-
*
|
|
66
|
-
* Pass instances to {@link RichValueCollector.register}.
|
|
67
|
-
*/
|
|
68
|
-
export declare class RichValueHandler {
|
|
69
|
-
/**
|
|
70
|
-
* The OOXML structure type name (value of the `t=` attribute on `<s>`
|
|
71
|
-
* inside `<rvStructures>`). E.g. `"_error"`.
|
|
72
|
-
*/
|
|
73
|
-
readonly type: string;
|
|
74
|
-
/**
|
|
75
|
-
* Ordered property definitions written as `<k n="…" t="…"/>` inside the
|
|
76
|
-
* matching `<s>` element in `rdrichvaluestructure.xml`.
|
|
77
|
-
*/
|
|
78
|
-
readonly props: ReadonlyArray<RichValueProp>;
|
|
79
|
-
constructor(type: string, props: ReadonlyArray<RichValueProp>);
|
|
80
|
-
/**
|
|
81
|
-
* Extracts the serializable string values for one `<rv>` entry in
|
|
82
|
-
* `rdrichvalue.xml`. The array is parallel to {@link props}.
|
|
83
|
-
*
|
|
84
|
-
* The default implementation reads each property by name from `rawValue`
|
|
85
|
-
* (treated as a `Record<string, unknown>`) and falls back to the prop's
|
|
86
|
-
* `defaultValue` (or `''`) when the property is absent or `undefined`.
|
|
87
|
-
*
|
|
88
|
-
* Override in subclasses for custom serialization logic.
|
|
89
|
-
*
|
|
90
|
-
* @param rawValue The raw value that was passed to
|
|
91
|
-
* {@link RichValueCollector.add} / `_register`.
|
|
92
|
-
*/
|
|
93
|
-
getValues(rawValue: Record<string, unknown>): string[];
|
|
94
|
-
}
|
|
95
33
|
/** One registered rich-value entry. */
|
|
96
34
|
export interface RichValueEntry {
|
|
97
|
-
/** The
|
|
98
|
-
|
|
99
|
-
/** The
|
|
100
|
-
|
|
35
|
+
/** The structure the entry is written as. */
|
|
36
|
+
structure: RichValueStructureDef;
|
|
37
|
+
/** The `<v>`s, parallel to the structure's keys. */
|
|
38
|
+
values: readonly string[];
|
|
39
|
+
/** The `<fb>` cached number, for a formatted number. */
|
|
40
|
+
fb?: string;
|
|
41
|
+
}
|
|
42
|
+
/** One `<a>` of rdarray.xml. */
|
|
43
|
+
export interface RichArrayEntry {
|
|
44
|
+
rows: number;
|
|
45
|
+
columns: number;
|
|
46
|
+
items: readonly RichItemText[];
|
|
47
|
+
}
|
|
48
|
+
/** One `<spb>`: its bag structure's index and its `<v>`s. */
|
|
49
|
+
export interface RichBagEntry {
|
|
50
|
+
s: number;
|
|
51
|
+
values: readonly string[];
|
|
101
52
|
}
|
|
102
53
|
/**
|
|
103
54
|
* Accumulates rich-value entries across all sheets.
|
|
@@ -107,12 +58,29 @@ export interface RichValueEntry {
|
|
|
107
58
|
*
|
|
108
59
|
* Stored in `sharedStates` under the key `"persistRichTypes"`.
|
|
109
60
|
*/
|
|
110
|
-
export declare class RichValueCollector {
|
|
61
|
+
export declare class RichValueCollector implements RichValueSink {
|
|
111
62
|
private readonly _metaCollector;
|
|
63
|
+
private readonly _workbook;
|
|
112
64
|
private readonly _entries;
|
|
113
65
|
private readonly _keyMap;
|
|
66
|
+
/** The writers started, by handler, in the order their structures are first written. */
|
|
67
|
+
private readonly _writers;
|
|
68
|
+
private readonly _structureIndex;
|
|
69
|
+
private readonly _structures;
|
|
70
|
+
private readonly _arrays;
|
|
71
|
+
private readonly _arrayKeys;
|
|
72
|
+
private readonly _bagStructures;
|
|
73
|
+
private readonly _bagStructureKeys;
|
|
74
|
+
private readonly _bags;
|
|
75
|
+
private readonly _bagKeys;
|
|
76
|
+
private readonly _bagArrays;
|
|
77
|
+
private readonly _bagArrayKeys;
|
|
78
|
+
private readonly _richStyles;
|
|
79
|
+
private readonly _richStyleKeys;
|
|
80
|
+
private readonly _keyFlags;
|
|
81
|
+
private readonly _records;
|
|
114
82
|
private _onWarn;
|
|
115
|
-
constructor(metaCollector: MetadataCollector, onWarn?: (message: string, value?: any) => void);
|
|
83
|
+
constructor(metaCollector: MetadataCollector, workbook: IWorkbook, onWarn?: (message: string, value?: any) => void);
|
|
116
84
|
/**
|
|
117
85
|
* Registers a cell value and returns the **1-based `vm=`** attribute value
|
|
118
86
|
* to write on the `<c>` element — exactly like `persistStrings.add(text)`
|
|
@@ -122,37 +90,32 @@ export declare class RichValueCollector {
|
|
|
122
90
|
* attrsCol.vm = '' + persistRichTypes.add(value);
|
|
123
91
|
* ```
|
|
124
92
|
*
|
|
125
|
-
*
|
|
126
|
-
* 1. Deduplicates the raw value → 0-based rdrichvalue.xml index (`rdRvIdx`)
|
|
127
|
-
* 2. Deduplicates the futureMetadata XLRICHVALUE block (`rvFMBkIdx`)
|
|
128
|
-
* 3. Appends a per-cell valueMetadata entry → 1-based `vm=`
|
|
129
|
-
*
|
|
130
|
-
* Dispatches on value type:
|
|
131
|
-
* - `ScalarType.Error` with code > 7 → built-in `_error` handler
|
|
132
|
-
* - Future: `ScalarType.RichData` → IRichType registry
|
|
93
|
+
* A value no handler writes is written as `#UNKNOWN!`.
|
|
133
94
|
*
|
|
134
95
|
* @param value The raw `Scalar` value from the cell iterator.
|
|
96
|
+
* @param formula The cell's formula text, or `null` for a literal: where a picture came from.
|
|
135
97
|
* @returns 1-based `vm=` attribute value.
|
|
136
98
|
*/
|
|
137
|
-
add(value: Scalar): number;
|
|
138
|
-
/**
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
99
|
+
add(value: Scalar, formula?: string | null): number;
|
|
100
|
+
/** {@inheritDoc RichValueSink.addHandled} */
|
|
101
|
+
addHandled(value: Scalar): number | null;
|
|
102
|
+
private _addHandled;
|
|
103
|
+
private _writerFor;
|
|
104
|
+
/** {@inheritDoc RichValueSink.structureFor} */
|
|
105
|
+
structureFor(t: string, keys: readonly RichStructureKey[]): RichValueStructureDef;
|
|
106
|
+
/** {@inheritDoc RichValueSink.addValue} */
|
|
107
|
+
addValue(structure: RichValueStructureDef, values: readonly string[], fb?: string): number;
|
|
108
|
+
/** {@inheritDoc RichValueSink.addArray} */
|
|
109
|
+
addArray(rows: number, columns: number, items: readonly RichItemText[]): number;
|
|
110
|
+
/** {@inheritDoc RichValueSink.addBag} */
|
|
111
|
+
addBag(keys: readonly RichStructureKey[], values: readonly string[]): number;
|
|
112
|
+
/** {@inheritDoc RichValueSink.addBagArray} */
|
|
113
|
+
addBagArray(items: readonly RichItemText[]): number;
|
|
114
|
+
/** {@inheritDoc RichValueSink.addRichStyle} */
|
|
115
|
+
addRichStyle(style: RichStyleDef): number;
|
|
116
|
+
/** {@inheritDoc RichValueSink.addKeyFlags} */
|
|
117
|
+
addKeyFlags(t: string, key: string, flags: readonly (readonly [name: string, value: string])[]): void;
|
|
118
|
+
private _intern;
|
|
156
119
|
/** Number of registered (deduplicated) entries. */
|
|
157
120
|
getCount(): number;
|
|
158
121
|
/** Whether any entries have been registered. */
|
|
@@ -162,39 +125,28 @@ export declare class RichValueCollector {
|
|
|
162
125
|
*/
|
|
163
126
|
getEntries(): readonly RichValueEntry[];
|
|
164
127
|
/**
|
|
165
|
-
*
|
|
128
|
+
* The structures written, in the order they are first encountered.
|
|
166
129
|
* Used by RichValueStructureEmitter to build `<rvStructures>`.
|
|
167
130
|
*/
|
|
168
|
-
|
|
131
|
+
getStructures(): RichValueStructureDef[];
|
|
169
132
|
/**
|
|
170
|
-
*
|
|
171
|
-
* produced by {@link uniqueHandlers}. This is the `s=` attribute value on
|
|
133
|
+
* The 0-based index of `structure` within {@link getStructures}: the `s=` attribute value on
|
|
172
134
|
* `<rv>` in `rdrichvalue.xml`.
|
|
173
135
|
*/
|
|
174
|
-
|
|
136
|
+
getStructureIndex(structure: RichValueStructureDef): number;
|
|
137
|
+
/** The arrays written (rdarray.xml), in index order. */
|
|
138
|
+
getArrays(): readonly RichArrayEntry[];
|
|
139
|
+
/** The supporting property bag structures, bags and bag arrays written. */
|
|
140
|
+
getBags(): {
|
|
141
|
+
structures: readonly (readonly RichStructureKey[])[];
|
|
142
|
+
bags: readonly RichBagEntry[];
|
|
143
|
+
arrays: readonly (readonly RichItemText[])[];
|
|
144
|
+
};
|
|
145
|
+
/** The rich styles written, in index order (a bag names the first as 1). */
|
|
146
|
+
getRichStyles(): readonly RichStyleDef[];
|
|
147
|
+
/** The key flags each written structure declares in `rdRichValueTypes.xml`. */
|
|
148
|
+
getKeyFlags(): [structure: string, flags: readonly RichValueKeyFlags[]][];
|
|
149
|
+
/** Adds the parts the written structures need beyond the rich values. */
|
|
150
|
+
addParts(ctx: EmitContext): void;
|
|
175
151
|
}
|
|
176
|
-
/**
|
|
177
|
-
// #PYTHON! contains a correlationId
|
|
178
|
-
<s t="_error">
|
|
179
|
-
<k n="correlationId" t="s"/>
|
|
180
|
-
<k n="errorMessage" t="s"/>
|
|
181
|
-
<k n="errorName" t="s"/>
|
|
182
|
-
<k n="errorType" t="i"/>
|
|
183
|
-
<k n="subType" t="i"/>
|
|
184
|
-
</s>
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
// #SPILL! contains row column offset
|
|
188
|
-
<s t="_error">
|
|
189
|
-
<k n="colOffset" t="i"/>
|
|
190
|
-
<k n="errorType" t="i"/>
|
|
191
|
-
<k n="rwOffset" t="i"/>
|
|
192
|
-
<k n="subType" t="i"/>
|
|
193
|
-
</s>
|
|
194
|
-
|
|
195
|
-
// unknown has no subtype
|
|
196
|
-
<s t="_error">
|
|
197
|
-
<k n="errorType" t="i"/>
|
|
198
|
-
</s>
|
|
199
|
-
*/
|
|
200
152
|
//# sourceMappingURL=RichValueCollector.d.ts.map
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { IRange, ICellStyle, ITypes, IWorkbook, IWorksheet } from '@sheetxl/sdk';
|
|
2
|
+
import { XlsxHeader } from '../../XlsxHeader';
|
|
3
|
+
import { CellControlComplements } from './CellControlComplements';
|
|
4
|
+
export { type XlsxHeader };
|
|
5
|
+
/**
|
|
6
|
+
* A worksheet as the sheet part writes it: the model's JSON with whole-row and whole-column styles
|
|
7
|
+
* moved onto `rows`/`cols` and borders split so every cell of a range draws the same edges.
|
|
8
|
+
*/
|
|
9
|
+
export interface XlsxWorksheetJSON extends Omit<IWorksheet.JSON, 'rows' | 'cols'> {
|
|
10
|
+
cols?: IRange.JSONReference<XlsxHeader>[];
|
|
11
|
+
rows?: IRange.JSONReference<XlsxHeader>[];
|
|
12
|
+
}
|
|
13
|
+
type StyledCells = [coords: IRange.Coords, styleId: number][];
|
|
14
|
+
/**
|
|
15
|
+
* Looks style JSON up by direct style id, and mints ids for new JSON.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* An id is an xf: a style plus the cell control complement it carries, if any (see
|
|
19
|
+
* `CellControlComplements`). The two stay apart; they meet only in the id.
|
|
20
|
+
*/
|
|
21
|
+
export interface StyleIdScope {
|
|
22
|
+
getElementJSON(id: number): ICellStyle.JSON;
|
|
23
|
+
/** The control complement xf `id` carries, or `undefined`. */
|
|
24
|
+
getElementComplement?(id: number): number | undefined;
|
|
25
|
+
getElementID(json: ICellStyle.JSON, complement?: number): number | null;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Direct style ids keyed by the style's JSON, the same way the SDK's persist scope keys them
|
|
29
|
+
* (`JSONStableStringify`, Normal at 0), so a style keeps one xf however often it is minted. A style
|
|
30
|
+
* under a cell control is a second xf, keyed by the pair.
|
|
31
|
+
*/
|
|
32
|
+
export declare class StyleIds implements StyleIdScope {
|
|
33
|
+
private _byKey;
|
|
34
|
+
readonly list: ICellStyle.JSON[];
|
|
35
|
+
/** The control complement each xf carries, by id; parallel to {@link list}. */
|
|
36
|
+
readonly complements: (number | undefined)[];
|
|
37
|
+
constructor(normal: ICellStyle.JSON | null | undefined);
|
|
38
|
+
getElementJSON(id: number): ICellStyle.JSON;
|
|
39
|
+
getElementComplement(id: number): number | undefined;
|
|
40
|
+
getElementID(json: ICellStyle.JSON | null | undefined, complement?: number): number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Lays out every worksheet's styles the way xlsx stores them, re-minting the workbook's direct styles
|
|
44
|
+
* in the order the sheets cite them.
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Replaces `json.styles.direct`. Cell xf indices are direct style ids, so the list is minted sheet by
|
|
48
|
+
* sheet and range by range, with each split piece in its range's place and each re-derived border
|
|
49
|
+
* after.
|
|
50
|
+
*
|
|
51
|
+
* @returns The sheet part's JSON for each worksheet, keyed by the model's JSON for it.
|
|
52
|
+
*/
|
|
53
|
+
export declare function layoutWorkbookStyles(json: IWorkbook.JSON, sheets: readonly (IWorksheet | null)[], complements?: CellControlComplements, warn?: (message: string, onceKey: string) => void): Map<IWorksheet.JSON, XlsxWorksheetJSON>;
|
|
54
|
+
/**
|
|
55
|
+
* Breaks a bordered range into pieces whose every cell draws the same edges, which is all a cell xf
|
|
56
|
+
* can say.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* A range that reaches the grid's terminal row or column (a `<col style>` reads back as a
|
|
60
|
+
* full-height range) has no closing border at the boundary, so no end sliver is split off there: a
|
|
61
|
+
* style-only piece at the last row or column materializes real `<c>` records, and Excel then treats
|
|
62
|
+
* the whole grid as the used range.
|
|
63
|
+
*/
|
|
64
|
+
export declare function splitStyleBordersIntoSame(coords: IRange.Coords, json: ICellStyle.JSON, entireCoords?: IRange.Coords): IRange.JSONReferenceTuple<ICellStyle.JSON>[];
|
|
65
|
+
export interface StyleRanges {
|
|
66
|
+
cols: ITypes.RunCoordValue<XlsxHeader>[];
|
|
67
|
+
rows: ITypes.RunCoordValue<XlsxHeader>[];
|
|
68
|
+
cells: StyledCells;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Moves styles that cover most of a row or column onto `<row s>` / `<col style>`, leaving the cells
|
|
72
|
+
* only what the headers do not already say.
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* 1. A style whose cells cover more than half of a column (or row) and reach the grid's edge
|
|
76
|
+
* becomes that column's (or row's) style. A style the columns already carry across most of the
|
|
77
|
+
* sheet is not repeated on rows.
|
|
78
|
+
* 2. An overlap sweep then finds what each crossing of cells and headers still has to write.
|
|
79
|
+
*
|
|
80
|
+
* A style's border is relative to the range it is stored with (a row or column style's range is the
|
|
81
|
+
* whole row or column), so ids are not position-independent: wherever a range is written smaller
|
|
82
|
+
* than the entry it came from, its id is re-derived from the style's JSON through `ids`, and two
|
|
83
|
+
* entries sharing an id agree on a crossing only if they draw the same edges there.
|
|
84
|
+
*/
|
|
85
|
+
export declare function promoteStylesToHeaders(styles: StyleRanges, entireCoords: IRange.Coords, ids: StyleIdScope): StyleRanges;
|
|
86
|
+
//# sourceMappingURL=SheetStyleLayout.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IStyleCollection, IText } from '@sheetxl/sdk';
|
|
1
|
+
import { IStyleCollection, IText, ITextFrame } from '@sheetxl/sdk';
|
|
2
2
|
import { EmitContext } from '../builder';
|
|
3
3
|
/**
|
|
4
4
|
* The attributes of an `rPr`/`defRPr`/`endParaRPr` from run properties. Keys the chart style
|
|
@@ -22,6 +22,11 @@ export declare const writeParagraphProperties: (ctx: EmitContext, styles: IStyle
|
|
|
22
22
|
* DrawingML's differs (overflow, a run's size) the default is stated, so the file means the same.
|
|
23
23
|
*/
|
|
24
24
|
export declare const writeTxBody: (ctx: EmitContext, styles: IStyleCollection, jsonText: any) => void;
|
|
25
|
+
/**
|
|
26
|
+
* A text body's `bodyPr` and `lstStyle` without its paragraphs, as a theme's object default states
|
|
27
|
+
* them. Both are written, empty when there is no text.
|
|
28
|
+
*/
|
|
29
|
+
export declare const writeBodyAndListStyle: (ctx: EmitContext, styles: IStyleCollection, text: ITextFrame.JSON | undefined) => void;
|
|
25
30
|
export declare const writeDefaultRProperties: (ctx: EmitContext, styles: IStyleCollection, defRPr: Record<string, any>) => void;
|
|
26
31
|
export declare const writeBodyProperties: (ctx: EmitContext, styles: IStyleCollection, bodyPr: Record<string, any> | undefined) => void;
|
|
27
32
|
//# sourceMappingURL=TextUtils.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet, IRange } from '@sheetxl/sdk';
|
|
2
2
|
/**
|
|
3
3
|
* Which formulas on a sheet call a function Excel does not have.
|
|
4
4
|
*
|
|
@@ -15,5 +15,5 @@ export interface UnsupportedFunctions {
|
|
|
15
15
|
/** Whether formula `index` calls anything in {@link names}. */
|
|
16
16
|
affects(index: number): boolean;
|
|
17
17
|
}
|
|
18
|
-
export declare const collectUnsupportedFunctions: (sheet:
|
|
18
|
+
export declare const collectUnsupportedFunctions: (sheet: IWorksheet, jsonFormulas: IRange.JSONReferenceTuple<string>[] | undefined) => Promise<UnsupportedFunctions>;
|
|
19
19
|
//# sourceMappingURL=UnsupportedFunctions.d.ts.map
|