cozy-sharing 10.2.0 → 10.4.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 +22 -0
- package/dist/ConfirmTrustedRecipientsDialog.js +1 -1
- package/dist/ShareButton.js +1 -1
- package/dist/ShareButton.spec.js +1 -1
- package/dist/SharedBadge.js +1 -1
- package/dist/SharedRecipients.js +1 -1
- package/dist/SharedRecipientsList.js +1 -1
- package/dist/SharedStatus.js +1 -1
- package/dist/SharingOwnerAvatar.js +1 -1
- package/dist/components/CozyPassFingerprintDialogContent.js +1 -1
- package/dist/components/Recipient/Identity.js +15 -17
- package/dist/components/Recipient/LinkRecipient.js +16 -18
- package/dist/components/Recipient/OwnerIdentity.js +16 -18
- package/dist/components/Recipient/RecipientConfirm.js +21 -25
- package/dist/components/Recipient/RecipientList.js +36 -0
- package/dist/components/Recipient/RecipientPlusX.js +16 -18
- package/dist/components/Recipient/RecipientStatus.js +15 -17
- package/dist/components/Recipient/RecipientWithoutStatus.js +16 -18
- package/dist/components/Recipient/RecipientsAvatars.js +16 -18
- package/dist/components/ShareAutosuggest.js +10 -12
- package/dist/components/ShareButton.js +2 -2
- package/dist/components/ShareByEmail.js +22 -26
- package/dist/components/ShareDialogCozyToCozy.js +21 -25
- package/dist/components/{EditableSharingModal.js → ShareModal/EditableSharingModal.js} +5 -5
- package/dist/components/{EditableSharingModal.spec.js → ShareModal/EditableSharingModal.spec.js} +6 -6
- package/dist/components/ShareModal/ShareModal.js +43 -0
- package/dist/{SharingDetailsModal.js → components/ShareModal/SharingDetailsModal.js} +24 -28
- package/dist/components/SharedBadge.js +6 -6
- package/dist/components/SharedStatus.js +4 -4
- package/dist/components/Sharetypeselect.js +21 -25
- package/dist/{SharingBanner → components/SharingBanner}/components/PublicBanner.js +2 -2
- package/dist/{SharingBanner → components/SharingBanner}/hooks/useSharingInfos.js +2 -2
- package/dist/{SharingBanner → components/SharingBanner}/index.js +1 -1
- package/dist/{SharingBanner → components/SharingBanner}/test/AppLike.js +2 -2
- package/dist/components/Tooltip.js +2 -2
- package/dist/components/WhoHasAccess.js +10 -20
- package/dist/components/WhoHasAccessLight.js +17 -1
- package/dist/{withLocales.js → hoc/withLocales.js} +2 -2
- package/dist/index.js +5 -5
- package/dist/{components → styles}/actionmenu.styl +0 -2
- package/dist/{components → styles}/autosuggest.styl +1 -4
- package/dist/{SharingBanner/components → styles}/publicBanner.styl +5 -5
- package/dist/{components/Recipient → styles}/recipient.styl +0 -1
- package/{src → dist/styles}/share.styl +0 -1
- package/dist/stylesheet.css +214 -2635
- package/docs/share-modal-architecture.md +44 -0
- package/package.json +6 -6
- package/src/ConfirmTrustedRecipientsDialog.jsx +1 -1
- package/src/ShareButton.jsx +1 -1
- package/src/ShareButton.spec.jsx +1 -1
- package/src/SharedBadge.jsx +1 -1
- package/src/SharedRecipients.jsx +1 -1
- package/src/SharedRecipientsList.jsx +1 -1
- package/src/SharedStatus.jsx +1 -1
- package/src/SharingOwnerAvatar.jsx +1 -1
- package/src/assets/icons/icon-arrow-down.svg +3 -0
- package/src/assets/icons/icon-calendar-16.svg +8 -0
- package/src/assets/icons/icon-check-blue.svg +59 -0
- package/src/assets/icons/icon-cross-bold.svg +5 -0
- package/src/assets/icons/icon-link.svg +14 -0
- package/src/assets/icons/icon-pen-16.svg +3 -0
- package/src/components/CozyPassFingerprintDialogContent.jsx +1 -1
- package/src/components/Recipient/Identity.jsx +1 -1
- package/src/components/Recipient/LinkRecipient.jsx +1 -1
- package/src/components/Recipient/OwnerIdentity.jsx +1 -1
- package/src/components/Recipient/RecipientConfirm.jsx +1 -1
- package/src/components/Recipient/RecipientList.jsx +45 -0
- package/src/components/Recipient/RecipientPlusX.jsx +1 -1
- package/src/components/Recipient/RecipientStatus.jsx +1 -1
- package/src/components/Recipient/RecipientWithoutStatus.jsx +1 -1
- package/src/components/Recipient/RecipientsAvatars.jsx +1 -1
- package/src/components/ShareAutosuggest.jsx +1 -1
- package/src/components/ShareButton.jsx +1 -1
- package/src/components/ShareByEmail.jsx +1 -1
- package/src/components/ShareDialogCozyToCozy.jsx +1 -1
- package/src/components/{EditableSharingModal.jsx → ShareModal/EditableSharingModal.jsx} +5 -5
- package/src/components/{EditableSharingModal.spec.jsx → ShareModal/EditableSharingModal.spec.jsx} +6 -6
- package/src/components/ShareModal/ShareModal.jsx +45 -0
- package/src/{SharingDetailsModal.jsx → components/ShareModal/SharingDetailsModal.jsx} +4 -4
- package/src/components/SharedBadge.jsx +1 -1
- package/src/components/SharedStatus.jsx +2 -2
- package/src/components/Sharetypeselect.jsx +1 -1
- package/src/{SharingBanner → components/SharingBanner}/components/PublicBanner.jsx +2 -2
- package/src/{SharingBanner → components/SharingBanner}/hooks/useSharingInfos.jsx +2 -2
- package/src/{SharingBanner → components/SharingBanner}/index.jsx +1 -1
- package/src/{SharingBanner → components/SharingBanner}/test/AppLike.jsx +2 -2
- package/src/components/Tooltip.jsx +1 -1
- package/src/components/WhoHasAccess.jsx +11 -29
- package/src/components/WhoHasAccessLight.jsx +1 -1
- package/src/components/__snapshots__/ContactSuggestion.spec.jsx.snap +120 -105
- package/src/{withLocales.jsx → hoc/withLocales.jsx} +2 -2
- package/src/index.jsx +6 -5
- package/src/{components → styles}/actionmenu.styl +0 -2
- package/src/{components → styles}/autosuggest.styl +1 -4
- package/src/{SharingBanner/components → styles}/publicBanner.styl +5 -5
- package/src/{components/Recipient → styles}/recipient.styl +0 -1
- package/{dist → src/styles}/share.styl +0 -1
- package/dist/ShareModal.js +0 -50
- package/src/ShareModal.jsx +0 -51
- /package/{assets → dist/assets}/icons/icon-arrow-down.svg +0 -0
- /package/{assets → dist/assets}/icons/icon-calendar-16.svg +0 -0
- /package/{assets → dist/assets}/icons/icon-check-blue.svg +0 -0
- /package/{assets → dist/assets}/icons/icon-cross-bold.svg +0 -0
- /package/{assets → dist/assets}/icons/icon-link.svg +0 -0
- /package/{assets → dist/assets}/icons/icon-pen-16.svg +0 -0
- /package/dist/{SharingBanner → components/SharingBanner}/components/CozyHomeLinkIcon.js +0 -0
- /package/dist/{SharingBanner → components/SharingBanner}/components/PublicBanner.spec.js +0 -0
- /package/dist/{SharingBanner → components/SharingBanner}/components/SharingBanner.js +0 -0
- /package/dist/{SharingBanner → components/SharingBanner}/helpers/QueryParameter.js +0 -0
- /package/dist/{SharingBanner → components/SharingBanner}/helpers/QueryParameter.spec.js +0 -0
- /package/dist/{SharingBanner → components/SharingBanner}/hooks/useSharingInfos.spec.js +0 -0
- /package/dist/{SharingBanner → components/SharingBanner}/test/AcceptingSharingContext.js +0 -0
- /package/dist/{SharingBanner → components/SharingBanner}/test/FabProvider.js +0 -0
- /package/dist/{SharingBanner → components/SharingBanner}/test/ModalContext.js +0 -0
- /package/dist/{SharingBanner → components/SharingBanner}/test/RouterContext.js +0 -0
- /package/dist/{SharingBanner → components/SharingBanner}/test/ThumbnailSizeContext.js +0 -0
- /package/dist/{components → hooks}/useFetchDocumentPath.js +0 -0
- /package/dist/{components → styles}/CozyPassFingerprintDialogContent.styl +0 -0
- /package/dist/{components → styles}/badge.styl +0 -0
- /package/dist/{components → styles}/button.styl +0 -0
- /package/dist/{components → styles}/status.styl +0 -0
- /package/dist/{components → styles}/tooltip.styl +0 -0
- /package/src/{SharingBanner → components/SharingBanner}/components/CozyHomeLinkIcon.jsx +0 -0
- /package/src/{SharingBanner → components/SharingBanner}/components/PublicBanner.spec.jsx +0 -0
- /package/src/{SharingBanner → components/SharingBanner}/components/SharingBanner.jsx +0 -0
- /package/src/{SharingBanner → components/SharingBanner}/helpers/QueryParameter.js +0 -0
- /package/src/{SharingBanner → components/SharingBanner}/helpers/QueryParameter.spec.js +0 -0
- /package/src/{SharingBanner → components/SharingBanner}/hooks/useSharingInfos.spec.js +0 -0
- /package/src/{SharingBanner → components/SharingBanner}/test/AcceptingSharingContext.jsx +0 -0
- /package/src/{SharingBanner → components/SharingBanner}/test/FabProvider.jsx +0 -0
- /package/src/{SharingBanner → components/SharingBanner}/test/ModalContext.jsx +0 -0
- /package/src/{SharingBanner → components/SharingBanner}/test/RouterContext.jsx +0 -0
- /package/src/{SharingBanner → components/SharingBanner}/test/ThumbnailSizeContext.jsx +0 -0
- /package/src/{components → hooks}/useFetchDocumentPath.jsx +0 -0
- /package/src/{components → styles}/CozyPassFingerprintDialogContent.styl +0 -0
- /package/src/{components → styles}/badge.styl +0 -0
- /package/src/{components → styles}/button.styl +0 -0
- /package/src/{components → styles}/status.styl +0 -0
- /package/src/{components → styles}/tooltip.styl +0 -0
|
@@ -17,34 +17,30 @@ import { hasReachRecipientsLimit } from '../helpers/recipients';
|
|
|
17
17
|
import { getSuccessMessage } from '../helpers/successMessage';
|
|
18
18
|
import { Group } from '../models';
|
|
19
19
|
import { contactsResponseType, groupsResponseType } from '../propTypes';
|
|
20
|
+
import { isReadOnlySharing } from '../state';
|
|
20
21
|
var styles = {
|
|
21
|
-
"share-modal-content": "share__share-modal-
|
|
22
|
-
"coz-form": "share__coz-
|
|
23
|
-
"coz-form-group": "share__coz-form-
|
|
24
|
-
"coz-form-desc": "share__coz-form-
|
|
25
|
-
"coz-form-label": "share__coz-form-
|
|
26
|
-
"coz-form-label--error": "share__coz-form-label--
|
|
27
|
-
"coz-form-errors": "share__coz-form-
|
|
28
|
-
"coz-form-controls": "share__coz-form-
|
|
29
|
-
"coz-form-controls--full": "share__coz-form-controls--
|
|
30
|
-
"coz-form-controls--dispatch": "share__coz-form-controls--
|
|
31
|
-
"error": "
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"share-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"select-
|
|
38
|
-
"select-option": "share__select-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"share-details-
|
|
42
|
-
"share-details-perm": "share__share-details-perm___23_VF",
|
|
43
|
-
"share-details-perm-desc": "share__share-details-perm-desc___tqfXx",
|
|
44
|
-
"spin": "share__spin___1P7nU",
|
|
45
|
-
"shake": "share__shake___1EeCI"
|
|
22
|
+
"share-modal-content": "share__share-modal-content___1iqEq",
|
|
23
|
+
"coz-form": "share__coz-form___1ICST",
|
|
24
|
+
"coz-form-group": "share__coz-form-group___VsQp7",
|
|
25
|
+
"coz-form-desc": "share__coz-form-desc___2mYN4",
|
|
26
|
+
"coz-form-label": "share__coz-form-label___bogBw",
|
|
27
|
+
"coz-form-label--error": "share__coz-form-label--error___3YPkf",
|
|
28
|
+
"coz-form-errors": "share__coz-form-errors___2xYRz",
|
|
29
|
+
"coz-form-controls": "share__coz-form-controls___H8kGc",
|
|
30
|
+
"coz-form-controls--full": "share__coz-form-controls--full___1oQXF",
|
|
31
|
+
"coz-form-controls--dispatch": "share__coz-form-controls--dispatch___1zIxt",
|
|
32
|
+
"error": "share__error___pwqPO",
|
|
33
|
+
"share-byemail-onlybylink": "share__share-byemail-onlybylink___29W-t",
|
|
34
|
+
"aligned-dropdown-button": "share__aligned-dropdown-button___3crgG",
|
|
35
|
+
"share-type-control": "share__share-type-control___1YoRr",
|
|
36
|
+
"select-wrapper": "share__select-wrapper___3XBKC",
|
|
37
|
+
"select-option": "share__select-option___3Jp8_",
|
|
38
|
+
"select-option-label": "share__select-option-label___1BWz_",
|
|
39
|
+
"select-option-desc": "share__select-option-desc___3jOnr",
|
|
40
|
+
"share-details-created": "share__share-details-created___z3nvO",
|
|
41
|
+
"share-details-perm": "share__share-details-perm___3HjxK",
|
|
42
|
+
"share-details-perm-desc": "share__share-details-perm-desc___3HyHu"
|
|
46
43
|
};
|
|
47
|
-
import { isReadOnlySharing } from '../state';
|
|
48
44
|
export var ShareByEmail = function ShareByEmail(_ref) {
|
|
49
45
|
var contacts = _ref.contacts,
|
|
50
46
|
groups = _ref.groups,
|
|
@@ -10,31 +10,27 @@ import { default as DumbShareByLink } from './ShareByLink';
|
|
|
10
10
|
import ShareDialogTwoStepsConfirmationContainer from './ShareDialogTwoStepsConfirmationContainer';
|
|
11
11
|
import WhoHasAccess from './WhoHasAccess';
|
|
12
12
|
var styles = {
|
|
13
|
-
"share-modal-content": "share__share-modal-
|
|
14
|
-
"coz-form": "share__coz-
|
|
15
|
-
"coz-form-group": "share__coz-form-
|
|
16
|
-
"coz-form-desc": "share__coz-form-
|
|
17
|
-
"coz-form-label": "share__coz-form-
|
|
18
|
-
"coz-form-label--error": "share__coz-form-label--
|
|
19
|
-
"coz-form-errors": "share__coz-form-
|
|
20
|
-
"coz-form-controls": "share__coz-form-
|
|
21
|
-
"coz-form-controls--full": "share__coz-form-controls--
|
|
22
|
-
"coz-form-controls--dispatch": "share__coz-form-controls--
|
|
23
|
-
"error": "
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"share-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"select-
|
|
30
|
-
"select-option": "share__select-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"share-details-
|
|
34
|
-
"share-details-perm": "share__share-details-perm___23_VF",
|
|
35
|
-
"share-details-perm-desc": "share__share-details-perm-desc___tqfXx",
|
|
36
|
-
"spin": "share__spin___1P7nU",
|
|
37
|
-
"shake": "share__shake___1EeCI"
|
|
13
|
+
"share-modal-content": "share__share-modal-content___1iqEq",
|
|
14
|
+
"coz-form": "share__coz-form___1ICST",
|
|
15
|
+
"coz-form-group": "share__coz-form-group___VsQp7",
|
|
16
|
+
"coz-form-desc": "share__coz-form-desc___2mYN4",
|
|
17
|
+
"coz-form-label": "share__coz-form-label___bogBw",
|
|
18
|
+
"coz-form-label--error": "share__coz-form-label--error___3YPkf",
|
|
19
|
+
"coz-form-errors": "share__coz-form-errors___2xYRz",
|
|
20
|
+
"coz-form-controls": "share__coz-form-controls___H8kGc",
|
|
21
|
+
"coz-form-controls--full": "share__coz-form-controls--full___1oQXF",
|
|
22
|
+
"coz-form-controls--dispatch": "share__coz-form-controls--dispatch___1zIxt",
|
|
23
|
+
"error": "share__error___pwqPO",
|
|
24
|
+
"share-byemail-onlybylink": "share__share-byemail-onlybylink___29W-t",
|
|
25
|
+
"aligned-dropdown-button": "share__aligned-dropdown-button___3crgG",
|
|
26
|
+
"share-type-control": "share__share-type-control___1YoRr",
|
|
27
|
+
"select-wrapper": "share__select-wrapper___3XBKC",
|
|
28
|
+
"select-option": "share__select-option___3Jp8_",
|
|
29
|
+
"select-option-label": "share__select-option-label___1BWz_",
|
|
30
|
+
"select-option-desc": "share__select-option-desc___3jOnr",
|
|
31
|
+
"share-details-created": "share__share-details-created___z3nvO",
|
|
32
|
+
"share-details-perm": "share__share-details-perm___3HjxK",
|
|
33
|
+
"share-details-perm-desc": "share__share-details-perm-desc___3HyHu"
|
|
38
34
|
};
|
|
39
35
|
/**
|
|
40
36
|
* Displays the sharing interface that can be used when ShareDialogCozyToCozy is in sharing state
|
|
@@ -4,11 +4,11 @@ var _excluded = ["document"];
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { useClient, useQueryAll } from 'cozy-client';
|
|
7
|
-
import
|
|
8
|
-
import { useFetchDocumentPath } from '
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import SharingContext from '../../context';
|
|
8
|
+
import { useFetchDocumentPath } from '../../hooks/useFetchDocumentPath';
|
|
9
|
+
import { Contact } from '../../models';
|
|
10
|
+
import { buildContactsQuery, buildGroupsQuery } from '../../queries/queries';
|
|
11
|
+
import { default as DumbShareModal } from '../ShareModal';
|
|
12
12
|
export var EditableSharingModal = function EditableSharingModal(_ref) {
|
|
13
13
|
var document = _ref.document,
|
|
14
14
|
rest = _objectWithoutProperties(_ref, _excluded);
|
package/dist/components/{EditableSharingModal.spec.js → ShareModal/EditableSharingModal.spec.js}
RENAMED
|
@@ -3,12 +3,12 @@ import React from 'react';
|
|
|
3
3
|
import { createMockClient } from 'cozy-client';
|
|
4
4
|
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints';
|
|
5
5
|
import { EditableSharingModal } from './EditableSharingModal';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
jest.mock('
|
|
6
|
+
import AppLike from '../../../test/AppLike';
|
|
7
|
+
import { SharingProvider } from '../../SharingProvider';
|
|
8
|
+
import { useFetchDocumentPath } from '../../hooks/useFetchDocumentPath';
|
|
9
|
+
import { receivePaths } from '../../state';
|
|
10
|
+
import { default as DumbShareModal } from '../ShareModal';
|
|
11
|
+
jest.mock('../../hooks/useFetchDocumentPath', function () {
|
|
12
12
|
return {
|
|
13
13
|
useFetchDocumentPath: jest.fn()
|
|
14
14
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import omit from 'lodash/omit';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useLocation } from 'react-router';
|
|
5
|
+
import EditableSharingModal from './EditableSharingModal';
|
|
6
|
+
import { SharingDetailsModal } from './SharingDetailsModal';
|
|
7
|
+
import withLocales from '../../hoc/withLocales';
|
|
8
|
+
import { useSharingContext } from '../../hooks/useSharingContext';
|
|
9
|
+
export var ShareModal = withLocales(function (props) {
|
|
10
|
+
var _location$state;
|
|
11
|
+
|
|
12
|
+
var location = useLocation === null || useLocation === void 0 ? void 0 : useLocation();
|
|
13
|
+
var locationProps = location === null || location === void 0 || (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.modalProps;
|
|
14
|
+
var document = (locationProps === null || locationProps === void 0 ? void 0 : locationProps.document) || props.document;
|
|
15
|
+
var rest = omit(locationProps || props, 'document');
|
|
16
|
+
|
|
17
|
+
var _useSharingContext = useSharingContext(),
|
|
18
|
+
byDocId = _useSharingContext.byDocId,
|
|
19
|
+
isOwner = _useSharingContext.isOwner,
|
|
20
|
+
canReshare = _useSharingContext.canReshare,
|
|
21
|
+
documentType = _useSharingContext.documentType,
|
|
22
|
+
getOwner = _useSharingContext.getOwner,
|
|
23
|
+
getSharingType = _useSharingContext.getSharingType,
|
|
24
|
+
getRecipients = _useSharingContext.getRecipients,
|
|
25
|
+
revokeSelf = _useSharingContext.revokeSelf;
|
|
26
|
+
|
|
27
|
+
var isEditable = !byDocId[document.id] || isOwner(document.id) || canReshare(document.id);
|
|
28
|
+
|
|
29
|
+
if (isEditable) {
|
|
30
|
+
return /*#__PURE__*/React.createElement(EditableSharingModal, _extends({
|
|
31
|
+
document: document
|
|
32
|
+
}, rest));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return /*#__PURE__*/React.createElement(SharingDetailsModal, _extends({
|
|
36
|
+
document: document,
|
|
37
|
+
documentType: documentType,
|
|
38
|
+
owner: getOwner(document.id),
|
|
39
|
+
sharingType: getSharingType(document.id),
|
|
40
|
+
recipients: getRecipients(document.id),
|
|
41
|
+
onRevoke: revokeSelf
|
|
42
|
+
}, rest));
|
|
43
|
+
});
|
|
@@ -3,36 +3,32 @@ import React from 'react';
|
|
|
3
3
|
import { Dialog } from 'cozy-ui/transpiled/react/CozyDialogs';
|
|
4
4
|
import Divider from 'cozy-ui/transpiled/react/Divider';
|
|
5
5
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
6
|
-
import
|
|
7
|
-
import WhoHasAccess from './components/WhoHasAccess';
|
|
8
|
-
import { getDisplayName } from './models';
|
|
6
|
+
import { getDisplayName } from '../../models';
|
|
9
7
|
var styles = {
|
|
10
|
-
"share-modal-content": "share__share-modal-
|
|
11
|
-
"coz-form": "share__coz-
|
|
12
|
-
"coz-form-group": "share__coz-form-
|
|
13
|
-
"coz-form-desc": "share__coz-form-
|
|
14
|
-
"coz-form-label": "share__coz-form-
|
|
15
|
-
"coz-form-label--error": "share__coz-form-label--
|
|
16
|
-
"coz-form-errors": "share__coz-form-
|
|
17
|
-
"coz-form-controls": "share__coz-form-
|
|
18
|
-
"coz-form-controls--full": "share__coz-form-controls--
|
|
19
|
-
"coz-form-controls--dispatch": "share__coz-form-controls--
|
|
20
|
-
"error": "
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"share-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"select-
|
|
27
|
-
"select-option": "share__select-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"share-details-
|
|
31
|
-
"share-details-perm": "share__share-details-perm___23_VF",
|
|
32
|
-
"share-details-perm-desc": "share__share-details-perm-desc___tqfXx",
|
|
33
|
-
"spin": "share__spin___1P7nU",
|
|
34
|
-
"shake": "share__shake___1EeCI"
|
|
8
|
+
"share-modal-content": "share__share-modal-content___1iqEq",
|
|
9
|
+
"coz-form": "share__coz-form___1ICST",
|
|
10
|
+
"coz-form-group": "share__coz-form-group___VsQp7",
|
|
11
|
+
"coz-form-desc": "share__coz-form-desc___2mYN4",
|
|
12
|
+
"coz-form-label": "share__coz-form-label___bogBw",
|
|
13
|
+
"coz-form-label--error": "share__coz-form-label--error___3YPkf",
|
|
14
|
+
"coz-form-errors": "share__coz-form-errors___2xYRz",
|
|
15
|
+
"coz-form-controls": "share__coz-form-controls___H8kGc",
|
|
16
|
+
"coz-form-controls--full": "share__coz-form-controls--full___1oQXF",
|
|
17
|
+
"coz-form-controls--dispatch": "share__coz-form-controls--dispatch___1zIxt",
|
|
18
|
+
"error": "share__error___pwqPO",
|
|
19
|
+
"share-byemail-onlybylink": "share__share-byemail-onlybylink___29W-t",
|
|
20
|
+
"aligned-dropdown-button": "share__aligned-dropdown-button___3crgG",
|
|
21
|
+
"share-type-control": "share__share-type-control___1YoRr",
|
|
22
|
+
"select-wrapper": "share__select-wrapper___3XBKC",
|
|
23
|
+
"select-option": "share__select-option___3Jp8_",
|
|
24
|
+
"select-option-label": "share__select-option-label___1BWz_",
|
|
25
|
+
"select-option-desc": "share__select-option-desc___3jOnr",
|
|
26
|
+
"share-details-created": "share__share-details-created___z3nvO",
|
|
27
|
+
"share-details-perm": "share__share-details-perm___3HjxK",
|
|
28
|
+
"share-details-perm-desc": "share__share-details-perm-desc___3HyHu"
|
|
35
29
|
};
|
|
30
|
+
import OwnerIdentity from '../Recipient/OwnerIdentity';
|
|
31
|
+
import WhoHasAccess from '../WhoHasAccess';
|
|
36
32
|
export var SharingDetailsModal = function SharingDetailsModal(_ref) {
|
|
37
33
|
var onClose = _ref.onClose,
|
|
38
34
|
sharingType = _ref.sharingType,
|
|
@@ -5,12 +5,12 @@ import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
|
5
5
|
import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share';
|
|
6
6
|
import palette from 'cozy-ui/transpiled/react/palette';
|
|
7
7
|
var styles = {
|
|
8
|
-
"shared-badge": "badge__shared-
|
|
9
|
-
"--small": "badge__--
|
|
10
|
-
"shared-badge-icon": "badge__shared-badge-
|
|
11
|
-
"--xsmall": "badge__--
|
|
12
|
-
"--by-me": "badge__--by-
|
|
13
|
-
"--with-me": "badge__--with-
|
|
8
|
+
"shared-badge": "badge__shared-badge___2jGsy",
|
|
9
|
+
"--small": "badge__--small___2VMyY",
|
|
10
|
+
"shared-badge-icon": "badge__shared-badge-icon___3s9t1",
|
|
11
|
+
"--xsmall": "badge__--xsmall___2cEGG",
|
|
12
|
+
"--by-me": "badge__--by-me___3aTHb",
|
|
13
|
+
"--with-me": "badge__--with-me___3jW7R"
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
var SharedBadge = function SharedBadge(_ref) {
|
|
@@ -3,10 +3,6 @@ import React from 'react';
|
|
|
3
3
|
import palette from 'cozy-ui/transpiled/react/palette';
|
|
4
4
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
5
5
|
import { SharingTooltip, TooltipRecipientList } from './Tooltip';
|
|
6
|
-
var styles = {
|
|
7
|
-
"shared-status": "status__shared-status___J15Fy",
|
|
8
|
-
"shared-status-label": "status__shared-status-label___2AWic"
|
|
9
|
-
};
|
|
10
6
|
|
|
11
7
|
var LinkIcon = function LinkIcon(props) {
|
|
12
8
|
return /*#__PURE__*/React.createElement("svg", props, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("path", {
|
|
@@ -26,6 +22,10 @@ LinkIcon.defaultProps = {
|
|
|
26
22
|
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
27
23
|
};
|
|
28
24
|
import { getDisplayName } from '../models';
|
|
25
|
+
var styles = {
|
|
26
|
+
"shared-status": "status__shared-status___2HpyL",
|
|
27
|
+
"shared-status-label": "status__shared-status-label___1-jvS"
|
|
28
|
+
};
|
|
29
29
|
export var SharedStatus = function SharedStatus(_ref) {
|
|
30
30
|
var className = _ref.className,
|
|
31
31
|
docId = _ref.docId,
|
|
@@ -14,31 +14,27 @@ import SelectBox, { components } from 'cozy-ui/transpiled/react/SelectBox';
|
|
|
14
14
|
import palette from 'cozy-ui/transpiled/react/palette';
|
|
15
15
|
import logger from '../logger';
|
|
16
16
|
var styles = {
|
|
17
|
-
"share-modal-content": "share__share-modal-
|
|
18
|
-
"coz-form": "share__coz-
|
|
19
|
-
"coz-form-group": "share__coz-form-
|
|
20
|
-
"coz-form-desc": "share__coz-form-
|
|
21
|
-
"coz-form-label": "share__coz-form-
|
|
22
|
-
"coz-form-label--error": "share__coz-form-label--
|
|
23
|
-
"coz-form-errors": "share__coz-form-
|
|
24
|
-
"coz-form-controls": "share__coz-form-
|
|
25
|
-
"coz-form-controls--full": "share__coz-form-controls--
|
|
26
|
-
"coz-form-controls--dispatch": "share__coz-form-controls--
|
|
27
|
-
"error": "
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"share-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"select-
|
|
34
|
-
"select-option": "share__select-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"share-details-
|
|
38
|
-
"share-details-perm": "share__share-details-perm___23_VF",
|
|
39
|
-
"share-details-perm-desc": "share__share-details-perm-desc___tqfXx",
|
|
40
|
-
"spin": "share__spin___1P7nU",
|
|
41
|
-
"shake": "share__shake___1EeCI"
|
|
17
|
+
"share-modal-content": "share__share-modal-content___1iqEq",
|
|
18
|
+
"coz-form": "share__coz-form___1ICST",
|
|
19
|
+
"coz-form-group": "share__coz-form-group___VsQp7",
|
|
20
|
+
"coz-form-desc": "share__coz-form-desc___2mYN4",
|
|
21
|
+
"coz-form-label": "share__coz-form-label___bogBw",
|
|
22
|
+
"coz-form-label--error": "share__coz-form-label--error___3YPkf",
|
|
23
|
+
"coz-form-errors": "share__coz-form-errors___2xYRz",
|
|
24
|
+
"coz-form-controls": "share__coz-form-controls___H8kGc",
|
|
25
|
+
"coz-form-controls--full": "share__coz-form-controls--full___1oQXF",
|
|
26
|
+
"coz-form-controls--dispatch": "share__coz-form-controls--dispatch___1zIxt",
|
|
27
|
+
"error": "share__error___pwqPO",
|
|
28
|
+
"share-byemail-onlybylink": "share__share-byemail-onlybylink___29W-t",
|
|
29
|
+
"aligned-dropdown-button": "share__aligned-dropdown-button___3crgG",
|
|
30
|
+
"share-type-control": "share__share-type-control___1YoRr",
|
|
31
|
+
"select-wrapper": "share__select-wrapper___3XBKC",
|
|
32
|
+
"select-option": "share__select-option___3Jp8_",
|
|
33
|
+
"select-option-label": "share__select-option-label___1BWz_",
|
|
34
|
+
"select-option-desc": "share__select-option-desc___3jOnr",
|
|
35
|
+
"share-details-created": "share__share-details-created___z3nvO",
|
|
36
|
+
"share-details-perm": "share__share-details-perm___3HjxK",
|
|
37
|
+
"share-details-perm-desc": "share__share-details-perm-desc___3HyHu"
|
|
42
38
|
};
|
|
43
39
|
|
|
44
40
|
var DropdownIndicator = function DropdownIndicator(props) {
|
|
@@ -7,7 +7,7 @@ import Button, { ButtonLink } from 'cozy-ui/transpiled/react/deprecated/Button';
|
|
|
7
7
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
8
8
|
import CozyHomeLinkIcon from './CozyHomeLinkIcon';
|
|
9
9
|
var styles = {
|
|
10
|
-
"bannermarkdown": "
|
|
10
|
+
"bannermarkdown": "publicBanner__bannermarkdown___1dR1E"
|
|
11
11
|
};
|
|
12
12
|
var HOME_LINK_HREF = 'https://manager.cozycloud.cc/cozy/create';
|
|
13
13
|
|
|
@@ -111,7 +111,7 @@ var SharingBannerByLinkText = function SharingBannerByLinkText() {
|
|
|
111
111
|
}, t('Share.banner.know_more'));
|
|
112
112
|
return /*#__PURE__*/React.createElement("span", {
|
|
113
113
|
style: {
|
|
114
|
-
color: 'var(--
|
|
114
|
+
color: 'var(--iconTextColor)'
|
|
115
115
|
}
|
|
116
116
|
}, text, " ", knowMore);
|
|
117
117
|
};
|
|
@@ -3,8 +3,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import { useState, useEffect } from 'react';
|
|
5
5
|
import { useClient, models } from 'cozy-client';
|
|
6
|
-
import logger from '
|
|
7
|
-
import { buildSharingsByIdQuery } from '
|
|
6
|
+
import logger from '../../../logger';
|
|
7
|
+
import { buildSharingsByIdQuery } from '../../../queries/queries';
|
|
8
8
|
import getQueryParameter from '../helpers/QueryParameter';
|
|
9
9
|
|
|
10
10
|
var getSharingId = function getSharingId(permission) {
|
|
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SharingBanner } from './components/SharingBanner';
|
|
4
4
|
import { useSharingInfos } from './hooks/useSharingInfos';
|
|
5
|
-
import withLocales from '
|
|
5
|
+
import withLocales from '../../hoc/withLocales';
|
|
6
6
|
|
|
7
7
|
var Plugin = function Plugin(_ref) {
|
|
8
8
|
var previewPath = _ref.previewPath;
|
|
@@ -9,8 +9,8 @@ import FabProvider from './FabProvider';
|
|
|
9
9
|
import { ModalContext } from './ModalContext';
|
|
10
10
|
import { RouterContext } from './RouterContext';
|
|
11
11
|
import { ThumbnailSizeContextProvider } from './ThumbnailSizeContext';
|
|
12
|
-
import langEn from '
|
|
13
|
-
import SharingContext from '
|
|
12
|
+
import langEn from '../../../../locales/en.json';
|
|
13
|
+
import SharingContext from '../../../context';
|
|
14
14
|
var mockStore = createStore(function () {
|
|
15
15
|
return {
|
|
16
16
|
mobile: {
|
|
@@ -27,8 +27,8 @@ import PropTypes from 'prop-types';
|
|
|
27
27
|
import React from 'react';
|
|
28
28
|
import ReactTooltip from 'react-tooltip';
|
|
29
29
|
var styles = {
|
|
30
|
-
"shared-tooltip": "tooltip__shared-
|
|
31
|
-
"shared-tooltip-list": "tooltip__shared-tooltip-
|
|
30
|
+
"shared-tooltip": "tooltip__shared-tooltip___7Dys3",
|
|
31
|
+
"shared-tooltip-list": "tooltip__shared-tooltip-list___jD5hi"
|
|
32
32
|
};
|
|
33
33
|
export var SharingTooltip = function SharingTooltip(props) {
|
|
34
34
|
return /*#__PURE__*/React.createElement(ReactTooltip, _extends({
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import PropTypes from 'prop-types';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import List from 'cozy-ui/transpiled/react/List';
|
|
5
4
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
6
5
|
import LinkRecipient from './Recipient/LinkRecipient';
|
|
7
6
|
import OwnerRecipient from './Recipient/OwnerRecipient';
|
|
8
|
-
import
|
|
7
|
+
import { RecipientList } from './Recipient/RecipientList';
|
|
9
8
|
import { usePrevious } from '../helpers/hooks';
|
|
10
|
-
import { filterAndReworkRecipients } from '../helpers/recipients';
|
|
11
9
|
/**
|
|
12
10
|
* Displays a warning if some contacts are waiting for confirmation of their sharing
|
|
13
11
|
*
|
|
@@ -46,9 +44,7 @@ var WhoHasAccess = function WhoHasAccess(_ref2) {
|
|
|
46
44
|
onUpdateShareLinkPermissions = _ref2.onUpdateShareLinkPermissions,
|
|
47
45
|
onRevokeLink = _ref2.onRevokeLink;
|
|
48
46
|
var previousLink = usePrevious(link);
|
|
49
|
-
var previousRecipients = usePrevious(recipients);
|
|
50
47
|
var linkHasBeenJustCreated = link && previousLink === null;
|
|
51
|
-
var recipientsToDisplay = filterAndReworkRecipients(recipients, previousRecipients);
|
|
52
48
|
return /*#__PURE__*/React.createElement("div", {
|
|
53
49
|
className: className
|
|
54
50
|
}, /*#__PURE__*/React.createElement(RecipientWaitingForConfirmationAlert, {
|
|
@@ -67,21 +63,15 @@ var WhoHasAccess = function WhoHasAccess(_ref2) {
|
|
|
67
63
|
fadeIn: linkHasBeenJustCreated
|
|
68
64
|
}), /*#__PURE__*/React.createElement(OwnerRecipient, {
|
|
69
65
|
recipients: recipients
|
|
70
|
-
}),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
onRevoke: onRevoke,
|
|
80
|
-
onRevokeSelf: onRevokeSelf,
|
|
81
|
-
recipientConfirmationData: recipientConfirmationData,
|
|
82
|
-
verifyRecipient: verifyRecipient,
|
|
83
|
-
fadeIn: recipient.hasBeenJustAdded
|
|
84
|
-
}));
|
|
66
|
+
}), /*#__PURE__*/React.createElement(RecipientList, {
|
|
67
|
+
recipients: recipients,
|
|
68
|
+
recipientsToBeConfirmed: recipientsToBeConfirmed,
|
|
69
|
+
isOwner: isOwner,
|
|
70
|
+
document: document,
|
|
71
|
+
documentType: documentType,
|
|
72
|
+
onRevoke: onRevoke,
|
|
73
|
+
onRevokeSelf: onRevokeSelf,
|
|
74
|
+
verifyRecipient: verifyRecipient
|
|
85
75
|
})));
|
|
86
76
|
};
|
|
87
77
|
|
|
@@ -3,7 +3,23 @@ import cx from 'classnames';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import RecipientPlusX from './Recipient/RecipientPlusX';
|
|
5
5
|
import RecipientWithoutStatus from './Recipient/RecipientWithoutStatus';
|
|
6
|
-
var styles = {
|
|
6
|
+
var styles = {
|
|
7
|
+
"recipient": "recipient__recipient___2DmZI",
|
|
8
|
+
"recipients-list-light": "recipient__recipients-list-light___Vq4op",
|
|
9
|
+
"recipient-idents": "recipient__recipient-idents___3s7rw",
|
|
10
|
+
"recipient-status-icon": "recipient__recipient-status-icon___-liGw",
|
|
11
|
+
"recipient-user": "recipient__recipient-user___1THIU",
|
|
12
|
+
"recipient-details": "recipient__recipient-details___2fZfc",
|
|
13
|
+
"avatar": "recipient__avatar___2LnIV",
|
|
14
|
+
"link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
|
|
15
|
+
"recipients-avatars": "recipient__recipients-avatars___1npjD",
|
|
16
|
+
"--interactive": "recipient__--interactive___160Bp",
|
|
17
|
+
"recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
|
|
18
|
+
"recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
|
|
19
|
+
"recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
|
|
20
|
+
"spin": "recipient__spin___2tYv3",
|
|
21
|
+
"shake": "recipient__shake___TGyPp"
|
|
22
|
+
};
|
|
7
23
|
var MAX_DISPLAYED_RECIPIENTS = 2;
|
|
8
24
|
|
|
9
25
|
var WhoHasAccessLight = function WhoHasAccessLight(_ref) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { I18n, translate } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
3
3
|
var locales = {
|
|
4
|
-
en: require("
|
|
5
|
-
fr: require("
|
|
4
|
+
en: require("../../locales/en.json"),
|
|
5
|
+
fr: require("../../locales/fr.json")
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* Adds cozy-sharing translations in the React context
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import SharingProvider from './SharingProvider';
|
|
2
2
|
import SharingContext from './context';
|
|
3
|
-
import withLocales from './withLocales';
|
|
3
|
+
import withLocales from './hoc/withLocales';
|
|
4
4
|
export default SharingProvider;
|
|
5
5
|
export { SharingContext, withLocales };
|
|
6
6
|
export { useSharingContext } from './hooks/useSharingContext';
|
|
7
|
+
export { useFetchDocumentPath } from './hooks/useFetchDocumentPath';
|
|
7
8
|
export { SharedDocument } from './SharedDocument';
|
|
8
9
|
export { SharedStatus } from './SharedStatus';
|
|
9
10
|
export { SharedBadge } from './SharedBadge';
|
|
@@ -11,12 +12,11 @@ export { SharingOwnerAvatar } from './SharingOwnerAvatar';
|
|
|
11
12
|
export { SharedRecipients } from './SharedRecipients';
|
|
12
13
|
export { SharedRecipientsList } from './SharedRecipientsList';
|
|
13
14
|
export { ShareButton } from './ShareButton';
|
|
14
|
-
export { ShareModal } from './ShareModal';
|
|
15
|
+
export { ShareModal } from './components/ShareModal/ShareModal';
|
|
15
16
|
export { RefreshableSharings } from './RefreshableSharings';
|
|
16
|
-
export { useFetchDocumentPath } from './components/useFetchDocumentPath';
|
|
17
17
|
export { CozyPassFingerprintDialogContent } from './components/CozyPassFingerprintDialogContent';
|
|
18
|
-
export { SharingBannerPlugin } from './SharingBanner';
|
|
19
|
-
export { useSharingInfos } from './SharingBanner/hooks/useSharingInfos';
|
|
18
|
+
export { SharingBannerPlugin } from './components/SharingBanner';
|
|
19
|
+
export { useSharingInfos } from './components/SharingBanner/hooks/useSharingInfos';
|
|
20
20
|
export { ConfirmTrustedRecipientsDialog } from './ConfirmTrustedRecipientsDialog';
|
|
21
21
|
export { ShareButtonWithRecipients } from './ShareButtonWithRecipients';
|
|
22
22
|
export { DOCUMENT_TYPE } from './helpers/documentType';
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
@require 'settings/palette.styl'
|
|
2
|
-
@require 'settings/z-index.styl'
|
|
3
|
-
|
|
4
1
|
.container
|
|
5
2
|
position relative
|
|
6
3
|
|
|
@@ -9,7 +6,7 @@
|
|
|
9
6
|
position absolute
|
|
10
7
|
top 100%
|
|
11
8
|
margin-top .25rem
|
|
12
|
-
z-index
|
|
9
|
+
z-index var(--zIndex-alertMobile)
|
|
13
10
|
width 100%
|
|
14
11
|
overflow hidden
|
|
15
12
|
box-shadow 0px 0px 0px 0.5px rgba(29, 33, 42, 0.12), 0px 2px 4px rgba(29, 33, 42, 0.0793047), 0px 4px 16px rgba(29, 33, 42, 0.06)
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
img
|
|
7
7
|
@extend $avatar
|
|
8
8
|
@extend $circle
|
|
9
|
-
width rem(16)
|
|
10
|
-
height rem(16)
|
|
11
|
-
min-width rem(16)
|
|
12
|
-
min-height rem(16)
|
|
9
|
+
width rem(16)
|
|
10
|
+
height rem(16)
|
|
11
|
+
min-width rem(16)
|
|
12
|
+
min-height rem(16)
|
|
13
13
|
font-size rem(7)
|
|
14
|
-
vertical-align text-bottom
|
|
14
|
+
vertical-align text-bottom
|