cozy-sharing 28.9.0 → 28.9.2

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.
Files changed (104) hide show
  1. package/.storybook/main.js +9 -9
  2. package/.storybook/manager.js +4 -4
  3. package/CHANGELOG.md +8 -0
  4. package/dist/OpenSharingLinkButton.js +1 -1
  5. package/dist/OpenSharingLinkFabButton.js +1 -1
  6. package/dist/ShareButton.spec.js +5 -8
  7. package/dist/SharingProvider.js +1 -2
  8. package/dist/components/AntivirusAlert.js +1 -1
  9. package/dist/components/ConfirmTrustedRecipientsDialog.js +1 -1
  10. package/dist/components/ContactSuggestion.js +1 -1
  11. package/dist/components/CozyPassFingerprintDialogContent.js +1 -1
  12. package/dist/components/FederatedFolder/FederatedFolderModal.js +2 -2
  13. package/dist/components/Recipient/GroupRecipient.js +1 -1
  14. package/dist/components/Recipient/GroupRecipientDetail.js +1 -1
  15. package/dist/components/Recipient/GroupRecipientDetailWithAccess.js +1 -1
  16. package/dist/components/Recipient/GroupRecipientDetailWithoutAccess.js +1 -1
  17. package/dist/components/Recipient/GroupRecipientPermissions.js +1 -1
  18. package/dist/components/Recipient/LinkRecipient.js +1 -1
  19. package/dist/components/Recipient/LinkRecipientLite.js +1 -1
  20. package/dist/components/Recipient/LinkRecipientPermissions.js +1 -1
  21. package/dist/components/Recipient/MemberRecipient.js +1 -1
  22. package/dist/components/Recipient/MemberRecipient.spec.js +0 -1
  23. package/dist/components/Recipient/MemberRecipientLite.js +1 -1
  24. package/dist/components/Recipient/MemberRecipientPermissions.js +1 -1
  25. package/dist/components/Recipient/MemberRecipientStatus.js +1 -1
  26. package/dist/components/Recipient/RecipientConfirm.js +1 -1
  27. package/dist/components/ShareByEmail.js +1 -1
  28. package/dist/components/ShareByLink.js +1 -1
  29. package/dist/components/ShareDialogCozyToCozy.js +1 -1
  30. package/dist/components/ShareDialogOnlyByLink.js +1 -1
  31. package/dist/components/ShareDialogTwoStepsConfirmationContainer.js +1 -1
  32. package/dist/components/ShareModal/SharingDetailsModal.js +1 -1
  33. package/dist/components/ShareRecipientsLimitModal.js +1 -1
  34. package/dist/components/ShareRestrictionModal/BoxDate.js +1 -1
  35. package/dist/components/ShareRestrictionModal/BoxEditingRights.js +1 -1
  36. package/dist/components/ShareRestrictionModal/BoxPassword.js +1 -1
  37. package/dist/components/ShareRestrictionModal/ShareRestrictionContentModal.js +1 -1
  38. package/dist/components/ShareRestrictionModal/ShareRestrictionModal.js +1 -1
  39. package/dist/components/SharedDrive/SharedDriveEditModal.js +1 -1
  40. package/dist/components/SharedDrive/SharedDriveModal.js +1 -1
  41. package/dist/components/SharedDrive/SharedDriveRecipient.js +1 -1
  42. package/dist/components/SharedDrive/SharedDriveRecipientPermissions.js +1 -1
  43. package/dist/components/SharedDrive/SharedDriveRecipientStatus.js +1 -1
  44. package/dist/components/SharingBanner/components/PublicBanner.js +1 -1
  45. package/dist/components/SharingBanner/components/PublicBanner.spec.js +1 -1
  46. package/dist/components/SharingBanner/test/AppLike.js +1 -1
  47. package/dist/components/WhoHasAccess.js +1 -1
  48. package/dist/helpers/hooks.js +4 -2
  49. package/dist/state.js +0 -1
  50. package/jestHelpers/mocks/iconMock.js +1 -2
  51. package/package.json +7 -7
  52. package/src/OpenSharingLinkButton.jsx +1 -1
  53. package/src/OpenSharingLinkFabButton.jsx +1 -1
  54. package/src/ShareButton.jsx +1 -0
  55. package/src/ShareButton.spec.jsx +3 -5
  56. package/src/SharingProvider.jsx +1 -1
  57. package/src/components/AntivirusAlert.jsx +1 -1
  58. package/src/components/AntivirusAlert.spec.jsx +1 -0
  59. package/src/components/ConfirmTrustedRecipientsDialog.jsx +1 -1
  60. package/src/components/ContactSuggestion.jsx +1 -1
  61. package/src/components/CozyPassFingerprintDialogContent.jsx +1 -1
  62. package/src/components/FederatedFolder/DumbFederatedFolderModal.jsx +1 -0
  63. package/src/components/FederatedFolder/FederatedFolderModal.jsx +3 -3
  64. package/src/components/Recipient/GroupRecipient.jsx +1 -1
  65. package/src/components/Recipient/GroupRecipientDetail.jsx +1 -1
  66. package/src/components/Recipient/GroupRecipientDetailWithAccess.jsx +1 -1
  67. package/src/components/Recipient/GroupRecipientDetailWithoutAccess.jsx +1 -1
  68. package/src/components/Recipient/GroupRecipientPermissions.jsx +1 -1
  69. package/src/components/Recipient/LinkRecipient.jsx +1 -1
  70. package/src/components/Recipient/LinkRecipientLite.jsx +1 -1
  71. package/src/components/Recipient/LinkRecipientPermissions.jsx +1 -1
  72. package/src/components/Recipient/MemberRecipient.jsx +1 -1
  73. package/src/components/Recipient/MemberRecipient.spec.jsx +0 -1
  74. package/src/components/Recipient/MemberRecipientLite.jsx +1 -1
  75. package/src/components/Recipient/MemberRecipientPermissions.jsx +1 -1
  76. package/src/components/Recipient/MemberRecipientStatus.jsx +1 -1
  77. package/src/components/Recipient/RecipientConfirm.jsx +1 -1
  78. package/src/components/ShareByEmail.jsx +2 -2
  79. package/src/components/ShareByLink.jsx +2 -2
  80. package/src/components/ShareDialogCozyToCozy.jsx +1 -1
  81. package/src/components/ShareDialogOnlyByLink.jsx +1 -1
  82. package/src/components/ShareDialogTwoStepsConfirmationContainer.jsx +1 -1
  83. package/src/components/ShareModal/SharingDetailsModal.jsx +1 -1
  84. package/src/components/ShareRecipientsLimitModal.jsx +1 -1
  85. package/src/components/ShareRestrictionModal/BoxDate.jsx +1 -1
  86. package/src/components/ShareRestrictionModal/BoxEditingRights.jsx +1 -1
  87. package/src/components/ShareRestrictionModal/BoxPassword.jsx +1 -1
  88. package/src/components/ShareRestrictionModal/ShareRestrictionContentModal.jsx +1 -1
  89. package/src/components/ShareRestrictionModal/ShareRestrictionModal.jsx +1 -1
  90. package/src/components/SharedDrive/DumbSharedDriveModal.jsx +1 -0
  91. package/src/components/SharedDrive/SharedDriveEditModal.jsx +2 -2
  92. package/src/components/SharedDrive/SharedDriveModal.jsx +2 -2
  93. package/src/components/SharedDrive/SharedDriveRecipient.jsx +1 -1
  94. package/src/components/SharedDrive/SharedDriveRecipientPermissions.jsx +1 -1
  95. package/src/components/SharedDrive/SharedDriveRecipientStatus.jsx +1 -1
  96. package/src/components/SharedStatus.jsx +1 -0
  97. package/src/components/SharingBanner/components/PublicBanner.jsx +1 -1
  98. package/src/components/SharingBanner/components/PublicBanner.spec.jsx +1 -1
  99. package/src/components/SharingBanner/test/AppLike.jsx +1 -1
  100. package/src/components/WhoHasAccess.jsx +1 -1
  101. package/src/helpers/hooks.js +2 -0
  102. package/src/hoc/withLocales.jsx +1 -0
  103. package/src/state.js +1 -1
  104. package/test/AppLike.jsx +1 -1
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { useI18n } from 'twake-i18n';
3
2
  import Typography from 'cozy-ui/transpiled/react/Typography';
3
+ import { useI18n } from 'twake-i18n';
4
4
 
5
5
  var SharedDriveRecipientStatus = function SharedDriveRecipientStatus(_ref) {
6
6
  var members = _ref.members,
@@ -2,11 +2,11 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
4
  import snarkdown from 'snarkdown';
5
- import { useI18n } from 'twake-i18n';
6
5
  import { useClient } from 'cozy-client';
7
6
  import flag from 'cozy-flags';
8
7
  import Banner from 'cozy-ui/transpiled/react/Banner';
9
8
  import Button from 'cozy-ui/transpiled/react/Buttons';
9
+ import { useI18n } from 'twake-i18n';
10
10
  import CozyHomeLinkIcon from './CozyHomeLinkIcon';
11
11
  var styles = {
12
12
  "bannermarkdown": "publicBanner__bannermarkdown___1dR1E"
@@ -1,7 +1,7 @@
1
1
  import { render } from '@testing-library/react';
2
2
  import React from 'react';
3
- import { useI18n } from 'twake-i18n';
4
3
  import { useClient } from 'cozy-client';
4
+ import { useI18n } from 'twake-i18n';
5
5
  import { SharingBannerCozyToCozy } from './PublicBanner';
6
6
  jest.mock('twake-i18n');
7
7
  jest.mock('cozy-client');
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { Provider } from 'react-redux';
3
3
  import { createStore } from 'redux';
4
- import { I18n } from 'twake-i18n';
5
4
  import { CozyProvider } from 'cozy-client';
6
5
  import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints';
6
+ import { I18n } from 'twake-i18n';
7
7
  import { AcceptingSharingProvider } from './AcceptingSharingContext';
8
8
  import FabProvider from './FabProvider';
9
9
  import { ModalContext } from './ModalContext';
@@ -1,7 +1,7 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
- import { useI18n } from 'twake-i18n';
4
3
  import List from 'cozy-ui/transpiled/react/List';
4
+ import { useI18n } from 'twake-i18n';
5
5
  import LinkRecipient from './Recipient/LinkRecipient';
6
6
  import OwnerRecipient from './Recipient/OwnerRecipient';
7
7
  import { RecipientList } from './Recipient/RecipientList';
@@ -5,7 +5,8 @@ export function usePrevious(value) {
5
5
  var ref = useRef();
6
6
  useEffect(function () {
7
7
  ref.current = value;
8
- }, [value]);
8
+ }, [value]); // eslint-disable-next-line react-hooks/refs
9
+
9
10
  return ref.current;
10
11
  }
11
12
  /**
@@ -16,7 +17,8 @@ function useIsMounted() {
16
17
  var mountedRef = useRef(false);
17
18
  var isMounted = useCallback(function () {
18
19
  return mountedRef.current;
19
- }, []);
20
+ }, []); // eslint-disable-next-line react-hooks/refs
21
+
20
22
  React[isServer ? 'useEffect' : 'useLayoutEffect'](function () {
21
23
  mountedRef.current = true;
22
24
  return function () {
package/dist/state.js CHANGED
@@ -358,7 +358,6 @@ var sharedPaths = function sharedPaths() {
358
358
  switch (action.type) {
359
359
  case RECEIVE_PATHS:
360
360
  // !TODO Remove after we solved the sharedPaths bugs
361
- // eslint-disable-next-line
362
361
  return action.paths;
363
362
 
364
363
  case ADD_SHARING:
@@ -1,2 +1 @@
1
- let id = 0
2
- module.exports = { id: `icon-${id++}` }
1
+ module.exports = { id: 'icon-0' }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-sharing",
3
- "version": "28.9.0",
3
+ "version": "28.9.2",
4
4
  "description": "Provides sharing login for React applications.",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy",
@@ -31,7 +31,7 @@
31
31
  "@cozy/minilog": "^1.0.0",
32
32
  "classnames": "^2.5.1",
33
33
  "cozy-device-helper": "^4.0.3",
34
- "cozy-doctypes": "^1.98.4",
34
+ "cozy-doctypes": "^1.98.5",
35
35
  "date-fns": "2.30.0",
36
36
  "lodash": "^4.17.21",
37
37
  "react-autosuggest": "^10.1.0",
@@ -56,17 +56,17 @@
56
56
  "babel-plugin-inline-react-svg": "1.1.2",
57
57
  "cozy-client": "^60.22.0",
58
58
  "cozy-device-helper": "^3.7.1",
59
- "cozy-intent": "^2.30.3",
60
- "cozy-minilog": "^3.10.0",
59
+ "cozy-intent": "^2.30.4",
60
+ "cozy-minilog": "^3.10.1",
61
61
  "cozy-ui": "^135.0.0",
62
- "cozy-ui-plus": "^5.2.1",
62
+ "cozy-ui-plus": "^5.2.3",
63
63
  "jest": "27.5.1",
64
64
  "jest-environment-jsdom": "27.5.1",
65
65
  "react": "16.12.0",
66
66
  "react-dom": "16.13.0",
67
67
  "react-router": "^5.0.1",
68
68
  "storybook": "7.6.0",
69
- "twake-i18n": "^0.3.2"
69
+ "twake-i18n": "^0.3.4"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "cozy-client": ">=60.22.0",
@@ -83,5 +83,5 @@
83
83
  "sideEffects": [
84
84
  "*.css"
85
85
  ],
86
- "gitHead": "53934e510ce08e3066a3b6aad6d9bb05778dede8"
86
+ "gitHead": "7484d5d18a9fd0d2fd3ac19d71c148931e3ac025"
87
87
  }
@@ -1,9 +1,9 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import Button from 'cozy-ui/transpiled/react/Buttons'
6
5
  import Icon from 'cozy-ui/transpiled/react/Icon'
6
+ import { useI18n } from 'twake-i18n'
7
7
 
8
8
  import { getIconWithlabel, openExternalLink } from './helpers/sharings'
9
9
  import withLocales from './hoc/withLocales'
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import { ExtendableFab } from 'cozy-ui/transpiled/react/Fab'
5
+ import { useI18n } from 'twake-i18n'
6
6
 
7
7
  import { getIconWithlabel, openExternalLink } from './helpers/sharings'
8
8
  import withLocales from './hoc/withLocales'
@@ -1,4 +1,5 @@
1
1
  import React from 'react'
2
+
2
3
  import { useI18n } from 'twake-i18n'
3
4
 
4
5
  import {
@@ -16,13 +16,11 @@ jest.mock('twake-i18n', () => ({
16
16
  useI18n: jest.fn().mockReturnValue({ t: jest.fn() })
17
17
  }))
18
18
 
19
- jest.mock('./hoc/withLocales', () =>
20
- // eslint-disable-next-line react/display-name
21
- Component => props => <>{Component(props)}</>
22
- )
19
+ jest.mock('./hoc/withLocales', () => Component => props => (
20
+ <>{Component(props)}</>
21
+ ))
23
22
 
24
23
  jest.mock('./context', () => ({
25
- // eslint-disable-next-line react/display-name
26
24
  Consumer: props => {
27
25
  const Component = () => props.children({ byDocId: { docId: false } })
28
26
  return <Component />
@@ -209,7 +209,7 @@ export class SharingProvider extends Component {
209
209
  })
210
210
  )
211
211
  this.setState({ hasLoadedAtLeastOnePage: true })
212
- // eslint-disable-next-line promise/catch-or-return
212
+
213
213
  await fetchNextPermissions(permissions, this.dispatch, this.permissionCol)
214
214
 
215
215
  if (doctype === 'io.cozy.files') {
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import Alert from 'cozy-ui/transpiled/react/Alert'
5
+ import { useI18n } from 'twake-i18n'
6
6
 
7
7
  const AntivirusAlert = ({ document }) => {
8
8
  const { t } = useI18n()
@@ -1,5 +1,6 @@
1
1
  import { render } from '@testing-library/react'
2
2
  import React from 'react'
3
+
3
4
  import { I18nContext } from 'twake-i18n'
4
5
 
5
6
  import AntivirusAlert from './AntivirusAlert'
@@ -1,10 +1,10 @@
1
1
  import cx from 'classnames'
2
2
  import React from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import List from 'cozy-ui/transpiled/react/List'
6
5
  import Typography from 'cozy-ui/transpiled/react/Typography'
7
6
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
7
+ import { useI18n } from 'twake-i18n'
8
8
 
9
9
  import MemberRecipient from './Recipient/MemberRecipient'
10
10
  import ShareDialogTwoStepsConfirmationContainer from './ShareDialogTwoStepsConfirmationContainer'
@@ -1,12 +1,12 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import { models } from 'cozy-client'
6
5
  import Avatar from 'cozy-ui/transpiled/react/Avatar'
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 'twake-i18n'
10
10
 
11
11
  import { Contact, Group, getDisplayName, getInitials } from '../models'
12
12
  import { GroupAvatar } from './Avatar/GroupAvatar'
@@ -2,10 +2,10 @@ 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 'twake-i18n'
6
5
 
7
6
  import Paper from 'cozy-ui/transpiled/react/Paper'
8
7
  import Typography from 'cozy-ui/transpiled/react/Typography'
8
+ import { useI18n } from 'twake-i18n'
9
9
 
10
10
  import styles from '../styles/CozyPassFingerprintDialogContent.styl'
11
11
 
@@ -1,5 +1,6 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
+
3
4
  import { useI18n } from 'twake-i18n'
4
5
 
5
6
  import withLocales from '../../hoc/withLocales'
@@ -1,9 +1,9 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React, { useState, useEffect } from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import { useClient } from 'cozy-client'
6
5
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
6
+ import { useI18n } from 'twake-i18n'
7
7
 
8
8
  import { DumbFederatedFolderModal } from './DumbFederatedFolderModal'
9
9
  import withLocales from '../../hoc/withLocales'
@@ -57,7 +57,7 @@ export const FederatedFolderModal = withLocales(
57
57
  getSharingLink,
58
58
  getOwner,
59
59
  getSharingById
60
- ]) // eslint-disable-line react-hooks/exhaustive-deps
60
+ ])
61
61
 
62
62
  const [federatedRecipients, setFederatedRecipients] = useState({
63
63
  recipients: [],
@@ -90,7 +90,7 @@ export const FederatedFolderModal = withLocales(
90
90
  })
91
91
 
92
92
  onClose()
93
- } catch (err) {
93
+ } catch (_err) {
94
94
  showAlert({
95
95
  message: t('FederatedFolder.errorNotification'),
96
96
  severity: 'error',
@@ -1,5 +1,4 @@
1
1
  import React, { useState } from 'react'
2
- import { useI18n } from 'twake-i18n'
3
2
 
4
3
  import { useClient } from 'cozy-client'
5
4
  import Fade from 'cozy-ui/transpiled/react/Fade'
@@ -9,6 +8,7 @@ import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryA
9
8
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
10
9
  import Typography from 'cozy-ui/transpiled/react/Typography'
11
10
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
11
+ import { useI18n } from 'twake-i18n'
12
12
 
13
13
  import { GroupRecipientDetail } from './GroupRecipientDetail'
14
14
  import { GroupRecipientPermissions } from './GroupRecipientPermissions'
@@ -1,11 +1,11 @@
1
1
  import React from 'react'
2
- import { useI18n } from 'twake-i18n'
3
2
 
4
3
  import { useClient, generateWebLink } from 'cozy-client'
5
4
  import Buttons from 'cozy-ui/transpiled/react/Buttons'
6
5
  import { Dialog } from 'cozy-ui/transpiled/react/CozyDialogs'
7
6
  import Empty from 'cozy-ui/transpiled/react/Empty'
8
7
  import Typography from 'cozy-ui/transpiled/react/Typography'
8
+ import { useI18n } from 'twake-i18n'
9
9
 
10
10
  import { GroupRecipientDetailWithAccess } from './GroupRecipientDetailWithAccess'
11
11
  import { GroupRecipientDetailWithoutAccess } from './GroupRecipientDetailWithoutAccess'
@@ -1,5 +1,4 @@
1
1
  import React from 'react'
2
- import { useI18n } from 'twake-i18n'
3
2
 
4
3
  import { useClient } from 'cozy-client'
5
4
  import Avatar from 'cozy-ui/transpiled/react/Avatar'
@@ -8,6 +7,7 @@ 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 'twake-i18n'
11
11
 
12
12
  import MemberRecipientStatus from './MemberRecipientStatus'
13
13
  import { getInitials, getDisplayName } from '../../models'
@@ -1,5 +1,4 @@
1
1
  import React from 'react'
2
- import { useI18n } from 'twake-i18n'
3
2
 
4
3
  import Avatar from 'cozy-ui/transpiled/react/Avatar'
5
4
  import Icon from 'cozy-ui/transpiled/react/Icon'
@@ -9,6 +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'
11
10
  import Typography from 'cozy-ui/transpiled/react/Typography'
11
+ import { useI18n } from 'twake-i18n'
12
12
 
13
13
  import { DEFAULT_DISPLAY_NAME } from '../../helpers/recipients'
14
14
  import { getInitials, getDisplayName } from '../../models'
@@ -1,5 +1,4 @@
1
1
  import React, { useState, useRef } from 'react'
2
- import { useI18n } from 'twake-i18n'
3
2
 
4
3
  import { useClient } from 'cozy-client'
5
4
  import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu'
@@ -12,6 +11,7 @@ import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton'
12
11
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
13
12
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
14
13
  import Spinner from 'cozy-ui/transpiled/react/Spinner'
14
+ import { useI18n } from 'twake-i18n'
15
15
 
16
16
  import { permission } from './actions/permission'
17
17
  import { revokeGroup as revokeGroupAction } from './actions/revokeGroup'
@@ -1,6 +1,5 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React, { useState } from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import Avatar from 'cozy-ui/transpiled/react/Avatar'
6
5
  import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton'
@@ -11,6 +10,7 @@ import ListItem from 'cozy-ui/transpiled/react/ListItem'
11
10
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
12
11
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
13
12
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
13
+ import { useI18n } from 'twake-i18n'
14
14
 
15
15
  import LinkRecipientPermissions from './LinkRecipientPermissions'
16
16
  import RecipientConfirm from './RecipientConfirm'
@@ -1,6 +1,5 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import Avatar from 'cozy-ui/transpiled/react/Avatar'
6
5
  import Icon from 'cozy-ui/transpiled/react/Icon'
@@ -9,6 +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'
11
10
  import Typography from 'cozy-ui/transpiled/react/Typography'
11
+ import { useI18n } from 'twake-i18n'
12
12
 
13
13
  import { checkIsReadOnlyPermissions } from '../../helpers/permissions'
14
14
  import withLocales from '../../hoc/withLocales'
@@ -1,6 +1,5 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React, { useState, useRef } from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu'
6
5
  import {
@@ -8,6 +7,7 @@ import {
8
7
  divider
9
8
  } from 'cozy-ui/transpiled/react/ActionsMenu/Actions'
10
9
  import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton'
10
+ import { useI18n } from 'twake-i18n'
11
11
 
12
12
  import { revokeLink } from './actions/revokeLink'
13
13
  import { setReadOnlySharedPermission } from './actions/setReadOnlySharedPermission'
@@ -1,6 +1,5 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import { useClient } from 'cozy-client'
6
5
  import Fade from 'cozy-ui/transpiled/react/Fade'
@@ -9,6 +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'
11
10
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
11
+ import { useI18n } from 'twake-i18n'
12
12
 
13
13
  import MemberRecipientPermissions from './MemberRecipientPermissions'
14
14
  import MemberRecipientStatus from './MemberRecipientStatus'
@@ -10,7 +10,6 @@ const mockUpdateDocumentPermissions = jest.fn()
10
10
  const mockUpdateSharingMemberType = jest.fn()
11
11
 
12
12
  jest.mock('../../hooks/useSharingContext', () => ({
13
- // eslint-disable-next-line react/display-name
14
13
  useSharingContext: () => ({
15
14
  updateDocumentPermissions: mockUpdateDocumentPermissions,
16
15
  updateSharingMemberType: mockUpdateSharingMemberType
@@ -1,12 +1,12 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import { useClient } from 'cozy-client'
6
5
  import ListItem from 'cozy-ui/transpiled/react/ListItem'
7
6
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
8
7
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
9
8
  import Typography from 'cozy-ui/transpiled/react/Typography'
9
+ import { useI18n } from 'twake-i18n'
10
10
 
11
11
  import MemberRecipientStatus from './MemberRecipientStatus'
12
12
  import { DEFAULT_DISPLAY_NAME } from '../../helpers/recipients'
@@ -1,5 +1,4 @@
1
1
  import React, { useState, useRef, useCallback } from 'react'
2
- import { useI18n } from 'twake-i18n'
3
2
 
4
3
  import { useClient } from 'cozy-client'
5
4
  import minilog from 'cozy-minilog'
@@ -12,6 +11,7 @@ import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton'
12
11
  import Spinner from 'cozy-ui/transpiled/react/Spinner'
13
12
  import Typography from 'cozy-ui/transpiled/react/Typography'
14
13
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
14
+ import { useI18n } from 'twake-i18n'
15
15
 
16
16
  import { revokeMember } from './actions/revokeMember'
17
17
  import { setReadOnlySharedPermission } from './actions/setReadOnlySharedPermission'
@@ -1,11 +1,11 @@
1
1
  import React from 'react'
2
- import { useI18n } from 'twake-i18n'
3
2
 
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'
8
+ import { useI18n } from 'twake-i18n'
9
9
 
10
10
  const MemberRecipientStatus = ({ status, isMe, instance, typographyProps }) => {
11
11
  const { t } = useI18n()
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import Button from 'cozy-ui/transpiled/react/Buttons'
5
+ import { useI18n } from 'twake-i18n'
6
6
 
7
7
  import modalStyles from '../../styles/share.styl'
8
8
 
@@ -1,10 +1,10 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React, { useState } from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import { useClient } from 'cozy-client'
6
5
  import flag from 'cozy-flags'
7
6
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
7
+ import { useI18n } from 'twake-i18n'
8
8
 
9
9
  import ShareRecipientsInput from './ShareRecipientsInput'
10
10
  import { ShareRecipientsLimitModal } from './ShareRecipientsLimitModal'
@@ -71,7 +71,7 @@ export const ShareByEmail = ({
71
71
  openSharing: false,
72
72
  sharedDrive: true
73
73
  })
74
- } catch (err) {
74
+ } catch (_err) {
75
75
  if (showNotifications) {
76
76
  showAlert({
77
77
  message: t('Share.shareByEmail.error.addingRecipient'),
@@ -1,6 +1,5 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React, { useReducer, useState } from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import { useClient } from 'cozy-client'
6
5
  import flag from 'cozy-flags'
@@ -10,6 +9,7 @@ import CopyIcon from 'cozy-ui/transpiled/react/Icons/Copy'
10
9
  import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
11
10
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
12
11
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
12
+ import { useI18n } from 'twake-i18n'
13
13
 
14
14
  import { ShareRestrictionModal } from './ShareRestrictionModal/ShareRestrictionModal'
15
15
  import {
@@ -52,7 +52,7 @@ const ShareByLink = ({ link, document, documentType }) => {
52
52
  ttl: undefined,
53
53
  editingRights: 'readOnly'
54
54
  })
55
- } catch (error) {
55
+ } catch (_error) {
56
56
  return null
57
57
  } finally {
58
58
  setIsGenerating(false)
@@ -1,9 +1,9 @@
1
1
  import cx from 'classnames'
2
2
  import React from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import Typography from 'cozy-ui/transpiled/react/Typography'
6
5
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
6
+ import { useI18n } from 'twake-i18n'
7
7
 
8
8
  import AntivirusAlert from './AntivirusAlert'
9
9
  import { default as DumbShareByEmail } from './ShareByEmail'
@@ -1,10 +1,10 @@
1
1
  import cx from 'classnames'
2
2
  import React from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import { Dialog } from 'cozy-ui/transpiled/react/CozyDialogs'
6
5
  import Typography from 'cozy-ui/transpiled/react/Typography'
7
6
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
7
+ import { useI18n } from 'twake-i18n'
8
8
 
9
9
  import AntivirusAlert from './AntivirusAlert'
10
10
  import { default as DumbShareByLink } from './ShareByLink'
@@ -1,9 +1,9 @@
1
1
  import React, { useCallback, useEffect, useState } from 'react'
2
- import { useI18n } from 'twake-i18n'
3
2
 
4
3
  import Button from 'cozy-ui/transpiled/react/Buttons'
5
4
  import { FixedDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
6
5
  import Spinner from 'cozy-ui/transpiled/react/Spinner'
6
+ import { useI18n } from 'twake-i18n'
7
7
 
8
8
  import { useSafeState } from '../helpers/hooks'
9
9
 
@@ -1,11 +1,11 @@
1
1
  import cx from 'classnames'
2
2
  import PropTypes from 'prop-types'
3
3
  import React from 'react'
4
- import { useI18n } from 'twake-i18n'
5
4
 
6
5
  import { Dialog } from 'cozy-ui/transpiled/react/CozyDialogs'
7
6
  import Divider from 'cozy-ui/transpiled/react/Divider'
8
7
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
8
+ import { useI18n } from 'twake-i18n'
9
9
 
10
10
  import { getDisplayName } from '../../models'
11
11
  import styles from '../../styles/share.styl'
@@ -1,9 +1,9 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import Buttons from 'cozy-ui/transpiled/react/Buttons'
6
5
  import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
6
+ import { useI18n } from 'twake-i18n'
7
7
 
8
8
  import { computeRecipientsLimit } from '../helpers/recipients'
9
9
 
@@ -1,7 +1,6 @@
1
1
  import { format } from 'date-fns'
2
2
  import PropTypes from 'prop-types'
3
3
  import React from 'react'
4
- import { useI18n } from 'twake-i18n'
5
4
 
6
5
  import Box from 'cozy-ui/transpiled/react/Box'
7
6
  import DatePicker from 'cozy-ui/transpiled/react/DatePicker'
@@ -13,6 +12,7 @@ import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
13
12
  import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryAction'
14
13
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
15
14
  import Switch from 'cozy-ui/transpiled/react/Switch'
15
+ import { useI18n } from 'twake-i18n'
16
16
 
17
17
  export const BoxDate = ({ onChange, date, toggle, onToggle }) => {
18
18
  const { t, lang } = useI18n()
@@ -1,6 +1,5 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React, { useReducer, useRef } from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import { useClient } from 'cozy-client'
6
5
  import { isDirectory as isDir } from 'cozy-client/dist/models/file'
@@ -14,6 +13,7 @@ import List from 'cozy-ui/transpiled/react/List'
14
13
  import ListItem from 'cozy-ui/transpiled/react/ListItem'
15
14
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
16
15
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
16
+ import { useI18n } from 'twake-i18n'
17
17
 
18
18
  import { useSharingContext } from '../../hooks/useSharingContext'
19
19
  import { editPermissionLink } from '../Recipient/actions/editPermissionLink'