solid-ui 2.4.28-e581c53c → 2.4.28-fda13292
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/dist/805.solid-ui.min.js +1 -1
- package/dist/805.solid-ui.min.js.map +1 -1
- package/dist/solid-ui.js +1402 -2163
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +1 -1
- package/dist/solid-ui.min.js.map +1 -1
- package/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js +1955 -1955
- package/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js.map +1 -1
- package/lib/chat/bookmarks.js +7 -6
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js +65 -249
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/dateFolder.js +126 -129
- package/lib/chat/dateFolder.js.map +1 -1
- package/lib/chat/infinite.js +423 -637
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/message.js +193 -332
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/messageTools.js +277 -463
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/thread.js +209 -299
- package/lib/chat/thread.js.map +1 -1
- package/lib/header/index.js +0 -5
- package/lib/header/index.js.map +1 -1
- package/lib/log.js +5 -5
- package/lib/log.js.map +1 -1
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +45 -83
- package/lib/login/login.js.map +1 -1
- package/lib/media/media-capture.d.ts +2 -2
- package/lib/media/media-capture.d.ts.map +1 -1
- package/lib/media/media-capture.js +11 -15
- package/lib/media/media-capture.js.map +1 -1
- package/lib/pad.d.ts +2 -2
- package/lib/pad.d.ts.map +1 -1
- package/lib/pad.js +15 -41
- package/lib/pad.js.map +1 -1
- package/lib/participation.d.ts +5 -5
- package/lib/participation.d.ts.map +1 -1
- package/lib/participation.js +24 -24
- package/lib/participation.js.map +1 -1
- package/lib/preferences.js +0 -4
- package/lib/preferences.js.map +1 -1
- package/lib/style.js +93 -85
- package/lib/style.js.map +1 -1
- package/lib/styleConstants.js +36 -0
- package/lib/styleConstants.js.map +1 -0
- package/lib/tabs.d.ts +0 -125
- package/lib/tabs.d.ts.map +1 -1
- package/lib/tabs.js +15 -8
- package/lib/tabs.js.map +1 -1
- package/lib/utils/headerFooterHelpers.js +0 -2
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/versionInfo.js +6 -6
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons.js +2 -0
- package/lib/widgets/buttons.js.map +1 -1
- package/lib/widgets/dragAndDrop.js +10 -18
- package/lib/widgets/dragAndDrop.js.map +1 -1
- package/lib/widgets/error.d.ts.map +1 -1
- package/lib/widgets/error.js +9 -2
- package/lib/widgets/error.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteBar.js +1 -8
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +5 -9
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js +0 -5
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms/basic.d.ts.map +1 -1
- package/lib/widgets/forms/basic.js +5 -4
- package/lib/widgets/forms/basic.js.map +1 -1
- package/lib/widgets/forms/fieldParams.js +2 -2
- package/lib/widgets/forms/fieldParams.js.map +1 -1
- package/lib/widgets/forms.js +10 -12
- package/lib/widgets/forms.js.map +1 -1
- package/lib/widgets/peoplePicker.js +0 -11
- package/lib/widgets/peoplePicker.js.map +1 -1
- package/package.json +2 -3
package/lib/login/login.js
CHANGED
|
@@ -34,30 +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++) arr2[i] = arr[i]; return arr2; }
|
|
38
|
-
* Signing in, signing up, profile and preferences reloading
|
|
39
|
-
* Type index management
|
|
40
|
-
*
|
|
41
|
-
* Many functions in this module take a context object which
|
|
42
|
-
* holds various RDF symbols, add to it, and return a promise of it.
|
|
43
|
-
*
|
|
44
|
-
* * `me` RDF symbol for the user's WebID
|
|
45
|
-
* * `publicProfile` The user's public profile, iff loaded
|
|
46
|
-
* * `preferencesFile` The user's personal preference file, iff loaded
|
|
47
|
-
* * `index.public` The user's public type index file
|
|
48
|
-
* * `index.private` The user's private type index file
|
|
49
|
-
*
|
|
50
|
-
* Not RDF symbols:
|
|
51
|
-
* * `noun` A string in english for the type of thing -- like "address book"
|
|
52
|
-
* * `instance` An array of nodes which are existing instances
|
|
53
|
-
* * `containers` An array of nodes of containers of instances
|
|
54
|
-
* * `div` A DOM element where UI can be displayed
|
|
55
|
-
* * `statusArea` A DOM element (opt) progress stuff can be displayed, or error messages
|
|
56
|
-
* *
|
|
57
|
-
* * Vocabulary: "load" loads a file if it exists;
|
|
58
|
-
* * 'Ensure" CREATES the file if it does not exist (if it can) and then loads it.
|
|
59
|
-
* @packageDocumentation
|
|
60
|
-
*/ // eslint-disable-next-line camelcase
|
|
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; }
|
|
61
38
|
var store = _solidLogic.solidLogicSingleton.store;
|
|
62
39
|
var _solidLogicSingleton$ = _solidLogic.solidLogicSingleton.profile,
|
|
63
40
|
loadPreferences = _solidLogicSingleton$.loadPreferences,
|
|
@@ -123,104 +100,93 @@ function ensureLoadedPreferences(_x) {
|
|
|
123
100
|
// used to be logInLoadProfile
|
|
124
101
|
function _ensureLoadedPreferences() {
|
|
125
102
|
_ensureLoadedPreferences = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(context) {
|
|
126
|
-
var
|
|
103
|
+
var progressDisplay, preferencesFile, m2;
|
|
127
104
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
128
105
|
while (1) switch (_context4.prev = _context4.next) {
|
|
129
106
|
case 0:
|
|
130
|
-
complain = function _complain(message) {
|
|
131
|
-
message = "ensureLoadedPreferences: ".concat(message);
|
|
132
|
-
if (statusArea) {
|
|
133
|
-
// statusArea.innerHTML = ''
|
|
134
|
-
statusArea.appendChild(widgets.errorMessageBlock(context.dom, message));
|
|
135
|
-
}
|
|
136
|
-
debug.log(message);
|
|
137
|
-
// reject(new Error(message))
|
|
138
|
-
};
|
|
139
107
|
if (!context.preferencesFile) {
|
|
140
|
-
_context4.next =
|
|
108
|
+
_context4.next = 2;
|
|
141
109
|
break;
|
|
142
110
|
}
|
|
143
111
|
return _context4.abrupt("return", Promise.resolve(context));
|
|
144
|
-
case
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
_context4.prev = 4;
|
|
148
|
-
_context4.next = 7;
|
|
112
|
+
case 2:
|
|
113
|
+
_context4.prev = 2;
|
|
114
|
+
_context4.next = 5;
|
|
149
115
|
return ensureLoadedProfile(context);
|
|
150
|
-
case
|
|
116
|
+
case 5:
|
|
151
117
|
context = _context4.sent;
|
|
152
|
-
_context4.next =
|
|
118
|
+
_context4.next = 8;
|
|
153
119
|
return loadPreferences(context.me);
|
|
154
|
-
case
|
|
120
|
+
case 8:
|
|
155
121
|
preferencesFile = _context4.sent;
|
|
156
122
|
if (progressDisplay) {
|
|
157
123
|
progressDisplay.parentNode.removeChild(progressDisplay);
|
|
158
124
|
}
|
|
159
125
|
context.preferencesFile = preferencesFile;
|
|
160
|
-
_context4.next =
|
|
126
|
+
_context4.next = 49;
|
|
161
127
|
break;
|
|
162
|
-
case
|
|
163
|
-
_context4.prev =
|
|
164
|
-
_context4.t0 = _context4["catch"](
|
|
128
|
+
case 13:
|
|
129
|
+
_context4.prev = 13;
|
|
130
|
+
_context4.t0 = _context4["catch"](2);
|
|
165
131
|
if (!(_context4.t0 instanceof _solidLogic.UnauthorizedError)) {
|
|
166
|
-
_context4.next =
|
|
132
|
+
_context4.next = 20;
|
|
167
133
|
break;
|
|
168
134
|
}
|
|
169
135
|
m2 = 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?';
|
|
170
136
|
(0, _log.alert)(m2);
|
|
171
|
-
_context4.next =
|
|
137
|
+
_context4.next = 49;
|
|
172
138
|
break;
|
|
173
|
-
case
|
|
139
|
+
case 20:
|
|
174
140
|
if (!(_context4.t0 instanceof _solidLogic.CrossOriginForbiddenError)) {
|
|
175
|
-
_context4.next =
|
|
141
|
+
_context4.next = 26;
|
|
176
142
|
break;
|
|
177
143
|
}
|
|
178
144
|
m2 = "Unauthorized: Assuming preference file blocked for origin ".concat(window.location.origin);
|
|
179
145
|
context.preferencesFileError = m2;
|
|
180
146
|
return _context4.abrupt("return", context);
|
|
181
|
-
case
|
|
147
|
+
case 26:
|
|
182
148
|
if (!(_context4.t0 instanceof _solidLogic.SameOriginForbiddenError)) {
|
|
183
|
-
_context4.next =
|
|
149
|
+
_context4.next = 32;
|
|
184
150
|
break;
|
|
185
151
|
}
|
|
186
152
|
m2 = 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.';
|
|
187
153
|
debug.warn(m2);
|
|
188
154
|
return _context4.abrupt("return", context);
|
|
189
|
-
case
|
|
155
|
+
case 32:
|
|
190
156
|
if (!(_context4.t0 instanceof _solidLogic.NotEditableError)) {
|
|
191
|
-
_context4.next =
|
|
157
|
+
_context4.next = 38;
|
|
192
158
|
break;
|
|
193
159
|
}
|
|
194
160
|
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
195
161
|
debug.warn(m2);
|
|
196
162
|
return _context4.abrupt("return", context);
|
|
197
|
-
case
|
|
163
|
+
case 38:
|
|
198
164
|
if (!(_context4.t0 instanceof _solidLogic.WebOperationError)) {
|
|
199
|
-
_context4.next =
|
|
165
|
+
_context4.next = 43;
|
|
200
166
|
break;
|
|
201
167
|
}
|
|
202
168
|
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
203
169
|
debug.warn(m2);
|
|
204
|
-
_context4.next =
|
|
170
|
+
_context4.next = 49;
|
|
205
171
|
break;
|
|
206
|
-
case
|
|
172
|
+
case 43:
|
|
207
173
|
if (!(_context4.t0 instanceof _solidLogic.FetchError)) {
|
|
208
|
-
_context4.next =
|
|
174
|
+
_context4.next = 48;
|
|
209
175
|
break;
|
|
210
176
|
}
|
|
211
177
|
m2 = "Strange: Error ".concat(_context4.t0.status, " trying to read your preference file.").concat(_context4.t0.message);
|
|
212
178
|
(0, _log.alert)(m2);
|
|
213
|
-
_context4.next =
|
|
179
|
+
_context4.next = 49;
|
|
214
180
|
break;
|
|
215
|
-
case
|
|
181
|
+
case 48:
|
|
216
182
|
throw new Error("(via loadPrefs) ".concat(_context4.t0));
|
|
217
|
-
case
|
|
183
|
+
case 49:
|
|
218
184
|
return _context4.abrupt("return", context);
|
|
219
|
-
case
|
|
185
|
+
case 50:
|
|
220
186
|
case "end":
|
|
221
187
|
return _context4.stop();
|
|
222
188
|
}
|
|
223
|
-
}, _callee4, null, [[
|
|
189
|
+
}, _callee4, null, [[2, 13]]);
|
|
224
190
|
}));
|
|
225
191
|
return _ensureLoadedPreferences.apply(this, arguments);
|
|
226
192
|
}
|
|
@@ -437,6 +403,15 @@ function renderScopeHeadingRow(context, store, scope) {
|
|
|
437
403
|
function registrationList(_x9, _x10) {
|
|
438
404
|
return _registrationList.apply(this, arguments);
|
|
439
405
|
} // registrationList
|
|
406
|
+
/**
|
|
407
|
+
* Bootstrapping identity
|
|
408
|
+
* (Called by `loginStatusBox()`)
|
|
409
|
+
*
|
|
410
|
+
* @param dom
|
|
411
|
+
* @param setUserCallback
|
|
412
|
+
*
|
|
413
|
+
* @returns
|
|
414
|
+
*/
|
|
440
415
|
function _registrationList() {
|
|
441
416
|
_registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(context, options) {
|
|
442
417
|
var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop;
|
|
@@ -568,23 +543,10 @@ function _registrationList() {
|
|
|
568
543
|
}));
|
|
569
544
|
return _registrationList.apply(this, arguments);
|
|
570
545
|
}
|
|
571
|
-
function getDefaultSignInButtonStyle() {
|
|
572
|
-
return 'padding: 1em; border-radius:0.5em; font-size: 100%;';
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* Bootstrapping identity
|
|
577
|
-
* (Called by `loginStatusBox()`)
|
|
578
|
-
*
|
|
579
|
-
* @param dom
|
|
580
|
-
* @param setUserCallback
|
|
581
|
-
*
|
|
582
|
-
* @returns
|
|
583
|
-
*/
|
|
584
546
|
function signInOrSignUpBox(dom, setUserCallback) {
|
|
585
547
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
586
548
|
options = options || {};
|
|
587
|
-
var signInButtonStyle = options.buttonStyle ||
|
|
549
|
+
var signInButtonStyle = options.buttonStyle || style.signInAndUpButtonStyle;
|
|
588
550
|
var box = dom.createElement('div');
|
|
589
551
|
var magicClassName = 'SolidSignInOrSignUpBox';
|
|
590
552
|
debug.log('widgets.signInOrSignUpBox');
|
|
@@ -597,7 +559,7 @@ function signInOrSignUpBox(dom, setUserCallback) {
|
|
|
597
559
|
box.appendChild(signInPopUpButton);
|
|
598
560
|
signInPopUpButton.setAttribute('type', 'button');
|
|
599
561
|
signInPopUpButton.setAttribute('value', 'Log in');
|
|
600
|
-
signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle
|
|
562
|
+
signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle).concat(style.headerBannerLoginInput) + style.signUpBackground);
|
|
601
563
|
_solidLogic.authSession.onLogin(function () {
|
|
602
564
|
var me = _solidLogic.authn.currentUser();
|
|
603
565
|
// const sessionInfo = authSession.info
|
|
@@ -638,7 +600,7 @@ function signInOrSignUpBox(dom, setUserCallback) {
|
|
|
638
600
|
box.appendChild(signupButton);
|
|
639
601
|
signupButton.setAttribute('type', 'button');
|
|
640
602
|
signupButton.setAttribute('value', 'Sign Up for Solid');
|
|
641
|
-
signupButton.setAttribute('style', "".concat(signInButtonStyle
|
|
603
|
+
signupButton.setAttribute('style', "".concat(signInButtonStyle).concat(style.headerBannerLoginInput) + style.signInBackground);
|
|
642
604
|
signupButton.addEventListener('click', function (_event) {
|
|
643
605
|
var signupMgr = new _signup.Signup();
|
|
644
606
|
signupMgr.signup().then(function (uri) {
|
|
@@ -806,7 +768,7 @@ function loginStatusBox(dom) {
|
|
|
806
768
|
});
|
|
807
769
|
}
|
|
808
770
|
function logoutButton(me, options) {
|
|
809
|
-
var signInButtonStyle = options.buttonStyle ||
|
|
771
|
+
var signInButtonStyle = options.buttonStyle || style.signInAndUpButtonStyle;
|
|
810
772
|
var logoutLabel = 'WebID logout';
|
|
811
773
|
if (me) {
|
|
812
774
|
var nick = _solidLogic.solidLogicSingleton.store.any(me, ns.foaf('nick')) || _solidLogic.solidLogicSingleton.store.any(me, ns.foaf('name'));
|
|
@@ -818,7 +780,7 @@ function loginStatusBox(dom) {
|
|
|
818
780
|
// signOutButton.className = 'WebIDCancelButton'
|
|
819
781
|
signOutButton.setAttribute('type', 'button');
|
|
820
782
|
signOutButton.setAttribute('value', logoutLabel);
|
|
821
|
-
signOutButton.setAttribute('style', "".concat(signInButtonStyle
|
|
783
|
+
signOutButton.setAttribute('style', "".concat(signInButtonStyle));
|
|
822
784
|
signOutButton.addEventListener('click', logoutButtonHandler, false);
|
|
823
785
|
return signOutButton;
|
|
824
786
|
}
|