solid-ui 2.4.22-ecb6aa47 → 2.4.22-efbe9e52

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 (60) hide show
  1. package/dist/main.js +39379 -39203
  2. package/dist/main.js.map +1 -1
  3. package/lib/acl/access-controller.js +9 -14
  4. package/lib/acl/access-controller.js.map +1 -1
  5. package/lib/acl/access-groups.js +10 -15
  6. package/lib/acl/access-groups.js.map +1 -1
  7. package/lib/acl/acl-control.js +9 -13
  8. package/lib/acl/acl-control.js.map +1 -1
  9. package/lib/acl/acl.js +7 -11
  10. package/lib/acl/acl.js.map +1 -1
  11. package/lib/acl/add-agent-buttons.js +13 -18
  12. package/lib/acl/add-agent-buttons.js.map +1 -1
  13. package/lib/chat/bookmarks.js +18 -21
  14. package/lib/chat/bookmarks.js.map +1 -1
  15. package/lib/chat/chatLogic.js +9 -15
  16. package/lib/chat/chatLogic.js.map +1 -1
  17. package/lib/chat/dateFolder.js +12 -17
  18. package/lib/chat/dateFolder.js.map +1 -1
  19. package/lib/chat/infinite.js +29 -37
  20. package/lib/chat/infinite.js.map +1 -1
  21. package/lib/chat/message.js +14 -14
  22. package/lib/chat/message.js.map +1 -1
  23. package/lib/chat/messageTools.js +10 -23
  24. package/lib/chat/messageTools.js.map +1 -1
  25. package/lib/chat/thread.js +4 -9
  26. package/lib/chat/thread.js.map +1 -1
  27. package/lib/footer/index.js +8 -10
  28. package/lib/footer/index.js.map +1 -1
  29. package/lib/header/index.js +9 -17
  30. package/lib/header/index.js.map +1 -1
  31. package/lib/iconBase.js +2 -3
  32. package/lib/iconBase.js.map +1 -1
  33. package/lib/login/login.d.ts +8 -9
  34. package/lib/login/login.d.ts.map +1 -1
  35. package/lib/login/login.js +313 -294
  36. package/lib/login/login.js.map +1 -1
  37. package/lib/media/media-capture.js +4 -20
  38. package/lib/media/media-capture.js.map +1 -1
  39. package/lib/utils/headerFooterHelpers.js +5 -7
  40. package/lib/utils/headerFooterHelpers.js.map +1 -1
  41. package/lib/versionInfo.d.ts +9 -9
  42. package/lib/versionInfo.js +13 -13
  43. package/lib/versionInfo.js.map +1 -1
  44. package/lib/widgets/error.d.ts +12 -0
  45. package/lib/widgets/error.d.ts.map +1 -1
  46. package/lib/widgets/error.js +0 -5
  47. package/lib/widgets/error.js.map +1 -1
  48. package/lib/widgets/forms/autocomplete/autocompleteBar.js +17 -15
  49. package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
  50. package/lib/widgets/forms/autocomplete/autocompleteField.js +5 -8
  51. package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
  52. package/lib/widgets/forms/autocomplete/autocompletePicker.js +21 -19
  53. package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
  54. package/lib/widgets/forms/autocomplete/language.js +8 -15
  55. package/lib/widgets/forms/autocomplete/language.js.map +1 -1
  56. package/lib/widgets/forms/autocomplete/publicData.js +22 -27
  57. package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
  58. package/lib/widgets/forms.js +48 -34
  59. package/lib/widgets/forms.js.map +1 -1
  60. package/package.json +4 -6
@@ -17,13 +17,9 @@ exports.loginStatusBox = loginStatusBox;
17
17
  exports.newAppInstance = newAppInstance;
18
18
  exports.registrationControl = registrationControl;
19
19
  exports.registrationList = registrationList;
20
- exports.renderScopeHeadingRow = renderScopeHeadingRow;
21
20
  exports.renderSignInPopup = renderSignInPopup;
22
- exports.scopeLabel = scopeLabel;
23
21
  exports.selectWorkspace = selectWorkspace;
24
22
 
25
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
26
-
27
23
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
28
24
 
29
25
  var _rdflib = require("rdflib");
@@ -40,7 +36,7 @@ var _signup = require("../signup/signup.js");
40
36
 
41
37
  var _style = require("../style");
42
38
 
43
- var utils = _interopRequireWildcard(require("../utils"));
39
+ var _index = require("../utils/index");
44
40
 
45
41
  var widgets = _interopRequireWildcard(require("../widgets"));
46
42
 
@@ -48,20 +44,14 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
48
44
 
49
45
  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; }
50
46
 
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; } } }; }
52
-
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); }
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; }
47
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
56
48
 
57
- var store = _solidLogic.solidLogicSingleton.store;
58
49
  /**
59
50
  * Resolves with the logged in user's WebID
60
51
  *
61
52
  * @param context
62
53
  */
63
54
  // used to be logIn
64
-
65
55
  function ensureLoggedIn(context) {
66
56
  var me = _solidLogic.authn.currentUser();
67
57
 
@@ -103,7 +93,7 @@ function ensureLoggedIn(context) {
103
93
  // used to be logInLoadPreferences
104
94
 
105
95
 
106
- function ensureLoadedPreferences(_x) {
96
+ function ensureLoadedPreferences(_x2) {
107
97
  return _ensureLoadedPreferences.apply(this, arguments);
108
98
  }
109
99
  /**
@@ -117,9 +107,9 @@ function ensureLoadedPreferences(_x) {
117
107
 
118
108
 
119
109
  function _ensureLoadedPreferences() {
120
- _ensureLoadedPreferences = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(context) {
110
+ _ensureLoadedPreferences = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(context) {
121
111
  var statusArea, progressDisplay, complain, preferencesFile, m2;
122
- return _regenerator["default"].wrap(function _callee4$(_context4) {
112
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
123
113
  while (1) {
124
114
  switch (_context4.prev = _context4.next) {
125
115
  case 0:
@@ -151,7 +141,7 @@ function _ensureLoadedPreferences() {
151
141
  case 7:
152
142
  context = _context4.sent;
153
143
  _context4.next = 10;
154
- return (0, _solidLogic.loadPreferences)(context.me);
144
+ return _solidLogic.solidLogicSingleton.loadPreferences(context.me);
155
145
 
156
146
  case 10:
157
147
  preferencesFile = _context4.sent;
@@ -161,7 +151,7 @@ function _ensureLoadedPreferences() {
161
151
  }
162
152
 
163
153
  context.preferencesFile = preferencesFile;
164
- _context4.next = 51;
154
+ _context4.next = 48;
165
155
  break;
166
156
 
167
157
  case 15:
@@ -175,7 +165,7 @@ function _ensureLoadedPreferences() {
175
165
 
176
166
  m2 = 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?';
177
167
  (0, _log.alert)(m2);
178
- _context4.next = 51;
168
+ _context4.next = 48;
179
169
  break;
180
170
 
181
171
  case 22:
@@ -190,53 +180,57 @@ function _ensureLoadedPreferences() {
190
180
 
191
181
  case 28:
192
182
  if (!(_context4.t0 instanceof _solidLogic.SameOriginForbiddenError)) {
193
- _context4.next = 34;
183
+ _context4.next = 33;
194
184
  break;
195
185
  }
196
186
 
197
187
  m2 = 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.';
198
188
  debug.warn(m2);
199
- return _context4.abrupt("return", context);
189
+ _context4.next = 48;
190
+ break;
200
191
 
201
- case 34:
202
- if (!(_context4.t0 instanceof _solidLogic.NotEditableError)) {
203
- _context4.next = 40;
192
+ case 33:
193
+ if (!(_context4.t0 instanceof _solidLogic.NotFoundError)) {
194
+ _context4.next = 42;
204
195
  break;
205
196
  }
206
197
 
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;
198
+ if (!confirm("You do not currently have a preference file. OK for me to create an empty one? ".concat(_context4.t0.preferencesFile || ''))) {
199
+ _context4.next = 39;
214
200
  break;
215
201
  }
216
202
 
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;
203
+ // @@@ code me ... weird to have a name of the file but no file
204
+ (0, _log.alert)("Sorry; I am not prepared to do this. Please create an empty file at ".concat(_context4.t0.preferencesFile || '(?)'));
205
+ complain(new Error('Sorry; no code yet to create a preference file at '));
206
+ _context4.next = 40;
220
207
  break;
221
208
 
222
- case 45:
209
+ case 39:
210
+ throw new Error("User declined to create a preference file at ".concat(_context4.t0.preferencesFile || '(?)'));
211
+
212
+ case 40:
213
+ _context4.next = 48;
214
+ break;
215
+
216
+ case 42:
223
217
  if (!(_context4.t0 instanceof _solidLogic.FetchError)) {
224
- _context4.next = 50;
218
+ _context4.next = 47;
225
219
  break;
226
220
  }
227
221
 
228
222
  m2 = "Strange: Error ".concat(_context4.t0.status, " trying to read your preference file.").concat(_context4.t0.message);
229
223
  (0, _log.alert)(m2);
230
- _context4.next = 51;
224
+ _context4.next = 48;
231
225
  break;
232
226
 
233
- case 50:
227
+ case 47:
234
228
  throw new Error("(via loadPrefs) ".concat(_context4.t0));
235
229
 
236
- case 51:
230
+ case 48:
237
231
  return _context4.abrupt("return", context);
238
232
 
239
- case 52:
233
+ case 49:
240
234
  case "end":
241
235
  return _context4.stop();
242
236
  }
@@ -246,20 +240,21 @@ function _ensureLoadedPreferences() {
246
240
  return _ensureLoadedPreferences.apply(this, arguments);
247
241
  }
248
242
 
249
- function ensureLoadedProfile(_x2) {
243
+ function ensureLoadedProfile(_x3) {
250
244
  return _ensureLoadedProfile.apply(this, arguments);
251
245
  }
252
246
  /**
253
- * Returns promise of context with arrays of symbols
254
- *
255
- * leaving the `isPublic` param undefined will bring in community index things, too
256
- */
247
+ * Returns promise of context with arrays of symbols
248
+ *
249
+ * 2016-12-11 change to include forClass arc a la
250
+ * https://github.com/solid/solid/blob/main/proposals/data-discovery.md
251
+ */
257
252
 
258
253
 
259
254
  function _ensureLoadedProfile() {
260
- _ensureLoadedProfile = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(context) {
255
+ _ensureLoadedProfile = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(context) {
261
256
  var logInContext;
262
- return _regenerator["default"].wrap(function _callee5$(_context5) {
257
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
263
258
  while (1) {
264
259
  switch (_context5.prev = _context5.next) {
265
260
  case 0:
@@ -287,7 +282,7 @@ function _ensureLoadedProfile() {
287
282
 
288
283
  case 8:
289
284
  _context5.next = 10;
290
- return (0, _solidLogic.loadProfile)(logInContext.me);
285
+ return _solidLogic.solidLogicSingleton.loadProfile(logInContext.me);
291
286
 
292
287
  case 10:
293
288
  context.publicProfile = _context5.sent;
@@ -317,138 +312,210 @@ function _ensureLoadedProfile() {
317
312
  return _ensureLoadedProfile.apply(this, arguments);
318
313
  }
319
314
 
320
- function findAppInstances(_x3, _x4, _x5) {
315
+ function findAppInstances(_x4, _x5, _x6) {
321
316
  return _findAppInstances.apply(this, arguments);
322
317
  }
318
+ /**
319
+ * UI to control registration of instance
320
+ */
321
+
323
322
 
324
323
  function _findAppInstances() {
325
- _findAppInstances = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(context, theClass, isPublic) {
326
- var items;
327
- return _regenerator["default"].wrap(function _callee6$(_context6) {
324
+ _findAppInstances = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(context, theClass, isPublic) {
325
+ var visibility, index, thisIndex, registrations, instances, containers, unique, e, i, cont;
326
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
328
327
  while (1) {
329
328
  switch (_context6.prev = _context6.next) {
330
329
  case 0:
331
- if (!context.me) {
332
- _context6.next = 6;
330
+ unique = function _unique(arr) {
331
+ return Array.from(new Set(arr));
332
+ };
333
+
334
+ if (!(isPublic === undefined)) {
335
+ _context6.next = 7;
333
336
  break;
334
337
  }
335
338
 
336
- _context6.next = 3;
337
- return (0, _solidLogic.getScopedAppInstances)(theClass, context.me);
339
+ _context6.next = 4;
340
+ return findAppInstances(context, theClass, true);
338
341
 
339
- case 3:
340
- _context6.t0 = _context6.sent;
341
- _context6.next = 7;
342
- break;
342
+ case 4:
343
+ _context6.next = 6;
344
+ return findAppInstances(context, theClass, false);
343
345
 
344
346
  case 6:
345
- _context6.t0 = [];
347
+ return _context6.abrupt("return", context);
346
348
 
347
349
  case 7:
348
- items = _context6.t0;
350
+ _context6.prev = 7;
351
+ _context6.next = 10;
352
+ return isPublic ? ensureLoadedProfile(context) : ensureLoadedPreferences(context);
349
353
 
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
- });
354
+ case 10:
355
+ _context6.next = 15;
356
+ break;
357
+
358
+ case 12:
359
+ _context6.prev = 12;
360
+ _context6.t0 = _context6["catch"](7);
361
+ widgets.complain(context, "loadIndex: login and load problem ".concat(_context6.t0));
362
+
363
+ case 15:
364
+ // console.log('awaited LogInLoad!', context)
365
+ visibility = isPublic ? 'public' : 'private';
366
+ _context6.prev = 16;
367
+ _context6.next = 19;
368
+ return (0, _solidLogic.loadIndex)(context, isPublic);
369
+
370
+ case 19:
371
+ _context6.next = 24;
372
+ break;
373
+
374
+ case 21:
375
+ _context6.prev = 21;
376
+ _context6.t1 = _context6["catch"](16);
377
+ debug.error(_context6.t1);
378
+
379
+ case 24:
380
+ index = context.index;
381
+ thisIndex = index[visibility];
382
+ registrations = thisIndex.map(function (ix) {
383
+ return _solidLogic.solidLogicSingleton.store.each(undefined, ns.solid('forClass'), theClass, ix);
384
+ }).reduce(function (acc, curr) {
385
+ return acc.concat(curr);
386
+ }, []);
387
+ instances = registrations.map(function (reg) {
388
+ return _solidLogic.solidLogicSingleton.store.each(reg, ns.solid('instance'));
389
+ }).reduce(function (acc, curr) {
390
+ return acc.concat(curr);
391
+ }, []);
392
+ containers = registrations.map(function (reg) {
393
+ return _solidLogic.solidLogicSingleton.store.each(reg, ns.solid('instanceContainer'));
394
+ }).reduce(function (acc, curr) {
395
+ return acc.concat(curr);
396
+ }, []);
397
+ context.instances = context.instances || [];
398
+ context.instances = unique(context.instances.concat(instances));
399
+ context.containers = context.containers || [];
400
+ context.containers = unique(context.containers.concat(containers));
401
+
402
+ if (containers.length) {
403
+ _context6.next = 35;
404
+ break;
359
405
  }
360
406
 
361
- context.instances = items.map(function (item) {
362
- return item.instance;
407
+ return _context6.abrupt("return", context);
408
+
409
+ case 35:
410
+ _context6.prev = 35;
411
+ _context6.next = 38;
412
+ return _solidLogic.solidLogicSingleton.load(containers);
413
+
414
+ case 38:
415
+ _context6.next = 45;
416
+ break;
417
+
418
+ case 40:
419
+ _context6.prev = 40;
420
+ _context6.t2 = _context6["catch"](35);
421
+ e = new Error("[FAI] Unable to load containers".concat(_context6.t2));
422
+ debug.log(e); // complain
423
+
424
+ widgets.complain(context, "Error looking for ".concat(_index.utils.label(theClass), ": ").concat(_context6.t2)); // but then ignore it
425
+ // throw new Error(e)
426
+
427
+ case 45:
428
+ i = 0;
429
+
430
+ case 46:
431
+ if (!(i < containers.length)) {
432
+ _context6.next = 56;
433
+ break;
434
+ }
435
+
436
+ cont = containers[i];
437
+ _context6.t3 = context.instances;
438
+ _context6.next = 51;
439
+ return _solidLogic.solidLogicSingleton.getContainerMembers(cont.value);
440
+
441
+ case 51:
442
+ _context6.t4 = _context6.sent.map(function (uri) {
443
+ return _solidLogic.solidLogicSingleton.store.sym(uri);
363
444
  });
445
+ context.instances = _context6.t3.concat.call(_context6.t3, _context6.t4);
446
+
447
+ case 53:
448
+ i++;
449
+ _context6.next = 46;
450
+ break;
451
+
452
+ case 56:
364
453
  return _context6.abrupt("return", context);
365
454
 
366
- case 11:
455
+ case 57:
367
456
  case "end":
368
457
  return _context6.stop();
369
458
  }
370
459
  }
371
- }, _callee6);
460
+ }, _callee6, null, [[7, 12], [16, 21], [35, 40]]);
372
461
  }));
373
462
  return _findAppInstances.apply(this, arguments);
374
463
  }
375
464
 
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);
465
+ function registrationControl(_x7, _x8, _x9) {
466
+ return _registrationControl.apply(this, arguments);
380
467
  }
381
468
  /**
382
- * UI to control registration of instance
469
+ * UI to List at all registered things
383
470
  */
384
471
 
385
472
 
386
- function registrationControl(_x6, _x7, _x8) {
387
- return _registrationControl.apply(this, arguments);
388
- }
389
-
390
473
  function _registrationControl() {
391
- _registrationControl = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(context, instance, theClass) {
392
- var registrationStatements, renderScopeCheckbox, dom, box, me, scopes, msg, tbody, form, _iterator, _step, scope, row;
474
+ _registrationControl = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(context, instance, theClass) {
475
+ var dom, box, context2, msg, tbody, form, registrationStatements, index, statements, _msg;
393
476
 
394
- return _regenerator["default"].wrap(function _callee7$(_context7) {
477
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
395
478
  while (1) {
396
479
  switch (_context7.prev = _context7.next) {
397
480
  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
412
481
  dom = context.dom;
413
482
 
414
483
  if (!(!dom || !context.div)) {
415
- _context7.next = 5;
484
+ _context7.next = 3;
416
485
  break;
417
486
  }
418
487
 
419
- throw new Error('registrationControl: need dom and div');
488
+ return _context7.abrupt("return", context);
420
489
 
421
- case 5:
490
+ case 3:
422
491
  box = dom.createElement('div');
423
492
  context.div.appendChild(box);
424
493
  context.me = _solidLogic.authn.currentUser(); // @@
425
494
 
426
- me = context.me;
427
-
428
- if (me) {
429
- _context7.next = 12;
495
+ if (context.me) {
496
+ _context7.next = 9;
430
497
  break;
431
498
  }
432
499
 
433
500
  box.innerHTML = '<p style="margin:2em;">(Log in to save a link to this)</p>';
434
501
  return _context7.abrupt("return", context);
435
502
 
436
- case 12:
437
- _context7.prev = 12;
438
- _context7.next = 15;
439
- return (0, _solidLogic.loadAllTypeIndexes)(me);
503
+ case 9:
504
+ _context7.prev = 9;
505
+ _context7.next = 12;
506
+ return (0, _solidLogic.ensureTypeIndexes)(context);
440
507
 
441
- case 15:
442
- scopes = _context7.sent;
443
- _context7.next = 23;
508
+ case 12:
509
+ context2 = _context7.sent;
510
+ _context7.next = 19;
444
511
  break;
445
512
 
446
- case 18:
447
- _context7.prev = 18;
448
- _context7.t0 = _context7["catch"](12);
513
+ case 15:
514
+ _context7.prev = 15;
515
+ _context7.t0 = _context7["catch"](9);
449
516
 
450
517
  if (context.div && context.preferencesFileError) {
451
- msg = '(Lists of stuff not available)';
518
+ msg = '(Preferences not available)';
452
519
  context.div.appendChild(dom.createElement('p')).textContent = msg;
453
520
  } else if (context.div) {
454
521
  msg = "registrationControl: Type indexes not available: ".concat(_context7.t0);
@@ -456,201 +523,153 @@ function _registrationControl() {
456
523
  }
457
524
 
458
525
  debug.log(msg);
459
- return _context7.abrupt("return", context);
460
526
 
461
- case 23:
462
- box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
527
+ case 19:
528
+ box.innerHTML = '<table><tbody><tr></tr><tr></tr></tbody></table>'; // tbody will be inserted anyway
463
529
 
464
530
  box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid gray 0.05em;');
465
531
  tbody = box.children[0].children[0];
466
532
  form = new _rdflib.BlankNode(); // @@ say for now
467
533
 
468
- _iterator = _createForOfIteratorHelper(scopes);
534
+ registrationStatements = function registrationStatements(index) {
535
+ var registrations = _solidLogic.solidLogicSingleton.getRegistrations(instance, theClass);
536
+
537
+ var reg = registrations.length ? registrations[0] : widgets.newThing(index);
538
+ return [(0, _rdflib.st)(reg, ns.solid('instance'), instance, index), (0, _rdflib.st)(reg, ns.solid('forClass'), theClass, index)];
539
+ };
469
540
 
470
541
  try {
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
542
+ if (context2.index && context2.index["public"] && context2.index["public"].length > 0) {
543
+ index = context2.index["public"][0];
544
+ statements = registrationStatements(index);
545
+ tbody.children[0].appendChild(widgets.buildCheckboxForm(context2.dom, _solidLogic.solidLogicSingleton.store, "Public link to this ".concat(context2.noun), null, statements, form, index));
546
+ }
547
+
548
+ if (context2.index && context2.index["private"] && context2.index["private"].length > 0) {
549
+ index = context2.index["private"][0];
550
+ statements = registrationStatements(index);
551
+ tbody.children[1].appendChild(widgets.buildCheckboxForm(context2.dom, _solidLogic.solidLogicSingleton.store, "Personal note of this ".concat(context2.noun), null, statements, form, index));
552
+ }
553
+ } catch (e) {
554
+ _msg = "registrationControl: Error making panel: ".concat(e);
555
+
556
+ if (context.div) {
557
+ context.div.appendChild(widgets.errorMessageBlock(context.dom, e));
475
558
  }
476
- } catch (err) {
477
- _iterator.e(err);
478
- } finally {
479
- _iterator.f();
559
+
560
+ debug.log(_msg);
480
561
  }
481
562
 
482
- return _context7.abrupt("return", context);
563
+ return _context7.abrupt("return", context2);
483
564
 
484
- case 30:
565
+ case 26:
485
566
  case "end":
486
567
  return _context7.stop();
487
568
  }
488
569
  }
489
- }, _callee7, null, [[12, 18]]);
570
+ }, _callee7, null, [[9, 15]]);
490
571
  }));
491
572
  return _registrationControl.apply(this, arguments);
492
573
  }
493
574
 
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;
509
- }
510
- /**
511
- * UI to List at all registered things
512
- */
513
-
514
-
515
- function registrationList(_x9, _x10) {
575
+ function registrationList(_x10, _x11) {
516
576
  return _registrationList.apply(this, arguments);
517
- } // registrationList
518
-
577
+ }
519
578
 
520
579
  function _registrationList() {
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) {
580
+ _registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(context0, options) {
581
+ var dom, div, box;
582
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
525
583
  while (1) {
526
- switch (_context9.prev = _context9.next) {
584
+ switch (_context8.prev = _context8.next) {
527
585
  case 0:
528
- dom = context.dom;
529
- div = context.div;
586
+ dom = context0.dom;
587
+ div = context0.div;
530
588
  box = dom.createElement('div');
531
589
  div.appendChild(box);
532
- context.me = _solidLogic.authn.currentUser(); // @@
590
+ context0.me = _solidLogic.authn.currentUser(); // @@
533
591
 
534
- if (context.me) {
535
- _context9.next = 8;
592
+ if (context0.me) {
593
+ _context8.next = 8;
536
594
  break;
537
595
  }
538
596
 
539
597
  box.innerHTML = '<p style="margin:2em;">(Log in list your stuff)</p>';
540
- return _context9.abrupt("return", context);
598
+ return _context8.abrupt("return", context0);
541
599
 
542
600
  case 8:
543
- _context9.next = 10;
544
- return (0, _solidLogic.loadAllTypeIndexes)(store, context.me);
545
-
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
- }
601
+ return _context8.abrupt("return", (0, _solidLogic.ensureTypeIndexes)(context0).then(function (context) {
602
+ box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
603
+
604
+ box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid #eee 0.5em;');
605
+ var table = box.firstChild;
606
+ var ix = [];
607
+ var sts = [];
608
+ var vs = ['private', 'public'];
609
+ vs.forEach(function (visibility) {
610
+ if (context.index && context.index[visibility].length > 0 && options[visibility]) {
611
+ ix = ix.concat(context.index[visibility][0]);
612
+ sts = sts.concat(_solidLogic.solidLogicSingleton.store.statementsMatching(undefined, ns.solid('instance'), undefined, context.index[visibility][0]));
613
+ }
614
+ });
565
615
 
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);
616
+ var _loop = function _loop(i) {
617
+ var statement = sts[i];
572
618
 
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)
619
+ if (options.type) {
620
+ // now check terms:forClass
621
+ if (!_solidLogic.solidLogicSingleton.store.holds(statement.subject, ns.solid('forClass'), options.type, statement.why)) {
622
+ return "continue"; // skip irrelevant ones
623
+ }
624
+ } // const cla = statement.subject
577
625
 
578
- _iterator3 = _createForOfIteratorHelper(items);
579
626
 
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);
627
+ var inst = statement.object;
628
+ table.appendChild(widgets.personTR(dom, ns.solid('instance'), inst, {
629
+ deleteFunction: function deleteFunction(_x) {
630
+ if (!_solidLogic.solidLogicSingleton.store.updater) {
631
+ throw new Error('Cannot delete this, store has no updater');
606
632
  }
607
633
 
608
- return deleteFunction;
609
- }()
610
- });
611
- row.children[0].style.paddingLeft = '3em';
612
- tbody.appendChild(row);
634
+ _solidLogic.solidLogicSingleton.store.updater.update([statement], [], function (uri, ok, errorBody) {
635
+ if (ok) {
636
+ debug.log("Removed from index: ".concat(statement.subject));
637
+ } else {
638
+ debug.log("Error: Cannot delete ".concat(statement, ": ").concat(errorBody));
639
+ }
640
+ });
641
+ }
642
+ }));
613
643
  };
614
644
 
615
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
616
- _loop();
617
- }
618
- } catch (err) {
619
- _iterator3.e(err);
620
- } finally {
621
- _iterator3.f();
622
- }
645
+ for (var i = 0; i < sts.length; i++) {
646
+ var _ret = _loop(i);
623
647
 
624
- case 28:
625
- _context9.next = 18;
626
- break;
648
+ if (_ret === "continue") continue;
649
+ } // registrationList
627
650
 
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;
651
+ /*
652
+ //const containers = solidLogicSingleton.store.each(theClass, ns.solid('instanceContainer'));
653
+ if (containers.length) {
654
+ fetcher.load(containers).then(function(xhrs){
655
+ for (const i=0; i<containers.length; i++) {
656
+ const cont = containers[i];
657
+ instances = instances.concat(solidLogicSingleton.store.each(cont, ns.ldp('contains')));
658
+ }
659
+ });
660
+ }
661
+ */
640
662
 
641
- _iterator2.f();
642
663
 
643
- return _context9.finish(35);
644
-
645
- case 38:
646
- return _context9.abrupt("return", context);
664
+ return context;
665
+ }));
647
666
 
648
- case 39:
667
+ case 9:
649
668
  case "end":
650
- return _context9.stop();
669
+ return _context8.stop();
651
670
  }
652
671
  }
653
- }, _callee9, null, [[16, 32, 35, 38]]);
672
+ }, _callee8);
654
673
  }));
655
674
  return _registrationList.apply(this, arguments);
656
675
  }
@@ -768,9 +787,9 @@ function renderSignInPopup(dom) {
768
787
  issuerPopupBoxTopMenu.appendChild(issuerPopupBoxCloseButton);
769
788
 
770
789
  var loginToIssuer = /*#__PURE__*/function () {
771
- var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(issuerUri) {
790
+ var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(issuerUri) {
772
791
  var preLoginRedirectHash;
773
- return _regenerator["default"].wrap(function _callee$(_context) {
792
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
774
793
  while (1) {
775
794
  switch (_context.prev = _context.next) {
776
795
  case 0:
@@ -807,7 +826,7 @@ function renderSignInPopup(dom) {
807
826
  }, _callee, null, [[0, 8]]);
808
827
  }));
809
828
 
810
- return function loginToIssuer(_x11) {
829
+ return function loginToIssuer(_x12) {
811
830
  return _ref.apply(this, arguments);
812
831
  };
813
832
  }();
@@ -968,9 +987,9 @@ function loginStatusBox(dom) {
968
987
  return box;
969
988
  }
970
989
 
971
- _solidLogic.authSession.onLogout( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
990
+ _solidLogic.authSession.onLogout( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
972
991
  var issuer, wellKnownUri, wellKnownResult, openidConfiguration;
973
- return _regenerator["default"].wrap(function _callee2$(_context2) {
992
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
974
993
  while (1) {
975
994
  switch (_context2.prev = _context2.next) {
976
995
  case 0:
@@ -1094,15 +1113,15 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1094
1113
 
1095
1114
  function displayOptions(context) {
1096
1115
  // console.log('displayOptions!', context)
1097
- function makeNewWorkspace(_x12) {
1116
+ function makeNewWorkspace(_x13) {
1098
1117
  return _makeNewWorkspace.apply(this, arguments);
1099
1118
  } // const status = ''
1100
1119
 
1101
1120
 
1102
1121
  function _makeNewWorkspace() {
1103
- _makeNewWorkspace = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(_event) {
1122
+ _makeNewWorkspace = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_event) {
1104
1123
  var row, cell, newBase, newWs, newData;
1105
- return _regenerator["default"].wrap(function _callee3$(_context3) {
1124
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1106
1125
  while (1) {
1107
1126
  switch (_context3.prev = _context3.next) {
1108
1127
  case 0:
@@ -1363,77 +1382,77 @@ function getUserRoles() {
1363
1382
 
1364
1383
 
1365
1384
  function _getUserRoles() {
1366
- _getUserRoles = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
1385
+ _getUserRoles = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
1367
1386
  var _yield$ensureLoadedPr, me, preferencesFile, preferencesFileError;
1368
1387
 
1369
- return _regenerator["default"].wrap(function _callee10$(_context10) {
1388
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
1370
1389
  while (1) {
1371
- switch (_context10.prev = _context10.next) {
1390
+ switch (_context9.prev = _context9.next) {
1372
1391
  case 0:
1373
- _context10.prev = 0;
1374
- _context10.next = 3;
1392
+ _context9.prev = 0;
1393
+ _context9.next = 3;
1375
1394
  return ensureLoadedPreferences({});
1376
1395
 
1377
1396
  case 3:
1378
- _yield$ensureLoadedPr = _context10.sent;
1397
+ _yield$ensureLoadedPr = _context9.sent;
1379
1398
  me = _yield$ensureLoadedPr.me;
1380
1399
  preferencesFile = _yield$ensureLoadedPr.preferencesFile;
1381
1400
  preferencesFileError = _yield$ensureLoadedPr.preferencesFileError;
1382
1401
 
1383
1402
  if (!(!preferencesFile || preferencesFileError)) {
1384
- _context10.next = 9;
1403
+ _context9.next = 9;
1385
1404
  break;
1386
1405
  }
1387
1406
 
1388
1407
  throw new Error(preferencesFileError);
1389
1408
 
1390
1409
  case 9:
1391
- return _context10.abrupt("return", _solidLogic.solidLogicSingleton.store.each(me, ns.rdf('type'), null, preferencesFile.doc()));
1410
+ return _context9.abrupt("return", _solidLogic.solidLogicSingleton.store.each(me, ns.rdf('type'), null, preferencesFile.doc()));
1392
1411
 
1393
1412
  case 12:
1394
- _context10.prev = 12;
1395
- _context10.t0 = _context10["catch"](0);
1396
- debug.warn('Unable to fetch your preferences - this was the error: ', _context10.t0);
1413
+ _context9.prev = 12;
1414
+ _context9.t0 = _context9["catch"](0);
1415
+ debug.warn('Unable to fetch your preferences - this was the error: ', _context9.t0);
1397
1416
 
1398
1417
  case 15:
1399
- return _context10.abrupt("return", []);
1418
+ return _context9.abrupt("return", []);
1400
1419
 
1401
1420
  case 16:
1402
1421
  case "end":
1403
- return _context10.stop();
1422
+ return _context9.stop();
1404
1423
  }
1405
1424
  }
1406
- }, _callee10, null, [[0, 12]]);
1425
+ }, _callee9, null, [[0, 12]]);
1407
1426
  }));
1408
1427
  return _getUserRoles.apply(this, arguments);
1409
1428
  }
1410
1429
 
1411
- function filterAvailablePanes(_x13) {
1430
+ function filterAvailablePanes(_x14) {
1412
1431
  return _filterAvailablePanes.apply(this, arguments);
1413
1432
  }
1414
1433
 
1415
1434
  function _filterAvailablePanes() {
1416
- _filterAvailablePanes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(panes) {
1435
+ _filterAvailablePanes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(panes) {
1417
1436
  var userRoles;
1418
- return _regenerator["default"].wrap(function _callee11$(_context11) {
1437
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
1419
1438
  while (1) {
1420
- switch (_context11.prev = _context11.next) {
1439
+ switch (_context10.prev = _context10.next) {
1421
1440
  case 0:
1422
- _context11.next = 2;
1441
+ _context10.next = 2;
1423
1442
  return getUserRoles();
1424
1443
 
1425
1444
  case 2:
1426
- userRoles = _context11.sent;
1427
- return _context11.abrupt("return", panes.filter(function (pane) {
1445
+ userRoles = _context10.sent;
1446
+ return _context10.abrupt("return", panes.filter(function (pane) {
1428
1447
  return isMatchingAudience(pane, userRoles);
1429
1448
  }));
1430
1449
 
1431
1450
  case 4:
1432
1451
  case "end":
1433
- return _context11.stop();
1452
+ return _context10.stop();
1434
1453
  }
1435
1454
  }
1436
- }, _callee11);
1455
+ }, _callee10);
1437
1456
  }));
1438
1457
  return _filterAvailablePanes.apply(this, arguments);
1439
1458
  }