@seniorsistemas/angular-components 14.13.2 → 14.13.3
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/bundles/seniorsistemas-angular-components.umd.js +39 -5
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/esm2015/components/table/table-paging/table-paging.component.js +31 -5
- package/esm2015/components/utils/export-utils.js +9 -2
- package/esm5/components/table/table-paging/table-paging.component.js +32 -5
- package/esm5/components/utils/export-utils.js +9 -2
- package/fesm2015/seniorsistemas-angular-components.js +38 -5
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +39 -5
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -2794,7 +2794,14 @@
|
|
|
2794
2794
|
data.forEach(function (record) {
|
|
2795
2795
|
csv += "\n";
|
|
2796
2796
|
columns.filter(function (column) { return column.exportable && column.field; }).forEach(function (column, i) {
|
|
2797
|
-
var cellData
|
|
2797
|
+
var cellData;
|
|
2798
|
+
if (Array.isArray(column.field)) {
|
|
2799
|
+
var fieldValues = column.field.map(function (col) { return _this.resolveFieldData(record, col); });
|
|
2800
|
+
cellData = fieldValues.flat().join(column.separator);
|
|
2801
|
+
}
|
|
2802
|
+
else {
|
|
2803
|
+
cellData = _this.resolveFieldData(record, column.field);
|
|
2804
|
+
}
|
|
2798
2805
|
if (cellData != null)
|
|
2799
2806
|
cellData = String(cellData).replace(/"/g, "\"\"");
|
|
2800
2807
|
else
|
|
@@ -4403,14 +4410,41 @@
|
|
|
4403
4410
|
};
|
|
4404
4411
|
TablePagingComponent.prototype.getColumnsToExport = function () {
|
|
4405
4412
|
return __spread(this.table.columns).map(function (column) {
|
|
4406
|
-
|
|
4407
|
-
|
|
4413
|
+
var _a;
|
|
4414
|
+
var exportColumn = {
|
|
4415
|
+
header: column.header,
|
|
4416
|
+
exportable: true,
|
|
4417
|
+
field: column.field,
|
|
4418
|
+
separator: (_a = column.separator) !== null && _a !== void 0 ? _a : " - "
|
|
4419
|
+
};
|
|
4420
|
+
if (column.exportable === false) {
|
|
4421
|
+
exportColumn.exportable = false;
|
|
4408
4422
|
}
|
|
4409
|
-
|
|
4423
|
+
if (column.attributes && column.attributes.length) {
|
|
4424
|
+
if (column.attributes.length === 1) {
|
|
4425
|
+
exportColumn.field = column.attributes[0];
|
|
4426
|
+
}
|
|
4427
|
+
else {
|
|
4428
|
+
exportColumn.field = column.attributes;
|
|
4429
|
+
}
|
|
4430
|
+
}
|
|
4431
|
+
return exportColumn;
|
|
4410
4432
|
});
|
|
4411
4433
|
};
|
|
4412
4434
|
TablePagingComponent.prototype.getRowsToExport = function () {
|
|
4413
|
-
|
|
4435
|
+
var _this = this;
|
|
4436
|
+
var enumColumns = this.table.columns.filter(function (p) { return p.enumPrefix; });
|
|
4437
|
+
if (!enumColumns.length)
|
|
4438
|
+
return this.table.value;
|
|
4439
|
+
return __spread(this.table.value).map(function (row) {
|
|
4440
|
+
for (var i = 0; i <= enumColumns.length - 1; i++) {
|
|
4441
|
+
var column = enumColumns[i];
|
|
4442
|
+
var fieldName = column.field;
|
|
4443
|
+
var columnData = row[fieldName];
|
|
4444
|
+
row[fieldName] = _this.translate.instant(column.enumPrefix + columnData.toString().toLowerCase());
|
|
4445
|
+
}
|
|
4446
|
+
return row;
|
|
4447
|
+
});
|
|
4414
4448
|
};
|
|
4415
4449
|
TablePagingComponent.prototype.getSelectedRowsToExport = function () {
|
|
4416
4450
|
return this.table.selection;
|