@seafile/comment-editor 0.0.1-alpha.39 → 0.0.1-alpha.40

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.
@@ -1,12 +1,11 @@
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;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
- var _react = _interopRequireWildcard(require("react"));
8
+ var _react = _interopRequireDefault(require("react"));
10
9
  var _basicSdk = require("../basic-sdk");
11
10
  var _errorBoundary = _interopRequireDefault(require("../components/error-boundary"));
12
11
  const SeafileCommentEditor = _ref => {
@@ -34,38 +33,25 @@ const SeafileCommentEditor = _ref => {
34
33
  settings,
35
34
  api
36
35
  } = _ref;
37
- (0, _react.useEffect)(() => {
38
- console.log('comment-editor-mount');
39
- return () => {
40
- console.log('comment-editor-unMount');
41
- };
42
- }, []);
43
36
  _basicSdk.context.init(settings, api);
44
- return /*#__PURE__*/_react.default.createElement("div", null, "123")
45
- // <ErrorBoundary>
46
- // <CommentProvider
47
- // type={type}
48
- // className={className}
49
- // pluginName={pluginName}
50
- // pluginEventBus={pluginEventBus}
51
- // pluginEvent={pluginEvent}
52
- // collaborators={collaborators}
53
- // participants={participants}
54
- // addParticipants={addParticipants}
55
- // >
56
- // <CommentEditor
57
- // content={content}
58
- // insertContent={insertContent}
59
- // onContentChange={onContentChange}
60
-
61
- // hiddenUserInfo={hiddenUserInfo}
62
- // hiddenComment={hiddenComment}
63
- // toolMenus={toolMenus}
64
- // closePanel={closePanel}
65
- // addParticipants={addParticipants}
66
- // />
67
- // </CommentProvider>
68
- // </ErrorBoundary>
69
- ;
37
+ return /*#__PURE__*/_react.default.createElement(_errorBoundary.default, null, /*#__PURE__*/_react.default.createElement(_basicSdk.CommentProvider, {
38
+ type: type,
39
+ className: className,
40
+ pluginName: pluginName,
41
+ pluginEventBus: pluginEventBus,
42
+ pluginEvent: pluginEvent,
43
+ collaborators: collaborators,
44
+ participants: participants,
45
+ addParticipants: addParticipants
46
+ }, /*#__PURE__*/_react.default.createElement(_basicSdk.CommentEditor, {
47
+ content: content,
48
+ insertContent: insertContent,
49
+ onContentChange: onContentChange,
50
+ hiddenUserInfo: hiddenUserInfo,
51
+ hiddenComment: hiddenComment,
52
+ toolMenus: toolMenus,
53
+ closePanel: closePanel,
54
+ addParticipants: addParticipants
55
+ })));
70
56
  };
71
57
  var _default = exports.default = SeafileCommentEditor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/comment-editor",
3
- "version": "0.0.1-alpha.39",
3
+ "version": "0.0.1-alpha.40",
4
4
  "private": false,
5
5
  "description": "This is a comment editor",
6
6
  "main": "dist/index.js",