meeting-pane 2.3.7-bbf45639 → 2.3.7-bbf45639-1
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/lib/index.js +105 -0
- package/lib/index.js.map +1 -0
- package/lib/meetingDetailsForm.js +4 -0
- package/lib/meetingDetailsForm.js.map +1 -0
- package/lib/meetingPane.js +1055 -0
- package/lib/meetingPane.js.map +1 -0
- package/package.json +1 -1
package/lib/index.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); } }
|
|
4
|
+
|
|
5
|
+
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); }); }; }
|
|
6
|
+
|
|
7
|
+
var MeetingPane = require('./meetingPane.js');
|
|
8
|
+
|
|
9
|
+
var $rdf = require('rdflib');
|
|
10
|
+
|
|
11
|
+
var UI = require('solid-ui'); // const SolidAuth = require('solid-auth-client')
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
function appendMeetingPane(_x, _x2) {
|
|
15
|
+
return _appendMeetingPane.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _appendMeetingPane() {
|
|
19
|
+
_appendMeetingPane = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dom, uri) {
|
|
20
|
+
var subject, doc, context, options, paneDiv;
|
|
21
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
22
|
+
while (1) {
|
|
23
|
+
switch (_context.prev = _context.next) {
|
|
24
|
+
case 0:
|
|
25
|
+
subject = $rdf.sym(uri);
|
|
26
|
+
doc = subject.doc();
|
|
27
|
+
_context.next = 4;
|
|
28
|
+
return new Promise(function (resolve, reject) {
|
|
29
|
+
UI.store.fetcher.load(doc).then(resolve, reject);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
case 4:
|
|
33
|
+
context = {
|
|
34
|
+
// see https://github.com/solid/solid-panes/blob/005f90295d83e499fd626bd84aeb3df10135d5c1/src/index.ts#L30-L34
|
|
35
|
+
dom: dom,
|
|
36
|
+
session: {
|
|
37
|
+
store: UI.store
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
options = {};
|
|
41
|
+
paneDiv = MeetingPane.render(subject, context, options);
|
|
42
|
+
dom.body.appendChild(paneDiv);
|
|
43
|
+
|
|
44
|
+
case 8:
|
|
45
|
+
case "end":
|
|
46
|
+
return _context.stop();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}, _callee);
|
|
50
|
+
}));
|
|
51
|
+
return _appendMeetingPane.apply(this, arguments);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
document.addEventListener('DOMContentLoaded', function () {
|
|
55
|
+
// Set up the view for the subject indicated in the fragment of the window's URL
|
|
56
|
+
var uri = decodeURIComponent(window.location.hash.substr(1));
|
|
57
|
+
|
|
58
|
+
if (uri.length === 0) {
|
|
59
|
+
// window.location = '?#' + encodeURIComponent('https://michielbdejong.inrupt.net/meetings/Data%20browser%2016%20Dec%202019/index.ttl#this')
|
|
60
|
+
window.location = '?#' + encodeURIComponent('https://timbl.com/timbl/Public/Test/Meeting/Brainstorming/index.ttl#this');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
appendMeetingPane(document, uri);
|
|
64
|
+
}); // window.onload = () => {
|
|
65
|
+
|
|
66
|
+
console.log('document ready');
|
|
67
|
+
var loginBanner = document.getElementById('loginBanner');
|
|
68
|
+
loginBanner.appendChild(UI.authn.loginStatusBox(document, null, {}));
|
|
69
|
+
|
|
70
|
+
function finishLogin() {
|
|
71
|
+
return _finishLogin.apply(this, arguments);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function _finishLogin() {
|
|
75
|
+
_finishLogin = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
76
|
+
var session;
|
|
77
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
78
|
+
while (1) {
|
|
79
|
+
switch (_context2.prev = _context2.next) {
|
|
80
|
+
case 0:
|
|
81
|
+
_context2.next = 2;
|
|
82
|
+
return UI.authn.authSession.handleIncomingRedirect();
|
|
83
|
+
|
|
84
|
+
case 2:
|
|
85
|
+
session = UI.authn.authSession;
|
|
86
|
+
|
|
87
|
+
if (session.info.isLoggedIn) {
|
|
88
|
+
console.log("Logged in as ".concat(session.webId));
|
|
89
|
+
document.getElementById('loginBanner').innerHTML = "Logged in as ".concat(UI.authn.currentUser().uri);
|
|
90
|
+
} else {
|
|
91
|
+
console.log('The user is not logged in'); // document.getElementById('loginBanner').innerHTML = '<button onclick="popupLogin()">Log in</button>'
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
case 4:
|
|
95
|
+
case "end":
|
|
96
|
+
return _context2.stop();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}, _callee2);
|
|
100
|
+
}));
|
|
101
|
+
return _finishLogin.apply(this, arguments);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
finishLogin(); // }
|
|
105
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["MeetingPane","require","$rdf","UI","appendMeetingPane","dom","uri","subject","sym","doc","Promise","resolve","reject","store","fetcher","load","then","context","session","options","paneDiv","render","body","appendChild","document","addEventListener","decodeURIComponent","window","location","hash","substr","length","encodeURIComponent","console","log","loginBanner","getElementById","authn","loginStatusBox","finishLogin","authSession","handleIncomingRedirect","info","is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J,KAAe,CAAnB,EAAsB;AACpB;AACAJ,IAAAA,MAAM,CAACC,QAAP,GAAkB,OAAOI,kBAAkB,CAAC,0EAAD,CAA3C;AACD;;AACD5B,EAAAA,iBAAiB,CAACoB,QAAD,EAAWlB,GAAX,CAAjB;AACD,CARD,E,CAUA;;AACA2B,OAAO,CAACC,GAAR,CAAY,gBAAZ;AACA,IAAMC,WAAW,GAAGX,QAAQ,CAACY,cAAT,CAAwB,aAAxB,CAApB;AACAD,WAAW,CAACZ,WAAZ,CAAwBpB,EAAE,CAACkC,KAAH,CAASC,cAAT,CAAwBd,QAAxB,EAAkC,IAAlC,EAAwC,EAAxC,CAAxB;;SAEee,W;;;;;yEAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBACQpC,EAAE,CAACkC,KAAH,CAASG,WAAT,CAAqBC,sBAArB,EADR;;AAAA;AAEQvB,YAAAA,OAFR,GAEkBf,EAAE,CAACkC,KAAH,CAASG,WAF3B;;AAGE,gBAAItB,OAAO,CAACwB,IAAR,CAAaC,UAAjB,EAA6B;AAC3BV,cAAAA,OAAO,CAACC,GAAR,wBAA4BhB,OAAO,CAAC0B,KAApC;AAEApB,cAAAA,QAAQ,CAACY,cAAT,CAAwB,aAAxB,EAAuCS,SAAvC,0BAAmE1C,EAAE,CAACkC,KAAH,CAASS,WAAT,GAAuBxC,GAA1F;AACD,aAJD,MAIO;AACL2B,cAAAA,OAAO,CAACC,GAAR,CAAY,2BAAZ,EADK,CAEL;AACD;;AAVH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AAaAK,WAAW,G,CACX","sourcesContent":["const MeetingPane = require('./meetingPane.js')\nconst $rdf = require('rdflib')\nconst UI = require('solid-ui')\n// const SolidAuth = require('solid-auth-client')\n\nasync function appendMeetingPane (dom, uri) {\n const subject = $rdf.sym(uri)\n const doc = subject.doc()\n\n await new Promise((resolve, reject) => {\n UI.store.fetcher.load(doc).then(resolve, reject)\n })\n const context = { // see https://github.com/solid/solid-panes/blob/005f90295d83e499fd626bd84aeb3df10135d5c1/src/index.ts#L30-L34\n dom,\n session: {\n store: UI.store\n }\n }\n const options = {}\n\n const paneDiv = MeetingPane.render(subject, context, options)\n dom.body.appendChild(paneDiv)\n}\n\ndocument.addEventListener('DOMContentLoaded', function () {\n // Set up the view for the subject indicated in the fragment of the window's URL\n const uri = decodeURIComponent(window.location.hash.substr(1))\n if (uri.length === 0) {\n // window.location = '?#' + encodeURIComponent('https://michielbdejong.inrupt.net/meetings/Data%20browser%2016%20Dec%202019/index.ttl#this')\n window.location = '?#' + encodeURIComponent('https://timbl.com/timbl/Public/Test/Meeting/Brainstorming/index.ttl#this')\n }\n appendMeetingPane(document, uri)\n})\n\n// window.onload = () => {\nconsole.log('document ready')\nconst loginBanner = document.getElementById('loginBanner')\nloginBanner.appendChild(UI.authn.loginStatusBox(document, null, {}))\n\nasync function finishLogin () {\n await UI.authn.authSession.handleIncomingRedirect()\n const session = UI.authn.authSession\n if (session.info.isLoggedIn) {\n console.log(`Logged in as ${session.webId}`)\n\n document.getElementById('loginBanner').innerHTML = `Logged in as ${UI.authn.currentUser().uri}`\n } else {\n console.log('The user is not logged in')\n // document.getElementById('loginBanner').innerHTML = '<button onclick=\"popupLogin()\">Log in</button>'\n }\n}\n\nfinishLogin()\n// }\n"],"file":"index.js"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = "@prefix : <http://www.w3.org/ns/ui#> .\n@prefix f: <#> .\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix cal: <http://www.w3.org/2002/12/cal/ical#>.\n@prefix meeting: <http://www.w3.org/ns/pim/meeting#>.\n@prefix ns: <http://www.w3.org/2006/vcard/ns#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix te: <http://purl.org/dc/terms/> .\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n\n f:main a :Form;\n cal:summary \"Meeting Details\";\n :part f:titleField, f:locationField, f:startField,\n f:endField, f:eventComment, f:colorField .\n\n f:titleField a :SingleLineTextField;\n :maxLength 256;\n :property cal:summary;\n :label \"Name of meeting\";\n :size 80 .\n\n f:locationField a :SingleLineTextField;\n :maxLength 128;\n :property cal:location;\n :size 40 .\n\n f:startField a :DateField;\n :label \"Start\";\n :property cal:dtstart .\n\n f:endField a :DateField;\n :label \"End\";\n :property cal:dtend .\n\n f:colorField a :ColorField;\n :label \"Tab color\";\n # :default \"#ddddcc\"^^xsd:color;\n :property ui:backgroundColor .\n\n f:eventComment\n a ui:MultiLineTextField;\n # ui:maxLength\n # \"1048\";\n # ui:size\n # \"40\".\n ui:property\n cal:comment.\n\n###################################################\n\nf:settings a :Form;\n dc:title \"Tab settings\";\n :part f:labelField, f:targetField, f:viewField.\n\n f:labelField a :SingleLineTextField;\n :maxLength 128;\n :property rdfs:label;\n :label \"Label on tab\";\n :size 40 .\n\n f:targetField a :NamedNodeURIField;\n :maxLength 1024; # Longer?\n :property meeting:target;\n :label \"URL of resource\";\n :size 80 .\n\n f:colorField2 a :ColorField;\n :label \"Tab color\";\n # :default \"#ddddcc\"^^xsd:color;\n :property ui:backgroundColor .\n\n f:viewField a :SingleLineTextField;\n :maxLength 128;\n :property meeting:view;\n :label \"View mode (experts only)\";\n :size 40 .\n\n#\n";
|
|
4
|
+
//# sourceMappingURL=meetingDetailsForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/meetingDetailsForm.js"],"names":["module","exports"],"mappings":";;AAAAA,MAAM,CAACC,OAAP","sourcesContent":["module.exports = `@prefix : <http://www.w3.org/ns/ui#> .\n@prefix f: <#> .\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix cal: <http://www.w3.org/2002/12/cal/ical#>.\n@prefix meeting: <http://www.w3.org/ns/pim/meeting#>.\n@prefix ns: <http://www.w3.org/2006/vcard/ns#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix te: <http://purl.org/dc/terms/> .\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n\n f:main a :Form;\n cal:summary \"Meeting Details\";\n :part f:titleField, f:locationField, f:startField,\n f:endField, f:eventComment, f:colorField .\n\n f:titleField a :SingleLineTextField;\n :maxLength 256;\n :property cal:summary;\n :label \"Name of meeting\";\n :size 80 .\n\n f:locationField a :SingleLineTextField;\n :maxLength 128;\n :property cal:location;\n :size 40 .\n\n f:startField a :DateField;\n :label \"Start\";\n :property cal:dtstart .\n\n f:endField a :DateField;\n :label \"End\";\n :property cal:dtend .\n\n f:colorField a :ColorField;\n :label \"Tab color\";\n # :default \"#ddddcc\"^^xsd:color;\n :property ui:backgroundColor .\n\n f:eventComment\n a ui:MultiLineTextField;\n # ui:maxLength\n # \"1048\";\n # ui:size\n # \"40\".\n ui:property\n cal:comment.\n\n###################################################\n\nf:settings a :Form;\n dc:title \"Tab settings\";\n :part f:labelField, f:targetField, f:viewField.\n\n f:labelField a :SingleLineTextField;\n :maxLength 128;\n :property rdfs:label;\n :label \"Label on tab\";\n :size 40 .\n\n f:targetField a :NamedNodeURIField;\n :maxLength 1024; # Longer?\n :property meeting:target;\n :label \"URL of resource\";\n :size 80 .\n\n f:colorField2 a :ColorField;\n :label \"Tab color\";\n # :default \"#ddddcc\"^^xsd:color;\n :property ui:backgroundColor .\n\n f:viewField a :SingleLineTextField;\n :maxLength 128;\n :property meeting:view;\n :label \"View mode (experts only)\";\n :size 40 .\n\n#\n`\n"],"file":"meetingDetailsForm.js"}
|