cozy-sharing 36.0.1 → 36.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 +6 -0
- package/dist/components/ShareAutosuggest.js +6 -1
- package/dist/components/ShareByEmail.js +3 -0
- package/dist/components/ShareRecipientsInput.js +3 -0
- package/dist/components/SharedDrive/SharedDriveForm.js +4 -0
- package/package.json +2 -2
- package/src/components/ShareAutosuggest.jsx +7 -1
- package/src/components/ShareByEmail.jsx +3 -0
- package/src/components/ShareRecipientsInput.jsx +3 -0
- package/src/components/SharedDrive/SharedDriveForm.jsx +4 -0
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
|
+
# [36.1.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@36.0.1...cozy-sharing@36.1.0) (2026-06-30)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **cozy-sharing:** ShareAutosuggest can now be autofocus false ([fabac23](https://github.com/cozy/cozy-libs/commit/fabac23c23cdd041d4bd70f0adaa99a974caf33d))
|
|
11
|
+
|
|
6
12
|
## [36.0.1](https://github.com/cozy/cozy-libs/compare/cozy-sharing@36.0.0...cozy-sharing@36.0.1) (2026-06-29)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
|
@@ -34,6 +34,7 @@ var ShareAutosuggest = function ShareAutosuggest(_ref) {
|
|
|
34
34
|
onRemove = _ref.onRemove,
|
|
35
35
|
enableCreateContact = _ref.enableCreateContact,
|
|
36
36
|
placeholder = _ref.placeholder,
|
|
37
|
+
autoFocus = _ref.autoFocus,
|
|
37
38
|
endAdornment = _ref.endAdornment;
|
|
38
39
|
|
|
39
40
|
var _useState = useState(''),
|
|
@@ -229,7 +230,7 @@ var ShareAutosuggest = function ShareAutosuggest(_ref) {
|
|
|
229
230
|
renderInputComponent: renderInput,
|
|
230
231
|
highlightFirstSuggestion: true,
|
|
231
232
|
inputProps: {
|
|
232
|
-
autoFocus:
|
|
233
|
+
autoFocus: autoFocus,
|
|
233
234
|
onFocus: onAutosuggestFocus,
|
|
234
235
|
onChange: onAutosuggestChange,
|
|
235
236
|
onPaste: onAutosuggestPaste,
|
|
@@ -243,6 +244,9 @@ var ShareAutosuggest = function ShareAutosuggest(_ref) {
|
|
|
243
244
|
}));
|
|
244
245
|
};
|
|
245
246
|
|
|
247
|
+
ShareAutosuggest.defaultProps = {
|
|
248
|
+
autoFocus: true
|
|
249
|
+
};
|
|
246
250
|
ShareAutosuggest.propTypes = {
|
|
247
251
|
loading: PropTypes.bool,
|
|
248
252
|
disabled: PropTypes.bool,
|
|
@@ -252,6 +256,7 @@ ShareAutosuggest.propTypes = {
|
|
|
252
256
|
onRemove: PropTypes.func.isRequired,
|
|
253
257
|
enableCreateContact: PropTypes.bool,
|
|
254
258
|
placeholder: PropTypes.string,
|
|
259
|
+
autoFocus: PropTypes.bool,
|
|
255
260
|
endAdornment: PropTypes.node
|
|
256
261
|
};
|
|
257
262
|
export default ShareAutosuggest;
|
|
@@ -34,6 +34,7 @@ export var ShareByEmail = function ShareByEmail(_ref) {
|
|
|
34
34
|
selectedOption = _ref.selectedOption,
|
|
35
35
|
onSelectedOptionChange = _ref.onSelectedOptionChange,
|
|
36
36
|
enableCreateContact = _ref.enableCreateContact,
|
|
37
|
+
autoFocus = _ref.autoFocus,
|
|
37
38
|
sharing = _ref.sharing;
|
|
38
39
|
|
|
39
40
|
var _useI18n = useI18n(),
|
|
@@ -75,6 +76,7 @@ export var ShareByEmail = function ShareByEmail(_ref) {
|
|
|
75
76
|
enableCreateContact: enableCreateContact,
|
|
76
77
|
currentRecipients: currentRecipients,
|
|
77
78
|
recipients: pendingRecipients,
|
|
79
|
+
autoFocus: autoFocus,
|
|
78
80
|
endAdornment: /*#__PURE__*/React.createElement(ShareTypeSelect, {
|
|
79
81
|
value: selectedOption,
|
|
80
82
|
options: getSharingOptions(),
|
|
@@ -91,6 +93,7 @@ ShareByEmail.propTypes = {
|
|
|
91
93
|
selectedOption: PropTypes.oneOf(['readWrite', 'readOnly']).isRequired,
|
|
92
94
|
onSelectedOptionChange: PropTypes.func.isRequired,
|
|
93
95
|
enableCreateContact: PropTypes.bool,
|
|
96
|
+
autoFocus: PropTypes.bool,
|
|
94
97
|
sharing: PropTypes.object
|
|
95
98
|
};
|
|
96
99
|
export default ShareByEmail;
|
|
@@ -32,6 +32,7 @@ var ShareRecipientsInput = function ShareRecipientsInput(_ref) {
|
|
|
32
32
|
onRemove = _ref.onRemove,
|
|
33
33
|
enableCreateContact = _ref.enableCreateContact,
|
|
34
34
|
disabled = _ref.disabled,
|
|
35
|
+
autoFocus = _ref.autoFocus,
|
|
35
36
|
endAdornment = _ref.endAdornment;
|
|
36
37
|
var reachableContactsQuery = buildReachableContactsQuery();
|
|
37
38
|
var reachableContactsResult = useQueryAll(reachableContactsQuery.definition, reachableContactsQuery.options);
|
|
@@ -93,6 +94,7 @@ var ShareRecipientsInput = function ShareRecipientsInput(_ref) {
|
|
|
93
94
|
onRemove: onRemove,
|
|
94
95
|
enableCreateContact: enableCreateContact,
|
|
95
96
|
placeholder: placeholder,
|
|
97
|
+
autoFocus: autoFocus,
|
|
96
98
|
endAdornment: endAdornment
|
|
97
99
|
});
|
|
98
100
|
};
|
|
@@ -105,6 +107,7 @@ ShareRecipientsInput.propTypes = {
|
|
|
105
107
|
onRemove: PropTypes.func.isRequired,
|
|
106
108
|
enableCreateContact: PropTypes.bool,
|
|
107
109
|
disabled: PropTypes.bool,
|
|
110
|
+
autoFocus: PropTypes.bool,
|
|
108
111
|
endAdornment: PropTypes.node
|
|
109
112
|
};
|
|
110
113
|
ShareRecipientsInput.defaultProps = {
|
|
@@ -13,6 +13,7 @@ var ShareByEmailSection = /*#__PURE__*/memo(function ShareByEmailSection(_ref) {
|
|
|
13
13
|
var pendingRecipients = _ref.pendingRecipients,
|
|
14
14
|
setPendingRecipients = _ref.setPendingRecipients,
|
|
15
15
|
selectedOption = _ref.selectedOption,
|
|
16
|
+
autoFocus = _ref.autoFocus,
|
|
16
17
|
setSelectedOption = _ref.setSelectedOption;
|
|
17
18
|
return /*#__PURE__*/React.createElement(DumbShareByEmail, {
|
|
18
19
|
currentRecipients: [],
|
|
@@ -20,6 +21,7 @@ var ShareByEmailSection = /*#__PURE__*/memo(function ShareByEmailSection(_ref) {
|
|
|
20
21
|
pendingRecipients: pendingRecipients,
|
|
21
22
|
onPendingRecipientsChange: setPendingRecipients,
|
|
22
23
|
selectedOption: selectedOption,
|
|
24
|
+
autoFocus: autoFocus,
|
|
23
25
|
onSelectedOptionChange: setSelectedOption
|
|
24
26
|
});
|
|
25
27
|
});
|
|
@@ -54,6 +56,7 @@ export var SharedDriveForm = withLocales(function (_ref2) {
|
|
|
54
56
|
size: "small",
|
|
55
57
|
className: "u-w-100 u-mt-1-half u-mb-1-half",
|
|
56
58
|
value: sharedDriveName,
|
|
59
|
+
autoFocus: true,
|
|
57
60
|
onChange: handleSharedDriveNameChange
|
|
58
61
|
}), /*#__PURE__*/React.createElement(Typography, {
|
|
59
62
|
variant: "h6",
|
|
@@ -62,6 +65,7 @@ export var SharedDriveForm = withLocales(function (_ref2) {
|
|
|
62
65
|
pendingRecipients: pendingRecipients,
|
|
63
66
|
setPendingRecipients: setPendingRecipients,
|
|
64
67
|
selectedOption: selectedOption,
|
|
68
|
+
autoFocus: false,
|
|
65
69
|
setSelectedOption: setSelectedOption
|
|
66
70
|
})), /*#__PURE__*/React.createElement("div", {
|
|
67
71
|
className: "u-flex u-ph-2 u-pv-1"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "36.0
|
|
3
|
+
"version": "36.1.0",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"sideEffects": [
|
|
86
86
|
"*.css"
|
|
87
87
|
],
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "ff906a03f2a106d0ce4509bf988ce1aea628a333"
|
|
89
89
|
}
|
|
@@ -23,6 +23,7 @@ const ShareAutosuggest = ({
|
|
|
23
23
|
onRemove,
|
|
24
24
|
enableCreateContact,
|
|
25
25
|
placeholder,
|
|
26
|
+
autoFocus,
|
|
26
27
|
endAdornment
|
|
27
28
|
}) => {
|
|
28
29
|
const [inputValue, setInputValue] = useState('')
|
|
@@ -201,7 +202,7 @@ const ShareAutosuggest = ({
|
|
|
201
202
|
renderInputComponent={renderInput}
|
|
202
203
|
highlightFirstSuggestion
|
|
203
204
|
inputProps={{
|
|
204
|
-
autoFocus
|
|
205
|
+
autoFocus,
|
|
205
206
|
onFocus: onAutosuggestFocus,
|
|
206
207
|
onChange: onAutosuggestChange,
|
|
207
208
|
onPaste: onAutosuggestPaste,
|
|
@@ -217,6 +218,10 @@ const ShareAutosuggest = ({
|
|
|
217
218
|
)
|
|
218
219
|
}
|
|
219
220
|
|
|
221
|
+
ShareAutosuggest.defaultProps = {
|
|
222
|
+
autoFocus: true
|
|
223
|
+
}
|
|
224
|
+
|
|
220
225
|
ShareAutosuggest.propTypes = {
|
|
221
226
|
loading: PropTypes.bool,
|
|
222
227
|
disabled: PropTypes.bool,
|
|
@@ -226,6 +231,7 @@ ShareAutosuggest.propTypes = {
|
|
|
226
231
|
onRemove: PropTypes.func.isRequired,
|
|
227
232
|
enableCreateContact: PropTypes.bool,
|
|
228
233
|
placeholder: PropTypes.string,
|
|
234
|
+
autoFocus: PropTypes.bool,
|
|
229
235
|
endAdornment: PropTypes.node
|
|
230
236
|
}
|
|
231
237
|
|
|
@@ -22,6 +22,7 @@ export const ShareByEmail = ({
|
|
|
22
22
|
selectedOption,
|
|
23
23
|
onSelectedOptionChange,
|
|
24
24
|
enableCreateContact,
|
|
25
|
+
autoFocus,
|
|
25
26
|
sharing
|
|
26
27
|
}) => {
|
|
27
28
|
const { t } = useI18n()
|
|
@@ -70,6 +71,7 @@ export const ShareByEmail = ({
|
|
|
70
71
|
enableCreateContact={enableCreateContact}
|
|
71
72
|
currentRecipients={currentRecipients}
|
|
72
73
|
recipients={pendingRecipients}
|
|
74
|
+
autoFocus={autoFocus}
|
|
73
75
|
endAdornment={
|
|
74
76
|
<ShareTypeSelect
|
|
75
77
|
value={selectedOption}
|
|
@@ -92,6 +94,7 @@ ShareByEmail.propTypes = {
|
|
|
92
94
|
selectedOption: PropTypes.oneOf(['readWrite', 'readOnly']).isRequired,
|
|
93
95
|
onSelectedOptionChange: PropTypes.func.isRequired,
|
|
94
96
|
enableCreateContact: PropTypes.bool,
|
|
97
|
+
autoFocus: PropTypes.bool,
|
|
95
98
|
sharing: PropTypes.object
|
|
96
99
|
}
|
|
97
100
|
|
|
@@ -30,6 +30,7 @@ const ShareRecipientsInput = ({
|
|
|
30
30
|
onRemove,
|
|
31
31
|
enableCreateContact,
|
|
32
32
|
disabled,
|
|
33
|
+
autoFocus,
|
|
33
34
|
endAdornment
|
|
34
35
|
}) => {
|
|
35
36
|
const reachableContactsQuery = buildReachableContactsQuery()
|
|
@@ -128,6 +129,7 @@ const ShareRecipientsInput = ({
|
|
|
128
129
|
onRemove={onRemove}
|
|
129
130
|
enableCreateContact={enableCreateContact}
|
|
130
131
|
placeholder={placeholder}
|
|
132
|
+
autoFocus={autoFocus}
|
|
131
133
|
endAdornment={endAdornment}
|
|
132
134
|
/>
|
|
133
135
|
)
|
|
@@ -141,6 +143,7 @@ ShareRecipientsInput.propTypes = {
|
|
|
141
143
|
onRemove: PropTypes.func.isRequired,
|
|
142
144
|
enableCreateContact: PropTypes.bool,
|
|
143
145
|
disabled: PropTypes.bool,
|
|
146
|
+
autoFocus: PropTypes.bool,
|
|
144
147
|
endAdornment: PropTypes.node
|
|
145
148
|
}
|
|
146
149
|
|
|
@@ -16,6 +16,7 @@ const ShareByEmailSection = memo(function ShareByEmailSection({
|
|
|
16
16
|
pendingRecipients,
|
|
17
17
|
setPendingRecipients,
|
|
18
18
|
selectedOption,
|
|
19
|
+
autoFocus,
|
|
19
20
|
setSelectedOption
|
|
20
21
|
}) {
|
|
21
22
|
return (
|
|
@@ -25,6 +26,7 @@ const ShareByEmailSection = memo(function ShareByEmailSection({
|
|
|
25
26
|
pendingRecipients={pendingRecipients}
|
|
26
27
|
onPendingRecipientsChange={setPendingRecipients}
|
|
27
28
|
selectedOption={selectedOption}
|
|
29
|
+
autoFocus={autoFocus}
|
|
28
30
|
onSelectedOptionChange={setSelectedOption}
|
|
29
31
|
/>
|
|
30
32
|
)
|
|
@@ -54,6 +56,7 @@ export const SharedDriveForm = withLocales(({ onSuccess, onCancel }) => {
|
|
|
54
56
|
size="small"
|
|
55
57
|
className="u-w-100 u-mt-1-half u-mb-1-half"
|
|
56
58
|
value={sharedDriveName}
|
|
59
|
+
autoFocus
|
|
57
60
|
onChange={handleSharedDriveNameChange}
|
|
58
61
|
/>
|
|
59
62
|
<Typography variant="h6" className="u-mb-half">
|
|
@@ -63,6 +66,7 @@ export const SharedDriveForm = withLocales(({ onSuccess, onCancel }) => {
|
|
|
63
66
|
pendingRecipients={pendingRecipients}
|
|
64
67
|
setPendingRecipients={setPendingRecipients}
|
|
65
68
|
selectedOption={selectedOption}
|
|
69
|
+
autoFocus={false}
|
|
66
70
|
setSelectedOption={setSelectedOption}
|
|
67
71
|
/>
|
|
68
72
|
</div>
|