@seafile/sdoc-editor 1.0.220 → 2.0.1
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.
- package/dist/basic-sdk/extension/toolbar/header-toolbar/index.js +1 -4
- package/dist/basic-sdk/views/readonly-article.js +1 -4
- package/dist/basic-sdk/views/sdoc-viewer.js +3 -8
- package/dist/components/doc-operations/revision-operations/revisions/revisions-dialog/revision-operation/index.js +4 -3
- package/dist/components/tooltip/index.js +9 -8
- package/package.json +6 -6
|
@@ -25,7 +25,7 @@ var _core = require("../../core");
|
|
|
25
25
|
const HeaderToolbar = _ref => {
|
|
26
26
|
let {
|
|
27
27
|
editor,
|
|
28
|
-
readonly
|
|
28
|
+
readonly = false
|
|
29
29
|
} = _ref;
|
|
30
30
|
(0, _useSelectionUpdate.default)();
|
|
31
31
|
const isSelectTableCell = (0, _core.getSelectedNodeByType)(editor, _constants.TABLE_CELL);
|
|
@@ -78,7 +78,4 @@ const HeaderToolbar = _ref => {
|
|
|
78
78
|
readonly: readonly
|
|
79
79
|
})));
|
|
80
80
|
};
|
|
81
|
-
HeaderToolbar.defaultProps = {
|
|
82
|
-
readonly: false
|
|
83
|
-
};
|
|
84
81
|
var _default = exports.default = HeaderToolbar;
|
|
@@ -17,7 +17,7 @@ const ReadOnlyArticle = _ref => {
|
|
|
17
17
|
let {
|
|
18
18
|
editor,
|
|
19
19
|
slateValue,
|
|
20
|
-
showComment
|
|
20
|
+
showComment = false
|
|
21
21
|
} = _ref;
|
|
22
22
|
const decorate = (0, _decorates.usePipDecorate)(editor);
|
|
23
23
|
return /*#__PURE__*/_react.default.createElement(_slateReact.Slate, {
|
|
@@ -37,7 +37,4 @@ const ReadOnlyArticle = _ref => {
|
|
|
37
37
|
type: "editor"
|
|
38
38
|
})));
|
|
39
39
|
};
|
|
40
|
-
ReadOnlyArticle.defaultProps = {
|
|
41
|
-
showComment: false
|
|
42
|
-
};
|
|
43
40
|
var _default = exports.default = ReadOnlyArticle;
|
|
@@ -22,9 +22,9 @@ const SDocViewer = _ref => {
|
|
|
22
22
|
let {
|
|
23
23
|
editor,
|
|
24
24
|
document,
|
|
25
|
-
showToolbar,
|
|
26
|
-
showOutline,
|
|
27
|
-
showComment,
|
|
25
|
+
showToolbar = false,
|
|
26
|
+
showOutline = false,
|
|
27
|
+
showComment = false,
|
|
28
28
|
plugins = []
|
|
29
29
|
} = _ref;
|
|
30
30
|
if (!_context.default.api) {
|
|
@@ -65,9 +65,4 @@ const SDocViewer = _ref => {
|
|
|
65
65
|
slateValue: slateValue
|
|
66
66
|
}))))));
|
|
67
67
|
};
|
|
68
|
-
SDocViewer.defaultProps = {
|
|
69
|
-
showToolbar: false,
|
|
70
|
-
showOutline: false,
|
|
71
|
-
showComment: false
|
|
72
|
-
};
|
|
73
68
|
var _default = exports.default = SDocViewer;
|
|
@@ -45,11 +45,12 @@ const RevisionOperation = _ref => {
|
|
|
45
45
|
hideArrow: true,
|
|
46
46
|
toggle: toggle,
|
|
47
47
|
fade: false,
|
|
48
|
-
modifiers: {
|
|
49
|
-
|
|
48
|
+
modifiers: [{
|
|
49
|
+
name: 'preventOverflow',
|
|
50
|
+
options: {
|
|
50
51
|
boundariesElement: document.body
|
|
51
52
|
}
|
|
52
|
-
},
|
|
53
|
+
}],
|
|
53
54
|
ref: popoverRef
|
|
54
55
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
55
56
|
className: "sdoc-dropdown-menu-container"
|
|
@@ -14,20 +14,21 @@ const Tooltip = _ref => {
|
|
|
14
14
|
target,
|
|
15
15
|
children,
|
|
16
16
|
className,
|
|
17
|
-
modifiers,
|
|
17
|
+
modifiers = [],
|
|
18
18
|
placement = 'bottom',
|
|
19
19
|
fade = false,
|
|
20
20
|
delay = 0
|
|
21
21
|
} = _ref;
|
|
22
|
+
const hasBoundary = modifiers.find(item => item.name === 'preventOverflow');
|
|
23
|
+
const newModifiers = hasBoundary ? modifiers : [...modifiers, {
|
|
24
|
+
name: 'preventOverflow',
|
|
25
|
+
options: {
|
|
26
|
+
boundary: window.document.body
|
|
27
|
+
}
|
|
28
|
+
}];
|
|
22
29
|
const props = {
|
|
23
30
|
popperClassName: (0, _classnames.default)('sdoc-tooltip', className),
|
|
24
|
-
modifiers:
|
|
25
|
-
...modifiers,
|
|
26
|
-
preventOverflow: {
|
|
27
|
-
boundariesElement: window.document.body,
|
|
28
|
-
...(modifiers === null || modifiers === void 0 ? void 0 : modifiers.preventOverflow)
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
+
modifiers: newModifiers,
|
|
31
32
|
placement,
|
|
32
33
|
target,
|
|
33
34
|
fade,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "This is a sdoc editor",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"randomcolor": "0.6.2",
|
|
26
26
|
"react-color": "2.19.3",
|
|
27
27
|
"react-cookies": "0.1.1",
|
|
28
|
-
"reactstrap": "
|
|
28
|
+
"reactstrap": "9.2.3",
|
|
29
29
|
"rehype-format": "5.0.0",
|
|
30
30
|
"rehype-mathjax": "5.0.0",
|
|
31
31
|
"rehype-raw": "7.0.0",
|
|
@@ -80,7 +80,6 @@
|
|
|
80
80
|
"@babel/plugin-transform-modules-commonjs": "7.24.8",
|
|
81
81
|
"@babel/plugin-transform-private-methods": "7.23.3",
|
|
82
82
|
"@babel/runtime": "^7.10.2",
|
|
83
|
-
"@gatsbyjs/reach-router": "^1.3.9",
|
|
84
83
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
85
84
|
"@svgr/webpack": "8.1.0",
|
|
86
85
|
"babel-loader": "9.1.3",
|
|
@@ -132,13 +131,14 @@
|
|
|
132
131
|
"prettier": "3.1.0",
|
|
133
132
|
"prop-types": "15.8.1",
|
|
134
133
|
"raf": "3.4.0",
|
|
135
|
-
"react": "
|
|
134
|
+
"react": "18.3.1",
|
|
136
135
|
"react-app-polyfill": "^3.0.0",
|
|
137
136
|
"react-dev-utils": "^12.0.1",
|
|
138
|
-
"react-dom": "
|
|
139
|
-
"react-hot-loader": "4.13.1",
|
|
137
|
+
"react-dom": "18.3.1",
|
|
140
138
|
"react-i18next": "12.1.4",
|
|
141
139
|
"react-refresh": "^0.11.0",
|
|
140
|
+
"react-router": "7.1.3",
|
|
141
|
+
"react-router-dom": "7.1.3",
|
|
142
142
|
"release-it": "17.3.0",
|
|
143
143
|
"resolve": "^1.20.0",
|
|
144
144
|
"resolve-url-loader": "5.0.0",
|