cozy-sharing 5.0.0 → 6.0.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 +69 -0
- package/dist/SharedRecipients.js +1 -1
- package/dist/SharedStatus.js +1 -1
- package/dist/SharingBanner/hooks/useSharingInfos.js +1 -1
- package/dist/SharingDetailsModal.js +1 -1
- package/dist/SharingOwnerAvatar.js +1 -1
- package/dist/SharingProvider.js +21 -8
- package/dist/components/ContactSuggestion.js +15 -27
- package/dist/components/EditLinkPermissionDialog.js +72 -0
- package/dist/components/EditLinkPermissionDialog.spec.js +48 -0
- package/dist/components/EditableSharingModal.js +15 -62
- package/dist/components/{AvatarPlusX.js → Recipient/AvatarPlusX.js} +1 -1
- package/dist/components/{Identity.js → Recipient/Identity.js} +17 -16
- package/dist/components/Recipient/LinkRecipient.js +72 -0
- package/dist/components/Recipient/LinkRecipientPermissions.js +159 -0
- package/dist/components/Recipient/OwnerIdentity.js +44 -0
- package/dist/components/Recipient/Recipient.js +72 -0
- package/dist/components/{Recipient.spec.js → Recipient/Recipient.spec.js} +4 -45
- package/dist/components/Recipient/RecipientAvatar.js +33 -0
- package/dist/components/Recipient/RecipientConfirm.js +63 -0
- package/dist/components/Recipient/RecipientPermissions.js +126 -0
- package/dist/components/Recipient/RecipientPlusX.js +45 -0
- package/dist/components/Recipient/RecipientStatus.js +64 -0
- package/dist/components/Recipient/RecipientWithoutStatus.js +45 -0
- package/dist/components/Recipient/RecipientsAvatars.js +100 -0
- package/dist/components/{RecipientsAvatars.spec.js → Recipient/RecipientsAvatars.spec.js} +43 -2
- package/dist/components/{recipient.styl → Recipient/recipient.styl} +6 -2
- package/dist/components/ShareAutosuggest.js +176 -252
- package/dist/components/ShareAutosuggest.spec.js +3 -2
- package/dist/components/ShareByEmail.js +142 -193
- package/dist/components/ShareByEmail.spec.js +42 -23
- package/dist/components/ShareByLink.js +251 -357
- package/dist/components/ShareDialogCozyToCozy.js +16 -4
- package/dist/components/ShareDialogCozyToCozy.spec.js +12 -1
- package/dist/components/ShareDialogOnlyByLink.js +23 -10
- package/dist/components/ShareDialogTwoStepsConfirmationContainer.js +7 -7
- package/dist/components/ShareModal.js +5 -1
- package/dist/components/ShareRecipientsInput.js +44 -128
- package/dist/components/WhoHasAccess.js +43 -5
- package/dist/components/WhoHasAccessLight.js +3 -19
- package/dist/components/autosuggest.styl +21 -36
- package/dist/helpers/documentType.js +6 -0
- package/dist/helpers/hooks.js +8 -1
- package/dist/helpers/link.js +5 -0
- package/dist/helpers/permissions.js +8 -0
- package/dist/helpers/recipients.js +24 -0
- package/dist/helpers/sharings.js +72 -53
- package/dist/helpers/synchronousJobQueue.js +67 -0
- package/dist/helpers/synchronousJobQueue.spec.js +97 -0
- package/dist/index.js +2 -1
- package/dist/queries/queries.js +72 -0
- package/dist/share.styl +0 -15
- package/dist/stylesheet.css +67 -92
- package/locales/en.json +29 -41
- package/locales/fr.json +26 -39
- package/package.json +10 -10
- package/src/SharedRecipients.jsx +1 -1
- package/src/SharedStatus.jsx +1 -1
- package/src/SharingBanner/hooks/useSharingInfos.jsx +1 -1
- package/src/SharingDetailsModal.jsx +1 -1
- package/src/SharingOwnerAvatar.jsx +1 -1
- package/src/SharingProvider.jsx +17 -4
- package/src/components/ContactSuggestion.jsx +25 -10
- package/src/components/EditLinkPermissionDialog.jsx +89 -0
- package/src/components/EditLinkPermissionDialog.spec.jsx +52 -0
- package/src/components/EditableSharingModal.jsx +58 -100
- package/src/components/{AvatarPlusX.jsx → Recipient/AvatarPlusX.jsx} +1 -1
- package/src/components/{Identity.jsx → Recipient/Identity.jsx} +0 -0
- package/src/components/Recipient/LinkRecipient.jsx +59 -0
- package/src/components/Recipient/LinkRecipientPermissions.jsx +157 -0
- package/src/components/Recipient/OwnerIdentity.jsx +20 -0
- package/src/components/Recipient/Recipient.jsx +79 -0
- package/src/components/{Recipient.spec.jsx → Recipient/Recipient.spec.jsx} +4 -42
- package/src/components/Recipient/RecipientAvatar.jsx +38 -0
- package/src/components/Recipient/RecipientConfirm.jsx +37 -0
- package/src/components/Recipient/RecipientPermissions.jsx +114 -0
- package/src/components/Recipient/RecipientPlusX.jsx +28 -0
- package/src/components/Recipient/RecipientStatus.jsx +48 -0
- package/src/components/Recipient/RecipientWithoutStatus.jsx +21 -0
- package/src/components/Recipient/RecipientsAvatars.jsx +108 -0
- package/src/components/{RecipientsAvatars.spec.jsx → Recipient/RecipientsAvatars.spec.jsx} +43 -2
- package/src/components/{recipient.styl → Recipient/recipient.styl} +6 -2
- package/src/components/ShareAutosuggest.jsx +136 -127
- package/src/components/ShareAutosuggest.spec.jsx +12 -8
- package/src/components/ShareByEmail.jsx +65 -90
- package/src/components/ShareByEmail.spec.jsx +39 -11
- package/src/components/ShareByLink.jsx +146 -238
- package/src/components/ShareDialogCozyToCozy.jsx +14 -2
- package/src/components/ShareDialogCozyToCozy.spec.jsx +8 -1
- package/src/components/ShareDialogOnlyByLink.jsx +30 -13
- package/src/components/ShareDialogTwoStepsConfirmationContainer.jsx +5 -5
- package/src/components/ShareModal.jsx +5 -1
- package/src/components/ShareRecipientsInput.jsx +30 -44
- package/src/components/WhoHasAccess.jsx +85 -27
- package/src/components/WhoHasAccessLight.jsx +2 -1
- package/src/components/__snapshots__/ContactSuggestion.spec.jsx.snap +915 -132
- package/src/components/__snapshots__/ShareRecipientsInput.spec.jsx.snap +86 -102
- package/src/components/autosuggest.styl +21 -36
- package/src/helpers/documentType.js +6 -0
- package/src/helpers/hooks.js +11 -1
- package/src/helpers/link.js +4 -0
- package/src/helpers/permissions.js +15 -0
- package/src/helpers/recipients.js +21 -0
- package/src/helpers/sharings.js +15 -12
- package/src/helpers/synchronousJobQueue.js +22 -0
- package/src/helpers/synchronousJobQueue.spec.js +75 -0
- package/src/index.jsx +1 -0
- package/src/queries/queries.js +75 -0
- package/src/share.styl +0 -15
- package/dist/SharingBanner/helpers/queries.js +0 -12
- package/dist/components/ContactsAndGroupsDataLoader.js +0 -50
- package/dist/components/Recipient.js +0 -450
- package/src/SharingBanner/helpers/queries.js +0 -14
- package/src/components/ContactsAndGroupsDataLoader.jsx +0 -30
- package/src/components/Recipient.jsx +0 -415
package/dist/helpers/sharings.js
CHANGED
|
@@ -11,73 +11,92 @@ export var getSharingObject = function getSharingObject(internalSharing, sharing
|
|
|
11
11
|
return normalizeDocFromRealtime(sharing, 'io.cozy.sharings');
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
-
export var createSharingInStore = function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
export var createSharingInStore = /*#__PURE__*/function () {
|
|
15
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref) {
|
|
16
|
+
var client, doctype, dispatch, docsId, sharing;
|
|
17
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
18
|
+
while (1) {
|
|
19
|
+
switch (_context2.prev = _context2.next) {
|
|
20
|
+
case 0:
|
|
21
|
+
client = _ref.client, doctype = _ref.doctype, dispatch = _ref.dispatch, docsId = _ref.docsId, sharing = _ref.sharing;
|
|
22
|
+
_context2.next = 3;
|
|
23
|
+
return Promise.all(docsId.map( /*#__PURE__*/function () {
|
|
24
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(id) {
|
|
25
|
+
var file, path;
|
|
26
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
27
|
+
while (1) {
|
|
28
|
+
switch (_context.prev = _context.next) {
|
|
29
|
+
case 0:
|
|
30
|
+
if (!(doctype === 'io.cozy.files')) {
|
|
31
|
+
_context.next = 6;
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
_context.next = 3;
|
|
36
|
+
return client.query(Q(doctype).getById(id));
|
|
30
37
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
case 3:
|
|
39
|
+
_context.t0 = _context.sent;
|
|
40
|
+
_context.next = 7;
|
|
41
|
+
break;
|
|
35
42
|
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
case 6:
|
|
44
|
+
_context.t0 = undefined;
|
|
38
45
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
case 7:
|
|
47
|
+
file = _context.t0;
|
|
48
|
+
_context.t1 = file;
|
|
42
49
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
if (!_context.t1) {
|
|
51
|
+
_context.next = 16;
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
47
54
|
|
|
48
|
-
|
|
55
|
+
_context.t2 = file.data.path;
|
|
49
56
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
if (_context.t2) {
|
|
58
|
+
_context.next = 15;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
54
61
|
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
_context.next = 14;
|
|
63
|
+
return fetchFilesPaths(client, doctype, [file.data]);
|
|
57
64
|
|
|
58
|
-
|
|
59
|
-
|
|
65
|
+
case 14:
|
|
66
|
+
_context.t2 = _context.sent;
|
|
60
67
|
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
case 15:
|
|
69
|
+
_context.t1 = _context.t2;
|
|
63
70
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
case 16:
|
|
72
|
+
path = _context.t1;
|
|
73
|
+
dispatch(addSharing(sharing, path));
|
|
67
74
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
75
|
+
case 18:
|
|
76
|
+
case "end":
|
|
77
|
+
return _context.stop();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}, _callee);
|
|
81
|
+
}));
|
|
82
|
+
|
|
83
|
+
return function (_x2) {
|
|
84
|
+
return _ref3.apply(this, arguments);
|
|
85
|
+
};
|
|
86
|
+
}()));
|
|
87
|
+
|
|
88
|
+
case 3:
|
|
89
|
+
case "end":
|
|
90
|
+
return _context2.stop();
|
|
72
91
|
}
|
|
73
|
-
}
|
|
74
|
-
})
|
|
92
|
+
}
|
|
93
|
+
}, _callee2);
|
|
94
|
+
}));
|
|
75
95
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
};
|
|
96
|
+
return function createSharingInStore(_x) {
|
|
97
|
+
return _ref2.apply(this, arguments);
|
|
98
|
+
};
|
|
99
|
+
}();
|
|
81
100
|
export var updateSharingInStore = function updateSharingInStore(dispatch, sharing) {
|
|
82
101
|
dispatch(updateSharing(sharing));
|
|
83
102
|
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
export var SynchronousJobQueue = /*#__PURE__*/function () {
|
|
6
|
+
function SynchronousJobQueue() {
|
|
7
|
+
_classCallCheck(this, SynchronousJobQueue);
|
|
8
|
+
|
|
9
|
+
this.isRunning = false;
|
|
10
|
+
this.queue = [];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
_createClass(SynchronousJobQueue, [{
|
|
14
|
+
key: "push",
|
|
15
|
+
value: function push(job) {
|
|
16
|
+
this.queue.push(job);
|
|
17
|
+
|
|
18
|
+
if (!this.isRunning) {
|
|
19
|
+
this.run();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}, {
|
|
23
|
+
key: "run",
|
|
24
|
+
value: function () {
|
|
25
|
+
var _run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
26
|
+
var job;
|
|
27
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
28
|
+
while (1) {
|
|
29
|
+
switch (_context.prev = _context.next) {
|
|
30
|
+
case 0:
|
|
31
|
+
this.isRunning = true;
|
|
32
|
+
|
|
33
|
+
case 1:
|
|
34
|
+
if (!(this.queue.length > 0)) {
|
|
35
|
+
_context.next = 7;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
job = this.queue.shift();
|
|
40
|
+
_context.next = 5;
|
|
41
|
+
return job.function(job.arguments);
|
|
42
|
+
|
|
43
|
+
case 5:
|
|
44
|
+
_context.next = 1;
|
|
45
|
+
break;
|
|
46
|
+
|
|
47
|
+
case 7:
|
|
48
|
+
this.isRunning = false;
|
|
49
|
+
|
|
50
|
+
case 8:
|
|
51
|
+
case "end":
|
|
52
|
+
return _context.stop();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}, _callee, this);
|
|
56
|
+
}));
|
|
57
|
+
|
|
58
|
+
function run() {
|
|
59
|
+
return _run.apply(this, arguments);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return run;
|
|
63
|
+
}()
|
|
64
|
+
}]);
|
|
65
|
+
|
|
66
|
+
return SynchronousJobQueue;
|
|
67
|
+
}();
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
import { SynchronousJobQueue } from './synchronousJobQueue';
|
|
4
|
+
|
|
5
|
+
var flushPromises = function flushPromises() {
|
|
6
|
+
return new Promise(process.nextTick);
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
var callback = jest.fn();
|
|
10
|
+
var resolveAfter100Ms = jest.fn().mockImplementation(function () {
|
|
11
|
+
callback('100Ms start');
|
|
12
|
+
return new Promise(function (resolve) {
|
|
13
|
+
setTimeout(function () {
|
|
14
|
+
callback('100Ms end');
|
|
15
|
+
resolve();
|
|
16
|
+
}, 100);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
var resolveAfter500Ms = jest.fn().mockImplementation(function () {
|
|
20
|
+
callback('500Ms start');
|
|
21
|
+
return new Promise(function (resolve) {
|
|
22
|
+
setTimeout(function () {
|
|
23
|
+
callback('500Ms end');
|
|
24
|
+
resolve();
|
|
25
|
+
}, 500);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
describe('SynchronousJobQueue', function () {
|
|
29
|
+
beforeEach(function () {
|
|
30
|
+
jest.useFakeTimers();
|
|
31
|
+
});
|
|
32
|
+
afterEach(function () {
|
|
33
|
+
jest.useRealTimers();
|
|
34
|
+
jest.clearAllMocks();
|
|
35
|
+
});
|
|
36
|
+
it('should execute job synchronously with SynchronousJobQueue', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
37
|
+
var synchronousJobQueue, expectedCallbackOrder;
|
|
38
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
39
|
+
while (1) {
|
|
40
|
+
switch (_context.prev = _context.next) {
|
|
41
|
+
case 0:
|
|
42
|
+
synchronousJobQueue = new SynchronousJobQueue();
|
|
43
|
+
synchronousJobQueue.push({
|
|
44
|
+
function: resolveAfter500Ms
|
|
45
|
+
});
|
|
46
|
+
synchronousJobQueue.push({
|
|
47
|
+
function: resolveAfter100Ms
|
|
48
|
+
});
|
|
49
|
+
jest.runAllTimers();
|
|
50
|
+
_context.next = 6;
|
|
51
|
+
return flushPromises();
|
|
52
|
+
|
|
53
|
+
case 6:
|
|
54
|
+
jest.runAllTimers();
|
|
55
|
+
_context.next = 9;
|
|
56
|
+
return flushPromises();
|
|
57
|
+
|
|
58
|
+
case 9:
|
|
59
|
+
expectedCallbackOrder = [['500Ms start'], ['500Ms end'], ['100Ms start'], ['100Ms end']];
|
|
60
|
+
expect(callback.mock.calls).toEqual(expectedCallbackOrder);
|
|
61
|
+
|
|
62
|
+
case 11:
|
|
63
|
+
case "end":
|
|
64
|
+
return _context.stop();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}, _callee);
|
|
68
|
+
})));
|
|
69
|
+
it('should execute job asynchronously without SynchronousJobQueue', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
70
|
+
var expectedCallbackOrder;
|
|
71
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
72
|
+
while (1) {
|
|
73
|
+
switch (_context2.prev = _context2.next) {
|
|
74
|
+
case 0:
|
|
75
|
+
resolveAfter500Ms();
|
|
76
|
+
resolveAfter100Ms();
|
|
77
|
+
jest.runAllTimers();
|
|
78
|
+
_context2.next = 5;
|
|
79
|
+
return flushPromises();
|
|
80
|
+
|
|
81
|
+
case 5:
|
|
82
|
+
jest.runAllTimers();
|
|
83
|
+
_context2.next = 8;
|
|
84
|
+
return flushPromises();
|
|
85
|
+
|
|
86
|
+
case 8:
|
|
87
|
+
expectedCallbackOrder = [['500Ms start'], ['100Ms start'], ['100Ms end'], ['500Ms end']];
|
|
88
|
+
expect(callback.mock.calls).toEqual(expectedCallbackOrder);
|
|
89
|
+
|
|
90
|
+
case 10:
|
|
91
|
+
case "end":
|
|
92
|
+
return _context2.stop();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}, _callee2);
|
|
96
|
+
})));
|
|
97
|
+
});
|
package/dist/index.js
CHANGED
|
@@ -17,4 +17,5 @@ export { CozyPassFingerprintDialogContent } from './components/CozyPassFingerpri
|
|
|
17
17
|
export { SharingBannerPlugin } from './SharingBanner';
|
|
18
18
|
export { useSharingInfos } from './SharingBanner/hooks/useSharingInfos';
|
|
19
19
|
export { ConfirmTrustedRecipientsDialog } from './ConfirmTrustedRecipientsDialog';
|
|
20
|
-
export { ShareButtonWithRecipients } from './ShareButtonWithRecipients';
|
|
20
|
+
export { ShareButtonWithRecipients } from './ShareButtonWithRecipients';
|
|
21
|
+
export { DOCUMENT_TYPE } from './helpers/documentType';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Q, fetchPolicies } from 'cozy-client';
|
|
2
|
+
import { Contact, Group } from '../models';
|
|
3
|
+
var DEFAULT_CACHE_TIMEOUT_QUERIES = 9 * 60 * 1000;
|
|
4
|
+
var defaultFetchPolicy = fetchPolicies.olderThan(DEFAULT_CACHE_TIMEOUT_QUERIES);
|
|
5
|
+
export var fetchApps = function fetchApps() {
|
|
6
|
+
return {
|
|
7
|
+
definition: Q('io.cozy.apps'),
|
|
8
|
+
options: {
|
|
9
|
+
as: 'io.cozy.apps',
|
|
10
|
+
fetchPolicy: defaultFetchPolicy
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export var buildSharingsByIdQuery = function buildSharingsByIdQuery(sharingId) {
|
|
15
|
+
return {
|
|
16
|
+
definition: Q('io.cozy.sharings').getById(sharingId),
|
|
17
|
+
options: {
|
|
18
|
+
as: "io.cozy.sharings/".concat(sharingId),
|
|
19
|
+
fetchPolicy: defaultFetchPolicy
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export var buildContactsQuery = function buildContactsQuery() {
|
|
24
|
+
return {
|
|
25
|
+
definition: Q(Contact.doctype).where({
|
|
26
|
+
_id: {
|
|
27
|
+
$gt: null
|
|
28
|
+
}
|
|
29
|
+
}).partialIndex({
|
|
30
|
+
trashed: {
|
|
31
|
+
$or: [{
|
|
32
|
+
$eq: false
|
|
33
|
+
}, {
|
|
34
|
+
$exists: false
|
|
35
|
+
}]
|
|
36
|
+
},
|
|
37
|
+
$or: [{
|
|
38
|
+
cozy: {
|
|
39
|
+
$not: {
|
|
40
|
+
$size: 0
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
email: {
|
|
45
|
+
$not: {
|
|
46
|
+
$size: 0
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}]
|
|
50
|
+
}).indexFields(['_id']).limitBy(1000),
|
|
51
|
+
options: {
|
|
52
|
+
as: 'io.cozy.contacts'
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export var buildGroupsQuery = function buildGroupsQuery() {
|
|
57
|
+
return {
|
|
58
|
+
definition: Q(Group.doctype),
|
|
59
|
+
options: {
|
|
60
|
+
as: 'io.cozy.contacts.groups'
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export var buildInstanceSettingsQuery = function buildInstanceSettingsQuery() {
|
|
65
|
+
return {
|
|
66
|
+
definition: Q('io.cozy.settings').getById('instance'),
|
|
67
|
+
options: {
|
|
68
|
+
as: 'io.cozy.settings/instance',
|
|
69
|
+
singleDocData: true
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
};
|
package/dist/share.styl
CHANGED
|
@@ -21,10 +21,6 @@
|
|
|
21
21
|
.coz-form-group
|
|
22
22
|
flex-shrink 0
|
|
23
23
|
|
|
24
|
-
.coz-form-label
|
|
25
|
-
padding-top 0
|
|
26
|
-
margin-top 0
|
|
27
|
-
|
|
28
24
|
.aligned-dropdown-button
|
|
29
25
|
margin-right: -1rem
|
|
30
26
|
|
|
@@ -82,17 +78,6 @@
|
|
|
82
78
|
.react-select__option:active
|
|
83
79
|
background-color var(--paleGrey) !important
|
|
84
80
|
|
|
85
|
-
@media (max-width 32em)
|
|
86
|
-
.react-select__menu
|
|
87
|
-
width 100% !important
|
|
88
|
-
|
|
89
|
-
@media (max-width 32em)
|
|
90
|
-
.share-type-control
|
|
91
|
-
flex-direction column
|
|
92
|
-
|
|
93
|
-
.select-wrapper
|
|
94
|
-
margin-bottom .5rem
|
|
95
|
-
|
|
96
81
|
input[type=text]
|
|
97
82
|
width 100%
|
|
98
83
|
|