meeting-pane 2.3.6 → 2.3.8

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 CHANGED
@@ -8,24 +8,23 @@ var MeetingPane = require('./meetingPane.js');
8
8
 
9
9
  var $rdf = require('rdflib');
10
10
 
11
- var UI = require('solid-ui');
11
+ var UI = require('solid-ui'); // const SolidAuth = require('solid-auth-client')
12
12
 
13
- var SolidAuth = require('solid-auth-client');
14
13
 
15
14
  function appendMeetingPane(_x, _x2) {
16
15
  return _appendMeetingPane.apply(this, arguments);
17
16
  }
18
17
 
19
18
  function _appendMeetingPane() {
20
- _appendMeetingPane = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(dom, uri) {
19
+ _appendMeetingPane = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dom, uri) {
21
20
  var subject, doc, context, options, paneDiv;
22
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
21
+ return regeneratorRuntime.wrap(function _callee$(_context) {
23
22
  while (1) {
24
- switch (_context2.prev = _context2.next) {
23
+ switch (_context.prev = _context.next) {
25
24
  case 0:
26
25
  subject = $rdf.sym(uri);
27
26
  doc = subject.doc();
28
- _context2.next = 4;
27
+ _context.next = 4;
29
28
  return new Promise(function (resolve, reject) {
30
29
  UI.store.fetcher.load(doc).then(resolve, reject);
31
30
  });
@@ -44,10 +43,10 @@ function _appendMeetingPane() {
44
43
 
45
44
  case 8:
46
45
  case "end":
47
- return _context2.stop();
46
+ return _context.stop();
48
47
  }
49
48
  }
50
- }, _callee2);
49
+ }, _callee);
51
50
  }));
52
51
  return _appendMeetingPane.apply(this, arguments);
53
52
  }
@@ -57,61 +56,50 @@ document.addEventListener('DOMContentLoaded', function () {
57
56
  var uri = decodeURIComponent(window.location.hash.substr(1));
58
57
 
59
58
  if (uri.length === 0) {
60
- window.location = '?#' + encodeURIComponent('https://michielbdejong.inrupt.net/meetings/Data%20browser%2016%20Dec%202019/index.ttl#this');
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
61
  }
62
62
 
63
63
  appendMeetingPane(document, uri);
64
- });
65
-
66
- window.onload = function () {
67
- console.log('document ready');
68
- SolidAuth.trackSession(function (session) {
69
- if (!session) {
70
- console.log('The user is not logged in');
71
- document.getElementById('loginBanner').innerHTML = '<button onclick="popupLogin()">Log in</button>';
72
- } else {
73
- console.log("Logged in as ".concat(session.webId));
74
- document.getElementById('loginBanner').innerHTML = "Logged in as ".concat(session.webId, " <button onclick=\"logout()\">Log out</button>");
75
- }
76
- });
77
- };
78
-
79
- window.logout = function () {
80
- SolidAuth.logout();
81
- window.location = '';
82
- };
83
-
84
- window.popupLogin = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
85
- var session, popupUri;
86
- return regeneratorRuntime.wrap(function _callee$(_context) {
87
- while (1) {
88
- switch (_context.prev = _context.next) {
89
- case 0:
90
- _context.next = 2;
91
- return SolidAuth.currentSession();
92
-
93
- case 2:
94
- session = _context.sent;
95
- popupUri = 'https://solid.community/common/popup.html';
96
-
97
- if (session) {
98
- _context.next = 8;
99
- break;
100
- }
101
-
102
- _context.next = 7;
103
- return SolidAuth.popupLogin({
104
- popupUri: popupUri
105
- });
106
-
107
- case 7:
108
- session = _context.sent;
109
-
110
- case 8:
111
- case "end":
112
- return _context.stop();
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
+ }
113
98
  }
114
- }
115
- }, _callee);
116
- }));
99
+ }, _callee2);
100
+ }));
101
+ return _finishLogin.apply(this, arguments);
102
+ }
103
+
104
+ finishLogin(); // }
117
105
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["MeetingPane","require","$rdf","UI","SolidAuth","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","onload","console","log","trackSession","getElementById","innerHTML","webId","logout","popupLogin","currentSession","popupUri"],"mappings":";;;;;;AAAA,IAAMA,WAAW,GAAGC,OAAO,CAAC,kBAAD,CAA3B;;AACA,IAAMC,IAAI,GAAGD,OAAO,CAAC,QAAD,CAApB;;AACA,IAAME,EAAE,GAAGF,OAAO,CAAC,UAAD,CAAlB;;AACA,IAAMG,SAAS,GAAGH,OAAO,CAAC,mBAAD,CAAzB;;SAEeI,iB;;;;;+EAAf,kBAAkCC,GAAlC,EAAuCC,GAAvC;AAAA;AAAA;AAAA;AAAA;AAAA;AACQC,YAAAA,OADR,GACkBN,IAAI,CAACO,GAAL,CAASF,GAAT,CADlB;AAEQG,Y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B,MAAAA,OAAO,CAACC,GAAR,CAAY,2BAAZ;AACAX,MAAAA,QAAQ,CAACa,cAAT,CAAwB,aAAxB,EAAuCC,SAAvC,GAAmD,gDAAnD;AACD,KAHD,MAGO;AACLJ,MAAAA,OAAO,CAACC,GAAR,wBAA4BjB,OAAO,CAACqB,KAApC;AAEAf,MAAAA,QAAQ,CAACa,cAAT,CAAwB,aAAxB,EAAuCC,SAAvC,0BAAmEpB,OAAO,CAACqB,KAA3E;AACD;AACF,GATD;AAUD,CAZD;;AAaAZ,MAAM,CAACa,MAAP,GAAgB,YAAM;AACpBrC,EAAAA,SAAS,CAACqC,MAAV;AACAb,EAAAA,MAAM,CAACC,QAAP,GAAkB,EAAlB;AACD,CAHD;;AAIAD,MAAM,CAACc,UAAP,wEAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBACEtC,SAAS,CAACuC,cAAV,EADF;;AAAA;AACdxB,UAAAA,OADc;AAEZyB,UAAAA,QAFY,GAED,2CAFC;;AAAA,cAGbzB,OAHa;AAAA;AAAA;AAAA;;AAAA;AAAA,iBAIAf,SAAS,CAACsC,UAAV,CAAqB;AAAEE,YAAAA,QAAQ,EAARA;AAAF,WAArB,CAJA;;AAAA;AAIhBzB,UAAAA,OAJgB;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAApB","sourcesContent":["const MeetingPane = require('./meetingPane.js')\nconst $rdf = require('rdflib')\nconst UI = require('solid-ui')\nconst 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 }\n appendMeetingPane(document, uri)\n})\n\nwindow.onload = () => {\n console.log('document ready')\n SolidAuth.trackSession(session => {\n if (!session) {\n console.log('The user is not logged in')\n document.getElementById('loginBanner').innerHTML = '<button onclick=\"popupLogin()\">Log in</button>'\n } else {\n console.log(`Logged in as ${session.webId}`)\n\n document.getElementById('loginBanner').innerHTML = `Logged in as ${session.webId} <button onclick=\"logout()\">Log out</button>`\n }\n })\n}\nwindow.logout = () => {\n SolidAuth.logout()\n window.location = ''\n}\nwindow.popupLogin = async function () {\n let session = await SolidAuth.currentSession()\n const popupUri = 'https://solid.community/common/popup.html'\n if (!session) {\n session = await SolidAuth.popupLogin({ popupUri })\n }\n}\n"],"file":"index.js"}
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","isLoggedIn","webId","innerHTML","currentUser"],"mappings":";;;;;;AAAA,IAAMA,WAAW,GAAGC,OAAO,CAAC,kBAAD,CAA3B;;AACA,IAAMC,IAAI,GAAGD,OAAO,CAAC,QAAD,CAApB;;AACA,IAAME,EAAE,GAAGF,OAAO,CAAC,UAAD,CAAlB,C,CACA;;;SAEeG,iB;;;;;+EAAf,iBAAkCC,GAAlC,EAAuCC,GAAvC;AAAA;AAAA;AAAA;AAAA;AAAA;AACQC,YAAAA,OADR,GACkBL,IAAI,CAACM,GAAL,CAASF,GAAT,CADlB;AAEQG,YAAAA,GAF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,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meeting-pane",
3
- "version": "2.3.6",
3
+ "version": "2.3.8",
4
4
  "description": "Solid-compatible Panes: meeting collaborative tool",
5
5
  "main": "./lib/meetingPane.js",
6
6
  "files": [
@@ -49,20 +49,21 @@
49
49
  "buffer": "^6.0.3",
50
50
  "crypto-browserify": "^3.12.0",
51
51
  "path-browserify": "^1.0.1",
52
- "solid-ui": "^2.4.10"
52
+ "rdflib": "^2.2.17",
53
+ "solid-ui": "^2.4.15"
53
54
  },
54
55
  "devDependencies": {
55
- "@babel/cli": "^7.15.7",
56
- "@babel/core": "^7.15.8",
57
- "@babel/preset-env": "^7.15.8",
56
+ "@babel/cli": "^7.16.0",
57
+ "@babel/core": "^7.16.0",
58
+ "@babel/preset-env": "^7.16.0",
58
59
  "eslint": "^7.32.0",
59
60
  "html-webpack-plugin": "^4.5.2",
60
- "husky": "^7.0.2",
61
- "lint-staged": "^11.2.3",
61
+ "husky": "^7.0.4",
62
+ "lint-staged": "^11.2.6",
62
63
  "standard": "^16.0.4",
63
64
  "webpack": "^4.46.0",
64
65
  "webpack-cli": "^3.3.12",
65
- "webpack-dev-server": "^4.3.1"
66
+ "webpack-dev-server": "^4.4.0"
66
67
  },
67
68
  "husky": {
68
69
  "hooks": {