cozy-sharing 31.2.0 → 32.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 +12 -0
- package/dist/stylesheet.css +0 -8
- package/package.json +4 -5
- package/dist/components/SharedStatus.js +0 -61
- package/dist/components/SharedStatus.spec.js +0 -44
- package/dist/components/__snapshots__/SharedStatus.spec.js.snap +0 -94
- package/dist/propTypes.js +0 -26
- package/src/components/SharedStatus.jsx +0 -50
- package/src/components/SharedStatus.spec.js +0 -48
- package/src/components/__snapshots__/SharedStatus.spec.js.snap +0 -94
- package/src/propTypes.js +0 -29
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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
|
+
# [32.0.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@31.2.0...cozy-sharing@32.0.0) (2026-05-18)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- Remove unused propTypes.js ([299669c](https://github.com/cozy/cozy-libs/commit/299669c168b55bb8fe242b3879288bd79317a0c3))
|
|
11
|
+
- Removed unused SharedStatus ([e7a3b2b](https://github.com/cozy/cozy-libs/commit/e7a3b2b1cfd708a55691cbb54139cbe4458f1332))
|
|
12
|
+
- Update cozy-device-helper ([0ffd6d3](https://github.com/cozy/cozy-libs/commit/0ffd6d330f7760df623237d575175e159525361a))
|
|
13
|
+
|
|
14
|
+
### BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
- You need "cozy-device-helper": ">=4.0.0" for "cozy-sharing"
|
|
17
|
+
|
|
6
18
|
# [31.2.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@31.1.0...cozy-sharing@31.2.0) (2026-05-12)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/dist/stylesheet.css
CHANGED
|
@@ -480,14 +480,6 @@ input[type=text] {
|
|
|
480
480
|
.badge__shared-badge___2jGsy.badge__--with-me___3jW7R {
|
|
481
481
|
background-color: #9169f2;
|
|
482
482
|
}
|
|
483
|
-
/* imported from status.styl */
|
|
484
|
-
|
|
485
|
-
.status__shared-status___2HpyL {
|
|
486
|
-
display: flex;
|
|
487
|
-
}
|
|
488
|
-
.status__shared-status-label___1-jvS {
|
|
489
|
-
margin-right: 0.5rem;
|
|
490
|
-
}
|
|
491
483
|
/* imported from publicBanner.styl */
|
|
492
484
|
|
|
493
485
|
.publicBanner__bannermarkdown___1dR1E {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "32.0.0",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@cozy/minilog": "^1.0.0",
|
|
32
32
|
"classnames": "^2.5.1",
|
|
33
|
-
"cozy-device-helper": "^4.0.3",
|
|
34
33
|
"cozy-doctypes": "^1.99.1",
|
|
35
34
|
"date-fns": "2.30.0",
|
|
36
35
|
"lodash": "^4.17.21",
|
|
@@ -55,7 +54,7 @@
|
|
|
55
54
|
"babel-plugin-css-modules-transform": "1.6.2",
|
|
56
55
|
"babel-plugin-inline-react-svg": "1.1.2",
|
|
57
56
|
"cozy-client": "^60.24.0",
|
|
58
|
-
"cozy-device-helper": "^
|
|
57
|
+
"cozy-device-helper": "^4.0.0",
|
|
59
58
|
"cozy-intent": "^2.31.1",
|
|
60
59
|
"cozy-minilog": "^3.10.1",
|
|
61
60
|
"cozy-ui": "^138.1.0",
|
|
@@ -70,7 +69,7 @@
|
|
|
70
69
|
},
|
|
71
70
|
"peerDependencies": {
|
|
72
71
|
"cozy-client": ">=60.24.0",
|
|
73
|
-
"cozy-device-helper": ">=
|
|
72
|
+
"cozy-device-helper": ">=4.0.0",
|
|
74
73
|
"cozy-flags": ">=4.8.1",
|
|
75
74
|
"cozy-intent": ">=2.29.1",
|
|
76
75
|
"cozy-minilog": ">=3.9.1",
|
|
@@ -84,5 +83,5 @@
|
|
|
84
83
|
"sideEffects": [
|
|
85
84
|
"*.css"
|
|
86
85
|
],
|
|
87
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "53ee03b0d557f6092a4120a884ddc2e71888891a"
|
|
88
87
|
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import cx from 'classnames';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { useI18n } from 'twake-i18n';
|
|
4
|
-
import { SharingTooltip, TooltipRecipientList } from './Tooltip';
|
|
5
|
-
|
|
6
|
-
var LinkIcon = function LinkIcon(props) {
|
|
7
|
-
return /*#__PURE__*/React.createElement("svg", props, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("path", {
|
|
8
|
-
d: "M8.88 3.88a1 1 0 1 1-1.415-1.415L9.053.877A2.998 2.998 0 0 1 13.29.876l1.18 1.18a2.998 2.998 0 0 1-.007 4.24L10.999 9.76c-1.535 1.535-4.07 1.583-5.534.12A1 1 0 1 1 6.88 8.465c.67.67 1.94.646 2.705-.119l3.465-3.464a.998.998 0 0 0 .006-1.413l-1.18-1.18a.998.998 0 0 0-1.408.003L8.88 3.88zm-2.415 7.585A1 1 0 1 1 7.88 12.88l-1.587 1.587a2.998 2.998 0 0 1-4.237.002l-1.18-1.18a2.998 2.998 0 0 1 .007-4.24l3.464-3.464c1.534-1.535 4.07-1.583 5.533-.12A1 1 0 1 1 8.465 6.88c-.67-.67-1.94-.646-2.705.119l-3.464 3.464a.998.998 0 0 0-.006 1.413l1.18 1.18a.998.998 0 0 0 1.407-.003l1.588-1.588z",
|
|
9
|
-
id: "link-1-path-1"
|
|
10
|
-
})), /*#__PURE__*/React.createElement("use", {
|
|
11
|
-
fillRule: "nonzero",
|
|
12
|
-
xlinkHref: "#link-1-path-1"
|
|
13
|
-
}));
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
LinkIcon.defaultProps = {
|
|
17
|
-
width: "16",
|
|
18
|
-
height: "16",
|
|
19
|
-
viewBox: "0 0 16 16",
|
|
20
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
22
|
-
};
|
|
23
|
-
import { getDisplayName } from '../models';
|
|
24
|
-
var styles = {
|
|
25
|
-
"shared-status": "status__shared-status___2HpyL",
|
|
26
|
-
"shared-status-label": "status__shared-status-label___1-jvS"
|
|
27
|
-
};
|
|
28
|
-
export var SharedStatus = function SharedStatus(_ref) {
|
|
29
|
-
var className = _ref.className,
|
|
30
|
-
docId = _ref.docId,
|
|
31
|
-
recipients = _ref.recipients,
|
|
32
|
-
link = _ref.link;
|
|
33
|
-
|
|
34
|
-
var _useI18n = useI18n(),
|
|
35
|
-
t = _useI18n.t;
|
|
36
|
-
|
|
37
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
38
|
-
className: cx(className, styles['shared-status'])
|
|
39
|
-
}, recipients.length > 1 && /*#__PURE__*/React.createElement("a", {
|
|
40
|
-
"data-tip": true,
|
|
41
|
-
"data-for": "members".concat(docId),
|
|
42
|
-
className: styles['shared-status-label']
|
|
43
|
-
}, t('Share.members.count', {
|
|
44
|
-
smart_count: recipients.length
|
|
45
|
-
})), recipients.length > 1 && /*#__PURE__*/React.createElement(SharingTooltip, {
|
|
46
|
-
id: "members".concat(docId)
|
|
47
|
-
}, /*#__PURE__*/React.createElement(TooltipRecipientList, {
|
|
48
|
-
recipientNames: recipients.map(function (recipient) {
|
|
49
|
-
return getDisplayName(recipient);
|
|
50
|
-
})
|
|
51
|
-
})), link && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LinkIcon, {
|
|
52
|
-
style: {
|
|
53
|
-
fill: 'var(--iconTextColor)'
|
|
54
|
-
},
|
|
55
|
-
"data-tip": true,
|
|
56
|
-
"data-for": "linkfor".concat(docId)
|
|
57
|
-
}), /*#__PURE__*/React.createElement(SharingTooltip, {
|
|
58
|
-
id: "linkfor".concat(docId)
|
|
59
|
-
}, /*#__PURE__*/React.createElement("span", null, t('Files.share.sharedByLink')))));
|
|
60
|
-
};
|
|
61
|
-
export default SharedStatus;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { render } from '@testing-library/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { SharedStatus } from './SharedStatus';
|
|
4
|
-
import AppLike from '../../test/AppLike';
|
|
5
|
-
describe('SharedStatus component', function () {
|
|
6
|
-
it('should just render a span if no sharing', function () {
|
|
7
|
-
var _render = render( /*#__PURE__*/React.createElement(AppLike, null, /*#__PURE__*/React.createElement(SharedStatus, {
|
|
8
|
-
docId: "1",
|
|
9
|
-
recipients: []
|
|
10
|
-
}))),
|
|
11
|
-
container = _render.container;
|
|
12
|
-
|
|
13
|
-
expect(container).toMatchSnapshot();
|
|
14
|
-
});
|
|
15
|
-
it('should have the right display if there is several recipients', function () {
|
|
16
|
-
var _render2 = render( /*#__PURE__*/React.createElement(AppLike, null, /*#__PURE__*/React.createElement(SharedStatus, {
|
|
17
|
-
docId: "1",
|
|
18
|
-
recipients: [{
|
|
19
|
-
_id: 1,
|
|
20
|
-
name: '1'
|
|
21
|
-
}, {
|
|
22
|
-
_id: 2,
|
|
23
|
-
name: '2'
|
|
24
|
-
}]
|
|
25
|
-
}))),
|
|
26
|
-
container = _render2.container,
|
|
27
|
-
getByText = _render2.getByText;
|
|
28
|
-
|
|
29
|
-
expect(container).toMatchSnapshot();
|
|
30
|
-
expect(getByText('2 members')).toBeTruthy();
|
|
31
|
-
});
|
|
32
|
-
it('should display the link if there is a link', function () {
|
|
33
|
-
var _render3 = render( /*#__PURE__*/React.createElement(AppLike, null, /*#__PURE__*/React.createElement(SharedStatus, {
|
|
34
|
-
docId: "1",
|
|
35
|
-
recipients: [],
|
|
36
|
-
link: true
|
|
37
|
-
}))),
|
|
38
|
-
container = _render3.container,
|
|
39
|
-
getByText = _render3.getByText;
|
|
40
|
-
|
|
41
|
-
expect(container).toMatchSnapshot();
|
|
42
|
-
expect(getByText('Shared by link')).toBeTruthy();
|
|
43
|
-
});
|
|
44
|
-
});
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
-
|
|
3
|
-
exports[`SharedStatus component should display the link if there is a link 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="TwakeTheme--light u-dc"
|
|
7
|
-
>
|
|
8
|
-
<span
|
|
9
|
-
class="shared-status"
|
|
10
|
-
>
|
|
11
|
-
<svg
|
|
12
|
-
currentItem="false"
|
|
13
|
-
data-for="linkfor1"
|
|
14
|
-
data-tip="true"
|
|
15
|
-
height="16"
|
|
16
|
-
style="fill: var(--iconTextColor);"
|
|
17
|
-
viewBox="0 0 16 16"
|
|
18
|
-
width="16"
|
|
19
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
20
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
21
|
-
>
|
|
22
|
-
<defs>
|
|
23
|
-
<path
|
|
24
|
-
d="M8.88 3.88a1 1 0 1 1-1.415-1.415L9.053.877A2.998 2.998 0 0 1 13.29.876l1.18 1.18a2.998 2.998 0 0 1-.007 4.24L10.999 9.76c-1.535 1.535-4.07 1.583-5.534.12A1 1 0 1 1 6.88 8.465c.67.67 1.94.646 2.705-.119l3.465-3.464a.998.998 0 0 0 .006-1.413l-1.18-1.18a.998.998 0 0 0-1.408.003L8.88 3.88zm-2.415 7.585A1 1 0 1 1 7.88 12.88l-1.587 1.587a2.998 2.998 0 0 1-4.237.002l-1.18-1.18a2.998 2.998 0 0 1 .007-4.24l3.464-3.464c1.534-1.535 4.07-1.583 5.533-.12A1 1 0 1 1 8.465 6.88c-.67-.67-1.94-.646-2.705.119l-3.464 3.464a.998.998 0 0 0-.006 1.413l1.18 1.18a.998.998 0 0 0 1.407-.003l1.588-1.588z"
|
|
25
|
-
id="link-1-path-1"
|
|
26
|
-
/>
|
|
27
|
-
</defs>
|
|
28
|
-
<use
|
|
29
|
-
fill-rule="nonzero"
|
|
30
|
-
xlink:href="#link-1-path-1"
|
|
31
|
-
/>
|
|
32
|
-
</svg>
|
|
33
|
-
<div
|
|
34
|
-
class="__react_component_tooltip place-bottom type-dark "
|
|
35
|
-
data-id="tooltip"
|
|
36
|
-
id="linkfor1"
|
|
37
|
-
>
|
|
38
|
-
<span>
|
|
39
|
-
Shared by link
|
|
40
|
-
</span>
|
|
41
|
-
</div>
|
|
42
|
-
</span>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
`;
|
|
46
|
-
|
|
47
|
-
exports[`SharedStatus component should have the right display if there is several recipients 1`] = `
|
|
48
|
-
<div>
|
|
49
|
-
<div
|
|
50
|
-
class="TwakeTheme--light u-dc"
|
|
51
|
-
>
|
|
52
|
-
<span
|
|
53
|
-
class="shared-status"
|
|
54
|
-
>
|
|
55
|
-
<a
|
|
56
|
-
class="shared-status-label"
|
|
57
|
-
currentitem="false"
|
|
58
|
-
data-for="members1"
|
|
59
|
-
data-tip="true"
|
|
60
|
-
>
|
|
61
|
-
2 members
|
|
62
|
-
</a>
|
|
63
|
-
<div
|
|
64
|
-
class="__react_component_tooltip place-bottom type-dark "
|
|
65
|
-
data-id="tooltip"
|
|
66
|
-
id="members1"
|
|
67
|
-
>
|
|
68
|
-
<ul
|
|
69
|
-
class="shared-tooltip-list"
|
|
70
|
-
>
|
|
71
|
-
<li>
|
|
72
|
-
1
|
|
73
|
-
</li>
|
|
74
|
-
<li>
|
|
75
|
-
2
|
|
76
|
-
</li>
|
|
77
|
-
</ul>
|
|
78
|
-
</div>
|
|
79
|
-
</span>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
`;
|
|
83
|
-
|
|
84
|
-
exports[`SharedStatus component should just render a span if no sharing 1`] = `
|
|
85
|
-
<div>
|
|
86
|
-
<div
|
|
87
|
-
class="TwakeTheme--light u-dc"
|
|
88
|
-
>
|
|
89
|
-
<span
|
|
90
|
-
class="shared-status"
|
|
91
|
-
/>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
`;
|
package/dist/propTypes.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
import { Contact, Group } from './models';
|
|
3
|
-
export var contactsResponseType = PropTypes.shape({
|
|
4
|
-
count: PropTypes.number,
|
|
5
|
-
data: PropTypes.arrayOf(Contact.propType),
|
|
6
|
-
definition: PropTypes.object,
|
|
7
|
-
fetchMore: PropTypes.func,
|
|
8
|
-
fetchStatus: PropTypes.string,
|
|
9
|
-
hasMore: PropTypes.bool,
|
|
10
|
-
id: PropTypes.string,
|
|
11
|
-
lastError: PropTypes.string,
|
|
12
|
-
lastFetch: PropTypes.number,
|
|
13
|
-
lastUpdate: PropTypes.number
|
|
14
|
-
});
|
|
15
|
-
export var contactGroupsResponseType = PropTypes.shape({
|
|
16
|
-
count: PropTypes.number,
|
|
17
|
-
data: PropTypes.arrayOf(Group.propType),
|
|
18
|
-
definition: PropTypes.object,
|
|
19
|
-
fetchMore: PropTypes.func,
|
|
20
|
-
fetchStatus: PropTypes.string,
|
|
21
|
-
hasMore: PropTypes.bool,
|
|
22
|
-
id: PropTypes.string,
|
|
23
|
-
lastError: PropTypes.string,
|
|
24
|
-
lastFetch: PropTypes.number,
|
|
25
|
-
lastUpdate: PropTypes.number
|
|
26
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import cx from 'classnames'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
|
|
4
|
-
import { useI18n } from 'twake-i18n'
|
|
5
|
-
|
|
6
|
-
import { SharingTooltip, TooltipRecipientList } from './Tooltip'
|
|
7
|
-
import LinkIcon from '../assets/icons/icon-link.svg'
|
|
8
|
-
import { getDisplayName } from '../models'
|
|
9
|
-
import styles from '../styles/status.styl'
|
|
10
|
-
|
|
11
|
-
export const SharedStatus = ({ className, docId, recipients, link }) => {
|
|
12
|
-
const { t } = useI18n()
|
|
13
|
-
return (
|
|
14
|
-
<span className={cx(className, styles['shared-status'])}>
|
|
15
|
-
{recipients.length > 1 && (
|
|
16
|
-
<a
|
|
17
|
-
data-tip
|
|
18
|
-
data-for={`members${docId}`}
|
|
19
|
-
className={styles['shared-status-label']}
|
|
20
|
-
>
|
|
21
|
-
{t('Share.members.count', { smart_count: recipients.length })}
|
|
22
|
-
</a>
|
|
23
|
-
)}
|
|
24
|
-
{recipients.length > 1 && (
|
|
25
|
-
<SharingTooltip id={`members${docId}`}>
|
|
26
|
-
<TooltipRecipientList
|
|
27
|
-
recipientNames={recipients.map(recipient =>
|
|
28
|
-
getDisplayName(recipient)
|
|
29
|
-
)}
|
|
30
|
-
/>
|
|
31
|
-
</SharingTooltip>
|
|
32
|
-
)}
|
|
33
|
-
{link && (
|
|
34
|
-
<>
|
|
35
|
-
<LinkIcon
|
|
36
|
-
style={{ fill: 'var(--iconTextColor)' }}
|
|
37
|
-
data-tip
|
|
38
|
-
data-for={`linkfor${docId}`}
|
|
39
|
-
/>
|
|
40
|
-
|
|
41
|
-
<SharingTooltip id={`linkfor${docId}`}>
|
|
42
|
-
<span>{t('Files.share.sharedByLink')}</span>
|
|
43
|
-
</SharingTooltip>
|
|
44
|
-
</>
|
|
45
|
-
)}
|
|
46
|
-
</span>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export default SharedStatus
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { render } from '@testing-library/react'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
|
|
4
|
-
import { SharedStatus } from './SharedStatus'
|
|
5
|
-
import AppLike from '../../test/AppLike'
|
|
6
|
-
|
|
7
|
-
describe('SharedStatus component', () => {
|
|
8
|
-
it('should just render a span if no sharing', () => {
|
|
9
|
-
const { container } = render(
|
|
10
|
-
<AppLike>
|
|
11
|
-
<SharedStatus docId="1" recipients={[]} />
|
|
12
|
-
</AppLike>
|
|
13
|
-
)
|
|
14
|
-
expect(container).toMatchSnapshot()
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
it('should have the right display if there is several recipients', () => {
|
|
18
|
-
const { container, getByText } = render(
|
|
19
|
-
<AppLike>
|
|
20
|
-
<SharedStatus
|
|
21
|
-
docId="1"
|
|
22
|
-
recipients={[
|
|
23
|
-
{
|
|
24
|
-
_id: 1,
|
|
25
|
-
name: '1'
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
_id: 2,
|
|
29
|
-
name: '2'
|
|
30
|
-
}
|
|
31
|
-
]}
|
|
32
|
-
/>
|
|
33
|
-
</AppLike>
|
|
34
|
-
)
|
|
35
|
-
expect(container).toMatchSnapshot()
|
|
36
|
-
expect(getByText('2 members')).toBeTruthy()
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
it('should display the link if there is a link', () => {
|
|
40
|
-
const { container, getByText } = render(
|
|
41
|
-
<AppLike>
|
|
42
|
-
<SharedStatus docId="1" recipients={[]} link={true} />
|
|
43
|
-
</AppLike>
|
|
44
|
-
)
|
|
45
|
-
expect(container).toMatchSnapshot()
|
|
46
|
-
expect(getByText('Shared by link')).toBeTruthy()
|
|
47
|
-
})
|
|
48
|
-
})
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
-
|
|
3
|
-
exports[`SharedStatus component should display the link if there is a link 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="TwakeTheme--light u-dc"
|
|
7
|
-
>
|
|
8
|
-
<span
|
|
9
|
-
class="shared-status"
|
|
10
|
-
>
|
|
11
|
-
<svg
|
|
12
|
-
currentItem="false"
|
|
13
|
-
data-for="linkfor1"
|
|
14
|
-
data-tip="true"
|
|
15
|
-
height="16"
|
|
16
|
-
style="fill: var(--iconTextColor);"
|
|
17
|
-
viewBox="0 0 16 16"
|
|
18
|
-
width="16"
|
|
19
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
20
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
21
|
-
>
|
|
22
|
-
<defs>
|
|
23
|
-
<path
|
|
24
|
-
d="M8.88 3.88a1 1 0 1 1-1.415-1.415L9.053.877A2.998 2.998 0 0 1 13.29.876l1.18 1.18a2.998 2.998 0 0 1-.007 4.24L10.999 9.76c-1.535 1.535-4.07 1.583-5.534.12A1 1 0 1 1 6.88 8.465c.67.67 1.94.646 2.705-.119l3.465-3.464a.998.998 0 0 0 .006-1.413l-1.18-1.18a.998.998 0 0 0-1.408.003L8.88 3.88zm-2.415 7.585A1 1 0 1 1 7.88 12.88l-1.587 1.587a2.998 2.998 0 0 1-4.237.002l-1.18-1.18a2.998 2.998 0 0 1 .007-4.24l3.464-3.464c1.534-1.535 4.07-1.583 5.533-.12A1 1 0 1 1 8.465 6.88c-.67-.67-1.94-.646-2.705.119l-3.464 3.464a.998.998 0 0 0-.006 1.413l1.18 1.18a.998.998 0 0 0 1.407-.003l1.588-1.588z"
|
|
25
|
-
id="link-1-path-1"
|
|
26
|
-
/>
|
|
27
|
-
</defs>
|
|
28
|
-
<use
|
|
29
|
-
fill-rule="nonzero"
|
|
30
|
-
xlink:href="#link-1-path-1"
|
|
31
|
-
/>
|
|
32
|
-
</svg>
|
|
33
|
-
<div
|
|
34
|
-
class="__react_component_tooltip place-bottom type-dark "
|
|
35
|
-
data-id="tooltip"
|
|
36
|
-
id="linkfor1"
|
|
37
|
-
>
|
|
38
|
-
<span>
|
|
39
|
-
Shared by link
|
|
40
|
-
</span>
|
|
41
|
-
</div>
|
|
42
|
-
</span>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
`;
|
|
46
|
-
|
|
47
|
-
exports[`SharedStatus component should have the right display if there is several recipients 1`] = `
|
|
48
|
-
<div>
|
|
49
|
-
<div
|
|
50
|
-
class="TwakeTheme--light u-dc"
|
|
51
|
-
>
|
|
52
|
-
<span
|
|
53
|
-
class="shared-status"
|
|
54
|
-
>
|
|
55
|
-
<a
|
|
56
|
-
class="shared-status-label"
|
|
57
|
-
currentitem="false"
|
|
58
|
-
data-for="members1"
|
|
59
|
-
data-tip="true"
|
|
60
|
-
>
|
|
61
|
-
2 members
|
|
62
|
-
</a>
|
|
63
|
-
<div
|
|
64
|
-
class="__react_component_tooltip place-bottom type-dark "
|
|
65
|
-
data-id="tooltip"
|
|
66
|
-
id="members1"
|
|
67
|
-
>
|
|
68
|
-
<ul
|
|
69
|
-
class="shared-tooltip-list"
|
|
70
|
-
>
|
|
71
|
-
<li>
|
|
72
|
-
1
|
|
73
|
-
</li>
|
|
74
|
-
<li>
|
|
75
|
-
2
|
|
76
|
-
</li>
|
|
77
|
-
</ul>
|
|
78
|
-
</div>
|
|
79
|
-
</span>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
`;
|
|
83
|
-
|
|
84
|
-
exports[`SharedStatus component should just render a span if no sharing 1`] = `
|
|
85
|
-
<div>
|
|
86
|
-
<div
|
|
87
|
-
class="TwakeTheme--light u-dc"
|
|
88
|
-
>
|
|
89
|
-
<span
|
|
90
|
-
class="shared-status"
|
|
91
|
-
/>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
`;
|
package/src/propTypes.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types'
|
|
2
|
-
|
|
3
|
-
import { Contact, Group } from './models'
|
|
4
|
-
|
|
5
|
-
export const contactsResponseType = PropTypes.shape({
|
|
6
|
-
count: PropTypes.number,
|
|
7
|
-
data: PropTypes.arrayOf(Contact.propType),
|
|
8
|
-
definition: PropTypes.object,
|
|
9
|
-
fetchMore: PropTypes.func,
|
|
10
|
-
fetchStatus: PropTypes.string,
|
|
11
|
-
hasMore: PropTypes.bool,
|
|
12
|
-
id: PropTypes.string,
|
|
13
|
-
lastError: PropTypes.string,
|
|
14
|
-
lastFetch: PropTypes.number,
|
|
15
|
-
lastUpdate: PropTypes.number
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
export const contactGroupsResponseType = PropTypes.shape({
|
|
19
|
-
count: PropTypes.number,
|
|
20
|
-
data: PropTypes.arrayOf(Group.propType),
|
|
21
|
-
definition: PropTypes.object,
|
|
22
|
-
fetchMore: PropTypes.func,
|
|
23
|
-
fetchStatus: PropTypes.string,
|
|
24
|
-
hasMore: PropTypes.bool,
|
|
25
|
-
id: PropTypes.string,
|
|
26
|
-
lastError: PropTypes.string,
|
|
27
|
-
lastFetch: PropTypes.number,
|
|
28
|
-
lastUpdate: PropTypes.number
|
|
29
|
-
})
|