@seafile/comment-editor 0.0.1-alpha.69 → 0.0.1-alpha.70

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.
@@ -30,11 +30,10 @@ var _slateToMd = _interopRequireDefault(require("../slate-convert/slate-to-md"))
30
30
  var _eventBus = _interopRequireDefault(require("../utils/event-bus"));
31
31
  var _eventHandler = _interopRequireDefault(require("../utils/event-handler"));
32
32
  require("./comment-editor.css");
33
- // const getSubmitTip = (type, content) => {
34
- // if (content) return 'Save';
35
- // return type === 'comment' ? 'Comment' : 'Reply';
36
- // };
37
-
33
+ const getSubmitTip = (type, content) => {
34
+ if (content) return 'Save';
35
+ return type === 'comment' ? 'Comment' : 'Reply';
36
+ };
38
37
  const DEFAULT_PLACEHOLDER = 'Enter_comment_shift_enter_for_new_line_Enter_to_send';
39
38
  const CommentEditor = _ref => {
40
39
  let {
@@ -47,10 +46,17 @@ const CommentEditor = _ref => {
47
46
  toolMenus = ['text_style', _constants2.BLOCKQUOTE, _constants2.UNORDERED_LIST, _constants2.ORDERED_LIST, _constants2.LINK, _constants2.IMAGE],
48
47
  closePanel
49
48
  } = _ref;
50
- // const commentWrapperRef = useRef();
51
- // const { t } = useTranslation('sdoc-editor');
52
- // const { className, userInfo, type, addParticipants } = useComment();
53
- // const submitTip = useMemo(() => getSubmitTip(type, content), [content, type]);
49
+ const commentWrapperRef = (0, _react.useRef)();
50
+ const {
51
+ t
52
+ } = (0, _reactI18next.useTranslation)('sdoc-editor');
53
+ const {
54
+ className,
55
+ userInfo,
56
+ type,
57
+ addParticipants
58
+ } = (0, _useComment.useComment)();
59
+ const submitTip = (0, _react.useMemo)(() => getSubmitTip(type, content), [content, type]);
54
60
 
55
61
  // const document = useMemo(() => {
56
62
  // const cursor = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/comment-editor",
3
- "version": "0.0.1-alpha.69",
3
+ "version": "0.0.1-alpha.70",
4
4
  "private": false,
5
5
  "description": "This is a comment editor",
6
6
  "main": "dist/index.js",