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.modern.js
CHANGED
@@ -1491,7 +1491,6 @@ var TextArea = function TextArea(props) {
|
|
1491
1491
|
function clear() {
|
1492
1492
|
if (onChange) onChange(id, "");
|
1493
1493
|
}
|
1494
|
-
|
1495
1494
|
var labelStyle = label ? "" : "no-label";
|
1496
1495
|
var style = "textarea " + labelStyle + " textarea-" + type;
|
1497
1496
|
var labelTxt = /*#__PURE__*/React.createElement(Text, null, label);
|
@@ -2164,6 +2163,20 @@ var NumberCellViewer = function NumberCellViewer(_ref7) {
|
|
2164
2163
|
format = _ref7.format,
|
2165
2164
|
maxDecimals = _ref7.maxDecimals;
|
2166
2165
|
|
2166
|
+
function formatNumber(number) {
|
2167
|
+
if (number === null) return "null";
|
2168
|
+
var result = number.toLocaleString('es-ES', {
|
2169
|
+
minimumFractionDigits: 2,
|
2170
|
+
maximumFractionDigits: 2
|
2171
|
+
}); // thousands separator is a dot
|
2172
|
+
|
2173
|
+
var parts = result.toString().split(",");
|
2174
|
+
var numberPart = parts[0];
|
2175
|
+
var decimalPart = parts[1];
|
2176
|
+
var thousands = /\B(?=(\d{3})+(?!\d))/g;
|
2177
|
+
return numberPart.replace(thousands, ".") + (decimalPart ? "," + decimalPart : "");
|
2178
|
+
}
|
2179
|
+
|
2167
2180
|
if (format) {
|
2168
2181
|
switch (format) {
|
2169
2182
|
case FORMATS$1.CURRENCY:
|
@@ -2178,17 +2191,22 @@ var NumberCellViewer = function NumberCellViewer(_ref7) {
|
|
2178
2191
|
minimumFractionDigits: 2
|
2179
2192
|
}));
|
2180
2193
|
|
2194
|
+
case "ES_es":
|
2195
|
+
var decimals = maxDecimals ? maxDecimals : 2;
|
2196
|
+
if (typeof value === "string") value = parseFloat(value);
|
2197
|
+
return value && !isNaN(value) ? /*#__PURE__*/React.createElement("span", null, formatNumber(value.toFixed(decimals))) : "";
|
2198
|
+
|
2181
2199
|
default:
|
2182
2200
|
return /*#__PURE__*/React.createElement("span", null, value);
|
2183
2201
|
}
|
2184
2202
|
} else {
|
2185
|
-
var
|
2203
|
+
var _decimals = maxDecimals ? maxDecimals : 2;
|
2186
2204
|
|
2187
2205
|
if (typeof value === "string") {
|
2188
2206
|
value = parseFloat(value);
|
2189
2207
|
}
|
2190
2208
|
|
2191
|
-
return value && !isNaN(value) ? /*#__PURE__*/React.createElement("span", null, value.toFixed(
|
2209
|
+
return value && !isNaN(value) ? /*#__PURE__*/React.createElement("span", null, value.toFixed(_decimals)) : "";
|
2192
2210
|
}
|
2193
2211
|
};
|
2194
2212
|
/**
|
@@ -6512,7 +6530,9 @@ var CollectionTree = function CollectionTree(props) {
|
|
6512
6530
|
}
|
6513
6531
|
|
6514
6532
|
function renderNodes(nodes) {
|
6515
|
-
return nodes.
|
6533
|
+
return nodes.sort(function (a, b) {
|
6534
|
+
return a.name.localeCompare(b.name);
|
6535
|
+
}).map(function (node) {
|
6516
6536
|
var title = typeof node.name === 'boolean' ? node.field + " = " + node.name : node.title;
|
6517
6537
|
return /*#__PURE__*/React.createElement(TreeNode, {
|
6518
6538
|
key: node.name,
|