@esfaenza/es-table 15.2.10 → 15.2.12

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
- import { QueryList, ChangeDetectorRef, EventEmitter, OnChanges, SimpleChanges, ElementRef, TemplateRef } from '@angular/core';
1
+ import { QueryList, ChangeDetectorRef, EventEmitter, OnChanges, SimpleChanges, ElementRef, TemplateRef, Type } from '@angular/core';
2
2
  import { ControlValueAccessor, NgControl } from '@angular/forms';
3
- import { UtilityService, ExportService, MessageService, DateService, CsvHeaders, ClipboardService } from '@esfaenza/extensions';
3
+ import { UtilityService, ExportService, MessageService, DateService, ClipboardService } 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';
@@ -243,12 +243,8 @@ export declare class EsTableComponent implements ControlValueAccessor, OnChanges
243
243
  ExportFileName: string;
244
244
  /** Classe (HTML) di default della tabella */
245
245
  TableClass: any;
246
- /**
247
- * Funzione da utilizzare in esportazione. Nel formato "Report" avrà un unico parametro "Formato" e nessun valore di ritorno.
248
- *
249
- * Nel formato "View" ha come parametro una callback con i dati completi da esportare (dato che di default la ricerca è paginata)
250
- */
251
- ExportFunction: any;
246
+ /** Funzione da utilizzare in esportazione. Ha come parametro una callback con i dati completi da esportare (dato che di default la ricerca è paginata) */
247
+ ExportFunction: (callback: (data: any[], type: Type<any>) => void, format: "CSV" | "XLSX") => void;
252
248
  /** Indica di esportare solo le colonne attualmente visibili della view */
253
249
  ExportOnlyVisibleColumns: boolean;
254
250
  /** @deprecated Indica la presenza di raggruppamenti a livello di header */
@@ -349,10 +345,6 @@ export declare class EsTableComponent implements ControlValueAccessor, OnChanges
349
345
  id: string;
350
346
  item: any;
351
347
  }>;
352
- /** Dati esportati da ngx-csv */
353
- data: any[];
354
- /** Header dei dati esportati da ngx-csv */
355
- headers: CsvHeaders[];
356
348
  /** Elemento HTML da cliccare per l'esportazione */
357
349
  exportDownloader: ElementRef;
358
350
  /** Placeholder di menù contestuale per quando non ci sono opzioni nel placeholder "Vero" */
@@ -7,8 +7,6 @@ export declare class ExportHandler {
7
7
  private msgExts;
8
8
  private utiExts;
9
9
  private dateExts;
10
- /** Cache del modulo per l'esportazione Excel */
11
- private ExcelJS;
12
10
  /** @ignore Costruttore*/
13
11
  constructor(est: EsTableComponent, expExts: ExportService, msgExts: MessageService, utiExts: UtilityService, dateExts: DateService);
14
12
  /**
@@ -16,17 +14,5 @@ export declare class ExportHandler {
16
14
  *
17
15
  * @param {string} format Formato di esportazione. Letto solo in modalità Report della tabella
18
16
  */
19
- tryExport(format?: string): void;
20
- /** Effettua l'esportazione in file CSV, va a sostituire quel coso inutile di @ctrl/ngx-csv */
21
- private exportCSV;
22
- /** Generazione specifica del CSV */
23
- private convertToCSV;
24
- /** Effettua l'esportazione del file Excel basandosi sul modulo **ExcelJS**, sugli header **this.est.headers** e sui dati **this.est.data** */
25
- private exportExcel;
26
- /**
27
- * Metodo che effettivamente genera gli header e i dati per l'esportazione con **ngx-csv**
28
- *
29
- * @param {any[]} items Oggetti da esportare
30
- */
31
- private setupExport;
17
+ tryExport(format?: 'CSV' | 'XLSX'): void;
32
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esfaenza/es-table",
3
- "version": "15.2.10",
3
+ "version": "15.2.12",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
@@ -9,13 +9,12 @@
9
9
  "@angular/core": "^15.2.9",
10
10
  "@angular/material": "^15.2.9",
11
11
  "@esfaenza/localizations": "^15.2.8",
12
- "@esfaenza/extensions": "^15.2.8",
12
+ "@esfaenza/extensions": "^15.2.13",
13
13
  "@esfaenza/forms-and-validations": "^15.2.7",
14
14
  "@esfaenza/ngx-contextmenu": "^15.2.0",
15
15
  "@esfaenza/preferences": "^15.2.0",
16
16
  "ngx-toastr": "16.2.0",
17
- "ngx-bootstrap": "10.2.0",
18
- "exceljs": "4.3.0"
17
+ "ngx-bootstrap": "10.2.0"
19
18
  },
20
19
  "module": "fesm2015/esfaenza-es-table.mjs",
21
20
  "es2020": "fesm2020/esfaenza-es-table.mjs",