solid-ui 3.0.4-aea68a1 → 3.0.4-c5f2ac1

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 CHANGED
@@ -4913,8 +4913,6 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
4913
4913
  field.style = inputStyle;
4914
4914
  rhs.appendChild(field);
4915
4915
  field.setAttribute('type', params.type ? params.type : 'text');
4916
- var fieldType = (field.getAttribute('type') || '').toLowerCase();
4917
- var deferWhileFocused = fieldType === 'date' || fieldType === 'datetime-local';
4918
4916
  var size = kb.anyJS(form, src_ns.ui('size')) || styleConstants.textInputSize || 20;
4919
4917
  field.setAttribute('size', size);
4920
4918
  var maxLength = kb.any(form, src_ns.ui('maxLength'));
@@ -4953,13 +4951,9 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
4953
4951
  }
4954
4952
  }, true);
4955
4953
  field.addEventListener('change', function (_e) {
4956
- if (deferWhileFocused && dom.activeElement === field) return;
4957
4954
  // i.e. lose focus with changed data
4958
4955
  if (params.pattern && !field.value.match(params.pattern)) return;
4959
- var disabledForSave = !deferWhileFocused;
4960
- if (disabledForSave) {
4961
- field.disabled = true; // See if this stops getting two dates from fumbling e.g the chrome datepicker.
4962
- }
4956
+ field.disabled = true; // See if this stops getting two dates from fumbling e.g the chrome datepicker.
4963
4957
  field.setAttribute('style', inputStyle + 'color: gray;'); // pending
4964
4958
  var ds = kb.statementsMatching(subject, property); // remove any multiple values
4965
4959
  var result;
@@ -5027,9 +5021,7 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
5027
5021
  updateMany(ds, is, function (uri, ok, body) {
5028
5022
  // kb.updater.update(ds, is, function (uri, ok, body) {
5029
5023
  if (ok) {
5030
- if (disabledForSave) {
5031
- field.disabled = false;
5032
- }
5024
+ field.disabled = false;
5033
5025
  field.setAttribute('style', inputStyle);
5034
5026
  } else {
5035
5027
  box.appendChild(errorMessageBlock(dom, body));
@@ -11462,6 +11454,8 @@ var AccessGroups = /*#__PURE__*/function () {
11462
11454
  thing,
11463
11455
  _this$_store,
11464
11456
  message,
11457
+ detectedTypes,
11458
+ typeDetails,
11465
11459
  error,
11466
11460
  _args4 = arguments,
11467
11461
  _t2;
@@ -11495,7 +11489,9 @@ var AccessGroups = /*#__PURE__*/function () {
11495
11489
  _context4.next = 6;
11496
11490
  break;
11497
11491
  }
11498
- error = " Error: Drop fails to drop appropriate thing! ".concat(uri);
11492
+ detectedTypes = Object.keys(this.store.findTypeURIs(thing));
11493
+ typeDetails = detectedTypes.length > 0 ? "Detected RDF types: ".concat(detectedTypes.join(', ')) : 'No RDF type was detected for this URI.';
11494
+ error = "Error: Failed to add access target: ".concat(uri, " is not a recognized ACL target type.") + " Expected one of: vcard:WebID, vcard:Group, foaf:Person, foaf:Agent, solid:AppProvider, solid:AppProviderClass, or recognized ACL classes." + ' Hint: try dropping a WebID profile URI, a vcard:Group URI, or a web app origin.' + typeDetails;
11499
11495
  src_debug/* error */.z3(error);
11500
11496
  return _context4.abrupt("return", Promise.reject(new Error(error)));
11501
11497
  case 6: