@addev-be/ui 2.5.6 → 2.5.8
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.
|
@@ -123,7 +123,7 @@ var percentageColumn = function (key, title, decimals, options) {
|
|
|
123
123
|
if (decimals === void 0) { decimals = 2; }
|
|
124
124
|
var column = __assign({ key: key, type: 'number', name: title, render: function (value) { return ((0, jsx_runtime_1.jsx)(typography_1.StyledTypography, __assign({}, options === null || options === void 0 ? void 0 : options.typography, { children: (0, numbers_1.formatPercentage)(value) }))); }, excelOptions: {
|
|
125
125
|
formatter: function () { return (0, exports.buildExcelFormat)(decimals, '%'); },
|
|
126
|
-
valueGetter: function (value) { return (0, numbers_1.formatNumberInvariant)(value, decimals); },
|
|
126
|
+
valueGetter: function (value) { return (0, numbers_1.formatNumberInvariant)(value, decimals + 2); },
|
|
127
127
|
}, getter: function (row) { var _a; return (_a = row[key]) !== null && _a !== void 0 ? _a : ''; }, sortGetter: function (row) { var _a; return (_a = row[key]) !== null && _a !== void 0 ? _a : ''; }, filter: (0, filters_1.numberFilter)(key), footer: {
|
|
128
128
|
average: function (_, filteredRows) {
|
|
129
129
|
return (0, numbers_1.formatNumber)(filteredRows.reduce(function (acc, row) { var _a; return acc + ((_a = row[key]) !== null && _a !== void 0 ? _a : 0); }, 0) /
|
|
@@ -221,7 +221,7 @@ var sqlPercentageColumn = function (key, title, decimals, options) {
|
|
|
221
221
|
render: function (value) { return ((0, jsx_runtime_1.jsx)(typography_1.StyledTypography, __assign({}, options === null || options === void 0 ? void 0 : options.typography, { children: (0, numbers_1.formatPercentage)(value) }))); },
|
|
222
222
|
excelOptions: {
|
|
223
223
|
formatter: function () { return (0, helpers_1.buildExcelFormat)(decimals, '%'); },
|
|
224
|
-
valueGetter: function (value) { return (0, numbers_1.formatNumberInvariant)(value, decimals); },
|
|
224
|
+
valueGetter: function (value) { return (0, numbers_1.formatNumberInvariant)(value, decimals + 2); },
|
|
225
225
|
},
|
|
226
226
|
getter: function (row) { var _a; return (_a = row[key]) !== null && _a !== void 0 ? _a : ''; },
|
|
227
227
|
sortGetter: function (row) { var _a; return (_a = row[key]) !== null && _a !== void 0 ? _a : 0; },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@addev-be/ui",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"watch": "tsc -b --watch",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"update-version": "../../node/update-version.mjs"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@addev-be/framework-utils": "^2.5.
|
|
23
|
+
"@addev-be/framework-utils": "^2.5.8",
|
|
24
24
|
"@types/lodash": "^4.17.20",
|
|
25
25
|
"@types/react": "^19.1.13",
|
|
26
26
|
"@types/react-dom": "^19.1.9",
|
|
@@ -336,7 +336,7 @@ export const percentageColumn = <R extends Record<string, any>>(
|
|
|
336
336
|
),
|
|
337
337
|
excelOptions: {
|
|
338
338
|
formatter: () => buildExcelFormat(decimals, '%'),
|
|
339
|
-
valueGetter: (value) => formatNumberInvariant(value, decimals),
|
|
339
|
+
valueGetter: (value) => formatNumberInvariant(value, decimals + 2),
|
|
340
340
|
},
|
|
341
341
|
getter: (row) => row[key] ?? '',
|
|
342
342
|
sortGetter: (row) => row[key] ?? '',
|
|
@@ -350,7 +350,7 @@ export const sqlPercentageColumn = <R extends Record<string, any>>(
|
|
|
350
350
|
),
|
|
351
351
|
excelOptions: {
|
|
352
352
|
formatter: () => buildExcelFormat(decimals, '%'),
|
|
353
|
-
valueGetter: (value) => formatNumberInvariant(value, decimals),
|
|
353
|
+
valueGetter: (value) => formatNumberInvariant(value, decimals + 2),
|
|
354
354
|
},
|
|
355
355
|
getter: (row) => row[key] ?? '',
|
|
356
356
|
sortGetter: (row) => row[key] ?? 0,
|