@esfaenza/es-table 12.2.24 → 12.2.28

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.
@@ -1,6 +1,6 @@
1
1
  import { QueryList, ChangeDetectorRef, EventEmitter, OnChanges, SimpleChanges, ElementRef, TemplateRef } from '@angular/core';
2
2
  import { ControlValueAccessor, NgControl } from '@angular/forms';
3
- import { UtilityService, ExportService, MessageService, DateService } from '@esfaenza/extensions';
3
+ import { UtilityService, ExportService, MessageService, DateService, CsvHeaders } from '@esfaenza/extensions';
4
4
  import { LocalizationService } from '@esfaenza/localizations';
5
5
  import { PreferencesService } from '@esfaenza/preferences';
6
6
  import { ContextMenuComponent } from '@esfaenza/ngx-contextmenu';
@@ -343,7 +343,7 @@ export declare class EsTableComponent implements ControlValueAccessor, OnChanges
343
343
  /** Dati esportati da ngx-csv */
344
344
  data: any[];
345
345
  /** Header dei dati esportati da ngx-csv */
346
- headers: any[];
346
+ headers: CsvHeaders[];
347
347
  /** Elemento HTML da cliccare per l'esportazione */
348
348
  exportDownloader: ElementRef;
349
349
  /** Placeholder di menù contestuale per quando non ci sono opzioni nel placeholder "Vero" */
@@ -440,7 +440,7 @@ export declare class EsTableComponent implements ControlValueAccessor, OnChanges
440
440
  /** @ignore */
441
441
  propagateChange: (_: any) => void;
442
442
  /** @ignore */
443
- writeValue(obj: any): void;
443
+ writeValue(obj: any): Promise<void>;
444
444
  /** Funzione di trackby per il body che dovrebbe evitare il 90% delle change detection */
445
445
  bodyTrackBy: (index: number, item: any) => any;
446
446
  /**
@@ -7,6 +7,7 @@ import { EsTdDirective } from "../../../directives/es_td.directive";
7
7
  import { EsThDirective } from "../../../directives/es_th.directive";
8
8
  import { UtilitiesHandler, RowGroupingHandler } from "..";
9
9
  import { AppSearch, EsTableColumn } from "../../../domain";
10
+ import { CdkDrag, CdkDragDrop } from "@angular/cdk/drag-drop";
10
11
  /** Classe che gestisce tutte le informaizoni relative alle colonne: visibilità, posizione, stato di pin/unpin, ecc ecc... */
11
12
  export declare class ColumnMetadataHandler {
12
13
  private est;
@@ -140,6 +141,21 @@ export declare class ColumnMetadataHandler {
140
141
  private refreshColumnOrdering;
141
142
  /** Effettua la selezione o meno del check globale (**globalColVisCheck**) di visibilità in base a se tutte le **TMPColumnsList** sono visibili o no */
142
143
  updateGlobalColVisCheck(): void;
144
+ /**
145
+ * Chiamato quando una colonna viene riordinata all'interno della lista delle visibilità/posizioni colonne
146
+ *
147
+ * @param {CdkDragDrop<EsTableColumn[]>} event Evento di drop della lista
148
+ */
149
+ columnReordered(event: CdkDragDrop<EsTableColumn[]>): void;
150
+ /**
151
+ * Chiamato quando una colonna viene riordinata all'interno della lista delle visibilità/posizioni colonne
152
+ *
153
+ * @param {number} index Indice in cui voglio droppare l'elemento draggato
154
+ * @param {CdkDrag<EsTableColumn>} item Oggetto che sto draggando
155
+ *
156
+ * @returns {boolean} **true** se la colonna può essere spostata sull'indice **index**, **false** altrimenti
157
+ */
158
+ sortPredicate(index: number, item: CdkDrag<EsTableColumn>): boolean;
143
159
  /**
144
160
  * Funzione che effettua la conferma della visibilità e dell'ordine delle colonne.
145
161
  *
@@ -1,18 +1,24 @@
1
- import { ExportService, MessageService } from "@esfaenza/extensions";
1
+ import { DateService, ExportService, MessageService, UtilityService } from "@esfaenza/extensions";
2
2
  import { EsTableComponent } from "../../../components/es-table/es_table.component";
3
3
  /** Classe contenente la gestione delle importazioni */
4
4
  export declare class ExportHandler {
5
5
  private est;
6
6
  private expExts;
7
7
  private msgExts;
8
+ private utiExts;
9
+ private dateExts;
10
+ /** Cache del modulo per l'esportazione Excel */
11
+ private ExcelJS;
8
12
  /** @ignore Costruttore*/
9
- constructor(est: EsTableComponent, expExts: ExportService, msgExts: MessageService);
13
+ constructor(est: EsTableComponent, expExts: ExportService, msgExts: MessageService, utiExts: UtilityService, dateExts: DateService);
10
14
  /**
11
15
  * Effettua l'esportazione dei dati
12
16
  *
13
17
  * @param {string} format Formato di esportazione. Letto solo in modalità Report della tabella
14
18
  */
15
19
  tryExport(format?: string): void;
20
+ /** Effettua l'esportazione del file Excel basandosi sul modulo **ExcelJS**, sugli header **this.est.headers** e sui dati **this.est.data** */
21
+ private exportExcel;
16
22
  /**
17
23
  * Metodo che effettivamente genera gli header e i dati per l'esportazione con **ngx-csv**
18
24
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esfaenza/es-table",
3
- "version": "12.2.24",
3
+ "version": "12.2.28",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
@@ -14,7 +14,9 @@
14
14
  "@esfaenza/ngx-contextmenu": "^12.2.8",
15
15
  "@esfaenza/preferences": "^12.2.9",
16
16
  "ngx-toastr": "14.2.1",
17
- "ngx-bootstrap": "7.0.0"
17
+ "ngx-bootstrap": "7.0.0",
18
+ "exceljs": "4.3.0",
19
+ "stream": "0.0.2"
18
20
  },
19
21
  "main": "bundles/esfaenza-es-table.umd.js",
20
22
  "module": "fesm2015/esfaenza-es-table.js",