ywana-core8 0.0.762 → 0.0.764
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/index.cjs +24 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +24 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +24 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +3 -1
- package/src/html/table.js +18 -2
- package/src/html/textfield.js +1 -0
package/dist/index.cjs
CHANGED
@@ -1499,7 +1499,6 @@ var TextArea = function TextArea(props) {
|
|
1499
1499
|
function clear() {
|
1500
1500
|
if (onChange) onChange(id, "");
|
1501
1501
|
}
|
1502
|
-
|
1503
1502
|
var labelStyle = label ? "" : "no-label";
|
1504
1503
|
var style = "textarea " + labelStyle + " textarea-" + type;
|
1505
1504
|
var labelTxt = /*#__PURE__*/React__default["default"].createElement(Text, null, label);
|
@@ -2172,6 +2171,20 @@ var NumberCellViewer = function NumberCellViewer(_ref7) {
|
|
2172
2171
|
format = _ref7.format,
|
2173
2172
|
maxDecimals = _ref7.maxDecimals;
|
2174
2173
|
|
2174
|
+
function formatNumber(number) {
|
2175
|
+
if (number === null) return "null";
|
2176
|
+
var result = number.toLocaleString('es-ES', {
|
2177
|
+
minimumFractionDigits: 2,
|
2178
|
+
maximumFractionDigits: 2
|
2179
|
+
}); // thousands separator is a dot
|
2180
|
+
|
2181
|
+
var parts = result.toString().split(",");
|
2182
|
+
var numberPart = parts[0];
|
2183
|
+
var decimalPart = parts[1];
|
2184
|
+
var thousands = /\B(?=(\d{3})+(?!\d))/g;
|
2185
|
+
return numberPart.replace(thousands, ".") + (decimalPart ? "," + decimalPart : "");
|
2186
|
+
}
|
2187
|
+
|
2175
2188
|
if (format) {
|
2176
2189
|
switch (format) {
|
2177
2190
|
case FORMATS$1.CURRENCY:
|
@@ -2186,17 +2199,22 @@ var NumberCellViewer = function NumberCellViewer(_ref7) {
|
|
2186
2199
|
minimumFractionDigits: 2
|
2187
2200
|
}));
|
2188
2201
|
|
2202
|
+
case "ES_es":
|
2203
|
+
var decimals = maxDecimals ? maxDecimals : 2;
|
2204
|
+
if (typeof value === "string") value = parseFloat(value);
|
2205
|
+
return value && !isNaN(value) ? /*#__PURE__*/React__default["default"].createElement("span", null, formatNumber(value.toFixed(decimals))) : "";
|
2206
|
+
|
2189
2207
|
default:
|
2190
2208
|
return /*#__PURE__*/React__default["default"].createElement("span", null, value);
|
2191
2209
|
}
|
2192
2210
|
} else {
|
2193
|
-
var
|
2211
|
+
var _decimals = maxDecimals ? maxDecimals : 2;
|
2194
2212
|
|
2195
2213
|
if (typeof value === "string") {
|
2196
2214
|
value = parseFloat(value);
|
2197
2215
|
}
|
2198
2216
|
|
2199
|
-
return value && !isNaN(value) ? /*#__PURE__*/React__default["default"].createElement("span", null, value.toFixed(
|
2217
|
+
return value && !isNaN(value) ? /*#__PURE__*/React__default["default"].createElement("span", null, value.toFixed(_decimals)) : "";
|
2200
2218
|
}
|
2201
2219
|
};
|
2202
2220
|
/**
|
@@ -6520,7 +6538,9 @@ var CollectionTree = function CollectionTree(props) {
|
|
6520
6538
|
}
|
6521
6539
|
|
6522
6540
|
function renderNodes(nodes) {
|
6523
|
-
return nodes.
|
6541
|
+
return nodes.sort(function (a, b) {
|
6542
|
+
return a.name.localeCompare(b.name);
|
6543
|
+
}).map(function (node) {
|
6524
6544
|
var title = typeof node.name === 'boolean' ? node.field + " = " + node.name : node.title;
|
6525
6545
|
return /*#__PURE__*/React__default["default"].createElement(TreeNode, {
|
6526
6546
|
key: node.name,
|