@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.
- package/bundles/esfaenza-es-table.umd.js +39 -42
- 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/esm2015/lib/components/es-table/es_table.component.js +6 -14
- package/esm2015/lib/core/handlers/classes/ColumnMetadataHandler.js +7 -6
- package/esm2015/lib/core/handlers/classes/DynamicModeHandler.js +2 -1
- package/esm2015/lib/core/handlers/classes/ExportHandler.js +3 -1
- package/esm2015/lib/core/handlers/classes/HierarchyModeHandler.js +3 -1
- package/esm2015/lib/core/handlers/classes/ItemsHandler.js +5 -4
- package/esm2015/lib/core/handlers/classes/ReportModeHandler.js +4 -1
- package/esm2015/lib/core/handlers/classes/RowGroupingHandler.js +4 -3
- package/esm2015/lib/core/handlers/classes/SelectionHandler.js +7 -9
- package/esm2015/lib/core/handlers/classes/UtilitiesHandler.js +11 -12
- package/esm2015/lib/domain/internals/classes/ThElement.js +2 -0
- package/esm2015/lib/domain/internals/index.js +2 -1
- package/fesm2015/esfaenza-es-table.js +41 -42
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +7 -37
- package/lib/core/handlers/classes/ColumnMetadataHandler.d.ts +6 -5
- package/lib/core/handlers/classes/DynamicModeHandler.d.ts +1 -0
- package/lib/core/handlers/classes/ExportHandler.d.ts +2 -0
- package/lib/core/handlers/classes/HierarchyModeHandler.d.ts +2 -0
- package/lib/core/handlers/classes/ItemsHandler.d.ts +4 -4
- package/lib/core/handlers/classes/ReportModeHandler.d.ts +2 -0
- package/lib/core/handlers/classes/RowGroupingHandler.d.ts +3 -3
- package/lib/core/handlers/classes/SelectionHandler.d.ts +6 -10
- package/lib/core/handlers/classes/UtilitiesHandler.d.ts +5 -4
- package/lib/domain/internals/classes/ThElement.d.ts +13 -0
- package/lib/domain/internals/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { UtilityService, ExportService, MessageService, DateService } from '@esf
|
|
|
4
4
|
import { LocalizationService } from '@esfaenza/localizations';
|
|
5
5
|
import { PreferencesService } from '@esfaenza/preferences';
|
|
6
6
|
import { ContextMenuComponent } from '@esfaenza/ngx-contextmenu';
|
|
7
|
-
import { AppSearch, AppOrdering, EsTableColumnsDefinition, CornerMenuOption, ReportResult, EsTableOperationDefinition, EsTableColumn, GroupPager, GroupRouteFragment } from '../../domain';
|
|
7
|
+
import { AppSearch, AppOrdering, EsTableColumnsDefinition, CornerMenuOption, ReportResult, EsTableOperationDefinition, EsTableColumn, GroupPager, GroupRouteFragment, ThElement } from '../../domain';
|
|
8
8
|
import { EsTd } from '../es-td/es_td.component';
|
|
9
9
|
import { EsTdDirective } from '../../directives/es_td.directive';
|
|
10
10
|
import { EsThDirective } from '../../directives/es_th.directive';
|
|
@@ -89,31 +89,9 @@ export declare class EsTableComponent implements ControlValueAccessor, OnChanges
|
|
|
89
89
|
[context: string]: EsTd[];
|
|
90
90
|
};
|
|
91
91
|
/** Modello rappresentante un singolo th della tabella, generato in base alle configurazioni e agli oggetti ricevuti */
|
|
92
|
-
RowTHs:
|
|
93
|
-
Pinned: boolean;
|
|
94
|
-
Fixed: boolean;
|
|
95
|
-
ID: string;
|
|
96
|
-
Visible: boolean;
|
|
97
|
-
Class: string;
|
|
98
|
-
Content: string;
|
|
99
|
-
Order: string;
|
|
100
|
-
Orderable: boolean;
|
|
101
|
-
Template: TemplateRef<any>;
|
|
102
|
-
Wrap: boolean;
|
|
103
|
-
}[];
|
|
92
|
+
RowTHs: ThElement[];
|
|
104
93
|
/** Modello di appoggio temporaneo per i **RowTHs** */
|
|
105
|
-
TMPRowTHs:
|
|
106
|
-
Pinned: boolean;
|
|
107
|
-
Fixed: boolean;
|
|
108
|
-
ID: string;
|
|
109
|
-
Visible: boolean;
|
|
110
|
-
Class: string;
|
|
111
|
-
Content: string;
|
|
112
|
-
Order: string;
|
|
113
|
-
Orderable: boolean;
|
|
114
|
-
Template: TemplateRef<any>;
|
|
115
|
-
Wrap: boolean;
|
|
116
|
-
}[];
|
|
94
|
+
TMPRowTHs: ThElement[];
|
|
117
95
|
/** Modello di appoggio temporaneo per i **RowThGroups** */
|
|
118
96
|
TMPRowThGroups: {
|
|
119
97
|
Span: number;
|
|
@@ -475,9 +453,7 @@ export declare class EsTableComponent implements ControlValueAccessor, OnChanges
|
|
|
475
453
|
* all'es-table per renderizzare i valori da mostrare
|
|
476
454
|
*/
|
|
477
455
|
private postBoundSourceCalculation;
|
|
478
|
-
/**
|
|
479
|
-
* 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
|
|
480
|
-
*/
|
|
456
|
+
/** 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 */
|
|
481
457
|
private internalPostBoundSource;
|
|
482
458
|
/**
|
|
483
459
|
* Effettua il binding degli oggetti pervenuti da questa chiamata con gli oggetti effettivamente da graficare
|
|
@@ -485,9 +461,7 @@ export declare class EsTableComponent implements ControlValueAccessor, OnChanges
|
|
|
485
461
|
* @param {any} view View da cui sono arrivati gli oggetti. Può essere o un array se sono in **arrayMode** o una AppSearch<T> se sono in **viewMode**
|
|
486
462
|
*/
|
|
487
463
|
private bindDisplayToLoadedItemsOrGroups;
|
|
488
|
-
/**
|
|
489
|
-
* Metodo richiamato solo quando **TMPRowTDs** e **TMPRowTHs** sono completamente generati ed aggiustati. Serve per collegarli alle variabili usate lato binding HTML
|
|
490
|
-
*/
|
|
464
|
+
/** Metodo richiamato solo quando **TMPRowTDs** e **TMPRowTHs** sono completamente generati ed aggiustati. Serve per collegarli alle variabili usate lato binding HTML */
|
|
491
465
|
private MoveTemporaryVariablesToRealOnes;
|
|
492
466
|
/**
|
|
493
467
|
* Permette di selezionare o deselezionare in maniera arbitraria degli oggetti
|
|
@@ -586,13 +560,9 @@ export declare class EsTableComponent implements ControlValueAccessor, OnChanges
|
|
|
586
560
|
* per comunicare al componente che utilizza questa tabella che i dati sono da aggiornare
|
|
587
561
|
*/
|
|
588
562
|
onItemsPerPageChanged(newIpp: any): void;
|
|
589
|
-
/**
|
|
590
|
-
* Evento richiamato sul cambio della paginazione. Verrà richiamato l'evento **emitSearchRequest** con la vista del separatore
|
|
591
|
-
*/
|
|
563
|
+
/** Evento richiamato sul cambio della paginazione. Verrà richiamato l'evento **emitSearchRequest** con la vista del separatore */
|
|
592
564
|
onGroupItemsPerPageChanged(pager: GroupPager, newIpp: number): void;
|
|
593
|
-
/**
|
|
594
|
-
* Metodo che gestisce la modifica del tempo specificato per l'aggiornamento automatico
|
|
595
|
-
*/
|
|
565
|
+
/** Metodo che gestisce la modifica del tempo specificato per l'aggiornamento automatico */
|
|
596
566
|
autoUpdateChanged(): void;
|
|
597
567
|
/**
|
|
598
568
|
* Metodo chiamato dal click su una delle colonne generate dall'Input **DynamicOperations**
|
|
@@ -14,13 +14,14 @@ export declare class ColumnMetadataHandler {
|
|
|
14
14
|
private utiExts;
|
|
15
15
|
private prefService;
|
|
16
16
|
private rgH;
|
|
17
|
+
/** @ignore Costruttore*/
|
|
17
18
|
constructor(est: EsTableComponent, utilities: UtilitiesHandler, utiExts: UtilityService, prefService: PreferencesService, rgH: RowGroupingHandler);
|
|
18
19
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
* Metodo che gestisce il cambio di Ordinamento di una colonna
|
|
21
|
+
*
|
|
22
|
+
* @param {string} id ID della colonna il cui oridnamento è cambiato
|
|
23
|
+
* @param {'DESC' | 'ASC'} order Nuovo ordine selezionato per la colonna
|
|
24
|
+
*/
|
|
24
25
|
handleTHOrderChange(id: string, order: 'DESC' | 'ASC'): void;
|
|
25
26
|
/**
|
|
26
27
|
* Partendo dagli **EsThs** estrappolo la lista di **EsTableColumn** che questa tabella dovrà eventualmente gestire per Visibilità e Ordine
|
|
@@ -3,6 +3,7 @@ import { GenericItem } from "../../../domain";
|
|
|
3
3
|
/** Classe contenente le gestioni particolari della modalità dinamica dell'es-table */
|
|
4
4
|
export declare class DynamicModeHandler {
|
|
5
5
|
private est;
|
|
6
|
+
/** @ignore Costruttore*/
|
|
6
7
|
constructor(est: EsTableComponent);
|
|
7
8
|
/**
|
|
8
9
|
* Metodo di supporto alla creazione di un router link parametrizzato all'oggetto corrente utilizzato nella modalità dinamica
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ExportService, MessageService } from "@esfaenza/extensions";
|
|
2
2
|
import { EsTableComponent } from "../../../components/es-table/es_table.component";
|
|
3
|
+
/** Classe contenente la gestione delle importazioni */
|
|
3
4
|
export declare class ExportHandler {
|
|
4
5
|
private est;
|
|
5
6
|
private expExts;
|
|
6
7
|
private msgExts;
|
|
8
|
+
/** @ignore Costruttore*/
|
|
7
9
|
constructor(est: EsTableComponent, expExts: ExportService, msgExts: MessageService);
|
|
8
10
|
/**
|
|
9
11
|
* Effettua l'esportazione dei dati
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { EsTableComponent } from "../../../components/es-table/es_table.component";
|
|
2
|
+
/** Classe contenente la gestione della modalità gerarchica */
|
|
2
3
|
export declare class HierarchyModeHandler {
|
|
3
4
|
private est;
|
|
5
|
+
/** @ignore Costruttore*/
|
|
4
6
|
constructor(est: EsTableComponent);
|
|
5
7
|
/**
|
|
6
8
|
* Data una lista di oggetti assegno il livello gerarchico rispetto alla lista di oggetti passata
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { UtilitiesHandler } from "./UtilitiesHandler";
|
|
2
1
|
import { EsTableComponent } from "../../../components/es-table/es_table.component";
|
|
2
|
+
import { UtilitiesHandler } from "./UtilitiesHandler";
|
|
3
|
+
/** Classe che si occupa della gestione del recupero degli oggetti, paginazione e tutto ciò in cui gli elementi caricati vengono manipolati direttamente */
|
|
3
4
|
export declare class ItemsHandler {
|
|
4
5
|
private est;
|
|
5
6
|
private utilities;
|
|
7
|
+
/** @ignore Costruttore */
|
|
6
8
|
constructor(est: EsTableComponent, utilities: UtilitiesHandler);
|
|
7
9
|
/**
|
|
8
10
|
* In base alla modalità specificata (ArrayMode, ViewMode, ecc...) questo metodo recupera l'array di oggetti da bindare ad interfaccia
|
|
@@ -34,8 +36,6 @@ export declare class ItemsHandler {
|
|
|
34
36
|
* @returns {any[][]} Matrice di array Nx100
|
|
35
37
|
*/
|
|
36
38
|
getItemSlices(): any[][];
|
|
37
|
-
/**
|
|
38
|
-
* Se in modalità array applica gli ordinamenti ASC-DESC delle colonne
|
|
39
|
-
*/
|
|
39
|
+
/** Se in modalità array applica gli ordinamenti ASC-DESC delle colonne */
|
|
40
40
|
arrayModeReviewOrderings(): void;
|
|
41
41
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { UtilitiesHandler } from "./UtilitiesHandler";
|
|
2
2
|
import { EsTableComponent } from "../../../components/es-table/es_table.component";
|
|
3
3
|
import { ReportColumn } from "../../../domain";
|
|
4
|
+
/** Classe che gestisce la modalità Report dell'es-table utilizzata nel Metering */
|
|
4
5
|
export declare class ReportModeHandler {
|
|
5
6
|
private est;
|
|
6
7
|
private utilities;
|
|
8
|
+
/** @ignore Costruttore */
|
|
7
9
|
constructor(est: EsTableComponent, utilities: UtilitiesHandler);
|
|
8
10
|
/**
|
|
9
11
|
* Sul click dell'Header di una colonna questo metodo si occupa di applicare l'ordinamento successivo e di notificare con **emitSearchRequest**
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { DateService } from "@esfaenza/extensions";
|
|
2
|
-
import { EsTableComponent } from "../../../components/es-table/es_table.component";
|
|
3
2
|
import { EsTh } from "../../../components/es-th/es_th.component";
|
|
4
3
|
import { EsThDirective } from "../../../directives/es_th.directive";
|
|
4
|
+
import { EsTableComponent } from "../../../components/es-table/es_table.component";
|
|
5
5
|
import { AppOrdering, AppSearch, Group, GroupOrAggregation, GroupPager, GroupRouteFragment } from "../../../domain";
|
|
6
6
|
import { UtilitiesHandler } from "./UtilitiesHandler";
|
|
7
|
+
/** Classe che gestisce la modalità Row Grouping dell'es-table */
|
|
7
8
|
export declare class RowGroupingHandler {
|
|
8
9
|
private est;
|
|
9
10
|
private utilities;
|
|
@@ -14,6 +15,7 @@ export declare class RowGroupingHandler {
|
|
|
14
15
|
rgItemCache: Map<string, any[]>;
|
|
15
16
|
/** Cache per salvare per ogni chiave di ogni gruppo chi sono gli oggetti sottostanti, non dei sottogruppi */
|
|
16
17
|
rgChildGroupsCache: Map<string, Group[]>;
|
|
18
|
+
/** @ignore Costruttore */
|
|
17
19
|
constructor(est: EsTableComponent, utilities: UtilitiesHandler, dateExts: DateService);
|
|
18
20
|
/**
|
|
19
21
|
* In modalità rowgrouping quando mi arriva un nuovo blocco di oggetti devo aggiungerlo alla vista attuale:
|
|
@@ -107,8 +109,6 @@ export declare class RowGroupingHandler {
|
|
|
107
109
|
* @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
|
|
108
110
|
*
|
|
109
111
|
* @returns {string} Valore dell'aggregazione formattato come si deve
|
|
110
|
-
*
|
|
111
|
-
* @todo ROWGROUPING
|
|
112
112
|
*/
|
|
113
113
|
private formatAggregationValue;
|
|
114
114
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ItemsSelection } from "../../../domain";
|
|
2
|
-
import { UtilitiesHandler } from "./UtilitiesHandler";
|
|
3
2
|
import { EsTableComponent } from "../../../components/es-table/es_table.component";
|
|
4
|
-
import { RowGroupingHandler } from "
|
|
3
|
+
import { RowGroupingHandler } from "../";
|
|
4
|
+
/** Classe che gestisce le selezioni degli oggetti */
|
|
5
5
|
export declare class SelectionHandler {
|
|
6
6
|
private est;
|
|
7
|
-
private utilities;
|
|
8
7
|
private rgHandler;
|
|
9
8
|
/** Cache di selezione Hash - Oggetto per la variabile **items** dell'itemSelector. Facilita le operazioni di lookup via hash*/
|
|
10
9
|
private itemsCache;
|
|
@@ -22,7 +21,8 @@ export declare class SelectionHandler {
|
|
|
22
21
|
private i_exclusionsCache;
|
|
23
22
|
/** Cache di selezione Hash - Oggetto per la variabile **group_exclusions** dell'itemSelector. Facilita le operazioni di lookup via indice */
|
|
24
23
|
private i_group_exclusionsCache;
|
|
25
|
-
|
|
24
|
+
/** @ignore Costruttore */
|
|
25
|
+
constructor(est: EsTableComponent, rgHandler: RowGroupingHandler);
|
|
26
26
|
/** Ripulisce le cache di selezione */
|
|
27
27
|
clearSelectionCaches(): void;
|
|
28
28
|
/**
|
|
@@ -87,13 +87,9 @@ export declare class SelectionHandler {
|
|
|
87
87
|
* qualsiasi cosa vada oltre non è 100% detto che funzioni...
|
|
88
88
|
*/
|
|
89
89
|
private performSelectionOperations;
|
|
90
|
-
/**
|
|
91
|
-
* Helper per evitare di riscrivere ogni santa volta array.splice(array.indexof(item), 1);
|
|
92
|
-
*/
|
|
90
|
+
/** Helper per evitare di riscrivere ogni santa volta array.splice(array.indexof(item), 1); */
|
|
93
91
|
private removeItem;
|
|
94
|
-
/**
|
|
95
|
-
* Helper per evitare di riscrivere ogni santa volta array.push(item); e la gestione della
|
|
96
|
-
*/
|
|
92
|
+
/** Helper per evitare di riscrivere ogni santa volta array.push(item); e la gestione della */
|
|
97
93
|
private addItem;
|
|
98
94
|
/**
|
|
99
95
|
* Ottiene il trittico di selezione, cioè l'array degli oggetti che si vuole manipolare e le due cache collegate ad esso
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { HashingService } from "@esfaenza/extensions";
|
|
2
2
|
import { EsTd } from "../../../components/es-td/es_td.component";
|
|
3
3
|
import { EsTh } from "../../../components/es-th/es_th.component";
|
|
4
|
+
/** Classe di utilità per le cose comuni */
|
|
4
5
|
export declare class UtilitiesHandler {
|
|
5
6
|
private hashExts;
|
|
7
|
+
/** @ignore Costruttore */
|
|
6
8
|
constructor(hashExts: HashingService);
|
|
7
9
|
/**
|
|
8
|
-
* Data una lista di oggetti effettua dei raggruppamenti in base alla proprietà **field**,
|
|
10
|
+
* Data una lista di oggetti effettua dei raggruppamenti in base alla proprietà **field**,
|
|
11
|
+
* restituendo un oggetto del tipo { Gruppo1: oggetti[], Gruppo2: oggetti[], ecc... }
|
|
9
12
|
*
|
|
10
13
|
* @param {any[]} array Lista degli oggetti da raggruppare
|
|
11
14
|
* @param {string} field Campo su cui effettuare i raggruppamenti
|
|
@@ -21,9 +24,7 @@ export declare class UtilitiesHandler {
|
|
|
21
24
|
* @param {any} group Gruppo di cui cachare le aggregazioni
|
|
22
25
|
*/
|
|
23
26
|
cacheAggregations(group: any): void;
|
|
24
|
-
/**
|
|
25
|
-
* Helper per spostare un oggetto di un array da un indice all'altro, in place
|
|
26
|
-
*/
|
|
27
|
+
/** Helper per spostare un oggetto di un array da un indice all'altro, in place */
|
|
27
28
|
arrayMove(array: any[], oldI: number, newI: number): void;
|
|
28
29
|
/**
|
|
29
30
|
* Helper che identifica se il td attuale è di tipo **EsTd**. In caso contrario è da considerarsi **EsTdDirective**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TemplateRef } from "@angular/core";
|
|
2
|
+
export interface ThElement {
|
|
3
|
+
Pinned: boolean;
|
|
4
|
+
Fixed: boolean;
|
|
5
|
+
ID: string;
|
|
6
|
+
Visible: boolean;
|
|
7
|
+
Class: string;
|
|
8
|
+
Content: string;
|
|
9
|
+
Order: string;
|
|
10
|
+
Orderable: boolean;
|
|
11
|
+
Template: TemplateRef<any>;
|
|
12
|
+
Wrap: boolean;
|
|
13
|
+
}
|