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