@ones-editor/editor 2.2.10-beta.2 → 2.2.10-beta.3
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/index.js
CHANGED
|
@@ -88091,12 +88091,14 @@ ${data2.flowchartText}
|
|
|
88091
88091
|
}
|
|
88092
88092
|
}
|
|
88093
88093
|
const logger$1 = getLogger("editor-to-docx");
|
|
88094
|
+
const ERROR_MESSAGE = "editor-to-docx: read image error";
|
|
88094
88095
|
async function readImage(editor, _appId, _docId, _src) {
|
|
88095
88096
|
try {
|
|
88096
88097
|
const url = editor.doc.buildResourceUrl(_src, { withToken: true });
|
|
88097
88098
|
let file2 = await downloadImageToFile$1(url);
|
|
88098
|
-
if (!file2)
|
|
88099
|
-
|
|
88099
|
+
if (!file2) {
|
|
88100
|
+
throw new Error(ERROR_MESSAGE);
|
|
88101
|
+
}
|
|
88100
88102
|
if (file2.type.indexOf("/svg") !== -1) {
|
|
88101
88103
|
const pngFile = await convertImageFileToPng(file2);
|
|
88102
88104
|
if (pngFile) {
|
|
@@ -88106,7 +88108,7 @@ ${data2.flowchartText}
|
|
|
88106
88108
|
const arrayBuffer = await file2.arrayBuffer();
|
|
88107
88109
|
return [arrayBuffer, url];
|
|
88108
88110
|
} catch (error2) {
|
|
88109
|
-
throw new ExportImageError(error2.message ||
|
|
88111
|
+
throw new ExportImageError(error2.message || ERROR_MESSAGE);
|
|
88110
88112
|
}
|
|
88111
88113
|
}
|
|
88112
88114
|
async function getDocByBlock(editor, doc2, block) {
|
|
@@ -88341,7 +88343,7 @@ ${data2.flowchartText}
|
|
|
88341
88343
|
}
|
|
88342
88344
|
}
|
|
88343
88345
|
});
|
|
88344
|
-
editor.version = "2.2.10-beta.
|
|
88346
|
+
editor.version = "2.2.10-beta.3";
|
|
88345
88347
|
if (Logger$2.level === LogLevel.DEBUG) {
|
|
88346
88348
|
window.setReauthFail = (fail) => {
|
|
88347
88349
|
window.isReauthError = fail;
|
|
@@ -88442,7 +88444,7 @@ ${data2.flowchartText}
|
|
|
88442
88444
|
});
|
|
88443
88445
|
editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
|
|
88444
88446
|
OnesEditorToolbar.register(editor);
|
|
88445
|
-
editor.version = "2.2.10-beta.
|
|
88447
|
+
editor.version = "2.2.10-beta.3";
|
|
88446
88448
|
return editor;
|
|
88447
88449
|
}
|
|
88448
88450
|
async function showDocVersions(editor, options, serverUrl) {
|