@seafile/seafile-editor 1.0.91 → 1.0.93

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.
@@ -15,7 +15,6 @@ var _eventHandler = _interopRequireDefault(require("../../utils/event-handler"))
15
15
  var _withPropsEditor = _interopRequireDefault(require("./with-props-editor"));
16
16
  var _core = require("../../extension/core");
17
17
  var _common = require("../../utils/common");
18
- var _userLinkClick = _interopRequireDefault(require("../../hooks/user-link-click"));
19
18
  require("./index.css");
20
19
  const isMacOS = (0, _common.isMac)();
21
20
  const InlineEditor = _ref => {
@@ -102,7 +101,6 @@ const InlineEditor = _ref => {
102
101
  focusNode(editor, focusRangeRef.current);
103
102
  // eslint-disable-next-line react-hooks/exhaustive-deps
104
103
  }, [enableEdit]);
105
- (0, _userLinkClick.default)();
106
104
 
107
105
  // willUnmount
108
106
  (0, _react.useEffect)(() => {
@@ -16,6 +16,7 @@ const withPropsEditor = function (editor) {
16
16
  if (props.columns) {
17
17
  newEditor.columns = props.columns;
18
18
  }
19
+ newEditor.isInlineEditor = true;
19
20
  return newEditor;
20
21
  };
21
22
  var _default = exports.default = withPropsEditor;
@@ -46,6 +46,10 @@ const renderLink = (_ref, editor) => {
46
46
  e.stopPropagation();
47
47
  const eventBus = _eventBus.default.getInstance();
48
48
  if (isReadonly) {
49
+ if (editor.isInlineEditor) {
50
+ window.open(element.url);
51
+ return;
52
+ }
49
53
  eventBus.dispatch(_eventTypes.EXTERNAL_EVENTS.ON_LINK_CLICK, e);
50
54
  return;
51
55
  }
@@ -67,7 +71,7 @@ const renderLink = (_ref, editor) => {
67
71
  });
68
72
  setIsShowPopover(true);
69
73
  registerClickEvent();
70
- }, [editor, isReadonly, registerClickEvent]);
74
+ }, [editor, isReadonly, registerClickEvent, element]);
71
75
  const onHrefClick = (0, _react.useCallback)(e => {
72
76
  e.preventDefault();
73
77
  }, []);
@@ -35,6 +35,8 @@ const getPreviewInfo = (nodes, previewContent) => {
35
35
  if (currentNode.checked) {
36
36
  previewContent.checklist.completed++;
37
37
  }
38
+ // recalculate child elements
39
+ getPreviewInfo(currentNode.children, previewContent);
38
40
  } else {
39
41
  getPreviewInfo(currentNode.children, previewContent);
40
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-editor",
3
- "version": "1.0.91",
3
+ "version": "1.0.93",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {