@ones-editor/editor 0.0.7-beta.36 → 0.0.7-beta.38
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
|
@@ -1739,17 +1739,24 @@ div.tippy-box[data-theme=editor-tooltip] > .tippy-content {
|
|
|
1739
1739
|
align-items: center;
|
|
1740
1740
|
height: calc(var(--font-size) * var(--line-height));
|
|
1741
1741
|
}
|
|
1742
|
+
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap,
|
|
1742
1743
|
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap {
|
|
1743
1744
|
display: flex;
|
|
1744
1745
|
flex-direction: row;
|
|
1745
1746
|
justify-content: center;
|
|
1746
1747
|
}
|
|
1747
|
-
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .
|
|
1748
|
-
|
|
1748
|
+
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap > button.editor-button[data-button-id=mention-button]:hover,
|
|
1749
|
+
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap > button.editor-button[data-button-id=list-to-mindmap]:hover,
|
|
1750
|
+
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap > button.editor-button[data-button-id=mention-button]:hover,
|
|
1751
|
+
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap > button.editor-button[data-button-id=list-to-mindmap]:hover {
|
|
1752
|
+
background: rgba(0, 36, 90, 0.0392156863);
|
|
1749
1753
|
border-radius: 3px;
|
|
1750
1754
|
}
|
|
1751
|
-
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .
|
|
1752
|
-
|
|
1755
|
+
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap > button.editor-button[data-button-id=mention-button]:active:hover,
|
|
1756
|
+
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap > button.editor-button[data-button-id=list-to-mindmap]:active:hover,
|
|
1757
|
+
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap > button.editor-button[data-button-id=mention-button]:active:hover,
|
|
1758
|
+
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap > button.editor-button[data-button-id=list-to-mindmap]:active:hover {
|
|
1759
|
+
background: rgba(0, 36, 90, 0.0588235294);
|
|
1753
1760
|
}
|
|
1754
1761
|
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=list-to-mindmap],
|
|
1755
1762
|
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=mention-button] {
|
|
@@ -1764,20 +1771,15 @@ div.tippy-box[data-theme=editor-tooltip] > .tippy-content {
|
|
|
1764
1771
|
outline: 0;
|
|
1765
1772
|
display: flex;
|
|
1766
1773
|
align-items: center;
|
|
1767
|
-
justify-content:
|
|
1774
|
+
justify-content: center;
|
|
1768
1775
|
background-color: transparent;
|
|
1769
1776
|
color: #07142a;
|
|
1770
|
-
margin-right: 8px;
|
|
1771
1777
|
}
|
|
1772
1778
|
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=list-to-mindmap] svg,
|
|
1773
1779
|
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=mention-button] svg {
|
|
1774
1780
|
width: 16px;
|
|
1775
1781
|
height: 16px;
|
|
1776
1782
|
}
|
|
1777
|
-
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=mention-button] {
|
|
1778
|
-
justify-content: center;
|
|
1779
|
-
margin-right: 0;
|
|
1780
|
-
}
|
|
1781
1783
|
.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=list-block-mention]:hover > svg {
|
|
1782
1784
|
cursor: initial;
|
|
1783
1785
|
background-color: #eeeeee;
|
|
@@ -2058,16 +2060,17 @@ div.editor-root div.editor-content div[data-block-type=list][data-style-heading=
|
|
|
2058
2060
|
.editor-root:not(.readonly) div[data-type=editor-block].list-block.active .list-container, .editor-root:not(.readonly) div[data-type=editor-block].list-block.hover .list-container {
|
|
2059
2061
|
cursor: pointer;
|
|
2060
2062
|
}
|
|
2061
|
-
.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=
|
|
2063
|
+
.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=ordered] > div.list-container,
|
|
2064
|
+
.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=ordered] > div[data-type=block-content], .editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=unordered] > div.list-container,
|
|
2065
|
+
.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=unordered] > div[data-type=block-content], .editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=unchecked] > div.list-container,
|
|
2062
2066
|
.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=unchecked] > div[data-type=block-content], .editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=checked] > div.list-container,
|
|
2063
|
-
.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=checked] > div[data-type=block-content], .editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=
|
|
2067
|
+
.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=checked] > div[data-type=block-content], .editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=ordered] > div.list-container,
|
|
2068
|
+
.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=ordered] > div[data-type=block-content], .editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=unordered] > div.list-container,
|
|
2069
|
+
.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=unordered] > div[data-type=block-content], .editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=unchecked] > div.list-container,
|
|
2064
2070
|
.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=unchecked] > div[data-type=block-content], .editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=checked] > div.list-container,
|
|
2065
2071
|
.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=checked] > div[data-type=block-content] {
|
|
2066
2072
|
background-color: #f8f8f8;
|
|
2067
2073
|
}
|
|
2068
|
-
.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=ordered], .editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=unordered], .editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=ordered], .editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=unordered] {
|
|
2069
|
-
background-color: #f8f8f8;
|
|
2070
|
-
}
|
|
2071
2074
|
.editor-root:not(.readonly) div[data-type=editor-block].list-block .list-container:hover .list-marker {
|
|
2072
2075
|
cursor: pointer;
|
|
2073
2076
|
}
|
|
@@ -57197,6 +57200,13 @@ ${codeText}
|
|
|
57197
57200
|
}
|
|
57198
57201
|
return this.items[index2];
|
|
57199
57202
|
}
|
|
57203
|
+
findItemAsGroupId(commentId) {
|
|
57204
|
+
const index2 = this.items.findIndex((i) => i.comment.groupId === commentId);
|
|
57205
|
+
if (index2 === -1) {
|
|
57206
|
+
return null;
|
|
57207
|
+
}
|
|
57208
|
+
return this.items[index2];
|
|
57209
|
+
}
|
|
57200
57210
|
destroy() {
|
|
57201
57211
|
this._items.forEach((item) => item.destroy());
|
|
57202
57212
|
this._items = [];
|
|
@@ -57268,7 +57278,8 @@ ${codeText}
|
|
|
57268
57278
|
const doc2 = replyEditor.getDoc();
|
|
57269
57279
|
const replyComment = createComment({
|
|
57270
57280
|
editor: mainEditor,
|
|
57271
|
-
commentGroupId: comment.groupId
|
|
57281
|
+
commentGroupId: comment.groupId,
|
|
57282
|
+
abstract: this.groupItem.comment.abstract
|
|
57272
57283
|
});
|
|
57273
57284
|
commentsProvider.localCreateComment(replyComment, doc2);
|
|
57274
57285
|
this.hideReplyEditor();
|
|
@@ -57444,7 +57455,6 @@ ${codeText}
|
|
|
57444
57455
|
return this.childrenList.createItem(comment);
|
|
57445
57456
|
}
|
|
57446
57457
|
handleUpdateChildComment(comment) {
|
|
57447
|
-
assert(logger$D, comment.groupId === this.mainItem.comment.id, "invalid child comment");
|
|
57448
57458
|
const item = this.childrenList.findItem(comment.id);
|
|
57449
57459
|
if (!item) {
|
|
57450
57460
|
logger$D.error(`can't find child comment item: ${comment.id}`);
|
|
@@ -57626,7 +57636,7 @@ ${codeText}
|
|
|
57626
57636
|
quickReply.show();
|
|
57627
57637
|
});
|
|
57628
57638
|
__publicField(this, "handleCommentItemEdit", (commentItem2) => {
|
|
57629
|
-
const groupItem = this.groupList.
|
|
57639
|
+
const groupItem = this.groupList.findItemAsGroupId(commentItem2.comment.groupId);
|
|
57630
57640
|
if (!groupItem)
|
|
57631
57641
|
return;
|
|
57632
57642
|
const { quickReply } = groupItem;
|
|
@@ -57635,7 +57645,7 @@ ${codeText}
|
|
|
57635
57645
|
quickReply.hide();
|
|
57636
57646
|
});
|
|
57637
57647
|
__publicField(this, "handleCommentItemDelete", (commentItem2) => {
|
|
57638
|
-
const groupItem = this.groupList.
|
|
57648
|
+
const groupItem = this.groupList.findItemAsGroupId(commentItem2.comment.groupId);
|
|
57639
57649
|
if (!groupItem)
|
|
57640
57650
|
return;
|
|
57641
57651
|
const { quickReply } = groupItem;
|
|
@@ -58013,12 +58023,9 @@ ${codeText}
|
|
|
58013
58023
|
}
|
|
58014
58024
|
}
|
|
58015
58025
|
handleUpdateComment(comment) {
|
|
58016
|
-
|
|
58017
|
-
|
|
58018
|
-
|
|
58019
|
-
if (group) {
|
|
58020
|
-
group.handleUpdateChildComment(comment);
|
|
58021
|
-
}
|
|
58026
|
+
const group = this.findItemAsGroupId(comment.groupId);
|
|
58027
|
+
if (group && group.comment.id !== comment.id) {
|
|
58028
|
+
group.handleUpdateChildComment(comment);
|
|
58022
58029
|
return;
|
|
58023
58030
|
}
|
|
58024
58031
|
const item = this.findItem(comment.id);
|