@seafile/sdoc-editor 1.0.68-beta → 1.0.68-beta2

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.
@@ -116,7 +116,6 @@ const GlobalComment = _ref => {
116
116
  if (contentRef.current && contentRef.current.contains(event.target)) return true;
117
117
  return false;
118
118
  }, []);
119
- console.log(commentList);
120
119
  return /*#__PURE__*/_react.default.createElement("div", {
121
120
  className: "sdoc-comment-drawer"
122
121
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -14,7 +14,6 @@ const useCommentList = () => {
14
14
  const {
15
15
  comment_list
16
16
  } = commentsInfo || {};
17
- console.log(comment_list);
18
17
  const [commentType, setCommentType] = (0, _react.useState)(_constants.COMMENT_TYPES.ALL);
19
18
  const [commentList, setCommentList] = (0, _react.useState)([]);
20
19
  (0, _react.useEffect)(() => {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.PLUGIN_DISPLAY_TYPE = exports.PLUGIN_BTN_POSITION = void 0;
7
7
  const PLUGIN_DISPLAY_TYPE = exports.PLUGIN_DISPLAY_TYPE = {
8
- INLAY_RIGHT: 'inlay-right',
8
+ RIGHT_PANEL: 'right-panel',
9
9
  DIALOG: 'dialog'
10
10
  };
11
11
  const PLUGIN_BTN_POSITION = exports.PLUGIN_BTN_POSITION = {
@@ -9,6 +9,7 @@ exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _hooks = require("../../hooks");
11
11
  var _resizeWidth = _interopRequireDefault(require("./resize-width"));
12
+ var _constants = require("../constants");
12
13
  require("./index.css");
13
14
  const MIN_PANEL_WIDTH = 360;
14
15
  const MAX_PANEL_WIDTH = 620;
@@ -56,7 +57,7 @@ const RightPanel = _ref => {
56
57
  if (!displayPluginName) return null;
57
58
  const plugin = plugins.find(p => p.name === displayPluginName);
58
59
  if (!plugin) return null;
59
- if (plugin.display_type && plugin.display_type !== 'right-panel') return null;
60
+ if (plugin.display_type && plugin.display_type !== _constants.PLUGIN_DISPLAY_TYPE.RIGHT_PANEL) return null;
60
61
  const Component = plugin.component;
61
62
  if (!Component) return null;
62
63
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -10,6 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
11
  var _hooks = require("../../hooks");
12
12
  var _mouseEvent = require("../../basic-sdk/utils/mouse-event");
13
+ var _constants = require("../../basic-sdk/constants");
13
14
  const PluginsOperations = () => {
14
15
  const {
15
16
  plugins,
@@ -19,7 +20,7 @@ const PluginsOperations = () => {
19
20
  (0, _mouseEvent.eventStopPropagation)(event);
20
21
  updateDisplayPlugin(pluginName);
21
22
  }, [updateDisplayPlugin]);
22
- return plugins.filter(plugin => !plugin.position || plugin.position === 'default').map(plugin => {
23
+ return plugins.filter(plugin => !plugin.position || plugin.position === _constants.PLUGIN_BTN_POSITION.DEFAULT).map(plugin => {
23
24
  const {
24
25
  name,
25
26
  icon
@@ -27,7 +27,7 @@ const PluginsProvider = _ref => {
27
27
  name: 'sdoc-comment',
28
28
  icon: 'sdoc-comments',
29
29
  resizable_width: true,
30
- display_type: 'right-panel',
30
+ display_type: _constants.PLUGIN_DISPLAY_TYPE.RIGHT_PANEL,
31
31
  component: _comment.default
32
32
  });
33
33
  }
@@ -39,7 +39,7 @@ const PluginsProvider = _ref => {
39
39
  return;
40
40
  }
41
41
  const plugin = plugins.find(plugin => plugin.name === name);
42
- if ((plugin === null || plugin === void 0 ? void 0 : plugin.display_type) === _constants.PLUGIN_DISPLAY_TYPE.INLAY_RIGHT) {
42
+ if ((plugin === null || plugin === void 0 ? void 0 : plugin.display_type) === _constants.PLUGIN_DISPLAY_TYPE.RIGHT_PANEL) {
43
43
  setDisplayName(name);
44
44
  }
45
45
  }, [displayName, plugins]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.68beta",
3
+ "version": "1.0.68beta2",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",