dtable-ui-component 6.0.107 → 6.0.108
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/lib/ImagePreviewerLightbox/index.css +49 -6
- package/lib/ImagePreviewerLightbox/index.js +19 -7
- package/lib/locales/de.json +5 -0
- package/lib/locales/en.json +6 -0
- package/lib/locales/es.json +5 -0
- package/lib/locales/fr.json +5 -0
- package/lib/locales/pt.json +5 -0
- package/lib/locales/ru.json +5 -0
- package/lib/locales/zh-CN.json +5 -0
- package/package.json +2 -2
|
@@ -4,18 +4,61 @@
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.ril__outer .ril__toolbarItem {
|
|
7
|
-
height: 50px;
|
|
8
|
-
color: #fff;
|
|
9
|
-
display: inline-block;
|
|
10
|
-
font-size: 120%;
|
|
11
|
-
line-height: 50px;
|
|
12
7
|
max-width: 100%;
|
|
13
|
-
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
14
11
|
padding: 0;
|
|
12
|
+
color: #fff;
|
|
13
|
+
overflow: hidden;
|
|
15
14
|
text-overflow: ellipsis;
|
|
16
15
|
white-space: nowrap;
|
|
17
16
|
}
|
|
18
17
|
|
|
18
|
+
.ril__outer .ril__toolbarItem button {
|
|
19
|
+
background-size: 20px;
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ril__builtinButton:hover,
|
|
24
|
+
.ril__builtinButton:focus {
|
|
25
|
+
background-color: #666;
|
|
26
|
+
opacity: 1 !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ril__viewOriginalButton {
|
|
30
|
+
height: 40px;
|
|
31
|
+
width: 178px!important;
|
|
32
|
+
-ms-flex-negative: 0;
|
|
33
|
+
background: #333;
|
|
34
|
+
border-radius: 8px;
|
|
35
|
+
color: #fff;
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
font-size: 16px;
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: 400;
|
|
40
|
+
line-height: normal
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.mobile-image-footer-choice .ril__builtinButton {
|
|
44
|
+
opacity: 1 !important;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ril__builtinButton:hover,
|
|
48
|
+
.ril__builtinButton:focus {
|
|
49
|
+
background-color: #666 !important;
|
|
50
|
+
opacity: 1 !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ril__builtinButtonDisabled {
|
|
54
|
+
cursor: default;
|
|
55
|
+
opacity: 0.5 !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ril__builtinButtonDisabled:hover {
|
|
59
|
+
opacity: 0.5 !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
19
62
|
.ril-caption .ril__builtinButton {
|
|
20
63
|
width: 24px;
|
|
21
64
|
}
|
|
@@ -42,7 +42,11 @@ function ImagePreviewerLightbox(props) {
|
|
|
42
42
|
return src;
|
|
43
43
|
});
|
|
44
44
|
const imagesLength = imageSrcList.length;
|
|
45
|
-
const
|
|
45
|
+
const [currentImageIndex, setCurrentImageIndex] = _react.default.useState(imageIndex || 0);
|
|
46
|
+
const URL = imageSrcList[currentImageIndex];
|
|
47
|
+
_react.default.useEffect(() => {
|
|
48
|
+
setCurrentImageIndex(imageIndex);
|
|
49
|
+
}, [imageIndex]);
|
|
46
50
|
|
|
47
51
|
// Handle URL has special symbol %$
|
|
48
52
|
let imageName = '';
|
|
@@ -69,15 +73,18 @@ function ImagePreviewerLightbox(props) {
|
|
|
69
73
|
children: imageName
|
|
70
74
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
71
75
|
className: "flex-shrink-0 pl-1",
|
|
72
|
-
children: ["(",
|
|
76
|
+
children: ["(", currentImageIndex + 1, "/", imagesLength, ")"]
|
|
73
77
|
})]
|
|
74
78
|
});
|
|
75
79
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactImageLightbox.default, {
|
|
80
|
+
imageItems: imageSrcList,
|
|
81
|
+
currentIndex: currentImageIndex,
|
|
82
|
+
setImageIndex: index => setCurrentImageIndex(index),
|
|
76
83
|
wrapperClassName: (0, _classnames.default)('dtable-ui-component', className),
|
|
77
84
|
imageTitle: imageTitleDOM,
|
|
78
85
|
mainSrc: mainSrc,
|
|
79
|
-
nextSrc: imageSrcList[(
|
|
80
|
-
prevSrc: imageSrcList[(
|
|
86
|
+
nextSrc: imageSrcList[(currentImageIndex + 1) % imagesLength],
|
|
87
|
+
prevSrc: imageSrcList[(currentImageIndex + imagesLength - 1) % imagesLength],
|
|
81
88
|
imagePadding: 70,
|
|
82
89
|
viewOriginalImageLabel: (0, _lang.getLocale)('View_original_image'),
|
|
83
90
|
enableRotate: canRotateImage,
|
|
@@ -88,14 +95,19 @@ function ImagePreviewerLightbox(props) {
|
|
|
88
95
|
onClickMoveDown: props.moveToNextRowImage,
|
|
89
96
|
onViewOriginal: props.onViewOriginal,
|
|
90
97
|
onRotateImage: canRotateImage ? deg => {
|
|
91
|
-
onRotateImage(
|
|
98
|
+
onRotateImage(currentImageIndex, deg);
|
|
92
99
|
} : null,
|
|
93
100
|
onClickDelete: !readOnly && deleteImage ? () => {
|
|
94
|
-
deleteImage(
|
|
101
|
+
deleteImage(currentImageIndex, 'previewer');
|
|
95
102
|
} : null,
|
|
96
103
|
onClickDownload: downloadImage ? () => {
|
|
97
104
|
downloadImage(URL);
|
|
98
|
-
} : null
|
|
105
|
+
} : null,
|
|
106
|
+
zoomInTip: (0, _lang.getLocale)('Zoom_in'),
|
|
107
|
+
zoomOutTip: (0, _lang.getLocale)('Zoom_out'),
|
|
108
|
+
rotateTip: (0, _lang.getLocale)('Rotate_image'),
|
|
109
|
+
deleteTip: (0, _lang.getLocale)('Delete_image'),
|
|
110
|
+
downloadImageTip: (0, _lang.getLocale)('Download_image')
|
|
99
111
|
});
|
|
100
112
|
}
|
|
101
113
|
var _default = exports.default = ImagePreviewerLightbox;
|
package/lib/locales/de.json
CHANGED
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
"Specific_departments": "Bestimmte Bereiche",
|
|
24
24
|
"Deleted_department": "Gelöschter Bereich",
|
|
25
25
|
"View_original_image": "View original image",
|
|
26
|
+
"Rotate_image": "Rotate image",
|
|
27
|
+
"Delete_image": "delete image",
|
|
28
|
+
"Download_image": "Download image",
|
|
29
|
+
"Zoom_in": "Zoom in",
|
|
30
|
+
"Zoom_out": "Zoom out",
|
|
26
31
|
"Add_filter": "Filter hinzufügen",
|
|
27
32
|
"And": "Und",
|
|
28
33
|
"Or": "Oder",
|
package/lib/locales/en.json
CHANGED
|
@@ -23,6 +23,12 @@
|
|
|
23
23
|
"Specific_departments": "Specific departments",
|
|
24
24
|
"Deleted_department": "Deleted department",
|
|
25
25
|
"View_original_image": "View original image",
|
|
26
|
+
|
|
27
|
+
"Rotate_image": "Rotate image",
|
|
28
|
+
"Delete_image": "delete image",
|
|
29
|
+
"Download_image": "Download image",
|
|
30
|
+
"Zoom_in": "Zoom in",
|
|
31
|
+
"Zoom_out": "Zoom out",
|
|
26
32
|
"Add_filter": "Add filter",
|
|
27
33
|
"And": "And",
|
|
28
34
|
"Or": "Or",
|
package/lib/locales/es.json
CHANGED
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
"Specific_departments": "Specific departments",
|
|
24
24
|
"Deleted_department": "Deleted department",
|
|
25
25
|
"View_original_image": "View original image",
|
|
26
|
+
"Rotate_image": "Rotate image",
|
|
27
|
+
"Delete_image": "delete image",
|
|
28
|
+
"Download_image": "Download image",
|
|
29
|
+
"Zoom_in": "Zoom in",
|
|
30
|
+
"Zoom_out": "Zoom out",
|
|
26
31
|
"Add_filter": "Añadir filtro",
|
|
27
32
|
"And": "Y",
|
|
28
33
|
"Or": "O",
|
package/lib/locales/fr.json
CHANGED
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
"Specific_departments": "Départements spécifiques",
|
|
24
24
|
"Deleted_department": "Département supprimé",
|
|
25
25
|
"View_original_image": "View original image",
|
|
26
|
+
"Rotate_image": "Rotate image",
|
|
27
|
+
"Delete_image": "delete image",
|
|
28
|
+
"Download_image": "Download image",
|
|
29
|
+
"Zoom_in": "Zoom in",
|
|
30
|
+
"Zoom_out": "Zoom out",
|
|
26
31
|
"Add_filter": "Ajouter un filtre",
|
|
27
32
|
"And": "Et",
|
|
28
33
|
"Or": "Ou",
|
package/lib/locales/pt.json
CHANGED
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
"Specific_departments": "Specific departments",
|
|
24
24
|
"Deleted_department": "Deleted department",
|
|
25
25
|
"View_original_image": "View original image",
|
|
26
|
+
"Rotate_image": "Rotate image",
|
|
27
|
+
"Delete_image": "delete image",
|
|
28
|
+
"Download_image": "Download image",
|
|
29
|
+
"Zoom_in": "Zoom in",
|
|
30
|
+
"Zoom_out": "Zoom out",
|
|
26
31
|
"Add_filter": "Adicione o filtro",
|
|
27
32
|
"And": "E",
|
|
28
33
|
"Or": "Ou",
|
package/lib/locales/ru.json
CHANGED
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
"Specific_departments": "Указанные отделы",
|
|
24
24
|
"Deleted_department": "Удаленный отдел",
|
|
25
25
|
"View_original_image": "View original image",
|
|
26
|
+
"Rotate_image": "Rotate image",
|
|
27
|
+
"Delete_image": "delete image",
|
|
28
|
+
"Download_image": "Download image",
|
|
29
|
+
"Zoom_in": "Zoom in",
|
|
30
|
+
"Zoom_out": "Zoom out",
|
|
26
31
|
"Add_filter": "Добавить фильтр",
|
|
27
32
|
"And": "И",
|
|
28
33
|
"Or": "Или",
|
package/lib/locales/zh-CN.json
CHANGED
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
"Specific_departments": "具体部门",
|
|
24
24
|
"Deleted_department": "已删除部门",
|
|
25
25
|
"View_original_image": "View original image",
|
|
26
|
+
"Rotate_image": "旋转",
|
|
27
|
+
"Delete_image": "删除",
|
|
28
|
+
"Download_image": "下载",
|
|
29
|
+
"Zoom_in": "放大",
|
|
30
|
+
"Zoom_out": "缩小",
|
|
26
31
|
"Add_filter": "增加过滤条件",
|
|
27
32
|
"And": "并且",
|
|
28
33
|
"Or": "或者",
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-ui-component",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.108",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@seafile/react-image-lightbox": "
|
|
6
|
+
"@seafile/react-image-lightbox": "^5.0.4",
|
|
7
7
|
"@seafile/seafile-calendar": "~0.0.32",
|
|
8
8
|
"@seafile/seafile-editor": "~2.0.14",
|
|
9
9
|
"classnames": "~2.5.*",
|