@sheetxl/io-xlsx 0.8.0-beta.7 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +8 -7
- package/browser/esm/7rZlWcm56hn3Jmnk.mjs +7021 -0
- package/browser/esm/AZus_5slvoIVhf1u.mjs +10323 -0
- package/browser/esm/B9QfzGvsvg-V3utu.mjs +4632 -0
- package/browser/esm/{CX3yVwe-BnhCk4FY.mjs → BIR_Si489gIkGOnc.mjs} +194 -144
- package/browser/esm/BJFvc-i40R4rPZ5y.mjs +2433 -0
- package/browser/esm/{CGXxwkCRWLc0gcRQ.mjs → BX8Ebx4NC5zp7_3J.mjs} +3 -3
- package/browser/esm/{B4eKxNwxJjHLN126.mjs → Bnxw38IvtA04zXEE.mjs} +2 -2
- package/browser/esm/{DwcLXqv8-6Tl1zLO.mjs → CfVhYH77KdrR3fEK.mjs} +3 -3
- package/browser/esm/index.mjs +3 -4
- package/browser/esm/jIQks3Crw6jehdDU.mjs +2474 -0
- package/browser/esm/{DUi-V-E_AJwTIqlO.mjs → qc9hnuR2z-whY8YO.mjs} +3 -3
- package/browser/esm/wZGpmkMUubNjClhG.mjs +104 -0
- package/licenses/dependencies.txt +2 -2
- package/node/esm/{C51yFT2l-6il_xXO.mjs → BNLHWJHyy5eB0P_4.mjs} +2 -2
- package/node/esm/CVtsY2F9A9NzEGLk.mjs +2478 -0
- package/node/esm/CoeQ0LO-nNXiowwv.mjs +7284 -0
- package/node/esm/CxY3iIYLXVhCebeV.mjs +4746 -0
- package/node/esm/D2CZy9TQM9h2uqBh.mjs +2562 -0
- package/node/esm/{CMq7eF1vxibUumqT.mjs → Dm0hvKcR4xb0TV_N.mjs} +3 -3
- package/node/esm/_IA1gQ-zFQYQSZSs.mjs +6957 -0
- package/node/esm/index.mjs +65 -28
- package/node/esm/{DLBm8l0jyL2fVlxg.mjs → zZFe3mW0xjmobowq.mjs} +3 -3
- package/package.json +9 -10
- package/types/src/AutoFilterRules.d.ts +85 -22
- package/types/src/ConditionalFormatRules.d.ts +2 -2
- package/types/src/DataTableFormula.d.ts +26 -0
- package/types/src/DataValidationRules.d.ts +0 -5
- package/types/src/DefinedNameAttributes.d.ts +8 -0
- package/types/src/ExcelCalcStamp.d.ts +0 -36
- package/types/src/ExcelCompat.d.ts +15 -143
- package/types/src/ExcelFunctionFacts.d.ts +0 -272
- package/types/src/ExcelReservedNames.d.ts +0 -65
- package/types/src/KnownFonts.d.ts +37 -0
- package/types/src/LegacyFormula.d.ts +1 -46
- package/types/src/OOXMLExtensions.d.ts +30 -2
- package/types/src/PageLayoutAttributes.d.ts +8 -0
- package/types/src/Plugin.d.ts +15 -3
- package/types/src/ProtectionAttributes.d.ts +2 -2
- package/types/src/SheetKinds.d.ts +42 -0
- package/types/src/SheetViewAttributes.d.ts +4 -0
- package/types/src/SortExtent.d.ts +16 -0
- package/types/src/SourcePackage.d.ts +0 -44
- package/types/src/SparklineGroups.d.ts +52 -0
- package/types/src/Types.d.ts +13 -3
- 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 +13 -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/pivot/PivotArea.d.ts +20 -0
- package/types/src/pivot/PivotCacheRead.d.ts +30 -0
- package/types/src/pivot/PivotCacheWrite.d.ts +23 -0
- package/types/src/pivot/PivotFilters.d.ts +29 -0
- package/types/src/pivot/PivotFormats.d.ts +60 -0
- package/types/src/pivot/PivotTableRead.d.ts +44 -0
- package/types/src/pivot/PivotTableWrite.d.ts +13 -0
- package/types/src/pivot/_PivotCacheXml.d.ts +48 -0
- package/types/src/pivot/_PivotTableXml.d.ts +23 -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 +43 -23
- 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/PivotButtons.d.ts +14 -0
- package/types/src/reader/PivotCellFormats.d.ts +22 -0
- package/types/src/reader/SlicerJoin.d.ts +26 -0
- package/types/src/reader/ZipReader.d.ts +1 -1
- package/types/src/reader/_SlicerRecord.d.ts +59 -0
- package/types/src/reader/dom/CustGeomUtils.d.ts +7 -0
- package/types/src/reader/dom/DOMTransformer.d.ts +2 -2
- package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
- package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +8 -3
- package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts +15 -2
- package/types/src/reader/domVisitors/CommentVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/DrawingCxnSpVisitor.d.ts +1 -0
- package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +30 -1
- package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +9 -0
- package/types/src/reader/domVisitors/DrawingGrpSpVisitor.d.ts +14 -2
- package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +30 -2
- package/types/src/reader/domVisitors/DrawingSpVisitor.d.ts +20 -1
- package/types/src/reader/domVisitors/DrawingVisitor.d.ts +10 -0
- package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -11
- package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +18 -0
- package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +0 -11
- package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
- package/types/src/reader/domVisitors/FormControlPrVisitor.d.ts +9 -0
- package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
- package/types/src/reader/domVisitors/ShapeTextVisitor.d.ts +44 -0
- package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +26 -5
- package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +11 -2
- package/types/src/reader/domVisitors/SlicersVisitor.d.ts +9 -3
- package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/TextPropertiesVisitor.d.ts +13 -1
- package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/TimelinesVisitor.d.ts +13 -0
- package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +0 -9
- package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
- package/types/src/reader/domVisitors/index.d.ts +10 -36
- package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
- package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +31 -6
- package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +26 -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 +37 -0
- package/types/src/richValue/index.d.ts +7 -0
- package/types/src/utils/DrawingMLText.d.ts +39 -0
- package/types/src/utils/FormControls.d.ts +170 -0
- 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 +25 -32
- package/types/src/utils/VmlNoteStyle.d.ts +25 -0
- package/types/src/utils/VmlPrefixes.d.ts +24 -0
- package/types/src/vba/VBAProject.d.ts +0 -19
- package/types/src/writer/EvaluationSheet.d.ts +5 -0
- package/types/src/writer/builder/Emitter.d.ts +5 -0
- package/types/src/writer/builder/OpcXmlUtils.d.ts +0 -8
- package/types/src/writer/builder/PackageBuilder.d.ts +4 -41
- package/types/src/writer/builder/Types.d.ts +28 -28
- 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/ExternalLinkEmitter.d.ts +0 -11
- package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +8 -0
- package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +4 -4
- package/types/src/writer/emitters/PivotTableEmitter.d.ts +30 -1
- 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 +132 -0
- package/types/src/writer/emitters/StylesEmitter.d.ts +35 -2
- package/types/src/writer/emitters/TableEmitter.d.ts +14 -0
- package/types/src/writer/emitters/WorkbookEmitter.d.ts +24 -2
- package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
- package/types/src/writer/utils/AutoFilter.d.ts +3 -3
- package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
- package/types/src/writer/utils/CustGeomUtils.d.ts +5 -0
- package/types/src/writer/utils/DateSystem.d.ts +6 -0
- package/types/src/writer/utils/DefaultRows.d.ts +22 -0
- package/types/src/writer/utils/DrawMLUtils.d.ts +42 -3
- package/types/src/writer/utils/DummyFunction.d.ts +0 -25
- package/types/src/writer/utils/DxfCollector.d.ts +14 -11
- package/types/src/writer/utils/PrstGeomUtils.d.ts +14 -0
- 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 +26 -2
- package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
- package/types/src/writer/utils/XfVariants.d.ts +61 -0
- package/browser/cjs/17tMBnuyu4YIxixh.cjs +0 -1
- package/browser/cjs/B6sirGz6w-Bm7Ofo.cjs +0 -1
- package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
- package/browser/cjs/BxU-OlZIQViQl7gX.cjs +0 -1
- package/browser/cjs/CDs8etXnw0kbBKKv.cjs +0 -1
- package/browser/cjs/CIpMN7SDVREKQUQE.cjs +0 -6
- package/browser/cjs/CycnxkfuKrDdwoJN.cjs +0 -5
- package/browser/cjs/D3EWCPfCu-qMOIGd.cjs +0 -1
- package/browser/cjs/DHKWtqZ0vQfXrbq1.cjs +0 -2
- package/browser/cjs/MqKQ_B5qRARrRbO4.cjs +0 -24
- package/browser/cjs/index.cjs +0 -1
- package/browser/cjs/xQ6-wbTw5UzZUM1Y.cjs +0 -1
- package/browser/esm/9n64lXAgZUe3aThr.mjs +0 -159
- package/browser/esm/BsNoW41d6hdpxTTS.mjs +0 -67
- package/browser/esm/BvAptAMpZVyBCx6-.mjs +0 -2402
- package/browser/esm/CjKioy-GzeSf08f8.mjs +0 -3326
- package/browser/esm/cJxidonaVNZHAXiZ.mjs +0 -4532
- package/browser/esm/dsVZVtt5w_yLb967.mjs +0 -5300
- package/node/esm/BRQYaMYO4UfhjJHw.mjs +0 -170
- package/node/esm/BlbtH3EvAf3K4foF.mjs +0 -2450
- package/node/esm/DhSPOg9wN0kD87Tb.mjs +0 -3051
- package/node/esm/KeV-N47eTyh5YE70.mjs +0 -4642
- package/node/esm/s_yVG0m9KB14YKeN.mjs +0 -3412
- 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/HyperlinkVisitor.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
- package/types/src/writer/utils/HiddenFormulaXfs.d.ts +0 -28
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IRange } from '@sheetxl/sdk';
|
|
2
|
+
import { DataTableDefinition } from '../DataTableFormula';
|
|
3
|
+
/**
|
|
4
|
+
* The table a `TABLE(...)` formula describes, read at the table's first result cell; `null` when it
|
|
5
|
+
* is not a table laid out as Excel lays one out.
|
|
6
|
+
*
|
|
7
|
+
* @param text The formula text as it reads at the first result cell (relative references resolved
|
|
8
|
+
* there).
|
|
9
|
+
* @param results The result cells: the rectangle every cell of which carries this formula.
|
|
10
|
+
*/
|
|
11
|
+
export declare const readLibreOfficeDataTable: (text: string, results: IRange.Coords) => DataTableDefinition | null;
|
|
12
|
+
//# sourceMappingURL=LibreOfficeDataTable.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
2
|
+
/** The `paramMap` key under which the styles part leaves its `pivotButton="1"` cell xf indices. */
|
|
3
|
+
export declare const PIVOT_BUTTON_XFS_PARAM = "pivotButtonXfs";
|
|
4
|
+
/**
|
|
5
|
+
* Moves xlsx's per-format `pivotButton` onto the pivot tables whose cells carry it.
|
|
6
|
+
*
|
|
7
|
+
* In xlsx the field button is a flag on the cell's xf, but it is the table's: Excel drops it from
|
|
8
|
+
* a copied cell and clears it with the table. So each styled range using a button xf is cut to the
|
|
9
|
+
* tables it falls in, page fields included, and kept on that table, relative to its top-left cell
|
|
10
|
+
* (`pivotAreaOf`). A button outside every table is dropped; the xf itself reads as the format
|
|
11
|
+
* without the flag.
|
|
12
|
+
*/
|
|
13
|
+
export declare const applyPivotButtons: (jsonWB: IWorkbook.JSON, buttonXfs: ReadonlySet<number> | undefined) => void;
|
|
14
|
+
//# sourceMappingURL=PivotButtons.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Takes out of a pivot table's cells the formats its definition explains.
|
|
4
|
+
*
|
|
5
|
+
* Excel writes into each pivot cell's xf the formats the table owns: a data field's or a pivot
|
|
6
|
+
* field's number format, a compact row label's `horizontal="left"` and indent, and the formats a
|
|
7
|
+
* user put on the table (`<formats>`) (`pivot-probes/probe-pivot-xf-source.ps1`,
|
|
8
|
+
* `probe-pivot-indent-source.ps1`). Those are the table's, which renders them from its definition;
|
|
9
|
+
* a cell's direct style is what the user set. So
|
|
10
|
+
* for each laid-out, modeled table, the styled ranges over its cells are cut to it and each cell
|
|
11
|
+
* points at its xf less what the definition gives it there, an equal xf reused when there is one.
|
|
12
|
+
* What the definition does not explain stays, as Excel shows a saved xf until the table is laid
|
|
13
|
+
* out again; a cell left with nothing has no direct style. Runs after `applyPivotButtons`, which
|
|
14
|
+
* reads the xf indices as read.
|
|
15
|
+
*
|
|
16
|
+
* An xf that carries a cell control's complement (`xfComplements`, read before `applyCellControls`
|
|
17
|
+
* splits the controls out) keeps one: its stripped style is an xf of its own, recorded with the
|
|
18
|
+
* same complement, and a cell left with nothing keeps an empty style to carry it. An xf without one
|
|
19
|
+
* is never matched to one that has one.
|
|
20
|
+
*/
|
|
21
|
+
export declare const applyPivotCellFormats: (jsonWB: IWorkbook.JSON, xfComplements?: Map<number, number>) => void;
|
|
22
|
+
//# sourceMappingURL=PivotCellFormats.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
2
|
+
import { SlicerRecord } from './_SlicerRecord';
|
|
3
|
+
export interface SlicerJoinOptions {
|
|
4
|
+
/** Reports a slicer that could not be imported. */
|
|
5
|
+
warn(message: string, onceKey: string): void;
|
|
6
|
+
/** Marks a source part as taken onto the model, so a save writes it from there. */
|
|
7
|
+
markAbsorbed(partPath: string): void;
|
|
8
|
+
/** The package's slicer parts by path, each the records it holds by slicer name. */
|
|
9
|
+
slicerParts: ReadonlyMap<string, Record<string, SlicerRecord>>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Joins each sheet's slicer records to the drawing frames that place them, once every sheet is
|
|
13
|
+
* read: a frame of type `slicer` with no source takes the record of its name, and the record's
|
|
14
|
+
* table and column ids become the model's source, `Sales[Region]`. A slicer may sit on another
|
|
15
|
+
* sheet than its table, which is why this waits for the whole workbook.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* A record on pivot tables (a pivot or data-model slicer, or a timeline) names them by sheet id and name; those
|
|
19
|
+
* become sheet names, and its cache's `pivotCacheId` the workbook pivot cache that carries the
|
|
20
|
+
* same id, when there is one. A record whose table or column is not in the workbook is not
|
|
21
|
+
* imported: its frame is dropped and its parts are left to the package. Every slicer that is
|
|
22
|
+
* imported has its cache part, and the slicer part when every slicer of it was imported, marked
|
|
23
|
+
* absorbed.
|
|
24
|
+
*/
|
|
25
|
+
export declare function joinSlicers(jsonWorkbook: IWorkbook.JSON, options: SlicerJoinOptions): void;
|
|
26
|
+
//# sourceMappingURL=SlicerJoin.d.ts.map
|
|
@@ -50,7 +50,7 @@ export declare class ZipReader {
|
|
|
50
50
|
* doesn't parse where the central directory says it should.
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* `entry.compressedSize`/`compressionMethod`/`
|
|
53
|
+
* `entry.compressedSize`/`compressionMethod`/`crc32` come from the *central directory*, which
|
|
54
54
|
* zip.js has already resolved (Zip64 extra fields included) — those are trusted as-is. Only the
|
|
55
55
|
* local header's own filename/extra-field lengths are read here, since the zip spec allows those
|
|
56
56
|
* two (and only those two) to legitimately differ from the central directory's copy; they're what
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A table slicer as the reader gathers it from its part (`xl/slicers/*`) and its cache
|
|
3
|
+
* (`xl/slicerCaches/*`), by the xlsx ids the file names its column with. Not the model's JSON
|
|
4
|
+
* (`ISlicer.JSON`, which names the column by structured reference): a record is joined to the
|
|
5
|
+
* drawing frame that places it, and its ids resolved to a table, once every sheet is read.
|
|
6
|
+
*/
|
|
7
|
+
export interface SlicerRecord {
|
|
8
|
+
/** The table part's `@id`. Absent for a pivot or OLAP slicer, which names no table. */
|
|
9
|
+
tableId?: string;
|
|
10
|
+
/** The column's `tableColumn/@id`, as Excel writes it the column's 1-based index. */
|
|
11
|
+
columnId?: string;
|
|
12
|
+
/** The cache's `@name`: what a formula refers to the selection by. */
|
|
13
|
+
cacheName?: string;
|
|
14
|
+
/** The cache part's path in the package, for the read to absorb once the slicer is on the model. */
|
|
15
|
+
cachePath?: string;
|
|
16
|
+
/** The cache's `@sourceName`: the column's name when the file was written. */
|
|
17
|
+
sourceName?: string;
|
|
18
|
+
sortOrder?: string;
|
|
19
|
+
customListSort?: boolean;
|
|
20
|
+
crossFilter?: string;
|
|
21
|
+
/** The slicer's `xr10:uid`. */
|
|
22
|
+
uid?: string;
|
|
23
|
+
caption?: string;
|
|
24
|
+
startItem?: number;
|
|
25
|
+
columnCount?: number;
|
|
26
|
+
showCaption?: boolean;
|
|
27
|
+
level?: number;
|
|
28
|
+
style?: string;
|
|
29
|
+
lockedPosition?: boolean;
|
|
30
|
+
/** In EMU, as the part spells it. */
|
|
31
|
+
rowHeight?: number;
|
|
32
|
+
/** A pivot slicer's pivot tables: each `pivotTable`'s `tabId` (the sheet's `sheetId`) and `name`. */
|
|
33
|
+
pivotTables?: {
|
|
34
|
+
tabId: string;
|
|
35
|
+
name: string;
|
|
36
|
+
}[];
|
|
37
|
+
/** A pivot slicer's `data/*\/@pivotCacheId`: the `x14:pivotCacheDefinition` ext of the cache it indexes. */
|
|
38
|
+
pivotCacheId?: string;
|
|
39
|
+
/**
|
|
40
|
+
* A pivot slicer's cache children after `pivotTables`, verbatim; for a `tabular` one, those after
|
|
41
|
+
* `<data>`, whose item states the pivot tables hold.
|
|
42
|
+
*/
|
|
43
|
+
pivotBody?: string;
|
|
44
|
+
/** Whether the cache's items are `tabular`: a worksheet pivot cache's, not a data model's. */
|
|
45
|
+
tabular?: boolean;
|
|
46
|
+
/** A `tabular` slicer's `<data>`, verbatim: carried when the model does not hold its pivot cache. */
|
|
47
|
+
pivotData?: string;
|
|
48
|
+
/** `tabular/@showMissing`. */
|
|
49
|
+
showMissing?: boolean;
|
|
50
|
+
/** A timeline's attributes beyond its name, uid, cache and caption, as read. */
|
|
51
|
+
timelineAttributes?: Record<string, string>;
|
|
52
|
+
/** A timeline's children, verbatim. */
|
|
53
|
+
timelineBody?: string;
|
|
54
|
+
}
|
|
55
|
+
/** A sheet's JSON with the slicer records read for it, by slicer name. */
|
|
56
|
+
export interface SheetSlicerRecords {
|
|
57
|
+
slicers?: Record<string, SlicerRecord>;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=_SlicerRecord.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IGeometry } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* The definition a `custGeom` element states. Lists the file leaves empty are left out of the
|
|
4
|
+
* JSON; a text rectangle is kept as the four edge tokens it names.
|
|
5
|
+
*/
|
|
6
|
+
export declare const readCustGeom: (elemCustGeom: Element) => IGeometry.Def;
|
|
7
|
+
//# sourceMappingURL=CustGeomUtils.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ICellStyle } from '@sheetxl/sdk';
|
|
2
2
|
import { TransformerOptions } from './Types';
|
|
3
3
|
import { Visitor } from './Visitor';
|
|
4
4
|
import { ExecutionContext } from './ExecutionContext';
|
|
@@ -22,7 +22,7 @@ export declare class DOMTransformer {
|
|
|
22
22
|
* the `dxfs` table, so it arrives from the streaming reader with no index to look up. The
|
|
23
23
|
* `processingDXFs` flag matters: a dxf's solid pattern fill has its colors inverted.
|
|
24
24
|
*/
|
|
25
|
-
parseDxf(elem: Element, location?: string, options?: TransformerOptions):
|
|
25
|
+
parseDxf(elem: Element, location?: string, options?: TransformerOptions): ICellStyle.JSON;
|
|
26
26
|
getVisitorParamsState(): Map<string, any>;
|
|
27
27
|
transform(xmlRootDoc: Document, location: string, options?: TransformerOptions): any;
|
|
28
28
|
protected _walkScoped(elemName: string, context: ExecutionContext, visited: VisitedRecord[], elemParent: Element, jsonParent: any, location: string, options: TransformerOptions): void;
|
|
@@ -3,8 +3,20 @@ interface CoreProperty {
|
|
|
3
3
|
key: string;
|
|
4
4
|
value: string;
|
|
5
5
|
}
|
|
6
|
+
/** A `docProps/custom.xml` `<property>`: its name, the local name of its `vt:` value, and the value's text. */
|
|
7
|
+
export interface CustomPropertyEntry {
|
|
8
|
+
key: string;
|
|
9
|
+
kind: string | null;
|
|
10
|
+
value: string;
|
|
11
|
+
linkTarget?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* `<Properties>` is the root of both `docProps/app.xml` and `docProps/custom.xml`. The custom part's
|
|
15
|
+
* children are `<property>`, which the app part never has.
|
|
16
|
+
*/
|
|
6
17
|
export declare class AppPropertiesVisitor implements Visitor {
|
|
7
|
-
visit(context: ExecutionContext, elemParent: Element, jsonParent: any): CoreProperty[];
|
|
18
|
+
visit(context: ExecutionContext, elemParent: Element, jsonParent: any): CoreProperty[] | CustomPropertyEntry[];
|
|
19
|
+
visitCustom(elemParent: Element, jsonParent: any): CustomPropertyEntry[];
|
|
8
20
|
processProperty(context: ExecutionContext, elem: Element): CoreProperty | undefined;
|
|
9
21
|
}
|
|
10
22
|
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ICondition,
|
|
1
|
+
import { ICondition, Scalar, ITable } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
/**
|
|
4
4
|
* Auto Filter Visitor assumes that we are always nested within a Table.
|
|
5
5
|
*
|
|
6
6
|
* @remarks
|
|
7
7
|
* We have 2 implementations 1 in dom and 1 in sax. The sax parser is used for AutoTables within
|
|
8
|
-
* the
|
|
8
|
+
* the WorksheetView.
|
|
9
9
|
*/
|
|
10
10
|
export declare class AutoFilterVisitor implements Visitor {
|
|
11
|
-
visit(context: ExecutionContext, elem: Element, jsonTable: ITable.JSON):
|
|
11
|
+
visit(context: ExecutionContext, elem: Element, jsonTable: ITable.JSON): ITable.JSON | undefined;
|
|
12
12
|
processColorFilter(context: ExecutionContext, elem: Element): ICondition.JSON;
|
|
13
13
|
processCustomFilter(context: ExecutionContext, elem: Element): ICondition.JSON | null;
|
|
14
14
|
processCustomFilters(context: ExecutionContext, elem: Element): ICondition.JSON;
|
|
@@ -18,6 +18,11 @@ export declare class AutoFilterVisitor implements Visitor {
|
|
|
18
18
|
processFilters(context: ExecutionContext, elem: Element): ICondition.JSON;
|
|
19
19
|
processIcon(context: ExecutionContext, elem: Element): ICondition.JSON;
|
|
20
20
|
processTop10(context: ExecutionContext, elem: Element): ICondition.JSON;
|
|
21
|
+
/**
|
|
22
|
+
* A date group applied through VBA/COM is written only as `xlrd2:filterColumn` inside the
|
|
23
|
+
* column's own extLst, with nothing in the main namespace.
|
|
24
|
+
*/
|
|
25
|
+
processFilterColumnExt(context: ExecutionContext, extLst: Element): ICondition.JSON | undefined;
|
|
21
26
|
processFilterCriteria(context: ExecutionContext, elem: Element): ICondition.JSON | undefined;
|
|
22
27
|
processFilterColumn(context: ExecutionContext, elem: Element, jsonTable: ITable.JSON): ICondition.JSON | null | undefined;
|
|
23
28
|
processFilterColumns(context: ExecutionContext, elem: Element, conditions: ICondition.JSON[], jsonTable: ITable.JSON): ICondition.JSON[] | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Rectangle } from '@sheetxl/utils';
|
|
1
2
|
import { IFill, IEffect } from '@sheetxl/sdk';
|
|
2
3
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
4
|
export declare class ColorContainerVisitor implements Visitor {
|
|
@@ -23,8 +24,20 @@ export declare class ColorContainerVisitor implements Visitor {
|
|
|
23
24
|
processEffectElement(_context: ExecutionContext, elem: Element, name: string): IEffect.JSON | undefined;
|
|
24
25
|
getFill(context: ExecutionContext, shPropsElement: Element): any;
|
|
25
26
|
processGradFill(context: ExecutionContext, gradFillElement: Element): IFill.GradientJSON;
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
/**
|
|
28
|
+
* A path gradient's focus from its `fillToRect`: the inner rectangle's edges as `0…1` positions
|
|
29
|
+
* across the shape, as a cell's gradient states them. DrawingML states the right and bottom edges
|
|
30
|
+
* as insets from the far side; SpreadsheetML (and the model) as positions from the near side.
|
|
31
|
+
* `null` for an element that states no edge.
|
|
32
|
+
*/
|
|
33
|
+
getFocus(fillToRectElement: Element): Rectangle | null;
|
|
34
|
+
/**
|
|
35
|
+
* A `blipFill`: the image as a workbook resource (the blip's embed or link relationship), the
|
|
36
|
+
* part of it used, and whether it is stretched or tiled.
|
|
37
|
+
*/
|
|
38
|
+
processImageFill(context: ExecutionContext, imageFillElement: Element): IFill.ImageJSON;
|
|
39
|
+
/** A relative rectangle's insets (`l`/`t`/`r`/`b`, thousandths of a percent) as percentages; `{}` when none. */
|
|
40
|
+
getRectInsets(elem: Element): IFill.RectInsets;
|
|
28
41
|
processPatternFill(context: ExecutionContext, pattFill: Element): IFill.PatternJSON;
|
|
29
42
|
processAdjColor(context: ExecutionContext, fillElement: Element): string | null;
|
|
30
43
|
processScrgbClrElement(context: ExecutionContext, elem: Element): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IRange, IComment,
|
|
1
|
+
import { IRange, IComment, IFontStyle } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
/**
|
|
4
4
|
* One `<comment>` of a legacy comments part, as read: its author as an index into the part's
|
|
@@ -24,5 +24,5 @@ export declare function readRichText(textElement: Element | null): IComment.Cont
|
|
|
24
24
|
* A run's `<rPr>` as the font properties it sets, or `null` when it sets none. Unlike a cell font
|
|
25
25
|
* record, a run is differential: what it leaves out is inherited, so nothing is defaulted.
|
|
26
26
|
*/
|
|
27
|
-
export declare function readRunProperties(rPr: Element):
|
|
27
|
+
export declare function readRunProperties(rPr: Element): IFontStyle.JSON | null;
|
|
28
28
|
//# sourceMappingURL=CommentVisitor.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IMovable } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
import { DrawingSpVisitor } from './DrawingSpVisitor';
|
|
4
|
+
/** A `cxnSp`: a connector, read as a shape whose `type` is `connector`. */
|
|
4
5
|
export declare class DrawingCxnSpVisitor extends DrawingSpVisitor implements Visitor {
|
|
5
6
|
visit(context: ExecutionContext, elem: Element, json: IMovable.JSON): any;
|
|
6
7
|
}
|
|
@@ -1,10 +1,39 @@
|
|
|
1
|
-
import { IMovable } from '@sheetxl/sdk';
|
|
1
|
+
import { IGroup, IMovable, IShape, ITheme } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
|
+
/** Every reference a `style` element states, defaults included. */
|
|
4
|
+
export declare const readStyleRefsElement: (context: ExecutionContext, elemStyle: Element) => ITheme.StyleRefsJSON;
|
|
3
5
|
export declare class DrawingElementVisitor implements Visitor {
|
|
4
6
|
visit(context: ExecutionContext, elem: Element, json: IMovable.JSON): IMovable.JSON | undefined;
|
|
7
|
+
/** A `cNvPr`'s title and hyperlinks onto the JSON that will hold the content's identity. */
|
|
8
|
+
protected readNonVisualDetails(context: ExecutionContext, elemCNvPr: Element, target: IShape.JSON): void;
|
|
5
9
|
/**
|
|
6
10
|
* Sets the content of a movable, and gives it the name and description read from its `cNvPr`.
|
|
7
11
|
*/
|
|
8
12
|
protected setContent(json: IMovable.JSON, content: IMovable.ContentJSON<any>): void;
|
|
13
|
+
/** Whether the JSON a drawing element is read into is a group's content, i.e. the element is a member. */
|
|
14
|
+
protected isGroupContent(json: unknown): json is IGroup.JSON & {
|
|
15
|
+
members: IMovable.JSON[];
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A group member: an ordinary movable JSON whose content is of `type`, named and hidden as its
|
|
19
|
+
* `cNvPr` says. The walker fills the content in (`spPr`, `txBody`) as it descends; where the
|
|
20
|
+
* member sits is hoisted from the content onto the movable once the drawing is read
|
|
21
|
+
* (`DrawingVisitor.afterVisit`).
|
|
22
|
+
*/
|
|
23
|
+
protected readMemberHeader(context: ExecutionContext, elem: Element, type: string): {
|
|
24
|
+
movable: IMovable.JSON;
|
|
25
|
+
content: any;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A shape's `style` element — its references into the theme's format scheme — onto the content
|
|
29
|
+
* JSON. Excel's own shapes state their fill and line this way and nothing in `spPr`. A reference
|
|
30
|
+
* equal to Excel's default for the kind of shape is left out; `content.type` must already say
|
|
31
|
+
* what kind it is.
|
|
32
|
+
*/
|
|
33
|
+
protected readStyleRefs(context: ExecutionContext, elem: Element, content: IShape.JSON): void;
|
|
34
|
+
/** A locks element's flags (`spLocks`, `cxnSpLocks`, `grpSpLocks`, `picLocks`) by the file's own names. */
|
|
35
|
+
protected readLocks(elemLocks: Element | null): Record<string, boolean> | undefined;
|
|
36
|
+
/** The element's original `cNvPr` id, kept so a replayed fragment's id can be made unique on write. */
|
|
37
|
+
protected readSourceId(context: ExecutionContext, elem: Element): number | undefined;
|
|
9
38
|
}
|
|
10
39
|
//# sourceMappingURL=DrawingElementVisitor.d.ts.map
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { IMovable } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
import { DrawingElementVisitor } from './DrawingElementVisitor';
|
|
4
|
+
/**
|
|
5
|
+
* A `graphicFrame`: a chart (its part read into its model), a slicer, or another graphic,
|
|
6
|
+
* placed by a movable or a member of a group.
|
|
7
|
+
*/
|
|
4
8
|
export declare class DrawingGraphicFrameVisitor extends DrawingElementVisitor implements Visitor {
|
|
5
9
|
visit(context: ExecutionContext, elem: Element, json: IMovable.JSON): any;
|
|
10
|
+
/**
|
|
11
|
+
* The content a frame's `graphic/graphicData` names: a chart as its model and part,
|
|
12
|
+
* a slicer or anything else by its relationship.
|
|
13
|
+
*/
|
|
14
|
+
protected readGraphic(context: ExecutionContext, elem: Element): IMovable.ContentJSON<any>;
|
|
6
15
|
}
|
|
7
16
|
//# sourceMappingURL=DrawingGraphicFrameVisitor.d.ts.map
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { IMovable } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { DrawingElementVisitor } from './DrawingElementVisitor';
|
|
4
|
+
/**
|
|
5
|
+
* A `grpSp`: a group, read as a movable whose content is of type `group` with its members in
|
|
6
|
+
* `members`, each an ordinary movable JSON.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* The group's `grpSpPr/xfrm` is its frame (`off`/`ext`) and the space its members' frames are
|
|
10
|
+
* stated in (`chOff`/`chExt`), both in pixels. A top-level group's frame is its anchor's; a
|
|
11
|
+
* nested group's is its own anchor in the enclosing group's child space. Rotation and flips are
|
|
12
|
+
* the movable's. Members are read by the walker as it descends — each `sp`/`cxnSp`/`grpSp`/`pic`/
|
|
13
|
+
* `graphicFrame` under the group adds itself to `members` in document order, which is z-order.
|
|
14
|
+
*/
|
|
15
|
+
export declare class DrawingGrpSpVisitor extends DrawingElementVisitor implements Visitor {
|
|
16
|
+
private readonly _fills;
|
|
5
17
|
visit(context: ExecutionContext, elem: Element, json: IMovable.JSON): any;
|
|
6
18
|
}
|
|
7
19
|
//# sourceMappingURL=DrawingGrpSpVisitor.d.ts.map
|
|
@@ -1,7 +1,35 @@
|
|
|
1
|
-
import { IMovable } from '@sheetxl/sdk';
|
|
1
|
+
import { IMovable, IPicture } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
import { DrawingElementVisitor } from './DrawingElementVisitor';
|
|
4
|
+
/**
|
|
5
|
+
* A `pic`: the picture content of a movable, or of a member of a group.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* What the element itself states — its image and how it fills the frame, its non-visual
|
|
9
|
+
* properties and locks — is read here onto the picture's JSON; its frame properties (the shape
|
|
10
|
+
* it is cropped to, a fill behind the image, a border, effects) are read into the same JSON by
|
|
11
|
+
* the `spPr` visitor the walker runs over its children, and what that reads of placement is
|
|
12
|
+
* hoisted onto the movable afterwards. A member of a group is read the same way, as a movable of
|
|
13
|
+
* the group's `members`.
|
|
14
|
+
*/
|
|
4
15
|
export declare class DrawingPicVisitor extends DrawingElementVisitor implements Visitor {
|
|
5
|
-
visit(context: ExecutionContext, elem: Element, jsonHandle: IMovable.JSON):
|
|
16
|
+
visit(context: ExecutionContext, elem: Element, jsonHandle: IMovable.JSON): any;
|
|
17
|
+
/**
|
|
18
|
+
* The image (`blipFill`), the macro and publish flag, the resize preference and the locks onto
|
|
19
|
+
* the content; the aspect lock onto the movable too, as a shape's is.
|
|
20
|
+
*/
|
|
21
|
+
protected readPictureDetails(context: ExecutionContext, elem: Element, image: PictureImage | undefined, movable: IMovable.JSON, content: IPicture.JSON): void;
|
|
22
|
+
/**
|
|
23
|
+
* The picture's image and how it fills the frame: the `blipFill` read as an image fill is.
|
|
24
|
+
* `undefined` when the element has no `blip`, `null` when the blip names no relationship
|
|
25
|
+
* (warned once). The whole image stretched over the whole frame is the default and is left out.
|
|
26
|
+
*/
|
|
27
|
+
protected readImage(context: ExecutionContext, elem: Element): PictureImage | null | undefined;
|
|
6
28
|
}
|
|
29
|
+
/** What a `blipFill` gives a picture: its image as a resource, and how it fills the frame. */
|
|
30
|
+
interface PictureImage {
|
|
31
|
+
resId: number | undefined;
|
|
32
|
+
image: IPicture.ImageJSON | undefined;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
7
35
|
//# sourceMappingURL=DrawingPicVisitor.d.ts.map
|
|
@@ -1,7 +1,26 @@
|
|
|
1
|
-
import { IMovable } from '@sheetxl/sdk';
|
|
1
|
+
import { IMovable, IShape } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
import { DrawingElementVisitor } from './DrawingElementVisitor';
|
|
4
|
+
/**
|
|
5
|
+
* An `sp`: the shape content of a movable, or of a member of a group.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* What the element itself states — its kind, attributes, non-visual properties, style references
|
|
9
|
+
* — is read here; its properties and text are read into the same content JSON by the `spPr` and
|
|
10
|
+
* `txBody` visitors the walker runs over its children. A member of a group is read the same way,
|
|
11
|
+
* as a movable of the group's `members`.
|
|
12
|
+
*/
|
|
4
13
|
export declare class DrawingSpVisitor extends DrawingElementVisitor implements Visitor {
|
|
5
14
|
visit(context: ExecutionContext, elem: Element, json: IMovable.JSON): any;
|
|
15
|
+
protected visitShape(context: ExecutionContext, elem: Element, json: IMovable.JSON, type: 'sp' | 'cxnSp', locksPath: string): any;
|
|
16
|
+
/**
|
|
17
|
+
* The VML shape a form control's hidden twin names, by its `spid` (`_x0000_s1025` is 1025).
|
|
18
|
+
*/
|
|
19
|
+
protected readTwinOf(context: ExecutionContext, elem: Element): number | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* What the element itself and its non-visual properties say beyond the name: the macro and
|
|
22
|
+
* text link, the text-box flag, the edit locks by name, and a connector's glued ends.
|
|
23
|
+
*/
|
|
24
|
+
protected readShapeDetails(context: ExecutionContext, elem: Element, type: 'sp' | 'cxnSp', locksPath: string, content: IShape.JSON): void;
|
|
6
25
|
}
|
|
7
26
|
//# sourceMappingURL=DrawingSpVisitor.d.ts.map
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
import { IMovable } from '@sheetxl/sdk';
|
|
1
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
2
3
|
export declare class DrawingVisitor implements Visitor {
|
|
3
4
|
visit(context: ExecutionContext, elemParent: Element, jsonParent: any): any;
|
|
5
|
+
/**
|
|
6
|
+
* What the `spPr` visitor reads onto a content — `xfrm/@rot`, the flips and, for a group
|
|
7
|
+
* member, the frame — is the movable's: a top-level shape's rotation and flips move to its
|
|
8
|
+
* movable, and a member's frame becomes its anchor in the group's child space. Nested groups
|
|
9
|
+
* are walked the same way.
|
|
10
|
+
*/
|
|
11
|
+
afterVisit(_context: ExecutionContext, _elemParent: Element, jsonDrawing: {
|
|
12
|
+
movables?: Partial<IMovable.JSON>[];
|
|
13
|
+
}): void;
|
|
4
14
|
}
|
|
5
15
|
//# sourceMappingURL=DrawingVisitor.d.ts.map
|
|
@@ -23,7 +23,7 @@ export declare class ExternalLinkVisitor implements Visitor {
|
|
|
23
23
|
* Cached types measured across the bench corpus are `n`, `str`, `b`, `e` — strings are inline in
|
|
24
24
|
* `<v>`, never an sst index (design doc §1). Mirrors `WorksheetVisitor`'s scalar coercion for `n`
|
|
25
25
|
* / `b` / `e`; `str` here is the literal value (unlike a live sheet's `str`, which is a formula
|
|
26
|
-
* marker whose text lives elsewhere), so it needs no `{t,v}` wrapper — `
|
|
26
|
+
* marker whose text lives elsewhere), so it needs no `{t,v}` wrapper — `Scalar.JSON`'s untyped arm
|
|
27
27
|
* is a bare JS primitive, self-typed at runtime.
|
|
28
28
|
*/
|
|
29
29
|
private _readCellValue;
|
|
@@ -32,16 +32,6 @@ export declare class ExternalLinkVisitor implements Visitor {
|
|
|
32
32
|
private _findAbsoluteUrlRelId;
|
|
33
33
|
}
|
|
34
34
|
export declare namespace ExternalLinkVisitor {
|
|
35
|
-
/**
|
|
36
|
-
* The `r:id`s the part's XML points at, handed to `XLSXReader` so it can say which of the part's
|
|
37
|
-
* relationships is the book's own path and which is the 2021 `absoluteUrl` companion — then
|
|
38
|
-
* stripped. **Not part of {@link IExternalBook.JSON}**: an rId is a name inside one package, and
|
|
39
|
-
* a saved book gets fresh ones.
|
|
40
|
-
*
|
|
41
|
-
* @remarks
|
|
42
|
-
* The relationship type cannot answer this on its own — both can be `externalLinkPath` (measured
|
|
43
|
-
* on task 40234).
|
|
44
|
-
*/
|
|
45
35
|
interface RelIds {
|
|
46
36
|
__bookRelId?: string;
|
|
47
37
|
__absoluteUrlRelId?: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ICellControl } from '@sheetxl/sdk';
|
|
2
|
+
import { Visitor, ExecutionContext } from '../dom';
|
|
3
|
+
/**
|
|
4
|
+
* What `xl/featurePropertyBag/featurePropertyBag.xml` says the cell xfs' complements are.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* `controls[i]` is the control an xf with `xfComplement i="i"` carries, or `null` when the chain
|
|
8
|
+
* names something SheetXL does not read (a foreign bag type is warned about, and its cells keep
|
|
9
|
+
* their values).
|
|
10
|
+
*/
|
|
11
|
+
export interface FeaturePropertyBags {
|
|
12
|
+
controls: (ICellControl.JSON | null)[];
|
|
13
|
+
}
|
|
14
|
+
export declare class FeaturePropertyBagVisitor implements Visitor {
|
|
15
|
+
visit(context: ExecutionContext, elem: Element, jsonParent: any): FeaturePropertyBags;
|
|
16
|
+
private _readBag;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=FeaturePropertyBagVisitor.d.ts.map
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import { ITheme } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
import { ColorContainerVisitor } from './ColorContainerVisitor';
|
|
4
|
-
/**
|
|
5
|
-
* Parses the source theme's `<a:fmtScheme>` (fill/line/effect/background-fill style lists) into
|
|
6
|
-
* typed `ITheme.JSON` fields (`fillStyleLst`/`lnStyleLst`/`effectStyleLst`/`bgFillStyleLst`) so
|
|
7
|
-
* idx-referencing shape/chart styles (`<a:lnRef idx="N">`, `<a:fillRef>`, `<a:effectRef>`) keep
|
|
8
|
-
* resolving against the same source definitions on save — see DESIGN-PACKAGE-PASSTHROUGH.md §11.2.
|
|
9
|
-
*
|
|
10
|
-
* If anything in the fragment isn't fully modeled (an effect outside the "common" set — see
|
|
11
|
-
* `IEffect` — or a `scene3d`/`sp3d` on an effect style), falls back to capturing the whole
|
|
12
|
-
* `<a:fmtScheme>` verbatim (`ITheme.JSON.formatSchemeXml`), exactly as before this was modeled —
|
|
13
|
-
* `ThemeEmitter` replays that raw fragment instead of synthesizing from the typed fields.
|
|
14
|
-
*/
|
|
15
4
|
export declare class FmtSchemeVisitor extends ColorContainerVisitor implements Visitor {
|
|
16
5
|
visit(context: ExecutionContext, elemParent: Element, jsonParent: ITheme.JSON): void;
|
|
17
6
|
private parseFillList;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ITheme
|
|
1
|
+
import { ITheme } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
export declare class FontSchemeVisitor implements Visitor {
|
|
4
4
|
visit(context: ExecutionContext, elemParent: Element, jsonParent: ITheme.JSON): ITheme.FontSchemeJSON;
|
|
5
|
-
|
|
5
|
+
/** A `majorFont`/`minorFont`: the latin, East Asian and complex-script fonts, then the fonts by script. */
|
|
6
|
+
processFontCollection(context: ExecutionContext, elem: Element): ITheme.FontCollectionJSON | undefined;
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=FontSchemeVisitor.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Visitor, ExecutionContext } from '../dom';
|
|
2
|
+
/**
|
|
3
|
+
* A `ctrlProp` part (`<formControlPr>`): what kind of form control a `<control>` is and what it
|
|
4
|
+
* holds, read onto `formControl` as the content type and that kind's fields.
|
|
5
|
+
*/
|
|
6
|
+
export declare class FormControlPrVisitor implements Visitor {
|
|
7
|
+
visit(context: ExecutionContext, elem: Element, jsonParent: any): any;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=FormControlPrVisitor.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IShape, ITheme } from '@sheetxl/sdk';
|
|
2
|
+
import { Visitor, ExecutionContext } from '../dom';
|
|
3
|
+
/**
|
|
4
|
+
* A theme's `objectDefaults`: each of `spDef`, `lnDef` and `txDef` read as the shape JSON it gives a
|
|
5
|
+
* new object, its style references in full.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ObjectDefaultsVisitor implements Visitor {
|
|
8
|
+
visit(context: ExecutionContext, elemParent: Element, jsonParent: ITheme.JSON): object;
|
|
9
|
+
processDefault(context: ExecutionContext, elemDef: Element): IShape.JSON;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ObjectDefaultsVisitor.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IText, ITextFrame } from '@sheetxl/sdk';
|
|
2
|
+
import { ExecutionContext } from '../dom/ExecutionContext';
|
|
3
|
+
import { TextPropertiesVisitor } from './TextPropertiesVisitor';
|
|
4
|
+
/** The plain text of a paragraph: its runs concatenated, a line break as `\n`. */
|
|
5
|
+
export declare const paragraphText: (paragraph: IText.ParagraphJSON) => string;
|
|
6
|
+
/**
|
|
7
|
+
* The plain text of a text body: paragraphs joined by a newline, blank ones trimmed from the ends.
|
|
8
|
+
* The same rule `IShape.getTextFrame().getText()` applies, so the reader can decide what a body says.
|
|
9
|
+
*/
|
|
10
|
+
export declare const textBodyText: (text: ITextFrame.JSON) => string;
|
|
11
|
+
/**
|
|
12
|
+
* DrawingML's defaults where SheetXL's differ ({@link ShapeStyleUtils.TEXT_DEFAULTS}): what a file
|
|
13
|
+
* that leaves these out means. The reader states them, so the shape keeps what the file meant.
|
|
14
|
+
*/
|
|
15
|
+
export declare const DRAWINGML_TEXT_DEFAULTS: Readonly<{
|
|
16
|
+
readonly verticalOverflow: "visible";
|
|
17
|
+
readonly horizontalOverflow: "visible";
|
|
18
|
+
readonly size: 18;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* A shape's `txBody`, read paragraph by paragraph into {@link ITextFrame.JSON}.
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* Elements are matched by local name, so other producers' prefixes read the same as Excel's.
|
|
25
|
+
* A `br` is a run of `\n`; a field (`fld`) reads as its text; any other `t` — an equation's
|
|
26
|
+
* `m:t` included — reads as a run of its own. The run and paragraph formatting the chart text
|
|
27
|
+
* reader models (size, weight, color, font…) is read the same way onto each run and paragraph.
|
|
28
|
+
*/
|
|
29
|
+
export declare class ShapeTextVisitor extends TextPropertiesVisitor {
|
|
30
|
+
visit(context: ExecutionContext, elem: Element, jsonParent: any): any;
|
|
31
|
+
/**
|
|
32
|
+
* Reads a `txBody`. With no context the text and layout are read but no run formatting,
|
|
33
|
+
* colors or list style.
|
|
34
|
+
*/
|
|
35
|
+
readTextBody(context: ExecutionContext | null, body: Element): ITextFrame.JSON;
|
|
36
|
+
readParagraph(context: ExecutionContext | null, p: Element): IText.ParagraphJSON;
|
|
37
|
+
/** A `pPr`, `defPPr` or `lvlNpPr`: how a paragraph is laid out. Colors and the default run need a context. */
|
|
38
|
+
readParagraphProperties(context: ExecutionContext | null, pPr: Element): IText.ParagraphPropertiesJSON;
|
|
39
|
+
/** A `lstStyle`: the default and per-level paragraph properties, or nothing when it states none. */
|
|
40
|
+
readListStyle(context: ExecutionContext, lstStyle: Element): ITextFrame.ListStyleJSON | undefined;
|
|
41
|
+
}
|
|
42
|
+
/** A `bodyPr`'s attributes and autofit/warp children. Rotation is read separately. */
|
|
43
|
+
export declare const readBodyProperties: (bodyPr: Element) => ITextFrame.BodyJSON;
|
|
44
|
+
//# sourceMappingURL=ShapeTextVisitor.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IFill, IBorders,
|
|
1
|
+
import { IFill, IBorders, IFontStyle } from '@sheetxl/sdk';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
export declare class SheetColorContainerVisitor implements Visitor {
|
|
4
4
|
visit(_context: ExecutionContext, _elemParent: Element, _jsonParent: any): any;
|
|
@@ -7,7 +7,7 @@ export declare class SheetColorContainerVisitor implements Visitor {
|
|
|
7
7
|
*/
|
|
8
8
|
processDataBarColor(context: ExecutionContext, elemColor: Element, jsonParent: any, key: string, auto?: string): any;
|
|
9
9
|
processFonts(context: ExecutionContext, elem: Element, jsonParent: any): any;
|
|
10
|
-
processFont(context: ExecutionContext, elem: Element, jsonFont:
|
|
10
|
+
processFont(context: ExecutionContext, elem: Element, jsonFont: IFontStyle.Properties<string>): any;
|
|
11
11
|
processFills(context: ExecutionContext, elem: Element, jsonParent: any): any;
|
|
12
12
|
processFill(context: ExecutionContext, elem: Element, jsonParent: any, index: number): any;
|
|
13
13
|
processGradientFill(context: ExecutionContext, elem: Element, jsonParent: IFill.GradientJSON): any;
|