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.
- package/.storybook/main.js +9 -9
- package/.storybook/manager.js +4 -4
- package/CHANGELOG.md +8 -0
- package/dist/OpenSharingLinkButton.js +1 -1
- package/dist/OpenSharingLinkFabButton.js +1 -1
- package/dist/ShareButton.spec.js +5 -8
- package/dist/SharingProvider.js +1 -2
- package/dist/components/AntivirusAlert.js +1 -1
- package/dist/components/ConfirmTrustedRecipientsDialog.js +1 -1
- package/dist/components/ContactSuggestion.js +1 -1
- package/dist/components/CozyPassFingerprintDialogContent.js +1 -1
- package/dist/components/FederatedFolder/FederatedFolderModal.js +2 -2
- package/dist/components/Recipient/GroupRecipient.js +1 -1
- package/dist/components/Recipient/GroupRecipientDetail.js +1 -1
- package/dist/components/Recipient/GroupRecipientDetailWithAccess.js +1 -1
- package/dist/components/Recipient/GroupRecipientDetailWithoutAccess.js +1 -1
- package/dist/components/Recipient/GroupRecipientPermissions.js +1 -1
- package/dist/components/Recipient/LinkRecipient.js +1 -1
- package/dist/components/Recipient/LinkRecipientLite.js +1 -1
- package/dist/components/Recipient/LinkRecipientPermissions.js +1 -1
- package/dist/components/Recipient/MemberRecipient.js +1 -1
- package/dist/components/Recipient/MemberRecipient.spec.js +0 -1
- package/dist/components/Recipient/MemberRecipientLite.js +1 -1
- package/dist/components/Recipient/MemberRecipientPermissions.js +1 -1
- package/dist/components/Recipient/MemberRecipientStatus.js +1 -1
- package/dist/components/Recipient/RecipientConfirm.js +1 -1
- package/dist/components/ShareByEmail.js +1 -1
- package/dist/components/ShareByLink.js +1 -1
- package/dist/components/ShareDialogCozyToCozy.js +1 -1
- package/dist/components/ShareDialogOnlyByLink.js +1 -1
- package/dist/components/ShareDialogTwoStepsConfirmationContainer.js +1 -1
- package/dist/components/ShareModal/SharingDetailsModal.js +1 -1
- package/dist/components/ShareRecipientsLimitModal.js +1 -1
- package/dist/components/ShareRestrictionModal/BoxDate.js +1 -1
- package/dist/components/ShareRestrictionModal/BoxEditingRights.js +1 -1
- package/dist/components/ShareRestrictionModal/BoxPassword.js +1 -1
- package/dist/components/ShareRestrictionModal/ShareRestrictionContentModal.js +1 -1
- package/dist/components/ShareRestrictionModal/ShareRestrictionModal.js +1 -1
- package/dist/components/SharedDrive/SharedDriveEditModal.js +1 -1
- package/dist/components/SharedDrive/SharedDriveModal.js +1 -1
- package/dist/components/SharedDrive/SharedDriveRecipient.js +1 -1
- package/dist/components/SharedDrive/SharedDriveRecipientPermissions.js +1 -1
- package/dist/components/SharedDrive/SharedDriveRecipientStatus.js +1 -1
- package/dist/components/SharingBanner/components/PublicBanner.js +1 -1
- package/dist/components/SharingBanner/components/PublicBanner.spec.js +1 -1
- package/dist/components/SharingBanner/test/AppLike.js +1 -1
- package/dist/components/WhoHasAccess.js +1 -1
- package/dist/helpers/hooks.js +4 -2
- package/dist/state.js +0 -1
- package/jestHelpers/mocks/iconMock.js +1 -2
- package/package.json +7 -7
- package/src/OpenSharingLinkButton.jsx +1 -1
- package/src/OpenSharingLinkFabButton.jsx +1 -1
- package/src/ShareButton.jsx +1 -0
- package/src/ShareButton.spec.jsx +3 -5
- package/src/SharingProvider.jsx +1 -1
- package/src/components/AntivirusAlert.jsx +1 -1
- package/src/components/AntivirusAlert.spec.jsx +1 -0
- package/src/components/ConfirmTrustedRecipientsDialog.jsx +1 -1
- package/src/components/ContactSuggestion.jsx +1 -1
- package/src/components/CozyPassFingerprintDialogContent.jsx +1 -1
- package/src/components/FederatedFolder/DumbFederatedFolderModal.jsx +1 -0
- package/src/components/FederatedFolder/FederatedFolderModal.jsx +3 -3
- package/src/components/Recipient/GroupRecipient.jsx +1 -1
- package/src/components/Recipient/GroupRecipientDetail.jsx +1 -1
- package/src/components/Recipient/GroupRecipientDetailWithAccess.jsx +1 -1
- package/src/components/Recipient/GroupRecipientDetailWithoutAccess.jsx +1 -1
- package/src/components/Recipient/GroupRecipientPermissions.jsx +1 -1
- package/src/components/Recipient/LinkRecipient.jsx +1 -1
- package/src/components/Recipient/LinkRecipientLite.jsx +1 -1
- package/src/components/Recipient/LinkRecipientPermissions.jsx +1 -1
- package/src/components/Recipient/MemberRecipient.jsx +1 -1
- package/src/components/Recipient/MemberRecipient.spec.jsx +0 -1
- package/src/components/Recipient/MemberRecipientLite.jsx +1 -1
- package/src/components/Recipient/MemberRecipientPermissions.jsx +1 -1
- package/src/components/Recipient/MemberRecipientStatus.jsx +1 -1
- package/src/components/Recipient/RecipientConfirm.jsx +1 -1
- package/src/components/ShareByEmail.jsx +2 -2
- 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/ShareModal/SharingDetailsModal.jsx +1 -1
- package/src/components/ShareRecipientsLimitModal.jsx +1 -1
- package/src/components/ShareRestrictionModal/BoxDate.jsx +1 -1
- package/src/components/ShareRestrictionModal/BoxEditingRights.jsx +1 -1
- package/src/components/ShareRestrictionModal/BoxPassword.jsx +1 -1
- package/src/components/ShareRestrictionModal/ShareRestrictionContentModal.jsx +1 -1
- package/src/components/ShareRestrictionModal/ShareRestrictionModal.jsx +1 -1
- package/src/components/SharedDrive/DumbSharedDriveModal.jsx +1 -0
- package/src/components/SharedDrive/SharedDriveEditModal.jsx +2 -2
- package/src/components/SharedDrive/SharedDriveModal.jsx +2 -2
- package/src/components/SharedDrive/SharedDriveRecipient.jsx +1 -1
- package/src/components/SharedDrive/SharedDriveRecipientPermissions.jsx +1 -1
- package/src/components/SharedDrive/SharedDriveRecipientStatus.jsx +1 -1
- package/src/components/SharedStatus.jsx +1 -0
- package/src/components/SharingBanner/components/PublicBanner.jsx +1 -1
- package/src/components/SharingBanner/components/PublicBanner.spec.jsx +1 -1
- package/src/components/SharingBanner/test/AppLike.jsx +1 -1
- package/src/components/WhoHasAccess.jsx +1 -1
- package/src/helpers/hooks.js +2 -0
- package/src/hoc/withLocales.jsx +1 -0
- package/src/state.js +1 -1
- 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,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 (
|
|
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 (
|
|
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,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,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'
|
package/src/helpers/hooks.js
CHANGED
|
@@ -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 () => {
|
package/src/hoc/withLocales.jsx
CHANGED
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
|
-
|
|
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
|
|