solid-ui 3.0.4-355237d → 3.0.4-37fd944
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/dist/login/login.d.ts.map +1 -1
- package/dist/login/login.js +151 -12
- package/dist/login/login.js.map +1 -1
- package/dist/solid-ui.esm.js +371 -201
- package/dist/solid-ui.esm.js.map +1 -1
- package/dist/solid-ui.esm.min.js +2 -2
- package/dist/solid-ui.esm.min.js.map +1 -1
- package/dist/solid-ui.js +371 -201
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +7 -7
- package/dist/solid-ui.min.js.map +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tabs.js.map +1 -1
- package/dist/versionInfo.js +13 -13
- package/package.json +3 -3
package/dist/solid-ui.js
CHANGED
|
@@ -8264,31 +8264,9 @@ field[src_ns.ui('Classifier').uri] = function (dom, container, already, subject,
|
|
|
8264
8264
|
if (!ok) return callbackFunction(ok, body);
|
|
8265
8265
|
return callbackFunction(ok, body);
|
|
8266
8266
|
};
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
// Render label
|
|
8271
|
-
var labelDiv = dom.createElement('div');
|
|
8272
|
-
labelDiv.setAttribute('class', 'formFieldName classifierBox-label');
|
|
8273
|
-
// Use fieldLabel to render ui:label if present
|
|
8274
|
-
labelDiv.appendChild(fieldLabel(dom, category, form));
|
|
8275
|
-
outerBox.appendChild(labelDiv);
|
|
8276
|
-
// Render select
|
|
8277
|
-
var selectBox = dom.createElement('div');
|
|
8278
|
-
selectBox.setAttribute('class', 'formFieldValue classifierBox-selectBox');
|
|
8279
|
-
var selectElement = makeSelectForNestedCategory(dom, kb, subject, category, dataDoc, checkOptions);
|
|
8280
|
-
// Set readonly if not editable
|
|
8281
|
-
if (selectElement && selectElement.querySelector && selectElement.querySelector('select')) {
|
|
8282
|
-
var select = selectElement.querySelector('select');
|
|
8283
|
-
if (select && !kb.updater.editable(dataDoc.uri)) {
|
|
8284
|
-
select.readOnly = true;
|
|
8285
|
-
select.style = style.textInputStyleUneditable;
|
|
8286
|
-
}
|
|
8287
|
-
}
|
|
8288
|
-
selectBox.appendChild(selectElement);
|
|
8289
|
-
outerBox.appendChild(selectBox);
|
|
8290
|
-
if (container) container.appendChild(outerBox);
|
|
8291
|
-
return outerBox;
|
|
8267
|
+
var box = makeSelectForNestedCategory(dom, kb, subject, category, dataDoc, checkOptions);
|
|
8268
|
+
if (container) container.appendChild(box);
|
|
8269
|
+
return box;
|
|
8292
8270
|
};
|
|
8293
8271
|
|
|
8294
8272
|
/** Choice field
|
|
@@ -9544,13 +9522,150 @@ var _solidLogicSingleton$2 = external_SolidLogic_.solidLogicSingleton.typeIndex,
|
|
|
9544
9522
|
loadAllTypeIndexes = _solidLogicSingleton$2.loadAllTypeIndexes,
|
|
9545
9523
|
getScopedAppsFromIndex = _solidLogicSingleton$2.getScopedAppsFromIndex,
|
|
9546
9524
|
deleteTypeIndexRegistration = _solidLogicSingleton$2.deleteTypeIndexRegistration;
|
|
9547
|
-
|
|
9525
|
+
function formatDynamicError(error, contextLabel) {
|
|
9526
|
+
var e = error;
|
|
9527
|
+
var name = (e === null || e === void 0 ? void 0 : e.name) || 'Error';
|
|
9528
|
+
var status = typeof (e === null || e === void 0 ? void 0 : e.status) === 'number' ? " (HTTP ".concat(e.status, ")") : '';
|
|
9529
|
+
var message = e !== null && e !== void 0 && e.message ? String(e.message) : typeof error === 'string' ? error : 'No additional details provided';
|
|
9530
|
+
return "".concat(contextLabel, ": ").concat(name).concat(status, " - ").concat(message);
|
|
9531
|
+
}
|
|
9532
|
+
function guessPreferencesFileUri(me) {
|
|
9533
|
+
return me.uri.replace('/profile/', '/').replace('/public/', '/').split('/').slice(0, -1).join('/') + '/settings/prefs.ttl';
|
|
9534
|
+
}
|
|
9535
|
+
function getMissingPreferencesFileUri(context, err) {
|
|
9536
|
+
var _response;
|
|
9537
|
+
var responseUrl = err === null || err === void 0 || (_response = err.response) === null || _response === void 0 ? void 0 : _response.url;
|
|
9538
|
+
if (typeof responseUrl === 'string' && responseUrl) {
|
|
9539
|
+
return responseUrl;
|
|
9540
|
+
}
|
|
9541
|
+
if (context.me) {
|
|
9542
|
+
var pointer = login_store.any(context.me, src_ns.space('preferencesFile'), undefined, context.me.doc ? context.me.doc() : undefined);
|
|
9543
|
+
if (pointer !== null && pointer !== void 0 && pointer.uri) {
|
|
9544
|
+
return pointer.uri;
|
|
9545
|
+
}
|
|
9546
|
+
return guessPreferencesFileUri(context.me);
|
|
9547
|
+
}
|
|
9548
|
+
return null;
|
|
9549
|
+
}
|
|
9550
|
+
function ensurePreferencesFileRowInProfile(_x, _x2, _x3) {
|
|
9551
|
+
return _ensurePreferencesFileRowInProfile.apply(this, arguments);
|
|
9552
|
+
}
|
|
9553
|
+
function _ensurePreferencesFileRowInProfile() {
|
|
9554
|
+
_ensurePreferencesFileRowInProfile = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee4(me, prefsNode, profileDoc) {
|
|
9555
|
+
var existingPreferencesFile, deletions, insertions;
|
|
9556
|
+
return regenerator_default().wrap(function (_context4) {
|
|
9557
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
9558
|
+
case 0:
|
|
9559
|
+
existingPreferencesFile = login_store.any(me, src_ns.space('preferencesFile'), undefined, profileDoc);
|
|
9560
|
+
if (!(existingPreferencesFile && existingPreferencesFile.equals(prefsNode))) {
|
|
9561
|
+
_context4.next = 1;
|
|
9562
|
+
break;
|
|
9563
|
+
}
|
|
9564
|
+
return _context4.abrupt("return");
|
|
9565
|
+
case 1:
|
|
9566
|
+
if (login_store.updater) {
|
|
9567
|
+
_context4.next = 2;
|
|
9568
|
+
break;
|
|
9569
|
+
}
|
|
9570
|
+
throw new Error('Cannot create preferences file: store has no updater');
|
|
9571
|
+
case 2:
|
|
9572
|
+
deletions = existingPreferencesFile ? [(0,external_$rdf_.st)(me, src_ns.space('preferencesFile'), existingPreferencesFile, profileDoc)] : [];
|
|
9573
|
+
insertions = [(0,external_$rdf_.st)(me, src_ns.space('preferencesFile'), prefsNode, profileDoc)];
|
|
9574
|
+
_context4.next = 3;
|
|
9575
|
+
return new Promise(function (resolve, reject) {
|
|
9576
|
+
login_store.updater.update(deletions, insertions, function (_uri, ok, body) {
|
|
9577
|
+
if (ok) {
|
|
9578
|
+
resolve();
|
|
9579
|
+
} else {
|
|
9580
|
+
reject(new Error(body || 'Unable to update preferencesFile in WebID profile'));
|
|
9581
|
+
}
|
|
9582
|
+
});
|
|
9583
|
+
});
|
|
9584
|
+
case 3:
|
|
9585
|
+
case "end":
|
|
9586
|
+
return _context4.stop();
|
|
9587
|
+
}
|
|
9588
|
+
}, _callee4);
|
|
9589
|
+
}));
|
|
9590
|
+
return _ensurePreferencesFileRowInProfile.apply(this, arguments);
|
|
9591
|
+
}
|
|
9592
|
+
function buildPreferencesFileTurtle(me) {
|
|
9593
|
+
var mbox = login_store.any(me, src_ns.foaf('mbox'));
|
|
9594
|
+
var mboxLine = mbox ? "\n<".concat(me.uri, "> foaf:mbox <").concat(mbox.value, "> .\n") : '\n';
|
|
9595
|
+
return '@prefix dct: <http://purl.org/dc/terms/>.\n' + '@prefix pim: <http://www.w3.org/ns/pim/space#>.\n' + '@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n' + '@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n\n' + '<>\n' + ' a pim:ConfigurationFile;\n\n' + ' dct:title "Preferences file" .\n' + mboxLine + "<".concat(me.uri, ">\n") + ' solid:publicTypeIndex <publicTypeIndex.ttl> ;\n' + ' solid:privateTypeIndex <privateTypeIndex.ttl> .\n';
|
|
9596
|
+
}
|
|
9597
|
+
function writePreferencesFileDocument(_x4, _x5) {
|
|
9598
|
+
return _writePreferencesFileDocument.apply(this, arguments);
|
|
9599
|
+
}
|
|
9600
|
+
function _writePreferencesFileDocument() {
|
|
9601
|
+
_writePreferencesFileDocument = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee5(uri, data) {
|
|
9602
|
+
return regenerator_default().wrap(function (_context5) {
|
|
9603
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
9604
|
+
case 0:
|
|
9605
|
+
if (login_store.fetcher) {
|
|
9606
|
+
_context5.next = 1;
|
|
9607
|
+
break;
|
|
9608
|
+
}
|
|
9609
|
+
throw new Error('Cannot create preferences file: store has no fetcher');
|
|
9610
|
+
case 1:
|
|
9611
|
+
_context5.next = 2;
|
|
9612
|
+
return login_store.fetcher.webOperation('PUT', uri, {
|
|
9613
|
+
data: data,
|
|
9614
|
+
contentType: 'text/turtle'
|
|
9615
|
+
});
|
|
9616
|
+
case 2:
|
|
9617
|
+
case "end":
|
|
9618
|
+
return _context5.stop();
|
|
9619
|
+
}
|
|
9620
|
+
}, _callee5);
|
|
9621
|
+
}));
|
|
9622
|
+
return _writePreferencesFileDocument.apply(this, arguments);
|
|
9623
|
+
}
|
|
9624
|
+
function createPreferencesFile(_x6, _x7) {
|
|
9625
|
+
return _createPreferencesFile.apply(this, arguments);
|
|
9626
|
+
}
|
|
9548
9627
|
/**
|
|
9549
9628
|
* Resolves with the logged in user's WebID
|
|
9550
9629
|
*
|
|
9551
9630
|
* @param context
|
|
9552
9631
|
*/
|
|
9553
9632
|
// used to be logIn
|
|
9633
|
+
function _createPreferencesFile() {
|
|
9634
|
+
_createPreferencesFile = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee6(context, uri) {
|
|
9635
|
+
var me, profileDoc, prefsNode, prefsTurtle;
|
|
9636
|
+
return regenerator_default().wrap(function (_context6) {
|
|
9637
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
9638
|
+
case 0:
|
|
9639
|
+
me = context.me || external_SolidLogic_.authn.currentUser();
|
|
9640
|
+
if (me) {
|
|
9641
|
+
_context6.next = 1;
|
|
9642
|
+
break;
|
|
9643
|
+
}
|
|
9644
|
+
throw new Error('Cannot create preferences file: no logged-in WebID');
|
|
9645
|
+
case 1:
|
|
9646
|
+
context.me = me;
|
|
9647
|
+
profileDoc = me.doc();
|
|
9648
|
+
prefsNode = login_store.sym(uri);
|
|
9649
|
+
_context6.next = 2;
|
|
9650
|
+
return ensurePreferencesFileRowInProfile(me, prefsNode, profileDoc);
|
|
9651
|
+
case 2:
|
|
9652
|
+
prefsTurtle = buildPreferencesFileTurtle(me);
|
|
9653
|
+
_context6.next = 3;
|
|
9654
|
+
return writePreferencesFileDocument(uri, prefsTurtle);
|
|
9655
|
+
case 3:
|
|
9656
|
+
_context6.next = 4;
|
|
9657
|
+
return loadPreferences(me);
|
|
9658
|
+
case 4:
|
|
9659
|
+
context.preferencesFile = _context6.sent;
|
|
9660
|
+
context.preferencesFileError = undefined;
|
|
9661
|
+
case 5:
|
|
9662
|
+
case "end":
|
|
9663
|
+
return _context6.stop();
|
|
9664
|
+
}
|
|
9665
|
+
}, _callee6);
|
|
9666
|
+
}));
|
|
9667
|
+
return _createPreferencesFile.apply(this, arguments);
|
|
9668
|
+
}
|
|
9554
9669
|
function ensureLoggedIn(context) {
|
|
9555
9670
|
var me = external_SolidLogic_.authn.currentUser();
|
|
9556
9671
|
if (me) {
|
|
@@ -9585,7 +9700,7 @@ function ensureLoggedIn(context) {
|
|
|
9585
9700
|
* @param context
|
|
9586
9701
|
*/
|
|
9587
9702
|
// used to be logInLoadPreferences
|
|
9588
|
-
function ensureLoadedPreferences(
|
|
9703
|
+
function ensureLoadedPreferences(_x8) {
|
|
9589
9704
|
return _ensureLoadedPreferences.apply(this, arguments);
|
|
9590
9705
|
}
|
|
9591
9706
|
|
|
@@ -9598,98 +9713,143 @@ function ensureLoadedPreferences(_x) {
|
|
|
9598
9713
|
*/
|
|
9599
9714
|
// used to be logInLoadProfile
|
|
9600
9715
|
function _ensureLoadedPreferences() {
|
|
9601
|
-
_ensureLoadedPreferences = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function
|
|
9602
|
-
var progressDisplay, preferencesFile, m2, _t4;
|
|
9603
|
-
return regenerator_default().wrap(function (
|
|
9604
|
-
while (1) switch (
|
|
9716
|
+
_ensureLoadedPreferences = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee7(context) {
|
|
9717
|
+
var progressDisplay, preferencesFile, m2, missingPreferencesFileUri, message, _t4, _t5;
|
|
9718
|
+
return regenerator_default().wrap(function (_context7) {
|
|
9719
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
9605
9720
|
case 0:
|
|
9606
9721
|
if (!context.preferencesFile) {
|
|
9607
|
-
|
|
9722
|
+
_context7.next = 1;
|
|
9608
9723
|
break;
|
|
9609
9724
|
}
|
|
9610
|
-
return
|
|
9725
|
+
return _context7.abrupt("return", Promise.resolve(context));
|
|
9611
9726
|
case 1:
|
|
9612
|
-
|
|
9613
|
-
|
|
9727
|
+
_context7.prev = 1;
|
|
9728
|
+
_context7.next = 2;
|
|
9614
9729
|
return ensureLoadedProfile(context);
|
|
9615
9730
|
case 2:
|
|
9616
|
-
context =
|
|
9617
|
-
|
|
9618
|
-
|
|
9731
|
+
context = _context7.sent;
|
|
9732
|
+
if (context.me) {
|
|
9733
|
+
_context7.next = 3;
|
|
9734
|
+
break;
|
|
9735
|
+
}
|
|
9736
|
+
context.preferencesFileError = 'Not logged in, so preferences were not loaded.';
|
|
9737
|
+
src_debug/* log */.Rm('not logged in, no preferences loaded');
|
|
9738
|
+
return _context7.abrupt("return", context);
|
|
9619
9739
|
case 3:
|
|
9620
|
-
|
|
9740
|
+
_context7.next = 4;
|
|
9741
|
+
return loadPreferences(context.me);
|
|
9742
|
+
case 4:
|
|
9743
|
+
preferencesFile = _context7.sent;
|
|
9621
9744
|
if (progressDisplay) {
|
|
9622
9745
|
progressDisplay.parentNode.removeChild(progressDisplay);
|
|
9623
9746
|
}
|
|
9624
9747
|
context.preferencesFile = preferencesFile;
|
|
9625
|
-
|
|
9748
|
+
_context7.next = 17;
|
|
9626
9749
|
break;
|
|
9627
|
-
case
|
|
9628
|
-
|
|
9629
|
-
_t4 =
|
|
9750
|
+
case 5:
|
|
9751
|
+
_context7.prev = 5;
|
|
9752
|
+
_t4 = _context7["catch"](1);
|
|
9630
9753
|
if (!(_t4 instanceof external_SolidLogic_.UnauthorizedError)) {
|
|
9631
|
-
|
|
9754
|
+
_context7.next = 6;
|
|
9632
9755
|
break;
|
|
9633
9756
|
}
|
|
9634
9757
|
m2 = 'Oops — you are not authenticated (properly logged in), so SolidOS cannot read your preferences file. Try logging out and then logging back in.';
|
|
9758
|
+
context.preferencesFileError = m2;
|
|
9635
9759
|
log_alert(m2);
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
case 5:
|
|
9760
|
+
return _context7.abrupt("return", context);
|
|
9761
|
+
case 6:
|
|
9639
9762
|
if (!(_t4 instanceof external_SolidLogic_.CrossOriginForbiddenError)) {
|
|
9640
|
-
|
|
9763
|
+
_context7.next = 7;
|
|
9641
9764
|
break;
|
|
9642
9765
|
}
|
|
9643
|
-
m2 = "
|
|
9766
|
+
m2 = "Blocked by origin: preference file request from ".concat(window.location.origin, " was forbidden. Ensure this app origin is trusted/allowed for your preferences file.");
|
|
9644
9767
|
context.preferencesFileError = m2;
|
|
9645
|
-
return
|
|
9646
|
-
case
|
|
9768
|
+
return _context7.abrupt("return", context);
|
|
9769
|
+
case 7:
|
|
9647
9770
|
if (!(_t4 instanceof external_SolidLogic_.SameOriginForbiddenError)) {
|
|
9648
|
-
|
|
9771
|
+
_context7.next = 8;
|
|
9649
9772
|
break;
|
|
9650
9773
|
}
|
|
9651
|
-
m2 = 'You are not authorized to read your preference file
|
|
9774
|
+
m2 = 'You are not authorized to read your preference file from this app context.';
|
|
9775
|
+
context.preferencesFileError = m2;
|
|
9652
9776
|
src_debug/* warn */.R8(m2);
|
|
9653
|
-
return
|
|
9654
|
-
case
|
|
9777
|
+
return _context7.abrupt("return", context);
|
|
9778
|
+
case 8:
|
|
9655
9779
|
if (!(_t4 instanceof external_SolidLogic_.NotEditableError)) {
|
|
9656
|
-
|
|
9780
|
+
_context7.next = 9;
|
|
9657
9781
|
break;
|
|
9658
9782
|
}
|
|
9659
|
-
m2 = 'You are not authorized to edit your preference file
|
|
9783
|
+
m2 = 'You are not authorized to edit your preference file from this app context.';
|
|
9784
|
+
context.preferencesFileError = m2;
|
|
9660
9785
|
src_debug/* warn */.R8(m2);
|
|
9661
|
-
return
|
|
9662
|
-
case
|
|
9786
|
+
return _context7.abrupt("return", context);
|
|
9787
|
+
case 9:
|
|
9663
9788
|
if (!(_t4 instanceof external_SolidLogic_.WebOperationError)) {
|
|
9664
|
-
|
|
9789
|
+
_context7.next = 10;
|
|
9665
9790
|
break;
|
|
9666
9791
|
}
|
|
9667
|
-
m2 = '
|
|
9792
|
+
m2 = formatDynamicError(_t4, 'Preference file web operation failed');
|
|
9793
|
+
context.preferencesFileError = m2;
|
|
9668
9794
|
src_debug/* warn */.R8(m2);
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
case 9:
|
|
9795
|
+
return _context7.abrupt("return", context);
|
|
9796
|
+
case 10:
|
|
9672
9797
|
if (!(_t4 instanceof external_SolidLogic_.FetchError)) {
|
|
9673
|
-
|
|
9798
|
+
_context7.next = 16;
|
|
9674
9799
|
break;
|
|
9675
9800
|
}
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9680
|
-
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9801
|
+
if (!(_t4.status === 404)) {
|
|
9802
|
+
_context7.next = 15;
|
|
9803
|
+
break;
|
|
9804
|
+
}
|
|
9805
|
+
m2 = 'Your preferences file was not found (404). It may not exist yet.';
|
|
9806
|
+
src_debug/* warn */.R8(m2);
|
|
9807
|
+
missingPreferencesFileUri = getMissingPreferencesFileUri(context, _t4);
|
|
9808
|
+
if (!missingPreferencesFileUri) {
|
|
9809
|
+
_context7.next = 14;
|
|
9810
|
+
break;
|
|
9811
|
+
}
|
|
9812
|
+
_context7.prev = 11;
|
|
9813
|
+
_context7.next = 12;
|
|
9814
|
+
return createPreferencesFile(context, missingPreferencesFileUri);
|
|
9684
9815
|
case 12:
|
|
9816
|
+
src_debug/* log */.Rm("Preferences file created automatically: ".concat(missingPreferencesFileUri));
|
|
9817
|
+
return _context7.abrupt("return", context);
|
|
9818
|
+
case 13:
|
|
9819
|
+
_context7.prev = 13;
|
|
9820
|
+
_t5 = _context7["catch"](11);
|
|
9821
|
+
message = formatDynamicError(_t5, 'Failed to create preferences file automatically');
|
|
9822
|
+
context.preferencesFileError = message;
|
|
9823
|
+
src_debug/* error */.z3(message);
|
|
9824
|
+
if (context.div && context.dom) {
|
|
9825
|
+
context.div.appendChild(errorMessageBlock(context.dom, message));
|
|
9826
|
+
}
|
|
9827
|
+
return _context7.abrupt("return", context);
|
|
9828
|
+
case 14:
|
|
9829
|
+
context.preferencesFileError = m2;
|
|
9830
|
+
return _context7.abrupt("return", context);
|
|
9831
|
+
case 15:
|
|
9832
|
+
m2 = formatDynamicError(_t4, 'Error reading your preferences file');
|
|
9833
|
+
context.preferencesFileError = m2;
|
|
9834
|
+
src_debug/* warn */.R8(m2);
|
|
9835
|
+
log_alert(m2);
|
|
9836
|
+
return _context7.abrupt("return", context);
|
|
9837
|
+
case 16:
|
|
9838
|
+
m2 = formatDynamicError(_t4, 'Unexpected error while loading preferences');
|
|
9839
|
+
context.preferencesFileError = m2;
|
|
9840
|
+
src_debug/* error */.z3(m2);
|
|
9841
|
+
return _context7.abrupt("return", context);
|
|
9842
|
+
case 17:
|
|
9843
|
+
return _context7.abrupt("return", context);
|
|
9844
|
+
case 18:
|
|
9685
9845
|
case "end":
|
|
9686
|
-
return
|
|
9846
|
+
return _context7.stop();
|
|
9687
9847
|
}
|
|
9688
|
-
},
|
|
9848
|
+
}, _callee7, null, [[1, 5], [11, 13]]);
|
|
9689
9849
|
}));
|
|
9690
9850
|
return _ensureLoadedPreferences.apply(this, arguments);
|
|
9691
9851
|
}
|
|
9692
|
-
function ensureLoadedProfile(
|
|
9852
|
+
function ensureLoadedProfile(_x9) {
|
|
9693
9853
|
return _ensureLoadedProfile.apply(this, arguments);
|
|
9694
9854
|
}
|
|
9695
9855
|
|
|
@@ -9699,74 +9859,77 @@ function ensureLoadedProfile(_x2) {
|
|
|
9699
9859
|
* leaving the `isPublic` param undefined will bring in community index things, too
|
|
9700
9860
|
*/
|
|
9701
9861
|
function _ensureLoadedProfile() {
|
|
9702
|
-
_ensureLoadedProfile = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function
|
|
9703
|
-
var logInContext,
|
|
9704
|
-
return regenerator_default().wrap(function (
|
|
9705
|
-
while (1) switch (
|
|
9862
|
+
_ensureLoadedProfile = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee8(context) {
|
|
9863
|
+
var logInContext, message, _message, _t6;
|
|
9864
|
+
return regenerator_default().wrap(function (_context8) {
|
|
9865
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
9706
9866
|
case 0:
|
|
9707
9867
|
if (!context.publicProfile) {
|
|
9708
|
-
|
|
9868
|
+
_context8.next = 1;
|
|
9709
9869
|
break;
|
|
9710
9870
|
}
|
|
9711
|
-
return
|
|
9871
|
+
return _context8.abrupt("return", context);
|
|
9712
9872
|
case 1:
|
|
9713
|
-
|
|
9714
|
-
|
|
9873
|
+
_context8.prev = 1;
|
|
9874
|
+
_context8.next = 2;
|
|
9715
9875
|
return ensureLoggedIn(context);
|
|
9716
9876
|
case 2:
|
|
9717
|
-
logInContext =
|
|
9877
|
+
logInContext = _context8.sent;
|
|
9718
9878
|
if (logInContext.me) {
|
|
9719
|
-
|
|
9879
|
+
_context8.next = 3;
|
|
9720
9880
|
break;
|
|
9721
9881
|
}
|
|
9722
|
-
|
|
9882
|
+
message = 'Could not log in; skipping profile load.';
|
|
9883
|
+
src_debug/* log */.Rm(message);
|
|
9884
|
+
throw new Error(message);
|
|
9723
9885
|
case 3:
|
|
9724
|
-
|
|
9886
|
+
_context8.next = 4;
|
|
9725
9887
|
return loadProfile(logInContext.me);
|
|
9726
9888
|
case 4:
|
|
9727
|
-
context.publicProfile =
|
|
9728
|
-
|
|
9889
|
+
context.publicProfile = _context8.sent;
|
|
9890
|
+
_context8.next = 6;
|
|
9729
9891
|
break;
|
|
9730
9892
|
case 5:
|
|
9731
|
-
|
|
9732
|
-
|
|
9893
|
+
_context8.prev = 5;
|
|
9894
|
+
_t6 = _context8["catch"](1);
|
|
9895
|
+
_message = formatDynamicError(_t6, 'Unable to load your profile');
|
|
9733
9896
|
if (context.div && context.dom) {
|
|
9734
|
-
context.div.appendChild(errorMessageBlock(context.dom,
|
|
9897
|
+
context.div.appendChild(errorMessageBlock(context.dom, _message));
|
|
9735
9898
|
}
|
|
9736
|
-
throw new Error(
|
|
9899
|
+
throw new Error(_message);
|
|
9737
9900
|
case 6:
|
|
9738
|
-
return
|
|
9901
|
+
return _context8.abrupt("return", context);
|
|
9739
9902
|
case 7:
|
|
9740
9903
|
case "end":
|
|
9741
|
-
return
|
|
9904
|
+
return _context8.stop();
|
|
9742
9905
|
}
|
|
9743
|
-
},
|
|
9906
|
+
}, _callee8, null, [[1, 5]]);
|
|
9744
9907
|
}));
|
|
9745
9908
|
return _ensureLoadedProfile.apply(this, arguments);
|
|
9746
9909
|
}
|
|
9747
|
-
function findAppInstances(
|
|
9910
|
+
function findAppInstances(_x0, _x1, _x10) {
|
|
9748
9911
|
return _findAppInstances.apply(this, arguments);
|
|
9749
9912
|
}
|
|
9750
9913
|
function _findAppInstances() {
|
|
9751
|
-
_findAppInstances = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function
|
|
9752
|
-
var items,
|
|
9753
|
-
return regenerator_default().wrap(function (
|
|
9754
|
-
while (1) switch (
|
|
9914
|
+
_findAppInstances = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee9(context, theClass, isPublic) {
|
|
9915
|
+
var items, _t7;
|
|
9916
|
+
return regenerator_default().wrap(function (_context9) {
|
|
9917
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
9755
9918
|
case 0:
|
|
9756
9919
|
if (!context.me) {
|
|
9757
|
-
|
|
9920
|
+
_context9.next = 2;
|
|
9758
9921
|
break;
|
|
9759
9922
|
}
|
|
9760
|
-
|
|
9923
|
+
_context9.next = 1;
|
|
9761
9924
|
return getScopedAppInstances(theClass, context.me);
|
|
9762
9925
|
case 1:
|
|
9763
|
-
|
|
9764
|
-
|
|
9926
|
+
_t7 = _context9.sent;
|
|
9927
|
+
_context9.next = 3;
|
|
9765
9928
|
break;
|
|
9766
9929
|
case 2:
|
|
9767
|
-
|
|
9930
|
+
_t7 = [];
|
|
9768
9931
|
case 3:
|
|
9769
|
-
items =
|
|
9932
|
+
items = _t7;
|
|
9770
9933
|
if (isPublic === true) {
|
|
9771
9934
|
// old API - not recommended!
|
|
9772
9935
|
items = items.filter(function (item) {
|
|
@@ -9780,12 +9943,12 @@ function _findAppInstances() {
|
|
|
9780
9943
|
context.instances = items.map(function (item) {
|
|
9781
9944
|
return item.instance;
|
|
9782
9945
|
});
|
|
9783
|
-
return
|
|
9946
|
+
return _context9.abrupt("return", context);
|
|
9784
9947
|
case 4:
|
|
9785
9948
|
case "end":
|
|
9786
|
-
return
|
|
9949
|
+
return _context9.stop();
|
|
9787
9950
|
}
|
|
9788
|
-
},
|
|
9951
|
+
}, _callee9);
|
|
9789
9952
|
}));
|
|
9790
9953
|
return _findAppInstances.apply(this, arguments);
|
|
9791
9954
|
}
|
|
@@ -9797,14 +9960,14 @@ function scopeLabel(context, scope) {
|
|
|
9797
9960
|
/**
|
|
9798
9961
|
* UI to control registration of instance
|
|
9799
9962
|
*/
|
|
9800
|
-
function registrationControl(
|
|
9963
|
+
function registrationControl(_x11, _x12, _x13) {
|
|
9801
9964
|
return _registrationControl.apply(this, arguments);
|
|
9802
9965
|
}
|
|
9803
9966
|
function _registrationControl() {
|
|
9804
|
-
_registrationControl = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function
|
|
9805
|
-
var registrationStatements, renderScopeCheckbox, dom, box, me, scopes, msg, tbody, form, _iterator, _step, scope, row,
|
|
9806
|
-
return regenerator_default().wrap(function (
|
|
9807
|
-
while (1) switch (
|
|
9967
|
+
_registrationControl = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee0(context, instance, theClass) {
|
|
9968
|
+
var registrationStatements, renderScopeCheckbox, dom, box, me, scopes, msg, tbody, form, _iterator, _step, scope, row, _t8;
|
|
9969
|
+
return regenerator_default().wrap(function (_context0) {
|
|
9970
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
9808
9971
|
case 0:
|
|
9809
9972
|
renderScopeCheckbox = function _renderScopeCheckbox(scope) {
|
|
9810
9973
|
var statements = registrationStatements(scope.index);
|
|
@@ -9820,7 +9983,7 @@ function _registrationControl() {
|
|
|
9820
9983
|
/// / body of registrationControl
|
|
9821
9984
|
dom = context.dom;
|
|
9822
9985
|
if (!(!dom || !context.div)) {
|
|
9823
|
-
|
|
9986
|
+
_context0.next = 1;
|
|
9824
9987
|
break;
|
|
9825
9988
|
}
|
|
9826
9989
|
throw new Error('registrationControl: need dom and div');
|
|
@@ -9830,31 +9993,31 @@ function _registrationControl() {
|
|
|
9830
9993
|
context.me = external_SolidLogic_.authn.currentUser(); // @@
|
|
9831
9994
|
me = context.me;
|
|
9832
9995
|
if (me) {
|
|
9833
|
-
|
|
9996
|
+
_context0.next = 2;
|
|
9834
9997
|
break;
|
|
9835
9998
|
}
|
|
9836
9999
|
box.innerHTML = '<p style="margin:2em;">(Log in to save a link to this)</p>';
|
|
9837
|
-
return
|
|
10000
|
+
return _context0.abrupt("return", context);
|
|
9838
10001
|
case 2:
|
|
9839
|
-
|
|
9840
|
-
|
|
10002
|
+
_context0.prev = 2;
|
|
10003
|
+
_context0.next = 3;
|
|
9841
10004
|
return loadAllTypeIndexes(me);
|
|
9842
10005
|
case 3:
|
|
9843
|
-
scopes =
|
|
9844
|
-
|
|
10006
|
+
scopes = _context0.sent;
|
|
10007
|
+
_context0.next = 5;
|
|
9845
10008
|
break;
|
|
9846
10009
|
case 4:
|
|
9847
|
-
|
|
9848
|
-
|
|
10010
|
+
_context0.prev = 4;
|
|
10011
|
+
_t8 = _context0["catch"](2);
|
|
9849
10012
|
if (context.div && context.preferencesFileError) {
|
|
9850
10013
|
msg = '(Lists of stuff not available)';
|
|
9851
10014
|
context.div.appendChild(dom.createElement('p')).textContent = msg;
|
|
9852
10015
|
} else if (context.div) {
|
|
9853
|
-
msg = "registrationControl: Type indexes not available: ".concat(
|
|
9854
|
-
context.div.appendChild(errorMessageBlock(context.dom,
|
|
10016
|
+
msg = "registrationControl: Type indexes not available: ".concat(_t8);
|
|
10017
|
+
context.div.appendChild(errorMessageBlock(context.dom, _t8));
|
|
9855
10018
|
}
|
|
9856
10019
|
src_debug/* log */.Rm(msg);
|
|
9857
|
-
return
|
|
10020
|
+
return _context0.abrupt("return", context);
|
|
9858
10021
|
case 5:
|
|
9859
10022
|
box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
|
|
9860
10023
|
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid gray 0.05em;');
|
|
@@ -9872,12 +10035,12 @@ function _registrationControl() {
|
|
|
9872
10035
|
} finally {
|
|
9873
10036
|
_iterator.f();
|
|
9874
10037
|
}
|
|
9875
|
-
return
|
|
10038
|
+
return _context0.abrupt("return", context);
|
|
9876
10039
|
case 6:
|
|
9877
10040
|
case "end":
|
|
9878
|
-
return
|
|
10041
|
+
return _context0.stop();
|
|
9879
10042
|
}
|
|
9880
|
-
},
|
|
10043
|
+
}, _callee0, null, [[2, 4]]);
|
|
9881
10044
|
}));
|
|
9882
10045
|
return _registrationControl.apply(this, arguments);
|
|
9883
10046
|
}
|
|
@@ -9900,7 +10063,7 @@ function renderScopeHeadingRow(context, store, scope) {
|
|
|
9900
10063
|
/**
|
|
9901
10064
|
* UI to List at all registered things
|
|
9902
10065
|
*/
|
|
9903
|
-
function registrationList(
|
|
10066
|
+
function registrationList(_x14, _x15) {
|
|
9904
10067
|
return _registrationList.apply(this, arguments);
|
|
9905
10068
|
} // registrationList
|
|
9906
10069
|
|
|
@@ -9914,10 +10077,10 @@ function registrationList(_x9, _x0) {
|
|
|
9914
10077
|
* @returns
|
|
9915
10078
|
*/
|
|
9916
10079
|
function _registrationList() {
|
|
9917
|
-
_registrationList = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function
|
|
9918
|
-
var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop,
|
|
9919
|
-
return regenerator_default().wrap(function (
|
|
9920
|
-
while (1) switch (
|
|
10080
|
+
_registrationList = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee10(context, options) {
|
|
10081
|
+
var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop, _t9, _t0;
|
|
10082
|
+
return regenerator_default().wrap(function (_context11) {
|
|
10083
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
9921
10084
|
case 0:
|
|
9922
10085
|
dom = context.dom;
|
|
9923
10086
|
div = context.div;
|
|
@@ -9925,16 +10088,16 @@ function _registrationList() {
|
|
|
9925
10088
|
div.appendChild(box);
|
|
9926
10089
|
context.me = external_SolidLogic_.authn.currentUser(); // @@
|
|
9927
10090
|
if (context.me) {
|
|
9928
|
-
|
|
10091
|
+
_context11.next = 1;
|
|
9929
10092
|
break;
|
|
9930
10093
|
}
|
|
9931
10094
|
box.innerHTML = '<p style="margin:2em;">(Log in list your stuff)</p>';
|
|
9932
|
-
return
|
|
10095
|
+
return _context11.abrupt("return", context);
|
|
9933
10096
|
case 1:
|
|
9934
|
-
|
|
10097
|
+
_context11.next = 2;
|
|
9935
10098
|
return loadAllTypeIndexes(context.me);
|
|
9936
10099
|
case 2:
|
|
9937
|
-
scopes =
|
|
10100
|
+
scopes = _context11.sent;
|
|
9938
10101
|
// includes community indexes
|
|
9939
10102
|
|
|
9940
10103
|
// console.log('@@ registrationList ', scopes)
|
|
@@ -9943,47 +10106,47 @@ function _registrationList() {
|
|
|
9943
10106
|
table = box.firstChild;
|
|
9944
10107
|
tbody = table.firstChild;
|
|
9945
10108
|
_iterator2 = login_createForOfIteratorHelper(scopes);
|
|
9946
|
-
|
|
10109
|
+
_context11.prev = 3;
|
|
9947
10110
|
_iterator2.s();
|
|
9948
10111
|
case 4:
|
|
9949
10112
|
if ((_step2 = _iterator2.n()).done) {
|
|
9950
|
-
|
|
10113
|
+
_context11.next = 13;
|
|
9951
10114
|
break;
|
|
9952
10115
|
}
|
|
9953
10116
|
scope = _step2.value;
|
|
9954
10117
|
// need some predicate for listing/adding agents
|
|
9955
10118
|
headingRow = renderScopeHeadingRow(context, login_store, scope);
|
|
9956
10119
|
tbody.appendChild(headingRow);
|
|
9957
|
-
|
|
10120
|
+
_context11.next = 5;
|
|
9958
10121
|
return getScopedAppsFromIndex(scope, options.type || null);
|
|
9959
10122
|
case 5:
|
|
9960
|
-
items =
|
|
10123
|
+
items = _context11.sent;
|
|
9961
10124
|
// any class
|
|
9962
10125
|
if (items.length === 0) headingRow.style.display = 'none';
|
|
9963
10126
|
// console.log(`registrationList: @@ instance items for class ${options.type || 'undefined' }:`, items)
|
|
9964
10127
|
_iterator3 = login_createForOfIteratorHelper(items);
|
|
9965
|
-
|
|
10128
|
+
_context11.prev = 6;
|
|
9966
10129
|
_loop = /*#__PURE__*/regenerator_default().mark(function _loop() {
|
|
9967
10130
|
var item, row;
|
|
9968
|
-
return regenerator_default().wrap(function (
|
|
9969
|
-
while (1) switch (
|
|
10131
|
+
return regenerator_default().wrap(function (_context10) {
|
|
10132
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
9970
10133
|
case 0:
|
|
9971
10134
|
item = _step3.value;
|
|
9972
10135
|
row = personTR(dom, src_ns.solid('instance'), item.instance, {
|
|
9973
10136
|
deleteFunction: function () {
|
|
9974
|
-
var _deleteFunction = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function
|
|
9975
|
-
return regenerator_default().wrap(function (
|
|
9976
|
-
while (1) switch (
|
|
10137
|
+
var _deleteFunction = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee1() {
|
|
10138
|
+
return regenerator_default().wrap(function (_context1) {
|
|
10139
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
9977
10140
|
case 0:
|
|
9978
|
-
|
|
10141
|
+
_context1.next = 1;
|
|
9979
10142
|
return deleteTypeIndexRegistration(item);
|
|
9980
10143
|
case 1:
|
|
9981
10144
|
tbody.removeChild(row);
|
|
9982
10145
|
case 2:
|
|
9983
10146
|
case "end":
|
|
9984
|
-
return
|
|
10147
|
+
return _context1.stop();
|
|
9985
10148
|
}
|
|
9986
|
-
},
|
|
10149
|
+
}, _callee1);
|
|
9987
10150
|
}));
|
|
9988
10151
|
function deleteFunction() {
|
|
9989
10152
|
return _deleteFunction.apply(this, arguments);
|
|
@@ -9995,52 +10158,52 @@ function _registrationList() {
|
|
|
9995
10158
|
tbody.appendChild(row);
|
|
9996
10159
|
case 1:
|
|
9997
10160
|
case "end":
|
|
9998
|
-
return
|
|
10161
|
+
return _context10.stop();
|
|
9999
10162
|
}
|
|
10000
10163
|
}, _loop);
|
|
10001
10164
|
});
|
|
10002
10165
|
_iterator3.s();
|
|
10003
10166
|
case 7:
|
|
10004
10167
|
if ((_step3 = _iterator3.n()).done) {
|
|
10005
|
-
|
|
10168
|
+
_context11.next = 9;
|
|
10006
10169
|
break;
|
|
10007
10170
|
}
|
|
10008
|
-
return
|
|
10171
|
+
return _context11.delegateYield(_loop(), "t0", 8);
|
|
10009
10172
|
case 8:
|
|
10010
|
-
|
|
10173
|
+
_context11.next = 7;
|
|
10011
10174
|
break;
|
|
10012
10175
|
case 9:
|
|
10013
|
-
|
|
10176
|
+
_context11.next = 11;
|
|
10014
10177
|
break;
|
|
10015
10178
|
case 10:
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
_iterator3.e(
|
|
10179
|
+
_context11.prev = 10;
|
|
10180
|
+
_t9 = _context11["catch"](6);
|
|
10181
|
+
_iterator3.e(_t9);
|
|
10019
10182
|
case 11:
|
|
10020
|
-
|
|
10183
|
+
_context11.prev = 11;
|
|
10021
10184
|
_iterator3.f();
|
|
10022
|
-
return
|
|
10185
|
+
return _context11.finish(11);
|
|
10023
10186
|
case 12:
|
|
10024
|
-
|
|
10187
|
+
_context11.next = 4;
|
|
10025
10188
|
break;
|
|
10026
10189
|
case 13:
|
|
10027
|
-
|
|
10190
|
+
_context11.next = 15;
|
|
10028
10191
|
break;
|
|
10029
10192
|
case 14:
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
_iterator2.e(
|
|
10193
|
+
_context11.prev = 14;
|
|
10194
|
+
_t0 = _context11["catch"](3);
|
|
10195
|
+
_iterator2.e(_t0);
|
|
10033
10196
|
case 15:
|
|
10034
|
-
|
|
10197
|
+
_context11.prev = 15;
|
|
10035
10198
|
_iterator2.f();
|
|
10036
|
-
return
|
|
10199
|
+
return _context11.finish(15);
|
|
10037
10200
|
case 16:
|
|
10038
|
-
return
|
|
10201
|
+
return _context11.abrupt("return", context);
|
|
10039
10202
|
case 17:
|
|
10040
10203
|
case "end":
|
|
10041
|
-
return
|
|
10204
|
+
return _context11.stop();
|
|
10042
10205
|
}
|
|
10043
|
-
},
|
|
10206
|
+
}, _callee10, null, [[3, 14, 15, 16], [6, 10, 11, 12]]);
|
|
10044
10207
|
}));
|
|
10045
10208
|
return _registrationList.apply(this, arguments);
|
|
10046
10209
|
}
|
|
@@ -10171,7 +10334,7 @@ function renderSignInPopup(dom) {
|
|
|
10171
10334
|
}
|
|
10172
10335
|
}, _callee, null, [[0, 2]]);
|
|
10173
10336
|
}));
|
|
10174
|
-
return function loginToIssuer(
|
|
10337
|
+
return function loginToIssuer(_x16) {
|
|
10175
10338
|
return _ref.apply(this, arguments);
|
|
10176
10339
|
};
|
|
10177
10340
|
}();
|
|
@@ -10418,7 +10581,7 @@ function selectWorkspace(dom, appDetails, callbackWS) {
|
|
|
10418
10581
|
}
|
|
10419
10582
|
function displayOptions(context) {
|
|
10420
10583
|
// console.log('displayOptions!', context)
|
|
10421
|
-
function makeNewWorkspace(
|
|
10584
|
+
function makeNewWorkspace(_x17) {
|
|
10422
10585
|
return _makeNewWorkspace.apply(this, arguments);
|
|
10423
10586
|
} // const status = ''
|
|
10424
10587
|
function _makeNewWorkspace() {
|
|
@@ -10654,60 +10817,67 @@ function getUserRoles() {
|
|
|
10654
10817
|
* Filters which panes should be available, based on the result of [[getUserRoles]]
|
|
10655
10818
|
*/
|
|
10656
10819
|
function _getUserRoles() {
|
|
10657
|
-
_getUserRoles = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function
|
|
10658
|
-
var _yield$ensureLoadedPr, me, preferencesFile, preferencesFileError,
|
|
10659
|
-
return regenerator_default().wrap(function (
|
|
10660
|
-
while (1) switch (
|
|
10820
|
+
_getUserRoles = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee11() {
|
|
10821
|
+
var _yield$ensureLoadedPr, me, preferencesFile, preferencesFileError, authState, _t1;
|
|
10822
|
+
return regenerator_default().wrap(function (_context12) {
|
|
10823
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
10661
10824
|
case 0:
|
|
10662
|
-
|
|
10663
|
-
|
|
10825
|
+
_context12.prev = 0;
|
|
10826
|
+
_context12.next = 1;
|
|
10664
10827
|
return ensureLoadedPreferences({});
|
|
10665
10828
|
case 1:
|
|
10666
|
-
_yield$ensureLoadedPr =
|
|
10829
|
+
_yield$ensureLoadedPr = _context12.sent;
|
|
10667
10830
|
me = _yield$ensureLoadedPr.me;
|
|
10668
10831
|
preferencesFile = _yield$ensureLoadedPr.preferencesFile;
|
|
10669
10832
|
preferencesFileError = _yield$ensureLoadedPr.preferencesFileError;
|
|
10670
|
-
if (!
|
|
10671
|
-
|
|
10833
|
+
if (!preferencesFileError) {
|
|
10834
|
+
_context12.next = 2;
|
|
10672
10835
|
break;
|
|
10673
10836
|
}
|
|
10674
10837
|
throw new Error(preferencesFileError);
|
|
10675
10838
|
case 2:
|
|
10676
|
-
|
|
10839
|
+
if (preferencesFile) {
|
|
10840
|
+
_context12.next = 3;
|
|
10841
|
+
break;
|
|
10842
|
+
}
|
|
10843
|
+
authState = me ? "logged in as ".concat(me.value || me.uri) : 'not logged in';
|
|
10844
|
+
throw new Error("Preferences file unavailable (".concat(authState, ")"));
|
|
10677
10845
|
case 3:
|
|
10678
|
-
|
|
10679
|
-
_t0 = _context1["catch"](0);
|
|
10680
|
-
src_debug/* warn */.R8('Unable to fetch your preferences - this was the error: ', _t0);
|
|
10681
|
-
return _context1.abrupt("return", []);
|
|
10846
|
+
return _context12.abrupt("return", external_SolidLogic_.solidLogicSingleton.store.each(me, src_ns.rdf('type'), null, preferencesFile.doc()));
|
|
10682
10847
|
case 4:
|
|
10848
|
+
_context12.prev = 4;
|
|
10849
|
+
_t1 = _context12["catch"](0);
|
|
10850
|
+
src_debug/* warn */.R8(formatDynamicError(_t1, 'Unable to fetch your preferences'));
|
|
10851
|
+
return _context12.abrupt("return", []);
|
|
10852
|
+
case 5:
|
|
10683
10853
|
case "end":
|
|
10684
|
-
return
|
|
10854
|
+
return _context12.stop();
|
|
10685
10855
|
}
|
|
10686
|
-
},
|
|
10856
|
+
}, _callee11, null, [[0, 4]]);
|
|
10687
10857
|
}));
|
|
10688
10858
|
return _getUserRoles.apply(this, arguments);
|
|
10689
10859
|
}
|
|
10690
|
-
function filterAvailablePanes(
|
|
10860
|
+
function filterAvailablePanes(_x18) {
|
|
10691
10861
|
return _filterAvailablePanes.apply(this, arguments);
|
|
10692
10862
|
}
|
|
10693
10863
|
function _filterAvailablePanes() {
|
|
10694
|
-
_filterAvailablePanes = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function
|
|
10864
|
+
_filterAvailablePanes = asyncToGenerator_asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee12(panes) {
|
|
10695
10865
|
var userRoles;
|
|
10696
|
-
return regenerator_default().wrap(function (
|
|
10697
|
-
while (1) switch (
|
|
10866
|
+
return regenerator_default().wrap(function (_context13) {
|
|
10867
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
10698
10868
|
case 0:
|
|
10699
|
-
|
|
10869
|
+
_context13.next = 1;
|
|
10700
10870
|
return getUserRoles();
|
|
10701
10871
|
case 1:
|
|
10702
|
-
userRoles =
|
|
10703
|
-
return
|
|
10872
|
+
userRoles = _context13.sent;
|
|
10873
|
+
return _context13.abrupt("return", panes.filter(function (pane) {
|
|
10704
10874
|
return isMatchingAudience(pane, userRoles);
|
|
10705
10875
|
}));
|
|
10706
10876
|
case 2:
|
|
10707
10877
|
case "end":
|
|
10708
|
-
return
|
|
10878
|
+
return _context13.stop();
|
|
10709
10879
|
}
|
|
10710
|
-
},
|
|
10880
|
+
}, _callee12);
|
|
10711
10881
|
}));
|
|
10712
10882
|
return _filterAvailablePanes.apply(this, arguments);
|
|
10713
10883
|
}
|
|
@@ -24226,7 +24396,7 @@ function tabWidget(options) {
|
|
|
24226
24396
|
_getColors2 = _slicedToArray(_getColors, 2),
|
|
24227
24397
|
selectedColor = _getColors2[0],
|
|
24228
24398
|
color = _getColors2[1];
|
|
24229
|
-
var bodyMainStyle = "
|
|
24399
|
+
var bodyMainStyle = "flex: 2; width: auto; height: 100%; border: 0.1em; border-style: solid; border-color: ".concat(selectedColor, "; padding: 1em;");
|
|
24230
24400
|
var rootElement = dom.createElement('div'); // 20200117a
|
|
24231
24401
|
|
|
24232
24402
|
rootElement.setAttribute('style', style.tabsRootElement);
|