@harbour-enterprises/superdoc 0.5.7 → 0.5.8

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.
@@ -49761,7 +49761,7 @@ const toIsoNoFractional = (unixMillis) => {
49761
49761
  const date = new Date(unixMillis || Date.now());
49762
49762
  return date.toISOString().replace(/\.\d{3}Z$/, "Z");
49763
49763
  };
49764
- const updateCommentsXml = (commentDefs, commentsXml) => {
49764
+ const updateCommentsXml = (commentDefs = [], commentsXml) => {
49765
49765
  const newCommentsXml = carbonCopy(commentsXml);
49766
49766
  commentDefs.forEach((commentDef) => {
49767
49767
  commentDef.elements[0].elements.unshift(COMMENT_REF);
@@ -52849,7 +52849,7 @@ const _SuperConverter = class _SuperConverter {
52849
52849
  return;
52850
52850
  }
52851
52851
  }
52852
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.5.7") {
52852
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.5.8") {
52853
52853
  const customLocation = "docProps/custom.xml";
52854
52854
  if (!docx[customLocation]) {
52855
52855
  docx[customLocation] = generateCustomXml();
@@ -53002,6 +53002,7 @@ _SuperConverter_instances = new WeakSet();
53002
53002
  updateCommentsFiles_fn = function(exportedCommentDefs, commentsExportType) {
53003
53003
  const originalXml = this.convertedXml["word/comments.xml"];
53004
53004
  if (!originalXml && commentsExportType === "clean") return;
53005
+ if (!this.convertedXml["word/comments.xml"]) this.convertedXml["word/comments.xml"] = { ...COMMENTS_XML };
53005
53006
  const commentsXml = { ...this.convertedXml["word/comments.xml"] };
53006
53007
  if (commentsXml && commentsExportType === "clean") {
53007
53008
  return this.convertedXml["word/comments.xml"] = { ...COMMENTS_XML };
@@ -53095,7 +53096,7 @@ function storeSuperdocVersion(docx) {
53095
53096
  function generateCustomXml() {
53096
53097
  return DEFAULT_CUSTOM_XML;
53097
53098
  }
53098
- function generateSuperdocVersion(version2 = "0.5.7") {
53099
+ function generateSuperdocVersion(version2 = "0.5.8") {
53099
53100
  return {
53100
53101
  type: "element",
53101
53102
  name: "property",
@@ -53167,4 +53168,4 @@ export {
53167
53168
  twipsToLines as y,
53168
53169
  pixelsToTwips as z
53169
53170
  };
53170
- //# sourceMappingURL=converter-IzBqfaH2.js.map
53171
+ //# sourceMappingURL=converter-CSAdyWKD.js.map