cozy-sharing 22.0.0 → 23.0.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.
- package/CHANGELOG.md +17 -0
- package/dist/components/Avatar/AvatarList.js +1 -1
- package/dist/components/Avatar/ExtraAvatar.js +1 -1
- package/dist/components/Avatar/GroupAvatar.js +1 -1
- package/dist/components/Avatar/MemberAvatar.js +12 -9
- package/dist/components/ContactSuggestion.js +1 -1
- package/dist/components/Identity/MemberIdentity.js +1 -1
- package/dist/components/Identity/OwnerIdentity.js +1 -1
- package/dist/components/Recipient/GroupRecipientDetailWithAccess.js +1 -1
- package/dist/components/Recipient/GroupRecipientDetailWithoutAccess.js +1 -1
- package/dist/components/ShareAutosuggest.js +1 -1
- package/package.json +4 -4
- package/src/components/Avatar/AvatarList.jsx +1 -1
- package/src/components/Avatar/ExtraAvatar.jsx +1 -1
- package/src/components/Avatar/GroupAvatar.jsx +1 -1
- package/src/components/Avatar/MemberAvatar.jsx +10 -11
- package/src/components/ContactSuggestion.jsx +1 -1
- package/src/components/Identity/MemberIdentity.jsx +1 -1
- package/src/components/Identity/OwnerIdentity.jsx +1 -1
- package/src/components/Recipient/GroupRecipientDetailWithAccess.jsx +1 -1
- package/src/components/Recipient/GroupRecipientDetailWithoutAccess.jsx +1 -1
- package/src/components/ShareAutosuggest.jsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
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
|
+
# [23.0.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@22.0.0...cozy-sharing@23.0.0) (2025-03-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **Sharing:** Remove image avatar from stack ([904efbc](https://github.com/cozy/cozy-libs/commit/904efbca5855fef7d3cd23ffcbefd64810cdec26))
|
|
12
|
+
* **Sharing:** Upgrade cozy-ui 116.0.0 to 119.0.1 ([393ce80](https://github.com/cozy/cozy-libs/commit/393ce806fe726355b165c7130653bb33b2c371cc))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### BREAKING CHANGES
|
|
16
|
+
|
|
17
|
+
* **Sharing:** You must have `cozy-ui >= 119.0.1`
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
# [22.0.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@21.3.0...cozy-sharing@22.0.0) (2025-02-26)
|
|
7
24
|
|
|
8
25
|
|
|
@@ -2,8 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { useClient } from 'cozy-client';
|
|
5
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
6
5
|
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
|
|
6
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
7
7
|
import { ExtraAvatar } from './ExtraAvatar';
|
|
8
8
|
import { GroupAvatar } from './GroupAvatar';
|
|
9
9
|
import { MemberAvatar } from './MemberAvatar';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import uniqueId from 'lodash/uniqueId';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
4
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
5
5
|
import { SharingTooltip, TooltipRecipientList } from '../Tooltip';
|
|
6
6
|
|
|
7
7
|
var ExtraAvatar = function ExtraAvatar(_ref) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
3
2
|
import TeamIcon from 'cozy-ui/transpiled/react/Icons/Team';
|
|
3
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
4
4
|
|
|
5
5
|
var GroupAvatar = function GroupAvatar(_ref) {
|
|
6
6
|
var size = _ref.size,
|
|
@@ -8,20 +8,18 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
8
8
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
9
|
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import
|
|
12
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
13
|
-
import { getDisplayName, getInitials } from '../../models';
|
|
11
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
14
12
|
import logger from '../../logger';
|
|
13
|
+
import { getDisplayName, getInitials } from '../../models';
|
|
15
14
|
|
|
16
15
|
var MemberAvatar = function MemberAvatar(_ref) {
|
|
17
16
|
var recipient = _ref.recipient,
|
|
18
17
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
// There are cases when due to apparent memory leaks, the recipient does not exist
|
|
21
20
|
// This will trigger an unhanded error in the Avatar component and crash the app
|
|
22
21
|
// At the moment, we are not sure where is the root cause of this cascading undefined props
|
|
23
22
|
// Nevertheless, we can prevent the crash by returning null if the recipient is undefined
|
|
24
|
-
|
|
25
23
|
if (!recipient) {
|
|
26
24
|
// eslint-disable-next-line
|
|
27
25
|
logger.warn('RecipientAvatar: recipient is missing, see props:', _objectSpread({
|
|
@@ -31,18 +29,23 @@ var MemberAvatar = function MemberAvatar(_ref) {
|
|
|
31
29
|
}
|
|
32
30
|
/**
|
|
33
31
|
* avatarPath is always the same for a recipient, but image
|
|
34
|
-
* can be different since the stack generate it on the fly
|
|
32
|
+
* can be different since the stack generate it on the fly
|
|
33
|
+
* because they can be customized by the user.
|
|
35
34
|
* It can be "gray" during the first load depending of the
|
|
36
35
|
* status' sharing, but can become active (from the realtime)
|
|
37
36
|
* so we need a way to "refresh" the image. Passing the
|
|
38
37
|
* status in the url force the refresh of the image when the
|
|
39
38
|
* status changes
|
|
40
39
|
*/
|
|
40
|
+
// we comment this part for now because it's not compliant with Twake theme
|
|
41
|
+
// const image =
|
|
42
|
+
// recipient.avatarPath && recipient.status
|
|
43
|
+
// ? `${client.options.uri}${recipient.avatarPath}?v=${recipient.status}`
|
|
44
|
+
// : null
|
|
41
45
|
|
|
42
46
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
image: image,
|
|
47
|
+
return /*#__PURE__*/React.createElement(Avatar // image={image}
|
|
48
|
+
, _extends({
|
|
46
49
|
text: getInitials(recipient),
|
|
47
50
|
textId: getDisplayName(recipient),
|
|
48
51
|
disabled: recipient.status === 'pending' || recipient.status === 'mail-not-send'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { models } from 'cozy-client';
|
|
4
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
5
4
|
import ListItem from 'cozy-ui/transpiled/react/ListItem';
|
|
6
5
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
|
|
7
6
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
|
|
7
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
8
8
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
9
9
|
import { GroupAvatar } from './Avatar/GroupAvatar';
|
|
10
10
|
import { Contact, Group, getDisplayName, getInitials } from '../models';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
var _excluded = ["instance"];
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
4
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
5
5
|
import Identity from './Identity';
|
|
6
6
|
import { getDisplayName, getInitials } from '../../models';
|
|
7
7
|
var styles = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
var _excluded = ["url", "size"];
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
4
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
5
5
|
import Identity from './Identity';
|
|
6
6
|
import { getDisplayName, getInitials } from '../../models';
|
|
7
7
|
var styles = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useClient } from 'cozy-client';
|
|
3
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
4
3
|
import List from 'cozy-ui/transpiled/react/List';
|
|
5
4
|
import ListItem from 'cozy-ui/transpiled/react/ListItem';
|
|
6
5
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
|
|
7
6
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
|
|
8
7
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
8
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
9
9
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
10
10
|
import MemberRecipientStatus from './MemberRecipientStatus';
|
|
11
11
|
import { getInitials, getDisplayName } from '../../models';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
3
2
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
4
3
|
import ForbiddenIcon from 'cozy-ui/transpiled/react/Icons/Forbidden';
|
|
5
4
|
import List from 'cozy-ui/transpiled/react/List';
|
|
@@ -7,6 +6,7 @@ import ListItem from 'cozy-ui/transpiled/react/ListItem';
|
|
|
7
6
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
|
|
8
7
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
|
|
9
8
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
9
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
10
10
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
11
11
|
import { DEFAULT_DISPLAY_NAME } from '../../helpers/recipients';
|
|
12
12
|
import { getInitials, getDisplayName } from '../../models';
|
|
@@ -3,9 +3,9 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React, { useState, useRef } from 'react';
|
|
5
5
|
import Autosuggest from 'react-autosuggest';
|
|
6
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
7
6
|
import Chip from 'cozy-ui/transpiled/react/Chips';
|
|
8
7
|
import { Spinner } from 'cozy-ui/transpiled/react/Spinner';
|
|
8
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
9
9
|
import { GroupAvatar } from './Avatar/GroupAvatar';
|
|
10
10
|
import ContactSuggestion from './ContactSuggestion';
|
|
11
11
|
import { extractEmails, validateEmail } from '../helpers/email';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.0.0",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"cozy-device-helper": "^3.7.1",
|
|
58
58
|
"cozy-intent": "^2.29.2",
|
|
59
59
|
"cozy-minilog": "^3.9.1",
|
|
60
|
-
"cozy-ui": "^
|
|
60
|
+
"cozy-ui": "^119.0.1",
|
|
61
61
|
"jest": "26.6.3",
|
|
62
62
|
"jest-environment-jsdom": "26.6.2",
|
|
63
63
|
"react": "16.12.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"cozy-device-helper": ">=3.7.1",
|
|
71
71
|
"cozy-intent": ">=2.29.1",
|
|
72
72
|
"cozy-minilog": ">=3.9.1",
|
|
73
|
-
"cozy-ui": ">=
|
|
73
|
+
"cozy-ui": ">=119.0.1",
|
|
74
74
|
"prop-types": "^15.7.2",
|
|
75
75
|
"react": "^16.12.0",
|
|
76
76
|
"react-router": "^5.0.1"
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"sideEffects": [
|
|
79
79
|
"*.css"
|
|
80
80
|
],
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "3137450acf1734be5812063d86c1b55d29478913"
|
|
82
82
|
}
|
|
@@ -2,8 +2,8 @@ import cx from 'classnames'
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
4
|
import { useClient } from 'cozy-client'
|
|
5
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
6
5
|
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
|
|
6
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar'
|
|
7
7
|
|
|
8
8
|
import { ExtraAvatar } from './ExtraAvatar'
|
|
9
9
|
import { GroupAvatar } from './GroupAvatar'
|
|
@@ -2,7 +2,7 @@ import uniqueId from 'lodash/uniqueId'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import React from 'react'
|
|
4
4
|
|
|
5
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
5
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar'
|
|
6
6
|
|
|
7
7
|
import { SharingTooltip, TooltipRecipientList } from '../Tooltip'
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
4
3
|
import TeamIcon from 'cozy-ui/transpiled/react/Icons/Team'
|
|
4
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar'
|
|
5
5
|
|
|
6
6
|
const GroupAvatar = ({ size, className }) => {
|
|
7
7
|
return <Avatar icon={TeamIcon} size={size} className={className} />
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
3
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar'
|
|
5
4
|
|
|
6
|
-
import { getDisplayName, getInitials } from '../../models'
|
|
7
5
|
import logger from '../../logger'
|
|
6
|
+
import { getDisplayName, getInitials } from '../../models'
|
|
8
7
|
|
|
9
8
|
const MemberAvatar = ({ recipient, ...rest }) => {
|
|
10
|
-
const client = useClient()
|
|
11
|
-
|
|
12
9
|
// There are cases when due to apparent memory leaks, the recipient does not exist
|
|
13
10
|
// This will trigger an unhanded error in the Avatar component and crash the app
|
|
14
11
|
// At the moment, we are not sure where is the root cause of this cascading undefined props
|
|
@@ -21,21 +18,23 @@ const MemberAvatar = ({ recipient, ...rest }) => {
|
|
|
21
18
|
|
|
22
19
|
/**
|
|
23
20
|
* avatarPath is always the same for a recipient, but image
|
|
24
|
-
* can be different since the stack generate it on the fly
|
|
21
|
+
* can be different since the stack generate it on the fly
|
|
22
|
+
* because they can be customized by the user.
|
|
25
23
|
* It can be "gray" during the first load depending of the
|
|
26
24
|
* status' sharing, but can become active (from the realtime)
|
|
27
25
|
* so we need a way to "refresh" the image. Passing the
|
|
28
26
|
* status in the url force the refresh of the image when the
|
|
29
27
|
* status changes
|
|
30
28
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
// we comment this part for now because it's not compliant with Twake theme
|
|
30
|
+
// const image =
|
|
31
|
+
// recipient.avatarPath && recipient.status
|
|
32
|
+
// ? `${client.options.uri}${recipient.avatarPath}?v=${recipient.status}`
|
|
33
|
+
// : null
|
|
35
34
|
|
|
36
35
|
return (
|
|
37
36
|
<Avatar
|
|
38
|
-
image={image}
|
|
37
|
+
// image={image}
|
|
39
38
|
text={getInitials(recipient)}
|
|
40
39
|
textId={getDisplayName(recipient)}
|
|
41
40
|
disabled={
|
|
@@ -2,10 +2,10 @@ import PropTypes from 'prop-types'
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
4
|
import { models } from 'cozy-client'
|
|
5
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
6
5
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
7
6
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
8
7
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
8
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar'
|
|
9
9
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
10
10
|
|
|
11
11
|
import { GroupAvatar } from './Avatar/GroupAvatar'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import { useClient } from 'cozy-client'
|
|
4
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
5
4
|
import List from 'cozy-ui/transpiled/react/List'
|
|
6
5
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
7
6
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
8
7
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
9
8
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
9
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar'
|
|
10
10
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
11
11
|
|
|
12
12
|
import MemberRecipientStatus from './MemberRecipientStatus'
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
4
3
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
4
|
import ForbiddenIcon from 'cozy-ui/transpiled/react/Icons/Forbidden'
|
|
6
5
|
import List from 'cozy-ui/transpiled/react/List'
|
|
@@ -8,6 +7,7 @@ import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
|
8
7
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
9
8
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
10
9
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
10
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar'
|
|
11
11
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
12
12
|
|
|
13
13
|
import { DEFAULT_DISPLAY_NAME } from '../../helpers/recipients'
|
|
@@ -2,9 +2,9 @@ import PropTypes from 'prop-types'
|
|
|
2
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
5
|
import Chip from 'cozy-ui/transpiled/react/Chips'
|
|
7
6
|
import { Spinner } from 'cozy-ui/transpiled/react/Spinner'
|
|
7
|
+
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar'
|
|
8
8
|
|
|
9
9
|
import { GroupAvatar } from './Avatar/GroupAvatar'
|
|
10
10
|
import ContactSuggestion from './ContactSuggestion'
|