cozy-sharing 36.0.1 → 36.2.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/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/locales/en.json +7 -7
- package/locales/fr.json +7 -7
- package/locales/ru.json +6 -6
- package/locales/vi.json +6 -6
- 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,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
|
+
# [36.2.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@36.1.0...cozy-sharing@36.2.0) (2026-06-30)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- Rename shared drive to team drive ([b997bf6](https://github.com/cozy/cozy-libs/commit/b997bf64b60ca3d0203899e331f9e96878967c2b))
|
|
11
|
+
|
|
12
|
+
# [36.1.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@36.0.1...cozy-sharing@36.1.0) (2026-06-30)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- **cozy-sharing:** ShareAutosuggest can now be autofocus false ([fabac23](https://github.com/cozy/cozy-libs/commit/fabac23c23cdd041d4bd70f0adaa99a974caf33d))
|
|
17
|
+
|
|
6
18
|
## [36.0.1](https://github.com/cozy/cozy-libs/compare/cozy-sharing@36.0.0...cozy-sharing@36.0.1) (2026-06-29)
|
|
7
19
|
|
|
8
20
|
### 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/locales/en.json
CHANGED
|
@@ -448,19 +448,19 @@
|
|
|
448
448
|
},
|
|
449
449
|
"SharedDrive": {
|
|
450
450
|
"sharedDriveModal": {
|
|
451
|
-
"title": "New
|
|
452
|
-
"nameLabel": "
|
|
451
|
+
"title": "New team drive",
|
|
452
|
+
"nameLabel": "Team drive name",
|
|
453
453
|
"add": "Add",
|
|
454
454
|
"cancel": "Cancel",
|
|
455
455
|
"create": "Create",
|
|
456
456
|
"save": "Save",
|
|
457
|
-
"successNotification": "
|
|
458
|
-
"errorNotification": "Error during
|
|
457
|
+
"successNotification": "Team drive has been added",
|
|
458
|
+
"errorNotification": "Error during team drive creation"
|
|
459
459
|
},
|
|
460
460
|
"editSharedDriveModal": {
|
|
461
|
-
"title": "Edit
|
|
462
|
-
"successNotification": "
|
|
463
|
-
"errorNotification": "Error during
|
|
461
|
+
"title": "Edit team drive",
|
|
462
|
+
"successNotification": "Team drive has been modified",
|
|
463
|
+
"errorNotification": "Error during team drive modification"
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
}
|
package/locales/fr.json
CHANGED
|
@@ -446,19 +446,19 @@
|
|
|
446
446
|
},
|
|
447
447
|
"SharedDrive": {
|
|
448
448
|
"sharedDriveModal": {
|
|
449
|
-
"title": "Nouveau drive
|
|
450
|
-
"nameLabel": "Nom du drive
|
|
449
|
+
"title": "Nouveau drive d'équipe",
|
|
450
|
+
"nameLabel": "Nom du drive d'équipe",
|
|
451
451
|
"add": "Ajouter",
|
|
452
452
|
"cancel": "Annuler",
|
|
453
453
|
"create": "Créer",
|
|
454
454
|
"save": "Enregistrer",
|
|
455
|
-
"successNotification": "Le drive
|
|
456
|
-
"errorNotification": "Erreur lors de la création du drive
|
|
455
|
+
"successNotification": "Le drive d'équipe a été ajouté",
|
|
456
|
+
"errorNotification": "Erreur lors de la création du drive d'équipe"
|
|
457
457
|
},
|
|
458
458
|
"editSharedDriveModal": {
|
|
459
|
-
"title": "Modifier le drive
|
|
460
|
-
"successNotification": "Le drive
|
|
461
|
-
"errorNotification": "Erreur lors de la modification du drive
|
|
459
|
+
"title": "Modifier le drive d'équipe",
|
|
460
|
+
"successNotification": "Le drive d'équipe a été modifié",
|
|
461
|
+
"errorNotification": "Erreur lors de la modification du drive d'équipe"
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
}
|
package/locales/ru.json
CHANGED
|
@@ -448,19 +448,19 @@
|
|
|
448
448
|
},
|
|
449
449
|
"SharedDrive": {
|
|
450
450
|
"sharedDriveModal": {
|
|
451
|
-
"title": "Новый
|
|
451
|
+
"title": "Новый командный диск",
|
|
452
452
|
"nameLabel": "Имя диска",
|
|
453
453
|
"add": "Добавить",
|
|
454
454
|
"cancel": "Отмена",
|
|
455
455
|
"create": "Создать",
|
|
456
456
|
"save": "Сохранить",
|
|
457
|
-
"successNotification": "
|
|
458
|
-
"errorNotification": "Ошибка при создании
|
|
457
|
+
"successNotification": "Командный диск добавлен",
|
|
458
|
+
"errorNotification": "Ошибка при создании командного диска"
|
|
459
459
|
},
|
|
460
460
|
"editSharedDriveModal": {
|
|
461
|
-
"title": "Редактировать
|
|
462
|
-
"successNotification": "
|
|
463
|
-
"errorNotification": "Ошибка при модификации
|
|
461
|
+
"title": "Редактировать командный диск",
|
|
462
|
+
"successNotification": "Командный диск был изменён",
|
|
463
|
+
"errorNotification": "Ошибка при модификации командного диска"
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
}
|
package/locales/vi.json
CHANGED
|
@@ -448,19 +448,19 @@
|
|
|
448
448
|
},
|
|
449
449
|
"SharedDrive": {
|
|
450
450
|
"sharedDriveModal": {
|
|
451
|
-
"title": "Ổ đĩa
|
|
451
|
+
"title": "Ổ đĩa nhóm mới",
|
|
452
452
|
"nameLabel": "Tên ổ đĩa",
|
|
453
453
|
"add": "Thêm",
|
|
454
454
|
"cancel": "Hủy",
|
|
455
455
|
"create": "Tạo",
|
|
456
456
|
"save": "Lưu",
|
|
457
|
-
"successNotification": "Ổ đĩa
|
|
458
|
-
"errorNotification": "Lỗi trong quá trình tạo ổ đĩa
|
|
457
|
+
"successNotification": "Ổ đĩa nhóm đã được thêm",
|
|
458
|
+
"errorNotification": "Lỗi trong quá trình tạo ổ đĩa nhóm"
|
|
459
459
|
},
|
|
460
460
|
"editSharedDriveModal": {
|
|
461
|
-
"title": "Sửa ổ đĩa
|
|
462
|
-
"successNotification": "Ổ đĩa
|
|
463
|
-
"errorNotification": "Lỗi khi sửa đổi ổ đĩa
|
|
461
|
+
"title": "Sửa ổ đĩa nhóm",
|
|
462
|
+
"successNotification": "Ổ đĩa nhóm đã được sửa đổi",
|
|
463
|
+
"errorNotification": "Lỗi khi sửa đổi ổ đĩa nhóm"
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "36.0
|
|
3
|
+
"version": "36.2.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": "03851851f4b3f7f83df191f2e2f5b67eed922ef8"
|
|
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>
|