solid-panes 3.5.13 → 3.5.14-alpha

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.
Files changed (71) hide show
  1. package/lib/dashboard/basicPreferences.js +193 -264
  2. package/lib/dashboard/basicPreferences.js.map +1 -1
  3. package/lib/dashboard/dashboardPane.js +57 -79
  4. package/lib/dashboard/dashboardPane.js.map +1 -1
  5. package/lib/dashboard/homepage.js +98 -100
  6. package/lib/dashboard/homepage.js.map +1 -1
  7. package/lib/home/homePane.js +112 -103
  8. package/lib/home/homePane.js.map +1 -1
  9. package/lib/index.d.ts +2 -1
  10. package/lib/index.d.ts.map +1 -1
  11. package/lib/index.js +49 -89
  12. package/lib/index.js.map +1 -1
  13. package/lib/internal/internalPane.js +180 -200
  14. package/lib/internal/internalPane.js.map +1 -1
  15. package/lib/mainPage/footer.d.ts +3 -0
  16. package/lib/mainPage/footer.d.ts.map +1 -0
  17. package/lib/mainPage/footer.js +20 -0
  18. package/lib/mainPage/footer.js.map +1 -0
  19. package/lib/mainPage/header.d.ts +2 -0
  20. package/lib/mainPage/header.d.ts.map +1 -0
  21. package/lib/mainPage/header.js +142 -0
  22. package/lib/mainPage/header.js.map +1 -0
  23. package/lib/mainPage/index.d.ts +3 -0
  24. package/lib/mainPage/index.d.ts.map +1 -0
  25. package/lib/mainPage/index.js +63 -0
  26. package/lib/mainPage/index.js.map +1 -0
  27. package/lib/microblogPane/microblogPane.js +1 -1
  28. package/lib/outline/context.d.ts +2 -2
  29. package/lib/outline/context.d.ts.map +1 -1
  30. package/lib/outline/context.js +13 -17
  31. package/lib/outline/context.js.map +1 -1
  32. package/lib/outline/manager.js +13 -4
  33. package/lib/outline/manager.js.map +1 -1
  34. package/lib/outline/propertyViews.js +32 -46
  35. package/lib/outline/propertyViews.js.map +1 -1
  36. package/lib/outline/userInput.js +1 -1
  37. package/lib/outline/viewAsImage.js +22 -19
  38. package/lib/outline/viewAsImage.js.map +1 -1
  39. package/lib/outline/viewAsMbox.js +5 -15
  40. package/lib/outline/viewAsMbox.js.map +1 -1
  41. package/lib/pad/padPane.js +406 -451
  42. package/lib/pad/padPane.js.map +1 -1
  43. package/lib/profile/editProfile.view.js +101 -124
  44. package/lib/profile/editProfile.view.js.map +1 -1
  45. package/lib/profile/profile.dom.js +12 -17
  46. package/lib/profile/profile.dom.js.map +1 -1
  47. package/lib/registerPanes.js +1 -1
  48. package/lib/registerPanes.js.map +1 -1
  49. package/lib/sharing/sharingPane.js +33 -45
  50. package/lib/sharing/sharingPane.js.map +1 -1
  51. package/lib/tabbed/tabbedPane.js +87 -77
  52. package/lib/tabbed/tabbedPane.js.map +1 -1
  53. package/lib/trustedApplications/trustedApplications.dom.js +173 -182
  54. package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
  55. package/lib/trustedApplications/trustedApplications.test.js +1 -1
  56. package/lib/trustedApplications/trustedApplications.utils.js +30 -36
  57. package/lib/trustedApplications/trustedApplications.utils.js.map +1 -1
  58. package/lib/trustedApplications/trustedApplications.view.js +91 -99
  59. package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
  60. package/lib/types.js +1 -4
  61. package/lib/types.js.map +1 -1
  62. package/lib/versionInfo.js +23 -28
  63. package/lib/versionInfo.js.map +1 -1
  64. package/package.json +4 -4
  65. package/src/index.ts +4 -3
  66. package/src/mainPage/footer.ts +19 -0
  67. package/src/mainPage/header.ts +75 -0
  68. package/src/mainPage/index.ts +20 -0
  69. package/src/outline/context.ts +2 -2
  70. package/src/outline/manager.js +1 -0
  71. package/src/versionInfo.ts +3 -3
@@ -1,106 +1,98 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _solidUi = require("solid-ui");
9
-
10
- var _trustedApplications = require("./trustedApplications.dom");
11
-
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); } }
13
-
14
- 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); }); }; }
15
-
16
- var thisColor = '#418d99';
17
- var trustedApplicationView = {
18
- global: true,
19
- icon: "".concat(_solidUi.icons.iconBase, "noun_15177.svg"),
20
- name: 'trustedApplications',
21
- label: function label() {
22
- return null;
23
- },
24
- render: function render(subject, context) {
25
- var dom = context.dom;
26
- var div = dom.createElement('div');
27
- div.classList.add('trusted-applications-pane');
28
- div.setAttribute('style', 'border: 0.3em solid ' + thisColor + '; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;');
29
- var table = div.appendChild(dom.createElement('table'));
30
- var main = table.appendChild(dom.createElement('tr'));
31
- var bottom = table.appendChild(dom.createElement('tr'));
32
- var statusArea = bottom.appendChild(dom.createElement('div'));
33
- statusArea.setAttribute('style', 'padding: 0.7em;');
34
-
35
- _render(dom, main, statusArea)["catch"](function (err) {
36
- return statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, err));
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
37
9
  });
38
-
39
- return div;
40
- }
41
10
  };
42
-
43
- function _render(_x, _x2, _x3) {
44
- return _render2.apply(this, arguments);
45
- }
46
-
47
- function _render2() {
48
- _render2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dom, main, statusArea) {
49
- var authContext, subject, profile, editable, applicationsTable;
50
- return regeneratorRuntime.wrap(function _callee$(_context) {
51
- while (1) {
52
- switch (_context.prev = _context.next) {
53
- case 0:
54
- _context.next = 2;
55
- return _solidUi.authn.logInLoadProfile({
56
- dom: dom,
57
- div: main,
58
- statusArea: statusArea,
59
- me: null
60
- });
61
-
62
- case 2:
63
- authContext = _context.sent;
64
- subject = authContext.me;
65
- profile = subject.doc();
66
-
67
- if (_solidUi.store.updater) {
68
- _context.next = 7;
69
- break;
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (_) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
70
32
  }
71
-
72
- throw new Error('Store has no updater');
73
-
74
- case 7:
75
- editable = _solidUi.store.updater.editable(profile.uri, _solidUi.store);
76
- main.appendChild((0, _trustedApplications.createText)('h3', 'Manage your trusted applications'));
77
-
78
- if (editable) {
79
- _context.next = 12;
80
- break;
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ var solid_ui_1 = require("solid-ui");
40
+ var trustedApplications_dom_1 = require("./trustedApplications.dom");
41
+ var thisColor = '#418d99';
42
+ var trustedApplicationView = {
43
+ global: true,
44
+ icon: "".concat(solid_ui_1.icons.iconBase, "noun_15177.svg"),
45
+ name: 'trustedApplications',
46
+ label: function () { return null; },
47
+ render: function (subject, context) {
48
+ var dom = context.dom;
49
+ var div = dom.createElement('div');
50
+ div.classList.add('trusted-applications-pane');
51
+ div.setAttribute('style', 'border: 0.3em solid ' +
52
+ thisColor +
53
+ '; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;');
54
+ var table = div.appendChild(dom.createElement('table'));
55
+ var main = table.appendChild(dom.createElement('tr'));
56
+ var bottom = table.appendChild(dom.createElement('tr'));
57
+ var statusArea = bottom.appendChild(dom.createElement('div'));
58
+ statusArea.setAttribute('style', 'padding: 0.7em;');
59
+ render(dom, main, statusArea).catch(function (err) { return statusArea.appendChild(solid_ui_1.widgets.errorMessageBlock(dom, err)); });
60
+ return div;
61
+ }
62
+ };
63
+ function render(dom, main, statusArea) {
64
+ return __awaiter(this, void 0, void 0, function () {
65
+ var authContext, subject, profile, editable, applicationsTable;
66
+ return __generator(this, function (_a) {
67
+ switch (_a.label) {
68
+ case 0: return [4 /*yield*/, solid_ui_1.authn.logInLoadProfile({ dom: dom, div: main, statusArea: statusArea, me: null })];
69
+ case 1:
70
+ authContext = _a.sent();
71
+ subject = authContext.me;
72
+ profile = subject.doc();
73
+ if (!solid_ui_1.store.updater) {
74
+ throw new Error('Store has no updater');
75
+ }
76
+ editable = solid_ui_1.store.updater.editable(profile.uri, solid_ui_1.store);
77
+ main.appendChild((0, trustedApplications_dom_1.createText)('h3', 'Manage your trusted applications'));
78
+ if (!editable) {
79
+ main.appendChild(solid_ui_1.widgets.errorMessageBlock(dom, "Your profile ".concat(subject.doc().uri, " is not editable, so we cannot do much here.")));
80
+ return [2 /*return*/];
81
+ }
82
+ main.appendChild((0, trustedApplications_dom_1.createText)('p', 'Here you can manage the applications you trust.'));
83
+ applicationsTable = (0, trustedApplications_dom_1.createApplicationTable)(subject);
84
+ main.appendChild(applicationsTable);
85
+ main.appendChild((0, trustedApplications_dom_1.createText)('h4', 'Notes'));
86
+ main.appendChild((0, trustedApplications_dom_1.createContainer)('ol', [
87
+ main.appendChild((0, trustedApplications_dom_1.createText)('li', 'Trusted applications will get access to all resources that you have access to.')),
88
+ main.appendChild((0, trustedApplications_dom_1.createText)('li', 'You can limit which modes they have by default.')),
89
+ main.appendChild((0, trustedApplications_dom_1.createText)('li', 'They will not gain more access than you have.'))
90
+ ]));
91
+ main.appendChild((0, trustedApplications_dom_1.createText)('p', 'Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app.'));
92
+ return [2 /*return*/];
81
93
  }
82
-
83
- main.appendChild(_solidUi.widgets.errorMessageBlock(dom, "Your profile ".concat(subject.doc().uri, " is not editable, so we cannot do much here.")));
84
- return _context.abrupt("return");
85
-
86
- case 12:
87
- main.appendChild((0, _trustedApplications.createText)('p', 'Here you can manage the applications you trust.'));
88
- applicationsTable = (0, _trustedApplications.createApplicationTable)(subject);
89
- main.appendChild(applicationsTable);
90
- main.appendChild((0, _trustedApplications.createText)('h4', 'Notes'));
91
- main.appendChild((0, _trustedApplications.createContainer)('ol', [main.appendChild((0, _trustedApplications.createText)('li', 'Trusted applications will get access to all resources that you have access to.')), main.appendChild((0, _trustedApplications.createText)('li', 'You can limit which modes they have by default.')), main.appendChild((0, _trustedApplications.createText)('li', 'They will not gain more access than you have.'))]));
92
- main.appendChild((0, _trustedApplications.createText)('p', 'Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app.'));
93
-
94
- case 18:
95
- case "end":
96
- return _context.stop();
97
- }
98
- }
99
- }, _callee);
100
- }));
101
- return _render2.apply(this, arguments);
94
+ });
95
+ });
102
96
  }
103
-
104
- var _default = trustedApplicationView;
105
- exports["default"] = _default;
97
+ exports.default = trustedApplicationView;
106
98
  //# sourceMappingURL=trustedApplications.view.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/trustedApplications/trustedApplications.view.ts"],"names":["thisColor","trustedApplicationView","global","icon","icons","iconBase","name","label","render","subject","context","dom","div","createElement","classList","add","setAttribute","table","appendChild","main","bottom","statusArea","err","widgets","errorMessageBlock","authn","logInLoadProfile","me","authContext","profile","doc","store","updater","Error","editable","uri","applicationsTable"],"mappings":";;;;;;;AAAA;;AAIA;;;;;;AAEA,IAAMA,SAAS,GAAG,SAAlB;AAEA,IAAMC,sBAAsC,GAAG;AAC7CC,EAAAA,MAAM,EAAE,IADqC;AAE7CC,EAAAA,IAAI,YAAKC,eAAMC,QAAX,mBAFyC;AAG7CC,EAAAA,IAAI,EAAE,qBAHuC;AAI7CC,EAAAA,KAAK,EAAE;AAAA,WAAM,IAAN;AAAA,GAJsC;AAK7CC,EAAAA,MAAM,EAAE,gBAACC,OAAD,EAAUC,OAAV,EAAsB;AAC5B,QAAMC,GAAG,GAAGD,OAAO,CAACC,GAApB;AACA,QAAMC,GAAG,GAAGD,GAAG,CAACE,aAAJ,CAAkB,KAAlB,CAAZ;AACAD,IAAAA,GAAG,CAACE,SAAJ,CAAcC,GAAd,CAAkB,2BAAlB;AACAH,IAAAA,GAAG,CAACI,YAAJ,CACE,OADF,EAEE,yBACAhB,SADA,GAEA,2DAJF;AAMA,QAAMi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C,YAAAA,QARR,GAQmBH,eAAMC,OAAN,CAAcE,QAAd,CAAuBL,OAAO,CAACM,GAA/B,EAAoCJ,cAApC,CARnB;AAUEZ,YAAAA,IAAI,CAACD,WAAL,CAAiB,qCAAW,IAAX,EAAiB,kCAAjB,CAAjB;;AAVF,gBAYOgB,QAZP;AAAA;AAAA;AAAA;;AAaIf,YAAAA,IAAI,CAACD,WAAL,CACEK,iBAAQC,iBAAR,CAA0Bb,GAA1B,yBAA+CF,OAAO,CAACqB,GAAR,GAAcK,GAA7D,kDADF;AAbJ;;AAAA;AAmBEhB,YAAAA,IAAI,CAACD,WAAL,CAAiB,qCAAW,GAAX,EAAgB,iDAAhB,CAAjB;AAEMkB,YAAAA,iBArBR,GAqB4B,iDAAuB3B,OAAvB,CArB5B;AAsBEU,YAAAA,IAAI,CAACD,WAAL,CAAiBkB,iBAAjB;AAEAjB,YAAAA,IAAI,CAACD,WAAL,CAAiB,qCAAW,IAAX,EAAiB,OAAjB,CAAjB;AACAC,YAAAA,IAAI,CAACD,WAAL,CACE,0CAAgB,IAAhB,EAAsB,CACpBC,IAAI,CAACD,WAAL,CACE,qCACE,IADF,EAEE,gFAFF,CADF,CADoB,EAOpBC,IAAI,CAACD,WAAL,CACE,qCAAW,IAAX,EAAiB,iDAAjB,CADF,CAPoB,EAUpBC,IAAI,CAACD,WAAL,CACE,qCAAW,IAAX,EAAiB,+CAAjB,CADF,CAVoB,CAAtB,CADF;AAgBAC,YAAAA,IAAI,CAACD,WAAL,CACE,qCAAW,GAAX,EAAgB,2HAAhB,CADF;;AAzCF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;eA8CejB,sB","sourcesContent":["import { authn, icons, store, widgets } from 'solid-ui'\nimport { NamedNode } from 'rdflib'\n\nimport { PaneDefinition } from 'pane-registry'\nimport { createApplicationTable, createContainer, createText } from './trustedApplications.dom'\n\nconst thisColor = '#418d99'\n\nconst trustedApplicationView: PaneDefinition = {\n global: true,\n icon: `${icons.iconBase}noun_15177.svg`,\n name: 'trustedApplications',\n label: () => null,\n render: (subject, context) => {\n const dom = context.dom\n const div = dom.createElement('div')\n div.classList.add('trusted-applications-pane')\n div.setAttribute(\n 'style',\n 'border: 0.3em solid ' +\n thisColor +\n '; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;'\n )\n const table = div.appendChild(dom.createElement('table'))\n const main = table.appendChild(dom.createElement('tr'))\n const bottom = table.appendChild(dom.createElement('tr'))\n const statusArea = bottom.appendChild(dom.createElement('div'))\n statusArea.setAttribute('style', 'padding: 0.7em;')\n render(dom, main, statusArea).catch(err => statusArea.appendChild(widgets.errorMessageBlock(dom, err)))\n return div\n }\n}\n\nasync function render (dom, main, statusArea): Promise<void> {\n const authContext = await authn.logInLoadProfile({ dom: dom, div: main, statusArea: statusArea, me: null })\n const subject = authContext.me as NamedNode\n\n const profile = subject.doc()\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n const editable = store.updater.editable(profile.uri, store)\n\n main.appendChild(createText('h3', 'Manage your trusted applications'))\n\n if (!editable) {\n main.appendChild(\n widgets.errorMessageBlock(dom, `Your profile ${subject.doc().uri} is not editable, so we cannot do much here.`)\n )\n return\n }\n\n main.appendChild(createText('p', 'Here you can manage the applications you trust.'))\n\n const applicationsTable = createApplicationTable(subject)\n main.appendChild(applicationsTable)\n\n main.appendChild(createText('h4', 'Notes'))\n main.appendChild(\n createContainer('ol', [\n main.appendChild(\n createText(\n 'li',\n 'Trusted applications will get access to all resources that you have access to.'\n )\n ),\n main.appendChild(\n createText('li', 'You can limit which modes they have by default.')\n ),\n main.appendChild(\n createText('li', 'They will not gain more access than you have.')\n )\n ])\n )\n main.appendChild(\n createText('p', 'Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app.')\n )\n}\n\nexport default trustedApplicationView\n"],"file":"trustedApplications.view.js"}
1
+ {"version":3,"file":"trustedApplications.view.js","sourceRoot":"","sources":["../../src/trustedApplications/trustedApplications.view.ts"],"names":[],"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EAAC,IAAI,EAAE;wBACpB,IAAI,CAAC,WAAW,CACd,IAAA,oCAAU,EACR,IAAI,EACJ,gFAAgF,CACjF,CACF;wBACD,IAAI,CAAC,WAAW,CACd,IAAA,oCAAU,EAAC,IAAI,EAAE,iDAAiD,CAAC,CACpE;wBACD,IAAI,CAAC,WAAW,CACd,IAAA,oCAAU,EAAC,IAAI,EAAE,+CAA+C,CAAC,CAClE;qBACF,CAAC,CACH,CAAA;oBACD,IAAI,CAAC,WAAW,CACd,IAAA,oCAAU,EAAC,GAAG,EAAE,2HAA2H,CAAC,CAC7I,CAAA;;;;;CACF;AAED,kBAAe,sBAAsB,CAAA"}
package/lib/types.js CHANGED
@@ -1,6 +1,3 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
2
+ Object.defineProperty(exports, "__esModule", { value: true });
6
3
  //# sourceMappingURL=types.js.map
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"types.js"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -1,31 +1,26 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _default = {
8
- buildTime: '2021-12-22T16:03:19Z',
9
- commit: 'f9aeaef823bbf98714208cdce56371653618e0be',
10
- npmInfo: {
11
- 'solid-panes': '3.5.12',
12
- npm: '6.14.13',
13
- ares: '1.17.1',
14
- brotli: '1.0.9',
15
- cldr: '39.0',
16
- icu: '69.1',
17
- llhttp: '2.1.3',
18
- modules: '83',
19
- napi: '8',
20
- nghttp2: '1.42.0',
21
- node: '14.17.3',
22
- openssl: '1.1.1k',
23
- tz: '2021a',
24
- unicode: '13.0',
25
- uv: '1.41.0',
26
- v8: '8.4.371.23-node.67',
27
- zlib: '1.2.11'
28
- }
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ buildTime: '2022-01-18T23:23:17Z',
5
+ commit: '36b208831217a00e6be5f0fb39a379468f906c2b',
6
+ npmInfo: {
7
+ 'solid-panes': '3.5.14',
8
+ npm: '6.14.13',
9
+ ares: '1.17.1',
10
+ brotli: '1.0.9',
11
+ cldr: '39.0',
12
+ icu: '69.1',
13
+ llhttp: '2.1.3',
14
+ modules: '83',
15
+ napi: '8',
16
+ nghttp2: '1.42.0',
17
+ node: '14.17.3',
18
+ openssl: '1.1.1k',
19
+ tz: '2021a',
20
+ unicode: '13.0',
21
+ uv: '1.41.0',
22
+ v8: '8.4.371.23-node.67',
23
+ zlib: '1.2.11'
24
+ }
29
25
  };
30
- exports["default"] = _default;
31
26
  //# sourceMappingURL=versionInfo.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/versionInfo.ts"],"names":["buildTime","commit","npmInfo","npm","ares","brotli","cldr","icu","llhttp","modules","napi","nghttp2","node","openssl","tz","unicode","uv","v8","zlib"],"mappings":";;;;;;eAAe;AACbA,EAAAA,SAAS,EAAE,sBADE;AAEbC,EAAAA,MAAM,EAAE,0CAFK;AAGbC,EAAAA,OAAO,EACT;AACE,mBAAe,QADjB;AAEEC,IAAAA,GAAG,EAAE,SAFP;AAGEC,IAAAA,IAAI,EAAE,QAHR;AAIEC,IAAAA,MAAM,EAAE,OAJV;AAKEC,IAAAA,IAAI,EAAE,MALR;AAMEC,IAAAA,GAAG,EAAE,MANP;AAOEC,IAAAA,MAAM,EAAE,OAPV;AAQEC,IAAAA,OAAO,EAAE,IARX;AASEC,IAAAA,IAAI,EAAE,GATR;AAUEC,IAAAA,OAAO,EAAE,QAVX;AAWEC,IAAAA,IAAI,EAAE,SAXR;AAYEC,IAAAA,OAAO,EAAE,QAZX;AAaEC,IAAAA,EAAE,EAAE,OAbN;AAcEC,IAAAA,OAAO,EAAE,MAdX;AAeEC,IAAAA,EAAE,EAAE,QAfN;AAgBEC,IAAAA,EAAE,EAAE,oBAhBN;AAiBEC,IAAAA,IAAI,EAAE;AAjBR;AAJe,C","sourcesContent":["export default {\n buildTime: '2021-12-22T16:03:19Z',\n commit: 'f9aeaef823bbf98714208cdce56371653618e0be',\n npmInfo:\n{\n 'solid-panes': '3.5.12',\n npm: '6.14.13',\n ares: '1.17.1',\n brotli: '1.0.9',\n cldr: '39.0',\n icu: '69.1',\n llhttp: '2.1.3',\n modules: '83',\n napi: '8',\n nghttp2: '1.42.0',\n node: '14.17.3',\n openssl: '1.1.1k',\n tz: '2021a',\n unicode: '13.0',\n uv: '1.41.0',\n v8: '8.4.371.23-node.67',\n zlib: '1.2.11'\n}\n}\n"],"file":"versionInfo.js"}
1
+ {"version":3,"file":"versionInfo.js","sourceRoot":"","sources":["../src/versionInfo.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,SAAS,EAAE,sBAAsB;IACjC,MAAM,EAAE,0CAA0C;IAClD,OAAO,EACT;QACE,aAAa,EAAE,QAAQ;QACvB,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,OAAO;QACf,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,MAAM;QACX,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,QAAQ;QACjB,EAAE,EAAE,OAAO;QACX,OAAO,EAAE,MAAM;QACf,EAAE,EAAE,QAAQ;QACZ,EAAE,EAAE,oBAAoB;QACxB,IAAI,EAAE,QAAQ;KACf;CACA,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-panes",
3
- "version": "3.5.13",
3
+ "version": "3.5.14-alpha",
4
4
  "description": "Solid-compatible Panes: applets and views for the mashlib and databrowser",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -54,18 +54,18 @@
54
54
  "contacts-pane": "^2.5.6",
55
55
  "folder-pane": "^2.4.10",
56
56
  "issue-pane": "^2.4.8",
57
- "markdown-pane": "^0.2.1",
58
57
  "marked": "^4.0.8",
59
58
  "meeting-pane": "^2.3.7",
60
59
  "mime-types": "^2.1.34",
61
- "pane-registry": "^2.4.5",
60
+ "pane-registry": "^2.4.5-alpha",
62
61
  "path-browserify": "^1.0.1",
63
62
  "profile-pane": "^1.0.4",
64
63
  "rdflib": "^2.2.15",
65
64
  "react": "^17.0.2",
66
65
  "react-dom": "^17.0.2",
66
+ "solid-logic": "^1.3.12",
67
67
  "solid-namespace": "^0.5.2",
68
- "solid-ui": "^2.4.14",
68
+ "solid-ui": "^2.4.14-alpha",
69
69
  "source-pane": "^2.2.13"
70
70
  },
71
71
  "devDependencies": {
package/src/index.ts CHANGED
@@ -14,6 +14,7 @@
14
14
  // var UI = require('solid-ui') // Note we will add the panes register to this.
15
15
  import versionInfo from './versionInfo'
16
16
  import * as UI from 'solid-ui'
17
+ import { LiveStore } from 'solid-logic'
17
18
  import OutlineManager from './outline/manager.js'
18
19
  import registerPanes from './registerPanes.js'
19
20
  import {
@@ -21,10 +22,10 @@ import {
21
22
  paneForIcon,
22
23
  paneForPredicate,
23
24
  register,
24
- byName,
25
- LiveStore
25
+ byName
26
26
  } from 'pane-registry'
27
27
  import { createContext } from './outline/context'
28
+ import initMainPage from './mainPage'
28
29
 
29
30
  export function getOutliner (dom) {
30
31
  if (!dom.outlineManager) {
@@ -61,4 +62,4 @@ export {
61
62
  // where there are many occurrences of window and of window.document
62
63
  // But each DOM should have just one outline manager.
63
64
 
64
- export { OutlineManager, UI, versionInfo }
65
+ export { OutlineManager, UI, versionInfo, initMainPage }
@@ -0,0 +1,19 @@
1
+ import { IndexedFormula } from 'rdflib'
2
+ import { initFooter } from 'solid-ui'
3
+
4
+ /**
5
+ * links in the footer
6
+ */
7
+ const SOLID_PROJECT_URL = 'https://solidproject.org'
8
+ const SOLID_PROJECT_NAME = 'solidproject.org'
9
+
10
+ export function createFooter (store: IndexedFormula) {
11
+ initFooter(store, setFooterOptions())
12
+ }
13
+
14
+ function setFooterOptions () {
15
+ return {
16
+ solidProjectUrl: SOLID_PROJECT_URL,
17
+ solidProjectName: SOLID_PROJECT_NAME
18
+ }
19
+ }
@@ -0,0 +1,75 @@
1
+ import { icons, authn, initHeader } from 'solid-ui'
2
+ /**
3
+ * menu icons
4
+ */
5
+ const HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'
6
+ const SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'
7
+
8
+ /**
9
+ * menu elements
10
+ */
11
+ const USER_GUIDE_MENU_ITEM = 'User guide'
12
+ const REPORT_A_PROBLEM_MENU_ITEM = 'Report a problem'
13
+ const SHOW_YOUR_PROFILE_MENU_ITEM = 'Show your profile'
14
+ const LOG_OUT_MENU_ITEM = 'Log out'
15
+ /**
16
+ * URLS
17
+ */
18
+ const USER_GUIDE_MENU_URL = 'https://solid.github.io/userguide/'
19
+ const REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solid/solidos/issues'
20
+
21
+ export async function createHeader (store, outliner) {
22
+ initHeader(store, await setUserMenu(outliner), setHeaderOptions())
23
+ }
24
+
25
+ function setHeaderOptions () {
26
+ const helpMenuList = [
27
+ { label: USER_GUIDE_MENU_ITEM, url: USER_GUIDE_MENU_URL, target: '_blank' },
28
+ { label: REPORT_A_PROBLEM_MENU_ITEM, url: REPORT_A_PROBLEM_MENU_URL, target: '_blank' }
29
+ ]
30
+ const headerOptions = { logo: SOLID_ICON_URL, helpIcon: HELP_MENU_ICON, helpMenuList: helpMenuList }
31
+
32
+ return headerOptions
33
+ }
34
+
35
+ async function setUserMenu (outliner: any) {
36
+ const showProfile = {
37
+ label: SHOW_YOUR_PROFILE_MENU_ITEM,
38
+ onclick: () => openUserProfile(outliner)
39
+ }
40
+
41
+ const logOut = {
42
+ label: LOG_OUT_MENU_ITEM,
43
+ onclick: () => {
44
+ authn.authSession.logout()
45
+ }
46
+ }
47
+
48
+ // the order of the menu is important here, show profile first and logout last
49
+ let userMenuList = [showProfile]
50
+ userMenuList = userMenuList.concat(await getMenuItems(outliner))
51
+ userMenuList.push(logOut)
52
+
53
+ return userMenuList
54
+ }
55
+
56
+ function openUserProfile (outliner: any) {
57
+ outliner.GotoSubject(authn.currentUser(), true, undefined, true, undefined)
58
+ location.reload()
59
+ }
60
+
61
+ async function getMenuItems (outliner: any) {
62
+ const items = await outliner.getDashboardItems()
63
+ return items.map((element) => {
64
+ return {
65
+ label: element.label,
66
+ onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)
67
+ }
68
+ })
69
+ }
70
+
71
+ async function openDashboardPane (outliner: any, pane: string): Promise<void> {
72
+ outliner.showDashboard({
73
+ pane
74
+ })
75
+ }
@@ -0,0 +1,20 @@
1
+ /* Main Page
2
+ **
3
+ ** This code is called in mashlib and renders the header and footer of the Databrowser.
4
+ */
5
+
6
+ import { IndexedFormula, NamedNode } from 'rdflib'
7
+ import { getOutliner } from '../index'
8
+ import { createHeader } from './header'
9
+ import { createFooter } from './footer'
10
+
11
+ export default async function initMainPage (store: IndexedFormula, uri?: string|NamedNode|null) {
12
+ const outliner = getOutliner(document)
13
+ uri = uri || window.location.href
14
+ let subject = uri
15
+ if (typeof uri === 'string') subject = store.sym(uri)
16
+ outliner.GotoSubject(subject, true, undefined, true, undefined)
17
+ const header = createHeader(store, outliner)
18
+ const footer = createFooter(store)
19
+ return Promise.all([header, footer])
20
+ }
@@ -1,6 +1,6 @@
1
- import { DataBrowserContext, LiveStore, PaneRegistry } from 'pane-registry'
1
+ import { DataBrowserContext, PaneRegistry } from 'pane-registry'
2
2
  import { getOutliner } from '../index'
3
- import { SolidLogic } from 'solid-logic'
3
+ import { SolidLogic, LiveStore } from 'solid-logic'
4
4
 
5
5
  export function createContext (
6
6
  dom: HTMLDocument,
@@ -392,6 +392,7 @@ export default function (context) {
392
392
 
393
393
  async function getDashboardItems () {
394
394
  const me = UI.authn.currentUser()
395
+ if (!me) return []
395
396
  const div = dom.createElement('div')
396
397
  const [books, pods] = await Promise.all([getAddressBooks(), getPods()])
397
398
  return [
@@ -1,9 +1,9 @@
1
1
  export default {
2
- buildTime: '2021-12-22T16:03:19Z',
3
- commit: 'f9aeaef823bbf98714208cdce56371653618e0be',
2
+ buildTime: '2022-01-18T23:23:17Z',
3
+ commit: '36b208831217a00e6be5f0fb39a379468f906c2b',
4
4
  npmInfo:
5
5
  {
6
- 'solid-panes': '3.5.12',
6
+ 'solid-panes': '3.5.14',
7
7
  npm: '6.14.13',
8
8
  ares: '1.17.1',
9
9
  brotli: '1.0.9',