@seafile/sdoc-editor 2.0.134-alpha.2 → 2.0.134-alpha.4

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.
@@ -17,6 +17,7 @@ var _commentEditor = require("@seafile/comment-editor");
17
17
  var _dayjs = _interopRequireDefault(require("dayjs"));
18
18
  var _tooltip = _interopRequireDefault(require("../../components/tooltip"));
19
19
  var _context2 = _interopRequireDefault(require("../../context"));
20
+ var _useCollaborators2 = require("../../hooks/use-collaborators");
20
21
  var _mdToHtml = _interopRequireDefault(require("../../slate-convert/md-to-html"));
21
22
  var _notificationHooks = require("../hooks/notification-hooks");
22
23
  var _useParticipants = require("../hooks/use-participants");
@@ -31,7 +32,10 @@ var CommentItemContent = function CommentItemContent(_ref) {
31
32
  t = _ref.t,
32
33
  targetId = _ref.targetId;
33
34
  var _useParticipantsConte = (0, _useParticipants.useParticipantsContext)(),
34
- addParticipants = _useParticipantsConte.addParticipants;
35
+ addParticipants = _useParticipantsConte.addParticipants,
36
+ participants = _useParticipantsConte.participants;
37
+ var _useCollaborators = (0, _useCollaborators2.useCollaborators)(),
38
+ collaborators = _useCollaborators.collaborators;
35
39
  var _useState = (0, _react.useState)(false),
36
40
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
37
41
  isDropdownOpen = _useState2[0],
@@ -125,6 +129,8 @@ var CommentItemContent = function CommentItemContent(_ref) {
125
129
  var commentEditorProps = {
126
130
  className: 'pb-3',
127
131
  addParticipants: addParticipants,
132
+ participants: participants,
133
+ collaborators: collaborators,
128
134
  content: comment.comment,
129
135
  insertContent: updateContent,
130
136
  hiddenComment: setIsEditing,
@@ -15,6 +15,7 @@ var _reactstrap = require("reactstrap");
15
15
  var _commentEditor = require("@seafile/comment-editor");
16
16
  var _dayjs = _interopRequireDefault(require("dayjs"));
17
17
  var _context2 = _interopRequireDefault(require("../../context"));
18
+ var _useCollaborators2 = require("../../hooks/use-collaborators");
18
19
  var _mdToHtml = _interopRequireDefault(require("../../slate-convert/md-to-html"));
19
20
  var _useParticipants = require("../hooks/use-participants");
20
21
  var _commentDeletePopover = _interopRequireDefault(require("./comment-delete-popover"));
@@ -27,7 +28,10 @@ var CommentItemReply = function CommentItemReply(_ref) {
27
28
  updateReply = _ref.updateReply,
28
29
  t = _ref.t;
29
30
  var _useParticipantsConte = (0, _useParticipants.useParticipantsContext)(),
30
- addParticipants = _useParticipantsConte.addParticipants;
31
+ addParticipants = _useParticipantsConte.addParticipants,
32
+ participants = _useParticipantsConte.participants;
33
+ var _useCollaborators = (0, _useCollaborators2.useCollaborators)(),
34
+ collaborators = _useCollaborators.collaborators;
31
35
  var _useState = (0, _react.useState)(false),
32
36
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
33
37
  isDropdownOpen = _useState2[0],
@@ -108,6 +112,8 @@ var CommentItemReply = function CommentItemReply(_ref) {
108
112
  type: 'reply',
109
113
  className: 'pb-3',
110
114
  addParticipants: addParticipants,
115
+ participants: participants,
116
+ collaborators: collaborators,
111
117
  content: editorContent,
112
118
  insertContent: updateContent,
113
119
  hiddenComment: setIsEditing,
@@ -19,6 +19,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
19
19
  var _dayjs = _interopRequireDefault(require("dayjs"));
20
20
  var _slugid = _interopRequireDefault(require("slugid"));
21
21
  var _context2 = _interopRequireDefault(require("../../context"));
22
+ var _useCollaborators2 = require("../../hooks/use-collaborators");
22
23
  var _useSelectionPosition = require("../../hooks/use-selection-position");
23
24
  var _helper = require("../helper");
24
25
  var _useCommentContext2 = require("../hooks/comment-hooks/use-comment-context");
@@ -43,7 +44,10 @@ var CommentList = function CommentList(_ref) {
43
44
  var commentPopover = (0, _react.useRef)(null);
44
45
  var commentDetailRef = (0, _react.useRef)(null);
45
46
  var _useParticipantsConte = (0, _useParticipants.useParticipantsContext)(),
46
- addParticipants = _useParticipantsConte.addParticipants;
47
+ addParticipants = _useParticipantsConte.addParticipants,
48
+ participants = _useParticipantsConte.participants;
49
+ var _useCollaborators = (0, _useCollaborators2.useCollaborators)(),
50
+ collaborators = _useCollaborators.collaborators;
47
51
  var position = (0, _useSelectionPosition.useCommentListPosition)(activeElementIds, isContextComment, isClickedContextComment, commentedDom, commentDetail, closeComment);
48
52
  var _useCommentContext = (0, _useCommentContext2.useCommentContext)(),
49
53
  dispatch = _useCommentContext.dispatch;
@@ -207,6 +211,8 @@ var CommentList = function CommentList(_ref) {
207
211
  }
208
212
  }, isEmptyComment && /*#__PURE__*/_react["default"].createElement(_commentEditor.SeafileCommentEditor, {
209
213
  addParticipants: addParticipants,
214
+ participants: participants,
215
+ collaborators: collaborators,
210
216
  type: "comment",
211
217
  insertContent: addNewComment,
212
218
  hiddenComment: hiddenComment,
@@ -225,6 +231,8 @@ var CommentList = function CommentList(_ref) {
225
231
  type: "reply",
226
232
  placeholder: 'Enter_reply_shift_Enter_for_new_line_Enter_to_send',
227
233
  addParticipants: addParticipants,
234
+ participants: participants,
235
+ collaborators: collaborators,
228
236
  content: commentInputs[item.id] || '',
229
237
  insertContent: function insertContent(value) {
230
238
  return handleReplySubmit(value, item.id);
@@ -245,6 +253,8 @@ var CommentList = function CommentList(_ref) {
245
253
  }, isEmptyComment && /*#__PURE__*/_react["default"].createElement(_commentEditor.SeafileCommentEditor, {
246
254
  type: "comment",
247
255
  addParticipants: addParticipants,
256
+ participants: participants,
257
+ collaborators: collaborators,
248
258
  insertContent: addNewComment,
249
259
  hiddenComment: hiddenComment,
250
260
  closePanel: closeComment,
@@ -262,6 +272,8 @@ var CommentList = function CommentList(_ref) {
262
272
  type: "reply",
263
273
  placeholder: 'Enter_reply_shift_Enter_for_new_line_Enter_to_send',
264
274
  addParticipants: addParticipants,
275
+ participants: participants,
276
+ collaborators: collaborators,
265
277
  content: inputContent,
266
278
  insertContent: replyComment,
267
279
  onContentChange: function onContentChange(content) {
@@ -23,8 +23,6 @@ var GlobalCommentEditor = function GlobalCommentEditor(_ref) {
23
23
  participants = _useParticipantsConte.participants;
24
24
  var _useCollaborators = (0, _useCollaborators2.useCollaborators)(),
25
25
  collaborators = _useCollaborators.collaborators;
26
- console.log('participants', participants);
27
- console.log('collaborators', collaborators);
28
26
  var commentEditorProps = {
29
27
  type: type,
30
28
  className: 'sdoc-doc-comment-editor',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "2.0.134-alpha.2",
3
+ "version": "2.0.134-alpha.4",
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.32",
20
+ "@seafile/comment-editor": "^0.0.1-alpha.79",
21
21
  "@seafile/print-js": "1.6.6",
22
22
  "@seafile/react-image-lightbox": "4.0.2",
23
23
  "@seafile/slate": "0.91.8",