@sheetxl/io-xlsx 0.8.0-beta.2 → 0.8.0-beta.20
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/Bw35-W8cnzxxvqQy.mjs +104 -0
- package/browser/esm/{CMHb6pUUmsCP9r_9.mjs → C16bEh6IrUpJONhS.mjs} +3 -3
- package/browser/esm/CPK1-z95jtLOfCXG.mjs +2474 -0
- package/browser/esm/CSOuRlSN9bhykqDr.mjs +4627 -0
- package/browser/esm/{DhqYgh9G2vLn7mIE.mjs → D2872f7aTugYxhht.mjs} +3 -3
- package/browser/esm/D7ogsrtXfjU5NW7r.mjs +10312 -0
- package/browser/esm/D8CQKL3Y3CMFOPqD.mjs +7007 -0
- package/browser/esm/{CMzkLUwbgA73RvCb.mjs → DpPFQ7-tBwVyjvWr.mjs} +3 -3
- package/browser/esm/{IZf0hIeLYj3T0Xvu.mjs → PgUWs0pPSCSFYJtU.mjs} +194 -144
- package/browser/esm/RFSuXvJ9sgsaA2LC.mjs +2433 -0
- package/browser/esm/{_UDbQq5-pHbU1f82.mjs → S4Uq85YdUb6O5Pz0.mjs} +2 -2
- package/browser/esm/index.mjs +3 -4
- package/licenses/dependencies.txt +2 -2
- package/node/esm/BOAucs-qLpjtUOcZ.mjs +6957 -0
- package/node/esm/{CY-pSutJLHskZfXZ.mjs → BSHqfcsR9hY-JB30.mjs} +2 -2
- package/node/esm/{CB1ijGbhl-e2l6Mm.mjs → C6eSWtTkyDQKbQdT.mjs} +3 -3
- package/node/esm/{Bi_kZVtZams7taqa.mjs → CPhiu1T7tl-leKh2.mjs} +3 -3
- package/node/esm/D2vDZOgLcv-YiWnB.mjs +4741 -0
- package/node/esm/DFw0ibBUmPyd-wey.mjs +2479 -0
- package/node/esm/DGuQIj077oygCTGu.mjs +2562 -0
- package/node/esm/Qn2Bv4QG3mOLiJHh.mjs +7269 -0
- package/node/esm/index.mjs +65 -28
- package/package.json +8 -9
- 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 +7 -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 +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/ThreadedCommentVisitor.d.ts +9 -0
- 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 +88 -35
- 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 +10 -4
- 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/ThreadedCommentsEmitter.d.ts +7 -1
- 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 +6 -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/B6sirGz6w-Bm7Ofo.cjs +0 -1
- package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
- package/browser/cjs/BzOEBR0jaxXg9wvt.cjs +0 -5
- package/browser/cjs/C8oC1tPbhgR0Dqtx.cjs +0 -2
- package/browser/cjs/CIpMN7SDVREKQUQE.cjs +0 -6
- package/browser/cjs/Ca-xJDjg5bOpUPXX.cjs +0 -1
- package/browser/cjs/D3EWCPfCu-qMOIGd.cjs +0 -1
- package/browser/cjs/DULsYP_GcPGLVYSE.cjs +0 -11
- package/browser/cjs/DtBN3UOzNJjYBwJ6.cjs +0 -1
- package/browser/cjs/index.cjs +0 -1
- package/browser/cjs/sNZR19Wk-XQ2xZ9E.cjs +0 -1
- package/browser/cjs/xQ6-wbTw5UzZUM1Y.cjs +0 -1
- package/browser/esm/B9q618XELV7uWJsA.mjs +0 -67
- package/browser/esm/BwbMurFOptAFs7gC.mjs +0 -5214
- package/browser/esm/D75_rfogFUfXADKc.mjs +0 -3324
- package/browser/esm/DfuBawaydlvgZMR-.mjs +0 -4428
- package/browser/esm/DoMlKUCnMSlR2qX5.mjs +0 -159
- package/browser/esm/DtpWa7tZahylJ3HS.mjs +0 -2310
- package/node/esm/BD03jrMQ_UKA196-.mjs +0 -4535
- package/node/esm/BxHvzSROx_N_7nJH.mjs +0 -2356
- package/node/esm/CO1M1H1N6fB422K-.mjs +0 -2959
- package/node/esm/CWpezSa6TERGEv-B.mjs +0 -3410
- package/node/esm/Dezt2uIDqlxjiuk5.mjs +0 -170
- 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
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { IWorkbook } from '@sheetxl/sdk';
|
|
2
|
-
/**
|
|
3
|
-
* The default upper bound, in decompressed bytes, on what a {@link SourcePackage} will retain.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* Applies to the retained parts only — worksheet/chartsheet bodies and shared strings are never
|
|
7
|
-
* retained (they are always model-owned and rewritten on every save), so this is not the file's
|
|
8
|
-
* uncompressed size, just the "side parts" (styles, drawings, media, printer settings, …) that
|
|
9
|
-
* would otherwise be copied through untouched. See `DESIGN-PACKAGE-PASSTHROUGH.md`.
|
|
10
|
-
*/
|
|
11
2
|
export declare const SOURCE_PACKAGE_MAX_BYTES: number;
|
|
12
3
|
/**
|
|
13
4
|
* A part's still-compressed bytes, sliced directly out of the source zip's local file header —
|
|
@@ -27,17 +18,6 @@ export interface SourcePackagePart {
|
|
|
27
18
|
/** Present when the source's compressed bytes could be sliced out directly; see {@link SourcePackageRawPart}. */
|
|
28
19
|
readonly raw?: SourcePackageRawPart;
|
|
29
20
|
}
|
|
30
|
-
/**
|
|
31
|
-
* The parts of a source OOXML package that SheetXL read but does not model — retained verbatim so
|
|
32
|
-
* a save can pass them through instead of silently dropping them. See
|
|
33
|
-
* `DESIGN-PACKAGE-PASSTHROUGH.md`.
|
|
34
|
-
*
|
|
35
|
-
* @remarks
|
|
36
|
-
* Not a residue map: this holds every non-streamed part from the source zip, decompressed. Which
|
|
37
|
-
* of those a save actually copies through (vs. an emitter claiming the path, vs. a drop-bucket
|
|
38
|
-
* rule) is decided at write time, not here. The one thing it is told rather than holding is
|
|
39
|
-
* {@link isAbsorbed} — which parts the read put on the model, so the writer need not guess.
|
|
40
|
-
*/
|
|
41
21
|
export declare class SourcePackage {
|
|
42
22
|
private readonly _parts;
|
|
43
23
|
private readonly _absorbed;
|
|
@@ -47,33 +27,9 @@ export declare class SourcePackage {
|
|
|
47
27
|
getNames(): string[];
|
|
48
28
|
has(name: string): boolean;
|
|
49
29
|
getPart(name: string): SourcePackagePart | null;
|
|
50
|
-
/**
|
|
51
|
-
* Whether the reader took this part onto the model, so a save writes it from there rather than
|
|
52
|
-
* copying it through — see `DESIGN-PACKAGE-PASSTHROUGH.md` §4.
|
|
53
|
-
*
|
|
54
|
-
* @remarks
|
|
55
|
-
* Identity only: a name, never content. What each absorbed part *says* lives on the model that
|
|
56
|
-
* absorbed it (a chart's part on its movable, a sheet's VML on the sheet, a cache's definition on
|
|
57
|
-
* the workbook), which is the whole point of `PLAN-MODEL-HOMES.md` — this set exists so the
|
|
58
|
-
* passthrough can tell "the model owns this one" from "nothing modeled it" without a list of path
|
|
59
|
-
* patterns standing in for the answer.
|
|
60
|
-
*
|
|
61
|
-
* Independent of whether the element that cited the part still exists: deleting the chart deletes
|
|
62
|
-
* its part with it, and the source's copy should go too.
|
|
63
|
-
*/
|
|
64
30
|
isAbsorbed(name: string): boolean;
|
|
65
31
|
/** Sum of {@link SourcePackagePart.data}'s byte lengths across every retained part. */
|
|
66
32
|
getTotalBytes(): number;
|
|
67
|
-
/**
|
|
68
|
-
* A one-way latch: once true, stays true for this package's lifetime (i.e. until the origin is
|
|
69
|
-
* closed and a fresh read replaces it). Set by the reader when it detects a structural edit —
|
|
70
|
-
* sheet add/delete/reorder, row/column insert/delete — since the read that produced this package.
|
|
71
|
-
*
|
|
72
|
-
* @remarks
|
|
73
|
-
* Deliberately never resets on an undo: an undo doesn't guarantee the exact original XML-level
|
|
74
|
-
* geometry a preserved part assumed, and the parts this gates (`DESIGN-PACKAGE-PASSTHROUGH.md`
|
|
75
|
-
* §4's drop-if-structure-changed bucket) are exactly the ones a wrong guess here would corrupt.
|
|
76
|
-
*/
|
|
77
33
|
hasStructuralChange(): boolean;
|
|
78
34
|
markStructuralChange(): void;
|
|
79
35
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { IRange, ISparklineGroup } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* `x14:sparklineGroups` ({@link EXT_URI_SPARKLINE_GROUPS}) as the sheet JSON keeps it.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* The file states one `x14:sparkline` per cell, each with its own `xm:f`. The reader states them
|
|
7
|
+
* so; the group folds them into ranges that read alike on load, and the writer asks the group
|
|
8
|
+
* what each cell reads.
|
|
9
|
+
*
|
|
10
|
+
* Attributes are kept when they differ from the schema's default (MS-XLSX `CT_SparklineGroup`),
|
|
11
|
+
* which is what an absent attribute means to Excel, so a resave states what the file stated.
|
|
12
|
+
*/
|
|
13
|
+
/** The eight color children, in the schema's order. */
|
|
14
|
+
export declare const SPARKLINE_COLOR_KEYS: readonly ["colorSeries", "colorNegative", "colorAxis", "colorMarkers", "colorFirst", "colorLast", "colorHigh", "colorLow"];
|
|
15
|
+
export type SparklineColorKey = typeof SPARKLINE_COLOR_KEYS[number];
|
|
16
|
+
/**
|
|
17
|
+
* The group's properties from its attributes.
|
|
18
|
+
*
|
|
19
|
+
* @param attributes The element's attributes, as read.
|
|
20
|
+
*/
|
|
21
|
+
export declare function readSparklineGroupAttributes(attributes: Readonly<Record<string, string>>): ISparklineGroup.Properties;
|
|
22
|
+
/**
|
|
23
|
+
* The attributes a group is written with: what differs from the schema's default, and `rest`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function sparklineGroupAttributes(properties: Readonly<ISparklineGroup.Properties>): Record<string, string | number>;
|
|
26
|
+
/**
|
|
27
|
+
* A group read from the file, as the sheet JSON's reference: one range and its data per cell, in
|
|
28
|
+
* file order. The group folds them into ranges when it loads. `null` for a group with no
|
|
29
|
+
* sparkline.
|
|
30
|
+
*/
|
|
31
|
+
export declare function toSparklineGroupRef(properties: ISparklineGroup.Properties, entries: readonly {
|
|
32
|
+
location: IRange.CellCoords;
|
|
33
|
+
data: string;
|
|
34
|
+
}[]): IRange.JSONReferenceEntry<ISparklineGroup.JSON> | null;
|
|
35
|
+
/**
|
|
36
|
+
* A data formula as the file states it: always on a sheet. A bare area names the group's own.
|
|
37
|
+
*/
|
|
38
|
+
export declare function qualifySparklineData(data: string, sheetName: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* A group's sparklines one per cell, as the file states them: the location as `xm:sqref` text and
|
|
41
|
+
* the data as `xm:f` text.
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* A cell's data is the address it reads. Where a range's data is not an area (a name, `#REF!`),
|
|
45
|
+
* the range's own text is written for each of its cells; an area a cell would read off the sheet
|
|
46
|
+
* is `#REF!`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function sparklinesOf(group: ISparklineGroup, sheetName: string): {
|
|
49
|
+
sqref: string;
|
|
50
|
+
f: string;
|
|
51
|
+
}[];
|
|
52
|
+
//# sourceMappingURL=SparklineGroups.d.ts.map
|
package/types/src/Types.d.ts
CHANGED
|
@@ -12,9 +12,8 @@ export interface WriteXLSXOptions extends IWorkbookIO.WriteOptions {
|
|
|
12
12
|
*
|
|
13
13
|
* @remarks
|
|
14
14
|
* Set by the format registration, not by callers: `.xlsx` and `.xlsm` are two registered write
|
|
15
|
-
* formats sharing this one handler
|
|
16
|
-
*
|
|
17
|
-
* handler is never told which of its extensions is being written.
|
|
15
|
+
* formats sharing this one handler. A single format listing both extensions could not express
|
|
16
|
+
* this, because the handler is never told which of its extensions is being written.
|
|
18
17
|
*
|
|
19
18
|
* It decides **both halves together**, so the declaration can never disagree with the payload:
|
|
20
19
|
* the `xl/workbook.xml` content type, and whether a source package's `xl/vbaProject.bin` is
|
|
@@ -22,6 +21,17 @@ export interface WriteXLSXOptions extends IWorkbookIO.WriteOptions {
|
|
|
22
21
|
* what Excel's own *Save As* does.
|
|
23
22
|
*/
|
|
24
23
|
macroEnabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to write a template (`.xltx`, or `.xltm` with {@link macroEnabled}) rather than a
|
|
26
|
+
* workbook.
|
|
27
|
+
*
|
|
28
|
+
* @defaultValue false
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Set by the format registration, like {@link macroEnabled}. Only the `xl/workbook.xml` content
|
|
32
|
+
* type differs; Excel opens a template as a new, unsaved workbook made from it.
|
|
33
|
+
*/
|
|
34
|
+
template?: boolean;
|
|
25
35
|
/**
|
|
26
36
|
* Callback invoked when a part is emitted.
|
|
27
37
|
*
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ICellHeader } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* A row or column run as a sheet part carries it: the header's own state, plus the style and border
|
|
4
|
+
* flags xlsx keeps per row or column.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* The model has no header styles: a whole-row or whole-column style is a direct style over the whole
|
|
8
|
+
* row or column. The reader moves `s` there (`applyHeaderStyles`) and the writer works it out again
|
|
9
|
+
* (`layoutWorkbookStyles`).
|
|
10
|
+
*/
|
|
11
|
+
export interface XlsxHeader extends ICellHeader.JSON {
|
|
12
|
+
/** `<col style>` / `<row s customFormat="1">`: an index into the workbook's direct styles. */
|
|
13
|
+
s?: number;
|
|
14
|
+
/** `<row thickTop>`: the row gives a pixel to a thick line along its top. */
|
|
15
|
+
tt?: boolean;
|
|
16
|
+
/** `<row thickBot>`: the row gives a pixel to a medium or thick line along its bottom. */
|
|
17
|
+
tb?: boolean;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=XlsxHeader.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ChartModel } from '@sheetxl/sdk';
|
|
2
|
+
/** A chartex part as {@link readChartExSpace} reads it. */
|
|
3
|
+
export interface ChartExSpacePart {
|
|
4
|
+
model: ChartModel.ChartSpace;
|
|
5
|
+
/** How many elements were kept as markup because the model could not state them exactly. */
|
|
6
|
+
kept: number;
|
|
7
|
+
/** How many children the part states out of schema order (see `ChartSpacePart.reordered`). */
|
|
8
|
+
reordered: number;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the model states something otherwise than the part does, so a part written from it
|
|
11
|
+
* would differ (see `_chartExFold`). The part's own markup still writes back while the chart is
|
|
12
|
+
* untouched.
|
|
13
|
+
*/
|
|
14
|
+
lossy: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Reads a chartex part.
|
|
18
|
+
*
|
|
19
|
+
* @returns `null` when `xml` is not a `cx:chartSpace`.
|
|
20
|
+
*/
|
|
21
|
+
export declare const readChartExSpace: (xml: string) => ChartExSpacePart | null;
|
|
22
|
+
/**
|
|
23
|
+
* Writes a chartex part.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* The chart space keeps the namespace declarations it was read with; the `cx`, `a` and `r`
|
|
27
|
+
* prefixes the writer uses are declared when it has none. Groups of a type the part cannot state
|
|
28
|
+
* are left out.
|
|
29
|
+
*/
|
|
30
|
+
export declare const writeChartExSpace: (chartSpace: ChartModel.ChartSpace) => string;
|
|
31
|
+
/**
|
|
32
|
+
* The markup a chartex part is saved as: `xml` as it is while it states what `model` does, so a
|
|
33
|
+
* chart nothing has changed is written byte for byte; otherwise the part written from `model`.
|
|
34
|
+
*
|
|
35
|
+
* @param xml The markup the chart was read from, when the part still carries it.
|
|
36
|
+
*/
|
|
37
|
+
export declare const writeChartExPart: (model: ChartModel.ChartSpace, xml: string | undefined) => string;
|
|
38
|
+
//# sourceMappingURL=ChartExXml.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ChartModel } from '@sheetxl/sdk';
|
|
2
|
+
/** The two kinds of chart part: `c:chartSpace` and `cx:chartSpace`. */
|
|
3
|
+
export type ChartFamily = 'chart' | 'chartEx';
|
|
4
|
+
/** What a part of each family is, in the package and in the frame that cites it. */
|
|
5
|
+
export declare const CHART_PARTS: Readonly<Record<ChartFamily, {
|
|
6
|
+
relType: string;
|
|
7
|
+
contentType: string;
|
|
8
|
+
/** Where the part goes, beside the sheet's drawing. */
|
|
9
|
+
path: string;
|
|
10
|
+
/** The `graphicData` uri of a frame citing the part, and the namespace of its `chart` element. */
|
|
11
|
+
graphicUri: string;
|
|
12
|
+
}>>;
|
|
13
|
+
/** The family of a part, by the relationship that cites it. */
|
|
14
|
+
export declare const familyOfPart: (relType: string | undefined) => ChartFamily | null;
|
|
15
|
+
/** A chart part as {@link readChartModelPart} reads it. */
|
|
16
|
+
export interface ChartPartRead {
|
|
17
|
+
model: ChartModel.ChartSpace;
|
|
18
|
+
family: ChartFamily;
|
|
19
|
+
/** Elements kept as markup because the model could not state them exactly. */
|
|
20
|
+
kept: number;
|
|
21
|
+
/** Whether a part written from the model would state something otherwise (see `_chartExFold`). */
|
|
22
|
+
lossy: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Reads a chart part of either family.
|
|
26
|
+
*
|
|
27
|
+
* @returns `null` when `xml` is neither a `c:chartSpace` nor a `cx:chartSpace`.
|
|
28
|
+
*/
|
|
29
|
+
export declare const readChartModelPart: (xml: string) => ChartPartRead | null;
|
|
30
|
+
/** A chart part as {@link writeChartModelPart} writes it. */
|
|
31
|
+
export interface ChartPartWrite {
|
|
32
|
+
xml: string;
|
|
33
|
+
family: ChartFamily;
|
|
34
|
+
/** The types of the groups the part could not state, which are not in it. */
|
|
35
|
+
leftOut: string[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Writes a chart's model to the part its group types belong in.
|
|
39
|
+
*
|
|
40
|
+
* @param source The part the chart was read from: its family, and its markup while it still carries
|
|
41
|
+
* it. That markup is written as it is while it states what the model does.
|
|
42
|
+
*/
|
|
43
|
+
export declare const writeChartModelPart: (model: ChartModel.ChartSpace, source?: {
|
|
44
|
+
family?: ChartFamily | null;
|
|
45
|
+
xml?: string;
|
|
46
|
+
}) => ChartPartWrite;
|
|
47
|
+
//# sourceMappingURL=ChartPartXml.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ChartModel } from '@sheetxl/sdk';
|
|
2
|
+
/** A chart part as {@link readChartSpace} reads it. */
|
|
3
|
+
export interface ChartSpacePart {
|
|
4
|
+
model: ChartModel.ChartSpace;
|
|
5
|
+
/** How many elements were kept as markup because the model could not state them exactly. */
|
|
6
|
+
kept: number;
|
|
7
|
+
/**
|
|
8
|
+
* How many children the part states out of schema order. The model holds them; written back
|
|
9
|
+
* they come in schema order, so such a part is the same only apart from the order of children.
|
|
10
|
+
*/
|
|
11
|
+
reordered: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Reads a chart part.
|
|
15
|
+
*
|
|
16
|
+
* @returns `null` when `xml` is not a `c:chartSpace`: a `cx:chartSpace` (waterfall, treemap…) is
|
|
17
|
+
* read by `readChartExSpace`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const readChartSpace: (xml: string) => ChartSpacePart | null;
|
|
20
|
+
export declare const DECLARATION = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n";
|
|
21
|
+
/**
|
|
22
|
+
* Writes a chart part.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* The chart space keeps the namespace declarations it was read with; the `c`, `a` and `r` prefixes
|
|
26
|
+
* the writer uses are declared when it has none.
|
|
27
|
+
*/
|
|
28
|
+
export declare const writeChartSpace: (chartSpace: ChartModel.ChartSpace) => string;
|
|
29
|
+
/**
|
|
30
|
+
* The markup a chart part is saved as: `xml` as it is while it states what `model` does, so a
|
|
31
|
+
* chart nothing has changed is written byte for byte; otherwise the part written from `model`. A
|
|
32
|
+
* part stating a label position Excel refuses is always written from `model`, which leaves it out.
|
|
33
|
+
*
|
|
34
|
+
* @param xml The markup the chart was read from, when the part still carries it.
|
|
35
|
+
*/
|
|
36
|
+
export declare const writeChartPart: (model: ChartModel.ChartSpace, xml: string | undefined) => string;
|
|
37
|
+
//# sourceMappingURL=ChartSpaceXml.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A tree over a chart part's markup that remembers where each element is in the source.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* The chart reader keeps what it does not model as the source's own markup, so it needs each
|
|
6
|
+
* element's extent in the text, which a DOM does not give. Elements, attributes and character data
|
|
7
|
+
* only; comments and processing instructions are skipped.
|
|
8
|
+
*/
|
|
9
|
+
/** One element. `name` is the local name. */
|
|
10
|
+
export interface XmlElement {
|
|
11
|
+
name: string;
|
|
12
|
+
/** The name as the source spells it, prefix included. */
|
|
13
|
+
qname: string;
|
|
14
|
+
/** The attributes as the source spells them, undecoded. */
|
|
15
|
+
attrs: string;
|
|
16
|
+
children: (XmlElement | string)[];
|
|
17
|
+
/** Where the element starts in the source: at its open tag. */
|
|
18
|
+
start: number;
|
|
19
|
+
/** Just past the element's close tag, or past its open tag when it is empty. */
|
|
20
|
+
end: number;
|
|
21
|
+
/** Just past the open tag. */
|
|
22
|
+
contentStart: number;
|
|
23
|
+
/** At the close tag; equal to `contentStart` for an empty element. */
|
|
24
|
+
contentEnd: number;
|
|
25
|
+
}
|
|
26
|
+
export declare const decodeEntities: (text: string) => string;
|
|
27
|
+
/** Character data as it has to be spelled inside an element. */
|
|
28
|
+
export declare const encodeText: (text: string) => string;
|
|
29
|
+
/** The root element of `xml`, or `null` when there is none. */
|
|
30
|
+
export declare const parseFragment: (xml: string) => XmlElement | null;
|
|
31
|
+
export declare const childElements: (element: XmlElement) => XmlElement[];
|
|
32
|
+
/** The element's own character data; what its child elements hold is not read. */
|
|
33
|
+
export declare const readCharacters: (element: XmlElement) => string;
|
|
34
|
+
//# sourceMappingURL=_XmlTree.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChartModel } from '@sheetxl/sdk';
|
|
2
|
+
import { Codec } from './_codec';
|
|
3
|
+
import { XmlWriter } from './_xml';
|
|
4
|
+
export declare const NUMBER_FORMAT: Codec;
|
|
5
|
+
/** The DrawingML element name of a group. */
|
|
6
|
+
export declare const groupElementName: (group: Pick<ChartModel.Group, "type" | "is3D">) => string;
|
|
7
|
+
/** Whether a group, a series or a point of the chart states a `dLblPos` its type does not offer. */
|
|
8
|
+
export declare const statesRefusedLabelPosition: (chartSpace: ChartModel.ChartSpace) => boolean;
|
|
9
|
+
/** `c:chartSpace`. */
|
|
10
|
+
export declare const CHART_SPACE: Codec;
|
|
11
|
+
export declare const writeChartSpaceElement: (writer: XmlWriter, chartSpace: ChartModel.ChartSpace) => void;
|
|
12
|
+
//# sourceMappingURL=_chartCodecs.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChartExMarkup } from './_chartExMarkup';
|
|
2
|
+
import { Codec } from './_codec';
|
|
3
|
+
import { XmlWriter } from './_xml';
|
|
4
|
+
/** `cx:chartSpace`. */
|
|
5
|
+
export declare const CHART_EX_SPACE: Codec;
|
|
6
|
+
export declare const writeChartExSpaceElement: (writer: XmlWriter, chartSpace: ChartExMarkup.ChartSpace) => void;
|
|
7
|
+
//# sourceMappingURL=_chartExCodecs.d.ts.map
|
|
@@ -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,13 @@
|
|
|
1
|
+
export declare const CHART_STYLE_PART: {
|
|
2
|
+
type: string;
|
|
3
|
+
contentType: string;
|
|
4
|
+
name: string;
|
|
5
|
+
xml: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const CHART_COLORS_PART: {
|
|
8
|
+
type: string;
|
|
9
|
+
contentType: string;
|
|
10
|
+
name: string;
|
|
11
|
+
xml: string;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=_chartExStyle.d.ts.map
|