cozy-viewer 21.0.3 → 22.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 CHANGED
@@ -3,6 +3,24 @@
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
+ # [22.0.0](https://github.com/cozy/cozy-libs/compare/cozy-viewer@21.0.4...cozy-viewer@22.0.0) (2025-04-03)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **Viewer:** Don't rely anymore on parent to show file recipients ([6ec0c3f](https://github.com/cozy/cozy-libs/commit/6ec0c3f3b5c7e306f7081314226e1e5a8ea294a3))
11
+
12
+ ### Features
13
+
14
+ - **Viewer:** Upgrade packages ([2b6b726](https://github.com/cozy/cozy-libs/commit/2b6b72620b0ba4141237fa692523b31bac32321f))
15
+
16
+ ### BREAKING CHANGES
17
+
18
+ - **Viewer:** You must have `cozy-sharing >= 25.1.1` and `cozy-client >= 57.0.0`
19
+
20
+ ## [21.0.4](https://github.com/cozy/cozy-libs/compare/cozy-viewer@21.0.3...cozy-viewer@21.0.4) (2025-04-02)
21
+
22
+ **Note:** Version bump only for package cozy-viewer
23
+
6
24
  ## [21.0.3](https://github.com/cozy/cozy-libs/compare/cozy-viewer@21.0.2...cozy-viewer@21.0.3) (2025-04-02)
7
25
 
8
26
  ### Bug Fixes
@@ -43,15 +43,13 @@ var Sharing = function Sharing(_ref) {
43
43
  getDocumentPermissions = _useSharingContext.getDocumentPermissions,
44
44
  getSharingLink = _useSharingContext.getSharingLink,
45
45
  allLoaded = _useSharingContext.allLoaded,
46
- hasSharedParent = _useSharingContext.hasSharedParent,
47
46
  getRecipients = _useSharingContext.getRecipients;
48
47
 
49
- var shareFileRefId = hasSharedParent(file.path) ? file.dir_id : file._id;
50
- var recipients = getRecipients(shareFileRefId);
51
- var permissions = getDocumentPermissions(shareFileRefId);
52
- var link = getSharingLink(shareFileRefId);
48
+ var recipients = getRecipients(file._id);
49
+ var permissions = getDocumentPermissions(file._id);
50
+ var link = getSharingLink(file._id);
53
51
 
54
- var _isOwner = isOwner(shareFileRefId);
52
+ var _isOwner = isOwner(file._id);
55
53
 
56
54
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ListItem.default, {
57
55
  size: "large",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-viewer",
3
- "version": "21.0.3",
3
+ "version": "22.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",
@@ -29,12 +29,12 @@
29
29
  "@testing-library/react-hooks": "^3.2.1",
30
30
  "babel-plugin-inline-json-import": "0.3.2",
31
31
  "babel-preset-cozy-app": "^2.8.1",
32
- "cozy-client": "^53.1.1",
32
+ "cozy-client": "^57.0.0",
33
33
  "cozy-device-helper": "2.0.0",
34
- "cozy-harvest-lib": "^32.3.6",
34
+ "cozy-harvest-lib": "^32.3.8",
35
35
  "cozy-intent": "^2.30.0",
36
36
  "cozy-logger": "^1.17.0",
37
- "cozy-sharing": "^25.1.0",
37
+ "cozy-sharing": "^25.1.1",
38
38
  "cozy-ui": "^121.1.1",
39
39
  "identity-obj-proxy": "3.0.0",
40
40
  "jest": "26.6.3",
@@ -54,15 +54,15 @@
54
54
  "react-pdf": "^5.7.2"
55
55
  },
56
56
  "peerDependencies": {
57
- "cozy-client": ">=53.1.1",
57
+ "cozy-client": ">=57.0.0",
58
58
  "cozy-device-helper": ">=2.0.0",
59
59
  "cozy-harvest-lib": ">=32.2.5",
60
60
  "cozy-intent": ">=2.29.1",
61
61
  "cozy-logger": ">=1.9.0",
62
- "cozy-sharing": ">=21.2.2",
62
+ "cozy-sharing": ">=25.1.1",
63
63
  "cozy-ui": ">=121.1.1",
64
64
  "react": ">=16.12.0",
65
65
  "react-dom": ">=16.12.0"
66
66
  },
67
- "gitHead": "1d1a84f061f95d26bb4ba523a48c2e97370dd7dc"
67
+ "gitHead": "9862550fb9b43bfdf9fd2ea6c11b968b2c2b4ae8"
68
68
  }
@@ -25,15 +25,13 @@ const Sharing = ({ file, t }) => {
25
25
  getDocumentPermissions,
26
26
  getSharingLink,
27
27
  allLoaded,
28
- hasSharedParent,
29
28
  getRecipients
30
29
  } = useSharingContext()
31
30
 
32
- const shareFileRefId = hasSharedParent(file.path) ? file.dir_id : file._id
33
- const recipients = getRecipients(shareFileRefId)
34
- const permissions = getDocumentPermissions(shareFileRefId)
35
- const link = getSharingLink(shareFileRefId)
36
- const _isOwner = isOwner(shareFileRefId)
31
+ const recipients = getRecipients(file._id)
32
+ const permissions = getDocumentPermissions(file._id)
33
+ const link = getSharingLink(file._id)
34
+ const _isOwner = isOwner(file._id)
37
35
 
38
36
  return (
39
37
  <>