solid-ui 2.4.22-9c4bbef1 → 2.4.22-a07bb683
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 +7944 -8151
- package/dist/main.js.map +1 -1
- package/lib/acl/access-controller.js +14 -9
- package/lib/acl/access-controller.js.map +1 -1
- package/lib/acl/access-groups.js +15 -10
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl-control.js +13 -9
- package/lib/acl/acl-control.js.map +1 -1
- package/lib/acl/acl.js +11 -7
- package/lib/acl/acl.js.map +1 -1
- package/lib/acl/add-agent-buttons.js +18 -13
- package/lib/acl/add-agent-buttons.js.map +1 -1
- package/lib/chat/bookmarks.js +21 -18
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js +15 -9
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/dateFolder.js +17 -12
- package/lib/chat/dateFolder.js.map +1 -1
- package/lib/chat/infinite.js +37 -29
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/message.js +14 -14
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/messageTools.js +23 -10
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/thread.js +9 -4
- package/lib/chat/thread.js.map +1 -1
- package/lib/footer/index.js +10 -8
- package/lib/footer/index.js.map +1 -1
- package/lib/header/index.js +17 -9
- package/lib/header/index.js.map +1 -1
- package/lib/iconBase.js +3 -2
- package/lib/iconBase.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 +303 -313
- package/lib/login/login.js.map +1 -1
- package/lib/media/media-capture.js +20 -4
- package/lib/media/media-capture.js.map +1 -1
- package/lib/tabs.d.ts.map +1 -1
- package/lib/tabs.js +21 -18
- package/lib/tabs.js.map +1 -1
- package/lib/utils/headerFooterHelpers.js +7 -5
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/versionInfo.d.ts +9 -9
- package/lib/versionInfo.js +13 -13
- package/lib/versionInfo.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 +15 -17
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteField.js +8 -5
- package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +19 -21
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js +15 -8
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js +27 -22
- package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
- package/lib/widgets/forms.js +31 -20
- package/lib/widgets/forms.js.map +1 -1
- package/package.json +7 -5
package/lib/login/login.js
CHANGED
|
@@ -17,9 +17,13 @@ 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
|
|
|
25
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
26
|
+
|
|
23
27
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
24
28
|
|
|
25
29
|
var _rdflib = require("rdflib");
|
|
@@ -36,7 +40,7 @@ var _signup = require("../signup/signup.js");
|
|
|
36
40
|
|
|
37
41
|
var _style = require("../style");
|
|
38
42
|
|
|
39
|
-
var
|
|
43
|
+
var utils = _interopRequireWildcard(require("../utils"));
|
|
40
44
|
|
|
41
45
|
var widgets = _interopRequireWildcard(require("../widgets"));
|
|
42
46
|
|
|
@@ -44,14 +48,29 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
44
48
|
|
|
45
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; }
|
|
46
50
|
|
|
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; }
|
|
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; }
|
|
48
56
|
|
|
57
|
+
var store = _solidLogic.solidLogicSingleton.store;
|
|
58
|
+
var _solidLogicSingleton$ = _solidLogic.solidLogicSingleton.profile,
|
|
59
|
+
loadPreferences = _solidLogicSingleton$.loadPreferences,
|
|
60
|
+
loadProfile = _solidLogicSingleton$.loadProfile;
|
|
61
|
+
var _solidLogicSingleton$2 = _solidLogic.solidLogicSingleton.typeIndex,
|
|
62
|
+
getScopedAppInstances = _solidLogicSingleton$2.getScopedAppInstances,
|
|
63
|
+
getRegistrations = _solidLogicSingleton$2.getRegistrations,
|
|
64
|
+
loadAllTypeIndexes = _solidLogicSingleton$2.loadAllTypeIndexes,
|
|
65
|
+
getScopedAppsFromIndex = _solidLogicSingleton$2.getScopedAppsFromIndex,
|
|
66
|
+
deleteTypeIndexRegistration = _solidLogicSingleton$2.deleteTypeIndexRegistration;
|
|
49
67
|
/**
|
|
50
68
|
* Resolves with the logged in user's WebID
|
|
51
69
|
*
|
|
52
70
|
* @param context
|
|
53
71
|
*/
|
|
54
72
|
// used to be logIn
|
|
73
|
+
|
|
55
74
|
function ensureLoggedIn(context) {
|
|
56
75
|
var me = _solidLogic.authn.currentUser();
|
|
57
76
|
|
|
@@ -93,7 +112,7 @@ function ensureLoggedIn(context) {
|
|
|
93
112
|
// used to be logInLoadPreferences
|
|
94
113
|
|
|
95
114
|
|
|
96
|
-
function ensureLoadedPreferences(
|
|
115
|
+
function ensureLoadedPreferences(_x) {
|
|
97
116
|
return _ensureLoadedPreferences.apply(this, arguments);
|
|
98
117
|
}
|
|
99
118
|
/**
|
|
@@ -107,9 +126,9 @@ function ensureLoadedPreferences(_x2) {
|
|
|
107
126
|
|
|
108
127
|
|
|
109
128
|
function _ensureLoadedPreferences() {
|
|
110
|
-
_ensureLoadedPreferences = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
129
|
+
_ensureLoadedPreferences = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(context) {
|
|
111
130
|
var statusArea, progressDisplay, complain, preferencesFile, m2;
|
|
112
|
-
return
|
|
131
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
113
132
|
while (1) {
|
|
114
133
|
switch (_context4.prev = _context4.next) {
|
|
115
134
|
case 0:
|
|
@@ -141,7 +160,7 @@ function _ensureLoadedPreferences() {
|
|
|
141
160
|
case 7:
|
|
142
161
|
context = _context4.sent;
|
|
143
162
|
_context4.next = 10;
|
|
144
|
-
return
|
|
163
|
+
return loadPreferences(context.me);
|
|
145
164
|
|
|
146
165
|
case 10:
|
|
147
166
|
preferencesFile = _context4.sent;
|
|
@@ -151,7 +170,7 @@ function _ensureLoadedPreferences() {
|
|
|
151
170
|
}
|
|
152
171
|
|
|
153
172
|
context.preferencesFile = preferencesFile;
|
|
154
|
-
_context4.next =
|
|
173
|
+
_context4.next = 51;
|
|
155
174
|
break;
|
|
156
175
|
|
|
157
176
|
case 15:
|
|
@@ -165,7 +184,7 @@ function _ensureLoadedPreferences() {
|
|
|
165
184
|
|
|
166
185
|
m2 = 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?';
|
|
167
186
|
(0, _log.alert)(m2);
|
|
168
|
-
_context4.next =
|
|
187
|
+
_context4.next = 51;
|
|
169
188
|
break;
|
|
170
189
|
|
|
171
190
|
case 22:
|
|
@@ -180,57 +199,53 @@ function _ensureLoadedPreferences() {
|
|
|
180
199
|
|
|
181
200
|
case 28:
|
|
182
201
|
if (!(_context4.t0 instanceof _solidLogic.SameOriginForbiddenError)) {
|
|
183
|
-
_context4.next =
|
|
202
|
+
_context4.next = 34;
|
|
184
203
|
break;
|
|
185
204
|
}
|
|
186
205
|
|
|
187
206
|
m2 = 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.';
|
|
188
207
|
debug.warn(m2);
|
|
189
|
-
_context4.
|
|
190
|
-
break;
|
|
208
|
+
return _context4.abrupt("return", context);
|
|
191
209
|
|
|
192
|
-
case
|
|
193
|
-
if (!(_context4.t0 instanceof _solidLogic.
|
|
194
|
-
_context4.next =
|
|
210
|
+
case 34:
|
|
211
|
+
if (!(_context4.t0 instanceof _solidLogic.NotEditableError)) {
|
|
212
|
+
_context4.next = 40;
|
|
195
213
|
break;
|
|
196
214
|
}
|
|
197
215
|
|
|
198
|
-
|
|
199
|
-
|
|
216
|
+
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
217
|
+
debug.warn(m2);
|
|
218
|
+
return _context4.abrupt("return", context);
|
|
219
|
+
|
|
220
|
+
case 40:
|
|
221
|
+
if (!(_context4.t0 instanceof _solidLogic.WebOperationError)) {
|
|
222
|
+
_context4.next = 45;
|
|
200
223
|
break;
|
|
201
224
|
}
|
|
202
225
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
_context4.next = 40;
|
|
207
|
-
break;
|
|
208
|
-
|
|
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;
|
|
226
|
+
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
227
|
+
debug.warn(m2);
|
|
228
|
+
_context4.next = 51;
|
|
214
229
|
break;
|
|
215
230
|
|
|
216
|
-
case
|
|
231
|
+
case 45:
|
|
217
232
|
if (!(_context4.t0 instanceof _solidLogic.FetchError)) {
|
|
218
|
-
_context4.next =
|
|
233
|
+
_context4.next = 50;
|
|
219
234
|
break;
|
|
220
235
|
}
|
|
221
236
|
|
|
222
237
|
m2 = "Strange: Error ".concat(_context4.t0.status, " trying to read your preference file.").concat(_context4.t0.message);
|
|
223
238
|
(0, _log.alert)(m2);
|
|
224
|
-
_context4.next =
|
|
239
|
+
_context4.next = 51;
|
|
225
240
|
break;
|
|
226
241
|
|
|
227
|
-
case
|
|
242
|
+
case 50:
|
|
228
243
|
throw new Error("(via loadPrefs) ".concat(_context4.t0));
|
|
229
244
|
|
|
230
|
-
case
|
|
245
|
+
case 51:
|
|
231
246
|
return _context4.abrupt("return", context);
|
|
232
247
|
|
|
233
|
-
case
|
|
248
|
+
case 52:
|
|
234
249
|
case "end":
|
|
235
250
|
return _context4.stop();
|
|
236
251
|
}
|
|
@@ -240,21 +255,20 @@ function _ensureLoadedPreferences() {
|
|
|
240
255
|
return _ensureLoadedPreferences.apply(this, arguments);
|
|
241
256
|
}
|
|
242
257
|
|
|
243
|
-
function ensureLoadedProfile(
|
|
258
|
+
function ensureLoadedProfile(_x2) {
|
|
244
259
|
return _ensureLoadedProfile.apply(this, arguments);
|
|
245
260
|
}
|
|
246
261
|
/**
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
*/
|
|
262
|
+
* Returns promise of context with arrays of symbols
|
|
263
|
+
*
|
|
264
|
+
* leaving the `isPublic` param undefined will bring in community index things, too
|
|
265
|
+
*/
|
|
252
266
|
|
|
253
267
|
|
|
254
268
|
function _ensureLoadedProfile() {
|
|
255
|
-
_ensureLoadedProfile = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
269
|
+
_ensureLoadedProfile = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(context) {
|
|
256
270
|
var logInContext;
|
|
257
|
-
return
|
|
271
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
258
272
|
while (1) {
|
|
259
273
|
switch (_context5.prev = _context5.next) {
|
|
260
274
|
case 0:
|
|
@@ -282,7 +296,7 @@ function _ensureLoadedProfile() {
|
|
|
282
296
|
|
|
283
297
|
case 8:
|
|
284
298
|
_context5.next = 10;
|
|
285
|
-
return
|
|
299
|
+
return loadProfile(logInContext.me);
|
|
286
300
|
|
|
287
301
|
case 10:
|
|
288
302
|
context.publicProfile = _context5.sent;
|
|
@@ -312,210 +326,138 @@ function _ensureLoadedProfile() {
|
|
|
312
326
|
return _ensureLoadedProfile.apply(this, arguments);
|
|
313
327
|
}
|
|
314
328
|
|
|
315
|
-
function findAppInstances(_x4, _x5
|
|
329
|
+
function findAppInstances(_x3, _x4, _x5) {
|
|
316
330
|
return _findAppInstances.apply(this, arguments);
|
|
317
331
|
}
|
|
318
|
-
/**
|
|
319
|
-
* UI to control registration of instance
|
|
320
|
-
*/
|
|
321
|
-
|
|
322
332
|
|
|
323
333
|
function _findAppInstances() {
|
|
324
|
-
_findAppInstances = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
325
|
-
var
|
|
326
|
-
return
|
|
334
|
+
_findAppInstances = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(context, theClass, isPublic) {
|
|
335
|
+
var items;
|
|
336
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
327
337
|
while (1) {
|
|
328
338
|
switch (_context6.prev = _context6.next) {
|
|
329
339
|
case 0:
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
};
|
|
333
|
-
|
|
334
|
-
if (!(isPublic === undefined)) {
|
|
335
|
-
_context6.next = 7;
|
|
340
|
+
if (!context.me) {
|
|
341
|
+
_context6.next = 6;
|
|
336
342
|
break;
|
|
337
343
|
}
|
|
338
344
|
|
|
339
|
-
_context6.next =
|
|
340
|
-
return
|
|
345
|
+
_context6.next = 3;
|
|
346
|
+
return getScopedAppInstances(theClass, context.me);
|
|
341
347
|
|
|
342
|
-
case
|
|
343
|
-
_context6.
|
|
344
|
-
|
|
348
|
+
case 3:
|
|
349
|
+
_context6.t0 = _context6.sent;
|
|
350
|
+
_context6.next = 7;
|
|
351
|
+
break;
|
|
345
352
|
|
|
346
353
|
case 6:
|
|
347
|
-
|
|
354
|
+
_context6.t0 = [];
|
|
348
355
|
|
|
349
356
|
case 7:
|
|
350
|
-
|
|
351
|
-
_context6.next = 10;
|
|
352
|
-
return isPublic ? ensureLoadedProfile(context) : ensureLoadedPreferences(context);
|
|
357
|
+
items = _context6.t0;
|
|
353
358
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
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;
|
|
405
|
-
}
|
|
406
|
-
|
|
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;
|
|
359
|
+
if (isPublic === true) {
|
|
360
|
+
// old API - not recommended!
|
|
361
|
+
items = items.filter(function (item) {
|
|
362
|
+
return item.scope.label === 'public';
|
|
363
|
+
});
|
|
364
|
+
} else if (isPublic === false) {
|
|
365
|
+
items = items.filter(function (item) {
|
|
366
|
+
return item.scope.label === 'private';
|
|
367
|
+
});
|
|
434
368
|
}
|
|
435
369
|
|
|
436
|
-
|
|
437
|
-
|
|
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);
|
|
370
|
+
context.instances = items.map(function (item) {
|
|
371
|
+
return item.instance;
|
|
444
372
|
});
|
|
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:
|
|
453
373
|
return _context6.abrupt("return", context);
|
|
454
374
|
|
|
455
|
-
case
|
|
375
|
+
case 11:
|
|
456
376
|
case "end":
|
|
457
377
|
return _context6.stop();
|
|
458
378
|
}
|
|
459
379
|
}
|
|
460
|
-
}, _callee6
|
|
380
|
+
}, _callee6);
|
|
461
381
|
}));
|
|
462
382
|
return _findAppInstances.apply(this, arguments);
|
|
463
383
|
}
|
|
464
384
|
|
|
465
|
-
function
|
|
466
|
-
|
|
385
|
+
function scopeLabel(context, scope) {
|
|
386
|
+
var mine = context.me && context.me.sameTerm(scope.agent);
|
|
387
|
+
var name = mine ? '' : utils.label(scope.agent) + ' ';
|
|
388
|
+
return "".concat(name).concat(scope.label);
|
|
467
389
|
}
|
|
468
390
|
/**
|
|
469
|
-
* UI to
|
|
391
|
+
* UI to control registration of instance
|
|
470
392
|
*/
|
|
471
393
|
|
|
472
394
|
|
|
395
|
+
function registrationControl(_x6, _x7, _x8) {
|
|
396
|
+
return _registrationControl.apply(this, arguments);
|
|
397
|
+
}
|
|
398
|
+
|
|
473
399
|
function _registrationControl() {
|
|
474
|
-
_registrationControl = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
475
|
-
var dom, box,
|
|
400
|
+
_registrationControl = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(context, instance, theClass) {
|
|
401
|
+
var registrationStatements, renderScopeCheckbox, dom, box, me, scopes, msg, tbody, form, _iterator, _step, scope, row;
|
|
476
402
|
|
|
477
|
-
return
|
|
403
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
478
404
|
while (1) {
|
|
479
405
|
switch (_context7.prev = _context7.next) {
|
|
480
406
|
case 0:
|
|
407
|
+
renderScopeCheckbox = function _renderScopeCheckbox(scope) {
|
|
408
|
+
var statements = registrationStatements(scope.index);
|
|
409
|
+
var name = scopeLabel(context, scope);
|
|
410
|
+
var label = "".concat(name, " link to this ").concat(context.noun);
|
|
411
|
+
return widgets.buildCheckboxForm(context.dom, _solidLogic.solidLogicSingleton.store, label, null, statements, form, scope.index);
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
registrationStatements = function _registrationStatemen(index) {
|
|
415
|
+
var registrations = getRegistrations(instance, theClass);
|
|
416
|
+
var reg = registrations.length ? registrations[0] : widgets.newThing(index);
|
|
417
|
+
return [(0, _rdflib.st)(reg, ns.solid('instance'), instance, index), (0, _rdflib.st)(reg, ns.solid('forClass'), theClass, index)];
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
/// / body of registrationControl
|
|
481
421
|
dom = context.dom;
|
|
482
422
|
|
|
483
423
|
if (!(!dom || !context.div)) {
|
|
484
|
-
_context7.next =
|
|
424
|
+
_context7.next = 5;
|
|
485
425
|
break;
|
|
486
426
|
}
|
|
487
427
|
|
|
488
|
-
|
|
428
|
+
throw new Error('registrationControl: need dom and div');
|
|
489
429
|
|
|
490
|
-
case
|
|
430
|
+
case 5:
|
|
491
431
|
box = dom.createElement('div');
|
|
492
432
|
context.div.appendChild(box);
|
|
493
433
|
context.me = _solidLogic.authn.currentUser(); // @@
|
|
494
434
|
|
|
495
|
-
|
|
496
|
-
|
|
435
|
+
me = context.me;
|
|
436
|
+
|
|
437
|
+
if (me) {
|
|
438
|
+
_context7.next = 12;
|
|
497
439
|
break;
|
|
498
440
|
}
|
|
499
441
|
|
|
500
442
|
box.innerHTML = '<p style="margin:2em;">(Log in to save a link to this)</p>';
|
|
501
443
|
return _context7.abrupt("return", context);
|
|
502
444
|
|
|
503
|
-
case 9:
|
|
504
|
-
_context7.prev = 9;
|
|
505
|
-
_context7.next = 12;
|
|
506
|
-
return (0, _solidLogic.ensureTypeIndexes)(context);
|
|
507
|
-
|
|
508
445
|
case 12:
|
|
509
|
-
|
|
510
|
-
_context7.next =
|
|
511
|
-
|
|
446
|
+
_context7.prev = 12;
|
|
447
|
+
_context7.next = 15;
|
|
448
|
+
return loadAllTypeIndexes(me);
|
|
512
449
|
|
|
513
450
|
case 15:
|
|
514
|
-
|
|
515
|
-
_context7.
|
|
451
|
+
scopes = _context7.sent;
|
|
452
|
+
_context7.next = 23;
|
|
453
|
+
break;
|
|
454
|
+
|
|
455
|
+
case 18:
|
|
456
|
+
_context7.prev = 18;
|
|
457
|
+
_context7.t0 = _context7["catch"](12);
|
|
516
458
|
|
|
517
459
|
if (context.div && context.preferencesFileError) {
|
|
518
|
-
msg = '(
|
|
460
|
+
msg = '(Lists of stuff not available)';
|
|
519
461
|
context.div.appendChild(dom.createElement('p')).textContent = msg;
|
|
520
462
|
} else if (context.div) {
|
|
521
463
|
msg = "registrationControl: Type indexes not available: ".concat(_context7.t0);
|
|
@@ -523,153 +465,201 @@ function _registrationControl() {
|
|
|
523
465
|
}
|
|
524
466
|
|
|
525
467
|
debug.log(msg);
|
|
468
|
+
return _context7.abrupt("return", context);
|
|
526
469
|
|
|
527
|
-
case
|
|
528
|
-
box.innerHTML = '<table><tbody
|
|
470
|
+
case 23:
|
|
471
|
+
box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
|
|
529
472
|
|
|
530
473
|
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid gray 0.05em;');
|
|
531
474
|
tbody = box.children[0].children[0];
|
|
532
475
|
form = new _rdflib.BlankNode(); // @@ say for now
|
|
533
476
|
|
|
534
|
-
|
|
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
|
-
};
|
|
477
|
+
_iterator = _createForOfIteratorHelper(scopes);
|
|
540
478
|
|
|
541
479
|
try {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
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));
|
|
480
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
481
|
+
scope = _step.value;
|
|
482
|
+
row = tbody.appendChild(dom.createElement('tr'));
|
|
483
|
+
row.appendChild(renderScopeCheckbox(scope)); // @@ index
|
|
558
484
|
}
|
|
559
|
-
|
|
560
|
-
|
|
485
|
+
} catch (err) {
|
|
486
|
+
_iterator.e(err);
|
|
487
|
+
} finally {
|
|
488
|
+
_iterator.f();
|
|
561
489
|
}
|
|
562
490
|
|
|
563
|
-
return _context7.abrupt("return",
|
|
491
|
+
return _context7.abrupt("return", context);
|
|
564
492
|
|
|
565
|
-
case
|
|
493
|
+
case 30:
|
|
566
494
|
case "end":
|
|
567
495
|
return _context7.stop();
|
|
568
496
|
}
|
|
569
497
|
}
|
|
570
|
-
}, _callee7, null, [[
|
|
498
|
+
}, _callee7, null, [[12, 18]]);
|
|
571
499
|
}));
|
|
572
500
|
return _registrationControl.apply(this, arguments);
|
|
573
501
|
}
|
|
574
502
|
|
|
575
|
-
function
|
|
576
|
-
|
|
503
|
+
function renderScopeHeadingRow(context, store, scope) {
|
|
504
|
+
var backgroundColor = {
|
|
505
|
+
"private": '#fee',
|
|
506
|
+
"public": '#efe'
|
|
507
|
+
};
|
|
508
|
+
var dom = context.dom;
|
|
509
|
+
var name = scopeLabel(context, scope);
|
|
510
|
+
var row = dom.createElement('tr');
|
|
511
|
+
var cell = row.appendChild(dom.createElement('td'));
|
|
512
|
+
cell.setAttribute('colspan', '3');
|
|
513
|
+
cell.style.backgoundColor = backgroundColor[scope.label] || 'white';
|
|
514
|
+
var header = cell.appendChild(dom.createElement('h3'));
|
|
515
|
+
header.textContent = name + ' links';
|
|
516
|
+
header.style.textAlign = 'left';
|
|
517
|
+
return row;
|
|
577
518
|
}
|
|
519
|
+
/**
|
|
520
|
+
* UI to List at all registered things
|
|
521
|
+
*/
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
function registrationList(_x9, _x10) {
|
|
525
|
+
return _registrationList.apply(this, arguments);
|
|
526
|
+
} // registrationList
|
|
527
|
+
|
|
578
528
|
|
|
579
529
|
function _registrationList() {
|
|
580
|
-
_registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
581
|
-
var dom, div, box;
|
|
582
|
-
|
|
530
|
+
_registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(context, options) {
|
|
531
|
+
var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop;
|
|
532
|
+
|
|
533
|
+
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
|
583
534
|
while (1) {
|
|
584
|
-
switch (
|
|
535
|
+
switch (_context9.prev = _context9.next) {
|
|
585
536
|
case 0:
|
|
586
|
-
dom =
|
|
587
|
-
div =
|
|
537
|
+
dom = context.dom;
|
|
538
|
+
div = context.div;
|
|
588
539
|
box = dom.createElement('div');
|
|
589
540
|
div.appendChild(box);
|
|
590
|
-
|
|
541
|
+
context.me = _solidLogic.authn.currentUser(); // @@
|
|
591
542
|
|
|
592
|
-
if (
|
|
593
|
-
|
|
543
|
+
if (context.me) {
|
|
544
|
+
_context9.next = 8;
|
|
594
545
|
break;
|
|
595
546
|
}
|
|
596
547
|
|
|
597
548
|
box.innerHTML = '<p style="margin:2em;">(Log in list your stuff)</p>';
|
|
598
|
-
return
|
|
549
|
+
return _context9.abrupt("return", context);
|
|
599
550
|
|
|
600
551
|
case 8:
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
552
|
+
_context9.next = 10;
|
|
553
|
+
return loadAllTypeIndexes(context.me);
|
|
554
|
+
|
|
555
|
+
case 10:
|
|
556
|
+
scopes = _context9.sent;
|
|
557
|
+
// includes community indexes
|
|
558
|
+
// console.log('@@ registrationList ', scopes)
|
|
559
|
+
box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
|
|
560
|
+
|
|
561
|
+
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid #eee 0.5em;');
|
|
562
|
+
table = box.firstChild;
|
|
563
|
+
tbody = table.firstChild;
|
|
564
|
+
_iterator2 = _createForOfIteratorHelper(scopes);
|
|
565
|
+
_context9.prev = 16;
|
|
566
|
+
|
|
567
|
+
_iterator2.s();
|
|
568
|
+
|
|
569
|
+
case 18:
|
|
570
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
571
|
+
_context9.next = 30;
|
|
572
|
+
break;
|
|
573
|
+
}
|
|
615
574
|
|
|
616
|
-
|
|
617
|
-
|
|
575
|
+
scope = _step2.value;
|
|
576
|
+
// need some predicate for listing/adding agents
|
|
577
|
+
headingRow = renderScopeHeadingRow(context, store, scope);
|
|
578
|
+
tbody.appendChild(headingRow);
|
|
579
|
+
_context9.next = 24;
|
|
580
|
+
return getScopedAppsFromIndex(scope, options.type || null);
|
|
618
581
|
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
}
|
|
624
|
-
} // const cla = statement.subject
|
|
582
|
+
case 24:
|
|
583
|
+
items = _context9.sent;
|
|
584
|
+
// any class
|
|
585
|
+
if (items.length === 0) headingRow.style.display = 'none'; // console.log(`registrationList: @@ instance items for class ${options.type || 'undefined' }:`, items)
|
|
625
586
|
|
|
587
|
+
_iterator3 = _createForOfIteratorHelper(items);
|
|
626
588
|
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
589
|
+
try {
|
|
590
|
+
_loop = function _loop() {
|
|
591
|
+
var item = _step3.value;
|
|
592
|
+
var row = widgets.personTR(dom, ns.solid('instance'), item.instance, {
|
|
593
|
+
deleteFunction: function () {
|
|
594
|
+
var _deleteFunction = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
|
595
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
596
|
+
while (1) {
|
|
597
|
+
switch (_context8.prev = _context8.next) {
|
|
598
|
+
case 0:
|
|
599
|
+
_context8.next = 2;
|
|
600
|
+
return deleteTypeIndexRegistration(item);
|
|
601
|
+
|
|
602
|
+
case 2:
|
|
603
|
+
tbody.removeChild(row);
|
|
604
|
+
|
|
605
|
+
case 3:
|
|
606
|
+
case "end":
|
|
607
|
+
return _context8.stop();
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}, _callee8);
|
|
611
|
+
}));
|
|
612
|
+
|
|
613
|
+
function deleteFunction() {
|
|
614
|
+
return _deleteFunction.apply(this, arguments);
|
|
632
615
|
}
|
|
633
616
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
}
|
|
640
|
-
});
|
|
641
|
-
}
|
|
642
|
-
}));
|
|
617
|
+
return deleteFunction;
|
|
618
|
+
}()
|
|
619
|
+
});
|
|
620
|
+
row.children[0].style.paddingLeft = '3em';
|
|
621
|
+
tbody.appendChild(row);
|
|
643
622
|
};
|
|
644
623
|
|
|
645
|
-
for (
|
|
646
|
-
|
|
624
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
625
|
+
_loop();
|
|
626
|
+
}
|
|
627
|
+
} catch (err) {
|
|
628
|
+
_iterator3.e(err);
|
|
629
|
+
} finally {
|
|
630
|
+
_iterator3.f();
|
|
631
|
+
}
|
|
647
632
|
|
|
648
|
-
|
|
649
|
-
|
|
633
|
+
case 28:
|
|
634
|
+
_context9.next = 18;
|
|
635
|
+
break;
|
|
650
636
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
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
|
-
*/
|
|
637
|
+
case 30:
|
|
638
|
+
_context9.next = 35;
|
|
639
|
+
break;
|
|
662
640
|
|
|
641
|
+
case 32:
|
|
642
|
+
_context9.prev = 32;
|
|
643
|
+
_context9.t0 = _context9["catch"](16);
|
|
663
644
|
|
|
664
|
-
|
|
665
|
-
}));
|
|
645
|
+
_iterator2.e(_context9.t0);
|
|
666
646
|
|
|
667
|
-
case
|
|
647
|
+
case 35:
|
|
648
|
+
_context9.prev = 35;
|
|
649
|
+
|
|
650
|
+
_iterator2.f();
|
|
651
|
+
|
|
652
|
+
return _context9.finish(35);
|
|
653
|
+
|
|
654
|
+
case 38:
|
|
655
|
+
return _context9.abrupt("return", context);
|
|
656
|
+
|
|
657
|
+
case 39:
|
|
668
658
|
case "end":
|
|
669
|
-
return
|
|
659
|
+
return _context9.stop();
|
|
670
660
|
}
|
|
671
661
|
}
|
|
672
|
-
},
|
|
662
|
+
}, _callee9, null, [[16, 32, 35, 38]]);
|
|
673
663
|
}));
|
|
674
664
|
return _registrationList.apply(this, arguments);
|
|
675
665
|
}
|
|
@@ -787,9 +777,9 @@ function renderSignInPopup(dom) {
|
|
|
787
777
|
issuerPopupBoxTopMenu.appendChild(issuerPopupBoxCloseButton);
|
|
788
778
|
|
|
789
779
|
var loginToIssuer = /*#__PURE__*/function () {
|
|
790
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
780
|
+
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(issuerUri) {
|
|
791
781
|
var preLoginRedirectHash;
|
|
792
|
-
return
|
|
782
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
793
783
|
while (1) {
|
|
794
784
|
switch (_context.prev = _context.next) {
|
|
795
785
|
case 0:
|
|
@@ -826,7 +816,7 @@ function renderSignInPopup(dom) {
|
|
|
826
816
|
}, _callee, null, [[0, 8]]);
|
|
827
817
|
}));
|
|
828
818
|
|
|
829
|
-
return function loginToIssuer(
|
|
819
|
+
return function loginToIssuer(_x11) {
|
|
830
820
|
return _ref.apply(this, arguments);
|
|
831
821
|
};
|
|
832
822
|
}();
|
|
@@ -987,9 +977,9 @@ function loginStatusBox(dom) {
|
|
|
987
977
|
return box;
|
|
988
978
|
}
|
|
989
979
|
|
|
990
|
-
_solidLogic.authSession.onLogout( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
980
|
+
_solidLogic.authSession.onLogout( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
991
981
|
var issuer, wellKnownUri, wellKnownResult, openidConfiguration;
|
|
992
|
-
return
|
|
982
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
993
983
|
while (1) {
|
|
994
984
|
switch (_context2.prev = _context2.next) {
|
|
995
985
|
case 0:
|
|
@@ -1113,15 +1103,15 @@ function selectWorkspace(dom, appDetails, callbackWS) {
|
|
|
1113
1103
|
|
|
1114
1104
|
function displayOptions(context) {
|
|
1115
1105
|
// console.log('displayOptions!', context)
|
|
1116
|
-
function makeNewWorkspace(
|
|
1106
|
+
function makeNewWorkspace(_x12) {
|
|
1117
1107
|
return _makeNewWorkspace.apply(this, arguments);
|
|
1118
1108
|
} // const status = ''
|
|
1119
1109
|
|
|
1120
1110
|
|
|
1121
1111
|
function _makeNewWorkspace() {
|
|
1122
|
-
_makeNewWorkspace = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
1112
|
+
_makeNewWorkspace = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(_event) {
|
|
1123
1113
|
var row, cell, newBase, newWs, newData;
|
|
1124
|
-
return
|
|
1114
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
1125
1115
|
while (1) {
|
|
1126
1116
|
switch (_context3.prev = _context3.next) {
|
|
1127
1117
|
case 0:
|
|
@@ -1382,77 +1372,77 @@ function getUserRoles() {
|
|
|
1382
1372
|
|
|
1383
1373
|
|
|
1384
1374
|
function _getUserRoles() {
|
|
1385
|
-
_getUserRoles = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
1375
|
+
_getUserRoles = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
|
1386
1376
|
var _yield$ensureLoadedPr, me, preferencesFile, preferencesFileError;
|
|
1387
1377
|
|
|
1388
|
-
return
|
|
1378
|
+
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
|
1389
1379
|
while (1) {
|
|
1390
|
-
switch (
|
|
1380
|
+
switch (_context10.prev = _context10.next) {
|
|
1391
1381
|
case 0:
|
|
1392
|
-
|
|
1393
|
-
|
|
1382
|
+
_context10.prev = 0;
|
|
1383
|
+
_context10.next = 3;
|
|
1394
1384
|
return ensureLoadedPreferences({});
|
|
1395
1385
|
|
|
1396
1386
|
case 3:
|
|
1397
|
-
_yield$ensureLoadedPr =
|
|
1387
|
+
_yield$ensureLoadedPr = _context10.sent;
|
|
1398
1388
|
me = _yield$ensureLoadedPr.me;
|
|
1399
1389
|
preferencesFile = _yield$ensureLoadedPr.preferencesFile;
|
|
1400
1390
|
preferencesFileError = _yield$ensureLoadedPr.preferencesFileError;
|
|
1401
1391
|
|
|
1402
1392
|
if (!(!preferencesFile || preferencesFileError)) {
|
|
1403
|
-
|
|
1393
|
+
_context10.next = 9;
|
|
1404
1394
|
break;
|
|
1405
1395
|
}
|
|
1406
1396
|
|
|
1407
1397
|
throw new Error(preferencesFileError);
|
|
1408
1398
|
|
|
1409
1399
|
case 9:
|
|
1410
|
-
return
|
|
1400
|
+
return _context10.abrupt("return", _solidLogic.solidLogicSingleton.store.each(me, ns.rdf('type'), null, preferencesFile.doc()));
|
|
1411
1401
|
|
|
1412
1402
|
case 12:
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
debug.warn('Unable to fetch your preferences - this was the error: ',
|
|
1403
|
+
_context10.prev = 12;
|
|
1404
|
+
_context10.t0 = _context10["catch"](0);
|
|
1405
|
+
debug.warn('Unable to fetch your preferences - this was the error: ', _context10.t0);
|
|
1416
1406
|
|
|
1417
1407
|
case 15:
|
|
1418
|
-
return
|
|
1408
|
+
return _context10.abrupt("return", []);
|
|
1419
1409
|
|
|
1420
1410
|
case 16:
|
|
1421
1411
|
case "end":
|
|
1422
|
-
return
|
|
1412
|
+
return _context10.stop();
|
|
1423
1413
|
}
|
|
1424
1414
|
}
|
|
1425
|
-
},
|
|
1415
|
+
}, _callee10, null, [[0, 12]]);
|
|
1426
1416
|
}));
|
|
1427
1417
|
return _getUserRoles.apply(this, arguments);
|
|
1428
1418
|
}
|
|
1429
1419
|
|
|
1430
|
-
function filterAvailablePanes(
|
|
1420
|
+
function filterAvailablePanes(_x13) {
|
|
1431
1421
|
return _filterAvailablePanes.apply(this, arguments);
|
|
1432
1422
|
}
|
|
1433
1423
|
|
|
1434
1424
|
function _filterAvailablePanes() {
|
|
1435
|
-
_filterAvailablePanes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/
|
|
1425
|
+
_filterAvailablePanes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(panes) {
|
|
1436
1426
|
var userRoles;
|
|
1437
|
-
return
|
|
1427
|
+
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
|
1438
1428
|
while (1) {
|
|
1439
|
-
switch (
|
|
1429
|
+
switch (_context11.prev = _context11.next) {
|
|
1440
1430
|
case 0:
|
|
1441
|
-
|
|
1431
|
+
_context11.next = 2;
|
|
1442
1432
|
return getUserRoles();
|
|
1443
1433
|
|
|
1444
1434
|
case 2:
|
|
1445
|
-
userRoles =
|
|
1446
|
-
return
|
|
1435
|
+
userRoles = _context11.sent;
|
|
1436
|
+
return _context11.abrupt("return", panes.filter(function (pane) {
|
|
1447
1437
|
return isMatchingAudience(pane, userRoles);
|
|
1448
1438
|
}));
|
|
1449
1439
|
|
|
1450
1440
|
case 4:
|
|
1451
1441
|
case "end":
|
|
1452
|
-
return
|
|
1442
|
+
return _context11.stop();
|
|
1453
1443
|
}
|
|
1454
1444
|
}
|
|
1455
|
-
},
|
|
1445
|
+
}, _callee11);
|
|
1456
1446
|
}));
|
|
1457
1447
|
return _filterAvailablePanes.apply(this, arguments);
|
|
1458
1448
|
}
|