solid-ui 2.5.1 → 2.6.0
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 +4 -0
- package/dist/841.solid-ui.min.js +1 -1
- package/dist/841.solid-ui.min.js.map +1 -1
- package/dist/_2b19.solid-ui.js.map +1 -1
- package/dist/solid-ui.js +42754 -45728
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +1 -1
- package/dist/solid-ui.min.js.LICENSE.txt +1 -5
- package/dist/solid-ui.min.js.map +1 -1
- package/lib/acl/access-controller.js +48 -49
- package/lib/acl/access-controller.js.map +1 -1
- package/lib/acl/access-groups.js +40 -40
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl-control.js +18 -19
- package/lib/acl/acl-control.js.map +1 -1
- package/lib/acl/acl.js +4 -5
- package/lib/acl/acl.js.map +1 -1
- package/lib/acl/add-agent-buttons.js +51 -52
- package/lib/acl/add-agent-buttons.js.map +1 -1
- package/lib/chat/bookmarks.js +76 -77
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js +74 -75
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/dateFolder.js +66 -67
- package/lib/chat/dateFolder.js.map +1 -1
- package/lib/chat/infinite.js +218 -220
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/keys.js +62 -63
- package/lib/chat/keys.js.map +1 -1
- package/lib/chat/message.js +98 -100
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/messageTools.js +99 -100
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/signature.d.ts.map +1 -1
- package/lib/chat/signature.js +0 -1
- package/lib/chat/signature.js.map +1 -1
- package/lib/chat/thread.js +57 -61
- package/lib/chat/thread.js.map +1 -1
- package/lib/create/create.js +1 -2
- package/lib/create/create.js.map +1 -1
- package/lib/folders.js +1 -4
- package/lib/folders.js.map +1 -1
- package/lib/footer/index.d.ts.map +1 -1
- package/lib/footer/index.js +14 -16
- package/lib/footer/index.js.map +1 -1
- package/lib/header/index.js +34 -36
- package/lib/header/index.js.map +1 -1
- package/lib/iconBase.d.ts.map +1 -1
- package/lib/iconBase.js +0 -1
- package/lib/iconBase.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -5
- package/lib/index.js.map +1 -1
- package/lib/log.d.ts +7 -7
- package/lib/log.d.ts.map +1 -1
- package/lib/log.js +2 -2
- package/lib/log.js.map +1 -1
- package/lib/login/login.js +217 -222
- package/lib/login/login.js.map +1 -1
- package/lib/matrix/matrix.js +1 -2
- package/lib/matrix/matrix.js.map +1 -1
- package/lib/matrix/types.js.map +1 -1
- package/lib/media/media-capture.js +3 -4
- package/lib/media/media-capture.js.map +1 -1
- package/lib/messageArea.js +1 -4
- package/lib/messageArea.js.map +1 -1
- package/lib/ns.js +1 -2
- package/lib/ns.js.map +1 -1
- package/lib/pad.js +1 -2
- package/lib/pad.js.map +1 -1
- package/lib/participation.js +1 -2
- package/lib/participation.js.map +1 -1
- package/lib/preferences.js +1 -2
- package/lib/preferences.js.map +1 -1
- package/lib/table.js +1 -2
- package/lib/table.js.map +1 -1
- package/lib/tabs.d.ts.map +1 -1
- package/lib/tabs.js +1 -2
- package/lib/tabs.js.map +1 -1
- package/lib/utils/headerFooterHelpers.d.ts.map +1 -1
- package/lib/utils/headerFooterHelpers.js +36 -36
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/utils/index.js +1 -2
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/keyHelpers/accessData.d.ts.map +1 -1
- package/lib/utils/keyHelpers/accessData.js +33 -34
- package/lib/utils/keyHelpers/accessData.js.map +1 -1
- package/lib/utils/keyHelpers/acl.d.ts.map +1 -1
- package/lib/utils/keyHelpers/acl.js +21 -22
- package/lib/utils/keyHelpers/acl.js.map +1 -1
- package/lib/utils/keyHelpers/otherHelpers.d.ts.map +1 -1
- package/lib/utils/keyHelpers/otherHelpers.js +1 -2
- package/lib/utils/keyHelpers/otherHelpers.js.map +1 -1
- package/lib/utils/label.js +1 -2
- package/lib/utils/label.js.map +1 -1
- package/lib/versionInfo.d.ts +4 -3
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +30 -30
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons/iconLinks.d.ts.map +1 -1
- package/lib/widgets/buttons/iconLinks.js +2 -2
- package/lib/widgets/buttons/iconLinks.js.map +1 -1
- package/lib/widgets/buttons.d.ts +1 -1
- package/lib/widgets/buttons.d.ts.map +1 -1
- package/lib/widgets/buttons.js +1 -3
- package/lib/widgets/buttons.js.map +1 -1
- package/lib/widgets/dragAndDrop.js +1 -2
- package/lib/widgets/dragAndDrop.js.map +1 -1
- package/lib/widgets/error.js +1 -2
- package/lib/widgets/error.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteBar.js +47 -48
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteField.js +38 -39
- package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +44 -45
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js +23 -24
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.d.ts.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js +91 -93
- package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
- package/lib/widgets/forms/basic.js +2 -3
- package/lib/widgets/forms/basic.js.map +1 -1
- package/lib/widgets/forms/comment.js +1 -2
- package/lib/widgets/forms/comment.js.map +1 -1
- package/lib/widgets/forms/fieldParams.js +1 -2
- package/lib/widgets/forms/fieldParams.js.map +1 -1
- package/lib/widgets/forms/formStyle.js +1 -2
- package/lib/widgets/forms/formStyle.js.map +1 -1
- package/lib/widgets/forms.js +79 -80
- package/lib/widgets/forms.js.map +1 -1
- package/lib/widgets/index.js +1 -2
- package/lib/widgets/index.js.map +1 -1
- package/lib/widgets/multiSelect.js +1 -2
- package/lib/widgets/multiSelect.js.map +1 -1
- package/lib/widgets/peoplePicker.js +1 -2
- package/lib/widgets/peoplePicker.js.map +1 -1
- package/lib/widgets/widgetHelpers.d.ts.map +1 -1
- package/lib/widgets/widgetHelpers.js +3 -3
- package/lib/widgets/widgetHelpers.js.map +1 -1
- package/package.json +57 -57
package/lib/login/login.js
CHANGED
|
@@ -30,8 +30,7 @@ var ns = _interopRequireWildcard(require("../ns.js"));
|
|
|
30
30
|
var _signup = require("../signup/signup.js");
|
|
31
31
|
var utils = _interopRequireWildcard(require("../utils"));
|
|
32
32
|
var widgets = _interopRequireWildcard(require("../widgets"));
|
|
33
|
-
function
|
|
34
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
33
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t1 in e) "default" !== _t1 && {}.hasOwnProperty.call(e, _t1) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t1)) && (i.get || i.set) ? o(f, _t1, i) : f[_t1] = e[_t1]); return f; })(e, t); }
|
|
35
34
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
36
35
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
37
36
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /* eslint-disable camelcase */ /**
|
|
@@ -57,7 +56,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
57
56
|
* * Vocabulary: "load" loads a file if it exists;
|
|
58
57
|
* * 'Ensure" CREATES the file if it does not exist (if it can) and then loads it.
|
|
59
58
|
* @packageDocumentation
|
|
60
|
-
*/
|
|
59
|
+
*/
|
|
61
60
|
var store = _solidLogic.solidLogicSingleton.store;
|
|
62
61
|
var _solidLogicSingleton$ = _solidLogic.solidLogicSingleton.profile,
|
|
63
62
|
loadPreferences = _solidLogicSingleton$.loadPreferences,
|
|
@@ -122,93 +121,93 @@ function ensureLoadedPreferences(_x) {
|
|
|
122
121
|
// used to be logInLoadProfile
|
|
123
122
|
function _ensureLoadedPreferences() {
|
|
124
123
|
_ensureLoadedPreferences = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(context) {
|
|
125
|
-
var progressDisplay, preferencesFile, m2;
|
|
126
|
-
return _regenerator["default"].wrap(function
|
|
124
|
+
var progressDisplay, preferencesFile, m2, _t4;
|
|
125
|
+
return _regenerator["default"].wrap(function (_context4) {
|
|
127
126
|
while (1) switch (_context4.prev = _context4.next) {
|
|
128
127
|
case 0:
|
|
129
128
|
if (!context.preferencesFile) {
|
|
130
|
-
_context4.next =
|
|
129
|
+
_context4.next = 1;
|
|
131
130
|
break;
|
|
132
131
|
}
|
|
133
132
|
return _context4.abrupt("return", Promise.resolve(context));
|
|
134
|
-
case
|
|
135
|
-
_context4.prev =
|
|
136
|
-
_context4.next =
|
|
133
|
+
case 1:
|
|
134
|
+
_context4.prev = 1;
|
|
135
|
+
_context4.next = 2;
|
|
137
136
|
return ensureLoadedProfile(context);
|
|
138
|
-
case
|
|
137
|
+
case 2:
|
|
139
138
|
context = _context4.sent;
|
|
140
|
-
_context4.next =
|
|
139
|
+
_context4.next = 3;
|
|
141
140
|
return loadPreferences(context.me);
|
|
142
|
-
case
|
|
141
|
+
case 3:
|
|
143
142
|
preferencesFile = _context4.sent;
|
|
144
143
|
if (progressDisplay) {
|
|
145
144
|
progressDisplay.parentNode.removeChild(progressDisplay);
|
|
146
145
|
}
|
|
147
146
|
context.preferencesFile = preferencesFile;
|
|
148
|
-
_context4.next =
|
|
147
|
+
_context4.next = 11;
|
|
149
148
|
break;
|
|
150
|
-
case
|
|
151
|
-
_context4.prev =
|
|
152
|
-
|
|
153
|
-
if (!(
|
|
154
|
-
_context4.next =
|
|
149
|
+
case 4:
|
|
150
|
+
_context4.prev = 4;
|
|
151
|
+
_t4 = _context4["catch"](1);
|
|
152
|
+
if (!(_t4 instanceof _solidLogic.UnauthorizedError)) {
|
|
153
|
+
_context4.next = 5;
|
|
155
154
|
break;
|
|
156
155
|
}
|
|
157
156
|
m2 = 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?';
|
|
158
157
|
(0, _log.alert)(m2);
|
|
159
|
-
_context4.next =
|
|
158
|
+
_context4.next = 11;
|
|
160
159
|
break;
|
|
161
|
-
case
|
|
162
|
-
if (!(
|
|
163
|
-
_context4.next =
|
|
160
|
+
case 5:
|
|
161
|
+
if (!(_t4 instanceof _solidLogic.CrossOriginForbiddenError)) {
|
|
162
|
+
_context4.next = 6;
|
|
164
163
|
break;
|
|
165
164
|
}
|
|
166
165
|
m2 = "Unauthorized: Assuming preference file blocked for origin ".concat(window.location.origin);
|
|
167
166
|
context.preferencesFileError = m2;
|
|
168
167
|
return _context4.abrupt("return", context);
|
|
169
|
-
case
|
|
170
|
-
if (!(
|
|
171
|
-
_context4.next =
|
|
168
|
+
case 6:
|
|
169
|
+
if (!(_t4 instanceof _solidLogic.SameOriginForbiddenError)) {
|
|
170
|
+
_context4.next = 7;
|
|
172
171
|
break;
|
|
173
172
|
}
|
|
174
173
|
m2 = 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.';
|
|
175
174
|
debug.warn(m2);
|
|
176
175
|
return _context4.abrupt("return", context);
|
|
177
|
-
case
|
|
178
|
-
if (!(
|
|
179
|
-
_context4.next =
|
|
176
|
+
case 7:
|
|
177
|
+
if (!(_t4 instanceof _solidLogic.NotEditableError)) {
|
|
178
|
+
_context4.next = 8;
|
|
180
179
|
break;
|
|
181
180
|
}
|
|
182
181
|
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
183
182
|
debug.warn(m2);
|
|
184
183
|
return _context4.abrupt("return", context);
|
|
185
|
-
case
|
|
186
|
-
if (!(
|
|
187
|
-
_context4.next =
|
|
184
|
+
case 8:
|
|
185
|
+
if (!(_t4 instanceof _solidLogic.WebOperationError)) {
|
|
186
|
+
_context4.next = 9;
|
|
188
187
|
break;
|
|
189
188
|
}
|
|
190
189
|
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
191
190
|
debug.warn(m2);
|
|
192
|
-
_context4.next =
|
|
191
|
+
_context4.next = 11;
|
|
193
192
|
break;
|
|
194
|
-
case
|
|
195
|
-
if (!(
|
|
196
|
-
_context4.next =
|
|
193
|
+
case 9:
|
|
194
|
+
if (!(_t4 instanceof _solidLogic.FetchError)) {
|
|
195
|
+
_context4.next = 10;
|
|
197
196
|
break;
|
|
198
197
|
}
|
|
199
|
-
m2 = "Strange: Error ".concat(
|
|
198
|
+
m2 = "Strange: Error ".concat(_t4.status, " trying to read your preference file.").concat(_t4.message);
|
|
200
199
|
(0, _log.alert)(m2);
|
|
201
|
-
_context4.next =
|
|
200
|
+
_context4.next = 11;
|
|
202
201
|
break;
|
|
203
|
-
case
|
|
204
|
-
throw new Error("(via loadPrefs) ".concat(
|
|
205
|
-
case
|
|
202
|
+
case 10:
|
|
203
|
+
throw new Error("(via loadPrefs) ".concat(_t4));
|
|
204
|
+
case 11:
|
|
206
205
|
return _context4.abrupt("return", context);
|
|
207
|
-
case
|
|
206
|
+
case 12:
|
|
208
207
|
case "end":
|
|
209
208
|
return _context4.stop();
|
|
210
209
|
}
|
|
211
|
-
}, _callee4, null, [[
|
|
210
|
+
}, _callee4, null, [[1, 4]]);
|
|
212
211
|
}));
|
|
213
212
|
return _ensureLoadedPreferences.apply(this, arguments);
|
|
214
213
|
}
|
|
@@ -222,47 +221,47 @@ function ensureLoadedProfile(_x2) {
|
|
|
222
221
|
*/
|
|
223
222
|
function _ensureLoadedProfile() {
|
|
224
223
|
_ensureLoadedProfile = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(context) {
|
|
225
|
-
var logInContext;
|
|
226
|
-
return _regenerator["default"].wrap(function
|
|
224
|
+
var logInContext, _t5;
|
|
225
|
+
return _regenerator["default"].wrap(function (_context5) {
|
|
227
226
|
while (1) switch (_context5.prev = _context5.next) {
|
|
228
227
|
case 0:
|
|
229
228
|
if (!context.publicProfile) {
|
|
230
|
-
_context5.next =
|
|
229
|
+
_context5.next = 1;
|
|
231
230
|
break;
|
|
232
231
|
}
|
|
233
232
|
return _context5.abrupt("return", context);
|
|
234
|
-
case
|
|
235
|
-
_context5.prev =
|
|
236
|
-
_context5.next =
|
|
233
|
+
case 1:
|
|
234
|
+
_context5.prev = 1;
|
|
235
|
+
_context5.next = 2;
|
|
237
236
|
return ensureLoggedIn(context);
|
|
238
|
-
case
|
|
237
|
+
case 2:
|
|
239
238
|
logInContext = _context5.sent;
|
|
240
239
|
if (logInContext.me) {
|
|
241
|
-
_context5.next =
|
|
240
|
+
_context5.next = 3;
|
|
242
241
|
break;
|
|
243
242
|
}
|
|
244
243
|
throw new Error('Could not log in');
|
|
245
|
-
case
|
|
246
|
-
_context5.next =
|
|
244
|
+
case 3:
|
|
245
|
+
_context5.next = 4;
|
|
247
246
|
return loadProfile(logInContext.me);
|
|
248
|
-
case
|
|
247
|
+
case 4:
|
|
249
248
|
context.publicProfile = _context5.sent;
|
|
250
|
-
_context5.next =
|
|
249
|
+
_context5.next = 6;
|
|
251
250
|
break;
|
|
252
|
-
case
|
|
253
|
-
_context5.prev =
|
|
254
|
-
|
|
251
|
+
case 5:
|
|
252
|
+
_context5.prev = 5;
|
|
253
|
+
_t5 = _context5["catch"](1);
|
|
255
254
|
if (context.div && context.dom) {
|
|
256
|
-
context.div.appendChild(widgets.errorMessageBlock(context.dom,
|
|
255
|
+
context.div.appendChild(widgets.errorMessageBlock(context.dom, _t5.message));
|
|
257
256
|
}
|
|
258
|
-
throw new Error("Can't log in: ".concat(
|
|
259
|
-
case
|
|
257
|
+
throw new Error("Can't log in: ".concat(_t5));
|
|
258
|
+
case 6:
|
|
260
259
|
return _context5.abrupt("return", context);
|
|
261
|
-
case
|
|
260
|
+
case 7:
|
|
262
261
|
case "end":
|
|
263
262
|
return _context5.stop();
|
|
264
263
|
}
|
|
265
|
-
}, _callee5, null, [[
|
|
264
|
+
}, _callee5, null, [[1, 5]]);
|
|
266
265
|
}));
|
|
267
266
|
return _ensureLoadedProfile.apply(this, arguments);
|
|
268
267
|
}
|
|
@@ -271,24 +270,24 @@ function findAppInstances(_x3, _x4, _x5) {
|
|
|
271
270
|
}
|
|
272
271
|
function _findAppInstances() {
|
|
273
272
|
_findAppInstances = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(context, theClass, isPublic) {
|
|
274
|
-
var items;
|
|
275
|
-
return _regenerator["default"].wrap(function
|
|
273
|
+
var items, _t6;
|
|
274
|
+
return _regenerator["default"].wrap(function (_context6) {
|
|
276
275
|
while (1) switch (_context6.prev = _context6.next) {
|
|
277
276
|
case 0:
|
|
278
277
|
if (!context.me) {
|
|
279
|
-
_context6.next =
|
|
278
|
+
_context6.next = 2;
|
|
280
279
|
break;
|
|
281
280
|
}
|
|
282
|
-
_context6.next =
|
|
281
|
+
_context6.next = 1;
|
|
283
282
|
return getScopedAppInstances(theClass, context.me);
|
|
284
|
-
case
|
|
285
|
-
|
|
286
|
-
_context6.next =
|
|
283
|
+
case 1:
|
|
284
|
+
_t6 = _context6.sent;
|
|
285
|
+
_context6.next = 3;
|
|
287
286
|
break;
|
|
288
|
-
case
|
|
289
|
-
|
|
290
|
-
case
|
|
291
|
-
items =
|
|
287
|
+
case 2:
|
|
288
|
+
_t6 = [];
|
|
289
|
+
case 3:
|
|
290
|
+
items = _t6;
|
|
292
291
|
if (isPublic === true) {
|
|
293
292
|
// old API - not recommended!
|
|
294
293
|
items = items.filter(function (item) {
|
|
@@ -303,7 +302,7 @@ function _findAppInstances() {
|
|
|
303
302
|
return item.instance;
|
|
304
303
|
});
|
|
305
304
|
return _context6.abrupt("return", context);
|
|
306
|
-
case
|
|
305
|
+
case 4:
|
|
307
306
|
case "end":
|
|
308
307
|
return _context6.stop();
|
|
309
308
|
}
|
|
@@ -324,8 +323,8 @@ function registrationControl(_x6, _x7, _x8) {
|
|
|
324
323
|
}
|
|
325
324
|
function _registrationControl() {
|
|
326
325
|
_registrationControl = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7(context, instance, theClass) {
|
|
327
|
-
var registrationStatements, renderScopeCheckbox, dom, box, me, scopes, msg, tbody, form, _iterator, _step, scope, row;
|
|
328
|
-
return _regenerator["default"].wrap(function
|
|
326
|
+
var registrationStatements, renderScopeCheckbox, dom, box, me, scopes, msg, tbody, form, _iterator, _step, scope, row, _t7;
|
|
327
|
+
return _regenerator["default"].wrap(function (_context7) {
|
|
329
328
|
while (1) switch (_context7.prev = _context7.next) {
|
|
330
329
|
case 0:
|
|
331
330
|
renderScopeCheckbox = function _renderScopeCheckbox(scope) {
|
|
@@ -342,42 +341,42 @@ function _registrationControl() {
|
|
|
342
341
|
/// / body of registrationControl
|
|
343
342
|
dom = context.dom;
|
|
344
343
|
if (!(!dom || !context.div)) {
|
|
345
|
-
_context7.next =
|
|
344
|
+
_context7.next = 1;
|
|
346
345
|
break;
|
|
347
346
|
}
|
|
348
347
|
throw new Error('registrationControl: need dom and div');
|
|
349
|
-
case
|
|
348
|
+
case 1:
|
|
350
349
|
box = dom.createElement('div');
|
|
351
350
|
context.div.appendChild(box);
|
|
352
351
|
context.me = _solidLogic.authn.currentUser(); // @@
|
|
353
352
|
me = context.me;
|
|
354
353
|
if (me) {
|
|
355
|
-
_context7.next =
|
|
354
|
+
_context7.next = 2;
|
|
356
355
|
break;
|
|
357
356
|
}
|
|
358
357
|
box.innerHTML = '<p style="margin:2em;">(Log in to save a link to this)</p>';
|
|
359
358
|
return _context7.abrupt("return", context);
|
|
360
|
-
case
|
|
361
|
-
_context7.prev =
|
|
362
|
-
_context7.next =
|
|
359
|
+
case 2:
|
|
360
|
+
_context7.prev = 2;
|
|
361
|
+
_context7.next = 3;
|
|
363
362
|
return loadAllTypeIndexes(me);
|
|
364
|
-
case
|
|
363
|
+
case 3:
|
|
365
364
|
scopes = _context7.sent;
|
|
366
|
-
_context7.next =
|
|
365
|
+
_context7.next = 5;
|
|
367
366
|
break;
|
|
368
|
-
case
|
|
369
|
-
_context7.prev =
|
|
370
|
-
|
|
367
|
+
case 4:
|
|
368
|
+
_context7.prev = 4;
|
|
369
|
+
_t7 = _context7["catch"](2);
|
|
371
370
|
if (context.div && context.preferencesFileError) {
|
|
372
371
|
msg = '(Lists of stuff not available)';
|
|
373
372
|
context.div.appendChild(dom.createElement('p')).textContent = msg;
|
|
374
373
|
} else if (context.div) {
|
|
375
|
-
msg = "registrationControl: Type indexes not available: ".concat(
|
|
376
|
-
context.div.appendChild(widgets.errorMessageBlock(context.dom,
|
|
374
|
+
msg = "registrationControl: Type indexes not available: ".concat(_t7);
|
|
375
|
+
context.div.appendChild(widgets.errorMessageBlock(context.dom, _t7));
|
|
377
376
|
}
|
|
378
377
|
debug.log(msg);
|
|
379
378
|
return _context7.abrupt("return", context);
|
|
380
|
-
case
|
|
379
|
+
case 5:
|
|
381
380
|
box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
|
|
382
381
|
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid gray 0.05em;');
|
|
383
382
|
tbody = box.children[0].children[0];
|
|
@@ -395,11 +394,11 @@ function _registrationControl() {
|
|
|
395
394
|
_iterator.f();
|
|
396
395
|
}
|
|
397
396
|
return _context7.abrupt("return", context);
|
|
398
|
-
case
|
|
397
|
+
case 6:
|
|
399
398
|
case "end":
|
|
400
399
|
return _context7.stop();
|
|
401
400
|
}
|
|
402
|
-
}, _callee7, null, [[
|
|
401
|
+
}, _callee7, null, [[2, 4]]);
|
|
403
402
|
}));
|
|
404
403
|
return _registrationControl.apply(this, arguments);
|
|
405
404
|
}
|
|
@@ -422,7 +421,7 @@ function renderScopeHeadingRow(context, store, scope) {
|
|
|
422
421
|
/**
|
|
423
422
|
* UI to List at all registered things
|
|
424
423
|
*/
|
|
425
|
-
function registrationList(_x9,
|
|
424
|
+
function registrationList(_x9, _x0) {
|
|
426
425
|
return _registrationList.apply(this, arguments);
|
|
427
426
|
} // registrationList
|
|
428
427
|
/**
|
|
@@ -436,9 +435,9 @@ function registrationList(_x9, _x10) {
|
|
|
436
435
|
*/
|
|
437
436
|
function _registrationList() {
|
|
438
437
|
_registrationList = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee9(context, options) {
|
|
439
|
-
var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop;
|
|
440
|
-
return _regenerator["default"].wrap(function
|
|
441
|
-
while (1) switch (
|
|
438
|
+
var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop, _t8, _t9;
|
|
439
|
+
return _regenerator["default"].wrap(function (_context0) {
|
|
440
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
442
441
|
case 0:
|
|
443
442
|
dom = context.dom;
|
|
444
443
|
div = context.div;
|
|
@@ -446,16 +445,16 @@ function _registrationList() {
|
|
|
446
445
|
div.appendChild(box);
|
|
447
446
|
context.me = _solidLogic.authn.currentUser(); // @@
|
|
448
447
|
if (context.me) {
|
|
449
|
-
|
|
448
|
+
_context0.next = 1;
|
|
450
449
|
break;
|
|
451
450
|
}
|
|
452
451
|
box.innerHTML = '<p style="margin:2em;">(Log in list your stuff)</p>';
|
|
453
|
-
return
|
|
454
|
-
case
|
|
455
|
-
|
|
452
|
+
return _context0.abrupt("return", context);
|
|
453
|
+
case 1:
|
|
454
|
+
_context0.next = 2;
|
|
456
455
|
return loadAllTypeIndexes(context.me);
|
|
457
|
-
case
|
|
458
|
-
scopes =
|
|
456
|
+
case 2:
|
|
457
|
+
scopes = _context0.sent;
|
|
459
458
|
// includes community indexes
|
|
460
459
|
|
|
461
460
|
// console.log('@@ registrationList ', scopes)
|
|
@@ -464,43 +463,43 @@ function _registrationList() {
|
|
|
464
463
|
table = box.firstChild;
|
|
465
464
|
tbody = table.firstChild;
|
|
466
465
|
_iterator2 = _createForOfIteratorHelper(scopes);
|
|
467
|
-
|
|
466
|
+
_context0.prev = 3;
|
|
468
467
|
_iterator2.s();
|
|
469
|
-
case
|
|
468
|
+
case 4:
|
|
470
469
|
if ((_step2 = _iterator2.n()).done) {
|
|
471
|
-
|
|
470
|
+
_context0.next = 13;
|
|
472
471
|
break;
|
|
473
472
|
}
|
|
474
473
|
scope = _step2.value;
|
|
475
474
|
// need some predicate for listing/adding agents
|
|
476
475
|
headingRow = renderScopeHeadingRow(context, store, scope);
|
|
477
476
|
tbody.appendChild(headingRow);
|
|
478
|
-
|
|
477
|
+
_context0.next = 5;
|
|
479
478
|
return getScopedAppsFromIndex(scope, options.type || null);
|
|
480
|
-
case
|
|
481
|
-
items =
|
|
479
|
+
case 5:
|
|
480
|
+
items = _context0.sent;
|
|
482
481
|
// any class
|
|
483
482
|
if (items.length === 0) headingRow.style.display = 'none';
|
|
484
483
|
// console.log(`registrationList: @@ instance items for class ${options.type || 'undefined' }:`, items)
|
|
485
484
|
_iterator3 = _createForOfIteratorHelper(items);
|
|
486
|
-
|
|
485
|
+
_context0.prev = 6;
|
|
487
486
|
_loop = /*#__PURE__*/_regenerator["default"].mark(function _loop() {
|
|
488
487
|
var item, row;
|
|
489
|
-
return _regenerator["default"].wrap(function
|
|
488
|
+
return _regenerator["default"].wrap(function (_context9) {
|
|
490
489
|
while (1) switch (_context9.prev = _context9.next) {
|
|
491
490
|
case 0:
|
|
492
491
|
item = _step3.value;
|
|
493
492
|
row = widgets.personTR(dom, ns.solid('instance'), item.instance, {
|
|
494
493
|
deleteFunction: function () {
|
|
495
494
|
var _deleteFunction = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
|
496
|
-
return _regenerator["default"].wrap(function
|
|
495
|
+
return _regenerator["default"].wrap(function (_context8) {
|
|
497
496
|
while (1) switch (_context8.prev = _context8.next) {
|
|
498
497
|
case 0:
|
|
499
|
-
_context8.next =
|
|
498
|
+
_context8.next = 1;
|
|
500
499
|
return deleteTypeIndexRegistration(item);
|
|
501
|
-
case
|
|
500
|
+
case 1:
|
|
502
501
|
tbody.removeChild(row);
|
|
503
|
-
case
|
|
502
|
+
case 2:
|
|
504
503
|
case "end":
|
|
505
504
|
return _context8.stop();
|
|
506
505
|
}
|
|
@@ -514,54 +513,54 @@ function _registrationList() {
|
|
|
514
513
|
});
|
|
515
514
|
row.children[0].style.paddingLeft = '3em';
|
|
516
515
|
tbody.appendChild(row);
|
|
517
|
-
case
|
|
516
|
+
case 1:
|
|
518
517
|
case "end":
|
|
519
518
|
return _context9.stop();
|
|
520
519
|
}
|
|
521
520
|
}, _loop);
|
|
522
521
|
});
|
|
523
522
|
_iterator3.s();
|
|
524
|
-
case
|
|
523
|
+
case 7:
|
|
525
524
|
if ((_step3 = _iterator3.n()).done) {
|
|
526
|
-
|
|
525
|
+
_context0.next = 9;
|
|
527
526
|
break;
|
|
528
527
|
}
|
|
529
|
-
return
|
|
530
|
-
case
|
|
531
|
-
|
|
528
|
+
return _context0.delegateYield(_loop(), "t0", 8);
|
|
529
|
+
case 8:
|
|
530
|
+
_context0.next = 7;
|
|
532
531
|
break;
|
|
533
|
-
case
|
|
534
|
-
|
|
532
|
+
case 9:
|
|
533
|
+
_context0.next = 11;
|
|
535
534
|
break;
|
|
536
|
-
case
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
_iterator3.e(
|
|
540
|
-
case
|
|
541
|
-
|
|
535
|
+
case 10:
|
|
536
|
+
_context0.prev = 10;
|
|
537
|
+
_t8 = _context0["catch"](6);
|
|
538
|
+
_iterator3.e(_t8);
|
|
539
|
+
case 11:
|
|
540
|
+
_context0.prev = 11;
|
|
542
541
|
_iterator3.f();
|
|
543
|
-
return
|
|
544
|
-
case
|
|
545
|
-
|
|
542
|
+
return _context0.finish(11);
|
|
543
|
+
case 12:
|
|
544
|
+
_context0.next = 4;
|
|
546
545
|
break;
|
|
547
|
-
case
|
|
548
|
-
|
|
546
|
+
case 13:
|
|
547
|
+
_context0.next = 15;
|
|
549
548
|
break;
|
|
550
|
-
case
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
_iterator2.e(
|
|
554
|
-
case
|
|
555
|
-
|
|
549
|
+
case 14:
|
|
550
|
+
_context0.prev = 14;
|
|
551
|
+
_t9 = _context0["catch"](3);
|
|
552
|
+
_iterator2.e(_t9);
|
|
553
|
+
case 15:
|
|
554
|
+
_context0.prev = 15;
|
|
556
555
|
_iterator2.f();
|
|
557
|
-
return
|
|
558
|
-
case
|
|
559
|
-
return
|
|
560
|
-
case
|
|
556
|
+
return _context0.finish(15);
|
|
557
|
+
case 16:
|
|
558
|
+
return _context0.abrupt("return", context);
|
|
559
|
+
case 17:
|
|
561
560
|
case "end":
|
|
562
|
-
return
|
|
561
|
+
return _context0.stop();
|
|
563
562
|
}
|
|
564
|
-
}, _callee9, null, [[
|
|
563
|
+
}, _callee9, null, [[3, 14, 15, 16], [6, 10, 11, 12]]);
|
|
565
564
|
}));
|
|
566
565
|
return _registrationList.apply(this, arguments);
|
|
567
566
|
}
|
|
@@ -658,8 +657,8 @@ function renderSignInPopup(dom) {
|
|
|
658
657
|
issuerPopupBoxTopMenu.appendChild(issuerPopupBoxCloseButton);
|
|
659
658
|
var loginToIssuer = /*#__PURE__*/function () {
|
|
660
659
|
var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(issuerUri) {
|
|
661
|
-
var preLoginRedirectHash, locationUrl;
|
|
662
|
-
return _regenerator["default"].wrap(function
|
|
660
|
+
var preLoginRedirectHash, locationUrl, _t;
|
|
661
|
+
return _regenerator["default"].wrap(function (_context) {
|
|
663
662
|
while (1) switch (_context.prev = _context.next) {
|
|
664
663
|
case 0:
|
|
665
664
|
_context.prev = 0;
|
|
@@ -674,25 +673,25 @@ function renderSignInPopup(dom) {
|
|
|
674
673
|
// Login
|
|
675
674
|
locationUrl = new URL(window.location.href);
|
|
676
675
|
locationUrl.hash = ''; // remove hash part
|
|
677
|
-
_context.next =
|
|
676
|
+
_context.next = 1;
|
|
678
677
|
return _solidLogic.authSession.login({
|
|
679
678
|
redirectUrl: locationUrl.href,
|
|
680
679
|
oidcIssuer: issuerUri
|
|
681
680
|
});
|
|
682
|
-
case
|
|
683
|
-
_context.next =
|
|
681
|
+
case 1:
|
|
682
|
+
_context.next = 3;
|
|
684
683
|
break;
|
|
685
|
-
case
|
|
686
|
-
_context.prev =
|
|
687
|
-
|
|
688
|
-
(0, _log.alert)(
|
|
689
|
-
case
|
|
684
|
+
case 2:
|
|
685
|
+
_context.prev = 2;
|
|
686
|
+
_t = _context["catch"](0);
|
|
687
|
+
(0, _log.alert)(_t.message);
|
|
688
|
+
case 3:
|
|
690
689
|
case "end":
|
|
691
690
|
return _context.stop();
|
|
692
691
|
}
|
|
693
|
-
}, _callee, null, [[0,
|
|
692
|
+
}, _callee, null, [[0, 2]]);
|
|
694
693
|
}));
|
|
695
|
-
return function loginToIssuer(
|
|
694
|
+
return function loginToIssuer(_x1) {
|
|
696
695
|
return _ref.apply(this, arguments);
|
|
697
696
|
};
|
|
698
697
|
}();
|
|
@@ -836,53 +835,53 @@ function loginStatusBox(dom) {
|
|
|
836
835
|
return box;
|
|
837
836
|
}
|
|
838
837
|
_solidLogic.authSession.onLogout(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
839
|
-
var issuer, wellKnownUri, wellKnownResult, openidConfiguration;
|
|
840
|
-
return _regenerator["default"].wrap(function
|
|
838
|
+
var issuer, wellKnownUri, wellKnownResult, openidConfiguration, _t2;
|
|
839
|
+
return _regenerator["default"].wrap(function (_context2) {
|
|
841
840
|
while (1) switch (_context2.prev = _context2.next) {
|
|
842
841
|
case 0:
|
|
843
842
|
issuer = window.localStorage.getItem('loginIssuer');
|
|
844
843
|
if (!issuer) {
|
|
845
|
-
_context2.next =
|
|
844
|
+
_context2.next = 6;
|
|
846
845
|
break;
|
|
847
846
|
}
|
|
848
|
-
_context2.prev =
|
|
847
|
+
_context2.prev = 1;
|
|
849
848
|
// clear authorization metadata from store
|
|
850
849
|
_solidLogic.solidLogicSingleton.store.updater.flagAuthorizationMetadata();
|
|
851
850
|
wellKnownUri = new URL(issuer);
|
|
852
851
|
wellKnownUri.pathname = '/.well-known/openid-configuration';
|
|
853
|
-
_context2.next =
|
|
852
|
+
_context2.next = 2;
|
|
854
853
|
return fetch(wellKnownUri.toString());
|
|
855
|
-
case
|
|
854
|
+
case 2:
|
|
856
855
|
wellKnownResult = _context2.sent;
|
|
857
856
|
if (!(wellKnownResult.status === 200)) {
|
|
858
|
-
_context2.next =
|
|
857
|
+
_context2.next = 4;
|
|
859
858
|
break;
|
|
860
859
|
}
|
|
861
|
-
_context2.next =
|
|
860
|
+
_context2.next = 3;
|
|
862
861
|
return wellKnownResult.json();
|
|
863
|
-
case
|
|
862
|
+
case 3:
|
|
864
863
|
openidConfiguration = _context2.sent;
|
|
865
864
|
if (!(openidConfiguration && openidConfiguration.end_session_endpoint)) {
|
|
866
|
-
_context2.next =
|
|
865
|
+
_context2.next = 4;
|
|
867
866
|
break;
|
|
868
867
|
}
|
|
869
|
-
_context2.next =
|
|
868
|
+
_context2.next = 4;
|
|
870
869
|
return fetch(openidConfiguration.end_session_endpoint, {
|
|
871
870
|
credentials: 'include'
|
|
872
871
|
});
|
|
873
|
-
case
|
|
874
|
-
_context2.next =
|
|
872
|
+
case 4:
|
|
873
|
+
_context2.next = 6;
|
|
875
874
|
break;
|
|
876
|
-
case
|
|
877
|
-
_context2.prev =
|
|
878
|
-
|
|
879
|
-
case
|
|
875
|
+
case 5:
|
|
876
|
+
_context2.prev = 5;
|
|
877
|
+
_t2 = _context2["catch"](1);
|
|
878
|
+
case 6:
|
|
880
879
|
window.location.reload();
|
|
881
|
-
case
|
|
880
|
+
case 7:
|
|
882
881
|
case "end":
|
|
883
882
|
return _context2.stop();
|
|
884
883
|
}
|
|
885
|
-
}, _callee2, null, [[
|
|
884
|
+
}, _callee2, null, [[1, 5]]);
|
|
886
885
|
})));
|
|
887
886
|
|
|
888
887
|
/**
|
|
@@ -939,38 +938,35 @@ function selectWorkspace(dom, appDetails, callbackWS) {
|
|
|
939
938
|
}
|
|
940
939
|
function displayOptions(context) {
|
|
941
940
|
// console.log('displayOptions!', context)
|
|
942
|
-
function makeNewWorkspace(
|
|
941
|
+
function makeNewWorkspace(_x10) {
|
|
943
942
|
return _makeNewWorkspace.apply(this, arguments);
|
|
944
943
|
} // const status = ''
|
|
945
944
|
function _makeNewWorkspace() {
|
|
946
945
|
_makeNewWorkspace = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(_event) {
|
|
947
|
-
var row, cell, newBase, newWs, newData;
|
|
948
|
-
return _regenerator["default"].wrap(function
|
|
946
|
+
var row, cell, newBase, newWs, newData, _t3;
|
|
947
|
+
return _regenerator["default"].wrap(function (_context3) {
|
|
949
948
|
while (1) switch (_context3.prev = _context3.next) {
|
|
950
949
|
case 0:
|
|
951
950
|
row = table.appendChild(dom.createElement('tr'));
|
|
952
951
|
cell = row.appendChild(dom.createElement('td'));
|
|
953
952
|
cell.setAttribute('colspan', '3');
|
|
954
953
|
cell.style.padding = '0.5em';
|
|
955
|
-
|
|
956
|
-
_context3.next =
|
|
954
|
+
_t3 = encodeURI;
|
|
955
|
+
_context3.next = 1;
|
|
957
956
|
return widgets.askName(dom, _solidLogic.solidLogicSingleton.store, cell, ns.solid('URL'), ns.space('Workspace'), 'Workspace');
|
|
958
|
-
case
|
|
959
|
-
|
|
960
|
-
newBase = (0, _context3.t0)(_context3.t1);
|
|
957
|
+
case 1:
|
|
958
|
+
newBase = _t3(_context3.sent);
|
|
961
959
|
newWs = widgets.newThing(context.preferencesFile);
|
|
962
|
-
newData = [(0, _rdflib.st)(context.me, ns.space('workspace'), newWs, context.preferencesFile),
|
|
963
|
-
// eslint-disable-next-line camelcase
|
|
964
|
-
(0, _rdflib.st)(newWs, ns.space('uriPrefix'), newBase, context.preferencesFile)];
|
|
960
|
+
newData = [(0, _rdflib.st)(context.me, ns.space('workspace'), newWs, context.preferencesFile), (0, _rdflib.st)(newWs, ns.space('uriPrefix'), newBase, context.preferencesFile)];
|
|
965
961
|
if (_solidLogic.solidLogicSingleton.store.updater) {
|
|
966
|
-
_context3.next =
|
|
962
|
+
_context3.next = 2;
|
|
967
963
|
break;
|
|
968
964
|
}
|
|
969
965
|
throw new Error('store has no updater');
|
|
970
|
-
case
|
|
971
|
-
_context3.next =
|
|
966
|
+
case 2:
|
|
967
|
+
_context3.next = 3;
|
|
972
968
|
return _solidLogic.solidLogicSingleton.store.updater.update([], newData);
|
|
973
|
-
case
|
|
969
|
+
case 3:
|
|
974
970
|
case "end":
|
|
975
971
|
return _context3.stop();
|
|
976
972
|
}
|
|
@@ -1177,61 +1173,60 @@ function getUserRoles() {
|
|
|
1177
1173
|
* Filters which panes should be available, based on the result of [[getUserRoles]]
|
|
1178
1174
|
*/
|
|
1179
1175
|
function _getUserRoles() {
|
|
1180
|
-
_getUserRoles = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1181
|
-
var _yield$ensureLoadedPr, me, preferencesFile, preferencesFileError;
|
|
1182
|
-
return _regenerator["default"].wrap(function
|
|
1183
|
-
while (1) switch (
|
|
1176
|
+
_getUserRoles = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee0() {
|
|
1177
|
+
var _yield$ensureLoadedPr, me, preferencesFile, preferencesFileError, _t0;
|
|
1178
|
+
return _regenerator["default"].wrap(function (_context1) {
|
|
1179
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
1184
1180
|
case 0:
|
|
1185
|
-
|
|
1186
|
-
|
|
1181
|
+
_context1.prev = 0;
|
|
1182
|
+
_context1.next = 1;
|
|
1187
1183
|
return ensureLoadedPreferences({});
|
|
1188
|
-
case
|
|
1189
|
-
_yield$ensureLoadedPr =
|
|
1184
|
+
case 1:
|
|
1185
|
+
_yield$ensureLoadedPr = _context1.sent;
|
|
1190
1186
|
me = _yield$ensureLoadedPr.me;
|
|
1191
1187
|
preferencesFile = _yield$ensureLoadedPr.preferencesFile;
|
|
1192
1188
|
preferencesFileError = _yield$ensureLoadedPr.preferencesFileError;
|
|
1193
1189
|
if (!(!preferencesFile || preferencesFileError)) {
|
|
1194
|
-
|
|
1190
|
+
_context1.next = 2;
|
|
1195
1191
|
break;
|
|
1196
1192
|
}
|
|
1197
1193
|
throw new Error(preferencesFileError);
|
|
1198
|
-
case
|
|
1199
|
-
return
|
|
1200
|
-
case
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
debug.warn('Unable to fetch your preferences - this was the error: ',
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
case 16:
|
|
1194
|
+
case 2:
|
|
1195
|
+
return _context1.abrupt("return", _solidLogic.solidLogicSingleton.store.each(me, ns.rdf('type'), null, preferencesFile.doc()));
|
|
1196
|
+
case 3:
|
|
1197
|
+
_context1.prev = 3;
|
|
1198
|
+
_t0 = _context1["catch"](0);
|
|
1199
|
+
debug.warn('Unable to fetch your preferences - this was the error: ', _t0);
|
|
1200
|
+
return _context1.abrupt("return", []);
|
|
1201
|
+
case 4:
|
|
1207
1202
|
case "end":
|
|
1208
|
-
return
|
|
1203
|
+
return _context1.stop();
|
|
1209
1204
|
}
|
|
1210
|
-
},
|
|
1205
|
+
}, _callee0, null, [[0, 3]]);
|
|
1211
1206
|
}));
|
|
1212
1207
|
return _getUserRoles.apply(this, arguments);
|
|
1213
1208
|
}
|
|
1214
|
-
function filterAvailablePanes(
|
|
1209
|
+
function filterAvailablePanes(_x11) {
|
|
1215
1210
|
return _filterAvailablePanes.apply(this, arguments);
|
|
1216
1211
|
}
|
|
1217
1212
|
function _filterAvailablePanes() {
|
|
1218
|
-
_filterAvailablePanes = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
1213
|
+
_filterAvailablePanes = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee1(panes) {
|
|
1219
1214
|
var userRoles;
|
|
1220
|
-
return _regenerator["default"].wrap(function
|
|
1221
|
-
while (1) switch (
|
|
1215
|
+
return _regenerator["default"].wrap(function (_context10) {
|
|
1216
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1222
1217
|
case 0:
|
|
1223
|
-
|
|
1218
|
+
_context10.next = 1;
|
|
1224
1219
|
return getUserRoles();
|
|
1225
|
-
case
|
|
1226
|
-
userRoles =
|
|
1227
|
-
return
|
|
1220
|
+
case 1:
|
|
1221
|
+
userRoles = _context10.sent;
|
|
1222
|
+
return _context10.abrupt("return", panes.filter(function (pane) {
|
|
1228
1223
|
return isMatchingAudience(pane, userRoles);
|
|
1229
1224
|
}));
|
|
1230
|
-
case
|
|
1225
|
+
case 2:
|
|
1231
1226
|
case "end":
|
|
1232
|
-
return
|
|
1227
|
+
return _context10.stop();
|
|
1233
1228
|
}
|
|
1234
|
-
},
|
|
1229
|
+
}, _callee1);
|
|
1235
1230
|
}));
|
|
1236
1231
|
return _filterAvailablePanes.apply(this, arguments);
|
|
1237
1232
|
}
|