@harbour-enterprises/superdoc 0.6.62 → 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-BsLgPPOs.js → super-editor.es-C1is8qI1.js} +22 -23
- package/dist/chunks/super-editor.es-C1is8qI1.js.map +1 -0
- package/dist/super-editor/chunks/{converter-BmYPM7j8.js → converter-B0V53Xck.js} +21 -22
- package/dist/super-editor/chunks/{converter-BmYPM7j8.js.map → converter-B0V53Xck.js.map} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-CL-WWt46.js → docx-zipper-CYnCVziT.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-CL-WWt46.js.map → docx-zipper-CYnCVziT.js.map} +1 -1
- package/dist/super-editor/chunks/{editor-DTlFmtf7.js → editor-DcR2sWNp.js} +4 -4
- package/dist/super-editor/chunks/{editor-DTlFmtf7.js.map → editor-DcR2sWNp.js.map} +1 -1
- package/dist/super-editor/chunks/{toolbar-COzWERLK.js → toolbar-CTHc0BuJ.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-COzWERLK.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 +22 -23
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +3 -1
- package/dist/chunks/super-editor.es-BsLgPPOs.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) {
|
|
@@ -17692,6 +17693,9 @@ function translateList(params2) {
|
|
|
17692
17693
|
...listNode.attrs
|
|
17693
17694
|
};
|
|
17694
17695
|
const outputNode = exportSchemaToJson({ ...params2, node: paragraphNode });
|
|
17696
|
+
if (!outputNode.elements) {
|
|
17697
|
+
outputNode.elements = [];
|
|
17698
|
+
}
|
|
17695
17699
|
const propsElementIndex = outputNode.elements.findIndex((e) => e.name === "w:pPr");
|
|
17696
17700
|
const listProps = getListParagraphProperties(listNode, level, type2, propsElementIndex > -1);
|
|
17697
17701
|
const content3 = outputNode.elements.filter((e) => e.name !== "w:pPr");
|
|
@@ -20596,7 +20600,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
20596
20600
|
return;
|
|
20597
20601
|
}
|
|
20598
20602
|
}
|
|
20599
|
-
static updateDocumentVersion(docx = this.convertedXml, version = "0.6.
|
|
20603
|
+
static updateDocumentVersion(docx = this.convertedXml, version = "0.6.64") {
|
|
20600
20604
|
const customLocation = "docProps/custom.xml";
|
|
20601
20605
|
if (!docx[customLocation]) {
|
|
20602
20606
|
docx[customLocation] = generateCustomXml();
|
|
@@ -20733,15 +20737,13 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
20733
20737
|
...params2.media,
|
|
20734
20738
|
...this.media
|
|
20735
20739
|
});
|
|
20736
|
-
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, {
|
|
20737
20741
|
defs: params2.exportedCommentDefs,
|
|
20738
20742
|
exportType: commentsExportType,
|
|
20739
|
-
commentsWithParaIds
|
|
20740
|
-
relationships: params2.relationships
|
|
20743
|
+
commentsWithParaIds
|
|
20741
20744
|
});
|
|
20742
|
-
this.convertedXml =
|
|
20743
|
-
|
|
20744
|
-
__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]);
|
|
20745
20747
|
storeSuperdocVersion(this.convertedXml);
|
|
20746
20748
|
return xml;
|
|
20747
20749
|
}
|
|
@@ -20760,20 +20762,17 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
|
|
|
20760
20762
|
exportProcessNewRelationships_fn = function(rels = []) {
|
|
20761
20763
|
const relsData = this.convertedXml["word/_rels/document.xml.rels"];
|
|
20762
20764
|
const relationships = relsData.elements.find((x) => x.name === "Relationships");
|
|
20763
|
-
const newRels = [
|
|
20765
|
+
const newRels = [];
|
|
20764
20766
|
let largestId = Math.max(...relationships.elements.map((el) => Number(el.attributes.Id.replace("rId", ""))));
|
|
20765
20767
|
rels.forEach((rel) => {
|
|
20766
20768
|
const existingTarget = relationships.elements.find((el) => el.attributes.Target === rel.attributes.Target);
|
|
20767
|
-
if (existingTarget)
|
|
20768
|
-
|
|
20769
|
-
|
|
20770
|
-
}
|
|
20771
|
-
rel.attributes.Target = rel.attributes?.Target?.replace(/&/g, "&").replace(/-/g, "-");
|
|
20772
|
-
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}`;
|
|
20773
20773
|
newRels.push(rel);
|
|
20774
20774
|
});
|
|
20775
|
-
relationships.elements = newRels;
|
|
20776
|
-
console.debug("New relationships added", newRels, relsData);
|
|
20775
|
+
relationships.elements = [...relationships.elements, ...newRels];
|
|
20777
20776
|
this.convertedXml["word/_rels/document.xml.rels"] = relsData;
|
|
20778
20777
|
};
|
|
20779
20778
|
exportProcessMediaFiles_fn = async function(media) {
|
|
@@ -20859,7 +20858,7 @@ function storeSuperdocVersion(docx) {
|
|
|
20859
20858
|
function generateCustomXml() {
|
|
20860
20859
|
return DEFAULT_CUSTOM_XML;
|
|
20861
20860
|
}
|
|
20862
|
-
function generateSuperdocVersion(pid = 2, version = "0.6.
|
|
20861
|
+
function generateSuperdocVersion(pid = 2, version = "0.6.64") {
|
|
20863
20862
|
return {
|
|
20864
20863
|
type: "element",
|
|
20865
20864
|
name: "property",
|
|
@@ -34882,7 +34881,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
34882
34881
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
34883
34882
|
*/
|
|
34884
34883
|
processCollaborationMigrations() {
|
|
34885
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.6.
|
|
34884
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.6.64");
|
|
34886
34885
|
if (!this.options.ydoc) return;
|
|
34887
34886
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
34888
34887
|
let docVersion = metaMap.get("version");
|
|
@@ -58345,4 +58344,4 @@ export {
|
|
|
58345
58344
|
helpers as k,
|
|
58346
58345
|
index as l
|
|
58347
58346
|
};
|
|
58348
|
-
//# sourceMappingURL=super-editor.es-
|
|
58347
|
+
//# sourceMappingURL=super-editor.es-C1is8qI1.js.map
|