cozy-viewer 11.4.0 → 12.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.
- package/CHANGELOG.md +17 -0
- package/dist/Panel/Qualification.js +3 -1
- package/package.json +7 -7
- package/src/Panel/Qualification.jsx +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [12.0.0](https://github.com/cozy/cozy-libs/compare/cozy-viewer@11.4.0...cozy-viewer@12.0.0) (2025-01-07)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **Viewer:** Hide the qualification in the panel if not supported ([e0c7c5a](https://github.com/cozy/cozy-libs/commit/e0c7c5a7dca4ee1781c677fe9f44d6c3bad8418c))
|
|
12
|
+
* **Viewer:** Upgrade packages ([31fa49a](https://github.com/cozy/cozy-libs/commit/31fa49ac01455b62ff39e4e8739de4cfabb5b21b))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### BREAKING CHANGES
|
|
16
|
+
|
|
17
|
+
* **Viewer:** You muse have `cozy-client >= 52.1.0` and `cozy-ui >= 116.0.0`
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
# [11.4.0](https://github.com/cozy/cozy-libs/compare/cozy-viewer@11.3.4...cozy-viewer@11.4.0) (2024-12-23)
|
|
7
24
|
|
|
8
25
|
|
|
@@ -13,6 +13,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
|
|
16
|
+
var _qualification = require("cozy-client/dist/models/document/qualification");
|
|
17
|
+
|
|
16
18
|
var _file = require("cozy-client/dist/models/file");
|
|
17
19
|
|
|
18
20
|
var _paper = require("cozy-client/dist/models/paper");
|
|
@@ -111,7 +113,7 @@ var Qualification = function Qualification(_ref) {
|
|
|
111
113
|
}, [formattedMetadataQualification]);
|
|
112
114
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _paper.isExpiringSoon)(file) && !(0, _helpers.isExpirationAlertHidden)(file) && /*#__PURE__*/_react.default.createElement(_ExpirationAlert.default, {
|
|
113
115
|
file: file
|
|
114
|
-
}), (0,
|
|
116
|
+
}), (0, _qualification.hasSupportedQualification)(file) ? /*#__PURE__*/_react.default.createElement(_QualificationListItemQualification.default, {
|
|
115
117
|
file: file,
|
|
116
118
|
isReadOnly: isReadOnly,
|
|
117
119
|
onClick: function onClick() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-viewer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "Cozy-Viewer provides a component to show files in a viewer.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"@testing-library/react-hooks": "^3.2.1",
|
|
26
26
|
"babel-plugin-inline-json-import": "0.3.2",
|
|
27
27
|
"babel-preset-cozy-app": "^2.8.1",
|
|
28
|
-
"cozy-client": "^
|
|
28
|
+
"cozy-client": "^52.1.0",
|
|
29
29
|
"cozy-device-helper": "2.0.0",
|
|
30
|
-
"cozy-harvest-lib": "^32.2.
|
|
30
|
+
"cozy-harvest-lib": "^32.2.2",
|
|
31
31
|
"cozy-intent": "^2.29.1",
|
|
32
32
|
"cozy-logger": "^1.16.1",
|
|
33
33
|
"cozy-sharing": "^18.0.0",
|
|
34
|
-
"cozy-ui": "^
|
|
34
|
+
"cozy-ui": "^116.0.0",
|
|
35
35
|
"identity-obj-proxy": "3.0.0",
|
|
36
36
|
"jest": "26.6.3",
|
|
37
37
|
"jest-canvas-mock": "2.3.1",
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
"react-pdf": "^5.7.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"cozy-client": ">=
|
|
52
|
+
"cozy-client": ">=52.1.0",
|
|
53
53
|
"cozy-device-helper": ">=2.0.0",
|
|
54
54
|
"cozy-harvest-lib": ">=31.0.5",
|
|
55
55
|
"cozy-intent": ">=2.29.1",
|
|
56
56
|
"cozy-logger": ">=1.9.0",
|
|
57
57
|
"cozy-sharing": ">=16.11.0",
|
|
58
|
-
"cozy-ui": ">=
|
|
58
|
+
"cozy-ui": ">=116.0.0",
|
|
59
59
|
"react": ">=16.12.0",
|
|
60
60
|
"react-dom": ">=16.12.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "e8122fd96a5dbfda7f6b445c60bb34c4b14004d8"
|
|
63
63
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { Fragment, useRef, useState, createRef, useEffect } from 'react'
|
|
3
3
|
|
|
4
|
+
import { hasSupportedQualification } from 'cozy-client/dist/models/document/qualification'
|
|
4
5
|
import { hasQualifications } from 'cozy-client/dist/models/file'
|
|
5
6
|
import {
|
|
6
7
|
isExpiringSoon,
|
|
@@ -71,7 +72,7 @@ const Qualification = ({ file, isReadOnly }) => {
|
|
|
71
72
|
{isExpiringSoon(file) && !isExpirationAlertHidden(file) && (
|
|
72
73
|
<ExpirationAlert file={file} />
|
|
73
74
|
)}
|
|
74
|
-
{
|
|
75
|
+
{hasSupportedQualification(file) ? (
|
|
75
76
|
<QualificationListItemQualification
|
|
76
77
|
file={file}
|
|
77
78
|
isReadOnly={isReadOnly}
|