solid-ui 2.4.19 → 2.4.20
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/README.md +1 -1
- package/dist/index.html +9 -0
- package/{lib/webpack-bundle.js → dist/main.js} +44878 -51845
- package/dist/main.js.map +1 -0
- package/lib/acl/access-groups.d.ts +5 -4
- package/lib/acl/access-groups.d.ts.map +1 -1
- package/lib/acl/access-groups.js +1 -0
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl-control.d.ts +2 -2
- package/lib/acl/acl-control.d.ts.map +1 -1
- package/lib/acl/acl-control.js.map +1 -1
- package/lib/acl/acl.d.ts +5 -5
- package/lib/acl/acl.d.ts.map +1 -1
- package/lib/acl/acl.js.map +1 -1
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/thread.js.map +1 -1
- package/lib/create/create.js.map +1 -1
- package/lib/footer/index.d.ts +4 -4
- package/lib/footer/index.d.ts.map +1 -1
- package/lib/footer/index.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -5
- package/lib/index.js.map +1 -1
- package/lib/login/login.d.ts +4 -1
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +226 -133
- package/lib/login/login.js.map +1 -1
- package/lib/media/media-capture.js.map +1 -1
- package/lib/messageArea.js.map +1 -1
- package/lib/style.js +3 -3
- package/lib/style.js.map +1 -1
- package/lib/tabs.d.ts +1 -1
- package/lib/tabs.d.ts.map +1 -1
- package/lib/tabs.js +11 -3
- package/lib/tabs.js.map +1 -1
- package/lib/utils/headerFooterHelpers.d.ts +2 -3
- package/lib/utils/headerFooterHelpers.d.ts.map +1 -1
- package/lib/utils/headerFooterHelpers.js +63 -33
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/versionInfo.d.ts +12 -11
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +22 -20
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons.js.map +1 -1
- package/lib/widgets/dragAndDrop.js +1 -1
- package/lib/widgets/dragAndDrop.js.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
- package/lib/widgets/forms/basic.d.ts +1 -1
- package/lib/widgets/forms/basic.d.ts.map +1 -1
- package/lib/widgets/forms/basic.js +8 -6
- package/lib/widgets/forms/basic.js.map +1 -1
- package/lib/widgets/forms.js +51 -28
- package/lib/widgets/forms.js.map +1 -1
- package/package.json +42 -48
- package/lib/webpack-bundle.js.map +0 -1
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["dom","window","document","UI","authn","store","ns","rdf","acl","aclControl","create","createTypes","icons","language","log","login","matrix","media","messageArea","infiniteMessageArea","pad","participation","preferences","style","table","tabs","utils","widgets","versionInfo","initHeader","initFooter"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AAEA
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["dom","window","document","UI","authn","store","ns","rdf","acl","aclControl","create","createTypes","icons","language","log","login","matrix","media","messageArea","infiniteMessageArea","pad","participation","preferences","style","table","tabs","utils","widgets","versionInfo","initHeader","initFooter"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;;;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kB;AAuBlBC,IAAAA,IAAI,EAAJA,IAvBkB;AAwBlBC,IAAAA,KAAK,EAALA,KAxBkB;AAyBlBC,IAAAA,OAAO,EAAPA,OAzBkB;AA0BlBC,IAAAA,WAAW,EAAXA,wBA1BkB;AA2BlBC,IAAAA,UAAU,EAAVA,kBA3BkB;AA4BlBC,IAAAA,UAAU,EAAVA;AA5BkB,GAAnB,CADgC,CA8B/B;AACH,C,CAED","sourcesContent":["/*\nThe MIT License (MIT)\n\nCopyright (c) 2015-2016 Solid\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nIf you would like to know more about the solid Solid project, please see\nhttps://github.com/solid/solid\n*/\n'use strict'\n/**\n * Provides a Solid client helper object (which exposes various static modules).\n * @module solidUi.js\n * @main solidUi.js\n */\n\n/**\n * @class SolidUi\n * @static\n */\n\n// REMOVE @ts-ignore as you migrate files to TypeScript\nimport * as rdf from 'rdflib' // pull in first avoid cross-refs\n// @ts-ignore\nimport * as ns from './ns'\nimport { acl, aclControl } from './acl/index'\nimport { create } from './create/index'\n// @ts-ignore\nimport { icons } from './iconBase'\nimport * as language from './widgets/forms/autocomplete/language'\nimport * as log from './log'\nimport { matrix } from './matrix/index'\nimport { media } from './media/index'\n// @ts-ignore\nimport { messageArea } from './messageArea'\n// @ts-ignore\nimport { infiniteMessageArea } from './chat/infinite'\n// @ts-ignore\nimport * as pad from './pad'\n// @ts-ignore\nimport * as participation from './participation'\n// @ts-ignore\nimport * as preferences from './preferences'\n// @ts-ignore\nimport * as style from './style'\n// @ts-ignore\nimport { renderTableViewPane as table } from './table'\nimport * as tabs from './tabs'\n// @ts-ignore\nimport * as utils from './utils'\nimport * as login from './login/login'\nimport * as widgets from './widgets/index'\nimport { versionInfo } from './versionInfo'\nimport { initHeader } from './header'\nimport { initFooter } from './footer'\nimport * as createTypes from './create/types'\nimport { authn, store } from 'solid-logic'\n\nconst dom = window ? window.document : null // Idea that UI.dom can be adapted in non-browser environments\n\nif (typeof window !== 'undefined') {\n ;(<any>window).UI = {\n authn,\n store,\n ns,\n rdf,\n acl,\n aclControl,\n create,\n createTypes,\n dom,\n icons,\n language,\n log,\n login,\n matrix,\n media,\n messageArea,\n infiniteMessageArea,\n pad,\n participation,\n preferences,\n style,\n table,\n tabs,\n utils,\n widgets,\n versionInfo,\n initHeader,\n initFooter\n } // Simpler access by non-node scripts\n}\n\n// this variables are directly used in the storybook\nexport {\n authn,\n store,\n ns,\n rdf,\n acl,\n aclControl,\n create,\n createTypes,\n dom,\n icons,\n language,\n log,\n login,\n matrix,\n media,\n messageArea,\n infiniteMessageArea,\n pad,\n participation,\n preferences,\n style,\n table,\n tabs,\n utils,\n widgets,\n versionInfo,\n initHeader,\n initFooter\n}\n"],"file":"index.js"}
|
package/lib/login/login.d.ts
CHANGED
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
* * `containers` An array of nodes of containers of instances
|
|
18
18
|
* * `div` A DOM element where UI can be displayed
|
|
19
19
|
* * `statusArea` A DOM element (opt) progress stuff can be displayed, or error messages
|
|
20
|
+
* *
|
|
21
|
+
* * Vocabulary: "load" loads a file if it exists;
|
|
22
|
+
* * 'Ensure" CREATES the file if it does not exist (if it can) and then loads it.
|
|
20
23
|
* @packageDocumentation
|
|
21
24
|
*/
|
|
22
25
|
import { PaneDefinition } from 'pane-registry';
|
|
@@ -59,7 +62,7 @@ export declare function registrationControl(context: AuthenticationContext, inst
|
|
|
59
62
|
/**
|
|
60
63
|
* UI to List at all registered things
|
|
61
64
|
*/
|
|
62
|
-
export declare function registrationList(
|
|
65
|
+
export declare function registrationList(context0: AuthenticationContext, options: {
|
|
63
66
|
private?: boolean;
|
|
64
67
|
public?: boolean;
|
|
65
68
|
type?: NamedNode;
|
package/lib/login/login.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/login/login.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/login/login.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAa,SAAS,EAAiB,MAAM,QAAQ,CAAA;AAG5D,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAgN,MAAM,aAAa,CAAA;AAS7Q;;;;IAII;AAEJ,wBAAgB,cAAc,CAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAwB9F;AAED;;;;;;;GAOG;AAEH,wBAAsB,uBAAuB,CAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA2D7G;AAED;;;;;;GAMG;AAEH,wBAAsB,mBAAmB,CAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAmBzG;AAED;;;;;IAKI;AACJ,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,SAAS,EAC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C,KAAK,CAAC,SAAS,CAAC,CAAC,CAe/D;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAE,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAGxG"}
|
package/lib/login/login.js
CHANGED
|
@@ -65,6 +65,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
65
65
|
* * `containers` An array of nodes of containers of instances
|
|
66
66
|
* * `div` A DOM element where UI can be displayed
|
|
67
67
|
* * `statusArea` A DOM element (opt) progress stuff can be displayed, or error messages
|
|
68
|
+
* *
|
|
69
|
+
* * Vocabulary: "load" loads a file if it exists;
|
|
70
|
+
* * 'Ensure" CREATES the file if it does not exist (if it can) and then loads it.
|
|
68
71
|
* @packageDocumentation
|
|
69
72
|
*/
|
|
70
73
|
|
|
@@ -484,141 +487,231 @@ function _findAppInstances() {
|
|
|
484
487
|
return _findAppInstances.apply(this, arguments);
|
|
485
488
|
}
|
|
486
489
|
|
|
487
|
-
function registrationControl(
|
|
488
|
-
|
|
490
|
+
function registrationControl(_x7, _x8, _x9) {
|
|
491
|
+
return _registrationControl.apply(this, arguments);
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* UI to List at all registered things
|
|
495
|
+
*/
|
|
489
496
|
|
|
490
|
-
if (!dom || !context.div) {
|
|
491
|
-
return Promise.resolve();
|
|
492
|
-
}
|
|
493
497
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
box.innerHTML = '<table><tbody><tr></tr><tr></tr></tbody></table>'; // tbody will be inserted anyway
|
|
498
|
+
function _registrationControl() {
|
|
499
|
+
_registrationControl = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(context, instance, theClass) {
|
|
500
|
+
var dom, box, context2, msg, tbody, form, registrationStatements, index, statements, _msg;
|
|
498
501
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
503
|
+
while (1) {
|
|
504
|
+
switch (_context7.prev = _context7.next) {
|
|
505
|
+
case 0:
|
|
506
|
+
dom = context.dom;
|
|
502
507
|
|
|
503
|
-
|
|
504
|
-
|
|
508
|
+
if (!(!dom || !context.div)) {
|
|
509
|
+
_context7.next = 3;
|
|
510
|
+
break;
|
|
511
|
+
}
|
|
505
512
|
|
|
506
|
-
|
|
507
|
-
return [(0, _rdflib.st)(reg, ns.solid('instance'), instance, index), (0, _rdflib.st)(reg, ns.solid('forClass'), theClass, index)];
|
|
508
|
-
};
|
|
513
|
+
return _context7.abrupt("return", context);
|
|
509
514
|
|
|
510
|
-
|
|
515
|
+
case 3:
|
|
516
|
+
box = dom.createElement('div');
|
|
517
|
+
context.div.appendChild(box);
|
|
518
|
+
context.me = _solidLogic.authn.currentUser(); // @@
|
|
511
519
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
}
|
|
520
|
+
if (context.me) {
|
|
521
|
+
_context7.next = 9;
|
|
522
|
+
break;
|
|
523
|
+
}
|
|
517
524
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
statements = registrationStatements(index);
|
|
521
|
-
tbody.children[1].appendChild(widgets.buildCheckBoxForm(context.dom, _solidLogic.solidLogicSingleton.store, "Personal note of this ".concat(context.noun), null, statements, form, index));
|
|
522
|
-
}
|
|
525
|
+
box.innerHTML = '<p style="margin:2em;">(Log in to save a link to this)</p>';
|
|
526
|
+
return _context7.abrupt("return", context);
|
|
523
527
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
528
|
+
case 9:
|
|
529
|
+
_context7.prev = 9;
|
|
530
|
+
_context7.next = 12;
|
|
531
|
+
return (0, _solidLogic.ensureTypeIndexes)(context);
|
|
527
532
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
msg = "registrationControl: Type indexes not available: ".concat(e);
|
|
533
|
-
context.div.appendChild(widgets.errorMessageBlock(context.dom, e));
|
|
534
|
-
}
|
|
533
|
+
case 12:
|
|
534
|
+
context2 = _context7.sent;
|
|
535
|
+
_context7.next = 19;
|
|
536
|
+
break;
|
|
535
537
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
538
|
+
case 15:
|
|
539
|
+
_context7.prev = 15;
|
|
540
|
+
_context7.t0 = _context7["catch"](9);
|
|
541
|
+
|
|
542
|
+
if (context.div && context.preferencesFileError) {
|
|
543
|
+
msg = '(Preferences not available)';
|
|
544
|
+
context.div.appendChild(dom.createElement('p')).textContent = msg;
|
|
545
|
+
} else if (context.div) {
|
|
546
|
+
msg = "registrationControl: Type indexes not available: ".concat(_context7.t0);
|
|
547
|
+
context.div.appendChild(widgets.errorMessageBlock(context.dom, _context7.t0));
|
|
548
|
+
}
|
|
539
549
|
|
|
540
|
-
|
|
541
|
-
context.div.appendChild(widgets.errorMessageBlock(context.dom, e));
|
|
542
|
-
}
|
|
550
|
+
debug.log(msg);
|
|
543
551
|
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
* UI to List at all registered things
|
|
549
|
-
*/
|
|
552
|
+
case 19:
|
|
553
|
+
box.innerHTML = '<table><tbody><tr></tr><tr></tr></tbody></table>'; // tbody will be inserted anyway
|
|
550
554
|
|
|
555
|
+
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid gray 0.05em;');
|
|
556
|
+
tbody = box.children[0].children[0];
|
|
557
|
+
form = new _rdflib.BlankNode(); // @@ say for now
|
|
551
558
|
|
|
552
|
-
function
|
|
553
|
-
|
|
554
|
-
var div = context.div;
|
|
555
|
-
var box = dom.createElement('div');
|
|
556
|
-
div.appendChild(box);
|
|
557
|
-
return (0, _solidLogic.ensureTypeIndexes)(context).then(function (_indexes) {
|
|
558
|
-
box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
|
|
559
|
-
|
|
560
|
-
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid #eee 0.5em;');
|
|
561
|
-
var table = box.firstChild;
|
|
562
|
-
var ix = [];
|
|
563
|
-
var sts = [];
|
|
564
|
-
var vs = ['private', 'public'];
|
|
565
|
-
vs.forEach(function (visibility) {
|
|
566
|
-
if (context.index && options[visibility]) {
|
|
567
|
-
ix = ix.concat(context.index[visibility][0]);
|
|
568
|
-
sts = sts.concat(_solidLogic.solidLogicSingleton.store.statementsMatching(undefined, ns.solid('instance'), undefined, context.index[visibility][0]));
|
|
569
|
-
}
|
|
570
|
-
});
|
|
559
|
+
registrationStatements = function registrationStatements(index) {
|
|
560
|
+
var registrations = _solidLogic.solidLogicSingleton.getRegistrations(instance, theClass);
|
|
571
561
|
|
|
572
|
-
|
|
573
|
-
|
|
562
|
+
var reg = registrations.length ? registrations[0] : widgets.newThing(index);
|
|
563
|
+
return [(0, _rdflib.st)(reg, ns.solid('instance'), instance, index), (0, _rdflib.st)(reg, ns.solid('forClass'), theClass, index)];
|
|
564
|
+
};
|
|
574
565
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
566
|
+
try {
|
|
567
|
+
if (context2.index && context2.index["public"] && context2.index["public"].length > 0) {
|
|
568
|
+
index = context2.index["public"][0];
|
|
569
|
+
statements = registrationStatements(index);
|
|
570
|
+
tbody.children[0].appendChild(widgets.buildCheckboxForm(context2.dom, _solidLogic.solidLogicSingleton.store, "Public link to this ".concat(context2.noun), null, statements, form, index));
|
|
571
|
+
}
|
|
581
572
|
|
|
573
|
+
if (context2.index && context2.index["private"] && context2.index["private"].length > 0) {
|
|
574
|
+
index = context2.index["private"][0];
|
|
575
|
+
statements = registrationStatements(index);
|
|
576
|
+
tbody.children[1].appendChild(widgets.buildCheckboxForm(context2.dom, _solidLogic.solidLogicSingleton.store, "Personal note of this ".concat(context2.noun), null, statements, form, index));
|
|
577
|
+
}
|
|
578
|
+
} catch (e) {
|
|
579
|
+
_msg = "registrationControl: Error making panel: ".concat(e);
|
|
582
580
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
if (!_solidLogic.solidLogicSingleton.store.updater) {
|
|
587
|
-
throw new Error('Cannot delete this, store has no updater');
|
|
588
|
-
}
|
|
581
|
+
if (context.div) {
|
|
582
|
+
context.div.appendChild(widgets.errorMessageBlock(context.dom, e));
|
|
583
|
+
}
|
|
589
584
|
|
|
590
|
-
|
|
591
|
-
if (ok) {
|
|
592
|
-
debug.log("Removed from index: ".concat(statement.subject));
|
|
593
|
-
} else {
|
|
594
|
-
debug.log("Error: Cannot delete ".concat(statement, ": ").concat(errorBody));
|
|
585
|
+
debug.log(_msg);
|
|
595
586
|
}
|
|
596
|
-
|
|
587
|
+
|
|
588
|
+
return _context7.abrupt("return", context2);
|
|
589
|
+
|
|
590
|
+
case 26:
|
|
591
|
+
case "end":
|
|
592
|
+
return _context7.stop();
|
|
597
593
|
}
|
|
598
|
-
}
|
|
599
|
-
};
|
|
594
|
+
}
|
|
595
|
+
}, _callee7, null, [[9, 15]]);
|
|
596
|
+
}));
|
|
597
|
+
return _registrationControl.apply(this, arguments);
|
|
598
|
+
}
|
|
600
599
|
|
|
601
|
-
|
|
602
|
-
|
|
600
|
+
function registrationList(_x10, _x11) {
|
|
601
|
+
return _registrationList.apply(this, arguments);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
function _registrationList() {
|
|
605
|
+
_registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(context0, options) {
|
|
606
|
+
var dom, div, box;
|
|
607
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
608
|
+
while (1) {
|
|
609
|
+
switch (_context8.prev = _context8.next) {
|
|
610
|
+
case 0:
|
|
611
|
+
dom = context0.dom;
|
|
612
|
+
div = context0.div;
|
|
613
|
+
box = dom.createElement('div');
|
|
614
|
+
div.appendChild(box);
|
|
615
|
+
context0.me = _solidLogic.authn.currentUser(); // @@
|
|
616
|
+
|
|
617
|
+
if (context0.me) {
|
|
618
|
+
_context8.next = 8;
|
|
619
|
+
break;
|
|
620
|
+
}
|
|
603
621
|
|
|
604
|
-
|
|
605
|
-
|
|
622
|
+
box.innerHTML = '<p style="margin:2em;">(Log in list your stuff)</p>';
|
|
623
|
+
return _context8.abrupt("return", context0);
|
|
606
624
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
625
|
+
case 8:
|
|
626
|
+
return _context8.abrupt("return", (0, _solidLogic.ensureTypeIndexes)(context0).then(function (context) {
|
|
627
|
+
box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
|
|
628
|
+
|
|
629
|
+
// tbody will be inserted anyway
|
|
630
|
+
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid #eee 0.5em;');
|
|
631
|
+
var table = box.firstChild;
|
|
632
|
+
var ix = [];
|
|
633
|
+
var sts = [];
|
|
634
|
+
var vs = ['private', 'public'];
|
|
635
|
+
vs.forEach(function (visibility) {
|
|
636
|
+
if (context.index && context.index[visibility].length > 0 && options[visibility]) {
|
|
637
|
+
ix = ix.concat(context.index[visibility][0]);
|
|
638
|
+
sts = sts.concat(_solidLogic.solidLogicSingleton.store.statementsMatching(undefined, ns.solid('instance'), undefined, context.index[visibility][0]));
|
|
639
|
+
}
|
|
640
|
+
});
|
|
618
641
|
|
|
642
|
+
var _loop = function _loop(i) {
|
|
643
|
+
var statement = sts[i];
|
|
644
|
+
|
|
645
|
+
if (options.type) {
|
|
646
|
+
// now check terms:forClass
|
|
647
|
+
if (!_solidLogic.solidLogicSingleton.store.holds(statement.subject, ns.solid('forClass'), options.type, statement.why)) {
|
|
648
|
+
return "continue"; // skip irrelevant ones
|
|
649
|
+
}
|
|
650
|
+
} // const cla = statement.subject
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
// const cla = statement.subject
|
|
654
|
+
var inst = statement.object;
|
|
655
|
+
table.appendChild(widgets.personTR(dom, ns.solid('instance'), inst, {
|
|
656
|
+
deleteFunction: function deleteFunction(_x) {
|
|
657
|
+
if (!_solidLogic.solidLogicSingleton.store.updater) {
|
|
658
|
+
throw new Error('Cannot delete this, store has no updater');
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
_solidLogic.solidLogicSingleton.store.updater.update([statement], [], function (uri, ok, errorBody) {
|
|
662
|
+
if (ok) {
|
|
663
|
+
debug.log("Removed from index: ".concat(statement.subject));
|
|
664
|
+
} else {
|
|
665
|
+
debug.log("Error: Cannot delete ".concat(statement, ": ").concat(errorBody));
|
|
666
|
+
}
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
}));
|
|
670
|
+
};
|
|
671
|
+
|
|
672
|
+
for (var i = 0; i < sts.length; i++) {
|
|
673
|
+
var _ret = _loop(i);
|
|
674
|
+
|
|
675
|
+
if (_ret === "continue") continue;
|
|
676
|
+
} // registrationList
|
|
677
|
+
|
|
678
|
+
/*
|
|
679
|
+
//const containers = solidLogicSingleton.store.each(theClass, ns.solid('instanceContainer'));
|
|
680
|
+
if (containers.length) {
|
|
681
|
+
fetcher.load(containers).then(function(xhrs){
|
|
682
|
+
for (const i=0; i<containers.length; i++) {
|
|
683
|
+
const cont = containers[i];
|
|
684
|
+
instances = instances.concat(solidLogicSingleton.store.each(cont, ns.ldp('contains')));
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
*/
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
// registrationList
|
|
692
|
+
|
|
693
|
+
/*
|
|
694
|
+
//const containers = solidLogicSingleton.store.each(theClass, ns.solid('instanceContainer'));
|
|
695
|
+
if (containers.length) {
|
|
696
|
+
fetcher.load(containers).then(function(xhrs){
|
|
697
|
+
for (const i=0; i<containers.length; i++) {
|
|
698
|
+
const cont = containers[i];
|
|
699
|
+
instances = instances.concat(solidLogicSingleton.store.each(cont, ns.ldp('contains')));
|
|
700
|
+
}
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
*/
|
|
704
|
+
return context;
|
|
705
|
+
}));
|
|
619
706
|
|
|
620
|
-
|
|
621
|
-
|
|
707
|
+
case 9:
|
|
708
|
+
case "end":
|
|
709
|
+
return _context8.stop();
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}, _callee8);
|
|
713
|
+
}));
|
|
714
|
+
return _registrationList.apply(this, arguments);
|
|
622
715
|
}
|
|
623
716
|
|
|
624
717
|
function getDefaultSignInButtonStyle() {
|
|
@@ -773,7 +866,7 @@ function renderSignInPopup(dom) {
|
|
|
773
866
|
}, _callee, null, [[0, 8]]);
|
|
774
867
|
}));
|
|
775
868
|
|
|
776
|
-
return function loginToIssuer(
|
|
869
|
+
return function loginToIssuer(_x12) {
|
|
777
870
|
return _ref.apply(this, arguments);
|
|
778
871
|
};
|
|
779
872
|
}();
|
|
@@ -1060,7 +1153,7 @@ function selectWorkspace(dom, appDetails, callbackWS) {
|
|
|
1060
1153
|
|
|
1061
1154
|
function displayOptions(context) {
|
|
1062
1155
|
// console.log('displayOptions!', context)
|
|
1063
|
-
function makeNewWorkspace(
|
|
1156
|
+
function makeNewWorkspace(_x13) {
|
|
1064
1157
|
return _makeNewWorkspace.apply(this, arguments);
|
|
1065
1158
|
} // const status = ''
|
|
1066
1159
|
|
|
@@ -1329,77 +1422,77 @@ function getUserRoles() {
|
|
|
1329
1422
|
|
|
1330
1423
|
|
|
1331
1424
|
function _getUserRoles() {
|
|
1332
|
-
_getUserRoles = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
1425
|
+
_getUserRoles = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
|
1333
1426
|
var _yield$ensureLoadedPr, me, preferencesFile, preferencesFileError;
|
|
1334
1427
|
|
|
1335
|
-
return _regenerator["default"].wrap(function
|
|
1428
|
+
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
|
1336
1429
|
while (1) {
|
|
1337
|
-
switch (
|
|
1430
|
+
switch (_context9.prev = _context9.next) {
|
|
1338
1431
|
case 0:
|
|
1339
|
-
|
|
1340
|
-
|
|
1432
|
+
_context9.prev = 0;
|
|
1433
|
+
_context9.next = 3;
|
|
1341
1434
|
return ensureLoadedPreferences({});
|
|
1342
1435
|
|
|
1343
1436
|
case 3:
|
|
1344
|
-
_yield$ensureLoadedPr =
|
|
1437
|
+
_yield$ensureLoadedPr = _context9.sent;
|
|
1345
1438
|
me = _yield$ensureLoadedPr.me;
|
|
1346
1439
|
preferencesFile = _yield$ensureLoadedPr.preferencesFile;
|
|
1347
1440
|
preferencesFileError = _yield$ensureLoadedPr.preferencesFileError;
|
|
1348
1441
|
|
|
1349
1442
|
if (!(!preferencesFile || preferencesFileError)) {
|
|
1350
|
-
|
|
1443
|
+
_context9.next = 9;
|
|
1351
1444
|
break;
|
|
1352
1445
|
}
|
|
1353
1446
|
|
|
1354
1447
|
throw new Error(preferencesFileError);
|
|
1355
1448
|
|
|
1356
1449
|
case 9:
|
|
1357
|
-
return
|
|
1450
|
+
return _context9.abrupt("return", _solidLogic.solidLogicSingleton.store.each(me, ns.rdf('type'), null, preferencesFile.doc()));
|
|
1358
1451
|
|
|
1359
1452
|
case 12:
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
debug.warn('Unable to fetch your preferences - this was the error: ',
|
|
1453
|
+
_context9.prev = 12;
|
|
1454
|
+
_context9.t0 = _context9["catch"](0);
|
|
1455
|
+
debug.warn('Unable to fetch your preferences - this was the error: ', _context9.t0);
|
|
1363
1456
|
|
|
1364
1457
|
case 15:
|
|
1365
|
-
return
|
|
1458
|
+
return _context9.abrupt("return", []);
|
|
1366
1459
|
|
|
1367
1460
|
case 16:
|
|
1368
1461
|
case "end":
|
|
1369
|
-
return
|
|
1462
|
+
return _context9.stop();
|
|
1370
1463
|
}
|
|
1371
1464
|
}
|
|
1372
|
-
},
|
|
1465
|
+
}, _callee9, null, [[0, 12]]);
|
|
1373
1466
|
}));
|
|
1374
1467
|
return _getUserRoles.apply(this, arguments);
|
|
1375
1468
|
}
|
|
1376
1469
|
|
|
1377
|
-
function filterAvailablePanes(
|
|
1470
|
+
function filterAvailablePanes(_x14) {
|
|
1378
1471
|
return _filterAvailablePanes.apply(this, arguments);
|
|
1379
1472
|
}
|
|
1380
1473
|
|
|
1381
1474
|
function _filterAvailablePanes() {
|
|
1382
|
-
_filterAvailablePanes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
1475
|
+
_filterAvailablePanes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(panes) {
|
|
1383
1476
|
var userRoles;
|
|
1384
|
-
return _regenerator["default"].wrap(function
|
|
1477
|
+
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
|
1385
1478
|
while (1) {
|
|
1386
|
-
switch (
|
|
1479
|
+
switch (_context10.prev = _context10.next) {
|
|
1387
1480
|
case 0:
|
|
1388
|
-
|
|
1481
|
+
_context10.next = 2;
|
|
1389
1482
|
return getUserRoles();
|
|
1390
1483
|
|
|
1391
1484
|
case 2:
|
|
1392
|
-
userRoles =
|
|
1393
|
-
return
|
|
1485
|
+
userRoles = _context10.sent;
|
|
1486
|
+
return _context10.abrupt("return", panes.filter(function (pane) {
|
|
1394
1487
|
return isMatchingAudience(pane, userRoles);
|
|
1395
1488
|
}));
|
|
1396
1489
|
|
|
1397
1490
|
case 4:
|
|
1398
1491
|
case "end":
|
|
1399
|
-
return
|
|
1492
|
+
return _context10.stop();
|
|
1400
1493
|
}
|
|
1401
1494
|
}
|
|
1402
|
-
},
|
|
1495
|
+
}, _callee10);
|
|
1403
1496
|
}));
|
|
1404
1497
|
return _filterAvailablePanes.apply(this, arguments);
|
|
1405
1498
|
}
|