solid-ui 2.4.22-2b59ecec → 2.4.22-3cf5d0a6

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/main.js CHANGED
@@ -15192,8 +15192,8 @@ Object.defineProperty(exports, "__esModule", ({
15192
15192
  }));
15193
15193
  exports.versionInfo = void 0;
15194
15194
  var versionInfo = {
15195
- buildTime: '2022-05-06T18:28:57Z',
15196
- commit: '2b59ececdbeff0b9fc6c2b0710d65711cb6fce3b',
15195
+ buildTime: '2022-05-09T14:00:08Z',
15196
+ commit: '3cf5d0a69738775a31b3b4f67fa6a846e5829bb7',
15197
15197
  npmInfo: {
15198
15198
  'solid-ui': '2.4.22',
15199
15199
  npm: '6.14.16',
@@ -18144,12 +18144,15 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
18144
18144
  var formDoc = form.doc ? form.doc() : null; // @@ if blank no way to know
18145
18145
 
18146
18146
  var p;
18147
- var box = dom.createElement('div'); // Set flexDirection column?
18147
+ var box = dom.createElement('div');
18148
+ box.setAttribute('class', 'choiceBox'); // Set flexDirection column?
18148
18149
 
18149
18150
  if (container) container.appendChild(box);
18150
18151
  var lhs = dom.createElement('div');
18152
+ lhs.setAttribute('class', 'formFieldName choiceBox-label');
18151
18153
  box.appendChild(lhs);
18152
18154
  var rhs = dom.createElement('div');
18155
+ rhs.setAttribute('class', 'formFieldValue choiceBox-selectBox');
18153
18156
  box.appendChild(rhs);
18154
18157
  var property = kb.any(form, ui('property'));
18155
18158
 
@@ -18158,6 +18161,12 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
18158
18161
  }
18159
18162
 
18160
18163
  lhs.appendChild((0, _basic.fieldLabel)(dom, property, form));
18164
+ var uiFrom = kb.any(form, ui('from'));
18165
+
18166
+ if (!uiFrom) {
18167
+ return (0, _error.errorMessageBlock)(dom, "No 'from' for Choice: " + form);
18168
+ }
18169
+
18161
18170
  var subForm = kb.any(form, ui('use')); // Optional
18162
18171
 
18163
18172
  var follow = kb.anyJS(form, ui('follow'), null, formDoc); // data doc moves to new subject?
@@ -18172,12 +18181,6 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
18172
18181
  firstSelectOptionText: firstSelectOptionText,
18173
18182
  disambiguate: false
18174
18183
  };
18175
- var uiFrom = kb.any(form, ui('from'));
18176
-
18177
- if (!uiFrom) {
18178
- return (0, _error.errorMessageBlock)(dom, "No 'from' for Choice: " + form);
18179
- }
18180
-
18181
18184
  possible = kb.each(undefined, ns.rdf('type'), uiFrom, formDoc);
18182
18185
 
18183
18186
  for (var x in kb.findMembersNT(uiFrom)) {
@@ -18664,7 +18667,7 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, uiFrom, opt
18664
18667
  var opt = select.options[_i];
18665
18668
 
18666
18669
  if (opt.selected && opt.AJAR_mint) {
18667
- // not sure if this if is used because I cannot find mintClass
18670
+ // not sure if this 'if' is used because I cannot find mintClass
18668
18671
  if (options.mintClass) {
18669
18672
  var thisForm = promptForNew(dom, kb, subject, predicate, options.mintClass, null, dataDoc, function (ok, body) {
18670
18673
  if (!ok) {
@@ -18680,7 +18683,7 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, uiFrom, opt
18680
18683
  }
18681
18684
 
18682
18685
  is.push($rdf.st(subject, predicate, kb.sym(newObject), dataDoc));
18683
- if (uiFrom) is.push($rdf.st(newObject, ns.rdf('type'), kb.sym(uiFrom), dataDoc)); // not sure if this if is used because I cannot find mintStatementsFun
18686
+ if (uiFrom) is.push($rdf.st(newObject, ns.rdf('type'), kb.sym(uiFrom), dataDoc)); // not sure if this 'if' is used because I cannot find mintStatementsFun
18684
18687
 
18685
18688
  if (options.mintStatementsFun) {
18686
18689
  is = is.concat(options.mintStatementsFun(newObject));
@@ -18722,13 +18725,15 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, uiFrom, opt
18722
18725
  kb.updater.update(ds, is, function (uri, success, errorBody) {
18723
18726
  actual = getActual(); // refresh
18724
18727
 
18725
- if (!success) return select.parentNode.appendChild((0, _error.errorMessageBlock)(dom, 'Error updating data in select: ' + errorBody));
18726
- if (callbackFunction) callbackFunction(success, {
18727
- widget: 'select',
18728
- event: 'new'
18729
- });
18728
+ if (!success) select.parentNode.appendChild((0, _error.errorMessageBlock)(dom, 'Error updating select: ' + errorBody));
18729
+ });
18730
+ if (callbackFunction) callbackFunction(ok, {
18731
+ widget: 'select',
18732
+ event: 'new'
18730
18733
  });
18731
- } else return select.parentNode.appendChild((0, _error.errorMessageBlock)(dom, 'Error updating data in field of select: ' + body));
18734
+ } else {
18735
+ select.parentNode.appendChild((0, _error.errorMessageBlock)(dom, 'Error updating data in field of select: ' + body));
18736
+ }
18732
18737
  });
18733
18738
  };
18734
18739
 
@@ -18788,10 +18793,10 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, uiFrom, opt
18788
18793
  if (!select.currentURI && !options.multiple) {
18789
18794
  var prompt = dom.createElement('option');
18790
18795
  prompt.appendChild(dom.createTextNode(options.firstSelectOptionText));
18791
- prompt.selected = true;
18792
18796
  prompt.disabled = true;
18793
18797
  prompt.value = true;
18794
18798
  prompt.hidden = true;
18799
+ prompt.selected = true;
18795
18800
  select.insertBefore(prompt, select.firstChild);
18796
18801
  }
18797
18802