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.
Files changed (34) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/SharingBanner/hooks/useSharingInfos.js +35 -37
  3. package/dist/SharingBanner/hooks/useSharingInfos.spec.js +40 -44
  4. package/dist/SharingProvider.js +351 -375
  5. package/dist/SharingProvider.spec.js +29 -33
  6. package/dist/components/CozyPassFingerprintDialogContent.spec.js +14 -16
  7. package/dist/components/Recipient/LinkRecipientPermissions.js +25 -27
  8. package/dist/components/Recipient/Recipient.spec.js +39 -43
  9. package/dist/components/Recipient/RecipientPermissions.js +20 -22
  10. package/dist/components/ShareButton.js +0 -2
  11. package/dist/components/ShareByEmail.js +53 -55
  12. package/dist/components/ShareByEmail.spec.js +50 -52
  13. package/dist/components/ShareByLink.js +73 -79
  14. package/dist/components/ShareDialogCozyToCozy.spec.js +238 -264
  15. package/dist/components/ShareDialogTwoStepsConfirmationContainer.js +33 -35
  16. package/dist/components/ShareDialogTwoStepsConfirmationContainer.spec.js +240 -266
  17. package/dist/components/SharedBadge.js +0 -2
  18. package/dist/components/badge.styl +7 -5
  19. package/dist/components/button.styl +11 -12
  20. package/dist/components/useFetchDocumentPath.js +16 -18
  21. package/dist/fetchNextPermissions.js +15 -17
  22. package/dist/getSharedDocument.js +13 -15
  23. package/dist/getSharedDocument.spec.js +10 -12
  24. package/dist/helpers/contacts.js +65 -69
  25. package/dist/helpers/contacts.spec.js +30 -32
  26. package/dist/helpers/files.js +26 -28
  27. package/dist/helpers/files.spec.js +54 -58
  28. package/dist/helpers/sharings.js +56 -60
  29. package/dist/helpers/synchronousJobQueue.js +19 -21
  30. package/dist/helpers/synchronousJobQueue.spec.js +39 -43
  31. package/dist/stylesheet.css +28 -820
  32. package/package.json +3 -3
  33. package/src/components/badge.styl +7 -5
  34. 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
- switch (_context.prev = _context.next) {
81
- case 0:
82
- _context.prev = 0;
83
- setLoading(true);
84
- _context.next = 4;
85
- return onEnable(document, options);
86
-
87
- case 4:
88
- _context.next = 10;
89
- break;
90
-
91
- case 6:
92
- _context.prev = 6;
93
- _context.t0 = _context["catch"](0);
94
- setAlert({
95
- open: true,
96
- severity: 'error',
97
- message: t("".concat(documentType, ".share.error.generic"))
98
- });
99
- logger.log(_context.t0);
100
-
101
- case 10:
102
- _context.prev = 10;
103
- setLoading(false);
104
- setShouldCopyToClipboard(true);
105
- return _context.finish(10);
106
-
107
- case 14:
108
- case "end":
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
- switch (_context2.prev = _context2.next) {
125
- case 0:
126
- if (isOnlyReadOnlyLinkAllowed({
127
- documentType: documentType
128
- })) {
129
- onPermissionsSelected({
130
- verbs: ['GET']
131
- });
132
- } else {
133
- setIsEditDialogOpen(true);
134
- }
135
-
136
- case 1:
137
- case "end":
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
- switch (_context3.prev = _context3.next) {
177
- case 0:
178
- _context3.prev = 0;
179
- shareData = {
180
- text: t("".concat(documentType, ".share.shareByLink.shareDescription"), {
181
- name: document.name || ''
182
- }),
183
- url: link
184
- };
185
- _context3.next = 4;
186
- return navigator.share(shareData);
187
-
188
- case 4:
189
- _context3.next = 9;
190
- break;
191
-
192
- case 6:
193
- _context3.prev = 6;
194
- _context3.t0 = _context3["catch"](0);
195
- setAlert({
196
- open: true,
197
- severity: 'error',
198
- message: t("".concat(documentType, ".share.error.generic"))
199
- });
200
-
201
- case 9:
202
- case "end":
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
  }));