cozy-sharing 32.1.1 → 32.3.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/.claude/settings.local.json +27 -0
- package/.storybook/main.js +8 -1
- package/.storybook/preview.jsx +11 -6
- package/AGENTS.md +7 -0
- package/CHANGELOG.md +22 -0
- package/dist/RefreshableSharings.spec.js +40 -0
- package/dist/assets/illustrations/illustration-shared-drives.svg +1 -0
- package/dist/components/EditLinkPermissionDialog.js +72 -0
- package/dist/components/EditLinkPermissionDialog.spec.js +48 -0
- package/dist/components/FederatedFolder/DumbFederatedFolderModal.js +65 -0
- package/dist/components/FederatedFolder/DumbFederatedFolderModal.spec.js +107 -0
- package/dist/components/FederatedFolder/FederatedFolderModal.js +41 -4
- package/dist/components/FederatedFolder/FederatedFolderModal.jsx.tmp.179197.1773939270471 +172 -0
- package/dist/components/FederatedFolder/FederatedFolderModal.spec.js +79 -8
- package/dist/components/Recipient/LinkRecipient.stories.js +3 -0
- package/dist/components/Recipient/LinkRecipientPermissions.stories.js +5 -1
- package/dist/components/Recipient/actions/revokeGroup.js +42 -0
- package/dist/components/Recipient/actions/revokeMember.js +42 -0
- package/dist/components/Recipient/actions/revokeSharedDriveMember.js +41 -0
- package/dist/components/ShareAutosuggest.js +1 -0
- package/dist/components/ShareAutosuggest.spec.js +12 -4
- package/dist/components/ShareDialogCozyToCozy.spec.js +55 -8
- package/dist/components/ShareDiscardChangesModal.js +35 -0
- package/dist/components/ShareModal/ShareModal copy.js +43 -0
- package/dist/components/ShareModal/ShareModal.spec.js +197 -0
- package/dist/components/ShareModal/ShareModalBatchContainer.js +276 -0
- package/dist/components/ShareModal/ShareModalBatchContainer.spec.js +131 -0
- package/dist/components/ShareModal/SharedDriveEditModal.js +59 -0
- package/dist/components/ShareRecipientsInput.js +13 -3
- package/dist/components/ShareRecipientsInput.spec.js +63 -4
- package/dist/components/SharedDrive/DumbSharedDriveModal.js +78 -0
- package/dist/components/SharedDrive/DumbSharedDriveModal.spec.js +126 -0
- package/dist/components/SharedDrive/SharedDriveEditModal.js +110 -0
- package/dist/components/SharedDrive/SharedDriveModal copy.js +356 -0
- package/dist/components/SharedDrive/helpers.js +102 -0
- package/dist/components/SharedDrive/helpers.spec.js +208 -0
- package/dist/components/SharedDriveEditModal.js +43 -0
- package/dist/components/SharedFolder/DumbBatchSharedFolderModal.spec.js +321 -0
- package/dist/components/SharedStatus.js +61 -0
- package/dist/components/SharedStatus.spec.js +44 -0
- package/dist/components/Sharesubmit.js +28 -0
- package/dist/components/__snapshots__/SharedStatus.spec.js.snap +94 -0
- package/dist/helpers/owner.js +14 -0
- package/dist/helpers/owner.spec.js +34 -0
- package/dist/hooks/useConfirmDiscardChanges.js +33 -0
- package/dist/hooks/useContactsAndGroups.js +65 -0
- package/dist/hooks/useSharedDrive.js +130 -0
- package/dist/hooks/useSharedDriveContactsAndGroups.js +65 -0
- package/dist/propTypes.js +26 -0
- package/dist/styles/shareddrive.styl +8 -0
- package/locales/en.json +10 -5
- package/locales/fr.json +10 -5
- package/locales/ru.json +10 -5
- package/locales/vi.json +10 -5
- package/package.json +2 -2
- package/src/components/FederatedFolder/FederatedFolderModal.jsx +184 -138
- package/src/components/FederatedFolder/FederatedFolderModal.spec.jsx +47 -0
- package/src/components/Recipient/LinkRecipient.stories.jsx +1 -0
- package/src/components/Recipient/LinkRecipientPermissions.stories.jsx +3 -1
- package/src/components/ShareAutosuggest.jsx +1 -0
- package/src/components/ShareAutosuggest.spec.jsx +10 -5
- package/src/components/ShareDialogCozyToCozy.spec.jsx +50 -4
- package/src/components/ShareDiscardChangesModal.jsx +40 -0
- package/src/components/ShareRecipientsInput.jsx +11 -6
- package/src/components/ShareRecipientsInput.spec.jsx +59 -0
|
@@ -116,6 +116,65 @@ describe('ShareRecipientsInput component', () => {
|
|
|
116
116
|
).toBeInTheDocument()
|
|
117
117
|
})
|
|
118
118
|
|
|
119
|
+
it('should exclude current user from suggestions when me is true', async () => {
|
|
120
|
+
const contacts = [
|
|
121
|
+
{
|
|
122
|
+
id: 'df563cc4-6440',
|
|
123
|
+
_id: 'df563cc4-6440',
|
|
124
|
+
_type: 'io.cozy.contacts',
|
|
125
|
+
me: true,
|
|
126
|
+
name: {
|
|
127
|
+
givenName: 'My',
|
|
128
|
+
familyName: 'Self'
|
|
129
|
+
},
|
|
130
|
+
relationships: {
|
|
131
|
+
groups: {
|
|
132
|
+
data: [
|
|
133
|
+
{
|
|
134
|
+
_id: 'group-id',
|
|
135
|
+
_type: 'io.cozy.contacts.groups'
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: '5a3b4ccf-c257',
|
|
143
|
+
_id: '5a3b4ccf-c257',
|
|
144
|
+
_type: 'io.cozy.contacts',
|
|
145
|
+
name: {
|
|
146
|
+
givenName: 'Teagan',
|
|
147
|
+
familyName: 'Wolf'
|
|
148
|
+
},
|
|
149
|
+
relationships: {
|
|
150
|
+
groups: {
|
|
151
|
+
data: [
|
|
152
|
+
{
|
|
153
|
+
_id: 'group-id',
|
|
154
|
+
_type: 'io.cozy.contacts.groups'
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
|
|
162
|
+
const contactGroups = [
|
|
163
|
+
{
|
|
164
|
+
id: 'group-id',
|
|
165
|
+
name: 'Friends',
|
|
166
|
+
_id: 'group-id',
|
|
167
|
+
_type: 'io.cozy.contacts.groups'
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
|
|
171
|
+
setup({ contacts, contactGroups })
|
|
172
|
+
|
|
173
|
+
expect(screen.queryByText('My Self')).not.toBeInTheDocument()
|
|
174
|
+
expect(screen.getByText('Teagan Wolf')).toBeInTheDocument()
|
|
175
|
+
expect(screen.getByText('Friends - 1 members')).toBeInTheDocument()
|
|
176
|
+
})
|
|
177
|
+
|
|
119
178
|
it('should include unreachable members when flag sharing.show-recipient-groups is activated', async () => {
|
|
120
179
|
flag.mockReturnValue(true)
|
|
121
180
|
|