@addsign/moje-agenda-shared-lib 2.0.35 → 2.0.36
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/components/datatable/DataTableServer.js +11 -4
- package/dist/components/datatable/DataTableServer.js.map +1 -1
- package/dist/components/datatable/types.d.ts +5 -0
- package/lib/components/datatable/DataTableServer.tsx +11 -1
- package/lib/components/datatable/types.ts +5 -0
- package/package.json +1 -1
|
@@ -22029,6 +22029,7 @@ function DataTableServer({
|
|
|
22029
22029
|
sortDirection: sortConfig == null ? void 0 : sortConfig.direction
|
|
22030
22030
|
}
|
|
22031
22031
|
}).then((response) => {
|
|
22032
|
+
var _a2;
|
|
22032
22033
|
setIsLoading(false);
|
|
22033
22034
|
const dataPageable = createDataPageable(
|
|
22034
22035
|
response,
|
|
@@ -22038,14 +22039,14 @@ function DataTableServer({
|
|
|
22038
22039
|
dataPageable.content.map((item) => {
|
|
22039
22040
|
const row = {};
|
|
22040
22041
|
columns.forEach((column) => {
|
|
22041
|
-
var
|
|
22042
|
+
var _a3, _b2;
|
|
22042
22043
|
let value;
|
|
22043
22044
|
if (column.renderXls) {
|
|
22044
22045
|
value = column.renderXls(item);
|
|
22045
22046
|
} else if (column.render) {
|
|
22046
|
-
value = (
|
|
22047
|
+
value = (_a3 = column.render(item)) == null ? void 0 : _a3.toString();
|
|
22047
22048
|
}
|
|
22048
|
-
if (typeof value === "number" || typeof value === "string" && !isNaN(Number(value))) {
|
|
22049
|
+
if (((_b2 = column.renderXlsOptions) == null ? void 0 : _b2.type) === "number" || typeof value === "number" || typeof value === "string" && !isNaN(Number(value))) {
|
|
22049
22050
|
row[column.header] = Number(value);
|
|
22050
22051
|
} else {
|
|
22051
22052
|
row[column.header] = value == null ? void 0 : value.toString();
|
|
@@ -22069,7 +22070,13 @@ function DataTableServer({
|
|
|
22069
22070
|
for (let R = range.s.r; R <= range.e.r; ++R) {
|
|
22070
22071
|
const cell = worksheet[col + (R + 1)];
|
|
22071
22072
|
if (cell && typeof cell.v === "number") {
|
|
22072
|
-
|
|
22073
|
+
const colIndex = utils.decode_col(col);
|
|
22074
|
+
const column = columns[colIndex];
|
|
22075
|
+
if ((_a2 = column == null ? void 0 : column.renderXlsOptions) == null ? void 0 : _a2.format) {
|
|
22076
|
+
cell.z = column.renderXlsOptions.format;
|
|
22077
|
+
} else {
|
|
22078
|
+
cell.z = "#,##0";
|
|
22079
|
+
}
|
|
22073
22080
|
}
|
|
22074
22081
|
}
|
|
22075
22082
|
}
|