@seafile/comment-editor 0.0.1-alpha.73 → 0.0.1-alpha.75
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.
|
@@ -47,14 +47,11 @@ const CommentEditor = _ref => {
|
|
|
47
47
|
toolMenus = ['text_style', _constants2.BLOCKQUOTE, _constants2.UNORDERED_LIST, _constants2.ORDERED_LIST, _constants2.LINK, _constants2.IMAGE],
|
|
48
48
|
closePanel
|
|
49
49
|
} = _ref;
|
|
50
|
-
const commentWrapperRef =
|
|
51
|
-
// const { t } = useTranslation('sdoc-editor');
|
|
50
|
+
// const commentWrapperRef = useRef();
|
|
52
51
|
const {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
addParticipants
|
|
57
|
-
} = (0, _useComment.useComment)();
|
|
52
|
+
t
|
|
53
|
+
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
54
|
+
// const { className, userInfo, type, addParticipants } = useComment();
|
|
58
55
|
// const submitTip = useMemo(() => getSubmitTip(type, content), [content, type]);
|
|
59
56
|
|
|
60
57
|
// const document = useMemo(() => {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
8
|
-
var _react =
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
10
|
var _basicSdk = require("../basic-sdk");
|
|
10
11
|
var _errorBoundary = _interopRequireDefault(require("../components/error-boundary"));
|
|
11
12
|
// import { I18nextProvider } from 'react-i18next';
|
|
@@ -41,29 +42,26 @@ const SeafileCommentEditor = _ref => {
|
|
|
41
42
|
lang
|
|
42
43
|
} = settings || {};
|
|
43
44
|
_basicSdk.context.init(settings, api);
|
|
44
|
-
return (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
})))
|
|
66
|
-
// </I18nextProvider>
|
|
67
|
-
);
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
46
|
+
fallback: "loading"
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement(_errorBoundary.default, null, /*#__PURE__*/_react.default.createElement(_basicSdk.CommentProvider, {
|
|
48
|
+
type: type,
|
|
49
|
+
className: className,
|
|
50
|
+
pluginName: pluginName,
|
|
51
|
+
pluginEventBus: pluginEventBus,
|
|
52
|
+
pluginEvent: pluginEvent,
|
|
53
|
+
collaborators: collaborators,
|
|
54
|
+
participants: participants,
|
|
55
|
+
addParticipants: addParticipants
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_basicSdk.CommentEditor, {
|
|
57
|
+
content: content,
|
|
58
|
+
insertContent: insertContent,
|
|
59
|
+
onContentChange: onContentChange,
|
|
60
|
+
hiddenUserInfo: hiddenUserInfo,
|
|
61
|
+
hiddenComment: hiddenComment,
|
|
62
|
+
toolMenus: toolMenus,
|
|
63
|
+
closePanel: closePanel,
|
|
64
|
+
addParticipants: addParticipants
|
|
65
|
+
}))));
|
|
68
66
|
};
|
|
69
67
|
var _default = exports.default = SeafileCommentEditor;
|