cozy-sharing 33.1.0 → 33.1.1
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
|
+
## [33.1.1](https://github.com/cozy/cozy-libs/compare/cozy-sharing@33.1.0...cozy-sharing@33.1.1) (2026-06-04)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **cozy-sharing:** Memoize ShareByEmail section in SharedDriveForm ([2ea5eb2](https://github.com/cozy/cozy-libs/commit/2ea5eb2a8d37eec582212b07b8617c36fd107930))
|
|
11
|
+
|
|
6
12
|
# [33.1.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@33.0.2...cozy-sharing@33.1.0) (2026-06-04)
|
|
7
13
|
|
|
8
14
|
### Features
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { memo } from 'react';
|
|
3
3
|
import Button from 'cozy-ui/transpiled/react/Buttons';
|
|
4
4
|
import TextField from 'cozy-ui/transpiled/react/TextField';
|
|
5
5
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
@@ -9,9 +9,23 @@ import withLocales from '../../hoc/withLocales';
|
|
|
9
9
|
import { default as DumbShareByEmail } from '../ShareByEmail';
|
|
10
10
|
import SharedDriveHeader from './SharedDriveHeader';
|
|
11
11
|
import { useSharedDrive } from './useSharedDrive';
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
12
|
+
var ShareByEmailSection = /*#__PURE__*/memo(function ShareByEmailSection(_ref) {
|
|
13
|
+
var pendingRecipients = _ref.pendingRecipients,
|
|
14
|
+
setPendingRecipients = _ref.setPendingRecipients,
|
|
15
|
+
selectedOption = _ref.selectedOption,
|
|
16
|
+
setSelectedOption = _ref.setSelectedOption;
|
|
17
|
+
return /*#__PURE__*/React.createElement(DumbShareByEmail, {
|
|
18
|
+
currentRecipients: [],
|
|
19
|
+
documentType: "Files",
|
|
20
|
+
pendingRecipients: pendingRecipients,
|
|
21
|
+
onPendingRecipientsChange: setPendingRecipients,
|
|
22
|
+
selectedOption: selectedOption,
|
|
23
|
+
onSelectedOptionChange: setSelectedOption
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
export var SharedDriveForm = withLocales(function (_ref2) {
|
|
27
|
+
var onSuccess = _ref2.onSuccess,
|
|
28
|
+
onCancel = _ref2.onCancel;
|
|
15
29
|
|
|
16
30
|
var _useI18n = useI18n(),
|
|
17
31
|
t = _useI18n.t;
|
|
@@ -44,13 +58,11 @@ export var SharedDriveForm = withLocales(function (_ref) {
|
|
|
44
58
|
}), /*#__PURE__*/React.createElement(Typography, {
|
|
45
59
|
variant: "h6",
|
|
46
60
|
className: "u-mb-half"
|
|
47
|
-
}, t('Share.contacts.addUsers')), /*#__PURE__*/React.createElement(
|
|
48
|
-
currentRecipients: [],
|
|
49
|
-
documentType: "Files",
|
|
61
|
+
}, t('Share.contacts.addUsers')), /*#__PURE__*/React.createElement(ShareByEmailSection, {
|
|
50
62
|
pendingRecipients: pendingRecipients,
|
|
51
|
-
|
|
63
|
+
setPendingRecipients: setPendingRecipients,
|
|
52
64
|
selectedOption: selectedOption,
|
|
53
|
-
|
|
65
|
+
setSelectedOption: setSelectedOption
|
|
54
66
|
})), /*#__PURE__*/React.createElement("div", {
|
|
55
67
|
className: "u-flex u-ph-2 u-pv-1"
|
|
56
68
|
}, /*#__PURE__*/React.createElement(Button, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "33.1.
|
|
3
|
+
"version": "33.1.1",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"sideEffects": [
|
|
84
84
|
"*.css"
|
|
85
85
|
],
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "a6e1d756c4f41496383878fd9ce59afbb443f5b7"
|
|
87
87
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
|
-
import React from 'react'
|
|
2
|
+
import React, { memo } from 'react'
|
|
3
3
|
|
|
4
4
|
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
5
5
|
import TextField from 'cozy-ui/transpiled/react/TextField'
|
|
@@ -12,6 +12,24 @@ import { default as DumbShareByEmail } from '../ShareByEmail'
|
|
|
12
12
|
import SharedDriveHeader from './SharedDriveHeader'
|
|
13
13
|
import { useSharedDrive } from './useSharedDrive'
|
|
14
14
|
|
|
15
|
+
const ShareByEmailSection = memo(function ShareByEmailSection({
|
|
16
|
+
pendingRecipients,
|
|
17
|
+
setPendingRecipients,
|
|
18
|
+
selectedOption,
|
|
19
|
+
setSelectedOption
|
|
20
|
+
}) {
|
|
21
|
+
return (
|
|
22
|
+
<DumbShareByEmail
|
|
23
|
+
currentRecipients={[]}
|
|
24
|
+
documentType="Files"
|
|
25
|
+
pendingRecipients={pendingRecipients}
|
|
26
|
+
onPendingRecipientsChange={setPendingRecipients}
|
|
27
|
+
selectedOption={selectedOption}
|
|
28
|
+
onSelectedOptionChange={setSelectedOption}
|
|
29
|
+
/>
|
|
30
|
+
)
|
|
31
|
+
})
|
|
32
|
+
|
|
15
33
|
export const SharedDriveForm = withLocales(({ onSuccess, onCancel }) => {
|
|
16
34
|
const { t } = useI18n()
|
|
17
35
|
const {
|
|
@@ -41,13 +59,11 @@ export const SharedDriveForm = withLocales(({ onSuccess, onCancel }) => {
|
|
|
41
59
|
<Typography variant="h6" className="u-mb-half">
|
|
42
60
|
{t('Share.contacts.addUsers')}
|
|
43
61
|
</Typography>
|
|
44
|
-
<
|
|
45
|
-
currentRecipients={[]}
|
|
46
|
-
documentType="Files"
|
|
62
|
+
<ShareByEmailSection
|
|
47
63
|
pendingRecipients={pendingRecipients}
|
|
48
|
-
|
|
64
|
+
setPendingRecipients={setPendingRecipients}
|
|
49
65
|
selectedOption={selectedOption}
|
|
50
|
-
|
|
66
|
+
setSelectedOption={setSelectedOption}
|
|
51
67
|
/>
|
|
52
68
|
</div>
|
|
53
69
|
<div className="u-flex u-ph-2 u-pv-1">
|