@harbour-enterprises/superdoc 0.6.63 → 0.6.64
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/chunks/{super-editor.es-ChbpDgxj.js → super-editor.es-C1is8qI1.js} +19 -23
- package/dist/chunks/super-editor.es-C1is8qI1.js.map +1 -0
- package/dist/super-editor/chunks/{converter-DvoY_Ajb.js → converter-B0V53Xck.js} +18 -22
- package/dist/super-editor/chunks/{converter-DvoY_Ajb.js.map → converter-B0V53Xck.js.map} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-BwzO_Kan.js → docx-zipper-CYnCVziT.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-BwzO_Kan.js.map → docx-zipper-CYnCVziT.js.map} +1 -1
- package/dist/super-editor/chunks/{editor-Dlpffdvx.js → editor-DcR2sWNp.js} +4 -4
- package/dist/super-editor/chunks/{editor-Dlpffdvx.js.map → editor-DcR2sWNp.js.map} +1 -1
- package/dist/super-editor/chunks/{toolbar-DJKYESky.js → toolbar-CTHc0BuJ.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-DJKYESky.js.map → toolbar-CTHc0BuJ.js.map} +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/super-converter/SuperConverter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/exporter/commentsExporter.d.ts +2 -2
- package/dist/super-editor/core/super-converter/v2/exporter/commentsExporter.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +19 -23
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +3 -1
- package/dist/chunks/super-editor.es-ChbpDgxj.js.map +0 -1
|
@@ -17372,9 +17372,9 @@ const prepareCommentsXmlFilesForExport = ({
|
|
|
17372
17372
|
defs,
|
|
17373
17373
|
commentsWithParaIds,
|
|
17374
17374
|
exportType,
|
|
17375
|
-
converter
|
|
17376
|
-
relationships = []
|
|
17375
|
+
converter
|
|
17377
17376
|
}) => {
|
|
17377
|
+
const relationships = [];
|
|
17378
17378
|
if (exportType === "clean") {
|
|
17379
17379
|
const documentXml = removeCommentsFilesFromConvertedXml(convertedXml);
|
|
17380
17380
|
return { documentXml, relationships };
|
|
@@ -17668,7 +17668,7 @@ function addNewLinkRelationship(params2, link) {
|
|
|
17668
17668
|
}
|
|
17669
17669
|
function addNewImageRelationship(params2, imagePath) {
|
|
17670
17670
|
const newId = "rId" + generateDocxRandomId();
|
|
17671
|
-
|
|
17671
|
+
const newRel = {
|
|
17672
17672
|
type: "element",
|
|
17673
17673
|
name: "Relationship",
|
|
17674
17674
|
attributes: {
|
|
@@ -17676,7 +17676,8 @@ function addNewImageRelationship(params2, imagePath) {
|
|
|
17676
17676
|
Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
|
|
17677
17677
|
Target: imagePath
|
|
17678
17678
|
}
|
|
17679
|
-
}
|
|
17679
|
+
};
|
|
17680
|
+
params2.relationships.push(newRel);
|
|
17680
17681
|
return newId;
|
|
17681
17682
|
}
|
|
17682
17683
|
function translateList(params2) {
|
|
@@ -20599,7 +20600,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
20599
20600
|
return;
|
|
20600
20601
|
}
|
|
20601
20602
|
}
|
|
20602
|
-
static updateDocumentVersion(docx = this.convertedXml, version = "0.6.
|
|
20603
|
+
static updateDocumentVersion(docx = this.convertedXml, version = "0.6.64") {
|
|
20603
20604
|
const customLocation = "docProps/custom.xml";
|
|
20604
20605
|
if (!docx[customLocation]) {
|
|
20605
20606
|
docx[customLocation] = generateCustomXml();
|
|
@@ -20736,15 +20737,13 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
20736
20737
|
...params2.media,
|
|
20737
20738
|
...this.media
|
|
20738
20739
|
});
|
|
20739
|
-
const { documentXml, relationships } = __privateMethod$2(this, _SuperConverter_instances, prepareCommentsXmlFilesForExport_fn).call(this, {
|
|
20740
|
+
const { documentXml: updatedXml, relationships } = __privateMethod$2(this, _SuperConverter_instances, prepareCommentsXmlFilesForExport_fn).call(this, {
|
|
20740
20741
|
defs: params2.exportedCommentDefs,
|
|
20741
20742
|
exportType: commentsExportType,
|
|
20742
|
-
commentsWithParaIds
|
|
20743
|
-
relationships: params2.relationships
|
|
20743
|
+
commentsWithParaIds
|
|
20744
20744
|
});
|
|
20745
|
-
this.convertedXml =
|
|
20746
|
-
|
|
20747
|
-
__privateMethod$2(this, _SuperConverter_instances, exportProcessNewRelationships_fn).call(this, updatedRelationships);
|
|
20745
|
+
this.convertedXml = { ...this.convertedXml, ...updatedXml };
|
|
20746
|
+
__privateMethod$2(this, _SuperConverter_instances, exportProcessNewRelationships_fn).call(this, [...params2.relationships, ...relationships]);
|
|
20748
20747
|
storeSuperdocVersion(this.convertedXml);
|
|
20749
20748
|
return xml;
|
|
20750
20749
|
}
|
|
@@ -20763,20 +20762,17 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
|
|
|
20763
20762
|
exportProcessNewRelationships_fn = function(rels = []) {
|
|
20764
20763
|
const relsData = this.convertedXml["word/_rels/document.xml.rels"];
|
|
20765
20764
|
const relationships = relsData.elements.find((x) => x.name === "Relationships");
|
|
20766
|
-
const newRels = [
|
|
20765
|
+
const newRels = [];
|
|
20767
20766
|
let largestId = Math.max(...relationships.elements.map((el) => Number(el.attributes.Id.replace("rId", ""))));
|
|
20768
20767
|
rels.forEach((rel) => {
|
|
20769
20768
|
const existingTarget = relationships.elements.find((el) => el.attributes.Target === rel.attributes.Target);
|
|
20770
|
-
if (existingTarget)
|
|
20771
|
-
|
|
20772
|
-
|
|
20773
|
-
}
|
|
20774
|
-
rel.attributes.Target = rel.attributes?.Target?.replace(/&/g, "&").replace(/-/g, "-");
|
|
20775
|
-
rel.attributes.Id = `rId${++largestId}`;
|
|
20769
|
+
if (existingTarget) return;
|
|
20770
|
+
rel.attributes.Target = rel.attributes?.Target?.replace(/&/g, "&");
|
|
20771
|
+
const existingId = rel.attributes.Id;
|
|
20772
|
+
rel.attributes.Id = existingId.length > 6 ? existingId : `rId${++largestId}`;
|
|
20776
20773
|
newRels.push(rel);
|
|
20777
20774
|
});
|
|
20778
|
-
relationships.elements = newRels;
|
|
20779
|
-
console.debug("New relationships added", newRels, relsData);
|
|
20775
|
+
relationships.elements = [...relationships.elements, ...newRels];
|
|
20780
20776
|
this.convertedXml["word/_rels/document.xml.rels"] = relsData;
|
|
20781
20777
|
};
|
|
20782
20778
|
exportProcessMediaFiles_fn = async function(media) {
|
|
@@ -20862,7 +20858,7 @@ function storeSuperdocVersion(docx) {
|
|
|
20862
20858
|
function generateCustomXml() {
|
|
20863
20859
|
return DEFAULT_CUSTOM_XML;
|
|
20864
20860
|
}
|
|
20865
|
-
function generateSuperdocVersion(pid = 2, version = "0.6.
|
|
20861
|
+
function generateSuperdocVersion(pid = 2, version = "0.6.64") {
|
|
20866
20862
|
return {
|
|
20867
20863
|
type: "element",
|
|
20868
20864
|
name: "property",
|
|
@@ -34885,7 +34881,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
34885
34881
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
34886
34882
|
*/
|
|
34887
34883
|
processCollaborationMigrations() {
|
|
34888
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.6.
|
|
34884
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.6.64");
|
|
34889
34885
|
if (!this.options.ydoc) return;
|
|
34890
34886
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
34891
34887
|
let docVersion = metaMap.get("version");
|
|
@@ -58348,4 +58344,4 @@ export {
|
|
|
58348
58344
|
helpers as k,
|
|
58349
58345
|
index as l
|
|
58350
58346
|
};
|
|
58351
|
-
//# sourceMappingURL=super-editor.es-
|
|
58347
|
+
//# sourceMappingURL=super-editor.es-C1is8qI1.js.map
|