@seafile/sdoc-editor 2.0.134-alpha.0 → 2.0.134-alpha.2
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.
|
@@ -18,7 +18,6 @@ var _context2 = _interopRequireDefault(require("../../context"));
|
|
|
18
18
|
var _mdToHtml = _interopRequireDefault(require("../../slate-convert/md-to-html"));
|
|
19
19
|
var _useParticipants = require("../hooks/use-participants");
|
|
20
20
|
var _commentDeletePopover = _interopRequireDefault(require("./comment-delete-popover"));
|
|
21
|
-
var _commentEditor2 = _interopRequireDefault(require("./comment-editor"));
|
|
22
21
|
var _commentImagePreviewer = _interopRequireDefault(require("./comment-image-previewer"));
|
|
23
22
|
var CommentItemReply = function CommentItemReply(_ref) {
|
|
24
23
|
var isActive = _ref.isActive,
|
|
@@ -107,8 +106,6 @@ var CommentItemReply = function CommentItemReply(_ref) {
|
|
|
107
106
|
}, []);
|
|
108
107
|
var commentEditorProps = {
|
|
109
108
|
type: 'reply',
|
|
110
|
-
userInfo: user,
|
|
111
|
-
pluginName: 'sdoc',
|
|
112
109
|
className: 'pb-3',
|
|
113
110
|
addParticipants: addParticipants,
|
|
114
111
|
content: editorContent,
|
|
@@ -206,8 +206,6 @@ var CommentList = function CommentList(_ref) {
|
|
|
206
206
|
paddingTop: isEmptyComment ? '16px' : ''
|
|
207
207
|
}
|
|
208
208
|
}, isEmptyComment && /*#__PURE__*/_react["default"].createElement(_commentEditor.SeafileCommentEditor, {
|
|
209
|
-
userInfo: _context2["default"].getUserInfo(),
|
|
210
|
-
pluginName: "sdoc",
|
|
211
209
|
addParticipants: addParticipants,
|
|
212
210
|
type: "comment",
|
|
213
211
|
insertContent: addNewComment,
|
|
@@ -224,8 +222,6 @@ var CommentList = function CommentList(_ref) {
|
|
|
224
222
|
setActiveCommentKey(index);
|
|
225
223
|
}
|
|
226
224
|
}), isActiveEditor && /*#__PURE__*/_react["default"].createElement(_commentEditor.SeafileCommentEditor, {
|
|
227
|
-
userInfo: _context2["default"].getUserInfo(),
|
|
228
|
-
pluginName: "sdoc",
|
|
229
225
|
type: "reply",
|
|
230
226
|
placeholder: 'Enter_reply_shift_Enter_for_new_line_Enter_to_send',
|
|
231
227
|
addParticipants: addParticipants,
|
|
@@ -247,8 +243,6 @@ var CommentList = function CommentList(_ref) {
|
|
|
247
243
|
paddingTop: isEmptyComment ? '16px' : ''
|
|
248
244
|
}
|
|
249
245
|
}, isEmptyComment && /*#__PURE__*/_react["default"].createElement(_commentEditor.SeafileCommentEditor, {
|
|
250
|
-
userInfo: _context2["default"].getUserInfo(),
|
|
251
|
-
pluginName: "sdoc",
|
|
252
246
|
type: "comment",
|
|
253
247
|
addParticipants: addParticipants,
|
|
254
248
|
insertContent: addNewComment,
|
|
@@ -265,8 +259,6 @@ var CommentList = function CommentList(_ref) {
|
|
|
265
259
|
setShowEditor(true);
|
|
266
260
|
}
|
|
267
261
|
}), showEditor && /*#__PURE__*/_react["default"].createElement(_commentEditor.SeafileCommentEditor, {
|
|
268
|
-
userInfo: _context2["default"].getUserInfo(),
|
|
269
|
-
pluginName: "sdoc",
|
|
270
262
|
type: "reply",
|
|
271
263
|
placeholder: 'Enter_reply_shift_Enter_for_new_line_Enter_to_send',
|
|
272
264
|
addParticipants: addParticipants,
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _commentEditor = require("@seafile/comment-editor");
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _context = _interopRequireDefault(require("../../../context"));
|
|
12
|
+
var _useCollaborators2 = require("../../../hooks/use-collaborators");
|
|
12
13
|
var _useParticipants = require("../../hooks/use-participants");
|
|
13
14
|
var GlobalCommentEditor = function GlobalCommentEditor(_ref) {
|
|
14
15
|
var isScrollDisplayed = _ref.isScrollDisplayed,
|
|
@@ -18,18 +19,23 @@ var GlobalCommentEditor = function GlobalCommentEditor(_ref) {
|
|
|
18
19
|
hiddenCommentEditor = _ref.hiddenCommentEditor,
|
|
19
20
|
onContentChange = _ref.onContentChange;
|
|
20
21
|
var _useParticipantsConte = (0, _useParticipants.useParticipantsContext)(),
|
|
21
|
-
addParticipants = _useParticipantsConte.addParticipants
|
|
22
|
+
addParticipants = _useParticipantsConte.addParticipants,
|
|
23
|
+
participants = _useParticipantsConte.participants;
|
|
24
|
+
var _useCollaborators = (0, _useCollaborators2.useCollaborators)(),
|
|
25
|
+
collaborators = _useCollaborators.collaborators;
|
|
26
|
+
console.log('participants', participants);
|
|
27
|
+
console.log('collaborators', collaborators);
|
|
22
28
|
var commentEditorProps = {
|
|
23
29
|
type: type,
|
|
24
|
-
|
|
25
|
-
pluginName: 'sdoc',
|
|
26
|
-
className: 'sdoc-doc-comment-editor 11111',
|
|
30
|
+
className: 'sdoc-doc-comment-editor',
|
|
27
31
|
hiddenUserInfo: true,
|
|
28
32
|
content: globalCommentContent,
|
|
29
33
|
insertContent: insertDocComment,
|
|
30
34
|
onContentChange: onContentChange,
|
|
31
35
|
hiddenComment: hiddenCommentEditor,
|
|
32
36
|
addParticipants: addParticipants,
|
|
37
|
+
collaborators: collaborators,
|
|
38
|
+
participants: participants,
|
|
33
39
|
api: {
|
|
34
40
|
uploadLocalImage: _context["default"].uploadLocalImage
|
|
35
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "2.0.134-alpha.
|
|
3
|
+
"version": "2.0.134-alpha.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"license": "ISC",
|
|
18
18
|
"description": "",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@seafile/comment-editor": "^0.0.1-alpha.
|
|
20
|
+
"@seafile/comment-editor": "^0.0.1-alpha.32",
|
|
21
21
|
"@seafile/print-js": "1.6.6",
|
|
22
22
|
"@seafile/react-image-lightbox": "4.0.2",
|
|
23
23
|
"@seafile/slate": "0.91.8",
|