solid-ui 2.4.10-d886d8b3 → 2.4.10-f228a60d

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.
@@ -3247,7 +3247,7 @@ function _loadIndex() {
3247
3247
  case 0:
3248
3248
  _context7.next = 2;
3249
3249
  return _logic.solidLogicSingleton.loadIndexes(context.me, isPublic ? context.publicProfile || null : null, isPublic ? null : context.preferencesFile || null, /*#__PURE__*/function () {
3250
- var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(err) {
3250
+ var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(err) {
3251
3251
  return _regenerator["default"].wrap(function _callee6$(_context6) {
3252
3252
  while (1) {
3253
3253
  switch (_context6.prev = _context6.next) {
@@ -3263,7 +3263,7 @@ function _loadIndex() {
3263
3263
  }));
3264
3264
 
3265
3265
  return function (_x21) {
3266
- return _ref3.apply(this, arguments);
3266
+ return _ref4.apply(this, arguments);
3267
3267
  };
3268
3268
  }());
3269
3269
 
@@ -3302,7 +3302,7 @@ function _loadTypeIndexes() {
3302
3302
  case 0:
3303
3303
  _context9.next = 2;
3304
3304
  return _logic.solidLogicSingleton.loadIndexes(context.me, context.publicProfile || null, context.preferencesFile || null, /*#__PURE__*/function () {
3305
- var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(err) {
3305
+ var _ref5 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(err) {
3306
3306
  return _regenerator["default"].wrap(function _callee8$(_context8) {
3307
3307
  while (1) {
3308
3308
  switch (_context8.prev = _context8.next) {
@@ -3318,7 +3318,7 @@ function _loadTypeIndexes() {
3318
3318
  }));
3319
3319
 
3320
3320
  return function (_x22) {
3321
- return _ref4.apply(this, arguments);
3321
+ return _ref5.apply(this, arguments);
3322
3322
  };
3323
3323
  }());
3324
3324
 
@@ -4236,7 +4236,7 @@ function renderSignInPopup(dom) {
4236
4236
  issuerBottonLabel.innerText = 'Or pick an identity provider from the list below:';
4237
4237
  issuerBottonLabel.setAttribute('style', 'color: #888');
4238
4238
  issuerButtonContainer.appendChild(issuerBottonLabel);
4239
- DEFAULT_ISSUERS.forEach(function (issuerInfo) {
4239
+ getSuggestedIssuers().forEach(function (issuerInfo) {
4240
4240
  var issuerButton = dom.createElement('button');
4241
4241
  issuerButton.innerText = issuerInfo.name;
4242
4242
  issuerButton.setAttribute('style', 'height: 38px; margin-top: 10px');
@@ -4247,6 +4247,40 @@ function renderSignInPopup(dom) {
4247
4247
  });
4248
4248
  issuerPopupBox.appendChild(issuerButtonContainer);
4249
4249
  }
4250
+ /**
4251
+ * @returns - A list of suggested OIDC issuers
4252
+ */
4253
+
4254
+
4255
+ function getSuggestedIssuers() {
4256
+ // Suggest a default list of OIDC issuers
4257
+ var issuers = [].concat(DEFAULT_ISSUERS); // Suggest the current host if not already included
4258
+
4259
+ var _URL = new URL(location.href),
4260
+ host = _URL.host,
4261
+ origin = _URL.origin;
4262
+
4263
+ var hosts = issuers.map(function (_ref2) {
4264
+ var uri = _ref2.uri;
4265
+ return new URL(uri).host;
4266
+ });
4267
+
4268
+ if (!hosts.includes(host) && !hosts.some(function (existing) {
4269
+ return isSubdomainOf(host, existing);
4270
+ })) {
4271
+ issuers.unshift({
4272
+ name: host,
4273
+ uri: origin
4274
+ });
4275
+ }
4276
+
4277
+ return issuers;
4278
+ }
4279
+
4280
+ function isSubdomainOf(subdomain, domain) {
4281
+ var dot = subdomain.length - domain.length - 1;
4282
+ return dot > 0 && subdomain[dot] === '.' && subdomain.endsWith(domain);
4283
+ }
4250
4284
  /**
4251
4285
  * @returns {Promise<string|null>} Resolves with WebID URI or null
4252
4286
  */
@@ -4576,8 +4610,8 @@ function selectWorkspace(dom, appDetails, callbackWS) {
4576
4610
  div: box
4577
4611
  };
4578
4612
 
4579
- function say(s) {
4580
- box.appendChild(widgets.errorMessageBlock(dom, s));
4613
+ function say(s, background) {
4614
+ box.appendChild(widgets.errorMessageBlock(dom, s, background));
4581
4615
  }
4582
4616
 
4583
4617
  function figureOutBase(ws) {
@@ -4665,17 +4699,17 @@ function selectWorkspace(dom, appDetails, callbackWS) {
4665
4699
 
4666
4700
 
4667
4701
  if (w.length === 0 && storages) {
4668
- say("You don't seem to have any workspaces. You have ".concat(storages.length, " storage spaces."));
4702
+ say("You don't seem to have any workspaces. You have ".concat(storages.length, " storage spaces."), 'white');
4669
4703
  storages.map(function (s) {
4670
4704
  w = w.concat(_logic.solidLogicSingleton.store.each(s, ns.ldp('contains')));
4671
4705
  return w;
4672
4706
  }).filter(function (file) {
4673
- return ['public', 'private'].includes(file.id().toLowerCase());
4707
+ return file.id ? ['public', 'private'].includes(file.id().toLowerCase()) : '';
4674
4708
  });
4675
4709
  }
4676
4710
 
4677
4711
  if (w.length === 1) {
4678
- say("Workspace used: ".concat(w[0].uri)); // @@ allow user to see URI
4712
+ say("Workspace used: ".concat(w[0].uri), 'white'); // @@ allow user to see URI
4679
4713
 
4680
4714
  newBase = figureOutBase(w[0]); // callbackWS(w[0], newBase)
4681
4715
  // } else if (w.length === 0) {
@@ -15388,8 +15422,8 @@ Object.defineProperty(exports, "__esModule", {
15388
15422
  });
15389
15423
  exports["default"] = void 0;
15390
15424
  var _default = {
15391
- buildTime: '2021-10-16T16:51:25Z',
15392
- commit: 'd886d8b342aee7810741a4a362ddde7559640af1',
15425
+ buildTime: '2021-11-02T19:55:32Z',
15426
+ commit: 'f228a60d0ccc02dda6c85fed39e18d810976b2c0',
15393
15427
  npmInfo: {
15394
15428
  'solid-ui': '2.4.10',
15395
15429
  npm: '6.14.15',
@@ -15397,11 +15431,11 @@ var _default = {
15397
15431
  brotli: '1.0.9',
15398
15432
  cldr: '39.0',
15399
15433
  icu: '69.1',
15400
- llhttp: '2.1.3',
15434
+ llhttp: '2.1.4',
15401
15435
  modules: '83',
15402
15436
  napi: '8',
15403
15437
  nghttp2: '1.42.0',
15404
- node: '14.18.0',
15438
+ node: '14.18.1',
15405
15439
  openssl: '1.1.1l',
15406
15440
  tz: '2021a',
15407
15441
  unicode: '13.0',