@sheetxl/io-xlsx 0.8.0-beta.1 → 0.8.0-beta.11
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/BiDqExNXiY7ykk8E.mjs +2327 -0
- package/browser/esm/{Ctqql4O-3xj2K8vv.mjs → Bs0EzhdU8WgGfPzf.mjs} +193 -143
- package/browser/esm/CLWsOc6DO8l1G_LF.mjs +2213 -0
- package/browser/esm/{CLWzJJyoSrykkVLX.mjs → CZ9I80og75SDRjv0.mjs} +2 -2
- package/browser/esm/{Dz1Dp8DDJvhd09RR.mjs → CuAXx5i4uqTz-mMY.mjs} +1 -1
- package/browser/esm/Cv3R6fGatARKedSn.mjs +8635 -0
- package/browser/esm/{BkNXyG6NC-w5Xo92.mjs → CzFYJPxmLyKgEKF0.mjs} +28 -13
- package/browser/esm/DICL6ecj9BdJv8aX.mjs +104 -0
- package/browser/esm/DatIA9fZbEPjW4bh.mjs +5638 -0
- package/browser/esm/index.mjs +2 -3
- package/browser/esm/yveeVJ6hKDI5KDEz.mjs +4168 -0
- package/licenses/dependencies.txt +2 -2
- package/node/esm/B9Zn6H1RV07Ob377.mjs +2294 -0
- package/node/esm/Bpqm_PpGLpdjL47-.mjs +2368 -0
- package/node/esm/{fOnuUjpPCAzmuIXN.mjs → CAJxmJdobUbzpUz5.mjs} +2 -2
- package/node/esm/{CEV7nKotMpeRRnQC.mjs → CxlSbH7mmnEEsqmX.mjs} +1 -1
- package/node/esm/DD-yXSBzvDYy0TX5.mjs +5842 -0
- package/node/esm/DScqM1V4wPntNP6-.mjs +5235 -0
- package/node/esm/{CEAmv36xpTNgFwl_.mjs → fopiRR7OiVoEiF7B.mjs} +49 -35
- package/node/esm/index.mjs +77 -25
- package/node/esm/ipiyzn5Pfohw2afB.mjs +4271 -0
- package/package.json +7 -8
- package/types/src/AutoFilterRules.d.ts +94 -11
- package/types/src/ConditionalFormatRules.d.ts +5 -5
- package/types/src/DataValidationRules.d.ts +18 -2
- package/types/src/DefinedNameAttributes.d.ts +8 -0
- package/types/src/ExcelCalcStamp.d.ts +39 -0
- package/types/src/ExcelCompat.d.ts +209 -42
- package/types/src/ExcelReservedNames.d.ts +3 -4
- package/types/src/KnownFonts.d.ts +50 -0
- package/types/src/LegacyFormula.d.ts +41 -7
- package/types/src/OOXMLExtensions.d.ts +14 -2
- package/types/src/PageLayoutAttributes.d.ts +8 -0
- package/types/src/Plugin.d.ts +28 -5
- package/types/src/ProtectionAttributes.d.ts +38 -0
- 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/SourcePackage.d.ts +31 -12
- package/types/src/Types.d.ts +28 -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 +36 -0
- package/types/src/chart/_XmlTree.d.ts +34 -0
- package/types/src/chart/_chartCodecs.d.ts +10 -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/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/HiddenFormulas.d.ts +16 -0
- package/types/src/reader/IsoDateCell.d.ts +20 -0
- package/types/src/reader/LibreOfficeDataTable.d.ts +11 -0
- package/types/src/reader/SlicerJoin.d.ts +24 -0
- package/types/src/reader/Warning.d.ts +29 -0
- package/types/src/reader/ZipReader.d.ts +1 -1
- package/types/src/reader/_SlicerRecord.d.ts +37 -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/dom/ExecutionContext.d.ts +16 -3
- package/types/src/reader/dom/Types.d.ts +19 -3
- package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
- package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +16 -3
- package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts +15 -2
- package/types/src/reader/domVisitors/CommentVisitor.d.ts +24 -2
- package/types/src/reader/domVisitors/CommentsVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/DrawingCxnSpVisitor.d.ts +1 -0
- package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +34 -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 +21 -3
- package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +4 -4
- 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 +3 -3
- package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +21 -6
- package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +7 -2
- package/types/src/reader/domVisitors/SlicersVisitor.d.ts +7 -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/ThreadedCommentVisitor.d.ts +18 -1
- package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +11 -1
- package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
- package/types/src/reader/domVisitors/index.d.ts +6 -32
- package/types/src/reader/sax/LeanSaxParser.d.ts +58 -0
- package/types/src/reader/sax/SaxParser.d.ts +11 -1
- package/types/src/reader/sax/SaxVisitor.d.ts +3 -2
- package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +9 -0
- package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +46 -6
- package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +23 -11
- 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 +128 -0
- package/types/src/utils/VmlNoteStyle.d.ts +44 -0
- package/types/src/utils/VmlPrefixes.d.ts +24 -0
- package/types/src/vba/VBAProject.d.ts +52 -4
- package/types/src/writer/builder/ContentTypes.d.ts +13 -0
- package/types/src/writer/builder/Emitter.d.ts +11 -6
- package/types/src/writer/builder/OpcXmlUtils.d.ts +2 -0
- package/types/src/writer/builder/PackageBuilder.d.ts +74 -22
- package/types/src/writer/builder/PartWriter.d.ts +5 -0
- package/types/src/writer/builder/RelationshipSet.d.ts +3 -0
- package/types/src/writer/builder/Types.d.ts +124 -38
- package/types/src/writer/builder/_Types.d.ts +17 -0
- package/types/src/writer/emitters/CommentsEmitter.d.ts +58 -0
- package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
- package/types/src/writer/emitters/EmbeddedPartEmitter.d.ts +60 -0
- package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +19 -0
- package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +18 -0
- package/types/src/writer/emitters/PersonsEmitter.d.ts +17 -0
- package/types/src/writer/emitters/PivotTableEmitter.d.ts +45 -0
- 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/SharedStringsEmitter.d.ts +6 -3
- package/types/src/writer/emitters/SlicerEmitter.d.ts +66 -0
- package/types/src/writer/emitters/StylesEmitter.d.ts +2 -2
- package/types/src/writer/emitters/TableEmitter.d.ts +14 -0
- package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +27 -0
- package/types/src/writer/emitters/WorkbookEmitter.d.ts +21 -3
- 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/CustGeomUtils.d.ts +5 -0
- package/types/src/writer/utils/DefaultRows.d.ts +38 -0
- package/types/src/writer/utils/DrawMLUtils.d.ts +57 -3
- package/types/src/writer/utils/DummyFunction.d.ts +0 -2
- package/types/src/writer/utils/DxfCollector.d.ts +14 -11
- package/types/src/writer/utils/HiddenFormulaXfs.d.ts +28 -0
- package/types/src/writer/utils/PrstGeomUtils.d.ts +6 -0
- package/types/src/writer/utils/SheetStyleLayout.d.ts +73 -0
- package/types/src/writer/utils/TextUtils.d.ts +26 -2
- package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
- package/browser/cjs/B6sirGz6w-Bm7Ofo.cjs +0 -1
- package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
- package/browser/cjs/BAtEL-5TLyoaPFDP.cjs +0 -2
- package/browser/cjs/Bg0e53JZa8vhmm5a.cjs +0 -1
- package/browser/cjs/CIpMN7SDVREKQUQE.cjs +0 -6
- package/browser/cjs/CK5FFUvet6FnIYO_.cjs +0 -5
- package/browser/cjs/D5Y4KQhKdukOkjvA.cjs +0 -2
- package/browser/cjs/DV6LeTEiiFUrZoxj.cjs +0 -1
- package/browser/cjs/DWkuoJSgvcXJTdN1.cjs +0 -1
- package/browser/cjs/Db8YjGM6TG34c8aT.cjs +0 -1
- package/browser/cjs/index.cjs +0 -1
- package/browser/cjs/xQ6-wbTw5UzZUM1Y.cjs +0 -1
- package/browser/esm/4BWLu134ABlCQEtM.mjs +0 -3655
- package/browser/esm/BzQ_lPzc8C4OTIGZ.mjs +0 -99
- package/browser/esm/CJknI8BYGSZr-4zS.mjs +0 -52
- package/browser/esm/Cok_fBIUCHDSrKw0.mjs +0 -2211
- package/browser/esm/D-m_kQLaewdwuXaF.mjs +0 -2685
- package/browser/esm/Dj7D2nVdAZ3TiUks.mjs +0 -4743
- package/browser/esm/ijQzHH-bvDfUHIi1.mjs +0 -24
- package/node/esm/CF1R5ovFsRNu--Rw.mjs +0 -3744
- package/node/esm/Ctcl4jN52INWpKWC.mjs +0 -2255
- package/node/esm/CvnRSooxEQdlJgMn.mjs +0 -2766
- package/node/esm/DQd0vxzTaPt2qSL-.mjs +0 -108
- package/node/esm/ssSlRCbCqxvZ9IX8.mjs +0 -2481
- 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/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,14 @@
|
|
|
1
|
+
import { ChartModel } from '@sheetxl/sdk';
|
|
2
|
+
import { ChartExMarkup } from './_chartExMarkup';
|
|
3
|
+
/** The group types a `cx:chartSpace` part states. */
|
|
4
|
+
export declare const CHART_EX_GROUP_TYPES: ReadonlySet<string>;
|
|
5
|
+
/** A `cx:chartSpace` as the one chart model. */
|
|
6
|
+
export declare const foldChartEx: (chartSpace: ChartExMarkup.ChartSpace) => ChartModel.ChartSpace;
|
|
7
|
+
/**
|
|
8
|
+
* The one chart model as a `cx:chartSpace`. Groups of a type the part cannot state are left out;
|
|
9
|
+
* the caller says so.
|
|
10
|
+
*/
|
|
11
|
+
export declare const unfoldChartEx: (model: ChartModel.ChartSpace) => ChartExMarkup.ChartSpace;
|
|
12
|
+
/** Whether `model`, folded from `chartSpace`, unfolds to it again: whether the model states all it says. */
|
|
13
|
+
export declare const isLossless: (chartSpace: ChartExMarkup.ChartSpace, model: ChartModel.ChartSpace) => boolean;
|
|
14
|
+
//# sourceMappingURL=_chartExFold.d.ts.map
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { ChartModel } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* A `cx:chartSpace` part as the chartex codecs read and write it, element for element: the step
|
|
4
|
+
* between the markup and {@link ChartModel}, which states a 2016 chart as groups and series like any
|
|
5
|
+
* other (`_chartExFold`).
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Names are the vocabulary's own (`layoutId`, `catScaling`, `dataLabels`) except the collections
|
|
9
|
+
* (`data`, `dimensions`, `levels`, `series`, `points`, `labels`, `axes`), and whatever is not
|
|
10
|
+
* read is kept as markup in the {@link ChartModel.Unknown} bag of the element that held it. A series
|
|
11
|
+
* names its data by `dataId`; the data lists its dimensions, each a formula and the values it last
|
|
12
|
+
* read.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace ChartExMarkup {
|
|
15
|
+
/** Any element of the model. */
|
|
16
|
+
type Element = ChartModel.Element;
|
|
17
|
+
/** `cx:chartSpace`, the root of a chartex part. */
|
|
18
|
+
interface ChartSpace extends Element {
|
|
19
|
+
chartData: ChartData;
|
|
20
|
+
chart: Chart;
|
|
21
|
+
spPr?: ChartModel.ShapeProperties;
|
|
22
|
+
txPr?: ChartModel.TextBody;
|
|
23
|
+
}
|
|
24
|
+
/** `cx:chartData`: the data every series of the chart reads. */
|
|
25
|
+
interface ChartData extends Element {
|
|
26
|
+
/** In the order the file lists them. */
|
|
27
|
+
data: Data[];
|
|
28
|
+
}
|
|
29
|
+
/** `cx:data`: the dimensions one series plots. */
|
|
30
|
+
interface Data extends Element {
|
|
31
|
+
/** What a series' `dataId` names it by. */
|
|
32
|
+
id: number;
|
|
33
|
+
/** `cx:numDim` and `cx:strDim`, in the order the file lists them. */
|
|
34
|
+
dimensions: Dimension[];
|
|
35
|
+
}
|
|
36
|
+
/** What a numeric dimension holds: values, x and y, sizes, or the values a region map colors by. */
|
|
37
|
+
type NumericDimensionType = 'val' | 'x' | 'y' | 'size' | 'colorVal';
|
|
38
|
+
/** What a string dimension holds: categories, the text a region map colors by, or entity ids. */
|
|
39
|
+
type StringDimensionType = 'cat' | 'colorStr' | 'entityId';
|
|
40
|
+
/**
|
|
41
|
+
* `cx:numDim` or `cx:strDim`, told apart by `type`: one dimension of a series' data.
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* Excel names a hidden defined name in `f` (`_xlchart.v1.0`), whose own formula is the range.
|
|
45
|
+
*/
|
|
46
|
+
interface Dimension extends Element {
|
|
47
|
+
type: NumericDimensionType | StringDimensionType;
|
|
48
|
+
/** The values' formula. */
|
|
49
|
+
f?: DataReference;
|
|
50
|
+
/** The formula of the dimension's name: the cell above the values. */
|
|
51
|
+
nf?: DataReference;
|
|
52
|
+
/** `cx:lvl`: the values as last read, one level per row or column of the range, the outermost first. */
|
|
53
|
+
levels?: Level[];
|
|
54
|
+
}
|
|
55
|
+
/** `cx:f`, `cx:nf`: a formula. */
|
|
56
|
+
interface DataReference extends Element {
|
|
57
|
+
f: string;
|
|
58
|
+
/** Whether the range is read by column (the default) or by row. */
|
|
59
|
+
dir?: 'col' | 'row';
|
|
60
|
+
}
|
|
61
|
+
/** `cx:lvl`: one level of cached values. */
|
|
62
|
+
interface Level extends Element {
|
|
63
|
+
ptCount?: number;
|
|
64
|
+
/** Numeric levels state the format their values were read with. */
|
|
65
|
+
formatCode?: string;
|
|
66
|
+
name?: string;
|
|
67
|
+
/** By `idx`: a point the level leaves out is blank. */
|
|
68
|
+
points?: Point[];
|
|
69
|
+
}
|
|
70
|
+
/** `cx:pt`. */
|
|
71
|
+
interface Point extends Element {
|
|
72
|
+
idx: number;
|
|
73
|
+
/** The value as the file spells it. */
|
|
74
|
+
v: string;
|
|
75
|
+
}
|
|
76
|
+
/** `cx:chart`. */
|
|
77
|
+
interface Chart extends Element {
|
|
78
|
+
title?: Title;
|
|
79
|
+
plotArea: PlotArea;
|
|
80
|
+
legend?: Legend;
|
|
81
|
+
}
|
|
82
|
+
type SidePosition = 'l' | 't' | 'r' | 'b';
|
|
83
|
+
type PositionAlign = 'min' | 'ctr' | 'max';
|
|
84
|
+
/** `cx:title`. */
|
|
85
|
+
interface Title extends Element {
|
|
86
|
+
pos?: SidePosition;
|
|
87
|
+
align?: PositionAlign;
|
|
88
|
+
overlay?: boolean;
|
|
89
|
+
tx?: Text;
|
|
90
|
+
spPr?: ChartModel.ShapeProperties;
|
|
91
|
+
txPr?: ChartModel.TextBody;
|
|
92
|
+
}
|
|
93
|
+
/** `cx:tx`: text read from a cell, written into the chart, or rich text. */
|
|
94
|
+
interface Text extends Element {
|
|
95
|
+
txData?: TextData;
|
|
96
|
+
rich?: ChartModel.TextBody;
|
|
97
|
+
}
|
|
98
|
+
/** `cx:txData`: a formula naming a cell and the text it last read, or text written into the chart. */
|
|
99
|
+
interface TextData extends Element {
|
|
100
|
+
f?: DataReference;
|
|
101
|
+
v?: string;
|
|
102
|
+
}
|
|
103
|
+
/** `cx:plotArea`. */
|
|
104
|
+
interface PlotArea extends Element {
|
|
105
|
+
plotAreaRegion: PlotAreaRegion;
|
|
106
|
+
/** `cx:axis`, in the order the file lists them. */
|
|
107
|
+
axes: Axis[];
|
|
108
|
+
spPr?: ChartModel.ShapeProperties;
|
|
109
|
+
}
|
|
110
|
+
/** `cx:plotAreaRegion`: the series, drawn over one surface. */
|
|
111
|
+
interface PlotAreaRegion extends Element {
|
|
112
|
+
plotSurface?: PlotSurface;
|
|
113
|
+
series: Series[];
|
|
114
|
+
}
|
|
115
|
+
interface PlotSurface extends Element {
|
|
116
|
+
spPr?: ChartModel.ShapeProperties;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* How a series is drawn. A histogram is a `clusteredColumn` series with binning; a pareto adds a
|
|
120
|
+
* `paretoLine` series owned by it (`ownerIdx`).
|
|
121
|
+
*/
|
|
122
|
+
type LayoutId = 'boxWhisker' | 'clusteredColumn' | 'funnel' | 'paretoLine' | 'regionMap' | 'sunburst' | 'treemap' | 'waterfall';
|
|
123
|
+
/** `cx:series`. */
|
|
124
|
+
interface Series extends Element {
|
|
125
|
+
layoutId: LayoutId;
|
|
126
|
+
hidden?: boolean;
|
|
127
|
+
/** The index of the series this one belongs to: a pareto's line names its columns. */
|
|
128
|
+
ownerIdx?: number;
|
|
129
|
+
uniqueId?: string;
|
|
130
|
+
formatIdx?: number;
|
|
131
|
+
tx?: Text;
|
|
132
|
+
spPr?: ChartModel.ShapeProperties;
|
|
133
|
+
/** `cx:dataPt`: what one point states for itself. */
|
|
134
|
+
points?: DataPoint[];
|
|
135
|
+
dataLabels?: DataLabels;
|
|
136
|
+
/** The {@link Data.id} of the data the series plots. */
|
|
137
|
+
dataId?: number;
|
|
138
|
+
layoutPr?: LayoutProperties;
|
|
139
|
+
/** `cx:axisId`: the axes the series draws against, when it says. */
|
|
140
|
+
axisIds?: number[];
|
|
141
|
+
}
|
|
142
|
+
/** `cx:dataPt`. */
|
|
143
|
+
interface DataPoint extends Element {
|
|
144
|
+
idx: number;
|
|
145
|
+
spPr?: ChartModel.ShapeProperties;
|
|
146
|
+
}
|
|
147
|
+
type DataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
|
|
148
|
+
/** What `cx:dataLabels` and `cx:dataLabel` share. */
|
|
149
|
+
interface DataLabelOptions extends Element {
|
|
150
|
+
pos?: DataLabelPosition;
|
|
151
|
+
numFmt?: ChartModel.NumberFormat;
|
|
152
|
+
spPr?: ChartModel.ShapeProperties;
|
|
153
|
+
txPr?: ChartModel.TextBody;
|
|
154
|
+
visibility?: DataLabelVisibility;
|
|
155
|
+
separator?: string;
|
|
156
|
+
}
|
|
157
|
+
/** `cx:dataLabels`: the labels of a series, with the ones that differ listed in `labels`. */
|
|
158
|
+
interface DataLabels extends DataLabelOptions {
|
|
159
|
+
labels?: DataLabel[];
|
|
160
|
+
/** `cx:dataLabelHidden`: the points that show no label. */
|
|
161
|
+
hiddenLabels?: HiddenDataLabel[];
|
|
162
|
+
}
|
|
163
|
+
/** `cx:dataLabel`: the label of one point. */
|
|
164
|
+
interface DataLabel extends DataLabelOptions {
|
|
165
|
+
idx: number;
|
|
166
|
+
}
|
|
167
|
+
interface HiddenDataLabel extends Element {
|
|
168
|
+
idx: number;
|
|
169
|
+
}
|
|
170
|
+
/** `cx:visibility` of a label: what it shows. */
|
|
171
|
+
interface DataLabelVisibility extends Element {
|
|
172
|
+
seriesName?: boolean;
|
|
173
|
+
categoryName?: boolean;
|
|
174
|
+
value?: boolean;
|
|
175
|
+
}
|
|
176
|
+
/** `cx:layoutPr`: the model's layout options, and the indexes of a waterfall's totals. */
|
|
177
|
+
interface LayoutProperties extends ChartModel.LayoutProperties {
|
|
178
|
+
/** `cx:subtotals`: the indexes of the points that are totals. */
|
|
179
|
+
subtotals?: number[];
|
|
180
|
+
}
|
|
181
|
+
/** `cx:axis`. */
|
|
182
|
+
interface Axis extends Element {
|
|
183
|
+
id: number;
|
|
184
|
+
hidden?: boolean;
|
|
185
|
+
/** A category axis states this, a value axis {@link valScaling}. */
|
|
186
|
+
catScaling?: CategoryAxisScaling;
|
|
187
|
+
valScaling?: ValueAxisScaling;
|
|
188
|
+
title?: AxisTitle;
|
|
189
|
+
units?: AxisUnits;
|
|
190
|
+
majorGridlines?: Gridlines;
|
|
191
|
+
minorGridlines?: Gridlines;
|
|
192
|
+
majorTickMarks?: TickMarks;
|
|
193
|
+
minorTickMarks?: TickMarks;
|
|
194
|
+
/** `cx:tickLabels`: the axis shows its labels. Present when stated. */
|
|
195
|
+
tickLabels?: Element;
|
|
196
|
+
numFmt?: ChartModel.NumberFormat;
|
|
197
|
+
spPr?: ChartModel.ShapeProperties;
|
|
198
|
+
txPr?: ChartModel.TextBody;
|
|
199
|
+
}
|
|
200
|
+
interface CategoryAxisScaling extends Element {
|
|
201
|
+
/** The gap between categories as a fraction of a category's width. A stated `auto` is kept as markup. */
|
|
202
|
+
gapWidth?: number;
|
|
203
|
+
}
|
|
204
|
+
/** A bound or unit not stated is automatic. A stated `auto` is kept as markup. */
|
|
205
|
+
interface ValueAxisScaling extends Element {
|
|
206
|
+
max?: number;
|
|
207
|
+
min?: number;
|
|
208
|
+
majorUnit?: number;
|
|
209
|
+
minorUnit?: number;
|
|
210
|
+
}
|
|
211
|
+
interface AxisTitle extends Element {
|
|
212
|
+
tx?: Text;
|
|
213
|
+
spPr?: ChartModel.ShapeProperties;
|
|
214
|
+
txPr?: ChartModel.TextBody;
|
|
215
|
+
}
|
|
216
|
+
/** `cx:units`: the axis labels in hundreds, thousands… or as percentages. */
|
|
217
|
+
interface AxisUnits extends Element {
|
|
218
|
+
unit?: string;
|
|
219
|
+
unitsLabel?: AxisTitle;
|
|
220
|
+
}
|
|
221
|
+
interface Gridlines extends Element {
|
|
222
|
+
spPr?: ChartModel.ShapeProperties;
|
|
223
|
+
}
|
|
224
|
+
interface TickMarks extends Element {
|
|
225
|
+
type?: ChartModel.TickMark;
|
|
226
|
+
}
|
|
227
|
+
/** `cx:legend`. */
|
|
228
|
+
interface Legend extends Element {
|
|
229
|
+
pos?: SidePosition;
|
|
230
|
+
align?: PositionAlign;
|
|
231
|
+
overlay?: boolean;
|
|
232
|
+
spPr?: ChartModel.ShapeProperties;
|
|
233
|
+
txPr?: ChartModel.TextBody;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=_chartExMarkup.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The style and colors parts a 2016 chart is written with when it has none of its own: Excel 16
|
|
3
|
+
* refuses to open a workbook whose `cx:chartSpace` part lacks either, or has an empty one, and opens
|
|
4
|
+
* one that has any complete pair (measured 2026-10-17, `probe-chart-write.ps1`: every 2016 type with
|
|
5
|
+
* the waterfall's style opens clean). These are the parts Excel 16 wrote for a new waterfall
|
|
6
|
+
* (`probe-chart-chartex.ps1`, `chart-chartex.xlsx`); its colors part is the same for every type.
|
|
7
|
+
* Which style each type gets in Excel is in that file too; writing each type its own is Phase 4's
|
|
8
|
+
* style tables.
|
|
9
|
+
*/
|
|
10
|
+
export declare const CHART_STYLE_PART: {
|
|
11
|
+
type: string;
|
|
12
|
+
contentType: string;
|
|
13
|
+
name: string;
|
|
14
|
+
xml: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const CHART_COLORS_PART: {
|
|
17
|
+
type: string;
|
|
18
|
+
contentType: string;
|
|
19
|
+
name: string;
|
|
20
|
+
xml: string;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=_chartExStyle.d.ts.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { XmlElement } from './_XmlTree';
|
|
2
|
+
import { Scope, XmlWriter } from './_xml';
|
|
3
|
+
/** What one read of a part shares. */
|
|
4
|
+
export declare class ReadContext {
|
|
5
|
+
readonly xml: string;
|
|
6
|
+
readonly rootScope: Scope;
|
|
7
|
+
/** Elements kept as markup because the model could not state them exactly. */
|
|
8
|
+
kept: number;
|
|
9
|
+
/** Children read out of schema order, which a writer puts back in it. */
|
|
10
|
+
reordered: number;
|
|
11
|
+
/** How the writer's `c:`, `cx:` and `a:` read in this part: the part's own namespaces. */
|
|
12
|
+
readonly writeScope: Scope;
|
|
13
|
+
constructor(xml: string, rootScope: Scope);
|
|
14
|
+
/**
|
|
15
|
+
* The source markup of `element`, made to stand alone: a namespace declared between the root
|
|
16
|
+
* and the element is declared on it.
|
|
17
|
+
*/
|
|
18
|
+
markupOf(element: XmlElement, scope: Scope): string;
|
|
19
|
+
}
|
|
20
|
+
export type Vocabulary = 'c' | 'a' | 'c15' | 'cx';
|
|
21
|
+
export interface AttributeSpec {
|
|
22
|
+
name: string;
|
|
23
|
+
key: string;
|
|
24
|
+
read(text: string): unknown;
|
|
25
|
+
write(value: any): string;
|
|
26
|
+
}
|
|
27
|
+
export interface FieldSpec {
|
|
28
|
+
/** The local names the field reads; more than one for a choice (`noFill`, `solidFill`…). */
|
|
29
|
+
tags: readonly string[];
|
|
30
|
+
key: string;
|
|
31
|
+
ns: Vocabulary;
|
|
32
|
+
many?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The value of `element`, or `undefined` when the model cannot state it: it is then kept as
|
|
35
|
+
* markup. `scope` includes what `element` declares itself.
|
|
36
|
+
*/
|
|
37
|
+
read(element: XmlElement, scope: Scope, context: ReadContext): unknown;
|
|
38
|
+
write(writer: XmlWriter, value: any): void;
|
|
39
|
+
/** Where the value lives on its holder, when that is not `key`: one child that states several fields. */
|
|
40
|
+
get?(holder: any): unknown;
|
|
41
|
+
set?(holder: any, value: any): void;
|
|
42
|
+
}
|
|
43
|
+
export interface Codec {
|
|
44
|
+
attributes?: readonly AttributeSpec[];
|
|
45
|
+
fields: readonly FieldSpec[];
|
|
46
|
+
/** Called with what was read, before it is returned. */
|
|
47
|
+
afterRead?(value: any, element: XmlElement, scope: Scope, context: ReadContext): void;
|
|
48
|
+
/**
|
|
49
|
+
* Attributes written besides the stated ones, unless the element kept the same attribute as
|
|
50
|
+
* read: a namespace an extension declares for its children (`xmlns:c15`), as Excel does.
|
|
51
|
+
*/
|
|
52
|
+
declares?(value: any): readonly [string, string][];
|
|
53
|
+
}
|
|
54
|
+
/** Reads `element` by `codec`. `scope` is the scope `element` sits in. */
|
|
55
|
+
export declare const readElement: (element: XmlElement, codec: Codec, scope: Scope, context: ReadContext) => any;
|
|
56
|
+
/** Writes `value` as the element `name` by `codec`. */
|
|
57
|
+
export declare const writeElement: (writer: XmlWriter, name: string, value: any, codec: Codec) => void;
|
|
58
|
+
export declare const qualified: (ns: Vocabulary, tag: string) => string;
|
|
59
|
+
/** A value element of `kind`: `<c:tag val="…"/>`. A `bool` with no `val` is `true`, as `CT_Boolean` says. */
|
|
60
|
+
export declare const val: (tag: string, kind: "bool" | "int" | "num" | "str", key?: string, ns?: Vocabulary) => FieldSpec;
|
|
61
|
+
/** An element holding only text: `<c:f>Sheet1!$A$1</c:f>`. */
|
|
62
|
+
export declare const text: (tag: string, key?: string, ns?: Vocabulary) => FieldSpec;
|
|
63
|
+
/** A child element read by its own codec; `many` for one that repeats. */
|
|
64
|
+
export declare const element: (tag: string, codec: Codec | (() => Codec), key?: string, options?: {
|
|
65
|
+
many?: boolean;
|
|
66
|
+
ns?: Vocabulary;
|
|
67
|
+
}) => FieldSpec;
|
|
68
|
+
/** An attribute of `kind`. `scale` divides what the file states: `sz="1400"` with `scale` 100 is `14`. */
|
|
69
|
+
export declare const attribute: (name: string, kind: "bool" | "int" | "num" | "str", key?: string, scale?: number) => AttributeSpec;
|
|
70
|
+
/** An attribute stated as one of two words: `b="1"` for `weight: 700`. */
|
|
71
|
+
export declare const mappedAttribute: (name: string, key: string, read: (text: string) => unknown, write: (value: any) => string) => AttributeSpec;
|
|
72
|
+
/**
|
|
73
|
+
* `field`, but its value is kept only when writing it gives back markup of the same canonical
|
|
74
|
+
* form; otherwise the element stays as markup. For values the model states in other units or
|
|
75
|
+
* spellings than the file (colors, angles, fills).
|
|
76
|
+
*/
|
|
77
|
+
export declare const exact: (field: FieldSpec) => FieldSpec;
|
|
78
|
+
//# sourceMappingURL=_codec.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Codec } from './_codec';
|
|
2
|
+
import { XmlWriter } from './_xml';
|
|
3
|
+
export declare const writeColor: (writer: XmlWriter, color: string) => void;
|
|
4
|
+
/** `c:spPr`. */
|
|
5
|
+
export declare const SHAPE_PROPERTIES: Codec;
|
|
6
|
+
/** `a:rPr`, `a:defRPr`, `a:endParaRPr`. */
|
|
7
|
+
export declare const RUN_PROPERTIES: Codec;
|
|
8
|
+
/** `c:txPr`, `c:rich`: `a:bodyPr`, `a:lstStyle`, `a:p`. */
|
|
9
|
+
export declare const TEXT_BODY: Codec;
|
|
10
|
+
//# sourceMappingURL=_drawingml.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { XmlElement } from './_XmlTree';
|
|
2
|
+
export declare const NS: {
|
|
3
|
+
readonly c: "http://schemas.openxmlformats.org/drawingml/2006/chart";
|
|
4
|
+
readonly cStrict: "http://purl.oclc.org/ooxml/drawingml/chart";
|
|
5
|
+
readonly a: "http://schemas.openxmlformats.org/drawingml/2006/main";
|
|
6
|
+
readonly aStrict: "http://purl.oclc.org/ooxml/drawingml/main";
|
|
7
|
+
readonly r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
8
|
+
readonly rStrict: "http://purl.oclc.org/ooxml/officeDocument/relationships";
|
|
9
|
+
readonly c15: "http://schemas.microsoft.com/office/drawing/2012/chart";
|
|
10
|
+
readonly cx: "http://schemas.microsoft.com/office/drawing/2014/chartex";
|
|
11
|
+
readonly xml: "http://www.w3.org/XML/1998/namespace";
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The prefixes the writer spells the vocabularies with. `c15` is written only inside markup that
|
|
15
|
+
* declares it so: an extension states its own namespace.
|
|
16
|
+
*/
|
|
17
|
+
export declare const WRITE_PREFIX: {
|
|
18
|
+
readonly c: "c";
|
|
19
|
+
readonly a: "a";
|
|
20
|
+
readonly r: "r";
|
|
21
|
+
readonly c15: "c15";
|
|
22
|
+
readonly cx: "cx";
|
|
23
|
+
};
|
|
24
|
+
export declare const isChartNs: (uri: string | undefined) => boolean;
|
|
25
|
+
export declare const isDrawingNs: (uri: string | undefined) => boolean;
|
|
26
|
+
export declare const isChartExNs: (uri: string | undefined) => boolean;
|
|
27
|
+
/** Prefix to namespace, `''` for the default namespace. */
|
|
28
|
+
export type Scope = Readonly<Record<string, string>>;
|
|
29
|
+
export declare const EMPTY_SCOPE: Scope;
|
|
30
|
+
/** An element's attributes in source order, values decoded. */
|
|
31
|
+
export declare const readAttributes: (element: XmlElement) => [name: string, value: string][];
|
|
32
|
+
/** The scope inside `element`: `scope` plus the namespaces the element declares. */
|
|
33
|
+
export declare const scopeOf: (element: XmlElement, scope: Scope) => Scope;
|
|
34
|
+
/** The namespace of an element, in the scope that holds it (its own declarations included). */
|
|
35
|
+
export declare const namespaceOf: (element: XmlElement, inner: Scope) => string | undefined;
|
|
36
|
+
/** Builds markup. Names are written as given; text and attribute values are escaped. */
|
|
37
|
+
export declare class XmlWriter {
|
|
38
|
+
private readonly _parts;
|
|
39
|
+
open(name: string, attributes?: readonly (readonly [string, string])[] | null, empty?: boolean): this;
|
|
40
|
+
close(name: string): this;
|
|
41
|
+
/** `<name val="value"/>`. */
|
|
42
|
+
val(name: string, value: string): this;
|
|
43
|
+
text(text: string): this;
|
|
44
|
+
/** Markup written as it is. */
|
|
45
|
+
raw(markup: string): this;
|
|
46
|
+
toString(): string;
|
|
47
|
+
}
|
|
48
|
+
export declare const encodeAttribute: (value: string) => string;
|
|
49
|
+
/** `"1"`/`"0"` for a schema boolean, `null` for anything else. */
|
|
50
|
+
export declare const readBoolean: (text: string) => boolean | null;
|
|
51
|
+
export declare const writeBoolean: (value: boolean) => string;
|
|
52
|
+
/**
|
|
53
|
+
* An attribute value in canonical form: a schema boolean as `1`/`0` and a number as the shortest
|
|
54
|
+
* spelling of its value, so `true` and `1`, or `100` and `100.0`, compare equal.
|
|
55
|
+
*/
|
|
56
|
+
export declare const canonicalValue: (value: string) => string;
|
|
57
|
+
/**
|
|
58
|
+
* Markup in canonical form: namespaces resolved (prefixes and where they are declared do not
|
|
59
|
+
* matter), attributes sorted with their values in {@link canonicalValue} form, whitespace between
|
|
60
|
+
* elements and comments dropped, and a chart `CT_Boolean` with no `val` given its default.
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* Two pieces of markup with the same canonical form mean the same thing to a reader of the schema.
|
|
64
|
+
* This is the equality the chart model's round trip is held to. With `anyOrder` the order of an
|
|
65
|
+
* element's children does not count either: for a part that states them out of schema order.
|
|
66
|
+
*/
|
|
67
|
+
export declare const canonicalize: (element: XmlElement, scope: Scope, anyOrder?: boolean) => string;
|
|
68
|
+
/** The canonical form of a fragment of markup, its prefixes read in `scope`; `null` if it holds no element. */
|
|
69
|
+
export declare const canonicalizeMarkup: (markup: string, scope: Scope) => string | null;
|
|
70
|
+
//# sourceMappingURL=_xml.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IDocumentProperties } from '@sheetxl/sdk';
|
|
2
|
+
import { CustomPropertyEntry } from './domVisitors/AppPropertiesVisitor';
|
|
3
|
+
/** A `docProps` child as the property visitors read it: its local name and text. */
|
|
4
|
+
interface PropertyEntry {
|
|
5
|
+
key: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The workbook's document properties from the three parts' property lists, or `undefined` when
|
|
10
|
+
* they hold none.
|
|
11
|
+
*
|
|
12
|
+
* @param warn Told about each custom property that is dropped.
|
|
13
|
+
*/
|
|
14
|
+
export declare const readDocumentProperties: (core: PropertyEntry[] | undefined, app: PropertyEntry[] | undefined, custom?: CustomPropertyEntry[], warn?: (message: string, onceKey: string) => void) => IDocumentProperties.JSON | undefined;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=DocumentPropertiesRead.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IWorkbook,
|
|
1
|
+
import { IWorkbook, IWorksheet } from '@sheetxl/sdk';
|
|
2
2
|
/** What a cell's `<f>` turned out to be. */
|
|
3
3
|
export type Unwrapped =
|
|
4
4
|
/** Not a wrapper — use the text as-is. */
|
|
@@ -54,5 +54,5 @@ export declare const extractFunctionNames: (text: string) => string[];
|
|
|
54
54
|
* and are cleared BEFORE the anchor's formula is restored, since the restored formula needs those
|
|
55
55
|
* cells free to spill into. Placeholders of an unresolved anchor keep their values.
|
|
56
56
|
*/
|
|
57
|
-
export declare const applyDummyFunctionUnwrap: (workbook: IWorkbook, records: DummyWrapRecord[], sheetsByRef: Map<object,
|
|
57
|
+
export declare const applyDummyFunctionUnwrap: (workbook: IWorkbook, records: DummyWrapRecord[], sheetsByRef: Map<object, IWorksheet>) => void;
|
|
58
58
|
//# sourceMappingURL=DummyFunctionUnwrap.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Moves `<col style>` and `<row s customFormat>` off the headers and into each sheet's direct styles,
|
|
4
|
+
* as whole-column and whole-row ranges.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Where they cross, a cell's own style wins over its row's, and a row's over its column's: Excel
|
|
8
|
+
* resolves a cell with no `<c>` from its row first. A cell the file lists with no style is Normal
|
|
9
|
+
* there (the sheet visitor records it as style 0), while an unstyled block with nothing over it is
|
|
10
|
+
* dropped.
|
|
11
|
+
*
|
|
12
|
+
* Runs after `applyHiddenFormulas`, which counts the header styles a sheet uses.
|
|
13
|
+
*/
|
|
14
|
+
export declare const applyHeaderStyles: (jsonWB: IWorkbook.JSON) => void;
|
|
15
|
+
//# sourceMappingURL=HeaderStyles.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
2
|
+
/** The `paramMap` key under which the styles part leaves its `hidden="1"` cell xf indices. */
|
|
3
|
+
export declare const HIDDEN_XFS_PARAM = "hiddenXfs";
|
|
4
|
+
/**
|
|
5
|
+
* Turns xlsx's per-format `hidden` into the model's sheet `showFormulas` plus per-format grants.
|
|
6
|
+
*
|
|
7
|
+
* A formula shows when the sheet OR its format allows it; xlsx only has the format's `hidden`. So a
|
|
8
|
+
* sheet that uses any hidden format reads as `showFormulas: false` (an unprotected one keeping it as
|
|
9
|
+
* `sheet: true` protection), and every format it uses
|
|
10
|
+
* without `hidden="1"` is granted `showFormulas: true`. The formats are counted from the merged style
|
|
11
|
+
* references (cells, rows, columns, and xf 0 unless columns style everything), never per cell. xf 0 is Normal, so
|
|
12
|
+
* its grant goes on the Normal style, and the hidden formats say `false` outright rather than inherit
|
|
13
|
+
* it.
|
|
14
|
+
*/
|
|
15
|
+
export declare const applyHiddenFormulas: (jsonWB: IWorkbook.JSON, hiddenXfs: ReadonlySet<number> | undefined) => void;
|
|
16
|
+
//# sourceMappingURL=HiddenFormulas.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading a `t="d"` cell: an ISO 8601 date, time, date-time or duration (ECMA-376 §18.17.4).
|
|
3
|
+
*
|
|
4
|
+
* Excel never writes these, but openpyxl does when `wb.iso_dates` is set, and so does pandas
|
|
5
|
+
* through it. The model holds dates as serials, so the text becomes one here.
|
|
6
|
+
*
|
|
7
|
+
* The fields are taken as wall clock: a `Z` or a `±hh:mm` offset is accepted and ignored, which
|
|
8
|
+
* is what openpyxl does on read. Nothing goes through a JS `Date`, which would bring a timezone in
|
|
9
|
+
* and cannot express Excel's phantom `1900-02-29`.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* The serial for a `t="d"` cell's text, or `null` when the text is not one of the ISO forms or names
|
|
13
|
+
* a moment the date system cannot hold (before its epoch). The caller keeps the text then, so
|
|
14
|
+
* nothing is lost.
|
|
15
|
+
*
|
|
16
|
+
* @param text The cell's `<v>` text.
|
|
17
|
+
* @param date1904 Whether the workbook uses the 1904 date system.
|
|
18
|
+
*/
|
|
19
|
+
export declare const isoDateToSerial: (text: string, date1904?: boolean) => number | null;
|
|
20
|
+
//# sourceMappingURL=IsoDateCell.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IRange, IDataTable } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* The table a `TABLE(...)` formula describes, read at the table's first result cell; `null` when it
|
|
4
|
+
* is not a table laid out as Excel lays one out.
|
|
5
|
+
*
|
|
6
|
+
* @param text The formula text as it reads at the first result cell (relative references resolved
|
|
7
|
+
* there).
|
|
8
|
+
* @param results The result cells: the rectangle every cell of which carries this formula.
|
|
9
|
+
*/
|
|
10
|
+
export declare const readLibreOfficeDataTable: (text: string, results: IRange.Coords) => IDataTable.JSON | null;
|
|
11
|
+
//# sourceMappingURL=LibreOfficeDataTable.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
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 that names no table (a pivot or OLAP slicer) is left as the frame alone, as it was. A
|
|
19
|
+
* record whose table or column is not in the workbook is not imported: its frame is dropped and
|
|
20
|
+
* its parts are left to the package. Every slicer that is imported has its cache part, and the
|
|
21
|
+
* slicer part when every slicer of it was imported, marked absorbed.
|
|
22
|
+
*/
|
|
23
|
+
export declare function joinSlicers(jsonWorkbook: IWorkbook.JSON, options: SlicerJoinOptions): void;
|
|
24
|
+
//# sourceMappingURL=SlicerJoin.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sink a reader hands to everything it reads a part with.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* Load warnings belong to the host, which decides whether to show them — the CLI, for one, gates
|
|
6
|
+
* them on its log level. A warning written straight to the console has left that channel and
|
|
7
|
+
* cannot be silenced, so every transform a reader runs is given one of these.
|
|
8
|
+
*
|
|
9
|
+
* `context` locates the finding (the OPC path of the part, plus a sheet path where there is one).
|
|
10
|
+
* `onceKey` is {@link WarningOptions.onceKey}, carried from the emit site.
|
|
11
|
+
*/
|
|
12
|
+
export type OnWarning = (message: string, context?: string, onceKey?: string) => void;
|
|
13
|
+
/** What an emit site may say about the warning it is raising, beyond its text. */
|
|
14
|
+
export interface WarningOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Reports only the first warning carrying this key, for one read.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Whether a warning means "this kind of thing, once" or "this specific thing" is known only
|
|
20
|
+
* where it is raised, so the key is the emit site's to give: a finding that names the shape it
|
|
21
|
+
* found is one per shape without a key, and one per file with one.
|
|
22
|
+
*
|
|
23
|
+
* Keys are stable dotted identifiers owned by this package, such as `xlsx.drawing.fixedShape`.
|
|
24
|
+
* Never derive one from the message text — rewording or localizing a message must not change
|
|
25
|
+
* what collapses. The first occurrence is the one reported, message and context both.
|
|
26
|
+
*/
|
|
27
|
+
onceKey?: string;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=Warning.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,37 @@
|
|
|
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
|
+
}
|
|
33
|
+
/** A sheet's JSON with the slicer records read for it, by slicer name. */
|
|
34
|
+
export interface SheetSlicerRecords {
|
|
35
|
+
slicers?: Record<string, SlicerRecord>;
|
|
36
|
+
}
|
|
37
|
+
//# 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
|