cozy-sharing 37.6.1 → 37.6.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
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.6.2](https://github.com/cozy/cozy-libs/compare/cozy-sharing@37.6.1...cozy-sharing@37.6.2) (2026-09-14)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package cozy-sharing
|
|
9
|
+
|
|
6
10
|
## [37.6.1](https://github.com/cozy/cozy-libs/compare/cozy-sharing@37.6.0...cozy-sharing@37.6.1) (2026-09-10)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package cozy-sharing
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import { useI18n } from 'twake-i18n';
|
|
3
3
|
import Identity from './Identity';
|
|
4
4
|
import { getDisplayName } from '../../models';
|
|
5
5
|
var styles = {
|
|
@@ -17,9 +17,12 @@ var styles = {
|
|
|
17
17
|
};
|
|
18
18
|
import { ExtraAvatar } from '../Avatar/ExtraAvatar';
|
|
19
19
|
|
|
20
|
-
var ExtraIdentity = function ExtraIdentity(_ref
|
|
20
|
+
var ExtraIdentity = function ExtraIdentity(_ref) {
|
|
21
21
|
var extraRecipients = _ref.extraRecipients;
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
var _useI18n = useI18n(),
|
|
24
|
+
t = _useI18n.t;
|
|
25
|
+
|
|
23
26
|
return /*#__PURE__*/React.createElement("div", {
|
|
24
27
|
className: styles['recipient']
|
|
25
28
|
}, /*#__PURE__*/React.createElement(ExtraAvatar, {
|
|
@@ -33,7 +36,4 @@ var ExtraIdentity = function ExtraIdentity(_ref, _ref2) {
|
|
|
33
36
|
})));
|
|
34
37
|
};
|
|
35
38
|
|
|
36
|
-
ExtraIdentity.contextTypes = {
|
|
37
|
-
t: PropTypes.func.isRequired
|
|
38
|
-
};
|
|
39
39
|
export { ExtraIdentity };
|
|
@@ -1,31 +1,8 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
8
|
-
|
|
9
|
-
function _callSuper(_this, derived, args) {
|
|
10
|
-
function isNativeReflectConstruct() {
|
|
11
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
12
|
-
if (Reflect.construct.sham) return false;
|
|
13
|
-
if (typeof Proxy === "function") return true;
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
17
|
-
} catch (e) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
derived = _getPrototypeOf(derived);
|
|
23
|
-
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
24
|
-
}
|
|
25
|
-
|
|
26
2
|
import PropTypes from 'prop-types';
|
|
27
3
|
import React from 'react';
|
|
28
4
|
import ReactTooltip from 'react-tooltip';
|
|
5
|
+
import { useI18n } from 'twake-i18n';
|
|
29
6
|
var styles = {
|
|
30
7
|
"shared-tooltip": "tooltip__shared-tooltip___7Dys3",
|
|
31
8
|
"shared-tooltip-list": "tooltip__shared-tooltip-list___jD5hi"
|
|
@@ -38,40 +15,23 @@ export var SharingTooltip = function SharingTooltip(props) {
|
|
|
38
15
|
}, props), props.children);
|
|
39
16
|
}; // accepts all the props from https://github.com/wwayne/react-tooltip#options
|
|
40
17
|
|
|
41
|
-
export var TooltipRecipientList =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return /*#__PURE__*/React.createElement("ul", {
|
|
59
|
-
className: styles['shared-tooltip-list']
|
|
60
|
-
}, recipientNames.slice(0, cutoff).map(function (name, i) {
|
|
61
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
62
|
-
key: "key_name_".concat(name, "_").concat(i)
|
|
63
|
-
}, name);
|
|
64
|
-
}), recipientNames.length > cutoff && /*#__PURE__*/React.createElement("li", null, t('Share.members.others', {
|
|
65
|
-
smart_count: recipientNames.slice(cutoff).length
|
|
66
|
-
})));
|
|
67
|
-
}
|
|
68
|
-
}]);
|
|
69
|
-
}(React.Component);
|
|
70
|
-
|
|
71
|
-
_defineProperty(TooltipRecipientList, "contextTypes", {
|
|
72
|
-
t: PropTypes.func.isRequired
|
|
73
|
-
});
|
|
74
|
-
|
|
18
|
+
export var TooltipRecipientList = function TooltipRecipientList(_ref) {
|
|
19
|
+
var recipientNames = _ref.recipientNames,
|
|
20
|
+
cutoff = _ref.cutoff;
|
|
21
|
+
|
|
22
|
+
var _useI18n = useI18n(),
|
|
23
|
+
t = _useI18n.t;
|
|
24
|
+
|
|
25
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
26
|
+
className: styles['shared-tooltip-list']
|
|
27
|
+
}, recipientNames.slice(0, cutoff).map(function (name, i) {
|
|
28
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
29
|
+
key: "key_name_".concat(name, "_").concat(i)
|
|
30
|
+
}, name);
|
|
31
|
+
}), recipientNames.length > cutoff && /*#__PURE__*/React.createElement("li", null, t('Share.members.others', {
|
|
32
|
+
smart_count: recipientNames.slice(cutoff).length
|
|
33
|
+
})));
|
|
34
|
+
};
|
|
75
35
|
TooltipRecipientList.propTypes = {
|
|
76
36
|
recipientNames: PropTypes.arrayOf(PropTypes.string),
|
|
77
37
|
cutoff: PropTypes.number
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "37.6.
|
|
3
|
+
"version": "37.6.2",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -59,14 +59,14 @@
|
|
|
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": "^13.0.
|
|
62
|
+
"cozy-ui-plus": "^13.0.1",
|
|
63
63
|
"jest": "30.3.0",
|
|
64
64
|
"jest-environment-jsdom": "30.3.0",
|
|
65
65
|
"react": "16.12.0",
|
|
66
66
|
"react-dom": "16.13.0",
|
|
67
67
|
"react-router": "^5.0.1",
|
|
68
68
|
"storybook": "7.6.0",
|
|
69
|
-
"twake-i18n": "^0.
|
|
69
|
+
"twake-i18n": "^0.5.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@linagora/twake-icons": ">=2.6.6",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"sideEffects": [
|
|
86
86
|
"*.css"
|
|
87
87
|
],
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "1e26037833a2fc579309c5f87ef613b03f6f2515"
|
|
89
89
|
}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import PropTypes from 'prop-types'
|
|
2
1
|
import React from 'react'
|
|
3
2
|
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
4
|
+
|
|
4
5
|
import Identity from './Identity'
|
|
5
6
|
import { getDisplayName } from '../../models'
|
|
6
7
|
import styles from '../../styles/recipient.styl'
|
|
7
8
|
import { ExtraAvatar } from '../Avatar/ExtraAvatar'
|
|
8
9
|
|
|
9
|
-
const ExtraIdentity = ({ extraRecipients }
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
name={t('Share.members.otherContacts', extraRecipients.length)}
|
|
10
|
+
const ExtraIdentity = ({ extraRecipients }) => {
|
|
11
|
+
const { t } = useI18n()
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div className={styles['recipient']}>
|
|
15
|
+
<ExtraAvatar
|
|
16
|
+
extraRecipients={extraRecipients.map(recipient =>
|
|
17
|
+
getDisplayName(recipient)
|
|
18
|
+
)}
|
|
19
19
|
/>
|
|
20
|
+
<div className={styles['recipient-ident-status']}>
|
|
21
|
+
<Identity
|
|
22
|
+
name={t('Share.members.otherContacts', extraRecipients.length)}
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
20
25
|
</div>
|
|
21
|
-
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
ExtraIdentity.contextTypes = {
|
|
25
|
-
t: PropTypes.func.isRequired
|
|
26
|
+
)
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export { ExtraIdentity }
|
|
@@ -2,6 +2,8 @@ import PropTypes from 'prop-types'
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import ReactTooltip from 'react-tooltip'
|
|
4
4
|
|
|
5
|
+
import { useI18n } from 'twake-i18n'
|
|
6
|
+
|
|
5
7
|
import styles from '../styles/tooltip.styl'
|
|
6
8
|
|
|
7
9
|
export const SharingTooltip = props => (
|
|
@@ -16,29 +18,23 @@ export const SharingTooltip = props => (
|
|
|
16
18
|
)
|
|
17
19
|
// accepts all the props from https://github.com/wwayne/react-tooltip#options
|
|
18
20
|
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
t: PropTypes.func.isRequired
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
const { t } = this.context
|
|
25
|
-
const { recipientNames, cutoff = 4 } = this.props
|
|
21
|
+
export const TooltipRecipientList = ({ recipientNames, cutoff }) => {
|
|
22
|
+
const { t } = useI18n()
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
24
|
+
return (
|
|
25
|
+
<ul className={styles['shared-tooltip-list']}>
|
|
26
|
+
{recipientNames.slice(0, cutoff).map((name, i) => (
|
|
27
|
+
<li key={`key_name_${name}_${i}`}>{name}</li>
|
|
28
|
+
))}
|
|
29
|
+
{recipientNames.length > cutoff && (
|
|
30
|
+
<li>
|
|
31
|
+
{t('Share.members.others', {
|
|
32
|
+
smart_count: recipientNames.slice(cutoff).length
|
|
33
|
+
})}
|
|
34
|
+
</li>
|
|
35
|
+
)}
|
|
36
|
+
</ul>
|
|
37
|
+
)
|
|
42
38
|
}
|
|
43
39
|
|
|
44
40
|
TooltipRecipientList.propTypes = {
|