ooxml-core 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automation/index.cjs +3615 -2018
- package/dist/automation/index.mjs +3615 -2018
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +11 -0
- package/dist/docx/embedded.mjs +11 -0
- package/dist/docx/index.cjs +59 -4
- package/dist/docx/index.mjs +59 -4
- package/dist/docx/layout/index.cjs +1 -0
- package/dist/docx/layout/index.mjs +1 -0
- package/dist/docx/load/index.cjs +11 -0
- package/dist/docx/load/index.mjs +11 -0
- package/dist/docx/model-paragraph.d.ts +6 -1
- package/dist/docx/model-paragraph.d.ts.map +1 -1
- package/dist/docx/paragraph-styles.d.ts +2 -0
- package/dist/docx/paragraph-styles.d.ts.map +1 -1
- package/dist/docx/table-of-contents.d.ts.map +1 -1
- package/dist/docx/toc-switches.d.ts +16 -0
- package/dist/docx/toc-switches.d.ts.map +1 -0
- package/dist/xlsx/formula/engine-core.d.ts +9 -0
- package/dist/xlsx/formula/engine-core.d.ts.map +1 -1
- package/dist/xlsx/formula/engine-host.d.ts +2 -0
- package/dist/xlsx/formula/engine-host.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/bonds.d.ts +3 -0
- package/dist/xlsx/formula/functions/bonds.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/complex.d.ts +14 -0
- package/dist/xlsx/formula/functions/complex.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/convert.d.ts +4 -0
- package/dist/xlsx/formula/functions/convert.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/coupons.d.ts +21 -0
- package/dist/xlsx/formula/functions/coupons.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/database.d.ts +4 -0
- package/dist/xlsx/formula/functions/database.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/depreciation.d.ts +0 -1
- package/dist/xlsx/formula/functions/depreciation.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/distributions-f.d.ts +6 -0
- package/dist/xlsx/formula/functions/distributions-f.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/distributions.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/engineering.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/financial.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/hypothesis-tests.d.ts +4 -0
- package/dist/xlsx/formula/functions/hypothesis-tests.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/matrix.d.ts +5 -0
- package/dist/xlsx/formula/functions/matrix.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/registry.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/regression-core.d.ts +34 -0
- package/dist/xlsx/formula/functions/regression-core.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/regression.d.ts +4 -0
- package/dist/xlsx/formula/functions/regression.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/securities.d.ts +3 -0
- package/dist/xlsx/formula/functions/securities.d.ts.map +1 -0
- package/dist/xlsx/formula/functions/statistical.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/text-extra.d.ts.map +1 -1
- package/dist/xlsx/formula/functions/text-regex.d.ts +5 -0
- package/dist/xlsx/formula/functions/text-regex.d.ts.map +1 -0
- package/dist/xlsx/index.cjs +3519 -1933
- package/dist/xlsx/index.mjs +3519 -1933
- package/dist/xlsx/load/index.cjs +2937 -1384
- package/dist/xlsx/load/index.mjs +2937 -1384
- package/dist/xlsx/model.d.ts +9 -0
- package/dist/xlsx/model.d.ts.map +1 -1
- package/dist/xlsx/read/load.d.ts.map +1 -1
- package/dist/xlsx/read/workbook-part.d.ts +5 -0
- package/dist/xlsx/read/workbook-part.d.ts.map +1 -1
- package/dist/xlsx/write/workbook-part.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-parser.d.ts","sourceRoot":"","sources":["../../src/docx/block-parser.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAY,KAAK,EAAsB,MAAM,YAAY,CAAC;AACxF,OAAO,EAON,KAAK,UAAU,EAEf,MAAM,UAAU,CAAC;AAKlB,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAsIjE,iBAAS,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"block-parser.d.ts","sourceRoot":"","sources":["../../src/docx/block-parser.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAY,KAAK,EAAsB,MAAM,YAAY,CAAC;AACxF,OAAO,EAON,KAAK,UAAU,EAEf,MAAM,UAAU,CAAC;AAKlB,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAsIjE,iBAAS,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,CA0G/D;AAED,iBAAS,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,GAAG,KAAK,CAEvD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACvC,SAAS,EAAE,UAAU,EACrB,QAAQ,SAAK,EACb,OAAO,CAAC,EAAE,cAAc,GACtB,KAAK,EAAE,CAcT;AAYD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/docx/embedded.cjs
CHANGED
|
@@ -609,6 +609,13 @@ var PAGINATION_KEYS = [
|
|
|
609
609
|
"contextualSpacing",
|
|
610
610
|
"suppressLineNumbers"
|
|
611
611
|
];
|
|
612
|
+
function parseOutlineLevel(element) {
|
|
613
|
+
const raw = getW(element, "val");
|
|
614
|
+
if (raw === void 0) return void 0;
|
|
615
|
+
const value = Number(raw);
|
|
616
|
+
if (!Number.isInteger(value) || value < 0 || value > 9) return void 0;
|
|
617
|
+
return value === 9 ? 0 : value + 1;
|
|
618
|
+
}
|
|
612
619
|
function parseFormatting(pPr) {
|
|
613
620
|
const result = {};
|
|
614
621
|
const { align, justification } = parseJustification(pPr);
|
|
@@ -620,6 +627,8 @@ function parseFormatting(pPr) {
|
|
|
620
627
|
const value = enabled(first2(pPr, key));
|
|
621
628
|
if (value !== void 0) result[key] = value;
|
|
622
629
|
}
|
|
630
|
+
const outline2 = parseOutlineLevel(first2(pPr, "outlineLvl"));
|
|
631
|
+
if (outline2 !== void 0) result.outlineLevel = outline2;
|
|
623
632
|
const borders = parseParagraphBorders(first2(pPr, "pBdr"));
|
|
624
633
|
if (borders) result.borders = borders;
|
|
625
634
|
const shading = parseShadingFill(first2(pPr, "shd"));
|
|
@@ -6957,6 +6966,8 @@ function parseParagraph2(node, id) {
|
|
|
6957
6966
|
const value = onOffElement(first2(props, key));
|
|
6958
6967
|
if (value !== void 0) paragraph[key] = value;
|
|
6959
6968
|
}
|
|
6969
|
+
const outline2 = parseOutlineLevel(first2(props, "outlineLvl"));
|
|
6970
|
+
if (outline2 !== void 0) paragraph.outlineLevel = outline2;
|
|
6960
6971
|
const frame = first2(props, "framePr");
|
|
6961
6972
|
const dropCap = getW(frame, "dropCap");
|
|
6962
6973
|
if (dropCap === "drop" || dropCap === "margin") {
|
package/dist/docx/embedded.mjs
CHANGED
|
@@ -603,6 +603,13 @@ var PAGINATION_KEYS = [
|
|
|
603
603
|
"contextualSpacing",
|
|
604
604
|
"suppressLineNumbers"
|
|
605
605
|
];
|
|
606
|
+
function parseOutlineLevel(element) {
|
|
607
|
+
const raw = getW(element, "val");
|
|
608
|
+
if (raw === void 0) return void 0;
|
|
609
|
+
const value = Number(raw);
|
|
610
|
+
if (!Number.isInteger(value) || value < 0 || value > 9) return void 0;
|
|
611
|
+
return value === 9 ? 0 : value + 1;
|
|
612
|
+
}
|
|
606
613
|
function parseFormatting(pPr) {
|
|
607
614
|
const result = {};
|
|
608
615
|
const { align, justification } = parseJustification(pPr);
|
|
@@ -614,6 +621,8 @@ function parseFormatting(pPr) {
|
|
|
614
621
|
const value = enabled(first2(pPr, key));
|
|
615
622
|
if (value !== void 0) result[key] = value;
|
|
616
623
|
}
|
|
624
|
+
const outline2 = parseOutlineLevel(first2(pPr, "outlineLvl"));
|
|
625
|
+
if (outline2 !== void 0) result.outlineLevel = outline2;
|
|
617
626
|
const borders = parseParagraphBorders(first2(pPr, "pBdr"));
|
|
618
627
|
if (borders) result.borders = borders;
|
|
619
628
|
const shading = parseShadingFill(first2(pPr, "shd"));
|
|
@@ -6951,6 +6960,8 @@ function parseParagraph2(node, id) {
|
|
|
6951
6960
|
const value = onOffElement(first2(props, key));
|
|
6952
6961
|
if (value !== void 0) paragraph[key] = value;
|
|
6953
6962
|
}
|
|
6963
|
+
const outline2 = parseOutlineLevel(first2(props, "outlineLvl"));
|
|
6964
|
+
if (outline2 !== void 0) paragraph.outlineLevel = outline2;
|
|
6954
6965
|
const frame = first2(props, "framePr");
|
|
6955
6966
|
const dropCap = getW(frame, "dropCap");
|
|
6956
6967
|
if (dropCap === "drop" || dropCap === "margin") {
|
package/dist/docx/index.cjs
CHANGED
|
@@ -955,6 +955,13 @@ var PAGINATION_KEYS = [
|
|
|
955
955
|
"contextualSpacing",
|
|
956
956
|
"suppressLineNumbers"
|
|
957
957
|
];
|
|
958
|
+
function parseOutlineLevel(element) {
|
|
959
|
+
const raw = getW(element, "val");
|
|
960
|
+
if (raw === void 0) return void 0;
|
|
961
|
+
const value = Number(raw);
|
|
962
|
+
if (!Number.isInteger(value) || value < 0 || value > 9) return void 0;
|
|
963
|
+
return value === 9 ? 0 : value + 1;
|
|
964
|
+
}
|
|
958
965
|
function parseFormatting(pPr) {
|
|
959
966
|
const result = {};
|
|
960
967
|
const { align, justification } = parseJustification(pPr);
|
|
@@ -966,6 +973,8 @@ function parseFormatting(pPr) {
|
|
|
966
973
|
const value = enabled(first2(pPr, key));
|
|
967
974
|
if (value !== void 0) result[key] = value;
|
|
968
975
|
}
|
|
976
|
+
const outline2 = parseOutlineLevel(first2(pPr, "outlineLvl"));
|
|
977
|
+
if (outline2 !== void 0) result.outlineLevel = outline2;
|
|
969
978
|
const borders = parseParagraphBorders(first2(pPr, "pBdr"));
|
|
970
979
|
if (borders) result.borders = borders;
|
|
971
980
|
const shading = parseShadingFill(first2(pPr, "shd"));
|
|
@@ -1083,6 +1092,7 @@ function resolveParagraphFormatting(paragraph, catalog) {
|
|
|
1083
1092
|
"firstLineTwips",
|
|
1084
1093
|
"hangingTwips",
|
|
1085
1094
|
...PAGINATION_KEYS,
|
|
1095
|
+
"outlineLevel",
|
|
1086
1096
|
"borders",
|
|
1087
1097
|
"shadingFill"
|
|
1088
1098
|
];
|
|
@@ -7849,6 +7859,8 @@ function parseParagraph2(node, id) {
|
|
|
7849
7859
|
const value = onOffElement(first2(props, key));
|
|
7850
7860
|
if (value !== void 0) paragraph[key] = value;
|
|
7851
7861
|
}
|
|
7862
|
+
const outline2 = parseOutlineLevel(first2(props, "outlineLvl"));
|
|
7863
|
+
if (outline2 !== void 0) paragraph.outlineLevel = outline2;
|
|
7852
7864
|
const frame = first2(props, "framePr");
|
|
7853
7865
|
const dropCap = getW(frame, "dropCap");
|
|
7854
7866
|
if (dropCap === "drop" || dropCap === "margin") {
|
|
@@ -9356,6 +9368,33 @@ function dateFieldResult(name, instr, now, locale) {
|
|
|
9356
9368
|
return formatWordDate(now, picture, locale);
|
|
9357
9369
|
}
|
|
9358
9370
|
|
|
9371
|
+
// src/docx/toc-switches.ts
|
|
9372
|
+
function styleMap(instruction) {
|
|
9373
|
+
const map = /* @__PURE__ */ new Map();
|
|
9374
|
+
const match = /\\t\s*(?:"([^"]*)"|(\S+))/.exec(instruction);
|
|
9375
|
+
const parts = (match?.[1] ?? match?.[2] ?? "").split(/[,;]/).map((part) => part.trim());
|
|
9376
|
+
for (let i = 0; i + 1 < parts.length; i += 2) {
|
|
9377
|
+
const name = parts[i];
|
|
9378
|
+
const level = Number(parts[i + 1]);
|
|
9379
|
+
if (name && Number.isInteger(level) && level >= 1 && level <= 9)
|
|
9380
|
+
map.set(name.toLowerCase(), level);
|
|
9381
|
+
}
|
|
9382
|
+
return map;
|
|
9383
|
+
}
|
|
9384
|
+
function tocSwitches(instruction) {
|
|
9385
|
+
const range = /\\o\s*"?(\d)\s*-\s*(\d)"?/.exec(instruction);
|
|
9386
|
+
const hasO = /\\o(?![a-z])/i.test(instruction);
|
|
9387
|
+
const outline2 = /\\u(?![a-z])/i.test(instruction);
|
|
9388
|
+
const styles = styleMap(instruction);
|
|
9389
|
+
return {
|
|
9390
|
+
headings: hasO || !outline2 && styles.size === 0,
|
|
9391
|
+
outline: outline2,
|
|
9392
|
+
styles,
|
|
9393
|
+
from: range ? Number(range[1]) : 1,
|
|
9394
|
+
to: range ? Number(range[2]) : 9
|
|
9395
|
+
};
|
|
9396
|
+
}
|
|
9397
|
+
|
|
9359
9398
|
// src/docx/table-of-figures.ts
|
|
9360
9399
|
function tocCaptionLabel(instruction) {
|
|
9361
9400
|
return /\\c\s*"([^"]+)"/.exec(instruction)?.[1];
|
|
@@ -9400,17 +9439,33 @@ function tocEntries(model, instruction = DEFAULT_TOC_INSTRUCTION) {
|
|
|
9400
9439
|
const label = tocCaptionLabel(instruction);
|
|
9401
9440
|
if (label)
|
|
9402
9441
|
return captionParagraphs(model, label).map((paragraph) => ({ level: 1, text: plainText(paragraph), blockId: paragraph.id })).filter((entry) => entry.text);
|
|
9403
|
-
const
|
|
9442
|
+
const switches = tocSwitches(instruction);
|
|
9404
9443
|
const entries = [];
|
|
9405
9444
|
for (const block of model.blocks) {
|
|
9406
9445
|
if (block.type !== "paragraph") continue;
|
|
9407
|
-
const level =
|
|
9446
|
+
const level = entryLevel(block, model.paragraphStyles, switches);
|
|
9408
9447
|
const text = plainText(block);
|
|
9409
|
-
if (level !== void 0 &&
|
|
9410
|
-
entries.push({ level, text, blockId: block.id });
|
|
9448
|
+
if (level !== void 0 && text) entries.push({ level, text, blockId: block.id });
|
|
9411
9449
|
}
|
|
9412
9450
|
return entries;
|
|
9413
9451
|
}
|
|
9452
|
+
function entryLevel(paragraph, catalog, switches) {
|
|
9453
|
+
const inRange = (level) => level !== void 0 && level >= switches.from && level <= switches.to ? level : void 0;
|
|
9454
|
+
if (switches.styles.size > 0 && paragraph.style) {
|
|
9455
|
+
const name = catalog?.styles[paragraph.style]?.name;
|
|
9456
|
+
const mapped = switches.styles.get(paragraph.style.toLowerCase()) ?? (name ? switches.styles.get(name.toLowerCase()) : void 0);
|
|
9457
|
+
if (mapped !== void 0) return mapped;
|
|
9458
|
+
}
|
|
9459
|
+
if (switches.headings) {
|
|
9460
|
+
const heading2 = inRange(headingLevel(paragraph, catalog));
|
|
9461
|
+
if (heading2 !== void 0) return heading2;
|
|
9462
|
+
}
|
|
9463
|
+
if (switches.outline) {
|
|
9464
|
+
const outline2 = catalog ? resolveParagraphFormatting(paragraph, catalog).outlineLevel : paragraph.outlineLevel;
|
|
9465
|
+
return inRange(outline2 || void 0);
|
|
9466
|
+
}
|
|
9467
|
+
return void 0;
|
|
9468
|
+
}
|
|
9414
9469
|
function linkedEntry(text, bookmark, page) {
|
|
9415
9470
|
const link = { anchor: bookmark };
|
|
9416
9471
|
const runs = [{ text: page === void 0 ? text : `${text} `, link }];
|
package/dist/docx/index.mjs
CHANGED
|
@@ -949,6 +949,13 @@ var PAGINATION_KEYS = [
|
|
|
949
949
|
"contextualSpacing",
|
|
950
950
|
"suppressLineNumbers"
|
|
951
951
|
];
|
|
952
|
+
function parseOutlineLevel(element) {
|
|
953
|
+
const raw = getW(element, "val");
|
|
954
|
+
if (raw === void 0) return void 0;
|
|
955
|
+
const value = Number(raw);
|
|
956
|
+
if (!Number.isInteger(value) || value < 0 || value > 9) return void 0;
|
|
957
|
+
return value === 9 ? 0 : value + 1;
|
|
958
|
+
}
|
|
952
959
|
function parseFormatting(pPr) {
|
|
953
960
|
const result = {};
|
|
954
961
|
const { align, justification } = parseJustification(pPr);
|
|
@@ -960,6 +967,8 @@ function parseFormatting(pPr) {
|
|
|
960
967
|
const value = enabled(first2(pPr, key));
|
|
961
968
|
if (value !== void 0) result[key] = value;
|
|
962
969
|
}
|
|
970
|
+
const outline2 = parseOutlineLevel(first2(pPr, "outlineLvl"));
|
|
971
|
+
if (outline2 !== void 0) result.outlineLevel = outline2;
|
|
963
972
|
const borders = parseParagraphBorders(first2(pPr, "pBdr"));
|
|
964
973
|
if (borders) result.borders = borders;
|
|
965
974
|
const shading = parseShadingFill(first2(pPr, "shd"));
|
|
@@ -1077,6 +1086,7 @@ function resolveParagraphFormatting(paragraph, catalog) {
|
|
|
1077
1086
|
"firstLineTwips",
|
|
1078
1087
|
"hangingTwips",
|
|
1079
1088
|
...PAGINATION_KEYS,
|
|
1089
|
+
"outlineLevel",
|
|
1080
1090
|
"borders",
|
|
1081
1091
|
"shadingFill"
|
|
1082
1092
|
];
|
|
@@ -7843,6 +7853,8 @@ function parseParagraph2(node, id) {
|
|
|
7843
7853
|
const value = onOffElement(first2(props, key));
|
|
7844
7854
|
if (value !== void 0) paragraph[key] = value;
|
|
7845
7855
|
}
|
|
7856
|
+
const outline2 = parseOutlineLevel(first2(props, "outlineLvl"));
|
|
7857
|
+
if (outline2 !== void 0) paragraph.outlineLevel = outline2;
|
|
7846
7858
|
const frame = first2(props, "framePr");
|
|
7847
7859
|
const dropCap = getW(frame, "dropCap");
|
|
7848
7860
|
if (dropCap === "drop" || dropCap === "margin") {
|
|
@@ -9350,6 +9362,33 @@ function dateFieldResult(name, instr, now, locale) {
|
|
|
9350
9362
|
return formatWordDate(now, picture, locale);
|
|
9351
9363
|
}
|
|
9352
9364
|
|
|
9365
|
+
// src/docx/toc-switches.ts
|
|
9366
|
+
function styleMap(instruction) {
|
|
9367
|
+
const map = /* @__PURE__ */ new Map();
|
|
9368
|
+
const match = /\\t\s*(?:"([^"]*)"|(\S+))/.exec(instruction);
|
|
9369
|
+
const parts = (match?.[1] ?? match?.[2] ?? "").split(/[,;]/).map((part) => part.trim());
|
|
9370
|
+
for (let i = 0; i + 1 < parts.length; i += 2) {
|
|
9371
|
+
const name = parts[i];
|
|
9372
|
+
const level = Number(parts[i + 1]);
|
|
9373
|
+
if (name && Number.isInteger(level) && level >= 1 && level <= 9)
|
|
9374
|
+
map.set(name.toLowerCase(), level);
|
|
9375
|
+
}
|
|
9376
|
+
return map;
|
|
9377
|
+
}
|
|
9378
|
+
function tocSwitches(instruction) {
|
|
9379
|
+
const range = /\\o\s*"?(\d)\s*-\s*(\d)"?/.exec(instruction);
|
|
9380
|
+
const hasO = /\\o(?![a-z])/i.test(instruction);
|
|
9381
|
+
const outline2 = /\\u(?![a-z])/i.test(instruction);
|
|
9382
|
+
const styles = styleMap(instruction);
|
|
9383
|
+
return {
|
|
9384
|
+
headings: hasO || !outline2 && styles.size === 0,
|
|
9385
|
+
outline: outline2,
|
|
9386
|
+
styles,
|
|
9387
|
+
from: range ? Number(range[1]) : 1,
|
|
9388
|
+
to: range ? Number(range[2]) : 9
|
|
9389
|
+
};
|
|
9390
|
+
}
|
|
9391
|
+
|
|
9353
9392
|
// src/docx/table-of-figures.ts
|
|
9354
9393
|
function tocCaptionLabel(instruction) {
|
|
9355
9394
|
return /\\c\s*"([^"]+)"/.exec(instruction)?.[1];
|
|
@@ -9394,17 +9433,33 @@ function tocEntries(model, instruction = DEFAULT_TOC_INSTRUCTION) {
|
|
|
9394
9433
|
const label = tocCaptionLabel(instruction);
|
|
9395
9434
|
if (label)
|
|
9396
9435
|
return captionParagraphs(model, label).map((paragraph) => ({ level: 1, text: plainText(paragraph), blockId: paragraph.id })).filter((entry) => entry.text);
|
|
9397
|
-
const
|
|
9436
|
+
const switches = tocSwitches(instruction);
|
|
9398
9437
|
const entries = [];
|
|
9399
9438
|
for (const block of model.blocks) {
|
|
9400
9439
|
if (block.type !== "paragraph") continue;
|
|
9401
|
-
const level =
|
|
9440
|
+
const level = entryLevel(block, model.paragraphStyles, switches);
|
|
9402
9441
|
const text = plainText(block);
|
|
9403
|
-
if (level !== void 0 &&
|
|
9404
|
-
entries.push({ level, text, blockId: block.id });
|
|
9442
|
+
if (level !== void 0 && text) entries.push({ level, text, blockId: block.id });
|
|
9405
9443
|
}
|
|
9406
9444
|
return entries;
|
|
9407
9445
|
}
|
|
9446
|
+
function entryLevel(paragraph, catalog, switches) {
|
|
9447
|
+
const inRange = (level) => level !== void 0 && level >= switches.from && level <= switches.to ? level : void 0;
|
|
9448
|
+
if (switches.styles.size > 0 && paragraph.style) {
|
|
9449
|
+
const name = catalog?.styles[paragraph.style]?.name;
|
|
9450
|
+
const mapped = switches.styles.get(paragraph.style.toLowerCase()) ?? (name ? switches.styles.get(name.toLowerCase()) : void 0);
|
|
9451
|
+
if (mapped !== void 0) return mapped;
|
|
9452
|
+
}
|
|
9453
|
+
if (switches.headings) {
|
|
9454
|
+
const heading2 = inRange(headingLevel(paragraph, catalog));
|
|
9455
|
+
if (heading2 !== void 0) return heading2;
|
|
9456
|
+
}
|
|
9457
|
+
if (switches.outline) {
|
|
9458
|
+
const outline2 = catalog ? resolveParagraphFormatting(paragraph, catalog).outlineLevel : paragraph.outlineLevel;
|
|
9459
|
+
return inRange(outline2 || void 0);
|
|
9460
|
+
}
|
|
9461
|
+
return void 0;
|
|
9462
|
+
}
|
|
9408
9463
|
function linkedEntry(text, bookmark, page) {
|
|
9409
9464
|
const link = { anchor: bookmark };
|
|
9410
9465
|
const runs = [{ text: page === void 0 ? text : `${text} `, link }];
|
package/dist/docx/load/index.cjs
CHANGED
|
@@ -7977,6 +7977,13 @@ var PAGINATION_KEYS = [
|
|
|
7977
7977
|
"contextualSpacing",
|
|
7978
7978
|
"suppressLineNumbers"
|
|
7979
7979
|
];
|
|
7980
|
+
function parseOutlineLevel(element) {
|
|
7981
|
+
const raw = getW(element, "val");
|
|
7982
|
+
if (raw === void 0) return void 0;
|
|
7983
|
+
const value = Number(raw);
|
|
7984
|
+
if (!Number.isInteger(value) || value < 0 || value > 9) return void 0;
|
|
7985
|
+
return value === 9 ? 0 : value + 1;
|
|
7986
|
+
}
|
|
7980
7987
|
function parseFormatting(pPr) {
|
|
7981
7988
|
const result = {};
|
|
7982
7989
|
const { align, justification } = parseJustification(pPr);
|
|
@@ -7988,6 +7995,8 @@ function parseFormatting(pPr) {
|
|
|
7988
7995
|
const value = enabled(first2(pPr, key));
|
|
7989
7996
|
if (value !== void 0) result[key] = value;
|
|
7990
7997
|
}
|
|
7998
|
+
const outline2 = parseOutlineLevel(first2(pPr, "outlineLvl"));
|
|
7999
|
+
if (outline2 !== void 0) result.outlineLevel = outline2;
|
|
7991
8000
|
const borders = parseParagraphBorders(first2(pPr, "pBdr"));
|
|
7992
8001
|
if (borders) result.borders = borders;
|
|
7993
8002
|
const shading = parseShadingFill(first2(pPr, "shd"));
|
|
@@ -8699,6 +8708,8 @@ function parseParagraph2(node, id) {
|
|
|
8699
8708
|
const value = onOffElement(first2(props, key));
|
|
8700
8709
|
if (value !== void 0) paragraph[key] = value;
|
|
8701
8710
|
}
|
|
8711
|
+
const outline2 = parseOutlineLevel(first2(props, "outlineLvl"));
|
|
8712
|
+
if (outline2 !== void 0) paragraph.outlineLevel = outline2;
|
|
8702
8713
|
const frame = first2(props, "framePr");
|
|
8703
8714
|
const dropCap = getW(frame, "dropCap");
|
|
8704
8715
|
if (dropCap === "drop" || dropCap === "margin") {
|
package/dist/docx/load/index.mjs
CHANGED
|
@@ -7971,6 +7971,13 @@ var PAGINATION_KEYS = [
|
|
|
7971
7971
|
"contextualSpacing",
|
|
7972
7972
|
"suppressLineNumbers"
|
|
7973
7973
|
];
|
|
7974
|
+
function parseOutlineLevel(element) {
|
|
7975
|
+
const raw = getW(element, "val");
|
|
7976
|
+
if (raw === void 0) return void 0;
|
|
7977
|
+
const value = Number(raw);
|
|
7978
|
+
if (!Number.isInteger(value) || value < 0 || value > 9) return void 0;
|
|
7979
|
+
return value === 9 ? 0 : value + 1;
|
|
7980
|
+
}
|
|
7974
7981
|
function parseFormatting(pPr) {
|
|
7975
7982
|
const result = {};
|
|
7976
7983
|
const { align, justification } = parseJustification(pPr);
|
|
@@ -7982,6 +7989,8 @@ function parseFormatting(pPr) {
|
|
|
7982
7989
|
const value = enabled(first2(pPr, key));
|
|
7983
7990
|
if (value !== void 0) result[key] = value;
|
|
7984
7991
|
}
|
|
7992
|
+
const outline2 = parseOutlineLevel(first2(pPr, "outlineLvl"));
|
|
7993
|
+
if (outline2 !== void 0) result.outlineLevel = outline2;
|
|
7985
7994
|
const borders = parseParagraphBorders(first2(pPr, "pBdr"));
|
|
7986
7995
|
if (borders) result.borders = borders;
|
|
7987
7996
|
const shading = parseShadingFill(first2(pPr, "shd"));
|
|
@@ -8693,6 +8702,8 @@ function parseParagraph2(node, id) {
|
|
|
8693
8702
|
const value = onOffElement(first2(props, key));
|
|
8694
8703
|
if (value !== void 0) paragraph[key] = value;
|
|
8695
8704
|
}
|
|
8705
|
+
const outline2 = parseOutlineLevel(first2(props, "outlineLvl"));
|
|
8706
|
+
if (outline2 !== void 0) paragraph.outlineLevel = outline2;
|
|
8696
8707
|
const frame = first2(props, "framePr");
|
|
8697
8708
|
const dropCap = getW(frame, "dropCap");
|
|
8698
8709
|
if (dropCap === "drop" || dropCap === "margin") {
|
|
@@ -57,6 +57,11 @@ export interface Paragraph {
|
|
|
57
57
|
contextualSpacing?: boolean;
|
|
58
58
|
/** `w:suppressLineNumbers`: omit this paragraph from line numbering; false overrides a style. */
|
|
59
59
|
suppressLineNumbers?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* `w:outlineLvl` as a 1-9 level, or 0 for body text (`w:val="9"`, which cancels a style's
|
|
62
|
+
* level). Read-only like `borders`: the source XML keeps it and it is not written for new paragraphs.
|
|
63
|
+
*/
|
|
64
|
+
outlineLevel?: number;
|
|
60
65
|
/**
|
|
61
66
|
* `w:framePr/@w:dropCap`: this paragraph is a drop cap frame (the initial letter) for the
|
|
62
67
|
* paragraph that follows. `lines` is the number of text lines it spans.
|
|
@@ -78,7 +83,7 @@ export interface Paragraph {
|
|
|
78
83
|
bookmarks?: string[];
|
|
79
84
|
}
|
|
80
85
|
/** Direct paragraph properties supported by the editor, in native Word units. */
|
|
81
|
-
export type ParagraphFormatting = Pick<Paragraph, 'align' | 'justification' | 'direction' | 'spacingBeforeTwips' | 'spacingAfterTwips' | 'lineSpacingTwips' | 'lineSpacingRule' | 'indentLeftTwips' | 'indentRightTwips' | 'indentStartTwips' | 'indentEndTwips' | 'firstLineTwips' | 'hangingTwips' | 'keepNext' | 'keepLines' | 'widowControl' | 'contextualSpacing' | 'suppressLineNumbers' | 'borders' | 'shadingFill'>;
|
|
86
|
+
export type ParagraphFormatting = Pick<Paragraph, 'align' | 'justification' | 'direction' | 'spacingBeforeTwips' | 'spacingAfterTwips' | 'lineSpacingTwips' | 'lineSpacingRule' | 'indentLeftTwips' | 'indentRightTwips' | 'indentStartTwips' | 'indentEndTwips' | 'firstLineTwips' | 'hangingTwips' | 'keepNext' | 'keepLines' | 'widowControl' | 'contextualSpacing' | 'suppressLineNumbers' | 'outlineLevel' | 'borders' | 'shadingFill'>;
|
|
82
87
|
export interface ParagraphStyleDefinition {
|
|
83
88
|
id: string;
|
|
84
89
|
name?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-paragraph.d.ts","sourceRoot":"","sources":["../../src/docx/model-paragraph.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAErD,gGAAgG;AAChG,MAAM,WAAW,OAAO;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,QAAQ,CAAC;CAClB;AACD,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,WAAW,CAAC;IAClB,oEAA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gB,GAChB,gBAAgB,GAChB,cAAc,GACd,UAAU,GACV,WAAW,GACX,cAAc,GACd,mBAAmB,GACnB,qBAAqB,GACrB,cAAc,GACd,SAAS,GACT,aAAa,CACf,CAAC;AACF,MAAM,WAAW,wBAAwB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,mBAAmB,CAAC;IAChC,kGAAkG;IAClG,SAAS,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7C;AACD,4FAA4F;AAC5F,MAAM,WAAW,qBAAqB;IACrC,WAAW,EAAE,mBAAmB,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;IACjD,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -2,6 +2,8 @@ import type { Paragraph, ParagraphFormatting, ParagraphStyleCatalog } from './mo
|
|
|
2
2
|
import { type XmlElement } from './xml.js';
|
|
3
3
|
/** Pagination toggles whose element names match their model keys. */
|
|
4
4
|
export declare const PAGINATION_KEYS: readonly ['keepNext', 'keepLines', 'widowControl', 'contextualSpacing', 'suppressLineNumbers'];
|
|
5
|
+
/** `w:outlineLvl` as a 1-9 level (0 for body text, `w:val="9"`); undefined when absent or invalid. */
|
|
6
|
+
export declare function parseOutlineLevel(element: XmlElement | undefined): number | undefined;
|
|
5
7
|
/** Parses `w:pPr` formatting (shared by styles, docDefaults and direct paragraph properties). */
|
|
6
8
|
export declare function parseFormatting(pPr: XmlElement | undefined): ParagraphFormatting;
|
|
7
9
|
export declare function parseParagraphStyleCatalog(xml: string): ParagraphStyleCatalog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paragraph-styles.d.ts","sourceRoot":"","sources":["../../src/docx/paragraph-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,SAAS,EACT,mBAAmB,EACnB,qBAAqB,EAErB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAkD,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAe3F,qEAAqE;AACrE,eAAO,MAAM,eAAe,YAC3B,UAAU,EACV,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,qBAAqB,CACZ,CAAC;AAEX,iGAAiG;AACjG,wBAAgB,eAAe,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,mBAAmB,
|
|
1
|
+
{"version":3,"file":"paragraph-styles.d.ts","sourceRoot":"","sources":["../../src/docx/paragraph-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,SAAS,EACT,mBAAmB,EACnB,qBAAqB,EAErB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAkD,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAe3F,qEAAqE;AACrE,eAAO,MAAM,eAAe,YAC3B,UAAU,EACV,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,qBAAqB,CACZ,CAAC;AAEX,sGAAsG;AACtG,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAMrF;AAED,iGAAiG;AACjG,wBAAgB,eAAe,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,mBAAmB,CA6ChF;AAmBD,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAqC7E;AAoBD,0FAA0F;AAC1F,wBAAgB,0BAA0B,CACzC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,qBAAqB,GAC5B,mBAAmB,CA6CrB;AAED,8FAA8F;AAC9F,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,qBAAqB,GAC5B;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAY9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-of-contents.d.ts","sourceRoot":"","sources":["../../src/docx/table-of-contents.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-of-contents.d.ts","sourceRoot":"","sources":["../../src/docx/table-of-contents.ts"],"names":[],"mappings":"AAQA,OAAO,EAAsB,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAElG,eAAO,MAAM,uBAAuB,kCAAgC,CAAC;AACrE,oDAAoD;AACpD,eAAO,MAAM,cAAc,wCAAwC,CAAC;AACpE,iEAAiE;AACjE,eAAO,MAAM,kBAAkB,uCAAuC,CAAC;AAEvE,qGAAqG;AACrG,wBAAgB,YAAY,CAC3B,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE,qBAAqB,GAC7B,MAAM,GAAG,SAAS,CAWpB;AAED,yFAAyF;AACzF,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAG3E;AAUD,MAAM,WAAW,QAAQ;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,4EAA4E;AAC5E,wBAAgB,UAAU,CACzB,KAAK,EAAE,aAAa,EACpB,WAAW,SAA0B,GACnC,QAAQ,EAAE,CAeZ;AA8BD,MAAM,WAAW,UAAU;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kGAAkG;IAClG,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,uEAAuE;IACvE,iBAAiB,CA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
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface TocSwitches {
|
|
2
|
+
/** `\o` was given: heading styles within `from`-`to` are collected. */
|
|
3
|
+
headings: boolean;
|
|
4
|
+
/** `\u`: paragraphs with an outline level within `from`-`to` are collected. */
|
|
5
|
+
outline: boolean;
|
|
6
|
+
/** `\t`: style name or id (lower case) to the level its paragraphs get. */
|
|
7
|
+
styles: Map<string, number>;
|
|
8
|
+
from: number;
|
|
9
|
+
to: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* What a TOC instruction collects. With no collecting switch at all the field keeps this
|
|
13
|
+
* package's historic reading (every heading level), so a bare `TOC` still lists its headings.
|
|
14
|
+
*/
|
|
15
|
+
export declare function tocSwitches(instruction: string): TocSwitches;
|
|
16
|
+
//# sourceMappingURL=toc-switches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toc-switches.d.ts","sourceRoot":"","sources":["../../src/docx/toc-switches.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC3B,uEAAuE;IACvE,QAAQ,EAAE,OAAO,CAAC;IAClB,+EAA+E;IAC/E,OAAO,EAAE,OAAO,CAAC;IACjB,2EAA2E;IAC3E,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACX;AAgBD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,CAY5D"}
|
|
@@ -17,6 +17,15 @@ export declare abstract class EngineCore extends EngineHost {
|
|
|
17
17
|
* INDIRECT chains need no deep recursion. A node needed again while it waits is in a loop.
|
|
18
18
|
*/
|
|
19
19
|
protected computeFrom(root: FormulaNode): void;
|
|
20
|
+
/**
|
|
21
|
+
* Iterative calculation of a circular group (`calcPr iterate`): every member is recomputed in
|
|
22
|
+
* turn, reading the others' values from the previous step, until the largest change is within
|
|
23
|
+
* `delta` or `count` passes have run. The group starts from the values the cells hold.
|
|
24
|
+
*/
|
|
25
|
+
protected iterateGroup(nodes: FormulaNode[], limits: {
|
|
26
|
+
count: number;
|
|
27
|
+
delta: number;
|
|
28
|
+
}): void;
|
|
20
29
|
protected markCycle(node: FormulaNode): void;
|
|
21
30
|
protected compute(node: FormulaNode): void;
|
|
22
31
|
protected store(node: FormulaNode, cell: Cell, result: Scalar | Matrix): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-core.d.ts","sourceRoot":"","sources":["../../../src/xlsx/formula/engine-core.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAY,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAKxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAI9C,OAAO,EAAoB,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"engine-core.d.ts","sourceRoot":"","sources":["../../../src/xlsx/formula/engine-core.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAY,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAKxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAI9C,OAAO,EAAoB,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M,EACX,IAAI,EAAE,UAAU,GAAG,SAAS,EAC5B,MAAM,UAAQ,GACZ,KAAK,CAEP;IAED,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,CAgB5D;CACD"}
|
|
@@ -29,6 +29,8 @@ export declare abstract class EngineHost implements EvalHost {
|
|
|
29
29
|
protected readonly inProgress: Set<FormulaNode>;
|
|
30
30
|
protected cycles: Set<FormulaNode>;
|
|
31
31
|
protected dynamicCycleHits: Set<FormulaNode>;
|
|
32
|
+
/** Set while a circular group is iterated: reads of a formula in progress see its stored value. */
|
|
33
|
+
protected iterating: boolean;
|
|
32
34
|
protected pending: Set<FormulaNode> | undefined;
|
|
33
35
|
protected columnIndex: ColumnIndex | undefined;
|
|
34
36
|
protected reverseIndex: ReverseIndex | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-host.d.ts","sourceRoot":"","sources":["../../../src/xlsx/formula/engine-host.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,SAAS,EAAkB,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAW,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIxE,OAAO,EAAE,KAAK,IAAI,EAAO,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAElE;;;;GAIG;AACH,qBAAa,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,CAAC,QAAQ,IAAI,WAAW,EAAE,CAIlC;IAED,SAAS,CAAC,OAAO,IAAI,WAAW,CAE/B;IAED,SAAS,CAAC,OAAO,IAAI,YAAY,CAEhC;IAED,oEAAoE;IACpE,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;CACpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bonds.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/formula/functions/bonds.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAgH/C,eAAO,MAAM,cAAc,EAAE,YAAY,EAgFxC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Scalar } from '../values.js';
|
|
2
|
+
import type { FunctionSpec } from './types.js';
|
|
3
|
+
interface Complex {
|
|
4
|
+
re: number;
|
|
5
|
+
im: number;
|
|
6
|
+
suffix: 'i' | 'j';
|
|
7
|
+
}
|
|
8
|
+
/** A complex number from Excel text such as `3+4i`, `-j` or `5`; anything else is `#NUM!`. */
|
|
9
|
+
export declare function parseComplex(value: Scalar): Complex;
|
|
10
|
+
export declare function formatComplex({ re, im, suffix }: Complex): string;
|
|
11
|
+
/** Complex numbers held as text (`COMPLEX` and the `IM` functions). */
|
|
12
|
+
export declare const COMPLEX_FUNCTIONS: FunctionSpec[];
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=complex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complex.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/formula/functions/complex.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,MAAM,EAAc,MAAM,cAAc,CAAC;AAE3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,UAAU,OAAO;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,GAAG,GAAG,GAAG,CAAC;CAClB;AAUD,8FAA8F;AAC9F,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAsBnD;AASD,wBAAgB,aAAa,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,OAAO,GAAG,MAAM,CAOjE;AAuFD,uEAAuE;AACvE,eAAO,MAAM,iBAAiB,EAAE,YAAY,EAuF3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/formula/functions/convert.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AA2M/C,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAS5E;AAED,eAAO,MAAM,iBAAiB,EAAE,YAAY,EAU3C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CallContext } from '../context.js';
|
|
2
|
+
import type { FunctionSpec } from './types.js';
|
|
3
|
+
export interface CouponFacts {
|
|
4
|
+
/** The last coupon date on or before settlement. */
|
|
5
|
+
previous: number;
|
|
6
|
+
/** The first coupon date after settlement. */
|
|
7
|
+
next: number;
|
|
8
|
+
/** Coupons payable between settlement and maturity. */
|
|
9
|
+
count: number;
|
|
10
|
+
/** Days from the previous coupon to settlement. */
|
|
11
|
+
daysSincePrevious: number;
|
|
12
|
+
/** Days in the coupon period holding settlement. */
|
|
13
|
+
daysInPeriod: number;
|
|
14
|
+
/** Days from settlement to the next coupon. */
|
|
15
|
+
daysToNext: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function checkSecurity(settlement: number, maturity: number, frequency: number, basis: number): void;
|
|
18
|
+
/** Coupon dates run back from maturity, on month ends when maturity is one (Excel's rule). */
|
|
19
|
+
export declare function couponFacts(settlement: number, maturity: number, frequency: number, basis: number, ctx: CallContext): CouponFacts;
|
|
20
|
+
export declare const COUPON_FUNCTIONS: FunctionSpec[];
|
|
21
|
+
//# sourceMappingURL=coupons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coupons.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/formula/functions/coupons.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAKjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,MAAM,WAAW,WAAW;IAC3B,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,aAAa,CAC5B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACX,IAAI,CAGN;AAED,8FAA8F;AAC9F,wBAAgB,WAAW,CAC1B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,WAAW,GACd,WAAW,CA2Bb;AA0BD,eAAO,MAAM,gBAAgB,EAAE,YAAY,EAe1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/formula/functions/database.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAkF/C,2FAA2F;AAC3F,eAAO,MAAM,kBAAkB,EAAE,YAAY,EAoC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depreciation.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/formula/functions/depreciation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"depreciation.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/formula/functions/depreciation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAmC/C,eAAO,MAAM,sBAAsB,EAAE,YAAY,EAsNhD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FunctionSpec } from './types.js';
|
|
2
|
+
/** The F cumulative distribution for `x >= 0`. */
|
|
3
|
+
export declare const fCdf: (x: number, d1: number, d2: number) => number;
|
|
4
|
+
/** F, beta and gamma inverses, plus the pre-2010 names of the distribution functions. */
|
|
5
|
+
export declare const DISTRIBUTION_F: FunctionSpec[];
|
|
6
|
+
//# sourceMappingURL=distributions-f.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"distributions-f.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/formula/functions/distributions-f.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAW/C,kDAAkD;AAClD,eAAO,MAAM,IAAI,MAAO,MAAM,MAAM,MAAM,MAAM,MAAM,KAAG,MACI,CAAC;AAiE9D,yFAAyF;AACzF,eAAO,MAAM,cAAc,EAAE,YAAY,EAwLxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distributions.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/formula/functions/distributions.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"distributions.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/formula/functions/distributions.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C,eAAO,MAAM,sBAAsB,EAAE,YAAY,EAkPhD,CAAC"}
|