cozy-sharing 37.0.2 → 37.1.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
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
# [37.1.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@37.0.2...cozy-sharing@37.1.0) (2026-07-21)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- Display image from user in chip ([fd7a03b](https://github.com/cozy/cozy-libs/commit/fd7a03bc6607e7688d639b63f6b0ecc00a936369))
|
|
11
|
+
|
|
6
12
|
## [37.0.2](https://github.com/cozy/cozy-libs/compare/cozy-sharing@37.0.1...cozy-sharing@37.0.2) (2026-07-21)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package cozy-sharing
|
|
@@ -3,14 +3,14 @@ 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';
|
|
9
8
|
import { GroupAvatar } from './Avatar/GroupAvatar';
|
|
9
|
+
import { MemberAvatar } from './Avatar/MemberAvatar';
|
|
10
10
|
import ContactSuggestion from './ContactSuggestion';
|
|
11
11
|
import { isContactToBeCreated } from '../helpers/contacts';
|
|
12
12
|
import { extractEmails, validateEmail } from '../helpers/email';
|
|
13
|
-
import { getDisplayName,
|
|
13
|
+
import { getDisplayName, Contact, Group } from '../models';
|
|
14
14
|
var styles = {
|
|
15
15
|
"container": "autosuggest__container___1Yro7",
|
|
16
16
|
"suggestionsContainer": "autosuggest__suggestionsContainer___3EDuG",
|
|
@@ -182,7 +182,6 @@ var ShareAutosuggest = function ShareAutosuggest(_ref) {
|
|
|
182
182
|
className: styles['recipientsContainer']
|
|
183
183
|
}, recipients.map(function (recipient, idx) {
|
|
184
184
|
var isContactGroup = recipient._type === Group.doctype;
|
|
185
|
-
var avatarText = getInitials(recipient);
|
|
186
185
|
var name = getDisplayName(recipient);
|
|
187
186
|
return /*#__PURE__*/React.createElement(Chip, {
|
|
188
187
|
id: "recipient_".concat(idx),
|
|
@@ -190,9 +189,10 @@ var ShareAutosuggest = function ShareAutosuggest(_ref) {
|
|
|
190
189
|
avatar: isContactGroup ? /*#__PURE__*/React.createElement(GroupAvatar, {
|
|
191
190
|
size: "xs",
|
|
192
191
|
color: recipient.color
|
|
193
|
-
}) : /*#__PURE__*/React.createElement(
|
|
194
|
-
size: "xs"
|
|
195
|
-
|
|
192
|
+
}) : /*#__PURE__*/React.createElement(MemberAvatar, {
|
|
193
|
+
size: "xs",
|
|
194
|
+
recipient: recipient
|
|
195
|
+
}),
|
|
196
196
|
label: name,
|
|
197
197
|
onDelete: function onDelete() {
|
|
198
198
|
onAutosuggestRemove(recipient);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "37.0
|
|
3
|
+
"version": "37.1.0",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"cozy-intent": "^2.31.1",
|
|
60
60
|
"cozy-minilog": "^3.10.1",
|
|
61
61
|
"cozy-ui": "^140.5.0",
|
|
62
|
-
"cozy-ui-plus": "^12.1.
|
|
62
|
+
"cozy-ui-plus": "^12.1.1",
|
|
63
63
|
"jest": "30.3.0",
|
|
64
64
|
"jest-environment-jsdom": "30.3.0",
|
|
65
65
|
"react": "16.12.0",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"sideEffects": [
|
|
86
86
|
"*.css"
|
|
87
87
|
],
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "bcee49f770c0e868d6f8d84a73211559cf67c40d"
|
|
89
89
|
}
|
|
@@ -2,15 +2,15 @@ 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'
|
|
8
7
|
|
|
9
8
|
import { GroupAvatar } from './Avatar/GroupAvatar'
|
|
9
|
+
import { MemberAvatar } from './Avatar/MemberAvatar'
|
|
10
10
|
import ContactSuggestion from './ContactSuggestion'
|
|
11
11
|
import { isContactToBeCreated } from '../helpers/contacts'
|
|
12
12
|
import { extractEmails, validateEmail } from '../helpers/email'
|
|
13
|
-
import { getDisplayName,
|
|
13
|
+
import { getDisplayName, Contact, Group } from '../models'
|
|
14
14
|
import styles from '../styles/autosuggest.styl'
|
|
15
15
|
import { contactOrGroupMatch } from '../suggestionMatchers'
|
|
16
16
|
|
|
@@ -153,7 +153,6 @@ const ShareAutosuggest = ({
|
|
|
153
153
|
<div className={styles['recipientsContainer']}>
|
|
154
154
|
{recipients.map((recipient, idx) => {
|
|
155
155
|
const isContactGroup = recipient._type === Group.doctype
|
|
156
|
-
const avatarText = getInitials(recipient)
|
|
157
156
|
const name = getDisplayName(recipient)
|
|
158
157
|
return (
|
|
159
158
|
<Chip
|
|
@@ -163,7 +162,7 @@ const ShareAutosuggest = ({
|
|
|
163
162
|
isContactGroup ? (
|
|
164
163
|
<GroupAvatar size="xs" color={recipient.color} />
|
|
165
164
|
) : (
|
|
166
|
-
<
|
|
165
|
+
<MemberAvatar size="xs" recipient={recipient} />
|
|
167
166
|
)
|
|
168
167
|
}
|
|
169
168
|
label={name}
|