@solcre-org/core-ui 2.11.15 → 2.11.16
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.
|
@@ -7511,6 +7511,9 @@ class GenericTableComponent {
|
|
|
7511
7511
|
const visibleData = this.applyRowVisibilityFilter(data);
|
|
7512
7512
|
if (this.endpoint() && this.endpoint() !== '') {
|
|
7513
7513
|
this.displayedData.set([...visibleData]);
|
|
7514
|
+
if (this.enablePagination() && visibleData.length !== data.length) {
|
|
7515
|
+
this.updatePaginationForVisibleData(data.length, visibleData.length);
|
|
7516
|
+
}
|
|
7514
7517
|
}
|
|
7515
7518
|
else {
|
|
7516
7519
|
this.tableDataService.updateDisplayedData(visibleData, this.enablePagination(), this.paginationService, this.tableId, this.itemsLoaded());
|
|
@@ -7518,6 +7521,26 @@ class GenericTableComponent {
|
|
|
7518
7521
|
this.displayedData.set([...displayed]);
|
|
7519
7522
|
}
|
|
7520
7523
|
}
|
|
7524
|
+
updatePaginationForVisibleData(originalCount, visibleCount) {
|
|
7525
|
+
if (!this.enablePagination())
|
|
7526
|
+
return;
|
|
7527
|
+
try {
|
|
7528
|
+
const currentPageSize = this.paginationService.getPageSize(this.tableId)();
|
|
7529
|
+
const currentPage = this.paginationService.getCurrentPage(this.tableId)();
|
|
7530
|
+
const originalTotalItems = this.paginationService.getTotalItems(this.tableId)();
|
|
7531
|
+
const hiddenRatio = originalCount > 0 ? (originalCount - visibleCount) / originalCount : 0;
|
|
7532
|
+
const estimatedVisibleTotal = Math.round(originalTotalItems * (1 - hiddenRatio));
|
|
7533
|
+
const newTotalPages = Math.ceil(estimatedVisibleTotal / currentPageSize);
|
|
7534
|
+
if (currentPage > newTotalPages && newTotalPages > 0) {
|
|
7535
|
+
this.paginationService.setCurrentPage(this.tableId, newTotalPages);
|
|
7536
|
+
}
|
|
7537
|
+
this.paginationService.setTotalItems(this.tableId, estimatedVisibleTotal);
|
|
7538
|
+
this.paginationService.setTotalPages(this.tableId, newTotalPages);
|
|
7539
|
+
}
|
|
7540
|
+
catch (error) {
|
|
7541
|
+
console.warn('Error updating pagination for visible data:', error);
|
|
7542
|
+
}
|
|
7543
|
+
}
|
|
7521
7544
|
applyGlobalFilter(event) {
|
|
7522
7545
|
const value = typeof event === 'string' ? event : event.target.value;
|
|
7523
7546
|
this.filterService.setGlobalFilter(value);
|
|
@@ -8047,6 +8070,52 @@ class GenericTableComponent {
|
|
|
8047
8070
|
}
|
|
8048
8071
|
return data.filter(row => this.isRowVisible(row));
|
|
8049
8072
|
}
|
|
8073
|
+
/**
|
|
8074
|
+
* Obtiene información de depuración sobre la visibilidad de filas
|
|
8075
|
+
* @param data - Array de datos a analizar
|
|
8076
|
+
* @returns Información de debugging sobre visibilidad
|
|
8077
|
+
*/
|
|
8078
|
+
getVisibilityDebugInfo(data) {
|
|
8079
|
+
const visibilityConfigs = this.rowVisibilityConfigs();
|
|
8080
|
+
const activeFilters = this.currentFilterValues();
|
|
8081
|
+
if (!visibilityConfigs || visibilityConfigs.length === 0) {
|
|
8082
|
+
return {
|
|
8083
|
+
totalRows: data.length,
|
|
8084
|
+
visibleRows: data.length,
|
|
8085
|
+
hiddenRows: 0,
|
|
8086
|
+
hiddenPercentage: 0,
|
|
8087
|
+
configsApplied: []
|
|
8088
|
+
};
|
|
8089
|
+
}
|
|
8090
|
+
let hiddenCount = 0;
|
|
8091
|
+
const appliedConfigs = new Set();
|
|
8092
|
+
data.forEach(row => {
|
|
8093
|
+
const applicableConfigs = visibilityConfigs
|
|
8094
|
+
.filter(config => config.hideCondition(row))
|
|
8095
|
+
.sort((a, b) => (b.priority || 0) - (a.priority || 0));
|
|
8096
|
+
if (applicableConfigs.length > 0) {
|
|
8097
|
+
let isHidden = true;
|
|
8098
|
+
for (const config of applicableConfigs) {
|
|
8099
|
+
appliedConfigs.add(config.id || config.description || 'unnamed-config');
|
|
8100
|
+
if (config.showWhenFiltered && config.showWhenFiltered(row, activeFilters)) {
|
|
8101
|
+
isHidden = false;
|
|
8102
|
+
break;
|
|
8103
|
+
}
|
|
8104
|
+
}
|
|
8105
|
+
if (isHidden) {
|
|
8106
|
+
hiddenCount++;
|
|
8107
|
+
}
|
|
8108
|
+
}
|
|
8109
|
+
});
|
|
8110
|
+
const visibleCount = data.length - hiddenCount;
|
|
8111
|
+
return {
|
|
8112
|
+
totalRows: data.length,
|
|
8113
|
+
visibleRows: visibleCount,
|
|
8114
|
+
hiddenRows: hiddenCount,
|
|
8115
|
+
hiddenPercentage: data.length > 0 ? Math.round((hiddenCount / data.length) * 100) : 0,
|
|
8116
|
+
configsApplied: Array.from(appliedConfigs)
|
|
8117
|
+
};
|
|
8118
|
+
}
|
|
8050
8119
|
generateActiveFilters() {
|
|
8051
8120
|
const activeFilters = [];
|
|
8052
8121
|
const currentFilters = this.currentFilterValues();
|
|
@@ -9994,11 +10063,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
9994
10063
|
// Este archivo es generado automáticamente por scripts/update-version.js
|
|
9995
10064
|
// No edites manualmente este archivo
|
|
9996
10065
|
const VERSION = {
|
|
9997
|
-
full: '2.11.
|
|
10066
|
+
full: '2.11.16',
|
|
9998
10067
|
major: 2,
|
|
9999
10068
|
minor: 11,
|
|
10000
|
-
patch:
|
|
10001
|
-
timestamp: '2025-08-
|
|
10069
|
+
patch: 16,
|
|
10070
|
+
timestamp: '2025-08-22T13:25:44.969Z',
|
|
10002
10071
|
buildDate: '22/8/2025'
|
|
10003
10072
|
};
|
|
10004
10073
|
|