cozy-sharing 10.2.0 → 10.3.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.
Files changed (138) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/ConfirmTrustedRecipientsDialog.js +1 -1
  3. package/dist/ShareButton.js +1 -1
  4. package/dist/ShareButton.spec.js +1 -1
  5. package/dist/SharedBadge.js +1 -1
  6. package/dist/SharedRecipients.js +1 -1
  7. package/dist/SharedRecipientsList.js +1 -1
  8. package/dist/SharedStatus.js +1 -1
  9. package/dist/SharingOwnerAvatar.js +1 -1
  10. package/dist/components/CozyPassFingerprintDialogContent.js +1 -1
  11. package/dist/components/Recipient/Identity.js +17 -17
  12. package/dist/components/Recipient/LinkRecipient.js +18 -18
  13. package/dist/components/Recipient/OwnerIdentity.js +18 -18
  14. package/dist/components/Recipient/RecipientConfirm.js +25 -25
  15. package/dist/components/Recipient/RecipientList.js +36 -0
  16. package/dist/components/Recipient/RecipientPlusX.js +18 -18
  17. package/dist/components/Recipient/RecipientStatus.js +17 -17
  18. package/dist/components/Recipient/RecipientWithoutStatus.js +18 -18
  19. package/dist/components/Recipient/RecipientsAvatars.js +18 -18
  20. package/dist/components/ShareAutosuggest.js +12 -12
  21. package/dist/components/ShareButton.js +2 -2
  22. package/dist/components/ShareByEmail.js +26 -26
  23. package/dist/components/ShareDialogCozyToCozy.js +25 -25
  24. package/dist/components/{EditableSharingModal.js → ShareModal/EditableSharingModal.js} +5 -5
  25. package/dist/components/{EditableSharingModal.spec.js → ShareModal/EditableSharingModal.spec.js} +6 -6
  26. package/dist/components/ShareModal/ShareModal.js +43 -0
  27. package/dist/{SharingDetailsModal.js → components/ShareModal/SharingDetailsModal.js} +28 -28
  28. package/dist/components/SharedBadge.js +6 -6
  29. package/dist/components/SharedStatus.js +4 -4
  30. package/dist/components/Sharetypeselect.js +25 -25
  31. package/dist/{SharingBanner → components/SharingBanner}/components/PublicBanner.js +1 -1
  32. package/dist/{SharingBanner → components/SharingBanner}/hooks/useSharingInfos.js +2 -2
  33. package/dist/{SharingBanner → components/SharingBanner}/index.js +1 -1
  34. package/dist/{SharingBanner → components/SharingBanner}/test/AppLike.js +2 -2
  35. package/dist/components/Tooltip.js +2 -2
  36. package/dist/components/WhoHasAccess.js +10 -20
  37. package/dist/components/WhoHasAccessLight.js +19 -1
  38. package/dist/{withLocales.js → hoc/withLocales.js} +2 -2
  39. package/dist/index.js +5 -5
  40. package/dist/{SharingBanner/components → styles}/publicBanner.styl +5 -5
  41. package/dist/stylesheet.css +340 -340
  42. package/docs/share-modal-architecture.md +44 -0
  43. package/package.json +2 -2
  44. package/src/ConfirmTrustedRecipientsDialog.jsx +1 -1
  45. package/src/ShareButton.jsx +1 -1
  46. package/src/ShareButton.spec.jsx +1 -1
  47. package/src/SharedBadge.jsx +1 -1
  48. package/src/SharedRecipients.jsx +1 -1
  49. package/src/SharedRecipientsList.jsx +1 -1
  50. package/src/SharedStatus.jsx +1 -1
  51. package/src/SharingOwnerAvatar.jsx +1 -1
  52. package/src/assets/icons/icon-arrow-down.svg +3 -0
  53. package/src/assets/icons/icon-calendar-16.svg +8 -0
  54. package/src/assets/icons/icon-check-blue.svg +59 -0
  55. package/src/assets/icons/icon-cross-bold.svg +5 -0
  56. package/src/assets/icons/icon-link.svg +14 -0
  57. package/src/assets/icons/icon-pen-16.svg +3 -0
  58. package/src/components/CozyPassFingerprintDialogContent.jsx +1 -1
  59. package/src/components/Recipient/Identity.jsx +1 -1
  60. package/src/components/Recipient/LinkRecipient.jsx +1 -1
  61. package/src/components/Recipient/OwnerIdentity.jsx +1 -1
  62. package/src/components/Recipient/RecipientConfirm.jsx +1 -1
  63. package/src/components/Recipient/RecipientList.jsx +45 -0
  64. package/src/components/Recipient/RecipientPlusX.jsx +1 -1
  65. package/src/components/Recipient/RecipientStatus.jsx +1 -1
  66. package/src/components/Recipient/RecipientWithoutStatus.jsx +1 -1
  67. package/src/components/Recipient/RecipientsAvatars.jsx +1 -1
  68. package/src/components/ShareAutosuggest.jsx +1 -1
  69. package/src/components/ShareButton.jsx +1 -1
  70. package/src/components/ShareByEmail.jsx +1 -1
  71. package/src/components/ShareDialogCozyToCozy.jsx +1 -1
  72. package/src/components/{EditableSharingModal.jsx → ShareModal/EditableSharingModal.jsx} +5 -5
  73. package/src/components/{EditableSharingModal.spec.jsx → ShareModal/EditableSharingModal.spec.jsx} +6 -6
  74. package/src/components/ShareModal/ShareModal.jsx +45 -0
  75. package/src/{SharingDetailsModal.jsx → components/ShareModal/SharingDetailsModal.jsx} +4 -4
  76. package/src/components/SharedBadge.jsx +1 -1
  77. package/src/components/SharedStatus.jsx +2 -2
  78. package/src/components/Sharetypeselect.jsx +1 -1
  79. package/src/{SharingBanner → components/SharingBanner}/components/PublicBanner.jsx +1 -1
  80. package/src/{SharingBanner → components/SharingBanner}/hooks/useSharingInfos.jsx +2 -2
  81. package/src/{SharingBanner → components/SharingBanner}/index.jsx +1 -1
  82. package/src/{SharingBanner → components/SharingBanner}/test/AppLike.jsx +2 -2
  83. package/src/components/Tooltip.jsx +1 -1
  84. package/src/components/WhoHasAccess.jsx +11 -29
  85. package/src/components/WhoHasAccessLight.jsx +1 -1
  86. package/src/{withLocales.jsx → hoc/withLocales.jsx} +2 -2
  87. package/src/index.jsx +6 -5
  88. package/src/{SharingBanner/components → styles}/publicBanner.styl +5 -5
  89. package/dist/ShareModal.js +0 -50
  90. package/src/ShareModal.jsx +0 -51
  91. /package/{assets → dist/assets}/icons/icon-arrow-down.svg +0 -0
  92. /package/{assets → dist/assets}/icons/icon-calendar-16.svg +0 -0
  93. /package/{assets → dist/assets}/icons/icon-check-blue.svg +0 -0
  94. /package/{assets → dist/assets}/icons/icon-cross-bold.svg +0 -0
  95. /package/{assets → dist/assets}/icons/icon-link.svg +0 -0
  96. /package/{assets → dist/assets}/icons/icon-pen-16.svg +0 -0
  97. /package/dist/{SharingBanner → components/SharingBanner}/components/CozyHomeLinkIcon.js +0 -0
  98. /package/dist/{SharingBanner → components/SharingBanner}/components/PublicBanner.spec.js +0 -0
  99. /package/dist/{SharingBanner → components/SharingBanner}/components/SharingBanner.js +0 -0
  100. /package/dist/{SharingBanner → components/SharingBanner}/helpers/QueryParameter.js +0 -0
  101. /package/dist/{SharingBanner → components/SharingBanner}/helpers/QueryParameter.spec.js +0 -0
  102. /package/dist/{SharingBanner → components/SharingBanner}/hooks/useSharingInfos.spec.js +0 -0
  103. /package/dist/{SharingBanner → components/SharingBanner}/test/AcceptingSharingContext.js +0 -0
  104. /package/dist/{SharingBanner → components/SharingBanner}/test/FabProvider.js +0 -0
  105. /package/dist/{SharingBanner → components/SharingBanner}/test/ModalContext.js +0 -0
  106. /package/dist/{SharingBanner → components/SharingBanner}/test/RouterContext.js +0 -0
  107. /package/dist/{SharingBanner → components/SharingBanner}/test/ThumbnailSizeContext.js +0 -0
  108. /package/dist/{components → hooks}/useFetchDocumentPath.js +0 -0
  109. /package/dist/{components → styles}/CozyPassFingerprintDialogContent.styl +0 -0
  110. /package/dist/{components → styles}/actionmenu.styl +0 -0
  111. /package/dist/{components → styles}/autosuggest.styl +0 -0
  112. /package/dist/{components → styles}/badge.styl +0 -0
  113. /package/dist/{components → styles}/button.styl +0 -0
  114. /package/dist/{components/Recipient → styles}/recipient.styl +0 -0
  115. /package/dist/{share.styl → styles/share.styl} +0 -0
  116. /package/dist/{components → styles}/status.styl +0 -0
  117. /package/dist/{components → styles}/tooltip.styl +0 -0
  118. /package/src/{SharingBanner → components/SharingBanner}/components/CozyHomeLinkIcon.jsx +0 -0
  119. /package/src/{SharingBanner → components/SharingBanner}/components/PublicBanner.spec.jsx +0 -0
  120. /package/src/{SharingBanner → components/SharingBanner}/components/SharingBanner.jsx +0 -0
  121. /package/src/{SharingBanner → components/SharingBanner}/helpers/QueryParameter.js +0 -0
  122. /package/src/{SharingBanner → components/SharingBanner}/helpers/QueryParameter.spec.js +0 -0
  123. /package/src/{SharingBanner → components/SharingBanner}/hooks/useSharingInfos.spec.js +0 -0
  124. /package/src/{SharingBanner → components/SharingBanner}/test/AcceptingSharingContext.jsx +0 -0
  125. /package/src/{SharingBanner → components/SharingBanner}/test/FabProvider.jsx +0 -0
  126. /package/src/{SharingBanner → components/SharingBanner}/test/ModalContext.jsx +0 -0
  127. /package/src/{SharingBanner → components/SharingBanner}/test/RouterContext.jsx +0 -0
  128. /package/src/{SharingBanner → components/SharingBanner}/test/ThumbnailSizeContext.jsx +0 -0
  129. /package/src/{components → hooks}/useFetchDocumentPath.jsx +0 -0
  130. /package/src/{components → styles}/CozyPassFingerprintDialogContent.styl +0 -0
  131. /package/src/{components → styles}/actionmenu.styl +0 -0
  132. /package/src/{components → styles}/autosuggest.styl +0 -0
  133. /package/src/{components → styles}/badge.styl +0 -0
  134. /package/src/{components → styles}/button.styl +0 -0
  135. /package/src/{components/Recipient → styles}/recipient.styl +0 -0
  136. /package/src/{share.styl → styles/share.styl} +0 -0
  137. /package/src/{components → styles}/status.styl +0 -0
  138. /package/src/{components → styles}/tooltip.styl +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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.3.0 (2024-02-29)
7
+
8
+
9
+ ### Features
10
+
11
+ * **mespapiers:** Add information step for custom name to fidelity card ([5f6fce7](https://github.com/cozy/cozy-libs/commit/5f6fce72e5374388bac369c9332ed47c303e945b))
12
+
13
+
14
+
15
+
16
+
6
17
  # 10.2.0 (2024-02-01)
7
18
 
8
19
 
@@ -4,7 +4,7 @@ var _excluded = ["document"];
4
4
  import React from 'react';
5
5
  import { default as DumbConfirmTrustedRecipientsDialog } from './components/ConfirmTrustedRecipientsDialog';
6
6
  import SharingContext from './context';
7
- import withLocales from './withLocales';
7
+ import withLocales from './hoc/withLocales';
8
8
  export var ConfirmTrustedRecipientsDialog = withLocales(function (_ref) {
9
9
  var document = _ref.document,
10
10
  rest = _objectWithoutProperties(_ref, _excluded);
@@ -11,7 +11,7 @@ import React from 'react';
11
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
- import withLocales from './withLocales';
14
+ import withLocales from './hoc/withLocales';
15
15
  export var ShareButton = withLocales(function (_ref) {
16
16
  var docId = _ref.docId,
17
17
  useShortLabel = _ref.useShortLabel,
@@ -19,7 +19,7 @@ jest.mock('cozy-ui/transpiled/react/providers/I18n', function () {
19
19
  })
20
20
  };
21
21
  });
22
- jest.mock('./withLocales', function () {
22
+ jest.mock('./hoc/withLocales', function () {
23
23
  return (// eslint-disable-next-line react/display-name
24
24
  function (Component) {
25
25
  return function (props) {
@@ -4,7 +4,7 @@ var _excluded = ["docId"];
4
4
  import React from 'react';
5
5
  import { default as DumbSharedBadge } from './components/SharedBadge';
6
6
  import SharingContext from './context';
7
- import withLocales from './withLocales';
7
+ import withLocales from './hoc/withLocales';
8
8
  export var SharedBadge = withLocales(function (_ref) {
9
9
  var docId = _ref.docId,
10
10
  rest = _objectWithoutProperties(_ref, _excluded);
@@ -4,7 +4,7 @@ var _excluded = ["docId", "onClick"];
4
4
  import React from 'react';
5
5
  import RecipientsAvatars from './components/Recipient/RecipientsAvatars';
6
6
  import SharingContext from './context';
7
- import withLocales from './withLocales';
7
+ import withLocales from './hoc/withLocales';
8
8
  export var SharedRecipients = withLocales(function (_ref) {
9
9
  var docId = _ref.docId,
10
10
  onClick = _ref.onClick,
@@ -4,7 +4,7 @@ var _excluded = ["docId"];
4
4
  import React from 'react';
5
5
  import { default as RecipientsList } from './components/WhoHasAccessLight';
6
6
  import SharingContext from './context';
7
- import withLocales from './withLocales';
7
+ import withLocales from './hoc/withLocales';
8
8
  export var SharedRecipientsList = withLocales(function (_ref) {
9
9
  var docId = _ref.docId,
10
10
  rest = _objectWithoutProperties(_ref, _excluded);
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import RecipientsAvatars from './components/Recipient/RecipientsAvatars';
3
3
  import SharingContext from './context';
4
- import withLocales from './withLocales';
4
+ import withLocales from './hoc/withLocales';
5
5
  export var SharedStatus = withLocales(function (_ref) {
6
6
  var docId = _ref.docId,
7
7
  className = _ref.className,
@@ -4,7 +4,7 @@ var _excluded = ["docId"];
4
4
  import React from 'react';
5
5
  import RecipientAvatar from './components/Recipient/RecipientAvatar';
6
6
  import SharingContext from './context';
7
- import withLocales from './withLocales';
7
+ import withLocales from './hoc/withLocales';
8
8
  export var SharingOwnerAvatar = withLocales(function (_ref) {
9
9
  var docId = _ref.docId,
10
10
  rest = _objectWithoutProperties(_ref, _excluded);
@@ -6,7 +6,7 @@ import Paper from 'cozy-ui/transpiled/react/Paper';
6
6
  import Typography from 'cozy-ui/transpiled/react/Typography';
7
7
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
8
8
  var styles = {
9
- "cozy-pass-fingerprint-modal__fingerprint": "CozyPassFingerprintDialogContent__cozy-pass-fingerprint-modal__fingerprint___2O7dO"
9
+ "cozy-pass-fingerprint-modal__fingerprint": "CozyPassFingerprintDialogContent__cozy-pass-fingerprint-modal__fingerprint___3qIGs"
10
10
  };
11
11
  /**
12
12
  * CozyPassFingerprintDialogContent can be use as a content for ShareModal when
@@ -2,23 +2,23 @@ import classNames from 'classnames';
2
2
  import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
4
  var styles = {
5
- "CozyTheme--inverted": "recipient__CozyTheme--inverted___2Hb9c",
6
- "CozyTheme--normal": "recipient__CozyTheme--normal___3WdEw",
7
- "recipient": "recipient__recipient___2zWmH",
8
- "recipients-list-light": "recipient__recipients-list-light___1-dkI",
9
- "recipient-idents": "recipient__recipient-idents___3F3zL",
10
- "recipient-status-icon": "recipient__recipient-status-icon___1GvS9",
11
- "recipient-user": "recipient__recipient-user___3hOyK",
12
- "recipient-details": "recipient__recipient-details___3fmFE",
13
- "avatar": "recipient__avatar___2NIEb",
14
- "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3gmgy",
15
- "recipients-avatars": "recipient__recipients-avatars___MXhiL",
16
- "--interactive": "recipient__--interactive___1gDjM",
17
- "recipients-avatars--link": "recipient__recipients-avatars--link___2s02h",
18
- "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___WRllr",
19
- "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___3j3_A",
20
- "spin": "recipient__spin___3_Uja",
21
- "shake": "recipient__shake___TrWC0"
5
+ "CozyTheme--inverted": "recipient__CozyTheme--inverted___21SPM",
6
+ "CozyTheme--normal": "recipient__CozyTheme--normal___3ABO0",
7
+ "recipient": "recipient__recipient___2DmZI",
8
+ "recipients-list-light": "recipient__recipients-list-light___Vq4op",
9
+ "recipient-idents": "recipient__recipient-idents___3s7rw",
10
+ "recipient-status-icon": "recipient__recipient-status-icon___-liGw",
11
+ "recipient-user": "recipient__recipient-user___1THIU",
12
+ "recipient-details": "recipient__recipient-details___2fZfc",
13
+ "avatar": "recipient__avatar___2LnIV",
14
+ "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
15
+ "recipients-avatars": "recipient__recipients-avatars___1npjD",
16
+ "--interactive": "recipient__--interactive___160Bp",
17
+ "recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
18
+ "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
19
+ "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
20
+ "spin": "recipient__spin___2tYv3",
21
+ "shake": "recipient__shake___TGyPp"
22
22
  };
23
23
 
24
24
  var Identity = function Identity(_ref) {
@@ -12,26 +12,26 @@ import Typography from 'cozy-ui/transpiled/react/Typography';
12
12
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
13
13
  import LinkRecipientPermissions from './LinkRecipientPermissions';
14
14
  import RecipientConfirm from './RecipientConfirm';
15
+ import { FADE_IN_DURATION } from '../../helpers/recipients';
15
16
  var styles = {
16
- "CozyTheme--inverted": "recipient__CozyTheme--inverted___2Hb9c",
17
- "CozyTheme--normal": "recipient__CozyTheme--normal___3WdEw",
18
- "recipient": "recipient__recipient___2zWmH",
19
- "recipients-list-light": "recipient__recipients-list-light___1-dkI",
20
- "recipient-idents": "recipient__recipient-idents___3F3zL",
21
- "recipient-status-icon": "recipient__recipient-status-icon___1GvS9",
22
- "recipient-user": "recipient__recipient-user___3hOyK",
23
- "recipient-details": "recipient__recipient-details___3fmFE",
24
- "avatar": "recipient__avatar___2NIEb",
25
- "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3gmgy",
26
- "recipients-avatars": "recipient__recipients-avatars___MXhiL",
27
- "--interactive": "recipient__--interactive___1gDjM",
28
- "recipients-avatars--link": "recipient__recipients-avatars--link___2s02h",
29
- "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___WRllr",
30
- "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___3j3_A",
31
- "spin": "recipient__spin___3_Uja",
32
- "shake": "recipient__shake___TrWC0"
17
+ "CozyTheme--inverted": "recipient__CozyTheme--inverted___21SPM",
18
+ "CozyTheme--normal": "recipient__CozyTheme--normal___3ABO0",
19
+ "recipient": "recipient__recipient___2DmZI",
20
+ "recipients-list-light": "recipient__recipients-list-light___Vq4op",
21
+ "recipient-idents": "recipient__recipient-idents___3s7rw",
22
+ "recipient-status-icon": "recipient__recipient-status-icon___-liGw",
23
+ "recipient-user": "recipient__recipient-user___1THIU",
24
+ "recipient-details": "recipient__recipient-details___2fZfc",
25
+ "avatar": "recipient__avatar___2LnIV",
26
+ "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
27
+ "recipients-avatars": "recipient__recipients-avatars___1npjD",
28
+ "--interactive": "recipient__--interactive___160Bp",
29
+ "recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
30
+ "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
31
+ "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
32
+ "spin": "recipient__spin___2tYv3",
33
+ "shake": "recipient__shake___TGyPp"
33
34
  };
34
- import { FADE_IN_DURATION } from '../../helpers/recipients';
35
35
 
36
36
  var LinkRecipient = function LinkRecipient(props) {
37
37
  var _useI18n = useI18n(),
@@ -3,26 +3,26 @@ var _excluded = ["url", "size"];
3
3
  import React from 'react';
4
4
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
5
5
  import Identity from './Identity';
6
+ import { getDisplayName, getInitials } from '../../models';
6
7
  var styles = {
7
- "CozyTheme--inverted": "recipient__CozyTheme--inverted___2Hb9c",
8
- "CozyTheme--normal": "recipient__CozyTheme--normal___3WdEw",
9
- "recipient": "recipient__recipient___2zWmH",
10
- "recipients-list-light": "recipient__recipients-list-light___1-dkI",
11
- "recipient-idents": "recipient__recipient-idents___3F3zL",
12
- "recipient-status-icon": "recipient__recipient-status-icon___1GvS9",
13
- "recipient-user": "recipient__recipient-user___3hOyK",
14
- "recipient-details": "recipient__recipient-details___3fmFE",
15
- "avatar": "recipient__avatar___2NIEb",
16
- "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3gmgy",
17
- "recipients-avatars": "recipient__recipients-avatars___MXhiL",
18
- "--interactive": "recipient__--interactive___1gDjM",
19
- "recipients-avatars--link": "recipient__recipients-avatars--link___2s02h",
20
- "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___WRllr",
21
- "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___3j3_A",
22
- "spin": "recipient__spin___3_Uja",
23
- "shake": "recipient__shake___TrWC0"
8
+ "CozyTheme--inverted": "recipient__CozyTheme--inverted___21SPM",
9
+ "CozyTheme--normal": "recipient__CozyTheme--normal___3ABO0",
10
+ "recipient": "recipient__recipient___2DmZI",
11
+ "recipients-list-light": "recipient__recipients-list-light___Vq4op",
12
+ "recipient-idents": "recipient__recipient-idents___3s7rw",
13
+ "recipient-status-icon": "recipient__recipient-status-icon___-liGw",
14
+ "recipient-user": "recipient__recipient-user___1THIU",
15
+ "recipient-details": "recipient__recipient-details___2fZfc",
16
+ "avatar": "recipient__avatar___2LnIV",
17
+ "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
18
+ "recipients-avatars": "recipient__recipients-avatars___1npjD",
19
+ "--interactive": "recipient__--interactive___160Bp",
20
+ "recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
21
+ "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
22
+ "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
23
+ "spin": "recipient__spin___2tYv3",
24
+ "shake": "recipient__shake___TGyPp"
24
25
  };
25
- import { getDisplayName, getInitials } from '../../models';
26
26
 
27
27
  var OwnerIdentity = function OwnerIdentity(_ref) {
28
28
  var url = _ref.url,
@@ -3,31 +3,31 @@ import React from 'react';
3
3
  import Button from 'cozy-ui/transpiled/react/deprecated/Button';
4
4
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
5
5
  var modalStyles = {
6
- "share-modal-content": "share__share-modal-content___XTtaK",
7
- "coz-form": "share__coz-form___33NYF",
8
- "coz-form-group": "share__coz-form-group___1PLAZ",
9
- "coz-form-desc": "share__coz-form-desc___-pmK5",
10
- "coz-form-label": "share__coz-form-label___31jb0",
11
- "coz-form-label--error": "share__coz-form-label--error___2EXCl",
12
- "coz-form-errors": "share__coz-form-errors___1rk2R",
13
- "coz-form-controls": "share__coz-form-controls___39Uwg",
14
- "coz-form-controls--full": "share__coz-form-controls--full___1YpNp",
15
- "coz-form-controls--dispatch": "share__coz-form-controls--dispatch___3JXzz",
16
- "error": "share__error___6Ycal",
17
- "CozyTheme--inverted": "share__CozyTheme--inverted___2pLD2",
18
- "CozyTheme--normal": "share__CozyTheme--normal___qSFyr",
19
- "share-byemail-onlybylink": "share__share-byemail-onlybylink___C_7b_",
20
- "aligned-dropdown-button": "share__aligned-dropdown-button___CeTDs",
21
- "share-type-control": "share__share-type-control___KcpDf",
22
- "select-wrapper": "share__select-wrapper___3FfiH",
23
- "select-option": "share__select-option___13o6b",
24
- "select-option-label": "share__select-option-label___Zj_RU",
25
- "select-option-desc": "share__select-option-desc___6uaQq",
26
- "share-details-created": "share__share-details-created___13BO0",
27
- "share-details-perm": "share__share-details-perm___23_VF",
28
- "share-details-perm-desc": "share__share-details-perm-desc___tqfXx",
29
- "spin": "share__spin___1P7nU",
30
- "shake": "share__shake___1EeCI"
6
+ "share-modal-content": "share__share-modal-content___1iqEq",
7
+ "coz-form": "share__coz-form___1ICST",
8
+ "coz-form-group": "share__coz-form-group___VsQp7",
9
+ "coz-form-desc": "share__coz-form-desc___2mYN4",
10
+ "coz-form-label": "share__coz-form-label___bogBw",
11
+ "coz-form-label--error": "share__coz-form-label--error___3YPkf",
12
+ "coz-form-errors": "share__coz-form-errors___2xYRz",
13
+ "coz-form-controls": "share__coz-form-controls___H8kGc",
14
+ "coz-form-controls--full": "share__coz-form-controls--full___1oQXF",
15
+ "coz-form-controls--dispatch": "share__coz-form-controls--dispatch___1zIxt",
16
+ "error": "share__error___pwqPO",
17
+ "CozyTheme--inverted": "share__CozyTheme--inverted___oxix3",
18
+ "CozyTheme--normal": "share__CozyTheme--normal___2PCy8",
19
+ "share-byemail-onlybylink": "share__share-byemail-onlybylink___29W-t",
20
+ "aligned-dropdown-button": "share__aligned-dropdown-button___3crgG",
21
+ "share-type-control": "share__share-type-control___1YoRr",
22
+ "select-wrapper": "share__select-wrapper___3XBKC",
23
+ "select-option": "share__select-option___3Jp8_",
24
+ "select-option-label": "share__select-option-label___1BWz_",
25
+ "select-option-desc": "share__select-option-desc___3jOnr",
26
+ "share-details-created": "share__share-details-created___z3nvO",
27
+ "share-details-perm": "share__share-details-perm___3HjxK",
28
+ "share-details-perm-desc": "share__share-details-perm-desc___3HyHu",
29
+ "spin": "share__spin___hhtoM",
30
+ "shake": "share__shake___2au1o"
31
31
  };
32
32
  /**
33
33
  * Displays the confirmation interface that allows to confirm or reject a recipient
@@ -0,0 +1,36 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React from 'react';
3
+ import Recipient from './Recipient';
4
+ import { usePrevious } from '../../helpers/hooks';
5
+ import { filterAndReworkRecipients } from '../../helpers/recipients';
6
+
7
+ var RecipientList = function RecipientList(_ref) {
8
+ var recipients = _ref.recipients,
9
+ recipientsToBeConfirmed = _ref.recipientsToBeConfirmed,
10
+ isOwner = _ref.isOwner,
11
+ document = _ref.document,
12
+ documentType = _ref.documentType,
13
+ onRevoke = _ref.onRevoke,
14
+ onRevokeSelf = _ref.onRevokeSelf,
15
+ verifyRecipient = _ref.verifyRecipient;
16
+ var previousRecipients = usePrevious(recipients);
17
+ var recipientsToDisplay = filterAndReworkRecipients(recipients, previousRecipients);
18
+ return recipientsToDisplay.map(function (recipient) {
19
+ var recipientConfirmationData = recipientsToBeConfirmed.find(function (user) {
20
+ return user.email === recipient.email;
21
+ });
22
+ return /*#__PURE__*/React.createElement(Recipient, _extends({}, recipient, {
23
+ key: "key_r_".concat(recipient.index),
24
+ isOwner: isOwner,
25
+ document: document,
26
+ documentType: documentType,
27
+ onRevoke: onRevoke,
28
+ onRevokeSelf: onRevokeSelf,
29
+ recipientConfirmationData: recipientConfirmationData,
30
+ verifyRecipient: verifyRecipient,
31
+ fadeIn: recipient.hasBeenJustAdded
32
+ }));
33
+ });
34
+ };
35
+
36
+ export { RecipientList };
@@ -2,26 +2,26 @@ import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import AvatarPlusX from './AvatarPlusX';
4
4
  import Identity from './Identity';
5
+ import { getDisplayName } from '../../models';
5
6
  var styles = {
6
- "CozyTheme--inverted": "recipient__CozyTheme--inverted___2Hb9c",
7
- "CozyTheme--normal": "recipient__CozyTheme--normal___3WdEw",
8
- "recipient": "recipient__recipient___2zWmH",
9
- "recipients-list-light": "recipient__recipients-list-light___1-dkI",
10
- "recipient-idents": "recipient__recipient-idents___3F3zL",
11
- "recipient-status-icon": "recipient__recipient-status-icon___1GvS9",
12
- "recipient-user": "recipient__recipient-user___3hOyK",
13
- "recipient-details": "recipient__recipient-details___3fmFE",
14
- "avatar": "recipient__avatar___2NIEb",
15
- "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3gmgy",
16
- "recipients-avatars": "recipient__recipients-avatars___MXhiL",
17
- "--interactive": "recipient__--interactive___1gDjM",
18
- "recipients-avatars--link": "recipient__recipients-avatars--link___2s02h",
19
- "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___WRllr",
20
- "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___3j3_A",
21
- "spin": "recipient__spin___3_Uja",
22
- "shake": "recipient__shake___TrWC0"
7
+ "CozyTheme--inverted": "recipient__CozyTheme--inverted___21SPM",
8
+ "CozyTheme--normal": "recipient__CozyTheme--normal___3ABO0",
9
+ "recipient": "recipient__recipient___2DmZI",
10
+ "recipients-list-light": "recipient__recipients-list-light___Vq4op",
11
+ "recipient-idents": "recipient__recipient-idents___3s7rw",
12
+ "recipient-status-icon": "recipient__recipient-status-icon___-liGw",
13
+ "recipient-user": "recipient__recipient-user___1THIU",
14
+ "recipient-details": "recipient__recipient-details___2fZfc",
15
+ "avatar": "recipient__avatar___2LnIV",
16
+ "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
17
+ "recipients-avatars": "recipient__recipients-avatars___1npjD",
18
+ "--interactive": "recipient__--interactive___160Bp",
19
+ "recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
20
+ "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
21
+ "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
22
+ "spin": "recipient__spin___2tYv3",
23
+ "shake": "recipient__shake___TGyPp"
23
24
  };
24
- import { getDisplayName } from '../../models';
25
25
 
26
26
  var RecipientPlusX = function RecipientPlusX(_ref, _ref2) {
27
27
  var extraRecipients = _ref.extraRecipients;
@@ -7,23 +7,23 @@ import Typography from 'cozy-ui/transpiled/react/Typography';
7
7
  import { Media, Img, Bd } from 'cozy-ui/transpiled/react/deprecated/Media';
8
8
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
9
9
  var styles = {
10
- "CozyTheme--inverted": "recipient__CozyTheme--inverted___2Hb9c",
11
- "CozyTheme--normal": "recipient__CozyTheme--normal___3WdEw",
12
- "recipient": "recipient__recipient___2zWmH",
13
- "recipients-list-light": "recipient__recipients-list-light___1-dkI",
14
- "recipient-idents": "recipient__recipient-idents___3F3zL",
15
- "recipient-status-icon": "recipient__recipient-status-icon___1GvS9",
16
- "recipient-user": "recipient__recipient-user___3hOyK",
17
- "recipient-details": "recipient__recipient-details___3fmFE",
18
- "avatar": "recipient__avatar___2NIEb",
19
- "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3gmgy",
20
- "recipients-avatars": "recipient__recipients-avatars___MXhiL",
21
- "--interactive": "recipient__--interactive___1gDjM",
22
- "recipients-avatars--link": "recipient__recipients-avatars--link___2s02h",
23
- "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___WRllr",
24
- "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___3j3_A",
25
- "spin": "recipient__spin___3_Uja",
26
- "shake": "recipient__shake___TrWC0"
10
+ "CozyTheme--inverted": "recipient__CozyTheme--inverted___21SPM",
11
+ "CozyTheme--normal": "recipient__CozyTheme--normal___3ABO0",
12
+ "recipient": "recipient__recipient___2DmZI",
13
+ "recipients-list-light": "recipient__recipients-list-light___Vq4op",
14
+ "recipient-idents": "recipient__recipient-idents___3s7rw",
15
+ "recipient-status-icon": "recipient__recipient-status-icon___-liGw",
16
+ "recipient-user": "recipient__recipient-user___1THIU",
17
+ "recipient-details": "recipient__recipient-details___2fZfc",
18
+ "avatar": "recipient__avatar___2LnIV",
19
+ "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
20
+ "recipients-avatars": "recipient__recipients-avatars___1npjD",
21
+ "--interactive": "recipient__--interactive___160Bp",
22
+ "recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
23
+ "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
24
+ "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
25
+ "spin": "recipient__spin___2tYv3",
26
+ "shake": "recipient__shake___TGyPp"
27
27
  };
28
28
 
29
29
  var RecipientStatus = function RecipientStatus(_ref) {
@@ -3,26 +3,26 @@ var _excluded = ["instance"];
3
3
  import React from 'react';
4
4
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
5
5
  import Identity from './Identity';
6
+ import { getDisplayName, getInitials } from '../../models';
6
7
  var styles = {
7
- "CozyTheme--inverted": "recipient__CozyTheme--inverted___2Hb9c",
8
- "CozyTheme--normal": "recipient__CozyTheme--normal___3WdEw",
9
- "recipient": "recipient__recipient___2zWmH",
10
- "recipients-list-light": "recipient__recipients-list-light___1-dkI",
11
- "recipient-idents": "recipient__recipient-idents___3F3zL",
12
- "recipient-status-icon": "recipient__recipient-status-icon___1GvS9",
13
- "recipient-user": "recipient__recipient-user___3hOyK",
14
- "recipient-details": "recipient__recipient-details___3fmFE",
15
- "avatar": "recipient__avatar___2NIEb",
16
- "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3gmgy",
17
- "recipients-avatars": "recipient__recipients-avatars___MXhiL",
18
- "--interactive": "recipient__--interactive___1gDjM",
19
- "recipients-avatars--link": "recipient__recipients-avatars--link___2s02h",
20
- "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___WRllr",
21
- "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___3j3_A",
22
- "spin": "recipient__spin___3_Uja",
23
- "shake": "recipient__shake___TrWC0"
8
+ "CozyTheme--inverted": "recipient__CozyTheme--inverted___21SPM",
9
+ "CozyTheme--normal": "recipient__CozyTheme--normal___3ABO0",
10
+ "recipient": "recipient__recipient___2DmZI",
11
+ "recipients-list-light": "recipient__recipients-list-light___Vq4op",
12
+ "recipient-idents": "recipient__recipient-idents___3s7rw",
13
+ "recipient-status-icon": "recipient__recipient-status-icon___-liGw",
14
+ "recipient-user": "recipient__recipient-user___1THIU",
15
+ "recipient-details": "recipient__recipient-details___2fZfc",
16
+ "avatar": "recipient__avatar___2LnIV",
17
+ "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
18
+ "recipients-avatars": "recipient__recipients-avatars___1npjD",
19
+ "--interactive": "recipient__--interactive___160Bp",
20
+ "recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
21
+ "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
22
+ "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
23
+ "spin": "recipient__spin___2tYv3",
24
+ "shake": "recipient__shake___TGyPp"
24
25
  };
25
- import { getDisplayName, getInitials } from '../../models';
26
26
 
27
27
  var RecipientWithoutStatus = function RecipientWithoutStatus(_ref) {
28
28
  var instance = _ref.instance,
@@ -6,26 +6,26 @@ import Avatar from 'cozy-ui/transpiled/react/Avatar';
6
6
  import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
7
7
  import AvatarPlusX from './AvatarPlusX';
8
8
  import RecipientAvatar from './RecipientAvatar';
9
+ import { getDisplayName } from '../../models';
9
10
  var styles = {
10
- "CozyTheme--inverted": "recipient__CozyTheme--inverted___2Hb9c",
11
- "CozyTheme--normal": "recipient__CozyTheme--normal___3WdEw",
12
- "recipient": "recipient__recipient___2zWmH",
13
- "recipients-list-light": "recipient__recipients-list-light___1-dkI",
14
- "recipient-idents": "recipient__recipient-idents___3F3zL",
15
- "recipient-status-icon": "recipient__recipient-status-icon___1GvS9",
16
- "recipient-user": "recipient__recipient-user___3hOyK",
17
- "recipient-details": "recipient__recipient-details___3fmFE",
18
- "avatar": "recipient__avatar___2NIEb",
19
- "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3gmgy",
20
- "recipients-avatars": "recipient__recipients-avatars___MXhiL",
21
- "--interactive": "recipient__--interactive___1gDjM",
22
- "recipients-avatars--link": "recipient__recipients-avatars--link___2s02h",
23
- "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___WRllr",
24
- "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___3j3_A",
25
- "spin": "recipient__spin___3_Uja",
26
- "shake": "recipient__shake___TrWC0"
11
+ "CozyTheme--inverted": "recipient__CozyTheme--inverted___21SPM",
12
+ "CozyTheme--normal": "recipient__CozyTheme--normal___3ABO0",
13
+ "recipient": "recipient__recipient___2DmZI",
14
+ "recipients-list-light": "recipient__recipients-list-light___Vq4op",
15
+ "recipient-idents": "recipient__recipient-idents___3s7rw",
16
+ "recipient-status-icon": "recipient__recipient-status-icon___-liGw",
17
+ "recipient-user": "recipient__recipient-user___1THIU",
18
+ "recipient-details": "recipient__recipient-details___2fZfc",
19
+ "avatar": "recipient__avatar___2LnIV",
20
+ "link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
21
+ "recipients-avatars": "recipient__recipients-avatars___1npjD",
22
+ "--interactive": "recipient__--interactive___160Bp",
23
+ "recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
24
+ "recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
25
+ "recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
26
+ "spin": "recipient__spin___2tYv3",
27
+ "shake": "recipient__shake___TGyPp"
27
28
  };
28
- import { getDisplayName } from '../../models';
29
29
  export var MAX_DISPLAYED_RECIPIENTS = 3;
30
30
  /**
31
31
  * Exclude me from the list of recipients.
@@ -8,20 +8,20 @@ import Chip from 'cozy-ui/transpiled/react/Chips';
8
8
  import { Spinner } from 'cozy-ui/transpiled/react/Spinner';
9
9
  import palette from 'cozy-ui/transpiled/react/palette';
10
10
  import ContactSuggestion from './ContactSuggestion';
11
- var styles = {
12
- "CozyTheme--inverted": "autosuggest__CozyTheme--inverted___QJCUa",
13
- "CozyTheme--normal": "autosuggest__CozyTheme--normal___1-_dN",
14
- "container": "autosuggest__container___1dbB4",
15
- "suggestionsContainer": "autosuggest__suggestionsContainer___-PUXu",
16
- "suggestionsContainerOpen": "autosuggest__suggestionsContainerOpen___LO5cw",
17
- "input": "autosuggest__input___3b74d",
18
- "suggestionsList": "autosuggest__suggestionsList___211Pt",
19
- "suggestionHighlighted": "autosuggest__suggestionHighlighted___MbW8F",
20
- "recipientsContainer": "autosuggest__recipientsContainer___15b1_",
21
- "recipientChip": "autosuggest__recipientChip___oRxU-"
22
- };
23
11
  import { extractEmails, validateEmail } from '../helpers/email';
24
12
  import { getDisplayName, getInitials, Contact } from '../models';
13
+ var styles = {
14
+ "CozyTheme--inverted": "autosuggest__CozyTheme--inverted___3qp6I",
15
+ "CozyTheme--normal": "autosuggest__CozyTheme--normal___3fMAz",
16
+ "container": "autosuggest__container___1Yro7",
17
+ "suggestionsContainer": "autosuggest__suggestionsContainer___3EDuG",
18
+ "suggestionsContainerOpen": "autosuggest__suggestionsContainerOpen___35OCI",
19
+ "input": "autosuggest__input___1Ea-3",
20
+ "suggestionsList": "autosuggest__suggestionsList___3uRpV",
21
+ "suggestionHighlighted": "autosuggest__suggestionHighlighted___1vpXJ",
22
+ "recipientsContainer": "autosuggest__recipientsContainer___1JYxA",
23
+ "recipientChip": "autosuggest__recipientChip___d5I3R"
24
+ };
25
25
  import { cozyUrlMatch, emailMatch, groupNameMatch, fullnameMatch } from '../suggestionMatchers';
26
26
 
27
27
  var ShareAutocomplete = function ShareAutocomplete(_ref) {
@@ -9,8 +9,8 @@ import Icon from 'cozy-ui/transpiled/react/Icon';
9
9
  import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share';
10
10
  import { Button } from 'cozy-ui/transpiled/react/deprecated/Button';
11
11
  var styles = {
12
- "coz-btn-shared": "button__coz-btn-shared___2BoMk",
13
- "coz-btn-sharedWithMe": "button__coz-btn-sharedWithMe___2Vjfh"
12
+ "coz-btn-shared": "button__coz-btn-shared___9MFbY",
13
+ "coz-btn-sharedWithMe": "button__coz-btn-sharedWithMe___25PBh"
14
14
  };
15
15
  export var ShareButton = function ShareButton(_ref) {
16
16
  var label = _ref.label,