@seafile/sdoc-editor 2.0.129 → 2.0.130
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.
|
@@ -288,7 +288,8 @@ var SdocEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
288
288
|
updateSlateValue: onValueChange,
|
|
289
289
|
showComment: false
|
|
290
290
|
})), isShowHeaderToolbar && /*#__PURE__*/_react["default"].createElement(_extension.HeaderToolbar, {
|
|
291
|
-
editor: validEditor
|
|
291
|
+
editor: validEditor,
|
|
292
|
+
isEdit: isEdit
|
|
292
293
|
}))), /*#__PURE__*/_react["default"].createElement(_insertElementDialog["default"], {
|
|
293
294
|
editor: validEditor
|
|
294
295
|
}));
|
|
@@ -26,10 +26,11 @@ var _insertToolbar = _interopRequireDefault(require("./insert-toolbar"));
|
|
|
26
26
|
var HeaderToolbar = function HeaderToolbar(_ref) {
|
|
27
27
|
var editor = _ref.editor,
|
|
28
28
|
_ref$readonly = _ref.readonly,
|
|
29
|
-
readonly = _ref$readonly === void 0 ? false : _ref$readonly
|
|
29
|
+
readonly = _ref$readonly === void 0 ? false : _ref$readonly,
|
|
30
|
+
isEdit = _ref.isEdit;
|
|
30
31
|
(0, _useSelectionUpdate["default"])();
|
|
31
32
|
var isSelectTableCell = (0, _core.getSelectedNodeByType)(editor, _constants.TABLE_CELL);
|
|
32
|
-
if (_commonUtils.isMobile) {
|
|
33
|
+
if (_commonUtils.isMobile && isEdit) {
|
|
33
34
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
34
35
|
className: "sdoc-editor-toolbar"
|
|
35
36
|
}, /*#__PURE__*/_react["default"].createElement(_commons.MenuGroup, null, /*#__PURE__*/_react["default"].createElement(_historyMenu["default"], {
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
min-width: 360px;
|
|
6
6
|
position: relative;
|
|
7
7
|
right: 0;
|
|
8
|
-
|
|
9
|
-
opacity: 0;
|
|
10
|
-
transition: transform .3s, opacity .3s;
|
|
8
|
+
animation: rightdrawer .3s 1ms;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
.sdoc-content-right-panel-wrapper .sdoc-content-right-panel {
|
|
@@ -17,7 +15,12 @@
|
|
|
17
15
|
border-left: 1px solid #d8d8d8;
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
@keyframes rightdrawer {
|
|
19
|
+
0% {
|
|
20
|
+
transform: translate(100%);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
100% {
|
|
24
|
+
transform: translate(0);
|
|
25
|
+
}
|
|
23
26
|
}
|
|
@@ -60,17 +60,12 @@ var RightPanel = function RightPanel(_ref) {
|
|
|
60
60
|
(0, _react.useEffect)(function () {
|
|
61
61
|
var isShowGlobalComments = displayPluginName === 'sdoc-comment' ? true : false;
|
|
62
62
|
var commentBox = document.querySelector('.sdoc-content-right-panel-wrapper');
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
behavior: 'smooth'
|
|
70
|
-
});
|
|
71
|
-
} else {
|
|
72
|
-
commentBox === null || commentBox === void 0 ? void 0 : commentBox.classList.remove('with-comment');
|
|
73
|
-
}
|
|
63
|
+
var editorEl = document.querySelector('#sdoc-scroll-container');
|
|
64
|
+
var commentWidth = commentBox === null || commentBox === void 0 ? void 0 : commentBox.offsetWidth;
|
|
65
|
+
editorEl.scrollTo({
|
|
66
|
+
left: commentWidth + 36,
|
|
67
|
+
behavior: 'smooth'
|
|
68
|
+
});
|
|
74
69
|
var settings = _localStorageUtils["default"].getItem(_constants.SDOC_STORAGE) || {};
|
|
75
70
|
_localStorageUtils["default"].setItem(_constants.SDOC_STORAGE, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, settings), {}, {
|
|
76
71
|
isShowGlobalComments: isShowGlobalComments
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.130",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "10b0c1c64b87fea3d83594109d061393c24d66a8"
|
|
74
74
|
}
|