solid-panes 3.5.28 → 3.5.29-1155b301
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/.babelrc +0 -0
- package/.eslintignore +0 -0
- package/.eslintrc +0 -0
- package/.github/workflows/ci.yml +0 -0
- package/.nvmrc +0 -0
- package/Documentation/VisualLanguage.html +0 -0
- package/Documentation/conventions.md +0 -0
- package/LICENSE.md +0 -0
- package/README.md +0 -0
- package/dev/index.html +0 -0
- package/dev/loader.ts +0 -0
- package/dev/pane/index.ts +0 -0
- package/doc/images/panes-for-classes.epgz +0 -0
- package/doc/images/panes-for-classes.svg +0 -0
- package/jest.config.js +0 -0
- package/jest.setup.ts +0 -0
- 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.d.ts +0 -0
- package/lib/dashboard/basicPreferences.d.ts.map +0 -0
- package/lib/dashboard/basicPreferences.js +96 -104
- package/lib/dashboard/basicPreferences.js.map +1 -1
- package/lib/dashboard/dashboardPane.d.ts +0 -0
- package/lib/dashboard/dashboardPane.d.ts.map +0 -0
- package/lib/dashboard/dashboardPane.js +0 -0
- package/lib/dashboard/dashboardPane.js.map +0 -0
- package/lib/dashboard/homepage.d.ts +0 -0
- package/lib/dashboard/homepage.d.ts.map +0 -0
- 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/global.d.js +0 -0
- package/lib/global.d.js.map +0 -0
- package/lib/home/homePane.d.ts +0 -0
- 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/humanReadablePane.js +0 -0
- package/lib/humanReadablePane.js.map +0 -0
- package/lib/imagePane.js +11 -2
- package/lib/imagePane.js.map +1 -1
- package/lib/index.d.ts +0 -0
- package/lib/index.d.ts.map +0 -0
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/internal/internalPane.d.ts +0 -0
- package/lib/internal/internalPane.d.ts.map +0 -0
- package/lib/internal/internalPane.js +0 -0
- package/lib/internal/internalPane.js.map +0 -0
- package/lib/mainPage/footer.d.ts +0 -0
- package/lib/mainPage/footer.d.ts.map +0 -0
- package/lib/mainPage/footer.js +0 -0
- package/lib/mainPage/footer.js.map +0 -0
- package/lib/mainPage/header.d.ts +0 -0
- package/lib/mainPage/header.d.ts.map +0 -0
- package/lib/mainPage/header.js +65 -73
- package/lib/mainPage/header.js.map +1 -1
- package/lib/mainPage/index.d.ts +0 -0
- package/lib/mainPage/index.d.ts.map +0 -0
- 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/context.d.ts +0 -0
- package/lib/outline/context.d.ts.map +0 -0
- package/lib/outline/context.js +0 -0
- package/lib/outline/context.js.map +0 -0
- package/lib/outline/licenseOptions.js +13 -11
- package/lib/outline/licenseOptions.js.map +1 -1
- package/lib/outline/manager.js +581 -615
- package/lib/outline/manager.js.map +1 -1
- package/lib/outline/manager.test.js +16 -15
- package/lib/outline/manager.test.js.map +1 -1
- package/lib/outline/outlineIcons.js +10 -2
- package/lib/outline/outlineIcons.js.map +1 -1
- package/lib/outline/propertyViews.d.ts +3 -2
- package/lib/outline/propertyViews.d.ts.map +1 -1
- package/lib/outline/propertyViews.js +7 -5
- package/lib/outline/propertyViews.js.map +1 -1
- package/lib/outline/propertyViews.test.js +6 -4
- package/lib/outline/propertyViews.test.js.map +1 -1
- package/lib/outline/queryByExample.js +6 -6
- package/lib/outline/queryByExample.js.map +1 -1
- package/lib/outline/userInput.js +7 -5
- package/lib/outline/userInput.js.map +1 -1
- package/lib/outline/viewAsImage.d.ts +0 -0
- package/lib/outline/viewAsImage.d.ts.map +0 -0
- package/lib/outline/viewAsImage.js +0 -0
- package/lib/outline/viewAsImage.js.map +0 -0
- package/lib/outline/viewAsMbox.d.ts +0 -0
- package/lib/outline/viewAsMbox.d.ts.map +0 -0
- package/lib/outline/viewAsMbox.js +0 -0
- package/lib/outline/viewAsMbox.js.map +0 -0
- package/lib/pad/padPane.d.ts +0 -0
- package/lib/pad/padPane.d.ts.map +0 -0
- package/lib/pad/padPane.js +0 -0
- package/lib/pad/padPane.js.map +0 -0
- package/lib/playlist/playlistPane.js +13 -6
- package/lib/playlist/playlistPane.js.map +1 -1
- package/lib/profile/editProfile.view.d.ts +0 -0
- 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/profile/profile.dom.d.ts +0 -0
- package/lib/profile/profile.dom.d.ts.map +0 -0
- package/lib/profile/profile.dom.js +0 -0
- package/lib/profile/profile.dom.js.map +0 -0
- 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/sharing/sharingPane.d.ts +0 -0
- package/lib/sharing/sharingPane.d.ts.map +0 -0
- package/lib/sharing/sharingPane.js +0 -0
- package/lib/sharing/sharingPane.js.map +0 -0
- package/lib/slideshow/slideshowPane.js +16 -11
- package/lib/slideshow/slideshowPane.js.map +1 -1
- package/lib/socialPane.js +16 -12
- package/lib/socialPane.js.map +1 -1
- package/lib/tabbed/tabbedPane.d.ts +0 -0
- package/lib/tabbed/tabbedPane.d.ts.map +0 -0
- 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/test-import-export/testImportExport.js +0 -0
- package/lib/test-import-export/testImportExport.js.map +0 -0
- 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.d.ts +0 -0
- package/lib/trustedApplications/trustedApplications.dom.d.ts.map +0 -0
- 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.d.ts +0 -0
- package/lib/trustedApplications/trustedApplications.utils.d.ts.map +0 -0
- package/lib/trustedApplications/trustedApplications.utils.js +1 -1
- package/lib/trustedApplications/trustedApplications.utils.js.map +0 -0
- package/lib/trustedApplications/trustedApplications.view.d.ts +0 -0
- package/lib/trustedApplications/trustedApplications.view.d.ts.map +0 -0
- package/lib/trustedApplications/trustedApplications.view.js +38 -40
- package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
- package/lib/types.d.ts +0 -0
- package/lib/types.d.ts.map +0 -0
- package/lib/types.js +0 -0
- package/lib/types.js.map +0 -0
- package/lib/ui/pane.js +12 -5
- package/lib/ui/pane.js.map +1 -1
- package/lib/versionInfo.d.ts +0 -0
- package/lib/versionInfo.d.ts.map +0 -0
- package/lib/versionInfo.js +13 -13
- 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 +21 -23
- package/src/RDFXMLPane.js +2 -2
- package/src/argument/argumentPane.js +1 -1
- package/src/argument/argument_icon_v04.jpg +0 -0
- package/src/argument/icon_argument.png +0 -0
- package/src/argument/transparentyingyang.png +0 -0
- package/src/attach/attachPane.js +3 -3
- package/src/attach/tbl-paperclip-128.png +0 -0
- package/src/attach/tbl-paperclip-22.png +0 -0
- package/src/attach/tbl-paperclip-22a.png +0 -0
- package/src/audio/audioPane.js +3 -3
- package/src/chatPreferencesForm.ttl +0 -0
- package/src/classInstancePane.js +3 -3
- package/src/dashboard/basicPreferences.ts +0 -0
- package/src/dashboard/dashboardPane.ts +0 -0
- package/src/dashboard/homepage.ts +0 -0
- package/src/dashboard/languages/codes.html +0 -0
- package/src/dashboard/languages/codes.xml +0 -0
- package/src/dashboard/languages/codes2.txt +0 -0
- package/src/dashboard/languages/foo +0 -0
- package/src/dashboard/languages/foo.ttl +0 -0
- package/src/dashboard/languages/get-language-names.sh +0 -0
- package/src/dashboard/ontologyData.ttl +0 -0
- package/src/dashboard/preferencesFormText.ttl +0 -0
- package/src/dataContentPane.js +3 -4
- package/src/defaultPane.js +3 -3
- package/src/dokieli/Makefile +0 -0
- package/src/dokieli/dokieliPane.js +5 -5
- package/src/dokieli/new.html +0 -0
- package/src/dokieli/new.js +1 -1
- package/src/form/form-22.png +0 -0
- package/src/form/form-b-22.png +0 -0
- package/src/form/form.graffle +0 -0
- package/src/form/form.png +0 -0
- package/src/form/pane.js +2 -2
- package/src/form/psuedocode-notes.txt +0 -0
- package/src/global.d.ts +0 -0
- package/src/home/homePane.ts +1 -14
- package/src/humanReadablePane.js +0 -0
- package/src/imagePane.js +2 -2
- package/src/index.ts +1 -1
- package/src/internal/internalPane.ts +0 -0
- package/src/mainPage/footer.ts +0 -0
- package/src/mainPage/header.ts +0 -0
- package/src/mainPage/index.ts +0 -0
- package/src/meeting/Makefile +0 -0
- package/src/meeting/test/meeting1/Actions/actions.ttl +0 -0
- package/src/meeting/test/meeting1/Actions/config.ttl +0 -0
- package/src/meeting/test/meeting1/Actions/state.ttl +0 -0
- package/src/meeting/test/meeting1/Schedule/details.ttl +0 -0
- package/src/meeting/test/meeting1/Schedule/details.ttl.acl +0 -0
- package/src/meeting/test/meeting1/Schedule/forms.ttl +0 -0
- package/src/meeting/test/meeting1/Schedule/forms.ttl.acl +0 -0
- package/src/meeting/test/meeting1/Schedule/index.html +0 -0
- package/src/meeting/test/meeting1/Schedule/index.html.acl +0 -0
- package/src/meeting/test/meeting1/Schedule/results.ttl +0 -0
- package/src/meeting/test/meeting1/Schedule/results.ttl.acl +0 -0
- package/src/meeting/test/meeting1/SharedNotes/pad.ttl +0 -0
- package/src/meeting/test/meeting1/chat/chat.ttl +0 -0
- package/src/meeting/test/meeting1/details.ttl +0 -0
- package/src/meeting/test/meeting1/pad/pad.ttl +0 -0
- package/src/microblogPane/mbStyle.css +0 -0
- package/src/microblogPane/microblogPane.js +1 -1
- package/src/n3Pane.js +2 -2
- package/src/outline/context.ts +0 -0
- package/src/outline/licenseOptions.js +9 -8
- package/src/outline/manager.js +18 -20
- package/src/outline/manager.test.ts +6 -0
- package/src/outline/outlineIcons.js +4 -2
- package/src/outline/propertyViews.test.ts +7 -1
- package/src/outline/propertyViews.ts +3 -3
- package/src/outline/queryByExample.js +3 -9
- package/src/outline/userInput.js +1 -1
- package/src/outline/viewAsImage.ts +0 -0
- package/src/outline/viewAsMbox.ts +0 -0
- package/src/pad/images/ColourOff.ai +0 -0
- package/src/pad/images/ColourOff.png +0 -0
- package/src/pad/images/ColourOn.ai +0 -0
- package/src/pad/images/ColourOn.png +0 -0
- package/src/pad/padPane.ts +0 -0
- package/src/playlist/playlistPane.js +3 -3
- package/src/profile/editProfile.view.ts +20 -0
- package/src/profile/profile.dom.ts +0 -0
- package/src/profile/profileFormText.ttl +0 -0
- package/src/registerPanes.js +92 -52
- package/src/schedule/Makefile +0 -0
- package/src/schedule/formsForSchedule.js +1 -1
- package/src/schedule/formsForSchedule.ttl +0 -0
- package/src/schedule/schedulePane.js +6 -2
- package/src/sharing/sharingPane.ts +0 -0
- package/src/slideshow/slideshowPane.js +3 -6
- package/src/socialPane.js +4 -5
- package/src/style/tabbedtab.css +0 -0
- package/src/tabbed/tabbedPane.ts +0 -0
- 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/test-import-export/testImportExport.js +0 -0
- package/src/transaction/068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
- package/src/transaction/075988-3d-transparent-glass-icon-business-currency-british-pound-sc35.png +0 -0
- package/src/transaction/22-pixel-068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
- package/src/transaction/pane.js +3 -3
- package/src/transaction/period.js +2 -2
- package/src/transaction/thumbs_075987-3d-transparent-glass-icon-business-creditcard2.png +0 -0
- package/src/transaction/thumbs_075989-3d-transparent-glass-icon-business-currency-cent-sc35.png +0 -0
- package/src/trip/tripPane.js +3 -3
- package/src/trustedApplications/__snapshots__/trustedApplications.test.ts.snap +0 -0
- package/src/trustedApplications/trustedApplications.dom.ts +0 -0
- package/src/trustedApplications/trustedApplications.test.ts +4 -0
- package/src/trustedApplications/trustedApplications.utils.ts +0 -0
- package/src/trustedApplications/trustedApplications.view.ts +0 -0
- package/src/types.ts +0 -0
- package/src/ui/22-builder.png +0 -0
- package/src/ui/builder.graffle +0 -0
- package/src/ui/builder.png +0 -0
- package/src/ui/builder2.png +0 -0
- package/src/ui/pane.js +3 -3
- package/src/versionInfo.ts +13 -13
- package/src/video/videoPane.js +3 -3
- package/timestamp.sh +0 -0
- package/travis/bumpversion.js +0 -0
- package/tsconfig.json +0 -0
- package/typings/raw-loader.d.ts +0 -0
- package/typings/solid-namespace/index.d.ts +0 -0
- package/webpack.config.js +3 -1
- package/lib/trustedApplications/__snapshots__/trustedApplications.test.js.snap +0 -176
package/lib/outline/manager.js
CHANGED
|
@@ -9,23 +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
|
-
|
|
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"));
|
|
14
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); }
|
|
15
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; }
|
|
16
19
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
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."); }
|
|
18
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); }
|
|
19
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
20
|
-
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; } }
|
|
21
24
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
|
-
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; }
|
|
23
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); } }
|
|
24
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); }); }; }
|
|
25
|
-
var outlineIcons = require('./outlineIcons.js');
|
|
26
|
-
var UserInput = require('./userInput.js');
|
|
27
|
-
var queryByExample = require('./queryByExample.js');
|
|
28
|
-
|
|
29
28
|
/* global alert XPathResult sourceWidget */
|
|
30
29
|
// XPathResult?
|
|
31
30
|
|
|
@@ -34,7 +33,7 @@ var queryByExample = require('./queryByExample.js');
|
|
|
34
33
|
function _default(context) {
|
|
35
34
|
var dom = context.dom;
|
|
36
35
|
this.document = context.dom;
|
|
37
|
-
this.outlineIcons = outlineIcons;
|
|
36
|
+
this.outlineIcons = _outlineIcons.outlineIcons;
|
|
38
37
|
this.labeller = this.labeller || {};
|
|
39
38
|
this.labeller.LanguagePreference = ''; // for now
|
|
40
39
|
var outline = this; // Kenny: do we need this?
|
|
@@ -51,7 +50,7 @@ function _default(context) {
|
|
|
51
50
|
|
|
52
51
|
// var selection = [] // Array of statements which have been selected
|
|
53
52
|
// this.focusTd // the <td> that is being observed
|
|
54
|
-
this.UserInput = new UserInput(this);
|
|
53
|
+
this.UserInput = new _userInput.UserInput(this);
|
|
55
54
|
this.clipboardAddress = 'tabulator:clipboard'; // Weird
|
|
56
55
|
this.UserInput.clipboardInit(this.clipboardAddress);
|
|
57
56
|
var outlineElement = this.outlineElement;
|
|
@@ -64,9 +63,7 @@ function _default(context) {
|
|
|
64
63
|
benchmark.lastkbsize = 0;
|
|
65
64
|
function benchmark(f) {
|
|
66
65
|
var args = [];
|
|
67
|
-
for (var i = arguments.length - 1; i > 0; i--)
|
|
68
|
-
args[i - 1] = arguments[i];
|
|
69
|
-
}
|
|
66
|
+
for (var i = arguments.length - 1; i > 0; i--) args[i - 1] = arguments[i];
|
|
70
67
|
// UI.log.debug('BENCHMARK: args=' + args.join());
|
|
71
68
|
var begin = new Date().getTime();
|
|
72
69
|
var returnValue = f.apply(f, args);
|
|
@@ -81,7 +78,7 @@ function _default(context) {
|
|
|
81
78
|
// Represent an object in summary form as a table cell
|
|
82
79
|
|
|
83
80
|
function appendRemoveIcon(node, subject, removeNode) {
|
|
84
|
-
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);
|
|
85
82
|
image.addEventListener('click', removeNodeIconMouseDownListener);
|
|
86
83
|
// image.setAttribute('align', 'right') Causes icon to be moved down
|
|
87
84
|
image.node = removeNode;
|
|
@@ -111,32 +108,32 @@ function _default(context) {
|
|
|
111
108
|
var icon, alt, listener;
|
|
112
109
|
switch (state) {
|
|
113
110
|
case 'unrequested':
|
|
114
|
-
icon = outlineIcons.src.icon_unrequested;
|
|
111
|
+
icon = _outlineIcons.outlineIcons.src.icon_unrequested;
|
|
115
112
|
alt = 'fetch';
|
|
116
113
|
listener = unrequestedIconMouseDownListener;
|
|
117
114
|
break;
|
|
118
115
|
case 'requested':
|
|
119
|
-
icon = outlineIcons.src.icon_requested;
|
|
116
|
+
icon = _outlineIcons.outlineIcons.src.icon_requested;
|
|
120
117
|
alt = 'fetching';
|
|
121
118
|
listener = failedIconMouseDownListener; // new: can retry yello blob
|
|
122
119
|
break;
|
|
123
120
|
case 'fetched':
|
|
124
|
-
icon = outlineIcons.src.icon_fetched;
|
|
121
|
+
icon = _outlineIcons.outlineIcons.src.icon_fetched;
|
|
125
122
|
listener = fetchedIconMouseDownListener;
|
|
126
123
|
alt = 'loaded';
|
|
127
124
|
break;
|
|
128
125
|
case 'failed':
|
|
129
|
-
icon = outlineIcons.src.icon_failed;
|
|
126
|
+
icon = _outlineIcons.outlineIcons.src.icon_failed;
|
|
130
127
|
alt = 'failed';
|
|
131
128
|
listener = failedIconMouseDownListener;
|
|
132
129
|
break;
|
|
133
130
|
case 'unpermitted':
|
|
134
|
-
icon = outlineIcons.src.icon_failed;
|
|
131
|
+
icon = _outlineIcons.outlineIcons.src.icon_failed;
|
|
135
132
|
listener = failedIconMouseDownListener;
|
|
136
133
|
alt = 'no perm';
|
|
137
134
|
break;
|
|
138
135
|
case 'unfetchable':
|
|
139
|
-
icon = outlineIcons.src.icon_failed;
|
|
136
|
+
icon = _outlineIcons.outlineIcons.src.icon_failed;
|
|
140
137
|
listener = failedIconMouseDownListener;
|
|
141
138
|
alt = 'cannot fetch';
|
|
142
139
|
break;
|
|
@@ -144,7 +141,7 @@ function _default(context) {
|
|
|
144
141
|
UI.log.error('?? state = ' + state);
|
|
145
142
|
break;
|
|
146
143
|
} // switch
|
|
147
|
-
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);
|
|
148
145
|
img.setAttribute('uri', uri);
|
|
149
146
|
img.addEventListener('click', listener); // @@ seemed to be missing 2017-08
|
|
150
147
|
addButtonCallbacks(img, docuri);
|
|
@@ -165,7 +162,7 @@ function _default(context) {
|
|
|
165
162
|
|
|
166
163
|
// check the IPR on the data. Ok if there is any checked license which is one the document has.
|
|
167
164
|
if (statement && statement.why) {
|
|
168
|
-
if (
|
|
165
|
+
if (_licenseOptions.licenseOptions && _licenseOptions.licenseOptions.checklicense && _licenseOptions.licenseOptions.checklicense()) {
|
|
169
166
|
theClass += ' licOkay'; // flag as light green etc .licOkay {background-color: #dfd}
|
|
170
167
|
}
|
|
171
168
|
}
|
|
@@ -228,11 +225,11 @@ function _default(context) {
|
|
|
228
225
|
predicateTD.appendChild(labelTD);
|
|
229
226
|
labelTD.style.width = '100%';
|
|
230
227
|
predicateTD.appendChild(termWidget.construct(dom)); // termWidget is global???
|
|
231
|
-
for (var w in outlineIcons.termWidgets) {
|
|
228
|
+
for (var w in _outlineIcons.outlineIcons.termWidgets) {
|
|
232
229
|
if (!newTr || !newTr.AJAR_statement) break; // case for TBD as predicate
|
|
233
230
|
// alert(Icon.termWidgets[w]+' '+Icon.termWidgets[w].filter)
|
|
234
|
-
if (outlineIcons.termWidgets[w].filter && outlineIcons.termWidgets[w].filter(newTr.AJAR_statement, 'pred', inverse)) {
|
|
235
|
-
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]);
|
|
236
233
|
}
|
|
237
234
|
}
|
|
238
235
|
|
|
@@ -268,54 +265,52 @@ function _default(context) {
|
|
|
268
265
|
renderMain,
|
|
269
266
|
_args = arguments;
|
|
270
267
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
271
|
-
while (1) {
|
|
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
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
return _context.stop();
|
|
318
|
-
}
|
|
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();
|
|
319
314
|
}
|
|
320
315
|
}, _callee);
|
|
321
316
|
}));
|
|
@@ -329,246 +324,234 @@ function _default(context) {
|
|
|
329
324
|
_getDashboardItems = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
330
325
|
var me, div, _yield$Promise$all, _yield$Promise$all2, books, pods, getPods, _getPods, getAddressBooks, _getAddressBooks;
|
|
331
326
|
return _regeneratorRuntime().wrap(function _callee7$(_context8) {
|
|
332
|
-
while (1) {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
_getAddressBooks = function
|
|
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
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
pathStorage = podStorage.pathname;
|
|
403
|
-
case 2:
|
|
404
|
-
if (!pathStorage.length) {
|
|
405
|
-
_context4.next = 10;
|
|
406
|
-
break;
|
|
407
|
-
}
|
|
408
|
-
pathStorage = pathStorage.substring(0, pathStorage.lastIndexOf('/'));
|
|
409
|
-
_context4.next = 6;
|
|
410
|
-
return addPodStorage(kb.sym("".concat(podStorage.origin).concat(pathStorage, "/")));
|
|
411
|
-
case 6:
|
|
412
|
-
if (!_context4.sent) {
|
|
413
|
-
_context4.next = 8;
|
|
414
|
-
break;
|
|
415
|
-
}
|
|
416
|
-
return _context4.abrupt("return");
|
|
417
|
-
case 8:
|
|
418
|
-
_context4.next = 2;
|
|
419
|
-
break;
|
|
420
|
-
case 10:
|
|
421
|
-
case "end":
|
|
422
|
-
return _context4.stop();
|
|
423
|
-
}
|
|
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;
|
|
424
397
|
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
_addPodStorage = function _addPodStorage3() {
|
|
433
|
-
_addPodStorage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(pod) {
|
|
434
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
435
|
-
while (1) {
|
|
436
|
-
switch (_context3.prev = _context3.next) {
|
|
437
|
-
case 0:
|
|
438
|
-
_context3.next = 2;
|
|
439
|
-
return loadContainerRepresentation(pod);
|
|
440
|
-
case 2:
|
|
441
|
-
if (!kb.holds(pod, ns.rdf('type'), ns.space('Storage'), pod.doc())) {
|
|
442
|
-
_context3.next = 5;
|
|
443
|
-
break;
|
|
444
|
-
}
|
|
445
|
-
pods.push(pod);
|
|
446
|
-
return _context3.abrupt("return", true);
|
|
447
|
-
case 5:
|
|
448
|
-
return _context3.abrupt("return", false);
|
|
449
|
-
case 6:
|
|
450
|
-
case "end":
|
|
451
|
-
return _context3.stop();
|
|
452
|
-
}
|
|
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;
|
|
453
405
|
}
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
return
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
case 0:
|
|
481
|
-
_context2.next = 2;
|
|
482
|
-
return loadContainerRepresentation(pod);
|
|
483
|
-
case 2:
|
|
484
|
-
case "end":
|
|
485
|
-
return _context2.stop();
|
|
486
|
-
}
|
|
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;
|
|
487
432
|
}
|
|
488
|
-
|
|
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
|
-
|
|
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();
|
|
518
472
|
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
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;
|
|
531
497
|
}
|
|
532
|
-
|
|
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
|
-
|
|
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();
|
|
572
555
|
}
|
|
573
556
|
}, _callee7);
|
|
574
557
|
}));
|
|
@@ -597,53 +580,51 @@ function _default(context) {
|
|
|
597
580
|
closeDashboard,
|
|
598
581
|
_args8 = arguments;
|
|
599
582
|
return _regeneratorRuntime().wrap(function _callee8$(_context9) {
|
|
600
|
-
while (1) {
|
|
601
|
-
|
|
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
|
-
return _context9.stop();
|
|
646
|
-
}
|
|
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();
|
|
647
628
|
}
|
|
648
629
|
}, _callee8);
|
|
649
630
|
}));
|
|
@@ -678,27 +659,25 @@ function _default(context) {
|
|
|
678
659
|
_loadContainerRepresentation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(subject) {
|
|
679
660
|
var response, containerTurtle;
|
|
680
661
|
return _regeneratorRuntime().wrap(function _callee9$(_context10) {
|
|
681
|
-
while (1) {
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
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'
|
|
687
672
|
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
containerTurtle = response.responseText;
|
|
697
|
-
$rdf.parse(containerTurtle, kb, subject.uri, 'text/turtle');
|
|
698
|
-
case 6:
|
|
699
|
-
case "end":
|
|
700
|
-
return _context10.stop();
|
|
701
|
-
}
|
|
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();
|
|
702
681
|
}
|
|
703
682
|
}, _callee9);
|
|
704
683
|
}));
|
|
@@ -711,43 +690,41 @@ function _default(context) {
|
|
|
711
690
|
_getRelevantPanes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(subject, context) {
|
|
712
691
|
var panes, relevantPanes, filteredPanes, firstRelevantPaneIndex, firstFilteredPaneIndex;
|
|
713
692
|
return _regeneratorRuntime().wrap(function _callee10$(_context11) {
|
|
714
|
-
while (1) {
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
if (!subject.uri.endsWith('/')) {
|
|
718
|
-
_context11.next = 3;
|
|
719
|
-
break;
|
|
720
|
-
}
|
|
693
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
694
|
+
case 0:
|
|
695
|
+
if (!subject.uri.endsWith('/')) {
|
|
721
696
|
_context11.next = 3;
|
|
722
|
-
|
|
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
|
-
|
|
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();
|
|
751
728
|
}
|
|
752
729
|
}, _callee10);
|
|
753
730
|
}));
|
|
@@ -784,197 +761,188 @@ function _default(context) {
|
|
|
784
761
|
_expandedHeaderTR = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(subject, requiredPane, options) {
|
|
785
762
|
var renderPaneIconTray, _renderPaneIconTray, tr, td, header, showHeader, icon, strong;
|
|
786
763
|
return _regeneratorRuntime().wrap(function _callee12$(_context13) {
|
|
787
|
-
while (1) {
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
_renderPaneIconTray = function
|
|
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
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
if (
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
d.paneButton.setAttribute('class', 'paneHidden');
|
|
850
|
-
d.paneButton.style = paneHiddenStyle;
|
|
851
|
-
}
|
|
852
|
-
removeAndRefresh(d);
|
|
853
|
-
// If we just delete the node d, ffox doesn't refresh the display properly.
|
|
854
|
-
// state = 'paneHidden';
|
|
855
|
-
if (d.pane.requireQueryButton && containingTable.parentNode.className /* outer table */ && numberOfPanesRequiringQueryButton === 1 && dom.getElementById('queryButton')) {
|
|
856
|
-
dom.getElementById('queryButton').setAttribute('style', 'display:none;');
|
|
857
|
-
}
|
|
858
|
-
}
|
|
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;
|
|
859
826
|
}
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
if (UI.no_catch_pane_errors) {
|
|
866
|
-
// for debugging
|
|
867
|
-
paneDiv = pane.render(subject, context, options);
|
|
868
|
-
} else {
|
|
869
|
-
try {
|
|
870
|
-
paneDiv = pane.render(subject, context, options);
|
|
871
|
-
} catch (e) {
|
|
872
|
-
// Easier debugging for pane developers
|
|
873
|
-
paneDiv = dom.createElement('div');
|
|
874
|
-
paneDiv.setAttribute('class', 'exceptionPane');
|
|
875
|
-
var pre = dom.createElement('pre');
|
|
876
|
-
paneDiv.appendChild(pre);
|
|
877
|
-
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;');
|
|
878
832
|
}
|
|
879
833
|
}
|
|
880
|
-
if (pane.requireQueryButton && dom.getElementById('queryButton')) {
|
|
881
|
-
dom.getElementById('queryButton').removeAttribute('style');
|
|
882
|
-
}
|
|
883
|
-
var second = containingTable.firstChild.nextSibling;
|
|
884
|
-
var row = dom.createElement('tr');
|
|
885
|
-
var cell = row.appendChild(dom.createElement('td'));
|
|
886
|
-
cell.appendChild(paneDiv);
|
|
887
|
-
if (second) containingTable.insertBefore(row, second);else containingTable.appendChild(row);
|
|
888
|
-
row.pane = pane;
|
|
889
|
-
row.paneButton = ico;
|
|
890
|
-
};
|
|
891
|
-
var state = ico.getAttribute('class');
|
|
892
|
-
if (state === 'paneHidden') {
|
|
893
|
-
if (!event.shiftKey) {
|
|
894
|
-
// shift means multiple select
|
|
895
|
-
removePanes();
|
|
896
|
-
}
|
|
897
|
-
renderPane(pane);
|
|
898
|
-
ico.setAttribute('class', 'paneShown');
|
|
899
|
-
ico.style = paneShownStyle;
|
|
900
|
-
} else {
|
|
901
|
-
removePanes(pane);
|
|
902
|
-
ico.setAttribute('class', 'paneHidden');
|
|
903
|
-
ico.style = paneHiddenStyle;
|
|
904
834
|
}
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
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
|
+
});
|
|
924
889
|
}
|
|
925
|
-
|
|
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
|
-
|
|
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();
|
|
978
946
|
}
|
|
979
947
|
}, _callee12);
|
|
980
948
|
}));
|
|
@@ -1351,14 +1319,14 @@ function _default(context) {
|
|
|
1351
1319
|
// if (term.termType != 'symbol') { return true } // should always ve
|
|
1352
1320
|
if (req === fireOn) {
|
|
1353
1321
|
target.src = icon;
|
|
1354
|
-
target.title = outlineIcons.tooltips[icon];
|
|
1322
|
+
target.title = _outlineIcons.outlineIcons.tooltips[icon];
|
|
1355
1323
|
}
|
|
1356
1324
|
return true;
|
|
1357
1325
|
};
|
|
1358
1326
|
};
|
|
1359
|
-
sf.addCallback('request', makeIconCallback(outlineIcons.src.icon_requested));
|
|
1360
|
-
sf.addCallback('done', makeIconCallback(outlineIcons.src.icon_fetched));
|
|
1361
|
-
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));
|
|
1362
1330
|
}
|
|
1363
1331
|
|
|
1364
1332
|
// Selection support
|
|
@@ -1374,19 +1342,19 @@ function _default(context) {
|
|
|
1374
1342
|
// outlineIcons.src.icon_opton needed?
|
|
1375
1343
|
var target = thisOutline.targetOf(e);
|
|
1376
1344
|
var p = target.parentNode;
|
|
1377
|
-
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);
|
|
1378
1346
|
p.parentNode.parentNode.removeAttribute('optional');
|
|
1379
1347
|
}
|
|
1380
1348
|
function optOffIconMouseDownListener(e) {
|
|
1381
1349
|
// outlineIcons.src.icon_optoff needed?
|
|
1382
1350
|
var target = thisOutline.targetOf(e);
|
|
1383
1351
|
var p = target.parentNode;
|
|
1384
|
-
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);
|
|
1385
1353
|
p.parentNode.parentNode.setAttribute('optional', 'true');
|
|
1386
1354
|
}
|
|
1387
1355
|
function setSelectedParent(node, inc) {
|
|
1388
|
-
var onIcon = outlineIcons.termWidgets.optOn;
|
|
1389
|
-
var offIcon = outlineIcons.termWidgets.optOff;
|
|
1356
|
+
var onIcon = _outlineIcons.outlineIcons.termWidgets.optOn;
|
|
1357
|
+
var offIcon = _outlineIcons.outlineIcons.termWidgets.optOff;
|
|
1390
1358
|
for (var n = node; n.parentNode; n = n.parentNode) {
|
|
1391
1359
|
while (true) {
|
|
1392
1360
|
if (n.getAttribute('predTR')) {
|
|
@@ -1482,7 +1450,7 @@ function _default(context) {
|
|
|
1482
1450
|
// think about this later. Because we update to the why for now.
|
|
1483
1451
|
// alert('Target='+target+', editable='+editable+'\nselected statement:' + st)
|
|
1484
1452
|
if (editable && cla.indexOf('pred') >= 0) {
|
|
1485
|
-
termWidget.addIcon(node, outlineIcons.termWidgets.addTri);
|
|
1453
|
+
termWidget.addIcon(node, _outlineIcons.outlineIcons.termWidgets.addTri);
|
|
1486
1454
|
} // Add blue plus
|
|
1487
1455
|
}
|
|
1488
1456
|
} else {
|
|
@@ -1493,7 +1461,7 @@ function _default(context) {
|
|
|
1493
1461
|
setSelectedParent(node, -1);
|
|
1494
1462
|
}
|
|
1495
1463
|
if (cla.indexOf('pred') >= 0) {
|
|
1496
|
-
termWidget.removeIcon(node, outlineIcons.termWidgets.addTri);
|
|
1464
|
+
termWidget.removeIcon(node, _outlineIcons.outlineIcons.termWidgets.addTri);
|
|
1497
1465
|
}
|
|
1498
1466
|
selection = selection.filter(function (x) {
|
|
1499
1467
|
return x === node;
|
|
@@ -1507,9 +1475,7 @@ function _default(context) {
|
|
|
1507
1475
|
}
|
|
1508
1476
|
function deselectAll() {
|
|
1509
1477
|
var n = selection.length;
|
|
1510
|
-
for (var i = n - 1; i >= 0; i--)
|
|
1511
|
-
setSelected(selection[i], false);
|
|
1512
|
-
}
|
|
1478
|
+
for (var i = n - 1; i >= 0; i--) setSelected(selection[i], false);
|
|
1513
1479
|
selection = [];
|
|
1514
1480
|
}
|
|
1515
1481
|
|
|
@@ -1952,10 +1918,10 @@ function _default(context) {
|
|
|
1952
1918
|
// if (typeof rav=='undefined') //uncomment this for javascript2rdf
|
|
1953
1919
|
// have to put this here or this conflicts with deselectAll()
|
|
1954
1920
|
|
|
1955
|
-
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) {
|
|
1956
1922
|
thisOutline.UserInput.clearInputAndSave(e);
|
|
1957
1923
|
}
|
|
1958
|
-
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) {
|
|
1959
1925
|
thisOutline.UserInput.clearMenu();
|
|
1960
1926
|
}
|
|
1961
1927
|
if (e) e.stopPropagation();
|
|
@@ -2246,7 +2212,7 @@ function _default(context) {
|
|
|
2246
2212
|
// / /////////////////////////////////////////////////////
|
|
2247
2213
|
|
|
2248
2214
|
var ns = UI.ns;
|
|
2249
|
-
var views = (0, _propertyViews
|
|
2215
|
+
var views = (0, _propertyViews.propertyViews)(dom);
|
|
2250
2216
|
|
|
2251
2217
|
// var thisOutline = this dup
|
|
2252
2218
|
/** some builtin simple views **/
|
|
@@ -2282,7 +2248,7 @@ function _default(context) {
|
|
|
2282
2248
|
var anchor = dom.createElement('a');
|
|
2283
2249
|
rep.appendChild(dom.createTextNode(num));
|
|
2284
2250
|
anchor.setAttribute('href', obj.uri);
|
|
2285
|
-
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));
|
|
2286
2252
|
rep.appendChild(anchor);
|
|
2287
2253
|
anchor.firstChild.setAttribute('class', 'phoneIcon');
|
|
2288
2254
|
} else {
|