cozy-sharing 9.0.2 → 10.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 +18 -0
- package/dist/ShareButton.js +1 -1
- package/dist/ShareButton.spec.js +1 -1
- package/dist/ShareButtonWithRecipients.js +1 -1
- package/dist/SharingBanner/components/PublicBanner.js +1 -1
- package/dist/SharingBanner/components/PublicBanner.spec.js +2 -2
- package/dist/SharingBanner/test/AppLike.js +2 -2
- package/dist/SharingDetailsModal.js +1 -1
- package/dist/SharingProvider.spec.js +4 -5
- package/dist/components/ConfirmTrustedRecipientsDialog.js +1 -1
- package/dist/components/ContactSuggestion.js +1 -1
- package/dist/components/CozyPassFingerprintDialogContent.js +1 -1
- package/dist/components/EditLinkPermissionDialog.js +1 -1
- package/dist/components/EditableSharingModal.spec.js +1 -1
- package/dist/components/Recipient/LinkRecipient.js +1 -1
- package/dist/components/Recipient/LinkRecipientPermissions.js +1 -1
- package/dist/components/Recipient/Recipient.js +1 -1
- package/dist/components/Recipient/RecipientConfirm.js +1 -1
- package/dist/components/Recipient/RecipientPermissions.js +1 -1
- package/dist/components/Recipient/RecipientStatus.js +1 -1
- package/dist/components/ShareByEmail.js +1 -1
- package/dist/components/ShareByLink.js +2 -2
- package/dist/components/ShareDialogCozyToCozy.js +1 -1
- package/dist/components/ShareDialogOnlyByLink.js +1 -1
- package/dist/components/ShareDialogTwoStepsConfirmationContainer.js +1 -1
- package/dist/components/ShareRecipientsLimitModal.js +1 -1
- package/dist/components/SharedStatus.js +1 -1
- package/dist/components/WhoHasAccess.js +1 -1
- package/dist/stylesheet.css +4 -5
- package/dist/withLocales.js +1 -1
- package/package.json +6 -6
- package/src/ShareButton.jsx +1 -1
- package/src/ShareButton.spec.jsx +1 -1
- package/src/ShareButtonWithRecipients.jsx +1 -1
- package/src/SharingBanner/components/PublicBanner.jsx +1 -1
- package/src/SharingBanner/components/PublicBanner.spec.jsx +2 -2
- package/src/SharingBanner/test/AppLike.jsx +2 -2
- package/src/SharingDetailsModal.jsx +1 -1
- package/src/SharingProvider.spec.jsx +4 -4
- package/src/components/ConfirmTrustedRecipientsDialog.jsx +1 -1
- package/src/components/ContactSuggestion.jsx +1 -1
- package/src/components/CozyPassFingerprintDialogContent.jsx +1 -1
- package/src/components/EditLinkPermissionDialog.jsx +1 -1
- package/src/components/EditableSharingModal.spec.jsx +1 -1
- package/src/components/Recipient/LinkRecipient.jsx +1 -1
- package/src/components/Recipient/LinkRecipientPermissions.jsx +1 -1
- package/src/components/Recipient/Recipient.jsx +1 -1
- package/src/components/Recipient/RecipientConfirm.jsx +1 -1
- package/src/components/Recipient/RecipientPermissions.jsx +1 -1
- package/src/components/Recipient/RecipientStatus.jsx +1 -1
- package/src/components/ShareByEmail.jsx +1 -1
- package/src/components/ShareByLink.jsx +2 -2
- package/src/components/ShareDialogCozyToCozy.jsx +1 -1
- package/src/components/ShareDialogOnlyByLink.jsx +1 -1
- package/src/components/ShareDialogTwoStepsConfirmationContainer.jsx +1 -1
- package/src/components/ShareRecipientsLimitModal.jsx +1 -1
- package/src/components/SharedStatus.jsx +1 -1
- package/src/components/WhoHasAccess.jsx +1 -1
- package/src/withLocales.jsx +1 -1
- package/test/AppLike.jsx +10 -7
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
|
+
# [10.0.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@9.0.2...cozy-sharing@10.0.0) (2023-09-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **cozy-sharing:** Update cozy-client from 37.0.0 to 40.5.0 ([7369f1d](https://github.com/cozy/cozy-libs/commit/7369f1d4f7a9e09088e35ab10c37728f425e0db9))
|
|
12
|
+
* **cozy-sharing:** Update cozy-ui from 88.2.1 to 93.1.1 ([94ba194](https://github.com/cozy/cozy-libs/commit/94ba194d2e4e79c3282a0ba2a496a6e9193d41b4))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### BREAKING CHANGES
|
|
16
|
+
|
|
17
|
+
* **cozy-sharing:** You need cozy-ui >= 93.1.1
|
|
18
|
+
* **cozy-sharing:** You need cozy-client >= 40.5.0
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [9.0.2](https://github.com/cozy/cozy-libs/compare/cozy-sharing@9.0.1...cozy-sharing@9.0.2) (2023-09-11)
|
|
7
25
|
|
|
8
26
|
|
package/dist/ShareButton.js
CHANGED
|
@@ -8,7 +8,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
8
8
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
9
|
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
11
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
12
12
|
import { default as DumbShareButton, SharedByMeButton, SharedWithMeButton } from './components/ShareButton';
|
|
13
13
|
import SharingContext from './context';
|
|
14
14
|
import withLocales from './withLocales';
|
package/dist/ShareButton.spec.js
CHANGED
|
@@ -12,7 +12,7 @@ jest.mock('cozy-ui/transpiled/react/Button', function () {
|
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
});
|
|
15
|
-
jest.mock('cozy-ui/transpiled/react/I18n', function () {
|
|
15
|
+
jest.mock('cozy-ui/transpiled/react/providers/I18n', function () {
|
|
16
16
|
return {
|
|
17
17
|
useI18n: jest.fn().mockReturnValue({
|
|
18
18
|
t: jest.fn()
|
|
@@ -4,7 +4,7 @@ var _excluded = ["docId", "onClick"];
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Grid from 'cozy-ui/transpiled/react/Grid';
|
|
6
6
|
import Skeleton from 'cozy-ui/transpiled/react/Skeleton';
|
|
7
|
-
import useBreakpoints from 'cozy-ui/transpiled/react/
|
|
7
|
+
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
|
|
8
8
|
import { ShareButton } from './ShareButton';
|
|
9
9
|
import { SharedRecipients } from './SharedRecipients';
|
|
10
10
|
import SharingContext from './context';
|
|
@@ -3,8 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import snarkdown from 'snarkdown';
|
|
4
4
|
import { useClient } from 'cozy-client';
|
|
5
5
|
import Banner from 'cozy-ui/transpiled/react/Banner';
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
7
6
|
import Button, { ButtonLink } from 'cozy-ui/transpiled/react/deprecated/Button';
|
|
7
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
8
8
|
import CozyHomeLinkIcon from './CozyHomeLinkIcon';
|
|
9
9
|
var styles = {
|
|
10
10
|
"bannermarkdown": "publicBanner__bannermarkdown___1EMSa"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { render } from '@testing-library/react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useClient } from 'cozy-client';
|
|
4
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
4
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
5
5
|
import { SharingBannerCozyToCozy } from './PublicBanner';
|
|
6
|
-
jest.mock('cozy-ui/transpiled/react/I18n');
|
|
6
|
+
jest.mock('cozy-ui/transpiled/react/providers/I18n');
|
|
7
7
|
jest.mock('cozy-client');
|
|
8
8
|
describe('PublicBanner', function () {
|
|
9
9
|
beforeEach(function () {
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { Provider } from 'react-redux';
|
|
3
3
|
import { createStore } from 'redux';
|
|
4
4
|
import { CozyProvider } from 'cozy-client';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints';
|
|
6
|
+
import { I18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
7
7
|
import { AcceptingSharingProvider } from './AcceptingSharingContext';
|
|
8
8
|
import FabProvider from './FabProvider';
|
|
9
9
|
import { ModalContext } from './ModalContext';
|
|
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
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
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
5
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
6
6
|
import OwnerIdentity from './components/Recipient/OwnerIdentity';
|
|
7
7
|
import WhoHasAccess from './components/WhoHasAccess';
|
|
8
8
|
import { getDisplayName } from './models';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
-
import { act } from '@testing-library/react';
|
|
3
|
+
import { act, render, screen } from '@testing-library/react';
|
|
4
4
|
import { mount } from 'enzyme';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { createMockClient } from 'cozy-client';
|
|
@@ -38,17 +38,16 @@ describe('allLoaded', function () {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
it('Change to True when all data is loaded', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
41
|
-
var component;
|
|
42
41
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
43
42
|
while (1) switch (_context2.prev = _context2.next) {
|
|
44
43
|
case 0:
|
|
45
|
-
|
|
44
|
+
render( /*#__PURE__*/React.createElement(AppWrapper, {
|
|
46
45
|
client: client
|
|
47
46
|
}, /*#__PURE__*/React.createElement(SharingContext.Consumer, null, function (_ref3) {
|
|
48
47
|
var allLoaded = _ref3.allLoaded;
|
|
49
48
|
return /*#__PURE__*/React.createElement("div", null, "allLoaded: ".concat(allLoaded));
|
|
50
49
|
})));
|
|
51
|
-
expect(
|
|
50
|
+
expect(screen.getByText('allLoaded: false')).toBeInTheDocument();
|
|
52
51
|
_context2.next = 4;
|
|
53
52
|
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
54
53
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -67,7 +66,7 @@ describe('allLoaded', function () {
|
|
|
67
66
|
})));
|
|
68
67
|
|
|
69
68
|
case 4:
|
|
70
|
-
expect(
|
|
69
|
+
expect(screen.getByText('allLoaded: true')).toBeInTheDocument();
|
|
71
70
|
|
|
72
71
|
case 5:
|
|
73
72
|
case "end":
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
5
4
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
5
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
6
6
|
import Recipient from './Recipient/Recipient';
|
|
7
7
|
import ShareDialogTwoStepsConfirmationContainer from './ShareDialogTwoStepsConfirmationContainer';
|
|
8
8
|
/**
|
|
@@ -3,10 +3,10 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { models } from 'cozy-client';
|
|
5
5
|
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
7
6
|
import ListItem from 'cozy-ui/transpiled/react/ListItem';
|
|
8
7
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
|
|
9
8
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
|
|
9
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
10
10
|
import { Contact, Group, getDisplayName, getInitials } from '../models';
|
|
11
11
|
var ContactModel = models.contact;
|
|
12
12
|
export var ContactSuggestion = function ContactSuggestion(_ref) {
|
|
@@ -2,9 +2,9 @@ import cx from 'classnames';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import snarkdown from 'snarkdown';
|
|
5
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
6
5
|
import Paper from 'cozy-ui/transpiled/react/Paper';
|
|
7
6
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
7
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
8
8
|
var styles = {
|
|
9
9
|
"cozy-pass-fingerprint-modal__fingerprint": "CozyPassFingerprintDialogContent__cozy-pass-fingerprint-modal__fingerprint___2O7dO"
|
|
10
10
|
};
|
|
@@ -4,9 +4,9 @@ import React, { useState } from 'react';
|
|
|
4
4
|
import Button from 'cozy-ui/transpiled/react/Buttons';
|
|
5
5
|
import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
|
|
6
6
|
import FormControlLabel from 'cozy-ui/transpiled/react/FormControlLabel';
|
|
7
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
8
7
|
import RadioGroup from 'cozy-ui/transpiled/react/RadioGroup';
|
|
9
8
|
import Radio from 'cozy-ui/transpiled/react/Radios';
|
|
9
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
10
10
|
|
|
11
11
|
var EditLinkPermissionDialog = function EditLinkPermissionDialog(_ref) {
|
|
12
12
|
var open = _ref.open,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mount } from 'enzyme';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { createMockClient } from 'cozy-client';
|
|
4
|
-
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/
|
|
4
|
+
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints';
|
|
5
5
|
import { EditableSharingModal } from './EditableSharingModal';
|
|
6
6
|
import { default as DumbShareModal } from './ShareModal';
|
|
7
7
|
import { useFetchDocumentPath } from './useFetchDocumentPath';
|
|
@@ -3,13 +3,13 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Circle from 'cozy-ui/transpiled/react/Circle';
|
|
5
5
|
import Fade from 'cozy-ui/transpiled/react/Fade';
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
7
6
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
8
7
|
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
|
|
9
8
|
import ListItem from 'cozy-ui/transpiled/react/ListItem';
|
|
10
9
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
|
|
11
10
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
|
|
12
11
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
12
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
13
13
|
import LinkRecipientPermissions from './LinkRecipientPermissions';
|
|
14
14
|
import RecipientConfirm from './RecipientConfirm';
|
|
15
15
|
var styles = {
|
|
@@ -3,13 +3,13 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import React, { useState, useRef } from 'react';
|
|
5
5
|
import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton';
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
7
6
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
8
7
|
import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash';
|
|
9
8
|
import Spinner from 'cozy-ui/transpiled/react/Spinner';
|
|
10
9
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
11
10
|
import ActionMenu, { ActionMenuItem, ActionMenuRadio } from 'cozy-ui/transpiled/react/deprecated/ActionMenu';
|
|
12
11
|
import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter';
|
|
12
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
13
13
|
import { isOnlyReadOnlyLinkAllowed } from '../../helpers/link';
|
|
14
14
|
import { checkIsReadOnlyPermissions } from '../../helpers/permissions';
|
|
15
15
|
import logger from '../../logger';
|
|
@@ -5,11 +5,11 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { useClient } from 'cozy-client';
|
|
7
7
|
import Fade from 'cozy-ui/transpiled/react/Fade';
|
|
8
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
9
8
|
import ListItem from 'cozy-ui/transpiled/react/ListItem';
|
|
10
9
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
|
|
11
10
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
|
|
12
11
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
12
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
13
13
|
import RecipientAvatar from './RecipientAvatar';
|
|
14
14
|
import RecipientConfirm from './RecipientConfirm';
|
|
15
15
|
import RecipientPermissions from './RecipientPermissions';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
4
3
|
import Button from 'cozy-ui/transpiled/react/deprecated/Button';
|
|
4
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
5
5
|
var modalStyles = {
|
|
6
6
|
"share-modal-content": "share__share-modal-content___XTtaK",
|
|
7
7
|
"coz-form": "share__coz-form___33NYF",
|
|
@@ -4,7 +4,6 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
4
4
|
import React, { useState, useRef, useCallback } from 'react';
|
|
5
5
|
import { useClient } from 'cozy-client';
|
|
6
6
|
import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton';
|
|
7
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
8
7
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
9
8
|
import EyeIcon from 'cozy-ui/transpiled/react/Icons/Eye';
|
|
10
9
|
import RenameIcon from 'cozy-ui/transpiled/react/Icons/Rename';
|
|
@@ -12,6 +11,7 @@ import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash';
|
|
|
12
11
|
import Spinner from 'cozy-ui/transpiled/react/Spinner';
|
|
13
12
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
14
13
|
import ActionMenu, { ActionMenuItem } from 'cozy-ui/transpiled/react/deprecated/ActionMenu';
|
|
14
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
15
15
|
|
|
16
16
|
var RecipientPermissions = function RecipientPermissions(_ref) {
|
|
17
17
|
var isOwner = _ref.isOwner,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
3
2
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
4
3
|
import EyeIcon from 'cozy-ui/transpiled/react/Icons/Eye';
|
|
5
4
|
import PaperplaneIcon from 'cozy-ui/transpiled/react/Icons/Paperplane';
|
|
6
5
|
import ToTheCloudIcon from 'cozy-ui/transpiled/react/Icons/ToTheCloud';
|
|
7
6
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
8
7
|
import { Media, Img, Bd } from 'cozy-ui/transpiled/react/deprecated/Media';
|
|
8
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
9
9
|
var styles = {
|
|
10
10
|
"CozyTheme--inverted": "recipient__CozyTheme--inverted___2Hb9c",
|
|
11
11
|
"CozyTheme--normal": "recipient__CozyTheme--normal___3WdEw",
|
|
@@ -6,8 +6,8 @@ import get from 'lodash/get';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
8
|
import { useClient } from 'cozy-client';
|
|
9
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
10
9
|
import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter';
|
|
10
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
11
11
|
import ShareRecipientsInput from './ShareRecipientsInput';
|
|
12
12
|
import { ShareRecipientsLimitModal } from './ShareRecipientsLimitModal';
|
|
13
13
|
import ShareSubmit from './Sharesubmit';
|
|
@@ -12,12 +12,12 @@ import PropTypes from 'prop-types';
|
|
|
12
12
|
import React, { useState, useEffect, useCallback } from 'react';
|
|
13
13
|
import Alert from 'cozy-ui/transpiled/react/Alert';
|
|
14
14
|
import Button from 'cozy-ui/transpiled/react/Buttons';
|
|
15
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
16
15
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
17
16
|
import CopyIcon from 'cozy-ui/transpiled/react/Icons/Copy';
|
|
18
17
|
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
|
|
19
18
|
import Snackbar from 'cozy-ui/transpiled/react/Snackbar';
|
|
20
|
-
import useBreakpoints from 'cozy-ui/transpiled/react/
|
|
19
|
+
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
|
|
20
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
21
21
|
import EditLinkPermissionDialog from './EditLinkPermissionDialog';
|
|
22
22
|
import { isOnlyReadOnlyLinkAllowed } from '../helpers/link';
|
|
23
23
|
import logger from '../logger';
|
|
@@ -3,8 +3,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["showShareByLink", "documentType", "document"];
|
|
4
4
|
import cx from 'classnames';
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
7
6
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
7
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
8
8
|
import { default as DumbShareByEmail } from './ShareByEmail';
|
|
9
9
|
import { default as DumbShareByLink } from './ShareByLink';
|
|
10
10
|
import ShareDialogTwoStepsConfirmationContainer from './ShareDialogTwoStepsConfirmationContainer';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Dialog } from 'cozy-ui/transpiled/react/CozyDialogs';
|
|
3
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
4
3
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
4
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
5
5
|
import { default as DumbShareByLink } from './ShareByLink';
|
|
6
6
|
import WhoHasAccess from './WhoHasAccess';
|
|
7
7
|
|
|
@@ -3,9 +3,9 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
5
5
|
import { FixedDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
7
6
|
import Spinner from 'cozy-ui/transpiled/react/Spinner';
|
|
8
7
|
import Button from 'cozy-ui/transpiled/react/deprecated/Button';
|
|
8
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
9
9
|
import { useSafeState } from '../helpers/hooks';
|
|
10
10
|
/**
|
|
11
11
|
* Displays a loader that can be used when ShareDialogTwoStepsConfirmationContainer is in loading state
|
|
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Buttons from 'cozy-ui/transpiled/react/Buttons';
|
|
4
4
|
import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
|
|
5
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
5
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
6
6
|
import { computeRecipientsLimit } from '../helpers/recipients';
|
|
7
7
|
/**
|
|
8
8
|
* Alert the user when the number of recipients for sharing a document has reached the limit
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import cx from 'classnames';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
4
3
|
import palette from 'cozy-ui/transpiled/react/palette';
|
|
4
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
5
5
|
import { SharingTooltip, TooltipRecipientList } from './Tooltip';
|
|
6
6
|
var styles = {
|
|
7
7
|
"shared-status": "status__shared-status___J15Fy",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n';
|
|
5
4
|
import List from 'cozy-ui/transpiled/react/List';
|
|
5
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
6
6
|
import LinkRecipient from './Recipient/LinkRecipient';
|
|
7
7
|
import OwnerRecipient from './Recipient/OwnerRecipient';
|
|
8
8
|
import Recipient from './Recipient/Recipient';
|
package/dist/stylesheet.css
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
background-color: var(--paleGrey);
|
|
5
5
|
color: var(--silver);
|
|
6
6
|
position: relative;
|
|
7
|
-
z-index: var(--zIndex-low);
|
|
8
7
|
}
|
|
9
8
|
.publicBanner__bannermarkdown___1EMSa img svg {
|
|
10
9
|
width: 50%;
|
|
@@ -2839,16 +2838,16 @@ html {
|
|
|
2839
2838
|
--zIndex-low: 1;
|
|
2840
2839
|
--zIndex-alertMobile: 10;
|
|
2841
2840
|
--zIndex-nav: 20;
|
|
2842
|
-
--zIndex-bar:
|
|
2843
|
-
--zIndex-selection:
|
|
2844
|
-
--zIndex-popover:
|
|
2841
|
+
--zIndex-bar: 31;
|
|
2842
|
+
--zIndex-selection: 40;
|
|
2843
|
+
--zIndex-popover: 30;
|
|
2845
2844
|
--zIndex-overlay: 50;
|
|
2846
2845
|
--zIndex-fileActionMenu: 60;
|
|
2847
2846
|
--zIndex-drawer: 60;
|
|
2848
2847
|
--zIndex-modal: 70;
|
|
2849
2848
|
--zIndex-modal-footer: 71;
|
|
2850
2849
|
--zIndex-modal-toolbar: 72;
|
|
2851
|
-
--
|
|
2850
|
+
--zIndex-alert: 80;
|
|
2852
2851
|
}
|
|
2853
2852
|
.autosuggest__container___1dbB4 {
|
|
2854
2853
|
position: relative;
|
package/dist/withLocales.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"babel-jest": "26.6.3",
|
|
41
41
|
"babel-plugin-css-modules-transform": "1.6.2",
|
|
42
42
|
"babel-plugin-inline-react-svg": "1.1.2",
|
|
43
|
-
"cozy-client": "
|
|
44
|
-
"cozy-ui": "
|
|
43
|
+
"cozy-client": "40.5.0",
|
|
44
|
+
"cozy-ui": "93.1.1",
|
|
45
45
|
"enzyme": "3.11.0",
|
|
46
46
|
"enzyme-adapter-react-16": "1.15.6",
|
|
47
47
|
"enzyme-to-json": "3.6.2",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"react-router": "^5.0.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"cozy-client": "^
|
|
54
|
+
"cozy-client": "^40.5.0",
|
|
55
55
|
"cozy-realtime": "^3.11.0",
|
|
56
|
-
"cozy-ui": ">=
|
|
56
|
+
"cozy-ui": ">=93.1.1",
|
|
57
57
|
"prop-types": "^15.7.2",
|
|
58
58
|
"react": "^16.12.0",
|
|
59
59
|
"react-router": "^5.0.1"
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"sideEffects": [
|
|
62
62
|
"*.css"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "bed924d322e160f63a8f33187e7065cc065322d3"
|
|
65
65
|
}
|
package/src/ShareButton.jsx
CHANGED
package/src/ShareButton.spec.jsx
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
|
|
3
3
|
import Grid from 'cozy-ui/transpiled/react/Grid'
|
|
4
4
|
import Skeleton from 'cozy-ui/transpiled/react/Skeleton'
|
|
5
|
-
import useBreakpoints from 'cozy-ui/transpiled/react/
|
|
5
|
+
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
6
6
|
|
|
7
7
|
import { ShareButton } from './ShareButton'
|
|
8
8
|
import { SharedRecipients } from './SharedRecipients'
|
|
@@ -4,8 +4,8 @@ import snarkdown from 'snarkdown'
|
|
|
4
4
|
|
|
5
5
|
import { useClient } from 'cozy-client'
|
|
6
6
|
import Banner from 'cozy-ui/transpiled/react/Banner'
|
|
7
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
8
7
|
import Button, { ButtonLink } from 'cozy-ui/transpiled/react/deprecated/Button'
|
|
8
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
9
9
|
|
|
10
10
|
import CozyHomeLinkIcon from './CozyHomeLinkIcon'
|
|
11
11
|
import styles from './publicBanner.styl'
|
|
@@ -2,11 +2,11 @@ import { render } from '@testing-library/react'
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
4
|
import { useClient } from 'cozy-client'
|
|
5
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
5
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
6
6
|
|
|
7
7
|
import { SharingBannerCozyToCozy } from './PublicBanner'
|
|
8
8
|
|
|
9
|
-
jest.mock('cozy-ui/transpiled/react/I18n')
|
|
9
|
+
jest.mock('cozy-ui/transpiled/react/providers/I18n')
|
|
10
10
|
jest.mock('cozy-client')
|
|
11
11
|
|
|
12
12
|
describe('PublicBanner', () => {
|
|
@@ -3,8 +3,8 @@ import { Provider } from 'react-redux'
|
|
|
3
3
|
import { createStore } from 'redux'
|
|
4
4
|
|
|
5
5
|
import { CozyProvider } from 'cozy-client'
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
7
|
+
import { I18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
8
8
|
|
|
9
9
|
import { AcceptingSharingProvider } from './AcceptingSharingContext'
|
|
10
10
|
import FabProvider from './FabProvider'
|
|
@@ -3,7 +3,7 @@ import React from 'react'
|
|
|
3
3
|
|
|
4
4
|
import { Dialog } from 'cozy-ui/transpiled/react/CozyDialogs'
|
|
5
5
|
import Divider from 'cozy-ui/transpiled/react/Divider'
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
6
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
7
7
|
|
|
8
8
|
import OwnerIdentity from './components/Recipient/OwnerIdentity'
|
|
9
9
|
import WhoHasAccess from './components/WhoHasAccess'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { act } from '@testing-library/react'
|
|
1
|
+
import { act, render, screen } from '@testing-library/react'
|
|
2
2
|
import { mount } from 'enzyme'
|
|
3
3
|
import React from 'react'
|
|
4
4
|
|
|
@@ -33,7 +33,7 @@ describe('allLoaded', () => {
|
|
|
33
33
|
})
|
|
34
34
|
|
|
35
35
|
it('Change to True when all data is loaded', async () => {
|
|
36
|
-
|
|
36
|
+
render(
|
|
37
37
|
<AppWrapper client={client}>
|
|
38
38
|
<SharingContext.Consumer>
|
|
39
39
|
{({ allLoaded }) => <div>{`allLoaded: ${allLoaded}`}</div>}
|
|
@@ -41,13 +41,13 @@ describe('allLoaded', () => {
|
|
|
41
41
|
</AppWrapper>
|
|
42
42
|
)
|
|
43
43
|
|
|
44
|
-
expect(
|
|
44
|
+
expect(screen.getByText('allLoaded: false')).toBeInTheDocument()
|
|
45
45
|
|
|
46
46
|
await act(async () => {
|
|
47
47
|
await new Promise(resolve => setTimeout(resolve, 100))
|
|
48
48
|
})
|
|
49
49
|
|
|
50
|
-
expect(
|
|
50
|
+
expect(screen.getByText('allLoaded: true')).toBeInTheDocument()
|
|
51
51
|
})
|
|
52
52
|
})
|
|
53
53
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
4
3
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
4
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
5
5
|
|
|
6
6
|
import Recipient from './Recipient/Recipient'
|
|
7
7
|
import ShareDialogTwoStepsConfirmationContainer from './ShareDialogTwoStepsConfirmationContainer'
|
|
@@ -4,10 +4,10 @@ import React from 'react'
|
|
|
4
4
|
|
|
5
5
|
import { models } from 'cozy-client'
|
|
6
6
|
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
7
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
8
7
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
9
8
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
10
9
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
10
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
11
11
|
|
|
12
12
|
import { Contact, Group, getDisplayName, getInitials } from '../models'
|
|
13
13
|
|
|
@@ -3,9 +3,9 @@ import PropTypes from 'prop-types'
|
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import snarkdown from 'snarkdown'
|
|
5
5
|
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
7
6
|
import Paper from 'cozy-ui/transpiled/react/Paper'
|
|
8
7
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
8
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
9
9
|
|
|
10
10
|
import styles from './CozyPassFingerprintDialogContent.styl'
|
|
11
11
|
|
|
@@ -4,9 +4,9 @@ import React, { useState } from 'react'
|
|
|
4
4
|
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
5
5
|
import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
|
|
6
6
|
import FormControlLabel from 'cozy-ui/transpiled/react/FormControlLabel'
|
|
7
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
8
7
|
import RadioGroup from 'cozy-ui/transpiled/react/RadioGroup'
|
|
9
8
|
import Radio from 'cozy-ui/transpiled/react/Radios'
|
|
9
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
10
10
|
|
|
11
11
|
const EditLinkPermissionDialog = ({
|
|
12
12
|
open,
|
|
@@ -2,7 +2,7 @@ import { mount } from 'enzyme'
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
4
|
import { createMockClient } from 'cozy-client'
|
|
5
|
-
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/
|
|
5
|
+
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
6
6
|
|
|
7
7
|
import { EditableSharingModal } from './EditableSharingModal'
|
|
8
8
|
import { default as DumbShareModal } from './ShareModal'
|
|
@@ -3,13 +3,13 @@ import React from 'react'
|
|
|
3
3
|
|
|
4
4
|
import Circle from 'cozy-ui/transpiled/react/Circle'
|
|
5
5
|
import Fade from 'cozy-ui/transpiled/react/Fade'
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
7
6
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
8
7
|
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
|
|
9
8
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
10
9
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
11
10
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
12
11
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
12
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
13
13
|
|
|
14
14
|
import LinkRecipientPermissions from './LinkRecipientPermissions'
|
|
15
15
|
import RecipientConfirm from './RecipientConfirm'
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { useState, useRef } from 'react'
|
|
2
2
|
|
|
3
3
|
import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton'
|
|
4
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
5
4
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
6
5
|
import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash'
|
|
7
6
|
import Spinner from 'cozy-ui/transpiled/react/Spinner'
|
|
@@ -11,6 +10,7 @@ import ActionMenu, {
|
|
|
11
10
|
ActionMenuRadio
|
|
12
11
|
} from 'cozy-ui/transpiled/react/deprecated/ActionMenu'
|
|
13
12
|
import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter'
|
|
13
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
14
14
|
|
|
15
15
|
import { isOnlyReadOnlyLinkAllowed } from '../../helpers/link'
|
|
16
16
|
import { checkIsReadOnlyPermissions } from '../../helpers/permissions'
|
|
@@ -3,11 +3,11 @@ import React from 'react'
|
|
|
3
3
|
|
|
4
4
|
import { useClient } from 'cozy-client'
|
|
5
5
|
import Fade from 'cozy-ui/transpiled/react/Fade'
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
7
6
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
8
7
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
9
8
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
10
9
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
10
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
11
11
|
|
|
12
12
|
import RecipientAvatar from './RecipientAvatar'
|
|
13
13
|
import RecipientConfirm from './RecipientConfirm'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
5
4
|
import Button from 'cozy-ui/transpiled/react/deprecated/Button'
|
|
5
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
6
6
|
|
|
7
7
|
import modalStyles from '../../share.styl'
|
|
8
8
|
|
|
@@ -2,7 +2,6 @@ import React, { useState, useRef, useCallback } from 'react'
|
|
|
2
2
|
|
|
3
3
|
import { useClient } from 'cozy-client'
|
|
4
4
|
import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton'
|
|
5
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
6
5
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
7
6
|
import EyeIcon from 'cozy-ui/transpiled/react/Icons/Eye'
|
|
8
7
|
import RenameIcon from 'cozy-ui/transpiled/react/Icons/Rename'
|
|
@@ -12,6 +11,7 @@ import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
|
12
11
|
import ActionMenu, {
|
|
13
12
|
ActionMenuItem
|
|
14
13
|
} from 'cozy-ui/transpiled/react/deprecated/ActionMenu'
|
|
14
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
15
15
|
|
|
16
16
|
const RecipientPermissions = ({
|
|
17
17
|
isOwner,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
4
3
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
4
|
import EyeIcon from 'cozy-ui/transpiled/react/Icons/Eye'
|
|
6
5
|
import PaperplaneIcon from 'cozy-ui/transpiled/react/Icons/Paperplane'
|
|
7
6
|
import ToTheCloudIcon from 'cozy-ui/transpiled/react/Icons/ToTheCloud'
|
|
8
7
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
9
8
|
import { Media, Img, Bd } from 'cozy-ui/transpiled/react/deprecated/Media'
|
|
9
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
10
10
|
|
|
11
11
|
import styles from './recipient.styl'
|
|
12
12
|
|
|
@@ -3,8 +3,8 @@ import PropTypes from 'prop-types'
|
|
|
3
3
|
import React, { useState } from 'react'
|
|
4
4
|
|
|
5
5
|
import { useClient } from 'cozy-client'
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
7
6
|
import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter'
|
|
7
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
8
8
|
|
|
9
9
|
import ShareRecipientsInput from './ShareRecipientsInput'
|
|
10
10
|
import { ShareRecipientsLimitModal } from './ShareRecipientsLimitModal'
|
|
@@ -4,12 +4,12 @@ import React, { useState, useEffect, useCallback } from 'react'
|
|
|
4
4
|
|
|
5
5
|
import Alert from 'cozy-ui/transpiled/react/Alert'
|
|
6
6
|
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
7
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
8
7
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
9
8
|
import CopyIcon from 'cozy-ui/transpiled/react/Icons/Copy'
|
|
10
9
|
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
|
|
11
10
|
import Snackbar from 'cozy-ui/transpiled/react/Snackbar'
|
|
12
|
-
import useBreakpoints from 'cozy-ui/transpiled/react/
|
|
11
|
+
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
12
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
13
13
|
|
|
14
14
|
import EditLinkPermissionDialog from './EditLinkPermissionDialog'
|
|
15
15
|
import { isOnlyReadOnlyLinkAllowed } from '../helpers/link'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import cx from 'classnames'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
5
4
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
5
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
6
6
|
|
|
7
7
|
import { default as DumbShareByEmail } from './ShareByEmail'
|
|
8
8
|
import { default as DumbShareByLink } from './ShareByLink'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import { Dialog } from 'cozy-ui/transpiled/react/CozyDialogs'
|
|
4
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
5
4
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
5
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
6
6
|
|
|
7
7
|
import { default as DumbShareByLink } from './ShareByLink'
|
|
8
8
|
import WhoHasAccess from './WhoHasAccess'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from 'react'
|
|
2
2
|
|
|
3
3
|
import { FixedDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
|
|
4
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
5
4
|
import Spinner from 'cozy-ui/transpiled/react/Spinner'
|
|
6
5
|
import Button from 'cozy-ui/transpiled/react/deprecated/Button'
|
|
6
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
7
7
|
|
|
8
8
|
import { useSafeState } from '../helpers/hooks'
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import React from 'react'
|
|
|
3
3
|
|
|
4
4
|
import Buttons from 'cozy-ui/transpiled/react/Buttons'
|
|
5
5
|
import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
6
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
7
7
|
|
|
8
8
|
import { computeRecipientsLimit } from '../helpers/recipients'
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import cx from 'classnames'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
5
4
|
import palette from 'cozy-ui/transpiled/react/palette'
|
|
5
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
6
6
|
|
|
7
7
|
import { SharingTooltip, TooltipRecipientList } from './Tooltip'
|
|
8
8
|
import styles from './status.styl'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
5
4
|
import List from 'cozy-ui/transpiled/react/List'
|
|
5
|
+
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
6
6
|
|
|
7
7
|
import LinkRecipient from './Recipient/LinkRecipient'
|
|
8
8
|
import OwnerRecipient from './Recipient/OwnerRecipient'
|
package/src/withLocales.jsx
CHANGED
package/test/AppLike.jsx
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import { CozyProvider, createMockClient } from 'cozy-client'
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
4
|
+
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
5
|
+
import CozyTheme from 'cozy-ui/transpiled/react/providers/CozyTheme'
|
|
6
|
+
import { I18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
6
7
|
|
|
7
8
|
import langEn from '../locales/en.json'
|
|
8
9
|
|
|
9
10
|
const AppLike = ({ children, client }) => (
|
|
10
11
|
<BreakpointsProvider>
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
<CozyTheme>
|
|
13
|
+
<I18n lang="en" dictRequire={() => langEn}>
|
|
14
|
+
<CozyProvider client={client || createMockClient({})}>
|
|
15
|
+
{children}
|
|
16
|
+
</CozyProvider>
|
|
17
|
+
</I18n>
|
|
18
|
+
</CozyTheme>
|
|
16
19
|
</BreakpointsProvider>
|
|
17
20
|
)
|
|
18
21
|
|