@esfaenza/es-table 11.2.59 → 11.2.62
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 +39 -25
- 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/esfaenza-es-table.metadata.json +1 -1
- package/esm2015/lib/components/es-table/es_table.component.js +38 -26
- package/esm2015/lib/core/handlers/ItemsHandler.js +2 -2
- package/fesm2015/esfaenza-es-table.js +38 -26
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +2 -12
- package/package.json +1 -1
|
@@ -1987,7 +1987,7 @@
|
|
|
1987
1987
|
return ret;
|
|
1988
1988
|
}
|
|
1989
1989
|
else {
|
|
1990
|
-
var ret = this.est.
|
|
1990
|
+
var ret = this.est.ItemSourceProperty ? this.est.View[this.est.ItemSourceProperty] : this.est.View.items;
|
|
1991
1991
|
if (!ret)
|
|
1992
1992
|
ret = [];
|
|
1993
1993
|
// Setto variabile interna per specificare che questo è un elemento normale, non un gruppo o altro
|
|
@@ -3613,18 +3613,8 @@
|
|
|
3613
3613
|
this.PagingStyle = null;
|
|
3614
3614
|
/** Indica dove visualizzare le informazioni di paginazione, se sopra, sotto o in entrambi */
|
|
3615
3615
|
this.RowGroupingPagingStyle = null;
|
|
3616
|
-
/**
|
|
3617
|
-
|
|
3618
|
-
*
|
|
3619
|
-
* @deprecated Utilizzato solo per un caso particolare del Metering
|
|
3620
|
-
*/
|
|
3621
|
-
this.SecondarySource = null;
|
|
3622
|
-
/**
|
|
3623
|
-
* Sorgente dati secondaria
|
|
3624
|
-
*
|
|
3625
|
-
* @deprecated Utilizzato solo per un caso particolare del Metering
|
|
3626
|
-
*/
|
|
3627
|
-
this.TertiarySource = null;
|
|
3616
|
+
/** Qualora per qualsiasi motivo non venisse usato **items** dell'AppSearch questo Input indica qual è il nome della proprietà da utilizzare */
|
|
3617
|
+
this.ItemSourceProperty = "";
|
|
3628
3618
|
/** Indica se utilizzare la cache di selezione che permette di mantenere gli stati di selezione dei vari oggetti navigando da una pagina all'altra */
|
|
3629
3619
|
this.UseSelectionCache = null;
|
|
3630
3620
|
/** Permette di decidere se, in modalità raggruppamento, mostrare o meno il valore delle colonne di gruppo negli oggetti finali. Di default sono nascosti */
|
|
@@ -3803,7 +3793,7 @@
|
|
|
3803
3793
|
EsTableComponent.prototype.writeValue = function (obj) {
|
|
3804
3794
|
var _a;
|
|
3805
3795
|
return __awaiter(this, void 0, void 0, function () {
|
|
3806
|
-
var firstItemGroupOrNoGrouping, prefs, cols, updatedPrefs,
|
|
3796
|
+
var firstItemGroupOrNoGrouping, prefs, cols, updatedPrefs, repository, source, i, prefs, cols, updatedPrefs, repository, source, i;
|
|
3807
3797
|
return __generator(this, function (_t) {
|
|
3808
3798
|
switch (_t.label) {
|
|
3809
3799
|
case 0:
|
|
@@ -3851,9 +3841,21 @@
|
|
|
3851
3841
|
if (this.View) {
|
|
3852
3842
|
cols = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
|
|
3853
3843
|
updatedPrefs = true;
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3844
|
+
repository = void 0;
|
|
3845
|
+
source = void 0;
|
|
3846
|
+
if (this.View.report_columns) {
|
|
3847
|
+
repository = this.View.report_columns.map(function (t) { return t.id; });
|
|
3848
|
+
source = cols;
|
|
3849
|
+
}
|
|
3850
|
+
else {
|
|
3851
|
+
repository = cols;
|
|
3852
|
+
source = this.View.columns;
|
|
3853
|
+
}
|
|
3854
|
+
// In modalità report devo controllare che tutte le colonne salvate facciano parte della vista
|
|
3855
|
+
// In modalità normale invece se le preferenze fanno riferimento a delle colonne che io non ho nella View attuale significa che
|
|
3856
|
+
// sto facendo riferimento a una versione vecchia dell'es-table, quindi non foccio operazioni
|
|
3857
|
+
for (i = 0; i < source.length; i++) {
|
|
3858
|
+
if (repository.indexOf(source[i]) == -1) {
|
|
3857
3859
|
updatedPrefs = false;
|
|
3858
3860
|
break;
|
|
3859
3861
|
}
|
|
@@ -3890,16 +3892,29 @@
|
|
|
3890
3892
|
prefs = _t.sent();
|
|
3891
3893
|
cols = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
|
|
3892
3894
|
updatedPrefs = true;
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3895
|
+
repository = void 0;
|
|
3896
|
+
source = void 0;
|
|
3897
|
+
if (this.View.report_columns) {
|
|
3898
|
+
repository = this.View.report_columns.map(function (t) { return t.id; });
|
|
3899
|
+
source = cols;
|
|
3900
|
+
}
|
|
3901
|
+
else {
|
|
3902
|
+
repository = cols;
|
|
3903
|
+
source = this.View.columns;
|
|
3904
|
+
}
|
|
3905
|
+
// In modalità report devo controllare che tutte le colonne salvate facciano parte della vista
|
|
3906
|
+
// In modalità normale invece se le preferenze fanno riferimento a delle colonne che io non ho nella View attuale significa che
|
|
3907
|
+
// sto facendo riferimento a una versione vecchia dell'es-table, quindi non foccio operazioni
|
|
3908
|
+
for (i = 0; i < source.length; i++) {
|
|
3909
|
+
if (repository.indexOf(source[i]) == -1) {
|
|
3897
3910
|
updatedPrefs = false;
|
|
3898
3911
|
break;
|
|
3899
3912
|
}
|
|
3900
3913
|
}
|
|
3901
|
-
|
|
3902
|
-
|
|
3914
|
+
if (updatedPrefs) {
|
|
3915
|
+
this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
|
|
3916
|
+
this.View.column_ordering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
|
|
3917
|
+
}
|
|
3903
3918
|
_t.label = 9;
|
|
3904
3919
|
case 9:
|
|
3905
3920
|
if (this.SearchView)
|
|
@@ -4684,8 +4699,7 @@
|
|
|
4684
4699
|
SavePreferences: [{ type: i0.Input }],
|
|
4685
4700
|
PagingStyle: [{ type: i0.Input }],
|
|
4686
4701
|
RowGroupingPagingStyle: [{ type: i0.Input }],
|
|
4687
|
-
|
|
4688
|
-
TertiarySource: [{ type: i0.Input }],
|
|
4702
|
+
ItemSourceProperty: [{ type: i0.Input }],
|
|
4689
4703
|
UseSelectionCache: [{ type: i0.Input }],
|
|
4690
4704
|
ShowItemGroupsColumns: [{ type: i0.Input }],
|
|
4691
4705
|
UserEdits: [{ type: i0.Input }],
|