cozy-sharing 7.0.0 → 7.0.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/CHANGELOG.md +16 -0
- package/dist/ConfirmTrustedRecipientsDialog.js +1 -1
- package/dist/RefreshableSharings.spec.js +2 -2
- package/dist/ShareButton.js +1 -1
- package/dist/ShareButton.spec.js +1 -1
- package/dist/ShareButtonWithRecipients.js +3 -3
- package/dist/ShareModal.js +2 -2
- package/dist/SharedBadge.js +1 -1
- package/dist/SharedRecipients.js +1 -1
- package/dist/SharedRecipientsList.js +1 -1
- package/dist/SharedStatus.js +1 -1
- package/dist/SharingBanner/components/PublicBanner.js +1 -1
- package/dist/SharingBanner/components/PublicBanner.spec.js +3 -3
- package/dist/SharingBanner/components/SharingBanner.js +1 -1
- package/dist/SharingBanner/hooks/useSharingInfos.js +1 -1
- package/dist/SharingBanner/hooks/useSharingInfos.spec.js +1 -1
- package/dist/SharingBanner/index.js +3 -3
- package/dist/SharingBanner/test/AppLike.js +6 -6
- package/dist/SharingDetailsModal.js +8 -8
- package/dist/SharingOwnerAvatar.js +1 -1
- package/dist/SharingProvider.js +2 -2
- package/dist/SharingProvider.spec.js +4 -4
- package/dist/components/ContactSuggestion.js +4 -4
- package/dist/components/ContactSuggestion.spec.js +2 -2
- package/dist/components/CozyPassFingerprintDialogContent.js +4 -4
- package/dist/components/CozyPassFingerprintDialogContent.spec.js +2 -2
- package/dist/components/EditLinkPermissionDialog.js +5 -5
- package/dist/components/EditLinkPermissionDialog.spec.js +2 -2
- package/dist/components/EditableSharingModal.js +3 -3
- package/dist/components/EditableSharingModal.spec.js +4 -4
- package/dist/components/Recipient/AvatarPlusX.js +2 -2
- package/dist/components/Recipient/Identity.js +2 -2
- package/dist/components/Recipient/LinkRecipient.js +8 -8
- package/dist/components/Recipient/LinkRecipientPermissions.js +5 -5
- package/dist/components/Recipient/OwnerIdentity.js +1 -1
- package/dist/components/Recipient/OwnerRecipient.js +2 -2
- package/dist/components/Recipient/Recipient.js +6 -6
- package/dist/components/Recipient/Recipient.spec.js +2 -2
- package/dist/components/Recipient/RecipientConfirm.js +2 -2
- package/dist/components/Recipient/RecipientPermissions.js +5 -5
- package/dist/components/Recipient/RecipientPlusX.js +2 -2
- package/dist/components/Recipient/RecipientStatus.js +3 -3
- package/dist/components/Recipient/RecipientWithoutStatus.js +1 -1
- package/dist/components/Recipient/RecipientsAvatars.js +2 -2
- package/dist/components/Recipient/RecipientsAvatars.spec.js +1 -1
- package/dist/components/ShareAutosuggest.js +5 -5
- package/dist/components/ShareAutosuggest.spec.js +1 -1
- package/dist/components/ShareButton.js +3 -3
- package/dist/components/ShareByEmail.js +6 -6
- package/dist/components/ShareByEmail.spec.js +2 -2
- package/dist/components/ShareByLink.js +7 -7
- package/dist/components/ShareDialogCozyToCozy.js +3 -3
- package/dist/components/ShareDialogCozyToCozy.spec.js +3 -3
- package/dist/components/ShareDialogOnlyByLink.js +1 -1
- package/dist/components/ShareDialogTwoStepsConfirmationContainer.js +1 -1
- package/dist/components/ShareDialogTwoStepsConfirmationContainer.spec.js +3 -3
- package/dist/components/ShareModal.js +2 -2
- package/dist/components/ShareModal.spec.js +2 -2
- package/dist/components/ShareRecipientsInput.js +2 -2
- package/dist/components/ShareRecipientsInput.spec.js +1 -1
- package/dist/components/SharedBadge.js +3 -3
- package/dist/components/SharedDocuments.js +2 -2
- package/dist/components/SharedStatus.js +2 -2
- package/dist/components/SharedStatus.spec.js +1 -1
- package/dist/components/Sharesubmit.js +1 -1
- package/dist/components/Sharetypeselect.js +5 -5
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/WhoHasAccess.js +5 -5
- package/dist/components/WhoHasAccessLight.js +2 -2
- package/dist/helpers/sharings.js +1 -1
- package/dist/helpers/successMessage.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/preprocess.js +1 -0
- package/src/ConfirmTrustedRecipientsDialog.jsx +1 -1
- package/src/RefreshableSharings.spec.jsx +2 -2
- package/src/ShareButton.jsx +2 -2
- package/src/ShareButton.spec.jsx +2 -1
- package/src/ShareButtonWithRecipients.jsx +5 -3
- package/src/ShareModal.jsx +2 -2
- package/src/SharedBadge.jsx +1 -1
- package/src/SharedRecipients.jsx +1 -1
- package/src/SharedRecipientsList.jsx +1 -1
- package/src/SharedStatus.jsx +1 -1
- package/src/SharingBanner/components/PublicBanner.jsx +1 -2
- package/src/SharingBanner/components/PublicBanner.spec.jsx +5 -3
- package/src/SharingBanner/components/SharingBanner.jsx +1 -1
- package/src/SharingBanner/hooks/useSharingInfos.jsx +1 -1
- package/src/SharingBanner/hooks/useSharingInfos.spec.js +1 -1
- package/src/SharingBanner/index.jsx +3 -3
- package/src/SharingBanner/test/AppLike.jsx +7 -7
- package/src/SharingDetailsModal.jsx +3 -3
- package/src/SharingOwnerAvatar.jsx +1 -1
- package/src/SharingProvider.jsx +9 -9
- package/src/SharingProvider.spec.jsx +5 -5
- package/src/components/ConfirmTrustedRecipientsDialog.jsx +1 -1
- package/src/components/ContactSuggestion.jsx +4 -4
- package/src/components/ContactSuggestion.spec.jsx +2 -2
- package/src/components/CozyPassFingerprintDialogContent.jsx +4 -5
- package/src/components/CozyPassFingerprintDialogContent.spec.jsx +2 -2
- package/src/components/EditLinkPermissionDialog.jsx +5 -5
- package/src/components/EditLinkPermissionDialog.spec.jsx +3 -2
- package/src/components/EditableSharingModal.jsx +4 -3
- package/src/components/EditableSharingModal.spec.jsx +4 -4
- package/src/components/Recipient/AvatarPlusX.jsx +2 -2
- package/src/components/Recipient/Identity.jsx +2 -2
- package/src/components/Recipient/LinkRecipient.jsx +8 -8
- package/src/components/Recipient/LinkRecipientPermissions.jsx +5 -6
- package/src/components/Recipient/OwnerIdentity.jsx +1 -1
- package/src/components/Recipient/OwnerRecipient.jsx +2 -2
- package/src/components/Recipient/Recipient.jsx +6 -6
- package/src/components/Recipient/Recipient.spec.jsx +4 -2
- package/src/components/Recipient/RecipientAvatar.jsx +1 -1
- package/src/components/Recipient/RecipientConfirm.jsx +2 -2
- package/src/components/Recipient/RecipientPermissions.jsx +6 -6
- package/src/components/Recipient/RecipientPlusX.jsx +2 -2
- package/src/components/Recipient/RecipientStatus.jsx +3 -3
- package/src/components/Recipient/RecipientWithoutStatus.jsx +1 -1
- package/src/components/Recipient/RecipientsAvatars.jsx +3 -3
- package/src/components/Recipient/RecipientsAvatars.spec.jsx +2 -1
- package/src/components/ShareAutosuggest.jsx +5 -6
- package/src/components/ShareAutosuggest.spec.jsx +1 -1
- package/src/components/ShareButton.jsx +4 -4
- package/src/components/ShareByEmail.jsx +6 -7
- package/src/components/ShareByEmail.spec.jsx +3 -2
- package/src/components/ShareByLink.jsx +8 -7
- package/src/components/ShareDialogCozyToCozy.jsx +4 -5
- package/src/components/ShareDialogCozyToCozy.spec.jsx +5 -3
- package/src/components/ShareDialogOnlyByLink.jsx +2 -1
- package/src/components/ShareDialogTwoStepsConfirmationContainer.jsx +2 -1
- package/src/components/ShareDialogTwoStepsConfirmationContainer.spec.jsx +5 -3
- package/src/components/ShareModal.jsx +3 -3
- package/src/components/ShareModal.spec.js +4 -2
- package/src/components/ShareRecipientsInput.jsx +2 -2
- package/src/components/ShareRecipientsInput.spec.jsx +1 -1
- package/src/components/SharedBadge.jsx +4 -3
- package/src/components/SharedDocuments.jsx +3 -2
- package/src/components/SharedStatus.jsx +4 -3
- package/src/components/SharedStatus.spec.js +2 -1
- package/src/components/Sharesubmit.jsx +2 -1
- package/src/components/Sharetypeselect.jsx +5 -7
- package/src/components/Tooltip.jsx +2 -1
- package/src/components/WhoHasAccess.jsx +6 -5
- package/src/components/WhoHasAccessLight.jsx +3 -3
- package/src/components/useFetchDocumentPath.jsx +1 -0
- package/src/helpers/permissions.js +1 -0
- package/src/helpers/sharings.js +1 -2
- package/src/helpers/successMessage.js +2 -1
- package/src/index.jsx +1 -1
- package/src/state.spec.js +0 -1
- package/src/withLocales.jsx +1 -0
- package/test/AppLike.jsx +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
import cx from 'classnames'
|
|
3
|
-
import
|
|
2
|
+
import React from 'react'
|
|
4
3
|
|
|
4
|
+
import { useClient } from 'cozy-client'
|
|
5
5
|
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
6
6
|
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
|
|
7
7
|
|
|
8
|
-
import RecipientAvatar from './RecipientAvatar'
|
|
9
8
|
import AvatarPlusX from './AvatarPlusX'
|
|
9
|
+
import RecipientAvatar from './RecipientAvatar'
|
|
10
10
|
import styles from './recipient.styl'
|
|
11
11
|
import { getDisplayName } from '../../models'
|
|
12
12
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import React, { useState, useRef } from 'react'
|
|
2
1
|
import PropTypes from 'prop-types'
|
|
2
|
+
import React, { useState, useRef } from 'react'
|
|
3
3
|
import Autosuggest from 'react-autosuggest'
|
|
4
4
|
|
|
5
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
6
|
+
import Chip from 'cozy-ui/transpiled/react/Chips'
|
|
5
7
|
import { Spinner } from 'cozy-ui/transpiled/react/Spinner'
|
|
6
8
|
import palette from 'cozy-ui/transpiled/react/palette'
|
|
7
|
-
import Chip from 'cozy-ui/transpiled/react/Chips'
|
|
8
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
9
9
|
|
|
10
|
+
import ContactSuggestion from './ContactSuggestion'
|
|
10
11
|
import styles from './autosuggest.styl'
|
|
11
|
-
|
|
12
|
+
import { extractEmails, validateEmail } from '../helpers/email'
|
|
12
13
|
import { getDisplayName, getInitials, Contact } from '../models'
|
|
13
14
|
import {
|
|
14
15
|
cozyUrlMatch,
|
|
@@ -16,8 +17,6 @@ import {
|
|
|
16
17
|
groupNameMatch,
|
|
17
18
|
fullnameMatch
|
|
18
19
|
} from '../suggestionMatchers'
|
|
19
|
-
import ContactSuggestion from './ContactSuggestion'
|
|
20
|
-
import { extractEmails, validateEmail } from '../helpers/email'
|
|
21
20
|
|
|
22
21
|
const ShareAutocomplete = ({
|
|
23
22
|
loading,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
import classNames from 'classnames'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
3
4
|
import { Button } from 'cozy-ui/transpiled/react/Button'
|
|
5
|
+
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
6
|
+
import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share'
|
|
4
7
|
|
|
5
8
|
import styles from './button.styl'
|
|
6
9
|
|
|
7
|
-
import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share'
|
|
8
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
9
|
-
|
|
10
10
|
export const ShareButton = ({ label, onClick, className, ...props }) => (
|
|
11
11
|
<Button
|
|
12
12
|
data-test-id="share-button"
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
1
|
import get from 'lodash/get'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
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/Alerter'
|
|
7
|
+
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
8
8
|
|
|
9
|
+
import ShareRecipientsInput from './ShareRecipientsInput'
|
|
9
10
|
import ShareSubmit from './Sharesubmit'
|
|
10
11
|
import ShareTypeSelect from './Sharetypeselect'
|
|
11
|
-
|
|
12
|
+
import { getOrCreateFromArray } from '../helpers/contacts'
|
|
13
|
+
import { getSuccessMessage } from '../helpers/successMessage'
|
|
12
14
|
import { Group } from '../models'
|
|
13
15
|
import { contactsResponseType, groupsResponseType } from '../propTypes'
|
|
14
|
-
import ShareRecipientsInput from './ShareRecipientsInput'
|
|
15
16
|
import styles from '../share.styl'
|
|
16
|
-
import { getSuccessMessage } from '../helpers/successMessage'
|
|
17
|
-
import { getOrCreateFromArray } from '../helpers/contacts'
|
|
18
17
|
import { isReadOnlySharing } from '../state'
|
|
19
18
|
|
|
20
19
|
export const ShareByEmail = ({
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
import { render, fireEvent, waitFor } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { act } from 'react-dom/test-utils'
|
|
4
|
+
|
|
3
5
|
import { ShareByEmail } from './ShareByEmail'
|
|
4
6
|
import AppLike from '../../test/AppLike'
|
|
5
|
-
import { act } from 'react-dom/test-utils'
|
|
6
7
|
|
|
7
8
|
jest.mock('../helpers/contacts', () => ({
|
|
8
9
|
getOrCreateFromArray: (client, recipients) => recipients
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import React, { useState, useEffect, useCallback } from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
1
|
import copy from 'copy-text-to-clipboard'
|
|
4
|
-
import
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import React, { useState, useEffect, useCallback } from 'react'
|
|
4
|
+
|
|
5
|
+
import Alert from 'cozy-ui/transpiled/react/Alert'
|
|
5
6
|
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
7
|
+
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
6
8
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
7
|
-
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
|
|
8
9
|
import CopyIcon from 'cozy-ui/transpiled/react/Icons/Copy'
|
|
10
|
+
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
|
|
9
11
|
import Snackbar from 'cozy-ui/transpiled/react/Snackbar'
|
|
10
|
-
import
|
|
11
|
-
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
12
|
+
import useBreakpoints from 'cozy-ui/transpiled/react/hooks/useBreakpoints'
|
|
12
13
|
|
|
13
|
-
import { isOnlyReadOnlyLinkAllowed } from '../helpers/link'
|
|
14
14
|
import EditLinkPermissionDialog from './EditLinkPermissionDialog'
|
|
15
|
+
import { isOnlyReadOnlyLinkAllowed } from '../helpers/link'
|
|
15
16
|
import logger from '../logger'
|
|
16
17
|
|
|
17
18
|
const ShareByLink = ({ link, document, documentType, onEnable }) => {
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
+
import cx from 'classnames'
|
|
1
2
|
import React from 'react'
|
|
3
|
+
|
|
2
4
|
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
3
5
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
4
6
|
|
|
5
|
-
import { default as DumbShareByLink } from './ShareByLink'
|
|
6
7
|
import { default as DumbShareByEmail } from './ShareByEmail'
|
|
8
|
+
import { default as DumbShareByLink } from './ShareByLink'
|
|
9
|
+
import ShareDialogTwoStepsConfirmationContainer from './ShareDialogTwoStepsConfirmationContainer'
|
|
7
10
|
import WhoHasAccess from './WhoHasAccess'
|
|
8
|
-
|
|
9
|
-
import cx from 'classnames'
|
|
10
11
|
import styles from '../share.styl'
|
|
11
12
|
|
|
12
|
-
import ShareDialogTwoStepsConfirmationContainer from './ShareDialogTwoStepsConfirmationContainer'
|
|
13
|
-
|
|
14
13
|
/**
|
|
15
14
|
* Displays the sharing interface that can be used when ShareDialogCozyToCozy is in sharing state
|
|
16
15
|
*/
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { act, render, fireEvent } from '@testing-library/react'
|
|
1
2
|
import React from 'react'
|
|
2
|
-
|
|
3
|
+
|
|
4
|
+
import { createMockClient } from 'cozy-client'
|
|
5
|
+
|
|
3
6
|
import { CozyPassFingerprintDialogContent } from './CozyPassFingerprintDialogContent'
|
|
7
|
+
import ShareDialogCozyToCozy from './ShareDialogCozyToCozy'
|
|
4
8
|
import AppLike from '../../test/AppLike'
|
|
5
|
-
import { createMockClient } from 'cozy-client'
|
|
6
|
-
import { act, render, fireEvent } from '@testing-library/react'
|
|
7
9
|
|
|
8
10
|
jest.mock('cozy-client', () => ({
|
|
9
11
|
...jest.requireActual('cozy-client'),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
|
|
2
3
|
import { Dialog } from 'cozy-ui/transpiled/react/CozyDialogs'
|
|
3
4
|
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
5
|
+
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
4
6
|
|
|
5
7
|
import { default as DumbShareByLink } from './ShareByLink'
|
|
6
8
|
import WhoHasAccess from './WhoHasAccess'
|
|
7
|
-
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
8
9
|
|
|
9
10
|
const ShareDialogOnlyByLink = ({
|
|
10
11
|
isOwner,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import Button from 'cozy-ui/transpiled/react/Button'
|
|
2
4
|
import { FixedDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
|
|
3
5
|
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
4
|
-
import Button from 'cozy-ui/transpiled/react/Button'
|
|
5
6
|
import Spinner from 'cozy-ui/transpiled/react/Spinner'
|
|
6
7
|
|
|
7
8
|
import { useSafeState } from '../helpers/hooks'
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { act, render, fireEvent } from '@testing-library/react'
|
|
1
2
|
import React from 'react'
|
|
2
|
-
|
|
3
|
+
|
|
4
|
+
import { createMockClient } from 'cozy-client'
|
|
5
|
+
|
|
3
6
|
import { CozyPassFingerprintDialogContent } from './CozyPassFingerprintDialogContent'
|
|
7
|
+
import ShareDialogTwoStepsConfirmationContainer from './ShareDialogTwoStepsConfirmationContainer'
|
|
4
8
|
import AppLike from '../../test/AppLike'
|
|
5
|
-
import { createMockClient } from 'cozy-client'
|
|
6
|
-
import { act, render, fireEvent } from '@testing-library/react'
|
|
7
9
|
|
|
8
10
|
const FakeSharingContent = ({ recipientsToBeConfirmed, verifyRecipient }) => {
|
|
9
11
|
const verify = recipientConfirmationData => () => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
import PropTypes from 'prop-types'
|
|
3
|
-
import
|
|
2
|
+
import React from 'react'
|
|
4
3
|
|
|
5
|
-
import
|
|
4
|
+
import flag from 'cozy-flags'
|
|
6
5
|
|
|
7
6
|
import ShareDialogCozyToCozy from './ShareDialogCozyToCozy'
|
|
8
7
|
import ShareDialogOnlyByLink from './ShareDialogOnlyByLink'
|
|
8
|
+
import { contactsResponseType, groupsResponseType } from '../propTypes'
|
|
9
9
|
export const ShareModal = ({
|
|
10
10
|
contacts,
|
|
11
11
|
createContact,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
import { render } from '@testing-library/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import flag from 'cozy-flags'
|
|
5
|
+
|
|
3
6
|
import { ShareModal } from './ShareModal'
|
|
4
7
|
import AppLike from '../../test/AppLike'
|
|
5
|
-
import flag from 'cozy-flags'
|
|
6
8
|
|
|
7
9
|
jest.mock('./ShareDialogCozyToCozy', () => () => <>ShareDialogCozyToCozy</>)
|
|
8
10
|
jest.mock('./ShareDialogOnlyByLink', () => () => <>ShareDialogOnlyByLink</>)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react'
|
|
2
1
|
import PropTypes from 'prop-types'
|
|
2
|
+
import React, { useState, useEffect } from 'react'
|
|
3
3
|
|
|
4
|
-
import { contactsResponseType, groupsResponseType } from '../propTypes'
|
|
5
4
|
import ShareAutosuggest from './ShareAutosuggest'
|
|
5
|
+
import { contactsResponseType, groupsResponseType } from '../propTypes'
|
|
6
6
|
|
|
7
7
|
const ShareRecipientsInput = ({
|
|
8
8
|
contacts,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
import classNames from 'classnames'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
3
4
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
4
|
-
import
|
|
5
|
+
import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share'
|
|
5
6
|
import palette from 'cozy-ui/transpiled/react/palette'
|
|
6
7
|
|
|
7
|
-
import
|
|
8
|
+
import styles from './badge.styl'
|
|
8
9
|
|
|
9
10
|
const SharedBadge = ({ byMe, className, small, xsmall }) => (
|
|
10
11
|
<div
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import cx from 'classnames'
|
|
1
2
|
import React from 'react'
|
|
3
|
+
|
|
2
4
|
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
3
5
|
import palette from 'cozy-ui/transpiled/react/palette'
|
|
4
|
-
import { SharingTooltip, TooltipRecipientList } from './Tooltip'
|
|
5
|
-
import cx from 'classnames'
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { SharingTooltip, TooltipRecipientList } from './Tooltip'
|
|
8
8
|
import styles from './status.styl'
|
|
9
9
|
import LinkIcon from '../../assets/icons/icon-link.svg'
|
|
10
|
+
import { getDisplayName } from '../models'
|
|
10
11
|
|
|
11
12
|
export const SharedStatus = ({ className, docId, recipients, link }) => {
|
|
12
13
|
const { t } = useI18n()
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
import cx from 'classnames'
|
|
3
2
|
import PropTypes from 'prop-types'
|
|
3
|
+
import React from 'react'
|
|
4
4
|
|
|
5
|
+
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
6
|
+
import BottomIcon from 'cozy-ui/transpiled/react/Icons/Bottom'
|
|
7
|
+
import CheckIcon from 'cozy-ui/transpiled/react/Icons/Check'
|
|
5
8
|
import SelectBox, { components } from 'cozy-ui/transpiled/react/SelectBox'
|
|
6
9
|
import palette from 'cozy-ui/transpiled/react/palette'
|
|
7
|
-
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
8
|
-
|
|
9
|
-
import styles from '../share.styl'
|
|
10
10
|
|
|
11
11
|
import logger from '../logger'
|
|
12
|
-
|
|
13
|
-
import BottomIcon from 'cozy-ui/transpiled/react/Icons/Bottom'
|
|
14
|
-
import CheckIcon from 'cozy-ui/transpiled/react/Icons/Check'
|
|
12
|
+
import styles from '../share.styl'
|
|
15
13
|
|
|
16
14
|
const DropdownIndicator = props => (
|
|
17
15
|
<components.DropdownIndicator {...props}>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
import PropTypes from 'prop-types'
|
|
3
|
-
import
|
|
4
|
-
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
5
4
|
import { useI18n } from 'cozy-ui/transpiled/react/I18n'
|
|
6
5
|
import List from 'cozy-ui/transpiled/react/MuiCozyTheme/List'
|
|
7
6
|
|
|
8
|
-
import
|
|
9
|
-
import { usePrevious } from '../helpers/hooks'
|
|
7
|
+
import LinkRecipient from './Recipient/LinkRecipient'
|
|
10
8
|
import OwnerRecipient from './Recipient/OwnerRecipient'
|
|
9
|
+
import Recipient from './Recipient/Recipient'
|
|
10
|
+
import { usePrevious } from '../helpers/hooks'
|
|
11
|
+
import { filterAndReworkRecipients } from '../helpers/recipients'
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Displays a warning if some contacts are waiting for confirmation of their sharing
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
import cx from 'classnames'
|
|
3
|
-
import
|
|
4
|
-
import RecipientPlusX from './Recipient/RecipientPlusX'
|
|
2
|
+
import React from 'react'
|
|
5
3
|
|
|
4
|
+
import RecipientPlusX from './Recipient/RecipientPlusX'
|
|
5
|
+
import RecipientWithoutStatus from './Recipient/RecipientWithoutStatus'
|
|
6
6
|
import styles from './recipient.styl'
|
|
7
7
|
|
|
8
8
|
const MAX_DISPLAYED_RECIPIENTS = 2
|
package/src/helpers/sharings.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Q } from 'cozy-client'
|
|
2
2
|
|
|
3
|
+
import { fetchFilesPaths } from './files'
|
|
3
4
|
import {
|
|
4
5
|
updateInternalObjectFromRealtime,
|
|
5
6
|
normalizeDocFromRealtime
|
|
6
7
|
} from './realtime'
|
|
7
|
-
|
|
8
8
|
import { addSharing, updateSharing } from '../state'
|
|
9
|
-
import { fetchFilesPaths } from './files'
|
|
10
9
|
|
|
11
10
|
export const getSharingObject = (internalSharing, sharing) => {
|
|
12
11
|
if (internalSharing) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Contact } from '../models'
|
|
2
1
|
import { models } from 'cozy-client'
|
|
2
|
+
|
|
3
|
+
import { Contact } from '../models'
|
|
3
4
|
export const countNewRecipients = (currentRecipients, newRecipients) => {
|
|
4
5
|
return newRecipients.filter(contact => {
|
|
5
6
|
const email = models.contact.getPrimaryEmail(contact)
|
package/src/index.jsx
CHANGED
package/src/state.spec.js
CHANGED
package/src/withLocales.jsx
CHANGED
package/test/AppLike.jsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks/useBreakpoints'
|
|
4
|
-
import { I18n } from 'cozy-ui/transpiled/react/I18n'
|
|
5
3
|
import { CozyProvider, createMockClient } from 'cozy-client'
|
|
4
|
+
import { I18n } from 'cozy-ui/transpiled/react/I18n'
|
|
5
|
+
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks/useBreakpoints'
|
|
6
6
|
|
|
7
7
|
import langEn from '../locales/en.json'
|
|
8
8
|
|