pptxgenjs-plus 4.3.2 → 4.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pptxgen.bundle.js +63 -63
- package/dist/pptxgen.cjs.js +118 -82
- package/dist/pptxgen.es.js +117 -82
- package/dist/pptxgen.min.js +62 -62
- package/package.json +1 -1
package/dist/pptxgen.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* PptxGenJS 4.3.
|
|
1
|
+
/* PptxGenJS 4.3.3 @ 2026-09-19T03:39:07.117Z */
|
|
2
2
|
|
|
3
3
|
"use strict";
|
|
4
4
|
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
|
|
@@ -38,6 +38,62 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
38
38
|
|
|
39
39
|
;// CONCATENATED MODULE: external "@node-projects/jszip"
|
|
40
40
|
const jszip_namespaceObject = require("@node-projects/jszip");
|
|
41
|
+
;// CONCATENATED MODULE: ./src/zip.ts
|
|
42
|
+
function _define_property(obj, key, value) {
|
|
43
|
+
if (key in obj) {
|
|
44
|
+
Object.defineProperty(obj, key, {
|
|
45
|
+
value: value,
|
|
46
|
+
enumerable: true,
|
|
47
|
+
configurable: true,
|
|
48
|
+
writable: true
|
|
49
|
+
});
|
|
50
|
+
} else obj[key] = value;
|
|
51
|
+
return obj;
|
|
52
|
+
}
|
|
53
|
+
function _object_spread(target) {
|
|
54
|
+
for(var i = 1; i < arguments.length; i++){
|
|
55
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
56
|
+
var ownKeys = Object.keys(source);
|
|
57
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
58
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
59
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
ownKeys.forEach(function(key) {
|
|
63
|
+
_define_property(target, key, source[key]);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return target;
|
|
67
|
+
}
|
|
68
|
+
function zip_ownKeys(object, enumerableOnly) {
|
|
69
|
+
var keys = Object.keys(object);
|
|
70
|
+
if (Object.getOwnPropertySymbols) {
|
|
71
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
72
|
+
if (enumerableOnly) {
|
|
73
|
+
symbols = symbols.filter(function(sym) {
|
|
74
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
keys.push.apply(keys, symbols);
|
|
78
|
+
}
|
|
79
|
+
return keys;
|
|
80
|
+
}
|
|
81
|
+
function _object_spread_props(target, source) {
|
|
82
|
+
source = source != null ? source : {};
|
|
83
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
84
|
+
else {
|
|
85
|
+
zip_ownKeys(Object(source)).forEach(function(key) {
|
|
86
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return target;
|
|
90
|
+
}
|
|
91
|
+
/** Add an OPC part without creating an explicit ZIP directory entry for its path. */ function addZipFile(zip, path, data, options = {}) {
|
|
92
|
+
zip.file(path, data, _object_spread_props(_object_spread({}, options), {
|
|
93
|
+
createFolders: false
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
|
|
41
97
|
;// CONCATENATED MODULE: ./src/core-enums.ts
|
|
42
98
|
/**
|
|
43
99
|
* PptxGenJS Enums
|
|
@@ -1158,7 +1214,7 @@ const IMG_PLAYBTN = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAVnCAYAA
|
|
|
1158
1214
|
;// CONCATENATED MODULE: external "@rgrove/parse-xml"
|
|
1159
1215
|
const parse_xml_namespaceObject = require("@rgrove/parse-xml");
|
|
1160
1216
|
;// CONCATENATED MODULE: ./src/gen-utils.ts
|
|
1161
|
-
function
|
|
1217
|
+
function gen_utils_define_property(obj, key, value) {
|
|
1162
1218
|
if (key in obj) {
|
|
1163
1219
|
Object.defineProperty(obj, key, {
|
|
1164
1220
|
value: value,
|
|
@@ -1169,7 +1225,7 @@ function _define_property(obj, key, value) {
|
|
|
1169
1225
|
} else obj[key] = value;
|
|
1170
1226
|
return obj;
|
|
1171
1227
|
}
|
|
1172
|
-
function
|
|
1228
|
+
function gen_utils_object_spread(target) {
|
|
1173
1229
|
for(var i = 1; i < arguments.length; i++){
|
|
1174
1230
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
1175
1231
|
var ownKeys = Object.keys(source);
|
|
@@ -1179,7 +1235,7 @@ function _object_spread(target) {
|
|
|
1179
1235
|
}));
|
|
1180
1236
|
}
|
|
1181
1237
|
ownKeys.forEach(function(key) {
|
|
1182
|
-
|
|
1238
|
+
gen_utils_define_property(target, key, source[key]);
|
|
1183
1239
|
});
|
|
1184
1240
|
}
|
|
1185
1241
|
return target;
|
|
@@ -1197,7 +1253,7 @@ function gen_utils_ownKeys(object, enumerableOnly) {
|
|
|
1197
1253
|
}
|
|
1198
1254
|
return keys;
|
|
1199
1255
|
}
|
|
1200
|
-
function
|
|
1256
|
+
function gen_utils_object_spread_props(target, source) {
|
|
1201
1257
|
source = source != null ? source : {};
|
|
1202
1258
|
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1203
1259
|
else {
|
|
@@ -1781,7 +1837,7 @@ const FLAG_COLOR_MODIFIERS = [
|
|
|
1781
1837
|
* only constructor of `ResolvedGlowProps` (no cast - the brand is added by this factory).
|
|
1782
1838
|
*/ function resolveGlowOptions(options) {
|
|
1783
1839
|
if (!options) return undefined;
|
|
1784
|
-
return
|
|
1840
|
+
return gen_utils_object_spread_props(gen_utils_object_spread({}, DEF_TEXT_GLOW, options), {
|
|
1785
1841
|
[glowBrand]: true
|
|
1786
1842
|
});
|
|
1787
1843
|
}
|
|
@@ -1969,7 +2025,7 @@ function createGlowElement(glow) {
|
|
|
1969
2025
|
return;
|
|
1970
2026
|
}
|
|
1971
2027
|
// Work on a copy - never mutate the caller's options object
|
|
1972
|
-
ShadowProps =
|
|
2028
|
+
ShadowProps = gen_utils_object_spread({}, ShadowProps);
|
|
1973
2029
|
// OPT: `type`
|
|
1974
2030
|
if (ShadowProps.type !== 'outer' && ShadowProps.type !== 'inner' && ShadowProps.type !== 'none' && ShadowProps.type !== 'preset') {
|
|
1975
2031
|
console.warn('Warning: shadow.type options are `outer`, `inner`, `preset` or `none`.');
|
|
@@ -7952,7 +8008,8 @@ function makeChartType(chartType, data, opts, valAxisId, catAxisId, _isMultiType
|
|
|
7952
8008
|
strXml += ' <c:marker val="1"/>';
|
|
7953
8009
|
}
|
|
7954
8010
|
// 5: Add axisId (NOTE: order matters - category comes first)
|
|
7955
|
-
strXml += `<c:axId val="${catAxisId}"/><c:axId val="${valAxisId}"
|
|
8011
|
+
strXml += `<c:axId val="${catAxisId}"/><c:axId val="${valAxisId}"/>`;
|
|
8012
|
+
if (chartType === core_enums_CHART_TYPE.BAR3D) strXml += `<c:axId val="${AXIS_ID_SERIES_PRIMARY}"/>`;
|
|
7956
8013
|
// 6: Close Chart tag
|
|
7957
8014
|
strXml += `</c:${chartType}Chart>`;
|
|
7958
8015
|
break;
|
|
@@ -8513,6 +8570,7 @@ function _async_to_generator(fn) {
|
|
|
8513
8570
|
|
|
8514
8571
|
|
|
8515
8572
|
|
|
8573
|
+
|
|
8516
8574
|
function getDataTableStyles(chartObject) {
|
|
8517
8575
|
const dataTableFormats = Array.isArray(chartObject.opts._type) ? chartObject.opts._type.flatMap((type)=>{
|
|
8518
8576
|
var _ref;
|
|
@@ -8541,7 +8599,6 @@ function makeNumberStyles(formats) {
|
|
|
8541
8599
|
return _async_to_generator(function*() {
|
|
8542
8600
|
const zipExcel = new jszip_namespaceObject.JSZip();
|
|
8543
8601
|
const dataTableStyles = getDataTableStyles(chartObject);
|
|
8544
|
-
addWorkbookFolders(zipExcel);
|
|
8545
8602
|
addCoreWorkbookFiles(zipExcel, dataTableStyles.customFormats);
|
|
8546
8603
|
addSharedStringsFile(chartObject, zipExcel);
|
|
8547
8604
|
addTableFile(chartObject, zipExcel);
|
|
@@ -8549,30 +8606,21 @@ function makeNumberStyles(formats) {
|
|
|
8549
8606
|
return yield addWorkbookToPresentation(chartObject, zipExcel, zip);
|
|
8550
8607
|
})();
|
|
8551
8608
|
}
|
|
8552
|
-
/** Create the archive folders required by the embedded XLSX package. */ function addWorkbookFolders(zipExcel) {
|
|
8553
|
-
zipExcel.folder('_rels');
|
|
8554
|
-
zipExcel.folder('docProps');
|
|
8555
|
-
zipExcel.folder('xl/_rels');
|
|
8556
|
-
zipExcel.folder('xl/tables');
|
|
8557
|
-
zipExcel.folder('xl/theme');
|
|
8558
|
-
zipExcel.folder('xl/worksheets');
|
|
8559
|
-
zipExcel.folder('xl/worksheets/_rels');
|
|
8560
|
-
}
|
|
8561
8609
|
/**
|
|
8562
8610
|
* Write the fixed XLSX package parts: content types, root/workbook relationships, metadata, styles, theme, and workbook.
|
|
8563
8611
|
* These parts are independent of chart data and must exist before the data-specific files are added.
|
|
8564
8612
|
*/ function addCoreWorkbookFiles(zipExcel, customFormats) {
|
|
8565
8613
|
// B: Add core contents
|
|
8566
8614
|
{
|
|
8567
|
-
zipExcel
|
|
8568
|
-
zipExcel
|
|
8569
|
-
zipExcel
|
|
8570
|
-
zipExcel
|
|
8571
|
-
zipExcel
|
|
8572
|
-
zipExcel
|
|
8573
|
-
zipExcel
|
|
8574
|
-
zipExcel
|
|
8575
|
-
zipExcel
|
|
8615
|
+
addZipFile(zipExcel, '[Content_Types].xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><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"/>' + ' <Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>' + ' <Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>' + ' <Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>' + ' <Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>' + ' <Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/>' + ' <Override PartName="/xl/tables/table1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"/>' + ' <Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>' + ' <Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>' + '</Types>\n');
|
|
8616
|
+
addZipFile(zipExcel, '_rels/.rels', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + '<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>' + '<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>' + '<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>' + '</Relationships>\n');
|
|
8617
|
+
addZipFile(zipExcel, 'docProps/app.xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">' + '<Application>Microsoft Macintosh Excel</Application>' + '<DocSecurity>0</DocSecurity>' + '<ScaleCrop>false</ScaleCrop>' + '<HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs>' + '<TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts>' + '<Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion>' + '</Properties>\n');
|
|
8618
|
+
addZipFile(zipExcel, 'docProps/core.xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><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:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">' + '<dc:creator>PptxGenJS</dc:creator>' + '<cp:lastModifiedBy>PptxGenJS</cp:lastModifiedBy>' + '<dcterms:created xsi:type="dcterms:W3CDTF">' + new Date().toISOString() + '</dcterms:created>' + '<dcterms:modified xsi:type="dcterms:W3CDTF">' + new Date().toISOString() + '</dcterms:modified>' + '</cp:coreProperties>');
|
|
8619
|
+
addZipFile(zipExcel, 'xl/_rels/workbook.xml.rels', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + '<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>' + '<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/>' + '<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/>' + '<Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/>' + '</Relationships>');
|
|
8620
|
+
addZipFile(zipExcel, 'xl/styles.xml', customFormats.length > 0 ? makeNumberStyles(customFormats) : '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><numFmts count="1"><numFmt numFmtId="0" formatCode="General"/></numFmts><fonts count="4"><font><sz val="9"/><color indexed="8"/><name val="Geneva"/></font><font><sz val="9"/><color indexed="8"/><name val="Geneva"/></font><font><sz val="10"/><color indexed="8"/><name val="Geneva"/></font><font><sz val="18"/><color indexed="8"/>' + '<name val="Arial"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><dxfs count="0"/><tableStyles count="0"/><colors><indexedColors><rgbColor rgb="ff000000"/><rgbColor rgb="ffffffff"/><rgbColor rgb="ffff0000"/><rgbColor rgb="ff00ff00"/><rgbColor rgb="ff0000ff"/>' + '<rgbColor rgb="ffffff00"/><rgbColor rgb="ffff00ff"/><rgbColor rgb="ff00ffff"/><rgbColor rgb="ff000000"/><rgbColor rgb="ffffffff"/><rgbColor rgb="ff878787"/><rgbColor rgb="fff9f9f9"/></indexedColors></colors></styleSheet>\n');
|
|
8621
|
+
addZipFile(zipExcel, 'xl/theme/theme1.xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="44546A"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="4472C4"/></a:accent1><a:accent2><a:srgbClr val="ED7D31"/></a:accent2><a:accent3><a:srgbClr val="A5A5A5"/></a:accent3><a:accent4><a:srgbClr val="FFC000"/></a:accent4><a:accent5><a:srgbClr val="5B9BD5"/></a:accent5><a:accent6><a:srgbClr val="70AD47"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Calibri Light" panose="020F0302020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="Yu Gothic Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="DengXian Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/></a:majorFont><a:minorFont><a:latin typeface="Calibri" panose="020F0502020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="Yu Gothic"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="DengXian"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6350" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{62F939B6-93AF-4DB8-9C6B-D6C7DFDC589F}" vid="{4A3C46E8-61CC-4603-A589-7422A47A8E4A}"/></a:ext></a:extLst></a:theme>');
|
|
8622
|
+
addZipFile(zipExcel, 'xl/workbook.xml', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + '<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main">' + '<fileVersion appName="xl" lastEdited="7" lowestEdited="6" rupBuild="10507"/>' + '<workbookPr/>' + '<bookViews><workbookView xWindow="0" yWindow="500" windowWidth="20960" windowHeight="15960"/></bookViews>' + '<sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets>' + '<calcPr calcId="0" concurrentCalc="0"/>' + '</workbook>\n');
|
|
8623
|
+
addZipFile(zipExcel, 'xl/worksheets/_rels/sheet1.xml.rels', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + '<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" Target="../tables/table1.xml"/>' + '</Relationships>\n');
|
|
8576
8624
|
}
|
|
8577
8625
|
}
|
|
8578
8626
|
/**
|
|
@@ -8634,7 +8682,7 @@ function makeNumberStyles(formats) {
|
|
|
8634
8682
|
}
|
|
8635
8683
|
// DONE:
|
|
8636
8684
|
strSharedStrings += '</sst>\n';
|
|
8637
|
-
zipExcel
|
|
8685
|
+
addZipFile(zipExcel, 'xl/sharedStrings.xml', strSharedStrings);
|
|
8638
8686
|
}
|
|
8639
8687
|
}
|
|
8640
8688
|
/** Write table metadata and the calculated cell range for the embedded workbook. */ function addTableFile(chartObject, zipExcel) {
|
|
@@ -8690,7 +8738,7 @@ function makeNumberStyles(formats) {
|
|
|
8690
8738
|
strTableXml += '</tableColumns>';
|
|
8691
8739
|
strTableXml += '<tableStyleInfo showFirstColumn="0" showLastColumn="0" showRowStripes="1" showColumnStripes="0"/>';
|
|
8692
8740
|
strTableXml += '</table>';
|
|
8693
|
-
zipExcel
|
|
8741
|
+
addZipFile(zipExcel, 'xl/tables/table1.xml', strTableXml);
|
|
8694
8742
|
}
|
|
8695
8743
|
}
|
|
8696
8744
|
/**
|
|
@@ -9001,7 +9049,7 @@ function makeNumberStyles(formats) {
|
|
|
9001
9049
|
// ....: Leaving this so nobody foolishly attempts to add this in the future
|
|
9002
9050
|
// strSheetXml += '<tableParts count="1"><tablePart r:id="rId1"/></tableParts>'
|
|
9003
9051
|
strSheetXml += '</worksheet>\n';
|
|
9004
|
-
zipExcel
|
|
9052
|
+
addZipFile(zipExcel, 'xl/worksheets/sheet1.xml', strSheetXml);
|
|
9005
9053
|
}
|
|
9006
9054
|
}
|
|
9007
9055
|
/**
|
|
@@ -9013,7 +9061,7 @@ function makeNumberStyles(formats) {
|
|
|
9013
9061
|
type: 'base64'
|
|
9014
9062
|
}).then((content)=>{
|
|
9015
9063
|
// 1: Create the embedded Excel worksheet with labels and data
|
|
9016
|
-
zip
|
|
9064
|
+
addZipFile(zip, `ppt/embeddings/Microsoft_Excel_Worksheet${chartObject.globalId}.xlsx`, content, {
|
|
9017
9065
|
base64: true
|
|
9018
9066
|
});
|
|
9019
9067
|
// 2: Create the chart.xml and rel files
|
|
@@ -9023,12 +9071,12 @@ function makeNumberStyles(formats) {
|
|
|
9023
9071
|
const isChartex = isChartexType(chartObject.opts._type);
|
|
9024
9072
|
const writeStyleParts = wantsChartStyleParts(chartObject.opts);
|
|
9025
9073
|
const styleRels = writeStyleParts ? `<Relationship Id="rId2" Type="${CHART_STYLE.colorsRelType}" Target="colors${chartObject.globalId}.xml"/>` + `<Relationship Id="rId3" Type="${CHART_STYLE.styleRelType}" Target="style${chartObject.globalId}.xml"/>` : '';
|
|
9026
|
-
zip
|
|
9027
|
-
zip
|
|
9074
|
+
addZipFile(zip, 'ppt/charts/_rels/' + chartObject.fileName + '.rels', '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">' + `<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package" Target="../embeddings/Microsoft_Excel_Worksheet${chartObject.globalId}.xlsx"/>` + styleRels + '</Relationships>');
|
|
9075
|
+
addZipFile(zip, `ppt/charts/${chartObject.fileName}`, isChartex ? makeXmlChartEx(chartObject) : makeXmlCharts(chartObject));
|
|
9028
9076
|
if (writeStyleParts) {
|
|
9029
9077
|
var _chartObject_opts, _chartObject_opts1;
|
|
9030
|
-
zip
|
|
9031
|
-
zip
|
|
9078
|
+
addZipFile(zip, chartColorsPartName(chartObject.globalId), makeXmlChartColors((_chartObject_opts = chartObject.opts) === null || _chartObject_opts === void 0 ? void 0 : _chartObject_opts.chartColorStyle));
|
|
9079
|
+
addZipFile(zip, chartStylePartName(chartObject.globalId), makeXmlChartStyle((_chartObject_opts1 = chartObject.opts) === null || _chartObject_opts1 === void 0 ? void 0 : _chartObject_opts1.chartStyle));
|
|
9032
9080
|
}
|
|
9033
9081
|
// 3: Done
|
|
9034
9082
|
resolve('');
|
|
@@ -17089,6 +17137,7 @@ function gen_fonts_async_to_generator(fn) {
|
|
|
17089
17137
|
};
|
|
17090
17138
|
}
|
|
17091
17139
|
|
|
17140
|
+
|
|
17092
17141
|
/** High rId base so font relationships do not collide with slide/master rIds */ const FONT_RID_START = 201314;
|
|
17093
17142
|
const FONT_REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/font';
|
|
17094
17143
|
/**
|
|
@@ -17193,18 +17242,18 @@ function appendFontRelationships(relsXml, fonts) {
|
|
|
17193
17242
|
}
|
|
17194
17243
|
const contentTypesFile = zip.file('[Content_Types].xml');
|
|
17195
17244
|
if (!contentTypesFile) throw new Error('[Content_Types].xml not found');
|
|
17196
|
-
zip
|
|
17245
|
+
addZipFile(zip, '[Content_Types].xml', ensureFntdataContentType((yield contentTypesFile.async('string'))));
|
|
17197
17246
|
const presentationFile = zip.file('ppt/presentation.xml');
|
|
17198
17247
|
if (!presentationFile) throw new Error('ppt/presentation.xml not found');
|
|
17199
17248
|
let presentationXml = yield presentationFile.async('string');
|
|
17200
17249
|
presentationXml = ensurePresentationFontAttrs(presentationXml);
|
|
17201
17250
|
presentationXml = ensureEmbeddedFontLst(presentationXml, prepared);
|
|
17202
|
-
zip
|
|
17251
|
+
addZipFile(zip, 'ppt/presentation.xml', presentationXml);
|
|
17203
17252
|
const relsFile = zip.file('ppt/_rels/presentation.xml.rels');
|
|
17204
17253
|
if (!relsFile) throw new Error('ppt/_rels/presentation.xml.rels not found');
|
|
17205
|
-
zip
|
|
17254
|
+
addZipFile(zip, 'ppt/_rels/presentation.xml.rels', appendFontRelationships((yield relsFile.async('string')), prepared));
|
|
17206
17255
|
for (const font of prepared){
|
|
17207
|
-
zip
|
|
17256
|
+
addZipFile(zip, `ppt/fonts/${font.rid}.fntdata`, font.data, {
|
|
17208
17257
|
binary: true,
|
|
17209
17258
|
compression: 'DEFLATE'
|
|
17210
17259
|
});
|
|
@@ -23432,6 +23481,7 @@ function pptxgen_define_property(obj, key, value) {
|
|
|
23432
23481
|
|
|
23433
23482
|
|
|
23434
23483
|
|
|
23484
|
+
|
|
23435
23485
|
class PptxGenJS {
|
|
23436
23486
|
set layout(value) {
|
|
23437
23487
|
const newLayout = this.LAYOUTS[value];
|
|
@@ -23853,7 +23903,7 @@ class PptxGenJS {
|
|
|
23853
23903
|
*/ pptxgen_define_property(this, "_layout", void 0);
|
|
23854
23904
|
/**
|
|
23855
23905
|
* PptxGenJS Library Version
|
|
23856
|
-
*/ pptxgen_define_property(this, "_version", (/* inlined export .VERSION */"4.3.
|
|
23906
|
+
*/ pptxgen_define_property(this, "_version", (/* inlined export .VERSION */"4.3.3"));
|
|
23857
23907
|
/**
|
|
23858
23908
|
* @type {string}
|
|
23859
23909
|
*/ pptxgen_define_property(this, "_author", void 0);
|
|
@@ -24022,7 +24072,7 @@ class PptxGenJS {
|
|
|
24022
24072
|
const mediaPath = rel.Target.replace(/\.\./g, 'ppt');
|
|
24023
24073
|
if (mediaPaths.has(mediaPath)) return;
|
|
24024
24074
|
mediaPaths.add(mediaPath);
|
|
24025
|
-
zip
|
|
24075
|
+
addZipFile(zip, mediaPath, (_data_split_pop = data.split(',').pop()) !== null && _data_split_pop !== void 0 ? _data_split_pop : '', {
|
|
24026
24076
|
base64: true
|
|
24027
24077
|
});
|
|
24028
24078
|
}
|
|
@@ -24084,7 +24134,6 @@ class PptxGenJS {
|
|
|
24084
24134
|
}));
|
|
24085
24135
|
// STEP 2: Wait for Promises (if any) then generate the PPTX file
|
|
24086
24136
|
return yield Promise.all(arrMediaPromises).then(()=>pptxgen_async_to_generator(function*() {
|
|
24087
|
-
var _zip_folder, _zip_folder1, _zip_folder2, _zip_folder3, _zip_folder4, _zip_folder5, _zip_folder6;
|
|
24088
24137
|
// A: Size images added without `w`/`h` to their natural dimensions (media bytes are loaded by now)
|
|
24089
24138
|
this.slides.forEach((slide)=>applyNaturalImageSizes(slide));
|
|
24090
24139
|
this.slideLayouts.forEach((layout)=>applyNaturalImageSizes(layout));
|
|
@@ -24093,39 +24142,27 @@ class PptxGenJS {
|
|
|
24093
24142
|
this.slides.forEach((slide)=>{
|
|
24094
24143
|
if (slide._slideLayout) addPlaceholdersToSlideLayouts(slide);
|
|
24095
24144
|
});
|
|
24096
|
-
// B: Add all required
|
|
24097
|
-
zip.folder('_rels');
|
|
24098
|
-
zip.folder('docProps');
|
|
24099
|
-
(_zip_folder = zip.folder('ppt')) === null || _zip_folder === void 0 ? void 0 : _zip_folder.folder('_rels');
|
|
24100
|
-
(_zip_folder1 = zip.folder('ppt/charts')) === null || _zip_folder1 === void 0 ? void 0 : _zip_folder1.folder('_rels');
|
|
24101
|
-
zip.folder('ppt/embeddings');
|
|
24102
|
-
zip.folder('ppt/media');
|
|
24103
|
-
(_zip_folder2 = zip.folder('ppt/slideLayouts')) === null || _zip_folder2 === void 0 ? void 0 : _zip_folder2.folder('_rels');
|
|
24104
|
-
(_zip_folder3 = zip.folder('ppt/slideMasters')) === null || _zip_folder3 === void 0 ? void 0 : _zip_folder3.folder('_rels');
|
|
24105
|
-
(_zip_folder4 = zip.folder('ppt/slides')) === null || _zip_folder4 === void 0 ? void 0 : _zip_folder4.folder('_rels');
|
|
24106
|
-
zip.folder('ppt/theme');
|
|
24107
|
-
(_zip_folder5 = zip.folder('ppt/notesMasters')) === null || _zip_folder5 === void 0 ? void 0 : _zip_folder5.folder('_rels');
|
|
24108
|
-
(_zip_folder6 = zip.folder('ppt/notesSlides')) === null || _zip_folder6 === void 0 ? void 0 : _zip_folder6.folder('_rels');
|
|
24145
|
+
// B: Add all required OPC package parts.
|
|
24109
24146
|
const trackingParts = {
|
|
24110
24147
|
revisionInfo: wantsRevisionInfo(this.revisionInfo),
|
|
24111
24148
|
changesInfo: wantsChangesInfo(this.changesInfo)
|
|
24112
24149
|
};
|
|
24113
|
-
zip
|
|
24114
|
-
zip
|
|
24115
|
-
zip
|
|
24116
|
-
zip
|
|
24117
|
-
zip
|
|
24118
|
-
zip
|
|
24150
|
+
addZipFile(zip, '[Content_Types].xml', makeXmlContTypes(this.slides, this.slideLayouts, this.masterSlide, trackingParts)); // TODO: pass only `this` like below! 20200206
|
|
24151
|
+
addZipFile(zip, '_rels/.rels', makeXmlRootRels());
|
|
24152
|
+
addZipFile(zip, 'docProps/app.xml', makeXmlApp(this.slides, this.company, this.documentProps)); // TODO: pass only `this` like below! 20200206
|
|
24153
|
+
addZipFile(zip, 'docProps/core.xml', makeXmlCore(this.title, this.subject, this.author, this.revision, this.created, this.modified, this.documentProps)); // TODO: pass only `this` like below! 20200206
|
|
24154
|
+
addZipFile(zip, 'ppt/_rels/presentation.xml.rels', makeXmlPresentationRels(this.slides, trackingParts));
|
|
24155
|
+
addZipFile(zip, 'ppt/theme/theme1.xml', makeXmlTheme(this));
|
|
24119
24156
|
// notesMaster gets its own theme part (Office repair creates theme2 when notesMaster shares theme1; Juliussssssss 9bdfe09).
|
|
24120
|
-
zip
|
|
24121
|
-
zip
|
|
24122
|
-
zip
|
|
24123
|
-
zip
|
|
24124
|
-
zip
|
|
24157
|
+
addZipFile(zip, 'ppt/theme/theme2.xml', makeXmlTheme(this, 'notes'));
|
|
24158
|
+
addZipFile(zip, 'ppt/presentation.xml', makeXmlPresentation(this));
|
|
24159
|
+
addZipFile(zip, 'ppt/presProps.xml', makeXmlPresProps(this));
|
|
24160
|
+
addZipFile(zip, 'ppt/tableStyles.xml', makeXmlTableStyles(this._tableStyles));
|
|
24161
|
+
addZipFile(zip, 'ppt/viewProps.xml', makeXmlViewProps(this));
|
|
24125
24162
|
// C: Create a Layout/Master/Rel/Slide file for each SlideLayout and Slide
|
|
24126
24163
|
this.slideLayouts.forEach((layout, idx)=>{
|
|
24127
|
-
zip
|
|
24128
|
-
zip
|
|
24164
|
+
addZipFile(zip, `ppt/slideLayouts/slideLayout${idx + 1}.xml`, makeXmlLayout(layout));
|
|
24165
|
+
addZipFile(zip, `ppt/slideLayouts/_rels/slideLayout${idx + 1}.xml.rels`, makeXmlSlideLayoutRel(idx + 1, this.slideLayouts));
|
|
24129
24166
|
});
|
|
24130
24167
|
// Modern threaded comments (MS-PPTX §2.16): resolve authors once, emit authors + per-slide comment parts.
|
|
24131
24168
|
const hasComments = this.slides.some((s)=>{
|
|
@@ -24134,32 +24171,31 @@ class PptxGenJS {
|
|
|
24134
24171
|
});
|
|
24135
24172
|
const commentAuthors = hasComments ? collectCommentAuthors(this.slides, this.commentAuthors) : [];
|
|
24136
24173
|
if (hasComments) {
|
|
24137
|
-
zip
|
|
24138
|
-
zip.file('ppt/authors.xml', makeXmlCommentAuthors(commentAuthors));
|
|
24174
|
+
addZipFile(zip, 'ppt/authors.xml', makeXmlCommentAuthors(commentAuthors));
|
|
24139
24175
|
}
|
|
24140
24176
|
if (trackingParts.revisionInfo) {
|
|
24141
|
-
zip
|
|
24177
|
+
addZipFile(zip, REVISION_INFO_PART, makeXmlRevisionInfo(this.revisionInfo));
|
|
24142
24178
|
}
|
|
24143
24179
|
if (trackingParts.changesInfo) {
|
|
24144
|
-
zip
|
|
24180
|
+
addZipFile(zip, CHANGES_INFO_PART, makeXmlChangesInfo());
|
|
24145
24181
|
}
|
|
24146
24182
|
this.slides.forEach((slide, idx)=>{
|
|
24147
24183
|
var _slide_comments;
|
|
24148
|
-
zip
|
|
24149
|
-
zip
|
|
24184
|
+
addZipFile(zip, `ppt/slides/slide${idx + 1}.xml`, makeXmlSlide(slide, this._sections));
|
|
24185
|
+
addZipFile(zip, `ppt/slides/_rels/slide${idx + 1}.xml.rels`, makeXmlSlideRel(this.slides, this.slideLayouts, idx + 1));
|
|
24150
24186
|
// Create all slide notes related items. Notes of empty strings are created for slides which do not have notes specified, to keep track of _rels.
|
|
24151
|
-
zip
|
|
24152
|
-
zip
|
|
24153
|
-
if (((_slide_comments = slide.comments) !== null && _slide_comments !== void 0 ? _slide_comments : []).length > 0) zip
|
|
24187
|
+
addZipFile(zip, `ppt/notesSlides/notesSlide${idx + 1}.xml`, makeXmlNotesSlide(slide));
|
|
24188
|
+
addZipFile(zip, `ppt/notesSlides/_rels/notesSlide${idx + 1}.xml.rels`, makeXmlNotesSlideRel(idx + 1));
|
|
24189
|
+
if (((_slide_comments = slide.comments) !== null && _slide_comments !== void 0 ? _slide_comments : []).length > 0) addZipFile(zip, `ppt/comments/commentSlide${idx + 1}.xml`, makeXmlSlideComments(slide, commentAuthors));
|
|
24154
24190
|
for (const rel of slide._rels){
|
|
24155
24191
|
if (rel.type !== (/* inlined export .SLIDE_OBJECT_TYPES.contentPart */"contentPart") && rel.type !== (/* inlined export .SLIDE_OBJECT_TYPES.officeApp */"officeApp")) continue;
|
|
24156
|
-
zip
|
|
24192
|
+
addZipFile(zip, rel.Target.replace(/^\.\.\//, 'ppt/'), typeof rel.data === 'string' ? rel.data : '');
|
|
24157
24193
|
}
|
|
24158
24194
|
});
|
|
24159
|
-
zip
|
|
24160
|
-
zip
|
|
24161
|
-
zip
|
|
24162
|
-
zip
|
|
24195
|
+
addZipFile(zip, 'ppt/slideMasters/slideMaster1.xml', makeXmlMaster(this.masterSlide, this.slideLayouts));
|
|
24196
|
+
addZipFile(zip, 'ppt/slideMasters/_rels/slideMaster1.xml.rels', makeXmlMasterRel(this.masterSlide, this.slideLayouts));
|
|
24197
|
+
addZipFile(zip, 'ppt/notesMasters/notesMaster1.xml', makeXmlNotesMaster());
|
|
24198
|
+
addZipFile(zip, 'ppt/notesMasters/_rels/notesMaster1.xml.rels', makeXmlNotesMasterRel());
|
|
24163
24199
|
// D: Create all Rels (images, media, chart data)
|
|
24164
24200
|
const mediaPaths = new Set();
|
|
24165
24201
|
this.slideLayouts.forEach((layout)=>{
|