@esfaenza/es-table 11.2.75 → 11.2.78
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 +37 -1
- 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 +15 -1
- package/esm2015/lib/core/handlers/ColumnMetadataHandler.js +7 -2
- package/esm2015/lib/domain/externals/appsearch/AppSearch.js +18 -1
- package/fesm2015/esfaenza-es-table.js +37 -1
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +2 -0
- package/lib/core/handlers/ColumnMetadataHandler.d.ts +1 -1
- package/lib/domain/externals/appsearch/AppSearch.d.ts +12 -0
- package/package.json +1 -1
|
@@ -481,6 +481,8 @@
|
|
|
481
481
|
/**
|
|
482
482
|
* Permette di resettare un AppSearch ai valori di default.
|
|
483
483
|
* Reso statico perché fra una deserializzazione e l'altra si potrebbe perdere il prototype del costruttore
|
|
484
|
+
*
|
|
485
|
+
* @param {AppSearch<any>} aps AppSearch da resettare
|
|
484
486
|
*/
|
|
485
487
|
AppSearch.reset = function (aps) {
|
|
486
488
|
aps.pages = 1;
|
|
@@ -494,6 +496,21 @@
|
|
|
494
496
|
aps.columns = [];
|
|
495
497
|
aps.column_ordering = [];
|
|
496
498
|
aps.savedstate = false;
|
|
499
|
+
aps.selfsearch = false;
|
|
500
|
+
};
|
|
501
|
+
/**
|
|
502
|
+
* Permette di ottenere un nuovo riferimento all'AppSearch passata come parametro.
|
|
503
|
+
* Internamente utilizza il JSON.parse(JSON.stringify(X)) con la differenza che prima stacca il riferimento agli items per evitare di
|
|
504
|
+
* reserializzare potenzialmente centinaia di elementi. Il riferimento viene poi ricollegato alla nuova appsearch generata
|
|
505
|
+
*
|
|
506
|
+
* @param {AppSearch<any>} aps AppSearch di cui estrarre un nuovo riferimento equivalente
|
|
507
|
+
*/
|
|
508
|
+
AppSearch.newref = function (aps) {
|
|
509
|
+
var items = aps.items;
|
|
510
|
+
aps.items = [];
|
|
511
|
+
var newref = JSON.parse(JSON.stringify(aps));
|
|
512
|
+
newref.items = items;
|
|
513
|
+
return newref;
|
|
497
514
|
};
|
|
498
515
|
return AppSearch;
|
|
499
516
|
}());
|
|
@@ -999,7 +1016,12 @@
|
|
|
999
1016
|
}
|
|
1000
1017
|
var columns = this.est.arrayMode ? this.est.arrayColumns : castedView.columns;
|
|
1001
1018
|
var columnsOrderings = this.est.arrayMode ? this.est.arrayColumnOrdering : castedView.column_ordering;
|
|
1002
|
-
var
|
|
1019
|
+
var columnOrders = this.est.arrayMode ? [] : castedView.orders;
|
|
1020
|
+
var toStore = {
|
|
1021
|
+
columns: JSON.parse(JSON.stringify(columns)),
|
|
1022
|
+
column_ordering: JSON.parse(JSON.stringify(columnsOrderings)),
|
|
1023
|
+
orders: JSON.parse(JSON.stringify(columnOrders))
|
|
1024
|
+
};
|
|
1003
1025
|
this.prefService.setItem(this.est.ngControl.name, toStore, 'preference').subscribe();
|
|
1004
1026
|
};
|
|
1005
1027
|
/**
|
|
@@ -3835,6 +3857,8 @@
|
|
|
3835
3857
|
this.ColumnsPinnable = null;
|
|
3836
3858
|
/** Indica se dev'essere disponibile il sistema di aggiornamento automatico */
|
|
3837
3859
|
this.AutoUpdate = null;
|
|
3860
|
+
/** Indica se dev'essere l'estable a gestire la ricerca, anche la prima */
|
|
3861
|
+
this.EsTableHandledSearch = false;
|
|
3838
3862
|
/**
|
|
3839
3863
|
* Decide se utilizzare o meno le CustomCells. Impostandolo a **true** l'es-table diventa in grado di gestire nativamente:
|
|
3840
3864
|
*
|
|
@@ -4203,6 +4227,7 @@
|
|
|
4203
4227
|
if (updatedPrefs) {
|
|
4204
4228
|
this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
|
|
4205
4229
|
this.View.column_ordering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
|
|
4230
|
+
this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
|
|
4206
4231
|
}
|
|
4207
4232
|
}
|
|
4208
4233
|
_t.label = 4;
|
|
@@ -4254,6 +4279,7 @@
|
|
|
4254
4279
|
if (updatedPrefs) {
|
|
4255
4280
|
this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
|
|
4256
4281
|
this.View.column_ordering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
|
|
4282
|
+
this.View.orders = (prefs === null || prefs === void 0 ? void 0 : prefs.orders) || [];
|
|
4257
4283
|
}
|
|
4258
4284
|
_t.label = 9;
|
|
4259
4285
|
case 9:
|
|
@@ -4263,6 +4289,15 @@
|
|
|
4263
4289
|
case 10:
|
|
4264
4290
|
this.finalizeContext();
|
|
4265
4291
|
this.postBoundSourceCalculation();
|
|
4292
|
+
if (this.View && !this.View.selfsearch && this.EsTableHandledSearch) {
|
|
4293
|
+
this.View.selfsearch = true;
|
|
4294
|
+
this.changed();
|
|
4295
|
+
this.onSearchRequest.emit(false);
|
|
4296
|
+
}
|
|
4297
|
+
else if (this.View && this.View.selfsearch && this.EsTableHandledSearch) {
|
|
4298
|
+
this.View.selfsearch = false;
|
|
4299
|
+
this.changed();
|
|
4300
|
+
}
|
|
4266
4301
|
return [2 /*return*/];
|
|
4267
4302
|
}
|
|
4268
4303
|
});
|
|
@@ -5115,6 +5150,7 @@
|
|
|
5115
5150
|
ColumnsResizable: [{ type: i0.Input }],
|
|
5116
5151
|
ColumnsPinnable: [{ type: i0.Input }],
|
|
5117
5152
|
AutoUpdate: [{ type: i0.Input }],
|
|
5153
|
+
EsTableHandledSearch: [{ type: i0.Input }],
|
|
5118
5154
|
UseCustomCells: [{ type: i0.Input }],
|
|
5119
5155
|
MaxHeight: [{ type: i0.Input }],
|
|
5120
5156
|
ContainerClass: [{ type: i0.Input }],
|