@seafile/sdoc-editor 3.0.7-alpha-0.0.1 → 3.0.8
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/LICENSE.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright (c) 2025 Seafile Ltd.
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
@@ -50,6 +50,11 @@ var ImagePreviewer = /*#__PURE__*/function (_React$Component) {
|
|
|
50
50
|
};
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
|
+
(0, _defineProperty2["default"])(_this, "setImageIndex", function (index) {
|
|
54
|
+
_this.setState({
|
|
55
|
+
imageIndex: index
|
|
56
|
+
});
|
|
57
|
+
});
|
|
53
58
|
var _editor = props.editor,
|
|
54
59
|
imageUrl = props.imageUrl;
|
|
55
60
|
_this.images = _this.getImageNodes(_editor.children);
|
|
@@ -64,6 +69,7 @@ var ImagePreviewer = /*#__PURE__*/function (_React$Component) {
|
|
|
64
69
|
return (0, _createClass2["default"])(ImagePreviewer, [{
|
|
65
70
|
key: "render",
|
|
66
71
|
value: function render() {
|
|
72
|
+
var _this2 = this;
|
|
67
73
|
var imageIndex = this.state.imageIndex;
|
|
68
74
|
var imageItemsLength = this.images.length;
|
|
69
75
|
var mainSrc = this.images[imageIndex] || '';
|
|
@@ -82,6 +88,11 @@ var ImagePreviewer = /*#__PURE__*/function (_React$Component) {
|
|
|
82
88
|
className: "flex-shrink-0"
|
|
83
89
|
}, "(", imageIndex + 1, "/", this.images.length, ")"));
|
|
84
90
|
return /*#__PURE__*/_react["default"].createElement(_reactImageLightbox["default"], {
|
|
91
|
+
imageItems: this.images,
|
|
92
|
+
currentIndex: imageIndex,
|
|
93
|
+
setImageIndex: function setImageIndex(index) {
|
|
94
|
+
return _this2.setImageIndex(index);
|
|
95
|
+
},
|
|
85
96
|
wrapperClassName: "sf-editor-image-previewer",
|
|
86
97
|
imageTitle: imageTitleEl,
|
|
87
98
|
mainSrc: mainSrc,
|
|
@@ -139,7 +139,6 @@ var SdocFileLink = function SdocFileLink(_ref) {
|
|
|
139
139
|
if (element.type === _elementType.WIKI_LINK) {
|
|
140
140
|
data = element;
|
|
141
141
|
}
|
|
142
|
-
console.log(22, e);
|
|
143
142
|
var eventBus = _eventBus["default"].getInstance();
|
|
144
143
|
eventBus.dispatch(_constants.INTERNAL_EVENT.TRANSFER_PREVIEW_FILE_ID, data);
|
|
145
144
|
setTimeout(function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.8",
|
|
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": "
|
|
20
|
+
"@seafile/comment-editor": "0.0.15",
|
|
21
21
|
"@seafile/print-js": "1.6.6",
|
|
22
22
|
"@seafile/react-image-lightbox": "^5.0.0",
|
|
23
23
|
"@seafile/slate": "0.91.8",
|
|
@@ -70,5 +70,6 @@
|
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
|
-
}
|
|
73
|
+
},
|
|
74
|
+
"gitHead": "593bde2b9a115d9ea8ec012d5840731d023a8a32"
|
|
74
75
|
}
|