solid-ui 2.4.24 → 2.4.25
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/LICENSE.md +0 -0
- package/README.md +0 -0
- package/dist/index.html +0 -0
- package/dist/main.js +50483 -50370
- package/dist/main.js.map +1 -1
- package/lib/acl/access-controller.d.ts +0 -0
- package/lib/acl/access-controller.d.ts.map +0 -0
- package/lib/acl/access-controller.js +90 -98
- package/lib/acl/access-controller.js.map +1 -1
- package/lib/acl/access-groups.d.ts +0 -0
- package/lib/acl/access-groups.d.ts.map +0 -0
- package/lib/acl/access-groups.js +82 -90
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl-control.d.ts +0 -0
- package/lib/acl/acl-control.d.ts.map +0 -0
- package/lib/acl/acl-control.js +50 -54
- package/lib/acl/acl-control.js.map +1 -1
- package/lib/acl/acl.d.ts +3 -3
- package/lib/acl/acl.d.ts.map +1 -1
- package/lib/acl/acl.js +13 -15
- package/lib/acl/acl.js.map +1 -1
- package/lib/acl/add-agent-buttons.d.ts +0 -0
- package/lib/acl/add-agent-buttons.d.ts.map +0 -0
- package/lib/acl/add-agent-buttons.js +142 -154
- package/lib/acl/add-agent-buttons.js.map +1 -1
- package/lib/acl/index.d.ts +0 -0
- package/lib/acl/index.d.ts.map +0 -0
- package/lib/acl/index.js +0 -0
- package/lib/acl/index.js.map +0 -0
- package/lib/acl/styles.d.ts +0 -0
- package/lib/acl/styles.d.ts.map +0 -0
- package/lib/acl/styles.js +0 -0
- package/lib/acl/styles.js.map +0 -0
- package/lib/acl/types.d.ts +6 -6
- package/lib/acl/types.d.ts.map +1 -1
- package/lib/acl/types.js +0 -0
- package/lib/acl/types.js.map +0 -0
- package/lib/chat/bookmarks.js +181 -191
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js +96 -104
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/dateFolder.js +232 -224
- package/lib/chat/dateFolder.js.map +1 -1
- package/lib/chat/infinite.js +634 -658
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/message.js +119 -131
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/messageTools.js +106 -114
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/thread.js +16 -18
- package/lib/chat/thread.js.map +1 -1
- package/lib/create/create.d.ts +0 -0
- package/lib/create/create.d.ts.map +0 -0
- package/lib/create/create.js +0 -0
- package/lib/create/create.js.map +0 -0
- package/lib/create/index.d.ts +0 -0
- package/lib/create/index.d.ts.map +0 -0
- package/lib/create/index.js +0 -0
- package/lib/create/index.js.map +0 -0
- package/lib/create/types.d.ts +1 -1
- package/lib/create/types.d.ts.map +1 -1
- package/lib/create/types.js +0 -0
- package/lib/create/types.js.map +0 -0
- package/lib/debug.d.ts +0 -0
- package/lib/debug.d.ts.map +0 -0
- package/lib/debug.js +0 -0
- package/lib/debug.js.map +0 -0
- package/lib/folders.js +0 -0
- package/lib/folders.js.map +0 -0
- package/lib/footer/index.d.ts +1 -1
- package/lib/footer/index.d.ts.map +1 -1
- package/lib/footer/index.js +33 -37
- package/lib/footer/index.js.map +1 -1
- package/lib/footer/styleMap.d.ts +0 -0
- package/lib/footer/styleMap.d.ts.map +0 -0
- package/lib/footer/styleMap.js +0 -0
- package/lib/footer/styleMap.js.map +0 -0
- package/lib/header/empty-profile.d.ts +0 -0
- package/lib/header/empty-profile.d.ts.map +0 -0
- package/lib/header/empty-profile.js +0 -0
- package/lib/header/empty-profile.js.map +0 -0
- package/lib/header/index.d.ts +4 -4
- package/lib/header/index.d.ts.map +1 -1
- package/lib/header/index.js +126 -134
- package/lib/header/index.js.map +1 -1
- package/lib/header/styleMap.d.ts +0 -0
- package/lib/header/styleMap.d.ts.map +0 -0
- package/lib/header/styleMap.js +0 -0
- package/lib/header/styleMap.js.map +0 -0
- package/lib/iconBase.d.ts +0 -0
- package/lib/iconBase.d.ts.map +0 -0
- package/lib/iconBase.js +0 -0
- package/lib/iconBase.js.map +0 -0
- package/lib/icons/solid_logo.d.ts +0 -0
- package/lib/icons/solid_logo.d.ts.map +0 -0
- package/lib/icons/solid_logo.js +0 -0
- package/lib/icons/solid_logo.js.map +0 -0
- package/lib/index.d.ts +0 -0
- package/lib/index.d.ts.map +0 -0
- package/lib/index.js +0 -0
- package/lib/index.js.map +0 -0
- package/lib/jss/index.d.ts +0 -0
- package/lib/jss/index.d.ts.map +0 -0
- package/lib/jss/index.js +0 -0
- package/lib/jss/index.js.map +0 -0
- package/lib/log.d.ts +0 -0
- package/lib/log.d.ts.map +0 -0
- package/lib/log.js +0 -0
- package/lib/log.js.map +0 -0
- package/lib/login/login.d.ts +0 -0
- package/lib/login/login.d.ts.map +0 -0
- package/lib/login/login.js +470 -470
- package/lib/login/login.js.map +1 -1
- package/lib/matrix/index.d.ts +0 -0
- package/lib/matrix/index.d.ts.map +0 -0
- package/lib/matrix/index.js +0 -0
- package/lib/matrix/index.js.map +0 -0
- package/lib/matrix/matrix.d.ts +0 -0
- package/lib/matrix/matrix.d.ts.map +0 -0
- package/lib/matrix/matrix.js +0 -0
- package/lib/matrix/matrix.js.map +0 -0
- package/lib/matrix/types.d.ts +1 -1
- package/lib/matrix/types.d.ts.map +1 -1
- package/lib/matrix/types.js +0 -0
- package/lib/matrix/types.js.map +0 -0
- package/lib/media/index.d.ts +0 -0
- package/lib/media/index.d.ts.map +0 -0
- package/lib/media/index.js +0 -0
- package/lib/media/index.js.map +0 -0
- package/lib/media/media-capture.d.ts +0 -0
- package/lib/media/media-capture.d.ts.map +0 -0
- package/lib/media/media-capture.js +8 -10
- package/lib/media/media-capture.js.map +1 -1
- package/lib/messageArea.js +0 -0
- package/lib/messageArea.js.map +0 -0
- package/lib/noun_Camera_1618446_000000.js +0 -0
- package/lib/noun_Camera_1618446_000000.js.map +0 -0
- package/lib/ns.js +0 -0
- package/lib/ns.js.map +0 -0
- package/lib/pad.d.ts +1 -1
- package/lib/pad.d.ts.map +1 -1
- package/lib/pad.js +0 -0
- package/lib/pad.js.map +0 -0
- package/lib/participation.d.ts +1 -1
- package/lib/participation.d.ts.map +1 -1
- package/lib/participation.js +1 -1
- package/lib/participation.js.map +0 -0
- package/lib/preferences.js +0 -0
- package/lib/preferences.js.map +0 -0
- package/lib/signup/config-default.js +0 -0
- package/lib/signup/config-default.js.map +0 -0
- package/lib/signup/signup.js +0 -0
- package/lib/signup/signup.js.map +0 -0
- package/lib/stories/decorators.js +0 -0
- package/lib/stories/decorators.js.map +0 -0
- package/lib/style.js +0 -0
- package/lib/style.js.map +0 -0
- package/lib/style_multiSelect.js +0 -0
- package/lib/style_multiSelect.js.map +0 -0
- package/lib/table.js +0 -0
- package/lib/table.js.map +0 -0
- package/lib/tabs.d.ts +1 -1
- package/lib/tabs.d.ts.map +1 -1
- package/lib/tabs.js +0 -0
- package/lib/tabs.js.map +0 -0
- package/lib/typings.d.js +0 -0
- package/lib/typings.d.js.map +0 -0
- package/lib/utils/headerFooterHelpers.d.ts +1 -1
- package/lib/utils/headerFooterHelpers.d.ts.map +1 -1
- package/lib/utils/headerFooterHelpers.js +78 -80
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/utils/index.js +2 -6
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/label.d.ts +0 -0
- package/lib/utils/label.d.ts.map +0 -0
- package/lib/utils/label.js +0 -0
- package/lib/utils/label.js.map +0 -0
- package/lib/versionInfo.d.ts +0 -0
- package/lib/versionInfo.d.ts.map +0 -0
- package/lib/versionInfo.js +13 -13
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons/iconLinks.d.ts +0 -0
- package/lib/widgets/buttons/iconLinks.d.ts.map +0 -0
- package/lib/widgets/buttons/iconLinks.js +0 -0
- package/lib/widgets/buttons/iconLinks.js.map +0 -0
- package/lib/widgets/buttons.d.ts +5 -5
- package/lib/widgets/buttons.d.ts.map +1 -1
- package/lib/widgets/buttons.js +0 -0
- package/lib/widgets/buttons.js.map +0 -0
- package/lib/widgets/dragAndDrop.js +0 -0
- package/lib/widgets/dragAndDrop.js.map +0 -0
- package/lib/widgets/error.d.ts +0 -0
- package/lib/widgets/error.d.ts.map +0 -0
- package/lib/widgets/error.js +0 -0
- package/lib/widgets/error.js.map +0 -0
- package/lib/widgets/forms/autocomplete/autocompleteBar.d.ts +0 -0
- package/lib/widgets/forms/autocomplete/autocompleteBar.d.ts.map +0 -0
- package/lib/widgets/forms/autocomplete/autocompleteBar.js +217 -229
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteField.d.ts +0 -0
- package/lib/widgets/forms/autocomplete/autocompleteField.d.ts.map +0 -0
- package/lib/widgets/forms/autocomplete/autocompleteField.js +70 -74
- package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts +2 -2
- package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +363 -379
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.d.ts +0 -0
- package/lib/widgets/forms/autocomplete/language.d.ts.map +0 -0
- package/lib/widgets/forms/autocomplete/language.js +79 -83
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.d.ts +2 -2
- package/lib/widgets/forms/autocomplete/publicData.d.ts.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js +263 -281
- package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
- package/lib/widgets/forms/basic.d.ts +0 -0
- package/lib/widgets/forms/basic.d.ts.map +0 -0
- package/lib/widgets/forms/basic.js +0 -0
- package/lib/widgets/forms/basic.js.map +0 -0
- package/lib/widgets/forms/comment.d.ts +0 -0
- package/lib/widgets/forms/comment.d.ts.map +0 -0
- package/lib/widgets/forms/comment.js +0 -0
- package/lib/widgets/forms/comment.js.map +0 -0
- package/lib/widgets/forms/fieldFunction.d.ts +1 -1
- package/lib/widgets/forms/fieldFunction.d.ts.map +1 -1
- package/lib/widgets/forms/fieldFunction.js +1 -3
- package/lib/widgets/forms/fieldFunction.js.map +1 -1
- package/lib/widgets/forms/fieldParams.d.ts +1 -1
- package/lib/widgets/forms/fieldParams.d.ts.map +1 -1
- package/lib/widgets/forms/fieldParams.js +0 -0
- package/lib/widgets/forms/fieldParams.js.map +0 -0
- package/lib/widgets/forms/formStyle.d.ts +0 -0
- package/lib/widgets/forms/formStyle.d.ts.map +0 -0
- package/lib/widgets/forms/formStyle.js +0 -0
- package/lib/widgets/forms/formStyle.js.map +0 -0
- package/lib/widgets/forms.js +197 -225
- package/lib/widgets/forms.js.map +1 -1
- package/lib/widgets/index.js +0 -0
- package/lib/widgets/index.js.map +0 -0
- package/lib/widgets/multiSelect.js +4 -4
- package/lib/widgets/multiSelect.js.map +1 -1
- package/lib/widgets/peoplePicker.js +0 -0
- package/lib/widgets/peoplePicker.js.map +0 -0
- package/lib/widgets/widgetHelpers.d.ts +0 -0
- package/lib/widgets/widgetHelpers.d.ts.map +0 -0
- package/lib/widgets/widgetHelpers.js +0 -0
- package/lib/widgets/widgetHelpers.js.map +0 -0
- package/package.json +34 -31
package/lib/login/login.js
CHANGED
|
@@ -34,7 +34,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
34
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
35
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
36
36
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
37
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
37
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
38
38
|
var store = _solidLogic.solidLogicSingleton.store;
|
|
39
39
|
var _solidLogicSingleton$ = _solidLogic.solidLogicSingleton.profile,
|
|
40
40
|
loadPreferences = _solidLogicSingleton$.loadPreferences,
|
|
@@ -102,102 +102,100 @@ function _ensureLoadedPreferences() {
|
|
|
102
102
|
_ensureLoadedPreferences = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(context) {
|
|
103
103
|
var statusArea, progressDisplay, complain, preferencesFile, m2;
|
|
104
104
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
105
|
-
while (1) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
statusArea.appendChild(widgets.errorMessageBlock(context.dom, message));
|
|
113
|
-
}
|
|
114
|
-
debug.log(message);
|
|
115
|
-
// reject(new Error(message))
|
|
116
|
-
};
|
|
117
|
-
if (!context.preferencesFile) {
|
|
118
|
-
_context4.next = 3;
|
|
119
|
-
break;
|
|
120
|
-
}
|
|
121
|
-
return _context4.abrupt("return", Promise.resolve(context));
|
|
122
|
-
case 3:
|
|
123
|
-
// already done
|
|
124
|
-
statusArea = context.statusArea || context.div || null;
|
|
125
|
-
_context4.prev = 4;
|
|
126
|
-
_context4.next = 7;
|
|
127
|
-
return ensureLoadedProfile(context);
|
|
128
|
-
case 7:
|
|
129
|
-
context = _context4.sent;
|
|
130
|
-
_context4.next = 10;
|
|
131
|
-
return loadPreferences(context.me);
|
|
132
|
-
case 10:
|
|
133
|
-
preferencesFile = _context4.sent;
|
|
134
|
-
if (progressDisplay) {
|
|
135
|
-
progressDisplay.parentNode.removeChild(progressDisplay);
|
|
105
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
106
|
+
case 0:
|
|
107
|
+
complain = function _complain(message) {
|
|
108
|
+
message = "ensureLoadedPreferences: ".concat(message);
|
|
109
|
+
if (statusArea) {
|
|
110
|
+
// statusArea.innerHTML = ''
|
|
111
|
+
statusArea.appendChild(widgets.errorMessageBlock(context.dom, message));
|
|
136
112
|
}
|
|
137
|
-
|
|
138
|
-
|
|
113
|
+
debug.log(message);
|
|
114
|
+
// reject(new Error(message))
|
|
115
|
+
};
|
|
116
|
+
if (!context.preferencesFile) {
|
|
117
|
+
_context4.next = 3;
|
|
139
118
|
break;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
119
|
+
}
|
|
120
|
+
return _context4.abrupt("return", Promise.resolve(context));
|
|
121
|
+
case 3:
|
|
122
|
+
// already done
|
|
123
|
+
statusArea = context.statusArea || context.div || null;
|
|
124
|
+
_context4.prev = 4;
|
|
125
|
+
_context4.next = 7;
|
|
126
|
+
return ensureLoadedProfile(context);
|
|
127
|
+
case 7:
|
|
128
|
+
context = _context4.sent;
|
|
129
|
+
_context4.next = 10;
|
|
130
|
+
return loadPreferences(context.me);
|
|
131
|
+
case 10:
|
|
132
|
+
preferencesFile = _context4.sent;
|
|
133
|
+
if (progressDisplay) {
|
|
134
|
+
progressDisplay.parentNode.removeChild(progressDisplay);
|
|
135
|
+
}
|
|
136
|
+
context.preferencesFile = preferencesFile;
|
|
137
|
+
_context4.next = 51;
|
|
138
|
+
break;
|
|
139
|
+
case 15:
|
|
140
|
+
_context4.prev = 15;
|
|
141
|
+
_context4.t0 = _context4["catch"](4);
|
|
142
|
+
if (!(_context4.t0 instanceof _solidLogic.UnauthorizedError)) {
|
|
143
|
+
_context4.next = 22;
|
|
150
144
|
break;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
case 28:
|
|
160
|
-
if (!(_context4.t0 instanceof _solidLogic.SameOriginForbiddenError)) {
|
|
161
|
-
_context4.next = 34;
|
|
162
|
-
break;
|
|
163
|
-
}
|
|
164
|
-
m2 = 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.';
|
|
165
|
-
debug.warn(m2);
|
|
166
|
-
return _context4.abrupt("return", context);
|
|
167
|
-
case 34:
|
|
168
|
-
if (!(_context4.t0 instanceof _solidLogic.NotEditableError)) {
|
|
169
|
-
_context4.next = 40;
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
173
|
-
debug.warn(m2);
|
|
174
|
-
return _context4.abrupt("return", context);
|
|
175
|
-
case 40:
|
|
176
|
-
if (!(_context4.t0 instanceof _solidLogic.WebOperationError)) {
|
|
177
|
-
_context4.next = 45;
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
181
|
-
debug.warn(m2);
|
|
182
|
-
_context4.next = 51;
|
|
145
|
+
}
|
|
146
|
+
m2 = 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?';
|
|
147
|
+
(0, _log.alert)(m2);
|
|
148
|
+
_context4.next = 51;
|
|
149
|
+
break;
|
|
150
|
+
case 22:
|
|
151
|
+
if (!(_context4.t0 instanceof _solidLogic.CrossOriginForbiddenError)) {
|
|
152
|
+
_context4.next = 28;
|
|
183
153
|
break;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
_context4.next = 51;
|
|
154
|
+
}
|
|
155
|
+
m2 = "Unauthorized: Assuming preference file blocked for origin ".concat(window.location.origin);
|
|
156
|
+
context.preferencesFileError = m2;
|
|
157
|
+
return _context4.abrupt("return", context);
|
|
158
|
+
case 28:
|
|
159
|
+
if (!(_context4.t0 instanceof _solidLogic.SameOriginForbiddenError)) {
|
|
160
|
+
_context4.next = 34;
|
|
192
161
|
break;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
162
|
+
}
|
|
163
|
+
m2 = 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.';
|
|
164
|
+
debug.warn(m2);
|
|
165
|
+
return _context4.abrupt("return", context);
|
|
166
|
+
case 34:
|
|
167
|
+
if (!(_context4.t0 instanceof _solidLogic.NotEditableError)) {
|
|
168
|
+
_context4.next = 40;
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
172
|
+
debug.warn(m2);
|
|
173
|
+
return _context4.abrupt("return", context);
|
|
174
|
+
case 40:
|
|
175
|
+
if (!(_context4.t0 instanceof _solidLogic.WebOperationError)) {
|
|
176
|
+
_context4.next = 45;
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
180
|
+
debug.warn(m2);
|
|
181
|
+
_context4.next = 51;
|
|
182
|
+
break;
|
|
183
|
+
case 45:
|
|
184
|
+
if (!(_context4.t0 instanceof _solidLogic.FetchError)) {
|
|
185
|
+
_context4.next = 50;
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
m2 = "Strange: Error ".concat(_context4.t0.status, " trying to read your preference file.").concat(_context4.t0.message);
|
|
189
|
+
(0, _log.alert)(m2);
|
|
190
|
+
_context4.next = 51;
|
|
191
|
+
break;
|
|
192
|
+
case 50:
|
|
193
|
+
throw new Error("(via loadPrefs) ".concat(_context4.t0));
|
|
194
|
+
case 51:
|
|
195
|
+
return _context4.abrupt("return", context);
|
|
196
|
+
case 52:
|
|
197
|
+
case "end":
|
|
198
|
+
return _context4.stop();
|
|
201
199
|
}
|
|
202
200
|
}, _callee4, null, [[4, 15]]);
|
|
203
201
|
}));
|
|
@@ -215,45 +213,43 @@ function _ensureLoadedProfile() {
|
|
|
215
213
|
_ensureLoadedProfile = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(context) {
|
|
216
214
|
var logInContext;
|
|
217
215
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
218
|
-
while (1) {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
_context5.next = 2;
|
|
223
|
-
break;
|
|
224
|
-
}
|
|
225
|
-
return _context5.abrupt("return", context);
|
|
226
|
-
case 2:
|
|
227
|
-
_context5.prev = 2;
|
|
228
|
-
_context5.next = 5;
|
|
229
|
-
return ensureLoggedIn(context);
|
|
230
|
-
case 5:
|
|
231
|
-
logInContext = _context5.sent;
|
|
232
|
-
if (logInContext.me) {
|
|
233
|
-
_context5.next = 8;
|
|
234
|
-
break;
|
|
235
|
-
}
|
|
236
|
-
throw new Error('Could not log in');
|
|
237
|
-
case 8:
|
|
238
|
-
_context5.next = 10;
|
|
239
|
-
return loadProfile(logInContext.me);
|
|
240
|
-
case 10:
|
|
241
|
-
context.publicProfile = _context5.sent;
|
|
242
|
-
_context5.next = 17;
|
|
216
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
217
|
+
case 0:
|
|
218
|
+
if (!context.publicProfile) {
|
|
219
|
+
_context5.next = 2;
|
|
243
220
|
break;
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
221
|
+
}
|
|
222
|
+
return _context5.abrupt("return", context);
|
|
223
|
+
case 2:
|
|
224
|
+
_context5.prev = 2;
|
|
225
|
+
_context5.next = 5;
|
|
226
|
+
return ensureLoggedIn(context);
|
|
227
|
+
case 5:
|
|
228
|
+
logInContext = _context5.sent;
|
|
229
|
+
if (logInContext.me) {
|
|
230
|
+
_context5.next = 8;
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
throw new Error('Could not log in');
|
|
234
|
+
case 8:
|
|
235
|
+
_context5.next = 10;
|
|
236
|
+
return loadProfile(logInContext.me);
|
|
237
|
+
case 10:
|
|
238
|
+
context.publicProfile = _context5.sent;
|
|
239
|
+
_context5.next = 17;
|
|
240
|
+
break;
|
|
241
|
+
case 13:
|
|
242
|
+
_context5.prev = 13;
|
|
243
|
+
_context5.t0 = _context5["catch"](2);
|
|
244
|
+
if (context.div && context.dom) {
|
|
245
|
+
context.div.appendChild(widgets.errorMessageBlock(context.dom, _context5.t0.message));
|
|
246
|
+
}
|
|
247
|
+
throw new Error("Can't log in: ".concat(_context5.t0));
|
|
248
|
+
case 17:
|
|
249
|
+
return _context5.abrupt("return", context);
|
|
250
|
+
case 18:
|
|
251
|
+
case "end":
|
|
252
|
+
return _context5.stop();
|
|
257
253
|
}
|
|
258
254
|
}, _callee5, null, [[2, 13]]);
|
|
259
255
|
}));
|
|
@@ -266,41 +262,39 @@ function _findAppInstances() {
|
|
|
266
262
|
_findAppInstances = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(context, theClass, isPublic) {
|
|
267
263
|
var items;
|
|
268
264
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
269
|
-
while (1) {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
_context6.next = 6;
|
|
274
|
-
break;
|
|
275
|
-
}
|
|
276
|
-
_context6.next = 3;
|
|
277
|
-
return getScopedAppInstances(theClass, context.me);
|
|
278
|
-
case 3:
|
|
279
|
-
_context6.t0 = _context6.sent;
|
|
280
|
-
_context6.next = 7;
|
|
265
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
266
|
+
case 0:
|
|
267
|
+
if (!context.me) {
|
|
268
|
+
_context6.next = 6;
|
|
281
269
|
break;
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
return item.instance;
|
|
270
|
+
}
|
|
271
|
+
_context6.next = 3;
|
|
272
|
+
return getScopedAppInstances(theClass, context.me);
|
|
273
|
+
case 3:
|
|
274
|
+
_context6.t0 = _context6.sent;
|
|
275
|
+
_context6.next = 7;
|
|
276
|
+
break;
|
|
277
|
+
case 6:
|
|
278
|
+
_context6.t0 = [];
|
|
279
|
+
case 7:
|
|
280
|
+
items = _context6.t0;
|
|
281
|
+
if (isPublic === true) {
|
|
282
|
+
// old API - not recommended!
|
|
283
|
+
items = items.filter(function (item) {
|
|
284
|
+
return item.scope.label === 'public';
|
|
298
285
|
});
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
286
|
+
} else if (isPublic === false) {
|
|
287
|
+
items = items.filter(function (item) {
|
|
288
|
+
return item.scope.label === 'private';
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
context.instances = items.map(function (item) {
|
|
292
|
+
return item.instance;
|
|
293
|
+
});
|
|
294
|
+
return _context6.abrupt("return", context);
|
|
295
|
+
case 11:
|
|
296
|
+
case "end":
|
|
297
|
+
return _context6.stop();
|
|
304
298
|
}
|
|
305
299
|
}, _callee6);
|
|
306
300
|
}));
|
|
@@ -321,80 +315,78 @@ function _registrationControl() {
|
|
|
321
315
|
_registrationControl = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(context, instance, theClass) {
|
|
322
316
|
var registrationStatements, renderScopeCheckbox, dom, box, me, scopes, msg, tbody, form, _iterator, _step, scope, row;
|
|
323
317
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
324
|
-
while (1) {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
_context7.next = 5;
|
|
342
|
-
break;
|
|
343
|
-
}
|
|
344
|
-
throw new Error('registrationControl: need dom and div');
|
|
345
|
-
case 5:
|
|
346
|
-
box = dom.createElement('div');
|
|
347
|
-
context.div.appendChild(box);
|
|
348
|
-
context.me = _solidLogic.authn.currentUser(); // @@
|
|
349
|
-
me = context.me;
|
|
350
|
-
if (me) {
|
|
351
|
-
_context7.next = 12;
|
|
352
|
-
break;
|
|
353
|
-
}
|
|
354
|
-
box.innerHTML = '<p style="margin:2em;">(Log in to save a link to this)</p>';
|
|
355
|
-
return _context7.abrupt("return", context);
|
|
356
|
-
case 12:
|
|
357
|
-
_context7.prev = 12;
|
|
358
|
-
_context7.next = 15;
|
|
359
|
-
return loadAllTypeIndexes(me);
|
|
360
|
-
case 15:
|
|
361
|
-
scopes = _context7.sent;
|
|
362
|
-
_context7.next = 23;
|
|
318
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
319
|
+
case 0:
|
|
320
|
+
renderScopeCheckbox = function _renderScopeCheckbox(scope) {
|
|
321
|
+
var statements = registrationStatements(scope.index);
|
|
322
|
+
var name = scopeLabel(context, scope);
|
|
323
|
+
var label = "".concat(name, " link to this ").concat(context.noun);
|
|
324
|
+
return widgets.buildCheckboxForm(context.dom, _solidLogic.solidLogicSingleton.store, label, null, statements, form, scope.index);
|
|
325
|
+
};
|
|
326
|
+
registrationStatements = function _registrationStatemen(index) {
|
|
327
|
+
var registrations = getRegistrations(instance, theClass);
|
|
328
|
+
var reg = registrations.length ? registrations[0] : widgets.newThing(index);
|
|
329
|
+
return [(0, _rdflib.st)(reg, ns.solid('instance'), instance, index), (0, _rdflib.st)(reg, ns.solid('forClass'), theClass, index)];
|
|
330
|
+
};
|
|
331
|
+
/// / body of registrationControl
|
|
332
|
+
dom = context.dom;
|
|
333
|
+
if (!(!dom || !context.div)) {
|
|
334
|
+
_context7.next = 5;
|
|
363
335
|
break;
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
336
|
+
}
|
|
337
|
+
throw new Error('registrationControl: need dom and div');
|
|
338
|
+
case 5:
|
|
339
|
+
box = dom.createElement('div');
|
|
340
|
+
context.div.appendChild(box);
|
|
341
|
+
context.me = _solidLogic.authn.currentUser(); // @@
|
|
342
|
+
me = context.me;
|
|
343
|
+
if (me) {
|
|
344
|
+
_context7.next = 12;
|
|
345
|
+
break;
|
|
346
|
+
}
|
|
347
|
+
box.innerHTML = '<p style="margin:2em;">(Log in to save a link to this)</p>';
|
|
348
|
+
return _context7.abrupt("return", context);
|
|
349
|
+
case 12:
|
|
350
|
+
_context7.prev = 12;
|
|
351
|
+
_context7.next = 15;
|
|
352
|
+
return loadAllTypeIndexes(me);
|
|
353
|
+
case 15:
|
|
354
|
+
scopes = _context7.sent;
|
|
355
|
+
_context7.next = 23;
|
|
356
|
+
break;
|
|
357
|
+
case 18:
|
|
358
|
+
_context7.prev = 18;
|
|
359
|
+
_context7.t0 = _context7["catch"](12);
|
|
360
|
+
if (context.div && context.preferencesFileError) {
|
|
361
|
+
msg = '(Lists of stuff not available)';
|
|
362
|
+
context.div.appendChild(dom.createElement('p')).textContent = msg;
|
|
363
|
+
} else if (context.div) {
|
|
364
|
+
msg = "registrationControl: Type indexes not available: ".concat(_context7.t0);
|
|
365
|
+
context.div.appendChild(widgets.errorMessageBlock(context.dom, _context7.t0));
|
|
366
|
+
}
|
|
367
|
+
debug.log(msg);
|
|
368
|
+
return _context7.abrupt("return", context);
|
|
369
|
+
case 23:
|
|
370
|
+
box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
|
|
371
|
+
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid gray 0.05em;');
|
|
372
|
+
tbody = box.children[0].children[0];
|
|
373
|
+
form = new _rdflib.BlankNode(); // @@ say for now
|
|
374
|
+
_iterator = _createForOfIteratorHelper(scopes);
|
|
375
|
+
try {
|
|
376
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
377
|
+
scope = _step.value;
|
|
378
|
+
row = tbody.appendChild(dom.createElement('tr'));
|
|
379
|
+
row.appendChild(renderScopeCheckbox(scope)); // @@ index
|
|
392
380
|
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
381
|
+
} catch (err) {
|
|
382
|
+
_iterator.e(err);
|
|
383
|
+
} finally {
|
|
384
|
+
_iterator.f();
|
|
385
|
+
}
|
|
386
|
+
return _context7.abrupt("return", context);
|
|
387
|
+
case 30:
|
|
388
|
+
case "end":
|
|
389
|
+
return _context7.stop();
|
|
398
390
|
}
|
|
399
391
|
}, _callee7, null, [[12, 18]]);
|
|
400
392
|
}));
|
|
@@ -425,62 +417,64 @@ function registrationList(_x9, _x10) {
|
|
|
425
417
|
function _registrationList() {
|
|
426
418
|
_registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(context, options) {
|
|
427
419
|
var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop;
|
|
428
|
-
return _regenerator["default"].wrap(function _callee9$(
|
|
429
|
-
while (1) {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
// includes community indexes
|
|
420
|
+
return _regenerator["default"].wrap(function _callee9$(_context10) {
|
|
421
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
422
|
+
case 0:
|
|
423
|
+
dom = context.dom;
|
|
424
|
+
div = context.div;
|
|
425
|
+
box = dom.createElement('div');
|
|
426
|
+
div.appendChild(box);
|
|
427
|
+
context.me = _solidLogic.authn.currentUser(); // @@
|
|
428
|
+
if (context.me) {
|
|
429
|
+
_context10.next = 8;
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
box.innerHTML = '<p style="margin:2em;">(Log in list your stuff)</p>';
|
|
433
|
+
return _context10.abrupt("return", context);
|
|
434
|
+
case 8:
|
|
435
|
+
_context10.next = 10;
|
|
436
|
+
return loadAllTypeIndexes(context.me);
|
|
437
|
+
case 10:
|
|
438
|
+
scopes = _context10.sent;
|
|
439
|
+
// includes community indexes
|
|
449
440
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
441
|
+
// console.log('@@ registrationList ', scopes)
|
|
442
|
+
box.innerHTML = '<table><tbody></tbody></table>'; // tbody will be inserted anyway
|
|
443
|
+
box.setAttribute('style', 'font-size: 120%; text-align: right; padding: 1em; border: solid #eee 0.5em;');
|
|
444
|
+
table = box.firstChild;
|
|
445
|
+
tbody = table.firstChild;
|
|
446
|
+
_iterator2 = _createForOfIteratorHelper(scopes);
|
|
447
|
+
_context10.prev = 16;
|
|
448
|
+
_iterator2.s();
|
|
449
|
+
case 18:
|
|
450
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
451
|
+
_context10.next = 44;
|
|
452
|
+
break;
|
|
453
|
+
}
|
|
454
|
+
scope = _step2.value;
|
|
455
|
+
// need some predicate for listing/adding agents
|
|
456
|
+
headingRow = renderScopeHeadingRow(context, store, scope);
|
|
457
|
+
tbody.appendChild(headingRow);
|
|
458
|
+
_context10.next = 24;
|
|
459
|
+
return getScopedAppsFromIndex(scope, options.type || null);
|
|
460
|
+
case 24:
|
|
461
|
+
items = _context10.sent;
|
|
462
|
+
// any class
|
|
463
|
+
if (items.length === 0) headingRow.style.display = 'none';
|
|
464
|
+
// console.log(`registrationList: @@ instance items for class ${options.type || 'undefined' }:`, items)
|
|
465
|
+
_iterator3 = _createForOfIteratorHelper(items);
|
|
466
|
+
_context10.prev = 27;
|
|
467
|
+
_loop = /*#__PURE__*/_regenerator["default"].mark(function _loop() {
|
|
468
|
+
var item, row;
|
|
469
|
+
return _regenerator["default"].wrap(function _loop$(_context9) {
|
|
470
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
471
|
+
case 0:
|
|
472
|
+
item = _step3.value;
|
|
473
|
+
row = widgets.personTR(dom, ns.solid('instance'), item.instance, {
|
|
474
|
+
deleteFunction: function () {
|
|
475
|
+
var _deleteFunction = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
|
476
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
477
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
484
478
|
case 0:
|
|
485
479
|
_context8.next = 2;
|
|
486
480
|
return deleteTypeIndexRegistration(item);
|
|
@@ -490,48 +484,64 @@ function _registrationList() {
|
|
|
490
484
|
case "end":
|
|
491
485
|
return _context8.stop();
|
|
492
486
|
}
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
_loop();
|
|
487
|
+
}, _callee8);
|
|
488
|
+
}));
|
|
489
|
+
function deleteFunction() {
|
|
490
|
+
return _deleteFunction.apply(this, arguments);
|
|
491
|
+
}
|
|
492
|
+
return deleteFunction;
|
|
493
|
+
}()
|
|
494
|
+
});
|
|
495
|
+
row.children[0].style.paddingLeft = '3em';
|
|
496
|
+
tbody.appendChild(row);
|
|
497
|
+
case 4:
|
|
498
|
+
case "end":
|
|
499
|
+
return _context9.stop();
|
|
507
500
|
}
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
_context9.next = 18;
|
|
515
|
-
break;
|
|
516
|
-
case 30:
|
|
517
|
-
_context9.next = 35;
|
|
501
|
+
}, _loop);
|
|
502
|
+
});
|
|
503
|
+
_iterator3.s();
|
|
504
|
+
case 30:
|
|
505
|
+
if ((_step3 = _iterator3.n()).done) {
|
|
506
|
+
_context10.next = 34;
|
|
518
507
|
break;
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
508
|
+
}
|
|
509
|
+
return _context10.delegateYield(_loop(), "t0", 32);
|
|
510
|
+
case 32:
|
|
511
|
+
_context10.next = 30;
|
|
512
|
+
break;
|
|
513
|
+
case 34:
|
|
514
|
+
_context10.next = 39;
|
|
515
|
+
break;
|
|
516
|
+
case 36:
|
|
517
|
+
_context10.prev = 36;
|
|
518
|
+
_context10.t1 = _context10["catch"](27);
|
|
519
|
+
_iterator3.e(_context10.t1);
|
|
520
|
+
case 39:
|
|
521
|
+
_context10.prev = 39;
|
|
522
|
+
_iterator3.f();
|
|
523
|
+
return _context10.finish(39);
|
|
524
|
+
case 42:
|
|
525
|
+
_context10.next = 18;
|
|
526
|
+
break;
|
|
527
|
+
case 44:
|
|
528
|
+
_context10.next = 49;
|
|
529
|
+
break;
|
|
530
|
+
case 46:
|
|
531
|
+
_context10.prev = 46;
|
|
532
|
+
_context10.t2 = _context10["catch"](16);
|
|
533
|
+
_iterator2.e(_context10.t2);
|
|
534
|
+
case 49:
|
|
535
|
+
_context10.prev = 49;
|
|
536
|
+
_iterator2.f();
|
|
537
|
+
return _context10.finish(49);
|
|
538
|
+
case 52:
|
|
539
|
+
return _context10.abrupt("return", context);
|
|
540
|
+
case 53:
|
|
541
|
+
case "end":
|
|
542
|
+
return _context10.stop();
|
|
533
543
|
}
|
|
534
|
-
}, _callee9, null, [[16,
|
|
544
|
+
}, _callee9, null, [[16, 46, 49, 52], [27, 36, 39, 42]]);
|
|
535
545
|
}));
|
|
536
546
|
return _registrationList.apply(this, arguments);
|
|
537
547
|
}
|
|
@@ -645,33 +655,31 @@ function renderSignInPopup(dom) {
|
|
|
645
655
|
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(issuerUri) {
|
|
646
656
|
var preLoginRedirectHash;
|
|
647
657
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
648
|
-
while (1) {
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
return _context.stop();
|
|
674
|
-
}
|
|
658
|
+
while (1) switch (_context.prev = _context.next) {
|
|
659
|
+
case 0:
|
|
660
|
+
_context.prev = 0;
|
|
661
|
+
// Save hash
|
|
662
|
+
preLoginRedirectHash = new URL(window.location.href).hash;
|
|
663
|
+
if (preLoginRedirectHash) {
|
|
664
|
+
window.localStorage.setItem('preLoginRedirectHash', preLoginRedirectHash);
|
|
665
|
+
}
|
|
666
|
+
window.localStorage.setItem('loginIssuer', issuerUri);
|
|
667
|
+
// Login
|
|
668
|
+
_context.next = 6;
|
|
669
|
+
return _solidLogic.authSession.login({
|
|
670
|
+
redirectUrl: window.location.href,
|
|
671
|
+
oidcIssuer: issuerUri
|
|
672
|
+
});
|
|
673
|
+
case 6:
|
|
674
|
+
_context.next = 11;
|
|
675
|
+
break;
|
|
676
|
+
case 8:
|
|
677
|
+
_context.prev = 8;
|
|
678
|
+
_context.t0 = _context["catch"](0);
|
|
679
|
+
(0, _log.alert)(_context.t0.message);
|
|
680
|
+
case 11:
|
|
681
|
+
case "end":
|
|
682
|
+
return _context.stop();
|
|
675
683
|
}
|
|
676
684
|
}, _callee, null, [[0, 8]]);
|
|
677
685
|
}));
|
|
@@ -821,49 +829,47 @@ function loginStatusBox(dom) {
|
|
|
821
829
|
_solidLogic.authSession.onLogout( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
822
830
|
var issuer, wellKnownUri, wellKnownResult, openidConfiguration;
|
|
823
831
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
824
|
-
while (1) {
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
if (!issuer) {
|
|
829
|
-
_context2.next = 19;
|
|
830
|
-
break;
|
|
831
|
-
}
|
|
832
|
-
_context2.prev = 2;
|
|
833
|
-
wellKnownUri = new URL(issuer);
|
|
834
|
-
wellKnownUri.pathname = '/.well-known/openid-configuration';
|
|
835
|
-
_context2.next = 7;
|
|
836
|
-
return fetch(wellKnownUri.toString());
|
|
837
|
-
case 7:
|
|
838
|
-
wellKnownResult = _context2.sent;
|
|
839
|
-
if (!(wellKnownResult.status === 200)) {
|
|
840
|
-
_context2.next = 15;
|
|
841
|
-
break;
|
|
842
|
-
}
|
|
843
|
-
_context2.next = 11;
|
|
844
|
-
return wellKnownResult.json();
|
|
845
|
-
case 11:
|
|
846
|
-
openidConfiguration = _context2.sent;
|
|
847
|
-
if (!(openidConfiguration && openidConfiguration.end_session_endpoint)) {
|
|
848
|
-
_context2.next = 15;
|
|
849
|
-
break;
|
|
850
|
-
}
|
|
851
|
-
_context2.next = 15;
|
|
852
|
-
return fetch(openidConfiguration.end_session_endpoint, {
|
|
853
|
-
credentials: 'include'
|
|
854
|
-
});
|
|
855
|
-
case 15:
|
|
832
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
833
|
+
case 0:
|
|
834
|
+
issuer = window.localStorage.getItem('loginIssuer');
|
|
835
|
+
if (!issuer) {
|
|
856
836
|
_context2.next = 19;
|
|
857
837
|
break;
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
838
|
+
}
|
|
839
|
+
_context2.prev = 2;
|
|
840
|
+
wellKnownUri = new URL(issuer);
|
|
841
|
+
wellKnownUri.pathname = '/.well-known/openid-configuration';
|
|
842
|
+
_context2.next = 7;
|
|
843
|
+
return fetch(wellKnownUri.toString());
|
|
844
|
+
case 7:
|
|
845
|
+
wellKnownResult = _context2.sent;
|
|
846
|
+
if (!(wellKnownResult.status === 200)) {
|
|
847
|
+
_context2.next = 15;
|
|
848
|
+
break;
|
|
849
|
+
}
|
|
850
|
+
_context2.next = 11;
|
|
851
|
+
return wellKnownResult.json();
|
|
852
|
+
case 11:
|
|
853
|
+
openidConfiguration = _context2.sent;
|
|
854
|
+
if (!(openidConfiguration && openidConfiguration.end_session_endpoint)) {
|
|
855
|
+
_context2.next = 15;
|
|
856
|
+
break;
|
|
857
|
+
}
|
|
858
|
+
_context2.next = 15;
|
|
859
|
+
return fetch(openidConfiguration.end_session_endpoint, {
|
|
860
|
+
credentials: 'include'
|
|
861
|
+
});
|
|
862
|
+
case 15:
|
|
863
|
+
_context2.next = 19;
|
|
864
|
+
break;
|
|
865
|
+
case 17:
|
|
866
|
+
_context2.prev = 17;
|
|
867
|
+
_context2.t0 = _context2["catch"](2);
|
|
868
|
+
case 19:
|
|
869
|
+
window.location.reload();
|
|
870
|
+
case 20:
|
|
871
|
+
case "end":
|
|
872
|
+
return _context2.stop();
|
|
867
873
|
}
|
|
868
874
|
}, _callee2, null, [[2, 17]]);
|
|
869
875
|
})));
|
|
@@ -929,35 +935,33 @@ function selectWorkspace(dom, appDetails, callbackWS) {
|
|
|
929
935
|
_makeNewWorkspace = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(_event) {
|
|
930
936
|
var row, cell, newBase, newWs, newData;
|
|
931
937
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
932
|
-
while (1) {
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
return _context3.stop();
|
|
960
|
-
}
|
|
938
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
939
|
+
case 0:
|
|
940
|
+
row = table.appendChild(dom.createElement('tr'));
|
|
941
|
+
cell = row.appendChild(dom.createElement('td'));
|
|
942
|
+
cell.setAttribute('colspan', '3');
|
|
943
|
+
cell.style.padding = '0.5em';
|
|
944
|
+
_context3.t0 = encodeURI;
|
|
945
|
+
_context3.next = 7;
|
|
946
|
+
return widgets.askName(dom, _solidLogic.solidLogicSingleton.store, cell, ns.solid('URL'), ns.space('Workspace'), 'Workspace');
|
|
947
|
+
case 7:
|
|
948
|
+
_context3.t1 = _context3.sent;
|
|
949
|
+
newBase = (0, _context3.t0)(_context3.t1);
|
|
950
|
+
newWs = widgets.newThing(context.preferencesFile);
|
|
951
|
+
newData = [(0, _rdflib.st)(context.me, ns.space('workspace'), newWs, context.preferencesFile),
|
|
952
|
+
// eslint-disable-next-line camelcase
|
|
953
|
+
(0, _rdflib.st)(newWs, ns.space('uriPrefix'), newBase, context.preferencesFile)];
|
|
954
|
+
if (_solidLogic.solidLogicSingleton.store.updater) {
|
|
955
|
+
_context3.next = 13;
|
|
956
|
+
break;
|
|
957
|
+
}
|
|
958
|
+
throw new Error('store has no updater');
|
|
959
|
+
case 13:
|
|
960
|
+
_context3.next = 15;
|
|
961
|
+
return _solidLogic.solidLogicSingleton.store.updater.update([], newData);
|
|
962
|
+
case 15:
|
|
963
|
+
case "end":
|
|
964
|
+
return _context3.stop();
|
|
961
965
|
}
|
|
962
966
|
}, _callee3);
|
|
963
967
|
}));
|
|
@@ -1164,35 +1168,33 @@ function getUserRoles() {
|
|
|
1164
1168
|
function _getUserRoles() {
|
|
1165
1169
|
_getUserRoles = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
|
1166
1170
|
var _yield$ensureLoadedPr, me, preferencesFile, preferencesFileError;
|
|
1167
|
-
return _regenerator["default"].wrap(function _callee10$(
|
|
1168
|
-
while (1) {
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
return _context10.stop();
|
|
1195
|
-
}
|
|
1171
|
+
return _regenerator["default"].wrap(function _callee10$(_context11) {
|
|
1172
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
1173
|
+
case 0:
|
|
1174
|
+
_context11.prev = 0;
|
|
1175
|
+
_context11.next = 3;
|
|
1176
|
+
return ensureLoadedPreferences({});
|
|
1177
|
+
case 3:
|
|
1178
|
+
_yield$ensureLoadedPr = _context11.sent;
|
|
1179
|
+
me = _yield$ensureLoadedPr.me;
|
|
1180
|
+
preferencesFile = _yield$ensureLoadedPr.preferencesFile;
|
|
1181
|
+
preferencesFileError = _yield$ensureLoadedPr.preferencesFileError;
|
|
1182
|
+
if (!(!preferencesFile || preferencesFileError)) {
|
|
1183
|
+
_context11.next = 9;
|
|
1184
|
+
break;
|
|
1185
|
+
}
|
|
1186
|
+
throw new Error(preferencesFileError);
|
|
1187
|
+
case 9:
|
|
1188
|
+
return _context11.abrupt("return", _solidLogic.solidLogicSingleton.store.each(me, ns.rdf('type'), null, preferencesFile.doc()));
|
|
1189
|
+
case 12:
|
|
1190
|
+
_context11.prev = 12;
|
|
1191
|
+
_context11.t0 = _context11["catch"](0);
|
|
1192
|
+
debug.warn('Unable to fetch your preferences - this was the error: ', _context11.t0);
|
|
1193
|
+
case 15:
|
|
1194
|
+
return _context11.abrupt("return", []);
|
|
1195
|
+
case 16:
|
|
1196
|
+
case "end":
|
|
1197
|
+
return _context11.stop();
|
|
1196
1198
|
}
|
|
1197
1199
|
}, _callee10, null, [[0, 12]]);
|
|
1198
1200
|
}));
|
|
@@ -1204,21 +1206,19 @@ function filterAvailablePanes(_x13) {
|
|
|
1204
1206
|
function _filterAvailablePanes() {
|
|
1205
1207
|
_filterAvailablePanes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(panes) {
|
|
1206
1208
|
var userRoles;
|
|
1207
|
-
return _regenerator["default"].wrap(function _callee11$(
|
|
1208
|
-
while (1) {
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
return
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
return _context11.stop();
|
|
1221
|
-
}
|
|
1209
|
+
return _regenerator["default"].wrap(function _callee11$(_context12) {
|
|
1210
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
1211
|
+
case 0:
|
|
1212
|
+
_context12.next = 2;
|
|
1213
|
+
return getUserRoles();
|
|
1214
|
+
case 2:
|
|
1215
|
+
userRoles = _context12.sent;
|
|
1216
|
+
return _context12.abrupt("return", panes.filter(function (pane) {
|
|
1217
|
+
return isMatchingAudience(pane, userRoles);
|
|
1218
|
+
}));
|
|
1219
|
+
case 4:
|
|
1220
|
+
case "end":
|
|
1221
|
+
return _context12.stop();
|
|
1222
1222
|
}
|
|
1223
1223
|
}, _callee11);
|
|
1224
1224
|
}));
|