solid-ui 2.4.22-e9979419 → 2.4.22-ecb6aa47
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/dist/main.js +7241 -6588
- package/dist/main.js.map +1 -1
- package/lib/acl/access-controller.js.map +1 -1
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl-control.js.map +1 -1
- package/lib/acl/acl.js.map +1 -1
- package/lib/acl/add-agent-buttons.js +0 -1
- package/lib/acl/add-agent-buttons.js.map +1 -1
- package/lib/acl/index.js.map +1 -1
- package/lib/acl/styles.js.map +1 -1
- package/lib/acl/types.js.map +1 -1
- package/lib/chat/bookmarks.js +2 -4
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/dateFolder.js.map +1 -1
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/thread.js.map +1 -1
- package/lib/create/create.js.map +1 -1
- package/lib/create/index.js.map +1 -1
- package/lib/create/types.js.map +1 -1
- package/lib/debug.js.map +1 -1
- package/lib/folders.js.map +1 -1
- package/lib/footer/index.js.map +1 -1
- package/lib/footer/styleMap.js.map +1 -1
- package/lib/header/empty-profile.js.map +1 -1
- package/lib/header/index.js.map +1 -1
- package/lib/header/styleMap.js.map +1 -1
- package/lib/iconBase.js +3 -2
- package/lib/iconBase.js.map +1 -1
- package/lib/icons/solid_logo.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/jss/index.js.map +1 -1
- package/lib/log.js.map +1 -1
- package/lib/login/login.d.ts +9 -8
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +281 -342
- package/lib/login/login.js.map +1 -1
- package/lib/matrix/index.js.map +1 -1
- package/lib/matrix/matrix.js.map +1 -1
- package/lib/matrix/types.js.map +1 -1
- package/lib/media/index.js.map +1 -1
- package/lib/media/media-capture.js.map +1 -1
- package/lib/messageArea.js.map +1 -1
- package/lib/noun_Camera_1618446_000000.js.map +1 -1
- package/lib/ns.js.map +1 -1
- package/lib/pad.js.map +1 -1
- package/lib/participation.js.map +1 -1
- package/lib/preferences.js.map +1 -1
- package/lib/signup/config-default.js.map +1 -1
- package/lib/signup/signup.js.map +1 -1
- package/lib/stories/decorators.js.map +1 -1
- package/lib/style.js.map +1 -1
- package/lib/style_multiSelect.js +67 -0
- package/lib/style_multiSelect.js.map +1 -0
- package/lib/table.js.map +1 -1
- package/lib/tabs.d.ts +1 -1
- package/lib/tabs.d.ts.map +1 -1
- package/lib/tabs.js +34 -21
- package/lib/tabs.js.map +1 -1
- package/lib/typings.d.js.map +1 -1
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/label.js +1 -1
- package/lib/utils/label.js.map +1 -1
- package/lib/versionInfo.d.ts +9 -9
- package/lib/versionInfo.js +14 -14
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons/iconLinks.js.map +1 -1
- package/lib/widgets/buttons.js.map +1 -1
- package/lib/widgets/dragAndDrop.js.map +1 -1
- package/lib/widgets/error.d.ts +0 -12
- package/lib/widgets/error.d.ts.map +1 -1
- package/lib/widgets/error.js +5 -0
- package/lib/widgets/error.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
- package/lib/widgets/forms/basic.js.map +1 -1
- package/lib/widgets/forms/comment.js.map +1 -1
- package/lib/widgets/forms/fieldFunction.js.map +1 -1
- package/lib/widgets/forms/fieldParams.js.map +1 -1
- package/lib/widgets/forms/formStyle.js.map +1 -1
- package/lib/widgets/forms.js +410 -187
- package/lib/widgets/forms.js.map +1 -1
- package/lib/widgets/index.js.map +1 -1
- package/lib/widgets/multiSelect.js +784 -0
- package/lib/widgets/multiSelect.js.map +1 -0
- package/lib/widgets/peoplePicker.js.map +1 -1
- package/lib/widgets/widgetHelpers.js.map +1 -1
- package/package.json +10 -6
package/lib/login/login.js
CHANGED
|
@@ -17,7 +17,9 @@ exports.loginStatusBox = loginStatusBox;
|
|
|
17
17
|
exports.newAppInstance = newAppInstance;
|
|
18
18
|
exports.registrationControl = registrationControl;
|
|
19
19
|
exports.registrationList = registrationList;
|
|
20
|
+
exports.renderScopeHeadingRow = renderScopeHeadingRow;
|
|
20
21
|
exports.renderSignInPopup = renderSignInPopup;
|
|
22
|
+
exports.scopeLabel = scopeLabel;
|
|
21
23
|
exports.selectWorkspace = selectWorkspace;
|
|
22
24
|
|
|
23
25
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
@@ -38,7 +40,7 @@ var _signup = require("../signup/signup.js");
|
|
|
38
40
|
|
|
39
41
|
var _style = require("../style");
|
|
40
42
|
|
|
41
|
-
var
|
|
43
|
+
var utils = _interopRequireWildcard(require("../utils"));
|
|
42
44
|
|
|
43
45
|
var widgets = _interopRequireWildcard(require("../widgets"));
|
|
44
46
|
|
|
@@ -46,39 +48,20 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
46
48
|
|
|
47
49
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
50
52
|
|
|
51
|
-
|
|
52
|
-
* Signing in, signing up, profile and preferences reloading
|
|
53
|
-
* Type index management
|
|
54
|
-
*
|
|
55
|
-
* Many functions in this module take a context object which
|
|
56
|
-
* holds various RDF symbols, add to it, and return a promise of it.
|
|
57
|
-
*
|
|
58
|
-
* * `me` RDF symbol for the user's WebID
|
|
59
|
-
* * `publicProfile` The user's public profile, iff loaded
|
|
60
|
-
* * `preferencesFile` The user's personal preference file, iff loaded
|
|
61
|
-
* * `index.public` The user's public type index file
|
|
62
|
-
* * `index.private` The user's private type index file
|
|
63
|
-
*
|
|
64
|
-
* Not RDF symbols:
|
|
65
|
-
* * `noun` A string in english for the type of thing -- like "address book"
|
|
66
|
-
* * `instance` An array of nodes which are existing instances
|
|
67
|
-
* * `containers` An array of nodes of containers of instances
|
|
68
|
-
* * `div` A DOM element where UI can be displayed
|
|
69
|
-
* * `statusArea` A DOM element (opt) progress stuff can be displayed, or error messages
|
|
70
|
-
* *
|
|
71
|
-
* * Vocabulary: "load" loads a file if it exists;
|
|
72
|
-
* * 'Ensure" CREATES the file if it does not exist (if it can) and then loads it.
|
|
73
|
-
* @packageDocumentation
|
|
74
|
-
*/
|
|
53
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
75
54
|
|
|
55
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
56
|
+
|
|
57
|
+
var store = _solidLogic.solidLogicSingleton.store;
|
|
76
58
|
/**
|
|
77
59
|
* Resolves with the logged in user's WebID
|
|
78
60
|
*
|
|
79
61
|
* @param context
|
|
80
62
|
*/
|
|
81
63
|
// used to be logIn
|
|
64
|
+
|
|
82
65
|
function ensureLoggedIn(context) {
|
|
83
66
|
var me = _solidLogic.authn.currentUser();
|
|
84
67
|
|
|
@@ -120,7 +103,7 @@ function ensureLoggedIn(context) {
|
|
|
120
103
|
// used to be logInLoadPreferences
|
|
121
104
|
|
|
122
105
|
|
|
123
|
-
function ensureLoadedPreferences(
|
|
106
|
+
function ensureLoadedPreferences(_x) {
|
|
124
107
|
return _ensureLoadedPreferences.apply(this, arguments);
|
|
125
108
|
}
|
|
126
109
|
/**
|
|
@@ -168,7 +151,7 @@ function _ensureLoadedPreferences() {
|
|
|
168
151
|
case 7:
|
|
169
152
|
context = _context4.sent;
|
|
170
153
|
_context4.next = 10;
|
|
171
|
-
return _solidLogic.
|
|
154
|
+
return (0, _solidLogic.loadPreferences)(context.me);
|
|
172
155
|
|
|
173
156
|
case 10:
|
|
174
157
|
preferencesFile = _context4.sent;
|
|
@@ -178,7 +161,7 @@ function _ensureLoadedPreferences() {
|
|
|
178
161
|
}
|
|
179
162
|
|
|
180
163
|
context.preferencesFile = preferencesFile;
|
|
181
|
-
_context4.next =
|
|
164
|
+
_context4.next = 51;
|
|
182
165
|
break;
|
|
183
166
|
|
|
184
167
|
case 15:
|
|
@@ -192,7 +175,7 @@ function _ensureLoadedPreferences() {
|
|
|
192
175
|
|
|
193
176
|
m2 = 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?';
|
|
194
177
|
(0, _log.alert)(m2);
|
|
195
|
-
_context4.next =
|
|
178
|
+
_context4.next = 51;
|
|
196
179
|
break;
|
|
197
180
|
|
|
198
181
|
case 22:
|
|
@@ -207,57 +190,53 @@ function _ensureLoadedPreferences() {
|
|
|
207
190
|
|
|
208
191
|
case 28:
|
|
209
192
|
if (!(_context4.t0 instanceof _solidLogic.SameOriginForbiddenError)) {
|
|
210
|
-
_context4.next =
|
|
193
|
+
_context4.next = 34;
|
|
211
194
|
break;
|
|
212
195
|
}
|
|
213
196
|
|
|
214
197
|
m2 = 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.';
|
|
215
198
|
debug.warn(m2);
|
|
216
|
-
_context4.
|
|
217
|
-
break;
|
|
199
|
+
return _context4.abrupt("return", context);
|
|
218
200
|
|
|
219
|
-
case
|
|
220
|
-
if (!(_context4.t0 instanceof _solidLogic.
|
|
221
|
-
_context4.next =
|
|
201
|
+
case 34:
|
|
202
|
+
if (!(_context4.t0 instanceof _solidLogic.NotEditableError)) {
|
|
203
|
+
_context4.next = 40;
|
|
222
204
|
break;
|
|
223
205
|
}
|
|
224
206
|
|
|
225
|
-
|
|
226
|
-
|
|
207
|
+
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
208
|
+
debug.warn(m2);
|
|
209
|
+
return _context4.abrupt("return", context);
|
|
210
|
+
|
|
211
|
+
case 40:
|
|
212
|
+
if (!(_context4.t0 instanceof _solidLogic.WebOperationError)) {
|
|
213
|
+
_context4.next = 45;
|
|
227
214
|
break;
|
|
228
215
|
}
|
|
229
216
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
_context4.next = 40;
|
|
234
|
-
break;
|
|
235
|
-
|
|
236
|
-
case 39:
|
|
237
|
-
throw new Error("User declined to create a preference file at ".concat(_context4.t0.preferencesFile || '(?)'));
|
|
238
|
-
|
|
239
|
-
case 40:
|
|
240
|
-
_context4.next = 48;
|
|
217
|
+
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
218
|
+
debug.warn(m2);
|
|
219
|
+
_context4.next = 51;
|
|
241
220
|
break;
|
|
242
221
|
|
|
243
|
-
case
|
|
222
|
+
case 45:
|
|
244
223
|
if (!(_context4.t0 instanceof _solidLogic.FetchError)) {
|
|
245
|
-
_context4.next =
|
|
224
|
+
_context4.next = 50;
|
|
246
225
|
break;
|
|
247
226
|
}
|
|
248
227
|
|
|
249
228
|
m2 = "Strange: Error ".concat(_context4.t0.status, " trying to read your preference file.").concat(_context4.t0.message);
|
|
250
229
|
(0, _log.alert)(m2);
|
|
251
|
-
_context4.next =
|
|
230
|
+
_context4.next = 51;
|
|
252
231
|
break;
|
|
253
232
|
|
|
254
|
-
case
|
|
233
|
+
case 50:
|
|
255
234
|
throw new Error("(via loadPrefs) ".concat(_context4.t0));
|
|
256
235
|
|
|
257
|
-
case
|
|
236
|
+
case 51:
|
|
258
237
|
return _context4.abrupt("return", context);
|
|
259
238
|
|
|
260
|
-
case
|
|
239
|
+
case 52:
|
|
261
240
|
case "end":
|
|
262
241
|
return _context4.stop();
|
|
263
242
|
}
|
|
@@ -267,15 +246,14 @@ function _ensureLoadedPreferences() {
|
|
|
267
246
|
return _ensureLoadedPreferences.apply(this, arguments);
|
|
268
247
|
}
|
|
269
248
|
|
|
270
|
-
function ensureLoadedProfile(
|
|
249
|
+
function ensureLoadedProfile(_x2) {
|
|
271
250
|
return _ensureLoadedProfile.apply(this, arguments);
|
|
272
251
|
}
|
|
273
252
|
/**
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
*/
|
|
253
|
+
* Returns promise of context with arrays of symbols
|
|
254
|
+
*
|
|
255
|
+
* leaving the `isPublic` param undefined will bring in community index things, too
|
|
256
|
+
*/
|
|
279
257
|
|
|
280
258
|
|
|
281
259
|
function _ensureLoadedProfile() {
|
|
@@ -309,7 +287,7 @@ function _ensureLoadedProfile() {
|
|
|
309
287
|
|
|
310
288
|
case 8:
|
|
311
289
|
_context5.next = 10;
|
|
312
|
-
return _solidLogic.
|
|
290
|
+
return (0, _solidLogic.loadProfile)(logInContext.me);
|
|
313
291
|
|
|
314
292
|
case 10:
|
|
315
293
|
context.publicProfile = _context5.sent;
|
|
@@ -339,210 +317,138 @@ function _ensureLoadedProfile() {
|
|
|
339
317
|
return _ensureLoadedProfile.apply(this, arguments);
|
|
340
318
|
}
|
|
341
319
|
|
|
342
|
-
function findAppInstances(_x4, _x5
|
|
320
|
+
function findAppInstances(_x3, _x4, _x5) {
|
|
343
321
|
return _findAppInstances.apply(this, arguments);
|
|
344
322
|
}
|
|
345
|
-
/**
|
|
346
|
-
* UI to control registration of instance
|
|
347
|
-
*/
|
|
348
|
-
|
|
349
323
|
|
|
350
324
|
function _findAppInstances() {
|
|
351
325
|
_findAppInstances = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(context, theClass, isPublic) {
|
|
352
|
-
var
|
|
326
|
+
var items;
|
|
353
327
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
354
328
|
while (1) {
|
|
355
329
|
switch (_context6.prev = _context6.next) {
|
|
356
330
|
case 0:
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
if (!(isPublic === undefined)) {
|
|
362
|
-
_context6.next = 7;
|
|
331
|
+
if (!context.me) {
|
|
332
|
+
_context6.next = 6;
|
|
363
333
|
break;
|
|
364
334
|
}
|
|
365
335
|
|
|
366
|
-
_context6.next =
|
|
367
|
-
return
|
|
336
|
+
_context6.next = 3;
|
|
337
|
+
return (0, _solidLogic.getScopedAppInstances)(theClass, context.me);
|
|
368
338
|
|
|
369
|
-
case
|
|
370
|
-
_context6.
|
|
371
|
-
|
|
339
|
+
case 3:
|
|
340
|
+
_context6.t0 = _context6.sent;
|
|
341
|
+
_context6.next = 7;
|
|
342
|
+
break;
|
|
372
343
|
|
|
373
344
|
case 6:
|
|
374
|
-
|
|
345
|
+
_context6.t0 = [];
|
|
375
346
|
|
|
376
347
|
case 7:
|
|
377
|
-
|
|
378
|
-
_context6.next = 10;
|
|
379
|
-
return isPublic ? ensureLoadedProfile(context) : ensureLoadedPreferences(context);
|
|
380
|
-
|
|
381
|
-
case 10:
|
|
382
|
-
_context6.next = 15;
|
|
383
|
-
break;
|
|
384
|
-
|
|
385
|
-
case 12:
|
|
386
|
-
_context6.prev = 12;
|
|
387
|
-
_context6.t0 = _context6["catch"](7);
|
|
388
|
-
widgets.complain(context, "loadIndex: login and load problem ".concat(_context6.t0));
|
|
348
|
+
items = _context6.t0;
|
|
389
349
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
break;
|
|
400
|
-
|
|
401
|
-
case 21:
|
|
402
|
-
_context6.prev = 21;
|
|
403
|
-
_context6.t1 = _context6["catch"](16);
|
|
404
|
-
debug.error(_context6.t1);
|
|
405
|
-
|
|
406
|
-
case 24:
|
|
407
|
-
index = context.index;
|
|
408
|
-
thisIndex = index[visibility];
|
|
409
|
-
registrations = thisIndex.map(function (ix) {
|
|
410
|
-
return _solidLogic.solidLogicSingleton.store.each(undefined, ns.solid('forClass'), theClass, ix);
|
|
411
|
-
}).reduce(function (acc, curr) {
|
|
412
|
-
return acc.concat(curr);
|
|
413
|
-
}, []);
|
|
414
|
-
instances = registrations.map(function (reg) {
|
|
415
|
-
return _solidLogic.solidLogicSingleton.store.each(reg, ns.solid('instance'));
|
|
416
|
-
}).reduce(function (acc, curr) {
|
|
417
|
-
return acc.concat(curr);
|
|
418
|
-
}, []);
|
|
419
|
-
containers = registrations.map(function (reg) {
|
|
420
|
-
return _solidLogic.solidLogicSingleton.store.each(reg, ns.solid('instanceContainer'));
|
|
421
|
-
}).reduce(function (acc, curr) {
|
|
422
|
-
return acc.concat(curr);
|
|
423
|
-
}, []);
|
|
424
|
-
context.instances = context.instances || [];
|
|
425
|
-
context.instances = unique(context.instances.concat(instances));
|
|
426
|
-
context.containers = context.containers || [];
|
|
427
|
-
context.containers = unique(context.containers.concat(containers));
|
|
428
|
-
|
|
429
|
-
if (containers.length) {
|
|
430
|
-
_context6.next = 35;
|
|
431
|
-
break;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
return _context6.abrupt("return", context);
|
|
435
|
-
|
|
436
|
-
case 35:
|
|
437
|
-
_context6.prev = 35;
|
|
438
|
-
_context6.next = 38;
|
|
439
|
-
return _solidLogic.solidLogicSingleton.load(containers);
|
|
440
|
-
|
|
441
|
-
case 38:
|
|
442
|
-
_context6.next = 45;
|
|
443
|
-
break;
|
|
444
|
-
|
|
445
|
-
case 40:
|
|
446
|
-
_context6.prev = 40;
|
|
447
|
-
_context6.t2 = _context6["catch"](35);
|
|
448
|
-
e = new Error("[FAI] Unable to load containers".concat(_context6.t2));
|
|
449
|
-
debug.log(e); // complain
|
|
450
|
-
|
|
451
|
-
widgets.complain(context, "Error looking for ".concat(_index.utils.label(theClass), ": ").concat(_context6.t2)); // but then ignore it
|
|
452
|
-
// throw new Error(e)
|
|
453
|
-
|
|
454
|
-
case 45:
|
|
455
|
-
i = 0;
|
|
456
|
-
|
|
457
|
-
case 46:
|
|
458
|
-
if (!(i < containers.length)) {
|
|
459
|
-
_context6.next = 56;
|
|
460
|
-
break;
|
|
350
|
+
if (isPublic === true) {
|
|
351
|
+
// old API - not recommended!
|
|
352
|
+
items = items.filter(function (item) {
|
|
353
|
+
return item.scope.label === 'public';
|
|
354
|
+
});
|
|
355
|
+
} else if (isPublic === false) {
|
|
356
|
+
items = items.filter(function (item) {
|
|
357
|
+
return item.scope.label === 'private';
|
|
358
|
+
});
|
|
461
359
|
}
|
|
462
360
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
_context6.next = 51;
|
|
466
|
-
return _solidLogic.solidLogicSingleton.getContainerMembers(cont.value);
|
|
467
|
-
|
|
468
|
-
case 51:
|
|
469
|
-
_context6.t4 = _context6.sent.map(function (uri) {
|
|
470
|
-
return _solidLogic.solidLogicSingleton.store.sym(uri);
|
|
361
|
+
context.instances = items.map(function (item) {
|
|
362
|
+
return item.instance;
|
|
471
363
|
});
|
|
472
|
-
context.instances = _context6.t3.concat.call(_context6.t3, _context6.t4);
|
|
473
|
-
|
|
474
|
-
case 53:
|
|
475
|
-
i++;
|
|
476
|
-
_context6.next = 46;
|
|
477
|
-
break;
|
|
478
|
-
|
|
479
|
-
case 56:
|
|
480
364
|
return _context6.abrupt("return", context);
|
|
481
365
|
|
|
482
|
-
case
|
|
366
|
+
case 11:
|
|
483
367
|
case "end":
|
|
484
368
|
return _context6.stop();
|
|
485
369
|
}
|
|
486
370
|
}
|
|
487
|
-
}, _callee6
|
|
371
|
+
}, _callee6);
|
|
488
372
|
}));
|
|
489
373
|
return _findAppInstances.apply(this, arguments);
|
|
490
374
|
}
|
|
491
375
|
|
|
492
|
-
function
|
|
493
|
-
|
|
376
|
+
function scopeLabel(context, scope) {
|
|
377
|
+
var mine = context.me && context.me.sameTerm(scope.agent);
|
|
378
|
+
var name = mine ? '' : utils.label(scope.agent) + ' ';
|
|
379
|
+
return "".concat(name).concat(scope.label);
|
|
494
380
|
}
|
|
495
381
|
/**
|
|
496
|
-
* UI to
|
|
382
|
+
* UI to control registration of instance
|
|
497
383
|
*/
|
|
498
384
|
|
|
499
385
|
|
|
386
|
+
function registrationControl(_x6, _x7, _x8) {
|
|
387
|
+
return _registrationControl.apply(this, arguments);
|
|
388
|
+
}
|
|
389
|
+
|
|
500
390
|
function _registrationControl() {
|
|
501
391
|
_registrationControl = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(context, instance, theClass) {
|
|
502
|
-
var dom, box,
|
|
392
|
+
var registrationStatements, renderScopeCheckbox, dom, box, me, scopes, msg, tbody, form, _iterator, _step, scope, row;
|
|
503
393
|
|
|
504
394
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
505
395
|
while (1) {
|
|
506
396
|
switch (_context7.prev = _context7.next) {
|
|
507
397
|
case 0:
|
|
398
|
+
renderScopeCheckbox = function _renderScopeCheckbox(scope) {
|
|
399
|
+
var statements = registrationStatements(scope.index);
|
|
400
|
+
var name = scopeLabel(context, scope);
|
|
401
|
+
var label = "".concat(name, " link to this ").concat(context.noun);
|
|
402
|
+
return widgets.buildCheckboxForm(context.dom, _solidLogic.solidLogicSingleton.store, label, null, statements, form, scope.index);
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
registrationStatements = function _registrationStatemen(index) {
|
|
406
|
+
var registrations = (0, _solidLogic.getRegistrations)(instance, theClass);
|
|
407
|
+
var reg = registrations.length ? registrations[0] : widgets.newThing(index);
|
|
408
|
+
return [(0, _rdflib.st)(reg, ns.solid('instance'), instance, index), (0, _rdflib.st)(reg, ns.solid('forClass'), theClass, index)];
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
/// / body of registrationControl
|
|
508
412
|
dom = context.dom;
|
|
509
413
|
|
|
510
414
|
if (!(!dom || !context.div)) {
|
|
511
|
-
_context7.next =
|
|
415
|
+
_context7.next = 5;
|
|
512
416
|
break;
|
|
513
417
|
}
|
|
514
418
|
|
|
515
|
-
|
|
419
|
+
throw new Error('registrationControl: need dom and div');
|
|
516
420
|
|
|
517
|
-
case
|
|
421
|
+
case 5:
|
|
518
422
|
box = dom.createElement('div');
|
|
519
423
|
context.div.appendChild(box);
|
|
520
424
|
context.me = _solidLogic.authn.currentUser(); // @@
|
|
521
425
|
|
|
522
|
-
|
|
523
|
-
|
|
426
|
+
me = context.me;
|
|
427
|
+
|
|
428
|
+
if (me) {
|
|
429
|
+
_context7.next = 12;
|
|
524
430
|
break;
|
|
525
431
|
}
|
|
526
432
|
|
|
527
433
|
box.innerHTML = '<p style="margin:2em;">(Log in to save a link to this)</p>';
|
|
528
434
|
return _context7.abrupt("return", context);
|
|
529
435
|
|
|
530
|
-
case 9:
|
|
531
|
-
_context7.prev = 9;
|
|
532
|
-
_context7.next = 12;
|
|
533
|
-
return (0, _solidLogic.ensureTypeIndexes)(context);
|
|
534
|
-
|
|
535
436
|
case 12:
|
|
536
|
-
|
|
537
|
-
_context7.next =
|
|
538
|
-
|
|
437
|
+
_context7.prev = 12;
|
|
438
|
+
_context7.next = 15;
|
|
439
|
+
return (0, _solidLogic.loadAllTypeIndexes)(me);
|
|
539
440
|
|
|
540
441
|
case 15:
|
|
541
|
-
|
|
542
|
-
_context7.
|
|
442
|
+
scopes = _context7.sent;
|
|
443
|
+
_context7.next = 23;
|
|
444
|
+
break;
|
|
445
|
+
|
|
446
|
+
case 18:
|
|
447
|
+
_context7.prev = 18;
|
|
448
|
+
_context7.t0 = _context7["catch"](12);
|
|
543
449
|
|
|
544
450
|
if (context.div && context.preferencesFileError) {
|
|
545
|
-
msg = '(
|
|
451
|
+
msg = '(Lists of stuff not available)';
|
|
546
452
|
context.div.appendChild(dom.createElement('p')).textContent = msg;
|
|
547
453
|
} else if (context.div) {
|
|
548
454
|
msg = "registrationControl: Type indexes not available: ".concat(_context7.t0);
|
|
@@ -550,168 +456,201 @@ function _registrationControl() {
|
|
|
550
456
|
}
|
|
551
457
|
|
|
552
458
|
debug.log(msg);
|
|
459
|
+
return _context7.abrupt("return", context);
|
|
553
460
|
|
|
554
|
-
case
|
|
555
|
-
box.innerHTML = '<table><tbody
|
|
461
|
+
case 23:
|
|
462
|
+
box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
|
|
556
463
|
|
|
557
464
|
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid gray 0.05em;');
|
|
558
465
|
tbody = box.children[0].children[0];
|
|
559
466
|
form = new _rdflib.BlankNode(); // @@ say for now
|
|
560
467
|
|
|
561
|
-
|
|
562
|
-
var registrations = _solidLogic.solidLogicSingleton.getRegistrations(instance, theClass);
|
|
563
|
-
|
|
564
|
-
var reg = registrations.length ? registrations[0] : widgets.newThing(index);
|
|
565
|
-
return [(0, _rdflib.st)(reg, ns.solid('instance'), instance, index), (0, _rdflib.st)(reg, ns.solid('forClass'), theClass, index)];
|
|
566
|
-
};
|
|
468
|
+
_iterator = _createForOfIteratorHelper(scopes);
|
|
567
469
|
|
|
568
470
|
try {
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
if (context2.index && context2.index["private"] && context2.index["private"].length > 0) {
|
|
576
|
-
index = context2.index["private"][0];
|
|
577
|
-
statements = registrationStatements(index);
|
|
578
|
-
tbody.children[1].appendChild(widgets.buildCheckboxForm(context2.dom, _solidLogic.solidLogicSingleton.store, "Personal note of this ".concat(context2.noun), null, statements, form, index));
|
|
471
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
472
|
+
scope = _step.value;
|
|
473
|
+
row = tbody.appendChild(dom.createElement('tr'));
|
|
474
|
+
row.appendChild(renderScopeCheckbox(scope)); // @@ index
|
|
579
475
|
}
|
|
580
|
-
} catch (
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
context.div.appendChild(widgets.errorMessageBlock(context.dom, e));
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
debug.log(_msg);
|
|
476
|
+
} catch (err) {
|
|
477
|
+
_iterator.e(err);
|
|
478
|
+
} finally {
|
|
479
|
+
_iterator.f();
|
|
588
480
|
}
|
|
589
481
|
|
|
590
|
-
return _context7.abrupt("return",
|
|
482
|
+
return _context7.abrupt("return", context);
|
|
591
483
|
|
|
592
|
-
case
|
|
484
|
+
case 30:
|
|
593
485
|
case "end":
|
|
594
486
|
return _context7.stop();
|
|
595
487
|
}
|
|
596
488
|
}
|
|
597
|
-
}, _callee7, null, [[
|
|
489
|
+
}, _callee7, null, [[12, 18]]);
|
|
598
490
|
}));
|
|
599
491
|
return _registrationControl.apply(this, arguments);
|
|
600
492
|
}
|
|
601
493
|
|
|
602
|
-
function
|
|
603
|
-
|
|
494
|
+
function renderScopeHeadingRow(context, store, scope) {
|
|
495
|
+
var backgroundColor = {
|
|
496
|
+
"private": '#fee',
|
|
497
|
+
"public": '#efe'
|
|
498
|
+
};
|
|
499
|
+
var dom = context.dom;
|
|
500
|
+
var name = scopeLabel(context, scope);
|
|
501
|
+
var row = dom.createElement('tr');
|
|
502
|
+
var cell = row.appendChild(dom.createElement('td'));
|
|
503
|
+
cell.setAttribute('colspan', '3');
|
|
504
|
+
cell.style.backgoundColor = backgroundColor[scope.label] || 'white';
|
|
505
|
+
var header = cell.appendChild(dom.createElement('h3'));
|
|
506
|
+
header.textContent = name + ' links';
|
|
507
|
+
header.style.textAlign = 'left';
|
|
508
|
+
return row;
|
|
604
509
|
}
|
|
510
|
+
/**
|
|
511
|
+
* UI to List at all registered things
|
|
512
|
+
*/
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
function registrationList(_x9, _x10) {
|
|
516
|
+
return _registrationList.apply(this, arguments);
|
|
517
|
+
} // registrationList
|
|
518
|
+
|
|
605
519
|
|
|
606
520
|
function _registrationList() {
|
|
607
|
-
_registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
608
|
-
var dom, div, box;
|
|
609
|
-
|
|
521
|
+
_registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(context, options) {
|
|
522
|
+
var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop;
|
|
523
|
+
|
|
524
|
+
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
|
610
525
|
while (1) {
|
|
611
|
-
switch (
|
|
526
|
+
switch (_context9.prev = _context9.next) {
|
|
612
527
|
case 0:
|
|
613
|
-
dom =
|
|
614
|
-
div =
|
|
528
|
+
dom = context.dom;
|
|
529
|
+
div = context.div;
|
|
615
530
|
box = dom.createElement('div');
|
|
616
531
|
div.appendChild(box);
|
|
617
|
-
|
|
532
|
+
context.me = _solidLogic.authn.currentUser(); // @@
|
|
618
533
|
|
|
619
|
-
if (
|
|
620
|
-
|
|
534
|
+
if (context.me) {
|
|
535
|
+
_context9.next = 8;
|
|
621
536
|
break;
|
|
622
537
|
}
|
|
623
538
|
|
|
624
539
|
box.innerHTML = '<p style="margin:2em;">(Log in list your stuff)</p>';
|
|
625
|
-
return
|
|
540
|
+
return _context9.abrupt("return", context);
|
|
626
541
|
|
|
627
542
|
case 8:
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
// tbody will be inserted anyway
|
|
632
|
-
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid #eee 0.5em;');
|
|
633
|
-
var table = box.firstChild;
|
|
634
|
-
var ix = [];
|
|
635
|
-
var sts = [];
|
|
636
|
-
var vs = ['private', 'public'];
|
|
637
|
-
vs.forEach(function (visibility) {
|
|
638
|
-
if (context.index && context.index[visibility].length > 0 && options[visibility]) {
|
|
639
|
-
ix = ix.concat(context.index[visibility][0]);
|
|
640
|
-
sts = sts.concat(_solidLogic.solidLogicSingleton.store.statementsMatching(undefined, ns.solid('instance'), undefined, context.index[visibility][0]));
|
|
641
|
-
}
|
|
642
|
-
});
|
|
543
|
+
_context9.next = 10;
|
|
544
|
+
return (0, _solidLogic.loadAllTypeIndexes)(store, context.me);
|
|
643
545
|
|
|
644
|
-
|
|
645
|
-
|
|
546
|
+
case 10:
|
|
547
|
+
scopes = _context9.sent;
|
|
548
|
+
// includes community indexes
|
|
549
|
+
// console.log('@@ registrationList ', scopes)
|
|
550
|
+
box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
|
|
551
|
+
|
|
552
|
+
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid #eee 0.5em;');
|
|
553
|
+
table = box.firstChild;
|
|
554
|
+
tbody = table.firstChild;
|
|
555
|
+
_iterator2 = _createForOfIteratorHelper(scopes);
|
|
556
|
+
_context9.prev = 16;
|
|
557
|
+
|
|
558
|
+
_iterator2.s();
|
|
559
|
+
|
|
560
|
+
case 18:
|
|
561
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
562
|
+
_context9.next = 30;
|
|
563
|
+
break;
|
|
564
|
+
}
|
|
646
565
|
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
566
|
+
scope = _step2.value;
|
|
567
|
+
// need some predicate for listing/adding agents
|
|
568
|
+
headingRow = renderScopeHeadingRow(context, store, scope);
|
|
569
|
+
tbody.appendChild(headingRow);
|
|
570
|
+
_context9.next = 24;
|
|
571
|
+
return (0, _solidLogic.getScopedAppsFromIndex)(scope, options.type || null);
|
|
653
572
|
|
|
573
|
+
case 24:
|
|
574
|
+
items = _context9.sent;
|
|
575
|
+
// any class
|
|
576
|
+
if (items.length === 0) headingRow.style.display = 'none'; // console.log(`registrationList: @@ instance items for class ${options.type || 'undefined' }:`, items)
|
|
654
577
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
578
|
+
_iterator3 = _createForOfIteratorHelper(items);
|
|
579
|
+
|
|
580
|
+
try {
|
|
581
|
+
_loop = function _loop() {
|
|
582
|
+
var item = _step3.value;
|
|
583
|
+
var row = widgets.personTR(dom, ns.solid('instance'), item.instance, {
|
|
584
|
+
deleteFunction: function () {
|
|
585
|
+
var _deleteFunction = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
|
586
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
587
|
+
while (1) {
|
|
588
|
+
switch (_context8.prev = _context8.next) {
|
|
589
|
+
case 0:
|
|
590
|
+
_context8.next = 2;
|
|
591
|
+
return (0, _solidLogic.deleteTypeIndexRegistration)(item);
|
|
592
|
+
|
|
593
|
+
case 2:
|
|
594
|
+
tbody.removeChild(row);
|
|
595
|
+
|
|
596
|
+
case 3:
|
|
597
|
+
case "end":
|
|
598
|
+
return _context8.stop();
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}, _callee8);
|
|
602
|
+
}));
|
|
603
|
+
|
|
604
|
+
function deleteFunction() {
|
|
605
|
+
return _deleteFunction.apply(this, arguments);
|
|
661
606
|
}
|
|
662
607
|
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
}
|
|
669
|
-
});
|
|
670
|
-
}
|
|
671
|
-
}));
|
|
608
|
+
return deleteFunction;
|
|
609
|
+
}()
|
|
610
|
+
});
|
|
611
|
+
row.children[0].style.paddingLeft = '3em';
|
|
612
|
+
tbody.appendChild(row);
|
|
672
613
|
};
|
|
673
614
|
|
|
674
|
-
for (
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
if (containers.length) {
|
|
683
|
-
fetcher.load(containers).then(function(xhrs){
|
|
684
|
-
for (const i=0; i<containers.length; i++) {
|
|
685
|
-
const cont = containers[i];
|
|
686
|
-
instances = instances.concat(solidLogicSingleton.store.each(cont, ns.ldp('contains')));
|
|
687
|
-
}
|
|
688
|
-
});
|
|
689
|
-
}
|
|
690
|
-
*/
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
// registrationList
|
|
694
|
-
|
|
695
|
-
/*
|
|
696
|
-
//const containers = solidLogicSingleton.store.each(theClass, ns.solid('instanceContainer'));
|
|
697
|
-
if (containers.length) {
|
|
698
|
-
fetcher.load(containers).then(function(xhrs){
|
|
699
|
-
for (const i=0; i<containers.length; i++) {
|
|
700
|
-
const cont = containers[i];
|
|
701
|
-
instances = instances.concat(solidLogicSingleton.store.each(cont, ns.ldp('contains')));
|
|
702
|
-
}
|
|
703
|
-
});
|
|
704
|
-
}
|
|
705
|
-
*/
|
|
706
|
-
return context;
|
|
707
|
-
}));
|
|
615
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
616
|
+
_loop();
|
|
617
|
+
}
|
|
618
|
+
} catch (err) {
|
|
619
|
+
_iterator3.e(err);
|
|
620
|
+
} finally {
|
|
621
|
+
_iterator3.f();
|
|
622
|
+
}
|
|
708
623
|
|
|
709
|
-
case
|
|
624
|
+
case 28:
|
|
625
|
+
_context9.next = 18;
|
|
626
|
+
break;
|
|
627
|
+
|
|
628
|
+
case 30:
|
|
629
|
+
_context9.next = 35;
|
|
630
|
+
break;
|
|
631
|
+
|
|
632
|
+
case 32:
|
|
633
|
+
_context9.prev = 32;
|
|
634
|
+
_context9.t0 = _context9["catch"](16);
|
|
635
|
+
|
|
636
|
+
_iterator2.e(_context9.t0);
|
|
637
|
+
|
|
638
|
+
case 35:
|
|
639
|
+
_context9.prev = 35;
|
|
640
|
+
|
|
641
|
+
_iterator2.f();
|
|
642
|
+
|
|
643
|
+
return _context9.finish(35);
|
|
644
|
+
|
|
645
|
+
case 38:
|
|
646
|
+
return _context9.abrupt("return", context);
|
|
647
|
+
|
|
648
|
+
case 39:
|
|
710
649
|
case "end":
|
|
711
|
-
return
|
|
650
|
+
return _context9.stop();
|
|
712
651
|
}
|
|
713
652
|
}
|
|
714
|
-
},
|
|
653
|
+
}, _callee9, null, [[16, 32, 35, 38]]);
|
|
715
654
|
}));
|
|
716
655
|
return _registrationList.apply(this, arguments);
|
|
717
656
|
}
|
|
@@ -868,7 +807,7 @@ function renderSignInPopup(dom) {
|
|
|
868
807
|
}, _callee, null, [[0, 8]]);
|
|
869
808
|
}));
|
|
870
809
|
|
|
871
|
-
return function loginToIssuer(
|
|
810
|
+
return function loginToIssuer(_x11) {
|
|
872
811
|
return _ref.apply(this, arguments);
|
|
873
812
|
};
|
|
874
813
|
}();
|
|
@@ -1155,7 +1094,7 @@ function selectWorkspace(dom, appDetails, callbackWS) {
|
|
|
1155
1094
|
|
|
1156
1095
|
function displayOptions(context) {
|
|
1157
1096
|
// console.log('displayOptions!', context)
|
|
1158
|
-
function makeNewWorkspace(
|
|
1097
|
+
function makeNewWorkspace(_x12) {
|
|
1159
1098
|
return _makeNewWorkspace.apply(this, arguments);
|
|
1160
1099
|
} // const status = ''
|
|
1161
1100
|
|
|
@@ -1424,77 +1363,77 @@ function getUserRoles() {
|
|
|
1424
1363
|
|
|
1425
1364
|
|
|
1426
1365
|
function _getUserRoles() {
|
|
1427
|
-
_getUserRoles = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
1366
|
+
_getUserRoles = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
|
1428
1367
|
var _yield$ensureLoadedPr, me, preferencesFile, preferencesFileError;
|
|
1429
1368
|
|
|
1430
|
-
return _regenerator["default"].wrap(function
|
|
1369
|
+
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
|
1431
1370
|
while (1) {
|
|
1432
|
-
switch (
|
|
1371
|
+
switch (_context10.prev = _context10.next) {
|
|
1433
1372
|
case 0:
|
|
1434
|
-
|
|
1435
|
-
|
|
1373
|
+
_context10.prev = 0;
|
|
1374
|
+
_context10.next = 3;
|
|
1436
1375
|
return ensureLoadedPreferences({});
|
|
1437
1376
|
|
|
1438
1377
|
case 3:
|
|
1439
|
-
_yield$ensureLoadedPr =
|
|
1378
|
+
_yield$ensureLoadedPr = _context10.sent;
|
|
1440
1379
|
me = _yield$ensureLoadedPr.me;
|
|
1441
1380
|
preferencesFile = _yield$ensureLoadedPr.preferencesFile;
|
|
1442
1381
|
preferencesFileError = _yield$ensureLoadedPr.preferencesFileError;
|
|
1443
1382
|
|
|
1444
1383
|
if (!(!preferencesFile || preferencesFileError)) {
|
|
1445
|
-
|
|
1384
|
+
_context10.next = 9;
|
|
1446
1385
|
break;
|
|
1447
1386
|
}
|
|
1448
1387
|
|
|
1449
1388
|
throw new Error(preferencesFileError);
|
|
1450
1389
|
|
|
1451
1390
|
case 9:
|
|
1452
|
-
return
|
|
1391
|
+
return _context10.abrupt("return", _solidLogic.solidLogicSingleton.store.each(me, ns.rdf('type'), null, preferencesFile.doc()));
|
|
1453
1392
|
|
|
1454
1393
|
case 12:
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
debug.warn('Unable to fetch your preferences - this was the error: ',
|
|
1394
|
+
_context10.prev = 12;
|
|
1395
|
+
_context10.t0 = _context10["catch"](0);
|
|
1396
|
+
debug.warn('Unable to fetch your preferences - this was the error: ', _context10.t0);
|
|
1458
1397
|
|
|
1459
1398
|
case 15:
|
|
1460
|
-
return
|
|
1399
|
+
return _context10.abrupt("return", []);
|
|
1461
1400
|
|
|
1462
1401
|
case 16:
|
|
1463
1402
|
case "end":
|
|
1464
|
-
return
|
|
1403
|
+
return _context10.stop();
|
|
1465
1404
|
}
|
|
1466
1405
|
}
|
|
1467
|
-
},
|
|
1406
|
+
}, _callee10, null, [[0, 12]]);
|
|
1468
1407
|
}));
|
|
1469
1408
|
return _getUserRoles.apply(this, arguments);
|
|
1470
1409
|
}
|
|
1471
1410
|
|
|
1472
|
-
function filterAvailablePanes(
|
|
1411
|
+
function filterAvailablePanes(_x13) {
|
|
1473
1412
|
return _filterAvailablePanes.apply(this, arguments);
|
|
1474
1413
|
}
|
|
1475
1414
|
|
|
1476
1415
|
function _filterAvailablePanes() {
|
|
1477
|
-
_filterAvailablePanes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
1416
|
+
_filterAvailablePanes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(panes) {
|
|
1478
1417
|
var userRoles;
|
|
1479
|
-
return _regenerator["default"].wrap(function
|
|
1418
|
+
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
|
1480
1419
|
while (1) {
|
|
1481
|
-
switch (
|
|
1420
|
+
switch (_context11.prev = _context11.next) {
|
|
1482
1421
|
case 0:
|
|
1483
|
-
|
|
1422
|
+
_context11.next = 2;
|
|
1484
1423
|
return getUserRoles();
|
|
1485
1424
|
|
|
1486
1425
|
case 2:
|
|
1487
|
-
userRoles =
|
|
1488
|
-
return
|
|
1426
|
+
userRoles = _context11.sent;
|
|
1427
|
+
return _context11.abrupt("return", panes.filter(function (pane) {
|
|
1489
1428
|
return isMatchingAudience(pane, userRoles);
|
|
1490
1429
|
}));
|
|
1491
1430
|
|
|
1492
1431
|
case 4:
|
|
1493
1432
|
case "end":
|
|
1494
|
-
return
|
|
1433
|
+
return _context11.stop();
|
|
1495
1434
|
}
|
|
1496
1435
|
}
|
|
1497
|
-
},
|
|
1436
|
+
}, _callee11);
|
|
1498
1437
|
}));
|
|
1499
1438
|
return _filterAvailablePanes.apply(this, arguments);
|
|
1500
1439
|
}
|