solid-panes 3.5.28-c77cd8eb → 3.5.28-ce7214c6
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/SECURITY.md +47 -0
- package/lib/RDFXMLPane.js +2 -10
- package/lib/RDFXMLPane.js.map +1 -1
- package/lib/argument/argumentPane.js +5 -7
- package/lib/argument/argumentPane.js.map +1 -1
- package/lib/attach/attachPane.js +7 -13
- package/lib/attach/attachPane.js.map +1 -1
- package/lib/audio/audioPane.js +6 -13
- package/lib/audio/audioPane.js.map +1 -1
- package/lib/classInstancePane.js +3 -11
- package/lib/classInstancePane.js.map +1 -1
- package/lib/dashboard/basicPreferences.js +104 -96
- package/lib/dashboard/basicPreferences.js.map +1 -1
- package/lib/dashboard/homepage.js +31 -27
- package/lib/dashboard/homepage.js.map +1 -1
- package/lib/dataContentPane.js +4 -12
- package/lib/dataContentPane.js.map +1 -1
- package/lib/defaultPane.js +3 -11
- package/lib/defaultPane.js.map +1 -1
- package/lib/dokieli/dokieliPane.js +11 -15
- package/lib/dokieli/dokieliPane.js.map +1 -1
- package/lib/dokieli/new.js +1 -6
- package/lib/dokieli/new.js.map +1 -1
- package/lib/form/pane.js +5 -8
- package/lib/form/pane.js.map +1 -1
- package/lib/home/homePane.d.ts.map +1 -1
- package/lib/home/homePane.js +49 -35
- package/lib/home/homePane.js.map +1 -1
- package/lib/imagePane.js +2 -11
- 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 +73 -65
- package/lib/mainPage/header.js.map +1 -1
- package/lib/mainPage/index.js +19 -17
- package/lib/mainPage/index.js.map +1 -1
- package/lib/microblogPane/microblogPane.js +84 -82
- package/lib/microblogPane/microblogPane.js.map +1 -1
- package/lib/n3Pane.js +2 -11
- package/lib/n3Pane.js.map +1 -1
- package/lib/outline/licenseOptions.js +11 -13
- package/lib/outline/licenseOptions.js.map +1 -1
- package/lib/outline/manager.js +616 -581
- package/lib/outline/manager.js.map +1 -1
- package/lib/outline/manager.test.js +15 -16
- package/lib/outline/manager.test.js.map +1 -1
- package/lib/outline/outlineIcons.js +2 -10
- package/lib/outline/outlineIcons.js.map +1 -1
- package/lib/outline/propertyViews.d.ts +2 -3
- package/lib/outline/propertyViews.d.ts.map +1 -1
- package/lib/outline/propertyViews.js +5 -7
- package/lib/outline/propertyViews.js.map +1 -1
- package/lib/outline/propertyViews.test.js +4 -6
- 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 +5 -7
- package/lib/outline/userInput.js.map +1 -1
- package/lib/playlist/playlistPane.js +6 -13
- package/lib/playlist/playlistPane.js.map +1 -1
- package/lib/profile/editProfile.view.d.ts.map +1 -1
- package/lib/profile/editProfile.view.js +0 -16
- package/lib/profile/editProfile.view.js.map +1 -1
- package/lib/registerPanes.js +50 -93
- package/lib/registerPanes.js.map +1 -1
- package/lib/schedule/formsForSchedule.js +1 -6
- package/lib/schedule/formsForSchedule.js.map +1 -1
- package/lib/schedule/schedulePane.js +4 -9
- package/lib/schedule/schedulePane.js.map +1 -1
- package/lib/slideshow/slideshowPane.js +11 -16
- package/lib/slideshow/slideshowPane.js.map +1 -1
- package/lib/socialPane.js +9 -13
- package/lib/socialPane.js.map +1 -1
- package/lib/tabbed/tabbedPane.js +34 -32
- package/lib/tabbed/tabbedPane.js.map +1 -1
- package/lib/tableViewPane.js +3 -12
- package/lib/tableViewPane.js.map +1 -1
- package/lib/test-import-export/common.js +2 -6
- package/lib/test-import-export/common.js.map +1 -1
- package/lib/test-import-export/edit-importer.js +11 -9
- package/lib/test-import-export/edit-importer.js.map +1 -1
- package/lib/transaction/pane.js +6 -12
- package/lib/transaction/pane.js.map +1 -1
- package/lib/transaction/period.js +4 -11
- package/lib/transaction/period.js.map +1 -1
- package/lib/trip/tripPane.js +5 -12
- package/lib/trip/tripPane.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.dom.js +1 -4
- package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.test.js +0 -3
- package/lib/trustedApplications/trustedApplications.test.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.utils.js +1 -1
- package/lib/trustedApplications/trustedApplications.view.js +40 -38
- package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
- package/lib/ui/pane.js +5 -12
- package/lib/ui/pane.js.map +1 -1
- package/lib/versionInfo.js +4 -4
- package/lib/versionInfo.js.map +1 -1
- package/lib/video/videoPane.js +5 -12
- package/lib/video/videoPane.js.map +1 -1
- package/package.json +2 -2
- 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 +4 -3
- 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 +14 -1
- 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 +8 -9
- package/src/outline/manager.js +21 -18
- package/src/outline/manager.test.ts +0 -6
- package/src/outline/outlineIcons.js +2 -4
- package/src/outline/propertyViews.test.ts +1 -7
- package/src/outline/propertyViews.ts +3 -3
- package/src/outline/queryByExample.js +9 -3
- package/src/outline/userInput.js +1 -1
- package/src/playlist/playlistPane.js +3 -3
- package/src/profile/editProfile.view.ts +0 -20
- package/src/registerPanes.js +52 -92
- package/src/schedule/formsForSchedule.js +1 -1
- package/src/schedule/schedulePane.js +2 -6
- package/src/slideshow/slideshowPane.js +6 -3
- package/src/socialPane.js +3 -2
- package/src/tableViewPane.js +3 -3
- package/src/test-import-export/common.js +1 -1
- package/src/test-import-export/edit-importer.js +10 -5
- 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 +0 -4
- package/src/ui/pane.js +3 -3
- package/src/versionInfo.ts +4 -4
- package/src/video/videoPane.js +3 -3
package/lib/outline/manager.js
CHANGED
|
@@ -9,22 +9,24 @@ var paneRegistry = _interopRequireWildcard(require("pane-registry"));
|
|
|
9
9
|
var $rdf = _interopRequireWildcard(require("rdflib"));
|
|
10
10
|
var UI = _interopRequireWildcard(require("solid-ui"));
|
|
11
11
|
var _solidLogic = require("solid-logic");
|
|
12
|
-
var _propertyViews = require("./propertyViews");
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var _userInput = require("./userInput.js");
|
|
16
|
-
var queryByExample = _interopRequireWildcard(require("./queryByExample.js"));
|
|
12
|
+
var _propertyViews = _interopRequireDefault(require("./propertyViews"));
|
|
13
|
+
var licenseOptions = _interopRequireWildcard(require("./licenseOptions"));
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
15
|
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); }
|
|
18
16
|
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; }
|
|
19
17
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
18
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21
19
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
22
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
23
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
|
20
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
21
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
24
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
-
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; }
|
|
23
|
+
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; }
|
|
26
24
|
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); } }
|
|
27
25
|
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); }); }; }
|
|
26
|
+
var outlineIcons = require('./outlineIcons.js');
|
|
27
|
+
var UserInput = require('./userInput.js');
|
|
28
|
+
var queryByExample = require('./queryByExample.js');
|
|
29
|
+
|
|
28
30
|
/* global alert XPathResult sourceWidget */
|
|
29
31
|
// XPathResult?
|
|
30
32
|
|
|
@@ -33,7 +35,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
33
35
|
function _default(context) {
|
|
34
36
|
var dom = context.dom;
|
|
35
37
|
this.document = context.dom;
|
|
36
|
-
this.outlineIcons =
|
|
38
|
+
this.outlineIcons = outlineIcons;
|
|
37
39
|
this.labeller = this.labeller || {};
|
|
38
40
|
this.labeller.LanguagePreference = ''; // for now
|
|
39
41
|
var outline = this; // Kenny: do we need this?
|
|
@@ -50,7 +52,7 @@ function _default(context) {
|
|
|
50
52
|
|
|
51
53
|
// var selection = [] // Array of statements which have been selected
|
|
52
54
|
// this.focusTd // the <td> that is being observed
|
|
53
|
-
this.UserInput = new
|
|
55
|
+
this.UserInput = new UserInput(this);
|
|
54
56
|
this.clipboardAddress = 'tabulator:clipboard'; // Weird
|
|
55
57
|
this.UserInput.clipboardInit(this.clipboardAddress);
|
|
56
58
|
var outlineElement = this.outlineElement;
|
|
@@ -63,7 +65,9 @@ function _default(context) {
|
|
|
63
65
|
benchmark.lastkbsize = 0;
|
|
64
66
|
function benchmark(f) {
|
|
65
67
|
var args = [];
|
|
66
|
-
for (var i = arguments.length - 1; i > 0; i--)
|
|
68
|
+
for (var i = arguments.length - 1; i > 0; i--) {
|
|
69
|
+
args[i - 1] = arguments[i];
|
|
70
|
+
}
|
|
67
71
|
// UI.log.debug('BENCHMARK: args=' + args.join());
|
|
68
72
|
var begin = new Date().getTime();
|
|
69
73
|
var returnValue = f.apply(f, args);
|
|
@@ -78,7 +82,7 @@ function _default(context) {
|
|
|
78
82
|
// Represent an object in summary form as a table cell
|
|
79
83
|
|
|
80
84
|
function appendRemoveIcon(node, subject, removeNode) {
|
|
81
|
-
var image = UI.utils.AJARImage(
|
|
85
|
+
var image = UI.utils.AJARImage(outlineIcons.src.icon_remove_node, 'remove', undefined, dom);
|
|
82
86
|
image.addEventListener('click', removeNodeIconMouseDownListener);
|
|
83
87
|
// image.setAttribute('align', 'right') Causes icon to be moved down
|
|
84
88
|
image.node = removeNode;
|
|
@@ -108,32 +112,32 @@ function _default(context) {
|
|
|
108
112
|
var icon, alt, listener;
|
|
109
113
|
switch (state) {
|
|
110
114
|
case 'unrequested':
|
|
111
|
-
icon =
|
|
115
|
+
icon = outlineIcons.src.icon_unrequested;
|
|
112
116
|
alt = 'fetch';
|
|
113
117
|
listener = unrequestedIconMouseDownListener;
|
|
114
118
|
break;
|
|
115
119
|
case 'requested':
|
|
116
|
-
icon =
|
|
120
|
+
icon = outlineIcons.src.icon_requested;
|
|
117
121
|
alt = 'fetching';
|
|
118
122
|
listener = failedIconMouseDownListener; // new: can retry yello blob
|
|
119
123
|
break;
|
|
120
124
|
case 'fetched':
|
|
121
|
-
icon =
|
|
125
|
+
icon = outlineIcons.src.icon_fetched;
|
|
122
126
|
listener = fetchedIconMouseDownListener;
|
|
123
127
|
alt = 'loaded';
|
|
124
128
|
break;
|
|
125
129
|
case 'failed':
|
|
126
|
-
icon =
|
|
130
|
+
icon = outlineIcons.src.icon_failed;
|
|
127
131
|
alt = 'failed';
|
|
128
132
|
listener = failedIconMouseDownListener;
|
|
129
133
|
break;
|
|
130
134
|
case 'unpermitted':
|
|
131
|
-
icon =
|
|
135
|
+
icon = outlineIcons.src.icon_failed;
|
|
132
136
|
listener = failedIconMouseDownListener;
|
|
133
137
|
alt = 'no perm';
|
|
134
138
|
break;
|
|
135
139
|
case 'unfetchable':
|
|
136
|
-
icon =
|
|
140
|
+
icon = outlineIcons.src.icon_failed;
|
|
137
141
|
listener = failedIconMouseDownListener;
|
|
138
142
|
alt = 'cannot fetch';
|
|
139
143
|
break;
|
|
@@ -141,7 +145,7 @@ function _default(context) {
|
|
|
141
145
|
UI.log.error('?? state = ' + state);
|
|
142
146
|
break;
|
|
143
147
|
} // switch
|
|
144
|
-
var img = UI.utils.AJARImage(icon, alt,
|
|
148
|
+
var img = UI.utils.AJARImage(icon, alt, outlineIcons.tooltips[icon].replace(/[Tt]his resource/, docuri), dom);
|
|
145
149
|
img.setAttribute('uri', uri);
|
|
146
150
|
img.addEventListener('click', listener); // @@ seemed to be missing 2017-08
|
|
147
151
|
addButtonCallbacks(img, docuri);
|
|
@@ -162,7 +166,7 @@ function _default(context) {
|
|
|
162
166
|
|
|
163
167
|
// check the IPR on the data. Ok if there is any checked license which is one the document has.
|
|
164
168
|
if (statement && statement.why) {
|
|
165
|
-
if (
|
|
169
|
+
if (licenseOptions && licenseOptions.checkLicence()) {
|
|
166
170
|
theClass += ' licOkay'; // flag as light green etc .licOkay {background-color: #dfd}
|
|
167
171
|
}
|
|
168
172
|
}
|
|
@@ -225,11 +229,11 @@ function _default(context) {
|
|
|
225
229
|
predicateTD.appendChild(labelTD);
|
|
226
230
|
labelTD.style.width = '100%';
|
|
227
231
|
predicateTD.appendChild(termWidget.construct(dom)); // termWidget is global???
|
|
228
|
-
for (var w in
|
|
232
|
+
for (var w in outlineIcons.termWidgets) {
|
|
229
233
|
if (!newTr || !newTr.AJAR_statement) break; // case for TBD as predicate
|
|
230
234
|
// alert(Icon.termWidgets[w]+' '+Icon.termWidgets[w].filter)
|
|
231
|
-
if (
|
|
232
|
-
termWidget.addIcon(predicateTD,
|
|
235
|
+
if (outlineIcons.termWidgets[w].filter && outlineIcons.termWidgets[w].filter(newTr.AJAR_statement, 'pred', inverse)) {
|
|
236
|
+
termWidget.addIcon(predicateTD, outlineIcons.termWidgets[w]);
|
|
233
237
|
}
|
|
234
238
|
}
|
|
235
239
|
|
|
@@ -265,52 +269,54 @@ function _default(context) {
|
|
|
265
269
|
renderMain,
|
|
266
270
|
_args = arguments;
|
|
267
271
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
268
|
-
while (1)
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
272
|
+
while (1) {
|
|
273
|
+
switch (_context.prev = _context.next) {
|
|
274
|
+
case 0:
|
|
275
|
+
renderMain = function _renderMain(containerDiv, item) {
|
|
276
|
+
// Items are pane names
|
|
277
|
+
var pane = paneRegistry.byName(item.paneName); // 20190701
|
|
278
|
+
containerDiv.innerHTML = '';
|
|
279
|
+
var table = containerDiv.appendChild(dom.createElement('table'));
|
|
280
|
+
var me = _solidLogic.authn.currentUser();
|
|
281
|
+
thisOutline.GotoSubject(item.subject || me, true, pane, false, undefined, table);
|
|
282
|
+
};
|
|
283
|
+
renderTab = function _renderTab(div, item) {
|
|
284
|
+
div.dataset.globalPaneName = item.tabName || item.paneName;
|
|
285
|
+
div.textContent = item.label;
|
|
286
|
+
};
|
|
287
|
+
options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
288
|
+
console.log('globalAppTabs @@');
|
|
289
|
+
div = dom.createElement('div');
|
|
290
|
+
me = _solidLogic.authn.currentUser();
|
|
291
|
+
if (me) {
|
|
292
|
+
_context.next = 9;
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
alert('Must be logged in for this');
|
|
296
|
+
throw new Error('Not logged in');
|
|
297
|
+
case 9:
|
|
298
|
+
_context.next = 11;
|
|
299
|
+
return getDashboardItems();
|
|
300
|
+
case 11:
|
|
301
|
+
items = _context.sent;
|
|
302
|
+
div.appendChild(UI.tabs.tabWidget({
|
|
303
|
+
dom: dom,
|
|
304
|
+
subject: me,
|
|
305
|
+
items: items,
|
|
306
|
+
renderMain: renderMain,
|
|
307
|
+
renderTab: renderTab,
|
|
308
|
+
ordered: true,
|
|
309
|
+
orientation: 0,
|
|
310
|
+
backgroundColor: '#eeeeee',
|
|
311
|
+
// black?
|
|
312
|
+
selectedTab: options.selectedTab,
|
|
313
|
+
onClose: options.onClose
|
|
314
|
+
}));
|
|
315
|
+
return _context.abrupt("return", div);
|
|
316
|
+
case 14:
|
|
317
|
+
case "end":
|
|
318
|
+
return _context.stop();
|
|
319
|
+
}
|
|
314
320
|
}
|
|
315
321
|
}, _callee);
|
|
316
322
|
}));
|
|
@@ -324,234 +330,246 @@ function _default(context) {
|
|
|
324
330
|
_getDashboardItems = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
325
331
|
var me, div, _yield$Promise$all, _yield$Promise$all2, books, pods, getPods, _getPods, getAddressBooks, _getAddressBooks;
|
|
326
332
|
return _regeneratorRuntime().wrap(function _callee7$(_context8) {
|
|
327
|
-
while (1)
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
_getAddressBooks =
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
_context7.prev =
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
333
|
+
while (1) {
|
|
334
|
+
switch (_context8.prev = _context8.next) {
|
|
335
|
+
case 0:
|
|
336
|
+
_getAddressBooks = function _getAddressBooks3() {
|
|
337
|
+
_getAddressBooks = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
338
|
+
var _context6;
|
|
339
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context7) {
|
|
340
|
+
while (1) {
|
|
341
|
+
switch (_context7.prev = _context7.next) {
|
|
342
|
+
case 0:
|
|
343
|
+
_context7.prev = 0;
|
|
344
|
+
_context7.next = 3;
|
|
345
|
+
return UI.login.findAppInstances({
|
|
346
|
+
me: me,
|
|
347
|
+
div: div,
|
|
348
|
+
dom: dom
|
|
349
|
+
}, ns.vcard('AddressBook'));
|
|
350
|
+
case 3:
|
|
351
|
+
_context6 = _context7.sent;
|
|
352
|
+
return _context7.abrupt("return", (_context6.instances || []).map(function (book, index) {
|
|
353
|
+
return {
|
|
354
|
+
paneName: 'contact',
|
|
355
|
+
tabName: "contact-".concat(index),
|
|
356
|
+
label: 'Contacts',
|
|
357
|
+
subject: book,
|
|
358
|
+
icon: UI.icons.iconBase + 'noun_15695.svg'
|
|
359
|
+
};
|
|
360
|
+
}));
|
|
361
|
+
case 7:
|
|
362
|
+
_context7.prev = 7;
|
|
363
|
+
_context7.t0 = _context7["catch"](0);
|
|
364
|
+
console.error('oops in globalAppTabs AddressBook');
|
|
365
|
+
case 10:
|
|
366
|
+
return _context7.abrupt("return", []);
|
|
367
|
+
case 11:
|
|
368
|
+
case "end":
|
|
369
|
+
return _context7.stop();
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}, _callee6, null, [[0, 7]]);
|
|
373
|
+
}));
|
|
374
|
+
return _getAddressBooks.apply(this, arguments);
|
|
375
|
+
};
|
|
376
|
+
getAddressBooks = function _getAddressBooks2() {
|
|
377
|
+
return _getAddressBooks.apply(this, arguments);
|
|
378
|
+
};
|
|
379
|
+
_getPods = function _getPods3() {
|
|
380
|
+
_getPods = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
381
|
+
var addPodStorage, _addPodStorage, addPodStorageFromUrl, _addPodStorageFromUrl, pods, uri, podUrl, uniques;
|
|
382
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
383
|
+
while (1) {
|
|
384
|
+
switch (_context5.prev = _context5.next) {
|
|
385
|
+
case 0:
|
|
386
|
+
uniques = function _uniques(nodes) {
|
|
387
|
+
var uniqueNodes = [];
|
|
388
|
+
nodes.forEach(function (node) {
|
|
389
|
+
if (!uniqueNodes.find(function (uniqueNode) {
|
|
390
|
+
return uniqueNode.equals(node);
|
|
391
|
+
})) uniqueNodes.push(node);
|
|
392
|
+
});
|
|
393
|
+
return uniqueNodes;
|
|
394
|
+
};
|
|
395
|
+
_addPodStorageFromUrl = function _addPodStorageFromUrl3() {
|
|
396
|
+
_addPodStorageFromUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(url) {
|
|
397
|
+
var podStorage, pathStorage;
|
|
398
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
399
|
+
while (1) {
|
|
400
|
+
switch (_context4.prev = _context4.next) {
|
|
401
|
+
case 0:
|
|
402
|
+
podStorage = new URL(url); // check for predicate pim:Storage in containers up the path tree
|
|
403
|
+
pathStorage = podStorage.pathname;
|
|
404
|
+
case 2:
|
|
405
|
+
if (!pathStorage.length) {
|
|
406
|
+
_context4.next = 10;
|
|
407
|
+
break;
|
|
408
|
+
}
|
|
409
|
+
pathStorage = pathStorage.substring(0, pathStorage.lastIndexOf('/'));
|
|
410
|
+
_context4.next = 6;
|
|
411
|
+
return addPodStorage(kb.sym("".concat(podStorage.origin).concat(pathStorage, "/")));
|
|
412
|
+
case 6:
|
|
413
|
+
if (!_context4.sent) {
|
|
414
|
+
_context4.next = 8;
|
|
415
|
+
break;
|
|
416
|
+
}
|
|
417
|
+
return _context4.abrupt("return");
|
|
418
|
+
case 8:
|
|
419
|
+
_context4.next = 2;
|
|
420
|
+
break;
|
|
421
|
+
case 10:
|
|
422
|
+
case "end":
|
|
423
|
+
return _context4.stop();
|
|
424
|
+
}
|
|
397
425
|
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
426
|
+
}, _callee4);
|
|
427
|
+
}));
|
|
428
|
+
return _addPodStorageFromUrl.apply(this, arguments);
|
|
429
|
+
};
|
|
430
|
+
addPodStorageFromUrl = function _addPodStorageFromUrl2(_x8) {
|
|
431
|
+
return _addPodStorageFromUrl.apply(this, arguments);
|
|
432
|
+
};
|
|
433
|
+
_addPodStorage = function _addPodStorage3() {
|
|
434
|
+
_addPodStorage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(pod) {
|
|
435
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
436
|
+
while (1) {
|
|
437
|
+
switch (_context3.prev = _context3.next) {
|
|
438
|
+
case 0:
|
|
439
|
+
_context3.next = 2;
|
|
440
|
+
return loadContainerRepresentation(pod);
|
|
441
|
+
case 2:
|
|
442
|
+
if (!kb.holds(pod, ns.rdf('type'), ns.space('Storage'), pod.doc())) {
|
|
443
|
+
_context3.next = 5;
|
|
444
|
+
break;
|
|
445
|
+
}
|
|
446
|
+
pods.push(pod);
|
|
447
|
+
return _context3.abrupt("return", true);
|
|
448
|
+
case 5:
|
|
449
|
+
return _context3.abrupt("return", false);
|
|
450
|
+
case 6:
|
|
451
|
+
case "end":
|
|
452
|
+
return _context3.stop();
|
|
453
|
+
}
|
|
405
454
|
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
return
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
455
|
+
}, _callee3);
|
|
456
|
+
}));
|
|
457
|
+
return _addPodStorage.apply(this, arguments);
|
|
458
|
+
};
|
|
459
|
+
addPodStorage = function _addPodStorage2(_x7) {
|
|
460
|
+
return _addPodStorage.apply(this, arguments);
|
|
461
|
+
};
|
|
462
|
+
_context5.prev = 5;
|
|
463
|
+
_context5.next = 8;
|
|
464
|
+
return kb.fetcher.load(me.doc());
|
|
465
|
+
case 8:
|
|
466
|
+
_context5.next = 14;
|
|
467
|
+
break;
|
|
468
|
+
case 10:
|
|
469
|
+
_context5.prev = 10;
|
|
470
|
+
_context5.t0 = _context5["catch"](5);
|
|
471
|
+
console.error('Unable to load profile', _context5.t0);
|
|
472
|
+
return _context5.abrupt("return", []);
|
|
473
|
+
case 14:
|
|
474
|
+
// load pod's storages from profile
|
|
475
|
+
pods = kb.each(me, ns.space('storage'), null, me.doc());
|
|
476
|
+
pods.map( /*#__PURE__*/function () {
|
|
477
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(pod) {
|
|
478
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
479
|
+
while (1) {
|
|
480
|
+
switch (_context2.prev = _context2.next) {
|
|
481
|
+
case 0:
|
|
482
|
+
_context2.next = 2;
|
|
483
|
+
return loadContainerRepresentation(pod);
|
|
484
|
+
case 2:
|
|
485
|
+
case "end":
|
|
486
|
+
return _context2.stop();
|
|
487
|
+
}
|
|
432
488
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(pod) {
|
|
464
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
465
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
466
|
-
case 0:
|
|
467
|
-
_context2.next = 2;
|
|
468
|
-
return loadContainerRepresentation(pod);
|
|
469
|
-
case 2:
|
|
470
|
-
case "end":
|
|
471
|
-
return _context2.stop();
|
|
489
|
+
}, _callee2);
|
|
490
|
+
}));
|
|
491
|
+
return function (_x9) {
|
|
492
|
+
return _ref.apply(this, arguments);
|
|
493
|
+
};
|
|
494
|
+
}());
|
|
495
|
+
_context5.prev = 16;
|
|
496
|
+
// if uri then SolidOS is a browse.html web app
|
|
497
|
+
uri = new URL(window.location.href).searchParams.get('uri');
|
|
498
|
+
podUrl = uri || window.location.href;
|
|
499
|
+
_context5.next = 21;
|
|
500
|
+
return addPodStorageFromUrl(podUrl);
|
|
501
|
+
case 21:
|
|
502
|
+
_context5.next = 26;
|
|
503
|
+
break;
|
|
504
|
+
case 23:
|
|
505
|
+
_context5.prev = 23;
|
|
506
|
+
_context5.t1 = _context5["catch"](16);
|
|
507
|
+
console.error('cannot load container', _context5.t1);
|
|
508
|
+
case 26:
|
|
509
|
+
pods = uniques(pods);
|
|
510
|
+
if (pods.length) {
|
|
511
|
+
_context5.next = 29;
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
return _context5.abrupt("return", []);
|
|
515
|
+
case 29:
|
|
516
|
+
return _context5.abrupt("return", pods.map(function (pod, index) {
|
|
517
|
+
function split(item) {
|
|
518
|
+
return item.uri.split('//')[1].slice(0, -1);
|
|
472
519
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
case 21:
|
|
486
|
-
_context5.next = 26;
|
|
487
|
-
break;
|
|
488
|
-
case 23:
|
|
489
|
-
_context5.prev = 23;
|
|
490
|
-
_context5.t1 = _context5["catch"](16);
|
|
491
|
-
console.error('cannot load container', _context5.t1);
|
|
492
|
-
case 26:
|
|
493
|
-
pods = uniques(pods);
|
|
494
|
-
if (pods.length) {
|
|
495
|
-
_context5.next = 29;
|
|
496
|
-
break;
|
|
520
|
+
var label = split(me).startsWith(split(pod)) ? 'Your storage' : split(pod);
|
|
521
|
+
return {
|
|
522
|
+
paneName: 'folder',
|
|
523
|
+
tabName: "folder-".concat(index),
|
|
524
|
+
label: label,
|
|
525
|
+
subject: pod,
|
|
526
|
+
icon: UI.icons.iconBase + 'noun_Cabinet_251723.svg'
|
|
527
|
+
};
|
|
528
|
+
}));
|
|
529
|
+
case 30:
|
|
530
|
+
case "end":
|
|
531
|
+
return _context5.stop();
|
|
497
532
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
pods = _yield$Promise$all2[1];
|
|
539
|
-
return _context8.abrupt("return", [{
|
|
540
|
-
paneName: 'home',
|
|
541
|
-
label: 'Your stuff',
|
|
542
|
-
icon: UI.icons.iconBase + 'noun_547570.svg'
|
|
543
|
-
}, {
|
|
544
|
-
paneName: 'basicPreferences',
|
|
545
|
-
label: 'Preferences',
|
|
546
|
-
icon: UI.icons.iconBase + 'noun_Sliders_341315_00000.svg'
|
|
547
|
-
}, {
|
|
548
|
-
paneName: 'editProfile',
|
|
549
|
-
label: 'Edit your profile',
|
|
550
|
-
icon: UI.icons.iconBase + 'noun_492246.svg'
|
|
551
|
-
}].concat(books).concat(pods));
|
|
552
|
-
case 15:
|
|
553
|
-
case "end":
|
|
554
|
-
return _context8.stop();
|
|
533
|
+
}
|
|
534
|
+
}, _callee5, null, [[5, 10], [16, 23]]);
|
|
535
|
+
}));
|
|
536
|
+
return _getPods.apply(this, arguments);
|
|
537
|
+
};
|
|
538
|
+
getPods = function _getPods2() {
|
|
539
|
+
return _getPods.apply(this, arguments);
|
|
540
|
+
};
|
|
541
|
+
me = _solidLogic.authn.currentUser();
|
|
542
|
+
if (me) {
|
|
543
|
+
_context8.next = 7;
|
|
544
|
+
break;
|
|
545
|
+
}
|
|
546
|
+
return _context8.abrupt("return", []);
|
|
547
|
+
case 7:
|
|
548
|
+
div = dom.createElement('div');
|
|
549
|
+
_context8.next = 10;
|
|
550
|
+
return Promise.all([getAddressBooks(), getPods()]);
|
|
551
|
+
case 10:
|
|
552
|
+
_yield$Promise$all = _context8.sent;
|
|
553
|
+
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
|
|
554
|
+
books = _yield$Promise$all2[0];
|
|
555
|
+
pods = _yield$Promise$all2[1];
|
|
556
|
+
return _context8.abrupt("return", [{
|
|
557
|
+
paneName: 'home',
|
|
558
|
+
label: 'Your stuff',
|
|
559
|
+
icon: UI.icons.iconBase + 'noun_547570.svg'
|
|
560
|
+
}, {
|
|
561
|
+
paneName: 'basicPreferences',
|
|
562
|
+
label: 'Preferences',
|
|
563
|
+
icon: UI.icons.iconBase + 'noun_Sliders_341315_00000.svg'
|
|
564
|
+
}, {
|
|
565
|
+
paneName: 'editProfile',
|
|
566
|
+
label: 'Edit your profile',
|
|
567
|
+
icon: UI.icons.iconBase + 'noun_492246.svg'
|
|
568
|
+
}].concat(books).concat(pods));
|
|
569
|
+
case 15:
|
|
570
|
+
case "end":
|
|
571
|
+
return _context8.stop();
|
|
572
|
+
}
|
|
555
573
|
}
|
|
556
574
|
}, _callee7);
|
|
557
575
|
}));
|
|
@@ -580,51 +598,53 @@ function _default(context) {
|
|
|
580
598
|
closeDashboard,
|
|
581
599
|
_args8 = arguments;
|
|
582
600
|
return _regeneratorRuntime().wrap(function _callee8$(_context9) {
|
|
583
|
-
while (1)
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
tab
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
601
|
+
while (1) {
|
|
602
|
+
switch (_context9.prev = _context9.next) {
|
|
603
|
+
case 0:
|
|
604
|
+
closeDashboard = function _closeDashboard() {
|
|
605
|
+
dashboardContainer.style.display = 'none';
|
|
606
|
+
outlineContainer.style.display = 'inherit';
|
|
607
|
+
};
|
|
608
|
+
options = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
609
|
+
dashboardContainer = getDashboardContainer();
|
|
610
|
+
outlineContainer = getOutlineContainer(); // reuse dashboard if already children already is inserted
|
|
611
|
+
if (!(dashboardContainer.childNodes.length > 0 && options.pane)) {
|
|
612
|
+
_context9.next = 12;
|
|
613
|
+
break;
|
|
614
|
+
}
|
|
615
|
+
outlineContainer.style.display = 'none';
|
|
616
|
+
dashboardContainer.style.display = 'inherit';
|
|
617
|
+
_tab = dashboardContainer.querySelector("[data-global-pane-name=\"".concat(options.pane, "\"]"));
|
|
618
|
+
if (!_tab) {
|
|
619
|
+
_context9.next = 11;
|
|
620
|
+
break;
|
|
621
|
+
}
|
|
622
|
+
_tab.click();
|
|
623
|
+
return _context9.abrupt("return");
|
|
624
|
+
case 11:
|
|
625
|
+
console.warn('Did not find the referred tab in global dashboard, will open first one');
|
|
626
|
+
case 12:
|
|
627
|
+
_context9.next = 14;
|
|
628
|
+
return globalAppTabs({
|
|
629
|
+
selectedTab: options.pane,
|
|
630
|
+
onClose: closeDashboard
|
|
631
|
+
});
|
|
632
|
+
case 14:
|
|
633
|
+
dashboard = _context9.sent;
|
|
634
|
+
// close the dashboard if user log out
|
|
635
|
+
_solidLogic.authSession.onLogout(closeDashboard);
|
|
636
|
+
|
|
637
|
+
// finally - switch to showing dashboard
|
|
638
|
+
outlineContainer.style.display = 'none';
|
|
639
|
+
dashboardContainer.appendChild(dashboard);
|
|
640
|
+
tab = dashboardContainer.querySelector("[data-global-pane-name=\"".concat(options.pane, "\"]"));
|
|
641
|
+
if (tab) {
|
|
642
|
+
tab.click();
|
|
643
|
+
}
|
|
644
|
+
case 20:
|
|
645
|
+
case "end":
|
|
646
|
+
return _context9.stop();
|
|
647
|
+
}
|
|
628
648
|
}
|
|
629
649
|
}, _callee8);
|
|
630
650
|
}));
|
|
@@ -659,25 +679,27 @@ function _default(context) {
|
|
|
659
679
|
_loadContainerRepresentation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(subject) {
|
|
660
680
|
var response, containerTurtle;
|
|
661
681
|
return _regeneratorRuntime().wrap(function _callee9$(_context10) {
|
|
662
|
-
while (1)
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
_context10.next = 3;
|
|
669
|
-
return kb.fetcher.webOperation('GET', subject.uri, kb.fetcher.initFetchOptions(subject.uri, {
|
|
670
|
-
headers: {
|
|
671
|
-
accept: 'text/turtle'
|
|
682
|
+
while (1) {
|
|
683
|
+
switch (_context10.prev = _context10.next) {
|
|
684
|
+
case 0:
|
|
685
|
+
if (kb.any(subject, ns.ldp('contains'), undefined, subject.doc())) {
|
|
686
|
+
_context10.next = 6;
|
|
687
|
+
break;
|
|
672
688
|
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
689
|
+
_context10.next = 3;
|
|
690
|
+
return kb.fetcher.webOperation('GET', subject.uri, kb.fetcher.initFetchOptions(subject.uri, {
|
|
691
|
+
headers: {
|
|
692
|
+
accept: 'text/turtle'
|
|
693
|
+
}
|
|
694
|
+
}));
|
|
695
|
+
case 3:
|
|
696
|
+
response = _context10.sent;
|
|
697
|
+
containerTurtle = response.responseText;
|
|
698
|
+
$rdf.parse(containerTurtle, kb, subject.uri, 'text/turtle');
|
|
699
|
+
case 6:
|
|
700
|
+
case "end":
|
|
701
|
+
return _context10.stop();
|
|
702
|
+
}
|
|
681
703
|
}
|
|
682
704
|
}, _callee9);
|
|
683
705
|
}));
|
|
@@ -690,41 +712,43 @@ function _default(context) {
|
|
|
690
712
|
_getRelevantPanes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(subject, context) {
|
|
691
713
|
var panes, relevantPanes, filteredPanes, firstRelevantPaneIndex, firstFilteredPaneIndex;
|
|
692
714
|
return _regeneratorRuntime().wrap(function _callee10$(_context11) {
|
|
693
|
-
while (1)
|
|
694
|
-
|
|
695
|
-
|
|
715
|
+
while (1) {
|
|
716
|
+
switch (_context11.prev = _context11.next) {
|
|
717
|
+
case 0:
|
|
718
|
+
if (!subject.uri.endsWith('/')) {
|
|
719
|
+
_context11.next = 3;
|
|
720
|
+
break;
|
|
721
|
+
}
|
|
696
722
|
_context11.next = 3;
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
_context11.
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
_context11.
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
case "end":
|
|
727
|
-
return _context11.stop();
|
|
723
|
+
return loadContainerRepresentation(subject);
|
|
724
|
+
case 3:
|
|
725
|
+
panes = context.session.paneRegistry;
|
|
726
|
+
relevantPanes = panes.list.filter(function (pane) {
|
|
727
|
+
return pane.label(subject, context) && !pane.global;
|
|
728
|
+
});
|
|
729
|
+
if (!(relevantPanes.length === 0)) {
|
|
730
|
+
_context11.next = 7;
|
|
731
|
+
break;
|
|
732
|
+
}
|
|
733
|
+
return _context11.abrupt("return", [panes.byName('internal')]);
|
|
734
|
+
case 7:
|
|
735
|
+
_context11.next = 9;
|
|
736
|
+
return UI.login.filterAvailablePanes(relevantPanes);
|
|
737
|
+
case 9:
|
|
738
|
+
filteredPanes = _context11.sent;
|
|
739
|
+
if (!(filteredPanes.length === 0)) {
|
|
740
|
+
_context11.next = 12;
|
|
741
|
+
break;
|
|
742
|
+
}
|
|
743
|
+
return _context11.abrupt("return", [relevantPanes[0]]);
|
|
744
|
+
case 12:
|
|
745
|
+
firstRelevantPaneIndex = panes.list.indexOf(relevantPanes[0]);
|
|
746
|
+
firstFilteredPaneIndex = panes.list.indexOf(filteredPanes[0]); // if the first relevant pane is loaded before the panes available wrt role, we still want to offer the most relevant pane
|
|
747
|
+
return _context11.abrupt("return", firstRelevantPaneIndex < firstFilteredPaneIndex ? [relevantPanes[0]].concat(filteredPanes) : filteredPanes);
|
|
748
|
+
case 15:
|
|
749
|
+
case "end":
|
|
750
|
+
return _context11.stop();
|
|
751
|
+
}
|
|
728
752
|
}
|
|
729
753
|
}, _callee10);
|
|
730
754
|
}));
|
|
@@ -761,188 +785,197 @@ function _default(context) {
|
|
|
761
785
|
_expandedHeaderTR = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(subject, requiredPane, options) {
|
|
762
786
|
var renderPaneIconTray, _renderPaneIconTray, tr, td, header, showHeader, icon, strong;
|
|
763
787
|
return _regeneratorRuntime().wrap(function _callee12$(_context13) {
|
|
764
|
-
while (1)
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
_renderPaneIconTray =
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
if (d.
|
|
824
|
-
d.
|
|
825
|
-
|
|
788
|
+
while (1) {
|
|
789
|
+
switch (_context13.prev = _context13.next) {
|
|
790
|
+
case 0:
|
|
791
|
+
_renderPaneIconTray = function _renderPaneIconTray3() {
|
|
792
|
+
_renderPaneIconTray = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(td) {
|
|
793
|
+
var options,
|
|
794
|
+
paneShownStyle,
|
|
795
|
+
paneHiddenStyle,
|
|
796
|
+
paneIconTray,
|
|
797
|
+
relevantPanes,
|
|
798
|
+
paneNumber,
|
|
799
|
+
_args11 = arguments;
|
|
800
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context12) {
|
|
801
|
+
while (1) {
|
|
802
|
+
switch (_context12.prev = _context12.next) {
|
|
803
|
+
case 0:
|
|
804
|
+
options = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
|
|
805
|
+
paneShownStyle = 'width: 24px; border-radius: 0.5em; border-top: solid #222 1px; border-left: solid #222 0.1em; border-bottom: solid #eee 0.1em; border-right: solid #eee 0.1em; margin-left: 1em; padding: 3px; background-color: #ffd;';
|
|
806
|
+
paneHiddenStyle = 'width: 24px; border-radius: 0.5em; margin-left: 1em; padding: 3px';
|
|
807
|
+
paneIconTray = td.appendChild(dom.createElement('nav'));
|
|
808
|
+
paneIconTray.style = 'display:flex; justify-content: flex-start; align-items: center;';
|
|
809
|
+
if (!options.hideList) {
|
|
810
|
+
_context12.next = 9;
|
|
811
|
+
break;
|
|
812
|
+
}
|
|
813
|
+
_context12.t0 = [];
|
|
814
|
+
_context12.next = 12;
|
|
815
|
+
break;
|
|
816
|
+
case 9:
|
|
817
|
+
_context12.next = 11;
|
|
818
|
+
return getRelevantPanes(subject, context);
|
|
819
|
+
case 11:
|
|
820
|
+
_context12.t0 = _context12.sent;
|
|
821
|
+
case 12:
|
|
822
|
+
relevantPanes = _context12.t0;
|
|
823
|
+
tr.firstPane = requiredPane || getPane(relevantPanes, subject);
|
|
824
|
+
paneNumber = relevantPanes.indexOf(tr.firstPane);
|
|
825
|
+
if (relevantPanes.length !== 1) {
|
|
826
|
+
// if only one, simplify interface
|
|
827
|
+
relevantPanes.forEach(function (pane, index) {
|
|
828
|
+
var label = pane.label(subject, context);
|
|
829
|
+
var ico = UI.utils.AJARImage(pane.icon, label, label, dom);
|
|
830
|
+
ico.style = pane === tr.firstPane ? paneShownStyle : paneHiddenStyle; // init to something at least
|
|
831
|
+
// ico.setAttribute('align','right'); @@ Should be better, but ffox bug pushes them down
|
|
832
|
+
// ico.style.width = iconHeight
|
|
833
|
+
// ico.style.height = iconHeight
|
|
834
|
+
var listen = function listen(ico, pane) {
|
|
835
|
+
// Freeze scope for event time
|
|
836
|
+
ico.addEventListener('click', function (event) {
|
|
837
|
+
var containingTable;
|
|
838
|
+
// Find the containing table for this subject
|
|
839
|
+
for (containingTable = td; containingTable.parentNode; containingTable = containingTable.parentNode) {
|
|
840
|
+
if (containingTable.nodeName === 'TABLE') break;
|
|
841
|
+
}
|
|
842
|
+
if (containingTable.nodeName !== 'TABLE') {
|
|
843
|
+
throw new Error('outline: internal error.');
|
|
844
|
+
}
|
|
845
|
+
var removePanes = function removePanes(specific) {
|
|
846
|
+
for (var d = containingTable.firstChild; d; d = d.nextSibling) {
|
|
847
|
+
if (typeof d.pane !== 'undefined') {
|
|
848
|
+
if (!specific || d.pane === specific) {
|
|
849
|
+
if (d.paneButton) {
|
|
850
|
+
d.paneButton.setAttribute('class', 'paneHidden');
|
|
851
|
+
d.paneButton.style = paneHiddenStyle;
|
|
852
|
+
}
|
|
853
|
+
removeAndRefresh(d);
|
|
854
|
+
// If we just delete the node d, ffox doesn't refresh the display properly.
|
|
855
|
+
// state = 'paneHidden';
|
|
856
|
+
if (d.pane.requireQueryButton && containingTable.parentNode.className /* outer table */ && numberOfPanesRequiringQueryButton === 1 && dom.getElementById('queryButton')) {
|
|
857
|
+
dom.getElementById('queryButton').setAttribute('style', 'display:none;');
|
|
858
|
+
}
|
|
859
|
+
}
|
|
826
860
|
}
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
861
|
+
}
|
|
862
|
+
};
|
|
863
|
+
var renderPane = function renderPane(pane) {
|
|
864
|
+
var paneDiv;
|
|
865
|
+
UI.log.info('outline: Rendering pane (2): ' + pane.name);
|
|
866
|
+
if (UI.no_catch_pane_errors) {
|
|
867
|
+
// for debugging
|
|
868
|
+
paneDiv = pane.render(subject, context, options);
|
|
869
|
+
} else {
|
|
870
|
+
try {
|
|
871
|
+
paneDiv = pane.render(subject, context, options);
|
|
872
|
+
} catch (e) {
|
|
873
|
+
// Easier debugging for pane developers
|
|
874
|
+
paneDiv = dom.createElement('div');
|
|
875
|
+
paneDiv.setAttribute('class', 'exceptionPane');
|
|
876
|
+
var pre = dom.createElement('pre');
|
|
877
|
+
paneDiv.appendChild(pre);
|
|
878
|
+
pre.appendChild(dom.createTextNode(UI.utils.stackString(e)));
|
|
832
879
|
}
|
|
833
880
|
}
|
|
881
|
+
if (pane.requireQueryButton && dom.getElementById('queryButton')) {
|
|
882
|
+
dom.getElementById('queryButton').removeAttribute('style');
|
|
883
|
+
}
|
|
884
|
+
var second = containingTable.firstChild.nextSibling;
|
|
885
|
+
var row = dom.createElement('tr');
|
|
886
|
+
var cell = row.appendChild(dom.createElement('td'));
|
|
887
|
+
cell.appendChild(paneDiv);
|
|
888
|
+
if (second) containingTable.insertBefore(row, second);else containingTable.appendChild(row);
|
|
889
|
+
row.pane = pane;
|
|
890
|
+
row.paneButton = ico;
|
|
891
|
+
};
|
|
892
|
+
var state = ico.getAttribute('class');
|
|
893
|
+
if (state === 'paneHidden') {
|
|
894
|
+
if (!event.shiftKey) {
|
|
895
|
+
// shift means multiple select
|
|
896
|
+
removePanes();
|
|
897
|
+
}
|
|
898
|
+
renderPane(pane);
|
|
899
|
+
ico.setAttribute('class', 'paneShown');
|
|
900
|
+
ico.style = paneShownStyle;
|
|
901
|
+
} else {
|
|
902
|
+
removePanes(pane);
|
|
903
|
+
ico.setAttribute('class', 'paneHidden');
|
|
904
|
+
ico.style = paneHiddenStyle;
|
|
834
905
|
}
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
var row = dom.createElement('tr');
|
|
855
|
-
var cell = row.appendChild(dom.createElement('td'));
|
|
856
|
-
cell.appendChild(paneDiv);
|
|
857
|
-
if (second) containingTable.insertBefore(row, second);else containingTable.appendChild(row);
|
|
858
|
-
row.pane = pane;
|
|
859
|
-
row.paneButton = ico;
|
|
860
|
-
};
|
|
861
|
-
var state = ico.getAttribute('class');
|
|
862
|
-
if (state === 'paneHidden') {
|
|
863
|
-
if (!event.shiftKey) {
|
|
864
|
-
// shift means multiple select
|
|
865
|
-
removePanes();
|
|
866
|
-
}
|
|
867
|
-
renderPane(pane);
|
|
868
|
-
ico.setAttribute('class', 'paneShown');
|
|
869
|
-
ico.style = paneShownStyle;
|
|
870
|
-
} else {
|
|
871
|
-
removePanes(pane);
|
|
872
|
-
ico.setAttribute('class', 'paneHidden');
|
|
873
|
-
ico.style = paneHiddenStyle;
|
|
874
|
-
}
|
|
875
|
-
var numberOfPanesRequiringQueryButton = 0;
|
|
876
|
-
for (var d = containingTable.firstChild; d; d = d.nextSibling) {
|
|
877
|
-
if (d.pane && d.pane.requireQueryButton) {
|
|
878
|
-
numberOfPanesRequiringQueryButton++;
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
}, false);
|
|
882
|
-
}; // listen
|
|
883
|
-
|
|
884
|
-
listen(ico, pane);
|
|
885
|
-
ico.setAttribute('class', index !== paneNumber ? 'paneHidden' : 'paneShown');
|
|
886
|
-
if (index === paneNumber) tr.paneButton = ico;
|
|
887
|
-
paneIconTray.appendChild(ico);
|
|
888
|
-
});
|
|
906
|
+
var numberOfPanesRequiringQueryButton = 0;
|
|
907
|
+
for (var d = containingTable.firstChild; d; d = d.nextSibling) {
|
|
908
|
+
if (d.pane && d.pane.requireQueryButton) {
|
|
909
|
+
numberOfPanesRequiringQueryButton++;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
}, false);
|
|
913
|
+
}; // listen
|
|
914
|
+
|
|
915
|
+
listen(ico, pane);
|
|
916
|
+
ico.setAttribute('class', index !== paneNumber ? 'paneHidden' : 'paneShown');
|
|
917
|
+
if (index === paneNumber) tr.paneButton = ico;
|
|
918
|
+
paneIconTray.appendChild(ico);
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
return _context12.abrupt("return", paneIconTray);
|
|
922
|
+
case 17:
|
|
923
|
+
case "end":
|
|
924
|
+
return _context12.stop();
|
|
889
925
|
}
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
case 21:
|
|
944
|
-
case "end":
|
|
945
|
-
return _context13.stop();
|
|
926
|
+
}
|
|
927
|
+
}, _callee11);
|
|
928
|
+
}));
|
|
929
|
+
return _renderPaneIconTray.apply(this, arguments);
|
|
930
|
+
};
|
|
931
|
+
renderPaneIconTray = function _renderPaneIconTray2(_x10) {
|
|
932
|
+
return _renderPaneIconTray.apply(this, arguments);
|
|
933
|
+
};
|
|
934
|
+
// renderPaneIconTray
|
|
935
|
+
// Body of expandedHeaderTR
|
|
936
|
+
tr = dom.createElement('tr');
|
|
937
|
+
if (options.hover) {
|
|
938
|
+
// By default no hide till hover as community deems it confusing
|
|
939
|
+
tr.setAttribute('class', 'hoverControl');
|
|
940
|
+
}
|
|
941
|
+
td = tr.appendChild(dom.createElement('td'));
|
|
942
|
+
td.setAttribute('style', 'margin: 0.2em; border: none; padding: 0; vertical-align: top;' + 'display:flex; justify-content: space-between; flex-direction: row;');
|
|
943
|
+
td.setAttribute('notSelectable', 'true');
|
|
944
|
+
td.setAttribute('about', subject.toNT());
|
|
945
|
+
td.setAttribute('colspan', '2');
|
|
946
|
+
|
|
947
|
+
// Stuff at the right about the subject
|
|
948
|
+
header = td.appendChild(dom.createElement('div'));
|
|
949
|
+
header.style = 'display:flex; justify-content: flex-start; align-items: center; flex-wrap: wrap;';
|
|
950
|
+
showHeader = !!requiredPane;
|
|
951
|
+
if (!options.solo && !showHeader) {
|
|
952
|
+
icon = header.appendChild(UI.utils.AJARImage(UI.icons.originalIconBase + 'tbl-collapse.png', 'collapse', undefined, dom));
|
|
953
|
+
icon.addEventListener('click', collapseMouseDownListener);
|
|
954
|
+
strong = header.appendChild(dom.createElement('h1'));
|
|
955
|
+
strong.appendChild(dom.createTextNode(UI.utils.label(subject)));
|
|
956
|
+
strong.style = 'font-size: 150%; margin: 0 0.6em 0 0; padding: 0.1em 0.4em;';
|
|
957
|
+
UI.widgets.makeDraggable(strong, subject);
|
|
958
|
+
}
|
|
959
|
+
_context13.t0 = header;
|
|
960
|
+
_context13.next = 16;
|
|
961
|
+
return renderPaneIconTray(td, {
|
|
962
|
+
hideList: showHeader
|
|
963
|
+
});
|
|
964
|
+
case 16:
|
|
965
|
+
_context13.t1 = _context13.sent;
|
|
966
|
+
_context13.t0.appendChild.call(_context13.t0, _context13.t1);
|
|
967
|
+
// set DOM methods
|
|
968
|
+
tr.firstChild.tabulatorSelect = function () {
|
|
969
|
+
setSelected(this, true);
|
|
970
|
+
};
|
|
971
|
+
tr.firstChild.tabulatorDeselect = function () {
|
|
972
|
+
setSelected(this, false);
|
|
973
|
+
};
|
|
974
|
+
return _context13.abrupt("return", tr);
|
|
975
|
+
case 21:
|
|
976
|
+
case "end":
|
|
977
|
+
return _context13.stop();
|
|
978
|
+
}
|
|
946
979
|
}
|
|
947
980
|
}, _callee12);
|
|
948
981
|
}));
|
|
@@ -1319,14 +1352,14 @@ function _default(context) {
|
|
|
1319
1352
|
// if (term.termType != 'symbol') { return true } // should always ve
|
|
1320
1353
|
if (req === fireOn) {
|
|
1321
1354
|
target.src = icon;
|
|
1322
|
-
target.title =
|
|
1355
|
+
target.title = outlineIcons.tooltips[icon];
|
|
1323
1356
|
}
|
|
1324
1357
|
return true;
|
|
1325
1358
|
};
|
|
1326
1359
|
};
|
|
1327
|
-
sf.addCallback('request', makeIconCallback(
|
|
1328
|
-
sf.addCallback('done', makeIconCallback(
|
|
1329
|
-
sf.addCallback('fail', makeIconCallback(
|
|
1360
|
+
sf.addCallback('request', makeIconCallback(outlineIcons.src.icon_requested));
|
|
1361
|
+
sf.addCallback('done', makeIconCallback(outlineIcons.src.icon_fetched));
|
|
1362
|
+
sf.addCallback('fail', makeIconCallback(outlineIcons.src.icon_failed));
|
|
1330
1363
|
}
|
|
1331
1364
|
|
|
1332
1365
|
// Selection support
|
|
@@ -1342,19 +1375,19 @@ function _default(context) {
|
|
|
1342
1375
|
// outlineIcons.src.icon_opton needed?
|
|
1343
1376
|
var target = thisOutline.targetOf(e);
|
|
1344
1377
|
var p = target.parentNode;
|
|
1345
|
-
termWidget.replaceIcon(p.parentNode,
|
|
1378
|
+
termWidget.replaceIcon(p.parentNode, outlineIcons.termWidgets.optOn, outlineIcons.termWidgets.optOff, optOffIconMouseDownListener);
|
|
1346
1379
|
p.parentNode.parentNode.removeAttribute('optional');
|
|
1347
1380
|
}
|
|
1348
1381
|
function optOffIconMouseDownListener(e) {
|
|
1349
1382
|
// outlineIcons.src.icon_optoff needed?
|
|
1350
1383
|
var target = thisOutline.targetOf(e);
|
|
1351
1384
|
var p = target.parentNode;
|
|
1352
|
-
termWidget.replaceIcon(p.parentNode,
|
|
1385
|
+
termWidget.replaceIcon(p.parentNode, outlineIcons.termWidgets.optOff, outlineIcons.termWidgets.optOn, optOnIconMouseDownListener);
|
|
1353
1386
|
p.parentNode.parentNode.setAttribute('optional', 'true');
|
|
1354
1387
|
}
|
|
1355
1388
|
function setSelectedParent(node, inc) {
|
|
1356
|
-
var onIcon =
|
|
1357
|
-
var offIcon =
|
|
1389
|
+
var onIcon = outlineIcons.termWidgets.optOn;
|
|
1390
|
+
var offIcon = outlineIcons.termWidgets.optOff;
|
|
1358
1391
|
for (var n = node; n.parentNode; n = n.parentNode) {
|
|
1359
1392
|
while (true) {
|
|
1360
1393
|
if (n.getAttribute('predTR')) {
|
|
@@ -1450,7 +1483,7 @@ function _default(context) {
|
|
|
1450
1483
|
// think about this later. Because we update to the why for now.
|
|
1451
1484
|
// alert('Target='+target+', editable='+editable+'\nselected statement:' + st)
|
|
1452
1485
|
if (editable && cla.indexOf('pred') >= 0) {
|
|
1453
|
-
termWidget.addIcon(node,
|
|
1486
|
+
termWidget.addIcon(node, outlineIcons.termWidgets.addTri);
|
|
1454
1487
|
} // Add blue plus
|
|
1455
1488
|
}
|
|
1456
1489
|
} else {
|
|
@@ -1461,7 +1494,7 @@ function _default(context) {
|
|
|
1461
1494
|
setSelectedParent(node, -1);
|
|
1462
1495
|
}
|
|
1463
1496
|
if (cla.indexOf('pred') >= 0) {
|
|
1464
|
-
termWidget.removeIcon(node,
|
|
1497
|
+
termWidget.removeIcon(node, outlineIcons.termWidgets.addTri);
|
|
1465
1498
|
}
|
|
1466
1499
|
selection = selection.filter(function (x) {
|
|
1467
1500
|
return x === node;
|
|
@@ -1475,7 +1508,9 @@ function _default(context) {
|
|
|
1475
1508
|
}
|
|
1476
1509
|
function deselectAll() {
|
|
1477
1510
|
var n = selection.length;
|
|
1478
|
-
for (var i = n - 1; i >= 0; i--)
|
|
1511
|
+
for (var i = n - 1; i >= 0; i--) {
|
|
1512
|
+
setSelected(selection[i], false);
|
|
1513
|
+
}
|
|
1479
1514
|
selection = [];
|
|
1480
1515
|
}
|
|
1481
1516
|
|
|
@@ -1918,10 +1953,10 @@ function _default(context) {
|
|
|
1918
1953
|
// if (typeof rav=='undefined') //uncomment this for javascript2rdf
|
|
1919
1954
|
// have to put this here or this conflicts with deselectAll()
|
|
1920
1955
|
|
|
1921
|
-
if (!target.src || target.src.slice(target.src.indexOf('/icons/') + 1) !==
|
|
1956
|
+
if (!target.src || target.src.slice(target.src.indexOf('/icons/') + 1) !== outlineIcons.src.icon_show_choices && target.src.slice(target.src.indexOf('/icons/') + 1) !== outlineIcons.src.icon_add_triple) {
|
|
1922
1957
|
thisOutline.UserInput.clearInputAndSave(e);
|
|
1923
1958
|
}
|
|
1924
|
-
if (!target.src || target.src.slice(target.src.indexOf('/icons/') + 1) !==
|
|
1959
|
+
if (!target.src || target.src.slice(target.src.indexOf('/icons/') + 1) !== outlineIcons.src.icon_show_choices) {
|
|
1925
1960
|
thisOutline.UserInput.clearMenu();
|
|
1926
1961
|
}
|
|
1927
1962
|
if (e) e.stopPropagation();
|
|
@@ -2212,7 +2247,7 @@ function _default(context) {
|
|
|
2212
2247
|
// / /////////////////////////////////////////////////////
|
|
2213
2248
|
|
|
2214
2249
|
var ns = UI.ns;
|
|
2215
|
-
var views = (0, _propertyViews
|
|
2250
|
+
var views = (0, _propertyViews["default"])(dom);
|
|
2216
2251
|
|
|
2217
2252
|
// var thisOutline = this dup
|
|
2218
2253
|
/** some builtin simple views **/
|
|
@@ -2248,7 +2283,7 @@ function _default(context) {
|
|
|
2248
2283
|
var anchor = dom.createElement('a');
|
|
2249
2284
|
rep.appendChild(dom.createTextNode(num));
|
|
2250
2285
|
anchor.setAttribute('href', obj.uri);
|
|
2251
|
-
anchor.appendChild(UI.utils.AJARImage(
|
|
2286
|
+
anchor.appendChild(UI.utils.AJARImage(outlineIcons.src.icon_telephone, 'phone', 'phone ' + num, dom));
|
|
2252
2287
|
rep.appendChild(anchor);
|
|
2253
2288
|
anchor.firstChild.setAttribute('class', 'phoneIcon');
|
|
2254
2289
|
} else {
|