@esfaenza/es-table 11.2.110 → 11.2.111
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/esfaenza-es-table.umd.js +21 -6
- package/bundles/esfaenza-es-table.umd.js.map +1 -1
- package/bundles/esfaenza-es-table.umd.min.js +1 -1
- package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
- package/esm2015/lib/components/es-table/es_table.component.js +18 -3
- package/esm2015/lib/core/handlers/ColumnMetadataHandler.js +4 -4
- package/fesm2015/esfaenza-es-table.js +20 -5
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/package.json +1 -1
|
@@ -1054,9 +1054,9 @@
|
|
|
1054
1054
|
var columnsOrderings = this.est.arrayMode ? this.est.arrayColumnOrdering : castedView.column_ordering;
|
|
1055
1055
|
var columnOrders = this.est.arrayMode ? [] : castedView.orders;
|
|
1056
1056
|
var toStore = {
|
|
1057
|
-
columns:
|
|
1058
|
-
column_ordering:
|
|
1059
|
-
orders:
|
|
1057
|
+
columns: this.utiExts.deepClone(columns),
|
|
1058
|
+
column_ordering: this.utiExts.deepClone(columnsOrderings),
|
|
1059
|
+
orders: this.utiExts.deepClone(columnOrders)
|
|
1060
1060
|
};
|
|
1061
1061
|
this.prefService.setItem(this.est.ngControl.name, toStore, 'preference').subscribe();
|
|
1062
1062
|
};
|
|
@@ -4278,9 +4278,9 @@
|
|
|
4278
4278
|
/** @ignore */
|
|
4279
4279
|
EsTableComponent.prototype.writeValue = function (obj, throttle) {
|
|
4280
4280
|
if (throttle === void 0) { throttle = true; }
|
|
4281
|
-
var _a;
|
|
4281
|
+
var _a, _b;
|
|
4282
4282
|
return __awaiter(this, void 0, void 0, function () {
|
|
4283
|
-
var firstItemGroupOrNoGrouping, prefs, cols, updatedPrefs, repository, source, i, prefs, cols, updatedPrefs, repository, source, i;
|
|
4283
|
+
var firstItemGroupOrNoGrouping, prefs, cols, updatedPrefs, repository, source, i, thsCache, i, th, i, prefs, cols, updatedPrefs, repository, source, i;
|
|
4284
4284
|
var _this = this;
|
|
4285
4285
|
return __generator(this, function (_t) {
|
|
4286
4286
|
switch (_t.label) {
|
|
@@ -4347,13 +4347,28 @@
|
|
|
4347
4347
|
}
|
|
4348
4348
|
// In modalità report devo controllare che tutte le colonne salvate facciano parte della vista
|
|
4349
4349
|
// In modalità normale invece se le preferenze fanno riferimento a delle colonne che io non ho nella View attuale significa che
|
|
4350
|
-
// sto facendo riferimento a una versione vecchia dell'es-table, quindi non
|
|
4350
|
+
// sto facendo riferimento a una versione vecchia dell'es-table, quindi non faccio operazioni
|
|
4351
4351
|
for (i = 0; i < source.length; i++) {
|
|
4352
4352
|
if (repository.indexOf(source[i]) == -1) {
|
|
4353
4353
|
updatedPrefs = false;
|
|
4354
4354
|
break;
|
|
4355
4355
|
}
|
|
4356
4356
|
}
|
|
4357
|
+
// Se mi baso su direttive ma nelle preference è presente anche solo una colonna non presente nelle direttive
|
|
4358
|
+
// vuol dire che l'es-table è cambiata quindi non imposto preference
|
|
4359
|
+
if (((_b = this.EsThsDirective) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
4360
|
+
thsCache = {};
|
|
4361
|
+
for (i = 0; i < this.EsThsDirective.length; i++) {
|
|
4362
|
+
th = this.EsThsDirective[i];
|
|
4363
|
+
thsCache[th.th] = th;
|
|
4364
|
+
}
|
|
4365
|
+
for (i = 0; i < repository.length; i++) {
|
|
4366
|
+
if (!thsCache[repository[i]]) {
|
|
4367
|
+
updatedPrefs = false;
|
|
4368
|
+
break;
|
|
4369
|
+
}
|
|
4370
|
+
}
|
|
4371
|
+
}
|
|
4357
4372
|
if (updatedPrefs) {
|
|
4358
4373
|
this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
|
|
4359
4374
|
this.View.column_ordering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
|