@harbour-enterprises/superdoc 0.11.29 → 0.11.31
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-CsEQg4xc.es.js → super-editor.es-D8XdnWMu.es.js} +11 -9
- package/dist/chunks/{super-editor.es-Bl9myfzE.cjs → super-editor.es-DkAuD0cl.cjs} +3 -3
- package/dist/core/SuperDoc.d.ts +3 -2
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CJL8YHIz.js → converter-hZK1xKPW.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-Bdd3jp6o.js → docx-zipper-DMEmQVkt.js} +1 -1
- package/dist/super-editor/chunks/{editor-DE58B9UE.js → editor-GtdcYA5D.js} +11 -9
- package/dist/super-editor/chunks/{toolbar-lfYkRb7A.js → toolbar-Bk4txCKp.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Editor.d.ts +25 -5
- package/dist/super-editor/core/Editor.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.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +26 -26
- package/dist/superdoc.es.js +733 -732
- package/dist/superdoc.umd.js +17 -14
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/superdoc.umd.js
CHANGED
|
@@ -24080,7 +24080,7 @@ Actual: ` + p3.attribValue
|
|
|
24080
24080
|
return;
|
|
24081
24081
|
}
|
|
24082
24082
|
}
|
|
24083
|
-
static updateDocumentVersion(e = this.convertedXml, t = "0.11.
|
|
24083
|
+
static updateDocumentVersion(e = this.convertedXml, t = "0.11.31") {
|
|
24084
24084
|
const n = "docProps/custom.xml";
|
|
24085
24085
|
e[n] || (e[n] = Fu$2());
|
|
24086
24086
|
const i3 = e["docProps/custom.xml"];
|
|
@@ -24343,7 +24343,7 @@ Actual: ` + p3.attribValue
|
|
|
24343
24343
|
function Fu$2() {
|
|
24344
24344
|
return Gf$1;
|
|
24345
24345
|
}
|
|
24346
|
-
function Bu$2(r22 = 2, e = "0.11.
|
|
24346
|
+
function Bu$2(r22 = 2, e = "0.11.31") {
|
|
24347
24347
|
return {
|
|
24348
24348
|
type: "element",
|
|
24349
24349
|
name: "property",
|
|
@@ -36983,7 +36983,7 @@ Actual: ` + p3.attribValue
|
|
|
36983
36983
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
36984
36984
|
*/
|
|
36985
36985
|
processCollaborationMigrations() {
|
|
36986
|
-
if (console.debug("[checkVersionMigrations] Current editor version", "0.11.
|
|
36986
|
+
if (console.debug("[checkVersionMigrations] Current editor version", "0.11.31"), !this.options.ydoc) return;
|
|
36987
36987
|
let r = this.options.ydoc.getMap("meta").get("version");
|
|
36988
36988
|
r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
|
|
36989
36989
|
const i3 = hl$1(r) || [], s = this.state.plugins.find((c3) => c3.key.startsWith("y-sync"));
|
|
@@ -37023,18 +37023,20 @@ Actual: ` + p3.attribValue
|
|
|
37023
37023
|
* pre-process the document as needed prior to running in the annotator.
|
|
37024
37024
|
*
|
|
37025
37025
|
* Currently this is only used for table generation but additional pre-processing can be done here.
|
|
37026
|
-
*
|
|
37026
|
+
*
|
|
37027
|
+
* @param {FieldValue[]} annotationValues
|
|
37027
37028
|
* @returns {void}
|
|
37028
37029
|
*/
|
|
37029
|
-
prepareForAnnotations(n = []
|
|
37030
|
-
const { tr:
|
|
37031
|
-
this.view.dispatch(
|
|
37030
|
+
prepareForAnnotations(n = []) {
|
|
37031
|
+
const { tr: r } = this.state, { dispatch: i3 } = this.view, o = ko$2.processTables({ editor: this, tr: r, annotationValues: n });
|
|
37032
|
+
this.view.dispatch(o);
|
|
37032
37033
|
}
|
|
37033
37034
|
/**
|
|
37034
37035
|
* Annotate the document with the given annotation values.
|
|
37035
37036
|
*
|
|
37036
|
-
* @param {
|
|
37037
|
-
* @param {
|
|
37037
|
+
* @param {FieldValue[]} annotationValues List of field values to apply.
|
|
37038
|
+
* @param {String[]} hiddenIds List of field ids to remove from the document.
|
|
37039
|
+
* @returns {void}
|
|
37038
37040
|
*/
|
|
37039
37041
|
annotate(n = [], r = []) {
|
|
37040
37042
|
const { state: i3, view: o, schema: s } = this;
|
|
@@ -70949,7 +70951,7 @@ ${style2}
|
|
|
70949
70951
|
this.config.colors = shuffleArray(this.config.colors);
|
|
70950
70952
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
70951
70953
|
this.colorIndex = 0;
|
|
70952
|
-
this.version = "0.11.
|
|
70954
|
+
this.version = "0.11.31";
|
|
70953
70955
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
70954
70956
|
this.superdocId = config.superdocId || v4();
|
|
70955
70957
|
this.colors = this.config.colors;
|
|
@@ -71273,10 +71275,11 @@ ${style2}
|
|
|
71273
71275
|
commentsType,
|
|
71274
71276
|
exportedName,
|
|
71275
71277
|
additionalFiles = [],
|
|
71276
|
-
additionalFileNames = []
|
|
71278
|
+
additionalFileNames = [],
|
|
71279
|
+
isFinalDoc = false
|
|
71277
71280
|
} = {}) {
|
|
71278
71281
|
const baseFileName = exportedName ? cleanName(exportedName) : cleanName(this.config.title);
|
|
71279
|
-
const docxFiles = await this.exportEditorsToDOCX({ commentsType });
|
|
71282
|
+
const docxFiles = await this.exportEditorsToDOCX({ commentsType, isFinalDoc });
|
|
71280
71283
|
const blobsToZip = [...additionalFiles];
|
|
71281
71284
|
const filenames = [...additionalFileNames];
|
|
71282
71285
|
if (exportType.includes("docx")) {
|
|
@@ -71292,7 +71295,7 @@ ${style2}
|
|
|
71292
71295
|
createDownload(zip, baseFileName, "zip");
|
|
71293
71296
|
}
|
|
71294
71297
|
}
|
|
71295
|
-
async exportEditorsToDOCX({ commentsType } = {}) {
|
|
71298
|
+
async exportEditorsToDOCX({ commentsType, isFinalDoc } = {}) {
|
|
71296
71299
|
const comments = [];
|
|
71297
71300
|
if (commentsType !== "clean") {
|
|
71298
71301
|
comments.push(...this.commentsStore?.translateCommentsForExport());
|
|
@@ -71301,7 +71304,7 @@ ${style2}
|
|
|
71301
71304
|
this.superdocStore.documents.forEach((doc2) => {
|
|
71302
71305
|
const editor = doc2.getEditor();
|
|
71303
71306
|
if (editor) {
|
|
71304
|
-
docxPromises.push(editor.exportDocx({ comments, commentsType }));
|
|
71307
|
+
docxPromises.push(editor.exportDocx({ isFinalDoc, comments, commentsType }));
|
|
71305
71308
|
}
|
|
71306
71309
|
});
|
|
71307
71310
|
return await Promise.all(docxPromises);
|