dtable-ui-component 6.0.113 → 6.0.114-kdc.10
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.
|
@@ -62,6 +62,8 @@ function ImagePreviewerLightbox(props) {
|
|
|
62
62
|
const imageItem = imageSrcList[currentImageIndex];
|
|
63
63
|
const URL = imageItem ? imageItem.thumbnail : '';
|
|
64
64
|
const imageName = imageItem ? imageItem.name : '';
|
|
65
|
+
const nextImg = imageSrcList[(currentImageIndex + 1) % imagesLength];
|
|
66
|
+
const prevImg = imageSrcList[(currentImageIndex + imagesLength - 1) % imagesLength];
|
|
65
67
|
_react.default.useEffect(() => {
|
|
66
68
|
setCurrentImageIndex(imageIndex);
|
|
67
69
|
}, [imageIndex]);
|
|
@@ -75,25 +77,15 @@ function ImagePreviewerLightbox(props) {
|
|
|
75
77
|
size: 512
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
|
-
const imageTitleDOM = props.imageTitle || /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
79
|
-
className: "d-flex",
|
|
80
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
81
|
-
className: "text-truncate",
|
|
82
|
-
children: imageName || ''
|
|
83
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
84
|
-
className: "flex-shrink-0 pl-1",
|
|
85
|
-
children: ["(", currentImageIndex + 1, "/", imagesLength, ")"]
|
|
86
|
-
})]
|
|
87
|
-
});
|
|
88
80
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactImageLightbox.default, {
|
|
89
81
|
imageItems: imageSrcList,
|
|
90
82
|
currentIndex: currentImageIndex,
|
|
91
|
-
setImageIndex:
|
|
83
|
+
setImageIndex: setCurrentImageIndex,
|
|
92
84
|
wrapperClassName: (0, _classnames.default)('dtable-ui-component', className),
|
|
93
|
-
imageTitle:
|
|
85
|
+
imageTitle: "".concat(imageName, " (").concat(imageIndex + 1, "/").concat(imagesLength, ")"),
|
|
94
86
|
mainSrc: mainSrc,
|
|
95
|
-
nextSrc:
|
|
96
|
-
prevSrc:
|
|
87
|
+
nextSrc: nextImg.thumbnail || nextImg.src,
|
|
88
|
+
prevSrc: prevImg.thumbnail || prevImg.src,
|
|
97
89
|
imagePadding: 70,
|
|
98
90
|
viewOriginalImageLabel: (0, _lang.getLocale)('View_original_image'),
|
|
99
91
|
enableRotate: canRotateImage,
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-ui-component",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.114kdc.10",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@seafile/react-image-lightbox": "^5.0.
|
|
6
|
+
"@seafile/react-image-lightbox": "^5.0.7",
|
|
7
7
|
"@seafile/seafile-calendar": "^1.0.10",
|
|
8
|
-
"@seafile/seafile-editor": "^3.0.
|
|
8
|
+
"@seafile/seafile-editor": "^3.0.32",
|
|
9
9
|
"classnames": "~2.5.*",
|
|
10
10
|
"dayjs": "1.10.7",
|
|
11
11
|
"dtable-utils": "~5.0.27",
|