pptx-templates 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AI-INSTRUCTOR.md +2253 -0
- package/CHANGELOG.md +49 -0
- package/LICENSE +23 -0
- package/README.md +86 -2
- package/dist/automizer.d.ts +224 -0
- package/dist/automizer.js +704 -0
- package/dist/automizer.js.map +1 -0
- package/dist/classes/content-type-registry.d.ts +46 -0
- package/dist/classes/content-type-registry.js +170 -0
- package/dist/classes/content-type-registry.js.map +1 -0
- package/dist/classes/element-importer.d.ts +49 -0
- package/dist/classes/element-importer.js +254 -0
- package/dist/classes/element-importer.js.map +1 -0
- package/dist/classes/has-shapes.d.ts +286 -0
- package/dist/classes/has-shapes.js +385 -0
- package/dist/classes/has-shapes.js.map +1 -0
- package/dist/classes/layout.d.ts +42 -0
- package/dist/classes/layout.js +113 -0
- package/dist/classes/layout.js.map +1 -0
- package/dist/classes/master.d.ts +45 -0
- package/dist/classes/master.js +146 -0
- package/dist/classes/master.js.map +1 -0
- package/dist/classes/placeholder-normalizer.d.ts +42 -0
- package/dist/classes/placeholder-normalizer.js +136 -0
- package/dist/classes/placeholder-normalizer.js.map +1 -0
- package/dist/classes/related-content-copier.d.ts +18 -0
- package/dist/classes/related-content-copier.js +114 -0
- package/dist/classes/related-content-copier.js.map +1 -0
- package/dist/classes/shape.d.ts +62 -0
- package/dist/classes/shape.js +194 -0
- package/dist/classes/shape.js.map +1 -0
- package/dist/classes/slide-master-remover.d.ts +44 -0
- package/dist/classes/slide-master-remover.js +201 -0
- package/dist/classes/slide-master-remover.js.map +1 -0
- package/dist/classes/slide-notes-copier.d.ts +26 -0
- package/dist/classes/slide-notes-copier.js +76 -0
- package/dist/classes/slide-notes-copier.js.map +1 -0
- package/dist/classes/slide.d.ts +91 -0
- package/dist/classes/slide.js +286 -0
- package/dist/classes/slide.js.map +1 -0
- package/dist/classes/template.d.ts +137 -0
- package/dist/classes/template.js +311 -0
- package/dist/classes/template.js.map +1 -0
- package/dist/constants/constants.d.ts +11 -0
- package/dist/constants/constants.js +182 -0
- package/dist/constants/constants.js.map +1 -0
- package/dist/enums/chart-type.d.ts +11 -0
- package/dist/enums/chart-type.js +16 -0
- package/dist/enums/chart-type.js.map +1 -0
- package/dist/enums/content-type-map.d.ts +16 -0
- package/dist/enums/content-type-map.js +23 -0
- package/dist/enums/content-type-map.js.map +1 -0
- package/dist/enums/element-type.d.ts +14 -0
- package/dist/enums/element-type.js +20 -0
- package/dist/enums/element-type.js.map +1 -0
- package/dist/errors.d.ts +81 -0
- package/dist/errors.js +100 -0
- package/dist/errors.js.map +1 -0
- package/dist/extensions/index.d.ts +5 -0
- package/dist/extensions/index.js +31 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/pptxgenjs-compat/img-broken-png.d.ts +5 -0
- package/dist/extensions/pptxgenjs-compat/img-broken-png.js +9 -0
- package/dist/extensions/pptxgenjs-compat/img-broken-png.js.map +1 -0
- package/dist/extensions/pptxgenjs-compat/index.d.ts +5 -0
- package/dist/extensions/pptxgenjs-compat/index.js +10 -0
- package/dist/extensions/pptxgenjs-compat/index.js.map +1 -0
- package/dist/extensions/pptxgenjs-compat/svg-fallback.d.ts +14 -0
- package/dist/extensions/pptxgenjs-compat/svg-fallback.js +139 -0
- package/dist/extensions/pptxgenjs-compat/svg-fallback.js.map +1 -0
- package/dist/extensions/template-logic/commands.d.ts +22 -0
- package/dist/extensions/template-logic/commands.js +83 -0
- package/dist/extensions/template-logic/commands.js.map +1 -0
- package/dist/extensions/template-logic/expression.d.ts +61 -0
- package/dist/extensions/template-logic/expression.js +499 -0
- package/dist/extensions/template-logic/expression.js.map +1 -0
- package/dist/extensions/template-logic/images.d.ts +26 -0
- package/dist/extensions/template-logic/images.js +183 -0
- package/dist/extensions/template-logic/images.js.map +1 -0
- package/dist/extensions/template-logic/index.d.ts +14 -0
- package/dist/extensions/template-logic/index.js +64 -0
- package/dist/extensions/template-logic/index.js.map +1 -0
- package/dist/extensions/template-logic/list-commands.d.ts +9 -0
- package/dist/extensions/template-logic/list-commands.js +72 -0
- package/dist/extensions/template-logic/list-commands.js.map +1 -0
- package/dist/extensions/template-logic/renderer.d.ts +85 -0
- package/dist/extensions/template-logic/renderer.js +867 -0
- package/dist/extensions/template-logic/renderer.js.map +1 -0
- package/dist/extensions/template-logic/types.d.ts +62 -0
- package/dist/extensions/template-logic/types.js +3 -0
- package/dist/extensions/template-logic/types.js.map +1 -0
- package/dist/helper/archive/archive-fs.d.ts +45 -0
- package/dist/helper/archive/archive-fs.js +206 -0
- package/dist/helper/archive/archive-fs.js.map +1 -0
- package/dist/helper/archive/archive-jszip.d.ts +31 -0
- package/dist/helper/archive/archive-jszip.js +173 -0
- package/dist/helper/archive/archive-jszip.js.map +1 -0
- package/dist/helper/archive/archive.d.ts +27 -0
- package/dist/helper/archive/archive.js +78 -0
- package/dist/helper/archive/archive.js.map +1 -0
- package/dist/helper/cell-id-helper.d.ts +25 -0
- package/dist/helper/cell-id-helper.js +95 -0
- package/dist/helper/cell-id-helper.js.map +1 -0
- package/dist/helper/compute-src-rect.d.ts +9 -0
- package/dist/helper/compute-src-rect.js +52 -0
- package/dist/helper/compute-src-rect.js.map +1 -0
- package/dist/helper/content-tracker.d.ts +31 -0
- package/dist/helper/content-tracker.js +227 -0
- package/dist/helper/content-tracker.js.map +1 -0
- package/dist/helper/count-helper.d.ts +33 -0
- package/dist/helper/count-helper.js +140 -0
- package/dist/helper/count-helper.js.map +1 -0
- package/dist/helper/css-style-parser.d.ts +52 -0
- package/dist/helper/css-style-parser.js +246 -0
- package/dist/helper/css-style-parser.js.map +1 -0
- package/dist/helper/file-helper.d.ts +36 -0
- package/dist/helper/file-helper.js +150 -0
- package/dist/helper/file-helper.js.map +1 -0
- package/dist/helper/general-helper.d.ts +6 -0
- package/dist/helper/general-helper.js +34 -0
- package/dist/helper/general-helper.js.map +1 -0
- package/dist/helper/generate/generate-pptxgenjs.d.ts +37 -0
- package/dist/helper/generate/generate-pptxgenjs.js +134 -0
- package/dist/helper/generate/generate-pptxgenjs.js.map +1 -0
- package/dist/helper/html-to-multitext-helper.d.ts +84 -0
- package/dist/helper/html-to-multitext-helper.js +490 -0
- package/dist/helper/html-to-multitext-helper.js.map +1 -0
- package/dist/helper/hyperlink-processor.d.ts +54 -0
- package/dist/helper/hyperlink-processor.js +289 -0
- package/dist/helper/hyperlink-processor.js.map +1 -0
- package/dist/helper/image-dimensions.d.ts +21 -0
- package/dist/helper/image-dimensions.js +202 -0
- package/dist/helper/image-dimensions.js.map +1 -0
- package/dist/helper/jszip-helper.d.ts +21 -0
- package/dist/helper/jszip-helper.js +162 -0
- package/dist/helper/jszip-helper.js.map +1 -0
- package/dist/helper/layout-index.d.ts +55 -0
- package/dist/helper/layout-index.js +155 -0
- package/dist/helper/layout-index.js.map +1 -0
- package/dist/helper/logger.d.ts +53 -0
- package/dist/helper/logger.js +73 -0
- package/dist/helper/logger.js.map +1 -0
- package/dist/helper/media-deduplicator.d.ts +42 -0
- package/dist/helper/media-deduplicator.js +88 -0
- package/dist/helper/media-deduplicator.js.map +1 -0
- package/dist/helper/modify-background-helper.d.ts +19 -0
- package/dist/helper/modify-background-helper.js +59 -0
- package/dist/helper/modify-background-helper.js.map +1 -0
- package/dist/helper/modify-chart-helper.d.ts +159 -0
- package/dist/helper/modify-chart-helper.js +642 -0
- package/dist/helper/modify-chart-helper.js.map +1 -0
- package/dist/helper/modify-cleanup-helper.d.ts +69 -0
- package/dist/helper/modify-cleanup-helper.js +343 -0
- package/dist/helper/modify-cleanup-helper.js.map +1 -0
- package/dist/helper/modify-color-helper.d.ts +35 -0
- package/dist/helper/modify-color-helper.js +211 -0
- package/dist/helper/modify-color-helper.js.map +1 -0
- package/dist/helper/modify-helper.d.ts +23 -0
- package/dist/helper/modify-helper.js +61 -0
- package/dist/helper/modify-helper.js.map +1 -0
- package/dist/helper/modify-hyperlink-element.d.ts +9 -0
- package/dist/helper/modify-hyperlink-element.js +34 -0
- package/dist/helper/modify-hyperlink-element.js.map +1 -0
- package/dist/helper/modify-hyperlink-helper.d.ts +42 -0
- package/dist/helper/modify-hyperlink-helper.js +258 -0
- package/dist/helper/modify-hyperlink-helper.js.map +1 -0
- package/dist/helper/modify-image-helper.d.ts +23 -0
- package/dist/helper/modify-image-helper.js +157 -0
- package/dist/helper/modify-image-helper.js.map +1 -0
- package/dist/helper/modify-presentation-helper.d.ts +55 -0
- package/dist/helper/modify-presentation-helper.js +177 -0
- package/dist/helper/modify-presentation-helper.js.map +1 -0
- package/dist/helper/modify-shape-helper.d.ts +111 -0
- package/dist/helper/modify-shape-helper.js +340 -0
- package/dist/helper/modify-shape-helper.js.map +1 -0
- package/dist/helper/modify-table-helper.d.ts +11 -0
- package/dist/helper/modify-table-helper.js +100 -0
- package/dist/helper/modify-table-helper.js.map +1 -0
- package/dist/helper/modify-text-helper.d.ts +62 -0
- package/dist/helper/modify-text-helper.js +244 -0
- package/dist/helper/modify-text-helper.js.map +1 -0
- package/dist/helper/modify-xml-helper.d.ts +52 -0
- package/dist/helper/modify-xml-helper.js +305 -0
- package/dist/helper/modify-xml-helper.js.map +1 -0
- package/dist/helper/multitext-helper.d.ts +116 -0
- package/dist/helper/multitext-helper.js +462 -0
- package/dist/helper/multitext-helper.js.map +1 -0
- package/dist/helper/ppt-paths.d.ts +76 -0
- package/dist/helper/ppt-paths.js +116 -0
- package/dist/helper/ppt-paths.js.map +1 -0
- package/dist/helper/shape-type-detector.d.ts +34 -0
- package/dist/helper/shape-type-detector.js +99 -0
- package/dist/helper/shape-type-detector.js.map +1 -0
- package/dist/helper/text-replace-helper.d.ts +30 -0
- package/dist/helper/text-replace-helper.js +147 -0
- package/dist/helper/text-replace-helper.js.map +1 -0
- package/dist/helper/xml/lnLRTB.d.ts +1 -0
- package/dist/helper/xml/lnLRTB.js +62 -0
- package/dist/helper/xml/lnLRTB.js.map +1 -0
- package/dist/helper/xml/prstGeom.d.ts +1 -0
- package/dist/helper/xml/prstGeom.js +11 -0
- package/dist/helper/xml/prstGeom.js.map +1 -0
- package/dist/helper/xml-elements.d.ts +134 -0
- package/dist/helper/xml-elements.js +538 -0
- package/dist/helper/xml-elements.js.map +1 -0
- package/dist/helper/xml-helper.d.ts +120 -0
- package/dist/helper/xml-helper.js +495 -0
- package/dist/helper/xml-helper.js.map +1 -0
- package/dist/helper/xml-placeholder-helper.d.ts +92 -0
- package/dist/helper/xml-placeholder-helper.js +454 -0
- package/dist/helper/xml-placeholder-helper.js.map +1 -0
- package/dist/helper/xml-pretty-print.d.ts +17 -0
- package/dist/helper/xml-pretty-print.js +88 -0
- package/dist/helper/xml-pretty-print.js.map +1 -0
- package/dist/helper/xml-relationship-helper.d.ts +103 -0
- package/dist/helper/xml-relationship-helper.js +397 -0
- package/dist/helper/xml-relationship-helper.js.map +1 -0
- package/dist/helper/xml-slide-helper.d.ts +107 -0
- package/dist/helper/xml-slide-helper.js +676 -0
- package/dist/helper/xml-slide-helper.js.map +1 -0
- package/dist/helper/xml-template-helper.d.ts +42 -0
- package/dist/helper/xml-template-helper.js +252 -0
- package/dist/helper/xml-template-helper.js.map +1 -0
- package/dist/helper/xmldom-sax-patch.d.ts +18 -0
- package/dist/helper/xmldom-sax-patch.js +58 -0
- package/dist/helper/xmldom-sax-patch.js.map +1 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +177 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/iarchive.d.ts +43 -0
- package/dist/interfaces/iarchive.js +3 -0
- package/dist/interfaces/iarchive.js.map +1 -0
- package/dist/interfaces/ichart.d.ts +7 -0
- package/dist/interfaces/ichart.js +3 -0
- package/dist/interfaces/ichart.js.map +1 -0
- package/dist/interfaces/icounter.d.ts +7 -0
- package/dist/interfaces/icounter.js +3 -0
- package/dist/interfaces/icounter.js.map +1 -0
- package/dist/interfaces/igenerator.d.ts +4 -0
- package/dist/interfaces/igenerator.js +3 -0
- package/dist/interfaces/igenerator.js.map +1 -0
- package/dist/interfaces/iimage.d.ts +7 -0
- package/dist/interfaces/iimage.js +3 -0
- package/dist/interfaces/iimage.js.map +1 -0
- package/dist/interfaces/ilayout.d.ts +14 -0
- package/dist/interfaces/ilayout.js +3 -0
- package/dist/interfaces/ilayout.js.map +1 -0
- package/dist/interfaces/imaster.d.ts +15 -0
- package/dist/interfaces/imaster.js +3 -0
- package/dist/interfaces/imaster.js.map +1 -0
- package/dist/interfaces/imulti-text.d.ts +50 -0
- package/dist/interfaces/imulti-text.js +3 -0
- package/dist/interfaces/imulti-text.js.map +1 -0
- package/dist/interfaces/ipptxgenjs-slide.d.ts +40 -0
- package/dist/interfaces/ipptxgenjs-slide.js +3 -0
- package/dist/interfaces/ipptxgenjs-slide.js.map +1 -0
- package/dist/interfaces/ipresentation-props.d.ts +16 -0
- package/dist/interfaces/ipresentation-props.js +3 -0
- package/dist/interfaces/ipresentation-props.js.map +1 -0
- package/dist/interfaces/ishape-action.d.ts +18 -0
- package/dist/interfaces/ishape-action.js +3 -0
- package/dist/interfaces/ishape-action.js.map +1 -0
- package/dist/interfaces/ishape.d.ts +5 -0
- package/dist/interfaces/ishape.js +3 -0
- package/dist/interfaces/ishape.js.map +1 -0
- package/dist/interfaces/islide.d.ts +71 -0
- package/dist/interfaces/islide.js +3 -0
- package/dist/interfaces/islide.js.map +1 -0
- package/dist/interfaces/itemplate.d.ts +9 -0
- package/dist/interfaces/itemplate.js +3 -0
- package/dist/interfaces/itemplate.js.map +1 -0
- package/dist/interfaces/pres-template.d.ts +9 -0
- package/dist/interfaces/pres-template.js +3 -0
- package/dist/interfaces/pres-template.js.map +1 -0
- package/dist/interfaces/root-pres-template.d.ts +38 -0
- package/dist/interfaces/root-pres-template.js +3 -0
- package/dist/interfaces/root-pres-template.js.map +1 -0
- package/dist/modify/modify-chart.d.ts +74 -0
- package/dist/modify/modify-chart.js +753 -0
- package/dist/modify/modify-chart.js.map +1 -0
- package/dist/modify/modify-table.d.ts +64 -0
- package/dist/modify/modify-table.js +435 -0
- package/dist/modify/modify-table.js.map +1 -0
- package/dist/shapes/chart.d.ts +91 -0
- package/dist/shapes/chart.js +437 -0
- package/dist/shapes/chart.js.map +1 -0
- package/dist/shapes/diagram.d.ts +33 -0
- package/dist/shapes/diagram.js +167 -0
- package/dist/shapes/diagram.js.map +1 -0
- package/dist/shapes/generic.d.ts +27 -0
- package/dist/shapes/generic.js +118 -0
- package/dist/shapes/generic.js.map +1 -0
- package/dist/shapes/hyperlink.d.ts +27 -0
- package/dist/shapes/hyperlink.js +193 -0
- package/dist/shapes/hyperlink.js.map +1 -0
- package/dist/shapes/image.d.ts +47 -0
- package/dist/shapes/image.js +244 -0
- package/dist/shapes/image.js.map +1 -0
- package/dist/shapes/ole.d.ts +30 -0
- package/dist/shapes/ole.js +237 -0
- package/dist/shapes/ole.js.map +1 -0
- package/dist/types/chart-types.d.ts +115 -0
- package/dist/types/chart-types.js +3 -0
- package/dist/types/chart-types.js.map +1 -0
- package/dist/types/modify-types.d.ts +128 -0
- package/dist/types/modify-types.js +3 -0
- package/dist/types/modify-types.js.map +1 -0
- package/dist/types/shape-types.d.ts +40 -0
- package/dist/types/shape-types.js +3 -0
- package/dist/types/shape-types.js.map +1 -0
- package/dist/types/table-types.d.ts +38 -0
- package/dist/types/table-types.js +3 -0
- package/dist/types/table-types.js.map +1 -0
- package/dist/types/types.d.ts +317 -0
- package/dist/types/types.js +16 -0
- package/dist/types/types.js.map +1 -0
- package/dist/types/xml-types.d.ts +168 -0
- package/dist/types/xml-types.js +3 -0
- package/dist/types/xml-types.js.map +1 -0
- package/package.json +92 -4
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.OutputTemplate = exports.SourceTemplate = exports.Template = void 0;
|
|
46
|
+
const file_helper_1 = require("../helper/file-helper");
|
|
47
|
+
const content_tracker_1 = require("../helper/content-tracker");
|
|
48
|
+
const count_helper_1 = require("../helper/count-helper");
|
|
49
|
+
const xml_template_helper_1 = require("../helper/xml-template-helper");
|
|
50
|
+
const xml_helper_1 = require("../helper/xml-helper");
|
|
51
|
+
const ppt_paths_1 = require("../helper/ppt-paths");
|
|
52
|
+
const media_deduplicator_1 = require("../helper/media-deduplicator");
|
|
53
|
+
const constants_1 = require("../constants/constants");
|
|
54
|
+
/**
|
|
55
|
+
* Shared base for the two template roles: a source template provides
|
|
56
|
+
* importable slides and shapes (`SourceTemplate`), the root template is the
|
|
57
|
+
* output presentation everything is written into (`OutputTemplate`).
|
|
58
|
+
*/
|
|
59
|
+
class Template {
|
|
60
|
+
constructor(file, params) {
|
|
61
|
+
this.file = file;
|
|
62
|
+
this.archive = file_helper_1.FileHelper.importArchive(file, params);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Factory: `params.name` decides the role — a named template is a source
|
|
66
|
+
* template containing importable slides; an unnamed one is the root
|
|
67
|
+
* (output) template.
|
|
68
|
+
*/
|
|
69
|
+
static import(file, params, automizer) {
|
|
70
|
+
if (params.name) {
|
|
71
|
+
return new SourceTemplate(file, params);
|
|
72
|
+
}
|
|
73
|
+
return new OutputTemplate(file, params, automizer);
|
|
74
|
+
}
|
|
75
|
+
getSlideIdList() {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
return xml_helper_1.XmlHelper.getXmlFromArchive(this.archive, ppt_paths_1.PptPaths.presentation);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.Template = Template;
|
|
82
|
+
/**
|
|
83
|
+
* A loaded .pptx used as a source of slides, masters and shapes
|
|
84
|
+
* (`Automizer.load()`). Identified by its alias `name`.
|
|
85
|
+
*/
|
|
86
|
+
class SourceTemplate extends Template {
|
|
87
|
+
constructor(file, params) {
|
|
88
|
+
super(file, params);
|
|
89
|
+
this.name = params.name;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Returns the slide numbers of a given template as a sorted array of integers.
|
|
93
|
+
* @returns {Promise<number[]>} - A promise that resolves to a sorted array of slide numbers in the template.
|
|
94
|
+
*/
|
|
95
|
+
getAllSlideNumbers() {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
try {
|
|
98
|
+
const xmlTemplateHelper = new xml_template_helper_1.XmlTemplateHelper(this.archive);
|
|
99
|
+
this.slideNumbers = yield xmlTemplateHelper.getAllSlideNumbers();
|
|
100
|
+
return this.slideNumbers;
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
throw new Error(error.message, { cause: error });
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
setCreationIds() {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
const xmlTemplateHelper = new xml_template_helper_1.XmlTemplateHelper(this.archive);
|
|
110
|
+
this.creationIds = yield xmlTemplateHelper.getCreationIds();
|
|
111
|
+
return this.creationIds;
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.SourceTemplate = SourceTemplate;
|
|
116
|
+
/**
|
|
117
|
+
* The root template: the output presentation that slides, masters and media
|
|
118
|
+
* are appended to (`Automizer.loadRoot()`).
|
|
119
|
+
*/
|
|
120
|
+
class OutputTemplate extends Template {
|
|
121
|
+
constructor(file, params, automizer) {
|
|
122
|
+
var _a;
|
|
123
|
+
super(file, params);
|
|
124
|
+
/**
|
|
125
|
+
* Array containing all slides coming from Automizer.addSlide()
|
|
126
|
+
* @type: ISlide[]
|
|
127
|
+
*/
|
|
128
|
+
this.slides = [];
|
|
129
|
+
/**
|
|
130
|
+
* Array containing all slideMasters coming from Automizer.addMaster()
|
|
131
|
+
* @type: IMaster[]
|
|
132
|
+
*/
|
|
133
|
+
this.masters = [];
|
|
134
|
+
/**
|
|
135
|
+
* Layouts of the root template queued for in-place modification
|
|
136
|
+
* (`Automizer.modifyLayout`).
|
|
137
|
+
*/
|
|
138
|
+
this.layouts = [];
|
|
139
|
+
this.contentMap = [];
|
|
140
|
+
this.mediaFiles = [];
|
|
141
|
+
this.automizer = automizer;
|
|
142
|
+
this.counter = [
|
|
143
|
+
new count_helper_1.CountHelper('slides', this),
|
|
144
|
+
new count_helper_1.CountHelper('charts', this),
|
|
145
|
+
new count_helper_1.CountHelper('images', this),
|
|
146
|
+
new count_helper_1.CountHelper('diagrams', this),
|
|
147
|
+
new count_helper_1.CountHelper('masters', this),
|
|
148
|
+
new count_helper_1.CountHelper('layouts', this),
|
|
149
|
+
new count_helper_1.CountHelper('themes', this),
|
|
150
|
+
new count_helper_1.CountHelper('oleObjects', this),
|
|
151
|
+
];
|
|
152
|
+
this.content = (_a = automizer === null || automizer === void 0 ? void 0 : automizer.content) !== null && _a !== void 0 ? _a : new content_tracker_1.ContentTracker();
|
|
153
|
+
this.archive.contentTracker = this.content;
|
|
154
|
+
this.mediaDeduplicator = new media_deduplicator_1.MediaDeduplicator(this.archive);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* The root template in the role of a source template, sharing this
|
|
158
|
+
* archive: masters and layouts modified in place read their shapes from
|
|
159
|
+
* it (`Automizer.modifyMaster` / `modifyLayout`). Its alias is `'root'`.
|
|
160
|
+
*/
|
|
161
|
+
asSourceTemplate() {
|
|
162
|
+
if (!this.sourceView) {
|
|
163
|
+
this.sourceView = {
|
|
164
|
+
name: constants_1.ROOT_TEMPLATE_ALIAS,
|
|
165
|
+
location: this.location,
|
|
166
|
+
file: this.file,
|
|
167
|
+
archive: this.archive,
|
|
168
|
+
useCreationIds: false,
|
|
169
|
+
getSlideIdList: () => this.getSlideIdList(),
|
|
170
|
+
setCreationIds: () => __awaiter(this, void 0, void 0, function* () { return []; }),
|
|
171
|
+
getAllSlideNumbers: () => new xml_template_helper_1.XmlTemplateHelper(this.archive).getAllSlideNumbers(),
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
return this.sourceView;
|
|
175
|
+
}
|
|
176
|
+
mapContents(type, key, sourceId, targetId, name) {
|
|
177
|
+
this.contentMap.push({
|
|
178
|
+
type,
|
|
179
|
+
key,
|
|
180
|
+
sourceId,
|
|
181
|
+
targetId,
|
|
182
|
+
name,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
getNamedMappedContent(type, name) {
|
|
186
|
+
return this.contentMap.find((map) => map.type === type && map.name === name);
|
|
187
|
+
}
|
|
188
|
+
getMappedContent(type, key, sourceId) {
|
|
189
|
+
return this.contentMap.find((map) => map.type === type && map.key === key && map.sourceId === sourceId);
|
|
190
|
+
}
|
|
191
|
+
appendMasterSlide(slideMaster) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
if (this.counter[0].get() === undefined) {
|
|
194
|
+
yield this.initializeCounter();
|
|
195
|
+
}
|
|
196
|
+
yield slideMaster.append(this).catch((e) => {
|
|
197
|
+
throw e;
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
appendSlide(slide) {
|
|
202
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
203
|
+
if (this.counter[0].get() === undefined) {
|
|
204
|
+
yield this.initializeCounter();
|
|
205
|
+
}
|
|
206
|
+
yield slide.append(this).catch((e) => {
|
|
207
|
+
throw e;
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
appendLayout(slideLayout) {
|
|
212
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
213
|
+
if (this.counter[0].get() === undefined) {
|
|
214
|
+
yield this.initializeCounter();
|
|
215
|
+
}
|
|
216
|
+
yield slideLayout.append(this).catch((e) => {
|
|
217
|
+
throw e;
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
countExistingSlides() {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
const xml = yield this.getSlideIdList();
|
|
224
|
+
const sldIdLst = xml.getElementsByTagName('p:sldIdLst');
|
|
225
|
+
if (sldIdLst.length > 0) {
|
|
226
|
+
const existingSlides = sldIdLst[0].getElementsByTagName('p:sldId');
|
|
227
|
+
this.existingSlides = existingSlides.length;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Remove the slides that came with the root template from the presentation,
|
|
233
|
+
* keeping the slides added by automizer. Used by `removeExistingSlides`.
|
|
234
|
+
*
|
|
235
|
+
* Along with the `p:sldId` entries, the corresponding relationships in
|
|
236
|
+
* ppt/_rels/presentation.xml.rels are dropped: a slide part that is still
|
|
237
|
+
* related to the presentation counts as a slide for anything reading the
|
|
238
|
+
* output (including automizer's own `getInfo()`), even if it is not listed
|
|
239
|
+
* in `p:sldIdLst` (see #166). The slide parts themselves are removed by
|
|
240
|
+
* `ModifyPresentationHelper.removeUnusedFiles` if `cleanup` is enabled.
|
|
241
|
+
*/
|
|
242
|
+
truncate() {
|
|
243
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
244
|
+
if (this.existingSlides > 0) {
|
|
245
|
+
const xml = yield this.getSlideIdList();
|
|
246
|
+
const existingSlides = xml.getElementsByTagName('p:sldId');
|
|
247
|
+
const removedRelIds = [];
|
|
248
|
+
const removeCount = Math.min(this.existingSlides, existingSlides.length);
|
|
249
|
+
for (let i = 0; i < removeCount; i++) {
|
|
250
|
+
removedRelIds.push(existingSlides[i].getAttribute('r:id'));
|
|
251
|
+
}
|
|
252
|
+
xml_helper_1.XmlHelper.sliceCollection(existingSlides, this.existingSlides, 0);
|
|
253
|
+
xml_helper_1.XmlHelper.writeXmlToArchive(this.archive, ppt_paths_1.PptPaths.presentation, xml);
|
|
254
|
+
yield this.removeSlideRelations(removedRelIds);
|
|
255
|
+
// The slides counter was initialized before appending and still
|
|
256
|
+
// includes the removed slides.
|
|
257
|
+
count_helper_1.CountHelper.decrement('slides', this.counter, removeCount);
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Remove the given relationship ids from ppt/_rels/presentation.xml.rels.
|
|
263
|
+
*/
|
|
264
|
+
removeSlideRelations(removedRelIds) {
|
|
265
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
266
|
+
if (!removedRelIds.length) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
yield xml_helper_1.XmlHelper.removeIf({
|
|
270
|
+
archive: this.archive,
|
|
271
|
+
file: ppt_paths_1.PptPaths.presentationRels,
|
|
272
|
+
tag: 'Relationship',
|
|
273
|
+
clause: (xml, element) => removedRelIds.includes(element.getAttribute('Id')),
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
initializeCounter() {
|
|
278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
for (const c of this.counter) {
|
|
280
|
+
yield c.set();
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
incrementCounter(name) {
|
|
285
|
+
return count_helper_1.CountHelper.increment(name, this.counter);
|
|
286
|
+
}
|
|
287
|
+
count(name) {
|
|
288
|
+
return count_helper_1.CountHelper.count(name, this.counter);
|
|
289
|
+
}
|
|
290
|
+
runExternalGenerator() {
|
|
291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
+
const requiresGenerator = this.slides.some((slide) => slide.getGeneratedElements().length > 0);
|
|
293
|
+
if (!requiresGenerator) {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
// Lazy import: pptxgenjs is a heavy dependency that pure
|
|
297
|
+
// "modify existing pptx" runs never need.
|
|
298
|
+
const { default: GeneratePptxGenJs } = yield Promise.resolve().then(() => __importStar(require('../helper/generate/generate-pptxgenjs')));
|
|
299
|
+
this.generator = new GeneratePptxGenJs(this.automizer, this.slides);
|
|
300
|
+
yield this.generator.generateSlides();
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
cleanupExternalGenerator() {
|
|
304
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
305
|
+
var _a;
|
|
306
|
+
yield ((_a = this.generator) === null || _a === void 0 ? void 0 : _a.cleanup());
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
exports.OutputTemplate = OutputTemplate;
|
|
311
|
+
//# sourceMappingURL=template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../src/classes/template.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAmD;AACnD,+DAA2D;AAC3D,yDAAqD;AAMrD,uEAAkE;AAElE,qDAAiD;AACjD,mDAA+C;AAC/C,qEAAiE;AAQjE,sDAA6D;AAE7D;;;;GAIG;AACH,MAAsB,QAAQ;IAkB5B,YAAsB,IAAmB,EAAE,MAAqB;QAC9D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,wBAAU,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxD,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,MAAM,CACX,IAAmB,EACnB,MAAqB,EACrB,SAAqB;QAErB,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YAChB,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;IAEK,cAAc;;YAClB,OAAO,sBAAS,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,oBAAQ,CAA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QAC3B,OAAO,0BAAW,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,IAAY;QAChB,OAAO,0BAAW,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAEK,oBAAoB;;YACxB,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CACxC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,oBAAoB,EAAE,CAAC,MAAM,GAAG,CAAC,CACnD,CAAC;YACF,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACvB,OAAO;YACT,CAAC;YAED,yDAAyD;YACzD,0CAA0C;YAC1C,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,GAAG,wDACrC,uCAAuC,GACxC,CAAC;YACF,IAAI,CAAC,SAAS,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YACpE,MAAM,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC;QACxC,CAAC;KAAA;IAEK,wBAAwB;;;YAC5B,MAAM,CAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,OAAO,EAAE,CAAA,CAAC;QAClC,CAAC;KAAA;CACF;AAnPD,wCAmPC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TargetByRelIdMapParam, TrackedRelation, TrackedRelationTag } from '../types/types';
|
|
2
|
+
/**
|
|
3
|
+
* Template alias under which the root (output) template acts as the source
|
|
4
|
+
* of its own masters and layouts (`Automizer.modifyMaster` /
|
|
5
|
+
* `modifyLayout`).
|
|
6
|
+
*/
|
|
7
|
+
export declare const ROOT_TEMPLATE_ALIAS = "root";
|
|
8
|
+
export declare const TargetByRelIdMap: Record<string, TargetByRelIdMapParam>;
|
|
9
|
+
export declare const imagesTrack: () => TrackedRelation[];
|
|
10
|
+
export declare const hyperlinksTrack: () => TrackedRelation[];
|
|
11
|
+
export declare const contentTrack: () => TrackedRelationTag[];
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.contentTrack = exports.hyperlinksTrack = exports.imagesTrack = exports.TargetByRelIdMap = exports.ROOT_TEMPLATE_ALIAS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Template alias under which the root (output) template acts as the source
|
|
6
|
+
* of its own masters and layouts (`Automizer.modifyMaster` /
|
|
7
|
+
* `modifyLayout`).
|
|
8
|
+
*/
|
|
9
|
+
exports.ROOT_TEMPLATE_ALIAS = 'root';
|
|
10
|
+
exports.TargetByRelIdMap = {
|
|
11
|
+
chart: {
|
|
12
|
+
relRootTag: 'c:chart',
|
|
13
|
+
relAttribute: 'r:id',
|
|
14
|
+
prefix: '../charts/chart',
|
|
15
|
+
},
|
|
16
|
+
chartEx: {
|
|
17
|
+
relRootTag: 'cx:chart',
|
|
18
|
+
relAttribute: 'r:id',
|
|
19
|
+
prefix: '../charts/chartEx',
|
|
20
|
+
},
|
|
21
|
+
diagram: {
|
|
22
|
+
relRootTag: 'dgm:relIds',
|
|
23
|
+
relAttribute: 'r:dm',
|
|
24
|
+
prefix: '../diagrams/data',
|
|
25
|
+
},
|
|
26
|
+
image: {
|
|
27
|
+
relRootTag: 'a:blip',
|
|
28
|
+
relAttribute: 'r:embed',
|
|
29
|
+
prefix: '../media/image',
|
|
30
|
+
},
|
|
31
|
+
'image:svg': {
|
|
32
|
+
relRootTag: 'asvg:svgBlip',
|
|
33
|
+
relAttribute: 'r:embed',
|
|
34
|
+
prefix: '../media/image',
|
|
35
|
+
},
|
|
36
|
+
'image:media': {
|
|
37
|
+
relRootTag: 'p14:media',
|
|
38
|
+
relAttribute: 'r:embed',
|
|
39
|
+
relType: 'http://schemas.microsoft.com/office/2007/relationships/media',
|
|
40
|
+
prefix: '../media/media',
|
|
41
|
+
findAll: true,
|
|
42
|
+
},
|
|
43
|
+
'image:audioFile': {
|
|
44
|
+
relRootTag: 'a:audioFile',
|
|
45
|
+
relAttribute: 'r:link',
|
|
46
|
+
prefix: '../media/media',
|
|
47
|
+
relType: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio',
|
|
48
|
+
findAll: true,
|
|
49
|
+
},
|
|
50
|
+
'image:videoFile': {
|
|
51
|
+
relRootTag: 'a:videoFile',
|
|
52
|
+
relAttribute: 'r:link',
|
|
53
|
+
prefix: '../media/media',
|
|
54
|
+
relType: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/video',
|
|
55
|
+
findAll: true,
|
|
56
|
+
},
|
|
57
|
+
hyperlink: {
|
|
58
|
+
relRootTag: 'a:hlinkClick',
|
|
59
|
+
relAttribute: 'r:id',
|
|
60
|
+
prefix: '',
|
|
61
|
+
findAll: true,
|
|
62
|
+
},
|
|
63
|
+
oleObject: {
|
|
64
|
+
relRootTag: 'p:oleObj',
|
|
65
|
+
relAttribute: 'r:id',
|
|
66
|
+
prefix: '../embeddings/oleObject',
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
const imagesTrack = () => [
|
|
70
|
+
{
|
|
71
|
+
type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image',
|
|
72
|
+
tag: 'a:blip',
|
|
73
|
+
role: 'image',
|
|
74
|
+
attribute: 'r:embed',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image',
|
|
78
|
+
tag: 'asvg:svgBlip',
|
|
79
|
+
role: 'image',
|
|
80
|
+
attribute: 'r:embed',
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
exports.imagesTrack = imagesTrack;
|
|
84
|
+
const hyperlinksTrack = () => [
|
|
85
|
+
{
|
|
86
|
+
type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink',
|
|
87
|
+
tag: 'a:hlinkClick',
|
|
88
|
+
role: 'hyperlink',
|
|
89
|
+
attribute: 'r:id',
|
|
90
|
+
},
|
|
91
|
+
];
|
|
92
|
+
exports.hyperlinksTrack = hyperlinksTrack;
|
|
93
|
+
const contentTrack = () => {
|
|
94
|
+
return [
|
|
95
|
+
{
|
|
96
|
+
source: 'ppt/presentation.xml',
|
|
97
|
+
relationsKey: 'ppt/_rels/presentation.xml.rels',
|
|
98
|
+
tags: [
|
|
99
|
+
{
|
|
100
|
+
type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster',
|
|
101
|
+
tag: 'p:sldMasterId',
|
|
102
|
+
role: 'slideMaster',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide',
|
|
106
|
+
tag: 'p:sldId',
|
|
107
|
+
role: 'slide',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
source: 'ppt/slides',
|
|
113
|
+
relationsKey: 'ppt/slides/_rels',
|
|
114
|
+
isDir: true,
|
|
115
|
+
tags: [
|
|
116
|
+
{
|
|
117
|
+
type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart',
|
|
118
|
+
tag: 'c:chart',
|
|
119
|
+
role: 'chart',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout',
|
|
123
|
+
role: 'slideLayout',
|
|
124
|
+
tag: null,
|
|
125
|
+
},
|
|
126
|
+
...(0, exports.imagesTrack)(),
|
|
127
|
+
...(0, exports.hyperlinksTrack)(),
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
source: 'ppt/charts',
|
|
132
|
+
relationsKey: 'ppt/charts/_rels',
|
|
133
|
+
isDir: true,
|
|
134
|
+
tags: [
|
|
135
|
+
{
|
|
136
|
+
type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/package',
|
|
137
|
+
tag: 'c:externalData',
|
|
138
|
+
role: 'externalData',
|
|
139
|
+
},
|
|
140
|
+
...(0, exports.imagesTrack)(),
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
// chartUserShapes drawings of copied charts; a <cdr:pic> relates to
|
|
145
|
+
// an image through the drawing's own rels (#215).
|
|
146
|
+
source: 'ppt/drawings',
|
|
147
|
+
relationsKey: 'ppt/drawings/_rels',
|
|
148
|
+
isDir: true,
|
|
149
|
+
tags: [...(0, exports.imagesTrack)()],
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
source: 'ppt/slideMasters',
|
|
153
|
+
relationsKey: 'ppt/slideMasters/_rels',
|
|
154
|
+
isDir: true,
|
|
155
|
+
tags: [
|
|
156
|
+
{
|
|
157
|
+
type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout',
|
|
158
|
+
tag: 'p:sldLayoutId',
|
|
159
|
+
role: 'slideLayout',
|
|
160
|
+
},
|
|
161
|
+
...(0, exports.imagesTrack)(),
|
|
162
|
+
...(0, exports.hyperlinksTrack)(),
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
source: 'ppt/slideLayouts',
|
|
167
|
+
relationsKey: 'ppt/slideLayouts/_rels',
|
|
168
|
+
isDir: true,
|
|
169
|
+
tags: [
|
|
170
|
+
{
|
|
171
|
+
type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster',
|
|
172
|
+
role: 'slideMaster',
|
|
173
|
+
tag: null,
|
|
174
|
+
},
|
|
175
|
+
...(0, exports.imagesTrack)(),
|
|
176
|
+
...(0, exports.hyperlinksTrack)(),
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
];
|
|
180
|
+
};
|
|
181
|
+
exports.contentTrack = contentTrack;
|
|
182
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","s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EAAE,kBAAkB;YAChC,KAAK,EAAE,IAAI;YACX,IAAI,EAAE;gBACJ;oBACE,IAAI,EAAE,6EAA6E;oBACnF,GAAG,EAAE,gBAAgB;oBACrB,IAAI,EAAE,cAAc;iBACrB;gBACD,GAAG,IAAA,mBAAW,GAAE;aACjB;SACF;QACD;YACE,oEAAoE;YACpE,kDAAkD;YAClD,MAAM,EAAE,cAAc;YACtB,YAAY,EAAE,oBAAoB;YAClC,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,CAAC,GAAG,IAAA,mBAAW,GAAE,CAAC;SACzB;QACD;YACE,MAAM,EAAE,kBAAkB;YAC1B,YAAY,EAAE,wBAAwB;YACtC,KAAK,EAAE,IAAI;YACX,IAAI,EAAE;gBACJ;oBACE,IAAI,EAAE,iFAAiF;oBACvF,GAAG,EAAE,eAAe;oBACpB,IAAI,EAAE,aAAa;iBACpB;gBACD,GAAG,IAAA,mBAAW,GAAE;gBAChB,GAAG,IAAA,uBAAe,GAAE;aACrB;SACF;QACD;YACE,MAAM,EAAE,kBAAkB;YAC1B,YAAY,EAAE,wBAAwB;YACtC,KAAK,EAAE,IAAI;YACX,IAAI,EAAE;gBACJ;oBACE,IAAI,EAAE,iFAAiF;oBACvF,IAAI,EAAE,aAAa;oBACnB,GAAG,EAAE,IAAI;iBACV;gBACD,GAAG,IAAA,mBAAW,GAAE;gBAChB,GAAG,IAAA,uBAAe,GAAE;aACrB;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAvFW,QAAA,YAAY,gBAuFvB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LabelPosition = void 0;
|
|
4
|
+
var LabelPosition;
|
|
5
|
+
(function (LabelPosition) {
|
|
6
|
+
LabelPosition["BestFit"] = "bestFit";
|
|
7
|
+
LabelPosition["Bottom"] = "b";
|
|
8
|
+
LabelPosition["Center"] = "ctr";
|
|
9
|
+
LabelPosition["InsideEnd"] = "inEnd";
|
|
10
|
+
LabelPosition["InsideBase"] = "inBase";
|
|
11
|
+
LabelPosition["Left"] = "l";
|
|
12
|
+
LabelPosition["OutsideEnd"] = "outEnd";
|
|
13
|
+
LabelPosition["Right"] = "r";
|
|
14
|
+
LabelPosition["Top"] = "t";
|
|
15
|
+
})(LabelPosition || (exports.LabelPosition = LabelPosition = {}));
|
|
16
|
+
//# sourceMappingURL=chart-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-type.js","sourceRoot":"","sources":["../../src/enums/chart-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAUX;AAVD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,6BAAY,CAAA;IACZ,+BAAc,CAAA;IACd,oCAAmB,CAAA;IACnB,sCAAqB,CAAA;IACrB,2BAAU,CAAA;IACV,sCAAqB,CAAA;IACrB,4BAAW,CAAA;IACX,0BAAS,CAAA;AACX,CAAC,EAVW,aAAa,6BAAb,aAAa,QAUxB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum ContentTypeMap {
|
|
2
|
+
jpg = "image/jpeg",
|
|
3
|
+
jpeg = "image/jpeg",
|
|
4
|
+
png = "image/png",
|
|
5
|
+
gif = "image/gif",
|
|
6
|
+
svg = "image/svg+xml",
|
|
7
|
+
mp3 = "audio/mp3",
|
|
8
|
+
m4v = "video/mp4",
|
|
9
|
+
mp4 = "video/mp4",
|
|
10
|
+
emf = "image/x-emf",
|
|
11
|
+
wdp = "image/vnd.ms-photo",
|
|
12
|
+
xml = "application/xml",
|
|
13
|
+
bin = "application/vnd.openxmlformats-officedocument.oleObject",
|
|
14
|
+
vml = "application/vnd.openxmlformats-officedocument.vmlDrawing"
|
|
15
|
+
}
|
|
16
|
+
export type ContentTypeExtension = keyof typeof ContentTypeMap;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContentTypeMap = void 0;
|
|
4
|
+
var ContentTypeMap;
|
|
5
|
+
(function (ContentTypeMap) {
|
|
6
|
+
ContentTypeMap["jpg"] = "image/jpeg";
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values -- extension alias
|
|
8
|
+
ContentTypeMap["jpeg"] = "image/jpeg";
|
|
9
|
+
ContentTypeMap["png"] = "image/png";
|
|
10
|
+
ContentTypeMap["gif"] = "image/gif";
|
|
11
|
+
ContentTypeMap["svg"] = "image/svg+xml";
|
|
12
|
+
ContentTypeMap["mp3"] = "audio/mp3";
|
|
13
|
+
ContentTypeMap["m4v"] = "video/mp4";
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values -- extension alias
|
|
15
|
+
ContentTypeMap["mp4"] = "video/mp4";
|
|
16
|
+
ContentTypeMap["emf"] = "image/x-emf";
|
|
17
|
+
ContentTypeMap["wdp"] = "image/vnd.ms-photo";
|
|
18
|
+
// This is required to support think-cell contents
|
|
19
|
+
ContentTypeMap["xml"] = "application/xml";
|
|
20
|
+
ContentTypeMap["bin"] = "application/vnd.openxmlformats-officedocument.oleObject";
|
|
21
|
+
ContentTypeMap["vml"] = "application/vnd.openxmlformats-officedocument.vmlDrawing";
|
|
22
|
+
})(ContentTypeMap || (exports.ContentTypeMap = ContentTypeMap = {}));
|
|
23
|
+
//# sourceMappingURL=content-type-map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-type-map.js","sourceRoot":"","sources":["../../src/enums/content-type-map.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAkBX;AAlBD,WAAY,cAAc;IACxB,oCAAkB,CAAA;IAClB,0FAA0F;IAC1F,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,uCAAqB,CAAA;IACrB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,0FAA0F;IAC1F,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;IACnB,4CAA0B,CAAA;IAE1B,kDAAkD;IAClD,yCAAuB,CAAA;IACvB,iFAA+D,CAAA;IAC/D,kFAAgE,CAAA;AAClE,CAAC,EAlBW,cAAc,8BAAd,cAAc,QAkBzB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum ElementType {
|
|
2
|
+
Chart = "Chart",
|
|
3
|
+
Image = "Image",
|
|
4
|
+
Diagram = "Diagram",
|
|
5
|
+
Shape = "Generic",
|
|
6
|
+
OLEObject = "OLEObject",
|
|
7
|
+
Hyperlink = "Hyperlink"
|
|
8
|
+
}
|
|
9
|
+
export declare enum ElementSubtype {
|
|
10
|
+
chart = "chart",
|
|
11
|
+
chartEx = "chartEx",
|
|
12
|
+
oleObject = "oleObject",
|
|
13
|
+
hyperlink = "hyperlink"
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ElementSubtype = exports.ElementType = void 0;
|
|
4
|
+
var ElementType;
|
|
5
|
+
(function (ElementType) {
|
|
6
|
+
ElementType["Chart"] = "Chart";
|
|
7
|
+
ElementType["Image"] = "Image";
|
|
8
|
+
ElementType["Diagram"] = "Diagram";
|
|
9
|
+
ElementType["Shape"] = "Generic";
|
|
10
|
+
ElementType["OLEObject"] = "OLEObject";
|
|
11
|
+
ElementType["Hyperlink"] = "Hyperlink";
|
|
12
|
+
})(ElementType || (exports.ElementType = ElementType = {}));
|
|
13
|
+
var ElementSubtype;
|
|
14
|
+
(function (ElementSubtype) {
|
|
15
|
+
ElementSubtype["chart"] = "chart";
|
|
16
|
+
ElementSubtype["chartEx"] = "chartEx";
|
|
17
|
+
ElementSubtype["oleObject"] = "oleObject";
|
|
18
|
+
ElementSubtype["hyperlink"] = "hyperlink";
|
|
19
|
+
})(ElementSubtype || (exports.ElementSubtype = ElementSubtype = {}));
|
|
20
|
+
//# sourceMappingURL=element-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-type.js","sourceRoot":"","sources":["../../src/enums/element-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,sCAAuB,CAAA;IACvB,sCAAuB,CAAA;AACzB,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB;AAED,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;AACzB,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB"}
|