@esfaenza/es-table 11.2.22-beta7 → 11.2.22-beta8

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.
Files changed (31) hide show
  1. package/bundles/esfaenza-es-table.umd.js +39 -42
  2. package/bundles/esfaenza-es-table.umd.js.map +1 -1
  3. package/bundles/esfaenza-es-table.umd.min.js +1 -1
  4. package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
  5. package/esm2015/lib/components/es-table/es_table.component.js +6 -14
  6. package/esm2015/lib/core/handlers/classes/ColumnMetadataHandler.js +7 -6
  7. package/esm2015/lib/core/handlers/classes/DynamicModeHandler.js +2 -1
  8. package/esm2015/lib/core/handlers/classes/ExportHandler.js +3 -1
  9. package/esm2015/lib/core/handlers/classes/HierarchyModeHandler.js +3 -1
  10. package/esm2015/lib/core/handlers/classes/ItemsHandler.js +5 -4
  11. package/esm2015/lib/core/handlers/classes/ReportModeHandler.js +4 -1
  12. package/esm2015/lib/core/handlers/classes/RowGroupingHandler.js +4 -3
  13. package/esm2015/lib/core/handlers/classes/SelectionHandler.js +7 -9
  14. package/esm2015/lib/core/handlers/classes/UtilitiesHandler.js +11 -12
  15. package/esm2015/lib/domain/internals/classes/ThElement.js +2 -0
  16. package/esm2015/lib/domain/internals/index.js +2 -1
  17. package/fesm2015/esfaenza-es-table.js +41 -42
  18. package/fesm2015/esfaenza-es-table.js.map +1 -1
  19. package/lib/components/es-table/es_table.component.d.ts +7 -37
  20. package/lib/core/handlers/classes/ColumnMetadataHandler.d.ts +6 -5
  21. package/lib/core/handlers/classes/DynamicModeHandler.d.ts +1 -0
  22. package/lib/core/handlers/classes/ExportHandler.d.ts +2 -0
  23. package/lib/core/handlers/classes/HierarchyModeHandler.d.ts +2 -0
  24. package/lib/core/handlers/classes/ItemsHandler.d.ts +4 -4
  25. package/lib/core/handlers/classes/ReportModeHandler.d.ts +2 -0
  26. package/lib/core/handlers/classes/RowGroupingHandler.d.ts +3 -3
  27. package/lib/core/handlers/classes/SelectionHandler.d.ts +6 -10
  28. package/lib/core/handlers/classes/UtilitiesHandler.d.ts +5 -4
  29. package/lib/domain/internals/classes/ThElement.d.ts +13 -0
  30. package/lib/domain/internals/index.d.ts +1 -0
  31. package/package.json +1 -1
@@ -740,6 +740,7 @@ class EsTableDefaultable {
740
740
  // Modelli
741
741
  /** Classe che gestisce tutte le informaizoni relative alle colonne: visibilità, posizione, stato di pin/unpin, ecc ecc... */
742
742
  class ColumnMetadataHandler {
743
+ /** @ignore Costruttore*/
743
744
  constructor(est, utilities, utiExts, prefService, rgH) {
744
745
  this.est = est;
745
746
  this.utilities = utilities;
@@ -748,11 +749,11 @@ class ColumnMetadataHandler {
748
749
  this.rgH = rgH;
749
750
  }
750
751
  /**
751
- * Metodo che gestisce il cambio di Ordinamento di una colonna
752
- *
753
- * @param {string} id ID della colonna il cui oridnamento è cambiato
754
- * @param {'DESC' | 'ASC'} order Nuovo ordine selezionato per la colonna
755
- */
752
+ * Metodo che gestisce il cambio di Ordinamento di una colonna
753
+ *
754
+ * @param {string} id ID della colonna il cui oridnamento è cambiato
755
+ * @param {'DESC' | 'ASC'} order Nuovo ordine selezionato per la colonna
756
+ */
756
757
  handleTHOrderChange(id, order) {
757
758
  let orders = this.est.viewMode ? this.est.View.orders : this.est.arrayOrders;
758
759
  let orderToAdd = true;
@@ -1405,6 +1406,7 @@ class ColumnMetadataHandler {
1405
1406
  // Dominio
1406
1407
  /** Classe contenente le gestioni particolari della modalità dinamica dell'es-table */
1407
1408
  class DynamicModeHandler {
1409
+ /** @ignore Costruttore*/
1408
1410
  constructor(est) {
1409
1411
  this.est = est;
1410
1412
  }
@@ -1464,7 +1466,9 @@ class DynamicModeHandler {
1464
1466
  }
1465
1467
  }
1466
1468
 
1469
+ /** Classe contenente la gestione delle importazioni */
1467
1470
  class ExportHandler {
1471
+ /** @ignore Costruttore*/
1468
1472
  constructor(est, expExts, msgExts) {
1469
1473
  this.est = est;
1470
1474
  this.expExts = expExts;
@@ -1505,7 +1509,9 @@ class ExportHandler {
1505
1509
  }
1506
1510
  }
1507
1511
 
1512
+ /** Classe contenente la gestione della modalità gerarchica */
1508
1513
  class HierarchyModeHandler {
1514
+ /** @ignore Costruttore*/
1509
1515
  constructor(est) {
1510
1516
  this.est = est;
1511
1517
  }
@@ -1639,7 +1645,10 @@ class HierarchyModeHandler {
1639
1645
  }
1640
1646
  }
1641
1647
 
1648
+ // Modelli
1649
+ /** Classe che si occupa della gestione del recupero degli oggetti, paginazione e tutto ciò in cui gli elementi caricati vengono manipolati direttamente */
1642
1650
  class ItemsHandler {
1651
+ /** @ignore Costruttore */
1643
1652
  constructor(est, utilities) {
1644
1653
  this.est = est;
1645
1654
  this.utilities = utilities;
@@ -1749,16 +1758,17 @@ class ItemsHandler {
1749
1758
  }
1750
1759
  return arrayBy100;
1751
1760
  }
1752
- /**
1753
- * Se in modalità array applica gli ordinamenti ASC-DESC delle colonne
1754
- */
1761
+ /** Se in modalità array applica gli ordinamenti ASC-DESC delle colonne */
1755
1762
  arrayModeReviewOrderings() {
1756
1763
  if (this.est.arrayOrders.length > 0)
1757
1764
  this.est.arrayOrders.forEach(t => { this.est.boundSource = this.est.boundSource.sort((a, b) => (a[t.id] > b[t.id] ? 1 : -1) * (t.order == 'DESC' ? -1 : 1)); });
1758
1765
  }
1759
1766
  }
1760
1767
 
1768
+ // Modelli
1769
+ /** Classe che gestisce la modalità Report dell'es-table utilizzata nel Metering */
1761
1770
  class ReportModeHandler {
1771
+ /** @ignore Costruttore */
1762
1772
  constructor(est, utilities) {
1763
1773
  this.est = est;
1764
1774
  this.utilities = utilities;
@@ -1824,7 +1834,10 @@ class ReportModeHandler {
1824
1834
  }
1825
1835
  }
1826
1836
 
1837
+ // Modelli
1838
+ /** Classe che gestisce la modalità Row Grouping dell'es-table */
1827
1839
  class RowGroupingHandler {
1840
+ /** @ignore Costruttore */
1828
1841
  constructor(est, utilities, dateExts) {
1829
1842
  this.est = est;
1830
1843
  this.utilities = utilities;
@@ -2274,8 +2287,6 @@ class RowGroupingHandler {
2274
2287
  * @param {string} fromat Formato su cui formattare il valore. Può essere ad esempio "small", "long" "verylong" per le date o F{0-9} per i numeri decimali
2275
2288
  *
2276
2289
  * @returns {string} Valore dell'aggregazione formattato come si deve
2277
- *
2278
- * @todo ROWGROUPING
2279
2290
  */
2280
2291
  formatAggregationValue(value, format) {
2281
2292
  if (!format)
@@ -2297,10 +2308,12 @@ class RowGroupingHandler {
2297
2308
  }
2298
2309
  }
2299
2310
 
2311
+ // Modelli
2312
+ /** Classe che gestisce le selezioni degli oggetti */
2300
2313
  class SelectionHandler {
2301
- constructor(est, utilities, rgHandler) {
2314
+ /** @ignore Costruttore */
2315
+ constructor(est, rgHandler) {
2302
2316
  this.est = est;
2303
- this.utilities = utilities;
2304
2317
  this.rgHandler = rgHandler;
2305
2318
  /** Cache di selezione Hash - Oggetto per la variabile **items** dell'itemSelector. Facilita le operazioni di lookup via hash*/
2306
2319
  this.itemsCache = new Map();
@@ -2582,9 +2595,7 @@ class SelectionHandler {
2582
2595
  }
2583
2596
  }
2584
2597
  }
2585
- /**
2586
- * Helper per evitare di riscrivere ogni santa volta array.splice(array.indexof(item), 1);
2587
- */
2598
+ /** Helper per evitare di riscrivere ogni santa volta array.splice(array.indexof(item), 1); */
2588
2599
  removeItem(item, triptic) {
2589
2600
  let index = triptic.index_cache.get(item._hash);
2590
2601
  if (index != null) {
@@ -2594,9 +2605,7 @@ class SelectionHandler {
2594
2605
  }
2595
2606
  return !!index;
2596
2607
  }
2597
- /**
2598
- * Helper per evitare di riscrivere ogni santa volta array.push(item); e la gestione della
2599
- */
2608
+ /** Helper per evitare di riscrivere ogni santa volta array.push(item); e la gestione della */
2600
2609
  addItem(item, triptic) {
2601
2610
  if (triptic.index_cache.get(item._hash) == null) {
2602
2611
  let i = triptic.array.push(item) - 1;
@@ -2820,12 +2829,16 @@ class SelectionHandler {
2820
2829
  }
2821
2830
  }
2822
2831
 
2832
+ // Angular
2833
+ /** Classe di utilità per le cose comuni */
2823
2834
  class UtilitiesHandler {
2835
+ /** @ignore Costruttore */
2824
2836
  constructor(hashExts) {
2825
2837
  this.hashExts = hashExts;
2826
2838
  }
2827
2839
  /**
2828
- * Data una lista di oggetti effettua dei raggruppamenti in base alla proprietà **field**, restituendo un oggetto del tipo { Gruppo1: oggetti[], Gruppo2: oggetti[], ecc... }
2840
+ * Data una lista di oggetti effettua dei raggruppamenti in base alla proprietà **field**,
2841
+ * restituendo un oggetto del tipo { Gruppo1: oggetti[], Gruppo2: oggetti[], ecc... }
2829
2842
  *
2830
2843
  * @param {any[]} array Lista degli oggetti da raggruppare
2831
2844
  * @param {string} field Campo su cui effettuare i raggruppamenti
@@ -2860,9 +2873,7 @@ class UtilitiesHandler {
2860
2873
  }
2861
2874
  }
2862
2875
  }
2863
- /**
2864
- * Helper per spostare un oggetto di un array da un indice all'altro, in place
2865
- */
2876
+ /** Helper per spostare un oggetto di un array da un indice all'altro, in place */
2866
2877
  arrayMove(array, oldI, newI) {
2867
2878
  if (newI > array.length - 1 || oldI > array.length - 1 || newI < 0 || oldI < 0)
2868
2879
  throw "Gli indici passati non fanno riferimento a una posizione dell'array. Length: " + array.length + " Old:" + oldI + " New: " + newI;
@@ -2874,18 +2885,14 @@ class UtilitiesHandler {
2874
2885
  * @param {any} td Cella da valutare
2875
2886
  * @returns {boolean} Restituisce **true** se il **td** è di tipo **EsTd**, **false** se è di tipo **EsTdDirective**
2876
2887
  */
2877
- isEsTd(td) {
2878
- return !td._directive;
2879
- }
2888
+ isEsTd(td) { return !td._directive; }
2880
2889
  /**
2881
2890
  * Helper che identifica se il th attuale è di tipo **EsTh**. In caso contrario è da considerarsi **EsThDirective**
2882
2891
  *
2883
2892
  * @param {any} td Header da valutare
2884
2893
  * @returns {boolean} Restituisce **true** se il **th** è di tipo **EsTh**, **false** se è di tipo **EsThDirective**
2885
2894
  */
2886
- isEsTh(th) {
2887
- return !th._directive;
2888
- }
2895
+ isEsTh(th) { return !th._directive; }
2889
2896
  /**
2890
2897
  * Date le informazioni di paginazione ottiene l'array dei pulsanti
2891
2898
  *
@@ -2980,7 +2987,7 @@ class UtilitiesHandler {
2980
2987
  }
2981
2988
  UtilitiesHandler.ɵprov = i0.ɵɵdefineInjectable({ factory: function UtilitiesHandler_Factory() { return new UtilitiesHandler(i0.ɵɵinject(i1.HashingService)); }, token: UtilitiesHandler, providedIn: "root" });
2982
2989
  UtilitiesHandler.decorators = [
2983
- { type: Injectable, args: [{ providedIn: 'root', },] }
2990
+ { type: Injectable, args: [{ providedIn: 'root' },] }
2984
2991
  ];
2985
2992
  UtilitiesHandler.ctorParameters = () => [
2986
2993
  { type: HashingService }
@@ -3309,7 +3316,7 @@ class EsTableComponent {
3309
3316
  this.hierarchyMode_H = new HierarchyModeHandler(this);
3310
3317
  this.items_H = new ItemsHandler(this, this.utilities_H);
3311
3318
  this.reportMode_H = new ReportModeHandler(this, this.utilities_H);
3312
- this.selection_H = new SelectionHandler(this, this.utilities_H, this.rowGrouping_H);
3319
+ this.selection_H = new SelectionHandler(this, this.rowGrouping_H);
3313
3320
  if (ngControl)
3314
3321
  ngControl.valueAccessor = this;
3315
3322
  // Assegnazione per tutti gli Input di default
@@ -3593,9 +3600,7 @@ class EsTableComponent {
3593
3600
  setTimeout(() => { this.internalPostBoundSource(); });
3594
3601
  }
3595
3602
  }
3596
- /**
3597
- * Per poter distinguere le chiamate a questo metodo: Dopo il setTimeout se uso gli EsTd/EsTh vecchi, senza il setTimeout se uso le nuove direttive
3598
- */
3603
+ /** Per poter distinguere le chiamate a questo metodo: Dopo il setTimeout se uso gli EsTd/EsTh vecchi, senza il setTimeout se uso le nuove direttive */
3599
3604
  internalPostBoundSource() {
3600
3605
  let View = this.View;
3601
3606
  let ths = this.EsThs && this.EsThs.length > 0 ? this.EsThs.toArray() : this.EsThsDirective && this.EsThsDirective.length > 0 ? this.EsThsDirective.toArray() : [];
@@ -3674,9 +3679,7 @@ class EsTableComponent {
3674
3679
  }
3675
3680
  this.rowGrouping_H.handleNewDataOnRowGrouping(view, groupingKeys);
3676
3681
  }
3677
- /**
3678
- * Metodo richiamato solo quando **TMPRowTDs** e **TMPRowTHs** sono completamente generati ed aggiustati. Serve per collegarli alle variabili usate lato binding HTML
3679
- */
3682
+ /** Metodo richiamato solo quando **TMPRowTDs** e **TMPRowTHs** sono completamente generati ed aggiustati. Serve per collegarli alle variabili usate lato binding HTML */
3680
3683
  MoveTemporaryVariablesToRealOnes() {
3681
3684
  this.RowTDs = this.TMPRowTDs;
3682
3685
  this.RowTHs = this.TMPRowTHs;
@@ -4038,16 +4041,12 @@ class EsTableComponent {
4038
4041
  else
4039
4042
  this.emitSearchRequest(true);
4040
4043
  }
4041
- /**
4042
- * Evento richiamato sul cambio della paginazione. Verrà richiamato l'evento **emitSearchRequest** con la vista del separatore
4043
- */
4044
+ /** Evento richiamato sul cambio della paginazione. Verrà richiamato l'evento **emitSearchRequest** con la vista del separatore */
4044
4045
  onGroupItemsPerPageChanged(pager, newIpp) {
4045
4046
  pager.view.itemsperpageoverride = newIpp;
4046
4047
  this.emitSearchRequest(true, pager.view);
4047
4048
  }
4048
- /**
4049
- * Metodo che gestisce la modifica del tempo specificato per l'aggiornamento automatico
4050
- */
4049
+ /** Metodo che gestisce la modifica del tempo specificato per l'aggiornamento automatico */
4051
4050
  autoUpdateChanged() {
4052
4051
  if (!/^[1-9]\d*$/.test(this.seconds))
4053
4052
  this.seconds = '10';