solid-ui 2.4.28-82fd8721 → 2.4.28-89783bff
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/solid-ui.js +293 -271
- 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/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +44 -59
- 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 -38
- package/lib/pad.js.map +1 -1
- package/lib/participation.d.ts +6 -6
- package/lib/participation.d.ts.map +1 -1
- package/lib/participation.js +24 -23
- package/lib/participation.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/versionInfo.js +6 -6
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/dragAndDrop.js +11 -19
- 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/autocompletePicker.d.ts.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +2 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.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 +9 -8
- package/lib/widgets/forms.js.map +1 -1
- package/package.json +1 -1
package/lib/login/login.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/login/login.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAa,SAAS,EAAM,MAAM,QAAQ,CAAA;AAGjD,OAAO,EACL,UAAU,EACV,qBAAqB,EAYtB,MAAM,aAAa,CAAA;AAwBpB;;;;GAIG;AAEH,wBAAgB,cAAc,CAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAwB9F;AAED;;;;;;;GAOG;AAEH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,qBAAqB,CAAC,
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/login/login.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAa,SAAS,EAAM,MAAM,QAAQ,CAAA;AAGjD,OAAO,EACL,UAAU,EACV,qBAAqB,EAYtB,MAAM,aAAa,CAAA;AAwBpB;;;;GAIG;AAEH,wBAAgB,cAAc,CAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAwB9F;AAED;;;;;;;GAOG;AAEH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,qBAAqB,CAAC,CAwDhC;AAED;;;;;;GAMG;AAEH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,qBAAqB,CAAC,CAiBhC;AAED;;;;IAII;AACJ,wBAAsB,gBAAgB,C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AE,YAAY,EACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GAC5D,WAAW,CAmBb;AACD;;;GAGG;AACH,wBAAsB,YAAY,IAAK,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAgB/D;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,GAC3B,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAGhC"}
|
package/lib/login/login.js
CHANGED
|
@@ -100,104 +100,93 @@ function ensureLoadedPreferences(_x) {
|
|
|
100
100
|
// used to be logInLoadProfile
|
|
101
101
|
function _ensureLoadedPreferences() {
|
|
102
102
|
_ensureLoadedPreferences = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(context) {
|
|
103
|
-
var
|
|
103
|
+
var progressDisplay, preferencesFile, m2;
|
|
104
104
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
105
105
|
while (1) switch (_context4.prev = _context4.next) {
|
|
106
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));
|
|
112
|
-
}
|
|
113
|
-
debug.log(message);
|
|
114
|
-
// reject(new Error(message))
|
|
115
|
-
};
|
|
116
107
|
if (!context.preferencesFile) {
|
|
117
|
-
_context4.next =
|
|
108
|
+
_context4.next = 2;
|
|
118
109
|
break;
|
|
119
110
|
}
|
|
120
111
|
return _context4.abrupt("return", Promise.resolve(context));
|
|
121
|
-
case
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
_context4.prev = 4;
|
|
125
|
-
_context4.next = 7;
|
|
112
|
+
case 2:
|
|
113
|
+
_context4.prev = 2;
|
|
114
|
+
_context4.next = 5;
|
|
126
115
|
return ensureLoadedProfile(context);
|
|
127
|
-
case
|
|
116
|
+
case 5:
|
|
128
117
|
context = _context4.sent;
|
|
129
|
-
_context4.next =
|
|
118
|
+
_context4.next = 8;
|
|
130
119
|
return loadPreferences(context.me);
|
|
131
|
-
case
|
|
120
|
+
case 8:
|
|
132
121
|
preferencesFile = _context4.sent;
|
|
133
122
|
if (progressDisplay) {
|
|
134
123
|
progressDisplay.parentNode.removeChild(progressDisplay);
|
|
135
124
|
}
|
|
136
125
|
context.preferencesFile = preferencesFile;
|
|
137
|
-
_context4.next =
|
|
126
|
+
_context4.next = 49;
|
|
138
127
|
break;
|
|
139
|
-
case
|
|
140
|
-
_context4.prev =
|
|
141
|
-
_context4.t0 = _context4["catch"](
|
|
128
|
+
case 13:
|
|
129
|
+
_context4.prev = 13;
|
|
130
|
+
_context4.t0 = _context4["catch"](2);
|
|
142
131
|
if (!(_context4.t0 instanceof _solidLogic.UnauthorizedError)) {
|
|
143
|
-
_context4.next =
|
|
132
|
+
_context4.next = 20;
|
|
144
133
|
break;
|
|
145
134
|
}
|
|
146
135
|
m2 = 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?';
|
|
147
136
|
(0, _log.alert)(m2);
|
|
148
|
-
_context4.next =
|
|
137
|
+
_context4.next = 49;
|
|
149
138
|
break;
|
|
150
|
-
case
|
|
139
|
+
case 20:
|
|
151
140
|
if (!(_context4.t0 instanceof _solidLogic.CrossOriginForbiddenError)) {
|
|
152
|
-
_context4.next =
|
|
141
|
+
_context4.next = 26;
|
|
153
142
|
break;
|
|
154
143
|
}
|
|
155
144
|
m2 = "Unauthorized: Assuming preference file blocked for origin ".concat(window.location.origin);
|
|
156
145
|
context.preferencesFileError = m2;
|
|
157
146
|
return _context4.abrupt("return", context);
|
|
158
|
-
case
|
|
147
|
+
case 26:
|
|
159
148
|
if (!(_context4.t0 instanceof _solidLogic.SameOriginForbiddenError)) {
|
|
160
|
-
_context4.next =
|
|
149
|
+
_context4.next = 32;
|
|
161
150
|
break;
|
|
162
151
|
}
|
|
163
152
|
m2 = 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.';
|
|
164
153
|
debug.warn(m2);
|
|
165
154
|
return _context4.abrupt("return", context);
|
|
166
|
-
case
|
|
155
|
+
case 32:
|
|
167
156
|
if (!(_context4.t0 instanceof _solidLogic.NotEditableError)) {
|
|
168
|
-
_context4.next =
|
|
157
|
+
_context4.next = 38;
|
|
169
158
|
break;
|
|
170
159
|
}
|
|
171
160
|
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
172
161
|
debug.warn(m2);
|
|
173
162
|
return _context4.abrupt("return", context);
|
|
174
|
-
case
|
|
163
|
+
case 38:
|
|
175
164
|
if (!(_context4.t0 instanceof _solidLogic.WebOperationError)) {
|
|
176
|
-
_context4.next =
|
|
165
|
+
_context4.next = 43;
|
|
177
166
|
break;
|
|
178
167
|
}
|
|
179
168
|
m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
|
|
180
169
|
debug.warn(m2);
|
|
181
|
-
_context4.next =
|
|
170
|
+
_context4.next = 49;
|
|
182
171
|
break;
|
|
183
|
-
case
|
|
172
|
+
case 43:
|
|
184
173
|
if (!(_context4.t0 instanceof _solidLogic.FetchError)) {
|
|
185
|
-
_context4.next =
|
|
174
|
+
_context4.next = 48;
|
|
186
175
|
break;
|
|
187
176
|
}
|
|
188
177
|
m2 = "Strange: Error ".concat(_context4.t0.status, " trying to read your preference file.").concat(_context4.t0.message);
|
|
189
178
|
(0, _log.alert)(m2);
|
|
190
|
-
_context4.next =
|
|
179
|
+
_context4.next = 49;
|
|
191
180
|
break;
|
|
192
|
-
case
|
|
181
|
+
case 48:
|
|
193
182
|
throw new Error("(via loadPrefs) ".concat(_context4.t0));
|
|
194
|
-
case
|
|
183
|
+
case 49:
|
|
195
184
|
return _context4.abrupt("return", context);
|
|
196
|
-
case
|
|
185
|
+
case 50:
|
|
197
186
|
case "end":
|
|
198
187
|
return _context4.stop();
|
|
199
188
|
}
|
|
200
|
-
}, _callee4, null, [[
|
|
189
|
+
}, _callee4, null, [[2, 13]]);
|
|
201
190
|
}));
|
|
202
191
|
return _ensureLoadedPreferences.apply(this, arguments);
|
|
203
192
|
}
|
|
@@ -414,6 +403,15 @@ function renderScopeHeadingRow(context, store, scope) {
|
|
|
414
403
|
function registrationList(_x9, _x10) {
|
|
415
404
|
return _registrationList.apply(this, arguments);
|
|
416
405
|
} // registrationList
|
|
406
|
+
/**
|
|
407
|
+
* Bootstrapping identity
|
|
408
|
+
* (Called by `loginStatusBox()`)
|
|
409
|
+
*
|
|
410
|
+
* @param dom
|
|
411
|
+
* @param setUserCallback
|
|
412
|
+
*
|
|
413
|
+
* @returns
|
|
414
|
+
*/
|
|
417
415
|
function _registrationList() {
|
|
418
416
|
_registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(context, options) {
|
|
419
417
|
var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop;
|
|
@@ -545,23 +543,10 @@ function _registrationList() {
|
|
|
545
543
|
}));
|
|
546
544
|
return _registrationList.apply(this, arguments);
|
|
547
545
|
}
|
|
548
|
-
function getDefaultSignInButtonStyle() {
|
|
549
|
-
return 'padding: 1em; border-radius:0.5em; font-size: 100%;';
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* Bootstrapping identity
|
|
554
|
-
* (Called by `loginStatusBox()`)
|
|
555
|
-
*
|
|
556
|
-
* @param dom
|
|
557
|
-
* @param setUserCallback
|
|
558
|
-
*
|
|
559
|
-
* @returns
|
|
560
|
-
*/
|
|
561
546
|
function signInOrSignUpBox(dom, setUserCallback) {
|
|
562
547
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
563
548
|
options = options || {};
|
|
564
|
-
var signInButtonStyle = options.buttonStyle ||
|
|
549
|
+
var signInButtonStyle = options.buttonStyle || style.signInAndUpButtonStyle;
|
|
565
550
|
var box = dom.createElement('div');
|
|
566
551
|
var magicClassName = 'SolidSignInOrSignUpBox';
|
|
567
552
|
debug.log('widgets.signInOrSignUpBox');
|
|
@@ -574,7 +559,7 @@ function signInOrSignUpBox(dom, setUserCallback) {
|
|
|
574
559
|
box.appendChild(signInPopUpButton);
|
|
575
560
|
signInPopUpButton.setAttribute('type', 'button');
|
|
576
561
|
signInPopUpButton.setAttribute('value', 'Log in');
|
|
577
|
-
signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle
|
|
562
|
+
signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle).concat(style.headerBannerLoginInput) + style.signUpBackground);
|
|
578
563
|
_solidLogic.authSession.onLogin(function () {
|
|
579
564
|
var me = _solidLogic.authn.currentUser();
|
|
580
565
|
// const sessionInfo = authSession.info
|
|
@@ -615,7 +600,7 @@ function signInOrSignUpBox(dom, setUserCallback) {
|
|
|
615
600
|
box.appendChild(signupButton);
|
|
616
601
|
signupButton.setAttribute('type', 'button');
|
|
617
602
|
signupButton.setAttribute('value', 'Sign Up for Solid');
|
|
618
|
-
signupButton.setAttribute('style', "".concat(signInButtonStyle
|
|
603
|
+
signupButton.setAttribute('style', "".concat(signInButtonStyle).concat(style.headerBannerLoginInput) + style.signInBackground);
|
|
619
604
|
signupButton.addEventListener('click', function (_event) {
|
|
620
605
|
var signupMgr = new _signup.Signup();
|
|
621
606
|
signupMgr.signup().then(function (uri) {
|
|
@@ -783,7 +768,7 @@ function loginStatusBox(dom) {
|
|
|
783
768
|
});
|
|
784
769
|
}
|
|
785
770
|
function logoutButton(me, options) {
|
|
786
|
-
var signInButtonStyle = options.buttonStyle ||
|
|
771
|
+
var signInButtonStyle = options.buttonStyle || style.signInAndUpButtonStyle;
|
|
787
772
|
var logoutLabel = 'WebID logout';
|
|
788
773
|
if (me) {
|
|
789
774
|
var nick = _solidLogic.solidLogicSingleton.store.any(me, ns.foaf('nick')) || _solidLogic.solidLogicSingleton.store.any(me, ns.foaf('name'));
|
|
@@ -795,7 +780,7 @@ function loginStatusBox(dom) {
|
|
|
795
780
|
// signOutButton.className = 'WebIDCancelButton'
|
|
796
781
|
signOutButton.setAttribute('type', 'button');
|
|
797
782
|
signOutButton.setAttribute('value', logoutLabel);
|
|
798
|
-
signOutButton.setAttribute('style', "".concat(signInButtonStyle
|
|
783
|
+
signOutButton.setAttribute('style', "".concat(signInButtonStyle));
|
|
799
784
|
signOutButton.addEventListener('click', logoutButtonHandler, false);
|
|
800
785
|
return signOutButton;
|
|
801
786
|
}
|