intelica-library-ui 0.1.180 → 0.1.181
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.
|
@@ -1943,13 +1943,12 @@ class TableComponent {
|
|
|
1943
1943
|
return this._isTableDisabled;
|
|
1944
1944
|
}
|
|
1945
1945
|
recomputeHeaderState(field) {
|
|
1946
|
-
const
|
|
1947
|
-
const total = scope.length;
|
|
1946
|
+
const total = this.ListDataFilter.length;
|
|
1948
1947
|
if (total === 0) {
|
|
1949
1948
|
this.HeaderState[field] = { checked: false, indeterminate: false };
|
|
1950
1949
|
return;
|
|
1951
1950
|
}
|
|
1952
|
-
const checked =
|
|
1951
|
+
const checked = this.ListDataFilter.filter((r) => r[field] === true).length;
|
|
1953
1952
|
this.HeaderState[field] = {
|
|
1954
1953
|
checked: checked === total,
|
|
1955
1954
|
indeterminate: checked > 0 && checked < total,
|
|
@@ -2015,7 +2014,6 @@ class TableComponent {
|
|
|
2015
2014
|
const levels = this.ColumnGroupList.map((c) => c.level);
|
|
2016
2015
|
this.MaxLevel = levels.length ? Math.max(...levels) + 1 : 1;
|
|
2017
2016
|
this.Levels = Array.from({ length: this.MaxLevel }, (_, i) => i);
|
|
2018
|
-
// Inicializa entradas para evitar usar ?. en la vista
|
|
2019
2017
|
this.ColumnList.filter((c) => c.isChecboxColumn).forEach((c) => {
|
|
2020
2018
|
if (!this.HeaderState[c.field]) {
|
|
2021
2019
|
this.HeaderState[c.field] = { checked: false, indeterminate: false };
|
|
@@ -2026,7 +2024,7 @@ class TableComponent {
|
|
|
2026
2024
|
this.ListDataSelectedTemp = [];
|
|
2027
2025
|
this.ListDataSelectedFilter = [];
|
|
2028
2026
|
this._pendingUncheck = false;
|
|
2029
|
-
this.ExecuteSearch({});
|
|
2027
|
+
this.ExecuteSearch({});
|
|
2030
2028
|
}
|
|
2031
2029
|
else {
|
|
2032
2030
|
this.refreshAllHeaderStates();
|
|
@@ -2179,9 +2177,9 @@ class TableComponent {
|
|
|
2179
2177
|
]);
|
|
2180
2178
|
}
|
|
2181
2179
|
OnHeaderCheckboxChange(checked, field) {
|
|
2182
|
-
|
|
2183
|
-
scope.forEach((r) => (r[field] = checked));
|
|
2180
|
+
this.ListDataFilter.forEach((r) => (r[field] = checked));
|
|
2184
2181
|
this.HeaderState[field] = { checked, indeterminate: false };
|
|
2182
|
+
this.UpdatePages();
|
|
2185
2183
|
}
|
|
2186
2184
|
getHeaderScope() {
|
|
2187
2185
|
return this.ShowPagination ? this.ListDataTable : this.ListDataFilter;
|
|
@@ -2225,9 +2223,9 @@ class TableComponent {
|
|
|
2225
2223
|
return [];
|
|
2226
2224
|
const total = this.totalItemsCount;
|
|
2227
2225
|
const min = sizes[0];
|
|
2228
|
-
const lessOrEqual = sizes.filter(s => s <= total);
|
|
2229
|
-
const nextCeil = sizes.find(s => s >= total);
|
|
2230
|
-
const result = Array.from(new Set([min, ...lessOrEqual, nextCeil].filter((v) => typeof v ===
|
|
2226
|
+
const lessOrEqual = sizes.filter((s) => s <= total);
|
|
2227
|
+
const nextCeil = sizes.find((s) => s >= total);
|
|
2228
|
+
const result = Array.from(new Set([min, ...lessOrEqual, nextCeil].filter((v) => typeof v === "number")));
|
|
2231
2229
|
return result;
|
|
2232
2230
|
}
|
|
2233
2231
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|