solid-ui 3.0.4-06ea893 → 3.0.4-1038f4a

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.
@@ -10983,7 +10983,7 @@ function attachmentList(dom, subject, div) {
10983
10983
  var attachmentRight = attachmentOne.appendChild(dom.createElement('td'));
10984
10984
  var attachmentTable = attachmentRight.appendChild(dom.createElement('table'));
10985
10985
  attachmentTable.appendChild(dom.createElement('tr')) // attachmentTableTop
10986
- ;
10986
+ ;
10987
10987
  attachmentOuter.refresh = refresh; // Participate in downstream changes
10988
10988
  // ;(attachmentTable as any).refresh = refresh <- outer should be best?
10989
10989
 
@@ -18385,6 +18385,8 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
18385
18385
  field.style = inputStyle;
18386
18386
  rhs.appendChild(field);
18387
18387
  field.setAttribute('type', params.type ? params.type : 'text');
18388
+ var fieldType = (field.getAttribute('type') || '').toLowerCase();
18389
+ var deferWhileFocused = fieldType === 'date' || fieldType === 'datetime-local';
18388
18390
  var size = kb.anyJS(form, _ns__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.ui('size')) || _styleConstants__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.textInputSize || 20;
18389
18391
  field.setAttribute('size', size);
18390
18392
  var maxLength = kb.any(form, _ns__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.ui('maxLength'));
@@ -18408,7 +18410,7 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
18408
18410
  }
18409
18411
  if (!kb.updater.editable(doc.uri)) {
18410
18412
  field.readOnly = true // was: disabled. readOnly is better
18411
- ;
18413
+ ;
18412
18414
  field.style = _style__WEBPACK_IMPORTED_MODULE_3__/* .style */ .i.textInputStyleUneditable + paramStyle;
18413
18415
  if (suppressEmptyUneditable && field.value === '') {
18414
18416
  box.style.display = 'none'; // clutter
@@ -18423,9 +18425,13 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
18423
18425
  }
18424
18426
  }, true);
18425
18427
  field.addEventListener('change', function (_e) {
18428
+ if (deferWhileFocused && dom.activeElement === field) return;
18426
18429
  // i.e. lose focus with changed data
18427
18430
  if (params.pattern && !field.value.match(params.pattern)) return;
18428
- field.disabled = true; // See if this stops getting two dates from fumbling e.g the chrome datepicker.
18431
+ var disabledForSave = !deferWhileFocused;
18432
+ if (disabledForSave) {
18433
+ field.disabled = true; // See if this stops getting two dates from fumbling e.g the chrome datepicker.
18434
+ }
18429
18435
  field.setAttribute('style', inputStyle + 'color: gray;'); // pending
18430
18436
  var ds = kb.statementsMatching(subject, property); // remove any multiple values
18431
18437
  var result;
@@ -18493,7 +18499,9 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
18493
18499
  updateMany(ds, is, function (uri, ok, body) {
18494
18500
  // kb.updater.update(ds, is, function (uri, ok, body) {
18495
18501
  if (ok) {
18496
- field.disabled = false;
18502
+ if (disabledForSave) {
18503
+ field.disabled = false;
18504
+ }
18497
18505
  field.setAttribute('style', inputStyle);
18498
18506
  } else {
18499
18507
  box.appendChild((0,_error__WEBPACK_IMPORTED_MODULE_6__/* .errorMessageBlock */ .F)(dom, body));
@@ -20221,7 +20229,7 @@ function cameraCaptureControl(dom, store, getImageDoc, doneCallback) {
20221
20229
  // if (!confirm('Save picture to ' + destination + ' ?')) return
20222
20230
  _debug__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm('Putting ' + blob.size + ' bytes of ' + contentType + ' to ' + destination)
20223
20231
  // @@ TODO Remove casting
20224
- ;
20232
+ ;
20225
20233
  store.fetcher.webOperation('PUT', destination.uri, {
20226
20234
  data: blob,
20227
20235
  contentType: contentType