solid-ui 2.4.22-8500c0e8 → 2.4.22-8fef4f19
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 +41 -24
- package/dist/main.js.map +1 -1
- package/lib/versionInfo.js +2 -2
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/forms.js +39 -22
- package/lib/widgets/forms.js.map +1 -1
- package/package.json +1 -1
package/lib/versionInfo.js
CHANGED
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.versionInfo = void 0;
|
|
7
7
|
var versionInfo = {
|
|
8
|
-
buildTime: '2022-05-
|
|
9
|
-
commit: '
|
|
8
|
+
buildTime: '2022-05-10T15:39:11Z',
|
|
9
|
+
commit: '8fef4f19ebf9df8abb09661929b46d1293720f7a',
|
|
10
10
|
npmInfo: {
|
|
11
11
|
'solid-ui': '2.4.22',
|
|
12
12
|
npm: '6.14.16',
|
package/lib/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/versionInfo.ts"],"names":["versionInfo","buildTime","commit","npmInfo","npm","ares","brotli","cldr","icu","llhttp","modules","napi","nghttp2","node","openssl","tz","unicode","uv","v8","zlib"],"mappings":";;;;;;AAAO,IAAMA,WAAW,GAAG;AACzBC,EAAAA,SAAS,EAAE,sBADc;AAEzBC,EAAAA,MAAM,EAAE,0CAFiB;AAGzBC,EAAAA,OAAO,EACT;AACE,gBAAY,QADd;AAEEC,IAAAA,GAAG,EAAE,SAFP;AAGEC,IAAAA,IAAI,EAAE,QAHR;AAIEC,IAAAA,MAAM,EAAE,OAJV;AAKEC,IAAAA,IAAI,EAAE,MALR;AAMEC,IAAAA,GAAG,EAAE,MANP;AAOEC,IAAAA,MAAM,EAAE,OAPV;AAQEC,IAAAA,OAAO,EAAE,IARX;AASEC,IAAAA,IAAI,EAAE,GATR;AAUEC,IAAAA,OAAO,EAAE,QAVX;AAWEC,IAAAA,IAAI,EAAE,SAXR;AAYEC,IAAAA,OAAO,EAAE,QAZX;AAaEC,IAAAA,EAAE,EAAE,QAbN;AAcEC,IAAAA,OAAO,EAAE,MAdX;AAeEC,IAAAA,EAAE,EAAE,QAfN;AAgBEC,IAAAA,EAAE,EAAE,oBAhBN;AAiBEC,IAAAA,IAAI,EAAE;AAjBR;AAJ2B,CAApB","sourcesContent":["export const versionInfo = {\n buildTime: '2022-05-
|
|
1
|
+
{"version":3,"sources":["../src/versionInfo.ts"],"names":["versionInfo","buildTime","commit","npmInfo","npm","ares","brotli","cldr","icu","llhttp","modules","napi","nghttp2","node","openssl","tz","unicode","uv","v8","zlib"],"mappings":";;;;;;AAAO,IAAMA,WAAW,GAAG;AACzBC,EAAAA,SAAS,EAAE,sBADc;AAEzBC,EAAAA,MAAM,EAAE,0CAFiB;AAGzBC,EAAAA,OAAO,EACT;AACE,gBAAY,QADd;AAEEC,IAAAA,GAAG,EAAE,SAFP;AAGEC,IAAAA,IAAI,EAAE,QAHR;AAIEC,IAAAA,MAAM,EAAE,OAJV;AAKEC,IAAAA,IAAI,EAAE,MALR;AAMEC,IAAAA,GAAG,EAAE,MANP;AAOEC,IAAAA,MAAM,EAAE,OAPV;AAQEC,IAAAA,OAAO,EAAE,IARX;AASEC,IAAAA,IAAI,EAAE,GATR;AAUEC,IAAAA,OAAO,EAAE,QAVX;AAWEC,IAAAA,IAAI,EAAE,SAXR;AAYEC,IAAAA,OAAO,EAAE,QAZX;AAaEC,IAAAA,EAAE,EAAE,QAbN;AAcEC,IAAAA,OAAO,EAAE,MAdX;AAeEC,IAAAA,EAAE,EAAE,QAfN;AAgBEC,IAAAA,EAAE,EAAE,oBAhBN;AAiBEC,IAAAA,IAAI,EAAE;AAjBR;AAJ2B,CAApB","sourcesContent":["export const versionInfo = {\n buildTime: '2022-05-10T15:39:11Z',\n commit: '8fef4f19ebf9df8abb09661929b46d1293720f7a',\n npmInfo:\n{\n 'solid-ui': '2.4.22',\n npm: '6.14.16',\n ares: '1.18.1',\n brotli: '1.0.9',\n cldr: '40.0',\n icu: '70.1',\n llhttp: '2.1.4',\n modules: '83',\n napi: '8',\n nghttp2: '1.42.0',\n node: '14.19.1',\n openssl: '1.1.1n',\n tz: '2021a3',\n unicode: '14.0',\n uv: '1.42.0',\n v8: '8.4.371.23-node.85',\n zlib: '1.2.11'\n}\n}\n"],"file":"versionInfo.js"}
|
package/lib/widgets/forms.js
CHANGED
|
@@ -642,7 +642,7 @@ _fieldFunction.field[ns.ui('Multiple').uri] = function (dom, container, already,
|
|
|
642
642
|
|
|
643
643
|
var _shim = dom.createElement('div');
|
|
644
644
|
|
|
645
|
-
_shim.appendChild(subField); // Subfield has its own
|
|
645
|
+
_shim.appendChild(subField); // Subfield has its own layout
|
|
646
646
|
|
|
647
647
|
|
|
648
648
|
frame.appendChild(_shim);
|
|
@@ -727,14 +727,16 @@ _fieldFunction.field[ns.ui('Multiple').uri] = function (dom, container, already,
|
|
|
727
727
|
if (kb.updater.editable(dataDoc.uri)) {
|
|
728
728
|
var tail = box.appendChild(dom.createElement('div'));
|
|
729
729
|
tail.style.padding = '0.5em';
|
|
730
|
+
var label = kb.any(form, ui('label'));
|
|
731
|
+
if (!label) label = utils.label(property, true); // Init capital
|
|
732
|
+
|
|
730
733
|
var img = tail.appendChild(dom.createElement('img'));
|
|
731
734
|
img.setAttribute('src', plusIconURI); // plus sign
|
|
732
735
|
|
|
733
736
|
img.setAttribute('style', 'margin: 0.2em; width: 1.5em; height:1.5em');
|
|
734
|
-
img.title = 'Click to add one or more ' +
|
|
735
|
-
var prompt =
|
|
736
|
-
prompt.textContent = (values.length === 0 ? 'Add one or more ' : 'Add more ') + utils.predicateLabel(property, reverse);
|
|
737
|
-
|
|
737
|
+
img.title = 'Click to add one or more ' + label;
|
|
738
|
+
var prompt = dom.createElement('span');
|
|
739
|
+
prompt.textContent = (values.length === 0 ? 'Add one or more ' : 'Add more ') + utils.predicateLabel(property, reverse);
|
|
738
740
|
tail.addEventListener('click', /*#__PURE__*/function () {
|
|
739
741
|
var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(_eventNotUsed) {
|
|
740
742
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
@@ -756,6 +758,7 @@ _fieldFunction.field[ns.ui('Multiple').uri] = function (dom, container, already,
|
|
|
756
758
|
return _ref3.apply(this, arguments);
|
|
757
759
|
};
|
|
758
760
|
}(), true);
|
|
761
|
+
tail.appendChild(prompt);
|
|
759
762
|
}
|
|
760
763
|
|
|
761
764
|
function createListIfNecessary() {
|
|
@@ -1037,16 +1040,18 @@ _fieldFunction.field[ns.ui('Classifier').uri] = function (dom, container, alread
|
|
|
1037
1040
|
_fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, subject, form, dataDoc, callbackFunction) {
|
|
1038
1041
|
var ui = ns.ui;
|
|
1039
1042
|
var kb = _solidLogic.store;
|
|
1040
|
-
var multiple = false;
|
|
1041
1043
|
var formDoc = form.doc ? form.doc() : null; // @@ if blank no way to know
|
|
1042
1044
|
|
|
1043
1045
|
var p;
|
|
1044
|
-
var box = dom.createElement('div');
|
|
1046
|
+
var box = dom.createElement('div');
|
|
1047
|
+
box.setAttribute('class', 'choiceBox'); // Set flexDirection column?
|
|
1045
1048
|
|
|
1046
1049
|
if (container) container.appendChild(box);
|
|
1047
1050
|
var lhs = dom.createElement('div');
|
|
1051
|
+
lhs.setAttribute('class', 'formFieldName choiceBox-label');
|
|
1048
1052
|
box.appendChild(lhs);
|
|
1049
1053
|
var rhs = dom.createElement('div');
|
|
1054
|
+
rhs.setAttribute('class', 'formFieldValue choiceBox-selectBox');
|
|
1050
1055
|
box.appendChild(rhs);
|
|
1051
1056
|
var property = kb.any(form, ui('property'));
|
|
1052
1057
|
|
|
@@ -1055,13 +1060,27 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
|
|
|
1055
1060
|
}
|
|
1056
1061
|
|
|
1057
1062
|
lhs.appendChild((0, _basic.fieldLabel)(dom, property, form));
|
|
1063
|
+
var uiFrom = kb.any(form, ui('from'));
|
|
1064
|
+
|
|
1065
|
+
if (!uiFrom) {
|
|
1066
|
+
return (0, _error.errorMessageBlock)(dom, "No 'from' for Choice: " + form);
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1058
1069
|
var subForm = kb.any(form, ui('use')); // Optional
|
|
1059
1070
|
|
|
1060
1071
|
var follow = kb.anyJS(form, ui('follow'), null, formDoc); // data doc moves to new subject?
|
|
1061
1072
|
|
|
1062
1073
|
var possible = [];
|
|
1063
1074
|
var possibleProperties;
|
|
1064
|
-
var
|
|
1075
|
+
var multiple = false;
|
|
1076
|
+
var firstSelectOptionText = '* Select for ' + utils.label(subject, true) + ' *'; // if we do NOT have a container it means it is a ui:Multiple
|
|
1077
|
+
// only important for the first option text in select
|
|
1078
|
+
|
|
1079
|
+
if (!container) {
|
|
1080
|
+
multiple = true;
|
|
1081
|
+
firstSelectOptionText = utils.label(subject, true);
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1065
1084
|
var opts = {
|
|
1066
1085
|
form: form,
|
|
1067
1086
|
subForm: subForm,
|
|
@@ -1069,12 +1088,6 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
|
|
|
1069
1088
|
firstSelectOptionText: firstSelectOptionText,
|
|
1070
1089
|
disambiguate: false
|
|
1071
1090
|
};
|
|
1072
|
-
var uiFrom = kb.any(form, ui('from'));
|
|
1073
|
-
|
|
1074
|
-
if (!uiFrom) {
|
|
1075
|
-
return (0, _error.errorMessageBlock)(dom, "No 'from' for Choice: " + form);
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
1091
|
possible = kb.each(undefined, ns.rdf('type'), uiFrom, formDoc);
|
|
1079
1092
|
|
|
1080
1093
|
for (var x in kb.findMembersNT(uiFrom)) {
|
|
@@ -1117,7 +1130,7 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
|
|
|
1117
1130
|
opts.disambiguate = true;
|
|
1118
1131
|
}
|
|
1119
1132
|
|
|
1120
|
-
var sortedPossible = sortByLabel(possible); // TODO: this checks for any
|
|
1133
|
+
var sortedPossible = sortByLabel(possible); // TODO: this checks for any occurrence, regardless of true or false setting
|
|
1121
1134
|
|
|
1122
1135
|
if (kb.any(form, ui('canMintNew'))) {
|
|
1123
1136
|
opts.mint = '* Create new *'; // @@ could be better
|
|
@@ -1561,7 +1574,7 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, uiFrom, opt
|
|
|
1561
1574
|
var opt = select.options[_i];
|
|
1562
1575
|
|
|
1563
1576
|
if (opt.selected && opt.AJAR_mint) {
|
|
1564
|
-
// not sure if this if is used because I cannot find mintClass
|
|
1577
|
+
// not sure if this 'if' is used because I cannot find mintClass
|
|
1565
1578
|
if (options.mintClass) {
|
|
1566
1579
|
var thisForm = promptForNew(dom, kb, subject, predicate, options.mintClass, null, dataDoc, function (ok, body) {
|
|
1567
1580
|
if (!ok) {
|
|
@@ -1577,7 +1590,7 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, uiFrom, opt
|
|
|
1577
1590
|
}
|
|
1578
1591
|
|
|
1579
1592
|
is.push($rdf.st(subject, predicate, kb.sym(newObject), dataDoc));
|
|
1580
|
-
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
|
|
1593
|
+
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
|
|
1581
1594
|
|
|
1582
1595
|
if (options.mintStatementsFun) {
|
|
1583
1596
|
is = is.concat(options.mintStatementsFun(newObject));
|
|
@@ -1620,7 +1633,11 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, uiFrom, opt
|
|
|
1620
1633
|
actual = getActual(); // refresh
|
|
1621
1634
|
|
|
1622
1635
|
if (!success) select.parentNode.appendChild((0, _error.errorMessageBlock)(dom, 'Error updating select: ' + errorBody));
|
|
1623
|
-
});
|
|
1636
|
+
});
|
|
1637
|
+
if (callbackFunction) callbackFunction(ok, {
|
|
1638
|
+
widget: 'select',
|
|
1639
|
+
event: 'new'
|
|
1640
|
+
});
|
|
1624
1641
|
} else {
|
|
1625
1642
|
select.parentNode.appendChild((0, _error.errorMessageBlock)(dom, 'Error updating data in field of select: ' + body));
|
|
1626
1643
|
}
|
|
@@ -1628,8 +1645,8 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, uiFrom, opt
|
|
|
1628
1645
|
};
|
|
1629
1646
|
|
|
1630
1647
|
var select = dom.createElement('select');
|
|
1631
|
-
select.setAttribute('style', style.formSelectSTyle);
|
|
1632
|
-
|
|
1648
|
+
select.setAttribute('style', style.formSelectSTyle); // if (options.multiple) select.setAttribute('multiple', 'true') // use case merged with ui:Multiple
|
|
1649
|
+
|
|
1633
1650
|
select.currentURI = null;
|
|
1634
1651
|
|
|
1635
1652
|
select.refresh = function () {
|
|
@@ -1680,13 +1697,13 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, uiFrom, opt
|
|
|
1680
1697
|
select.insertBefore(mint, select.firstChild);
|
|
1681
1698
|
}
|
|
1682
1699
|
|
|
1683
|
-
if (!select.currentURI &&
|
|
1700
|
+
if (!select.currentURI && options.multiple) {
|
|
1684
1701
|
var prompt = dom.createElement('option');
|
|
1685
1702
|
prompt.appendChild(dom.createTextNode(options.firstSelectOptionText));
|
|
1686
|
-
prompt.selected = true;
|
|
1687
1703
|
prompt.disabled = true;
|
|
1688
1704
|
prompt.value = true;
|
|
1689
1705
|
prompt.hidden = true;
|
|
1706
|
+
prompt.selected = true;
|
|
1690
1707
|
select.insertBefore(prompt, select.firstChild);
|
|
1691
1708
|
}
|
|
1692
1709
|
|