@esfaenza/es-table 11.2.22-beta22 → 11.2.22-beta26
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 +17 -17
- 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 +17 -15
- package/esm2015/lib/core/handlers/classes/ItemsHandler.js +1 -4
- package/fesm2015/esfaenza-es-table.js +16 -17
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +0 -2
- package/package.json +1 -1
|
@@ -2047,6 +2047,7 @@
|
|
|
2047
2047
|
return HierarchyModeHandler;
|
|
2048
2048
|
}());
|
|
2049
2049
|
|
|
2050
|
+
// Modelli
|
|
2050
2051
|
/** Classe che si occupa della gestione del recupero degli oggetti, paginazione e tutto ciò in cui gli elementi caricati vengono manipolati direttamente */
|
|
2051
2052
|
var ItemsHandler = /** @class */ (function () {
|
|
2052
2053
|
/** @ignore Costruttore */
|
|
@@ -2138,9 +2139,6 @@
|
|
|
2138
2139
|
// Se ho una search view l'array pulsanti viene calcolato da lei, non devo prendere quello della modalità array
|
|
2139
2140
|
if (!this.est.SearchView)
|
|
2140
2141
|
this.est.arrayPulsanti = this.utilities.getPagesArray(6, this.est.arraymodePage, this.est.arraymodePages);
|
|
2141
|
-
// Se utilizzo la searchView gli oggetti sono quelli della SearchView con sopra quelli dell'array (tutti). Se la pagina non è la prima, sticazzi
|
|
2142
|
-
if (this.est.SearchView)
|
|
2143
|
-
return __spread((this.est.SearchView.page == 1 ? this.est.View : []), this.est.SearchView.items);
|
|
2144
2142
|
// Poi per tutti i valori dopo compresi fra la pagina - 1 e la pagina
|
|
2145
2143
|
for (var i = ((this.est.arraymodePage - 1) * this.est.ArraymodeItemsPerPage); i < this.est.arraymodePage * this.est.ArraymodeItemsPerPage; i++) {
|
|
2146
2144
|
if (i <= this.est.View.length - 1)
|
|
@@ -3692,8 +3690,6 @@
|
|
|
3692
3690
|
this.ColumnsOrdering = null;
|
|
3693
3691
|
/** Eventuale supporto alle ricerche applicate alla modalità Array */
|
|
3694
3692
|
this.SearchView = null;
|
|
3695
|
-
/** Eventuale supporto alle ricerche applicate alla modalità Array - Evento */
|
|
3696
|
-
this.SearchViewChange = new i0.EventEmitter();
|
|
3697
3693
|
/** Abilita o disabilita il sistema che permette di selezionare tutti gli elementi nella vista */
|
|
3698
3694
|
this.SelectAll = null;
|
|
3699
3695
|
/** Simula la paginazione anche per le tabelle che funzionano in modalità Array */
|
|
@@ -3887,8 +3883,8 @@
|
|
|
3887
3883
|
var newSearchView;
|
|
3888
3884
|
return __generator(this, function (_s) {
|
|
3889
3885
|
newSearchView = changes['SearchView'];
|
|
3890
|
-
if (
|
|
3891
|
-
this.
|
|
3886
|
+
if (newSearchView && this.SearchView)
|
|
3887
|
+
this.arrayPulsanti = this.utilities_H.getPagesArray(6, this.SearchView.page, this.SearchView.pages || 1, this.SearchView.items.length, this.SearchView.itemsperpageoverride);
|
|
3892
3888
|
return [2 /*return*/];
|
|
3893
3889
|
});
|
|
3894
3890
|
});
|
|
@@ -3898,12 +3894,7 @@
|
|
|
3898
3894
|
/** @ignore */
|
|
3899
3895
|
EsTableComponent.prototype.registerOnTouched = function (fn) { };
|
|
3900
3896
|
/** @ignore */
|
|
3901
|
-
EsTableComponent.prototype.changed = function () {
|
|
3902
|
-
if (this.SearchView)
|
|
3903
|
-
this.SearchViewChange.emit(this.SearchView);
|
|
3904
|
-
else
|
|
3905
|
-
this.propagateChange(this.View);
|
|
3906
|
-
};
|
|
3897
|
+
EsTableComponent.prototype.changed = function () { this.propagateChange(this.View); };
|
|
3907
3898
|
/** @ignore */
|
|
3908
3899
|
EsTableComponent.prototype.writeValue = function (obj) {
|
|
3909
3900
|
var _this = this;
|
|
@@ -4042,7 +4033,10 @@
|
|
|
4042
4033
|
};
|
|
4043
4034
|
/** Genera le informzioni di paginazione per la vista globale dell'es-table */
|
|
4044
4035
|
EsTableComponent.prototype.setupPagingInformations = function () {
|
|
4036
|
+
var _a;
|
|
4037
|
+
// Default che valgono di base, poi eventualmente moddati dalle funzioni sotto
|
|
4045
4038
|
this.PagerOptions.ShowCount = !this.HidePagingCount;
|
|
4039
|
+
this.PagerOptions.UsesView = true;
|
|
4046
4040
|
if (this.arrayMode && this.UseArrayModePaging && !this.SearchView) {
|
|
4047
4041
|
this.PagerOptions.PagerCount = this.View.length || 0;
|
|
4048
4042
|
this.PagerOptions.ShowPaging = !this.HidePaging && this.View.length > 10;
|
|
@@ -4050,11 +4044,13 @@
|
|
|
4050
4044
|
this.PagerOptions.UsesView = false;
|
|
4051
4045
|
}
|
|
4052
4046
|
else if (this.arrayMode && (!this.UseArrayModePaging || this.SearchView)) {
|
|
4053
|
-
this.PagerOptions.PagerCount = this.View.length || 0;
|
|
4054
4047
|
if (this.SearchView) {
|
|
4055
4048
|
this.PagerOptions.View = this.SearchView;
|
|
4056
|
-
this.PagerOptions.PagerCount
|
|
4049
|
+
this.PagerOptions.PagerCount = this.SearchView.objectcount || 0;
|
|
4057
4050
|
}
|
|
4051
|
+
else
|
|
4052
|
+
this.PagerOptions.PagerCount = this.View.length || 0;
|
|
4053
|
+
this.PagerOptions.ShowPaging = !this.HidePaging && (this.View.length > 10 || (((_a = this.SearchView) === null || _a === void 0 ? void 0 : _a.objectcount) || 0) > 10);
|
|
4058
4054
|
this.PagerOptions.ShowCount = this.PagerOptions.ShowCount || (this.View && this.View.length) || (this.SearchView && this.SearchView.objectcount && this.SearchView.objectcount != -1);
|
|
4059
4055
|
}
|
|
4060
4056
|
else if (this.viewMode) {
|
|
@@ -4548,7 +4544,7 @@
|
|
|
4548
4544
|
var ipp = this.reportMode ? (view.itemsperpageoverride || 15) : view.itemsperpageoverride || 15;
|
|
4549
4545
|
this.arrayPulsanti = this.utilities_H.getPagesArray(6, appSearchElement.page, appSearchElement.pages, count, ipp);
|
|
4550
4546
|
var hasGroupings = !!this.MainGroupView;
|
|
4551
|
-
this.emitSearchRequest(false, hasGroupings ? view : null);
|
|
4547
|
+
this.emitSearchRequest(false, hasGroupings ? view : this.SearchView ? this.SearchView : null);
|
|
4552
4548
|
};
|
|
4553
4549
|
/**
|
|
4554
4550
|
* Evento richiamato sul cambio della paginazione. Verrà richiamato l'evento **emitSearchRequest**
|
|
@@ -4559,6 +4555,11 @@
|
|
|
4559
4555
|
this.changed();
|
|
4560
4556
|
if (this.MainGroupView)
|
|
4561
4557
|
this.emitSearchRequest(true, this.MainGroupView);
|
|
4558
|
+
else if (this.SearchView) {
|
|
4559
|
+
// Questo secondo me si può portare a livello un po' più alto
|
|
4560
|
+
this.SearchView.page = 1;
|
|
4561
|
+
this.emitSearchRequest(true, this.SearchView);
|
|
4562
|
+
}
|
|
4562
4563
|
else
|
|
4563
4564
|
this.emitSearchRequest(true);
|
|
4564
4565
|
};
|
|
@@ -4759,7 +4760,6 @@
|
|
|
4759
4760
|
HiddenColumns: [{ type: i0.Input }],
|
|
4760
4761
|
ColumnsOrdering: [{ type: i0.Input }],
|
|
4761
4762
|
SearchView: [{ type: i0.Input }],
|
|
4762
|
-
SearchViewChange: [{ type: i0.Output }],
|
|
4763
4763
|
SelectAll: [{ type: i0.Input }],
|
|
4764
4764
|
UseArrayModePaging: [{ type: i0.Input }],
|
|
4765
4765
|
DynamicRowColumnsDefinition: [{ type: i0.Input }],
|