@ones-editor/editor 2.8.25-beta.7 → 2.8.25-beta.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.
package/dist/index.js
CHANGED
|
@@ -32302,6 +32302,9 @@ ${codeText}
|
|
|
32302
32302
|
toJSON() {
|
|
32303
32303
|
return cloneDeep__default.default(this.doc);
|
|
32304
32304
|
}
|
|
32305
|
+
rawData() {
|
|
32306
|
+
return this.doc;
|
|
32307
|
+
}
|
|
32305
32308
|
getContainerBlocks(containerId) {
|
|
32306
32309
|
const blocks = this.doc.blocks[containerId];
|
|
32307
32310
|
return blocks;
|
|
@@ -70263,7 +70266,7 @@ ${codeText}
|
|
|
70263
70266
|
class OnesEditorCommentsRender {
|
|
70264
70267
|
constructor(type = "current") {
|
|
70265
70268
|
__publicField(this, "updateUnknownCommentsDelayed", debounce__default.default((editor) => {
|
|
70266
|
-
const comments =
|
|
70269
|
+
const comments = this.getComments(editor);
|
|
70267
70270
|
const invisibleComments = Object.values(comments).filter((comment) => {
|
|
70268
70271
|
if (comment.id !== comment.groupId) {
|
|
70269
70272
|
return false;
|
|
@@ -70379,6 +70382,14 @@ ${codeText}
|
|
|
70379
70382
|
this.updateUnknownCommentsDelayed(editor);
|
|
70380
70383
|
}
|
|
70381
70384
|
}
|
|
70385
|
+
getComments(editor) {
|
|
70386
|
+
const editorComments = editor.findCustom("editor-comments");
|
|
70387
|
+
if (!editorComments) {
|
|
70388
|
+
return [];
|
|
70389
|
+
}
|
|
70390
|
+
const commentProvider = editorComments.commentProvider;
|
|
70391
|
+
return commentProvider.getComments();
|
|
70392
|
+
}
|
|
70382
70393
|
changeType(editor, type) {
|
|
70383
70394
|
this.type = type;
|
|
70384
70395
|
const elements = editor.rootContainer.querySelectorAll(".comment");
|
|
@@ -70390,8 +70401,8 @@ ${codeText}
|
|
|
70390
70401
|
}
|
|
70391
70402
|
});
|
|
70392
70403
|
});
|
|
70393
|
-
const
|
|
70394
|
-
const visibleComments = Object.values(
|
|
70404
|
+
const comments = this.getComments(editor);
|
|
70405
|
+
const visibleComments = Object.values(comments).filter((comment) => {
|
|
70395
70406
|
if (comment.id !== comment.groupId) {
|
|
70396
70407
|
return false;
|
|
70397
70408
|
}
|
|
@@ -70399,7 +70410,7 @@ ${codeText}
|
|
|
70399
70410
|
return ret;
|
|
70400
70411
|
});
|
|
70401
70412
|
const visibleCommentsId = new Set(visibleComments.map((c) => c.id));
|
|
70402
|
-
const commentsFromDoc = getBlockCommentsFromDoc(
|
|
70413
|
+
const commentsFromDoc = getBlockCommentsFromDoc(editor.doc.toJSON());
|
|
70403
70414
|
commentsFromDoc.forEach((commentIds, blockId) => {
|
|
70404
70415
|
if (Array.from(commentIds).some((c) => visibleCommentsId.has(c))) {
|
|
70405
70416
|
const block = editor.findBlockById(blockId);
|
|
@@ -90920,9 +90931,10 @@ ${data2.plantumlText}
|
|
|
90920
90931
|
constructor(editor, localDoc) {
|
|
90921
90932
|
__publicField(this, "_listeners", /* @__PURE__ */ new Set());
|
|
90922
90933
|
__publicField(this, "_doc");
|
|
90934
|
+
var _a, _b;
|
|
90923
90935
|
this.editor = editor;
|
|
90924
90936
|
this.localDoc = localDoc;
|
|
90925
|
-
this._doc = this.localDoc.toJSON();
|
|
90937
|
+
this._doc = ((_b = (_a = this.localDoc).rawData) == null ? void 0 : _b.call(_a)) || this.localDoc.toJSON();
|
|
90926
90938
|
}
|
|
90927
90939
|
get doc() {
|
|
90928
90940
|
return this._doc;
|
|
@@ -93779,7 +93791,7 @@ ${data2.plantumlText}
|
|
|
93779
93791
|
}
|
|
93780
93792
|
}
|
|
93781
93793
|
});
|
|
93782
|
-
editor.version = "2.8.25-beta.
|
|
93794
|
+
editor.version = "2.8.25-beta.8";
|
|
93783
93795
|
return editor;
|
|
93784
93796
|
}
|
|
93785
93797
|
function isDoc(doc2) {
|
|
@@ -93892,7 +93904,7 @@ ${data2.plantumlText}
|
|
|
93892
93904
|
}
|
|
93893
93905
|
});
|
|
93894
93906
|
OnesEditorToolbar.register(editor);
|
|
93895
|
-
editor.version = "2.8.25-beta.
|
|
93907
|
+
editor.version = "2.8.25-beta.8";
|
|
93896
93908
|
return editor;
|
|
93897
93909
|
}
|
|
93898
93910
|
async function showDocVersions(editor, options, serverUrl) {
|