@seafile/sdoc-editor 2.0.192 → 2.0.194
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.
|
@@ -80,7 +80,7 @@ var AddVideoLinkDialog = function AddVideoLinkDialog(_ref) {
|
|
|
80
80
|
returnFocusAfterClose: false
|
|
81
81
|
}, /*#__PURE__*/_react["default"].createElement(_reactstrap.ModalHeader, {
|
|
82
82
|
close: close
|
|
83
|
-
}, t('
|
|
83
|
+
}, t('Add_video_link')), /*#__PURE__*/_react["default"].createElement(_reactstrap.ModalBody, null, /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
84
|
className: "form-group"
|
|
85
85
|
}, /*#__PURE__*/_react["default"].createElement(_reactstrap.Label, {
|
|
86
86
|
"for": "addLink"
|
|
@@ -101,7 +101,7 @@ var AddVideoLinkDialog = function AddVideoLinkDialog(_ref) {
|
|
|
101
101
|
fontSize: '12px',
|
|
102
102
|
color: '#787774'
|
|
103
103
|
}
|
|
104
|
-
}, t('
|
|
104
|
+
}, t('Support_YouTube_Bilibili_and_more')))), /*#__PURE__*/_react["default"].createElement(_reactstrap.ModalFooter, null, /*#__PURE__*/_react["default"].createElement(_reactstrap.Button, {
|
|
105
105
|
color: "secondary",
|
|
106
106
|
onClick: closeDialog
|
|
107
107
|
}, t('Cancel')), /*#__PURE__*/_react["default"].createElement(_reactstrap.Button, {
|
|
@@ -167,6 +167,7 @@ var SideToolbar = function SideToolbar() {
|
|
|
167
167
|
}, [editor, isShowSideMenu, scrollRef, sidePosition.top]);
|
|
168
168
|
var onMouseDown = (0, _react.useCallback)(function (e) {
|
|
169
169
|
e.stopPropagation();
|
|
170
|
+
if (!editor.selection) (0, _helpers2.setSelection)(editor, slateNode);
|
|
170
171
|
var domSelection = window.getSelection();
|
|
171
172
|
if (domSelection.type !== 'Range' || !editor.selection || _slate.Path.equals(editor.selection.focus.path, editor.selection.anchor.path)) {
|
|
172
173
|
draggedPreviewContainer.current = null;
|
|
@@ -238,7 +239,7 @@ var SideToolbar = function SideToolbar() {
|
|
|
238
239
|
draggedSourcePaths.current = null;
|
|
239
240
|
}
|
|
240
241
|
}
|
|
241
|
-
}, [editor]);
|
|
242
|
+
}, [editor, slateNode]);
|
|
242
243
|
var onShowSideMenuToggle = (0, _react.useCallback)(function () {
|
|
243
244
|
(0, _helpers2.setSelection)(editor, slateNode);
|
|
244
245
|
var _menuRef$current$getB = menuRef.current.getBoundingClientRect(),
|
|
@@ -41,7 +41,12 @@ var ResizeWidth = function ResizeWidth(_ref) {
|
|
|
41
41
|
var calculateResizedWidth = function calculateResizedWidth(event) {
|
|
42
42
|
var width = getWidthFromMouseEvent(event);
|
|
43
43
|
var resizedWidth = document.body.clientWidth - width;
|
|
44
|
-
if (minWidth && resizedWidth < minWidth
|
|
44
|
+
if (minWidth && resizedWidth < minWidth) {
|
|
45
|
+
resizedWidth = minWidth;
|
|
46
|
+
}
|
|
47
|
+
if (maxWidth && resizedWidth > maxWidth) {
|
|
48
|
+
resizedWidth = maxWidth;
|
|
49
|
+
}
|
|
45
50
|
return resizedWidth;
|
|
46
51
|
};
|
|
47
52
|
var onResizeWidth = function onResizeWidth(event) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.194",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "764aab69f182a958106fa0db5286064bf64c2fd6"
|
|
75
75
|
}
|