@seafile/comment-editor 0.0.16 → 1.0.0
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.
|
@@ -38,6 +38,11 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
38
38
|
imageIndex: (prevState.imageIndex + 1) % this.images.length
|
|
39
39
|
}));
|
|
40
40
|
});
|
|
41
|
+
(0, _defineProperty2.default)(this, "setImageIndex", index => {
|
|
42
|
+
this.setState({
|
|
43
|
+
imageIndex: index
|
|
44
|
+
});
|
|
45
|
+
});
|
|
41
46
|
const {
|
|
42
47
|
editor,
|
|
43
48
|
imageUrl
|
|
@@ -68,6 +73,9 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
68
73
|
className: "flex-shrink-0"
|
|
69
74
|
}, "(", imageIndex + 1, "/", this.images.length, ")"));
|
|
70
75
|
return /*#__PURE__*/_react.default.createElement(_reactImageLightbox.default, {
|
|
76
|
+
imageItems: this.images,
|
|
77
|
+
currentIndex: imageIndex,
|
|
78
|
+
setImageIndex: index => this.setImageIndex(index),
|
|
71
79
|
wrapperClassName: "sf-editor-image-previewer",
|
|
72
80
|
imageTitle: imageTitleEl,
|
|
73
81
|
mainSrc: mainSrc,
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/comment-editor",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "This is a comment editor",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@seafile/react-image-lightbox": "
|
|
8
|
+
"@seafile/react-image-lightbox": "^5.0.0",
|
|
9
9
|
"@seafile/slate": "0.91.8",
|
|
10
10
|
"@seafile/slate-history": "0.86.2",
|
|
11
11
|
"@seafile/slate-hyperscript": "0.81.7",
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"classnames": "2.3.2",
|
|
15
15
|
"copy-to-clipboard": "^3.3.3",
|
|
16
16
|
"deep-copy": "1.4.2",
|
|
17
|
-
"dtable-ui-component": "^6.0.15",
|
|
18
17
|
"is-hotkey": "0.2.0",
|
|
19
18
|
"is-url": "^1.2.4",
|
|
20
19
|
"react-transition-group": "4.4.5",
|