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,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 Box from 'cozy-ui/transpiled/react/Box'
6
5
  import Icon from 'cozy-ui/transpiled/react/Icon'
@@ -15,6 +14,7 @@ import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
15
14
  import Switch from 'cozy-ui/transpiled/react/Switch'
16
15
  import TextField from 'cozy-ui/transpiled/react/TextField'
17
16
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
17
+ import { useI18n } from 'twake-i18n'
18
18
 
19
19
  import { copyToClipboard } from './helpers'
20
20
  import { checkIsPermissionHasPassword } from '../../helpers/permissions'
@@ -1,10 +1,10 @@
1
1
  import { addDays, isValid } 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 Typography from 'cozy-ui/transpiled/react/Typography'
7
+ import { useI18n } from 'twake-i18n'
8
8
 
9
9
  import { BoxDate } from './BoxDate'
10
10
  import { BoxEditingRights } from './BoxEditingRights'
@@ -1,7 +1,6 @@
1
1
  import { addDays } from 'date-fns'
2
2
  import PropTypes from 'prop-types'
3
3
  import React, { useState } from 'react'
4
- import { useI18n } from 'twake-i18n'
5
4
 
6
5
  import { generateWebLink, useClient } from 'cozy-client'
7
6
  import flag from 'cozy-flags'
@@ -10,6 +9,7 @@ import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
10
9
  import Icon from 'cozy-ui/transpiled/react/Icon'
11
10
  import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash'
12
11
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
12
+ import { useI18n } from 'twake-i18n'
13
13
 
14
14
  import { ShareRestrictionContentModal } from './ShareRestrictionContentModal'
15
15
  import {
@@ -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 } 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 { DumbSharedDriveModal } from './DumbSharedDriveModal'
9
9
  import withLocales from '../../hoc/withLocales'
@@ -31,7 +31,7 @@ export const SharedDriveEditModal = withLocales(
31
31
  severity: 'success'
32
32
  })
33
33
  onClose()
34
- } catch (error) {
34
+ } catch (_error) {
35
35
  showAlert({
36
36
  message: t('SharedDrive.sharedDriveModal.errorNotificationUpdate'),
37
37
  severity: 'error'
@@ -1,9 +1,9 @@
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 { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
6
+ import { useI18n } from 'twake-i18n'
7
7
 
8
8
  import { DumbSharedDriveModal } from './DumbSharedDriveModal'
9
9
  import {
@@ -71,7 +71,7 @@ export const SharedDriveModal = withLocales(({ onClose }) => {
71
71
  })
72
72
 
73
73
  onClose()
74
- } catch (err) {
74
+ } catch (_err) {
75
75
  showAlert({
76
76
  message: t('SharedDrive.sharedDriveModal.errorNotification'),
77
77
  severity: 'error',
@@ -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 Fade from 'cozy-ui/transpiled/react/Fade'
6
5
  import ListItem from 'cozy-ui/transpiled/react/ListItem'
@@ -8,6 +7,7 @@ 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'
10
9
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
10
+ import { useI18n } from 'twake-i18n'
11
11
 
12
12
  import SharedDriveRecipientPermissions from './SharedDriveRecipientPermissions'
13
13
  import SharedDriveRecipientStatus from './SharedDriveRecipientStatus'
@@ -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'
@@ -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 { revokeSharedDriveMember } from '../Recipient/actions/revokeSharedDriveMember'
13
13
  import { setReadOnlySharedPermission } from '../Recipient/actions/setReadOnlySharedPermission'
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
- import { useI18n } from 'twake-i18n'
3
2
 
4
3
  import Typography from 'cozy-ui/transpiled/react/Typography'
4
+ import { useI18n } from 'twake-i18n'
5
5
 
6
6
  const SharedDriveRecipientStatus = ({ members, email }) => {
7
7
  const { t } = useI18n()
@@ -1,5 +1,6 @@
1
1
  import cx from 'classnames'
2
2
  import React from 'react'
3
+
3
4
  import { useI18n } from 'twake-i18n'
4
5
 
5
6
  import { SharingTooltip, TooltipRecipientList } from './Tooltip'
@@ -1,12 +1,12 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
3
  import snarkdown from 'snarkdown'
4
- import { useI18n } from 'twake-i18n'
5
4
 
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
 
11
11
  import CozyHomeLinkIcon from './CozyHomeLinkIcon'
12
12
  import styles from '../../../styles/publicBanner.styl'
@@ -1,8 +1,8 @@
1
1
  import { render } from '@testing-library/react'
2
2
  import React from 'react'
3
- import { useI18n } from 'twake-i18n'
4
3
 
5
4
  import { useClient } from 'cozy-client'
5
+ import { useI18n } from 'twake-i18n'
6
6
 
7
7
  import { SharingBannerCozyToCozy } from './PublicBanner'
8
8
 
@@ -1,10 +1,10 @@
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
 
6
5
  import { CozyProvider } from 'cozy-client'
7
6
  import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints'
7
+ import { I18n } from 'twake-i18n'
8
8
 
9
9
  import { AcceptingSharingProvider } from './AcceptingSharingContext'
10
10
  import FabProvider from './FabProvider'
@@ -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 List from 'cozy-ui/transpiled/react/List'
5
+ import { useI18n } from 'twake-i18n'
6
6
 
7
7
  import LinkRecipient from './Recipient/LinkRecipient'
8
8
  import OwnerRecipient from './Recipient/OwnerRecipient'
@@ -9,6 +9,7 @@ export function usePrevious(value) {
9
9
  ref.current = value
10
10
  }, [value])
11
11
 
12
+ // eslint-disable-next-line react-hooks/refs
12
13
  return ref.current
13
14
  }
14
15
 
@@ -19,6 +20,7 @@ function useIsMounted() {
19
20
  const mountedRef = useRef(false)
20
21
  const isMounted = useCallback(() => mountedRef.current, [])
21
22
 
23
+ // eslint-disable-next-line react-hooks/refs
22
24
  React[isServer ? 'useEffect' : 'useLayoutEffect'](() => {
23
25
  mountedRef.current = true
24
26
  return () => {
@@ -1,4 +1,5 @@
1
1
  import React from 'react'
2
+
2
3
  import { I18n, translate } from 'twake-i18n'
3
4
  import { getI18n } from 'twake-i18n'
4
5
 
package/src/state.js CHANGED
@@ -272,7 +272,7 @@ const sharedPaths = (state = [], action) => {
272
272
  switch (action.type) {
273
273
  case RECEIVE_PATHS:
274
274
  // !TODO Remove after we solved the sharedPaths bugs
275
- // eslint-disable-next-line
275
+
276
276
  return action.paths
277
277
  case ADD_SHARING:
278
278
  // !TODO Remove after we solved the sharedPaths bugs
package/test/AppLike.jsx CHANGED
@@ -1,10 +1,10 @@
1
1
  import React from 'react'
2
- import { I18n } from 'twake-i18n'
3
2
 
4
3
  import { CozyProvider, createMockClient } from 'cozy-client'
5
4
  import AlertProvider from 'cozy-ui/transpiled/react/providers/Alert'
6
5
  import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints'
7
6
  import CozyTheme from 'cozy-ui-plus/dist/providers/CozyTheme'
7
+ import { I18n } from 'twake-i18n'
8
8
 
9
9
  import langEn from '../locales/en.json'
10
10