@esfaenza/es-table 11.2.59 → 11.2.60
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 +35 -10
- 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 +35 -12
- package/fesm2015/esfaenza-es-table.js +34 -11
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/package.json +1 -1
|
@@ -3803,7 +3803,7 @@
|
|
|
3803
3803
|
EsTableComponent.prototype.writeValue = function (obj) {
|
|
3804
3804
|
var _a;
|
|
3805
3805
|
return __awaiter(this, void 0, void 0, function () {
|
|
3806
|
-
var firstItemGroupOrNoGrouping, prefs, cols, updatedPrefs,
|
|
3806
|
+
var firstItemGroupOrNoGrouping, prefs, cols, updatedPrefs, repository, source, i, prefs, cols, updatedPrefs, repository, source, i;
|
|
3807
3807
|
return __generator(this, function (_t) {
|
|
3808
3808
|
switch (_t.label) {
|
|
3809
3809
|
case 0:
|
|
@@ -3851,9 +3851,21 @@
|
|
|
3851
3851
|
if (this.View) {
|
|
3852
3852
|
cols = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
|
|
3853
3853
|
updatedPrefs = true;
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3854
|
+
repository = void 0;
|
|
3855
|
+
source = void 0;
|
|
3856
|
+
if (this.View.report_columns) {
|
|
3857
|
+
repository = this.View.report_columns.map(function (t) { return t.id; });
|
|
3858
|
+
source = cols;
|
|
3859
|
+
}
|
|
3860
|
+
else {
|
|
3861
|
+
repository = cols;
|
|
3862
|
+
source = this.View.columns;
|
|
3863
|
+
}
|
|
3864
|
+
// In modalità report devo controllare che tutte le colonne salvate facciano parte della vista
|
|
3865
|
+
// In modalità normale invece se le preferenze fanno riferimento a delle colonne che io non ho nella View attuale significa che
|
|
3866
|
+
// sto facendo riferimento a una versione vecchia dell'es-table, quindi non foccio operazioni
|
|
3867
|
+
for (i = 0; i < source.length; i++) {
|
|
3868
|
+
if (!repository.indexOf(source[i])) {
|
|
3857
3869
|
updatedPrefs = false;
|
|
3858
3870
|
break;
|
|
3859
3871
|
}
|
|
@@ -3890,16 +3902,29 @@
|
|
|
3890
3902
|
prefs = _t.sent();
|
|
3891
3903
|
cols = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
|
|
3892
3904
|
updatedPrefs = true;
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3905
|
+
repository = void 0;
|
|
3906
|
+
source = void 0;
|
|
3907
|
+
if (this.View.report_columns) {
|
|
3908
|
+
repository = this.View.report_columns.map(function (t) { return t.id; });
|
|
3909
|
+
source = cols;
|
|
3910
|
+
}
|
|
3911
|
+
else {
|
|
3912
|
+
repository = cols;
|
|
3913
|
+
source = this.View.columns;
|
|
3914
|
+
}
|
|
3915
|
+
// In modalità report devo controllare che tutte le colonne salvate facciano parte della vista
|
|
3916
|
+
// In modalità normale invece se le preferenze fanno riferimento a delle colonne che io non ho nella View attuale significa che
|
|
3917
|
+
// sto facendo riferimento a una versione vecchia dell'es-table, quindi non foccio operazioni
|
|
3918
|
+
for (i = 0; i < source.length; i++) {
|
|
3919
|
+
if (!repository.indexOf(source[i])) {
|
|
3897
3920
|
updatedPrefs = false;
|
|
3898
3921
|
break;
|
|
3899
3922
|
}
|
|
3900
3923
|
}
|
|
3901
|
-
|
|
3902
|
-
|
|
3924
|
+
if (updatedPrefs) {
|
|
3925
|
+
this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
|
|
3926
|
+
this.View.column_ordering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
|
|
3927
|
+
}
|
|
3903
3928
|
_t.label = 9;
|
|
3904
3929
|
case 9:
|
|
3905
3930
|
if (this.SearchView)
|