cozy-sharing 16.13.0 → 16.15.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,28 @@
|
|
|
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
|
+
# [16.15.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@16.14.0...cozy-sharing@16.15.0) (2024-12-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **cozy-sharing:** Upgrade cozy-ui to 113.9.0 ([a6943b0](https://github.com/cozy/cozy-libs/commit/a6943b096173cad242f16d10e95236ec81ea14b3))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [16.14.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@16.13.0...cozy-sharing@16.14.0) (2024-12-10)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* Remove notes.sharing-cozy-to-cozy flag ([f6fa190](https://github.com/cozy/cozy-libs/commit/f6fa1907ea97c0214c2f0cd3e196e7a1177a03ca))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# [16.13.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@16.12.0...cozy-sharing@16.13.0) (2024-12-06)
|
|
7
29
|
|
|
8
30
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import flag from 'cozy-flags';
|
|
4
3
|
import ShareDialogCozyToCozy from './ShareDialogCozyToCozy';
|
|
5
4
|
import ShareDialogOnlyByLink from './ShareDialogOnlyByLink';
|
|
6
5
|
export var ShareModal = function ShareModal(_ref) {
|
|
@@ -25,7 +24,7 @@ export var ShareModal = function ShareModal(_ref) {
|
|
|
25
24
|
sharing = _ref.sharing,
|
|
26
25
|
sharingDesc = _ref.sharingDesc,
|
|
27
26
|
twoStepsConfirmationMethods = _ref.twoStepsConfirmationMethods;
|
|
28
|
-
var shareDialogOnlyByLink = documentType === '
|
|
27
|
+
var shareDialogOnlyByLink = documentType === 'Albums';
|
|
29
28
|
var showShareByEmail = !hasSharedParent && !hasSharedChild;
|
|
30
29
|
var showShareByLink = documentType !== 'Organizations';
|
|
31
30
|
var showShareOnlyByLink = hasSharedParent || hasSharedChild;
|
|
@@ -36,7 +36,7 @@ describe('ShareModal component', function () {
|
|
|
36
36
|
});
|
|
37
37
|
expect(root.getByText('ShareDialogOnlyByLink'));
|
|
38
38
|
});
|
|
39
|
-
it('should render ShareDialogCozyToCozy if type is Notes
|
|
39
|
+
it('should render ShareDialogCozyToCozy if type is Notes', function () {
|
|
40
40
|
flag.mockImplementation(function () {
|
|
41
41
|
return true;
|
|
42
42
|
});
|
|
@@ -45,10 +45,4 @@ describe('ShareModal component', function () {
|
|
|
45
45
|
});
|
|
46
46
|
expect(root.getByText('ShareDialogCozyToCozy'));
|
|
47
47
|
});
|
|
48
|
-
it('should render ShareDialogOnlyByLink if type is Notes and notes.sharing-cozy-to-cozy flag disabled', function () {
|
|
49
|
-
var root = setup({
|
|
50
|
-
documentType: 'Notes'
|
|
51
|
-
});
|
|
52
|
-
expect(root.getByText('ShareDialogOnlyByLink'));
|
|
53
|
-
});
|
|
54
48
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.15.0",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"babel-plugin-css-modules-transform": "1.6.2",
|
|
54
54
|
"babel-plugin-inline-react-svg": "1.1.2",
|
|
55
55
|
"cozy-client": "^51.4.0",
|
|
56
|
-
"cozy-ui": "113.
|
|
56
|
+
"cozy-ui": "^113.9.0",
|
|
57
57
|
"enzyme": "3.11.0",
|
|
58
58
|
"enzyme-adapter-react-16": "1.15.6",
|
|
59
59
|
"enzyme-to-json": "3.6.2",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"sideEffects": [
|
|
75
75
|
"*.css"
|
|
76
76
|
],
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "d3c8e4a895af0c8dd2d597e3b1f935a8d533730b"
|
|
78
78
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
|
-
import flag from 'cozy-flags'
|
|
5
|
-
|
|
6
4
|
import ShareDialogCozyToCozy from './ShareDialogCozyToCozy'
|
|
7
5
|
import ShareDialogOnlyByLink from './ShareDialogOnlyByLink'
|
|
8
6
|
|
|
@@ -28,9 +26,7 @@ export const ShareModal = ({
|
|
|
28
26
|
sharingDesc,
|
|
29
27
|
twoStepsConfirmationMethods
|
|
30
28
|
}) => {
|
|
31
|
-
const shareDialogOnlyByLink =
|
|
32
|
-
(documentType === 'Notes' && !flag('notes.sharing-cozy-to-cozy')) ||
|
|
33
|
-
documentType === 'Albums'
|
|
29
|
+
const shareDialogOnlyByLink = documentType === 'Albums'
|
|
34
30
|
|
|
35
31
|
const showShareByEmail = !hasSharedParent && !hasSharedChild
|
|
36
32
|
const showShareByLink = documentType !== 'Organizations'
|
|
@@ -36,16 +36,10 @@ describe('ShareModal component', () => {
|
|
|
36
36
|
expect(root.getByText('ShareDialogOnlyByLink'))
|
|
37
37
|
})
|
|
38
38
|
|
|
39
|
-
it('should render ShareDialogCozyToCozy if type is Notes
|
|
39
|
+
it('should render ShareDialogCozyToCozy if type is Notes', () => {
|
|
40
40
|
flag.mockImplementation(() => true)
|
|
41
41
|
const root = setup({ documentType: 'Notes' })
|
|
42
42
|
|
|
43
43
|
expect(root.getByText('ShareDialogCozyToCozy'))
|
|
44
44
|
})
|
|
45
|
-
|
|
46
|
-
it('should render ShareDialogOnlyByLink if type is Notes and notes.sharing-cozy-to-cozy flag disabled', () => {
|
|
47
|
-
const root = setup({ documentType: 'Notes' })
|
|
48
|
-
|
|
49
|
-
expect(root.getByText('ShareDialogOnlyByLink'))
|
|
50
|
-
})
|
|
51
45
|
})
|