solid-panes 3.5.28-alpha → 3.5.29-alpha
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/README.md +0 -2
- package/lib/RDFXMLPane.js +6 -8
- package/lib/RDFXMLPane.js.map +1 -1
- package/lib/argument/argumentPane.js +10 -11
- package/lib/argument/argumentPane.js.map +1 -1
- package/lib/attach/attachPane.js +47 -85
- package/lib/attach/attachPane.js.map +1 -1
- package/lib/audio/audioPane.js +11 -36
- package/lib/audio/audioPane.js.map +1 -1
- package/lib/classInstancePane.js +11 -20
- package/lib/classInstancePane.js.map +1 -1
- package/lib/dashboard/basicPreferences.js +3 -53
- package/lib/dashboard/basicPreferences.js.map +1 -1
- package/lib/dashboard/dashboardPane.js +2 -18
- package/lib/dashboard/dashboardPane.js.map +1 -1
- package/lib/dashboard/homepage.js +1 -19
- package/lib/dashboard/homepage.js.map +1 -1
- package/lib/dataContentPane.js +15 -58
- package/lib/dataContentPane.js.map +1 -1
- package/lib/defaultPane.js +13 -21
- package/lib/defaultPane.js.map +1 -1
- package/lib/dokieli/dokieliPane.js +19 -28
- package/lib/dokieli/dokieliPane.js.map +1 -1
- package/lib/dokieli/new.js.map +1 -1
- package/lib/form/pane.js +26 -40
- package/lib/form/pane.js.map +1 -1
- package/lib/home/homePane.js +7 -23
- package/lib/home/homePane.js.map +1 -1
- package/lib/humanReadablePane.js +14 -28
- package/lib/humanReadablePane.js.map +1 -1
- package/lib/imagePane.js +9 -13
- package/lib/imagePane.js.map +1 -1
- package/lib/index.js +4 -18
- package/lib/index.js.map +1 -1
- package/lib/internal/internalPane.js +10 -41
- package/lib/internal/internalPane.js.map +1 -1
- package/lib/mainPage/footer.js +0 -4
- package/lib/mainPage/footer.js.map +1 -1
- package/lib/mainPage/header.js +2 -28
- package/lib/mainPage/header.js.map +1 -1
- package/lib/mainPage/index.js +1 -12
- package/lib/mainPage/index.js.map +1 -1
- package/lib/microblogPane/microblogPane.js +100 -237
- package/lib/microblogPane/microblogPane.js.map +1 -1
- package/lib/n3Pane.js +2 -7
- package/lib/n3Pane.js.map +1 -1
- package/lib/outline/context.js +0 -2
- package/lib/outline/context.js.map +1 -1
- package/lib/outline/licenseOptions.js +9 -25
- package/lib/outline/licenseOptions.js.map +1 -1
- package/lib/outline/manager.js +178 -580
- package/lib/outline/manager.js.map +1 -1
- package/lib/outline/manager.test.js +1 -11
- package/lib/outline/manager.test.js.map +1 -1
- package/lib/outline/outlineIcons.js +30 -25
- package/lib/outline/outlineIcons.js.map +1 -1
- package/lib/outline/propertyViews.js +0 -10
- package/lib/outline/propertyViews.js.map +1 -1
- package/lib/outline/propertyViews.test.js +1 -3
- package/lib/outline/propertyViews.test.js.map +1 -1
- package/lib/outline/queryByExample.js +24 -76
- package/lib/outline/queryByExample.js.map +1 -1
- package/lib/outline/userInput.js +214 -454
- package/lib/outline/userInput.js.map +1 -1
- package/lib/outline/viewAsImage.js +0 -6
- package/lib/outline/viewAsImage.js.map +1 -1
- package/lib/outline/viewAsMbox.js +3 -4
- package/lib/outline/viewAsMbox.js.map +1 -1
- package/lib/pad/padPane.js +45 -93
- package/lib/pad/padPane.js.map +1 -1
- package/lib/playlist/playlistPane.js +3 -20
- package/lib/playlist/playlistPane.js.map +1 -1
- package/lib/profile/editProfile.view.js +7 -24
- package/lib/profile/editProfile.view.js.map +1 -1
- package/lib/profile/profile.dom.js +0 -3
- package/lib/profile/profile.dom.js.map +1 -1
- package/lib/registerPanes.js +29 -27
- package/lib/registerPanes.js.map +1 -1
- package/lib/schedule/formsForSchedule.js.map +1 -1
- package/lib/schedule/schedulePane.js +62 -122
- package/lib/schedule/schedulePane.js.map +1 -1
- package/lib/sharing/sharingPane.js +2 -10
- package/lib/sharing/sharingPane.js.map +1 -1
- package/lib/slideshow/slideshowPane.js +9 -14
- package/lib/slideshow/slideshowPane.js.map +1 -1
- package/lib/socialPane.js +43 -124
- package/lib/socialPane.js.map +1 -1
- package/lib/tabbed/tabbedPane.js +1 -15
- package/lib/tabbed/tabbedPane.js.map +1 -1
- package/lib/tableViewPane.js +4 -7
- package/lib/tableViewPane.js.map +1 -1
- package/lib/test-import-export/common.js +2 -1
- package/lib/test-import-export/common.js.map +1 -1
- package/lib/test-import-export/edit-importer.js +7 -9
- package/lib/test-import-export/edit-importer.js.map +1 -1
- package/lib/transaction/pane.js +31 -90
- package/lib/transaction/pane.js.map +1 -1
- package/lib/transaction/period.js +20 -71
- package/lib/transaction/period.js.map +1 -1
- package/lib/trip/tripPane.js +30 -34
- package/lib/trip/tripPane.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.dom.js +8 -34
- package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.test.js +3 -8
- package/lib/trustedApplications/trustedApplications.test.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.utils.js +0 -10
- package/lib/trustedApplications/trustedApplications.utils.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.view.js +1 -22
- package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
- package/lib/ui/pane.js +22 -28
- package/lib/ui/pane.js.map +1 -1
- package/lib/versionInfo.d.ts +2 -0
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +18 -16
- package/lib/versionInfo.js.map +1 -1
- package/lib/video/videoPane.js +2 -5
- package/lib/video/videoPane.js.map +1 -1
- package/package.json +24 -24
- package/src/versionInfo.ts +18 -16
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = exports.basicPreferencesPane = void 0;
|
|
9
|
-
|
|
10
8
|
var _rdflib = require("rdflib");
|
|
11
|
-
|
|
12
9
|
var _solidUi = require("solid-ui");
|
|
13
|
-
|
|
14
|
-
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; }
|
|
15
|
-
|
|
10
|
+
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, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $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 defineProperty(generator, "_invoke", { value: makeInvokeMethod(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; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(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); } }; } 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, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), 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 (val) { var object = Object(val), 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; }
|
|
16
11
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17
|
-
|
|
18
12
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
19
|
-
|
|
20
13
|
/* babel-plugin-inline-import './ontologyData.ttl' */
|
|
21
14
|
var ontologyData = "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix schema: <http:/schema.org/>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix : <#>.\n\nsolid:User a rdfs:Class;\n rdfs:label \"user\"@en, \"utilisateur\"@fr;\n rdfs:comment \"\"\"Any person who might use a Solid-based system\"\"\";\n rdfs:subClassOf foaf:Person, schema:Person, vcard:Individual.\n\n# Since these options are opt-in, it is a bit strange to have new users opt in\n# That they are new users - also we do not use this class for anything specific\n# yet\n# solid:NewUser a rdfs:Class;\n# rdfs:label \"new user\"@en;\n# rdfs:comment \"\"\"A person who might use a Solid-based system who has a low\n# level of familiarity with technical details.\"\"\";\n# rdfs:subClassOf solid:User.\n\nsolid:PowerUser a rdfs:Class;\n rdfs:label \"power user\"@en;\n rdfs:comment \"\"\"A person who might use a Solid-based system\n who is prepared to be given a more complex interface in order\n to be provided with more pwerful features.\"\"\";\n rdfs:subClassOf solid:User.\n\n solid:Developer a rdfs:Class;\n rdfs:label \"Developer\";\n rdfs:comment \"\"\"Any person who might use a Solid-based system,\n who has software development skills.\"\"\";\n rdfs:subClassOf solid:User.\n";
|
|
22
|
-
|
|
23
15
|
/* babel-plugin-inline-import './preferencesFormText.ttl' */
|
|
24
16
|
var preferencesFormText = "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix : <#>.\n\n:this <http://purl.org/dc/elements/1.1/title> \"Basic preferences\" ;\n a ui:Form ;\n ui:part :categorizeUser, :privateComment, :personalInformationHeading;\n ui:parts ( :personalInformationHeading :privateComment :categorizeUser ).\n\n:personalInformationHeading a ui:Heading;\n ui:contents \"Personal information\".\n\n:privateComment a ui:Comment;\n ui:contents \"This information is private.\".\n\n:categorizeUser a ui:Classifier;\n ui:label \"Level of user\"; ui:property rdf:type ; ui:category solid:User.\n";
|
|
25
17
|
var basicPreferencesPane = {
|
|
@@ -33,18 +25,14 @@ var basicPreferencesPane = {
|
|
|
33
25
|
render: function render(subject, context) {
|
|
34
26
|
var dom = context.dom;
|
|
35
27
|
var store = context.session.store;
|
|
36
|
-
|
|
37
28
|
function complainIfBad(ok, mess) {
|
|
38
29
|
if (ok) return;
|
|
39
30
|
container.appendChild(_solidUi.widgets.errorMessageBlock(dom, mess, '#fee'));
|
|
40
31
|
}
|
|
41
|
-
|
|
42
32
|
var container = dom.createElement('div');
|
|
43
33
|
var formArea = setupUserTypesSection(container, dom);
|
|
44
|
-
|
|
45
34
|
function loadData(doc, turtle) {
|
|
46
35
|
doc = doc.doc(); // remove # from URI if nec
|
|
47
|
-
|
|
48
36
|
if (!store.holds(undefined, undefined, undefined, doc)) {
|
|
49
37
|
// If not loaded already
|
|
50
38
|
;
|
|
@@ -56,11 +44,9 @@ var basicPreferencesPane = {
|
|
|
56
44
|
loadData(preferencesForm, preferencesFormText);
|
|
57
45
|
var ontologyExtra = store.sym('urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597-ONT');
|
|
58
46
|
loadData(ontologyExtra, ontologyData);
|
|
59
|
-
|
|
60
47
|
function doRender() {
|
|
61
48
|
return _doRender.apply(this, arguments);
|
|
62
49
|
}
|
|
63
|
-
|
|
64
50
|
function _doRender() {
|
|
65
51
|
_doRender = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
66
52
|
var renderContext, appendedForm, trustedApplicationsView;
|
|
@@ -73,31 +59,25 @@ var basicPreferencesPane = {
|
|
|
73
59
|
dom: dom,
|
|
74
60
|
div: container
|
|
75
61
|
});
|
|
76
|
-
|
|
77
62
|
case 2:
|
|
78
63
|
renderContext = _context.sent;
|
|
79
|
-
|
|
80
64
|
if (renderContext.preferencesFile) {
|
|
81
65
|
_context.next = 6;
|
|
82
66
|
break;
|
|
83
67
|
}
|
|
84
|
-
|
|
85
68
|
// Could be CORS
|
|
86
69
|
console.log('Not doing private class preferences as no access to preferences file. ' + renderContext.preferencesFileError);
|
|
87
70
|
return _context.abrupt("return");
|
|
88
|
-
|
|
89
71
|
case 6:
|
|
90
72
|
appendedForm = _solidUi.widgets.appendForm(dom, formArea, {}, renderContext.me, preferencesForm, renderContext.preferencesFile, complainIfBad);
|
|
91
73
|
appendedForm.style.borderStyle = 'none';
|
|
92
74
|
trustedApplicationsView = context.session.paneRegistry.byName('trustedApplications');
|
|
93
|
-
|
|
94
75
|
if (trustedApplicationsView) {
|
|
95
76
|
container.appendChild(trustedApplicationsView.render(null, context));
|
|
96
|
-
}
|
|
97
|
-
|
|
77
|
+
}
|
|
98
78
|
|
|
79
|
+
// @@ TODO Remove need for casting as any and bang (!) syntax
|
|
99
80
|
addDeleteSection(container, store, renderContext.me, dom);
|
|
100
|
-
|
|
101
81
|
case 11:
|
|
102
82
|
case "end":
|
|
103
83
|
return _context.stop();
|
|
@@ -107,13 +87,11 @@ var basicPreferencesPane = {
|
|
|
107
87
|
}));
|
|
108
88
|
return _doRender.apply(this, arguments);
|
|
109
89
|
}
|
|
110
|
-
|
|
111
90
|
doRender();
|
|
112
91
|
return container;
|
|
113
92
|
}
|
|
114
93
|
};
|
|
115
94
|
exports.basicPreferencesPane = basicPreferencesPane;
|
|
116
|
-
|
|
117
95
|
function setupUserTypesSection(container, dom) {
|
|
118
96
|
var formContainer = createSection(container, dom, 'User types');
|
|
119
97
|
var description = formContainer.appendChild(dom.createElement('p'));
|
|
@@ -124,11 +102,8 @@ function setupUserTypesSection(container, dom) {
|
|
|
124
102
|
var formArea = formContainer.appendChild(dom.createElement('div'));
|
|
125
103
|
return formArea;
|
|
126
104
|
}
|
|
127
|
-
|
|
128
105
|
var _default = basicPreferencesPane; // ends
|
|
129
|
-
|
|
130
106
|
exports["default"] = _default;
|
|
131
|
-
|
|
132
107
|
function addDeleteSection(container, store, profile, dom) {
|
|
133
108
|
var section = createSection(container, dom, 'Delete account');
|
|
134
109
|
var podServerNodes = store.each(profile, _solidUi.ns.space('storage'), null, profile.doc());
|
|
@@ -145,15 +120,12 @@ function addDeleteSection(container, store, profile, dom) {
|
|
|
145
120
|
case 0:
|
|
146
121
|
_context2.next = 2;
|
|
147
122
|
return generateDeletionLink(server, dom);
|
|
148
|
-
|
|
149
123
|
case 2:
|
|
150
124
|
deletionLink = _context2.sent;
|
|
151
|
-
|
|
152
125
|
if (deletionLink) {
|
|
153
126
|
listItem = list.appendChild(dom.createElement('li'));
|
|
154
127
|
listItem.appendChild(deletionLink);
|
|
155
128
|
}
|
|
156
|
-
|
|
157
129
|
case 4:
|
|
158
130
|
case "end":
|
|
159
131
|
return _context2.stop();
|
|
@@ -161,13 +133,11 @@ function addDeleteSection(container, store, profile, dom) {
|
|
|
161
133
|
}
|
|
162
134
|
}, _callee2);
|
|
163
135
|
}));
|
|
164
|
-
|
|
165
136
|
return function (_x) {
|
|
166
137
|
return _ref.apply(this, arguments);
|
|
167
138
|
};
|
|
168
139
|
}());
|
|
169
140
|
}
|
|
170
|
-
|
|
171
141
|
function generateDeletionLink(_x2, _x3) {
|
|
172
142
|
return _generateDeletionLink.apply(this, arguments);
|
|
173
143
|
}
|
|
@@ -186,8 +156,6 @@ function generateDeletionLink(_x2, _x3) {
|
|
|
186
156
|
* @returns URL of the page that Node Solid Server would offer to delete the account, or null if
|
|
187
157
|
* the URLs we tried give invalid responses.
|
|
188
158
|
*/
|
|
189
|
-
|
|
190
|
-
|
|
191
159
|
function _generateDeletionLink() {
|
|
192
160
|
_generateDeletionLink = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(podServer, dom) {
|
|
193
161
|
var link, deletionUrl;
|
|
@@ -199,21 +167,16 @@ function _generateDeletionLink() {
|
|
|
199
167
|
link.textContent = "Delete your account at ".concat(podServer);
|
|
200
168
|
_context3.next = 4;
|
|
201
169
|
return getDeletionUrlForServer(podServer);
|
|
202
|
-
|
|
203
170
|
case 4:
|
|
204
171
|
deletionUrl = _context3.sent;
|
|
205
|
-
|
|
206
172
|
if (!(typeof deletionUrl !== 'string')) {
|
|
207
173
|
_context3.next = 7;
|
|
208
174
|
break;
|
|
209
175
|
}
|
|
210
|
-
|
|
211
176
|
return _context3.abrupt("return", null);
|
|
212
|
-
|
|
213
177
|
case 7:
|
|
214
178
|
link.href = deletionUrl;
|
|
215
179
|
return _context3.abrupt("return", link);
|
|
216
|
-
|
|
217
180
|
case 9:
|
|
218
181
|
case "end":
|
|
219
182
|
return _context3.stop();
|
|
@@ -223,11 +186,9 @@ function _generateDeletionLink() {
|
|
|
223
186
|
}));
|
|
224
187
|
return _generateDeletionLink.apply(this, arguments);
|
|
225
188
|
}
|
|
226
|
-
|
|
227
189
|
function getDeletionUrlForServer(_x4) {
|
|
228
190
|
return _getDeletionUrlForServer.apply(this, arguments);
|
|
229
191
|
}
|
|
230
|
-
|
|
231
192
|
function _getDeletionUrlForServer() {
|
|
232
193
|
_getDeletionUrlForServer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(server) {
|
|
233
194
|
var singleUserUrl, multiUserUrl, hostnameParts, multiUserNssResponse, singleUserNssResponse;
|
|
@@ -239,42 +200,32 @@ function _getDeletionUrlForServer() {
|
|
|
239
200
|
multiUserUrl = new URL(server);
|
|
240
201
|
multiUserUrl.pathname = singleUserUrl.pathname = '/account/delete';
|
|
241
202
|
hostnameParts = multiUserUrl.hostname.split('.'); // Remove `vincent.` from `vincent.dev.inrupt.net`, for example:
|
|
242
|
-
|
|
243
203
|
multiUserUrl.hostname = hostnameParts.slice(1).join('.');
|
|
244
204
|
_context4.next = 7;
|
|
245
205
|
return fetch(multiUserUrl.href, {
|
|
246
206
|
method: 'HEAD'
|
|
247
207
|
});
|
|
248
|
-
|
|
249
208
|
case 7:
|
|
250
209
|
multiUserNssResponse = _context4.sent;
|
|
251
|
-
|
|
252
210
|
if (!multiUserNssResponse.ok) {
|
|
253
211
|
_context4.next = 10;
|
|
254
212
|
break;
|
|
255
213
|
}
|
|
256
|
-
|
|
257
214
|
return _context4.abrupt("return", multiUserUrl.href);
|
|
258
|
-
|
|
259
215
|
case 10:
|
|
260
216
|
_context4.next = 12;
|
|
261
217
|
return fetch(singleUserUrl.href, {
|
|
262
218
|
method: 'HEAD'
|
|
263
219
|
});
|
|
264
|
-
|
|
265
220
|
case 12:
|
|
266
221
|
singleUserNssResponse = _context4.sent;
|
|
267
|
-
|
|
268
222
|
if (!singleUserNssResponse.ok) {
|
|
269
223
|
_context4.next = 15;
|
|
270
224
|
break;
|
|
271
225
|
}
|
|
272
|
-
|
|
273
226
|
return _context4.abrupt("return", singleUserUrl.href);
|
|
274
|
-
|
|
275
227
|
case 15:
|
|
276
228
|
return _context4.abrupt("return", null);
|
|
277
|
-
|
|
278
229
|
case 16:
|
|
279
230
|
case "end":
|
|
280
231
|
return _context4.stop();
|
|
@@ -284,7 +235,6 @@ function _getDeletionUrlForServer() {
|
|
|
284
235
|
}));
|
|
285
236
|
return _getDeletionUrlForServer.apply(this, arguments);
|
|
286
237
|
}
|
|
287
|
-
|
|
288
238
|
function createSection(container, dom, title) {
|
|
289
239
|
var section = container.appendChild(dom.createElement('div'));
|
|
290
240
|
section.style.border = '0.3em solid #418d99';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basicPreferences.js","names":["basicPreferencesPane","icon","icons","iconBase","name","label","_subject","render","subject","context","dom","store","session","complainIfBad","ok","mess","container","appendChild","widgets","errorMessageBlock","createElement","formArea","setupUserTypesSection","loadData","doc","turtle","holds","undefined","parse","uri","preferencesForm","sym","preferencesFormText","ontologyExtra","ontologyData","doRender","login","ensureLoadedPreferences","div","renderContext","preferencesFile","console","log","preferencesFileError","appendedForm","appendForm","me","style","borderStyle","trustedApplicationsView","paneRegistry","byName","addDeleteSection","formContainer","createSection","description","innerText","userTypesLink","href","profile","section","podServerNodes","each","ns","space","podServers","map","node","value","list","forEach","server","generateDeletionLink","deletionLink","listItem","podServer","link","textContent","getDeletionUrlForServer","deletionUrl","singleUserUrl","URL","multiUserUrl","pathname","hostnameParts","hostname","split","slice","join","fetch","method","multiUserNssResponse","singleUserNssResponse","title","border","borderRadius","padding","marginTop","titleElement"],"sources":["../../src/dashboard/basicPreferences.ts"],"sourcesContent":["import { PaneDefinition } from 'pane-registry'\nimport { IndexedFormula, NamedNode, parse, Store } from 'rdflib'\nimport { icons, login, ns, widgets } from 'solid-ui'\nimport ontologyData from './ontologyData.ttl'\nimport preferencesFormText from './preferencesFormText.ttl'\n\nexport const basicPreferencesPane: PaneDefinition = {\n icon: icons.iconBase + 'noun_Sliders_341315_000000.svg',\n name: 'basicPreferences',\n label: _subject => {\n return null\n },\n\n // Render the pane\n // The subject should be the logged in user.\n render: (subject, context) => {\n const dom = context.dom\n const store = context.session.store as Store\n\n function complainIfBad (ok: Boolean, mess: any) {\n if (ok) return\n container.appendChild(widgets.errorMessageBlock(dom, mess, '#fee'))\n }\n\n const container = dom.createElement('div')\n\n const formArea = setupUserTypesSection(container, dom)\n\n function loadData (doc: NamedNode, turtle: String) {\n doc = doc.doc() // remove # from URI if nec\n if (!store.holds(undefined, undefined, undefined, doc)) {\n // If not loaded already\n ;(parse as any)(turtle, store, doc.uri, 'text/turtle', null) // Load form directly\n }\n }\n\n const preferencesForm = store.sym(\n 'urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597#this'\n )\n loadData(preferencesForm, preferencesFormText)\n\n const ontologyExtra = store.sym(\n 'urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597-ONT'\n )\n loadData(ontologyExtra, ontologyData)\n\n async function doRender () {\n const renderContext = await login.ensureLoadedPreferences({\n dom,\n div: container\n })\n if (!renderContext.preferencesFile) {\n // Could be CORS\n console.log(\n 'Not doing private class preferences as no access to preferences file. ' +\n renderContext.preferencesFileError\n )\n return\n }\n const appendedForm = widgets.appendForm(\n dom,\n formArea,\n {},\n renderContext.me,\n preferencesForm,\n renderContext.preferencesFile,\n complainIfBad\n )\n appendedForm.style.borderStyle = 'none'\n\n const trustedApplicationsView = context.session.paneRegistry.byName('trustedApplications')\n if (trustedApplicationsView) {\n container.appendChild(trustedApplicationsView.render(null, context))\n }\n\n // @@ TODO Remove need for casting as any and bang (!) syntax\n addDeleteSection(container, store, renderContext.me!, dom)\n }\n\n doRender()\n\n return container\n }\n}\n\nfunction setupUserTypesSection (\n container: Element,\n dom: HTMLDocument\n): Element {\n const formContainer = createSection(container, dom, 'User types')\n\n const description = formContainer.appendChild(dom.createElement('p'))\n description.innerText = 'Here you can self-assign user types to help the data browser know which views you would like to access.'\n\n const userTypesLink = formContainer.appendChild(dom.createElement('a'))\n userTypesLink.href = 'https://github.com/solidos/userguide/#role'\n userTypesLink.innerText = 'Read more'\n\n const formArea = formContainer.appendChild(dom.createElement('div'))\n\n return formArea\n}\n\nexport default basicPreferencesPane\n\n// ends\n\nfunction addDeleteSection (\n container: HTMLElement,\n store: IndexedFormula,\n profile: NamedNode,\n dom: HTMLDocument\n): void {\n const section = createSection(container, dom, 'Delete account')\n\n const podServerNodes = store.each(profile, ns.space('storage'), null, profile.doc())\n const podServers = podServerNodes.map(node => node.value)\n\n const list = section.appendChild(dom.createElement('ul'))\n\n podServers.forEach(async server => {\n const deletionLink = await generateDeletionLink(server, dom)\n if (deletionLink) {\n const listItem = list.appendChild(dom.createElement('li'))\n listItem.appendChild(deletionLink)\n }\n })\n}\n\nasync function generateDeletionLink (\n podServer: string,\n dom: HTMLDocument\n): Promise<HTMLElement | null> {\n const link = dom.createElement('a')\n link.textContent = `Delete your account at ${podServer}`\n const deletionUrl = await getDeletionUrlForServer(podServer)\n if (typeof deletionUrl !== 'string') {\n return null\n }\n link.href = deletionUrl\n return link\n}\n\n/**\n * Hacky way to get the deletion link to a Pod\n *\n * This function infers the deletion link by assuming the URL structure of Node Solid server.\n * In the future, Solid will hopefully provide a standardised way of discovering the deletion link:\n * https://github.com/solidos/data-interoperability-panel/issues/18\n *\n * If NSS is in multi-user mode (the case on inrupt.net and solid.community), the deletion URL for\n * vincent.dev.inrupt.net would be at dev.inrupt.net/account/delete. In single-user mode, the\n * deletion URL would be at vincent.dev.inrupt.net/account/delete.\n *\n * @param server Pod server containing the user's account.\n * @returns URL of the page that Node Solid Server would offer to delete the account, or null if\n * the URLs we tried give invalid responses.\n */\nasync function getDeletionUrlForServer (\n server: string\n): Promise<string | null> {\n const singleUserUrl = new URL(server)\n const multiUserUrl = new URL(server)\n multiUserUrl.pathname = singleUserUrl.pathname = '/account/delete'\n\n const hostnameParts = multiUserUrl.hostname.split('.')\n // Remove `vincent.` from `vincent.dev.inrupt.net`, for example:\n multiUserUrl.hostname = hostnameParts.slice(1).join('.')\n\n const multiUserNssResponse = await fetch(multiUserUrl.href, {\n method: 'HEAD'\n })\n if (multiUserNssResponse.ok) {\n return multiUserUrl.href\n }\n\n const singleUserNssResponse = await fetch(singleUserUrl.href, {\n method: 'HEAD'\n })\n if (singleUserNssResponse.ok) {\n return singleUserUrl.href\n }\n return null\n}\n\nfunction createSection (\n container: Element,\n dom: HTMLDocument,\n title: string\n): Element {\n const section = container.appendChild(dom.createElement('div'))\n section.style.border = '0.3em solid #418d99'\n section.style.borderRadius = '0.5em'\n section.style.padding = '0.7em'\n section.style.marginTop = '0.7em'\n\n const titleElement = section.appendChild(dom.createElement('h3'))\n titleElement.innerText = title\n\n return section\n}\n"],"mappings":";;;;;;;;;AACA;;AACA;;+CADA,oJ;;;;;;;;;;;AAKO,IAAMA,oBAAoC,GAAG;EAClDC,IAAI,EAAEC,cAAA,CAAMC,QAAN,GAAiB,gCAD2B;EAElDC,IAAI,EAAE,kBAF4C;EAGlDC,KAAK,EAAE,eAAAC,QAAQ,EAA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A;YAAA;;YAAA,kCAeWoE,YAAY,CAACxB,IAfxB;;UAAA;YAAA;YAAA,OAkBsC+B,KAAK,CAACT,aAAa,CAACtB,IAAf,EAAqB;cAC5DgC,MAAM,EAAE;YADoD,CAArB,CAlB3C;;UAAA;YAkBQE,qBAlBR;;YAAA,KAqBMA,qBAAqB,CAAC9E,EArB5B;cAAA;cAAA;YAAA;;YAAA,kCAsBWkE,aAAa,CAACtB,IAtBzB;;UAAA;YAAA,kCAwBS,IAxBT;;UAAA;UAAA;YAAA;QAAA;MAAA;IAAA;EAAA,C;;;;AA2BA,SAASJ,aAAT,CACEtC,SADF,EAEEN,GAFF,EAGEmF,KAHF,EAIW;EACT,IAAMjC,OAAO,GAAG5C,SAAS,CAACC,WAAV,CAAsBP,GAAG,CAACU,aAAJ,CAAkB,KAAlB,CAAtB,CAAhB;EACAwC,OAAO,CAACb,KAAR,CAAc+C,MAAd,GAAuB,qBAAvB;EACAlC,OAAO,CAACb,KAAR,CAAcgD,YAAd,GAA6B,OAA7B;EACAnC,OAAO,CAACb,KAAR,CAAciD,OAAd,GAAwB,OAAxB;EACApC,OAAO,CAACb,KAAR,CAAckD,SAAd,GAA0B,OAA1B;EAEA,IAAMC,YAAY,GAAGtC,OAAO,CAAC3C,WAAR,CAAoBP,GAAG,CAACU,aAAJ,CAAkB,IAAlB,CAApB,CAArB;EACA8E,YAAY,CAAC1C,SAAb,GAAyBqC,KAAzB;EAEA,OAAOjC,OAAP;AACD"}
|
|
1
|
+
{"version":3,"file":"basicPreferences.js","names":["basicPreferencesPane","icon","icons","iconBase","name","label","_subject","render","subject","context","dom","store","session","complainIfBad","ok","mess","container","appendChild","widgets","errorMessageBlock","createElement","formArea","setupUserTypesSection","loadData","doc","turtle","holds","undefined","parse","uri","preferencesForm","sym","preferencesFormText","ontologyExtra","ontologyData","doRender","login","ensureLoadedPreferences","div","renderContext","preferencesFile","console","log","preferencesFileError","appendedForm","appendForm","me","style","borderStyle","trustedApplicationsView","paneRegistry","byName","addDeleteSection","formContainer","createSection","description","innerText","userTypesLink","href","profile","section","podServerNodes","each","ns","space","podServers","map","node","value","list","forEach","server","generateDeletionLink","deletionLink","listItem","podServer","link","textContent","getDeletionUrlForServer","deletionUrl","singleUserUrl","URL","multiUserUrl","pathname","hostnameParts","hostname","split","slice","join","fetch","method","multiUserNssResponse","singleUserNssResponse","title","border","borderRadius","padding","marginTop","titleElement"],"sources":["../../src/dashboard/basicPreferences.ts"],"sourcesContent":["import { PaneDefinition } from 'pane-registry'\nimport { IndexedFormula, NamedNode, parse, Store } from 'rdflib'\nimport { icons, login, ns, widgets } from 'solid-ui'\nimport ontologyData from './ontologyData.ttl'\nimport preferencesFormText from './preferencesFormText.ttl'\n\nexport const basicPreferencesPane: PaneDefinition = {\n icon: icons.iconBase + 'noun_Sliders_341315_000000.svg',\n name: 'basicPreferences',\n label: _subject => {\n return null\n },\n\n // Render the pane\n // The subject should be the logged in user.\n render: (subject, context) => {\n const dom = context.dom\n const store = context.session.store as Store\n\n function complainIfBad (ok: Boolean, mess: any) {\n if (ok) return\n container.appendChild(widgets.errorMessageBlock(dom, mess, '#fee'))\n }\n\n const container = dom.createElement('div')\n\n const formArea = setupUserTypesSection(container, dom)\n\n function loadData (doc: NamedNode, turtle: String) {\n doc = doc.doc() // remove # from URI if nec\n if (!store.holds(undefined, undefined, undefined, doc)) {\n // If not loaded already\n ;(parse as any)(turtle, store, doc.uri, 'text/turtle', null) // Load form directly\n }\n }\n\n const preferencesForm = store.sym(\n 'urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597#this'\n )\n loadData(preferencesForm, preferencesFormText)\n\n const ontologyExtra = store.sym(\n 'urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597-ONT'\n )\n loadData(ontologyExtra, ontologyData)\n\n async function doRender () {\n const renderContext = await login.ensureLoadedPreferences({\n dom,\n div: container\n })\n if (!renderContext.preferencesFile) {\n // Could be CORS\n console.log(\n 'Not doing private class preferences as no access to preferences file. ' +\n renderContext.preferencesFileError\n )\n return\n }\n const appendedForm = widgets.appendForm(\n dom,\n formArea,\n {},\n renderContext.me,\n preferencesForm,\n renderContext.preferencesFile,\n complainIfBad\n )\n appendedForm.style.borderStyle = 'none'\n\n const trustedApplicationsView = context.session.paneRegistry.byName('trustedApplications')\n if (trustedApplicationsView) {\n container.appendChild(trustedApplicationsView.render(null, context))\n }\n\n // @@ TODO Remove need for casting as any and bang (!) syntax\n addDeleteSection(container, store, renderContext.me!, dom)\n }\n\n doRender()\n\n return container\n }\n}\n\nfunction setupUserTypesSection (\n container: Element,\n dom: HTMLDocument\n): Element {\n const formContainer = createSection(container, dom, 'User types')\n\n const description = formContainer.appendChild(dom.createElement('p'))\n description.innerText = 'Here you can self-assign user types to help the data browser know which views you would like to access.'\n\n const userTypesLink = formContainer.appendChild(dom.createElement('a'))\n userTypesLink.href = 'https://github.com/solidos/userguide/#role'\n userTypesLink.innerText = 'Read more'\n\n const formArea = formContainer.appendChild(dom.createElement('div'))\n\n return formArea\n}\n\nexport default basicPreferencesPane\n\n// ends\n\nfunction addDeleteSection (\n container: HTMLElement,\n store: IndexedFormula,\n profile: NamedNode,\n dom: HTMLDocument\n): void {\n const section = createSection(container, dom, 'Delete account')\n\n const podServerNodes = store.each(profile, ns.space('storage'), null, profile.doc())\n const podServers = podServerNodes.map(node => node.value)\n\n const list = section.appendChild(dom.createElement('ul'))\n\n podServers.forEach(async server => {\n const deletionLink = await generateDeletionLink(server, dom)\n if (deletionLink) {\n const listItem = list.appendChild(dom.createElement('li'))\n listItem.appendChild(deletionLink)\n }\n })\n}\n\nasync function generateDeletionLink (\n podServer: string,\n dom: HTMLDocument\n): Promise<HTMLElement | null> {\n const link = dom.createElement('a')\n link.textContent = `Delete your account at ${podServer}`\n const deletionUrl = await getDeletionUrlForServer(podServer)\n if (typeof deletionUrl !== 'string') {\n return null\n }\n link.href = deletionUrl\n return link\n}\n\n/**\n * Hacky way to get the deletion link to a Pod\n *\n * This function infers the deletion link by assuming the URL structure of Node Solid server.\n * In the future, Solid will hopefully provide a standardised way of discovering the deletion link:\n * https://github.com/solidos/data-interoperability-panel/issues/18\n *\n * If NSS is in multi-user mode (the case on inrupt.net and solid.community), the deletion URL for\n * vincent.dev.inrupt.net would be at dev.inrupt.net/account/delete. In single-user mode, the\n * deletion URL would be at vincent.dev.inrupt.net/account/delete.\n *\n * @param server Pod server containing the user's account.\n * @returns URL of the page that Node Solid Server would offer to delete the account, or null if\n * the URLs we tried give invalid responses.\n */\nasync function getDeletionUrlForServer (\n server: string\n): Promise<string | null> {\n const singleUserUrl = new URL(server)\n const multiUserUrl = new URL(server)\n multiUserUrl.pathname = singleUserUrl.pathname = '/account/delete'\n\n const hostnameParts = multiUserUrl.hostname.split('.')\n // Remove `vincent.` from `vincent.dev.inrupt.net`, for example:\n multiUserUrl.hostname = hostnameParts.slice(1).join('.')\n\n const multiUserNssResponse = await fetch(multiUserUrl.href, {\n method: 'HEAD'\n })\n if (multiUserNssResponse.ok) {\n return multiUserUrl.href\n }\n\n const singleUserNssResponse = await fetch(singleUserUrl.href, {\n method: 'HEAD'\n })\n if (singleUserNssResponse.ok) {\n return singleUserUrl.href\n }\n return null\n}\n\nfunction createSection (\n container: Element,\n dom: HTMLDocument,\n title: string\n): Element {\n const section = container.appendChild(dom.createElement('div'))\n section.style.border = '0.3em solid #418d99'\n section.style.borderRadius = '0.5em'\n section.style.padding = '0.7em'\n section.style.marginTop = '0.7em'\n\n const titleElement = section.appendChild(dom.createElement('h3'))\n titleElement.innerText = title\n\n return section\n}\n"],"mappings":";;;;;;;AACA;AACA;AAAoD,+CADpD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,IAAMA,oBAAoC,GAAG;EAClDC,IAAI,EAAEC,cAAK,CAACC,QAAQ,GAAG,gCAAgC;EACvDC,IAAI,EAAE,kBAAkB;EACxBC,KAAK,EAAE,eAAAC,QAAQ,EAAI;IACjB,OAAO,IAAI;EACb,CAAC;EAED;EACA;EACAC,MAA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CAAC;UAAA;YAFIE,qBAAqB;YAAA,KAGvBA,qBAAqB,CAAC9E,EAAE;cAAA;cAAA;YAAA;YAAA,kCACnBkE,aAAa,CAACtB,IAAI;UAAA;YAAA,kCAEpB,IAAI;UAAA;UAAA;YAAA;QAAA;MAAA;IAAA;EAAA,CACZ;EAAA;AAAA;AAED,SAASJ,aAAa,CACpBtC,SAAkB,EAClBN,GAAiB,EACjBmF,KAAa,EACJ;EACT,IAAMjC,OAAO,GAAG5C,SAAS,CAACC,WAAW,CAACP,GAAG,CAACU,aAAa,CAAC,KAAK,CAAC,CAAC;EAC/DwC,OAAO,CAACb,KAAK,CAAC+C,MAAM,GAAG,qBAAqB;EAC5ClC,OAAO,CAACb,KAAK,CAACgD,YAAY,GAAG,OAAO;EACpCnC,OAAO,CAACb,KAAK,CAACiD,OAAO,GAAG,OAAO;EAC/BpC,OAAO,CAACb,KAAK,CAACkD,SAAS,GAAG,OAAO;EAEjC,IAAMC,YAAY,GAAGtC,OAAO,CAAC3C,WAAW,CAACP,GAAG,CAACU,aAAa,CAAC,IAAI,CAAC,CAAC;EACjE8E,YAAY,CAAC1C,SAAS,GAAGqC,KAAK;EAE9B,OAAOjC,OAAO;AAChB"}
|
|
@@ -4,63 +4,49 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.dashboardPane = void 0;
|
|
7
|
-
|
|
8
7
|
var _solidUi = require("solid-ui");
|
|
9
|
-
|
|
10
8
|
var _solidLogic = require("solid-logic");
|
|
11
|
-
|
|
12
9
|
var _homepage = require("./homepage");
|
|
13
|
-
|
|
14
10
|
var dashboardPane = {
|
|
15
11
|
icon: _solidUi.icons.iconBase + 'noun_547570.svg',
|
|
16
12
|
name: 'dashboard',
|
|
17
13
|
label: function label(subject) {
|
|
18
14
|
console.log();
|
|
19
|
-
|
|
20
15
|
if (subject.uri === subject.site().uri) {
|
|
21
16
|
return 'Dashboard';
|
|
22
17
|
}
|
|
23
|
-
|
|
24
18
|
return null;
|
|
25
19
|
},
|
|
26
20
|
render: function render(subject, context) {
|
|
27
21
|
console.log('Dashboard Pane Render');
|
|
28
22
|
var dom = context.dom;
|
|
29
23
|
var container = dom.createElement('div');
|
|
30
|
-
|
|
31
24
|
var runBuildPage = function runBuildPage() {
|
|
32
25
|
container.innerHTML = '';
|
|
33
26
|
buildPage(container, _solidLogic.authn.currentUser() || null, context, subject);
|
|
34
27
|
};
|
|
35
|
-
|
|
36
28
|
_solidLogic.authSession.onLogin(function () {
|
|
37
29
|
// console.log('On Login')
|
|
38
30
|
runBuildPage();
|
|
39
31
|
});
|
|
40
|
-
|
|
41
32
|
_solidLogic.authSession.onSessionRestore(function () {
|
|
42
33
|
// console.log('On Session Restore')
|
|
43
34
|
runBuildPage();
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
|
|
35
|
+
});
|
|
36
|
+
// console.log('Initial Load')
|
|
47
37
|
runBuildPage();
|
|
48
38
|
return container;
|
|
49
39
|
}
|
|
50
40
|
};
|
|
51
41
|
exports.dashboardPane = dashboardPane;
|
|
52
|
-
|
|
53
42
|
function buildPage(container, webId, context, subject) {
|
|
54
43
|
// if uri then SolidOS is a browse.html web app
|
|
55
44
|
var uri = new URL(window.location.href).searchParams.get('uri');
|
|
56
|
-
|
|
57
45
|
if (webId && (uri || webId.site().uri === subject.site().uri)) {
|
|
58
46
|
return buildDashboard(container, context);
|
|
59
47
|
}
|
|
60
|
-
|
|
61
48
|
return buildHomePage(container, subject);
|
|
62
49
|
}
|
|
63
|
-
|
|
64
50
|
function buildDashboard(container, context) {
|
|
65
51
|
// console.log('build dashboard')
|
|
66
52
|
// @@ TODO get a proper type
|
|
@@ -69,7 +55,6 @@ function buildDashboard(container, context) {
|
|
|
69
55
|
return container.appendChild(dashboard);
|
|
70
56
|
});
|
|
71
57
|
}
|
|
72
|
-
|
|
73
58
|
function buildHomePage(container, subject) {
|
|
74
59
|
// console.log('build home page')
|
|
75
60
|
var wrapper = document.createElement('div');
|
|
@@ -85,7 +70,6 @@ function buildHomePage(container, subject) {
|
|
|
85
70
|
return shadow.appendChild(homepage);
|
|
86
71
|
});
|
|
87
72
|
}
|
|
88
|
-
|
|
89
73
|
var _default = dashboardPane;
|
|
90
74
|
exports["default"] = _default;
|
|
91
75
|
//# sourceMappingURL=dashboardPane.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboardPane.js","names":["dashboardPane","icon","icons","iconBase","name","label","subject","console","log","uri","site","render","context","dom","container","createElement","runBuildPage","innerHTML","buildPage","authn","currentUser","authSession","onLogin","onSessionRestore","webId","URL","window","location","href","searchParams","get","buildDashboard","buildHomePage","outliner","getOutliner","getDashboard","then","dashboard","appendChild","wrapper","document","shadow","attachShadow","mode","link","rel","generateHomepage","store","fetcher","homepage"],"sources":["../../src/dashboard/dashboardPane.ts"],"sourcesContent":["import { icons } from 'solid-ui'\nimport { authn, authSession, store } from 'solid-logic'\nimport { Fetcher, NamedNode } from 'rdflib'\nimport { generateHomepage } from './homepage'\nimport { DataBrowserContext, PaneDefinition } from 'pane-registry'\n\nexport const dashboardPane: PaneDefinition = {\n icon: icons.iconBase + 'noun_547570.svg',\n name: 'dashboard',\n label: subject => {\n console.log()\n if (subject.uri === subject.site().uri) {\n return 'Dashboard'\n }\n return null\n },\n render: (subject, context) => {\n console.log('Dashboard Pane Render')\n const dom = context.dom\n const container = dom.createElement('div')\n const runBuildPage = () => {\n container.innerHTML = ''\n buildPage(\n container,\n authn.currentUser() || null,\n context,\n subject\n )\n }\n\n authSession.onLogin(() => {\n // console.log('On Login')\n runBuildPage()\n })\n authSession.onSessionRestore(() => {\n // console.log('On Session Restore')\n runBuildPage()\n })\n // console.log('Initial Load')\n runBuildPage()\n\n return container\n }\n}\n\nfunction buildPage (\n container: HTMLElement,\n webId: NamedNode | null,\n context: DataBrowserContext,\n subject: NamedNode\n) {\n // if uri then SolidOS is a browse.html web app\n const uri = (new URL(window.location.href)).searchParams.get('uri')\n if (webId && (uri || webId.site().uri === subject.site().uri)) {\n return buildDashboard(container, context)\n }\n return buildHomePage(container, subject)\n}\n\nfunction buildDashboard (container: HTMLElement, context: DataBrowserContext) {\n // console.log('build dashboard')\n // @@ TODO get a proper type\n const outliner: any = context.getOutliner(context.dom)\n outliner\n .getDashboard()\n .then((dashboard: HTMLElement) => container.appendChild(dashboard))\n}\n\nfunction buildHomePage (container: HTMLElement, subject: NamedNode) {\n // console.log('build home page')\n const wrapper = document.createElement('div')\n container.appendChild(wrapper)\n const shadow = wrapper.attachShadow({ mode: 'open' })\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = '/common/css/bootstrap.min.css'\n shadow.appendChild(link)\n generateHomepage(subject, store, store.fetcher as Fetcher).then(homepage =>\n shadow.appendChild(homepage)\n )\n}\n\nexport default dashboardPane\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dashboardPane.js","names":["dashboardPane","icon","icons","iconBase","name","label","subject","console","log","uri","site","render","context","dom","container","createElement","runBuildPage","innerHTML","buildPage","authn","currentUser","authSession","onLogin","onSessionRestore","webId","URL","window","location","href","searchParams","get","buildDashboard","buildHomePage","outliner","getOutliner","getDashboard","then","dashboard","appendChild","wrapper","document","shadow","attachShadow","mode","link","rel","generateHomepage","store","fetcher","homepage"],"sources":["../../src/dashboard/dashboardPane.ts"],"sourcesContent":["import { icons } from 'solid-ui'\nimport { authn, authSession, store } from 'solid-logic'\nimport { Fetcher, NamedNode } from 'rdflib'\nimport { generateHomepage } from './homepage'\nimport { DataBrowserContext, PaneDefinition } from 'pane-registry'\n\nexport const dashboardPane: PaneDefinition = {\n icon: icons.iconBase + 'noun_547570.svg',\n name: 'dashboard',\n label: subject => {\n console.log()\n if (subject.uri === subject.site().uri) {\n return 'Dashboard'\n }\n return null\n },\n render: (subject, context) => {\n console.log('Dashboard Pane Render')\n const dom = context.dom\n const container = dom.createElement('div')\n const runBuildPage = () => {\n container.innerHTML = ''\n buildPage(\n container,\n authn.currentUser() || null,\n context,\n subject\n )\n }\n\n authSession.onLogin(() => {\n // console.log('On Login')\n runBuildPage()\n })\n authSession.onSessionRestore(() => {\n // console.log('On Session Restore')\n runBuildPage()\n })\n // console.log('Initial Load')\n runBuildPage()\n\n return container\n }\n}\n\nfunction buildPage (\n container: HTMLElement,\n webId: NamedNode | null,\n context: DataBrowserContext,\n subject: NamedNode\n) {\n // if uri then SolidOS is a browse.html web app\n const uri = (new URL(window.location.href)).searchParams.get('uri')\n if (webId && (uri || webId.site().uri === subject.site().uri)) {\n return buildDashboard(container, context)\n }\n return buildHomePage(container, subject)\n}\n\nfunction buildDashboard (container: HTMLElement, context: DataBrowserContext) {\n // console.log('build dashboard')\n // @@ TODO get a proper type\n const outliner: any = context.getOutliner(context.dom)\n outliner\n .getDashboard()\n .then((dashboard: HTMLElement) => container.appendChild(dashboard))\n}\n\nfunction buildHomePage (container: HTMLElement, subject: NamedNode) {\n // console.log('build home page')\n const wrapper = document.createElement('div')\n container.appendChild(wrapper)\n const shadow = wrapper.attachShadow({ mode: 'open' })\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = '/common/css/bootstrap.min.css'\n shadow.appendChild(link)\n generateHomepage(subject, store, store.fetcher as Fetcher).then(homepage =>\n shadow.appendChild(homepage)\n )\n}\n\nexport default dashboardPane\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AAGO,IAAMA,aAA6B,GAAG;EAC3CC,IAAI,EAAEC,cAAK,CAACC,QAAQ,GAAG,iBAAiB;EACxCC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,eAAAC,OAAO,EAAI;IAChBC,OAAO,CAACC,GAAG,EAAE;IACb,IAAIF,OAAO,CAACG,GAAG,KAAKH,OAAO,CAACI,IAAI,EAAE,CAACD,GAAG,EAAE;MACtC,OAAO,WAAW;IACpB;IACA,OAAO,IAAI;EACb,CAAC;EACDE,MAAM,EAAE,gBAACL,OAAO,EAAEM,OAAO,EAAK;IAC5BL,OAAO,CAACC,GAAG,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AAKvB,SAAS,CAACwB,WAAW,CAACD,SAAS,CAAC;EAAA,EAAC;AACvE;AAEA,SAASL,aAAa,CAAElB,SAAsB,EAAER,OAAkB,EAAE;EAClE;EACA,IAAMiC,OAAO,GAAGC,QAAQ,CAACzB,aAAa,CAAC,KAAK,CAAC;EAC7CD,SAAS,CAACwB,WAAW,CAACC,OAAO,CAAC;EAC9B,IAAME,MAAM,GAAGF,OAAO,CAACG,YAAY,CAAC;IAAEC,IAAI,EAAE;EAAO,CAAC,CAAC;EACrD,IAAMC,IAAI,GAAGJ,QAAQ,CAACzB,aAAa,CAAC,MAAM,CAAC;EAC3C6B,IAAI,CAACC,GAAG,GAAG,YAAY;EACvBD,IAAI,CAAChB,IAAI,GAAG,+BAA+B;EAC3Ca,MAAM,CAACH,WAAW,CAACM,IAAI,CAAC;EACxB,IAAAE,0BAAgB,EAACxC,OAAO,EAAEyC,iBAAK,EAAEA,iBAAK,CAACC,OAAO,CAAY,CAACZ,IAAI,CAAC,UAAAa,QAAQ;IAAA,OACtER,MAAM,CAACH,WAAW,CAACW,QAAQ,CAAC;EAAA,EAC7B;AACH;AAAC,eAEcjD,aAAa;AAAA"}
|
|
@@ -4,23 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.generateHomepage = generateHomepage;
|
|
7
|
-
|
|
8
7
|
var _rdflib = require("rdflib");
|
|
9
|
-
|
|
10
8
|
var _solidUi = require("solid-ui");
|
|
11
|
-
|
|
12
9
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
13
|
-
|
|
14
|
-
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; }
|
|
15
|
-
|
|
10
|
+
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, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $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 defineProperty(generator, "_invoke", { value: makeInvokeMethod(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; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(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); } }; } 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, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), 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 (val) { var object = Object(val), 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; }
|
|
16
11
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17
|
-
|
|
18
12
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
19
|
-
|
|
20
13
|
function generateHomepage(_x, _x2, _x3) {
|
|
21
14
|
return _generateHomepage.apply(this, arguments);
|
|
22
15
|
}
|
|
23
|
-
|
|
24
16
|
function _generateHomepage() {
|
|
25
17
|
_generateHomepage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(subject, store, fetcher) {
|
|
26
18
|
var ownersProfile, name, wrapper;
|
|
@@ -30,7 +22,6 @@ function _generateHomepage() {
|
|
|
30
22
|
case 0:
|
|
31
23
|
_context.next = 2;
|
|
32
24
|
return loadProfile(subject, fetcher);
|
|
33
|
-
|
|
34
25
|
case 2:
|
|
35
26
|
ownersProfile = _context.sent;
|
|
36
27
|
name = getName(store, ownersProfile);
|
|
@@ -39,7 +30,6 @@ function _generateHomepage() {
|
|
|
39
30
|
wrapper.appendChild(createTitle(ownersProfile.uri, name));
|
|
40
31
|
wrapper.appendChild(createDataSection(name));
|
|
41
32
|
return _context.abrupt("return", wrapper);
|
|
42
|
-
|
|
43
33
|
case 9:
|
|
44
34
|
case "end":
|
|
45
35
|
return _context.stop();
|
|
@@ -49,7 +39,6 @@ function _generateHomepage() {
|
|
|
49
39
|
}));
|
|
50
40
|
return _generateHomepage.apply(this, arguments);
|
|
51
41
|
}
|
|
52
|
-
|
|
53
42
|
function createDataSection(name) {
|
|
54
43
|
var dataSection = document.createElement('section');
|
|
55
44
|
var title = document.createElement('h2');
|
|
@@ -65,7 +54,6 @@ function createDataSection(name) {
|
|
|
65
54
|
listGroup.appendChild(publicDataLink);
|
|
66
55
|
return dataSection;
|
|
67
56
|
}
|
|
68
|
-
|
|
69
57
|
function createTitle(uri, name) {
|
|
70
58
|
var profileLink = document.createElement('a');
|
|
71
59
|
profileLink.href = uri;
|
|
@@ -77,11 +65,9 @@ function createTitle(uri, name) {
|
|
|
77
65
|
title.appendChild(profileLinkPost);
|
|
78
66
|
return title;
|
|
79
67
|
}
|
|
80
|
-
|
|
81
68
|
function loadProfile(_x4, _x5) {
|
|
82
69
|
return _loadProfile.apply(this, arguments);
|
|
83
70
|
}
|
|
84
|
-
|
|
85
71
|
function _loadProfile() {
|
|
86
72
|
_loadProfile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(subject, fetcher) {
|
|
87
73
|
var pod, webId;
|
|
@@ -90,14 +76,11 @@ function _loadProfile() {
|
|
|
90
76
|
switch (_context2.prev = _context2.next) {
|
|
91
77
|
case 0:
|
|
92
78
|
pod = subject.site().uri; // TODO: This is a hack - we cannot assume that the profile is at this document, but we will live with it for now
|
|
93
|
-
|
|
94
79
|
webId = (0, _rdflib.sym)("".concat(pod, "profile/card#me"));
|
|
95
80
|
_context2.next = 4;
|
|
96
81
|
return fetcher.load(webId);
|
|
97
|
-
|
|
98
82
|
case 4:
|
|
99
83
|
return _context2.abrupt("return", webId);
|
|
100
|
-
|
|
101
84
|
case 5:
|
|
102
85
|
case "end":
|
|
103
86
|
return _context2.stop();
|
|
@@ -107,7 +90,6 @@ function _loadProfile() {
|
|
|
107
90
|
}));
|
|
108
91
|
return _loadProfile.apply(this, arguments);
|
|
109
92
|
}
|
|
110
|
-
|
|
111
93
|
function getName(store, ownersProfile) {
|
|
112
94
|
return store.anyValue(ownersProfile, _solidUi.ns.vcard('fn'), null, ownersProfile.doc()) || store.anyValue(ownersProfile, _solidUi.ns.foaf('name'), null, ownersProfile.doc()) || new URL(ownersProfile.uri).host.split('.')[0];
|
|
113
95
|
}
|