@reportwright/viewer 0.13.1 → 0.13.2-rc.1
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/CHANGELOG.md +38 -0
- package/README.md +146 -5
- package/dist/{chunk-B5ZCT3UK.js → chunk-2KNQVFKW.js} +72 -45
- package/dist/{chunk-B5ZCT3UK.js.map → chunk-2KNQVFKW.js.map} +2 -2
- package/dist/{chunk-XXTAPZO4.js → chunk-D7S5DL46.js} +2 -2
- package/dist/{chunk-ES2LYZ6S.js → chunk-DVJYE7HZ.js} +3 -3
- package/dist/chunk-GOCWG6FG.js +12 -12
- package/dist/chunk-GRYITZPG.js +23 -23
- package/dist/chunk-H422SRD3.js +21 -21
- package/dist/{chunk-PF4RFKX2.js → chunk-NARXO3DB.js} +3 -3
- package/dist/{chunk-PKXTMC4J.js → chunk-OED3YZYP.js} +5 -5
- package/dist/{chunk-ZGRJJ6OW.js → chunk-OMCWZYRI.js} +32 -17
- package/dist/chunk-OMCWZYRI.js.map +6 -0
- package/dist/chunk-U2ZY2NPQ.js +2 -2
- package/dist/designer.js +327 -132
- package/dist/designer.js.map +3 -3
- package/dist/engine.worker.bwip.js +4780 -51421
- package/dist/engine.worker.bwip.js.map +3 -3
- package/dist/engine.worker.js +5675 -59626
- package/dist/engine.worker.js.map +3 -3
- package/dist/peer/{chunk-7IP67PA6.js → chunk-6KUUNDNN.js} +47 -20
- package/dist/peer/{chunk-7IP67PA6.js.map → chunk-6KUUNDNN.js.map} +1 -1
- package/dist/peer/chunk-A6UXBSTP.js +21 -21
- package/dist/peer/{chunk-3EYYRJR4.js → chunk-FN3FXACD.js} +3 -3
- package/dist/peer/{chunk-WVQQCD4M.js → chunk-ILBTPBOA.js} +32 -17
- package/dist/peer/chunk-ILBTPBOA.js.map +6 -0
- package/dist/peer/{chunk-3XZY54LM.js → chunk-JQDW5OR3.js} +5 -5
- package/dist/peer/chunk-MXR6JBMP.js +2 -2
- package/dist/peer/chunk-N42DCZZA.js +12 -12
- package/dist/peer/{chunk-RKFP7SDY.js → chunk-OUTKMWFM.js} +3 -3
- package/dist/peer/{chunk-5RUNOIS7.js → chunk-VJLMUGUI.js} +2 -2
- package/dist/peer/chunk-ZS3J4WBH.js +23 -23
- package/dist/peer/designer.js +313 -119
- package/dist/peer/designer.js.map +3 -3
- package/dist/peer/engine.worker.bwip.js +4780 -51421
- package/dist/peer/engine.worker.bwip.js.map +3 -3
- package/dist/peer/engine.worker.js +5675 -59626
- package/dist/peer/engine.worker.js.map +3 -3
- package/dist/peer/viewer.js +40 -9
- package/dist/peer/viewer.js.map +1 -1
- package/dist/viewer.d.ts +2 -0
- package/dist/viewer.js +40 -9
- package/dist/viewer.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-ZGRJJ6OW.js.map +0 -6
- package/dist/peer/chunk-WVQQCD4M.js.map +0 -6
- /package/dist/{chunk-XXTAPZO4.js.map → chunk-D7S5DL46.js.map} +0 -0
- /package/dist/{chunk-ES2LYZ6S.js.map → chunk-DVJYE7HZ.js.map} +0 -0
- /package/dist/{chunk-PF4RFKX2.js.map → chunk-NARXO3DB.js.map} +0 -0
- /package/dist/{chunk-PKXTMC4J.js.map → chunk-OED3YZYP.js.map} +0 -0
- /package/dist/peer/{chunk-3EYYRJR4.js.map → chunk-FN3FXACD.js.map} +0 -0
- /package/dist/peer/{chunk-3XZY54LM.js.map → chunk-JQDW5OR3.js.map} +0 -0
- /package/dist/peer/{chunk-RKFP7SDY.js.map → chunk-OUTKMWFM.js.map} +0 -0
- /package/dist/peer/{chunk-5RUNOIS7.js.map → chunk-VJLMUGUI.js.map} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
parameterOptions,
|
|
9
9
|
render,
|
|
10
10
|
resolveParameters
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OMCWZYRI.js";
|
|
12
12
|
import {
|
|
13
13
|
NO_CJK_FONTS
|
|
14
14
|
} from "./chunk-BR5K6SBL.js";
|
|
@@ -31,4 +31,4 @@ export {
|
|
|
31
31
|
render,
|
|
32
32
|
resolveParameters
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=chunk-
|
|
34
|
+
//# sourceMappingURL=chunk-D7S5DL46.js.map
|
|
@@ -368,7 +368,7 @@ var getFont = async (k) => {
|
|
|
368
368
|
return (await fetchFont(k)).slice(0);
|
|
369
369
|
};
|
|
370
370
|
var engineP = null;
|
|
371
|
-
var loadEngine = () => engineP || (engineP = import("./chunk-
|
|
371
|
+
var loadEngine = () => engineP || (engineP = import("./chunk-D7S5DL46.js"));
|
|
372
372
|
async function loadFontStore() {
|
|
373
373
|
const { FontStore } = await loadEngine();
|
|
374
374
|
return mainStore || (mainStore = new FontStore(getFont));
|
|
@@ -507,7 +507,7 @@ async function pdfBlob(model, title, o = {}) {
|
|
|
507
507
|
const store = await loadFontStore();
|
|
508
508
|
await customFonts();
|
|
509
509
|
await store.load(fontKeysOf(model));
|
|
510
|
-
const { exportPdf } = await import("./chunk-
|
|
510
|
+
const { exportPdf } = await import("./chunk-OED3YZYP.js");
|
|
511
511
|
const bytes = await exportPdf(model, store, {
|
|
512
512
|
title,
|
|
513
513
|
subset: subsetter,
|
|
@@ -758,4 +758,4 @@ export {
|
|
|
758
758
|
paramChoices,
|
|
759
759
|
clearStaleParams
|
|
760
760
|
};
|
|
761
|
-
//# sourceMappingURL=chunk-
|
|
761
|
+
//# sourceMappingURL=chunk-DVJYE7HZ.js.map
|
package/dist/chunk-GOCWG6FG.js
CHANGED
|
@@ -25,8 +25,8 @@ import { Zip, ZipDeflate, strToU8 } from "fflate";
|
|
|
25
25
|
var TW = 20;
|
|
26
26
|
var EMU = 12700;
|
|
27
27
|
var CONTENT_TYPES = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
28
|
-
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Default Extension="png" ContentType="image/png"/><Default Extension="jpeg" ContentType="image/jpeg"/><Default Extension="svg" ContentType="image/svg+xml"/><Override Part
|
|
29
|
-
Name="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/><Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/></Types>`;
|
|
28
|
+
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Default Extension="png" ContentType="image/png"/><Default Extension="jpeg" ContentType="image/jpeg"/><Default Extension="svg" ContentType="image/svg+xml"/><Override Part${
|
|
29
|
+
""}Name="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/><Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/></Types>`;
|
|
30
30
|
var RELS = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
31
31
|
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/></Relationships>`;
|
|
32
32
|
var XML_CHUNK = 4 * 1024 * 1024;
|
|
@@ -151,8 +151,8 @@ function table(cells, indentPt, pics) {
|
|
|
151
151
|
}
|
|
152
152
|
return `<w:tr>${r.kind === "header" ? "<w:trPr><w:tblHeader/></w:trPr>" : ""}${tcs.join("")}</w:tr>`;
|
|
153
153
|
}).join("");
|
|
154
|
-
return `<w:tbl><w:tblPr><w:tblW w:w="0" w:type="auto"/>${indentPt > 0 ? `<w:tblInd w:w="${Math.round(indentPt * TW)}" w:type="dxa"/>` : ""}<w:tblBorders>${tblB}</w:tblBorders><w:tblLayout w:type="fixed"/><w:tblCellMar><w:left w:w="60" w:type="dxa"/><w:right w:w="60" w:type="dxa"/></w:tblCellMar></w:tblPr><w:tblGrid>${grid}</w:tblGrid>${out}</w:tbl><w:p><w:pPr><w:spacing w:before="0" w:after="0"
|
|
155
|
-
></w:pPr></w:p>`;
|
|
154
|
+
return `<w:tbl><w:tblPr><w:tblW w:w="0" w:type="auto"/>${indentPt > 0 ? `<w:tblInd w:w="${Math.round(indentPt * TW)}" w:type="dxa"/>` : ""}<w:tblBorders>${tblB}</w:tblBorders><w:tblLayout w:type="fixed"/><w:tblCellMar><w:left w:w="60" w:type="dxa"/><w:right w:w="60" w:type="dxa"/></w:tblCellMar></w:tblPr><w:tblGrid>${grid}</w:tblGrid>${out}</w:tbl><w:p><w:pPr><w:spacing w:before="0" w:after="0"/${
|
|
155
|
+
""}></w:pPr></w:p>`;
|
|
156
156
|
}
|
|
157
157
|
function layoutRow(row, margin) {
|
|
158
158
|
const cols = [], cells = [];
|
|
@@ -170,8 +170,8 @@ function layoutRow(row, margin) {
|
|
|
170
170
|
x = c.x + c.w;
|
|
171
171
|
}
|
|
172
172
|
const ind = row[0].it.clip.x - margin;
|
|
173
|
-
return `<w:tbl><w:tblPr><w:tblW w:w="0" w:type="auto"/>${Math.abs(ind) > 0.5 ? `<w:tblInd w:w="${Math.round(ind * TW)}" w:type="dxa"/>` : ""}<w:tblBorders><w:top w:val="nil"/><w:left w:val="nil"/><w:bottom w:val="nil"/><w:right w:val="nil"/><w:insideH w:val="nil"/><w:insideV w:val="nil"/></w:tblBorders><w:tblLayout w:type="fixed"/><w:tblCellMar><w:left w:w="0" w:type="dxa"/><w:right w:w="0" w:ty
|
|
174
|
-
pe="dxa"/></w:tblCellMar><w:tblLook w:val="0000"/></w:tblPr><w:tblGrid>${cols.map((w) => `<w:gridCol w:w="${Math.round(w * TW)}"/>`).join("")}</w:tblGrid><w:tr>${cells.join("")}</w:tr></w:tbl><w:p><w:pPr><w:spacing w:before="0" w:after="40"/><w:rPr><w:sz w:val="4"/></w:rPr></w:pPr></w:p>`;
|
|
173
|
+
return `<w:tbl><w:tblPr><w:tblW w:w="0" w:type="auto"/>${Math.abs(ind) > 0.5 ? `<w:tblInd w:w="${Math.round(ind * TW)}" w:type="dxa"/>` : ""}<w:tblBorders><w:top w:val="nil"/><w:left w:val="nil"/><w:bottom w:val="nil"/><w:right w:val="nil"/><w:insideH w:val="nil"/><w:insideV w:val="nil"/></w:tblBorders><w:tblLayout w:type="fixed"/><w:tblCellMar><w:left w:w="0" w:type="dxa"/><w:right w:w="0" w:ty${
|
|
174
|
+
""}pe="dxa"/></w:tblCellMar><w:tblLook w:val="0000"/></w:tblPr><w:tblGrid>${cols.map((w) => `<w:gridCol w:w="${Math.round(w * TW)}"/>`).join("")}</w:tblGrid><w:tr>${cells.join("")}</w:tr></w:tbl><w:p><w:pPr><w:spacing w:before="0" w:after="40"/><w:rPr><w:sz w:val="4"/></w:rPr></w:pPr></w:p>`;
|
|
175
175
|
}
|
|
176
176
|
function exportDocx(model, opt = {}) {
|
|
177
177
|
return withDeadline(
|
|
@@ -210,8 +210,8 @@ async function writeDocx(pages, model, opt, put) {
|
|
|
210
210
|
const id = ++docPr, cx = Math.max(1, Math.round(pic.w * EMU)), cy = Math.max(1, Math.round(pic.h * EMU));
|
|
211
211
|
const name = `Picture ${id}`, descr = alt ? ` descr="${esc(alt)}"` : "";
|
|
212
212
|
const ext = svg ? `<a:extLst><a:ext uri="{96DAC541-7B7A-43D3-8B79-37D633B846F1}"><asvg:svgBlip xmlns:asvg="http://schemas.microsoft.com/office/drawing/2016/SVG/main" r:embed="${svg}"/></a:ext></a:extLst>` : "";
|
|
213
|
-
return `<w:r><w:drawing><wp:inline distT="0" distB="0" distL="0" distR="0"><wp:extent cx="${cx}" cy="${cy}"/><wp:docPr id="${id}" name="${name}"${descr}/><wp:cNvGraphicFramePr><a:graphicFrameLocks noChangeAspect="1"/></wp:cNvGraphicFramePr><a:graphic><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:pic><pic:nvPicPr><pic:cNvPr id="${id}" name="${name}"${descr}
|
|
214
|
-
><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip r:embed="${main}">${ext}</a:blip><a:stretch><a:fillRect/></a:stretch></pic:blipFill><pic:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="${cx}" cy="${cy}"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></pic:spPr></pic:pic></a:graphicData></a:graphic></wp:inline></w:drawing></w:r>`;
|
|
213
|
+
return `<w:r><w:drawing><wp:inline distT="0" distB="0" distL="0" distR="0"><wp:extent cx="${cx}" cy="${cy}"/><wp:docPr id="${id}" name="${name}"${descr}/><wp:cNvGraphicFramePr><a:graphicFrameLocks noChangeAspect="1"/></wp:cNvGraphicFramePr><a:graphic><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:pic><pic:nvPicPr><pic:cNvPr id="${id}" name="${name}"${descr}/${
|
|
214
|
+
""}><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip r:embed="${main}">${ext}</a:blip><a:stretch><a:fillRect/></a:stretch></pic:blipFill><pic:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="${cx}" cy="${cy}"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></pic:spPr></pic:pic></a:graphicData></a:graphic></wp:inline></w:drawing></w:r>`;
|
|
215
215
|
};
|
|
216
216
|
const picOpt = { fontStore: opt.fontStore, fetchImage: opt.fetchImage, rasterize: opt.rasterize };
|
|
217
217
|
const pageXml = async (pg) => {
|
|
@@ -354,12 +354,12 @@ async function writeDocx(pages, model, opt, put) {
|
|
|
354
354
|
const lang = `<w:lang w:val="${esc(opt.lang || model.locale || "en-US")}"/>`;
|
|
355
355
|
const headings = [28, 24, 22, 20, 18, 18].map((sz, i) => `<w:style w:type="paragraph" w:styleId="Heading${i + 1}"><w:name w:val="heading ${i + 1}"/><w:basedOn w:val="Normal"/><w:next w:val="Normal"/><w:qFormat/><w:pPr><w:keepNext/><w:outlineLvl w:val="${i}"/></w:pPr><w:rPr><w:b/><w:sz w:val="${sz}"/></w:rPr></w:style>`).join("");
|
|
356
356
|
const styles = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
357
|
-
<w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:docDefaults><w:rPrDefault><w:rPr><w:rFonts w:ascii="Inter" w:hAnsi="Inter" w:cs="Inter"/><w:sz w:val="18"/>${lang}</w:rPr></w:rPrDefault><w:pPrDefault><w:pPr><w:spacing w:after="0" w:line="240" w:lineRule="auto"/></w:pPr></w:pPrDefault></w:docDefaults><w:style w:type="paragraph" w:default="1" w:styleId="Normal"><w
|
|
358
|
-
name w:val="Normal"/></w:style>${headings}</w:styles>`;
|
|
357
|
+
<w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:docDefaults><w:rPrDefault><w:rPr><w:rFonts w:ascii="Inter" w:hAnsi="Inter" w:cs="Inter"/><w:sz w:val="18"/>${lang}</w:rPr></w:rPrDefault><w:pPrDefault><w:pPr><w:spacing w:after="0" w:line="240" w:lineRule="auto"/></w:pPr></w:pPrDefault></w:docDefaults><w:style w:type="paragraph" w:default="1" w:styleId="Normal"><w:${
|
|
358
|
+
""}name w:val="Normal"/></w:style>${headings}</w:styles>`;
|
|
359
359
|
const now = (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
360
360
|
const core = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
361
|
-
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title>${esc(opt.title || model.name || "Report")}</dc:title>${opt.author ? `<dc:creator>${esc(opt.author)}</dc:creator>` : ""}<dcterms:created xsi:type="d
|
|
362
|
-
cterms:W3CDTF">${now}</dcterms:created></cp:coreProperties>`;
|
|
361
|
+
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title>${esc(opt.title || model.name || "Report")}</dc:title>${opt.author ? `<dc:creator>${esc(opt.author)}</dc:creator>` : ""}<dcterms:created xsi:type="d${
|
|
362
|
+
""}cterms:W3CDTF">${now}</dcterms:created></cp:coreProperties>`;
|
|
363
363
|
await file("word/_rels/document.xml.rels", strToU8(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
364
364
|
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>${media.map((m) => `<Relationship Id="${m.rid}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/${m.name}"/>`).join("")}</Relationships>`));
|
|
365
365
|
await file("word/styles.xml", strToU8(styles));
|
package/dist/chunk-GRYITZPG.js
CHANGED
|
@@ -104,8 +104,8 @@ async function pptxOf(model, opt) {
|
|
|
104
104
|
const svg = pic.png && pic.svg ? media(strToU8(pic.svg), "svg") : null;
|
|
105
105
|
const n = ++id;
|
|
106
106
|
const ext = svg ? `<a:extLst><a:ext uri="{96DAC541-7B7A-43D3-8B79-37D633B846F1}"><asvg:svgBlip xmlns:asvg="http://schemas.microsoft.com/office/drawing/2016/SVG/main" r:embed="${svg}"/></a:ext></a:extLst>` : "";
|
|
107
|
-
return `<p:pic><p:nvPicPr><p:cNvPr id="${n}" name="Picture ${n}" descr="${esc(alt)}"/><p:cNvPicPr><a:picLocks noChangeAspect="1"/></p:cNvPicPr><p:nvPr/></p:nvPicPr><p:blipFill><a:blip r:embed="${main}">${ext}</a:blip><a:stretch><a:fillRect/></a:stretch></p:blipFill><p:spPr><a:xfrm><a:off x="${e(pic.x)}" y="${e(pic.y)}"/><a:ext cx="${Math.max(1, e(pic.w))}" cy="${Math.max(1, e(pic.h))}"/></a
|
|
108
|
-
xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:pic>`;
|
|
107
|
+
return `<p:pic><p:nvPicPr><p:cNvPr id="${n}" name="Picture ${n}" descr="${esc(alt)}"/><p:cNvPicPr><a:picLocks noChangeAspect="1"/></p:cNvPicPr><p:nvPr/></p:nvPicPr><p:blipFill><a:blip r:embed="${main}">${ext}</a:blip><a:stretch><a:fillRect/></a:stretch></p:blipFill><p:spPr><a:xfrm><a:off x="${e(pic.x)}" y="${e(pic.y)}"/><a:ext cx="${Math.max(1, e(pic.w))}" cy="${Math.max(1, e(pic.h))}"/></a:${
|
|
108
|
+
""}xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:pic>`;
|
|
109
109
|
};
|
|
110
110
|
const sp = (name, x, y, w, h, geom, body, extra = "") => {
|
|
111
111
|
const n = ++id;
|
|
@@ -188,34 +188,34 @@ xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:pic>`;
|
|
|
188
188
|
slides.push(pi + 1);
|
|
189
189
|
}
|
|
190
190
|
const cx = Math.min(51206400, Math.max(914400, e(W))), cy = Math.min(51206400, Math.max(914400, e(H)));
|
|
191
|
-
files["ppt/presentation.xml"] = strToU8(`${XML}<p:presentation ${NS} saveSubsetFonts="1"><p:sldMasterIdLst><p:sldMasterId id="2147483648" r:id="rId1"/></p:sldMasterIdLst><p:sldIdLst>${slides.map((n, i) => `<p:sldId id="${256 + i}" r:id="rId${n + 2}"/>`).join("")}</p:sldIdLst><p:sldSz cx="${cx}" cy="${cy}"/><p:notesSz cx="${cy}" cy="${cx}"/><p:defaultTextStyle><a:defPPr><a:defRPr lang="${lang}"
|
|
192
|
-
</a:defPPr></p:defaultTextStyle></p:presentation>`);
|
|
193
|
-
files["ppt/_rels/presentation.xml.rels"] = strToU8(`${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="slideMasters/slideMaster1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"
|
|
194
|
-
Target="theme/theme1.xml"/>${slides.map((n) => `<Relationship Id="rId${n + 2}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" Target="slides/slide${n}.xml"/>`).join("")}</Relationships>`);
|
|
191
|
+
files["ppt/presentation.xml"] = strToU8(`${XML}<p:presentation ${NS} saveSubsetFonts="1"><p:sldMasterIdLst><p:sldMasterId id="2147483648" r:id="rId1"/></p:sldMasterIdLst><p:sldIdLst>${slides.map((n, i) => `<p:sldId id="${256 + i}" r:id="rId${n + 2}"/>`).join("")}</p:sldIdLst><p:sldSz cx="${cx}" cy="${cy}"/><p:notesSz cx="${cy}" cy="${cx}"/><p:defaultTextStyle><a:defPPr><a:defRPr lang="${lang}"/>${
|
|
192
|
+
""}</a:defPPr></p:defaultTextStyle></p:presentation>`);
|
|
193
|
+
files["ppt/_rels/presentation.xml.rels"] = strToU8(`${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="slideMasters/slideMaster1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" ${
|
|
194
|
+
""}Target="theme/theme1.xml"/>${slides.map((n) => `<Relationship Id="rId${n + 2}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" Target="slides/slide${n}.xml"/>`).join("")}</Relationships>`);
|
|
195
195
|
const emptyTree = '<p:spTree><p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr/></p:spTree>';
|
|
196
|
-
files["ppt/slideMasters/slideMaster1.xml"] = strToU8(`${XML}<p:sldMaster ${NS}><p:cSld><p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg>${emptyTree}</p:cSld><p:clrMap bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/><p:sldLayoutIdLst><p:sldLayout
|
|
197
|
-
Id id="2147483649" r:id="rId1"/></p:sldLayoutIdLst><p:txStyles><p:titleStyle><a:lvl1pPr><a:defRPr sz="2400"/></a:lvl1pPr></p:titleStyle><p:bodyStyle><a:lvl1pPr><a:defRPr sz="1200"/></a:lvl1pPr></p:bodyStyle><p:otherStyle><a:lvl1pPr><a:defRPr sz="1200"/></a:lvl1pPr></p:otherStyle></p:txStyles></p:sldMaster>`);
|
|
198
|
-
files["ppt/slideMasters/_rels/slideMaster1.xml.rels"] = strToU8(`${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout" Target="../slideLayouts/slideLayout1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relat
|
|
199
|
-
ionships/theme" Target="../theme/theme1.xml"/></Relationships>`);
|
|
196
|
+
files["ppt/slideMasters/slideMaster1.xml"] = strToU8(`${XML}<p:sldMaster ${NS}><p:cSld><p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg>${emptyTree}</p:cSld><p:clrMap bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/><p:sldLayoutIdLst><p:sldLayout${
|
|
197
|
+
""}Id id="2147483649" r:id="rId1"/></p:sldLayoutIdLst><p:txStyles><p:titleStyle><a:lvl1pPr><a:defRPr sz="2400"/></a:lvl1pPr></p:titleStyle><p:bodyStyle><a:lvl1pPr><a:defRPr sz="1200"/></a:lvl1pPr></p:bodyStyle><p:otherStyle><a:lvl1pPr><a:defRPr sz="1200"/></a:lvl1pPr></p:otherStyle></p:txStyles></p:sldMaster>`);
|
|
198
|
+
files["ppt/slideMasters/_rels/slideMaster1.xml.rels"] = strToU8(`${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout" Target="../slideLayouts/slideLayout1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relat${
|
|
199
|
+
""}ionships/theme" Target="../theme/theme1.xml"/></Relationships>`);
|
|
200
200
|
files["ppt/slideLayouts/slideLayout1.xml"] = strToU8(`${XML}<p:sldLayout ${NS} type="blank" preserve="1"><p:cSld name="Blank">${emptyTree}</p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:sldLayout>`);
|
|
201
201
|
files["ppt/slideLayouts/_rels/slideLayout1.xml.rels"] = strToU8(`${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" Target="../slideMasters/slideMaster1.xml"/></Relationships>`);
|
|
202
202
|
files["ppt/theme/theme1.xml"] = strToU8(THEME);
|
|
203
203
|
const now = (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
204
|
-
files["docProps/core.xml"] = strToU8(`${XML}<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title>${esc(opt.title || model.name || "Report")}</dc:title>${opt.author ? `<dc:creator>${esc(opt.author)}
|
|
205
|
-
dc:creator>` : ""}<dcterms:created xsi:type="dcterms:W3CDTF">${now}</dcterms:created></cp:coreProperties>`);
|
|
206
|
-
files["_rels/.rels"] = strToU8(`${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="ppt/presentation.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docPro
|
|
207
|
-
ps/core.xml"/></Relationships>`);
|
|
208
|
-
files["[Content_Types].xml"] = strToU8(`${XML}<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Default Extension="png" ContentType="image/png"/><Default Extension="jpeg" ContentType="image/jpeg"/><Default Extension="
|
|
209
|
-
svg" ContentType="image/svg+xml"/><Override PartName="/ppt/presentation.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml"/><Override PartName="/ppt/slideMasters/slideMaster1.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"/><Override PartName="/ppt/slideLayouts/slideLayout1.xml" ContentType="applicat
|
|
210
|
-
ion/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/ppt/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>${slides.map((n) => `<Override PartName="/ppt/slides/slide${n}.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slide+xml"/>`).join("")}<Override PartName="/docProps/core.xml" ContentTy
|
|
211
|
-
pe="application/vnd.openxmlformats-package.core-properties+xml"/></Types>`);
|
|
204
|
+
files["docProps/core.xml"] = strToU8(`${XML}<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title>${esc(opt.title || model.name || "Report")}</dc:title>${opt.author ? `<dc:creator>${esc(opt.author)}</${
|
|
205
|
+
""}dc:creator>` : ""}<dcterms:created xsi:type="dcterms:W3CDTF">${now}</dcterms:created></cp:coreProperties>`);
|
|
206
|
+
files["_rels/.rels"] = strToU8(`${XML}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="ppt/presentation.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docPro${
|
|
207
|
+
""}ps/core.xml"/></Relationships>`);
|
|
208
|
+
files["[Content_Types].xml"] = strToU8(`${XML}<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Default Extension="png" ContentType="image/png"/><Default Extension="jpeg" ContentType="image/jpeg"/><Default Extension="${
|
|
209
|
+
""}svg" ContentType="image/svg+xml"/><Override PartName="/ppt/presentation.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml"/><Override PartName="/ppt/slideMasters/slideMaster1.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"/><Override PartName="/ppt/slideLayouts/slideLayout1.xml" ContentType="applicat${
|
|
210
|
+
""}ion/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/ppt/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>${slides.map((n) => `<Override PartName="/ppt/slides/slide${n}.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slide+xml"/>`).join("")}<Override PartName="/docProps/core.xml" ContentTy${
|
|
211
|
+
""}pe="application/vnd.openxmlformats-package.core-properties+xml"/></Types>`);
|
|
212
212
|
return zipSync(files, { level: 6 });
|
|
213
213
|
}
|
|
214
|
-
var THEME = `${XML}<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="ReportWright"><a:themeElements><a:clrScheme name="ReportWright"><a:dk1><a:srgbClr val="000000"/></a:dk1><a:lt1><a:srgbClr val="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="1F2328"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="2563EB"/></a:accent1><a:accent2><a:srgbClr val="F59
|
|
215
|
-
E0B"/></a:accent2><a:accent3><a:srgbClr val="16A34A"/></a:accent3><a:accent4><a:srgbClr val="DC2626"/></a:accent4><a:accent5><a:srgbClr val="7C3AED"/></a:accent5><a:accent6><a:srgbClr val="0891B2"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="ReportWright"><a:majorFont><a:latin typeface="Inter"/><a:ea ty
|
|
216
|
-
peface=""/><a:cs typeface=""/></a:majorFont><a:minorFont><a:latin typeface="Inter"/><a:ea typeface=""/><a:cs typeface=""/></a:minorFont></a:fontScheme><a:fmtScheme name="ReportWright"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6
|
|
217
|
-
350"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln><a:ln w="12700"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln><a:ln w="19050"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle></a:effectStyle
|
|
218
|
-
Lst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/></a:theme>`;
|
|
214
|
+
var THEME = `${XML}<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="ReportWright"><a:themeElements><a:clrScheme name="ReportWright"><a:dk1><a:srgbClr val="000000"/></a:dk1><a:lt1><a:srgbClr val="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="1F2328"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="2563EB"/></a:accent1><a:accent2><a:srgbClr val="F59${
|
|
215
|
+
""}E0B"/></a:accent2><a:accent3><a:srgbClr val="16A34A"/></a:accent3><a:accent4><a:srgbClr val="DC2626"/></a:accent4><a:accent5><a:srgbClr val="7C3AED"/></a:accent5><a:accent6><a:srgbClr val="0891B2"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="ReportWright"><a:majorFont><a:latin typeface="Inter"/><a:ea ty${
|
|
216
|
+
""}peface=""/><a:cs typeface=""/></a:majorFont><a:minorFont><a:latin typeface="Inter"/><a:ea typeface=""/><a:cs typeface=""/></a:minorFont></a:fontScheme><a:fmtScheme name="ReportWright"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6${
|
|
217
|
+
""}350"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln><a:ln w="12700"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln><a:ln w="19050"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle></a:effectStyle${
|
|
218
|
+
""}Lst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"/></a:solidFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/></a:theme>`;
|
|
219
219
|
export {
|
|
220
220
|
exportPptx
|
|
221
221
|
};
|
package/dist/chunk-H422SRD3.js
CHANGED
|
@@ -61,8 +61,8 @@ function chartXml(spec, sheet) {
|
|
|
61
61
|
const ser = (s, i, kind) => {
|
|
62
62
|
const c = i + 2;
|
|
63
63
|
const line = kind === "line" || kind === "radar";
|
|
64
|
-
return `<c:ser><c:idx val="${i}"/><c:order val="${i}"/><c:tx><c:strRef><c:f>${ref(sheet, c, 1, c, 1)}</c:f>${strCache([s.name])}</c:strRef></c:tx>${t === "pie" || t === "donut" ? "" : fill(s.color, line)}${line ? '<c:marker><c:symbol val="none"/></c:marker>' : ""}${cat}<c:val><c:numRef><c:f>${ref(sheet, c, 2, c, n + 1)}</c:f>${numCache(s.values, fmt)}</c:numRef></c:val>${kind === "line" ? '
|
|
65
|
-
c:smooth val="0"/>' : ""}</c:ser>`;
|
|
64
|
+
return `<c:ser><c:idx val="${i}"/><c:order val="${i}"/><c:tx><c:strRef><c:f>${ref(sheet, c, 1, c, 1)}</c:f>${strCache([s.name])}</c:strRef></c:tx>${t === "pie" || t === "donut" ? "" : fill(s.color, line)}${line ? '<c:marker><c:symbol val="none"/></c:marker>' : ""}${cat}<c:val><c:numRef><c:f>${ref(sheet, c, 2, c, n + 1)}</c:f>${numCache(s.values, fmt)}</c:numRef></c:val>${kind === "line" ? ('<'+
|
|
65
|
+
'c:smooth val="0"/>') : ""}</c:ser>`;
|
|
66
66
|
};
|
|
67
67
|
if (t === "pie" || t === "donut") {
|
|
68
68
|
const s = spec.series[0];
|
|
@@ -95,8 +95,8 @@ c:smooth val="0"/>' : ""}</c:ser>`;
|
|
|
95
95
|
const per = t === "bubble" ? 3 : 2;
|
|
96
96
|
const body = spec.series.map((s, i) => {
|
|
97
97
|
const c = 1 + i * per, n = s.x.length;
|
|
98
|
-
return `<c:ser><c:idx val="${i}"/><c:order val="${i}"/><c:tx><c:strRef><c:f>${ref(sheet, c + 1, 1, c + 1, 1)}</c:f>${strCache([s.name])}</c:strRef></c:tx>${t === "bubble" ? fill(s.color) : `<c:spPr><a:ln w="19050"><a:noFill/></a:ln></c:spPr><c:marker><c:symbol val="circle"/><c:size val="5"/>${fill(s.color)}</c:marker>`}<c:xVal><c:numRef><c:f>${ref(sheet, c, 2, c, n + 1)}</c:f>${numCache(s.x)}
|
|
99
|
-
</c:numRef></c:xVal><c:yVal><c:numRef><c:f>${ref(sheet, c + 1, 2, c + 1, n + 1)}</c:f>${numCache(s.y, fmt)}</c:numRef></c:yVal>` + (t === "bubble" ? `<c:bubbleSize><c:numRef><c:f>${ref(sheet, c + 2, 2, c + 2, n + 1)}</c:f>${numCache(s.size || [])}</c:numRef></c:bubbleSize><c:bubble3D val="0"/>` : '<c:smooth val="0"/>') + "</c:ser>";
|
|
98
|
+
return `<c:ser><c:idx val="${i}"/><c:order val="${i}"/><c:tx><c:strRef><c:f>${ref(sheet, c + 1, 1, c + 1, 1)}</c:f>${strCache([s.name])}</c:strRef></c:tx>${t === "bubble" ? fill(s.color) : `<c:spPr><a:ln w="19050"><a:noFill/></a:ln></c:spPr><c:marker><c:symbol val="circle"/><c:size val="5"/>${fill(s.color)}</c:marker>`}<c:xVal><c:numRef><c:f>${ref(sheet, c, 2, c, n + 1)}</c:f>${numCache(s.x)}${
|
|
99
|
+
""}</c:numRef></c:xVal><c:yVal><c:numRef><c:f>${ref(sheet, c + 1, 2, c + 1, n + 1)}</c:f>${numCache(s.y, fmt)}</c:numRef></c:yVal>` + (t === "bubble" ? `<c:bubbleSize><c:numRef><c:f>${ref(sheet, c + 2, 2, c + 2, n + 1)}</c:f>${numCache(s.size || [])}</c:numRef></c:bubbleSize><c:bubble3D val="0"/>` : '<c:smooth val="0"/>') + "</c:ser>";
|
|
100
100
|
}).join("");
|
|
101
101
|
plot = t === "bubble" ? `<c:bubbleChart><c:varyColors val="0"/>${body}<c:bubbleScale val="100"/>${axIds(false)}</c:bubbleChart>` : `<c:scatterChart><c:scatterStyle val="lineMarker"/><c:varyColors val="0"/>${body}${axIds(false)}</c:scatterChart>`;
|
|
102
102
|
axes = valAx(AX.cat, AX.val, "b", false, "General", spec.xTitle) + valAx(AX.val, AX.cat, "l", false, fmt, spec.yTitle);
|
|
@@ -107,18 +107,18 @@ c:smooth val="0"/>' : ""}</c:ser>`;
|
|
|
107
107
|
}
|
|
108
108
|
var axTitle = (t) => t ? title(t) : "";
|
|
109
109
|
function catAx(id, cross, pos, second, t) {
|
|
110
|
-
return `<c:catAx><c:axId val="${id}"/><c:scaling><c:orientation val="minMax"/></c:scaling><c:delete val="${second ? 1 : 0}"/><c:axPos val="${pos}"/>${axTitle(t)}<c:numFmt formatCode="General" sourceLinked="0"/><c:majorTickMark val="out"/><c:minorTickMark val="none"/><c:tickLblPos val="nextTo"/><c:crossAx val="${cross}"/><c:crosses val="autoZero"/><c:auto val="1"/><c:lblAlgn val="ctr"/><c:lblOffs
|
|
111
|
-
et val="100"/><c:noMultiLvlLbl val="0"/></c:catAx>`;
|
|
110
|
+
return `<c:catAx><c:axId val="${id}"/><c:scaling><c:orientation val="minMax"/></c:scaling><c:delete val="${second ? 1 : 0}"/><c:axPos val="${pos}"/>${axTitle(t)}<c:numFmt formatCode="General" sourceLinked="0"/><c:majorTickMark val="out"/><c:minorTickMark val="none"/><c:tickLblPos val="nextTo"/><c:crossAx val="${cross}"/><c:crosses val="autoZero"/><c:auto val="1"/><c:lblAlgn val="ctr"/><c:lblOffs${
|
|
111
|
+
""}et val="100"/><c:noMultiLvlLbl val="0"/></c:catAx>`;
|
|
112
112
|
}
|
|
113
113
|
function valAx(id, cross, pos, second, fmt, t) {
|
|
114
|
-
return `<c:valAx><c:axId val="${id}"/><c:scaling><c:orientation val="minMax"/></c:scaling><c:delete val="0"/><c:axPos val="${pos}"/>${second ? "" : "<c:majorGridlines/>"}${axTitle(t)}<c:numFmt formatCode="${esc(fmt)}" sourceLinked="0"/><c:majorTickMark val="out"/><c:minorTickMark val="none"/><c:tickLblPos val="nextTo"/><c:crossAx val="${cross}"/><c:crosses val="${second ? "max" : "autoZero"}"
|
|
115
|
-
c:crossBetween val="between"/></c:valAx>`;
|
|
114
|
+
return `<c:valAx><c:axId val="${id}"/><c:scaling><c:orientation val="minMax"/></c:scaling><c:delete val="0"/><c:axPos val="${pos}"/>${second ? "" : "<c:majorGridlines/>"}${axTitle(t)}<c:numFmt formatCode="${esc(fmt)}" sourceLinked="0"/><c:majorTickMark val="out"/><c:minorTickMark val="none"/><c:tickLblPos val="nextTo"/><c:crossAx val="${cross}"/><c:crosses val="${second ? "max" : "autoZero"}"/><${
|
|
115
|
+
""}c:crossBetween val="between"/></c:valAx>`;
|
|
116
116
|
}
|
|
117
117
|
var PALETTE = ["#2563eb", "#16a34a", "#f59e0b", "#dc2626", "#7c3aed", "#0891b2", "#db2777", "#65a30d", "#ea580c", "#475569"];
|
|
118
118
|
var drawingXml = (c0, r0, cols, rows) => `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
119
|
-
<xdr:wsDr xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><xdr:twoCellAnchor editAs="oneCell"><xdr:from><xdr:col>${c0}</xdr:col><xdr:colOff>0</xdr:colOff><xdr:row>${r0}</xdr:row><xdr:rowOff>0</xdr:rowOff></xdr:from><xdr:to><xdr:col>${c0 + cols}</xdr:col><xdr:colOff>0</xdr:colOff><xdr:row>${r0 + rows}</x
|
|
120
|
-
dr:row><xdr:rowOff>0</xdr:rowOff></xdr:to><xdr:graphicFrame macro=""><xdr:nvGraphicFramePr><xdr:cNvPr id="2" name="Chart 1"/><xdr:cNvGraphicFramePr/></xdr:nvGraphicFramePr><xdr:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/></xdr:xfrm><a:graphic><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/chart"><c:chart xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" xmln
|
|
121
|
-
s:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:id="rId1"/></a:graphicData></a:graphic></xdr:graphicFrame><xdr:clientData/></xdr:twoCellAnchor></xdr:wsDr>`;
|
|
119
|
+
<xdr:wsDr xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><xdr:twoCellAnchor editAs="oneCell"><xdr:from><xdr:col>${c0}</xdr:col><xdr:colOff>0</xdr:colOff><xdr:row>${r0}</xdr:row><xdr:rowOff>0</xdr:rowOff></xdr:from><xdr:to><xdr:col>${c0 + cols}</xdr:col><xdr:colOff>0</xdr:colOff><xdr:row>${r0 + rows}</x${
|
|
120
|
+
""}dr:row><xdr:rowOff>0</xdr:rowOff></xdr:to><xdr:graphicFrame macro=""><xdr:nvGraphicFramePr><xdr:cNvPr id="2" name="Chart 1"/><xdr:cNvGraphicFramePr/></xdr:nvGraphicFramePr><xdr:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/></xdr:xfrm><a:graphic><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/chart"><c:chart xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" xmln${
|
|
121
|
+
""}s:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:id="rId1"/></a:graphicData></a:graphic></xdr:graphicFrame><xdr:clientData/></xdr:twoCellAnchor></xdr:wsDr>`;
|
|
122
122
|
var rels = (list) => `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
123
123
|
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${list.join("")}</Relationships>`;
|
|
124
124
|
var rel = (id, type, target) => `<Relationship Id="${id}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/${type}" Target="${target}"/>`;
|
|
@@ -270,9 +270,9 @@ var Book = class {
|
|
|
270
270
|
const [fmt, bold, fill2] = k.split("|").map(Number);
|
|
271
271
|
return `<xf numFmtId="${fmt || 0}" fontId="${bold ? 1 : 0}" fillId="${fill2 ? 2 : 0}" borderId="0" xfId="0"${fmt ? ' applyNumberFormat="1"' : ""}${bold ? ' applyFont="1"' : ""}${fill2 ? ' applyFill="1"' : ""}/>`;
|
|
272
272
|
}).join("");
|
|
273
|
-
return `${XML}<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">${fmts ? `<numFmts count="${this.numFmts.size}">${fmts}</numFmts>` : ""}<fonts count="2"><font><sz val="11"/><name val="Calibri"/><family val="2"/></font><font><b/><sz val="11"/><name val="Calibri"/><family val="2"/></font></fonts><fills count="3"><fill><patternFill patternType="none"/></fill><fill><pat
|
|
274
|
-
ternFill patternType="gray125"/></fill><fill><patternFill patternType="solid"><fgColor rgb="${HEADER_FILL}"/><bgColor indexed="64"/></patternFill></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="${this.styles.size}">${xfs}</cellXfs><cellSt
|
|
275
|
-
yles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles></styleSheet>`;
|
|
273
|
+
return `${XML}<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">${fmts ? `<numFmts count="${this.numFmts.size}">${fmts}</numFmts>` : ""}<fonts count="2"><font><sz val="11"/><name val="Calibri"/><family val="2"/></font><font><b/><sz val="11"/><name val="Calibri"/><family val="2"/></font></fonts><fills count="3"><fill><patternFill patternType="none"/></fill><fill><pat${
|
|
274
|
+
""}ternFill patternType="gray125"/></fill><fill><patternFill patternType="solid"><fgColor rgb="${HEADER_FILL}"/><bgColor indexed="64"/></patternFill></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="${this.styles.size}">${xfs}</cellXfs><cellSt${
|
|
275
|
+
""}yles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles></styleSheet>`;
|
|
276
276
|
}
|
|
277
277
|
/** The .xlsx bytes. */
|
|
278
278
|
write() {
|
|
@@ -292,8 +292,8 @@ yles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles></s
|
|
|
292
292
|
const anchors = sh.images.map((im, k) => {
|
|
293
293
|
img++;
|
|
294
294
|
put(`xl/media/image${img}.${im.ext}`, im.bytes);
|
|
295
|
-
return `<xdr:oneCellAnchor><xdr:from><xdr:col>${im.col}</xdr:col><xdr:colOff>0</xdr:colOff><xdr:row>${im.row}</xdr:row><xdr:rowOff>0</xdr:rowOff></xdr:from><xdr:ext cx="${Math.round(im.w * 9525)}" cy="${Math.round(im.h * 9525)}"/><xdr:pic><xdr:nvPicPr><xdr:cNvPr id="${k + 2}" name="Picture ${k + 1}"/><xdr:cNvPicPr><a:picLocks noChangeAspect="1"/></xdr:cNvPicPr></xdr:nvPicPr><xdr:blipFill
|
|
296
|
-
a:blip r:embed="rId${k + 1}"/><a:stretch><a:fillRect/></a:stretch></xdr:blipFill><xdr:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="${Math.round(im.w * 9525)}" cy="${Math.round(im.h * 9525)}"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></xdr:spPr></xdr:pic><xdr:clientData/></xdr:oneCellAnchor>`;
|
|
295
|
+
return `<xdr:oneCellAnchor><xdr:from><xdr:col>${im.col}</xdr:col><xdr:colOff>0</xdr:colOff><xdr:row>${im.row}</xdr:row><xdr:rowOff>0</xdr:rowOff></xdr:from><xdr:ext cx="${Math.round(im.w * 9525)}" cy="${Math.round(im.h * 9525)}"/><xdr:pic><xdr:nvPicPr><xdr:cNvPr id="${k + 2}" name="Picture ${k + 1}"/><xdr:cNvPicPr><a:picLocks noChangeAspect="1"/></xdr:cNvPicPr></xdr:nvPicPr><xdr:blipFill><${
|
|
296
|
+
""}a:blip r:embed="rId${k + 1}"/><a:stretch><a:fillRect/></a:stretch></xdr:blipFill><xdr:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="${Math.round(im.w * 9525)}" cy="${Math.round(im.h * 9525)}"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></xdr:spPr></xdr:pic><xdr:clientData/></xdr:oneCellAnchor>`;
|
|
297
297
|
});
|
|
298
298
|
let first = img - sh.images.length;
|
|
299
299
|
put(`xl/drawings/_rels/drawing${n}.xml.rels`, rels2(sh.images.map((im, k) => [`rId${k + 1}`, "image", `../media/image${++first}.${im.ext}`])));
|
|
@@ -314,12 +314,12 @@ a:blip r:embed="rId${k + 1}"/><a:stretch><a:fillRect/></a:stretch></xdr:blipFill
|
|
|
314
314
|
put("xl/styles.xml", this.stylesXml());
|
|
315
315
|
put("xl/workbook.xml", `${XML}<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="${R}"><bookViews><workbookView/></bookViews><sheets>${this.sheets.map((s, i) => `<sheet name="${esc(s.name)}" sheetId="${i + 1}" r:id="rId${i + 1}"/>`).join("")}</sheets><calcPr calcId="171027"${this.fullCalcOnLoad ? ' fullCalcOnLoad="1"' : ""}/></workbook>`);
|
|
316
316
|
put("xl/_rels/workbook.xml.rels", rels2([...this.sheets.map((s, i) => [`rId${i + 1}`, "worksheet", `worksheets/sheet${i + 1}.xml`]), [`rId${this.sheets.length + 1}`, "styles", "styles.xml"]]));
|
|
317
|
-
put("docProps/core.xml", `${XML}<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title>${esc(this.title)}</dc:title><dc:creator>${esc(this.creator)}</dc:creator><dcterms:created xsi:type="dcterms:W3C
|
|
318
|
-
DTF">${(/* @__PURE__ */ new Date()).toISOString().replace(/\.\d+Z$/, "Z")}</dcterms:created></cp:coreProperties>`);
|
|
317
|
+
put("docProps/core.xml", `${XML}<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title>${esc(this.title)}</dc:title><dc:creator>${esc(this.creator)}</dc:creator><dcterms:created xsi:type="dcterms:W3C${
|
|
318
|
+
""}DTF">${(/* @__PURE__ */ new Date()).toISOString().replace(/\.\d+Z$/, "Z")}</dcterms:created></cp:coreProperties>`);
|
|
319
319
|
put("_rels/.rels", rels2([["rId1", "officeDocument", "xl/workbook.xml"], ["rId2", "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties", "docProps/core.xml"]]));
|
|
320
|
-
put("[Content_Types].xml", `${XML}<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Default Extension="png" ContentType="image/png"/><Default Extension="jpeg" ContentType="image/jpeg"/><Override PartName="/xl/workbo
|
|
321
|
-
ok.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>${over.map(([p, t]) => `<Override PartName="${p}" ContentType="${t}
|
|
322
|
-
"/>`).join("")}</Types>`);
|
|
320
|
+
put("[Content_Types].xml", `${XML}<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Default Extension="png" ContentType="image/png"/><Default Extension="jpeg" ContentType="image/jpeg"/><Override PartName="/xl/workbo${
|
|
321
|
+
""}ok.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>${over.map(([p, t]) => `<Override PartName="${p}" ContentType="${t}${
|
|
322
|
+
""}"/>`).join("")}</Types>`);
|
|
323
323
|
return out;
|
|
324
324
|
}
|
|
325
325
|
};
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
origin,
|
|
6
6
|
pruneSnapshot,
|
|
7
7
|
reportFetch
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DVJYE7HZ.js";
|
|
9
9
|
import {
|
|
10
10
|
drillRefs,
|
|
11
11
|
loadSources,
|
|
12
12
|
resolveParameters,
|
|
13
13
|
reuseRefs
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OMCWZYRI.js";
|
|
15
15
|
import "./chunk-BR5K6SBL.js";
|
|
16
16
|
import {
|
|
17
17
|
fontKeysOf
|
|
@@ -156,4 +156,4 @@ export {
|
|
|
156
156
|
exportInteractiveHtml,
|
|
157
157
|
reachableReportIds
|
|
158
158
|
};
|
|
159
|
-
//# sourceMappingURL=chunk-
|
|
159
|
+
//# sourceMappingURL=chunk-NARXO3DB.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FORMAT_CHAR
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OMCWZYRI.js";
|
|
4
4
|
import "./chunk-BR5K6SBL.js";
|
|
5
5
|
import {
|
|
6
6
|
withDeadline
|
|
@@ -108,9 +108,9 @@ ${pdfa ? `<rdf:Description rdf:about="" xmlns:pdfaid="http://www.aiim.org/pdfa/n
|
|
|
108
108
|
</x:xmpmeta>
|
|
109
109
|
<?xpacket end="w"?>`;
|
|
110
110
|
}
|
|
111
|
-
var PDFUA_SCHEMA = `<rdf:Description rdf:about="" xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#"><pdfaExtension:schemas><rdf:Bag><rdf:li rdf:parseType="Resource"><pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema><pdfaSchema:namespaceURI>http://www.aiim.or
|
|
112
|
-
g/pdfua/ns/id/</pdfaSchema:namespaceURI><pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix><pdfaSchema:property><rdf:Seq><rdf:li rdf:parseType="Resource"><pdfaProperty:name>part</pdfaProperty:name><pdfaProperty:valueType>Integer</pdfaProperty:valueType><pdfaProperty:category>internal</pdfaProperty:category><pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description></rdf:li></rdf:Seq
|
|
113
|
-
</pdfaSchema:property></rdf:li></rdf:Bag></pdfaExtension:schemas></rdf:Description>
|
|
111
|
+
var PDFUA_SCHEMA = `<rdf:Description rdf:about="" xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#"><pdfaExtension:schemas><rdf:Bag><rdf:li rdf:parseType="Resource"><pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema><pdfaSchema:namespaceURI>http://www.aiim.or${
|
|
112
|
+
""}g/pdfua/ns/id/</pdfaSchema:namespaceURI><pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix><pdfaSchema:property><rdf:Seq><rdf:li rdf:parseType="Resource"><pdfaProperty:name>part</pdfaProperty:name><pdfaProperty:valueType>Integer</pdfaProperty:valueType><pdfaProperty:category>internal</pdfaProperty:category><pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description></rdf:li></rdf:Seq>${
|
|
113
|
+
""}</pdfaSchema:property></rdf:li></rdf:Bag></pdfaExtension:schemas></rdf:Description>
|
|
114
114
|
`;
|
|
115
115
|
function setMetadata(doc, xmp) {
|
|
116
116
|
const ctx = doc.context;
|
|
@@ -2952,4 +2952,4 @@ function roundRect(x, y, w, h, r) {
|
|
|
2952
2952
|
export {
|
|
2953
2953
|
exportPdf
|
|
2954
2954
|
};
|
|
2955
|
-
//# sourceMappingURL=chunk-
|
|
2955
|
+
//# sourceMappingURL=chunk-OED3YZYP.js.map
|
|
@@ -2349,7 +2349,8 @@ function parseXml(src, limits = {}) {
|
|
|
2349
2349
|
const L = { ...XML_LIMITS, ...limits };
|
|
2350
2350
|
if (typeof src !== "string") throw new XmlError("The file is not text");
|
|
2351
2351
|
if (src.length > L.maxChars) throw new XmlError(`The file is too large (more than ${L.maxChars} characters)`);
|
|
2352
|
-
|
|
2352
|
+
const bom = src.charCodeAt(0) === 65279 ? 1 : 0;
|
|
2353
|
+
if (bom) src = src.slice(1);
|
|
2353
2354
|
const stack2 = [];
|
|
2354
2355
|
const nsStack = [Object.assign(/* @__PURE__ */ Object.create(null), { xml: "http://www.w3.org/XML/1998/namespace" })];
|
|
2355
2356
|
let root = null;
|
|
@@ -2465,7 +2466,7 @@ function parseXml(src, limits = {}) {
|
|
|
2465
2466
|
const colon = qname.indexOf(":");
|
|
2466
2467
|
const prefix = colon < 0 ? "" : qname.slice(0, colon);
|
|
2467
2468
|
const ns = scope[prefix] ?? (prefix ? fail(`The prefix "${prefix}" is not declared`) : "");
|
|
2468
|
-
const el = { name: colon < 0 ? qname : qname.slice(colon + 1), ns, attrs: attrsOut, children: [], text: "" };
|
|
2469
|
+
const el = { name: colon < 0 ? qname : qname.slice(colon + 1), ns, attrs: attrsOut, children: [], text: "", pos: i + bom };
|
|
2469
2470
|
if (stack2.length) stack2[stack2.length - 1].children.push(el);
|
|
2470
2471
|
else root = el;
|
|
2471
2472
|
if (!selfClose) {
|
|
@@ -5844,8 +5845,8 @@ function paintXY(type, g) {
|
|
|
5844
5845
|
out.push(tag2(e, anim && { k: anim === "grow" ? "scale" : "fade", i: j }));
|
|
5845
5846
|
const isClipped = clipped && beyond(p) || pastAxis(p);
|
|
5846
5847
|
if (isClipped) out.push({ t: "ellipse", cx: e.cx, cy: e.cy, rx: r + 1.6, ry: r + 1.6, fill: "none", stroke: col, strokeWidth: 0.9 });
|
|
5847
|
-
if (item.tooltips !== false && (type === "bubble" || multi || isClipped)) g.links.push({ t: "link", x: e.cx - r, y: e.cy - r, w: r * 2, h: r * 2, action: null, tip: `${multi ? `${s.name}: ` : ""}${fmtX(p.x)}, ${fmtY(p.y)}${type === "bubble" ? ` (${toText(p.size, null, ctx)})` : ""}${isClipped ? clipped && beyond(p) ? " (outlier, drawn at the edge)" : " (outside the axis range you set, drawn
|
|
5848
|
-
at the edge)" : ""}` });
|
|
5848
|
+
if (item.tooltips !== false && (type === "bubble" || multi || isClipped)) g.links.push({ t: "link", x: e.cx - r, y: e.cy - r, w: r * 2, h: r * 2, action: null, tip: `${multi ? `${s.name}: ` : ""}${fmtX(p.x)}, ${fmtY(p.y)}${type === "bubble" ? ` (${toText(p.size, null, ctx)})` : ""}${isClipped ? clipped && beyond(p) ? " (outlier, drawn at the edge)" : (" (outside the axis range you set, drawn "+
|
|
5849
|
+
"at the edge)") : ""}` });
|
|
5849
5850
|
if (labelsOn) {
|
|
5850
5851
|
const str = item.labelTemplate ? String(item.labelTemplate).slice(0, 500).replace(/\{(\w+)\}/g, (all, k) => ({ value: fmtY(p.y), x: fmtX(p.x), series: s.name, size: toText(p.size, null, ctx) })[k.toLowerCase()] ?? all) : fmtY(p.y);
|
|
5851
5852
|
label(str, e.cx, e.cy - r - 2, { size: fs * 0.85 });
|
|
@@ -12483,14 +12484,14 @@ var REPORT_SCHEMA = {
|
|
|
12483
12484
|
"additionalProperties": true
|
|
12484
12485
|
},
|
|
12485
12486
|
"Report": {
|
|
12486
|
-
"description": "A ReportWright report definition (
|
|
12487
|
+
"description": "A ReportWright report definition (reportwright/report@1).",
|
|
12487
12488
|
"type": "object",
|
|
12488
12489
|
"properties": {
|
|
12489
12490
|
"$schema": {
|
|
12490
|
-
"description": "
|
|
12491
|
+
"description": "reportwright/report@1; pagewright/report@1 (deprecated, the name before the rename) is the same format.",
|
|
12491
12492
|
"enum": [
|
|
12492
|
-
"
|
|
12493
|
-
"
|
|
12493
|
+
"reportwright/report@1",
|
|
12494
|
+
"pagewright/report@1"
|
|
12494
12495
|
]
|
|
12495
12496
|
},
|
|
12496
12497
|
"name": {
|
|
@@ -12608,7 +12609,7 @@ var REPORT_SCHEMA = {
|
|
|
12608
12609
|
],
|
|
12609
12610
|
"examples": [
|
|
12610
12611
|
{
|
|
12611
|
-
"$schema": "
|
|
12612
|
+
"$schema": "reportwright/report@1",
|
|
12612
12613
|
"name": "Invoice",
|
|
12613
12614
|
"page": {
|
|
12614
12615
|
"size": "A4",
|
|
@@ -12724,11 +12725,11 @@ var REPORT_SCHEMA = {
|
|
|
12724
12725
|
};
|
|
12725
12726
|
|
|
12726
12727
|
// src/engine/schema/validate.js
|
|
12727
|
-
var SCHEMA_ID = "
|
|
12728
|
-
var SCHEMA_ALIAS = "
|
|
12729
|
-
var ITEM_KEYS = new Set("id type name x y w h style styleName items hidden layer locked label alt value dataSet canGrow canShrink action bookmark tooltip keepTogether pageBreakBefore pageBreakAfter pageBreakBetween newSection filters sort groups groupBy groupAdjacent inheritRows columns header detail footer repeatHeader widowControl noRowsText pageBreakEvery cells rows rowGroup rowGroups columnGro
|
|
12730
|
-
up columnGroups values value valueFormat rowSort columnSort rowTotals columnTotals cellStyle headerStyle totalStyle corner partProps library part properties overflow overflowTo src fit headingLevel rotate shrinkToFit minFontSize shrinkStep tocDots tocLink tocPage format chartType series seriesGroup category title legend palette stacked valueAxis xTitle maxCategories outliers categorySort categoryF
|
|
12731
|
-
ormat showValues labelPosition symbology quietZone report params text toggle initiallyCollapsed collapsible expandLevels repeatColumns columnGap rowHeaderWidth anim animation visual comment notes description".split(" "));
|
|
12728
|
+
var SCHEMA_ID = "reportwright/report@1";
|
|
12729
|
+
var SCHEMA_ALIAS = "pagewright/report@1";
|
|
12730
|
+
var ITEM_KEYS = new Set(("id type name x y w h style styleName items hidden layer locked label alt value dataSet canGrow canShrink action bookmark tooltip keepTogether pageBreakBefore pageBreakAfter pageBreakBetween newSection filters sort groups groupBy groupAdjacent inheritRows columns header detail footer repeatHeader widowControl noRowsText pageBreakEvery cells rows rowGroup rowGroups columnGro"+
|
|
12731
|
+
"up columnGroups values value valueFormat rowSort columnSort rowTotals columnTotals cellStyle headerStyle totalStyle corner partProps library part properties overflow overflowTo src fit headingLevel rotate shrinkToFit minFontSize shrinkStep tocDots tocLink tocPage format chartType series seriesGroup category title legend palette stacked valueAxis xTitle maxCategories outliers categorySort categoryF"+
|
|
12732
|
+
"ormat showValues labelPosition symbology quietZone report params text toggle initiallyCollapsed collapsible expandLevels repeatColumns columnGap rowHeaderWidth anim animation visual comment notes description").split(" "));
|
|
12732
12733
|
var NO_SERIES_CHARTS = /* @__PURE__ */ new Set(["gantt"]);
|
|
12733
12734
|
function looksLikeLink(it) {
|
|
12734
12735
|
if (it.type !== "textbox" || it.action && it.action.type && it.action.type !== "none") return false;
|
|
@@ -12739,8 +12740,8 @@ function looksLikeLink(it) {
|
|
|
12739
12740
|
const [r, g, b] = m.slice(1).map((h) => parseInt(h, 16));
|
|
12740
12741
|
return b > 150 && b > r + 60 && b > g + 30;
|
|
12741
12742
|
}
|
|
12742
|
-
var DEF_KEYS = new Set("$schema name description locale currency timeZone page parameters dataSources dataSets styles sections functions layers images theme themeDef master nullPropagation caseSensitive naturalSort nullOrder collation arithmetic bandRows version id tags author folder stylesheet parts partProperties dashboard comment notes customCode libraries liveParameters parameterLayout drafts
|
|
12743
|
-
history nonFinite".split(" "));
|
|
12743
|
+
var DEF_KEYS = new Set(("$schema name description locale currency timeZone page parameters dataSources dataSets styles sections functions layers images theme themeDef master nullPropagation caseSensitive naturalSort nullOrder collation arithmetic bandRows version id tags author folder stylesheet parts partProperties dashboard comment notes customCode libraries liveParameters parameterLayout drafts "+
|
|
12744
|
+
"history nonFinite").split(" "));
|
|
12744
12745
|
for (const k of Object.keys(REPORT_SCHEMA.$defs.Report.properties)) DEF_KEYS.add(k);
|
|
12745
12746
|
var lev = (a, b) => {
|
|
12746
12747
|
if (Math.abs(a.length - b.length) > 2) return 3;
|
|
@@ -12803,6 +12804,18 @@ function sortIssues(sort, label, out) {
|
|
|
12803
12804
|
if (s.dir != null && !["asc", "desc"].includes(s.dir)) out.push(`${at}: "dir" is ${JSON.stringify(s.dir)}; expected "asc" or "desc"`);
|
|
12804
12805
|
});
|
|
12805
12806
|
}
|
|
12807
|
+
var FILTER_KEYS = ["expr", "op", "value", "value2", "skipBlank"];
|
|
12808
|
+
var FILTER_ALIAS = { expression: "expr", field: "expr", by: "expr", operator: "op", comparison: "op", values: "value", value1: "value" };
|
|
12809
|
+
function filterIssues(filters, label, out) {
|
|
12810
|
+
filters.forEach((f4, i) => {
|
|
12811
|
+
if (!f4 || typeof f4 !== "object" || Array.isArray(f4)) return;
|
|
12812
|
+
for (const k of Object.keys(f4)) {
|
|
12813
|
+
if (FILTER_KEYS.includes(k) || k.startsWith("_")) continue;
|
|
12814
|
+
const g = FILTER_ALIAS[k] || didYouMean(k, FILTER_KEYS);
|
|
12815
|
+
out.push(`${label}, filter ${i + 1}: "${k}" is ignored; a filter is {${FILTER_KEYS.join(", ")}}${g ? ` (did you mean "${g}"?)` : ""}`);
|
|
12816
|
+
}
|
|
12817
|
+
});
|
|
12818
|
+
}
|
|
12806
12819
|
var SCHEMA_ITEMS = (() => {
|
|
12807
12820
|
const defs = (
|
|
12808
12821
|
/** @type {Record<string, any>} */
|
|
@@ -12885,6 +12898,7 @@ function validate(def) {
|
|
|
12885
12898
|
} else if (!srcNames.has(d.source)) errors.push(`Data set "${d.name}" uses the source "${d.source}", which does not exist`);
|
|
12886
12899
|
dsNames.add(d.name);
|
|
12887
12900
|
if (Array.isArray(d.sort)) sortIssues(d.sort, `Data set "${d.name}"`, warnings);
|
|
12901
|
+
if (Array.isArray(d.filters)) filterIssues(d.filters, `Data set "${d.name}"`, warnings);
|
|
12888
12902
|
}
|
|
12889
12903
|
const names = /* @__PURE__ */ new Set();
|
|
12890
12904
|
const check = (where, v, label) => {
|
|
@@ -12947,6 +12961,7 @@ function validate(def) {
|
|
|
12947
12961
|
warnings.push(`${label}: there is no named style "${it.styleName}"${g ? ` (did you mean "${g}"?)` : ""}; it is ignored`);
|
|
12948
12962
|
}
|
|
12949
12963
|
if (Array.isArray(it.sort)) sortIssues(it.sort, label, warnings);
|
|
12964
|
+
if (Array.isArray(it.filters)) filterIssues(it.filters, label, warnings);
|
|
12950
12965
|
if (it.type === "chart" && it.legend != null && it.legend !== "bottom" && it.legend !== "none") {
|
|
12951
12966
|
const shown = typeof it.legend === "object" ? `is an object (${JSON.stringify(it.legend).slice(0, 60)})` : `is ${JSON.stringify(it.legend)}`;
|
|
12952
12967
|
warnings.push(`${label}: "legend" ${shown}; only "bottom" (show the legend) or "none" (hide it) is supported, and the legend is drawn at the bottom`);
|
|
@@ -14208,4 +14223,4 @@ export {
|
|
|
14208
14223
|
parameterOptions,
|
|
14209
14224
|
resolveParameters
|
|
14210
14225
|
};
|
|
14211
|
-
//# sourceMappingURL=chunk-
|
|
14226
|
+
//# sourceMappingURL=chunk-OMCWZYRI.js.map
|