@seafile/sdoc-editor 2.0.147 → 2.0.148

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.
@@ -94,9 +94,9 @@ var EditorComment = function EditorComment(_ref) {
94
94
  }, [editor, element_comments_map, hiddenComment]);
95
95
  (0, _react.useEffect)(function () {
96
96
  var handleHoverContextComment = function handleHoverContextComment(event) {
97
- var _parentDom$className;
98
97
  var parentDom = event.target.parentElement;
99
- if (parentDom !== null && parentDom !== void 0 && (_parentDom$className = parentDom.className) !== null && _parentDom$className !== void 0 && _parentDom$className.includes('sdoc_comment_')) {
98
+ var clazzNames = (parentDom === null || parentDom === void 0 ? void 0 : parentDom.className) || [];
99
+ if (clazzNames.includes('sdoc_comment_')) {
100
100
  var isHover = event.type === 'mouseover';
101
101
  var matchedAttributes = parentDom.className.split(' ').filter(function (cls) {
102
102
  return cls.startsWith('sdoc_comment_');
@@ -16,8 +16,7 @@ var notify = function notify($title, $options) {
16
16
  // auto clear notifications
17
17
  var timer = setTimeout(notification.close.bind(notification), 5000);
18
18
  notification.onshow = function (event) {
19
- var _context$getSetting = _context["default"].getSetting('mediaUrl'),
20
- mediaUrl = _context$getSetting.mediaUrl;
19
+ var mediaUrl = _context["default"].getSetting('mediaUrl');
21
20
  var newAudioElement = document.createElement('audio');
22
21
  newAudioElement.setAttribute('src', "".concat(mediaUrl, "audio/classic.mp3"));
23
22
  newAudioElement.setAttribute('autoplay', 'autoplay');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "2.0.147",
3
+ "version": "2.0.148",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -17,7 +17,7 @@
17
17
  "license": "ISC",
18
18
  "description": "",
19
19
  "dependencies": {
20
- "@seafile/comment-editor": "^0.0.12",
20
+ "@seafile/comment-editor": "0.0.13",
21
21
  "@seafile/print-js": "1.6.6",
22
22
  "@seafile/react-image-lightbox": "4.0.2",
23
23
  "@seafile/slate": "0.91.8",
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "c3c26480c7f0959a1425e0f6f7048154f5aa87f4"
74
+ "gitHead": "535d250bacadefbab5f4f64ae47cca07620ae043"
75
75
  }