solid-panes 3.5.27 → 3.5.28-59efa615
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 -2
- 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 +15 -9
- package/lib/RDFXMLPane.js.map +1 -1
- package/lib/argument/argumentPane.js +12 -11
- package/lib/argument/argumentPane.js.map +1 -1
- package/lib/attach/attachPane.js +58 -90
- package/lib/attach/attachPane.js.map +1 -1
- package/lib/audio/audioPane.js +19 -37
- package/lib/audio/audioPane.js.map +1 -1
- package/lib/classInstancePane.js +21 -22
- 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 -154
- 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 +2 -18
- package/lib/dashboard/dashboardPane.js.map +1 -1
- package/lib/dashboard/homepage.d.ts +0 -0
- package/lib/dashboard/homepage.d.ts.map +0 -0
- package/lib/dashboard/homepage.js +27 -49
- package/lib/dashboard/homepage.js.map +1 -1
- package/lib/dataContentPane.js +26 -61
- package/lib/dataContentPane.js.map +1 -1
- package/lib/defaultPane.js +23 -23
- package/lib/defaultPane.js.map +1 -1
- package/lib/dokieli/dokieliPane.js +29 -34
- 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 +34 -45
- 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 +0 -0
- package/lib/home/homePane.js +49 -67
- package/lib/home/homePane.js.map +1 -1
- package/lib/humanReadablePane.js +14 -28
- package/lib/humanReadablePane.js.map +1 -1
- package/lib/imagePane.js +19 -14
- 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 +6 -20
- 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 +10 -41
- package/lib/internal/internalPane.js.map +1 -1
- package/lib/mainPage/footer.d.ts +0 -0
- package/lib/mainPage/footer.d.ts.map +0 -0
- package/lib/mainPage/footer.js +0 -4
- package/lib/mainPage/footer.js.map +1 -1
- package/lib/mainPage/header.d.ts +0 -0
- package/lib/mainPage/header.d.ts.map +0 -0
- package/lib/mainPage/header.js +66 -100
- 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 -30
- package/lib/mainPage/index.js.map +1 -1
- package/lib/microblogPane/microblogPane.js +182 -321
- package/lib/microblogPane/microblogPane.js.map +1 -1
- package/lib/n3Pane.js +12 -8
- 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 -2
- package/lib/outline/context.js.map +1 -1
- package/lib/outline/licenseOptions.js +21 -35
- package/lib/outline/licenseOptions.js.map +1 -1
- package/lib/outline/manager.js +740 -1176
- package/lib/outline/manager.js.map +1 -1
- package/lib/outline/manager.test.js +16 -25
- package/lib/outline/manager.test.js.map +1 -1
- package/lib/outline/outlineIcons.js +39 -26
- 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 -15
- package/lib/outline/propertyViews.js.map +1 -1
- package/lib/outline/propertyViews.test.js +7 -7
- package/lib/outline/propertyViews.test.js.map +1 -1
- package/lib/outline/queryByExample.js +28 -80
- package/lib/outline/queryByExample.js.map +1 -1
- package/lib/outline/userInput.js +221 -459
- 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 -6
- package/lib/outline/viewAsImage.js.map +1 -1
- package/lib/outline/viewAsMbox.d.ts +0 -0
- package/lib/outline/viewAsMbox.d.ts.map +0 -0
- package/lib/outline/viewAsMbox.js +3 -4
- package/lib/outline/viewAsMbox.js.map +1 -1
- package/lib/pad/padPane.d.ts +0 -0
- package/lib/pad/padPane.d.ts.map +0 -0
- package/lib/pad/padPane.js +45 -93
- package/lib/pad/padPane.js.map +1 -1
- package/lib/playlist/playlistPane.js +11 -21
- 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 +22 -23
- 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 -3
- package/lib/profile/profile.dom.js.map +1 -1
- package/lib/registerPanes.js +99 -54
- 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 +71 -126
- 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 +2 -10
- package/lib/sharing/sharingPane.js.map +1 -1
- package/lib/slideshow/slideshowPane.js +21 -21
- package/lib/slideshow/slideshowPane.js.map +1 -1
- package/lib/socialPane.js +58 -135
- 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 -48
- package/lib/tabbed/tabbedPane.js.map +1 -1
- package/lib/tableViewPane.js +15 -9
- package/lib/tableViewPane.js.map +1 -1
- package/lib/test-import-export/common.js +8 -3
- package/lib/test-import-export/common.js.map +1 -1
- package/lib/test-import-export/edit-importer.js +10 -14
- 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 +38 -91
- package/lib/transaction/pane.js.map +1 -1
- package/lib/transaction/period.js +27 -71
- package/lib/transaction/period.js.map +1 -1
- package/lib/trip/tripPane.js +38 -35
- 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 +12 -35
- package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.test.js +6 -8
- 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 -11
- package/lib/trustedApplications/trustedApplications.utils.js.map +1 -1
- 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 -61
- 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 +30 -29
- 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 +14 -14
- package/lib/versionInfo.js.map +1 -1
- package/lib/video/videoPane.js +11 -7
- package/lib/video/videoPane.js.map +1 -1
- package/package.json +26 -26
- 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 +0 -0
- 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 +14 -14
- 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 +0 -0
package/lib/mainPage/header.js
CHANGED
|
@@ -4,28 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.createHeader = createHeader;
|
|
7
|
-
|
|
8
7
|
var _solidLogic = require("solid-logic");
|
|
9
|
-
|
|
10
8
|
var _solidUi = require("solid-ui");
|
|
11
|
-
|
|
12
9
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
13
|
-
|
|
14
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
15
|
-
|
|
10
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var 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; }
|
|
16
11
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17
|
-
|
|
18
12
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
19
|
-
|
|
20
13
|
/**
|
|
21
14
|
* menu icons
|
|
22
15
|
*/
|
|
23
16
|
var HELP_MENU_ICON = _solidUi.icons.iconBase + 'noun_help.svg';
|
|
24
17
|
var SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg';
|
|
18
|
+
|
|
25
19
|
/**
|
|
26
20
|
* menu elements
|
|
27
21
|
*/
|
|
28
|
-
|
|
29
22
|
var USER_GUIDE_MENU_ITEM = 'User guide';
|
|
30
23
|
var REPORT_A_PROBLEM_MENU_ITEM = 'Report a problem';
|
|
31
24
|
var SHOW_YOUR_PROFILE_MENU_ITEM = 'Show your profile';
|
|
@@ -33,40 +26,32 @@ var LOG_OUT_MENU_ITEM = 'Log out';
|
|
|
33
26
|
/**
|
|
34
27
|
* URLS
|
|
35
28
|
*/
|
|
36
|
-
|
|
37
29
|
var USER_GUIDE_MENU_URL = 'https://solidos.github.io/userguide/';
|
|
38
30
|
var REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solidos/solidos/issues';
|
|
39
|
-
|
|
40
31
|
function createHeader(_x, _x2) {
|
|
41
32
|
return _createHeader.apply(this, arguments);
|
|
42
33
|
}
|
|
43
|
-
|
|
44
34
|
function _createHeader() {
|
|
45
35
|
_createHeader = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(store, outliner) {
|
|
46
36
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
47
|
-
while (1) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
case 7:
|
|
61
|
-
case "end":
|
|
62
|
-
return _context.stop();
|
|
63
|
-
}
|
|
37
|
+
while (1) switch (_context.prev = _context.next) {
|
|
38
|
+
case 0:
|
|
39
|
+
_context.t0 = _solidUi.initHeader;
|
|
40
|
+
_context.t1 = store;
|
|
41
|
+
_context.next = 4;
|
|
42
|
+
return setUserMenu(outliner);
|
|
43
|
+
case 4:
|
|
44
|
+
_context.t2 = _context.sent;
|
|
45
|
+
_context.t3 = setHeaderOptions();
|
|
46
|
+
(0, _context.t0)(_context.t1, _context.t2, _context.t3);
|
|
47
|
+
case 7:
|
|
48
|
+
case "end":
|
|
49
|
+
return _context.stop();
|
|
64
50
|
}
|
|
65
51
|
}, _callee);
|
|
66
52
|
}));
|
|
67
53
|
return _createHeader.apply(this, arguments);
|
|
68
54
|
}
|
|
69
|
-
|
|
70
55
|
function setHeaderOptions() {
|
|
71
56
|
var helpMenuList = [{
|
|
72
57
|
label: USER_GUIDE_MENU_ITEM,
|
|
@@ -84,110 +69,91 @@ function setHeaderOptions() {
|
|
|
84
69
|
};
|
|
85
70
|
return headerOptions;
|
|
86
71
|
}
|
|
87
|
-
|
|
88
72
|
function setUserMenu(_x3) {
|
|
89
73
|
return _setUserMenu.apply(this, arguments);
|
|
90
74
|
}
|
|
91
|
-
|
|
92
75
|
function _setUserMenu() {
|
|
93
76
|
_setUserMenu = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(outliner) {
|
|
94
77
|
var showProfile, logOut, userMenuList;
|
|
95
78
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
96
|
-
while (1) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
case 10:
|
|
124
|
-
case "end":
|
|
125
|
-
return _context2.stop();
|
|
126
|
-
}
|
|
79
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
80
|
+
case 0:
|
|
81
|
+
showProfile = {
|
|
82
|
+
label: SHOW_YOUR_PROFILE_MENU_ITEM,
|
|
83
|
+
onclick: function onclick() {
|
|
84
|
+
return openUserProfile(outliner);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
logOut = {
|
|
88
|
+
label: LOG_OUT_MENU_ITEM,
|
|
89
|
+
onclick: function onclick() {
|
|
90
|
+
_solidLogic.authSession.logout();
|
|
91
|
+
}
|
|
92
|
+
}; // the order of the menu is important here, show profile first and logout last
|
|
93
|
+
userMenuList = [showProfile];
|
|
94
|
+
_context2.t0 = userMenuList;
|
|
95
|
+
_context2.next = 6;
|
|
96
|
+
return getMenuItems(outliner);
|
|
97
|
+
case 6:
|
|
98
|
+
_context2.t1 = _context2.sent;
|
|
99
|
+
userMenuList = _context2.t0.concat.call(_context2.t0, _context2.t1);
|
|
100
|
+
userMenuList.push(logOut);
|
|
101
|
+
return _context2.abrupt("return", userMenuList);
|
|
102
|
+
case 10:
|
|
103
|
+
case "end":
|
|
104
|
+
return _context2.stop();
|
|
127
105
|
}
|
|
128
106
|
}, _callee2);
|
|
129
107
|
}));
|
|
130
108
|
return _setUserMenu.apply(this, arguments);
|
|
131
109
|
}
|
|
132
|
-
|
|
133
110
|
function openUserProfile(outliner) {
|
|
134
111
|
outliner.GotoSubject(_solidLogic.authn.currentUser(), true, undefined, true, undefined);
|
|
135
112
|
location.reload();
|
|
136
113
|
}
|
|
137
|
-
|
|
138
114
|
function getMenuItems(_x4) {
|
|
139
115
|
return _getMenuItems.apply(this, arguments);
|
|
140
116
|
}
|
|
141
|
-
|
|
142
117
|
function _getMenuItems() {
|
|
143
118
|
_getMenuItems = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(outliner) {
|
|
144
119
|
var items;
|
|
145
120
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
146
|
-
while (1) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
case 4:
|
|
164
|
-
case "end":
|
|
165
|
-
return _context3.stop();
|
|
166
|
-
}
|
|
121
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
122
|
+
case 0:
|
|
123
|
+
_context3.next = 2;
|
|
124
|
+
return outliner.getDashboardItems();
|
|
125
|
+
case 2:
|
|
126
|
+
items = _context3.sent;
|
|
127
|
+
return _context3.abrupt("return", items.map(function (element) {
|
|
128
|
+
return {
|
|
129
|
+
label: element.label,
|
|
130
|
+
onclick: function onclick() {
|
|
131
|
+
return openDashboardPane(outliner, element.tabName || element.paneName);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}));
|
|
135
|
+
case 4:
|
|
136
|
+
case "end":
|
|
137
|
+
return _context3.stop();
|
|
167
138
|
}
|
|
168
139
|
}, _callee3);
|
|
169
140
|
}));
|
|
170
141
|
return _getMenuItems.apply(this, arguments);
|
|
171
142
|
}
|
|
172
|
-
|
|
173
143
|
function openDashboardPane(_x5, _x6) {
|
|
174
144
|
return _openDashboardPane.apply(this, arguments);
|
|
175
145
|
}
|
|
176
|
-
|
|
177
146
|
function _openDashboardPane() {
|
|
178
147
|
_openDashboardPane = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(outliner, pane) {
|
|
179
148
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
180
|
-
while (1) {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
case "end":
|
|
189
|
-
return _context4.stop();
|
|
190
|
-
}
|
|
149
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
150
|
+
case 0:
|
|
151
|
+
outliner.showDashboard({
|
|
152
|
+
pane: pane
|
|
153
|
+
});
|
|
154
|
+
case 1:
|
|
155
|
+
case "end":
|
|
156
|
+
return _context4.stop();
|
|
191
157
|
}
|
|
192
158
|
}, _callee4);
|
|
193
159
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","names":["HELP_MENU_ICON","icons","iconBase","SOLID_ICON_URL","USER_GUIDE_MENU_ITEM","REPORT_A_PROBLEM_MENU_ITEM","SHOW_YOUR_PROFILE_MENU_ITEM","LOG_OUT_MENU_ITEM","USER_GUIDE_MENU_URL","REPORT_A_PROBLEM_MENU_URL","createHeader","store","outliner","initHeader","setUserMenu","setHeaderOptions","helpMenuList","label","url","target","headerOptions","logo","helpIcon","showProfile","onclick","openUserProfile","logOut","authSession","logout","userMenuList","getMenuItems","concat","push","GotoSubject","authn","currentUser","undefined","location","reload","getDashboardItems","items","map","element","openDashboardPane","tabName","paneName","pane","showDashboard"],"sources":["../../src/mainPage/header.ts"],"sourcesContent":["import { authSession, authn } from 'solid-logic'\nimport { icons, initHeader } from 'solid-ui'\n/**\n * menu icons\n*/\nconst HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\n/**\n * menu elements\n*/\nconst USER_GUIDE_MENU_ITEM = 'User guide'\nconst REPORT_A_PROBLEM_MENU_ITEM = 'Report a problem'\nconst SHOW_YOUR_PROFILE_MENU_ITEM = 'Show your profile'\nconst LOG_OUT_MENU_ITEM = 'Log out'\n/**\n * URLS\n */\nconst USER_GUIDE_MENU_URL = 'https://solidos.github.io/userguide/'\nconst REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solidos/solidos/issues'\n\nexport async function createHeader (store, outliner) {\n initHeader(store, await setUserMenu(outliner), setHeaderOptions())\n}\n\nfunction setHeaderOptions () {\n const helpMenuList = [\n { label: USER_GUIDE_MENU_ITEM, url: USER_GUIDE_MENU_URL, target: '_blank' },\n { label: REPORT_A_PROBLEM_MENU_ITEM, url: REPORT_A_PROBLEM_MENU_URL, target: '_blank' }\n ]\n const headerOptions = { logo: SOLID_ICON_URL, helpIcon: HELP_MENU_ICON, helpMenuList: helpMenuList }\n\n return headerOptions\n}\n\nasync function setUserMenu (outliner: any) {\n const showProfile = {\n label: SHOW_YOUR_PROFILE_MENU_ITEM,\n onclick: () => openUserProfile(outliner)\n }\n\n const logOut = {\n label: LOG_OUT_MENU_ITEM,\n onclick: () => {\n authSession.logout()\n }\n }\n\n // the order of the menu is important here, show profile first and logout last\n let userMenuList = [showProfile]\n userMenuList = userMenuList.concat(await getMenuItems(outliner))\n userMenuList.push(logOut)\n\n return userMenuList\n}\n\nfunction openUserProfile (outliner: any) {\n outliner.GotoSubject(authn.currentUser(), true, undefined, true, undefined)\n location.reload()\n}\n\nasync function getMenuItems (outliner: any) {\n const items = await outliner.getDashboardItems()\n return items.map((element) => {\n return {\n label: element.label,\n onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)\n }\n })\n}\n\nasync function openDashboardPane (outliner: any, pane: string): Promise<void> {\n outliner.showDashboard({\n pane\n })\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"header.js","names":["HELP_MENU_ICON","icons","iconBase","SOLID_ICON_URL","USER_GUIDE_MENU_ITEM","REPORT_A_PROBLEM_MENU_ITEM","SHOW_YOUR_PROFILE_MENU_ITEM","LOG_OUT_MENU_ITEM","USER_GUIDE_MENU_URL","REPORT_A_PROBLEM_MENU_URL","createHeader","store","outliner","initHeader","setUserMenu","setHeaderOptions","helpMenuList","label","url","target","headerOptions","logo","helpIcon","showProfile","onclick","openUserProfile","logOut","authSession","logout","userMenuList","getMenuItems","concat","push","GotoSubject","authn","currentUser","undefined","location","reload","getDashboardItems","items","map","element","openDashboardPane","tabName","paneName","pane","showDashboard"],"sources":["../../src/mainPage/header.ts"],"sourcesContent":["import { authSession, authn } from 'solid-logic'\nimport { icons, initHeader } from 'solid-ui'\n/**\n * menu icons\n*/\nconst HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\n/**\n * menu elements\n*/\nconst USER_GUIDE_MENU_ITEM = 'User guide'\nconst REPORT_A_PROBLEM_MENU_ITEM = 'Report a problem'\nconst SHOW_YOUR_PROFILE_MENU_ITEM = 'Show your profile'\nconst LOG_OUT_MENU_ITEM = 'Log out'\n/**\n * URLS\n */\nconst USER_GUIDE_MENU_URL = 'https://solidos.github.io/userguide/'\nconst REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solidos/solidos/issues'\n\nexport async function createHeader (store, outliner) {\n initHeader(store, await setUserMenu(outliner), setHeaderOptions())\n}\n\nfunction setHeaderOptions () {\n const helpMenuList = [\n { label: USER_GUIDE_MENU_ITEM, url: USER_GUIDE_MENU_URL, target: '_blank' },\n { label: REPORT_A_PROBLEM_MENU_ITEM, url: REPORT_A_PROBLEM_MENU_URL, target: '_blank' }\n ]\n const headerOptions = { logo: SOLID_ICON_URL, helpIcon: HELP_MENU_ICON, helpMenuList: helpMenuList }\n\n return headerOptions\n}\n\nasync function setUserMenu (outliner: any) {\n const showProfile = {\n label: SHOW_YOUR_PROFILE_MENU_ITEM,\n onclick: () => openUserProfile(outliner)\n }\n\n const logOut = {\n label: LOG_OUT_MENU_ITEM,\n onclick: () => {\n authSession.logout()\n }\n }\n\n // the order of the menu is important here, show profile first and logout last\n let userMenuList = [showProfile]\n userMenuList = userMenuList.concat(await getMenuItems(outliner))\n userMenuList.push(logOut)\n\n return userMenuList\n}\n\nfunction openUserProfile (outliner: any) {\n outliner.GotoSubject(authn.currentUser(), true, undefined, true, undefined)\n location.reload()\n}\n\nasync function getMenuItems (outliner: any) {\n const items = await outliner.getDashboardItems()\n return items.map((element) => {\n return {\n label: element.label,\n onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)\n }\n })\n}\n\nasync function openDashboardPane (outliner: any, pane: string): Promise<void> {\n outliner.showDashboard({\n pane\n })\n}\n"],"mappings":";;;;;;AAAA;AACA;AAA4C;AAAA,+CAA5C;AAAA;AAAA;AACA;AACA;AACA;AACA,IAAMA,cAAc,GAAGC,cAAK,CAACC,QAAQ,GAAG,eAAe;AACvD,IAAMC,cAAc,GAAG,sDAAsD;;AAE7E;AACA;AACA;AACA,IAAMC,oBAAoB,GAAG,YAAY;AACzC,IAAMC,0BAA0B,GAAG,kBAAkB;AACrD,IAAMC,2BAA2B,GAAG,mBAAmB;AACvD,IAAMC,iBAAiB,GAAG,SAAS;AACnC;AACA;AACA;AACA,IAAMC,mBAAmB,GAAG,sCAAsC;AAClE,IAAMC,yBAAyB,GAAG,2CAA2C;AAAA,SAEvDC,YAAY;EAAA;AAAA;AAAA;EAAA,2EAA3B,iBAA6BC,KAAK,EAAEC,QAAQ;IAAA;MAAA;QAAA;UAAA,cACjDC,mBAAU;UAAA,cAACF,KAAK;UAAA;UAAA,OAAQG,WAAW,CAACF,QAAQ,CAAC;QAAA;UAAA;UAAA,cAAEG,gBAAgB,EAAE;UAAA;QAAA;QAAA;UAAA;MAAA;IAAA;EAAA,CAClE;EAAA;AAAA;AAED,SAASA,gBAAgB,GAAI;EAC3B,IAAMC,YAAY,GAAG,CACnB;IAAEC,KAAK,EAAEb,oBAAoB;IAAEc,GAAG,EAAEV,mBAAmB;IAAEW,MAAM,EAAE;EAAS,CAAC,EAC3E;IAAEF,KAAK,EAAEZ,0BAA0B;IAAEa,GAAG,EAAET,yBAAyB;IAAEU,MAAM,EAAE;EAAS,CAAC,CACxF;EACD,IAAMC,aAAa,GAAG;IAAEC,IAAI,EAAElB,cAAc;IAAEmB,QAAQ,EAAEtB,cAAc;IAAEgB,YAAY,EAAEA;EAAa,CAAC;EAEpG,OAAOI,aAAa;AACtB;AAAC,SAEcN,WAAW;EAAA;AAAA;AAAA;EAAA,0EAA1B,kBAA4BF,QAAa;IAAA;IAAA;MAAA;QAAA;UACjCW,WAAW,GAAG;YAClBN,KAAK,EAAEX,2BAA2B;YAClCkB,OAAO,EAAE;cAAA,OAAMC,eAAe,CAACb,QAAQ,CAAC;YAAA;UAC1C,CAAC;UAEKc,MAAM,GAAG;YACbT,KAAK,EAAEV,iBAAiB;YACxBiB,OAAO,EAAE,mBAAM;cACbG,uBAAW,CAACC,MAAM,EAAE;YACtB;UACF,CAAC,EAED;UACIC,YAAY,GAAG,CAACN,WAAW,CAAC;UAAA,eACjBM,YAAY;UAAA;UAAA,OAAcC,YAAY,CAAClB,QAAQ,CAAC;QAAA;UAAA;UAA/DiB,YAAY,gBAAgBE,MAAM;UAClCF,YAAY,CAACG,IAAI,CAACN,MAAM,CAAC;UAAA,kCAElBG,YAAY;QAAA;QAAA;UAAA;MAAA;IAAA;EAAA,CACpB;EAAA;AAAA;AAED,SAASJ,eAAe,CAAEb,QAAa,EAAE;EACvCA,QAAQ,CAACqB,WAAW,CAACC,iBAAK,CAACC,WAAW,EAAE,EAAE,IAAI,EAAEC,SAAS,EAAE,IAAI,EAAEA,SAAS,CAAC;EAC3EC,QAAQ,CAACC,MAAM,EAAE;AACnB;AAAC,SAEcR,YAAY;EAAA;AAAA;AAAA;EAAA,2EAA3B,kBAA6BlB,QAAa;IAAA;IAAA;MAAA;QAAA;UAAA;UAAA,OACpBA,QAAQ,CAAC2B,iBAAiB,EAAE;QAAA;UAA1CC,KAAK;UAAA,kCACJA,KAAK,CAACC,GAAG,CAAC,UAACC,OAAO,EAAK;YAC5B,OAAO;cACLzB,KAAK,EAAEyB,OAAO,CAACzB,KAAK;cACpBO,OAAO,EAAE;gBAAA,OAAMmB,iBAAiB,CAAC/B,QAAQ,EAAE8B,OAAO,CAACE,OAAO,IAAIF,OAAO,CAACG,QAAQ,CAAC;cAAA;YACjF,CAAC;UACH,CAAC,CAAC;QAAA;QAAA;UAAA;MAAA;IAAA;EAAA,CACH;EAAA;AAAA;AAAA,SAEcF,iBAAiB;EAAA;AAAA;AAAA;EAAA,gFAAhC,kBAAkC/B,QAAa,EAAEkC,IAAY;IAAA;MAAA;QAAA;UAC3DlC,QAAQ,CAACmC,aAAa,CAAC;YACrBD,IAAI,EAAJA;UACF,CAAC,CAAC;QAAA;QAAA;UAAA;MAAA;IAAA;EAAA,CACH;EAAA;AAAA"}
|
package/lib/mainPage/index.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/mainPage/index.js
CHANGED
|
@@ -4,49 +4,36 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = initMainPage;
|
|
7
|
-
|
|
8
7
|
var _index = require("../index");
|
|
9
|
-
|
|
10
8
|
var _header = require("./header");
|
|
11
|
-
|
|
12
9
|
var _footer = require("./footer");
|
|
13
|
-
|
|
14
10
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
15
|
-
|
|
16
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
17
|
-
|
|
11
|
+
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; }
|
|
18
12
|
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); } }
|
|
19
|
-
|
|
20
13
|
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); }); }; }
|
|
21
|
-
|
|
22
14
|
function initMainPage(_x, _x2) {
|
|
23
15
|
return _initMainPage.apply(this, arguments);
|
|
24
16
|
}
|
|
25
|
-
|
|
26
17
|
function _initMainPage() {
|
|
27
18
|
_initMainPage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(store, uri) {
|
|
28
19
|
var outliner, subject, header, footer;
|
|
29
20
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
30
|
-
while (1) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
case 10:
|
|
47
|
-
case "end":
|
|
48
|
-
return _context.stop();
|
|
49
|
-
}
|
|
21
|
+
while (1) switch (_context.prev = _context.next) {
|
|
22
|
+
case 0:
|
|
23
|
+
outliner = (0, _index.getOutliner)(document);
|
|
24
|
+
uri = uri || window.location.href;
|
|
25
|
+
subject = uri;
|
|
26
|
+
if (typeof uri === 'string') subject = store.sym(uri);
|
|
27
|
+
outliner.GotoSubject(subject, true, undefined, true, undefined);
|
|
28
|
+
_context.next = 7;
|
|
29
|
+
return (0, _header.createHeader)(store, outliner);
|
|
30
|
+
case 7:
|
|
31
|
+
header = _context.sent;
|
|
32
|
+
footer = (0, _footer.createFooter)(store);
|
|
33
|
+
return _context.abrupt("return", Promise.all([header, footer]));
|
|
34
|
+
case 10:
|
|
35
|
+
case "end":
|
|
36
|
+
return _context.stop();
|
|
50
37
|
}
|
|
51
38
|
}, _callee);
|
|
52
39
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["initMainPage","store","uri","outliner","getOutliner","document","window","location","href","subject","sym","GotoSubject","undefined","createHeader","header","footer","createFooter","Promise","all"],"sources":["../../src/mainPage/index.ts"],"sourcesContent":["/* Main Page\n **\n ** This code is called in mashlib and renders the header and footer of the Databrowser.\n */\n\nimport { LiveStore, NamedNode } from 'rdflib'\nimport { getOutliner } from '../index'\nimport { createHeader } from './header'\nimport { createFooter } from './footer'\n\nexport default async function initMainPage (store: LiveStore, uri?: string|NamedNode|null) {\n const outliner = getOutliner(document)\n uri = uri || window.location.href\n let subject = uri\n if (typeof uri === 'string') subject = store.sym(uri)\n outliner.GotoSubject(subject, true, undefined, true, undefined)\n const header = await createHeader(store, outliner)\n const footer = createFooter(store)\n return Promise.all([header, footer])\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["initMainPage","store","uri","outliner","getOutliner","document","window","location","href","subject","sym","GotoSubject","undefined","createHeader","header","footer","createFooter","Promise","all"],"sources":["../../src/mainPage/index.ts"],"sourcesContent":["/* Main Page\n **\n ** This code is called in mashlib and renders the header and footer of the Databrowser.\n */\n\nimport { LiveStore, NamedNode } from 'rdflib'\nimport { getOutliner } from '../index'\nimport { createHeader } from './header'\nimport { createFooter } from './footer'\n\nexport default async function initMainPage (store: LiveStore, uri?: string|NamedNode|null) {\n const outliner = getOutliner(document)\n uri = uri || window.location.href\n let subject = uri\n if (typeof uri === 'string') subject = store.sym(uri)\n outliner.GotoSubject(subject, true, undefined, true, undefined)\n const header = await createHeader(store, outliner)\n const footer = createFooter(store)\n return Promise.all([header, footer])\n}\n"],"mappings":";;;;;;AAMA;AACA;AACA;AAAuC;AAAA,+CAPvC;AAAA;AAAA;AAAA,SAS8BA,YAAY;EAAA;AAAA;AAAA;EAAA,2EAA3B,iBAA6BC,KAAgB,EAAEC,GAA2B;IAAA;IAAA;MAAA;QAAA;UACjFC,QAAQ,GAAG,IAAAC,kBAAW,EAACC,QAAQ,CAAC;UACtCH,GAAG,GAAGA,GAAG,IAAII,MAAM,CAACC,QAAQ,CAACC,IAAI;UAC7BC,OAAO,GAAGP,GAAG;UACjB,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAEO,OAAO,GAAGR,KAAK,CAACS,GAAG,CAACR,GAAG,CAAC;UACrDC,QAAQ,CAACQ,WAAW,CAACF,OAAO,EAAE,IAAI,EAAEG,SAAS,EAAE,IAAI,EAAEA,SAAS,CAAC;UAAA;UAAA,OAC1C,IAAAC,oBAAY,EAACZ,KAAK,EAAEE,QAAQ,CAAC;QAAA;UAA5CW,MAAM;UACNC,MAAM,GAAG,IAAAC,oBAAY,EAACf,KAAK,CAAC;UAAA,iCAC3BgB,OAAO,CAACC,GAAG,CAAC,CAACJ,MAAM,EAAEC,MAAM,CAAC,CAAC;QAAA;QAAA;UAAA;MAAA;IAAA;EAAA,CACrC;EAAA;AAAA"}
|