dtable-ui-component 6.0.108 → 6.0.110
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.js +30 -21
- package/lib/locales/de.json +5 -5
- package/lib/locales/en.json +5 -6
- package/lib/locales/es.json +5 -5
- package/lib/locales/fr.json +5 -5
- package/lib/locales/pt.json +5 -5
- package/lib/locales/ru.json +5 -5
- package/lib/locales/zh-CN.json +5 -5
- package/package.json +13 -14
|
@@ -27,35 +27,44 @@ function ImagePreviewerLightbox(props) {
|
|
|
27
27
|
onRotateImage
|
|
28
28
|
} = props;
|
|
29
29
|
const imageSrcList = imageItems.map(src => {
|
|
30
|
+
let name = '';
|
|
31
|
+
try {
|
|
32
|
+
name = src ? decodeURIComponent(src.slice(src.lastIndexOf('/') + 1)) : '';
|
|
33
|
+
} catch (error) {
|
|
34
|
+
// eslint-disable-next-line no-console
|
|
35
|
+
console.log(error);
|
|
36
|
+
}
|
|
30
37
|
if (server && dtableUuid && (0, _url.isCustomAssetUrl)(src)) {
|
|
31
38
|
const assetUuid = src.slice(src.lastIndexOf('/') + 1, src.lastIndexOf('.'));
|
|
32
|
-
return
|
|
39
|
+
return {
|
|
40
|
+
name,
|
|
41
|
+
thumbnail: server + '/dtable/' + dtableUuid + '/custom-asset/' + assetUuid
|
|
42
|
+
};
|
|
33
43
|
}
|
|
34
44
|
if (server && dtableUuid && workspaceID && (0, _url.isDigitalSignsUrl)(src)) {
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
return {
|
|
46
|
+
name,
|
|
47
|
+
thumbnail: (0, _url.generateCurrentBaseImageUrl)({
|
|
48
|
+
server,
|
|
49
|
+
workspaceID,
|
|
50
|
+
dtableUuid,
|
|
51
|
+
partUrl: src
|
|
52
|
+
})
|
|
53
|
+
};
|
|
41
54
|
}
|
|
42
|
-
return
|
|
55
|
+
return {
|
|
56
|
+
name: name || '',
|
|
57
|
+
thumbnail: src
|
|
58
|
+
};
|
|
43
59
|
});
|
|
44
60
|
const imagesLength = imageSrcList.length;
|
|
45
61
|
const [currentImageIndex, setCurrentImageIndex] = _react.default.useState(imageIndex || 0);
|
|
46
|
-
const
|
|
62
|
+
const imageItem = imageSrcList[currentImageIndex];
|
|
63
|
+
const URL = imageItem ? imageItem.thumbnail : '';
|
|
64
|
+
const imageName = imageItem ? imageItem.name : '';
|
|
47
65
|
_react.default.useEffect(() => {
|
|
48
66
|
setCurrentImageIndex(imageIndex);
|
|
49
67
|
}, [imageIndex]);
|
|
50
|
-
|
|
51
|
-
// Handle URL has special symbol %$
|
|
52
|
-
let imageName = '';
|
|
53
|
-
try {
|
|
54
|
-
imageName = URL ? decodeURI(URL.slice(URL.lastIndexOf('/') + 1)) : '';
|
|
55
|
-
} catch (error) {
|
|
56
|
-
// eslint-disable-next-line no-console
|
|
57
|
-
console.log(error);
|
|
58
|
-
}
|
|
59
68
|
const canRotateImage = onRotateImage && !readOnly && !['gif', 'heic', 'heif'].includes((0, _url.getFileSuffix)(URL)) && (0, _url.isInternalImg)(URL, server);
|
|
60
69
|
let mainSrc = URL;
|
|
61
70
|
if ((0, _url.needUseThumbnailImage)(URL)) {
|
|
@@ -70,7 +79,7 @@ function ImagePreviewerLightbox(props) {
|
|
|
70
79
|
className: "d-flex",
|
|
71
80
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
72
81
|
className: "text-truncate",
|
|
73
|
-
children: imageName
|
|
82
|
+
children: imageName || ''
|
|
74
83
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
75
84
|
className: "flex-shrink-0 pl-1",
|
|
76
85
|
children: ["(", currentImageIndex + 1, "/", imagesLength, ")"]
|
|
@@ -83,8 +92,8 @@ function ImagePreviewerLightbox(props) {
|
|
|
83
92
|
wrapperClassName: (0, _classnames.default)('dtable-ui-component', className),
|
|
84
93
|
imageTitle: imageTitleDOM,
|
|
85
94
|
mainSrc: mainSrc,
|
|
86
|
-
nextSrc: imageSrcList[(currentImageIndex + 1) % imagesLength],
|
|
87
|
-
prevSrc: imageSrcList[(currentImageIndex + imagesLength - 1) % imagesLength],
|
|
95
|
+
nextSrc: imageSrcList[(currentImageIndex + 1) % imagesLength] ? imageSrcList[(currentImageIndex + 1) % imagesLength].thumbnail : '',
|
|
96
|
+
prevSrc: imageSrcList[(currentImageIndex + imagesLength - 1) % imagesLength] ? imageSrcList[(currentImageIndex + imagesLength - 1) % imagesLength].thumbnail : '',
|
|
88
97
|
imagePadding: 70,
|
|
89
98
|
viewOriginalImageLabel: (0, _lang.getLocale)('View_original_image'),
|
|
90
99
|
enableRotate: canRotateImage,
|
package/lib/locales/de.json
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"Search_collaborator": "Mitarbeiter suchen",
|
|
10
10
|
"No_collaborators_available": "Es sind keine Mitarbeiter verfügbar.",
|
|
11
11
|
"Done": "Erledigt",
|
|
12
|
+
"Rotate_image": "Rotate image",
|
|
13
|
+
"Delete_image": "delete image",
|
|
14
|
+
"Download_image": "Download image",
|
|
15
|
+
"Zoom_in": "Zoom in",
|
|
16
|
+
"Zoom_out": "Zoom out",
|
|
12
17
|
"Choose_a_collaborator": "Wählen Sie einen Mitarbeiter",
|
|
13
18
|
"Please_select": "Auswählen",
|
|
14
19
|
"Clear": "Leeren",
|
|
@@ -23,11 +28,6 @@
|
|
|
23
28
|
"Specific_departments": "Bestimmte Bereiche",
|
|
24
29
|
"Deleted_department": "Gelöschter Bereich",
|
|
25
30
|
"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",
|
|
31
31
|
"Add_filter": "Filter hinzufügen",
|
|
32
32
|
"And": "Und",
|
|
33
33
|
"Or": "Oder",
|
package/lib/locales/en.json
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"Search_collaborator": "Search collaborator",
|
|
10
10
|
"No_collaborators_available": "No collaborators available.",
|
|
11
11
|
"Done": "Done",
|
|
12
|
+
"Rotate_image": "Rotate image",
|
|
13
|
+
"Delete_image": "delete image",
|
|
14
|
+
"Download_image": "Download image",
|
|
15
|
+
"Zoom_in": "Zoom in",
|
|
16
|
+
"Zoom_out": "Zoom out",
|
|
12
17
|
"Choose_a_collaborator": "Choose a collaborator",
|
|
13
18
|
"Please_select": "Please select",
|
|
14
19
|
"Clear": "Clear",
|
|
@@ -23,12 +28,6 @@
|
|
|
23
28
|
"Specific_departments": "Specific departments",
|
|
24
29
|
"Deleted_department": "Deleted department",
|
|
25
30
|
"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",
|
|
32
31
|
"Add_filter": "Add filter",
|
|
33
32
|
"And": "And",
|
|
34
33
|
"Or": "Or",
|
package/lib/locales/es.json
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"Search_collaborator": "Search collaborator",
|
|
10
10
|
"No_collaborators_available": "No hay colaboradores disponibles.",
|
|
11
11
|
"Done": "Hecho",
|
|
12
|
+
"Rotate_image": "Rotate image",
|
|
13
|
+
"Delete_image": "delete image",
|
|
14
|
+
"Download_image": "Download image",
|
|
15
|
+
"Zoom_in": "Zoom in",
|
|
16
|
+
"Zoom_out": "Zoom out",
|
|
12
17
|
"Choose_a_collaborator": "Choose a collaborator",
|
|
13
18
|
"Please_select": "Seleccione",
|
|
14
19
|
"Clear": "Limpiar",
|
|
@@ -23,11 +28,6 @@
|
|
|
23
28
|
"Specific_departments": "Specific departments",
|
|
24
29
|
"Deleted_department": "Deleted department",
|
|
25
30
|
"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",
|
|
31
31
|
"Add_filter": "Añadir filtro",
|
|
32
32
|
"And": "Y",
|
|
33
33
|
"Or": "O",
|
package/lib/locales/fr.json
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"Search_collaborator": "Rechercher des collaborateurs",
|
|
10
10
|
"No_collaborators_available": "Aucun collaborateur n'est disponible.",
|
|
11
11
|
"Done": "Fait",
|
|
12
|
+
"Rotate_image": "Rotate image",
|
|
13
|
+
"Delete_image": "delete image",
|
|
14
|
+
"Download_image": "Download image",
|
|
15
|
+
"Zoom_in": "Zoom in",
|
|
16
|
+
"Zoom_out": "Zoom out",
|
|
12
17
|
"Choose_a_collaborator": "Choisissez un collaborateur",
|
|
13
18
|
"Please_select": "Sélectionner",
|
|
14
19
|
"Clear": "Effacer",
|
|
@@ -23,11 +28,6 @@
|
|
|
23
28
|
"Specific_departments": "Départements spécifiques",
|
|
24
29
|
"Deleted_department": "Département supprimé",
|
|
25
30
|
"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",
|
|
31
31
|
"Add_filter": "Ajouter un filtre",
|
|
32
32
|
"And": "Et",
|
|
33
33
|
"Or": "Ou",
|
package/lib/locales/pt.json
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"Search_collaborator": "Encontre um colaborador",
|
|
10
10
|
"No_collaborators_available": "Nenhum colaborador disponível.",
|
|
11
11
|
"Done": "Feita",
|
|
12
|
+
"Rotate_image": "Rotate image",
|
|
13
|
+
"Delete_image": "delete image",
|
|
14
|
+
"Download_image": "Download image",
|
|
15
|
+
"Zoom_in": "Zoom in",
|
|
16
|
+
"Zoom_out": "Zoom out",
|
|
12
17
|
"Choose_a_collaborator": "Choose a collaborator",
|
|
13
18
|
"Please_select": "Por favor, selecione",
|
|
14
19
|
"Clear": "Clara",
|
|
@@ -23,11 +28,6 @@
|
|
|
23
28
|
"Specific_departments": "Specific departments",
|
|
24
29
|
"Deleted_department": "Deleted department",
|
|
25
30
|
"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",
|
|
31
31
|
"Add_filter": "Adicione o filtro",
|
|
32
32
|
"And": "E",
|
|
33
33
|
"Or": "Ou",
|
package/lib/locales/ru.json
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"Search_collaborator": "Поиск сотрудника",
|
|
10
10
|
"No_collaborators_available": "Нет сотрудников.",
|
|
11
11
|
"Done": "Выполнено",
|
|
12
|
+
"Rotate_image": "Rotate image",
|
|
13
|
+
"Delete_image": "delete image",
|
|
14
|
+
"Download_image": "Download image",
|
|
15
|
+
"Zoom_in": "Zoom in",
|
|
16
|
+
"Zoom_out": "Zoom out",
|
|
12
17
|
"Choose_a_collaborator": "Choose a collaborator",
|
|
13
18
|
"Please_select": "Please select",
|
|
14
19
|
"Clear": "Очистить",
|
|
@@ -23,11 +28,6 @@
|
|
|
23
28
|
"Specific_departments": "Указанные отделы",
|
|
24
29
|
"Deleted_department": "Удаленный отдел",
|
|
25
30
|
"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",
|
|
31
31
|
"Add_filter": "Добавить фильтр",
|
|
32
32
|
"And": "И",
|
|
33
33
|
"Or": "Или",
|
package/lib/locales/zh-CN.json
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"Search_collaborator": "搜索协作人",
|
|
10
10
|
"No_collaborators_available": "没有找到协作人",
|
|
11
11
|
"Done": "完成",
|
|
12
|
+
"Rotate_image": "旋转",
|
|
13
|
+
"Delete_image": "删除",
|
|
14
|
+
"Download_image": "下载",
|
|
15
|
+
"Zoom_in": "放大",
|
|
16
|
+
"Zoom_out": "缩小",
|
|
12
17
|
"Choose_a_collaborator": "选择一个协作人",
|
|
13
18
|
"Please_select": "请选择",
|
|
14
19
|
"Clear": "清除",
|
|
@@ -23,11 +28,6 @@
|
|
|
23
28
|
"Specific_departments": "具体部门",
|
|
24
29
|
"Deleted_department": "已删除部门",
|
|
25
30
|
"View_original_image": "View original image",
|
|
26
|
-
"Rotate_image": "旋转",
|
|
27
|
-
"Delete_image": "删除",
|
|
28
|
-
"Download_image": "下载",
|
|
29
|
-
"Zoom_in": "放大",
|
|
30
|
-
"Zoom_out": "缩小",
|
|
31
31
|
"Add_filter": "增加过滤条件",
|
|
32
32
|
"And": "并且",
|
|
33
33
|
"Or": "或者",
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-ui-component",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.110",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "^5.0.4",
|
|
7
|
-
"@seafile/seafile-calendar": "
|
|
8
|
-
"@seafile/seafile-editor": "
|
|
7
|
+
"@seafile/seafile-calendar": "^1.0.8",
|
|
8
|
+
"@seafile/seafile-editor": "^3.0.26",
|
|
9
9
|
"classnames": "~2.5.*",
|
|
10
10
|
"dayjs": "1.10.7",
|
|
11
11
|
"dtable-utils": "~5.0.27",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@types/jest": "^29.5.10",
|
|
83
83
|
"autoprefixer": "10.4.5",
|
|
84
84
|
"babel-eslint": "10.0.1",
|
|
85
|
-
"babel-jest": "^
|
|
85
|
+
"babel-jest": "^30.3.0",
|
|
86
86
|
"babel-loader": "^8.2.3",
|
|
87
87
|
"babel-plugin-import": "^1.13.6",
|
|
88
88
|
"babel-plugin-named-asset-import": "^0.3.6",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
|
93
93
|
"circular-dependency-plugin": "^5.2.2",
|
|
94
94
|
"css-loader": "^6.5.1",
|
|
95
|
-
"css-minimizer-webpack-plugin": "^
|
|
95
|
+
"css-minimizer-webpack-plugin": "^8.0.0",
|
|
96
96
|
"dotenv": "^10.0.0",
|
|
97
97
|
"dotenv-expand": "^5.1.0",
|
|
98
98
|
"eslint": "^8.3.0",
|
|
@@ -103,19 +103,21 @@
|
|
|
103
103
|
"fs-extra": "^10.0.0",
|
|
104
104
|
"html-webpack-plugin": "^5.5.0",
|
|
105
105
|
"identity-obj-proxy": "3.0.0",
|
|
106
|
-
"jest": "^
|
|
107
|
-
"jest-
|
|
108
|
-
"jest-
|
|
106
|
+
"jest": "^30.3.0",
|
|
107
|
+
"jest-cli": "^30.3.0",
|
|
108
|
+
"jest-environment-jsdom": "^30.3.0",
|
|
109
|
+
"jest-resolve": "^30.3.0",
|
|
110
|
+
"jest-watch-typeahead": "^3.0.1",
|
|
109
111
|
"less": "^4.2.0",
|
|
110
112
|
"less-loader": "^11.1.3",
|
|
111
113
|
"mini-css-extract-plugin": "^2.4.5",
|
|
112
|
-
"node-polyfill-webpack-plugin": "2.0.1",
|
|
113
114
|
"path-browserify": "^1.0.1",
|
|
114
115
|
"postcss": "^8.5.3",
|
|
115
116
|
"postcss-flexbugs-fixes": "^5.0.2",
|
|
116
117
|
"postcss-loader": "^6.2.1",
|
|
117
118
|
"postcss-normalize": "^10.0.1",
|
|
118
119
|
"postcss-preset-env": "^7.0.1",
|
|
120
|
+
"process": "^0.11.10",
|
|
119
121
|
"prompts": "^2.4.2",
|
|
120
122
|
"prop-types": "15.8.1",
|
|
121
123
|
"react": "18.3.1",
|
|
@@ -133,11 +135,8 @@
|
|
|
133
135
|
"style-loader": "^3.3.1",
|
|
134
136
|
"terser-webpack-plugin": "^5.2.5",
|
|
135
137
|
"url-loader": "^4.1.1",
|
|
136
|
-
"
|
|
137
|
-
"webpack": "^5.
|
|
138
|
-
"webpack-dev-server": "^5.2.2",
|
|
139
|
-
"webpack-manifest-plugin": "^4.0.2",
|
|
140
|
-
"workbox-webpack-plugin": "^6.4.1",
|
|
138
|
+
"webpack": "^5.105.4",
|
|
139
|
+
"webpack-dev-server": "^5.2.3",
|
|
141
140
|
"worker-loader": "3.0.8"
|
|
142
141
|
}
|
|
143
142
|
}
|