@sheetxl/io-xlsx 0.8.0-beta.15 → 0.8.0-beta.16
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/BQaNticMfvf7-y0L.mjs +2474 -0
- package/browser/esm/{BFHIFwfouCmmizKM.mjs → BalqIL4s8nR3NbK8.mjs} +2528 -1702
- package/browser/esm/{DPgI3veM7LuSesNu.mjs → BiueQ3eVPDOEdEeL.mjs} +1321 -1087
- package/browser/esm/{DsepJB2krbe8n-h0.mjs → BtLo1V0gnJ3ktOw9.mjs} +2 -2
- package/browser/esm/{VJT_B2rC29Twv3oJ.mjs → C3H8HKjSun-wLDrE.mjs} +5 -5
- package/browser/esm/{CbQ6xSA_Ryc9x49z.mjs → CCGqD5BzdZMq2pTI.mjs} +2 -2
- package/browser/esm/{B0as56gGm8o91eha.mjs → DT-3sV5qGuHTFmnB.mjs} +3295 -2163
- package/browser/esm/{CirSa4nJDHuHyGFb.mjs → W3dYk6brWDUtMZca.mjs} +3 -3
- package/browser/esm/{B5T6ZjCOm6tpqIxy.mjs → X5YJn8ZwrgDKMwwO.mjs} +3 -3
- package/browser/esm/{CVAAfrHVJ6jjaD4l.mjs → ekV6d7YNDF6FkKLw.mjs} +423 -318
- package/browser/esm/{cD_3iBL0XZP3GHGG.mjs → idgOmd_zpVTKLyek.mjs} +3 -3
- package/browser/esm/index.mjs +3 -3
- package/node/esm/{B_bFXQdvg63_jXXv.mjs → BO8o53Yo-gLFNELS.mjs} +3 -3
- package/node/esm/{CcMI8GfS94qlNCB0.mjs → BT0HKieizRDqDegH.mjs} +440 -330
- package/node/esm/BmIrpH_719z1aqvw.mjs +2562 -0
- package/node/esm/CJYMs5EGkLOZKyF0.mjs +4676 -0
- package/node/esm/{CQ3fUb7A8HUgTAIh.mjs → CZsPzV1CsMPKiICx.mjs} +2 -2
- package/node/esm/CdFqKswnjeM_u8-g.mjs +7242 -0
- package/node/esm/CnYiZh1EVKY4BNVs.mjs +6851 -0
- package/node/esm/{Cz6FfReTe9Ps5moN.mjs → OO5K_WYvAj-UV14K.mjs} +3 -3
- package/node/esm/index.mjs +5 -5
- package/package.json +4 -4
- package/types/src/AutoFilterRules.d.ts +26 -4
- package/types/src/OOXMLExtensions.d.ts +12 -1
- 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/PivotButtons.d.ts +14 -0
- package/types/src/reader/PivotCellFormats.d.ts +22 -0
- package/types/src/reader/SlicerJoin.d.ts +6 -4
- package/types/src/reader/_SlicerRecord.d.ts +22 -0
- package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +5 -0
- package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +6 -2
- package/types/src/reader/domVisitors/SlicersVisitor.d.ts +2 -0
- package/types/src/reader/domVisitors/TimelinesVisitor.d.ts +13 -0
- package/types/src/reader/domVisitors/index.d.ts +2 -0
- package/types/src/writer/EvaluationSheet.d.ts +5 -0
- package/types/src/writer/builder/Types.d.ts +13 -0
- package/types/src/writer/emitters/PivotTableEmitter.d.ts +30 -1
- package/types/src/writer/emitters/SlicerEmitter.d.ts +81 -18
- package/types/src/writer/emitters/StylesEmitter.d.ts +32 -1
- package/types/src/writer/emitters/WorkbookEmitter.d.ts +19 -2
- package/types/src/writer/utils/DateSystem.d.ts +6 -0
- package/types/src/writer/utils/XfVariants.d.ts +61 -0
- package/browser/esm/CE5CJXtA1SK_ve3k.mjs +0 -2265
- package/node/esm/B0IbtakI6lvldj5N.mjs +0 -5693
- package/node/esm/C87CEL-9kIrXknM_.mjs +0 -2346
- package/node/esm/CPb9rk-UywrH-U7Y.mjs +0 -4437
- package/node/esm/Dw3qQRUIJShJWc_D.mjs +0 -6367
- package/types/src/writer/utils/HiddenFormulaXfs.d.ts +0 -28
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.16
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
6
|
*/
|
|
7
|
-
import { t as e } from "./
|
|
7
|
+
import { t as e } from "./CZsPzV1CsMPKiICx.mjs";
|
|
8
8
|
import { InvalidPasswordError as t } from "@sheetxl/utils";
|
|
9
9
|
var r, n, a = class e {
|
|
10
10
|
static {
|
package/node/esm/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.16
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
6
|
*/
|
|
7
7
|
import { defineLazyModule as e } from "@sheetxl/utils";
|
|
8
8
|
var a = [
|
|
@@ -14,7 +14,7 @@ var a = [
|
|
|
14
14
|
177,
|
|
15
15
|
26,
|
|
16
16
|
225
|
|
17
|
-
], t = async () => (await import("./
|
|
17
|
+
], t = async () => (await import("./OO5K_WYvAj-UV14K.mjs")).OffCryptoEncryption, r = {
|
|
18
18
|
key: "offcrypto",
|
|
19
19
|
description: "Office Document Encryption",
|
|
20
20
|
detect: async (e) => !!((e) => {
|
|
@@ -25,7 +25,7 @@ var a = [
|
|
|
25
25
|
})(e) && (await t()).detect(e),
|
|
26
26
|
decode: async (e, a) => (await t()).decode(e, a),
|
|
27
27
|
encode: async (e, a) => (await t()).encode(e, a)
|
|
28
|
-
}, i = e("io-xlsx:reader", () => import("./
|
|
28
|
+
}, i = e("io-xlsx:reader", () => import("./CJYMs5EGkLOZKyF0.mjs").then((e) => e.t)), o = e("io-xlsx:writer", () => import("./CdFqKswnjeM_u8-g.mjs")), l = "Excel", n = "ExcelMacro", c = "ExcelTemplate", m = "ExcelMacroTemplate", s = [
|
|
29
29
|
l,
|
|
30
30
|
n,
|
|
31
31
|
c,
|
|
@@ -94,7 +94,7 @@ var a = [
|
|
|
94
94
|
})
|
|
95
95
|
}, X = {
|
|
96
96
|
name: "@sheetxl/io-xlsx",
|
|
97
|
-
version: "0.8.0-beta.
|
|
97
|
+
version: "0.8.0-beta.16",
|
|
98
98
|
description: "XLSX I/O formats for SheetXL",
|
|
99
99
|
author: "SheetXL",
|
|
100
100
|
async register(e) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/io-xlsx",
|
|
3
3
|
"description": "SheetXL - Import/Export from/to Excel",
|
|
4
|
-
"version": "0.8.0-beta.
|
|
5
|
-
"license": "SEE LICENSE IN
|
|
4
|
+
"version": "0.8.0-beta.16",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"utilities"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@sheetxl/sdk": "^0.8.0-beta.
|
|
48
|
-
"@sheetxl/utils": "^0.8.0-beta.
|
|
47
|
+
"@sheetxl/sdk": "^0.8.0-beta.16",
|
|
48
|
+
"@sheetxl/utils": "^0.8.0-beta.16",
|
|
49
49
|
"@xmldom/xmldom": "^0.9.12",
|
|
50
50
|
"@zip.js/zip.js": "^2.23.0",
|
|
51
51
|
"web-streams-polyfill": "^4.3.0",
|
|
@@ -5,11 +5,33 @@ import { ICondition, ISort } from '@sheetxl/sdk';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const DYNAMIC_FILTER_PERIODS: ReadonlySet<string>;
|
|
7
7
|
/**
|
|
8
|
-
* The condition a `dynamicFilter
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* The condition a `dynamicFilter` means: `aboveAverage` / `belowAverage` are the Average operator,
|
|
9
|
+
* everything else a TimePeriod of that name. A period's `val` / `maxVal` are the window it was last
|
|
10
|
+
* evaluated over, which Excel holds until the filter is applied again
|
|
11
|
+
* (`probe-filter-dynamic-later-day`), so they read as its `anchorDate` ({@link periodAnchorOf}). An
|
|
12
|
+
* average's `val` is the average it last found, a cache that is not read.
|
|
11
13
|
*/
|
|
12
|
-
export declare function dynamicFilterToJSON(type: string | null | undefined): ICondition.JSON;
|
|
14
|
+
export declare function dynamicFilterToJSON(type: string | null | undefined, val?: string | null, maxVal?: string | null): ICondition.JSON;
|
|
15
|
+
/**
|
|
16
|
+
* The day a relative period was evaluated on, from the window a `dynamicFilter` spells it was
|
|
17
|
+
* evaluated over (`val`, its first day, and `maxVal`, the day after its last); `undefined` for a
|
|
18
|
+
* period the same whatever the day (`Q1`, `M10`), or a window not spelled.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Any day of the period holding that day gives the same window, so the day is one of them: the
|
|
22
|
+
* first of a `this` period, the day after a `last` one, the day before a `next` one, and the last
|
|
23
|
+
* of `yearToDate`, which ends on it.
|
|
24
|
+
*/
|
|
25
|
+
export declare function periodAnchorOf(type: string, val: string | undefined, maxVal: string | undefined): number | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The window a relative period covers when evaluated on `anchor`, as a `dynamicFilter` spells it:
|
|
28
|
+
* its first day and the day after its last, as serials in the workbook's date system; `null` for a
|
|
29
|
+
* period the same whatever the day. Weeks start on Sunday.
|
|
30
|
+
*/
|
|
31
|
+
export declare function periodWindowOf(type: string, anchor: number, date1904: boolean): {
|
|
32
|
+
val: number;
|
|
33
|
+
maxVal: number;
|
|
34
|
+
} | null;
|
|
13
35
|
/** A `customFilter` in OOXML's own shape. Reader input, writer output — never persisted. */
|
|
14
36
|
export interface OOXMLCustomFilter {
|
|
15
37
|
operator?: string | null;
|
|
@@ -35,12 +35,23 @@ export declare const EXT_URI_CONDITIONAL_FORMATTINGS_LEGACY_TYPO = "{78C0D931-68
|
|
|
35
35
|
export declare const EXT_URI_CF_RULE_ID = "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}";
|
|
36
36
|
/** The x15 (Excel 2013) main namespace, declared on `<ext>` elements that carry x15 content. */
|
|
37
37
|
export declare const NS_X15 = "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main";
|
|
38
|
-
/** `x14:slicerList` on the worksheet
|
|
38
|
+
/** `x14:slicerList` on the worksheet under the x14 ext uri: what Excel writes for a pivot slicer, and older Excel for any. */
|
|
39
39
|
export declare const EXT_URI_SLICER_LIST = "{A8765BA9-456A-4dab-B4F3-ACF838C121DE}";
|
|
40
40
|
/** `x14:slicerList` on the worksheet under the x15 ext uri: what current Excel writes for a table slicer. */
|
|
41
41
|
export declare const EXT_URI_SLICER_LIST_X15 = "{3A4CF648-6AED-40f4-86FF-DC5316D8AED3}";
|
|
42
42
|
/** `x15:slicerCaches` on the workbook: the relationships to the table slicers' cache parts. */
|
|
43
43
|
export declare const EXT_URI_SLICER_CACHES_X15 = "{46BE6895-7355-4a93-B00E-2C351335B9C9}";
|
|
44
|
+
/** `x14:slicerCaches` on the workbook: the relationships to the pivot slicers' cache parts. */
|
|
45
|
+
export declare const EXT_URI_SLICER_CACHES_X14 = "{BBE1A952-AA13-448e-AADC-164F8A28A991}";
|
|
46
|
+
/** `xcalcf:calcFeatures` on the workbook: the calc features Excel compares against its own on open. */
|
|
47
|
+
export declare const EXT_URI_CALC_FEATURES = "{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}";
|
|
48
|
+
/**
|
|
49
|
+
* `x15:timelineRefs` on the worksheet: the relationship to the sheet's timeline part. Spelled as
|
|
50
|
+
* Excel writes it: written uppercase, Excel does not see the timelines (measured 2026-10-24).
|
|
51
|
+
*/
|
|
52
|
+
export declare const EXT_URI_TIMELINE_REFS = "{7E03D99C-DC04-49d9-9315-930204A7B6E9}";
|
|
53
|
+
/** `x15:timelineCacheRefs` on the workbook: the relationships to the timeline cache parts. */
|
|
54
|
+
export declare const EXT_URI_TIMELINE_CACHE_REFS = "{D0CA8CA8-9F24-4464-BF8E-62219DCF47F9}";
|
|
44
55
|
/** `x15:tableSlicerCache` in a slicer cache's `extLst`: the table and column a table slicer filters. */
|
|
45
56
|
export declare const EXT_URI_TABLE_SLICER_CACHE = "{2F2917AC-EB37-4324-AD4E-5DD8C200BD13}";
|
|
46
57
|
/**
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IPivotTable, IRange } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* How many rows and columns the page fields take: down then across (or across then down),
|
|
4
|
+
* wrapping after `pageWrap`: the sdk's `pageCountsOf`, which the layout places them by.
|
|
5
|
+
*/
|
|
6
|
+
export declare const pageCounts: (json: IPivotTable.JSON) => {
|
|
7
|
+
rows: number;
|
|
8
|
+
columns: number;
|
|
9
|
+
} | null;
|
|
10
|
+
/**
|
|
11
|
+
* The cells a table takes: its location, and above it its page fields and the blank row between,
|
|
12
|
+
* each page field a caption and its selection with a column between. The origin of
|
|
13
|
+
* {@link IPivotTable.JSON.buttons}.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* A modeled table's page counts follow from its page fields; one carried as its part alone states
|
|
17
|
+
* them on `<location>`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const pivotAreaOf: (json: IPivotTable.JSON) => IRange.Coords | null;
|
|
20
|
+
//# sourceMappingURL=PivotArea.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IEmbeddedPart, IPivotTable } from '@sheetxl/sdk';
|
|
2
|
+
/** The relationship a cache definition has to its records. */
|
|
3
|
+
export declare const REL_TYPE_PIVOT_CACHE_RECORDS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords";
|
|
4
|
+
/** A cache's model: what {@link IPivotTable.CacheJSON} holds besides its id and part. */
|
|
5
|
+
export type PivotCacheModel = Omit<IPivotTable.CacheJSON, 'cacheId' | 'part'>;
|
|
6
|
+
/**
|
|
7
|
+
* Reads the model of a pivot cache from its parts: the definition and, through its relationship,
|
|
8
|
+
* the records.
|
|
9
|
+
*
|
|
10
|
+
* @returns The model, or `null` when the cache holds what the model does not type yet: a source
|
|
11
|
+
* other than a range or a name in this workbook, or item properties. Such a cache is carried as
|
|
12
|
+
* its part alone.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Every field's records become item ids, an inline field's included: its values are its items,
|
|
16
|
+
* in the order they first appear, and the field is marked `inline` so it is written back inline.
|
|
17
|
+
*
|
|
18
|
+
* @param numberFormat What a field's `numFmtId` names in the file: its code, or a built-in's id;
|
|
19
|
+
* `undefined` for General.
|
|
20
|
+
*/
|
|
21
|
+
export declare const readPivotCacheModel: (part: IEmbeddedPart.JSON, date1904: boolean, numberFormat: (id: number) => string | number | undefined) => PivotCacheModel | null;
|
|
22
|
+
/**
|
|
23
|
+
* The cells a cache's `<worksheetSource>` names, read apart from the model so a cache carried as
|
|
24
|
+
* its part has its source too: the engine holds it, and the writer restates the part with it.
|
|
25
|
+
*
|
|
26
|
+
* @returns `undefined` for a source that is not a worksheet's, or is in another workbook (cited by
|
|
27
|
+
* a relationship, `r:id`): such a source is written as read.
|
|
28
|
+
*/
|
|
29
|
+
export declare const readPivotCacheSource: (xml: string) => IPivotTable.CacheSourceJSON | undefined;
|
|
30
|
+
//# sourceMappingURL=PivotCacheRead.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IEmbeddedPart, IPivotTable } from '@sheetxl/sdk';
|
|
2
|
+
import { PivotStylesWrite } from './PivotFormats';
|
|
3
|
+
/**
|
|
4
|
+
* The definition part of a modeled cache, its records part as its one child, both written from
|
|
5
|
+
* the model.
|
|
6
|
+
*
|
|
7
|
+
* @returns `null` when the cache is not modeled.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* The `<sharedItems>` summary attributes are derived from the items by Excel's rules
|
|
11
|
+
* (`pivot-probes/probe-pivot-cache-items.ps1`, 2026-10-24): booleans and errors count as text, a
|
|
12
|
+
* blank makes a field semi-mixed, more than one kind among text or booleans, errors, numbers and
|
|
13
|
+
* dates makes it mixed, and `maxDate` is the day after the latest date when that has no time.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* A cache's part as read with its `<worksheetSource>` restated as `source`, where the engine has
|
|
17
|
+
* moved it since (an insert, a table renamed or converted to a range): `ref`, `sheet` and `name`
|
|
18
|
+
* set or removed to match. Unchanged when it still reads so, or when `source` is absent (a source
|
|
19
|
+
* the model does not type, written as read).
|
|
20
|
+
*/
|
|
21
|
+
export declare const restatePivotCacheSource: (xml: string, source: IPivotTable.CacheSourceJSON | undefined) => string;
|
|
22
|
+
export declare const writePivotCacheModel: (json: IPivotTable.CacheJSON, date1904: boolean, styles: PivotStylesWrite) => IEmbeddedPart.JSON | null;
|
|
23
|
+
//# sourceMappingURL=PivotCacheWrite.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IPivotTable } from '@sheetxl/sdk';
|
|
2
|
+
import { ElementSpan } from './_PivotCacheXml';
|
|
3
|
+
/**
|
|
4
|
+
* Reads one `<filter>` of a pivot table.
|
|
5
|
+
*
|
|
6
|
+
* @throws `Unmodeled` for what the model does not type: OLAP attributes, an extension, a column
|
|
7
|
+
* that is not one criterion, or a type whose operands are not as Excel spells them.
|
|
8
|
+
*/
|
|
9
|
+
export declare const readPivotFilter: (xml: string, span: ElementSpan) => IPivotTable.PivotFilterJSON;
|
|
10
|
+
/**
|
|
11
|
+
* Writes one `<filter>` of a pivot table, `index` its position among the table's filters.
|
|
12
|
+
*
|
|
13
|
+
* @returns `null`, after `warn`, when no pivot filter type spells the condition (a value filter
|
|
14
|
+
* on text, a top N percent by count, a label filter's blank test).
|
|
15
|
+
* @param date1904 The workbook's date system, for a relative period's window.
|
|
16
|
+
*/
|
|
17
|
+
export declare const writePivotFilter: (filter: IPivotTable.PivotFilterJSON, index: number, warn?: (message: string) => void, date1904?: boolean) => string | null;
|
|
18
|
+
/** The filters of a definition, read from its `<filters>`. */
|
|
19
|
+
export declare const readPivotFilters: (xml: string, span: ElementSpan) => IPivotTable.PivotFilterJSON[];
|
|
20
|
+
/**
|
|
21
|
+
* The definition's `<filters>`, or `null`.
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* Each filter's column may hold a `<filters>` values list of its own, so the element ends at the
|
|
25
|
+
* last close before the definition's extensions, not the first. A filter may hold extensions of its
|
|
26
|
+
* own, so the definition's are the first after the last filter.
|
|
27
|
+
*/
|
|
28
|
+
export declare const findFilters: (xml: string) => ElementSpan | null;
|
|
29
|
+
//# sourceMappingURL=PivotFilters.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ICellStyle, IPivotTable } from '@sheetxl/sdk';
|
|
2
|
+
import { ElementSpan } from './_PivotCacheXml';
|
|
3
|
+
/**
|
|
4
|
+
* What a pivot part's format ids name in the file being read: its number formats and its
|
|
5
|
+
* differential formats (`dxfs`), from the styles part.
|
|
6
|
+
*/
|
|
7
|
+
export interface PivotStylesRead {
|
|
8
|
+
/** The number format `numFmtId` names: its code, or a built-in's id; `undefined` for General. */
|
|
9
|
+
numberFormat(id: number): string | number | undefined;
|
|
10
|
+
/** The differential format `dxfId` names, or `undefined` when the file has none at that index. */
|
|
11
|
+
dxf(id: number): ICellStyle.Properties | undefined;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* What a file's format ids name, from its styles part as read: its custom number formats by id,
|
|
15
|
+
* its `dxfs` by index (`SheetStyleVisitor`).
|
|
16
|
+
*/
|
|
17
|
+
export declare const pivotStylesRead: (numFmts: ReadonlyMap<number, string> | undefined, dxfs: ReadonlyMap<number, ICellStyle.Properties> | undefined) => PivotStylesRead;
|
|
18
|
+
/**
|
|
19
|
+
* The ids a pivot part cites in the file being written: the save numbers its number formats and
|
|
20
|
+
* differential formats afresh, so a part restates each from what it names.
|
|
21
|
+
*/
|
|
22
|
+
export interface PivotStylesWrite {
|
|
23
|
+
/** The `numFmtId` of a number format: a built-in's own, or the one this save gives a code. */
|
|
24
|
+
numFmtId(format: string | number): number;
|
|
25
|
+
/** The `dxfId` of a differential format, added to the save's `dxfs`. */
|
|
26
|
+
dxfId(style: ICellStyle.Properties): number;
|
|
27
|
+
}
|
|
28
|
+
/** A `<pivotArea>`. */
|
|
29
|
+
export declare const readPivotArea: (xml: string, span: ElementSpan) => IPivotTable.PivotAreaJSON;
|
|
30
|
+
/** A `<pivotArea>` as Excel spells it: `fieldPosition` always, the rest at their defaults left out. */
|
|
31
|
+
export declare const writePivotArea: (area: IPivotTable.PivotAreaJSON) => string;
|
|
32
|
+
/** The definition's own `<formats>` (not an extension's), or `null`. */
|
|
33
|
+
export declare const findFormats: (xml: string) => ElementSpan | null;
|
|
34
|
+
/** `<formats>`: each `<format>`'s differential format, from the file's `dxfs`, and its area. */
|
|
35
|
+
export declare const readFormats: (xml: string, span: ElementSpan, styles: PivotStylesRead) => IPivotTable.PivotFormatJSON[];
|
|
36
|
+
/** `<formats>`, each format's differential format added to the save's. */
|
|
37
|
+
export declare const writeFormats: (formats: readonly IPivotTable.PivotFormatJSON[], styles: PivotStylesWrite) => string;
|
|
38
|
+
/**
|
|
39
|
+
* What the format ids a part cites name in the file being read, for a part carried without a
|
|
40
|
+
* model: each custom `numFmtId`'s code and each `dxfId`'s differential format, wherever they
|
|
41
|
+
* stand in it. `undefined` when it cites none the save would renumber.
|
|
42
|
+
*/
|
|
43
|
+
export declare const readPartFormats: (xml: string, styles: PivotStylesRead) => IPivotTable.PartFormatsJSON | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* A table's definition as read, with the format ids it cites restated in the save's numbering:
|
|
46
|
+
* each field's and data field's `numFmtId`, each format's `dxfId`, from the model's; for a table
|
|
47
|
+
* with no model, from what its ids named when read ({@link readPartFormats}).
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* The save numbers number formats and differential formats afresh, so a part written as read
|
|
51
|
+
* would otherwise name another format, or none (`pivot-probes/probe-pivot-formats.ps1`,
|
|
52
|
+
* `probe-repair-open.ps1`: a `dxfId` past the save's `dxfs` is a repair on open).
|
|
53
|
+
*/
|
|
54
|
+
export declare const restatePivotTableFormats: (xml: string, json: IPivotTable.JSON, styles: PivotStylesWrite) => string;
|
|
55
|
+
/**
|
|
56
|
+
* A cache's definition as read, with each field's `numFmtId` restated in the save's numbering;
|
|
57
|
+
* for a cache with no model, from what its ids named when read ({@link readPartFormats}).
|
|
58
|
+
*/
|
|
59
|
+
export declare const restatePivotCacheFormats: (xml: string, cache: IPivotTable.CacheJSON, styles: PivotStylesWrite) => string;
|
|
60
|
+
//# sourceMappingURL=PivotFormats.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IPivotTable } from '@sheetxl/sdk';
|
|
2
|
+
import { PivotStylesRead } from './PivotFormats';
|
|
3
|
+
/** A table's model: what {@link IPivotTable.JSON} holds besides its name, cache, location, part and buttons. */
|
|
4
|
+
export type PivotTableModel = Omit<IPivotTable.JSON, 'name' | 'cacheId' | 'location' | 'part' | 'partFormats' | 'buttons'>;
|
|
5
|
+
/** `axis` as OOXML spells it, by the model's name. */
|
|
6
|
+
export declare const AXIS_BY_NAME: {
|
|
7
|
+
readonly row: "axisRow";
|
|
8
|
+
readonly column: "axisCol";
|
|
9
|
+
readonly page: "axisPage";
|
|
10
|
+
readonly values: "axisValues";
|
|
11
|
+
};
|
|
12
|
+
/** The subtotal functions a field can show, each an attribute `<name>Subtotal`. */
|
|
13
|
+
export declare const SUBTOTALS: readonly Exclude<IPivotTable.PivotSubtotal, 'default'>[];
|
|
14
|
+
/** `baseItem`'s two positions that are not an item: the one before and the one after. */
|
|
15
|
+
export declare const BASE_ITEM_PREVIOUS = 1048828;
|
|
16
|
+
export declare const BASE_ITEM_NEXT = 1048829;
|
|
17
|
+
/** The show-values-as kinds Excel writes as the x14 extension, with no `showDataAs`. */
|
|
18
|
+
export declare const X14_SHOW_DATA_AS: ReadonlySet<string>;
|
|
19
|
+
/** The extension of a data field that holds its newer show-values-as. */
|
|
20
|
+
export declare const EXT_URI_DATA_FIELD = "{E15A36E0-9728-4e99-A89B-3F7291B0FE68}";
|
|
21
|
+
/** The extension of a field that holds its repeated labels. */
|
|
22
|
+
export declare const EXT_URI_PIVOT_FIELD = "{2946ED86-A175-432a-8AC1-64E0C546D7DE}";
|
|
23
|
+
/**
|
|
24
|
+
* A field's sort by value, Excel's `autoSortScope`: a reference to the data field, then one per
|
|
25
|
+
* item of the scope's line, in field-index order, the innermost marked `defaultSubtotal` when the
|
|
26
|
+
* line is its subtotal (`pivot-probes/probe-pivot-sort-scope.ps1`). `scope` is in axis order.
|
|
27
|
+
*/
|
|
28
|
+
export declare const autoSortScope: (dataField: number, scope?: IPivotTable.PivotSortScopeJSON) => string;
|
|
29
|
+
/**
|
|
30
|
+
* The `<location ref>` of a table's definition, or `null` when it states none.
|
|
31
|
+
*/
|
|
32
|
+
export declare const readPivotTableLocation: (xml: string) => string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Reads the model of a pivot table from its definition's markup.
|
|
35
|
+
*
|
|
36
|
+
* @returns The model, or `null` when the markup holds what the model cannot answer for yet: OLAP
|
|
37
|
+
* hierarchies, item properties beyond those typed, a filter no pivot filter type spells, or an
|
|
38
|
+
* extension on a field or data field other than Excel's repeat labels and show-values-as. Such a
|
|
39
|
+
* table is carried as its part alone.
|
|
40
|
+
*
|
|
41
|
+
* @param styles What the markup's format ids name in the file.
|
|
42
|
+
*/
|
|
43
|
+
export declare const readPivotTableModel: (xml: string, styles: PivotStylesRead) => PivotTableModel | null;
|
|
44
|
+
//# sourceMappingURL=PivotTableRead.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IPivotTable } from '@sheetxl/sdk';
|
|
2
|
+
import { PivotStylesWrite } from './PivotFormats';
|
|
3
|
+
/**
|
|
4
|
+
* A modeled table's definition markup, written from the model: its remainder with what is
|
|
5
|
+
* modeled put back where the schema puts it, each setting spelled as Excel spells it.
|
|
6
|
+
*
|
|
7
|
+
* @param styles The save's ids for the formats the table cites.
|
|
8
|
+
* @param warn Told of a filter no pivot filter type spells; it is left out.
|
|
9
|
+
* @param date1904 The workbook's date system, for the window a relative date filter was evaluated over.
|
|
10
|
+
* @returns `null` when the table is not modeled.
|
|
11
|
+
*/
|
|
12
|
+
export declare const writePivotTableModel: (json: IPivotTable.JSON, styles: PivotStylesWrite, warn?: (message: string) => void, date1904?: boolean) => string | null;
|
|
13
|
+
//# sourceMappingURL=PivotTableWrite.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where an element is in `xml`: from its `<` to past its end, and its content between.
|
|
3
|
+
*/
|
|
4
|
+
export interface ElementSpan {
|
|
5
|
+
readonly start: number;
|
|
6
|
+
/** Past the open tag's `>`. */
|
|
7
|
+
readonly contentStart: number;
|
|
8
|
+
/** At the close tag's `<`; `contentStart` when the element is empty. */
|
|
9
|
+
readonly contentEnd: number;
|
|
10
|
+
readonly end: number;
|
|
11
|
+
/** The open tag's attributes, as written. */
|
|
12
|
+
readonly attributes: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The first unprefixed `<name>` at or after `from`, or `null`.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* For elements that do not contain another of their own name, as every element this is asked
|
|
19
|
+
* for is.
|
|
20
|
+
*/
|
|
21
|
+
export declare const findElement: (xml: string, name: string, from?: number, to?: number) => ElementSpan | null;
|
|
22
|
+
/** An open tag's attributes by name, decoded. */
|
|
23
|
+
export declare const parseAttributes: (attributes: string) => Map<string, string>;
|
|
24
|
+
/** `attributes` without the ones named. */
|
|
25
|
+
export declare const removeAttributes: (attributes: string, names: readonly string[]) => string;
|
|
26
|
+
/** Text for an attribute value. */
|
|
27
|
+
export declare const escapeAttribute: (value: string) => string;
|
|
28
|
+
/**
|
|
29
|
+
* `xml` with the first unprefixed `<name>`'s attributes restated as `values` says: a string sets one
|
|
30
|
+
* (in its place when written, after the others when not), `undefined` removes it. The same string,
|
|
31
|
+
* byte for byte, when each already reads as asked, so a part restated with what it holds is
|
|
32
|
+
* unchanged.
|
|
33
|
+
*/
|
|
34
|
+
export declare const restateAttributes: (xml: string, name: string, values: Readonly<Record<string, string | undefined>>) => string;
|
|
35
|
+
/** ` name="value"` per entry with a value. */
|
|
36
|
+
export declare const writeAttributes: (entries: readonly (readonly [string, string | number | undefined])[]) => string;
|
|
37
|
+
/**
|
|
38
|
+
* The serial of a cache's date text, or `null` when it is not one.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* A cache counts days from 1899-12-30 for every serial, with no 1900 leap day: serial 1 is
|
|
42
|
+
* `1899-12-31`, serial 61 is `1900-03-01` (`pivot-probes/probe-pivot-cache-items.ps1`,
|
|
43
|
+
* 2026-10-24). A cell's `t="d"` text follows the leap day; a cache's does not.
|
|
44
|
+
*/
|
|
45
|
+
export declare const cacheDateToSerial: (text: string, date1904: boolean) => number | null;
|
|
46
|
+
/** A serial as a cache's date text, to the second. See {@link cacheDateToSerial}. */
|
|
47
|
+
export declare const serialToCacheDate: (serial: number, date1904: boolean) => string;
|
|
48
|
+
//# sourceMappingURL=_PivotCacheXml.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ElementSpan } from './_PivotCacheXml';
|
|
2
|
+
/** Thrown inside the read for markup the model does not type; the table is carried as its part. */
|
|
3
|
+
export declare class Unmodeled extends Error {
|
|
4
|
+
}
|
|
5
|
+
export declare const unmodeled: () => never;
|
|
6
|
+
export declare const isTrue: (value: string | undefined) => boolean;
|
|
7
|
+
export declare const isFalse: (value: string | undefined) => boolean;
|
|
8
|
+
export declare const integer: (value: string | undefined) => number;
|
|
9
|
+
/** Each attribute's name must be one of `allowed`. */
|
|
10
|
+
export declare const only: (attributes: Map<string, string>, allowed: readonly string[]) => void;
|
|
11
|
+
/** The children of `span` named `name`, each self-closing, with nothing else between. */
|
|
12
|
+
export declare const children: (xml: string, span: ElementSpan, name: string) => Map<string, string>[];
|
|
13
|
+
/**
|
|
14
|
+
* The children of `span`, each an element named `name` with or without content, with nothing
|
|
15
|
+
* else between.
|
|
16
|
+
*/
|
|
17
|
+
export declare const elements: (xml: string, span: ElementSpan, name: string) => ElementSpan[];
|
|
18
|
+
/** Every child element of `span` with its name, with nothing but whitespace between. */
|
|
19
|
+
export declare const childElements: (xml: string, span: ElementSpan) => {
|
|
20
|
+
name: string;
|
|
21
|
+
span: ElementSpan;
|
|
22
|
+
}[];
|
|
23
|
+
//# sourceMappingURL=_PivotTableXml.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
|
|
@@ -15,10 +15,12 @@ export interface SlicerJoinOptions {
|
|
|
15
15
|
* sheet than its table, which is why this waits for the whole workbook.
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
|
-
* A record
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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.
|
|
22
24
|
*/
|
|
23
25
|
export declare function joinSlicers(jsonWorkbook: IWorkbook.JSON, options: SlicerJoinOptions): void;
|
|
24
26
|
//# sourceMappingURL=SlicerJoin.d.ts.map
|
|
@@ -29,6 +29,28 @@ export interface SlicerRecord {
|
|
|
29
29
|
lockedPosition?: boolean;
|
|
30
30
|
/** In EMU, as the part spells it. */
|
|
31
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;
|
|
32
54
|
}
|
|
33
55
|
/** A sheet's JSON with the slicer records read for it, by slicer name. */
|
|
34
56
|
export interface SheetSlicerRecords {
|
|
@@ -16,6 +16,11 @@ export declare class SheetStyleVisitor extends SheetColorContainerVisitor implem
|
|
|
16
16
|
* the sheets are read (`applyHiddenFormulas`), since a format alone cannot say it.
|
|
17
17
|
*/
|
|
18
18
|
collectHiddenXfs(elem: Element): Set<number>;
|
|
19
|
+
/**
|
|
20
|
+
* The cell xfs that say `pivotButton="1"`. The button is the pivot table's, so it moves onto the
|
|
21
|
+
* table that covers the cell once the sheets are read (`applyPivotButtons`).
|
|
22
|
+
*/
|
|
23
|
+
collectPivotButtonXfs(elem: Element): Set<number>;
|
|
19
24
|
/**
|
|
20
25
|
* The cell xfs whose `extLst` carries an `xfComplement`, by xf index, with the complement index.
|
|
21
26
|
* They become cell controls once the sheets and the feature property bags are read
|
|
@@ -2,10 +2,14 @@ import { SlicerRecord } from '../_SlicerRecord';
|
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
3
|
/**
|
|
4
4
|
* A slicer cache part: its name and source name, and for a table slicer the `tableSlicerCache`
|
|
5
|
-
* ext that names the table and column by id. A cache with no such ext is a pivot or
|
|
6
|
-
*
|
|
5
|
+
* ext that names the table and column by id. A cache with no such ext is a pivot or data-model
|
|
6
|
+
* slicer's: its pivot tables are read by sheet id and name. A pivot slicer's `tabular` items are
|
|
7
|
+
* read for their settings and the pivot cache they index; their states are the pivot tables' hidden
|
|
8
|
+
* items, so they are not kept. The rest (a data model's `olap` items, the `extLst`) is kept as
|
|
9
|
+
* written. A timeline cache (`timelineCacheDefinition`) is read the same way: it has no table form.
|
|
7
10
|
*/
|
|
8
11
|
export declare class SlicerCacheDefinitionVisitor implements Visitor {
|
|
9
12
|
visit(context: ExecutionContext, elem: Element, jsonSlicer: SlicerRecord): SlicerRecord;
|
|
13
|
+
processPivot(context: ExecutionContext, elem: Element, jsonSlicer: SlicerRecord): void;
|
|
10
14
|
}
|
|
11
15
|
//# sourceMappingURL=SlicerCacheDefinitionVisitor.d.ts.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { SlicerRecord } from '../_SlicerRecord';
|
|
2
2
|
import { Visitor, ExecutionContext } from '../dom';
|
|
3
|
+
/** What a slicer takes from the cache it names, read before any sheet (`XLSXReader`). */
|
|
4
|
+
export declare const CACHE_FIELDS: readonly (keyof SlicerRecord)[];
|
|
3
5
|
/**
|
|
4
6
|
* A sheet's slicer part: every `slicer` of it as a record by name, each joined to the cache it
|
|
5
7
|
* names so the record holds the column's ids beside the slicer's own presentation.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SlicerRecord } from '../_SlicerRecord';
|
|
2
|
+
import { Visitor, ExecutionContext } from '../dom';
|
|
3
|
+
/**
|
|
4
|
+
* A sheet's timeline part (`xl/timelines/*`): every `timeline` of it as a slicer record by name,
|
|
5
|
+
* joined to the timeline cache it names, as a slicer part is. Excel keeps a timeline as a slicer
|
|
6
|
+
* whose items are dates; what a slicer does not have (its level, scroll position, style and the
|
|
7
|
+
* like) is carried as read.
|
|
8
|
+
*/
|
|
9
|
+
export declare class TimelinesVisitor implements Visitor {
|
|
10
|
+
visit(context: ExecutionContext, elem: Element, jsonParent: any): Record<string, SlicerRecord>;
|
|
11
|
+
processTimeline(context: ExecutionContext, elem: Element, slicers: Record<string, SlicerRecord>): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=TimelinesVisitor.d.ts.map
|
|
@@ -18,6 +18,7 @@ import { TableX14Visitor } from './TableX14Visitor';
|
|
|
18
18
|
import { ExternalLinkVisitor } from './ExternalLinkVisitor';
|
|
19
19
|
import { SlicerCacheDefinitionVisitor } from './SlicerCacheDefinitionVisitor';
|
|
20
20
|
import { SlicersVisitor } from './SlicersVisitor';
|
|
21
|
+
import { TimelinesVisitor } from './TimelinesVisitor';
|
|
21
22
|
import { FormControlPrVisitor } from './FormControlPrVisitor';
|
|
22
23
|
import { DrawingVisitor } from './DrawingVisitor';
|
|
23
24
|
import { DrawingAnchorVisitor } from './DrawingAnchorVisitor';
|
|
@@ -54,6 +55,7 @@ export declare const BuiltInVisitors: {
|
|
|
54
55
|
ExternalLinkVisitor: typeof ExternalLinkVisitor;
|
|
55
56
|
SlicerCacheDefinitionVisitor: typeof SlicerCacheDefinitionVisitor;
|
|
56
57
|
SlicersVisitor: typeof SlicersVisitor;
|
|
58
|
+
TimelinesVisitor: typeof TimelinesVisitor;
|
|
57
59
|
FormControlPrVisitor: typeof FormControlPrVisitor;
|
|
58
60
|
DrawingVisitor: typeof DrawingVisitor;
|
|
59
61
|
DrawingAnchorVisitor: typeof DrawingAnchorVisitor;
|
|
@@ -162,6 +162,19 @@ export interface EmitContext {
|
|
|
162
162
|
*/
|
|
163
163
|
addExternal(relTypeUri: string, targetUrl: string, idHint?: string): PackagePart;
|
|
164
164
|
addRelationship(relTypeUri: string, targetPartPath: string, idHint?: string): string | null;
|
|
165
|
+
/**
|
|
166
|
+
* Whether the package will hold the source package's own bytes at `partPath`: the source has the
|
|
167
|
+
* part, the passthrough carries it, and no emitter has claimed the path so far.
|
|
168
|
+
*
|
|
169
|
+
* @remarks
|
|
170
|
+
* The question a replayed source fragment asks before citing a part: {@link addRelationship}
|
|
171
|
+
* accepts a path an emitter wrote, and what an emitter wrote there may be a different part of the
|
|
172
|
+
* same kind (the writer numbers pivot caches its own way). An emitter scheduled later can still
|
|
173
|
+
* claim the path, so ask once the parts that could collide have been added.
|
|
174
|
+
*
|
|
175
|
+
* @param partPath The part's absolute path (relative to the package root, no leading `/`).
|
|
176
|
+
*/
|
|
177
|
+
carriesSourcePart(partPath: string): boolean;
|
|
165
178
|
/**
|
|
166
179
|
* Waits for all dependants to be emitted.
|
|
167
180
|
*/
|