cozy-sharing 4.5.0 → 4.5.3
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 +31 -0
- package/dist/ShareModal.js +2 -2
- package/dist/components/ShareModal.js +3 -3
- package/package.json +4 -4
- package/src/ShareModal.jsx +2 -2
- package/src/components/ShareModal.jsx +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,37 @@
|
|
|
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
|
+
## [4.5.3](https://github.com/cozy/cozy-libs/compare/cozy-sharing@4.5.2...cozy-sharing@4.5.3) (2022-08-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package cozy-sharing
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 4.5.2 (2022-07-26)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* Style of paperItem component ([0ac8469](https://github.com/cozy/cozy-libs/commit/0ac8469e4389477c472d6de0db64d3825389438b))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [4.5.1](https://github.com/cozy/cozy-libs/compare/cozy-sharing@4.5.0...cozy-sharing@4.5.1) (2022-07-13)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* Handle old react-routers in ShareModal ([b6fe5cb](https://github.com/cozy/cozy-libs/commit/b6fe5cb40492a7a3e71b7e6652a2f95f4c63b39d))
|
|
31
|
+
* Revert ShareByEmail for Notes ([e5daeb9](https://github.com/cozy/cozy-libs/commit/e5daeb96455ed35cf6ca38b87f7c2d812c03a83e))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
6
37
|
# [4.5.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@4.4.1...cozy-sharing@4.5.0) (2022-07-13)
|
|
7
38
|
|
|
8
39
|
|
package/dist/ShareModal.js
CHANGED
|
@@ -33,8 +33,8 @@ var SharingModal = function SharingModal(_ref) {
|
|
|
33
33
|
export var ShareModal = withLocales(function (props) {
|
|
34
34
|
var _location$state;
|
|
35
35
|
|
|
36
|
-
var location = useLocation();
|
|
37
|
-
var locationProps = (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.modalProps;
|
|
36
|
+
var location = useLocation === null || useLocation === void 0 ? void 0 : useLocation();
|
|
37
|
+
var locationProps = location === null || location === void 0 ? void 0 : (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.modalProps;
|
|
38
38
|
var document = (locationProps === null || locationProps === void 0 ? void 0 : locationProps.document) || props.document;
|
|
39
39
|
var rest = omit(locationProps || props, 'document');
|
|
40
40
|
return /*#__PURE__*/React.createElement(SharingContext.Consumer, null, function (_ref3) {
|
|
@@ -27,11 +27,11 @@ export var ShareModal = function ShareModal(_ref) {
|
|
|
27
27
|
sharing = _ref.sharing,
|
|
28
28
|
sharingDesc = _ref.sharingDesc,
|
|
29
29
|
twoStepsConfirmationMethods = _ref.twoStepsConfirmationMethods;
|
|
30
|
-
var showShareByEmail = documentType !== 'Albums' && !hasSharedParent && !hasSharedChild;
|
|
30
|
+
var showShareByEmail = documentType !== 'Notes' && documentType !== 'Albums' && !hasSharedParent && !hasSharedChild;
|
|
31
31
|
var showShareByLink = documentType !== 'Organizations';
|
|
32
32
|
var showShareOnlyByLink = hasSharedParent || hasSharedChild;
|
|
33
33
|
var showWhoHasAccess = documentType !== 'Albums';
|
|
34
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, documentType === 'Albums' && /*#__PURE__*/React.createElement(ShareDialogOnlyByLink, {
|
|
34
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, (documentType === 'Notes' || documentType === 'Albums') && /*#__PURE__*/React.createElement(ShareDialogOnlyByLink, {
|
|
35
35
|
document: document,
|
|
36
36
|
documentType: documentType,
|
|
37
37
|
link: link,
|
|
@@ -40,7 +40,7 @@ export var ShareModal = function ShareModal(_ref) {
|
|
|
40
40
|
onShareByLink: onShareByLink,
|
|
41
41
|
onUpdateShareLinkPermissions: onUpdateShareLinkPermissions,
|
|
42
42
|
permissions: permissions
|
|
43
|
-
}), documentType !== 'Albums' && /*#__PURE__*/React.createElement(ShareDialogCozyToCozy, {
|
|
43
|
+
}), documentType !== 'Notes' && documentType !== 'Albums' && /*#__PURE__*/React.createElement(ShareDialogCozyToCozy, {
|
|
44
44
|
contacts: contacts,
|
|
45
45
|
createContact: createContact,
|
|
46
46
|
document: document,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.3",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@cozy/minilog": "^1.0.0",
|
|
29
29
|
"classnames": "^2.2.6",
|
|
30
30
|
"copy-text-to-clipboard": "^2.1.1",
|
|
31
|
-
"cozy-device-helper": "^2.2.
|
|
32
|
-
"cozy-doctypes": "^1.
|
|
31
|
+
"cozy-device-helper": "^2.2.2",
|
|
32
|
+
"cozy-doctypes": "^1.85.1",
|
|
33
33
|
"lodash": "^4.17.19",
|
|
34
34
|
"react-autosuggest": "^9.4.3",
|
|
35
35
|
"react-tooltip": "^3.11.1",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"sideEffects": [
|
|
64
64
|
"*.css"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "2289f1b25b415030fcf9b9c23ebc7e170fe7ab5d"
|
|
67
67
|
}
|
package/src/ShareModal.jsx
CHANGED
|
@@ -30,8 +30,8 @@ const SharingModal = ({ document, ...rest }) => (
|
|
|
30
30
|
)
|
|
31
31
|
|
|
32
32
|
export const ShareModal = withLocales(props => {
|
|
33
|
-
const location = useLocation()
|
|
34
|
-
const locationProps = location
|
|
33
|
+
const location = useLocation?.()
|
|
34
|
+
const locationProps = location?.state?.modalProps
|
|
35
35
|
const document = locationProps?.document || props.document
|
|
36
36
|
const rest = omit(locationProps || props, 'document')
|
|
37
37
|
|
|
@@ -30,14 +30,17 @@ export const ShareModal = ({
|
|
|
30
30
|
twoStepsConfirmationMethods
|
|
31
31
|
}) => {
|
|
32
32
|
const showShareByEmail =
|
|
33
|
-
documentType !== '
|
|
33
|
+
documentType !== 'Notes' &&
|
|
34
|
+
documentType !== 'Albums' &&
|
|
35
|
+
!hasSharedParent &&
|
|
36
|
+
!hasSharedChild
|
|
34
37
|
const showShareByLink = documentType !== 'Organizations'
|
|
35
38
|
const showShareOnlyByLink = hasSharedParent || hasSharedChild
|
|
36
39
|
const showWhoHasAccess = documentType !== 'Albums'
|
|
37
40
|
|
|
38
41
|
return (
|
|
39
42
|
<>
|
|
40
|
-
{documentType === 'Albums' && (
|
|
43
|
+
{(documentType === 'Notes' || documentType === 'Albums') && (
|
|
41
44
|
<ShareDialogOnlyByLink
|
|
42
45
|
document={document}
|
|
43
46
|
documentType={documentType}
|
|
@@ -49,7 +52,7 @@ export const ShareModal = ({
|
|
|
49
52
|
permissions={permissions}
|
|
50
53
|
/>
|
|
51
54
|
)}
|
|
52
|
-
{documentType !== 'Albums' && (
|
|
55
|
+
{documentType !== 'Notes' && documentType !== 'Albums' && (
|
|
53
56
|
<ShareDialogCozyToCozy
|
|
54
57
|
contacts={contacts}
|
|
55
58
|
createContact={createContact}
|