@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
|
@@ -17391,9 +17391,9 @@ const prepareCommentsXmlFilesForExport = ({
|
|
|
17391
17391
|
defs,
|
|
17392
17392
|
commentsWithParaIds,
|
|
17393
17393
|
exportType,
|
|
17394
|
-
converter
|
|
17395
|
-
relationships = []
|
|
17394
|
+
converter
|
|
17396
17395
|
}) => {
|
|
17396
|
+
const relationships = [];
|
|
17397
17397
|
if (exportType === "clean") {
|
|
17398
17398
|
const documentXml = removeCommentsFilesFromConvertedXml(convertedXml);
|
|
17399
17399
|
return { documentXml, relationships };
|
|
@@ -17687,7 +17687,7 @@ function addNewLinkRelationship(params, link) {
|
|
|
17687
17687
|
}
|
|
17688
17688
|
function addNewImageRelationship(params, imagePath) {
|
|
17689
17689
|
const newId = "rId" + generateDocxRandomId();
|
|
17690
|
-
|
|
17690
|
+
const newRel = {
|
|
17691
17691
|
type: "element",
|
|
17692
17692
|
name: "Relationship",
|
|
17693
17693
|
attributes: {
|
|
@@ -17695,7 +17695,8 @@ function addNewImageRelationship(params, imagePath) {
|
|
|
17695
17695
|
Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
|
|
17696
17696
|
Target: imagePath
|
|
17697
17697
|
}
|
|
17698
|
-
}
|
|
17698
|
+
};
|
|
17699
|
+
params.relationships.push(newRel);
|
|
17699
17700
|
return newId;
|
|
17700
17701
|
}
|
|
17701
17702
|
function translateList(params) {
|
|
@@ -17711,6 +17712,9 @@ function translateList(params) {
|
|
|
17711
17712
|
...listNode.attrs
|
|
17712
17713
|
};
|
|
17713
17714
|
const outputNode = exportSchemaToJson({ ...params, node: paragraphNode });
|
|
17715
|
+
if (!outputNode.elements) {
|
|
17716
|
+
outputNode.elements = [];
|
|
17717
|
+
}
|
|
17714
17718
|
const propsElementIndex = outputNode.elements.findIndex((e) => e.name === "w:pPr");
|
|
17715
17719
|
const listProps = getListParagraphProperties(listNode, level, type2, propsElementIndex > -1);
|
|
17716
17720
|
const content3 = outputNode.elements.filter((e) => e.name !== "w:pPr");
|
|
@@ -20615,7 +20619,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
20615
20619
|
return;
|
|
20616
20620
|
}
|
|
20617
20621
|
}
|
|
20618
|
-
static updateDocumentVersion(docx = this.convertedXml, version = "0.6.
|
|
20622
|
+
static updateDocumentVersion(docx = this.convertedXml, version = "0.6.64") {
|
|
20619
20623
|
const customLocation = "docProps/custom.xml";
|
|
20620
20624
|
if (!docx[customLocation]) {
|
|
20621
20625
|
docx[customLocation] = generateCustomXml();
|
|
@@ -20752,15 +20756,13 @@ const _SuperConverter = class _SuperConverter {
|
|
|
20752
20756
|
...params.media,
|
|
20753
20757
|
...this.media
|
|
20754
20758
|
});
|
|
20755
|
-
const { documentXml, relationships } = __privateMethod(this, _SuperConverter_instances, prepareCommentsXmlFilesForExport_fn).call(this, {
|
|
20759
|
+
const { documentXml: updatedXml, relationships } = __privateMethod(this, _SuperConverter_instances, prepareCommentsXmlFilesForExport_fn).call(this, {
|
|
20756
20760
|
defs: params.exportedCommentDefs,
|
|
20757
20761
|
exportType: commentsExportType,
|
|
20758
|
-
commentsWithParaIds
|
|
20759
|
-
relationships: params.relationships
|
|
20762
|
+
commentsWithParaIds
|
|
20760
20763
|
});
|
|
20761
|
-
this.convertedXml =
|
|
20762
|
-
|
|
20763
|
-
__privateMethod(this, _SuperConverter_instances, exportProcessNewRelationships_fn).call(this, updatedRelationships);
|
|
20764
|
+
this.convertedXml = { ...this.convertedXml, ...updatedXml };
|
|
20765
|
+
__privateMethod(this, _SuperConverter_instances, exportProcessNewRelationships_fn).call(this, [...params.relationships, ...relationships]);
|
|
20764
20766
|
storeSuperdocVersion(this.convertedXml);
|
|
20765
20767
|
return xml;
|
|
20766
20768
|
}
|
|
@@ -20782,20 +20784,17 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
|
|
|
20782
20784
|
exportProcessNewRelationships_fn = function(rels = []) {
|
|
20783
20785
|
const relsData = this.convertedXml["word/_rels/document.xml.rels"];
|
|
20784
20786
|
const relationships = relsData.elements.find((x) => x.name === "Relationships");
|
|
20785
|
-
const newRels = [
|
|
20787
|
+
const newRels = [];
|
|
20786
20788
|
let largestId = Math.max(...relationships.elements.map((el) => Number(el.attributes.Id.replace("rId", ""))));
|
|
20787
20789
|
rels.forEach((rel) => {
|
|
20788
20790
|
const existingTarget = relationships.elements.find((el) => el.attributes.Target === rel.attributes.Target);
|
|
20789
|
-
if (existingTarget)
|
|
20790
|
-
|
|
20791
|
-
|
|
20792
|
-
}
|
|
20793
|
-
rel.attributes.Target = rel.attributes?.Target?.replace(/&/g, "&").replace(/-/g, "-");
|
|
20794
|
-
rel.attributes.Id = `rId${++largestId}`;
|
|
20791
|
+
if (existingTarget) return;
|
|
20792
|
+
rel.attributes.Target = rel.attributes?.Target?.replace(/&/g, "&");
|
|
20793
|
+
const existingId = rel.attributes.Id;
|
|
20794
|
+
rel.attributes.Id = existingId.length > 6 ? existingId : `rId${++largestId}`;
|
|
20795
20795
|
newRels.push(rel);
|
|
20796
20796
|
});
|
|
20797
|
-
relationships.elements = newRels;
|
|
20798
|
-
console.debug("New relationships added", newRels, relsData);
|
|
20797
|
+
relationships.elements = [...relationships.elements, ...newRels];
|
|
20799
20798
|
this.convertedXml["word/_rels/document.xml.rels"] = relsData;
|
|
20800
20799
|
};
|
|
20801
20800
|
exportProcessMediaFiles_fn = async function(media) {
|
|
@@ -20881,7 +20880,7 @@ function storeSuperdocVersion(docx) {
|
|
|
20881
20880
|
function generateCustomXml() {
|
|
20882
20881
|
return DEFAULT_CUSTOM_XML;
|
|
20883
20882
|
}
|
|
20884
|
-
function generateSuperdocVersion(pid = 2, version = "0.6.
|
|
20883
|
+
function generateSuperdocVersion(pid = 2, version = "0.6.64") {
|
|
20885
20884
|
return {
|
|
20886
20885
|
type: "element",
|
|
20887
20886
|
name: "property",
|
|
@@ -20952,4 +20951,4 @@ export {
|
|
|
20952
20951
|
twipsToLines as y,
|
|
20953
20952
|
pixelsToTwips as z
|
|
20954
20953
|
};
|
|
20955
|
-
//# sourceMappingURL=converter-
|
|
20954
|
+
//# sourceMappingURL=converter-B0V53Xck.js.map
|