@rowsncolumns/toolkit 24.4.2 → 24.4.3
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/dist/cjs/excel-parser/cfb-decryptor.d.ts +6 -0
- package/dist/cjs/excel-parser/cfb-decryptor.d.ts.map +1 -1
- package/dist/cjs/excel-parser/cfb-decryptor.js +6 -0
- package/dist/cjs/excel-parser/helpers.d.ts +9 -1
- package/dist/cjs/excel-parser/helpers.d.ts.map +1 -1
- package/dist/cjs/excel-parser/helpers.js +37 -0
- package/dist/cjs/excel-parser/interface.d.ts +10 -1
- package/dist/cjs/excel-parser/interface.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/ods/index.d.ts +19 -0
- package/dist/cjs/excel-parser/plugins/ods/index.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/ods/index.js +676 -304
- package/dist/cjs/excel-parser/plugins/ods/styles.d.ts +43 -1
- package/dist/cjs/excel-parser/plugins/ods/styles.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/ods/styles.js +343 -45
- package/dist/cjs/excel-parser/plugins/xls/index.d.ts +11 -3
- package/dist/cjs/excel-parser/plugins/xls/index.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/xls/index.js +55 -6
- package/dist/cjs/excel-parser/plugins/xlsb/index.d.ts +4 -0
- package/dist/cjs/excel-parser/plugins/xlsb/index.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/xlsb/index.js +21 -9
- package/dist/cjs/excel-parser/plugins/xlsx/charts.d.ts +10 -0
- package/dist/cjs/excel-parser/plugins/xlsx/charts.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/xlsx/charts.js +68 -9
- package/dist/cjs/excel-parser/plugins/xlsx/drawing.d.ts +28 -1
- package/dist/cjs/excel-parser/plugins/xlsx/drawing.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/xlsx/drawing.js +155 -20
- package/dist/cjs/excel-parser/plugins/xlsx/index.d.ts +26 -1
- package/dist/cjs/excel-parser/plugins/xlsx/index.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/xlsx/index.js +567 -234
- package/dist/cjs/excel-parser/plugins/xlsx/pivots.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/xlsx/pivots.js +125 -37
- package/dist/cjs/excel-parser/plugins/xlsx/sheet-views.d.ts +3 -0
- package/dist/cjs/excel-parser/plugins/xlsx/sheet-views.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/xlsx/sheet-views.js +4 -1
- package/dist/cjs/excel-parser/plugins/xlsx/styles.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/xlsx/styles.js +12 -2
- package/dist/cjs/excel-parser/registry.d.ts.map +1 -1
- package/dist/cjs/excel-parser/registry.js +2 -0
- package/dist/cjs/excel-parser/types.d.ts +7 -1
- package/dist/cjs/excel-parser/types.d.ts.map +1 -1
- package/dist/cjs/excel-parser/workbook.d.ts +1 -0
- package/dist/cjs/excel-parser/workbook.d.ts.map +1 -1
- package/dist/cjs/excel-parser/workbook.js +4 -0
- package/dist/cjs/excel-parser/worker.js +3 -1
- package/dist/cjs/exporter/ods/ods-export.d.ts.map +1 -1
- package/dist/cjs/exporter/ods/ods-export.js +432 -175
- package/dist/cjs/exporter/xlsx/chart-builder.d.ts.map +1 -1
- package/dist/cjs/exporter/xlsx/chart-builder.js +210 -6
- package/dist/cjs/exporter/xlsx/pivot-builder.d.ts +8 -0
- package/dist/cjs/exporter/xlsx/pivot-builder.d.ts.map +1 -1
- package/dist/cjs/exporter/xlsx/pivot-builder.js +141 -42
- package/dist/cjs/exporter/xlsx/style-builder.js +9 -3
- package/dist/cjs/exporter/xlsx/threaded-comments-builder.d.ts +7 -1
- package/dist/cjs/exporter/xlsx/threaded-comments-builder.d.ts.map +1 -1
- package/dist/cjs/exporter/xlsx/threaded-comments-builder.js +15 -3
- package/dist/cjs/exporter/xlsx/xlsx-export.d.ts +11 -2
- package/dist/cjs/exporter/xlsx/xlsx-export.d.ts.map +1 -1
- package/dist/cjs/exporter/xlsx/xlsx-export.js +678 -222
- package/dist/cjs/helpers/implicit-intersection.d.ts +16 -0
- package/dist/cjs/helpers/implicit-intersection.d.ts.map +1 -0
- package/dist/cjs/helpers/implicit-intersection.js +197 -0
- package/dist/cjs/print-settings.d.ts +105 -0
- package/dist/cjs/print-settings.d.ts.map +1 -0
- package/dist/cjs/print-settings.js +494 -0
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/excel-parser/cfb-decryptor.d.ts +6 -0
- package/dist/esm/excel-parser/cfb-decryptor.d.ts.map +1 -1
- package/dist/esm/excel-parser/cfb-decryptor.js +6 -0
- package/dist/esm/excel-parser/helpers.d.ts +9 -1
- package/dist/esm/excel-parser/helpers.d.ts.map +1 -1
- package/dist/esm/excel-parser/helpers.js +34 -0
- package/dist/esm/excel-parser/interface.d.ts +10 -1
- package/dist/esm/excel-parser/interface.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/ods/index.d.ts +19 -0
- package/dist/esm/excel-parser/plugins/ods/index.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/ods/index.js +347 -33
- package/dist/esm/excel-parser/plugins/ods/styles.d.ts +43 -1
- package/dist/esm/excel-parser/plugins/ods/styles.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/ods/styles.js +276 -2
- package/dist/esm/excel-parser/plugins/xls/index.d.ts +11 -3
- package/dist/esm/excel-parser/plugins/xls/index.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/xls/index.js +37 -5
- package/dist/esm/excel-parser/plugins/xlsb/index.d.ts +4 -0
- package/dist/esm/excel-parser/plugins/xlsb/index.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/xlsb/index.js +20 -6
- package/dist/esm/excel-parser/plugins/xlsx/charts.d.ts +10 -0
- package/dist/esm/excel-parser/plugins/xlsx/charts.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/xlsx/charts.js +69 -6
- package/dist/esm/excel-parser/plugins/xlsx/drawing.d.ts +28 -1
- package/dist/esm/excel-parser/plugins/xlsx/drawing.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/xlsx/drawing.js +99 -0
- package/dist/esm/excel-parser/plugins/xlsx/index.d.ts +26 -1
- package/dist/esm/excel-parser/plugins/xlsx/index.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/xlsx/index.js +362 -26
- package/dist/esm/excel-parser/plugins/xlsx/pivots.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/xlsx/pivots.js +86 -6
- package/dist/esm/excel-parser/plugins/xlsx/sheet-views.d.ts +3 -0
- package/dist/esm/excel-parser/plugins/xlsx/sheet-views.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/xlsx/sheet-views.js +2 -0
- package/dist/esm/excel-parser/plugins/xlsx/styles.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/xlsx/styles.js +12 -2
- package/dist/esm/excel-parser/registry.d.ts.map +1 -1
- package/dist/esm/excel-parser/registry.js +2 -0
- package/dist/esm/excel-parser/types.d.ts +7 -1
- package/dist/esm/excel-parser/types.d.ts.map +1 -1
- package/dist/esm/excel-parser/workbook.d.ts +1 -0
- package/dist/esm/excel-parser/workbook.d.ts.map +1 -1
- package/dist/esm/excel-parser/workbook.js +3 -0
- package/dist/esm/excel-parser/worker.js +2 -0
- package/dist/esm/exporter/ods/ods-export.d.ts.map +1 -1
- package/dist/esm/exporter/ods/ods-export.js +306 -35
- package/dist/esm/exporter/xlsx/chart-builder.d.ts.map +1 -1
- package/dist/esm/exporter/xlsx/chart-builder.js +161 -0
- package/dist/esm/exporter/xlsx/pivot-builder.d.ts +8 -0
- package/dist/esm/exporter/xlsx/pivot-builder.d.ts.map +1 -1
- package/dist/esm/exporter/xlsx/pivot-builder.js +104 -19
- package/dist/esm/exporter/xlsx/style-builder.js +9 -3
- package/dist/esm/exporter/xlsx/threaded-comments-builder.d.ts +7 -1
- package/dist/esm/exporter/xlsx/threaded-comments-builder.d.ts.map +1 -1
- package/dist/esm/exporter/xlsx/threaded-comments-builder.js +15 -3
- package/dist/esm/exporter/xlsx/xlsx-export.d.ts +11 -2
- package/dist/esm/exporter/xlsx/xlsx-export.d.ts.map +1 -1
- package/dist/esm/exporter/xlsx/xlsx-export.js +449 -47
- package/dist/esm/helpers/implicit-intersection.d.ts +16 -0
- package/dist/esm/helpers/implicit-intersection.d.ts.map +1 -0
- package/dist/esm/helpers/implicit-intersection.js +184 -0
- package/dist/esm/print-settings.d.ts +105 -0
- package/dist/esm/print-settings.d.ts.map +1 -0
- package/dist/esm/print-settings.js +422 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
import { __assign, __read, __values } from "tslib";
|
|
2
|
+
import { addressToSelection, alpha2number, number2Alpha, } from "@rowsncolumns/utils";
|
|
3
|
+
/**
|
|
4
|
+
* Shared helpers for the sheet `printSettings` facet: the builtin
|
|
5
|
+
* `_xlnm.Print_Area` / `_xlnm.Print_Titles` defined-name formulas (XLSX), the
|
|
6
|
+
* Excel header/footer code language (`&L&P of &N`), and the ODS page-layout
|
|
7
|
+
* equivalents (paper sizes, `style:print` tokens, `<text:*>` fields).
|
|
8
|
+
*/
|
|
9
|
+
export var PRINT_AREA_NAME = "_xlnm.Print_Area";
|
|
10
|
+
export var PRINT_TITLES_NAME = "_xlnm.Print_Titles";
|
|
11
|
+
export var isBuiltinPrintName = function (name) {
|
|
12
|
+
return name === PRINT_AREA_NAME || name === PRINT_TITLES_NAME;
|
|
13
|
+
};
|
|
14
|
+
/** Wrap a sheet name in single quotes when a formula reference requires it. */
|
|
15
|
+
export var quoteSheetNameForRef = function (name) {
|
|
16
|
+
return /^[A-Za-z_][A-Za-z0-9_.]*$/.test(name)
|
|
17
|
+
? name
|
|
18
|
+
: "'".concat(name.replace(/'/g, "''"), "'");
|
|
19
|
+
};
|
|
20
|
+
/** Split a defined-name formula on top-level commas (quote aware). */
|
|
21
|
+
export var splitDefinedNameAreas = function (formula) {
|
|
22
|
+
var e_1, _a;
|
|
23
|
+
var parts = [];
|
|
24
|
+
var current = "";
|
|
25
|
+
var inQuote = false;
|
|
26
|
+
try {
|
|
27
|
+
for (var formula_1 = __values(formula), formula_1_1 = formula_1.next(); !formula_1_1.done; formula_1_1 = formula_1.next()) {
|
|
28
|
+
var ch = formula_1_1.value;
|
|
29
|
+
if (ch === "'")
|
|
30
|
+
inQuote = !inQuote;
|
|
31
|
+
if (ch === "," && !inQuote) {
|
|
32
|
+
parts.push(current);
|
|
33
|
+
current = "";
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
current += ch;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
40
|
+
finally {
|
|
41
|
+
try {
|
|
42
|
+
if (formula_1_1 && !formula_1_1.done && (_a = formula_1.return)) _a.call(formula_1);
|
|
43
|
+
}
|
|
44
|
+
finally { if (e_1) throw e_1.error; }
|
|
45
|
+
}
|
|
46
|
+
parts.push(current);
|
|
47
|
+
return parts.map(function (part) { return part.trim(); }).filter(Boolean);
|
|
48
|
+
};
|
|
49
|
+
/** `'My Sheet'!$A$1:$B$2` → `{ sheetName: "My Sheet", ref: "$A$1:$B$2" }`. */
|
|
50
|
+
export var splitSheetQualifiedRef = function (part) {
|
|
51
|
+
var bang = part.lastIndexOf("!");
|
|
52
|
+
if (bang === -1)
|
|
53
|
+
return { ref: part };
|
|
54
|
+
var sheetName = part.slice(0, bang);
|
|
55
|
+
if (sheetName.startsWith("'") && sheetName.endsWith("'")) {
|
|
56
|
+
sheetName = sheetName.slice(1, -1).replace(/''/g, "'");
|
|
57
|
+
}
|
|
58
|
+
return { sheetName: sheetName, ref: part.slice(bang + 1) };
|
|
59
|
+
};
|
|
60
|
+
var ROW_BAND = /^\$?(\d+):\$?(\d+)$/;
|
|
61
|
+
var COLUMN_BAND = /^\$?([A-Za-z]{1,3}):\$?([A-Za-z]{1,3})$/;
|
|
62
|
+
/**
|
|
63
|
+
* Parse a `_xlnm.Print_Area` formula into 1-based inclusive rectangles.
|
|
64
|
+
* Bands (`$1:$2`, `$A:$B`) and non-rectangular parts are rejected; the sheet
|
|
65
|
+
* name is taken from the first qualified part.
|
|
66
|
+
*/
|
|
67
|
+
export var parsePrintAreaFormula = function (formula) {
|
|
68
|
+
var e_2, _a;
|
|
69
|
+
var ranges = [];
|
|
70
|
+
var sheetName;
|
|
71
|
+
try {
|
|
72
|
+
for (var _b = __values(splitDefinedNameAreas(formula)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
73
|
+
var part = _c.value;
|
|
74
|
+
var split = splitSheetQualifiedRef(part);
|
|
75
|
+
sheetName !== null && sheetName !== void 0 ? sheetName : (sheetName = split.sheetName);
|
|
76
|
+
var ref = split.ref.replace(/\$/g, "");
|
|
77
|
+
if (ROW_BAND.test(ref) || COLUMN_BAND.test(ref))
|
|
78
|
+
return undefined;
|
|
79
|
+
if (!/^[A-Za-z]{1,3}\d+(:[A-Za-z]{1,3}\d+)?$/.test(ref))
|
|
80
|
+
return undefined;
|
|
81
|
+
var selection = addressToSelection(ref);
|
|
82
|
+
if (!selection)
|
|
83
|
+
return undefined;
|
|
84
|
+
ranges.push(__assign({}, selection.range));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
88
|
+
finally {
|
|
89
|
+
try {
|
|
90
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
91
|
+
}
|
|
92
|
+
finally { if (e_2) throw e_2.error; }
|
|
93
|
+
}
|
|
94
|
+
if (!ranges.length)
|
|
95
|
+
return undefined;
|
|
96
|
+
return { sheetName: sheetName, ranges: ranges };
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Parse a `_xlnm.Print_Titles` formula (`'Sheet'!$A:$B,'Sheet'!$1:$2` — any
|
|
100
|
+
* order, either band alone) into the repeated row / column bands.
|
|
101
|
+
*/
|
|
102
|
+
export var parsePrintTitlesFormula = function (formula) {
|
|
103
|
+
var e_3, _a;
|
|
104
|
+
var titles = {};
|
|
105
|
+
var sheetName;
|
|
106
|
+
try {
|
|
107
|
+
for (var _b = __values(splitDefinedNameAreas(formula)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
108
|
+
var part = _c.value;
|
|
109
|
+
var split = splitSheetQualifiedRef(part);
|
|
110
|
+
sheetName !== null && sheetName !== void 0 ? sheetName : (sheetName = split.sheetName);
|
|
111
|
+
var rowMatch = ROW_BAND.exec(split.ref);
|
|
112
|
+
if (rowMatch) {
|
|
113
|
+
var a = parseInt(rowMatch[1], 10);
|
|
114
|
+
var b = parseInt(rowMatch[2], 10);
|
|
115
|
+
titles.rowStart = Math.min(a, b);
|
|
116
|
+
titles.rowEnd = Math.max(a, b);
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
var colMatch = COLUMN_BAND.exec(split.ref);
|
|
120
|
+
if (colMatch) {
|
|
121
|
+
var a = alpha2number(colMatch[1].toUpperCase());
|
|
122
|
+
var b = alpha2number(colMatch[2].toUpperCase());
|
|
123
|
+
titles.columnStart = Math.min(a, b);
|
|
124
|
+
titles.columnEnd = Math.max(a, b);
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
131
|
+
finally {
|
|
132
|
+
try {
|
|
133
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
134
|
+
}
|
|
135
|
+
finally { if (e_3) throw e_3.error; }
|
|
136
|
+
}
|
|
137
|
+
if (titles.rowStart == null && titles.columnStart == null)
|
|
138
|
+
return undefined;
|
|
139
|
+
return { sheetName: sheetName, titles: titles };
|
|
140
|
+
};
|
|
141
|
+
// `number2Alpha` is 0-based (0 → "A"); grid column indices are 1-based.
|
|
142
|
+
var columnLetters = function (columnIndex) { return number2Alpha(columnIndex - 1); };
|
|
143
|
+
var absoluteRangeRef = function (range) {
|
|
144
|
+
return "$".concat(columnLetters(range.startColumnIndex), "$").concat(range.startRowIndex, ":$").concat(columnLetters(range.endColumnIndex), "$").concat(range.endRowIndex);
|
|
145
|
+
};
|
|
146
|
+
/** `'Sheet'!$A$1:$D$10,'Sheet'!$F$2:$G$5` (Excel's own multi-area shape). */
|
|
147
|
+
export var buildPrintAreaFormula = function (sheetName, ranges) {
|
|
148
|
+
var valid = ranges.filter(isValidPrintRange);
|
|
149
|
+
if (!valid.length)
|
|
150
|
+
return undefined;
|
|
151
|
+
var quoted = quoteSheetNameForRef(sheetName);
|
|
152
|
+
return valid.map(function (range) { return "".concat(quoted, "!").concat(absoluteRangeRef(range)); }).join(",");
|
|
153
|
+
};
|
|
154
|
+
/** Columns first, then rows — the order Excel writes. */
|
|
155
|
+
export var buildPrintTitlesFormula = function (sheetName, titles) {
|
|
156
|
+
var quoted = quoteSheetNameForRef(sheetName);
|
|
157
|
+
var parts = [];
|
|
158
|
+
var columnStart = titles.columnStart, columnEnd = titles.columnEnd, rowStart = titles.rowStart, rowEnd = titles.rowEnd;
|
|
159
|
+
if (columnStart != null &&
|
|
160
|
+
columnEnd != null &&
|
|
161
|
+
columnStart >= 1 &&
|
|
162
|
+
columnEnd >= columnStart) {
|
|
163
|
+
parts.push("".concat(quoted, "!$").concat(columnLetters(columnStart), ":$").concat(columnLetters(columnEnd)));
|
|
164
|
+
}
|
|
165
|
+
if (rowStart != null &&
|
|
166
|
+
rowEnd != null &&
|
|
167
|
+
rowStart >= 1 &&
|
|
168
|
+
rowEnd >= rowStart) {
|
|
169
|
+
parts.push("".concat(quoted, "!$").concat(rowStart, ":$").concat(rowEnd));
|
|
170
|
+
}
|
|
171
|
+
return parts.length ? parts.join(",") : undefined;
|
|
172
|
+
};
|
|
173
|
+
export var isValidPrintRange = function (range) {
|
|
174
|
+
return range.startRowIndex >= 1 &&
|
|
175
|
+
range.endRowIndex >= range.startRowIndex &&
|
|
176
|
+
range.startColumnIndex >= 1 &&
|
|
177
|
+
range.endColumnIndex >= range.startColumnIndex;
|
|
178
|
+
};
|
|
179
|
+
var hasAnyValue = function (value) {
|
|
180
|
+
return !!value && Object.values(value).some(function (v) { return v !== undefined && v !== null; });
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Drop empty sub-objects / empty arrays; returns `undefined` when nothing
|
|
184
|
+
* is left so callers can omit the facet entirely.
|
|
185
|
+
*/
|
|
186
|
+
export var compactPrintSettings = function (settings) {
|
|
187
|
+
var _a, _b, _c;
|
|
188
|
+
if (!settings)
|
|
189
|
+
return undefined;
|
|
190
|
+
var out = {};
|
|
191
|
+
if (hasAnyValue(settings.pageSetup))
|
|
192
|
+
out.pageSetup = settings.pageSetup;
|
|
193
|
+
if (hasAnyValue(settings.pageMargins))
|
|
194
|
+
out.pageMargins = settings.pageMargins;
|
|
195
|
+
if (hasAnyValue(settings.printOptions))
|
|
196
|
+
out.printOptions = settings.printOptions;
|
|
197
|
+
if (hasAnyValue(settings.headerFooter))
|
|
198
|
+
out.headerFooter = settings.headerFooter;
|
|
199
|
+
if ((_a = settings.printArea) === null || _a === void 0 ? void 0 : _a.length)
|
|
200
|
+
out.printArea = settings.printArea;
|
|
201
|
+
if (hasAnyValue(settings.printTitles))
|
|
202
|
+
out.printTitles = settings.printTitles;
|
|
203
|
+
if ((_b = settings.rowBreaks) === null || _b === void 0 ? void 0 : _b.length)
|
|
204
|
+
out.rowBreaks = settings.rowBreaks;
|
|
205
|
+
if ((_c = settings.columnBreaks) === null || _c === void 0 ? void 0 : _c.length)
|
|
206
|
+
out.columnBreaks = settings.columnBreaks;
|
|
207
|
+
return Object.keys(out).length ? out : undefined;
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Split an Excel header/footer code into its `&L` / `&C` / `&R` zones. Text
|
|
211
|
+
* before any zone marker belongs to the centre zone (Excel's rule). `&&`
|
|
212
|
+
* escapes are left untouched inside each zone.
|
|
213
|
+
*/
|
|
214
|
+
export var splitHeaderFooterZones = function (code) {
|
|
215
|
+
var zones = {};
|
|
216
|
+
var current = "center";
|
|
217
|
+
var buffer = "";
|
|
218
|
+
var flush = function () {
|
|
219
|
+
var _a;
|
|
220
|
+
if (buffer)
|
|
221
|
+
zones[current] = ((_a = zones[current]) !== null && _a !== void 0 ? _a : "") + buffer;
|
|
222
|
+
buffer = "";
|
|
223
|
+
};
|
|
224
|
+
for (var i = 0; i < code.length; i++) {
|
|
225
|
+
var ch = code[i];
|
|
226
|
+
if (ch === "&" && i + 1 < code.length) {
|
|
227
|
+
var next = code[i + 1];
|
|
228
|
+
if (next === "&") {
|
|
229
|
+
buffer += "&&";
|
|
230
|
+
i += 1;
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
if (next === "L" || next === "C" || next === "R") {
|
|
234
|
+
flush();
|
|
235
|
+
current = next === "L" ? "left" : next === "C" ? "center" : "right";
|
|
236
|
+
i += 1;
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
buffer += ch;
|
|
241
|
+
}
|
|
242
|
+
flush();
|
|
243
|
+
return zones;
|
|
244
|
+
};
|
|
245
|
+
export var joinHeaderFooterZones = function (zones) {
|
|
246
|
+
var out = "";
|
|
247
|
+
if (zones.left)
|
|
248
|
+
out += "&L".concat(zones.left);
|
|
249
|
+
if (zones.center)
|
|
250
|
+
out += "&C".concat(zones.center);
|
|
251
|
+
if (zones.right)
|
|
252
|
+
out += "&R".concat(zones.right);
|
|
253
|
+
return out;
|
|
254
|
+
};
|
|
255
|
+
var FIELD_BY_CODE = {
|
|
256
|
+
P: "page",
|
|
257
|
+
N: "pages",
|
|
258
|
+
D: "date",
|
|
259
|
+
T: "time",
|
|
260
|
+
A: "sheet",
|
|
261
|
+
F: "file",
|
|
262
|
+
Z: "path",
|
|
263
|
+
};
|
|
264
|
+
var CODE_BY_FIELD = {
|
|
265
|
+
page: "&P",
|
|
266
|
+
pages: "&N",
|
|
267
|
+
date: "&D",
|
|
268
|
+
time: "&T",
|
|
269
|
+
sheet: "&A",
|
|
270
|
+
file: "&F",
|
|
271
|
+
path: "&Z",
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Tokenize one zone of header/footer code into literal text and field
|
|
275
|
+
* macros. Formatting codes (`&"Font,Style"`, `&12`, `&B`, `&Kff0000`, `&G`…)
|
|
276
|
+
* have no ODS counterpart and are dropped.
|
|
277
|
+
*/
|
|
278
|
+
export var tokenizeHeaderFooterZone = function (zone) {
|
|
279
|
+
var tokens = [];
|
|
280
|
+
var text = "";
|
|
281
|
+
var pushText = function () {
|
|
282
|
+
if (text)
|
|
283
|
+
tokens.push({ type: "text", text: text });
|
|
284
|
+
text = "";
|
|
285
|
+
};
|
|
286
|
+
for (var i = 0; i < zone.length; i++) {
|
|
287
|
+
var ch = zone[i];
|
|
288
|
+
if (ch !== "&" || i + 1 >= zone.length) {
|
|
289
|
+
text += ch;
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
var next = zone[i + 1];
|
|
293
|
+
if (next === "&") {
|
|
294
|
+
text += "&";
|
|
295
|
+
i += 1;
|
|
296
|
+
continue;
|
|
297
|
+
}
|
|
298
|
+
if (next === '"') {
|
|
299
|
+
var close_1 = zone.indexOf('"', i + 2);
|
|
300
|
+
i = close_1 === -1 ? zone.length : close_1;
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
if (/\d/.test(next)) {
|
|
304
|
+
var j = i + 1;
|
|
305
|
+
while (j < zone.length && /\d/.test(zone[j]))
|
|
306
|
+
j++;
|
|
307
|
+
i = j - 1;
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
if (next === "K") {
|
|
311
|
+
// `&Kff0000` (6 hex) or `&K01+000` (theme + tint) — both 6 chars.
|
|
312
|
+
i += 7;
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
var field = FIELD_BY_CODE[next];
|
|
316
|
+
if (field) {
|
|
317
|
+
pushText();
|
|
318
|
+
tokens.push({ type: "field", field: field });
|
|
319
|
+
i += 1;
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
322
|
+
// Any other single-letter code is a formatting toggle.
|
|
323
|
+
i += 1;
|
|
324
|
+
}
|
|
325
|
+
pushText();
|
|
326
|
+
return tokens;
|
|
327
|
+
};
|
|
328
|
+
export var headerFooterZoneFromTokens = function (tokens) {
|
|
329
|
+
return tokens
|
|
330
|
+
.map(function (token) {
|
|
331
|
+
return token.type === "text"
|
|
332
|
+
? token.text.replace(/&/g, "&&")
|
|
333
|
+
: CODE_BY_FIELD[token.field];
|
|
334
|
+
})
|
|
335
|
+
.join("");
|
|
336
|
+
};
|
|
337
|
+
/** Every header/footer text on the facet is empty / absent. */
|
|
338
|
+
export var isHeaderFooterEmpty = function (hf) {
|
|
339
|
+
return !hf ||
|
|
340
|
+
(!hf.oddHeader &&
|
|
341
|
+
!hf.oddFooter &&
|
|
342
|
+
!hf.evenHeader &&
|
|
343
|
+
!hf.evenFooter &&
|
|
344
|
+
!hf.firstHeader &&
|
|
345
|
+
!hf.firstFooter &&
|
|
346
|
+
hf.differentOddEven == null &&
|
|
347
|
+
hf.differentFirst == null &&
|
|
348
|
+
hf.scaleWithDoc == null &&
|
|
349
|
+
hf.alignWithMargins == null);
|
|
350
|
+
};
|
|
351
|
+
// ── ODS equivalents ───────────────────────────────────────────────────────
|
|
352
|
+
export var INCH_TO_CM = 2.54;
|
|
353
|
+
/** ECMA-376 paper-size codes → sheet size in inches (width × height, portrait). */
|
|
354
|
+
var PAPER_SIZES_IN = {
|
|
355
|
+
1: [8.5, 11], // Letter
|
|
356
|
+
3: [11, 17], // Tabloid
|
|
357
|
+
5: [8.5, 14], // Legal
|
|
358
|
+
7: [7.25, 10.5], // Executive
|
|
359
|
+
8: [11.69, 16.54], // A3
|
|
360
|
+
9: [8.27, 11.69], // A4
|
|
361
|
+
11: [5.83, 8.27], // A5
|
|
362
|
+
// ECMA-376 ST_PaperSize: 12 = "B4 paper (250 mm by 354 mm)",
|
|
363
|
+
// 13 = "B5 paper (182 mm by 257 mm)" — the JIS B5, not ISO B5 (176 × 250).
|
|
364
|
+
12: [9.84, 13.9], // B4
|
|
365
|
+
13: [7.17, 10.12], // B5 (JIS)
|
|
366
|
+
};
|
|
367
|
+
/** Portrait page size in centimetres for a paper-size code. */
|
|
368
|
+
export var paperSizeToCm = function (code) {
|
|
369
|
+
var size = PAPER_SIZES_IN[code !== null && code !== void 0 ? code : -1];
|
|
370
|
+
if (!size)
|
|
371
|
+
return undefined;
|
|
372
|
+
return { width: size[0] * INCH_TO_CM, height: size[1] * INCH_TO_CM };
|
|
373
|
+
};
|
|
374
|
+
/** Nearest paper-size code for a page (either orientation), or undefined. */
|
|
375
|
+
export var paperSizeFromCm = function (widthCm, heightCm) {
|
|
376
|
+
var e_4, _a;
|
|
377
|
+
var w = Math.min(widthCm, heightCm) / INCH_TO_CM;
|
|
378
|
+
var h = Math.max(widthCm, heightCm) / INCH_TO_CM;
|
|
379
|
+
try {
|
|
380
|
+
for (var _b = __values(Object.entries(PAPER_SIZES_IN)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
381
|
+
var _d = __read(_c.value, 2), code = _d[0], _e = __read(_d[1], 2), pw = _e[0], ph = _e[1];
|
|
382
|
+
if (Math.abs(pw - w) < 0.05 && Math.abs(ph - h) < 0.05) {
|
|
383
|
+
return Number(code);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
388
|
+
finally {
|
|
389
|
+
try {
|
|
390
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
391
|
+
}
|
|
392
|
+
finally { if (e_4) throw e_4.error; }
|
|
393
|
+
}
|
|
394
|
+
return undefined;
|
|
395
|
+
};
|
|
396
|
+
/** Parse an ODF length (`2.54cm`, `1in`, `72pt`, `25.4mm`) to inches. */
|
|
397
|
+
export var odsLengthToInches = function (value) {
|
|
398
|
+
var _a;
|
|
399
|
+
if (!value)
|
|
400
|
+
return undefined;
|
|
401
|
+
var match = /^(-?[\d.]+)\s*(cm|mm|in|pt|pc|px)?$/.exec(value.trim());
|
|
402
|
+
if (!match)
|
|
403
|
+
return undefined;
|
|
404
|
+
var n = parseFloat(match[1]);
|
|
405
|
+
if (!Number.isFinite(n))
|
|
406
|
+
return undefined;
|
|
407
|
+
switch ((_a = match[2]) !== null && _a !== void 0 ? _a : "cm") {
|
|
408
|
+
case "cm":
|
|
409
|
+
return n / INCH_TO_CM;
|
|
410
|
+
case "mm":
|
|
411
|
+
return n / (INCH_TO_CM * 10);
|
|
412
|
+
case "in":
|
|
413
|
+
return n;
|
|
414
|
+
case "pt":
|
|
415
|
+
return n / 72;
|
|
416
|
+
case "pc":
|
|
417
|
+
return n / 6;
|
|
418
|
+
case "px":
|
|
419
|
+
return n / 96;
|
|
420
|
+
default:
|
|
421
|
+
return undefined;
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
export var inchesToOdsCm = function (inches) {
|
|
425
|
+
return "".concat((inches * INCH_TO_CM).toFixed(3).replace(/\.?0+$/, ""), "cm");
|
|
426
|
+
};
|
|
427
|
+
/**
|
|
428
|
+
* `style:print` token list. LibreOffice's default (attribute absent) is
|
|
429
|
+
* `objects charts drawings zero-values`; `grid` / `headers` map to
|
|
430
|
+
* `<printOptions gridLines headings>`.
|
|
431
|
+
*/
|
|
432
|
+
export var buildOdsPrintTokens = function (options) {
|
|
433
|
+
var tokens = ["objects", "charts", "drawings", "zero-values"];
|
|
434
|
+
if (options === null || options === void 0 ? void 0 : options.gridLines)
|
|
435
|
+
tokens.push("grid");
|
|
436
|
+
if (options === null || options === void 0 ? void 0 : options.headings)
|
|
437
|
+
tokens.push("headers");
|
|
438
|
+
return tokens.join(" ");
|
|
439
|
+
};
|
|
440
|
+
export var parseOdsPrintTokens = function (value) {
|
|
441
|
+
if (value == null)
|
|
442
|
+
return undefined;
|
|
443
|
+
var tokens = new Set(value.split(/\s+/));
|
|
444
|
+
var options = {};
|
|
445
|
+
if (tokens.has("grid"))
|
|
446
|
+
options.gridLines = true;
|
|
447
|
+
if (tokens.has("headers"))
|
|
448
|
+
options.headings = true;
|
|
449
|
+
return hasAnyValue(options) ? options : undefined;
|
|
450
|
+
};
|
|
451
|
+
export var odsTableCentering = function (options) {
|
|
452
|
+
if ((options === null || options === void 0 ? void 0 : options.horizontalCentered) && (options === null || options === void 0 ? void 0 : options.verticalCentered))
|
|
453
|
+
return "both";
|
|
454
|
+
if (options === null || options === void 0 ? void 0 : options.horizontalCentered)
|
|
455
|
+
return "horizontal";
|
|
456
|
+
if (options === null || options === void 0 ? void 0 : options.verticalCentered)
|
|
457
|
+
return "vertical";
|
|
458
|
+
return undefined;
|
|
459
|
+
};
|
|
460
|
+
export var parseOdsTableCentering = function (value) {
|
|
461
|
+
switch (value) {
|
|
462
|
+
case "both":
|
|
463
|
+
return { horizontalCentered: true, verticalCentered: true };
|
|
464
|
+
case "horizontal":
|
|
465
|
+
return { horizontalCentered: true };
|
|
466
|
+
case "vertical":
|
|
467
|
+
return { verticalCentered: true };
|
|
468
|
+
default:
|
|
469
|
+
return {};
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
export var isPageSetupEmpty = function (setup) {
|
|
473
|
+
return !hasAnyValue(setup);
|
|
474
|
+
};
|
|
475
|
+
export var isPageMarginsEmpty = function (margins) {
|
|
476
|
+
return !hasAnyValue(margins);
|
|
477
|
+
};
|
|
478
|
+
/** Excel's "Normal" margins — what every untouched worksheet carries. */
|
|
479
|
+
export var DEFAULT_PAGE_MARGINS_IN = {
|
|
480
|
+
left: 0.7,
|
|
481
|
+
right: 0.7,
|
|
482
|
+
top: 0.75,
|
|
483
|
+
bottom: 0.75,
|
|
484
|
+
header: 0.3,
|
|
485
|
+
footer: 0.3,
|
|
486
|
+
};
|
|
487
|
+
/** `true` when the margins are exactly Excel's defaults (nothing to keep). */
|
|
488
|
+
export var isDefaultPageMargins = function (margins) {
|
|
489
|
+
return !!margins &&
|
|
490
|
+
Object.keys(DEFAULT_PAGE_MARGINS_IN).every(function (key) {
|
|
491
|
+
var value = margins[key];
|
|
492
|
+
return (value == null || Math.abs(value - DEFAULT_PAGE_MARGINS_IN[key]) < 1e-9);
|
|
493
|
+
});
|
|
494
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../../autofilter-condition.ts","../../csv-export.ts","../../csv-import-worker.ts","../../csv-import.ts","../../excel-export.ts","../../excel-import-session.ts","../../excel-import-worker.ts","../../helpers.ts","../../index.ts","../../indexed-colors.ts","../../ods-export.ts","../../parse.ts","../../power-query.ts","../../server.ts","../../theme1.ts","../../types.ts","../../vitest.config.ts","../../xlsx.d.ts","../../csv-parser/helpers.ts","../../csv-parser/types.ts","../../csv-parser/worker.ts","../../excel-parser/builtin-numfmts.ts","../../excel-parser/cfb-decryptor.ts","../../excel-parser/cfb-encryptor.ts","../../excel-parser/dv-cell-stamp.ts","../../excel-parser/helpers.ts","../../excel-parser/interface.ts","../../excel-parser/registry.ts","../../excel-parser/style-registry.ts","../../excel-parser/theme-default.ts","../../excel-parser/types.ts","../../excel-parser/utils.ts","../../excel-parser/workbook.ts","../../excel-parser/worker.ts","../../excel-parser/zip-parser-streaming.ts","../../excel-parser/zip-parser.ts","../../excel-parser/plugins/base/index.ts","../../excel-parser/plugins/ods/conditional-formatting.ts","../../excel-parser/plugins/ods/data-validations.ts","../../excel-parser/plugins/ods/formula.ts","../../excel-parser/plugins/ods/index.ts","../../excel-parser/plugins/ods/sparklines.ts","../../excel-parser/plugins/ods/styles.ts","../../excel-parser/plugins/ods/types.ts","../../excel-parser/plugins/xls/index.ts","../../excel-parser/plugins/xlsb/biff-record-reader.ts","../../excel-parser/plugins/xlsb/index.ts","../../excel-parser/plugins/xlsb/rgce-parser.ts","../../excel-parser/plugins/xlsm/index.ts","../../excel-parser/plugins/xlsx/charts.ts","../../excel-parser/plugins/xlsx/conditional-formatting.ts","../../excel-parser/plugins/xlsx/data-validations.ts","../../excel-parser/plugins/xlsx/drawing.ts","../../excel-parser/plugins/xlsx/index.ts","../../excel-parser/plugins/xlsx/numfmt.ts","../../excel-parser/plugins/xlsx/pivots.ts","../../excel-parser/plugins/xlsx/relationships.ts","../../excel-parser/plugins/xlsx/sheet-views.ts","../../excel-parser/plugins/xlsx/styles.ts","../../excel-parser/plugins/xlsx/theme.ts","../../excel-parser/plugins/xlsx/threaded-comments.ts","../../excel-parser/plugins/xlsx/value-type-detection.ts","../../exporter/invalid-data-validation.ts","../../exporter/ods/ods-export.ts","../../exporter/ods/sparkline-builder.ts","../../exporter/xlsx/chart-builder.ts","../../exporter/xlsx/chart-templates.ts","../../exporter/xlsx/future-functions.ts","../../exporter/xlsx/pivot-builder.ts","../../exporter/xlsx/power-query-builder.ts","../../exporter/xlsx/slicer-builder.ts","../../exporter/xlsx/sparkline-builder.ts","../../exporter/xlsx/style-builder.ts","../../exporter/xlsx/threaded-comments-builder.ts","../../exporter/xlsx/xlsx-export.ts","../../helpers/theme-xml-generator.ts"],"version":"5.8.3"}
|
|
1
|
+
{"root":["../../autofilter-condition.ts","../../csv-export.ts","../../csv-import-worker.ts","../../csv-import.ts","../../excel-export.ts","../../excel-import-session.ts","../../excel-import-worker.ts","../../helpers.ts","../../index.ts","../../indexed-colors.ts","../../ods-export.ts","../../parse.ts","../../power-query.ts","../../print-settings.ts","../../server.ts","../../theme1.ts","../../types.ts","../../vitest.config.ts","../../xlsx.d.ts","../../csv-parser/helpers.ts","../../csv-parser/types.ts","../../csv-parser/worker.ts","../../excel-parser/builtin-numfmts.ts","../../excel-parser/cfb-decryptor.ts","../../excel-parser/cfb-encryptor.ts","../../excel-parser/dv-cell-stamp.ts","../../excel-parser/helpers.ts","../../excel-parser/interface.ts","../../excel-parser/registry.ts","../../excel-parser/style-registry.ts","../../excel-parser/theme-default.ts","../../excel-parser/types.ts","../../excel-parser/utils.ts","../../excel-parser/workbook.ts","../../excel-parser/worker.ts","../../excel-parser/zip-parser-streaming.ts","../../excel-parser/zip-parser.ts","../../excel-parser/plugins/base/index.ts","../../excel-parser/plugins/ods/conditional-formatting.ts","../../excel-parser/plugins/ods/data-validations.ts","../../excel-parser/plugins/ods/formula.ts","../../excel-parser/plugins/ods/index.ts","../../excel-parser/plugins/ods/sparklines.ts","../../excel-parser/plugins/ods/styles.ts","../../excel-parser/plugins/ods/types.ts","../../excel-parser/plugins/xls/index.ts","../../excel-parser/plugins/xlsb/biff-record-reader.ts","../../excel-parser/plugins/xlsb/index.ts","../../excel-parser/plugins/xlsb/rgce-parser.ts","../../excel-parser/plugins/xlsm/index.ts","../../excel-parser/plugins/xlsx/charts.ts","../../excel-parser/plugins/xlsx/conditional-formatting.ts","../../excel-parser/plugins/xlsx/data-validations.ts","../../excel-parser/plugins/xlsx/drawing.ts","../../excel-parser/plugins/xlsx/index.ts","../../excel-parser/plugins/xlsx/numfmt.ts","../../excel-parser/plugins/xlsx/pivots.ts","../../excel-parser/plugins/xlsx/relationships.ts","../../excel-parser/plugins/xlsx/sheet-views.ts","../../excel-parser/plugins/xlsx/styles.ts","../../excel-parser/plugins/xlsx/theme.ts","../../excel-parser/plugins/xlsx/threaded-comments.ts","../../excel-parser/plugins/xlsx/value-type-detection.ts","../../exporter/invalid-data-validation.ts","../../exporter/ods/ods-export.ts","../../exporter/ods/sparkline-builder.ts","../../exporter/xlsx/chart-builder.ts","../../exporter/xlsx/chart-templates.ts","../../exporter/xlsx/future-functions.ts","../../exporter/xlsx/pivot-builder.ts","../../exporter/xlsx/power-query-builder.ts","../../exporter/xlsx/slicer-builder.ts","../../exporter/xlsx/sparkline-builder.ts","../../exporter/xlsx/style-builder.ts","../../exporter/xlsx/threaded-comments-builder.ts","../../exporter/xlsx/xlsx-export.ts","../../helpers/implicit-intersection.ts","../../helpers/theme-xml-generator.ts"],"version":"5.8.3"}
|
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export type CfbContainerKind = "encrypted-ooxml" | "legacy-xls" | "unknown";
|
|
7
7
|
export declare const LEGACY_XLS_UNSUPPORTED_MESSAGE = "This file is a legacy Excel 97-2003 (.xls) workbook, which is not supported. Please open it in Excel and save it as .xlsx, then try again.";
|
|
8
|
+
/**
|
|
9
|
+
* A `.xls`-named file that is neither a CFB container nor a zip package —
|
|
10
|
+
* typically an HTML table or tab-separated text that a web app exported
|
|
11
|
+
* with a `.xls` extension so Excel would open it.
|
|
12
|
+
*/
|
|
13
|
+
export declare const XLS_NOT_A_WORKBOOK_MESSAGE = "This .xls file is not an Excel workbook (it is most likely an HTML or text export saved with a .xls extension). Please open it in Excel and save it as .xlsx, then try again.";
|
|
8
14
|
/**
|
|
9
15
|
* Inspects a CFB container's directory to decide whether it is an
|
|
10
16
|
* Office-encrypted OOXML package (`EncryptionInfo` stream present) or an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cfb-decryptor.d.ts","sourceRoot":"","sources":["../../../excel-parser/cfb-decryptor.ts"],"names":[],"mappings":"AAqCA;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG,YAAY,GAAG,SAAS,CAAC;AAE5E,eAAO,MAAM,8BAA8B,+IACmG,CAAC;AAE/I;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GACjC,QAAQ,IAAI,GAAG,WAAW,KACzB,OAAO,CAAC,gBAAgB,CAiB1B,CAAC;AAEF,qBAAa,YAAY;IACvB;;;;;OAKG;WACU,OAAO,CAClB,MAAM,EAAE,IAAI,GAAG,WAAW,EAC1B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC;IAiCvB,OAAO,CAAC,MAAM,CAAC,YAAY;IA6B3B,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAiBvC,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAsEpC,iGAAiG;IACjG,O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
]);
|
|
16
16
|
export const LEGACY_XLS_UNSUPPORTED_MESSAGE = "This file is a legacy Excel 97-2003 (.xls) workbook, which is not supported. Please open it in Excel and save it as .xlsx, then try again.";
|
|
17
|
+
/**
|
|
18
|
+
* A `.xls`-named file that is neither a CFB container nor a zip package —
|
|
19
|
+
* typically an HTML table or tab-separated text that a web app exported
|
|
20
|
+
* with a `.xls` extension so Excel would open it.
|
|
21
|
+
*/
|
|
22
|
+
export const XLS_NOT_A_WORKBOOK_MESSAGE = "This .xls file is not an Excel workbook (it is most likely an HTML or text export saved with a .xls extension). Please open it in Excel and save it as .xlsx, then try again.";
|
|
17
23
|
/**
|
|
18
24
|
* Inspects a CFB container's directory to decide whether it is an
|
|
19
25
|
* Office-encrypted OOXML package (`EncryptionInfo` stream present) or an
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GridRange } from "@rowsncolumns/common-types";
|
|
2
|
-
import type { FilterSpec } from "@rowsncolumns/spreadsheet";
|
|
2
|
+
import type { Column, FilterSpec, TableTotalsRowFunction } from "@rowsncolumns/spreadsheet";
|
|
3
3
|
export declare const getRangeFromAddressRef: (ref: string) => GridRange | undefined;
|
|
4
4
|
/**
|
|
5
5
|
* Convert an xlsx column width (in units of max-digit-width of the
|
|
@@ -14,6 +14,14 @@ export declare const getRangeFromAddressRef: (ref: string) => GridRange | undefi
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function excelColumnWidthToPixels(width: number): number;
|
|
16
16
|
export declare function findMax(arr: number[]): number;
|
|
17
|
+
export declare const isTableTotalsRowFunction: (value: unknown) => value is TableTotalsRowFunction;
|
|
18
|
+
/**
|
|
19
|
+
* Totals-row metadata of one parsed `<tableColumn>` (xlsx and xlsb table
|
|
20
|
+
* parts share the XML shape): `totalsRowFunction` / `totalsRowLabel`
|
|
21
|
+
* attributes and the `<totalsRowFormula>` child. Returns only the fields
|
|
22
|
+
* present so columns without a totals row stay `{ name }`.
|
|
23
|
+
*/
|
|
24
|
+
export declare const parseTableColumnTotals: (colDef: any) => Pick<Column, "totalsRowFunction" | "totalsRowLabel" | "totalsRowFormula">;
|
|
17
25
|
export declare function createFilterSpecsFromAutoFilter(autoFilter: any,
|
|
18
26
|
/**
|
|
19
27
|
* Optional dxf resolver — called with (dxfId, cellColor) to return a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../excel-parser/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../excel-parser/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAEV,MAAM,EACN,UAAU,EACV,sBAAsB,EACvB,MAAM,2BAA2B,CAAC;AASnC,eAAO,MAAM,sBAAsB,GAAI,KAAK,MAAM,KAAG,SAAS,GAAG,SAIhE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,UAIrD;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,UAMpC;AAmBD,eAAO,MAAM,wBAAwB,GACnC,OAAO,OAAO,KACb,KAAK,IAAI,sBACwD,CAAC;AAErE;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GACjC,QAAQ,GAAG,KACV,IAAI,CAAC,MAAM,EAAE,mBAAmB,GAAG,gBAAgB,GAAG,kBAAkB,CAmB1E,CAAC;AAqBF,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,GAAG;AACf;;;;GAIG;AACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,MAAM,GAAG,SAAS,gBA8F5E;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,wBAkB3D"}
|
|
@@ -30,6 +30,40 @@ export function findMax(arr) {
|
|
|
30
30
|
}
|
|
31
31
|
return max;
|
|
32
32
|
}
|
|
33
|
+
const TABLE_TOTALS_ROW_FUNCTIONS = new Set([
|
|
34
|
+
"average",
|
|
35
|
+
"count",
|
|
36
|
+
"countNums",
|
|
37
|
+
"custom",
|
|
38
|
+
"max",
|
|
39
|
+
"min",
|
|
40
|
+
"none",
|
|
41
|
+
"stdDev",
|
|
42
|
+
"sum",
|
|
43
|
+
"var",
|
|
44
|
+
]);
|
|
45
|
+
export const isTableTotalsRowFunction = (value) => typeof value === "string" && TABLE_TOTALS_ROW_FUNCTIONS.has(value);
|
|
46
|
+
/**
|
|
47
|
+
* Totals-row metadata of one parsed `<tableColumn>` (xlsx and xlsb table
|
|
48
|
+
* parts share the XML shape): `totalsRowFunction` / `totalsRowLabel`
|
|
49
|
+
* attributes and the `<totalsRowFormula>` child. Returns only the fields
|
|
50
|
+
* present so columns without a totals row stay `{ name }`.
|
|
51
|
+
*/
|
|
52
|
+
export const parseTableColumnTotals = (colDef) => {
|
|
53
|
+
const attrs = colDef?.a$ ?? {};
|
|
54
|
+
const totals = {};
|
|
55
|
+
if (isTableTotalsRowFunction(attrs.totalsRowFunction)) {
|
|
56
|
+
totals.totalsRowFunction = attrs.totalsRowFunction;
|
|
57
|
+
}
|
|
58
|
+
if (typeof attrs.totalsRowLabel === "string" && attrs.totalsRowLabel !== "") {
|
|
59
|
+
totals.totalsRowLabel = attrs.totalsRowLabel;
|
|
60
|
+
}
|
|
61
|
+
const totalsRowFormula = getNodeText(colDef?.totalsRowFormula ?? colDef?.["x:totalsRowFormula"]);
|
|
62
|
+
if (totalsRowFormula) {
|
|
63
|
+
totals.totalsRowFormula = totalsRowFormula;
|
|
64
|
+
}
|
|
65
|
+
return totals;
|
|
66
|
+
};
|
|
33
67
|
const getNodeText = (node) => {
|
|
34
68
|
if (node === undefined || node === null) {
|
|
35
69
|
return undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConditionalFormatRule, DataValidationRuleRecord, EmbeddedChart, NamedRange, Sheet, Slicer, SpreadsheetTheme, TableView } from "@rowsncolumns/spreadsheet";
|
|
1
|
+
import type { ConditionalFormatRule, DataValidationRuleRecord, EmbeddedChart, NamedRange, ProtectedRange, Sheet, Slicer, SpreadsheetTheme, TableView } from "@rowsncolumns/spreadsheet";
|
|
2
2
|
import type { CommentThread, IterativeCalculationOptions, TextFormat, TextFormatRun } from "@rowsncolumns/common-types";
|
|
3
3
|
import type { EmbeddedObjectWithPosition, ExternalLink, ProcessSheetDataForSheetOptions, ProcessSheetDataResult, SheetCatalogEntry, WorkbookProperties } from "./types";
|
|
4
4
|
export interface IWorkbookPlugin {
|
|
@@ -139,6 +139,15 @@ export interface IWorkbookPlugin {
|
|
|
139
139
|
* Get named ranges
|
|
140
140
|
*/
|
|
141
141
|
getNamedRanges(): NamedRange[];
|
|
142
|
+
/**
|
|
143
|
+
* Allow-edit protected ranges (`<protectedRanges>` in XLSX), for one sheet or —
|
|
144
|
+
* when `sheetId` is omitted — the whole workbook, in the `ProtectedRange[]`
|
|
145
|
+
* model `useSpreadsheetState` holds (`protectedRangeId` = source name).
|
|
146
|
+
* Sheet-level protection rides `Sheet.sheetProtection`. Optional so plugins
|
|
147
|
+
* without protection support still satisfy the interface; the workbook
|
|
148
|
+
* wrapper resolves to `[]`.
|
|
149
|
+
*/
|
|
150
|
+
getProtectedRanges?(sheetId?: number): ProtectedRange[];
|
|
142
151
|
/**
|
|
143
152
|
* Modern threaded comments (Excel's "Comments" pane), for one sheet or —
|
|
144
153
|
* when `sheetId` is omitted — the whole workbook, in the same
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../excel-parser/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EACxB,aAAa,EACb,UAAU,EACV,KAAK,EACL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