@esfaenza/es-table 11.2.76 → 11.2.79
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 +31 -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 +13 -1
- package/esm2015/lib/core/handlers/SelectionHandler.js +3 -2
- package/esm2015/lib/domain/externals/appsearch/AppSearch.js +18 -1
- package/fesm2015/esfaenza-es-table.js +31 -1
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +2 -0
- 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
|
}());
|
|
@@ -3551,9 +3568,10 @@
|
|
|
3551
3568
|
case 'boolean':
|
|
3552
3569
|
case 'enum':
|
|
3553
3570
|
case 'autocomplete':
|
|
3571
|
+
return valType.value;
|
|
3554
3572
|
case 'float':
|
|
3555
3573
|
case 'currency':
|
|
3556
|
-
return valType.value;
|
|
3574
|
+
return parseFloat(valType.value).toLocaleString(this.est.locale);
|
|
3557
3575
|
case 'date':
|
|
3558
3576
|
return dayjs(valType.value).format(this.est.lc.token("getSmallDateDisplayFormat"));
|
|
3559
3577
|
case 'datetime':
|
|
@@ -3840,6 +3858,8 @@
|
|
|
3840
3858
|
this.ColumnsPinnable = null;
|
|
3841
3859
|
/** Indica se dev'essere disponibile il sistema di aggiornamento automatico */
|
|
3842
3860
|
this.AutoUpdate = null;
|
|
3861
|
+
/** Indica se dev'essere l'estable a gestire la ricerca, anche la prima */
|
|
3862
|
+
this.EsTableHandledSearch = false;
|
|
3843
3863
|
/**
|
|
3844
3864
|
* Decide se utilizzare o meno le CustomCells. Impostandolo a **true** l'es-table diventa in grado di gestire nativamente:
|
|
3845
3865
|
*
|
|
@@ -4270,6 +4290,15 @@
|
|
|
4270
4290
|
case 10:
|
|
4271
4291
|
this.finalizeContext();
|
|
4272
4292
|
this.postBoundSourceCalculation();
|
|
4293
|
+
if (this.View && !this.View.selfsearch && this.EsTableHandledSearch) {
|
|
4294
|
+
this.View.selfsearch = true;
|
|
4295
|
+
this.changed();
|
|
4296
|
+
this.onSearchRequest.emit(false);
|
|
4297
|
+
}
|
|
4298
|
+
else if (this.View && this.View.selfsearch && this.EsTableHandledSearch) {
|
|
4299
|
+
this.View.selfsearch = false;
|
|
4300
|
+
this.changed();
|
|
4301
|
+
}
|
|
4273
4302
|
return [2 /*return*/];
|
|
4274
4303
|
}
|
|
4275
4304
|
});
|
|
@@ -5122,6 +5151,7 @@
|
|
|
5122
5151
|
ColumnsResizable: [{ type: i0.Input }],
|
|
5123
5152
|
ColumnsPinnable: [{ type: i0.Input }],
|
|
5124
5153
|
AutoUpdate: [{ type: i0.Input }],
|
|
5154
|
+
EsTableHandledSearch: [{ type: i0.Input }],
|
|
5125
5155
|
UseCustomCells: [{ type: i0.Input }],
|
|
5126
5156
|
MaxHeight: [{ type: i0.Input }],
|
|
5127
5157
|
ContainerClass: [{ type: i0.Input }],
|