cozy-sharing 25.7.1 → 26.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/components/SharedDrive/SharedDriveModal.js +12 -8
- package/dist/components/__snapshots__/SharedStatus.spec.js.snap +3 -3
- package/package.json +6 -6
- package/src/components/SharedDrive/SharedDriveModal.jsx +3 -0
- package/src/components/__snapshots__/SharedStatus.spec.js.snap +3 -3
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
|
+
# [26.0.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@25.7.2...cozy-sharing@26.0.0) (2025-09-04)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **cozy-sharing:** Update packages ([41c4a07](https://github.com/cozy/cozy-libs/commit/41c4a073a5fc6f9aefe3078ac21a62ff2d2a1f0d))
|
|
11
|
+
|
|
12
|
+
### BREAKING CHANGES
|
|
13
|
+
|
|
14
|
+
- **cozy-sharing:** cozy-sharing requires `cozy-client` >= 60.5.0,
|
|
15
|
+
`cozy-ui` >= 128.3.5
|
|
16
|
+
|
|
17
|
+
## [25.7.2](https://github.com/cozy/cozy-libs/compare/cozy-sharing@25.7.1...cozy-sharing@25.7.2) (2025-08-19)
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
- Resolve creating shared drive issue :bug: ([d6574ac](https://github.com/cozy/cozy-libs/commit/d6574ac7c75b4da8da1e67554df175d7031eb5b2))
|
|
22
|
+
|
|
6
23
|
## [25.7.1](https://github.com/cozy/cozy-libs/compare/cozy-sharing@25.7.0...cozy-sharing@25.7.1) (2025-07-30)
|
|
7
24
|
|
|
8
25
|
### Bug Fixes
|
|
@@ -63,16 +63,20 @@ export var SharedDriveModal = withLocales(function (_ref) {
|
|
|
63
63
|
case 0:
|
|
64
64
|
_context.prev = 0;
|
|
65
65
|
_context.next = 3;
|
|
66
|
+
return client.collection('io.cozy.files').getOrCreateSharedDrivesDirectory();
|
|
67
|
+
|
|
68
|
+
case 3:
|
|
69
|
+
_context.next = 5;
|
|
66
70
|
return client.create('io.cozy.files', {
|
|
67
71
|
name: sharedDriveName,
|
|
68
72
|
dirId: 'io.cozy.files.shared-drives-dir',
|
|
69
73
|
type: 'directory'
|
|
70
74
|
});
|
|
71
75
|
|
|
72
|
-
case
|
|
76
|
+
case 5:
|
|
73
77
|
_yield$client$create2 = _context.sent;
|
|
74
78
|
sharedDriveFolder = _yield$client$create2.data;
|
|
75
|
-
_context.next =
|
|
79
|
+
_context.next = 9;
|
|
76
80
|
return share({
|
|
77
81
|
document: sharedDriveFolder,
|
|
78
82
|
recipients: sharedDriveRecipients.recipients,
|
|
@@ -80,18 +84,18 @@ export var SharedDriveModal = withLocales(function (_ref) {
|
|
|
80
84
|
sharedDrive: true
|
|
81
85
|
});
|
|
82
86
|
|
|
83
|
-
case
|
|
87
|
+
case 9:
|
|
84
88
|
showAlert({
|
|
85
89
|
message: t('SharedDrive.sharedDriveModal.successNotification'),
|
|
86
90
|
severity: 'success',
|
|
87
91
|
variant: 'filled'
|
|
88
92
|
});
|
|
89
93
|
onClose();
|
|
90
|
-
_context.next =
|
|
94
|
+
_context.next = 16;
|
|
91
95
|
break;
|
|
92
96
|
|
|
93
|
-
case
|
|
94
|
-
_context.prev =
|
|
97
|
+
case 13:
|
|
98
|
+
_context.prev = 13;
|
|
95
99
|
_context.t0 = _context["catch"](0);
|
|
96
100
|
showAlert({
|
|
97
101
|
message: t('SharedDrive.sharedDriveModal.errorNotification'),
|
|
@@ -99,11 +103,11 @@ export var SharedDriveModal = withLocales(function (_ref) {
|
|
|
99
103
|
variant: 'filled'
|
|
100
104
|
});
|
|
101
105
|
|
|
102
|
-
case
|
|
106
|
+
case 16:
|
|
103
107
|
case "end":
|
|
104
108
|
return _context.stop();
|
|
105
109
|
}
|
|
106
|
-
}, _callee, null, [[0,
|
|
110
|
+
}, _callee, null, [[0, 13]]);
|
|
107
111
|
}));
|
|
108
112
|
|
|
109
113
|
return function onCreate() {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports[`SharedStatus component should display the link if there is a link 1`] = `
|
|
4
4
|
<div>
|
|
5
5
|
<div
|
|
6
|
-
class="
|
|
6
|
+
class="TwakeTheme--light-normal u-dc"
|
|
7
7
|
>
|
|
8
8
|
<span
|
|
9
9
|
class="shared-status"
|
|
@@ -47,7 +47,7 @@ exports[`SharedStatus component should display the link if there is a link 1`] =
|
|
|
47
47
|
exports[`SharedStatus component should have the right display if there is several recipients 1`] = `
|
|
48
48
|
<div>
|
|
49
49
|
<div
|
|
50
|
-
class="
|
|
50
|
+
class="TwakeTheme--light-normal u-dc"
|
|
51
51
|
>
|
|
52
52
|
<span
|
|
53
53
|
class="shared-status"
|
|
@@ -84,7 +84,7 @@ exports[`SharedStatus component should have the right display if there is severa
|
|
|
84
84
|
exports[`SharedStatus component should just render a span if no sharing 1`] = `
|
|
85
85
|
<div>
|
|
86
86
|
<div
|
|
87
|
-
class="
|
|
87
|
+
class="TwakeTheme--light-normal u-dc"
|
|
88
88
|
>
|
|
89
89
|
<span
|
|
90
90
|
class="shared-status"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.0",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
"babel-jest": "26.6.3",
|
|
55
55
|
"babel-plugin-css-modules-transform": "1.6.2",
|
|
56
56
|
"babel-plugin-inline-react-svg": "1.1.2",
|
|
57
|
-
"cozy-client": "^
|
|
57
|
+
"cozy-client": "^60.5.0",
|
|
58
58
|
"cozy-device-helper": "^3.7.1",
|
|
59
59
|
"cozy-intent": "^2.30.0",
|
|
60
60
|
"cozy-minilog": "^3.10.0",
|
|
61
|
-
"cozy-ui": "^
|
|
61
|
+
"cozy-ui": "^128.3.5",
|
|
62
62
|
"jest": "26.6.3",
|
|
63
63
|
"jest-environment-jsdom": "26.6.2",
|
|
64
64
|
"react": "16.12.0",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"storybook": "7.6.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"cozy-client": ">=
|
|
70
|
+
"cozy-client": ">=60.5.0",
|
|
71
71
|
"cozy-device-helper": ">=3.7.1",
|
|
72
72
|
"cozy-intent": ">=2.29.1",
|
|
73
73
|
"cozy-minilog": ">=3.9.1",
|
|
74
|
-
"cozy-ui": ">=
|
|
74
|
+
"cozy-ui": ">=128.3.5",
|
|
75
75
|
"prop-types": "^15.7.2",
|
|
76
76
|
"react": "^16.12.0",
|
|
77
77
|
"react-router": "^5.0.1"
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"sideEffects": [
|
|
80
80
|
"*.css"
|
|
81
81
|
],
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "0f3d2c236ac73a6d1154634d80d0f00edba5b827"
|
|
83
83
|
}
|
|
@@ -47,6 +47,9 @@ export const SharedDriveModal = withLocales(({ onClose }) => {
|
|
|
47
47
|
|
|
48
48
|
const onCreate = async () => {
|
|
49
49
|
try {
|
|
50
|
+
await client
|
|
51
|
+
.collection('io.cozy.files')
|
|
52
|
+
.getOrCreateSharedDrivesDirectory()
|
|
50
53
|
const { data: sharedDriveFolder } = await client.create('io.cozy.files', {
|
|
51
54
|
name: sharedDriveName,
|
|
52
55
|
dirId: 'io.cozy.files.shared-drives-dir',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports[`SharedStatus component should display the link if there is a link 1`] = `
|
|
4
4
|
<div>
|
|
5
5
|
<div
|
|
6
|
-
class="
|
|
6
|
+
class="TwakeTheme--light-normal u-dc"
|
|
7
7
|
>
|
|
8
8
|
<span
|
|
9
9
|
class="shared-status"
|
|
@@ -47,7 +47,7 @@ exports[`SharedStatus component should display the link if there is a link 1`] =
|
|
|
47
47
|
exports[`SharedStatus component should have the right display if there is several recipients 1`] = `
|
|
48
48
|
<div>
|
|
49
49
|
<div
|
|
50
|
-
class="
|
|
50
|
+
class="TwakeTheme--light-normal u-dc"
|
|
51
51
|
>
|
|
52
52
|
<span
|
|
53
53
|
class="shared-status"
|
|
@@ -84,7 +84,7 @@ exports[`SharedStatus component should have the right display if there is severa
|
|
|
84
84
|
exports[`SharedStatus component should just render a span if no sharing 1`] = `
|
|
85
85
|
<div>
|
|
86
86
|
<div
|
|
87
|
-
class="
|
|
87
|
+
class="TwakeTheme--light-normal u-dc"
|
|
88
88
|
>
|
|
89
89
|
<span
|
|
90
90
|
class="shared-status"
|