cozy-sharing 33.6.0 → 34.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/OpenSharingLinkButton.js +1 -1
  3. package/dist/SharingProvider.spec.js +242 -113
  4. package/dist/actions/addToCozySharingLink.js +2 -3
  5. package/dist/actions/createCozySharingLink.js +2 -3
  6. package/dist/actions/shareNative.js +2 -3
  7. package/dist/actions/syncToCozySharingLink.js +2 -3
  8. package/dist/components/Avatar/AvatarList.js +2 -3
  9. package/dist/components/Avatar/GroupAvatar.js +2 -3
  10. package/dist/components/Recipient/GroupRecipientDetailWithoutAccess.js +2 -3
  11. package/dist/components/Recipient/GroupRecipientPermissions.js +2 -3
  12. package/dist/components/Recipient/LinkRecipient.js +2 -4
  13. package/dist/components/Recipient/LinkRecipientLite.js +2 -3
  14. package/dist/components/Recipient/MemberRecipientPermissions.js +2 -3
  15. package/dist/components/Recipient/actions/revokeLink.js +3 -4
  16. package/dist/components/ShareButton.js +4 -5
  17. package/dist/components/ShareByLink.js +5 -7
  18. package/dist/components/ShareRestrictionModal/BoxDate.js +2 -3
  19. package/dist/components/ShareRestrictionModal/BoxEditingRights.js +3 -5
  20. package/dist/components/ShareRestrictionModal/BoxPassword.js +3 -5
  21. package/dist/components/ShareRestrictionModal/ShareRestrictionModal.js +2 -3
  22. package/dist/components/SharedBadge.js +2 -3
  23. package/dist/components/SharedDrive/SharedDriveHeader.js +1 -1
  24. package/dist/helpers/sharings.js +4 -6
  25. package/dist/state.js +4 -3
  26. package/dist/state.spec.js +44 -27
  27. package/jest.config.js +3 -2
  28. package/jestHelpers/mocks/twake-icons.js +23 -0
  29. package/package.json +4 -2
  30. package/src/OpenSharingLinkButton.jsx +1 -1
  31. package/src/SharingProvider.spec.jsx +115 -1
  32. package/src/actions/addToCozySharingLink.js +2 -3
  33. package/src/actions/createCozySharingLink.js +2 -3
  34. package/src/actions/shareNative.js +2 -3
  35. package/src/actions/syncToCozySharingLink.js +2 -3
  36. package/src/components/Avatar/AvatarList.jsx +2 -3
  37. package/src/components/Avatar/GroupAvatar.jsx +2 -3
  38. package/src/components/Recipient/GroupRecipientDetailWithoutAccess.jsx +2 -3
  39. package/src/components/Recipient/GroupRecipientPermissions.jsx +2 -3
  40. package/src/components/Recipient/LinkRecipient.jsx +2 -4
  41. package/src/components/Recipient/LinkRecipientLite.jsx +2 -3
  42. package/src/components/Recipient/MemberRecipientPermissions.jsx +2 -3
  43. package/src/components/Recipient/actions/revokeLink.js +3 -4
  44. package/src/components/ShareButton.jsx +4 -5
  45. package/src/components/ShareByLink.jsx +5 -7
  46. package/src/components/ShareRestrictionModal/BoxDate.jsx +2 -3
  47. package/src/components/ShareRestrictionModal/BoxEditingRights.jsx +3 -5
  48. package/src/components/ShareRestrictionModal/BoxPassword.jsx +3 -5
  49. package/src/components/ShareRestrictionModal/ShareRestrictionModal.jsx +2 -3
  50. package/src/components/SharedBadge.jsx +2 -4
  51. package/src/components/SharedDrive/SharedDriveHeader.jsx +1 -1
  52. package/src/helpers/sharings.js +5 -6
  53. package/src/state.js +4 -12
  54. package/src/state.spec.js +63 -29
@@ -1,8 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import { Icon, CloudPlusOutlined } from '@linagora/twake-icons';
2
3
  import React, { forwardRef } from 'react';
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import CloudPlusOutlinedIcon from 'cozy-ui/transpiled/react/Icons/CloudPlusOutlined';
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
8
7
  import { openExternalLink } from '../helpers/sharings';
@@ -36,7 +35,7 @@ export var addToCozySharingLink = function addToCozySharingLink(_ref) {
36
35
  var label = t('Share.banner.add_to_mine', {
37
36
  smart_count: isShortLabel ? 1 : 2
38
37
  });
39
- var icon = CloudPlusOutlinedIcon;
38
+ var icon = CloudPlusOutlined;
40
39
  return {
41
40
  name: 'addToCozySharingLink',
42
41
  label: label,
@@ -1,8 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import { Icon, ToTheCloud } from '@linagora/twake-icons';
2
3
  import React, { forwardRef } from 'react';
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import ToTheCloudIcon from 'cozy-ui/transpiled/react/Icons/ToTheCloud';
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
8
7
  import { openExternalLink } from '../helpers/sharings';
@@ -35,7 +34,7 @@ export var createCozySharingLink = function createCozySharingLink(_ref) {
35
34
  var label = t('Share.create-cozy', {
36
35
  smart_count: isShortLabel ? 1 : 2
37
36
  });
38
- var icon = ToTheCloudIcon;
37
+ var icon = ToTheCloud;
39
38
  return {
40
39
  name: 'createCozySharingLink',
41
40
  label: label,
@@ -1,8 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import { Icon, Reply } from '@linagora/twake-icons';
2
3
  import React, { forwardRef } from 'react';
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import ReplyIcon from 'cozy-ui/transpiled/react/Icons/Reply';
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
8
7
  import { getActionsI18n } from '../hoc/withLocales';
@@ -29,7 +28,7 @@ export var shareNative = function shareNative(_ref) {
29
28
  t = _getActionsI18n.t;
30
29
 
31
30
  var label = t('Share.send');
32
- var icon = ReplyIcon;
31
+ var icon = Reply;
33
32
  return {
34
33
  name: 'shareNative',
35
34
  label: label,
@@ -1,8 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import { Icon, Sync } from '@linagora/twake-icons';
2
3
  import React, { forwardRef } from 'react';
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import SyncIcon from 'cozy-ui/transpiled/react/Icons/Sync';
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
8
7
  import { openExternalLink } from '../helpers/sharings';
@@ -35,7 +34,7 @@ export var syncToCozySharingLink = function syncToCozySharingLink(_ref) {
35
34
  var label = t('Share.banner.sync_to_mine', {
36
35
  smart_count: isShortLabel ? 1 : 2
37
36
  });
38
- var icon = SyncIcon;
37
+ var icon = Sync;
39
38
  return {
40
39
  name: 'syncToCozySharingLink',
41
40
  label: label,
@@ -1,10 +1,9 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import { Icon, Link } from '@linagora/twake-icons';
2
3
  import cx from 'classnames';
3
4
  import React from 'react';
4
5
  import { useClient } from 'cozy-client';
5
6
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
6
- import Icon from 'cozy-ui/transpiled/react/Icon';
7
- import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
8
7
  import { ExtraAvatar } from './ExtraAvatar';
9
8
  import { GroupAvatar } from './GroupAvatar';
10
9
  import { MemberAvatar } from './MemberAvatar';
@@ -77,7 +76,7 @@ var AvatarList = function AvatarList(_ref2) {
77
76
  innerBorder: true,
78
77
  size: size
79
78
  }, /*#__PURE__*/React.createElement(Icon, {
80
- icon: LinkIcon
79
+ icon: Link
81
80
  }))), hasExtraRecipients && /*#__PURE__*/React.createElement("span", {
82
81
  "data-testid": "AvatarList-plusX"
83
82
  }, /*#__PURE__*/React.createElement(ExtraAvatar, {
@@ -1,7 +1,6 @@
1
+ import { Icon, Team } from '@linagora/twake-icons';
1
2
  import React from 'react';
2
3
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
3
- import Icon from 'cozy-ui/transpiled/react/Icon';
4
- import TeamIcon from 'cozy-ui/transpiled/react/Icons/Team';
5
4
 
6
5
  var GroupAvatar = function GroupAvatar(_ref) {
7
6
  var size = _ref.size,
@@ -11,7 +10,7 @@ var GroupAvatar = function GroupAvatar(_ref) {
11
10
  className: className,
12
11
  border: true
13
12
  }, /*#__PURE__*/React.createElement(Icon, {
14
- icon: TeamIcon
13
+ icon: Team
15
14
  }));
16
15
  };
17
16
 
@@ -1,7 +1,6 @@
1
+ import { Icon, Forbidden } from '@linagora/twake-icons';
1
2
  import React from 'react';
2
3
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
3
- import Icon from 'cozy-ui/transpiled/react/Icon';
4
- import ForbiddenIcon from 'cozy-ui/transpiled/react/Icons/Forbidden';
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';
@@ -21,7 +20,7 @@ var GroupRecipientDetailWithoutAccess = function GroupRecipientDetailWithoutAcce
21
20
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Typography, {
22
21
  variant: "subtitle2"
23
22
  }, t('GroupRecipientDetail.withoutAccess.title')), /*#__PURE__*/React.createElement(List, null, withoutAccess.map(function (recipient) {
24
- var icon = recipient.status === 'revoked' ? ForbiddenIcon : null;
23
+ var icon = recipient.status === 'revoked' ? Forbidden : null;
25
24
  var defaultDisplayName = t(DEFAULT_DISPLAY_NAME);
26
25
  var name = getDisplayName(recipient, defaultDisplayName);
27
26
  return /*#__PURE__*/React.createElement(ListItem, {
@@ -1,14 +1,13 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
+ import { Icon, CrossCircleOutline } from '@linagora/twake-icons';
4
5
  import React, { useState, useRef } from 'react';
5
6
  import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu';
6
7
  import { makeActions } from 'cozy-ui/transpiled/react/ActionsMenu/Actions';
7
8
  import ActionsMenuMobileHeader from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuMobileHeader';
8
9
  import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton';
9
- import Icon from 'cozy-ui/transpiled/react/Icon';
10
10
  import IconButton from 'cozy-ui/transpiled/react/IconButton';
11
- import CrossCircleOutlineIcon from 'cozy-ui/transpiled/react/Icons/CrossCircleOutline';
12
11
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
13
12
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
14
13
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
@@ -127,7 +126,7 @@ var GroupRecipientPermissions = function GroupRecipientPermissions(_ref) {
127
126
  className: "u-ml-half",
128
127
  "aria-label": t('Share.members.revoke')
129
128
  }, /*#__PURE__*/React.createElement(Icon, {
130
- icon: CrossCircleOutlineIcon
129
+ icon: CrossCircleOutline
131
130
  }))));
132
131
  };
133
132
 
@@ -1,12 +1,10 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import { Icon, Gear, Link } from '@linagora/twake-icons';
2
3
  import PropTypes from 'prop-types';
3
4
  import React, { useState } from 'react';
4
5
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
5
6
  import Fade from 'cozy-ui/transpiled/react/Fade';
6
- import Icon from 'cozy-ui/transpiled/react/Icon';
7
7
  import IconButton from 'cozy-ui/transpiled/react/IconButton';
8
- import Gear from 'cozy-ui/transpiled/react/Icons/Gear';
9
- import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
10
8
  import ListItem from 'cozy-ui/transpiled/react/ListItem';
11
9
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
12
10
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
@@ -98,7 +96,7 @@ var LinkRecipient = function LinkRecipient(props) {
98
96
  border: true,
99
97
  innerBorder: true
100
98
  }, /*#__PURE__*/React.createElement(Icon, {
101
- icon: LinkIcon
99
+ icon: Link
102
100
  }))), isReadOnly ? /*#__PURE__*/React.createElement(LinkRecipientTextReadOnly, {
103
101
  textPrimary: textPrimary,
104
102
  textSecondary: textSecondary
@@ -1,8 +1,7 @@
1
+ import { Icon, Link } from '@linagora/twake-icons';
1
2
  import PropTypes from 'prop-types';
2
3
  import React from 'react';
3
4
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
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';
@@ -29,7 +28,7 @@ var LinkRecipientLite = function LinkRecipientLite(_ref) {
29
28
  border: true,
30
29
  innerBorder: true
31
30
  }, /*#__PURE__*/React.createElement(Icon, {
32
- icon: LinkIcon
31
+ icon: Link
33
32
  }))), /*#__PURE__*/React.createElement(ListItemText, {
34
33
  primary: t('Share.recipients.anyoneWithTheLink'),
35
34
  secondary: link
@@ -1,15 +1,14 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
+ import { Icon, CrossCircleOutline } from '@linagora/twake-icons';
4
5
  import React, { useState, useRef, useCallback } from 'react';
5
6
  import { useClient } from 'cozy-client';
6
7
  import minilog from 'cozy-minilog';
7
8
  import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu';
8
9
  import { makeActions } from 'cozy-ui/transpiled/react/ActionsMenu/Actions';
9
10
  import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton';
10
- import Icon from 'cozy-ui/transpiled/react/Icon';
11
11
  import IconButton from 'cozy-ui/transpiled/react/IconButton';
12
- import CrossCircleOutlineIcon from 'cozy-ui/transpiled/react/Icons/CrossCircleOutline';
13
12
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
14
13
  import Typography from 'cozy-ui/transpiled/react/Typography';
15
14
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
@@ -167,7 +166,7 @@ var MemberRecipientPermissions = function MemberRecipientPermissions(_ref) {
167
166
  className: "u-ml-half",
168
167
  "aria-label": t('Share.members.revoke')
169
168
  }, /*#__PURE__*/React.createElement(Icon, {
170
- icon: CrossCircleOutlineIcon
169
+ icon: CrossCircleOutline
171
170
  }))));
172
171
  };
173
172
 
@@ -1,8 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import { Icon, Trash } from '@linagora/twake-icons';
2
3
  import React, { forwardRef } from 'react';
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash';
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';
@@ -14,13 +13,13 @@ var revokeLink = function revokeLink(_ref) {
14
13
  return {
15
14
  name: 'revokeLink',
16
15
  label: title,
17
- icon: TrashIcon,
16
+ icon: Trash,
18
17
  action: handleRevocation,
19
18
  Component: /*#__PURE__*/forwardRef(function RevokeLinkItem(props, ref) {
20
19
  return /*#__PURE__*/React.createElement(ActionsMenuItem, _extends({}, props, {
21
20
  ref: ref
22
21
  }), /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Icon, {
23
- icon: TrashIcon,
22
+ icon: Trash,
24
23
  color: "var(--errorColor)"
25
24
  })), /*#__PURE__*/React.createElement(ListItemText, {
26
25
  primary: /*#__PURE__*/React.createElement(Typography, {
@@ -3,11 +3,10 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["label", "onClick", "className"],
4
4
  _excluded2 = ["label", "onClick", "className"],
5
5
  _excluded3 = ["label", "onClick", "className"];
6
+ import { Icon, Share } from '@linagora/twake-icons';
6
7
  import classNames from 'classnames';
7
8
  import React from 'react';
8
9
  import Button from 'cozy-ui/transpiled/react/Buttons';
9
- import Icon from 'cozy-ui/transpiled/react/Icon';
10
- import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share';
11
10
  var styles = {
12
11
  "coz-btn-shared": "button__coz-btn-shared___9MFbY",
13
12
  "coz-btn-sharedWithMe": "button__coz-btn-sharedWithMe___25PBh"
@@ -26,7 +25,7 @@ export var ShareButton = function ShareButton(_ref) {
26
25
  return _onClick();
27
26
  },
28
27
  startIcon: /*#__PURE__*/React.createElement(Icon, {
29
- icon: ShareIcon
28
+ icon: Share
30
29
  }),
31
30
  label: label
32
31
  }, props));
@@ -44,7 +43,7 @@ export var SharedByMeButton = function SharedByMeButton(_ref2) {
44
43
  return _onClick2();
45
44
  },
46
45
  icon: /*#__PURE__*/React.createElement(Icon, {
47
- icon: ShareIcon
46
+ icon: Share
48
47
  }),
49
48
  label: label
50
49
  }, props));
@@ -61,7 +60,7 @@ export var SharedWithMeButton = function SharedWithMeButton(_ref3) {
61
60
  return _onClick3();
62
61
  },
63
62
  startIcon: /*#__PURE__*/React.createElement(Icon, {
64
- icon: ShareIcon
63
+ icon: Share
65
64
  }),
66
65
  label: label
67
66
  }, props));
@@ -1,13 +1,11 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
+ import { Icon, Copy, Link } from '@linagora/twake-icons';
4
5
  import PropTypes from 'prop-types';
5
6
  import React, { useReducer, useState } from 'react';
6
7
  import { useClient } from 'cozy-client';
7
8
  import Button from 'cozy-ui/transpiled/react/Buttons';
8
- import Icon from 'cozy-ui/transpiled/react/Icon';
9
- import CopyIcon from 'cozy-ui/transpiled/react/Icons/Copy';
10
- import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
11
9
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
12
10
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
13
11
  import { useI18n } from 'twake-i18n';
@@ -284,13 +282,13 @@ var ShareByLink = function ShareByLink(_ref) {
284
282
  variant: "secondary",
285
283
  size: "medium",
286
284
  startIcon: /*#__PURE__*/React.createElement(Icon, {
287
- icon: LinkIcon
285
+ icon: Link
288
286
  }),
289
287
  onClick: shareLink,
290
288
  busy: isGenerating
291
289
  }), /*#__PURE__*/React.createElement(Button, {
292
290
  label: /*#__PURE__*/React.createElement(Icon, {
293
- icon: CopyIcon
291
+ icon: Copy
294
292
  }),
295
293
  variant: "secondary",
296
294
  size: "medium",
@@ -301,7 +299,7 @@ var ShareByLink = function ShareByLink(_ref) {
301
299
  variant: "secondary",
302
300
  size: "medium",
303
301
  startIcon: /*#__PURE__*/React.createElement(Icon, {
304
- icon: LinkIcon
302
+ icon: Link
305
303
  }),
306
304
  onClick: generateLinkAndCopyLinkToClipboard,
307
305
  busy: isGenerating
@@ -310,7 +308,7 @@ var ShareByLink = function ShareByLink(_ref) {
310
308
  variant: "secondary",
311
309
  size: "medium",
312
310
  startIcon: /*#__PURE__*/React.createElement(Icon, {
313
- icon: LinkIcon
311
+ icon: Link
314
312
  }),
315
313
  onClick: generateLinkSilently,
316
314
  busy: isGenerating
@@ -1,10 +1,9 @@
1
+ import { Icon, Calendar } from '@linagora/twake-icons';
1
2
  import { format } from 'date-fns';
2
3
  import PropTypes from 'prop-types';
3
4
  import React from 'react';
4
5
  import Box from 'cozy-ui/transpiled/react/Box';
5
6
  import DatePicker from 'cozy-ui/transpiled/react/DatePicker';
6
- import Icon from 'cozy-ui/transpiled/react/Icon';
7
- import CalendarIcon from 'cozy-ui/transpiled/react/Icons/Calendar';
8
7
  import List from 'cozy-ui/transpiled/react/List';
9
8
  import ListItem from 'cozy-ui/transpiled/react/ListItem';
10
9
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
@@ -44,7 +43,7 @@ export var BoxDate = function BoxDate(_ref) {
44
43
  return handleDateToggle(!toggle);
45
44
  }
46
45
  }, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Icon, {
47
- icon: CalendarIcon
46
+ icon: Calendar
48
47
  })), /*#__PURE__*/React.createElement(ListItemText, {
49
48
  primary: t('BoxDate.text')
50
49
  }), /*#__PURE__*/React.createElement(ListItemSecondaryAction, null, /*#__PURE__*/React.createElement(Switch, {
@@ -1,4 +1,5 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import { Icon, Bottom, People } from '@linagora/twake-icons';
2
3
  import PropTypes from 'prop-types';
3
4
  import React, { useReducer, useRef } from 'react';
4
5
  import { useClient } from 'cozy-client';
@@ -7,9 +8,6 @@ import flag from 'cozy-flags';
7
8
  import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu';
8
9
  import { makeActions } from 'cozy-ui/transpiled/react/ActionsMenu/Actions';
9
10
  import Box from 'cozy-ui/transpiled/react/Box';
10
- import Icon from 'cozy-ui/transpiled/react/Icon';
11
- import BottomIcon from 'cozy-ui/transpiled/react/Icons/Bottom';
12
- import PeopleIcon from 'cozy-ui/transpiled/react/Icons/People';
13
11
  import List from 'cozy-ui/transpiled/react/List';
14
12
  import ListItem from 'cozy-ui/transpiled/react/ListItem';
15
13
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
@@ -62,14 +60,14 @@ export var BoxEditingRights = function BoxEditingRights(_ref) {
62
60
  ellipsis: false,
63
61
  onClick: toggleMenuDisplayed
64
62
  }, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Icon, {
65
- icon: PeopleIcon
63
+ icon: People
66
64
  })), /*#__PURE__*/React.createElement(ListItemText, {
67
65
  primary: textPrimary,
68
66
  secondary: textSecondary
69
67
  }), /*#__PURE__*/React.createElement(ListItemIcon, {
70
68
  className: "u-mr-half"
71
69
  }, /*#__PURE__*/React.createElement(Icon, {
72
- icon: BottomIcon
70
+ icon: Bottom
73
71
  }))))), /*#__PURE__*/React.createElement(ActionsMenu, {
74
72
  ref: buttonRef,
75
73
  open: isMenuDisplayed,
@@ -2,13 +2,11 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _regeneratorRuntime from "@babel/runtime/regenerator";
5
+ import { Icon, Copy, Password } from '@linagora/twake-icons';
5
6
  import PropTypes from 'prop-types';
6
7
  import React, { useState } from 'react';
7
8
  import Box from 'cozy-ui/transpiled/react/Box';
8
- import Icon from 'cozy-ui/transpiled/react/Icon';
9
9
  import IconButton from 'cozy-ui/transpiled/react/IconButton';
10
- import CopyIcon from 'cozy-ui/transpiled/react/Icons/Copy';
11
- import PasswordIcon from 'cozy-ui/transpiled/react/Icons/Password';
12
10
  import List from 'cozy-ui/transpiled/react/List';
13
11
  import ListItem from 'cozy-ui/transpiled/react/ListItem';
14
12
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
@@ -108,7 +106,7 @@ export var BoxPassword = function BoxPassword(_ref) {
108
106
  return handlePasswordToggle(!toggle);
109
107
  }
110
108
  }, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Icon, {
111
- icon: PasswordIcon
109
+ icon: Password
112
110
  })), /*#__PURE__*/React.createElement(ListItemText, {
113
111
  primary: t('BoxPassword.text')
114
112
  }), /*#__PURE__*/React.createElement(ListItemSecondaryAction, null, /*#__PURE__*/React.createElement(Switch, {
@@ -141,7 +139,7 @@ export var BoxPassword = function BoxPassword(_ref) {
141
139
  endAdornment: /*#__PURE__*/React.createElement(IconButton, {
142
140
  onClick: handleCopy
143
141
  }, /*#__PURE__*/React.createElement(Icon, {
144
- icon: CopyIcon
142
+ icon: Copy
145
143
  }))
146
144
  },
147
145
  inputProps: inputProps
@@ -1,6 +1,7 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
+ import { Icon, Trash } from '@linagora/twake-icons';
4
5
  import { addDays } from 'date-fns';
5
6
  import PropTypes from 'prop-types';
6
7
  import React, { useState } from 'react';
@@ -8,8 +9,6 @@ import { generateWebLink, useClient } from 'cozy-client';
8
9
  import flag from 'cozy-flags';
9
10
  import Button from 'cozy-ui/transpiled/react/Buttons';
10
11
  import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
11
- import Icon from 'cozy-ui/transpiled/react/Icon';
12
- import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash';
13
12
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
14
13
  import { useI18n } from 'twake-i18n';
15
14
  import { ShareRestrictionContentModal } from './ShareRestrictionContentModal';
@@ -232,7 +231,7 @@ export var ShareRestrictionModal = function ShareRestrictionModal(_ref) {
232
231
  variant: "secondary",
233
232
  color: "error",
234
233
  startIcon: /*#__PURE__*/React.createElement(Icon, {
235
- icon: TrashIcon
234
+ icon: Trash
236
235
  }),
237
236
  onClick: handleRevokeLink,
238
237
  busy: loading
@@ -1,8 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import { Icon, Share } from '@linagora/twake-icons';
2
3
  import classNames from 'classnames';
3
4
  import React from 'react';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share';
6
5
  var styles = {
7
6
  "shared-badge": "badge__shared-badge___2jGsy",
8
7
  "--small": "badge__--small___2VMyY",
@@ -20,7 +19,7 @@ var SharedBadge = function SharedBadge(_ref) {
20
19
  return /*#__PURE__*/React.createElement("div", {
21
20
  className: classNames(styles['shared-badge'], className, _defineProperty({}, styles['--small'], small), _defineProperty({}, styles['--xsmall'], xsmall), styles[byMe ? '--by-me' : '--with-me'])
22
21
  }, /*#__PURE__*/React.createElement(Icon, {
23
- icon: ShareIcon,
22
+ icon: Share,
24
23
  color: "var(--primaryContrastTextColor)",
25
24
  className: styles['shared-badge-icon']
26
25
  }));
@@ -1,5 +1,5 @@
1
+ import { Icon } from '@linagora/twake-icons';
1
2
  import React from 'react';
2
- import Icon from 'cozy-ui/transpiled/react/Icon';
3
3
  import Typography from 'cozy-ui/transpiled/react/Typography';
4
4
 
5
5
  var SharedDriveIcon = function SharedDriveIcon(props) {
@@ -1,9 +1,7 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+ import { CloudPlusOutlined, Sync, ToTheCloud } from '@linagora/twake-icons';
3
4
  import { Q } from 'cozy-client';
4
- import CloudPlusOutlinedIcon from 'cozy-ui/transpiled/react/Icons/CloudPlusOutlined';
5
- import SyncIcon from 'cozy-ui/transpiled/react/Icons/Sync';
6
- import ToTheCloudIcon from 'cozy-ui/transpiled/react/Icons/ToTheCloud';
7
5
  import { fetchFilesPaths } from './files';
8
6
  import { updateInternalObjectFromRealtime, normalizeDocFromRealtime } from './realtime';
9
7
  import logger from '../logger';
@@ -135,7 +133,7 @@ export var getIconWithlabel = function getIconWithlabel(_ref4) {
135
133
 
136
134
  if (link === CREATE_COZY_HREF) {
137
135
  return {
138
- icon: ToTheCloudIcon,
136
+ icon: ToTheCloud,
139
137
  label: t('Share.create-cozy', {
140
138
  smart_count: isShortLabel ? 1 : 2
141
139
  })
@@ -144,7 +142,7 @@ export var getIconWithlabel = function getIconWithlabel(_ref4) {
144
142
 
145
143
  if (!isSharingShortcutCreated) {
146
144
  return {
147
- icon: CloudPlusOutlinedIcon,
145
+ icon: CloudPlusOutlined,
148
146
  label: t('Share.banner.add_to_mine', {
149
147
  smart_count: isShortLabel ? 1 : 2
150
148
  })
@@ -152,7 +150,7 @@ export var getIconWithlabel = function getIconWithlabel(_ref4) {
152
150
  }
153
151
 
154
152
  return {
155
- icon: SyncIcon,
153
+ icon: Sync,
156
154
  label: t('Share.banner.sync_to_mine', {
157
155
  smart_count: isShortLabel ? 1 : 2
158
156
  })
package/dist/state.js CHANGED
@@ -237,7 +237,7 @@ var byDocId = function byDocId() {
237
237
  case REVOKE_GROUP:
238
238
  case REVOKE_RECIPIENT:
239
239
  case UPDATE_SHARING:
240
- if (!isSharingADrive(action.sharing) && areAllRecipientsRevoked(action.sharing)) {
240
+ if (areAllRecipientsRevoked(action.sharing)) {
241
241
  return forgetSharing(state, action.sharing);
242
242
  }
243
243
 
@@ -337,7 +337,7 @@ var sharings = function sharings() {
337
337
  case UPDATE_SHARING:
338
338
  case REVOKE_GROUP:
339
339
  case REVOKE_RECIPIENT:
340
- if (!isSharingADrive(action.sharing) && areAllRecipientsRevoked(action.sharing)) {
340
+ if (areAllRecipientsRevoked(action.sharing)) {
341
341
  return state.filter(function (s) {
342
342
  return s.id !== action.sharing.id;
343
343
  });
@@ -374,7 +374,8 @@ var sharedPaths = function sharedPaths() {
374
374
 
375
375
  case REVOKE_GROUP:
376
376
  case REVOKE_RECIPIENT:
377
- if (!isSharingADrive(action.sharing) && areAllRecipientsRevoked(action.sharing)) {
377
+ case UPDATE_SHARING:
378
+ if (areAllRecipientsRevoked(action.sharing)) {
378
379
  return state.filter(function (p) {
379
380
  return p !== action.path;
380
381
  });