cozy-sharing 6.0.2 → 6.0.4
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 +19 -0
- package/dist/SharingBanner/hooks/useSharingInfos.js +35 -37
- package/dist/SharingBanner/hooks/useSharingInfos.spec.js +40 -44
- package/dist/SharingProvider.js +351 -375
- package/dist/SharingProvider.spec.js +29 -33
- package/dist/components/CozyPassFingerprintDialogContent.spec.js +14 -16
- package/dist/components/Recipient/LinkRecipientPermissions.js +25 -27
- package/dist/components/Recipient/Recipient.spec.js +39 -43
- package/dist/components/Recipient/RecipientPermissions.js +20 -22
- package/dist/components/ShareButton.js +0 -2
- package/dist/components/ShareByEmail.js +53 -55
- package/dist/components/ShareByEmail.spec.js +50 -52
- package/dist/components/ShareByLink.js +73 -79
- package/dist/components/ShareDialogCozyToCozy.spec.js +238 -264
- package/dist/components/ShareDialogTwoStepsConfirmationContainer.js +33 -35
- package/dist/components/ShareDialogTwoStepsConfirmationContainer.spec.js +240 -266
- package/dist/components/SharedBadge.js +0 -2
- package/dist/components/badge.styl +7 -5
- package/dist/components/button.styl +11 -12
- package/dist/components/useFetchDocumentPath.js +16 -18
- package/dist/fetchNextPermissions.js +15 -17
- package/dist/getSharedDocument.js +13 -15
- package/dist/getSharedDocument.spec.js +10 -12
- package/dist/helpers/contacts.js +65 -69
- package/dist/helpers/contacts.spec.js +30 -32
- package/dist/helpers/files.js +26 -28
- package/dist/helpers/files.spec.js +54 -58
- package/dist/helpers/sharings.js +56 -60
- package/dist/helpers/synchronousJobQueue.js +19 -21
- package/dist/helpers/synchronousJobQueue.spec.js +39 -43
- package/dist/stylesheet.css +28 -820
- package/package.json +3 -3
- package/src/components/badge.styl +7 -5
- package/src/components/button.styl +11 -12
|
@@ -76,38 +76,36 @@ var ShareByLink = function ShareByLink(_ref) {
|
|
|
76
76
|
var onPermissionsSelected = /*#__PURE__*/function () {
|
|
77
77
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
|
|
78
78
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
79
|
-
while (1) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
return _context.stop();
|
|
110
|
-
}
|
|
79
|
+
while (1) switch (_context.prev = _context.next) {
|
|
80
|
+
case 0:
|
|
81
|
+
_context.prev = 0;
|
|
82
|
+
setLoading(true);
|
|
83
|
+
_context.next = 4;
|
|
84
|
+
return onEnable(document, options);
|
|
85
|
+
|
|
86
|
+
case 4:
|
|
87
|
+
_context.next = 10;
|
|
88
|
+
break;
|
|
89
|
+
|
|
90
|
+
case 6:
|
|
91
|
+
_context.prev = 6;
|
|
92
|
+
_context.t0 = _context["catch"](0);
|
|
93
|
+
setAlert({
|
|
94
|
+
open: true,
|
|
95
|
+
severity: 'error',
|
|
96
|
+
message: t("".concat(documentType, ".share.error.generic"))
|
|
97
|
+
});
|
|
98
|
+
logger.log(_context.t0);
|
|
99
|
+
|
|
100
|
+
case 10:
|
|
101
|
+
_context.prev = 10;
|
|
102
|
+
setLoading(false);
|
|
103
|
+
setShouldCopyToClipboard(true);
|
|
104
|
+
return _context.finish(10);
|
|
105
|
+
|
|
106
|
+
case 14:
|
|
107
|
+
case "end":
|
|
108
|
+
return _context.stop();
|
|
111
109
|
}
|
|
112
110
|
}, _callee, null, [[0, 6, 10, 14]]);
|
|
113
111
|
}));
|
|
@@ -120,23 +118,21 @@ var ShareByLink = function ShareByLink(_ref) {
|
|
|
120
118
|
var onCreate = /*#__PURE__*/function () {
|
|
121
119
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
122
120
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
123
|
-
while (1) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
return _context2.stop();
|
|
139
|
-
}
|
|
121
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
122
|
+
case 0:
|
|
123
|
+
if (isOnlyReadOnlyLinkAllowed({
|
|
124
|
+
documentType: documentType
|
|
125
|
+
})) {
|
|
126
|
+
onPermissionsSelected({
|
|
127
|
+
verbs: ['GET']
|
|
128
|
+
});
|
|
129
|
+
} else {
|
|
130
|
+
setIsEditDialogOpen(true);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
case 1:
|
|
134
|
+
case "end":
|
|
135
|
+
return _context2.stop();
|
|
140
136
|
}
|
|
141
137
|
}, _callee2);
|
|
142
138
|
}));
|
|
@@ -172,36 +168,34 @@ var ShareByLink = function ShareByLink(_ref) {
|
|
|
172
168
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
173
169
|
var shareData;
|
|
174
170
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
175
|
-
while (1) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
return _context3.stop();
|
|
204
|
-
}
|
|
171
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
172
|
+
case 0:
|
|
173
|
+
_context3.prev = 0;
|
|
174
|
+
shareData = {
|
|
175
|
+
text: t("".concat(documentType, ".share.shareByLink.shareDescription"), {
|
|
176
|
+
name: document.name || ''
|
|
177
|
+
}),
|
|
178
|
+
url: link
|
|
179
|
+
};
|
|
180
|
+
_context3.next = 4;
|
|
181
|
+
return navigator.share(shareData);
|
|
182
|
+
|
|
183
|
+
case 4:
|
|
184
|
+
_context3.next = 9;
|
|
185
|
+
break;
|
|
186
|
+
|
|
187
|
+
case 6:
|
|
188
|
+
_context3.prev = 6;
|
|
189
|
+
_context3.t0 = _context3["catch"](0);
|
|
190
|
+
setAlert({
|
|
191
|
+
open: true,
|
|
192
|
+
severity: 'error',
|
|
193
|
+
message: t("".concat(documentType, ".share.error.generic"))
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
case 9:
|
|
197
|
+
case "end":
|
|
198
|
+
return _context3.stop();
|
|
205
199
|
}
|
|
206
200
|
}, _callee3, null, [[0, 6]]);
|
|
207
201
|
}));
|