solid-panes 3.5.29-alpha.1 → 3.5.29
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/lib/RDFXMLPane.js +10 -2
- package/lib/RDFXMLPane.js.map +1 -1
- package/lib/argument/argumentPane.js +7 -5
- package/lib/argument/argumentPane.js.map +1 -1
- package/lib/attach/attachPane.js +13 -7
- package/lib/attach/attachPane.js.map +1 -1
- package/lib/audio/audioPane.js +13 -6
- package/lib/audio/audioPane.js.map +1 -1
- package/lib/classInstancePane.js +11 -3
- package/lib/classInstancePane.js.map +1 -1
- package/lib/dashboard/basicPreferences.js +96 -104
- package/lib/dashboard/basicPreferences.js.map +1 -1
- package/lib/dashboard/homepage.js +27 -31
- package/lib/dashboard/homepage.js.map +1 -1
- package/lib/dataContentPane.js +12 -4
- package/lib/dataContentPane.js.map +1 -1
- package/lib/defaultPane.js +11 -3
- package/lib/defaultPane.js.map +1 -1
- package/lib/dokieli/dokieliPane.js +15 -11
- package/lib/dokieli/dokieliPane.js.map +1 -1
- package/lib/dokieli/new.js +6 -1
- package/lib/dokieli/new.js.map +1 -1
- package/lib/form/pane.js +8 -5
- package/lib/form/pane.js.map +1 -1
- package/lib/home/homePane.d.ts.map +1 -1
- package/lib/home/homePane.js +35 -49
- package/lib/home/homePane.js.map +1 -1
- package/lib/imagePane.js +11 -2
- package/lib/imagePane.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/mainPage/header.js +65 -73
- package/lib/mainPage/header.js.map +1 -1
- package/lib/mainPage/index.js +17 -19
- package/lib/mainPage/index.js.map +1 -1
- package/lib/microblogPane/microblogPane.js +82 -84
- package/lib/microblogPane/microblogPane.js.map +1 -1
- package/lib/n3Pane.js +11 -2
- package/lib/n3Pane.js.map +1 -1
- package/lib/outline/licenseOptions.js +13 -11
- package/lib/outline/licenseOptions.js.map +1 -1
- package/lib/outline/manager.js +581 -615
- package/lib/outline/manager.js.map +1 -1
- package/lib/outline/manager.test.js +16 -15
- package/lib/outline/manager.test.js.map +1 -1
- package/lib/outline/outlineIcons.js +10 -2
- package/lib/outline/outlineIcons.js.map +1 -1
- package/lib/outline/propertyViews.d.ts +3 -2
- package/lib/outline/propertyViews.d.ts.map +1 -1
- package/lib/outline/propertyViews.js +7 -5
- package/lib/outline/propertyViews.js.map +1 -1
- package/lib/outline/propertyViews.test.js +6 -4
- package/lib/outline/propertyViews.test.js.map +1 -1
- package/lib/outline/queryByExample.js +6 -6
- package/lib/outline/queryByExample.js.map +1 -1
- package/lib/outline/userInput.js +7 -5
- package/lib/outline/userInput.js.map +1 -1
- package/lib/playlist/playlistPane.js +13 -6
- package/lib/playlist/playlistPane.js.map +1 -1
- package/lib/profile/editProfile.view.d.ts.map +1 -1
- package/lib/profile/editProfile.view.js +16 -0
- package/lib/profile/editProfile.view.js.map +1 -1
- package/lib/registerPanes.js +93 -50
- package/lib/registerPanes.js.map +1 -1
- package/lib/schedule/formsForSchedule.js +6 -1
- package/lib/schedule/formsForSchedule.js.map +1 -1
- package/lib/schedule/schedulePane.js +9 -4
- package/lib/schedule/schedulePane.js.map +1 -1
- package/lib/slideshow/slideshowPane.js +16 -11
- package/lib/slideshow/slideshowPane.js.map +1 -1
- package/lib/socialPane.js +16 -12
- package/lib/socialPane.js.map +1 -1
- package/lib/tabbed/tabbedPane.js +32 -34
- package/lib/tabbed/tabbedPane.js.map +1 -1
- package/lib/tableViewPane.js +12 -3
- package/lib/tableViewPane.js.map +1 -1
- package/lib/test-import-export/common.js +6 -2
- package/lib/test-import-export/common.js.map +1 -1
- package/lib/test-import-export/edit-importer.js +9 -11
- package/lib/test-import-export/edit-importer.js.map +1 -1
- package/lib/transaction/pane.js +12 -6
- package/lib/transaction/pane.js.map +1 -1
- package/lib/transaction/period.js +11 -4
- package/lib/transaction/period.js.map +1 -1
- package/lib/trip/tripPane.js +12 -5
- package/lib/trip/tripPane.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.dom.js +4 -1
- package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.test.js +3 -0
- package/lib/trustedApplications/trustedApplications.test.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.utils.js +1 -1
- package/lib/trustedApplications/trustedApplications.view.js +38 -40
- package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
- package/lib/ui/pane.js +12 -5
- package/lib/ui/pane.js.map +1 -1
- package/lib/versionInfo.js +3 -3
- package/lib/versionInfo.js.map +1 -1
- package/lib/video/videoPane.js +12 -5
- package/lib/video/videoPane.js.map +1 -1
- package/package.json +20 -22
- package/src/RDFXMLPane.js +2 -2
- package/src/argument/argumentPane.js +1 -1
- package/src/attach/attachPane.js +3 -3
- package/src/audio/audioPane.js +3 -3
- package/src/classInstancePane.js +3 -3
- package/src/dataContentPane.js +3 -4
- package/src/defaultPane.js +3 -3
- package/src/dokieli/dokieliPane.js +5 -5
- package/src/dokieli/new.js +1 -1
- package/src/form/pane.js +2 -2
- package/src/home/homePane.ts +1 -14
- package/src/imagePane.js +2 -2
- package/src/index.ts +1 -1
- package/src/microblogPane/microblogPane.js +1 -1
- package/src/n3Pane.js +2 -2
- package/src/outline/licenseOptions.js +9 -8
- package/src/outline/manager.js +18 -20
- package/src/outline/manager.test.ts +6 -0
- package/src/outline/outlineIcons.js +4 -2
- package/src/outline/propertyViews.test.ts +7 -1
- package/src/outline/propertyViews.ts +3 -3
- package/src/outline/queryByExample.js +3 -9
- package/src/outline/userInput.js +1 -1
- package/src/playlist/playlistPane.js +3 -3
- package/src/profile/editProfile.view.ts +20 -0
- package/src/registerPanes.js +92 -52
- package/src/schedule/formsForSchedule.js +1 -1
- package/src/schedule/schedulePane.js +6 -2
- package/src/slideshow/slideshowPane.js +3 -6
- package/src/socialPane.js +4 -5
- package/src/tableViewPane.js +3 -3
- package/src/test-import-export/common.js +1 -1
- package/src/test-import-export/edit-importer.js +5 -10
- package/src/transaction/pane.js +3 -3
- package/src/transaction/period.js +2 -2
- package/src/trip/tripPane.js +3 -3
- package/src/trustedApplications/trustedApplications.test.ts +4 -0
- package/src/ui/pane.js +3 -3
- package/src/versionInfo.ts +3 -3
- package/src/video/videoPane.js +3 -3
- package/webpack.config.js +3 -1
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = exports.basicPreferencesPane = void 0;
|
|
8
8
|
var _rdflib = require("rdflib");
|
|
9
9
|
var _solidUi = require("solid-ui");
|
|
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; }
|
|
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 methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), 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; }
|
|
11
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); } }
|
|
12
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); }); }; }
|
|
13
13
|
/* babel-plugin-inline-import './ontologyData.ttl' */
|
|
@@ -51,37 +51,35 @@ var basicPreferencesPane = {
|
|
|
51
51
|
_doRender = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
52
52
|
var renderContext, appendedForm, trustedApplicationsView;
|
|
53
53
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
54
|
-
while (1) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
54
|
+
while (1) switch (_context.prev = _context.next) {
|
|
55
|
+
case 0:
|
|
56
|
+
_context.next = 2;
|
|
57
|
+
return _solidUi.login.ensureLoadedPreferences({
|
|
58
|
+
dom: dom,
|
|
59
|
+
div: container
|
|
60
|
+
});
|
|
61
|
+
case 2:
|
|
62
|
+
renderContext = _context.sent;
|
|
63
|
+
if (renderContext.preferencesFile) {
|
|
64
|
+
_context.next = 6;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
// Could be CORS
|
|
68
|
+
console.log('Not doing private class preferences as no access to preferences file. ' + renderContext.preferencesFileError);
|
|
69
|
+
return _context.abrupt("return");
|
|
70
|
+
case 6:
|
|
71
|
+
appendedForm = _solidUi.widgets.appendForm(dom, formArea, {}, renderContext.me, preferencesForm, renderContext.preferencesFile, complainIfBad);
|
|
72
|
+
appendedForm.style.borderStyle = 'none';
|
|
73
|
+
trustedApplicationsView = context.session.paneRegistry.byName('trustedApplications');
|
|
74
|
+
if (trustedApplicationsView) {
|
|
75
|
+
container.appendChild(trustedApplicationsView.render(null, context));
|
|
76
|
+
}
|
|
78
77
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
78
|
+
// @@ TODO Remove need for casting as any and bang (!) syntax
|
|
79
|
+
addDeleteSection(container, store, renderContext.me, dom);
|
|
80
|
+
case 11:
|
|
81
|
+
case "end":
|
|
82
|
+
return _context.stop();
|
|
85
83
|
}
|
|
86
84
|
}, _callee);
|
|
87
85
|
}));
|
|
@@ -115,21 +113,19 @@ function addDeleteSection(container, store, profile, dom) {
|
|
|
115
113
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(server) {
|
|
116
114
|
var deletionLink, listItem;
|
|
117
115
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
118
|
-
while (1) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return _context2.stop();
|
|
132
|
-
}
|
|
116
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
117
|
+
case 0:
|
|
118
|
+
_context2.next = 2;
|
|
119
|
+
return generateDeletionLink(server, dom);
|
|
120
|
+
case 2:
|
|
121
|
+
deletionLink = _context2.sent;
|
|
122
|
+
if (deletionLink) {
|
|
123
|
+
listItem = list.appendChild(dom.createElement('li'));
|
|
124
|
+
listItem.appendChild(deletionLink);
|
|
125
|
+
}
|
|
126
|
+
case 4:
|
|
127
|
+
case "end":
|
|
128
|
+
return _context2.stop();
|
|
133
129
|
}
|
|
134
130
|
}, _callee2);
|
|
135
131
|
}));
|
|
@@ -160,27 +156,25 @@ function _generateDeletionLink() {
|
|
|
160
156
|
_generateDeletionLink = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(podServer, dom) {
|
|
161
157
|
var link, deletionUrl;
|
|
162
158
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
163
|
-
while (1) {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
return _context3.stop();
|
|
183
|
-
}
|
|
159
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
160
|
+
case 0:
|
|
161
|
+
link = dom.createElement('a');
|
|
162
|
+
link.textContent = "Delete your account at ".concat(podServer);
|
|
163
|
+
_context3.next = 4;
|
|
164
|
+
return getDeletionUrlForServer(podServer);
|
|
165
|
+
case 4:
|
|
166
|
+
deletionUrl = _context3.sent;
|
|
167
|
+
if (!(typeof deletionUrl !== 'string')) {
|
|
168
|
+
_context3.next = 7;
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
return _context3.abrupt("return", null);
|
|
172
|
+
case 7:
|
|
173
|
+
link.href = deletionUrl;
|
|
174
|
+
return _context3.abrupt("return", link);
|
|
175
|
+
case 9:
|
|
176
|
+
case "end":
|
|
177
|
+
return _context3.stop();
|
|
184
178
|
}
|
|
185
179
|
}, _callee3);
|
|
186
180
|
}));
|
|
@@ -193,43 +187,41 @@ function _getDeletionUrlForServer() {
|
|
|
193
187
|
_getDeletionUrlForServer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(server) {
|
|
194
188
|
var singleUserUrl, multiUserUrl, hostnameParts, multiUserNssResponse, singleUserNssResponse;
|
|
195
189
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
196
|
-
while (1) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
return _context4.stop();
|
|
232
|
-
}
|
|
190
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
191
|
+
case 0:
|
|
192
|
+
singleUserUrl = new URL(server);
|
|
193
|
+
multiUserUrl = new URL(server);
|
|
194
|
+
multiUserUrl.pathname = singleUserUrl.pathname = '/account/delete';
|
|
195
|
+
hostnameParts = multiUserUrl.hostname.split('.'); // Remove `vincent.` from `vincent.dev.inrupt.net`, for example:
|
|
196
|
+
multiUserUrl.hostname = hostnameParts.slice(1).join('.');
|
|
197
|
+
_context4.next = 7;
|
|
198
|
+
return fetch(multiUserUrl.href, {
|
|
199
|
+
method: 'HEAD'
|
|
200
|
+
});
|
|
201
|
+
case 7:
|
|
202
|
+
multiUserNssResponse = _context4.sent;
|
|
203
|
+
if (!multiUserNssResponse.ok) {
|
|
204
|
+
_context4.next = 10;
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
return _context4.abrupt("return", multiUserUrl.href);
|
|
208
|
+
case 10:
|
|
209
|
+
_context4.next = 12;
|
|
210
|
+
return fetch(singleUserUrl.href, {
|
|
211
|
+
method: 'HEAD'
|
|
212
|
+
});
|
|
213
|
+
case 12:
|
|
214
|
+
singleUserNssResponse = _context4.sent;
|
|
215
|
+
if (!singleUserNssResponse.ok) {
|
|
216
|
+
_context4.next = 15;
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
return _context4.abrupt("return", singleUserUrl.href);
|
|
220
|
+
case 15:
|
|
221
|
+
return _context4.abrupt("return", null);
|
|
222
|
+
case 16:
|
|
223
|
+
case "end":
|
|
224
|
+
return _context4.stop();
|
|
233
225
|
}
|
|
234
226
|
}, _callee4);
|
|
235
227
|
}));
|
|
@@ -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;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,MAAM,EAAE,gBAACC,OAAO,EAAEC,OAAO,EAAK;IAC5B,IAAMC,GAAG,GAAGD,OAAO,CAACC,GAAG;IACvB,IAAMC,KAAK,GAAGF,OAAO,CAACG,OAAO,CAACD,KAAc;IAE5C,SAASE,aAAa,CAAEC,EAAW,EAAEC,IAAS,EAAE;MAC9C,IAAID,EAAE,EAAE;MACRE,SAAS,CAACC,WAAW,CAACC,gBAAO,CAACC,iBAAiB,CAACT,GAAG,EAAEK,IAAI,EAAE,MAAM,CAAC,CAAC;IACrE;IAEA,IAAMC,SAAS,GAAGN,GAAG,CAACU,aAAa,CAAC,KAAK,CAAC;IAE1C,IAAMC,QAAQ,GAAGC,qBAAqB,CAACN,SAAS,EAAEN,GAAG,CAAC;IAEtD,SAASa,QAAQ,CAAEC,GAAc,EAAEC,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AK,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"}
|
|
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,MAAM,EAAE,gBAACC,OAAO,EAAEC,OAAO,EAAK;IAC5B,IAAMC,GAAG,GAAGD,OAAO,CAACC,GAAG;IACvB,IAAMC,KAAK,GAAGF,OAAO,CAACG,OAAO,CAACD,KAAc;IAE5C,SAASE,aAAa,CAAEC,EAAW,EAAEC,IAAS,EAAE;MAC9C,IAAID,EAAE,EAAE;MACRE,SAAS,CAACC,WAAW,CAACC,gBAAO,CAACC,iBAAiB,CAACT,GAAG,EAAEK,IAAI,EAAE,MAAM,CAAC,CAAC;IACrE;IAEA,IAAMC,SAAS,GAAGN,GAAG,CAACU,aAAa,CAAC,KAAK,CAAC;IAE1C,IAAMC,QAAQ,GAAGC,qBAAqB,CAACN,SAAS,EAAEN,GAAG,CAAC;IAEtD,SAASa,QAAQ,CAAEC,GAAc,EAAEC,MAAc,EAAE;MACjDD,GAAG,GAAGA,GAAG,CAACA,GAAG,EAAE,EAAC;MAChB,IAAI,CAACb,KAAK,CAACe,KAAK,CAACC,SAAS,EAAEA,SAAS,EAAEA,SAAS,EAAEH,GAAG,CAAC,EAAE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AOjC,OAAO;AAChB"}
|
|
@@ -7,7 +7,7 @@ exports.generateHomepage = generateHomepage;
|
|
|
7
7
|
var _rdflib = require("rdflib");
|
|
8
8
|
var _solidUi = require("solid-ui");
|
|
9
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); }
|
|
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; }
|
|
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 methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), 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; }
|
|
11
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); } }
|
|
12
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); }); }; }
|
|
13
13
|
function generateHomepage(_x, _x2, _x3) {
|
|
@@ -17,23 +17,21 @@ function _generateHomepage() {
|
|
|
17
17
|
_generateHomepage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(subject, store, fetcher) {
|
|
18
18
|
var ownersProfile, name, wrapper;
|
|
19
19
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
20
|
-
while (1) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return _context.stop();
|
|
36
|
-
}
|
|
20
|
+
while (1) switch (_context.prev = _context.next) {
|
|
21
|
+
case 0:
|
|
22
|
+
_context.next = 2;
|
|
23
|
+
return loadProfile(subject, fetcher);
|
|
24
|
+
case 2:
|
|
25
|
+
ownersProfile = _context.sent;
|
|
26
|
+
name = getName(store, ownersProfile);
|
|
27
|
+
wrapper = document.createElement('div');
|
|
28
|
+
wrapper.classList.add('container');
|
|
29
|
+
wrapper.appendChild(createTitle(ownersProfile.uri, name));
|
|
30
|
+
wrapper.appendChild(createDataSection(name));
|
|
31
|
+
return _context.abrupt("return", wrapper);
|
|
32
|
+
case 9:
|
|
33
|
+
case "end":
|
|
34
|
+
return _context.stop();
|
|
37
35
|
}
|
|
38
36
|
}, _callee);
|
|
39
37
|
}));
|
|
@@ -72,19 +70,17 @@ function _loadProfile() {
|
|
|
72
70
|
_loadProfile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(subject, fetcher) {
|
|
73
71
|
var pod, webId;
|
|
74
72
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
75
|
-
while (1) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return _context2.stop();
|
|
87
|
-
}
|
|
73
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
74
|
+
case 0:
|
|
75
|
+
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
|
|
76
|
+
webId = (0, _rdflib.sym)("".concat(pod, "profile/card#me"));
|
|
77
|
+
_context2.next = 4;
|
|
78
|
+
return fetcher.load(webId);
|
|
79
|
+
case 4:
|
|
80
|
+
return _context2.abrupt("return", webId);
|
|
81
|
+
case 5:
|
|
82
|
+
case "end":
|
|
83
|
+
return _context2.stop();
|
|
88
84
|
}
|
|
89
85
|
}, _callee2);
|
|
90
86
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"homepage.js","names":["generateHomepage","subject","store","fetcher","loadProfile","ownersProfile","name","getName","wrapper","document","createElement","classList","add","appendChild","createTitle","uri","createDataSection","dataSection","title","innerText","listGroup","publicDataLink","href","window","location","profileLink","profileLinkPost","pod","site","webId","sym","load","anyValue","ns","vcard","doc","foaf","URL","host","split"],"sources":["../../src/dashboard/homepage.ts"],"sourcesContent":["import { Fetcher, IndexedFormula, NamedNode, sym } from 'rdflib'\nimport { ns } from 'solid-ui'\n\nexport async function generateHomepage (\n subject: NamedNode,\n store: IndexedFormula,\n fetcher: Fetcher\n): Promise<HTMLElement> {\n const ownersProfile = await loadProfile(subject, fetcher)\n const name = getName(store, ownersProfile)\n\n const wrapper = document.createElement('div')\n wrapper.classList.add('container')\n wrapper.appendChild(createTitle(ownersProfile.uri, name))\n wrapper.appendChild(createDataSection(name))\n\n return wrapper\n}\n\nfunction createDataSection (name: string): HTMLElement {\n const dataSection = document.createElement('section')\n\n const title = document.createElement('h2')\n title.innerText = 'Data'\n dataSection.appendChild(title)\n\n const listGroup = document.createElement('div')\n listGroup.classList.add('list-group')\n dataSection.appendChild(listGroup)\n\n const publicDataLink = document.createElement('a')\n publicDataLink.classList.add('list-group-item')\n publicDataLink.href = window.document.location.href + 'public/'\n publicDataLink.innerText = `View ${name}'s files`\n listGroup.appendChild(publicDataLink)\n\n return dataSection\n}\n\nfunction createTitle (uri: string, name: string): HTMLElement {\n const profileLink = document.createElement('a')\n profileLink.href = uri\n profileLink.innerText = name\n\n const profileLinkPost = document.createElement('span')\n profileLinkPost.innerText = '\\'s Pod'\n\n const title = document.createElement('h1')\n title.appendChild(profileLink)\n title.appendChild(profileLinkPost)\n\n return title\n}\n\nasync function loadProfile (\n subject: NamedNode,\n fetcher: Fetcher\n): Promise<NamedNode> {\n const pod = subject.site().uri\n // TODO: This is a hack - we cannot assume that the profile is at this document, but we will live with it for now\n const webId = sym(`${pod}profile/card#me`)\n await fetcher.load(webId)\n return webId\n}\n\nfunction getName (store: IndexedFormula, ownersProfile: NamedNode): string {\n return (\n store.anyValue(ownersProfile, ns.vcard('fn'), null, ownersProfile.doc()) ||\n store.anyValue(ownersProfile, ns.foaf('name'), null, ownersProfile.doc()) ||\n new URL(ownersProfile.uri).host.split('.')[0]\n )\n}\n"],"mappings":";;;;;;AAAA;AACA;AAA6B;AAAA,+CAA7B;AAAA;AAAA;AAAA,SAEsBA,gBAAgB;EAAA;AAAA;AAAA;EAAA,+EAA/B,iBACLC,OAAkB,EAClBC,KAAqB,EACrBC,OAAgB;IAAA;IAAA;MAAA;QAAA;UAAA;
|
|
1
|
+
{"version":3,"file":"homepage.js","names":["generateHomepage","subject","store","fetcher","loadProfile","ownersProfile","name","getName","wrapper","document","createElement","classList","add","appendChild","createTitle","uri","createDataSection","dataSection","title","innerText","listGroup","publicDataLink","href","window","location","profileLink","profileLinkPost","pod","site","webId","sym","load","anyValue","ns","vcard","doc","foaf","URL","host","split"],"sources":["../../src/dashboard/homepage.ts"],"sourcesContent":["import { Fetcher, IndexedFormula, NamedNode, sym } from 'rdflib'\nimport { ns } from 'solid-ui'\n\nexport async function generateHomepage (\n subject: NamedNode,\n store: IndexedFormula,\n fetcher: Fetcher\n): Promise<HTMLElement> {\n const ownersProfile = await loadProfile(subject, fetcher)\n const name = getName(store, ownersProfile)\n\n const wrapper = document.createElement('div')\n wrapper.classList.add('container')\n wrapper.appendChild(createTitle(ownersProfile.uri, name))\n wrapper.appendChild(createDataSection(name))\n\n return wrapper\n}\n\nfunction createDataSection (name: string): HTMLElement {\n const dataSection = document.createElement('section')\n\n const title = document.createElement('h2')\n title.innerText = 'Data'\n dataSection.appendChild(title)\n\n const listGroup = document.createElement('div')\n listGroup.classList.add('list-group')\n dataSection.appendChild(listGroup)\n\n const publicDataLink = document.createElement('a')\n publicDataLink.classList.add('list-group-item')\n publicDataLink.href = window.document.location.href + 'public/'\n publicDataLink.innerText = `View ${name}'s files`\n listGroup.appendChild(publicDataLink)\n\n return dataSection\n}\n\nfunction createTitle (uri: string, name: string): HTMLElement {\n const profileLink = document.createElement('a')\n profileLink.href = uri\n profileLink.innerText = name\n\n const profileLinkPost = document.createElement('span')\n profileLinkPost.innerText = '\\'s Pod'\n\n const title = document.createElement('h1')\n title.appendChild(profileLink)\n title.appendChild(profileLinkPost)\n\n return title\n}\n\nasync function loadProfile (\n subject: NamedNode,\n fetcher: Fetcher\n): Promise<NamedNode> {\n const pod = subject.site().uri\n // TODO: This is a hack - we cannot assume that the profile is at this document, but we will live with it for now\n const webId = sym(`${pod}profile/card#me`)\n await fetcher.load(webId)\n return webId\n}\n\nfunction getName (store: IndexedFormula, ownersProfile: NamedNode): string {\n return (\n store.anyValue(ownersProfile, ns.vcard('fn'), null, ownersProfile.doc()) ||\n store.anyValue(ownersProfile, ns.foaf('name'), null, ownersProfile.doc()) ||\n new URL(ownersProfile.uri).host.split('.')[0]\n )\n}\n"],"mappings":";;;;;;AAAA;AACA;AAA6B;AAAA,+CAA7B;AAAA;AAAA;AAAA,SAEsBA,gBAAgB;EAAA;AAAA;AAAA;EAAA,+EAA/B,iBACLC,OAAkB,EAClBC,KAAqB,EACrBC,OAAgB;IAAA;IAAA;MAAA;QAAA;UAAA;UAAA,OAEYC,WAAW,CAACH,OAAO,EAAEE,OAAO,CAAC;QAAA;UAAnDE,aAAa;UACbC,IAAI,GAAGC,OAAO,CAACL,KAAK,EAAEG,aAAa,CAAC;UAEpCG,OAAO,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;UAC7CF,OAAO,CAACG,SAAS,CAACC,GAAG,CAAC,WAAW,CAAC;UAClCJ,OAAO,CAACK,WAAW,CAACC,WAAW,CAACT,aAAa,CAACU,GAAG,EAAET,IAAI,CAAC,CAAC;UACzDE,OAAO,CAACK,WAAW,CAACG,iBAAiB,CAACV,IAAI,CAAC,CAAC;UAAA,iCAErCE,OAAO;QAAA;QAAA;UAAA;MAAA;IAAA;EAAA,CACf;EAAA;AAAA;AAED,SAASQ,iBAAiB,CAAEV,IAAY,EAAe;EACrD,IAAMW,WAAW,GAAGR,QAAQ,CAACC,aAAa,CAAC,SAAS,CAAC;EAErD,IAAMQ,KAAK,GAAGT,QAAQ,CAACC,aAAa,CAAC,IAAI,CAAC;EAC1CQ,KAAK,CAACC,SAAS,GAAG,MAAM;EACxBF,WAAW,CAACJ,WAAW,CAACK,KAAK,CAAC;EAE9B,IAAME,SAAS,GAAGX,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAC/CU,SAAS,CAACT,SAAS,CAACC,GAAG,CAAC,YAAY,CAAC;EACrCK,WAAW,CAACJ,WAAW,CAACO,SAAS,CAAC;EAElC,IAAMC,cAAc,GAAGZ,QAAQ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C3B,aAAa,EAAE4B,WAAE,CAACC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE7B,aAAa,CAAC8B,GAAG,EAAE,CAAC,IACxEjC,KAAK,CAAC8B,QAAQ,CAAC3B,aAAa,EAAE4B,WAAE,CAACG,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE/B,aAAa,CAAC8B,GAAG,EAAE,CAAC,IACzE,IAAIE,GAAG,CAAChC,aAAa,CAACU,GAAG,CAAC,CAACuB,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAEjD"}
|
package/lib/dataContentPane.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.dataContentPane = void 0;
|
|
8
|
+
var UI = _interopRequireWildcard(require("solid-ui"));
|
|
9
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
3
11
|
/* Data content Pane
|
|
4
12
|
**
|
|
5
13
|
** This pane shows the content of a particular RDF resource
|
|
@@ -11,10 +19,8 @@
|
|
|
11
19
|
// - Expand automatically all the way down
|
|
12
20
|
// - original source view? Use ffox view source
|
|
13
21
|
|
|
14
|
-
var UI = require('solid-ui');
|
|
15
|
-
var $rdf = require('rdflib');
|
|
16
22
|
var ns = UI.ns;
|
|
17
|
-
|
|
23
|
+
var dataContentPane = {
|
|
18
24
|
icon: UI.icons.originalIconBase + 'rdf_flyer.24.gif',
|
|
19
25
|
name: 'dataContents',
|
|
20
26
|
audience: [ns.solid('Developer')],
|
|
@@ -242,7 +248,8 @@ module.exports = {
|
|
|
242
248
|
// or we could keep all the pre-smushed triples.
|
|
243
249
|
var sts = kb.statementsMatching(undefined, undefined, undefined, subject); // @@ slow with current store!
|
|
244
250
|
|
|
245
|
-
if (
|
|
251
|
+
if (false) {
|
|
252
|
+
// keep code
|
|
246
253
|
alternativeRendering();
|
|
247
254
|
} else {
|
|
248
255
|
mainRendering();
|
|
@@ -250,4 +257,5 @@ module.exports = {
|
|
|
250
257
|
return div;
|
|
251
258
|
}
|
|
252
259
|
};
|
|
260
|
+
exports.dataContentPane = dataContentPane;
|
|
253
261
|
//# sourceMappingURL=dataContentPane.js.map
|