@harbour-enterprises/superdoc 0.6.63 → 0.6.65
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/{index-CYNgdiE-.js → index-CcNvnGm3.js} +3 -3
- package/dist/chunks/{index-CYNgdiE-.js.map → index-CcNvnGm3.js.map} +1 -1
- package/dist/chunks/{index-C9_loHlV.js → index-DBjNbkhD.js} +2 -2
- package/dist/chunks/{index-C9_loHlV.js.map → index-DBjNbkhD.js.map} +1 -1
- package/dist/chunks/{super-editor.es-ChbpDgxj.js → super-editor.es-DNiT_SsU.js} +19 -23
- package/dist/chunks/super-editor.es-DNiT_SsU.js.map +1 -0
- package/dist/chunks/{url-BEZ_vydO.js → url-BHuhE1Tt.js} +2 -2
- package/dist/chunks/{url-BEZ_vydO.js.map → url-BHuhE1Tt.js.map} +1 -1
- package/dist/chunks/{xml-js-thotvZIi.js → xml-js-ib3MF-Jw.js} +76 -90
- package/dist/chunks/{xml-js-thotvZIi.js.map → xml-js-ib3MF-Jw.js.map} +1 -1
- package/dist/super-editor/chunks/{converter-DvoY_Ajb.js → converter-BvHlOZbx.js} +18 -22
- package/dist/super-editor/chunks/{converter-DvoY_Ajb.js.map → converter-BvHlOZbx.js.map} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-BwzO_Kan.js → docx-zipper-CPq_chZJ.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-BwzO_Kan.js.map → docx-zipper-CPq_chZJ.js.map} +1 -1
- package/dist/super-editor/chunks/{editor-Dlpffdvx.js → editor-CY48l30A.js} +4 -4
- package/dist/super-editor/chunks/{editor-Dlpffdvx.js.map → editor-CY48l30A.js.map} +1 -1
- package/dist/super-editor/chunks/{toolbar-DJKYESky.js → toolbar-DPRHDD5b.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-DJKYESky.js.map → toolbar-DPRHDD5b.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 +6 -6
- 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
|
@@ -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) {
|
|
@@ -20618,7 +20619,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
20618
20619
|
return;
|
|
20619
20620
|
}
|
|
20620
20621
|
}
|
|
20621
|
-
static updateDocumentVersion(docx = this.convertedXml, version = "0.6.
|
|
20622
|
+
static updateDocumentVersion(docx = this.convertedXml, version = "0.6.65") {
|
|
20622
20623
|
const customLocation = "docProps/custom.xml";
|
|
20623
20624
|
if (!docx[customLocation]) {
|
|
20624
20625
|
docx[customLocation] = generateCustomXml();
|
|
@@ -20755,15 +20756,13 @@ const _SuperConverter = class _SuperConverter {
|
|
|
20755
20756
|
...params.media,
|
|
20756
20757
|
...this.media
|
|
20757
20758
|
});
|
|
20758
|
-
const { documentXml, relationships } = __privateMethod(this, _SuperConverter_instances, prepareCommentsXmlFilesForExport_fn).call(this, {
|
|
20759
|
+
const { documentXml: updatedXml, relationships } = __privateMethod(this, _SuperConverter_instances, prepareCommentsXmlFilesForExport_fn).call(this, {
|
|
20759
20760
|
defs: params.exportedCommentDefs,
|
|
20760
20761
|
exportType: commentsExportType,
|
|
20761
|
-
commentsWithParaIds
|
|
20762
|
-
relationships: params.relationships
|
|
20762
|
+
commentsWithParaIds
|
|
20763
20763
|
});
|
|
20764
|
-
this.convertedXml =
|
|
20765
|
-
|
|
20766
|
-
__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]);
|
|
20767
20766
|
storeSuperdocVersion(this.convertedXml);
|
|
20768
20767
|
return xml;
|
|
20769
20768
|
}
|
|
@@ -20785,20 +20784,17 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
|
|
|
20785
20784
|
exportProcessNewRelationships_fn = function(rels = []) {
|
|
20786
20785
|
const relsData = this.convertedXml["word/_rels/document.xml.rels"];
|
|
20787
20786
|
const relationships = relsData.elements.find((x) => x.name === "Relationships");
|
|
20788
|
-
const newRels = [
|
|
20787
|
+
const newRels = [];
|
|
20789
20788
|
let largestId = Math.max(...relationships.elements.map((el) => Number(el.attributes.Id.replace("rId", ""))));
|
|
20790
20789
|
rels.forEach((rel) => {
|
|
20791
20790
|
const existingTarget = relationships.elements.find((el) => el.attributes.Target === rel.attributes.Target);
|
|
20792
|
-
if (existingTarget)
|
|
20793
|
-
|
|
20794
|
-
|
|
20795
|
-
}
|
|
20796
|
-
rel.attributes.Target = rel.attributes?.Target?.replace(/&/g, "&").replace(/-/g, "-");
|
|
20797
|
-
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}`;
|
|
20798
20795
|
newRels.push(rel);
|
|
20799
20796
|
});
|
|
20800
|
-
relationships.elements = newRels;
|
|
20801
|
-
console.debug("New relationships added", newRels, relsData);
|
|
20797
|
+
relationships.elements = [...relationships.elements, ...newRels];
|
|
20802
20798
|
this.convertedXml["word/_rels/document.xml.rels"] = relsData;
|
|
20803
20799
|
};
|
|
20804
20800
|
exportProcessMediaFiles_fn = async function(media) {
|
|
@@ -20884,7 +20880,7 @@ function storeSuperdocVersion(docx) {
|
|
|
20884
20880
|
function generateCustomXml() {
|
|
20885
20881
|
return DEFAULT_CUSTOM_XML;
|
|
20886
20882
|
}
|
|
20887
|
-
function generateSuperdocVersion(pid = 2, version = "0.6.
|
|
20883
|
+
function generateSuperdocVersion(pid = 2, version = "0.6.65") {
|
|
20888
20884
|
return {
|
|
20889
20885
|
type: "element",
|
|
20890
20886
|
name: "property",
|
|
@@ -20955,4 +20951,4 @@ export {
|
|
|
20955
20951
|
twipsToLines as y,
|
|
20956
20952
|
pixelsToTwips as z
|
|
20957
20953
|
};
|
|
20958
|
-
//# sourceMappingURL=converter-
|
|
20954
|
+
//# sourceMappingURL=converter-BvHlOZbx.js.map
|