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