@esfaenza/es-table 11.2.37 → 11.2.41
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 +884 -1146
- 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.d.ts +5 -6
- package/esfaenza-es-table.metadata.json +1 -1
- package/esm2015/esfaenza-es-table.js +6 -7
- package/esm2015/lib/components/es-table/es_table.component.js +55 -174
- package/esm2015/lib/components/es-td/es_td.component.js +1 -35
- package/esm2015/lib/core/handlers/ColumnMetadataHandler.js +669 -0
- package/esm2015/lib/core/handlers/DynamicModeHandler.js +63 -0
- package/esm2015/lib/core/handlers/ExportHandler.js +106 -0
- package/esm2015/lib/core/handlers/HierarchyModeHandler.js +136 -0
- package/esm2015/lib/core/handlers/ItemsHandler.js +112 -0
- package/esm2015/lib/core/handlers/ReportModeHandler.js +70 -0
- package/esm2015/lib/core/handlers/RowGroupingHandler.js +481 -0
- package/esm2015/lib/core/handlers/SelectionHandler.js +526 -0
- package/esm2015/lib/core/handlers/UtilitiesHandler.js +155 -0
- package/esm2015/lib/directives/es_th.directive.js +4 -1
- package/esm2015/lib/domain/configuration/EsTableDefaultable.js +1 -1
- package/esm2015/lib/domain/externals/CornerMenuOption.js +4 -0
- package/esm2015/lib/domain/externals/EsTableColumnsDefinition.js +31 -0
- package/esm2015/lib/domain/externals/EsTableOperationDefinition.js +22 -0
- package/esm2015/lib/domain/externals/appsearch/AppOrdering.js +16 -0
- package/esm2015/lib/domain/externals/appsearch/AppSearch.js +35 -0
- package/esm2015/lib/domain/externals/appsearch/GenericItem.js +11 -0
- package/esm2015/lib/domain/externals/appsearch/Group.js +17 -0
- package/esm2015/lib/domain/externals/appsearch/GroupAggregation.js +16 -0
- package/esm2015/lib/domain/externals/appsearch/GroupFilter.js +14 -0
- package/esm2015/lib/domain/externals/appsearch/GroupOrAggregation.js +16 -0
- package/esm2015/lib/domain/externals/appsearch/ItemsSelection.js +23 -0
- package/esm2015/lib/domain/externals/report/ReportColumn.js +4 -0
- package/esm2015/lib/domain/externals/report/ReportDefinition.js +4 -0
- package/esm2015/lib/domain/externals/report/ReportOrder.js +4 -0
- package/esm2015/lib/domain/externals/report/ReportParam.js +4 -0
- package/esm2015/lib/domain/externals/report/ReportResult.js +4 -0
- package/esm2015/lib/domain/externals/report/ReportRow.js +4 -0
- package/esm2015/lib/domain/internals/CacheTriptic.js +16 -0
- package/esm2015/lib/domain/internals/EsTableColumn.js +27 -0
- package/esm2015/lib/domain/internals/GroupPager.js +22 -0
- package/esm2015/lib/domain/internals/GroupRouteFragment.js +17 -0
- package/esm2015/lib/domain/internals/TdElement.js +2 -0
- package/esm2015/lib/domain/internals/ThAggregation.js +16 -0
- package/esm2015/lib/domain/internals/ThElement.js +2 -0
- package/esm2015/lib/es-table.module.js +2 -2
- package/esm2015/public-api.js +21 -7
- package/fesm2015/esfaenza-es-table.js +832 -1093
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +32 -68
- package/lib/components/es-td/es_td.component.d.ts +0 -2
- package/lib/core/handlers/{classes/ColumnMetadataHandler.d.ts → ColumnMetadataHandler.d.ts} +24 -23
- package/lib/core/handlers/{classes/DynamicModeHandler.d.ts → DynamicModeHandler.d.ts} +2 -2
- package/lib/core/handlers/{classes/ExportHandler.d.ts → ExportHandler.d.ts} +1 -1
- package/lib/core/handlers/{classes/HierarchyModeHandler.d.ts → HierarchyModeHandler.d.ts} +1 -1
- package/lib/core/handlers/{classes/ItemsHandler.d.ts → ItemsHandler.d.ts} +1 -7
- package/lib/core/handlers/{classes/ReportModeHandler.d.ts → ReportModeHandler.d.ts} +2 -2
- package/lib/core/handlers/{classes/RowGroupingHandler.d.ts → RowGroupingHandler.d.ts} +10 -6
- package/lib/core/handlers/{classes/SelectionHandler.d.ts → SelectionHandler.d.ts} +3 -3
- package/lib/core/handlers/{classes/UtilitiesHandler.d.ts → UtilitiesHandler.d.ts} +0 -16
- package/lib/directives/es_th.directive.d.ts +3 -1
- package/lib/domain/configuration/EsTableDefaultable.d.ts +1 -0
- package/lib/domain/externals/{classes/CornerMenuOption.d.ts → CornerMenuOption.d.ts} +0 -0
- package/lib/domain/externals/{classes/EsTableColumnsDefinition.d.ts → EsTableColumnsDefinition.d.ts} +0 -0
- package/lib/domain/externals/{classes/EsTableOperationDefinition.d.ts → EsTableOperationDefinition.d.ts} +0 -0
- package/lib/domain/externals/{classes/appsearch → appsearch}/AppOrdering.d.ts +0 -0
- package/lib/domain/externals/{classes/appsearch → appsearch}/AppSearch.d.ts +0 -0
- package/lib/domain/externals/{classes/appsearch → appsearch}/GenericItem.d.ts +0 -0
- package/lib/domain/externals/{classes/appsearch → appsearch}/Group.d.ts +0 -0
- package/lib/domain/externals/{classes/appsearch → appsearch}/GroupAggregation.d.ts +0 -0
- package/lib/domain/externals/{classes/appsearch → appsearch}/GroupFilter.d.ts +0 -0
- package/lib/domain/externals/{classes/appsearch → appsearch}/GroupOrAggregation.d.ts +0 -0
- package/lib/domain/externals/{classes/appsearch → appsearch}/ItemsSelection.d.ts +1 -1
- package/lib/domain/externals/{classes/report → report}/ReportColumn.d.ts +0 -0
- package/lib/domain/externals/{classes/report → report}/ReportDefinition.d.ts +3 -1
- package/lib/domain/externals/{classes/report → report}/ReportOrder.d.ts +0 -0
- package/lib/domain/externals/{classes/report → report}/ReportParam.d.ts +0 -0
- package/lib/domain/externals/{classes/report → report}/ReportResult.d.ts +2 -1
- package/lib/domain/externals/{classes/report → report}/ReportRow.d.ts +0 -0
- package/lib/domain/internals/{classes/CacheTriptic.d.ts → CacheTriptic.d.ts} +0 -0
- package/lib/domain/internals/{classes/EsTableColumn.d.ts → EsTableColumn.d.ts} +2 -1
- package/lib/domain/internals/{classes/GroupPager.d.ts → GroupPager.d.ts} +4 -1
- package/lib/domain/internals/{classes/GroupRouteFragment.d.ts → GroupRouteFragment.d.ts} +0 -0
- package/lib/domain/internals/TdElement.d.ts +35 -0
- package/lib/domain/internals/{classes/ThAggregation.d.ts → ThAggregation.d.ts} +0 -0
- package/lib/domain/internals/{classes/ThElement.d.ts → ThElement.d.ts} +0 -0
- package/package.json +1 -1
- package/public-api.d.ts +20 -3
- package/esm2015/lib/core/handlers/classes/ColumnMetadataHandler.js +0 -719
- package/esm2015/lib/core/handlers/classes/DynamicModeHandler.js +0 -64
- package/esm2015/lib/core/handlers/classes/ExportHandler.js +0 -106
- package/esm2015/lib/core/handlers/classes/HierarchyModeHandler.js +0 -136
- package/esm2015/lib/core/handlers/classes/ItemsHandler.js +0 -130
- package/esm2015/lib/core/handlers/classes/ReportModeHandler.js +0 -70
- package/esm2015/lib/core/handlers/classes/RowGroupingHandler.js +0 -475
- package/esm2015/lib/core/handlers/classes/SelectionHandler.js +0 -527
- package/esm2015/lib/core/handlers/classes/UtilitiesHandler.js +0 -169
- package/esm2015/lib/core/handlers/index.js +0 -10
- package/esm2015/lib/domain/externals/classes/CornerMenuOption.js +0 -4
- package/esm2015/lib/domain/externals/classes/EsTableColumnsDefinition.js +0 -31
- package/esm2015/lib/domain/externals/classes/EsTableOperationDefinition.js +0 -22
- package/esm2015/lib/domain/externals/classes/appsearch/AppOrdering.js +0 -16
- package/esm2015/lib/domain/externals/classes/appsearch/AppSearch.js +0 -35
- package/esm2015/lib/domain/externals/classes/appsearch/GenericItem.js +0 -11
- package/esm2015/lib/domain/externals/classes/appsearch/Group.js +0 -17
- package/esm2015/lib/domain/externals/classes/appsearch/GroupAggregation.js +0 -16
- package/esm2015/lib/domain/externals/classes/appsearch/GroupFilter.js +0 -14
- package/esm2015/lib/domain/externals/classes/appsearch/GroupOrAggregation.js +0 -16
- package/esm2015/lib/domain/externals/classes/appsearch/ItemsSelection.js +0 -23
- package/esm2015/lib/domain/externals/classes/report/ReportColumn.js +0 -4
- package/esm2015/lib/domain/externals/classes/report/ReportDefinition.js +0 -4
- package/esm2015/lib/domain/externals/classes/report/ReportOrder.js +0 -4
- package/esm2015/lib/domain/externals/classes/report/ReportParam.js +0 -4
- package/esm2015/lib/domain/externals/classes/report/ReportResult.js +0 -4
- package/esm2015/lib/domain/externals/classes/report/ReportRow.js +0 -4
- package/esm2015/lib/domain/externals/index.js +0 -18
- package/esm2015/lib/domain/index.js +0 -3
- package/esm2015/lib/domain/internals/classes/CacheTriptic.js +0 -16
- package/esm2015/lib/domain/internals/classes/EsTableColumn.js +0 -26
- package/esm2015/lib/domain/internals/classes/GroupPager.js +0 -21
- package/esm2015/lib/domain/internals/classes/GroupRouteFragment.js +0 -17
- package/esm2015/lib/domain/internals/classes/ThAggregation.js +0 -16
- package/esm2015/lib/domain/internals/classes/ThElement.js +0 -2
- package/esm2015/lib/domain/internals/index.js +0 -7
- package/lib/core/handlers/index.d.ts +0 -9
- package/lib/domain/externals/index.d.ts +0 -17
- package/lib/domain/index.d.ts +0 -2
- package/lib/domain/internals/index.d.ts +0 -6
|
@@ -1,37 +1,146 @@
|
|
|
1
|
-
import { __awaiter } from 'tslib';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import { NgControl, FormsModule } from '@angular/forms';
|
|
5
|
-
import * as i1 from '@esfaenza/extensions';
|
|
6
|
-
import { HashingService, UtilityService, ExportService, DateService, MessageService } from '@esfaenza/extensions';
|
|
2
|
+
import { InjectionToken, Injectable, Optional, Inject, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, ChangeDetectorRef, Input, Output, Directive, TemplateRef, Self, ContentChildren, ContentChild, ViewChild, ElementRef, Renderer2, HostListener, ViewContainerRef, NgModule } from '@angular/core';
|
|
7
3
|
import { LocalizationService, LocalizationModule } from '@esfaenza/localizations';
|
|
4
|
+
import * as i1 from '@esfaenza/extensions';
|
|
5
|
+
import { MessageService, HashingService, UtilityService, ExportService, DateService } from '@esfaenza/extensions';
|
|
6
|
+
import { __awaiter } from 'tslib';
|
|
7
|
+
import { NgControl, FormsModule } from '@angular/forms';
|
|
8
8
|
import { PreferencesService } from '@esfaenza/preferences';
|
|
9
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
10
9
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
11
10
|
import { CommonModule } from '@angular/common';
|
|
12
11
|
import { RouterModule } from '@angular/router';
|
|
13
12
|
import { MatSelectModule } from '@angular/material/select';
|
|
14
13
|
import { MatInputModule } from '@angular/material/input';
|
|
14
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
15
15
|
import { ModalModule } from 'ngx-bootstrap/modal';
|
|
16
16
|
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
|
|
17
17
|
import { CsvModule } from '@ctrl/ngx-csv';
|
|
18
18
|
import { ContextMenuModule } from '@esfaenza/ngx-contextmenu';
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
|
|
20
|
+
/** Token che indica il locale da utilizzare all'interno del componente. Supportati solo "it-IT" ed "en-US" */
|
|
21
|
+
const EST_LOCALE = new InjectionToken('EST_LOCALE');
|
|
22
|
+
/** Token che indica se emettere log a console o meno */
|
|
23
|
+
const EST_DEBUG = new InjectionToken('EST_DEBUG');
|
|
24
|
+
/** Token che indica i default da assegnare agli Input */
|
|
25
|
+
const EST_DEFAULTS = new InjectionToken('EST_DEFAULTS');
|
|
26
|
+
|
|
27
|
+
/** Classe di localizzazione per il componente **TablePagerComponent** */
|
|
28
|
+
class TablePagerLoc extends LocalizationService {
|
|
29
|
+
/** @ignore */
|
|
30
|
+
constructor(LOC_LOCALE) {
|
|
31
|
+
super(LOC_LOCALE !== null && LOC_LOCALE !== void 0 ? LOC_LOCALE : 'it-IT');
|
|
32
|
+
super.set("en->it", "All", ["Tutto"]);
|
|
33
|
+
super.set("en->it", "Shown Elements", ["Elementi visualizzati"]);
|
|
34
|
+
super.set("en->it", "Shown Groups", ["Gruppi visualizzati"]);
|
|
35
|
+
super.set("en->it", "Are you sure you want to retrieve all results?", ["Si è sicuri di voler caricare tutti i risultati?"]);
|
|
36
|
+
super.set("en->it", "This might slow down the page and possibly crash the entire application", ["L'operazione potrebbe rallentare la pagina fino al crash dell'applicazione"]);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
TablePagerLoc.decorators = [
|
|
40
|
+
{ type: Injectable }
|
|
41
|
+
];
|
|
42
|
+
TablePagerLoc.ctorParameters = () => [
|
|
43
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [EST_LOCALE,] }] }
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
// Angular
|
|
47
|
+
/** Componente che si occupa della paginazione di una tabella */
|
|
48
|
+
class TablePagerComponent {
|
|
49
|
+
/** @ignore */
|
|
50
|
+
constructor(msgExts, lc, cdr, locale) {
|
|
51
|
+
this.msgExts = msgExts;
|
|
52
|
+
this.lc = lc;
|
|
53
|
+
this.cdr = cdr;
|
|
54
|
+
this.locale = locale;
|
|
55
|
+
/** Indica se deve mostrare un warning quando si cercano di solezionare come elementi da visualizzare "Tutti" */
|
|
56
|
+
this.WarnOnAll = true;
|
|
57
|
+
/** Indica se dare la possibilità o meno di selezionare "Tutti" nelle opzioni di paginazione */
|
|
58
|
+
this.AllSearch = true;
|
|
59
|
+
/** Placeholder che identifica il "Tutti" */
|
|
60
|
+
this.DefaultAll = 999999;
|
|
61
|
+
/** Indica se attivare la modalità gruppo con stili più snelli per apparire sotto ai raggruppamenti */
|
|
62
|
+
this.GroupMode = false;
|
|
63
|
+
/** Indica se utilizzare il conteggio dei gruppi o degli oggetti */
|
|
64
|
+
this.GroupCount = false;
|
|
65
|
+
/** Indica il testo che va a sostituire "Oggetti Visualizzati" in caso si stia facendo qualcosa di custom, Ignorato in caso di gruppi */
|
|
66
|
+
this.CountLabel = null;
|
|
67
|
+
/** Indica se visualizzare il numero totale di oggeti presenti */
|
|
68
|
+
this.ShowCount = true;
|
|
69
|
+
/** Indica se visualizzare il numero totale di oggeti presenti */
|
|
70
|
+
this.ShowPaging = true;
|
|
71
|
+
/** Output invocato quando il numero di elementi per pagina viene modificato da un click utente */
|
|
72
|
+
this.pagingSelected = new EventEmitter();
|
|
73
|
+
/** Opzioni di paginazione */
|
|
74
|
+
this.PagingOptions = [10, 15, 30, 45, 100];
|
|
75
|
+
}
|
|
76
|
+
/** @ignore */
|
|
77
|
+
ngOnInit() {
|
|
78
|
+
this.Model = this.View ? (this.View.itemsperpageoverride || 15) : this.CurrentPageSize;
|
|
79
|
+
if (this.AllSearch)
|
|
80
|
+
this.PagingOptions.push(this.DefaultAll);
|
|
81
|
+
}
|
|
82
|
+
/** @ignore */
|
|
83
|
+
ngOnChanges(changes) {
|
|
84
|
+
let newView = changes['View'];
|
|
85
|
+
let newCPS = changes['CurrentPageSize'];
|
|
86
|
+
if ((newView && !newView.firstChange) || (newCPS && !newCPS.firstChange))
|
|
87
|
+
this.Model = (newView === null || newView === void 0 ? void 0 : newView.currentValue) ? (newView.currentValue.itemsperpageoverride || 15) : (newCPS === null || newCPS === void 0 ? void 0 : newCPS.currentValue) ? newCPS.currentValue : null;
|
|
88
|
+
}
|
|
24
89
|
/**
|
|
25
|
-
*
|
|
90
|
+
* Funzione richiamata dal template quando un utente clicca su un numero di paginazione.
|
|
26
91
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
92
|
+
* Cliccare 2 volte sullo stesso numero causa comunque un refresh dei dati
|
|
93
|
+
*
|
|
94
|
+
* @param {number} pageSize Dimensione selezionata lato UI
|
|
29
95
|
*/
|
|
30
|
-
|
|
31
|
-
this.
|
|
32
|
-
|
|
96
|
+
choice(pageSize) {
|
|
97
|
+
if (pageSize == this.DefaultAll && this.WarnOnAll) {
|
|
98
|
+
this.msgExts.simpleWarningWithChoice(this.lc.loc("Are you sure you want to retrieve all results?"), this.lc.loc("This might slow down the page and possibly crash the entire application"), () => { this.pagingSelected.emit(pageSize); this.Model = pageSize; }, () => {
|
|
99
|
+
// Dio solo sa perché mi tocca fare sta roba... qui dentro per qualche motivo la CD non prende
|
|
100
|
+
let prevModel = this.Model;
|
|
101
|
+
this.Model = null;
|
|
102
|
+
this.cdr.detectChanges();
|
|
103
|
+
this.Model = prevModel;
|
|
104
|
+
this.cdr.detectChanges();
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
this.pagingSelected.emit(pageSize);
|
|
109
|
+
this.Model = pageSize;
|
|
110
|
+
}
|
|
33
111
|
}
|
|
34
|
-
}
|
|
112
|
+
}
|
|
113
|
+
TablePagerComponent.decorators = [
|
|
114
|
+
{ type: Component, args: [{
|
|
115
|
+
selector: "app-paging",
|
|
116
|
+
viewProviders: [{ provide: LocalizationService, useClass: TablePagerLoc }],
|
|
117
|
+
template: "<ng-container *ngIf=\"!Hidden\">\r\n <span class=\"est-fs-14\"> {{CountLabel && !GroupMode ? CountLabel : ((GroupMode ? 'Shown Groups' : 'Shown Elements') | localize : lc)}}: </span>\r\n <ng-container *ngIf=\"ShowPaging && Model && (Model == DefaultAll || PagerCount >= Model || PagerCount == -1)\">\r\n <mat-form-field [appearance]=\"'legacy'\" class=\"mat-paginator-page-size-select est-fs-14 est-ipp-bold\">\r\n <select matNativeControl [ngModel]=\"Model\" name=\"input\" (ngModelChange)=\"choice($event)\">\r\n <ng-container *ngFor=\"let pOpt of PagingOptions\">\r\n <option *ngIf=\"pOpt == DefaultAll || PagerCount >= pOpt || PagerCount == -1\" [value]=\"pOpt\">{{ pOpt == DefaultAll ? ('All' | localize : lc) : pOpt.toString()}}</option>\r\n </ng-container>\r\n </select>\r\n </mat-form-field>\r\n <span class=\"est-fs-14 est-ipp-bold\" *ngIf=\"ShowCount && PagerCount != -1\"> / </span>\r\n </ng-container>\r\n <span class=\"est-fs-14 est-ipp-bold\" *ngIf=\"ShowCount && PagerCount != -1\">{{PagerCount | number : '0.0-0' : locale}}</span>\r\n</ng-container>",
|
|
118
|
+
encapsulation: ViewEncapsulation.None,
|
|
119
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
120
|
+
styles: [".est-ipp-sel,.est-ipp-sel-all,.est-rg-ipp-sel,.est-rg-ipp-sel-all{color:#0275d8!important;cursor:pointer;text-decoration:none;display:block;display:inline}.est-ipp-bold{font-weight:700}.mat-paginator-page-size-select{margin:6px 4px 0;width:50px}.mat-paginator-page-size-select .mat-form-field-wrapper{height:52px!important;margin-top:-15px!important;padding:0!important}.mat-form-field-type-mat-native-select .mat-form-field-infix:after{margin-top:-5.5px!important}"]
|
|
121
|
+
},] }
|
|
122
|
+
];
|
|
123
|
+
TablePagerComponent.ctorParameters = () => [
|
|
124
|
+
{ type: MessageService },
|
|
125
|
+
{ type: LocalizationService },
|
|
126
|
+
{ type: ChangeDetectorRef },
|
|
127
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [EST_LOCALE,] }] }
|
|
128
|
+
];
|
|
129
|
+
TablePagerComponent.propDecorators = {
|
|
130
|
+
CurrentPageSize: [{ type: Input }],
|
|
131
|
+
View: [{ type: Input }],
|
|
132
|
+
WarnOnAll: [{ type: Input }],
|
|
133
|
+
AllSearch: [{ type: Input }],
|
|
134
|
+
DefaultAll: [{ type: Input }],
|
|
135
|
+
GroupMode: [{ type: Input }],
|
|
136
|
+
GroupCount: [{ type: Input }],
|
|
137
|
+
CountLabel: [{ type: Input }],
|
|
138
|
+
ShowCount: [{ type: Input }],
|
|
139
|
+
ShowPaging: [{ type: Input }],
|
|
140
|
+
PagerCount: [{ type: Input }],
|
|
141
|
+
Hidden: [{ type: Input }],
|
|
142
|
+
pagingSelected: [{ type: Output }]
|
|
143
|
+
};
|
|
35
144
|
|
|
36
145
|
/**
|
|
37
146
|
* Classe che identifica una ricerca paginata in tutte le sue sfumature (di grigio)
|
|
@@ -68,98 +177,10 @@ class AppSearch {
|
|
|
68
177
|
}
|
|
69
178
|
}
|
|
70
179
|
|
|
71
|
-
/** Classe che identifica una colonna. Utilizzata in modalità "Colonne dinamiche" */
|
|
72
|
-
class EsTableColumnsDefinition {
|
|
73
|
-
/**
|
|
74
|
-
* Costruttore
|
|
75
|
-
*
|
|
76
|
-
* @param {string} description Descrizione della colonna
|
|
77
|
-
* @param {string} propertyName Nome della proprietà del modello in cui sono contenuti i dati da visualizzare per questa colonna
|
|
78
|
-
* @param {string} routePath Route di navigazione. Es. "['/pages/mod/mod_detail', { 'idItem': '{0}', 'idItem2' : '{1}' }]"
|
|
79
|
-
* @param {string[]} routeParameterProperties Proprietà da bindare a **routePath** per generare la route completa.
|
|
80
|
-
* L'indice scritto in **routePath** è l'indice di accesso a questo array. Es. ["iditem", "iditem2"]
|
|
81
|
-
* @param {'ASC' | 'DESC' } dataOrder Ordinamento dei dati presentati in questa colonna
|
|
82
|
-
* @param {number} columnOrder Ordinamento di questa colonna
|
|
83
|
-
* @param {boolean} visible Visibilità o meno della colonna
|
|
84
|
-
* @param {string} clss Classe da applicare sia ai TD che ai TH relativi a questa colonna
|
|
85
|
-
* @param {boolean} orderable Indica se la colonna è ordinabile o no (nel senso ASC / DESC / NONE)
|
|
86
|
-
* @param {boolean} headerWraps Indica se il testo dell'header dev'essere wrappato all'interno del th. Di default no.
|
|
87
|
-
*/
|
|
88
|
-
constructor(description, propertyName, routePath = null, routeParameterProperties = null, dataOrder = null, columnOrder = null, visible = true, clss = null, orderable = true, headerWraps = false) {
|
|
89
|
-
this.description = description;
|
|
90
|
-
this.propertyName = propertyName;
|
|
91
|
-
this.routePath = routePath;
|
|
92
|
-
this.routeParameterProperties = routeParameterProperties;
|
|
93
|
-
this.dataOrder = dataOrder;
|
|
94
|
-
this.columnOrder = columnOrder;
|
|
95
|
-
this.visible = visible;
|
|
96
|
-
this.clss = clss;
|
|
97
|
-
this.orderable = orderable;
|
|
98
|
-
this.headerWraps = headerWraps;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/** Classe che definisce un oggetto generico come lista di proprietà-valore */
|
|
103
|
-
class GenericItem {
|
|
104
|
-
/** @ignore */
|
|
105
|
-
constructor() {
|
|
106
|
-
this._selected = false;
|
|
107
|
-
this._rowClass = null;
|
|
108
|
-
this._hash = null;
|
|
109
|
-
this.properties = {};
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/** Indica un'opzione cliccabile nel Corner Menù della tabella (il menù richiamabile dai 3 pallini verticli in alto a destra) */
|
|
114
|
-
class CornerMenuOption {
|
|
115
|
-
}
|
|
116
|
-
|
|
117
180
|
/** Definizione generica di un report che può o no disporre di paginazione/export e la cui richiesta è basata su uno o più parametri */
|
|
118
181
|
class ReportDefinition {
|
|
119
182
|
}
|
|
120
183
|
|
|
121
|
-
/** Classe che identifica una direttiva di ordinamento per un report */
|
|
122
|
-
class ReportOrder {
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/** Classe che rappresenta una colonna di un report */
|
|
126
|
-
class ReportColumn {
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/** Classe che rappresenta una lista di oggetti generati da un report */
|
|
130
|
-
class ReportResult {
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/** Classe che rappresenta i valori delle proprietà di un oggetto Report */
|
|
134
|
-
class ReportRow {
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/** Classe che identifica un parametro generico per un report */
|
|
138
|
-
class ReportParam {
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/** Indica operazioni dinamiche generiche che possono essere effettuate per riga. Appaiono come colonne extra sul lato sinistro della tabella */
|
|
142
|
-
class EsTableOperationDefinition {
|
|
143
|
-
/**
|
|
144
|
-
* Costruttore
|
|
145
|
-
*
|
|
146
|
-
* @param {string} id Codice dell'operazione
|
|
147
|
-
* @param {string} title Titolo dell'operazione, da presentare all'utente su hover della cella
|
|
148
|
-
* @param {string} iconClass Classe che fornisca un iconcina Es. "fa fa-remove"
|
|
149
|
-
* @param {string} text Eventuale testo presentato nella cella, genericamente va in alternativa a **iconClass**
|
|
150
|
-
* @param {string} conditionField Indica il campo dell'oggetto sottostante su cui verificare la visibilità o meno di questa icona
|
|
151
|
-
* @param {string} conditionValue Indica il valore che la proprietà **conditionField** dell'oggetto sottostante deve assumere affinché questa opzione si veda
|
|
152
|
-
*/
|
|
153
|
-
constructor(id, title, iconClass, text, conditionField, conditionValue) {
|
|
154
|
-
this.id = id;
|
|
155
|
-
this.title = title;
|
|
156
|
-
this.iconClass = iconClass;
|
|
157
|
-
this.text = text;
|
|
158
|
-
this.conditionField = conditionField;
|
|
159
|
-
this.conditionValue = conditionValue;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
184
|
/** Identifica una selezione applicabile agli oggetti presentati in una tabella */
|
|
164
185
|
class ItemsSelection {
|
|
165
186
|
/**
|
|
@@ -183,428 +204,24 @@ class ItemsSelection {
|
|
|
183
204
|
}
|
|
184
205
|
}
|
|
185
206
|
|
|
186
|
-
/** Classe che rappresenta un
|
|
187
|
-
class
|
|
207
|
+
/** Classe che rappresenta un filtro su un gruppo */
|
|
208
|
+
class GroupFilter {
|
|
188
209
|
/**
|
|
189
210
|
* Costruttore
|
|
190
211
|
*
|
|
191
|
-
* @param {string} column ID della colonna
|
|
192
|
-
* @param {
|
|
193
|
-
* @param {string} value Valore del Gruppo
|
|
212
|
+
* @param {string} column ID della colonna gruppata per cui si richiede di filtrare
|
|
213
|
+
* @param {string} value Valore del gruppo su questa **column** per cui si richiede di filtrare
|
|
194
214
|
*/
|
|
195
|
-
constructor(column,
|
|
215
|
+
constructor(column, value) {
|
|
196
216
|
this.column = column;
|
|
197
|
-
this.count = count;
|
|
198
217
|
this.value = value;
|
|
199
|
-
this.aggregations = [];
|
|
200
218
|
}
|
|
201
219
|
}
|
|
202
220
|
|
|
203
|
-
/**
|
|
204
|
-
class
|
|
205
|
-
/**
|
|
206
|
-
* Costruttore
|
|
207
|
-
*
|
|
208
|
-
* @param {string} column ID della colonna aggregata
|
|
209
|
-
* @param {'min' | 'max' | 'sum' } aggregation Aggregazione da effettuare su questa colonna
|
|
210
|
-
* @param {string} value Valore dell'aggregazione
|
|
211
|
-
*/
|
|
212
|
-
constructor(column, aggregation, value) {
|
|
213
|
-
this.column = column;
|
|
214
|
-
this.aggregation = aggregation;
|
|
215
|
-
this.value = value;
|
|
216
|
-
}
|
|
221
|
+
/** Raccolta di tutti gli Input dell'EsTable a cui può essere logicamente sensato assegnare default per progetto */
|
|
222
|
+
class EsTableDefaultable {
|
|
217
223
|
}
|
|
218
224
|
|
|
219
|
-
/** Classe che rappresenta un filtro su un gruppo */
|
|
220
|
-
class GroupFilter {
|
|
221
|
-
/**
|
|
222
|
-
* Costruttore
|
|
223
|
-
*
|
|
224
|
-
* @param {string} column ID della colonna gruppata per cui si richiede di filtrare
|
|
225
|
-
* @param {string} value Valore del gruppo su questa **column** per cui si richiede di filtrare
|
|
226
|
-
*/
|
|
227
|
-
constructor(column, value) {
|
|
228
|
-
this.column = column;
|
|
229
|
-
this.value = value;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/** Classe che rappresenta o un gruppo o una aggregazione su una colonna. Usata solo internamente */
|
|
234
|
-
class GroupOrAggregation {
|
|
235
|
-
/**
|
|
236
|
-
* Costruttore
|
|
237
|
-
*
|
|
238
|
-
* @param {string} column Colonna su cui è presente o un gruppo o un'aggregazione
|
|
239
|
-
* @param {'min' | 'max' | 'sum' } aggregation Aggregazione presente sulla **column**. Se questo campo è nullo significa che è un gruppo.
|
|
240
|
-
* @param {'string' | 'date' | 'number'} datatype Tipo di dati contenuto nella colonna **column** se non c'è alcuna aggregazione è inutile, pertanto non sarà valorizzato
|
|
241
|
-
*/
|
|
242
|
-
constructor(column, aggregation, datatype) {
|
|
243
|
-
this.column = column;
|
|
244
|
-
this.aggregation = aggregation;
|
|
245
|
-
this.datatype = datatype;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/** Rappresenta un trittico formato da un array e due cache relative a tale array per un accesso estremamente veloce per tutte le operazioni del caso */
|
|
250
|
-
class CacheTriptic {
|
|
251
|
-
/**
|
|
252
|
-
* Costruttore
|
|
253
|
-
*
|
|
254
|
-
* @param {Map<string, any>} cache Cache Chiave-Oggetto
|
|
255
|
-
* @param {Map<string, number>} index_cache Cache Indice-Oggetto
|
|
256
|
-
* @param {any[]} array Array contenente gli oggetti
|
|
257
|
-
*/
|
|
258
|
-
constructor(cache, index_cache, array) {
|
|
259
|
-
this.cache = cache;
|
|
260
|
-
this.index_cache = index_cache;
|
|
261
|
-
this.array = array;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/** Definizione di una colonna, utilizzato nella dialog che permette di modificare le posizioni e le visibilità */
|
|
266
|
-
class EsTableColumn {
|
|
267
|
-
/**
|
|
268
|
-
* Costruttore
|
|
269
|
-
*
|
|
270
|
-
* @param {string} id Id colonna
|
|
271
|
-
* @param {string} description Descrizione (Header)
|
|
272
|
-
* @param {boolean} visible Indica se di default mostrarla o meno
|
|
273
|
-
* @param {boolean} fixed Indica se è una colonna fixed
|
|
274
|
-
* @param {boolean} pinned Indica se è una colonna pinnata
|
|
275
|
-
* @param {number} pinnedWidth Indica la dimensione da assegnare a questa colonna quando è pinnata
|
|
276
|
-
* @param {TemplateRef<any>} template Indica il template da usare per mostrare il testo dell'Header
|
|
277
|
-
* @param {TemplateRef<any>[]} parentTemplates Indica la lista di template padri collegata a questo header
|
|
278
|
-
*/
|
|
279
|
-
constructor(id, description, visible, fixed, pinned, pinnedWidth, template, parentTemplates) {
|
|
280
|
-
this.id = id;
|
|
281
|
-
this.description = description;
|
|
282
|
-
this.visible = visible;
|
|
283
|
-
this.fixed = fixed;
|
|
284
|
-
this.pinned = pinned;
|
|
285
|
-
this.pinnedWidth = pinnedWidth;
|
|
286
|
-
this.template = template;
|
|
287
|
-
this.parentTemplates = parentTemplates;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/** Classe che rappresenta un separatore da inserire fra gli oggetti dell'es-table per le operazioni di paginazione dei raggruppamenti per riga */
|
|
292
|
-
class GroupPager {
|
|
293
|
-
/**
|
|
294
|
-
* Costruttore
|
|
295
|
-
*
|
|
296
|
-
* @param {number} groupLevel Livello del gruppo a cui questo separatore fa riferimento
|
|
297
|
-
* @param {string} parentKey Chiave del gruppo parent se esiste
|
|
298
|
-
* @param {AppSearch<any>} view Vista di ricerca collegata a questo elemento
|
|
299
|
-
* @param {'groups' | 'items'} searches Indica che cosa cerca questo separatore, se sottogruppi o oggetti
|
|
300
|
-
*/
|
|
301
|
-
constructor(_grouplevel, _thisRoute, _parent, view, searches) {
|
|
302
|
-
this._grouplevel = _grouplevel;
|
|
303
|
-
this._thisRoute = _thisRoute;
|
|
304
|
-
this._parent = _parent;
|
|
305
|
-
this.view = view;
|
|
306
|
-
this.searches = searches;
|
|
307
|
-
this._sep = true;
|
|
308
|
-
this.buttons = [];
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Classe che rappresenta un singolo frammento di route di un elemento gruppo o non. Un array di questi indica tutte le colonne di gruppo con i loro valori
|
|
314
|
-
* per arrivare ad una ricerca su sottogruppi o elementi relativi
|
|
315
|
-
*/
|
|
316
|
-
class GroupRouteFragment {
|
|
317
|
-
/**
|
|
318
|
-
* Costruttore
|
|
319
|
-
*
|
|
320
|
-
* @param {string} column Colonna di raggruppamento
|
|
321
|
-
* @param {string} value Valore della colonna di raggruppamento
|
|
322
|
-
*/
|
|
323
|
-
constructor(column, value) {
|
|
324
|
-
this.column = column;
|
|
325
|
-
this.value = value;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
/** Classe rappresentante una singola aggregazione effettuata su una colonna */
|
|
330
|
-
class ThAggregation {
|
|
331
|
-
/**
|
|
332
|
-
* Costruttore
|
|
333
|
-
*
|
|
334
|
-
* @param {'min' | 'max' | 'sum'} func Funzione di aggergazione, può essere **min**, **max** o **sum**
|
|
335
|
-
* @param {string} format Formato richiesto per il valore dell'aggregazione
|
|
336
|
-
* @param {string} match Match intero del pezzo di testo da cui si è estrapolata l'aggregazione, da rimpiazzare col valore calcolato
|
|
337
|
-
*/
|
|
338
|
-
constructor(func, format, match) {
|
|
339
|
-
this.func = func;
|
|
340
|
-
this.format = format;
|
|
341
|
-
this.match = match;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
//Angular
|
|
346
|
-
/** Componente rappresentante una singola cella del body della tabella */
|
|
347
|
-
class EsTd {
|
|
348
|
-
/** @ignore */
|
|
349
|
-
constructor(myself, renderer, _viewContainer, sanitizer) {
|
|
350
|
-
this.myself = myself;
|
|
351
|
-
this.renderer = renderer;
|
|
352
|
-
this._viewContainer = _viewContainer;
|
|
353
|
-
this.sanitizer = sanitizer;
|
|
354
|
-
/** Id della cella, dev'essere lo stesso della colonna **EsTh** relativa */
|
|
355
|
-
this.ID = "";
|
|
356
|
-
/** Valore da mostrare all'interno della cella. Se omesso verrà proiettato il contenuto dal template in cui è stata usata */
|
|
357
|
-
this.Display = null;
|
|
358
|
-
/** Template Angular da istanziare per questo TD */
|
|
359
|
-
this.Template = null;
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* Imposta la visibilità o meno della cella, si traduce nell'applicazione o rimozione della classe **app-display-none**
|
|
363
|
-
*
|
|
364
|
-
* @param {boolean} expression Indicazione della visibilità
|
|
365
|
-
*/
|
|
366
|
-
set Visible(expression) {
|
|
367
|
-
this._Visible = expression;
|
|
368
|
-
if (expression)
|
|
369
|
-
this.renderer.removeClass(this.myself.nativeElement, "app-display-none");
|
|
370
|
-
else
|
|
371
|
-
this.renderer.addClass(this.myself.nativeElement, "app-display-none");
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* Restituisce lo stato di Visibilità della cella in oggetto
|
|
375
|
-
*
|
|
376
|
-
* @returns {boolean} **true** se visibile, **false** altrimenti
|
|
377
|
-
*/
|
|
378
|
-
get Visible() {
|
|
379
|
-
if (this._Visible == undefined)
|
|
380
|
-
this._Visible = true;
|
|
381
|
-
return this._Visible;
|
|
382
|
-
}
|
|
383
|
-
/** @ignore */
|
|
384
|
-
ngAfterViewInit() {
|
|
385
|
-
// Se è Internal significa che è gestita internamente da ES-TABLE quindi evito di fare sti due passaggi di lettura del DOM
|
|
386
|
-
if (this.Internal)
|
|
387
|
-
return;
|
|
388
|
-
// L'hash è calcolato dalla ES-table in fase di binding
|
|
389
|
-
this.Context = this.Context || this.getTemplateContext()._hash;
|
|
390
|
-
this.Content = this.Display === null || this.Display === "" ? this.sanitizer.bypassSecurityTrustHtml(this.myself.nativeElement.innerHTML) : this.sanitizer.bypassSecurityTrustHtml(this.Display);
|
|
391
|
-
this.Class = this.myself.nativeElement.className.replace("app-display-none", "");
|
|
392
|
-
}
|
|
393
|
-
/** Ottiene il contesto della view su cui è istanziato il componente */
|
|
394
|
-
getTemplateContext() {
|
|
395
|
-
// NGBUG: (<any>this._viewContainer)._view non esiste più in IVY: https://stackoverflow.com/questions/60398827/getting-the-context-of-the-template-inside-of-which-my-component-has-been-render
|
|
396
|
-
let vc = this._viewContainer;
|
|
397
|
-
let context;
|
|
398
|
-
// Primo giro di recupero del contesto, supponendo di non avere a che fare col compilatore IVY
|
|
399
|
-
if (vc._view == null)
|
|
400
|
-
context = null;
|
|
401
|
-
else if (vc._view.parent && !vc._view.context.$implicit && vc._view.parent.context && vc._view.parent.context.$implicit)
|
|
402
|
-
context = vc._view.parent.context.$implicit;
|
|
403
|
-
else if (vc._view.context && vc._view.context.ngIf)
|
|
404
|
-
context = vc._view.viewContainerParent.context.$implicit;
|
|
405
|
-
else
|
|
406
|
-
context = vc._view.context.$implicit;
|
|
407
|
-
if (context)
|
|
408
|
-
return context;
|
|
409
|
-
// Se non ho ancora trovato il contesto probabilmente sono in IVY e devo fare dei lookup un po' incasinati per beccarlo
|
|
410
|
-
var array = this._viewContainer._hostLView;
|
|
411
|
-
for (let i = 0; i < array.length; i++) {
|
|
412
|
-
let item = array[i];
|
|
413
|
-
if (item && item.$implicit && !item.ngIf)
|
|
414
|
-
return item.$implicit;
|
|
415
|
-
// Second level search for the real context in case the first one we find is an ngIf
|
|
416
|
-
if (item && item.length && item.length > 0) {
|
|
417
|
-
for (let ii = 0; ii < item.length; ii++) {
|
|
418
|
-
let iitem = item[ii];
|
|
419
|
-
if (iitem && iitem.$implicit && !iitem.ngIf)
|
|
420
|
-
return iitem.$implicit;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
EsTd.decorators = [
|
|
427
|
-
{ type: Component, args: [{
|
|
428
|
-
selector: "[es-td]",
|
|
429
|
-
template: "<span>\r\n <ng-content></ng-content>\r\n</span>",
|
|
430
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
431
|
-
},] }
|
|
432
|
-
];
|
|
433
|
-
EsTd.ctorParameters = () => [
|
|
434
|
-
{ type: ElementRef },
|
|
435
|
-
{ type: Renderer2 },
|
|
436
|
-
{ type: ViewContainerRef },
|
|
437
|
-
{ type: DomSanitizer }
|
|
438
|
-
];
|
|
439
|
-
EsTd.propDecorators = {
|
|
440
|
-
ID: [{ type: Input, args: ['es-td',] }],
|
|
441
|
-
Internal: [{ type: Input }],
|
|
442
|
-
RouterLink: [{ type: Input }],
|
|
443
|
-
Display: [{ type: Input }],
|
|
444
|
-
Template: [{ type: Input }],
|
|
445
|
-
Context: [{ type: Input }],
|
|
446
|
-
Visible: [{ type: Input }]
|
|
447
|
-
};
|
|
448
|
-
|
|
449
|
-
//Angular
|
|
450
|
-
/** Componente rappresentante una Colonna della tabella */
|
|
451
|
-
class EsTh {
|
|
452
|
-
/** @ignore */
|
|
453
|
-
constructor(myself, renderer) {
|
|
454
|
-
this.myself = myself;
|
|
455
|
-
this.renderer = renderer;
|
|
456
|
-
/** Dizionario di mappatura con ordinamento attuale e ordinamento successivo per gestire i passaggi di stato */
|
|
457
|
-
this.orderNext = { "NONE": "DESC", "DESC": "ASC", "ASC": null };
|
|
458
|
-
/** Indica se si sta effettuando un'operazione di resize su questa colonna */
|
|
459
|
-
this.resizingThis = false;
|
|
460
|
-
/**
|
|
461
|
-
* Storicizza l'offset di partenza del resize dell'elemento HTML per poter calcolare la nuova dimensione richiesta durente il resize
|
|
462
|
-
*
|
|
463
|
-
* nuova width = startOffset + posizione X del mouse
|
|
464
|
-
*/
|
|
465
|
-
this.startOffset = null;
|
|
466
|
-
/** Id della colonna, dev'essere lo stesso per tutti gli **EsTd** relativi */
|
|
467
|
-
this.ID = "";
|
|
468
|
-
/** Indica se questa colonna è ordinabile o meno */
|
|
469
|
-
this.Orderable = true;
|
|
470
|
-
/** Valore da mostrare all'interno della colonna. Se omesso verrà proiettato il contenuto dal template in cui è stata usata */
|
|
471
|
-
this.Display = "";
|
|
472
|
-
/** Indica se le dimnsioni di questa colonna sono modificabili o meno */
|
|
473
|
-
this.Resizable = false;
|
|
474
|
-
/** Indica se questo header è pinnato. In caso lo fosse presenta il tastino per effettuare lo spinning */
|
|
475
|
-
this.Pinned = false;
|
|
476
|
-
/**
|
|
477
|
-
* Indica se sta venendo eseguita una operazione di ricerca o meno, serve per evitare l'esecuzione di eventuale codice che potrebbe dare fastidio
|
|
478
|
-
* come ad esempio l'escuzione di un ordinamento durante il caricamento di dati nuovi
|
|
479
|
-
*/
|
|
480
|
-
this.SearchInProgress = false;
|
|
481
|
-
/** Indica se il testo presente in questo Header può andare a capo o meno, di default non può */
|
|
482
|
-
this.Wrap = false;
|
|
483
|
-
/** Indica se la colonna è fixed, cioè se non può né essere nascosta, né riposizionata. Solo le prime colonne possono essere Fixed */
|
|
484
|
-
this.Fixed = false;
|
|
485
|
-
/** Template Angular da istanziare per questo TH */
|
|
486
|
-
this.Template = null;
|
|
487
|
-
/** Evento emesso al cambio di ordinamento effettuato su questa colonna */
|
|
488
|
-
this.onOrderChange = new EventEmitter();
|
|
489
|
-
/** Evento emesso all'unpinning della colonna */
|
|
490
|
-
this.onUnpinning = new EventEmitter();
|
|
491
|
-
/** Impostato dall'**EsTable**, per controllare che ci sia almeno un TD che utilizzi quest'header */
|
|
492
|
-
this._referenced = false;
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* Imposta la visibilità o meno della colonna, si traduce nell'applicazione o rimozione della classe **app-display-none**
|
|
496
|
-
*
|
|
497
|
-
* @param {boolean} expression Indicazione della visibilità
|
|
498
|
-
*/
|
|
499
|
-
set Visible(expression) {
|
|
500
|
-
this._Visible = expression;
|
|
501
|
-
if (expression)
|
|
502
|
-
this.renderer.removeClass(this.myself.nativeElement, "app-display-none");
|
|
503
|
-
else
|
|
504
|
-
this.renderer.addClass(this.myself.nativeElement, "app-display-none");
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* Restituisce lo stato di Visibilità della colonna in oggetto
|
|
508
|
-
*
|
|
509
|
-
* @returns {boolean} **true** se visibile, **false** altrimenti
|
|
510
|
-
*/
|
|
511
|
-
get Visible() {
|
|
512
|
-
if (this._Visible == undefined)
|
|
513
|
-
this._Visible = true;
|
|
514
|
-
return this._Visible;
|
|
515
|
-
}
|
|
516
|
-
/** @ignore */
|
|
517
|
-
ngAfterViewInit() {
|
|
518
|
-
//Assegnare direttamente il content è più veloce che passare dal native element per qualche motivo
|
|
519
|
-
this.Description = this.Display === null || this.Display === "" ? this.content.nativeElement.innerText : this.Display;
|
|
520
|
-
this.Class = this.myself.nativeElement.className.replace("app-display-none", "");
|
|
521
|
-
//Resize
|
|
522
|
-
if (this.Resizable)
|
|
523
|
-
this.renderer.addClass(this.myself.nativeElement, "app-relative");
|
|
524
|
-
}
|
|
525
|
-
/** Emette l'evento di unpinning */
|
|
526
|
-
unpin() {
|
|
527
|
-
this.onUnpinning.emit(this.ID);
|
|
528
|
-
}
|
|
529
|
-
/** Gestisce la modifica dell'ordinamento qualora venisse cliccato su questa colonna */
|
|
530
|
-
setupNextOrderAndNotify() {
|
|
531
|
-
if (!this.ID) {
|
|
532
|
-
console.log("Attempt to order a column without ID. Operation ignored");
|
|
533
|
-
return;
|
|
534
|
-
}
|
|
535
|
-
if (this.SearchInProgress) {
|
|
536
|
-
console.log("Attempt to order a column during a search. Operation ignored");
|
|
537
|
-
return;
|
|
538
|
-
}
|
|
539
|
-
if (!this.OrderBy || !this.Orderable)
|
|
540
|
-
return;
|
|
541
|
-
var nextOrder = this.orderNext[this.Order || "NONE"];
|
|
542
|
-
this.Order = nextOrder;
|
|
543
|
-
this.onOrderChange.emit(this.Order);
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* Evento di inizio resize della colonna
|
|
547
|
-
*
|
|
548
|
-
* @param {any} ev Evento MouseDown
|
|
549
|
-
*/
|
|
550
|
-
onResizeStart(ev) {
|
|
551
|
-
if (!this.Resizable)
|
|
552
|
-
return;
|
|
553
|
-
this.resizingThis = true;
|
|
554
|
-
this.startOffset = this.myself.nativeElement.offsetWidth - ev.pageX;
|
|
555
|
-
}
|
|
556
|
-
/** Listener per la fine dell'operazione di resize */
|
|
557
|
-
onMouseUp() {
|
|
558
|
-
if (!this.Resizable)
|
|
559
|
-
return;
|
|
560
|
-
this.resizingThis = false;
|
|
561
|
-
}
|
|
562
|
-
/**
|
|
563
|
-
* Listener per gestire il movimento del mouse qualora un'operazione di resize fosse in esecuzione
|
|
564
|
-
*
|
|
565
|
-
* @param {$event} ev Evento MouseMove
|
|
566
|
-
*/
|
|
567
|
-
onMouseMove($event) {
|
|
568
|
-
if (!this.Resizable || !this.resizingThis)
|
|
569
|
-
return;
|
|
570
|
-
//Uso jquery per non dover far partire un intero ciclo di change detection solo per fare un resize del cazzo
|
|
571
|
-
//(anche perché viene lanciato ogni 0.1 secondo quindi not a good idea)
|
|
572
|
-
this.myself.nativeElement.style.width = (this.startOffset + $event.pageX) + "px";
|
|
573
|
-
//Fermo il bubbling per non fare cose strane
|
|
574
|
-
$event.preventDefault();
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
EsTh.decorators = [
|
|
578
|
-
{ type: Component, args: [{
|
|
579
|
-
selector: "[es-th]",
|
|
580
|
-
template: "<span (click)=\"setupNextOrderAndNotify()\" [class.app-no-selection]=\"!!ID && Orderable\" [class.app-pointer]=\"!!ID && Orderable\">\r\n <span #content>\r\n <ng-container *ngIf=\"Template\">\r\n <ng-container *ngTemplateOutlet=\"Template\"></ng-container>\r\n </ng-container>\r\n <ng-content *ngIf=\"!Template\"></ng-content>\r\n </span> \r\n <span class=\"fa\" [class.fa-chevron-down]=\"Order == 'DESC'\" [class.fa-chevron-up]=\"Order == 'ASC'\"></span>\r\n</span>\r\n<span *ngIf=\"Pinned && !Fixed\" class=\"app-pointer fa fa-thumb-tack est-quick-unpin\" (click)=\"unpin()\"></span>\r\n<div [hidden]=\"!Resizable || Fixed || Pinned\" class=\"est-head-resizer\" (mousedown)=\"onResizeStart($event)\">\r\n <div class=\"est-head-resizer-internal\"></div>\r\n</div>",
|
|
581
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
582
|
-
},] }
|
|
583
|
-
];
|
|
584
|
-
EsTh.ctorParameters = () => [
|
|
585
|
-
{ type: ElementRef },
|
|
586
|
-
{ type: Renderer2 }
|
|
587
|
-
];
|
|
588
|
-
EsTh.propDecorators = {
|
|
589
|
-
ID: [{ type: Input, args: ['es-th',] }],
|
|
590
|
-
Order: [{ type: Input }],
|
|
591
|
-
Orderable: [{ type: Input }],
|
|
592
|
-
Display: [{ type: Input }],
|
|
593
|
-
Resizable: [{ type: Input }],
|
|
594
|
-
Pinned: [{ type: Input }],
|
|
595
|
-
SearchInProgress: [{ type: Input }],
|
|
596
|
-
OrderBy: [{ type: Input }],
|
|
597
|
-
Wrap: [{ type: Input }],
|
|
598
|
-
Fixed: [{ type: Input }],
|
|
599
|
-
Template: [{ type: Input }],
|
|
600
|
-
onOrderChange: [{ type: Output }],
|
|
601
|
-
onUnpinning: [{ type: Output }],
|
|
602
|
-
content: [{ type: ViewChild, args: ["content", { static: false },] }],
|
|
603
|
-
Visible: [{ type: Input }],
|
|
604
|
-
onMouseUp: [{ type: HostListener, args: ['window:mouseup.out-zone',] }],
|
|
605
|
-
onMouseMove: [{ type: HostListener, args: ['window:mousemove.out-zone', ['$event'],] }]
|
|
606
|
-
};
|
|
607
|
-
|
|
608
225
|
/** Direttiva per la dichiarazione snella di un EsTd da emettere per ogni elemento, data una colonna */
|
|
609
226
|
class EsTdDirective {
|
|
610
227
|
/**
|
|
@@ -652,6 +269,8 @@ class EsThDirective {
|
|
|
652
269
|
this.th = "";
|
|
653
270
|
/** Indica se la colonna è pinnata o no */
|
|
654
271
|
this.thPinned = false;
|
|
272
|
+
/** Indica se la colonna è pinnabile o no */
|
|
273
|
+
this.thPinnable = true;
|
|
655
274
|
/** Indica le dimensioni che deve avere questa colonna quando viene pinnata, senza questo tutte le colonne mi collasserebbero l'una sull'altra */
|
|
656
275
|
this.thPinnedWidth = 150;
|
|
657
276
|
/** Indicazione sulla visibilità della colonna */
|
|
@@ -685,6 +304,7 @@ EsThDirective.ctorParameters = () => [
|
|
|
685
304
|
EsThDirective.propDecorators = {
|
|
686
305
|
th: [{ type: Input }],
|
|
687
306
|
thPinned: [{ type: Input }],
|
|
307
|
+
thPinnable: [{ type: Input }],
|
|
688
308
|
thPinnedWidth: [{ type: Input }],
|
|
689
309
|
thVisible: [{ type: Input }],
|
|
690
310
|
thFixed: [{ type: Input }],
|
|
@@ -701,13 +321,6 @@ EsThDirective.propDecorators = {
|
|
|
701
321
|
thAggregation: [{ type: Input }]
|
|
702
322
|
};
|
|
703
323
|
|
|
704
|
-
/** Token che indica il locale da utilizzare all'interno del componente. Supportati solo "it-IT" ed "en-US" */
|
|
705
|
-
const EST_LOCALE = new InjectionToken('EST_LOCALE');
|
|
706
|
-
/** Token che indica se emettere log a console o meno */
|
|
707
|
-
const EST_DEBUG = new InjectionToken('EST_DEBUG');
|
|
708
|
-
/** Token che indica i default da assegnare agli Input */
|
|
709
|
-
const EST_DEFAULTS = new InjectionToken('EST_DEFAULTS');
|
|
710
|
-
|
|
711
324
|
/** Classe di localizzazione per il componente **EsTableComponent** */
|
|
712
325
|
class EsTableLoc extends LocalizationService {
|
|
713
326
|
/** @ignore */
|
|
@@ -741,11 +354,155 @@ EsTableLoc.ctorParameters = () => [
|
|
|
741
354
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [EST_LOCALE,] }] }
|
|
742
355
|
];
|
|
743
356
|
|
|
744
|
-
/**
|
|
745
|
-
class
|
|
357
|
+
/** Classe contenente la gestione delle importazioni */
|
|
358
|
+
class ExportHandler {
|
|
359
|
+
/** @ignore Costruttore*/
|
|
360
|
+
constructor(est, expExts, msgExts, utiExts, dateExts) {
|
|
361
|
+
this.est = est;
|
|
362
|
+
this.expExts = expExts;
|
|
363
|
+
this.msgExts = msgExts;
|
|
364
|
+
this.utiExts = utiExts;
|
|
365
|
+
this.dateExts = dateExts;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Effettua l'esportazione dei dati
|
|
369
|
+
*
|
|
370
|
+
* @param {string} format Formato di esportazione. Letto solo in modalità Report della tabella
|
|
371
|
+
*/
|
|
372
|
+
tryExport(format) {
|
|
373
|
+
if (!this.est.ExportFunction)
|
|
374
|
+
return;
|
|
375
|
+
if (this.est.reportMode)
|
|
376
|
+
this.est.ExportFunction(format);
|
|
377
|
+
else
|
|
378
|
+
this.est.ExportFunction((data, cancel = false) => __awaiter(this, void 0, void 0, function* () {
|
|
379
|
+
if (cancel)
|
|
380
|
+
return;
|
|
381
|
+
if (data.length == 0) {
|
|
382
|
+
this.msgExts.simpleWarning(this.est.lc.loc("Cannot export an empty dataset"));
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
this.setupExport(data);
|
|
386
|
+
if (format == "CSV") {
|
|
387
|
+
this.est.cdr.detectChanges();
|
|
388
|
+
setTimeout(() => { this.est.exportDownloader.nativeElement.click(); });
|
|
389
|
+
}
|
|
390
|
+
else if (format == "XLSX") {
|
|
391
|
+
if (this.ExcelJS != null) {
|
|
392
|
+
this.exportExcel();
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
try {
|
|
396
|
+
this.ExcelJS = yield import('exceljs');
|
|
397
|
+
this.exportExcel();
|
|
398
|
+
}
|
|
399
|
+
catch (_a) {
|
|
400
|
+
throw "Impossibile caricare la libreria per l'esportazione in Excel";
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
else
|
|
404
|
+
throw "Formato di esportazione non riconosciuto";
|
|
405
|
+
}));
|
|
406
|
+
}
|
|
407
|
+
/** Effettua l'esportazione del file Excel basandosi sul modulo **ExcelJS**, sugli header **this.est.headers** e sui dati **this.est.data** */
|
|
408
|
+
exportExcel() {
|
|
409
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
410
|
+
let iFix = 1;
|
|
411
|
+
let workbook = new this.ExcelJS.Workbook();
|
|
412
|
+
workbook.creator = "Ema's big Es-Table";
|
|
413
|
+
workbook.created = new Date();
|
|
414
|
+
let sheet = workbook.addWorksheet('Data');
|
|
415
|
+
let header = sheet.getRow(1);
|
|
416
|
+
header.font = { bold: true };
|
|
417
|
+
this.est.headers = this.est.headers.sort((a, b) => a.order - b.order);
|
|
418
|
+
for (let i = 0; i < this.est.headers.length; i++) {
|
|
419
|
+
let h = this.est.headers[i];
|
|
420
|
+
header.getCell(i + iFix).value = h.label;
|
|
421
|
+
}
|
|
422
|
+
for (let i = 0; i < this.est.data.length; i++) {
|
|
423
|
+
let row = sheet.getRow(i + iFix + 1);
|
|
424
|
+
let item = this.est.data[i];
|
|
425
|
+
for (let i = 0; i < this.est.headers.length; i++) {
|
|
426
|
+
let h = this.est.headers[i];
|
|
427
|
+
let cell = row.getCell(i + 1);
|
|
428
|
+
let val = item[h.key];
|
|
429
|
+
if (val == null || val == undefined)
|
|
430
|
+
cell.value = "";
|
|
431
|
+
else {
|
|
432
|
+
switch (h.type) {
|
|
433
|
+
case 'date':
|
|
434
|
+
cell.value = this.dateExts.getDateConvertion(val).toDate();
|
|
435
|
+
case 'number':
|
|
436
|
+
cell.value = parseFloat(val.replace(',', '.'));
|
|
437
|
+
default:
|
|
438
|
+
cell.value = val;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
let buffer = yield workbook.xlsx.writeBuffer();
|
|
444
|
+
let blob = new Blob([buffer], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;" });
|
|
445
|
+
let objectUrl = window.URL.createObjectURL(blob);
|
|
446
|
+
let fn = this.est.ExportFileName;
|
|
447
|
+
this.utiExts.fileDownload(objectUrl, fn.endsWith('.csv') ? fn.replace('.csv', '.xlsx') : fn.endsWith('.xlsx') ? fn : fn + ".xlsx");
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Metodo che effettivamente genera gli header e i dati per l'esportazione con **ngx-csv**
|
|
452
|
+
*
|
|
453
|
+
* @param {any[]} items Oggetti da esportare
|
|
454
|
+
*/
|
|
455
|
+
setupExport(items) {
|
|
456
|
+
let drcd = this.est.DynamicRowColumnsDefinition;
|
|
457
|
+
this.est.headers = drcd && drcd.length > 0 ? this.expExts.setupForGenericExport(items, drcd.map(t => { return { label: t.description, key: t.propertyName, order: t.columnOrder, type: 'string' }; })) : this.expExts.setupForExport(items);
|
|
458
|
+
this.est.data = items;
|
|
459
|
+
}
|
|
746
460
|
}
|
|
747
461
|
|
|
748
|
-
|
|
462
|
+
/**
|
|
463
|
+
* Classe che identifica un ordinamento di una colonna
|
|
464
|
+
*/
|
|
465
|
+
class AppOrdering {
|
|
466
|
+
/**
|
|
467
|
+
* Costruttore
|
|
468
|
+
*
|
|
469
|
+
* @param {string} id ID della colonna a cui si vogliono applicare ordinamenti, deve combaciare all'id messo nella dichiarazione dell'ES-TD/TH
|
|
470
|
+
* @param {'DESC' | 'ASC' } order Ordinamento da applicare alla colonna, Discendente/Ascendente, default 'null' per indicare assenza di ordine
|
|
471
|
+
*/
|
|
472
|
+
constructor(id, order) {
|
|
473
|
+
this.id = id;
|
|
474
|
+
this.order = order;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/** Definizione di una colonna, utilizzato nella dialog che permette di modificare le posizioni e le visibilità */
|
|
479
|
+
class EsTableColumn {
|
|
480
|
+
/**
|
|
481
|
+
* Costruttore
|
|
482
|
+
*
|
|
483
|
+
* @param {string} id Id colonna
|
|
484
|
+
* @param {string} description Descrizione (Header)
|
|
485
|
+
* @param {boolean} visible Indica se di default mostrarla o meno
|
|
486
|
+
* @param {boolean} fixed Indica se è una colonna fixed
|
|
487
|
+
* @param {boolean} pinned Indica se è una colonna pinnata
|
|
488
|
+
* @param {number} pinnedWidth Indica la dimensione da assegnare a questa colonna quando è pinnata
|
|
489
|
+
* @param {TemplateRef<any>} template Indica il template da usare per mostrare il testo dell'Header
|
|
490
|
+
* @param {TemplateRef<any>[]} parentTemplates Indica la lista di template padri collegata a questo header
|
|
491
|
+
*/
|
|
492
|
+
constructor(id, description, visible, fixed, pinned, pinnable, pinnedWidth, template, parentTemplates) {
|
|
493
|
+
this.id = id;
|
|
494
|
+
this.description = description;
|
|
495
|
+
this.visible = visible;
|
|
496
|
+
this.fixed = fixed;
|
|
497
|
+
this.pinned = pinned;
|
|
498
|
+
this.pinnable = pinnable;
|
|
499
|
+
this.pinnedWidth = pinnedWidth;
|
|
500
|
+
this.template = template;
|
|
501
|
+
this.parentTemplates = parentTemplates;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
// Angular
|
|
749
506
|
/** Classe che gestisce tutte le informaizoni relative alle colonne: visibilità, posizione, stato di pin/unpin, ecc ecc... */
|
|
750
507
|
class ColumnMetadataHandler {
|
|
751
508
|
/** @ignore Costruttore*/
|
|
@@ -810,7 +567,7 @@ class ColumnMetadataHandler {
|
|
|
810
567
|
*
|
|
811
568
|
* Costo: 1 scan EsThs
|
|
812
569
|
*
|
|
813
|
-
* @param {
|
|
570
|
+
* @param {EsThDirective[]} ths Colonne della tabella
|
|
814
571
|
*/
|
|
815
572
|
reviewColumnsList(ths) {
|
|
816
573
|
this.est.TMPColumnsList = [];
|
|
@@ -819,30 +576,18 @@ class ColumnMetadataHandler {
|
|
|
819
576
|
// Appena il contentChildren è valorizzato scorro tutti gli header
|
|
820
577
|
for (let i = 0; i < ths.length; i++) {
|
|
821
578
|
let th = ths[i];
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
// Se non ho un id il th è considerato inerte
|
|
835
|
-
if (!column)
|
|
836
|
-
continue;
|
|
837
|
-
// Salvo le informazioni dell'header per far parte della lista da cui scegliere quali colonne visualizzare/nascondere
|
|
838
|
-
// Di default la visibilità è quella impostata nel componente
|
|
839
|
-
if ((this.est.HiddenColumns || th.thVisible) && th.thIf) {
|
|
840
|
-
let previouslyPinned = !this.est.ColumnsList || this.est.ColumnsList.length == 0 ? null : this.est.ColumnsList.find(t => t.id == column) || null;
|
|
841
|
-
let toAdd = new EsTableColumn(column, null, th.thVisible, (th.thFixed || th.thGroup), previouslyPinned == null ? th.thPinned : previouslyPinned.pinned, th.thPinnedWidth, th.Template, th._thParents);
|
|
842
|
-
if (previouslyPinned)
|
|
843
|
-
toAdd.prev_index = previouslyPinned.prev_index;
|
|
844
|
-
this.est.TMPColumnsList.push(toAdd);
|
|
845
|
-
}
|
|
579
|
+
let column = th.th;
|
|
580
|
+
// Se non ho un id il th è considerato inerte
|
|
581
|
+
if (!column)
|
|
582
|
+
continue;
|
|
583
|
+
// Salvo le informazioni dell'header per far parte della lista da cui scegliere quali colonne visualizzare/nascondere
|
|
584
|
+
// Di default la visibilità è quella impostata nel componente
|
|
585
|
+
if ((this.est.HiddenColumns || th.thVisible) && th.thIf) {
|
|
586
|
+
let previouslyPinned = !this.est.ColumnsList || this.est.ColumnsList.length == 0 ? null : this.est.ColumnsList.find(t => t.id == column) || null;
|
|
587
|
+
let toAdd = new EsTableColumn(column, null, th.thVisible, (th.thFixed || th.thGroup), previouslyPinned == null ? th.thPinned : previouslyPinned.pinned, th.thPinnable, th.thPinnedWidth, th.Template, th._thParents);
|
|
588
|
+
if (previouslyPinned)
|
|
589
|
+
toAdd.prev_index = previouslyPinned.prev_index;
|
|
590
|
+
this.est.TMPColumnsList.push(toAdd);
|
|
846
591
|
}
|
|
847
592
|
}
|
|
848
593
|
this.est.ColumnsList = [];
|
|
@@ -877,33 +622,21 @@ class ColumnMetadataHandler {
|
|
|
877
622
|
// Sposto tutti gli header fixed o pinned all'inizio
|
|
878
623
|
for (let i = 0; i < ths.length; i++) {
|
|
879
624
|
let th = ths[i];
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
625
|
+
thsCache[th.th] = th;
|
|
626
|
+
// Riassegno sempre per ripulire valori di partenza o per aggiornarli in caso di modifiche utente
|
|
627
|
+
th.thPinned = (!columnsCache[th.th] && th.thPinned) || (columnsCache[th.th] && columnsCache[th.th].pinned);
|
|
628
|
+
if (th.thPinned) {
|
|
629
|
+
if (i != pinneds)
|
|
630
|
+
this.utilities.arrayMove(ths, i, pinneds);
|
|
631
|
+
pinneds++;
|
|
887
632
|
}
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
if (i != pinneds)
|
|
894
|
-
this.utilities.arrayMove(ths, i, pinneds);
|
|
895
|
-
pinneds++;
|
|
896
|
-
}
|
|
897
|
-
//In questo caso sono informazioni statiche invece, non modificabili dall'utente, quindi non mi dò preoccupazioni
|
|
898
|
-
if ((th.thFixed || th.thGroup) && !th.thPinned) {
|
|
899
|
-
if (i != pinneds + fixeds)
|
|
900
|
-
this.utilities.arrayMove(ths, i, pinneds + fixeds);
|
|
901
|
-
fixeds++;
|
|
902
|
-
}
|
|
633
|
+
//In questo caso sono informazioni statiche invece, non modificabili dall'utente, quindi non mi dò preoccupazioni
|
|
634
|
+
if ((th.thFixed || th.thGroup) && !th.thPinned) {
|
|
635
|
+
if (i != pinneds + fixeds)
|
|
636
|
+
this.utilities.arrayMove(ths, i, pinneds + fixeds);
|
|
637
|
+
fixeds++;
|
|
903
638
|
}
|
|
904
639
|
}
|
|
905
|
-
if (this.utilities.isEsTh(ths[0]) || this.utilities.isEsTd(tds[0]))
|
|
906
|
-
return;
|
|
907
640
|
// Cache degli indici per riposizionare i td come i th
|
|
908
641
|
for (let i = 0; i < ths.length; i++)
|
|
909
642
|
columnsIndexCache[ths[i].th] = i;
|
|
@@ -989,8 +722,8 @@ class ColumnMetadataHandler {
|
|
|
989
722
|
*
|
|
990
723
|
* Costo: 1 scan ColumnsList, 1 scan EsThs, 1 scan EsTds
|
|
991
724
|
*
|
|
992
|
-
* @param {
|
|
993
|
-
* @param {
|
|
725
|
+
* @param {EsThDirective[]} ths Header della tabella
|
|
726
|
+
* @param {EsTdDirective[]} tds Celle della tabella
|
|
994
727
|
* @param {AppSearch<any>} view AppSearch da utilizzare per questa operazione
|
|
995
728
|
*/
|
|
996
729
|
refreshColumnsVisibility(ths, tds, view) {
|
|
@@ -1012,26 +745,16 @@ class ColumnMetadataHandler {
|
|
|
1012
745
|
// Definisco se la colonna è visibile in base alla sua rappresentazione locale in ColumnsList
|
|
1013
746
|
for (let i = 0; i < ths.length; i++) {
|
|
1014
747
|
let th = ths[i];
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
fixedThs[th.ID] = true;
|
|
1019
|
-
}
|
|
1020
|
-
else {
|
|
1021
|
-
th.thVisible = th.thFixed || (columnsCache[th.th] ? columnsCache[th.th].visible : th.thVisible);
|
|
1022
|
-
if (th.thFixed || th.thGroup)
|
|
1023
|
-
fixedThs[th.th] = true;
|
|
1024
|
-
}
|
|
748
|
+
th.thVisible = th.thFixed || (columnsCache[th.th] ? columnsCache[th.th].visible : th.thVisible);
|
|
749
|
+
if (th.thFixed || th.thGroup)
|
|
750
|
+
fixedThs[th.th] = true;
|
|
1025
751
|
}
|
|
1026
752
|
}
|
|
1027
753
|
if (tds) {
|
|
1028
754
|
// Definisco se la cella è visibile in base alla sua rappresentazione locale in ColumnsList
|
|
1029
755
|
for (let i = 0; i < tds.length; i++) {
|
|
1030
756
|
let td = tds[i];
|
|
1031
|
-
|
|
1032
|
-
td.Visible = fixedThs[td.ID] || (columnsCache[td.ID] ? columnsCache[td.ID].visible : td.Visible);
|
|
1033
|
-
else
|
|
1034
|
-
td.tdVisible = fixedThs[td.td] || (columnsCache[td.td] ? columnsCache[td.td].visible : td.tdVisible);
|
|
757
|
+
td.tdVisible = fixedThs[td.td] || (columnsCache[td.td] ? columnsCache[td.td].visible : td.tdVisible);
|
|
1035
758
|
}
|
|
1036
759
|
}
|
|
1037
760
|
this.est.changed();
|
|
@@ -1040,38 +763,26 @@ class ColumnMetadataHandler {
|
|
|
1040
763
|
* Allinea gli ordinamenti dati fra le **EsThs** e le informazioni all'interno della View bindata
|
|
1041
764
|
*
|
|
1042
765
|
* @param {AppSearch<any>} view AppSearch da utilizzare per questa operazione
|
|
1043
|
-
* @param {
|
|
766
|
+
* @param {EsThDirective[]} ths Colonne della tabella
|
|
1044
767
|
*/
|
|
1045
768
|
alignHeadersOrdering(ths, view) {
|
|
1046
769
|
let orders = view ? view.orders : this.est.arrayOrders;
|
|
1047
770
|
for (let i = 0; i < ths.length; i++) {
|
|
1048
771
|
let th = ths[i];
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
let or = orders[i];
|
|
1055
|
-
if (or.id == th.ID)
|
|
1056
|
-
th.Order = or.order;
|
|
1057
|
-
}
|
|
1058
|
-
}
|
|
1059
|
-
else {
|
|
1060
|
-
th.thOrder = null;
|
|
1061
|
-
for (let i = 0; i < orders.length; i++) {
|
|
1062
|
-
let or = orders[i];
|
|
1063
|
-
if (or.id == th.th)
|
|
1064
|
-
th.thOrder = or.order;
|
|
1065
|
-
}
|
|
772
|
+
th.thOrder = null;
|
|
773
|
+
for (let i = 0; i < orders.length; i++) {
|
|
774
|
+
let or = orders[i];
|
|
775
|
+
if (or.id == th.th)
|
|
776
|
+
th.thOrder = or.order;
|
|
1066
777
|
}
|
|
1067
778
|
}
|
|
1068
779
|
}
|
|
1069
780
|
/**
|
|
1070
781
|
* Genera tutte le informazioni che servono per gestire il raggruppamento degli header
|
|
1071
782
|
*
|
|
1072
|
-
* @param {
|
|
783
|
+
* @param {EsThDirective[]} ths Colonne della tabella
|
|
1073
784
|
*
|
|
1074
|
-
* @returns {{ leafs:
|
|
785
|
+
* @returns {{ leafs: EsThDirective[], groupingLevel: number, parentsCache: any, thsCache: any }} Oggetto contenente la lista delle foglie (header base), il livello
|
|
1075
786
|
* massimo di raggruppamento raggiunto, una cache in cui vengono indicati tutti i gruppi che sono "parent" (quindi che raggruppano almeno 1 header) e la cache degli header
|
|
1076
787
|
*/
|
|
1077
788
|
evaluateHeadersGroupingInfos(ths) {
|
|
@@ -1080,8 +791,6 @@ class ColumnMetadataHandler {
|
|
|
1080
791
|
let thsCache = {};
|
|
1081
792
|
for (let i = 0; i < ths.length; i++) {
|
|
1082
793
|
let th = ths[i];
|
|
1083
|
-
if (this.utilities.isEsTh(th))
|
|
1084
|
-
continue;
|
|
1085
794
|
thsCache[th.th] = th;
|
|
1086
795
|
if (th.thParent && !parentsCache[th.thParent])
|
|
1087
796
|
parentsCache[th.thParent] = true;
|
|
@@ -1091,10 +800,6 @@ class ColumnMetadataHandler {
|
|
|
1091
800
|
let leafs = [];
|
|
1092
801
|
for (let i = 0; i < ths.length; i++) {
|
|
1093
802
|
let th = ths[i];
|
|
1094
|
-
if (this.utilities.isEsTh(th)) {
|
|
1095
|
-
leafs.push(th);
|
|
1096
|
-
continue;
|
|
1097
|
-
}
|
|
1098
803
|
// Se sono una foglia vedo quanti livelli ci sono sopra
|
|
1099
804
|
if (!parentsCache[th.th]) {
|
|
1100
805
|
leafs.push(th);
|
|
@@ -1107,7 +812,7 @@ class ColumnMetadataHandler {
|
|
|
1107
812
|
/**
|
|
1108
813
|
* Genera gli header groups da una lista di info sui th all'interno della variabile **TMPRowThGroups**
|
|
1109
814
|
*
|
|
1110
|
-
* @param {{ leafs:
|
|
815
|
+
* @param {{ leafs: EsThDirective[], groupingLevel: number, parentsCache: any, thsCache: any }} infos Informazioni di raggruppamento valutate precedentemente
|
|
1111
816
|
*/
|
|
1112
817
|
evaluateHeaderGroups(infos) {
|
|
1113
818
|
if (infos.groupingLevel == 0)
|
|
@@ -1214,7 +919,7 @@ class ColumnMetadataHandler {
|
|
|
1214
919
|
if (!orderings || orderings.length == 0) {
|
|
1215
920
|
for (let i = 0; i < ths.length; i++) {
|
|
1216
921
|
let th = ths[i];
|
|
1217
|
-
let order =
|
|
922
|
+
let order = th.th;
|
|
1218
923
|
this.est.OrderDirectives.push(order);
|
|
1219
924
|
}
|
|
1220
925
|
}
|
|
@@ -1222,7 +927,7 @@ class ColumnMetadataHandler {
|
|
|
1222
927
|
this.est.OrderDirectives = orderings;
|
|
1223
928
|
for (let i = 0; i < ths.length; i++) {
|
|
1224
929
|
let th = ths[i];
|
|
1225
|
-
let thId =
|
|
930
|
+
let thId = th.th;
|
|
1226
931
|
if (!this.est.OrderDirectives.find(o => o == thId))
|
|
1227
932
|
this.est.OrderDirectives.push(thId);
|
|
1228
933
|
}
|
|
@@ -1462,7 +1167,37 @@ class ColumnMetadataHandler {
|
|
|
1462
1167
|
}
|
|
1463
1168
|
}
|
|
1464
1169
|
|
|
1465
|
-
|
|
1170
|
+
/** Classe che identifica una colonna. Utilizzata in modalità "Colonne dinamiche" */
|
|
1171
|
+
class EsTableColumnsDefinition {
|
|
1172
|
+
/**
|
|
1173
|
+
* Costruttore
|
|
1174
|
+
*
|
|
1175
|
+
* @param {string} description Descrizione della colonna
|
|
1176
|
+
* @param {string} propertyName Nome della proprietà del modello in cui sono contenuti i dati da visualizzare per questa colonna
|
|
1177
|
+
* @param {string} routePath Route di navigazione. Es. "['/pages/mod/mod_detail', { 'idItem': '{0}', 'idItem2' : '{1}' }]"
|
|
1178
|
+
* @param {string[]} routeParameterProperties Proprietà da bindare a **routePath** per generare la route completa.
|
|
1179
|
+
* L'indice scritto in **routePath** è l'indice di accesso a questo array. Es. ["iditem", "iditem2"]
|
|
1180
|
+
* @param {'ASC' | 'DESC' } dataOrder Ordinamento dei dati presentati in questa colonna
|
|
1181
|
+
* @param {number} columnOrder Ordinamento di questa colonna
|
|
1182
|
+
* @param {boolean} visible Visibilità o meno della colonna
|
|
1183
|
+
* @param {string} clss Classe da applicare sia ai TD che ai TH relativi a questa colonna
|
|
1184
|
+
* @param {boolean} orderable Indica se la colonna è ordinabile o no (nel senso ASC / DESC / NONE)
|
|
1185
|
+
* @param {boolean} headerWraps Indica se il testo dell'header dev'essere wrappato all'interno del th. Di default no.
|
|
1186
|
+
*/
|
|
1187
|
+
constructor(description, propertyName, routePath = null, routeParameterProperties = null, dataOrder = null, columnOrder = null, visible = true, clss = null, orderable = true, headerWraps = false) {
|
|
1188
|
+
this.description = description;
|
|
1189
|
+
this.propertyName = propertyName;
|
|
1190
|
+
this.routePath = routePath;
|
|
1191
|
+
this.routeParameterProperties = routeParameterProperties;
|
|
1192
|
+
this.dataOrder = dataOrder;
|
|
1193
|
+
this.columnOrder = columnOrder;
|
|
1194
|
+
this.visible = visible;
|
|
1195
|
+
this.clss = clss;
|
|
1196
|
+
this.orderable = orderable;
|
|
1197
|
+
this.headerWraps = headerWraps;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1466
1201
|
/** Classe contenente le gestioni particolari della modalità dinamica dell'es-table */
|
|
1467
1202
|
class DynamicModeHandler {
|
|
1468
1203
|
/** @ignore Costruttore*/
|
|
@@ -1525,111 +1260,6 @@ class DynamicModeHandler {
|
|
|
1525
1260
|
}
|
|
1526
1261
|
}
|
|
1527
1262
|
|
|
1528
|
-
/** Classe contenente la gestione delle importazioni */
|
|
1529
|
-
class ExportHandler {
|
|
1530
|
-
/** @ignore Costruttore*/
|
|
1531
|
-
constructor(est, expExts, msgExts, utiExts, dateExts) {
|
|
1532
|
-
this.est = est;
|
|
1533
|
-
this.expExts = expExts;
|
|
1534
|
-
this.msgExts = msgExts;
|
|
1535
|
-
this.utiExts = utiExts;
|
|
1536
|
-
this.dateExts = dateExts;
|
|
1537
|
-
}
|
|
1538
|
-
/**
|
|
1539
|
-
* Effettua l'esportazione dei dati
|
|
1540
|
-
*
|
|
1541
|
-
* @param {string} format Formato di esportazione. Letto solo in modalità Report della tabella
|
|
1542
|
-
*/
|
|
1543
|
-
tryExport(format) {
|
|
1544
|
-
if (!this.est.ExportFunction)
|
|
1545
|
-
return;
|
|
1546
|
-
if (this.est.reportMode)
|
|
1547
|
-
this.est.ExportFunction(format);
|
|
1548
|
-
else
|
|
1549
|
-
this.est.ExportFunction((data, cancel = false) => __awaiter(this, void 0, void 0, function* () {
|
|
1550
|
-
if (cancel)
|
|
1551
|
-
return;
|
|
1552
|
-
if (data.length == 0) {
|
|
1553
|
-
this.msgExts.simpleWarning(this.est.lc.loc("Cannot export an empty dataset"));
|
|
1554
|
-
return;
|
|
1555
|
-
}
|
|
1556
|
-
this.setupExport(data);
|
|
1557
|
-
if (format == "CSV") {
|
|
1558
|
-
this.est.cdr.detectChanges();
|
|
1559
|
-
setTimeout(() => { this.est.exportDownloader.nativeElement.click(); });
|
|
1560
|
-
}
|
|
1561
|
-
else if (format == "XLSX") {
|
|
1562
|
-
if (this.ExcelJS != null) {
|
|
1563
|
-
this.exportExcel();
|
|
1564
|
-
return;
|
|
1565
|
-
}
|
|
1566
|
-
try {
|
|
1567
|
-
this.ExcelJS = yield import('exceljs');
|
|
1568
|
-
this.exportExcel();
|
|
1569
|
-
}
|
|
1570
|
-
catch (_a) {
|
|
1571
|
-
throw "Impossibile caricare la libreria per l'esportazione in Excel";
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
else
|
|
1575
|
-
throw "Formato di esportazione non riconosciuto";
|
|
1576
|
-
}));
|
|
1577
|
-
}
|
|
1578
|
-
/** Effettua l'esportazione del file Excel basandosi sul modulo **ExcelJS**, sugli header **this.est.headers** e sui dati **this.est.data** */
|
|
1579
|
-
exportExcel() {
|
|
1580
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1581
|
-
let iFix = 1;
|
|
1582
|
-
let workbook = new this.ExcelJS.Workbook();
|
|
1583
|
-
workbook.creator = "Ema's big Es-Table";
|
|
1584
|
-
workbook.created = new Date();
|
|
1585
|
-
let sheet = workbook.addWorksheet('Data');
|
|
1586
|
-
let header = sheet.getRow(1);
|
|
1587
|
-
header.font = { bold: true };
|
|
1588
|
-
this.est.headers = this.est.headers.sort((a, b) => a.order - b.order);
|
|
1589
|
-
for (let i = 0; i < this.est.headers.length; i++) {
|
|
1590
|
-
let h = this.est.headers[i];
|
|
1591
|
-
header.getCell(i + iFix).value = h.label;
|
|
1592
|
-
}
|
|
1593
|
-
for (let i = 0; i < this.est.data.length; i++) {
|
|
1594
|
-
let row = sheet.getRow(i + iFix + 1);
|
|
1595
|
-
let item = this.est.data[i];
|
|
1596
|
-
for (let i = 0; i < this.est.headers.length; i++) {
|
|
1597
|
-
let h = this.est.headers[i];
|
|
1598
|
-
let cell = row.getCell(i + 1);
|
|
1599
|
-
let val = item[h.key];
|
|
1600
|
-
if (val == null || val == undefined)
|
|
1601
|
-
cell.value = "";
|
|
1602
|
-
else {
|
|
1603
|
-
switch (h.type) {
|
|
1604
|
-
case 'date':
|
|
1605
|
-
cell.value = this.dateExts.getDateConvertion(val).toDate();
|
|
1606
|
-
case 'number':
|
|
1607
|
-
cell.value = parseFloat(val.replace(',', '.'));
|
|
1608
|
-
default:
|
|
1609
|
-
cell.value = val;
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
let buffer = yield workbook.xlsx.writeBuffer();
|
|
1615
|
-
let blob = new Blob([buffer], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;" });
|
|
1616
|
-
let objectUrl = window.URL.createObjectURL(blob);
|
|
1617
|
-
let fn = this.est.ExportFileName;
|
|
1618
|
-
this.utiExts.fileDownload(objectUrl, fn.endsWith('.csv') ? fn.replace('.csv', '.xlsx') : fn.endsWith('.xlsx') ? fn : fn + ".xlsx");
|
|
1619
|
-
});
|
|
1620
|
-
}
|
|
1621
|
-
/**
|
|
1622
|
-
* Metodo che effettivamente genera gli header e i dati per l'esportazione con **ngx-csv**
|
|
1623
|
-
*
|
|
1624
|
-
* @param {any[]} items Oggetti da esportare
|
|
1625
|
-
*/
|
|
1626
|
-
setupExport(items) {
|
|
1627
|
-
let drcd = this.est.DynamicRowColumnsDefinition;
|
|
1628
|
-
this.est.headers = drcd && drcd.length > 0 ? this.expExts.setupForGenericExport(items, drcd.map(t => { return { label: t.description, key: t.propertyName, order: t.columnOrder, type: 'string' }; })) : this.expExts.setupForExport(items);
|
|
1629
|
-
this.est.data = items;
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
1263
|
/** Classe contenente la gestione della modalità gerarchica */
|
|
1634
1264
|
class HierarchyModeHandler {
|
|
1635
1265
|
/** @ignore Costruttore*/
|
|
@@ -1870,24 +1500,6 @@ class ItemsHandler {
|
|
|
1870
1500
|
}
|
|
1871
1501
|
return tmpItems;
|
|
1872
1502
|
}
|
|
1873
|
-
/**
|
|
1874
|
-
* Metodo che prende tutti gli oggetti di cui dispone divisi in bucket da 100 elementi
|
|
1875
|
-
*
|
|
1876
|
-
* @returns {any[][]} Matrice di array Nx100
|
|
1877
|
-
*/
|
|
1878
|
-
getItemSlices() {
|
|
1879
|
-
// Se sono qui di sicuro non ho rowgrouping
|
|
1880
|
-
let items = this.getItemsByMode();
|
|
1881
|
-
if (!items)
|
|
1882
|
-
return [];
|
|
1883
|
-
let arrayBy100 = [];
|
|
1884
|
-
let slices = Math.ceil(items.length / this.est.SliceSize);
|
|
1885
|
-
for (let i = 0; i < slices; i++) {
|
|
1886
|
-
let arraySlice = items.slice(i * this.est.SliceSize, i * this.est.SliceSize + this.est.SliceSize);
|
|
1887
|
-
arrayBy100.push(arraySlice);
|
|
1888
|
-
}
|
|
1889
|
-
return arrayBy100;
|
|
1890
|
-
}
|
|
1891
1503
|
/** Se in modalità array applica gli ordinamenti ASC-DESC delle colonne */
|
|
1892
1504
|
arrayModeReviewOrderings() {
|
|
1893
1505
|
if (this.est.arrayOrders.length > 0)
|
|
@@ -1895,7 +1507,10 @@ class ItemsHandler {
|
|
|
1895
1507
|
}
|
|
1896
1508
|
}
|
|
1897
1509
|
|
|
1898
|
-
|
|
1510
|
+
/** Classe che identifica una direttiva di ordinamento per un report */
|
|
1511
|
+
class ReportOrder {
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1899
1514
|
/** Classe che gestisce la modalità Report dell'es-table utilizzata nel Metering */
|
|
1900
1515
|
class ReportModeHandler {
|
|
1901
1516
|
/** @ignore Costruttore */
|
|
@@ -1904,67 +1519,154 @@ class ReportModeHandler {
|
|
|
1904
1519
|
this.utilities = utilities;
|
|
1905
1520
|
}
|
|
1906
1521
|
/**
|
|
1907
|
-
* Sul click dell'Header di una colonna questo metodo si occupa di applicare l'ordinamento successivo e di notificare con **emitSearchRequest**
|
|
1908
|
-
* il bisogno di aggiornare i dati da parte del componente che utilizza la tabella
|
|
1909
|
-
*
|
|
1910
|
-
* Utilizzato solo in modalità REport
|
|
1522
|
+
* Sul click dell'Header di una colonna questo metodo si occupa di applicare l'ordinamento successivo e di notificare con **emitSearchRequest**
|
|
1523
|
+
* il bisogno di aggiornare i dati da parte del componente che utilizza la tabella
|
|
1524
|
+
*
|
|
1525
|
+
* Utilizzato solo in modalità REport
|
|
1526
|
+
*
|
|
1527
|
+
* @param {ReportColumn} clm Colonna del report per cui ordinare
|
|
1528
|
+
*/
|
|
1529
|
+
setupNextOrderAndSearch(clm) {
|
|
1530
|
+
if (!(this.est.View instanceof ReportDefinition)) {
|
|
1531
|
+
console.error('View diversa da reportdefinition entrata nel metodo setupNextOrderAndSearch');
|
|
1532
|
+
return;
|
|
1533
|
+
}
|
|
1534
|
+
let orderNext = { NONE: 'DESC', DESC: 'ASC', ASC: null };
|
|
1535
|
+
let nextOrder = orderNext[clm.order || 'NONE'];
|
|
1536
|
+
clm.order = nextOrder;
|
|
1537
|
+
let order;
|
|
1538
|
+
let clmOrder = this.est.View.orders ? this.est.View.orders.filter(t => t.column == clm.id) : [];
|
|
1539
|
+
if (clmOrder.length == 0 && clm.order) {
|
|
1540
|
+
order = new ReportOrder();
|
|
1541
|
+
order.column = clm.id;
|
|
1542
|
+
order.order = clm.order;
|
|
1543
|
+
if (!this.est.View.orders)
|
|
1544
|
+
this.est.View.orders = [];
|
|
1545
|
+
this.est.View.orders.push(order);
|
|
1546
|
+
}
|
|
1547
|
+
else if (clmOrder.length == 1) {
|
|
1548
|
+
// Rimuovo l'ordinamento o aggiorno quello già esistente
|
|
1549
|
+
if (!clm.order)
|
|
1550
|
+
clmOrder = [];
|
|
1551
|
+
else
|
|
1552
|
+
clmOrder[0].order = clm.order;
|
|
1553
|
+
}
|
|
1554
|
+
else
|
|
1555
|
+
console.warn('Impossibile settare ordinamento. Colonna ' + clm.id + ' direttive di ordinamento ' + clmOrder.length + ' ordinamento scelto ' + clm.order);
|
|
1556
|
+
// Dopo aver aggiornato l'ordinamento rilancio la ricerca
|
|
1557
|
+
this.est.emitSearchRequest(false);
|
|
1558
|
+
}
|
|
1559
|
+
/** Metodo che si occupa di gestire la grafica della tabella in base alle informazioni di ordinamento colonne e paginazione contenuti nel modello */
|
|
1560
|
+
reviewReportBindings() {
|
|
1561
|
+
if (!(this.est.View instanceof ReportDefinition)) {
|
|
1562
|
+
console.error('View diversa da reportdefinition entrata nel metodo reviewReportBindings');
|
|
1563
|
+
return;
|
|
1564
|
+
}
|
|
1565
|
+
// Allineo le informazioni su eventuali ordinamenti fatti precedentemente
|
|
1566
|
+
if (this.est.View.orders && this.est.View.orders.length > 0) {
|
|
1567
|
+
this.est.View.orders.forEach(t => {
|
|
1568
|
+
this.est.ReportValues.columns.filter(c => c.id == t.column)[0].order = t.order;
|
|
1569
|
+
});
|
|
1570
|
+
}
|
|
1571
|
+
// Recupero il count precedente se serve
|
|
1572
|
+
if (this.est.ReportValues.count != -2)
|
|
1573
|
+
this.est.previousCount = this.est.ReportValues.count;
|
|
1574
|
+
else if (this.est.ReportValues.count == -2)
|
|
1575
|
+
this.est.ReportValues.count = this.est.previousCount;
|
|
1576
|
+
let ipp = (this.est.View.itemsperpageoverride || 15);
|
|
1577
|
+
this.est.View.pages = Math.ceil(this.est.ReportValues.count / ipp);
|
|
1578
|
+
this.est.arrayPulsanti = this.utilities.getPagesArray(6, this.est.View.page, this.est.View.pages);
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
/** Classe che rappresenta un Gruppo con le proprie aggregazioni */
|
|
1583
|
+
class Group {
|
|
1584
|
+
/**
|
|
1585
|
+
* Costruttore
|
|
1586
|
+
*
|
|
1587
|
+
* @param {string} column ID della colonna raggruppata
|
|
1588
|
+
* @param {number} count Numero di elementi raggruppati sotto questa colonna
|
|
1589
|
+
* @param {string} value Valore del Gruppo
|
|
1590
|
+
*/
|
|
1591
|
+
constructor(column, count, value) {
|
|
1592
|
+
this.column = column;
|
|
1593
|
+
this.count = count;
|
|
1594
|
+
this.value = value;
|
|
1595
|
+
this.aggregations = [];
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
/** Classe che rappresenta un'aggregazione */
|
|
1600
|
+
class GroupAggregation {
|
|
1601
|
+
/**
|
|
1602
|
+
* Costruttore
|
|
1603
|
+
*
|
|
1604
|
+
* @param {string} column ID della colonna aggregata
|
|
1605
|
+
* @param {'min' | 'max' | 'sum' } aggregation Aggregazione da effettuare su questa colonna
|
|
1606
|
+
* @param {string} value Valore dell'aggregazione
|
|
1607
|
+
*/
|
|
1608
|
+
constructor(column, aggregation, value) {
|
|
1609
|
+
this.column = column;
|
|
1610
|
+
this.aggregation = aggregation;
|
|
1611
|
+
this.value = value;
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
/** Classe che rappresenta o un gruppo o una aggregazione su una colonna. Usata solo internamente */
|
|
1616
|
+
class GroupOrAggregation {
|
|
1617
|
+
/**
|
|
1618
|
+
* Costruttore
|
|
1619
|
+
*
|
|
1620
|
+
* @param {string} column Colonna su cui è presente o un gruppo o un'aggregazione
|
|
1621
|
+
* @param {'min' | 'max' | 'sum' } aggregation Aggregazione presente sulla **column**. Se questo campo è nullo significa che è un gruppo.
|
|
1622
|
+
* @param {'string' | 'date' | 'number'} datatype Tipo di dati contenuto nella colonna **column** se non c'è alcuna aggregazione è inutile, pertanto non sarà valorizzato
|
|
1623
|
+
*/
|
|
1624
|
+
constructor(column, aggregation, datatype) {
|
|
1625
|
+
this.column = column;
|
|
1626
|
+
this.aggregation = aggregation;
|
|
1627
|
+
this.datatype = datatype;
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
/** Classe che rappresenta un separatore da inserire fra gli oggetti dell'es-table per le operazioni di paginazione dei raggruppamenti per riga */
|
|
1632
|
+
class GroupPager {
|
|
1633
|
+
/**
|
|
1634
|
+
* Costruttore
|
|
1635
|
+
*
|
|
1636
|
+
* @param {number} groupLevel Livello del gruppo a cui questo separatore fa riferimento
|
|
1637
|
+
* @param {string} parentKey Chiave del gruppo parent se esiste
|
|
1638
|
+
* @param {AppSearch<any>} view Vista di ricerca collegata a questo elemento
|
|
1639
|
+
* @param {'groups' | 'items'} searches Indica che cosa cerca questo separatore, se sottogruppi o oggetti
|
|
1640
|
+
*/
|
|
1641
|
+
constructor(_grouplevel, _thisRoute, _parent, view, searches) {
|
|
1642
|
+
this._grouplevel = _grouplevel;
|
|
1643
|
+
this._thisRoute = _thisRoute;
|
|
1644
|
+
this._parent = _parent;
|
|
1645
|
+
this.view = view;
|
|
1646
|
+
this.searches = searches;
|
|
1647
|
+
this._sep = true;
|
|
1648
|
+
this.buttons = [];
|
|
1649
|
+
this._thisKey = _parent + "_sep";
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
/**
|
|
1654
|
+
* Classe che rappresenta un singolo frammento di route di un elemento gruppo o non. Un array di questi indica tutte le colonne di gruppo con i loro valori
|
|
1655
|
+
* per arrivare ad una ricerca su sottogruppi o elementi relativi
|
|
1656
|
+
*/
|
|
1657
|
+
class GroupRouteFragment {
|
|
1658
|
+
/**
|
|
1659
|
+
* Costruttore
|
|
1911
1660
|
*
|
|
1912
|
-
* @param {
|
|
1661
|
+
* @param {string} column Colonna di raggruppamento
|
|
1662
|
+
* @param {string} value Valore della colonna di raggruppamento
|
|
1913
1663
|
*/
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
return;
|
|
1918
|
-
}
|
|
1919
|
-
let orderNext = { NONE: 'DESC', DESC: 'ASC', ASC: null };
|
|
1920
|
-
let nextOrder = orderNext[clm.order || 'NONE'];
|
|
1921
|
-
clm.order = nextOrder;
|
|
1922
|
-
let order;
|
|
1923
|
-
let clmOrder = this.est.View.orders ? this.est.View.orders.filter(t => t.column == clm.id) : [];
|
|
1924
|
-
if (clmOrder.length == 0 && clm.order) {
|
|
1925
|
-
order = new ReportOrder();
|
|
1926
|
-
order.column = clm.id;
|
|
1927
|
-
order.order = clm.order;
|
|
1928
|
-
if (!this.est.View.orders)
|
|
1929
|
-
this.est.View.orders = [];
|
|
1930
|
-
this.est.View.orders.push(order);
|
|
1931
|
-
}
|
|
1932
|
-
else if (clmOrder.length == 1) {
|
|
1933
|
-
// Rimuovo l'ordinamento o aggiorno quello già esistente
|
|
1934
|
-
if (!clm.order)
|
|
1935
|
-
clmOrder = [];
|
|
1936
|
-
else
|
|
1937
|
-
clmOrder[0].order = clm.order;
|
|
1938
|
-
}
|
|
1939
|
-
else
|
|
1940
|
-
console.warn('Impossibile settare ordinamento. Colonna ' + clm.id + ' direttive di ordinamento ' + clmOrder.length + ' ordinamento scelto ' + clm.order);
|
|
1941
|
-
// Dopo aver aggiornato l'ordinamento rilancio la ricerca
|
|
1942
|
-
this.est.emitSearchRequest(false);
|
|
1943
|
-
}
|
|
1944
|
-
/** Metodo che si occupa di gestire la grafica della tabella in base alle informazioni di ordinamento colonne e paginazione contenuti nel modello */
|
|
1945
|
-
reviewReportBindings() {
|
|
1946
|
-
if (!(this.est.View instanceof ReportDefinition)) {
|
|
1947
|
-
console.error('View diversa da reportdefinition entrata nel metodo reviewReportBindings');
|
|
1948
|
-
return;
|
|
1949
|
-
}
|
|
1950
|
-
// Allineo le informazioni su eventuali ordinamenti fatti precedentemente
|
|
1951
|
-
if (this.est.View.orders && this.est.View.orders.length > 0) {
|
|
1952
|
-
this.est.View.orders.forEach(t => {
|
|
1953
|
-
this.est.ReportValues.columns.filter(c => c.id == t.column)[0].order = t.order;
|
|
1954
|
-
});
|
|
1955
|
-
}
|
|
1956
|
-
// Recupero il count precedente se serve
|
|
1957
|
-
if (this.est.ReportValues.count != -2)
|
|
1958
|
-
this.est.previousCount = this.est.ReportValues.count;
|
|
1959
|
-
else if (this.est.ReportValues.count == -2)
|
|
1960
|
-
this.est.ReportValues.count = this.est.previousCount;
|
|
1961
|
-
let ipp = (this.est.View.itemsperpageoverride || 15);
|
|
1962
|
-
this.est.View.pages = Math.ceil(this.est.ReportValues.count / ipp);
|
|
1963
|
-
this.est.arrayPulsanti = this.utilities.getPagesArray(6, this.est.View.page, this.est.View.pages);
|
|
1664
|
+
constructor(column, value) {
|
|
1665
|
+
this.column = column;
|
|
1666
|
+
this.value = value;
|
|
1964
1667
|
}
|
|
1965
1668
|
}
|
|
1966
1669
|
|
|
1967
|
-
// Modelli
|
|
1968
1670
|
/** Classe che gestisce la modalità Row Grouping dell'es-table */
|
|
1969
1671
|
class RowGroupingHandler {
|
|
1970
1672
|
/** @ignore Costruttore */
|
|
@@ -2011,7 +1713,7 @@ class RowGroupingHandler {
|
|
|
2011
1713
|
this.est.BaseItemsCount = view.objectcount;
|
|
2012
1714
|
}
|
|
2013
1715
|
else {
|
|
2014
|
-
// 2) Se viene richiesto il dettaglio di un qualsiasi gruppo diverso dall'ultimo vuol dire che devo aggiungere
|
|
1716
|
+
// 2) Se viene richiesto il dettaglio di un qualsiasi gruppo diverso dall'ultimo vuol dire che devo aggiungere
|
|
2015
1717
|
// dopo al gruppo che ho cliccato la lista dei gruppi tirata fuori questa volta (intermediateGroup = true)
|
|
2016
1718
|
/*
|
|
2017
1719
|
* GruppoA GruppoA
|
|
@@ -2022,7 +1724,7 @@ class RowGroupingHandler {
|
|
|
2022
1724
|
* GruppoD
|
|
2023
1725
|
* GruppoE
|
|
2024
1726
|
*/
|
|
2025
|
-
// 3) se i gruppi richiesti dalla view sono uguali ai gruppi presenti vuol dire che sto prendendo gli oggetti veri e propri, sono in
|
|
1727
|
+
// 3) se i gruppi richiesti dalla view sono uguali ai gruppi presenti vuol dire che sto prendendo gli oggetti veri e propri, sono in
|
|
2026
1728
|
// view.items e quindi in TMPBoundSource, ho inoltre le informazioni di paginazione **per il singolo sottogruppo** (intermediateGroup = false)
|
|
2027
1729
|
/*
|
|
2028
1730
|
* GruppoA GruppoA
|
|
@@ -2096,15 +1798,20 @@ class RowGroupingHandler {
|
|
|
2096
1798
|
itemsCacheReference.push(itm);
|
|
2097
1799
|
}
|
|
2098
1800
|
});
|
|
2099
|
-
// Elimino gli oggetti vecchi
|
|
1801
|
+
// Elimino gli oggetti vecchi
|
|
2100
1802
|
// 1) Ricerca intermedia, stato salvato - Elimino tutti gli item e tutti i gruppi la cui route è più lunga della corrente, tutti gli item relativi alla path corrente, e tutte
|
|
2101
1803
|
// le cache di ricerca effettuate su una path più profonda dell'attuale
|
|
2102
1804
|
// 2) Ricerca finale o ricerca intermedia senza stato salvato - Elimino tutti gli item relativi alla path corrente
|
|
2103
|
-
// Per "stato salvato" si intendono ricerche vecchie salvate per poter essere rieffettuate in caso di ordinamenti su colonne di interesse
|
|
1805
|
+
// Per "stato salvato" si intendono ricerche vecchie salvate per poter essere rieffettuate in caso di ordinamenti su colonne di interesse
|
|
2104
1806
|
if (intermediateGroup && view.savedstate) {
|
|
2105
1807
|
this.est.boundSource = this.est.boundSource.filter(t => !(t._item || t._thisRoute.length > groupRoute.length));
|
|
2106
1808
|
this.est.groupSearchRequestsCache = this.est.groupSearchRequestsCache.filter(t => !(t.route.length > groupRoute.length));
|
|
2107
1809
|
}
|
|
1810
|
+
else if (intermediateGroup) {
|
|
1811
|
+
// Se invece lo stato non è salvato vuol dire che c'è stato un cambio di pagina interno ad un gruppo già aperto:
|
|
1812
|
+
// - Elimino tutti gli elementi riconducibili a questo gruppo che erano già presenti
|
|
1813
|
+
this.est.boundSource = this.est.boundSource.filter(t => !(t._item || (t._thisKey.startsWith(groupKey) && t._thisKey != groupKey)));
|
|
1814
|
+
}
|
|
2108
1815
|
this.est.boundSource = this.est.boundSource.filter(t => !(t._parent == groupKey));
|
|
2109
1816
|
let thisGroup = this.est.boundSource[insertIndex];
|
|
2110
1817
|
if (intermediateGroup)
|
|
@@ -2126,13 +1833,11 @@ class RowGroupingHandler {
|
|
|
2126
1833
|
/**
|
|
2127
1834
|
* Se in modalità array applica i raggruppamenti definiti lato row-grouping
|
|
2128
1835
|
*
|
|
2129
|
-
* @param {ths:
|
|
1836
|
+
* @param {ths: EsThDirective[]} ths Header
|
|
2130
1837
|
*/
|
|
2131
1838
|
arrayModeReviewGroupings(ths) {
|
|
2132
1839
|
if (ths.length == 0)
|
|
2133
1840
|
return;
|
|
2134
|
-
if (this.utilities.isEsTh(ths[0]))
|
|
2135
|
-
return;
|
|
2136
1841
|
let headerGroups = [];
|
|
2137
1842
|
let headerAggregations = [];
|
|
2138
1843
|
for (let i = 0; i < ths.length; i++) {
|
|
@@ -2242,7 +1947,7 @@ class RowGroupingHandler {
|
|
|
2242
1947
|
anygp._thisKey = parent._thisKey + gp.value;
|
|
2243
1948
|
anygp._grouplevel = parent._grouplevel + 1;
|
|
2244
1949
|
}
|
|
2245
|
-
// Pusho il gruppo, tutti i gruppi del livello sotto, o gli item se io sono l'ultimo gruppo.
|
|
1950
|
+
// Pusho il gruppo, tutti i gruppi del livello sotto, o gli item se io sono l'ultimo gruppo.
|
|
2246
1951
|
// La visibilità è solo per il gruppo a livello 0, tutti gli altri gruppi saranno mostrati o nascosti di conseguenza
|
|
2247
1952
|
if (currentIndex == 0)
|
|
2248
1953
|
anygp._visible = true;
|
|
@@ -2438,7 +2143,22 @@ class RowGroupingHandler {
|
|
|
2438
2143
|
}
|
|
2439
2144
|
}
|
|
2440
2145
|
|
|
2441
|
-
|
|
2146
|
+
/** Rappresenta un trittico formato da un array e due cache relative a tale array per un accesso estremamente veloce per tutte le operazioni del caso */
|
|
2147
|
+
class CacheTriptic {
|
|
2148
|
+
/**
|
|
2149
|
+
* Costruttore
|
|
2150
|
+
*
|
|
2151
|
+
* @param {Map<string, any>} cache Cache Chiave-Oggetto
|
|
2152
|
+
* @param {Map<string, number>} index_cache Cache Indice-Oggetto
|
|
2153
|
+
* @param {any[]} array Array contenente gli oggetti
|
|
2154
|
+
*/
|
|
2155
|
+
constructor(cache, index_cache, array) {
|
|
2156
|
+
this.cache = cache;
|
|
2157
|
+
this.index_cache = index_cache;
|
|
2158
|
+
this.array = array;
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2442
2162
|
/** Classe che gestisce le selezioni degli oggetti */
|
|
2443
2163
|
class SelectionHandler {
|
|
2444
2164
|
/** @ignore Costruttore */
|
|
@@ -3014,20 +2734,6 @@ class UtilitiesHandler {
|
|
|
3014
2734
|
throw "Gli indici passati non fanno riferimento a una posizione dell'array. Length: " + array.length + " Old:" + oldI + " New: " + newI;
|
|
3015
2735
|
array.splice(newI, 0, array.splice(oldI, 1)[0]);
|
|
3016
2736
|
}
|
|
3017
|
-
/**
|
|
3018
|
-
* Helper che identifica se il td attuale è di tipo **EsTd**. In caso contrario è da considerarsi **EsTdDirective**
|
|
3019
|
-
*
|
|
3020
|
-
* @param {any} td Cella da valutare
|
|
3021
|
-
* @returns {boolean} Restituisce **true** se il **td** è di tipo **EsTd**, **false** se è di tipo **EsTdDirective**
|
|
3022
|
-
*/
|
|
3023
|
-
isEsTd(td) { return !td._directive; }
|
|
3024
|
-
/**
|
|
3025
|
-
* Helper che identifica se il th attuale è di tipo **EsTh**. In caso contrario è da considerarsi **EsThDirective**
|
|
3026
|
-
*
|
|
3027
|
-
* @param {any} td Header da valutare
|
|
3028
|
-
* @returns {boolean} Restituisce **true** se il **th** è di tipo **EsTh**, **false** se è di tipo **EsThDirective**
|
|
3029
|
-
*/
|
|
3030
|
-
isEsTh(th) { return !th._directive; }
|
|
3031
2737
|
/**
|
|
3032
2738
|
* Date le informazioni di paginazione ottiene l'array dei pulsanti
|
|
3033
2739
|
*
|
|
@@ -3132,7 +2838,7 @@ UtilitiesHandler.ctorParameters = () => [
|
|
|
3132
2838
|
class EsTableComponent {
|
|
3133
2839
|
/** @ignore */
|
|
3134
2840
|
constructor(ngControl, prefService, deafults, locale, lc, cdr, utilities_H, utiExts, expExts, dateExts, msgExts) {
|
|
3135
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
2841
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
3136
2842
|
this.ngControl = ngControl;
|
|
3137
2843
|
this.prefService = prefService;
|
|
3138
2844
|
this.deafults = deafults;
|
|
@@ -3221,28 +2927,10 @@ class EsTableComponent {
|
|
|
3221
2927
|
this.CornerMenuOptions = null;
|
|
3222
2928
|
/** Indica se dev'essere possibile effettuare il resize delle colonne */
|
|
3223
2929
|
this.ColumnsResizable = null;
|
|
2930
|
+
/** Indica se dev'essere possibile effettuare il pinning delle colonne */
|
|
2931
|
+
this.ColumnsPinnable = null;
|
|
3224
2932
|
/** Indica se dev'essere disponibile il sistema di aggiornamento automatico */
|
|
3225
2933
|
this.AutoUpdate = null;
|
|
3226
|
-
/** Indica se la tabella (configurata con **UseCustomCells**) deve mettersi in ascolto per i click sulle celle desiderate
|
|
3227
|
-
*
|
|
3228
|
-
* @deprecated Utilizzare l'Input **Template** delle es-td e assegnare un template con tutti i binding che si vuole ai click
|
|
3229
|
-
*/
|
|
3230
|
-
this.UseCustomCellActions = null;
|
|
3231
|
-
/**
|
|
3232
|
-
* Indica le celle desiderate su cui intercettare i click. Attiva solo quando **UseCustomCellActions** è true.
|
|
3233
|
-
* Ogni cella dev'essere separata dalla successiva dal carattere del Simoleon:
|
|
3234
|
-
*
|
|
3235
|
-
* Es, "MiaCella1§MiaCella2"
|
|
3236
|
-
*
|
|
3237
|
-
* @deprecated Utilizzare l'Input **Template** delle es-td e assegnare un template con tutti i binding che si vuole ai click
|
|
3238
|
-
*/
|
|
3239
|
-
this.CustomCellActionsOn = '';
|
|
3240
|
-
/**
|
|
3241
|
-
* Serve per decidere di lanciare o meno il **event.stopPropagation()** al termine della gestione dell'evento
|
|
3242
|
-
*
|
|
3243
|
-
* @deprecated Utilizzare l'Input **Template** delle es-td e assegnare un template con tutti i binding che si vuole ai click
|
|
3244
|
-
*/
|
|
3245
|
-
this.CellActionPropagates = true;
|
|
3246
2934
|
/**
|
|
3247
2935
|
* Decide se utilizzare o meno le CustomCells. Impostandolo a **true** l'es-table diventa in grado di gestire nativamente:
|
|
3248
2936
|
*
|
|
@@ -3301,12 +2989,6 @@ class EsTableComponent {
|
|
|
3301
2989
|
this.HasHeaderGroup = null;
|
|
3302
2990
|
/** Indica la presenza di raggruppamenti a livello del raggruppamento precedentemente esistente, chiaramente è insensata senza **HasHeaderGroup** */
|
|
3303
2991
|
this.HasSecondaryHeaderGroup = null;
|
|
3304
|
-
/** Utilizzato per dividere la sorgente in modalità EndlessScroll */
|
|
3305
|
-
this.SliceSize = 100;
|
|
3306
|
-
/** Decide se utilizzare la modalità di EndlessScroll */
|
|
3307
|
-
this.EndlessScroll = null;
|
|
3308
|
-
/** Qualora **EndlessScroll** fosse true, indica se utilizzare questa modalità solo quando si cerca per "Tutti" o in generale */
|
|
3309
|
-
this.EndlessScrollOnlyForAll = true;
|
|
3310
2992
|
/** Indica se nascondere gli Header della tabella */
|
|
3311
2993
|
this.HeaderHidden = null;
|
|
3312
2994
|
/** Indica se nascondere il Body della tabella */
|
|
@@ -3389,11 +3071,6 @@ class EsTableComponent {
|
|
|
3389
3071
|
this.onRemoval = new EventEmitter();
|
|
3390
3072
|
/** Evento richiamato all'annullamento di un'eliminazione */
|
|
3391
3073
|
this.onAbortRemoval = new EventEmitter();
|
|
3392
|
-
/** Evento richiamato al click su una cella quando **UseCustomCellActions** è attivo
|
|
3393
|
-
*
|
|
3394
|
-
* @deprecated Utilizzare l'Input **Template** delle es-td e assegnare un template con tutti i binding che si vuole ai click
|
|
3395
|
-
*/
|
|
3396
|
-
this.onCellClick = new EventEmitter();
|
|
3397
3074
|
/** Evento richiamato quando si clicca su un opzione definita nelle **CornerMenuOptions** */
|
|
3398
3075
|
this.onCornerAction = new EventEmitter();
|
|
3399
3076
|
/** Evento richiamato quando si clicca su un opzione definita nelle **DynamicOperations** */
|
|
@@ -3477,13 +3154,10 @@ class EsTableComponent {
|
|
|
3477
3154
|
this.UseSelectionCache = this.utilities_H.InputOrDefault(this.UseSelectionCache, (_p = this.deafults) === null || _p === void 0 ? void 0 : _p.UseSelectionCache, true);
|
|
3478
3155
|
this.ShowItemGroupsColumns = this.utilities_H.InputOrDefault(this.ShowItemGroupsColumns, (_q = this.deafults) === null || _q === void 0 ? void 0 : _q.ShowItemGroupsColumns, false);
|
|
3479
3156
|
this.ArraymodeItemsPerPage = this.utilities_H.InputOrDefault(this.ArraymodeItemsPerPage, (_r = this.deafults) === null || _r === void 0 ? void 0 : _r.ArraymodeItemsPerPage, 15);
|
|
3157
|
+
this.ColumnsPinnable = this.utilities_H.InputOrDefault(this.ColumnsPinnable, (_s = this.deafults) === null || _s === void 0 ? void 0 : _s.ColumnsPinnable, true);
|
|
3480
3158
|
}
|
|
3481
3159
|
/** @ignore */
|
|
3482
3160
|
ngOnInit() {
|
|
3483
|
-
//Per poter cambiare il layout in base al livello gerarchico il componente deva avere il pieno controllo di ogni cella,
|
|
3484
|
-
//che con solo la proiezione (senza celle cusotm) non è disponibile
|
|
3485
|
-
if (this.Hierarchy && !this.UseCustomCells)
|
|
3486
|
-
throw "Es-table error: Per poter utilizzare l'es-table con [Hierarchy]=\"true\" è richiesto anche [UseCustomCells]=\"true\"";
|
|
3487
3161
|
// click destro su una riga con selezione attiva: Tiro fuori il context menu e selezione l'elemento corrente
|
|
3488
3162
|
this.ctxMenuSubscription = (this.ContextMenu || this.tableEmptyMenu).open.subscribe(t => {
|
|
3489
3163
|
// Gruppi va bene, oggetti pure, ma separatori fra gruppi proprio no...
|
|
@@ -3516,6 +3190,10 @@ class EsTableComponent {
|
|
|
3516
3190
|
this.ShiftClick = true;
|
|
3517
3191
|
this.DirectivesBased = true;
|
|
3518
3192
|
}
|
|
3193
|
+
//Per poter cambiare il layout in base al livello gerarchico il componente deva avere il pieno controllo di ogni cella,
|
|
3194
|
+
//che con solo la proiezione (senza celle cusotm) non è disponibile
|
|
3195
|
+
if (this.Hierarchy && !this.UseCustomCells)
|
|
3196
|
+
throw "Es-table error: Per poter utilizzare l'es-table con [Hierarchy]=\"true\" è richiesto anche [UseCustomCells]=\"true\"";
|
|
3519
3197
|
}
|
|
3520
3198
|
/** @ignore */
|
|
3521
3199
|
ngOnDestroy() {
|
|
@@ -3627,30 +3305,12 @@ class EsTableComponent {
|
|
|
3627
3305
|
*/
|
|
3628
3306
|
finalizeContext() {
|
|
3629
3307
|
let viewCasted = this.View;
|
|
3630
|
-
/*
|
|
3631
|
-
*Uso la tecnica di EndlessScroll se la variabile relativa è attiva e se
|
|
3632
|
-
* 1) Ho un Array, oppure
|
|
3633
|
-
* 2) Ho un AppSearch che sta cercando con paginazione "Tutto", oppure
|
|
3634
|
-
* 3) Ho un AppSearch che sta cercando con paginazione diversa da "Tutto" ma con la variabile EndlessScrollOnlyForAll a false
|
|
3635
|
-
*/
|
|
3636
|
-
let isAppSearchWithIppMax = this.viewMode && viewCasted.itemsperpageoverride == this.defaultAllPageOverride;
|
|
3637
|
-
let isAppSearchNoMaxIpp = this.viewMode && viewCasted.itemsperpageoverride != this.defaultAllPageOverride;
|
|
3638
|
-
this.UseEndlessscroll = this.EndlessScroll && (this.arrayMode || isAppSearchWithIppMax || (isAppSearchNoMaxIpp && !this.EndlessScrollOnlyForAll));
|
|
3639
3308
|
let hasRowGroups = (viewCasted.groupings && viewCasted.groupings.filter(t => !t.aggregation).length > 0) || (this.arrayMode && this.EsThsDirective.some(t => t.thGroup));
|
|
3640
3309
|
// Se ho dei gruppi in modalità array devo sistemare un po' di variabili che diventano insensate
|
|
3641
3310
|
if (this.arrayMode && hasRowGroups)
|
|
3642
3311
|
this.UseArrayModePaging = false;
|
|
3643
3312
|
// Riempimento della TMPBoundSource con gli oggetti che verranno poi mostrati ad interfaccia
|
|
3644
|
-
|
|
3645
|
-
this.addedSlices = [];
|
|
3646
|
-
this.boundSubSources = this.items_H.getItemSlices();
|
|
3647
|
-
let firstSub = this.boundSubSources[0];
|
|
3648
|
-
this.TMPBoundSource = firstSub ? firstSub : [];
|
|
3649
|
-
if (firstSub)
|
|
3650
|
-
this.addedSlices.push(0);
|
|
3651
|
-
}
|
|
3652
|
-
else
|
|
3653
|
-
this.TMPBoundSource = this.items_H.getItemsByMode(false, !this.internalWriteCall);
|
|
3313
|
+
this.TMPBoundSource = this.items_H.getItemsByMode(false, !this.internalWriteCall);
|
|
3654
3314
|
// Se ho una gerarchia, assegno i livelli gerarchici alla TMPBoundSource
|
|
3655
3315
|
if (this.Hierarchy && !hasRowGroups)
|
|
3656
3316
|
this.hierarchyMode_H.assignHierarchyLevels(this.TMPBoundSource);
|
|
@@ -3710,28 +3370,6 @@ class EsTableComponent {
|
|
|
3710
3370
|
this.PagerOptions.ShowPagingOptions = this.PagerOptions.ShowButtons;
|
|
3711
3371
|
}
|
|
3712
3372
|
}
|
|
3713
|
-
/**
|
|
3714
|
-
* Metodo che gestisce l'endless scroll e in base a quanto la tabella è stata scrollata aggiunge degli elementi extra a **TMPBoundSource**
|
|
3715
|
-
*
|
|
3716
|
-
* @param {any} e Evento di scroll del browser
|
|
3717
|
-
*/
|
|
3718
|
-
onScroll(e) {
|
|
3719
|
-
let tableViewHeight = e.target.offsetHeight;
|
|
3720
|
-
let tableScrollHeight = e.target.scrollHeight;
|
|
3721
|
-
let scrollLocation = e.target.scrollTop;
|
|
3722
|
-
let buffer = 200;
|
|
3723
|
-
let limit = tableScrollHeight - tableViewHeight - buffer;
|
|
3724
|
-
if (scrollLocation > limit) {
|
|
3725
|
-
let indexToAdd = Math.floor(this.TMPBoundSource.length / 100);
|
|
3726
|
-
if (this.boundSubSources[indexToAdd] && this.addedSlices.indexOf(indexToAdd) == -1) {
|
|
3727
|
-
// Devo ricordarmi di fare l'hash del nuovo pezzo
|
|
3728
|
-
this.utilities_H.calculateHash(this.boundSubSources[indexToAdd]);
|
|
3729
|
-
this.TMPBoundSource = this.TMPBoundSource.concat(this.boundSubSources[indexToAdd]);
|
|
3730
|
-
this.addedSlices.push(indexToAdd);
|
|
3731
|
-
setTimeout(() => { this.postBoundSourceCalculation(); });
|
|
3732
|
-
}
|
|
3733
|
-
}
|
|
3734
|
-
}
|
|
3735
3373
|
/**
|
|
3736
3374
|
* Metodo lanciato dopo che la sorgente dati è stata correttamente bindata, si occupa di ricalcolare tutto ciò che serve
|
|
3737
3375
|
* all'es-table per renderizzare i valori da mostrare
|
|
@@ -3741,18 +3379,13 @@ class EsTableComponent {
|
|
|
3741
3379
|
this.RowContexts = [];
|
|
3742
3380
|
this.OrderDirectives = [];
|
|
3743
3381
|
this.lastSelectedItemID = null;
|
|
3744
|
-
|
|
3745
|
-
this.internalPostBoundSource();
|
|
3746
|
-
else {
|
|
3747
|
-
this.cdr.detectChanges();
|
|
3748
|
-
setTimeout(() => { this.internalPostBoundSource(); });
|
|
3749
|
-
}
|
|
3382
|
+
this.internalPostBoundSource();
|
|
3750
3383
|
}
|
|
3751
3384
|
/** 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 */
|
|
3752
3385
|
internalPostBoundSource() {
|
|
3753
3386
|
let View = this.View;
|
|
3754
|
-
let ths = this.
|
|
3755
|
-
let tds = this.
|
|
3387
|
+
let ths = this.EsThsDirective && this.EsThsDirective.length > 0 ? this.EsThsDirective.toArray() : [];
|
|
3388
|
+
let tds = this.EsTdsDirective && this.EsTdsDirective.length > 0 ? this.EsTdsDirective.toArray() : [];
|
|
3756
3389
|
// Se non ho colonne dinamiche ma sono in modalità dinamica (lo capisco perché c'è una view piena di genericitem) metto il default delle colonne
|
|
3757
3390
|
this.dynamicMode_H.eventuallyReviewDynamicColumns();
|
|
3758
3391
|
this.bindDisplayToLoadedItemsOrGroups(View);
|
|
@@ -3887,8 +3520,8 @@ class EsTableComponent {
|
|
|
3887
3520
|
*
|
|
3888
3521
|
* Costo: 2 scan EsThs, 1 scan EsTds
|
|
3889
3522
|
*
|
|
3890
|
-
* @param {
|
|
3891
|
-
* @param {
|
|
3523
|
+
* @param {EsThDirective[]} ths Colonne della tabella
|
|
3524
|
+
* @param {EsTdDirective[]} tds Celle della tabella
|
|
3892
3525
|
*/
|
|
3893
3526
|
evaluateRowTds(ths, tds) {
|
|
3894
3527
|
if (tds.length == 0)
|
|
@@ -3901,58 +3534,35 @@ class EsTableComponent {
|
|
|
3901
3534
|
}
|
|
3902
3535
|
for (let i = 0; i < ths.length; i++) {
|
|
3903
3536
|
let th = ths[i];
|
|
3904
|
-
thsCache[
|
|
3537
|
+
thsCache[th.th] = th;
|
|
3905
3538
|
}
|
|
3906
3539
|
this.TMPRowTDs = {};
|
|
3907
3540
|
// Variabile d'appoggio per permettermi di inserire tutte le colonne "Fixed" davanti
|
|
3908
3541
|
let contextFixeds = {};
|
|
3909
3542
|
for (let i = 0; i < tds.length; i++) {
|
|
3910
3543
|
let td = tds[i];
|
|
3911
|
-
|
|
3912
|
-
let
|
|
3544
|
+
for (let i = 0; i < this.boundSource.length; i++) {
|
|
3545
|
+
let item = this.boundSource[i];
|
|
3546
|
+
let ctx = item._hash;
|
|
3547
|
+
let key = td.td;
|
|
3548
|
+
let th = thsCache[td.td];
|
|
3913
3549
|
if (!!th)
|
|
3914
3550
|
th._referenced = true;
|
|
3915
3551
|
else
|
|
3916
|
-
throw "ID dell'oggeto EsTd non compatibile con gli ID dicharati negli EsTh: " + td.
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3552
|
+
throw "ID dell'oggeto EsTd non compatibile con gli ID dicharati negli EsTh: " + td.td;
|
|
3553
|
+
if (td.tdIf || th.thGroup) {
|
|
3554
|
+
let thCasted = th;
|
|
3555
|
+
let isFixed = th.thFixed || th.thGroup || th.thPinned;
|
|
3556
|
+
let itemToAdd = item._item ?
|
|
3557
|
+
{ LeftBorder: thCasted._lbord, RightBorder: thCasted._rbord, ID: key, Pinned: columnsCache[td.td].pinned, PinnedWidth: thCasted.thPinnedWidth, GroupHeader: false, GroupAggregation: false, Visible: columnsCache[td.td].visible, Wraps: false, Class: td.tdClass, Template: thCasted.thGroup && !this.ShowItemGroupsColumns ? null : td.Template } :
|
|
3558
|
+
{ LeftBorder: thCasted._lbord, RightBorder: thCasted._rbord, ID: key, Pinned: columnsCache[td.td].pinned, PinnedWidth: thCasted.thPinnedWidth, GroupHeader: thCasted.thGroup, GroupAggregation: !!thCasted.thAggregation, Visible: columnsCache[td.td].visible, Wraps: false, Class: thCasted.thGroupClass || '', Content: this.rowGrouping_H.getGroupCellDisplay(item, key, th) };
|
|
3559
|
+
if (this.TMPRowTDs[ctx]) {
|
|
3924
3560
|
this.TMPRowTDs[ctx].push(itemToAdd);
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
}
|
|
3931
|
-
}
|
|
3932
|
-
else {
|
|
3933
|
-
for (let i = 0; i < this.boundSource.length; i++) {
|
|
3934
|
-
let item = this.boundSource[i];
|
|
3935
|
-
let ctx = item._hash;
|
|
3936
|
-
let key = td.td;
|
|
3937
|
-
let th = thsCache[td.td];
|
|
3938
|
-
if (!!th)
|
|
3939
|
-
th._referenced = true;
|
|
3940
|
-
else
|
|
3941
|
-
throw "ID dell'oggeto EsTd non compatibile con gli ID dicharati negli EsTh: " + td.td;
|
|
3942
|
-
if (td.tdIf || (!this.utilities_H.isEsTh(th) && th.thGroup)) {
|
|
3943
|
-
let thCasted = th;
|
|
3944
|
-
let isFixed = (this.utilities_H.isEsTh(th) && th.Fixed) || (!this.utilities_H.isEsTh(th) && (th.thFixed || th.thGroup || th.thPinned));
|
|
3945
|
-
let itemToAdd = item._item ?
|
|
3946
|
-
{ LeftBorder: thCasted._lbord, RightBorder: thCasted._rbord, ID: key, Pinned: columnsCache[td.td].pinned, PinnedWidth: thCasted.thPinnedWidth, GroupHeader: false, GroupAggregation: false, Visible: columnsCache[td.td].visible, Wraps: false, Class: td.tdClass, Template: thCasted.thGroup && !this.ShowItemGroupsColumns ? null : td.Template } :
|
|
3947
|
-
{ LeftBorder: thCasted._lbord, RightBorder: thCasted._rbord, ID: key, Pinned: columnsCache[td.td].pinned, PinnedWidth: thCasted.thPinnedWidth, GroupHeader: thCasted.thGroup, GroupAggregation: !!thCasted.thAggregation, Visible: columnsCache[td.td].visible, Wraps: false, Class: thCasted.thGroupClass || '', Content: this.rowGrouping_H.getGroupCellDisplay(item, key, th) };
|
|
3948
|
-
if (this.TMPRowTDs[ctx]) {
|
|
3949
|
-
this.TMPRowTDs[ctx].push(itemToAdd);
|
|
3950
|
-
}
|
|
3951
|
-
else {
|
|
3952
|
-
this.RowContexts.push(ctx);
|
|
3953
|
-
this.TMPRowTDs[ctx] = [itemToAdd];
|
|
3954
|
-
contextFixeds[ctx] = isFixed ? 1 : 0;
|
|
3955
|
-
}
|
|
3561
|
+
}
|
|
3562
|
+
else {
|
|
3563
|
+
this.RowContexts.push(ctx);
|
|
3564
|
+
this.TMPRowTDs[ctx] = [itemToAdd];
|
|
3565
|
+
contextFixeds[ctx] = isFixed ? 1 : 0;
|
|
3956
3566
|
}
|
|
3957
3567
|
}
|
|
3958
3568
|
}
|
|
@@ -3964,7 +3574,7 @@ class EsTableComponent {
|
|
|
3964
3574
|
for (let i = 0; i < ths.length; i++) {
|
|
3965
3575
|
let th = ths[i];
|
|
3966
3576
|
if (!th._referenced)
|
|
3967
|
-
errs.push(
|
|
3577
|
+
errs.push(th.th);
|
|
3968
3578
|
}
|
|
3969
3579
|
if (errs.length > 0) {
|
|
3970
3580
|
var errIds = errs.join(', ');
|
|
@@ -3978,7 +3588,7 @@ class EsTableComponent {
|
|
|
3978
3588
|
*
|
|
3979
3589
|
* Costo: 1 scan EsThs
|
|
3980
3590
|
*
|
|
3981
|
-
* @param {
|
|
3591
|
+
* @param {EsThDirective[]} ths Colonne della tabella
|
|
3982
3592
|
*/
|
|
3983
3593
|
evaluateRowThs(ths) {
|
|
3984
3594
|
if (ths.length == 0)
|
|
@@ -3991,18 +3601,10 @@ class EsTableComponent {
|
|
|
3991
3601
|
columnsListCache[itm.id] = itm;
|
|
3992
3602
|
}
|
|
3993
3603
|
this.TMPRowTHs = [];
|
|
3994
|
-
let fixed = 0;
|
|
3995
3604
|
for (let i = 0; i < ths.length; i++) {
|
|
3996
3605
|
let th = ths[i];
|
|
3997
3606
|
let toAdd;
|
|
3998
|
-
if (
|
|
3999
|
-
toAdd = { Pinned: false, ID: th.ID, Visible: th.Visible, Class: th.Class, Order: th.Order, Orderable: th.Orderable, Template: null, Content: th.Description, Wrap: th.Wrap };
|
|
4000
|
-
if (th.Fixed)
|
|
4001
|
-
this.TMPRowTHs.splice(0 + (fixed++), 0, toAdd);
|
|
4002
|
-
else
|
|
4003
|
-
this.TMPRowTHs.push(toAdd);
|
|
4004
|
-
}
|
|
4005
|
-
else if (th.thIf || th.thGroup) {
|
|
3607
|
+
if (th.thIf || th.thGroup) {
|
|
4006
3608
|
let thClass = (th.thClass || '') + (th.thGroup ? " est-col-min" : "");
|
|
4007
3609
|
toAdd = { Pinned: columnsListCache[th.th].pinned, Fixed: th.thFixed, PinnedWidth: th.thPinnedWidth, ID: th.th, Visible: th.thVisible, Class: thClass, Order: th.thOrder, Orderable: th.thOrderable, Template: th.Template, Content: null, Wrap: th.thWrap, LeftBorder: th._lbord, RightBorder: th._rbord };
|
|
4008
3610
|
this.TMPRowTHs.push(toAdd);
|
|
@@ -4251,21 +3853,6 @@ class EsTableComponent {
|
|
|
4251
3853
|
// Riforzo il writevalue in modo che il codice passi dalla gestione come se fosse fatta ripartire una ricerca
|
|
4252
3854
|
this.internalWriteValue();
|
|
4253
3855
|
}
|
|
4254
|
-
/**
|
|
4255
|
-
* Gestore dei click sulle celle per le quali era impostata una azione custom da **CustomCellActionsOn**
|
|
4256
|
-
*
|
|
4257
|
-
* @param {string} name Nome della cella su cui si è fatto click
|
|
4258
|
-
* @param {any} model Modello relativo alla cella cliccata
|
|
4259
|
-
*
|
|
4260
|
-
* @returns {boolean} **true** se il click è stato fatto su una cella cliccabile, **false** altrimenti
|
|
4261
|
-
*/
|
|
4262
|
-
cellClicked(name, model) {
|
|
4263
|
-
if (this.UseCustomCellActions && this.CustomCellActionsOn.split('$').indexOf(name) != -1) {
|
|
4264
|
-
this.onCellClick.emit({ column: name, model: model });
|
|
4265
|
-
return true;
|
|
4266
|
-
}
|
|
4267
|
-
return false;
|
|
4268
|
-
}
|
|
4269
3856
|
/**
|
|
4270
3857
|
* Gestione dei click sulle opzioni del menù contestuale in alto a destra generato dall'Input **CornerMenuOptions**
|
|
4271
3858
|
*
|
|
@@ -4323,7 +3910,7 @@ EsTableComponent.decorators = [
|
|
|
4323
3910
|
viewProviders: [{ provide: LocalizationService, useClass: EsTableLoc }],
|
|
4324
3911
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4325
3912
|
encapsulation: ViewEncapsulation.None,
|
|
4326
|
-
template: "<!-- Patacchino di autoaggiornamento -->\r\n<div class=\"w-100\" *ngIf=\"AutoUpdate\">\r\n <div class=\"pull-right\">\r\n {{'Update every' | localize : lc}} <input [readonly]=\"autoUpdate\" maxlength=\"3\" class=\"form-control est-custom-input\" type=\"text\" [(ngModel)]=\"seconds\" /> {{'second/s' | localize : lc}}\r\n </div>\r\n <div class=\"pull-right m-t-2\">\r\n <label class=\"est-switch\">\r\n <input type=\"checkbox\" [(ngModel)]=\"autoUpdate\" (ngModelChange)=\"autoUpdateChanged();\" />\r\n <div class=\"est-slider round\"></div>\r\n </label>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<!--\r\nI TH sono contenuto statico, questo significa che senza condizione per RowTHs arriverebbero sia qui sia nell ng-container dell'header in fase non inizializzata, duplicando fisicamente le colonne.\r\nPer ovviare al problema, questo pezzo lo faccio apparire solo se ci sono gi\u00E0 dei RowTHs, quindi su valorizzazione della View succeder\u00E0:\r\n1) appaiono i th nell' ng-container dell'header, e NON qui\r\n2) i TH vengono presi, elaborati e trasformati in RowTHs\r\n3) l'ng-container dell'header sparisce (per la condizione !UseCustomCells || !RowTHs) e qui appaiono i nuovi TH (che poi sono gli stessi di prima che girano)\r\n4) Vengono presi i nuovi TH da qui e trasformati a loro volta in RowTHs\r\n-->\r\n<div hidden *ngIf=\"UseCustomCells && RowTHs\">\r\n <ng-container *ngIf=\"View\">\r\n <!--Qui invece ci sono tutti i TH-->\r\n <ng-container *ngTemplateOutlet=\"headerRef\"></ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n<!--\r\nQuesta parte \u00E8 un po' pi\u00F9 semplice del sopra. Infatti i TD vengono s\u00EC bindati in entrambi i punti (qui e nell'ng-container del body), ma avr\u00F2 le TD statiche prima di generare la TMPBoundSource.\r\nQuesto significa che il workflow di binding sar\u00E0:\r\n1) Appaiono i TD statici nel body e NON qui, perch\u00E9 i TMPBoundSource non sono ancora stati emessi\r\n2) Contemporaneamente all'emissione dei TMPBoundSource vengono anche emessi i RowTds\r\n3) Considerando il punto 2, al giro dopo appariranno i TD qui, perch\u00E9 \u00E8 stata generata la TMPBoundSource, e spariranno contemporaneamente dall'ng-container del body (per la condizione !UseCustomCells || !RowTDs)\r\n-->\r\n<div hidden *ngIf=\"UseCustomCells && bodyRef\">\r\n <ng-container *ngIf=\"View\">\r\n <!--Tutti i TD che dopo verranno presi ed elaborati internamente-->\r\n <ng-container *ngFor=\"let item of TMPBoundSource\">\r\n <ng-container *ngTemplateOutlet=\"bodyRef; context : {$implicit: item}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n<div *ngIf=\"View\" class=\"est-relative\">\r\n <div *ngIf=\"FirstBind && ShowLoadingOnBootstrap\" class=\"est-loading-box\">\r\n <div class=\"est-loading-content\">\r\n <span class=\"fa fa-spinner fa-spin\"></span> {{'Performing Table bootstrap' | localize: lc}}...\r\n </div>\r\n </div>\r\n\r\n <div class=\"est-top-pager\" *ngIf=\"PagingStyle == 'both' || PagingStyle == 'top'\">\r\n <ng-container *ngTemplateOutlet=\"pagingElement\"></ng-container>\r\n </div>\r\n\r\n <div class=\"est-top-allselect\" *ngIf=\"canSelectAll || (!reportMode && (View?.selection || arraymodeSelection).all)\">\r\n <span>{{ (selectedObjects == -1 ? ('All the' | localize : lc) : ((selectedObjects || 0) | number : '0.0-0' : locale)) + ' ' + ((selectedObjects == 1 ? 'Object Selected' : 'Objects Selected') | localize : lc) }}</span> \r\n <span class=\"est-link est-inline\" (click)=\"selection_H.selectAllOrResetSelection()\">{{ (View?.selection || arraymodeSelection).all ? ('Reset Selection' | localize : lc) : ('Select Everything' | localize : lc)}}</span>\r\n </div>\r\n\r\n <div class=\"table-responsive datatable {{ContainerClass}}\" [class.est-scrollable]=\"UseEndlessscroll\" (scroll)=\"UseEndlessscroll && onScroll($event)\" [style.max-height.px]=\"MaxHeight\">\r\n <table class=\"{{ TableClass }} est-margin-bottom-10\" [class.est-high-density]=\"HighCellDensity\">\r\n <thead [hidden]=\"HeaderHidden || FirstBind\">\r\n <!-- Aggiungo il pezzo che gestisce la selezione di tutto se attivo da config -->\r\n <tr *ngIf=\"SelectAll || PagingStyle != 'bottom'\">\r\n <th class=\"est-no-selection\" [attr.colspan]=\"Columns.Global\" [class.est-hidden-view]=\"!canSelectAll && (reportMode || !(View?.selection || arraymodeSelection).all) && PagingStyle == 'bottom'\">\r\n <p class=\"est-hidden-view app-margin-bottom-0\">\u00A7</p>\r\n </th>\r\n </tr>\r\n\r\n <!-- Blocco header group -->\r\n <ng-container *ngIf=\"RowThGroups\">\r\n <tr *ngFor=\"let level of RowThGroups\">\r\n <th *ngFor=\"let cell of level\" [attr.colspan]=\"cell.Span\" \r\n [class.est-pinned-header]=\"cell.Pinned\" [class.est-col-min]=\"cell.Pinned\"\r\n [class.est-ltab-border]=\"cell.Borders\" [class.est-rtab-border]=\"cell.Borders\"\r\n class=\"est-text-center\">\r\n <ng-container *ngIf=\"cell.Pinned; Else: cell.Template\">\r\n <div class=\"est-pinned-border est-cell-group-padding\"></div>\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!RowThGroups\">\r\n <tr *ngIf=\"HasHeaderGroup\">\r\n <ng-container *ngTemplateOutlet=\"headerGroupRef\"></ng-container>\r\n <th *ngIf=\"Export\"></th>\r\n </tr>\r\n \r\n <!-- Blocco header group secondario -->\r\n <tr *ngIf=\"HasSecondaryHeaderGroup\">\r\n <ng-container *ngTemplateOutlet=\"secondaryHeaderGroupRef\"></ng-container>\r\n <th *ngIf=\"Export\"></th>\r\n </tr>\r\n </ng-container>\r\n\r\n <!-- Blocco effettivo degli header -->\r\n <tr>\r\n <!-- Aggiungo una checkbox se la selezione \u00E8 attiva -->\r\n <th class=\"est-col-min\" *ngIf=\"Selection && !HasPinnedColumns\">\r\n <input *ngIf=\"!SingleSelection\" class=\"est-pointer\" type=\"checkbox\" [disabled]=\"SelectionDisabled\" [(ngModel)]=\"globalCheck\" [ngModelOptions]=\"{'standalone': true}\" (ngModelChange)=\"globalCheckChanged();\">\r\n </th>\r\n\r\n <!-- Header che valgono per view mode e array mode -->\r\n <ng-container *ngIf=\"(viewMode || arrayMode)\">\r\n\r\n <!-- In una tabella base prendo semplicemente i th scritti dall'utente nell'HTML -->\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTHs) && !DynamicRowColumnsDefinition\">\r\n <ng-container *ngTemplateOutlet=\"headerRef\"></ng-container>\r\n </ng-container>\r\n\r\n <!-- Se ho un modello dinamico dell'oggetto creo le colonne in base alle propriet\u00E0 -->\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTHs) && DynamicRowColumnsDefinition\">\r\n <th *ngFor=\"let operation of DynamicOperations\" class=\"est-col-min est-no-side-padding\"></th>\r\n \r\n <ng-container *ngFor=\"let rowHeader of DynamicRowColumnsDefinition\">\r\n <ng-container *ngIf=\"rowHeader.visible\">\r\n <th *ngIf=\"OrderByColumn\" es-th=\"{{rowHeader.propertyName}}\" class=\"{{UserDefinedDynamicCols ? ((rowHeader.clss || '') + (rowHeader.headerWraps ? '' : ' est-nowrap')) : ' est-nowrap'}}\" [Order]=\"rowHeader.dataOrder\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.orderable\" [OrderBy]=\"OrderByColumn\" [SearchInProgress]=\"!!researchInProgress\" (onOrderChange)=\"thOrderChanged(rowHeader.propertyName, $event)\">{{rowHeader.description}}</th>\r\n <th *ngIf=\"!OrderByColumn\" es-th=\"{{rowHeader.propertyName}}\" class=\"{{UserDefinedDynamicCols ? ((rowHeader.clss || '') + (rowHeader.headerWraps ? '' : ' est-nowrap')) : ' est-nowrap'}}\" [Order]=\"rowHeader.dataOrder\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.orderable\" [OrderBy]=\"OrderByColumn\">{{rowHeader.description}}</th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- Se non ho un modello dinamico ma invece delle celle custom, genero gli header in base ai row th -->\r\n <ng-container *ngIf=\"UseCustomCells && RowTHs\">\r\n <th *ngIf=\"HasPinnedColumns\" class=\"est-pinned-header est-col-min\">\r\n <div [style.width.px]=\"PinnedContainerWidth\" class=\"est-pinned-border est-simple-border-bottom\">\r\n <th class=\"est-col-min est-no-border\" *ngIf=\"Selection\" [style.width.px]=\"20\">\r\n <input *ngIf=\"!SingleSelection\" class=\"est-pointer\" type=\"checkbox\" [disabled]=\"SelectionDisabled\" [(ngModel)]=\"globalCheck\" [ngModelOptions]=\"{'standalone': true}\" (ngModelChange)=\"globalCheckChanged();\">\r\n </th>\r\n <ng-container *ngFor=\"let rowHeader of RowTHs\">\r\n <th *ngIf=\"rowHeader && rowHeader.Visible && rowHeader.Pinned\" [style.width.px]=\"rowHeader.PinnedWidth\" es-th=\"{{rowHeader.ID}}\" \r\n class=\"{{rowHeader.Class || ''}}\" \r\n [class.est-pinned-internal-header]=\"true\" \r\n [class.est-no-border]=\"true\" \r\n [class.est-nowrap]=\"!rowHeader.Wrap\" \r\n [Pinned]=\"true\" [Fixed]=\"rowHeader.Fixed\" [Order]=\"rowHeader.Order\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.Orderable\" [OrderBy]=\"OrderByColumn\" [SearchInProgress]=\"!!researchInProgress\" (onUnpinning)=\"columnMetadata_H.unpinColumn($event)\" (onOrderChange)=\"OrderByColumn && thOrderChanged(rowHeader.ID, $event)\">\r\n <ng-container *ngIf=\"rowHeader.Template\"><ng-container *ngTemplateOutlet=\"rowHeader.Template;\"></ng-container></ng-container>\r\n <span *ngIf=\"!rowHeader.Template\">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </div>\r\n </th>\r\n <ng-container *ngFor=\"let rowHeader of RowTHs\">\r\n <th *ngIf=\"rowHeader && rowHeader.Visible && !rowHeader.Pinned\" es-th=\"{{rowHeader.ID}}\" class=\"{{rowHeader.Class || ''}}\" [class.est-ltab-border]=\"rowHeader.LeftBorder\" [class.est-rtab-border]=\"rowHeader.RightBorder\" [class.est-nowrap]=\"!rowHeader.Wrap\" [Order]=\"rowHeader.Order\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.Orderable\" [OrderBy]=\"OrderByColumn\" [SearchInProgress]=\"!!researchInProgress\" (onOrderChange)=\"OrderByColumn && thOrderChanged(rowHeader.ID, $event)\">\r\n <ng-container *ngIf=\"rowHeader.Template\"><ng-container *ngTemplateOutlet=\"rowHeader.Template;\"></ng-container></ng-container>\r\n <span *ngIf=\"!rowHeader.Template\">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!--Casistica in cui ho il setup proveniente da un report. Gli header sono definiti da come \u00E8 fatto il report-->\r\n <ng-container *ngIf=\"reportMode\">\r\n <th [style.color]=\"clm.color\" *ngFor=\"let clm of ReportValues.columns\" class=\"est-no-selection est-pointer est-nowrap\" (click)=\"reportMode_H.setupNextOrderAndSearch(clm)\">\r\n {{clm.description}}<span class=\"fa\" [class.fa-chevron-down]=\"clm.order == 'DESC'\" [class.fa-chevron-up]=\"clm.order == 'ASC'\"></span>\r\n </th>\r\n </ng-container>\r\n\r\n <!--Per l'eliminazione mi serve un header aggiuntivo-->\r\n <th *ngIf=\"Removal\" [class.est-right-9]=\"Export || HiddenColumns\" class=\"est-col-min est-sticky-last-column\"><span class=\"fa fa-trash\"></span></th>\r\n\r\n <!--Per l'esportazione mi serve l'header extra da cui faccio uscire i 3 pallocchi-->\r\n <th *ngIf=\"Export || HiddenColumns || ColumnsOrdering || CornerMenuOptions\" class=\"est-table-dotted-menu est-sticky-last-column est-col-min text-sm-center\">\r\n \r\n <!-- Link nascosto che serve a scaricare il file -->\r\n <a *ngIf=\"headers\" hidden #exportDownloader csvLink [data]=\"data\" [headers]=\"headers\" [delimiter]=\"';'\" [filename]=\"ExportFileName.endsWith('.xlsx') ? ExportFileName.replace('.xlsx', '.csv') : ExportFileName.endsWith('.csv') ? ExportFileName : ExportFileName + '.csv'\"></a>\r\n\r\n <!-- Blocco con i 3 pallocchi che tira fuori il context menu delle operazioni -->\r\n <div class=\"btn-group\" container=\"body\" placement=\"bottom right\" dropdown #dropdown=\"bs-dropdown\" [autoClose]=\"true\">\r\n <span dropdownToggle class=\"fa fa-ellipsis-v est-fs-18 est-pointer est-padding-3\"></span>\r\n\r\n <div *dropdownMenu class=\"dropdown-menu dropdown-menu-right est-bring-to-front-strong\">\r\n <div class=\"est-pointer\">\r\n <a class=\"dropdown-item\" *ngIf=\"HiddenColumns || ColumnsOrdering\" (click)=\"columnMetadata_H.resetColumnVisSelection(); changeColumnVisibilityModal.show();\">\r\n <ng-container *ngIf=\"!HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Order' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && !ColumnsOrdering\">\r\n {{'Columns Visibility' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Visibility and Order' | localize : lc}}\r\n </ng-container>\r\n </a>\r\n <a class=\"dropdown-item\" *ngIf=\"Export && CSVExport\" (click)=\"export_H.tryExport('CSV')\">{{'Export View' | localize : lc}} (CSV)</a>\r\n <a class=\"dropdown-item\" *ngIf=\"Export && XLSXExport\" (click)=\"export_H.tryExport('XLSX')\">{{'Export View' | localize : lc}} (XLSX)</a>\r\n <a class=\"dropdown-item\" *ngFor=\"let option of CornerMenuOptions\" (click)=\"cornerActionClicked(option.id)\">{{option.description}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n </tr>\r\n </thead>\r\n \r\n <!-- Valido per modalit\u00E0 View o Array. Se sono in report mode il body \u00E8 creato in altro modo -->\r\n <tbody [hidden]=\"BodyHidden || FirstBind\" *ngIf=\"(arrayMode || viewMode)\">\r\n <!--Con selection attiva richiamo il template che gestisce il context menu-->\r\n <ng-container *ngIf=\"Selection\">\r\n <ng-container *ngTemplateOutlet=\"TBodySelection; context: { $implicit: { selDisabled: arrayMode ? false : SelectionDisabled, sel: Selection }}\"></ng-container>\r\n </ng-container>\r\n\r\n <!--Senza selection richiamo il template che NON gestisce il context menu-->\r\n <ng-container *ngIf=\"!Selection\">\r\n <ng-container *ngTemplateOutlet=\"TBody\"></ng-container>\r\n </ng-container>\r\n </tbody>\r\n\r\n <!-- Per la modalit\u00E0 a report c'\u00E8 un body particolare semi-dinamico -->\r\n <tbody [hidden]=\"BodyHidden\" *ngIf=\"reportMode\">\r\n <tr *ngFor=\"let row of ReportValues.rows; let even = even;\">\r\n <td class=\"est-nowrap\" *ngFor=\"let val of row.values\">{{val}}</td>\r\n <td class=\"est-sticky-last-column{{even && !Hierarchy ? '-alt' : ''}}\"></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n <div *ngIf=\"PagingStyle == 'both' || PagingStyle == 'bottom'\">\r\n <ng-container *ngTemplateOutlet=\"pagingElement\"></ng-container>\r\n </div>\r\n</div>\r\n\r\n<!-- Template che contiene tutte le info di paginazione in modo da poterlo replicare anche sopra -->\r\n<ng-template #pagingElement>\r\n <ng-container *ngIf=\"!FirstBind\">\r\n <!-- Pulsanti avanti-indietro di paginazione -->\r\n <div *ngIf=\"PagerOptions.ShowPaging && PagerOptions.ShowButtons && (PagerOptions.PagerCount > 10 || PagerOptions.PagerCount == -1)\" class=\"pull-right btn-toolbar\">\r\n <ng-container *ngIf=\"(!reportMode || View?.pagingavailable) && (!arrayMode || SearchView)\">\r\n <ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { Margin: true, ATP: addToPage.bind(this), GTP: goToPage.bind(this), Array: arrayPulsanti }}\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"arrayMode && UseArrayModePaging && !SearchView\">\r\n <ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { Margin: true, ATP: arrayAddToPage.bind(this), GTP: arrayGoToPage.bind(this), Array: arrayPulsanti }}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <!-- Paginatore dove appare la count e le opzioni di paginazione -->\r\n <div class=\"pull-right\" *ngIf=\"PagerOptions.ShowCount || PagerOptions.ShowPagingOptions\">\r\n <div class=\"est-mt-min-5\" *ngIf=\"PagerOptions.ShowPaging\">\r\n <app-paging *ngIf=\"!PagerOptions.UsesView\" [CountLabel]=\"CountLabel\" [ShowPaging]=\"PagerOptions.ShowPagingOptions\" [ShowCount]=\"PagerOptions.ShowCount\" [PagerCount]=\"PagerOptions.PagerCount\" [WarnOnAll]=\"false\" [CurrentPageSize]=\"ArraymodeItemsPerPage\" (pagingSelected)=\"items_H.refreshPaging($event)\"></app-paging>\r\n <app-paging *ngIf=\"PagerOptions.UsesView\" [CountLabel]=\"CountLabel\" [ShowPaging]=\"PagerOptions.ShowPagingOptions\" [ShowCount]=\"PagerOptions.ShowCount\" [PagerCount]=\"PagerOptions.PagerCount\" [GroupMode]=\"PagerOptions.Searches == 'groups'\" [AllSearch]=\"AllSearch\" [View]=\"PagerOptions.View\" (pagingSelected)=\"onItemsPerPageChanged($event);\"></app-paging>\r\n </div>\r\n <div *ngIf=\"reportMode && !PagerOptions.ShowPaging\"><em>{{'Paging options are not available for this report' | localize: lc}}</em></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<!-- Template che contiene i pulsanti per cambiare pagina -->\r\n<ng-template #pagingButtons let-options>\r\n <div class=\"est-flex\" [class.est-margin-left-50]=\"options.Margin\">\r\n <a class=\"btn\" class=\"est-page-prev app-pointer\" (click)=\"options.ATP(-1, options.separator)\"><span class=\"fa fa-chevron-left\"></span></a>\r\n <div *ngIf=\"options.Array\" class=\"est-inline\"><a *ngFor=\"let p of options.Array\" class=\"btn est-page-sel {{p.cssClass}}\" (click)=\"options.GTP(p.val, options.separator)\">{{p.val}}</a></div>\r\n <a class=\"btn\" class=\"est-page-next app-pointer\" (click)=\"options.ATP(1, options.separator)\"><span class=\"fa fa-chevron-right\"></span></a>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Questi due template rappresentano effettivamente il body della tabella. essendo il tr l'unica cosa che davvero cambia, il resto \u00E8 templatizzato -->\r\n<ng-template #TBodySelection let-templateOptions>\r\n <ng-container *ngFor=\"let item of boundSource; let even = even; let i=index; trackBy: bodyTrackBy\">\r\n <tr *ngIf=\"item._visible || (!Hierarchy && !ArrayGrouping)\" \r\n [class]=\"item._rowClass ? item._rowClass : ''\" \r\n [class.est-line-through]=\"item.removed || item.deleted\" \r\n [class.est-pointer]=\"!item.locked\" \r\n [class.est-white-selected]=\"item._selected && !item.locked\"\r\n [class.est-rg]=\"item._group\"\r\n [class.est-rg-sep]=\"item._sep\"\r\n [contextMenu]=\"!item.locked ? (ContextMenu || emptyMenu) : emptyMenu\" [contextMenuSubject]=\"item\"\r\n (click)=\"(!item.locked && !item._sep && !item._group && handleClick($event, item)) || item._group && handleGroupClick(item)\">\r\n\r\n <td *ngIf=\"!item.locked && !item._sep && !HasPinnedColumns\">\r\n <input type=\"checkbox\" \r\n [disabled]=\"templateOptions.selDisabled\" \r\n [class.est-pointer]=\"!item.locked\"\r\n [(ngModel)]=\"item._selected\" name=\"check{{i}}\" \r\n (click)=\"$event.stopPropagation(); handleClick($event, item);\">\r\n </td>\r\n <td *ngIf=\"(item.locked || item._sep) && !HasPinnedColumns\"></td>\r\n\r\n <ng-container *ngIf=\"item._sep\"><ng-container *ngTemplateOutlet=\"groupPager; context: { $implicit: item }\"></ng-container> </ng-container>\r\n\r\n <ng-container *ngIf=\"!item._sep\">\r\n <ng-container *ngTemplateOutlet=\"basicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"dynamicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"customCells; context: { $implicit: item, templateOptions: templateOptions }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}\"></ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #TBody>\r\n <ng-container *ngFor=\"let item of boundSource; let even = even;\">\r\n <tr *ngIf=\"item._visible || !Hierarchy\" \r\n [class]=\"item._rowClass ? item._rowClass : ''\" \r\n [class.est-line-through]=\"item.removed || item.deleted\"\r\n [class.est-rg]=\"item._group\"\r\n [class.est-rg-sep]=\"item._sep\"\r\n (click)=\"item._group && handleGroupClick(item)\">\r\n\r\n <ng-container *ngIf=\"item._sep\"><ng-container *ngTemplateOutlet=\"groupPager; context: { $implicit: item }\"></ng-container></ng-container>\r\n\r\n <ng-container *ngIf=\"!item._sep\">\r\n <ng-container *ngTemplateOutlet=\"basicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"dynamicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"customCells; context: { $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}\"></ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #groupPager let-item>\r\n <td class=\"est-pinned-body \" *ngIf=\"HasPinnedColumns\"><div class=\"est-pinned-border est-cell-group-padding\"></div></td>\r\n <td *ngIf=\"item._grouplevel > 1\" [attr.colspan]=\"item._grouplevel-1\"></td>\r\n <td [attr.colspan]=\"Columns.VisibleUnpinned - (item._grouplevel > 0 ? item._grouplevel - 1 : 0)\">\r\n <div class=\"est-rg-sep-flex-right\" *ngIf=\"RowGroupingPagingStyle == 'right'\">\r\n <div class=\"est-rg-page\"><ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { separator: item, ATP: addToPageGroup.bind(this), GTP: goToPageGroup.bind(this), Array: item.buttons }}\"></ng-container></div>\r\n <div class=\"est-rg-ipp\" *ngIf=\"(item.searches == 'groups' ? item.view.groupcount : item.view.objectcount) > 10\"><app-paging [CountLabel]=\"CountLabel\" [AllSearch]=\"AllSearch\" [GroupMode]=\"item.searches == 'groups'\" [PagerCount]=\"item.searches == 'groups' ? item.view.groupcount : item.view.objectcount\" [View]=\"item.view\" (pagingSelected)=\"onGroupItemsPerPageChanged(item, $event);\"></app-paging></div>\r\n </div>\r\n\r\n <div class=\"est-rg-sep-flex-left\" *ngIf=\"RowGroupingPagingStyle == 'left'\">\r\n <div class=\"est-rg-ipp\"><app-paging [AllSearch]=\"AllSearch\" [CountLabel]=\"CountLabel\" [GroupMode]=\"item.searches == 'groups'\" [PagerCount]=\"item.searches == 'groups' ? item.view.groupcount : item.view.objectcount\" [View]=\"item.view\" (pagingSelected)=\"onGroupItemsPerPageChanged(item, $event);\"></app-paging></div>\r\n <div class=\"est-rg-page\" *ngIf=\"(item.searches == 'groups' ? item.view.groupcount : item.view.objectcount) > 10\"><ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { separator: item, ATP: addToPageGroup.bind(this), GTP: goToPageGroup.bind(this), Array: item.buttons }}\"></ng-container></div>\r\n </div>\r\n </td>\r\n</ng-template>\r\n\r\n<!-- Questo template contiene la print condizionale su tabelle semplici, con header e body scritti a manazza -->\r\n<ng-template #basicColumns let-item>\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTDs) && !DynamicRowColumnsDefinition\">\r\n <ng-container *ngTemplateOutlet=\"bodyRef; context : {$implicit: item}\"></ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<!-- Questo template contiene la print condizionale su tabelle definite in maniera dinamica dal modello -->\r\n<ng-template #dynamicColumns let-item>\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTDs) && DynamicRowColumnsDefinition\">\r\n <ng-container *ngFor=\"let operation of DynamicOperations; let first = first; let last = last;\">\r\n <ng-container *ngIf=\"!operation.conditionField || (item.properties[operation.conditionField] == operation.conditionValue)\">\r\n <td [class.est-no-right-padding]=\"last\" [class.est-no-left-padding]=\"!first\" class=\"est-col-min\"><span title=\"{{operation.title}}\" class=\"{{operation.iconClass}} est-pointer\" (click)=\"dynamicOperation(item, operation.id)\">{{operation.text}}</span></td>\r\n </ng-container>\r\n <ng-container *ngIf=\"operation.conditionField && (item.properties[operation.conditionField] != operation.conditionValue)\">\r\n <td class=\"est-col-min est-no-side-padding\"></td>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor=\"let rowItem of DynamicRowColumnsDefinition\">\r\n <ng-container *ngIf=\"rowItem.routePath && rowItem.visible\">\r\n <td es-td=\"{{rowItem.propertyName}}\" class=\"{{UserDefinedDynamicCols ? rowItem.clss : 'est-nowrap'}}\" [Internal]=\"false\" [Context]=\"item._hash\">\r\n <a [routerLink]=\"dynamicMode_H.generateRouterLink(rowItem.routePath, rowItem.routeParameterProperties, item)\" class=\"est-link\" [innerHTML]=\"item.properties[rowItem.propertyName]\"></a>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf=\"!rowItem.routePath && rowItem.visible\">\r\n <ng-container *ngTemplateOutlet=\"findEsTd(rowItem.propertyName) || defaultEsTd; context: { $implicit: item.properties[rowItem.propertyName], rowItem : rowItem, item : item }\"> </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEsTd let-value let-rowItem='rowItem' let-item='item'>\r\n <td es-td=\"{{rowItem.propertyName}}\" class=\"{{UserDefinedDynamicCols ? rowItem.clss : 'est-nowrap'}}\"\r\n [class.est-pointer]=\"UseCustomCellActions && CustomCellActionsOn.indexOf('$' + rowItem.propertyName + '$') != -1\"\r\n (click)=\"cellClicked(rowItem.propertyName, item) && !CellActionPropagates && $event.stopPropagation()\"\r\n [Internal]=\"false\" [Context]=\"item._hash\">\r\n {{value}}\r\n </td>\r\n</ng-template>\r\n\r\n<!-- Questo template contiene la print condizionale delle celle custom se configurate -->\r\n<ng-template #customCells let-item let-opt=\"templateOptions\">\r\n <ng-container *ngIf=\"UseCustomCells && RowTDs\">\r\n\r\n <td *ngIf=\"HasPinnedColumns\" class=\"est-pinned-body est-col-min\" [class.est-white-selected]=\"item._selected\">\r\n <div [style.width.px]=\"PinnedContainerWidth\" class=\"est-pinned-border\">\r\n <td *ngIf=\"!item.locked && !item._sep && Selection\" class=\"est-no-border est-col-min\" [style.width.px]=\"20\">\r\n <input type=\"checkbox\" [disabled]=\"opt.selDisabled\" [class.est-pointer]=\"!item.locked\" [(ngModel)]=\"item._selected\" name=\"check{{item._hash}}\" (click)=\"$event.stopPropagation(); handleClick($event, item);\">\r\n </td>\r\n <td class=\"est-no-border est-col-min\" *ngIf=\"(item.locked || item._sep) && Selection\" [style.width.px]=\"20\"></td>\r\n\r\n <ng-container *ngFor=\"let rowItem of RowTDs[item._hash]; let i = index\">\r\n <td *ngIf=\"rowItem && rowItem.Pinned\" [style.width.px]=\"rowItem.PinnedWidth\" es-td=\"{{rowItem.ID}}\" class=\"{{rowItem.Class}}\" [class.est-no-border]=\"true\" [class.est-rg-hdr]=\"rowItem.GroupHeader\" [class.est-rg-agg]=\"rowItem.GroupAggregation\" \r\n [class.est-nowrap]=\"Hierarchy || !rowItem.Wraps\" [Internal]=\"true\">\r\n <ng-container *ngIf=\"Hierarchy && i == 0\"><ng-container *ngTemplateOutlet=\"HierarchyNavigator; context: { $implicit: item }\"></ng-container></ng-container>\r\n <ng-container *ngIf=\"rowItem.Template\"><ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: item }\"></ng-container></ng-container>\r\n <span *ngIf=\"!rowItem.Template\">{{rowItem.Content}}</span>\r\n </td>\r\n </ng-container>\r\n </div>\r\n </td>\r\n\r\n <ng-container *ngFor=\"let rowItem of RowTDs[item._hash]; let i = index\">\r\n <ng-container *ngIf=\"rowItem && !rowItem.Pinned\">\r\n\r\n <!-- Casistica senza bodyRef, quindi con direttive per i td -->\r\n <ng-container *ngIf=\"!bodyRef && rowItem.Visible\">\r\n <td es-td=\"{{rowItem.ID}}\" class=\"{{rowItem.Class}}\" [class.est-ltab-border]=\"rowItem.LeftBorder\" [class.est-rtab-border]=\"rowItem.RightBorder\" [class.est-rg-hdr]=\"rowItem.GroupHeader\" [class.est-rg-agg]=\"rowItem.GroupAggregation\" \r\n [class.est-nowrap]=\"Hierarchy || !rowItem.Wraps\" [Internal]=\"true\">\r\n <ng-container *ngIf=\"Hierarchy && i == 0\"><ng-container *ngTemplateOutlet=\"HierarchyNavigator; context: { $implicit: item }\"></ng-container></ng-container>\r\n <ng-container *ngIf=\"rowItem.Template\"><ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: item }\"></ng-container></ng-container>\r\n <span *ngIf=\"!rowItem.Template\">{{rowItem.Content}}</span>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Casistica bodyRef, quindi con componenti per i td (RouterLink) DEPRECATO -->\r\n <ng-container *ngIf=\"rowItem.RouterLink && rowItem.Visible && bodyRef\">\r\n <td es-td=\"{{rowItem.ID}}\" class=\"{{rowItem.Class}}\" [class.est-nowrap]=\"Hierarchy || !rowItem.Wraps\" [Internal]=\"true\">\r\n <ng-container *ngIf=\"Hierarchy && i == 0\">\r\n <ng-container *ngTemplateOutlet=\"HierarchyNavigator; context: { $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <a [routerLink]='rowItem.RouterLink' class=\"est-link\" [innerHTML]=\"rowItem.Content\"></a>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Casistica bodyRef, quindi con componenti per i td (NON RouterLink) DEPRECATO -->\r\n <ng-container *ngIf=\"!rowItem.RouterLink && rowItem.Visible && bodyRef\">\r\n <td es-td=\"{{rowItem.ID}}\" class=\"{{rowItem.Class}}\" [class.est-nowrap]=\"Hierarchy || !rowItem.Wraps\" [class.est-pointer]=\"UseCustomCellActions && CustomCellActionsOn.indexOf('$' + $any(rowItem).ID + '$') != -1\" (click)=\"cellClicked(rowItem.ID, item) && !CellActionPropagates && $event.stopPropagation()\" [Internal]=\"true\">\r\n <ng-container *ngIf=\"Hierarchy && i == 0\">\r\n <ng-container *ngTemplateOutlet=\"HierarchyNavigator; context: { $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowItem.Template\">\r\n <ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <span *ngIf=\"!rowItem.Template\" [innerHTML]=\"rowItem.Content\"></span>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #HierarchyNavigator let-item>\r\n <span *ngIf=\"!item.parent\" class=\"fa fa-chevron-down\" style=\"visibility:hidden\"></span>\r\n <span *ngIf=\"item.parent && item._expanded\" class=\"fa fa-chevron-down est-pointer est-no-selection\" (click)=\"hierarchyMode_H.collapseParent(item[this.OwnKey])\"></span>\r\n <span *ngIf=\"item.parent && !item._expanded\" class=\"fa fa-chevron-up est-pointer est-no-selection\" (click)=\"hierarchyMode_H.expandParent(item[this.OwnKey])\"></span>\r\n \r\n</ng-template>\r\n\r\n<!-- Questo template contiene i pulsanti di eliminazione/undo eliminazione ed esportazione che vanno in fondo ad un record edlla tabella -->\r\n<ng-template #bodyDeleteAndExport let-options>\r\n <ng-container *ngIf=\"Removal && !RemovalCondition\">\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"!(options.item.removed || options.item.deleted)\"><span class=\"fa fa-remove est-pointer text-danger\" [hidden]=\"options.item.removable != undefined && !options.item.removable\" (click)=\"onRemoval.emit(options.item)\"></span></td>\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"(options.item.removed || options.item.deleted)\"><span class=\"fa fa-undo text-warning est-pointer\" (click)=\"onAbortRemoval.emit(options.item)\"></span></td>\r\n </ng-container>\r\n <ng-container *ngIf=\"Removal && RemovalCondition\">\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"!(options.item.removed || options.item.deleted) && options.item[RemovalCondition]\"><span class=\"fa fa-remove est-pointer text-danger\" [hidden]=\"options.item.removable != undefined && !options.item.removable\" (click)=\"onRemoval.emit(options.item)\"></span></td>\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"(options.item.removed || options.item.deleted) && options.item[RemovalCondition]\"><span class=\"fa fa-undo text-warning est-pointer\" (click)=\"onAbortRemoval.emit(options.item)\"></span></td>\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"!options.item[RemovalCondition]\"><span class=\"fa fa-remove est-hidden-view\"></span></td>\r\n </ng-container>\r\n <td *ngIf=\"Export || HiddenColumns || CornerMenuOptions\" class=\"est-sticky-last-column{{options.even && !Hierarchy ? '-alt' : ''}}\"></td>\r\n</ng-template>\r\n\r\n<!-- Context menu vuoto default per tutte le tabella che non ce l'hanno, in modo che al click destro appaia \"nessuna op disponibile\" -->\r\n<context-menu #emptyMenu>\r\n <ng-template contextMenuItem>\r\n <span>\r\n <em>{{'No operations available' | localize : lc}}...</em>\r\n </span>\r\n </ng-template>\r\n</context-menu>\r\n\r\n<!-- Modal per cambiare posizione e visibilit\u00E0 delle colonne dell'es-table -->\r\n<div bsModal #changeColumnVisibilityModal=\"bs-modal\" class=\"modal fade\" role=\"dialog\" aria-hidden=\"true\">\r\n <div class=\"modal-dialog modal-lg\" cdkDrag>\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header est-pointer\" cdkDragHandle>\r\n <h5 class=\"modal-title pull-left\">\r\n <ng-container *ngIf=\"!HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Order' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && !ColumnsOrdering\">\r\n {{'Columns Visibility' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Visibility and Order' | localize : lc}}\r\n </ng-container>\r\n </h5>\r\n <button type=\"button\" class=\"close pull-right\" (click)=\"changeColumnVisibilityModal.hide();\" aria-label=\"Close\">\r\n <span aria-hidden=\"true\">×</span>\r\n </button>\r\n </div>\r\n <div class=\"modal-body\">\r\n <div *ngIf=\"!TMPColumnsList || TMPColumnsList.length == 0\" class=\"card card-info est-padding-10 est-margin-bottom-0\">\r\n {{'There are no columns configured to be hidden/shown in this view' | localize : lc}}\r\n </div>\r\n <div *ngIf=\"TMPColumnsList && TMPColumnsList.length > 0\" style=\"max-height:500px; overflow-y:auto\">\r\n <!--Aaaaaaah la tristezza... qui mi servirebbe l'es-table per facilitare la selezione multipla ecc... peccato che se la linko qui entro in un loop impressionante-->\r\n <table class=\"table table-striped table-sm est-margin-bottom-0\">\r\n <thead>\r\n <tr>\r\n <th class=\"est-col-min\" *ngIf=\"HiddenColumns\">\r\n <input class=\"est-pointer\" type=\"checkbox\" [(ngModel)]=\"globalColVisCheck\" [ngModelOptions]=\"{'standalone': true}\" (ngModelChange)=\"columnMetadata_H.globalColVisCheckChanged();\">\r\n </th>\r\n <!-- <th class=\"est-col-min\" *ngIf=\"ColumnsOrdering\"></th> -->\r\n <th class=\"est-col-min est-nowrap\">{{'Column Name' | localize : lc}}</th>\r\n <!--Filler-->\r\n <th></th>\r\n <!-- Pinner -->\r\n <th *ngIf=\"DirectivesBased\" class=\"est-col-min\"></th>\r\n </tr>\r\n </thead>\r\n <tbody \r\n cdkDropList \r\n [cdkDropListData]=\"TMPColumnsList\" \r\n (cdkDropListDropped)=\"columnMetadata_H.columnReordered($event)\" \r\n [cdkDropListSortPredicate]=\"columnMetadata_H.sortPredicate.bind(this.columnMetadata_H)\"\r\n class=\"est-dropbox\">\r\n\r\n <tr *ngFor=\"let item of TMPColumnsList; let i = index; let last = last\" \r\n class=\"est-pointer est-droplist\" \r\n [class.est-white-selected]=\"lastSelectedItemID == item.id\" \r\n [class.est-no-selection]=\"!item.visible\"\r\n cdkDrag\r\n [cdkDragData]=\"item\"\r\n [cdkDragDisabled]=\"!ColumnsOrdering || item.fixed || item.pinned\">\r\n\r\n <td *ngIf=\"HiddenColumns\">\r\n <input type=\"checkbox\" [class.est-hidden-view]=\"item.fixed\" class=\"est-pointer\" [(ngModel)]=\"item.visible\" name=\"visible{{i}}\" (ngModelChange)=\"columnMetadata_H.updateGlobalColVisCheck();\" />\r\n </td>\r\n <!-- <td class=\"est-nowrap\" *ngIf=\"ColumnsOrdering\">\r\n <span class=\"fa fa-arrow-up\" [class.est-hidden-view]=\"item.fixed || item.pinned\" (click)=\"lastSelectedItemID = item.id; i != 0 && !item.fixed && columnMetadata_H.sendUp(item); $event.stopPropagation();\"></span>\r\n <span class=\"fa fa-arrow-down\" [class.est-hidden-view]=\"item.fixed || item.pinned\" (click)=\"lastSelectedItemID = item.id; !last && !item.fixed && columnMetadata_H.sendDown(item); $event.stopPropagation();\"></span>\r\n </td> -->\r\n <td class=\"est-nowrap drag-visible\" (click)=\"columnMetadata_H.columnClicked(item);\">\r\n <ng-container *ngIf=\"item.template\">\r\n <!-- Padri -->\r\n <span *ngIf=\"item.parentTemplates && item.parentTemplates.length > 0\" class=\"est-fw-bold est-fs-13\">\r\n ( \r\n <ng-container *ngFor=\"let parent of item.parentTemplates; let last=last\">\r\n <ng-container *ngTemplateOutlet=\"parent\"></ng-container>\r\n <span *ngIf=\"!last\"> - </span>\r\n </ng-container>\r\n )\r\n </span>\r\n <!-- Template header originale -->\r\n <ng-container *ngTemplateOutlet=\"item.template\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!item.template\">{{item.description}}</ng-container>\r\n </td>\r\n <!--Filler-->\r\n <td (click)=\"columnMetadata_H.columnClicked(item);\"></td>\r\n <!-- Pinner -->\r\n <td *ngIf=\"DirectivesBased\"><span *ngIf=\"!item.fixed\" class=\"fa fa-thumb-tack\" [class.text-success]=\"item.pinned\" (click)=\"columnMetadata_H.pinOrUnpinColumn(item)\"></span></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary est-margin-right-10\" (click)=\"lastSelectedItemID = null; changeColumnVisibilityModal.hide();\">{{'Close' | localize : lc}}</button>\r\n <button type=\"button\" [disabled]=\"!TMPColumnsList || TMPColumnsList.length == 0\" class=\"btn btn-primary\" (click)=\"columnMetadata_H.confirmColumnVisibilitySelection() && changeColumnVisibilityModal.hide()\">{{'Confirm' | localize : lc}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>",
|
|
3913
|
+
template: "<!-- Patacchino di autoaggiornamento -->\r\n<div class=\"w-100\" *ngIf=\"AutoUpdate\">\r\n <div class=\"pull-right\">\r\n {{'Update every' | localize : lc}} <input [readonly]=\"autoUpdate\" maxlength=\"3\" class=\"form-control est-custom-input\" type=\"text\" [(ngModel)]=\"seconds\" /> {{'second/s' | localize : lc}}\r\n </div>\r\n <div class=\"pull-right m-t-2\">\r\n <label class=\"est-switch\">\r\n <input type=\"checkbox\" [(ngModel)]=\"autoUpdate\" (ngModelChange)=\"autoUpdateChanged();\" />\r\n <div class=\"est-slider round\"></div>\r\n </label>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<div *ngIf=\"View\" class=\"est-relative\">\r\n <div *ngIf=\"FirstBind && ShowLoadingOnBootstrap\" class=\"est-loading-box\">\r\n <div class=\"est-loading-content\">\r\n <span class=\"fa fa-spinner fa-spin\"></span> {{'Performing Table bootstrap' | localize: lc}}...\r\n </div>\r\n </div>\r\n\r\n <div class=\"est-top-pager\" *ngIf=\"PagingStyle == 'both' || PagingStyle == 'top'\">\r\n <ng-container *ngTemplateOutlet=\"pagingElement\"></ng-container>\r\n </div>\r\n\r\n <div class=\"est-top-allselect\" *ngIf=\"canSelectAll || (!reportMode && (View?.selection || arraymodeSelection)?.all)\">\r\n <span>{{ (selectedObjects == -1 ? ('All the' | localize : lc) : ((selectedObjects || 0) | number : '0.0-0' : locale)) + ' ' + ((selectedObjects == 1 ? 'Object Selected' : 'Objects Selected') | localize : lc) }}</span> \r\n <span class=\"est-link est-inline\" (click)=\"selection_H.selectAllOrResetSelection()\">{{ (View?.selection || arraymodeSelection)?.all ? ('Reset Selection' | localize : lc) : ('Select Everything' | localize : lc)}}</span>\r\n </div>\r\n\r\n <div class=\"table-responsive datatable {{ContainerClass}}\" [style.max-height.px]=\"MaxHeight\">\r\n <table class=\"{{ TableClass }} est-margin-bottom-10\" [class.est-high-density]=\"HighCellDensity\">\r\n <thead [hidden]=\"HeaderHidden || FirstBind\">\r\n <!-- Aggiungo il pezzo che gestisce la selezione di tutto se attivo da config -->\r\n <tr *ngIf=\"SelectAll || PagingStyle != 'bottom'\">\r\n <th class=\"est-no-selection\" [attr.colspan]=\"Columns.Global\" [class.est-hidden-view]=\"!canSelectAll && (reportMode || !(View?.selection || arraymodeSelection)?.all) && PagingStyle == 'bottom'\">\r\n <p class=\"est-hidden-view app-margin-bottom-0\">\u00A7</p>\r\n </th>\r\n </tr>\r\n\r\n <!-- Blocco header group -->\r\n <ng-container *ngIf=\"RowThGroups\">\r\n <tr *ngFor=\"let level of RowThGroups\">\r\n <th *ngFor=\"let cell of level\" [attr.colspan]=\"cell.Span\" \r\n [class.est-pinned-header]=\"cell.Pinned\" [class.est-col-min]=\"cell.Pinned\"\r\n [class.est-ltab-border]=\"cell.Borders\" [class.est-rtab-border]=\"cell.Borders\"\r\n class=\"est-text-center\">\r\n <ng-container *ngIf=\"cell.Pinned; Else: cell.Template\">\r\n <div class=\"est-pinned-border est-cell-group-padding\"></div>\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!RowThGroups\">\r\n <tr *ngIf=\"HasHeaderGroup\">\r\n <ng-container *ngTemplateOutlet=\"headerGroupRef\"></ng-container>\r\n <th *ngIf=\"Export\"></th>\r\n </tr>\r\n \r\n <!-- Blocco header group secondario -->\r\n <tr *ngIf=\"HasSecondaryHeaderGroup\">\r\n <ng-container *ngTemplateOutlet=\"secondaryHeaderGroupRef\"></ng-container>\r\n <th *ngIf=\"Export\"></th>\r\n </tr>\r\n </ng-container>\r\n\r\n <!-- Blocco effettivo degli header -->\r\n <tr>\r\n <!-- Aggiungo una checkbox se la selezione \u00E8 attiva -->\r\n <th class=\"est-col-min\" *ngIf=\"Selection && !HasPinnedColumns\">\r\n <input *ngIf=\"!SingleSelection\" class=\"est-pointer\" type=\"checkbox\" [disabled]=\"SelectionDisabled\" [(ngModel)]=\"globalCheck\" [ngModelOptions]=\"{'standalone': true}\" (ngModelChange)=\"globalCheckChanged();\">\r\n </th>\r\n\r\n <!-- Header che valgono per view mode e array mode -->\r\n <ng-container *ngIf=\"(viewMode || arrayMode)\">\r\n\r\n <!-- In una tabella base prendo semplicemente i th scritti dall'utente nell'HTML -->\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTHs) && !DynamicRowColumnsDefinition\">\r\n <ng-container *ngTemplateOutlet=\"headerRef\"></ng-container>\r\n </ng-container>\r\n\r\n <!-- Se ho un modello dinamico dell'oggetto creo le colonne in base alle propriet\u00E0 -->\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTHs) && DynamicRowColumnsDefinition\">\r\n <th *ngFor=\"let operation of DynamicOperations\" class=\"est-col-min est-no-side-padding\"></th>\r\n \r\n <ng-container *ngFor=\"let rowHeader of DynamicRowColumnsDefinition\">\r\n <ng-container *ngIf=\"rowHeader.visible\">\r\n <th *ngIf=\"OrderByColumn\" es-th=\"{{rowHeader.propertyName}}\" class=\"{{UserDefinedDynamicCols ? ((rowHeader.clss || '') + (rowHeader.headerWraps ? '' : ' est-nowrap')) : ' est-nowrap'}}\" [Order]=\"rowHeader.dataOrder\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.orderable\" [OrderBy]=\"OrderByColumn\" [SearchInProgress]=\"!!researchInProgress\" (onOrderChange)=\"thOrderChanged(rowHeader.propertyName, $event)\">{{rowHeader.description}}</th>\r\n <th *ngIf=\"!OrderByColumn\" es-th=\"{{rowHeader.propertyName}}\" class=\"{{UserDefinedDynamicCols ? ((rowHeader.clss || '') + (rowHeader.headerWraps ? '' : ' est-nowrap')) : ' est-nowrap'}}\" [Order]=\"rowHeader.dataOrder\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.orderable\" [OrderBy]=\"OrderByColumn\">{{rowHeader.description}}</th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- Se non ho un modello dinamico ma invece delle celle custom, genero gli header in base ai row th -->\r\n <ng-container *ngIf=\"UseCustomCells && RowTHs\">\r\n <th *ngIf=\"HasPinnedColumns\" class=\"est-pinned-header est-col-min\">\r\n <div [style.width.px]=\"PinnedContainerWidth\" class=\"est-pinned-border est-simple-border-bottom\">\r\n <th class=\"est-col-min est-no-border\" *ngIf=\"Selection\" [style.width.px]=\"20\">\r\n <input *ngIf=\"!SingleSelection\" class=\"est-pointer\" type=\"checkbox\" [disabled]=\"SelectionDisabled\" [(ngModel)]=\"globalCheck\" [ngModelOptions]=\"{'standalone': true}\" (ngModelChange)=\"globalCheckChanged();\">\r\n </th>\r\n <ng-container *ngFor=\"let rowHeader of RowTHs\">\r\n <th *ngIf=\"rowHeader && rowHeader.Visible && rowHeader.Pinned\" [style.width.px]=\"rowHeader.PinnedWidth\" es-th=\"{{rowHeader.ID}}\" \r\n class=\"{{rowHeader.Class || ''}}\" \r\n [class.est-pinned-internal-header]=\"true\" \r\n [class.est-no-border]=\"true\" \r\n [class.est-nowrap]=\"!rowHeader.Wrap\" \r\n [Pinned]=\"true\" [Fixed]=\"rowHeader.Fixed\" [Order]=\"rowHeader.Order\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.Orderable\" [OrderBy]=\"OrderByColumn\" [SearchInProgress]=\"!!researchInProgress\" (onUnpinning)=\"columnMetadata_H.unpinColumn($event)\" (onOrderChange)=\"OrderByColumn && thOrderChanged(rowHeader.ID, $event)\">\r\n <ng-container *ngIf=\"rowHeader.Template\"><ng-container *ngTemplateOutlet=\"rowHeader.Template;\"></ng-container></ng-container>\r\n <span *ngIf=\"!rowHeader.Template\">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </div>\r\n </th>\r\n <ng-container *ngFor=\"let rowHeader of RowTHs\">\r\n <th *ngIf=\"rowHeader && rowHeader.Visible && !rowHeader.Pinned\" es-th=\"{{rowHeader.ID}}\" class=\"{{rowHeader.Class || ''}}\" [class.est-ltab-border]=\"rowHeader.LeftBorder\" [class.est-rtab-border]=\"rowHeader.RightBorder\" [class.est-nowrap]=\"!rowHeader.Wrap\" [Order]=\"rowHeader.Order\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.Orderable\" [OrderBy]=\"OrderByColumn\" [SearchInProgress]=\"!!researchInProgress\" (onOrderChange)=\"OrderByColumn && thOrderChanged(rowHeader.ID, $event)\">\r\n <ng-container *ngIf=\"rowHeader.Template\"><ng-container *ngTemplateOutlet=\"rowHeader.Template;\"></ng-container></ng-container>\r\n <span *ngIf=\"!rowHeader.Template\">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!--Casistica in cui ho il setup proveniente da un report. Gli header sono definiti da come \u00E8 fatto il report-->\r\n <ng-container *ngIf=\"reportMode\">\r\n <th [style.color]=\"clm.color\" *ngFor=\"let clm of ReportValues.columns\" class=\"est-no-selection est-pointer est-nowrap\" (click)=\"reportMode_H.setupNextOrderAndSearch(clm)\">\r\n {{clm.description}}<span class=\"fa\" [class.fa-chevron-down]=\"clm.order == 'DESC'\" [class.fa-chevron-up]=\"clm.order == 'ASC'\"></span>\r\n </th>\r\n </ng-container>\r\n\r\n <!--Per l'eliminazione mi serve un header aggiuntivo-->\r\n <th *ngIf=\"Removal\" [class.est-right-9]=\"Export || HiddenColumns\" class=\"est-col-min est-sticky-last-column\"><span class=\"fa fa-trash\"></span></th>\r\n\r\n <!--Per l'esportazione mi serve l'header extra da cui faccio uscire i 3 pallocchi-->\r\n <th *ngIf=\"Export || HiddenColumns || ColumnsOrdering || CornerMenuOptions\" class=\"est-table-dotted-menu est-sticky-last-column est-col-min text-sm-center\">\r\n \r\n <!-- Link nascosto che serve a scaricare il file -->\r\n <a *ngIf=\"headers\" hidden #exportDownloader csvLink [data]=\"data\" [headers]=\"headers\" [delimiter]=\"';'\" [filename]=\"ExportFileName.endsWith('.xlsx') ? ExportFileName.replace('.xlsx', '.csv') : ExportFileName.endsWith('.csv') ? ExportFileName : ExportFileName + '.csv'\"></a>\r\n\r\n <!-- Blocco con i 3 pallocchi che tira fuori il context menu delle operazioni -->\r\n <div class=\"btn-group\" container=\"body\" placement=\"bottom right\" dropdown #dropdown=\"bs-dropdown\" [autoClose]=\"true\">\r\n <span dropdownToggle class=\"fa fa-ellipsis-v est-fs-18 est-pointer est-padding-3\"></span>\r\n\r\n <div *dropdownMenu class=\"dropdown-menu dropdown-menu-right est-bring-to-front-strong\">\r\n <div class=\"est-pointer\">\r\n <a class=\"dropdown-item\" *ngIf=\"HiddenColumns || ColumnsOrdering\" (click)=\"columnMetadata_H.resetColumnVisSelection(); changeColumnVisibilityModal.show();\">\r\n <ng-container *ngIf=\"!HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Order' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && !ColumnsOrdering\">\r\n {{'Columns Visibility' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Visibility and Order' | localize : lc}}\r\n </ng-container>\r\n </a>\r\n <a class=\"dropdown-item\" *ngIf=\"Export && CSVExport\" (click)=\"export_H.tryExport('CSV')\">{{'Export View' | localize : lc}} (CSV)</a>\r\n <a class=\"dropdown-item\" *ngIf=\"Export && XLSXExport\" (click)=\"export_H.tryExport('XLSX')\">{{'Export View' | localize : lc}} (XLSX)</a>\r\n <a class=\"dropdown-item\" *ngFor=\"let option of CornerMenuOptions\" (click)=\"cornerActionClicked(option.id)\">{{option.description}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n </tr>\r\n </thead>\r\n \r\n <!-- Valido per modalit\u00E0 View o Array. Se sono in report mode il body \u00E8 creato in altro modo -->\r\n <tbody [hidden]=\"BodyHidden || FirstBind\" *ngIf=\"(arrayMode || viewMode)\">\r\n <!--Con selection attiva richiamo il template che gestisce il context menu-->\r\n <ng-container *ngIf=\"Selection\">\r\n <ng-container *ngTemplateOutlet=\"TBodySelection; context: { $implicit: { selDisabled: arrayMode ? false : SelectionDisabled, sel: Selection }}\"></ng-container>\r\n </ng-container>\r\n\r\n <!--Senza selection richiamo il template che NON gestisce il context menu-->\r\n <ng-container *ngIf=\"!Selection\">\r\n <ng-container *ngTemplateOutlet=\"TBody\"></ng-container>\r\n </ng-container>\r\n </tbody>\r\n\r\n <!-- Per la modalit\u00E0 a report c'\u00E8 un body particolare semi-dinamico -->\r\n <tbody [hidden]=\"BodyHidden\" *ngIf=\"reportMode\">\r\n <tr *ngFor=\"let row of ReportValues.rows; let even = even;\">\r\n <td class=\"est-nowrap\" *ngFor=\"let val of row.values\">{{val}}</td>\r\n <td class=\"est-sticky-last-column{{even && !Hierarchy ? '-alt' : ''}}\"></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n <div *ngIf=\"PagingStyle == 'both' || PagingStyle == 'bottom'\">\r\n <ng-container *ngTemplateOutlet=\"pagingElement\"></ng-container>\r\n </div>\r\n</div>\r\n\r\n<!-- Template che contiene tutte le info di paginazione in modo da poterlo replicare anche sopra -->\r\n<ng-template #pagingElement>\r\n <ng-container *ngIf=\"!FirstBind\">\r\n <!-- Pulsanti avanti-indietro di paginazione -->\r\n <div *ngIf=\"PagerOptions.ShowPaging && PagerOptions.ShowButtons && (PagerOptions.PagerCount > 10 || PagerOptions.PagerCount == -1)\" class=\"pull-right btn-toolbar\">\r\n <ng-container *ngIf=\"(!reportMode || View?.pagingavailable) && (!arrayMode || SearchView)\">\r\n <ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { Margin: true, ATP: addToPage.bind(this), GTP: goToPage.bind(this), Array: arrayPulsanti }}\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"arrayMode && UseArrayModePaging && !SearchView\">\r\n <ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { Margin: true, ATP: arrayAddToPage.bind(this), GTP: arrayGoToPage.bind(this), Array: arrayPulsanti }}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <!-- Paginatore dove appare la count e le opzioni di paginazione -->\r\n <div class=\"pull-right\" *ngIf=\"PagerOptions.ShowCount || PagerOptions.ShowPagingOptions\">\r\n <div class=\"est-mt-min-5\" *ngIf=\"PagerOptions.ShowPaging\">\r\n <app-paging *ngIf=\"!PagerOptions.UsesView\" [CountLabel]=\"CountLabel\" [ShowPaging]=\"PagerOptions.ShowPagingOptions\" [ShowCount]=\"PagerOptions.ShowCount\" [PagerCount]=\"PagerOptions.PagerCount\" [WarnOnAll]=\"false\" [CurrentPageSize]=\"ArraymodeItemsPerPage\" (pagingSelected)=\"items_H.refreshPaging($event)\"></app-paging>\r\n <app-paging *ngIf=\"PagerOptions.UsesView\" [CountLabel]=\"CountLabel\" [ShowPaging]=\"PagerOptions.ShowPagingOptions\" [ShowCount]=\"PagerOptions.ShowCount\" [PagerCount]=\"PagerOptions.PagerCount\" [GroupMode]=\"PagerOptions.Searches == 'groups'\" [AllSearch]=\"AllSearch\" [View]=\"PagerOptions.View\" (pagingSelected)=\"onItemsPerPageChanged($event);\"></app-paging>\r\n </div>\r\n <div *ngIf=\"reportMode && !PagerOptions.ShowPaging\"><em>{{'Paging options are not available for this report' | localize: lc}}</em></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<!-- Template che contiene i pulsanti per cambiare pagina -->\r\n<ng-template #pagingButtons let-options>\r\n <div class=\"est-flex\" [class.est-margin-left-50]=\"options.Margin\">\r\n <a class=\"btn\" class=\"est-page-prev app-pointer\" (click)=\"options.ATP(-1, options.separator)\"><span class=\"fa fa-chevron-left\"></span></a>\r\n <div *ngIf=\"options.Array\" class=\"est-inline\"><a *ngFor=\"let p of options.Array\" class=\"btn est-page-sel {{p.cssClass}}\" (click)=\"options.GTP(p.val, options.separator)\">{{p.val}}</a></div>\r\n <a class=\"btn\" class=\"est-page-next app-pointer\" (click)=\"options.ATP(1, options.separator)\"><span class=\"fa fa-chevron-right\"></span></a>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Questi due template rappresentano effettivamente il body della tabella. essendo il tr l'unica cosa che davvero cambia, il resto \u00E8 templatizzato -->\r\n<ng-template #TBodySelection let-templateOptions>\r\n <ng-container *ngFor=\"let item of boundSource; let even = even; let i=index; trackBy: bodyTrackBy\">\r\n <tr *ngIf=\"item._visible || (!Hierarchy && !ArrayGrouping)\" \r\n [class]=\"item._rowClass ? item._rowClass : ''\" \r\n [class.est-line-through]=\"item.removed || item.deleted\" \r\n [class.est-pointer]=\"!item.locked\" \r\n [class.est-white-selected]=\"item._selected && !item.locked\"\r\n [class.est-rg]=\"item._group\"\r\n [class.est-rg-sep]=\"item._sep\"\r\n [contextMenu]=\"!item.locked ? (ContextMenu || emptyMenu) : emptyMenu\" [contextMenuSubject]=\"item\"\r\n (click)=\"(!item.locked && !item._sep && !item._group && handleClick($event, item)) || item._group && handleGroupClick(item)\">\r\n\r\n <td *ngIf=\"!item.locked && !item._sep && !HasPinnedColumns\">\r\n <input type=\"checkbox\" \r\n [disabled]=\"templateOptions.selDisabled\" \r\n [class.est-pointer]=\"!item.locked\"\r\n [(ngModel)]=\"item._selected\" name=\"check{{i}}\" \r\n (click)=\"$event.stopPropagation(); handleClick($event, item);\">\r\n </td>\r\n <td *ngIf=\"(item.locked || item._sep) && !HasPinnedColumns\"></td>\r\n\r\n <ng-container *ngIf=\"item._sep\"><ng-container *ngTemplateOutlet=\"groupPager; context: { $implicit: item }\"></ng-container> </ng-container>\r\n\r\n <ng-container *ngIf=\"!item._sep\">\r\n <ng-container *ngTemplateOutlet=\"basicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"dynamicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"customCells; context: { $implicit: item, templateOptions: templateOptions }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}\"></ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #TBody>\r\n <ng-container *ngFor=\"let item of boundSource; let even = even;\">\r\n <tr *ngIf=\"item._visible || !Hierarchy\" \r\n [class]=\"item._rowClass ? item._rowClass : ''\" \r\n [class.est-line-through]=\"item.removed || item.deleted\"\r\n [class.est-rg]=\"item._group\"\r\n [class.est-rg-sep]=\"item._sep\"\r\n (click)=\"item._group && handleGroupClick(item)\">\r\n\r\n <ng-container *ngIf=\"item._sep\"><ng-container *ngTemplateOutlet=\"groupPager; context: { $implicit: item }\"></ng-container></ng-container>\r\n\r\n <ng-container *ngIf=\"!item._sep\">\r\n <ng-container *ngTemplateOutlet=\"basicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"dynamicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"customCells; context: { $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}\"></ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #groupPager let-item>\r\n <td class=\"est-pinned-body \" *ngIf=\"HasPinnedColumns\"><div class=\"est-pinned-border est-cell-group-padding\"></div></td>\r\n <td *ngIf=\"item._grouplevel > 1\" [attr.colspan]=\"item._grouplevel-1\"></td>\r\n <td [attr.colspan]=\"Columns.VisibleUnpinned - (item._grouplevel > 0 ? item._grouplevel - 1 : 0)\">\r\n <div class=\"est-rg-sep-flex-right\" *ngIf=\"RowGroupingPagingStyle == 'right'\">\r\n <div class=\"est-rg-page\"><ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { separator: item, ATP: addToPageGroup.bind(this), GTP: goToPageGroup.bind(this), Array: item.buttons }}\"></ng-container></div>\r\n <div class=\"est-rg-ipp\" *ngIf=\"(item.searches == 'groups' ? item.view.groupcount : item.view.objectcount) > 10\"><app-paging [CountLabel]=\"CountLabel\" [AllSearch]=\"AllSearch\" [GroupMode]=\"item.searches == 'groups'\" [PagerCount]=\"item.searches == 'groups' ? item.view.groupcount : item.view.objectcount\" [View]=\"item.view\" (pagingSelected)=\"onGroupItemsPerPageChanged(item, $event);\"></app-paging></div>\r\n </div>\r\n\r\n <div class=\"est-rg-sep-flex-left\" *ngIf=\"RowGroupingPagingStyle == 'left'\">\r\n <div class=\"est-rg-ipp\"><app-paging [AllSearch]=\"AllSearch\" [CountLabel]=\"CountLabel\" [GroupMode]=\"item.searches == 'groups'\" [PagerCount]=\"item.searches == 'groups' ? item.view.groupcount : item.view.objectcount\" [View]=\"item.view\" (pagingSelected)=\"onGroupItemsPerPageChanged(item, $event);\"></app-paging></div>\r\n <div class=\"est-rg-page\" *ngIf=\"(item.searches == 'groups' ? item.view.groupcount : item.view.objectcount) > 10\"><ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { separator: item, ATP: addToPageGroup.bind(this), GTP: goToPageGroup.bind(this), Array: item.buttons }}\"></ng-container></div>\r\n </div>\r\n </td>\r\n</ng-template>\r\n\r\n<!-- Questo template contiene la print condizionale su tabelle semplici, con header e body scritti a manazza -->\r\n<ng-template #basicColumns let-item>\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTDs) && !DynamicRowColumnsDefinition\">\r\n <ng-container *ngTemplateOutlet=\"bodyRef; context : {$implicit: item}\"></ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<!-- Questo template contiene la print condizionale su tabelle definite in maniera dinamica dal modello -->\r\n<ng-template #dynamicColumns let-item>\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTDs) && DynamicRowColumnsDefinition\">\r\n <ng-container *ngFor=\"let operation of DynamicOperations; let first = first; let last = last;\">\r\n <ng-container *ngIf=\"!operation.conditionField || (item.properties[operation.conditionField] == operation.conditionValue)\">\r\n <td [class.est-no-right-padding]=\"last\" [class.est-no-left-padding]=\"!first\" class=\"est-col-min\"><span title=\"{{operation.title}}\" class=\"{{operation.iconClass}} est-pointer\" (click)=\"dynamicOperation(item, operation.id)\">{{operation.text}}</span></td>\r\n </ng-container>\r\n <ng-container *ngIf=\"operation.conditionField && (item.properties[operation.conditionField] != operation.conditionValue)\">\r\n <td class=\"est-col-min est-no-side-padding\"></td>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor=\"let rowItem of DynamicRowColumnsDefinition\">\r\n <ng-container *ngIf=\"rowItem.routePath && rowItem.visible\">\r\n <td es-td=\"{{rowItem.propertyName}}\" class=\"{{UserDefinedDynamicCols ? rowItem.clss : 'est-nowrap'}}\" [Internal]=\"false\" [Context]=\"item._hash\">\r\n <a [routerLink]=\"dynamicMode_H.generateRouterLink(rowItem.routePath, rowItem.routeParameterProperties, item)\" class=\"est-link\" [innerHTML]=\"item.properties[rowItem.propertyName]\"></a>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf=\"!rowItem.routePath && rowItem.visible\">\r\n <ng-container *ngTemplateOutlet=\"findEsTd(rowItem.propertyName) || defaultEsTd; context: { $implicit: item.properties[rowItem.propertyName], rowItem : rowItem, item : item }\"> </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEsTd let-value let-rowItem='rowItem' let-item='item'>\r\n <td es-td=\"{{rowItem.propertyName}}\" class=\"{{UserDefinedDynamicCols ? rowItem.clss : 'est-nowrap'}}\" [Internal]=\"false\" [Context]=\"item._hash\">\r\n {{value}}\r\n </td>\r\n</ng-template>\r\n\r\n<!-- Questo template contiene la print condizionale delle celle custom se configurate -->\r\n<ng-template #customCells let-item let-opt=\"templateOptions\">\r\n <ng-container *ngIf=\"UseCustomCells && RowTDs\">\r\n\r\n <td *ngIf=\"HasPinnedColumns\" class=\"est-pinned-body est-col-min\" [class.est-white-selected]=\"item._selected\">\r\n <div [style.width.px]=\"PinnedContainerWidth\" class=\"est-pinned-border\">\r\n <td *ngIf=\"!item.locked && !item._sep && Selection\" class=\"est-no-border est-col-min\" [style.width.px]=\"20\">\r\n <input type=\"checkbox\" [disabled]=\"opt.selDisabled\" [class.est-pointer]=\"!item.locked\" [(ngModel)]=\"item._selected\" name=\"check{{item._hash}}\" (click)=\"$event.stopPropagation(); handleClick($event, item);\">\r\n </td>\r\n <td class=\"est-no-border est-col-min\" *ngIf=\"(item.locked || item._sep) && Selection\" [style.width.px]=\"20\"></td>\r\n\r\n <ng-container *ngFor=\"let rowItem of RowTDs[item._hash]; let i = index\">\r\n <td *ngIf=\"rowItem && rowItem.Pinned && rowItem.Visible\" [style.width.px]=\"rowItem.PinnedWidth\" es-td=\"{{rowItem.ID}}\" class=\"{{rowItem.Class}}\" [class.est-no-border]=\"true\" [class.est-rg-hdr]=\"rowItem.GroupHeader\" [class.est-rg-agg]=\"rowItem.GroupAggregation\" \r\n [class.est-nowrap]=\"Hierarchy || !rowItem.Wraps\" [Internal]=\"true\">\r\n <ng-container *ngIf=\"Hierarchy && i == 0\"><ng-container *ngTemplateOutlet=\"HierarchyNavigator; context: { $implicit: item }\"></ng-container></ng-container>\r\n <ng-container *ngIf=\"rowItem.Template\"><ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: item }\"></ng-container></ng-container>\r\n <span *ngIf=\"!rowItem.Template\">{{rowItem.Content}}</span>\r\n </td>\r\n </ng-container>\r\n </div>\r\n </td>\r\n\r\n <ng-container *ngFor=\"let rowItem of RowTDs[item._hash]; let i = index\">\r\n <ng-container *ngIf=\"rowItem && !rowItem.Pinned\">\r\n\r\n <!-- Casistica senza bodyRef, quindi con direttive per i td -->\r\n <ng-container *ngIf=\"!bodyRef && rowItem.Visible\">\r\n <td es-td=\"{{rowItem.ID}}\" class=\"{{rowItem.Class}}\" [class.est-ltab-border]=\"rowItem.LeftBorder\" [class.est-rtab-border]=\"rowItem.RightBorder\" [class.est-rg-hdr]=\"rowItem.GroupHeader\" [class.est-rg-agg]=\"rowItem.GroupAggregation\" \r\n [class.est-nowrap]=\"Hierarchy || !rowItem.Wraps\" [Internal]=\"true\">\r\n <ng-container *ngIf=\"Hierarchy && i == 0\"><ng-container *ngTemplateOutlet=\"HierarchyNavigator; context: { $implicit: item }\"></ng-container></ng-container>\r\n <ng-container *ngIf=\"rowItem.Template\"><ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: item }\"></ng-container></ng-container>\r\n <span *ngIf=\"!rowItem.Template\">{{rowItem.Content}}</span>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Casistica bodyRef, quindi con componenti per i td (RouterLink) DEPRECATO -->\r\n <ng-container *ngIf=\"rowItem.RouterLink && rowItem.Visible && bodyRef\">\r\n <td es-td=\"{{rowItem.ID}}\" class=\"{{rowItem.Class}}\" [class.est-nowrap]=\"Hierarchy || !rowItem.Wraps\" [Internal]=\"true\">\r\n <ng-container *ngIf=\"Hierarchy && i == 0\">\r\n <ng-container *ngTemplateOutlet=\"HierarchyNavigator; context: { $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <a [routerLink]='rowItem.RouterLink' class=\"est-link\" [innerHTML]=\"rowItem.Content\"></a>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Casistica bodyRef, quindi con componenti per i td (NON RouterLink) DEPRECATO -->\r\n <ng-container *ngIf=\"!rowItem.RouterLink && rowItem.Visible && bodyRef\">\r\n <td es-td=\"{{rowItem.ID}}\" class=\"{{rowItem.Class}}\" [class.est-nowrap]=\"Hierarchy || !rowItem.Wraps\" [Internal]=\"true\">\r\n <ng-container *ngIf=\"Hierarchy && i == 0\">\r\n <ng-container *ngTemplateOutlet=\"HierarchyNavigator; context: { $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowItem.Template\">\r\n <ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <span *ngIf=\"!rowItem.Template\" [innerHTML]=\"rowItem.Content\"></span>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #HierarchyNavigator let-item>\r\n <span *ngIf=\"!item.parent\" class=\"fa fa-chevron-down\" style=\"visibility:hidden\"></span>\r\n <span *ngIf=\"item.parent && item._expanded\" class=\"fa fa-chevron-down est-pointer est-no-selection\" (click)=\"hierarchyMode_H.collapseParent(item[this.OwnKey])\"></span>\r\n <span *ngIf=\"item.parent && !item._expanded\" class=\"fa fa-chevron-up est-pointer est-no-selection\" (click)=\"hierarchyMode_H.expandParent(item[this.OwnKey])\"></span>\r\n \r\n</ng-template>\r\n\r\n<!-- Questo template contiene i pulsanti di eliminazione/undo eliminazione ed esportazione che vanno in fondo ad un record edlla tabella -->\r\n<ng-template #bodyDeleteAndExport let-options>\r\n <ng-container *ngIf=\"Removal && !RemovalCondition\">\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"!(options.item.removed || options.item.deleted)\"><span class=\"fa fa-remove est-pointer text-danger\" [hidden]=\"options.item.removable != undefined && !options.item.removable\" (click)=\"onRemoval.emit(options.item)\"></span></td>\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"(options.item.removed || options.item.deleted)\"><span class=\"fa fa-undo text-warning est-pointer\" (click)=\"onAbortRemoval.emit(options.item)\"></span></td>\r\n </ng-container>\r\n <ng-container *ngIf=\"Removal && RemovalCondition\">\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"!(options.item.removed || options.item.deleted) && options.item[RemovalCondition]\"><span class=\"fa fa-remove est-pointer text-danger\" [hidden]=\"options.item.removable != undefined && !options.item.removable\" (click)=\"onRemoval.emit(options.item)\"></span></td>\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"(options.item.removed || options.item.deleted) && options.item[RemovalCondition]\"><span class=\"fa fa-undo text-warning est-pointer\" (click)=\"onAbortRemoval.emit(options.item)\"></span></td>\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"!options.item[RemovalCondition]\"><span class=\"fa fa-remove est-hidden-view\"></span></td>\r\n </ng-container>\r\n <td *ngIf=\"Export || HiddenColumns || CornerMenuOptions\" class=\"est-sticky-last-column{{options.even && !Hierarchy ? '-alt' : ''}}\"></td>\r\n</ng-template>\r\n\r\n<!-- Context menu vuoto default per tutte le tabella che non ce l'hanno, in modo che al click destro appaia \"nessuna op disponibile\" -->\r\n<context-menu #emptyMenu>\r\n <ng-template contextMenuItem>\r\n <span>\r\n <em>{{'No operations available' | localize : lc}}...</em>\r\n </span>\r\n </ng-template>\r\n</context-menu>\r\n\r\n<!-- Modal per cambiare posizione e visibilit\u00E0 delle colonne dell'es-table -->\r\n<div bsModal #changeColumnVisibilityModal=\"bs-modal\" class=\"modal fade\" role=\"dialog\" aria-hidden=\"true\">\r\n <div class=\"modal-dialog modal-lg\" cdkDrag>\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header est-pointer\" cdkDragHandle>\r\n <h5 class=\"modal-title pull-left\">\r\n <ng-container *ngIf=\"!HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Order' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && !ColumnsOrdering\">\r\n {{'Columns Visibility' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Visibility and Order' | localize : lc}}\r\n </ng-container>\r\n </h5>\r\n <button type=\"button\" class=\"close pull-right\" (click)=\"changeColumnVisibilityModal.hide();\" aria-label=\"Close\">\r\n <span aria-hidden=\"true\">×</span>\r\n </button>\r\n </div>\r\n <div class=\"modal-body\">\r\n <div *ngIf=\"!TMPColumnsList || TMPColumnsList.length == 0\" class=\"card card-info est-padding-10 est-margin-bottom-0\">\r\n {{'There are no columns configured to be hidden/shown in this view' | localize : lc}}\r\n </div>\r\n <div *ngIf=\"TMPColumnsList && TMPColumnsList.length > 0\" style=\"max-height:500px; overflow-y:auto\">\r\n <!--Aaaaaaah la tristezza... qui mi servirebbe l'es-table per facilitare la selezione multipla ecc... peccato che se la linko qui entro in un loop impressionante-->\r\n <table class=\"table table-striped table-sm est-margin-bottom-0\">\r\n <thead>\r\n <tr>\r\n <th class=\"est-col-min\" *ngIf=\"HiddenColumns\">\r\n <input class=\"est-pointer\" type=\"checkbox\" [(ngModel)]=\"globalColVisCheck\" [ngModelOptions]=\"{'standalone': true}\" (ngModelChange)=\"columnMetadata_H.globalColVisCheckChanged();\">\r\n </th>\r\n <!-- <th class=\"est-col-min\" *ngIf=\"ColumnsOrdering\"></th> -->\r\n <th class=\"est-col-min est-nowrap\">{{'Column Name' | localize : lc}}</th>\r\n <!--Filler-->\r\n <th></th>\r\n <!-- Pinner -->\r\n <th *ngIf=\"DirectivesBased\" class=\"est-col-min\"></th>\r\n </tr>\r\n </thead>\r\n <tbody \r\n cdkDropList \r\n [cdkDropListData]=\"TMPColumnsList\" \r\n (cdkDropListDropped)=\"columnMetadata_H.columnReordered($event)\" \r\n [cdkDropListSortPredicate]=\"columnMetadata_H.sortPredicate.bind(this.columnMetadata_H)\"\r\n class=\"est-dropbox\">\r\n\r\n <tr *ngFor=\"let item of TMPColumnsList; let i = index; let last = last\" \r\n class=\"est-pointer est-droplist\" \r\n [class.est-white-selected]=\"lastSelectedItemID == item.id\" \r\n [class.est-no-selection]=\"!item.visible\"\r\n cdkDrag\r\n [cdkDragData]=\"item\"\r\n [cdkDragDisabled]=\"!ColumnsOrdering || item.fixed || item.pinned\">\r\n\r\n <td *ngIf=\"HiddenColumns\">\r\n <input type=\"checkbox\" [class.est-hidden-view]=\"item.fixed\" class=\"est-pointer\" [(ngModel)]=\"item.visible\" name=\"visible{{i}}\" (ngModelChange)=\"columnMetadata_H.updateGlobalColVisCheck();\" />\r\n </td>\r\n <td class=\"est-nowrap drag-visible\" (click)=\"columnMetadata_H.columnClicked(item);\">\r\n <ng-container *ngIf=\"item.template\">\r\n <!-- Padri -->\r\n <span *ngIf=\"item.parentTemplates && item.parentTemplates.length > 0\" class=\"est-fw-bold est-fs-13\">\r\n ( \r\n <ng-container *ngFor=\"let parent of item.parentTemplates; let last=last\">\r\n <ng-container *ngTemplateOutlet=\"parent\"></ng-container>\r\n <span *ngIf=\"!last\"> - </span>\r\n </ng-container>\r\n )\r\n </span>\r\n <!-- Template header originale -->\r\n <ng-container *ngTemplateOutlet=\"item.template\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!item.template\">{{item.description}}</ng-container>\r\n </td>\r\n <!--Filler-->\r\n <td (click)=\"columnMetadata_H.columnClicked(item);\"></td>\r\n <!-- Pinner -->\r\n <td *ngIf=\"DirectivesBased && ColumnsPinnable\"><span *ngIf=\"!item.fixed && item.pinnable\" class=\"fa fa-thumb-tack\" [class.text-success]=\"item.pinned\" (click)=\"columnMetadata_H.pinOrUnpinColumn(item)\"></span></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary est-margin-right-10\" (click)=\"lastSelectedItemID = null; changeColumnVisibilityModal.hide();\">{{'Close' | localize : lc}}</button>\r\n <button type=\"button\" [disabled]=\"!TMPColumnsList || TMPColumnsList.length == 0\" class=\"btn btn-primary\" (click)=\"columnMetadata_H.confirmColumnVisibilitySelection() && changeColumnVisibilityModal.hide()\">{{'Confirm' | localize : lc}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>",
|
|
4327
3914
|
styles: [".est-loading-box{height:200px;text-align:center;position:relative;background:#ccc}.est-loading-content{margin:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:35px}.est-scrollable{max-height:600px;overflow:auto}.est-head-resizer{top:0;right:0;bottom:0;width:7px;position:absolute;cursor:col-resize}.est-head-resizer-internal{top:0;right:0;left:6px;bottom:0;width:1px;position:absolute;background-color:#ccc;height:100%}.est-pointer{cursor:pointer}.est-high-density td,.est-high-density th{padding:0 .2rem}.est-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.est-hidden-view{visibility:hidden}.est-no-border{border:none!important}.est-nowrap{white-space:nowrap}.est-mt-min-5{margin-top:-5px}.est-white-selected{background-color:#ddd!important}.est-line-through{text-decoration:line-through}.est-no-side-padding{padding-left:0;padding-right:0}.est-no-left-padding,.est-no-right-padding{padding-left:0}.est-col-min{width:1px}.est-margin-bottom-0{margin-bottom:0!important}.est-margin-right-10{margin-right:10px!important}.est-right-9{right:9px!important}.est-table-dotted-menu{padding:0 0 2px!important;color:#999}.est-fs-18{font-size:18px}.est-fs-13,.est-fs-14{font-size:14px}.est-fw-bold{font-weight:700}.est-padding-3{padding:3px!important}.est-page-container{position:relative}.est-bring-to-front-strong{z-index:99999999!important}.est-switch{position:relative;display:inline-block;width:30px;height:17px;margin-bottom:0;margin-right:5px;margin-left:5px}.est-switch input{display:none}.est-slider{cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc}.est-slider,.est-slider:before{position:absolute;transition:.4s}.est-slider:before{content:\"\";height:13px;width:13px;left:3px;bottom:2px;background-color:#fff}input:checked+.est-slider{background-color:#2196f3}input:focus+.est-slider{box-shadow:0 0 1px #2196f3}input:checked+.est-slider:before{transform:translateX(11px)}.est-slider.round{border-radius:10px}.est-slider.round:before{border-radius:50%}.est-custom-input{width:30px;display:inline;padding:1px;height:20px}.est-row-lvl-1 td:first-child{padding-left:5px}.est-row-lvl-2 td:first-child{padding-left:20px}.est-row-lvl-3 td:first-child{padding-left:35px}.est-row-lvl-4 td:first-child{padding-left:50px}.est-row-lvl-5 td:first-child{padding-left:65px}.est-row-lvl-6 td:first-child{padding-left:80px}.est-row-lvl-7 td:first-child{padding-left:95px}.est-row-lvl-8 td:first-child{padding-left:110px}.est-row-lvl-9 td:first-child{padding-left:125px}.est-row-lvl-10 td:first-child{padding-left:140px}.est-row-lvl-11 td:first-child{padding-left:155px}.est-row-lvl-12 td:first-child{padding-left:170px}.est-row-lvl-13 td:first-child{padding-left:185px}.est-row-lvl-14 td:first-child{padding-left:200px}.est-row-lvl-15 td:first-child{padding-left:215px}.est-row-lvl-16 td:first-child{padding-left:230px}.est-row-lvl-17 td:first-child{padding-left:245px}.est-row-lvl-18 td:first-child{padding-left:260px}.est-row-lvl-19 td:first-child{padding-left:275px}.est-row-lvl-20 td:first-child{padding-left:290px}.est-row-lvl-21 td:first-child{padding-left:305px}.est-row-lvl-22 td:first-child{padding-left:320px}.est-row-lvl-23 td:first-child{padding-left:335px}.est-row-lvl-24 td:first-child{padding-left:350px}.est-row-lvl-25 td:first-child{padding-left:365px}.est-row-lvl-26 td:first-child{padding-left:380px}.est-row-lvl-27 td:first-child{padding-left:395px}.est-row-lvl-28 td:first-child{padding-left:410px}.est-row-lvl-29 td:first-child{padding-left:425px}.est-row-lvl-30 td:first-child{padding-left:440px}.est-row-lvl-31 td:first-child{padding-left:455px}.est-row-lvl-32 td:first-child{padding-left:470px}.est-row-lvl-33 td:first-child{padding-left:485px}.est-row-lvl-34 td:first-child{padding-left:500px}.est-row-lvl-35 td:first-child{padding-left:515px}.est-row-lvl-36 td:first-child{padding-left:530px}.est-row-lvl-37 td:first-child{padding-left:545px}.est-row-lvl-38 td:first-child{padding-left:560px}.est-row-lvl-39 td:first-child{padding-left:575px}.est-row-lvl-40 td:first-child{padding-left:590px}.est-row-lvl-41 td:first-child{padding-left:605px}.est-row-lvl-42 td:first-child{padding-left:620px}.est-row-lvl-43 td:first-child{padding-left:635px}.est-row-lvl-44 td:first-child{padding-left:650px}.est-row-lvl-45 td:first-child{padding-left:665px}.est-row-lvl-46 td:first-child{padding-left:680px}.est-row-lvl-47 td:first-child{padding-left:695px}.est-row-lvl-48 td:first-child{padding-left:710px}.est-row-lvl-49 td:first-child{padding-left:725px}.est-row-lvl-50 td:first-child{padding-left:740px}.est-row-lvl-51 td:first-child{padding-left:755px}.est-row-lvl-52 td:first-child{padding-left:770px}.est-row-lvl-53 td:first-child{padding-left:785px}.est-row-lvl-54 td:first-child{padding-left:800px}.est-row-lvl-55 td:first-child{padding-left:815px}.est-row-lvl-56 td:first-child{padding-left:830px}.est-row-lvl-57 td:first-child{padding-left:845px}.est-row-lvl-58 td:first-child{padding-left:860px}.est-row-lvl-59 td:first-child{padding-left:875px}.est-row-lvl-60 td:first-child{padding-left:890px}.est-row-lvl-61 td:first-child{padding-left:905px}.est-row-lvl-62 td:first-child{padding-left:920px}.est-row-lvl-63 td:first-child{padding-left:935px}.est-row-lvl-64 td:first-child{padding-left:950px}.est-row-lvl-65 td:first-child{padding-left:965px}.est-row-lvl-66 td:first-child{padding-left:980px}.est-row-lvl-67 td:first-child{padding-left:995px}.est-row-lvl-68 td:first-child{padding-left:1010px}.est-row-lvl-69 td:first-child{padding-left:1025px}.est-row-lvl-70 td:first-child{padding-left:1040px}.est-row-lvl-71 td:first-child{padding-left:1055px}.est-row-lvl-72 td:first-child{padding-left:1070px}.est-row-lvl-73 td:first-child{padding-left:1085px}.est-row-lvl-74 td:first-child{padding-left:1100px}.est-row-lvl-75 td:first-child{padding-left:1115px}.est-row-lvl-76 td:first-child{padding-left:1130px}.est-row-lvl-77 td:first-child{padding-left:1145px}.est-row-lvl-78 td:first-child{padding-left:1160px}.est-row-lvl-79 td:first-child{padding-left:1175px}.est-row-lvl-80 td:first-child{padding-left:1190px}.est-row-lvl-81 td:first-child{padding-left:1205px}.est-row-lvl-82 td:first-child{padding-left:1220px}.est-row-lvl-83 td:first-child{padding-left:1235px}.est-row-lvl-84 td:first-child{padding-left:1250px}.est-row-lvl-85 td:first-child{padding-left:1265px}.est-row-lvl-86 td:first-child{padding-left:1280px}.est-row-lvl-87 td:first-child{padding-left:1295px}.est-row-lvl-88 td:first-child{padding-left:1310px}.est-row-lvl-89 td:first-child{padding-left:1325px}.est-row-lvl-90 td:first-child{padding-left:1340px}.est-row-lvl-91 td:first-child{padding-left:1355px}.est-row-lvl-92 td:first-child{padding-left:1370px}.est-row-lvl-93 td:first-child{padding-left:1385px}.est-row-lvl-94 td:first-child{padding-left:1400px}.est-row-lvl-95 td:first-child{padding-left:1415px}.est-row-lvl-96 td:first-child{padding-left:1430px}.est-row-lvl-97 td:first-child{padding-left:1445px}.est-row-lvl-98 td:first-child{padding-left:1460px}.est-row-lvl-99 td:first-child{padding-left:1475px}.est-relative{position:relative}.est-top-pager{position:absolute;right:0;top:5px}.est-top-allselect{position:absolute;left:0;top:5px;font-weight:700}.est-padding-10{padding:10px!important}.est-margin-right-50{margin-right:50px}.est-margin-left-50{margin-left:50px}.est-quick-unpin{color:#000;margin-left:8px;font-size:14px;transform:rotate(45deg)}.est-page-sel{color:#000;margin-left:3px;margin-right:3px;padding:0 5px;font-size:inherit;border:none;border-radius:15px}.est-page-next,.est-page-prev{color:#000;font-size:inherit;padding:2px 0 0}.est-pinned-header{background-color:#fff;left:0;top:0;position:sticky;z-index:1;border-bottom:1px solid #dee2e6!important;padding:0!important}.est-simple-border-bottom{border-bottom:1px solid #dee2e6}.est-pinned-internal-header{border-top:0;border-bottom:0 solid #dee2e6}.est-pinned-border{border-right:2px solid #dee2e6!important}.est-cell-padding{padding:.3rem}.est-pinned-body{background-color:#fff;left:0;position:sticky;z-index:1;border-top:1px solid #dee2e6!important;padding:0!important}.est-inline{display:inline!important}.est-inline-block{display:inline-block!important}.est-link{color:#0275d8!important;cursor:pointer;text-decoration:none;display:block}.est-link:hover{color:#23527c!important;cursor:pointer;text-decoration:underline!important}.est-sticky-last-column{right:-1px;position:sticky;z-index:0;background-color:#fff}.est-sticky-last-column-alt{right:-1px;position:sticky;z-index:0;background-color:#f2f2f2}.est-ltab-border{border-left:2px solid #bbb}.est-rtab-border{border-right:2px solid #bbb}.est-cell-group-padding{padding:calc(.3rem + 1px);position:absolute;top:0;left:0;height:100%;width:100%}.est-margin-bottom-10{margin-bottom:10px}.est-text-center{text-align:center}.est-flex{display:flex}.est-rg-sep-flex-right{display:flex;flex-direction:row-reverse;width:100%;margin:-5px}.est-rg-sep-flex-left{display:flex;flex-direction:row;width:100%;margin:-5px}.est-rg-hdr{font-weight:700}.est-rg-agg{font-style:italic}.est-rg{background-color:hsla(0,0%,46.7%,.4666666666666667)!important}.est-rg-sep{font-size:12px;padding-right:20px!important;background-color:hsla(0,0%,73.3%,.7333333333333333)!important}.est-rg-ipp{text-align:left;display:inline-flex;margin-right:25px}.est-rg-page{text-align:right;display:inline-flex;font-size:inherit;padding-top:5px}.est-droplist.cdk-drag-placeholder{opacity:0}.est-droplist.cdk-drag-preview{z-index:999999999!important;opacity:1;box-sizing:border-box;border-radius:4px;background-color:#fff;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.est-droplist.cdk-drag-preview td:not(.drag-visible){visibility:hidden}.est-droplist.cdk-drag-preview td.drag-visible{padding-top:3px}.est-droplist.cdk-drag-animating,.est-droplist.cdk-drop-list-dragging .est-dropbox:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"]
|
|
4328
3915
|
},] }
|
|
4329
3916
|
];
|
|
@@ -4343,18 +3930,14 @@ EsTableComponent.ctorParameters = () => [
|
|
|
4343
3930
|
EsTableComponent.propDecorators = {
|
|
4344
3931
|
EsTdsDirective: [{ type: ContentChildren, args: [EsTdDirective,] }],
|
|
4345
3932
|
EsThsDirective: [{ type: ContentChildren, args: [EsThDirective,] }],
|
|
4346
|
-
EsThs: [{ type: ContentChildren, args: [forwardRef(() => EsTh),] }],
|
|
4347
|
-
EsTds: [{ type: ContentChildren, args: [forwardRef(() => EsTd),] }],
|
|
4348
3933
|
bodyRef: [{ type: ContentChild, args: ['body', { static: false },] }],
|
|
4349
3934
|
headerRef: [{ type: ContentChild, args: ['header', { static: false },] }],
|
|
4350
3935
|
headerGroupRef: [{ type: ContentChild, args: ['headerGroup', { static: false },] }],
|
|
4351
3936
|
secondaryHeaderGroupRef: [{ type: ContentChild, args: ['secondaryHeaderGroup', { static: false },] }],
|
|
4352
3937
|
CornerMenuOptions: [{ type: Input }],
|
|
4353
3938
|
ColumnsResizable: [{ type: Input }],
|
|
3939
|
+
ColumnsPinnable: [{ type: Input }],
|
|
4354
3940
|
AutoUpdate: [{ type: Input }],
|
|
4355
|
-
UseCustomCellActions: [{ type: Input }],
|
|
4356
|
-
CustomCellActionsOn: [{ type: Input }],
|
|
4357
|
-
CellActionPropagates: [{ type: Input }],
|
|
4358
3941
|
UseCustomCells: [{ type: Input }],
|
|
4359
3942
|
MaxHeight: [{ type: Input }],
|
|
4360
3943
|
ContainerClass: [{ type: Input }],
|
|
@@ -4378,9 +3961,6 @@ EsTableComponent.propDecorators = {
|
|
|
4378
3961
|
ExportFunction: [{ type: Input }],
|
|
4379
3962
|
HasHeaderGroup: [{ type: Input }],
|
|
4380
3963
|
HasSecondaryHeaderGroup: [{ type: Input }],
|
|
4381
|
-
SliceSize: [{ type: Input }],
|
|
4382
|
-
EndlessScroll: [{ type: Input }],
|
|
4383
|
-
EndlessScrollOnlyForAll: [{ type: Input }],
|
|
4384
3964
|
HeaderHidden: [{ type: Input }],
|
|
4385
3965
|
BodyHidden: [{ type: Input }],
|
|
4386
3966
|
SelectionDisabled: [{ type: Input }],
|
|
@@ -4411,7 +3991,6 @@ EsTableComponent.propDecorators = {
|
|
|
4411
3991
|
onSelectionChanged: [{ type: Output }],
|
|
4412
3992
|
onRemoval: [{ type: Output }],
|
|
4413
3993
|
onAbortRemoval: [{ type: Output }],
|
|
4414
|
-
onCellClick: [{ type: Output }],
|
|
4415
3994
|
onCornerAction: [{ type: Output }],
|
|
4416
3995
|
onDynamicOperation: [{ type: Output }],
|
|
4417
3996
|
exportDownloader: [{ type: ViewChild, args: ['exportDownloader', { static: false },] }],
|
|
@@ -4423,122 +4002,233 @@ EsTableComponent.propDecorators = {
|
|
|
4423
4002
|
class EsTableModuleConfig {
|
|
4424
4003
|
}
|
|
4425
4004
|
|
|
4426
|
-
|
|
4427
|
-
|
|
4005
|
+
//Angular
|
|
4006
|
+
/** Componente rappresentante una Colonna della tabella */
|
|
4007
|
+
class EsTh {
|
|
4428
4008
|
/** @ignore */
|
|
4429
|
-
constructor(
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4009
|
+
constructor(myself, renderer) {
|
|
4010
|
+
this.myself = myself;
|
|
4011
|
+
this.renderer = renderer;
|
|
4012
|
+
/** Dizionario di mappatura con ordinamento attuale e ordinamento successivo per gestire i passaggi di stato */
|
|
4013
|
+
this.orderNext = { "NONE": "DESC", "DESC": "ASC", "ASC": null };
|
|
4014
|
+
/** Indica se si sta effettuando un'operazione di resize su questa colonna */
|
|
4015
|
+
this.resizingThis = false;
|
|
4016
|
+
/**
|
|
4017
|
+
* Storicizza l'offset di partenza del resize dell'elemento HTML per poter calcolare la nuova dimensione richiesta durente il resize
|
|
4018
|
+
*
|
|
4019
|
+
* nuova width = startOffset + posizione X del mouse
|
|
4020
|
+
*/
|
|
4021
|
+
this.startOffset = null;
|
|
4022
|
+
/** Id della colonna, dev'essere lo stesso per tutti gli **EsTd** relativi */
|
|
4023
|
+
this.ID = "";
|
|
4024
|
+
/** Indica se questa colonna è ordinabile o meno */
|
|
4025
|
+
this.Orderable = true;
|
|
4026
|
+
/** Valore da mostrare all'interno della colonna. Se omesso verrà proiettato il contenuto dal template in cui è stata usata */
|
|
4027
|
+
this.Display = "";
|
|
4028
|
+
/** Indica se le dimnsioni di questa colonna sono modificabili o meno */
|
|
4029
|
+
this.Resizable = false;
|
|
4030
|
+
/** Indica se questo header è pinnato. In caso lo fosse presenta il tastino per effettuare lo spinning */
|
|
4031
|
+
this.Pinned = false;
|
|
4032
|
+
/**
|
|
4033
|
+
* Indica se sta venendo eseguita una operazione di ricerca o meno, serve per evitare l'esecuzione di eventuale codice che potrebbe dare fastidio
|
|
4034
|
+
* come ad esempio l'escuzione di un ordinamento durante il caricamento di dati nuovi
|
|
4035
|
+
*/
|
|
4036
|
+
this.SearchInProgress = false;
|
|
4037
|
+
/** Indica se il testo presente in questo Header può andare a capo o meno, di default non può */
|
|
4038
|
+
this.Wrap = false;
|
|
4039
|
+
/** Indica se la colonna è fixed, cioè se non può né essere nascosta, né riposizionata. Solo le prime colonne possono essere Fixed */
|
|
4040
|
+
this.Fixed = false;
|
|
4041
|
+
/** Template Angular da istanziare per questo TH */
|
|
4042
|
+
this.Template = null;
|
|
4043
|
+
/** Evento emesso al cambio di ordinamento effettuato su questa colonna */
|
|
4044
|
+
this.onOrderChange = new EventEmitter();
|
|
4045
|
+
/** Evento emesso all'unpinning della colonna */
|
|
4046
|
+
this.onUnpinning = new EventEmitter();
|
|
4047
|
+
/** Impostato dall'**EsTable**, per controllare che ci sia almeno un TD che utilizzi quest'header */
|
|
4048
|
+
this._referenced = false;
|
|
4049
|
+
}
|
|
4050
|
+
/**
|
|
4051
|
+
* Imposta la visibilità o meno della colonna, si traduce nell'applicazione o rimozione della classe **app-display-none**
|
|
4052
|
+
*
|
|
4053
|
+
* @param {boolean} expression Indicazione della visibilità
|
|
4054
|
+
*/
|
|
4055
|
+
set Visible(expression) {
|
|
4056
|
+
this._Visible = expression;
|
|
4057
|
+
if (expression)
|
|
4058
|
+
this.renderer.removeClass(this.myself.nativeElement, "app-display-none");
|
|
4059
|
+
else
|
|
4060
|
+
this.renderer.addClass(this.myself.nativeElement, "app-display-none");
|
|
4061
|
+
}
|
|
4062
|
+
/**
|
|
4063
|
+
* Restituisce lo stato di Visibilità della colonna in oggetto
|
|
4064
|
+
*
|
|
4065
|
+
* @returns {boolean} **true** se visibile, **false** altrimenti
|
|
4066
|
+
*/
|
|
4067
|
+
get Visible() {
|
|
4068
|
+
if (this._Visible == undefined)
|
|
4069
|
+
this._Visible = true;
|
|
4070
|
+
return this._Visible;
|
|
4071
|
+
}
|
|
4072
|
+
/** @ignore */
|
|
4073
|
+
ngAfterViewInit() {
|
|
4074
|
+
//Assegnare direttamente il content è più veloce che passare dal native element per qualche motivo
|
|
4075
|
+
this.Description = this.Display === null || this.Display === "" ? this.content.nativeElement.innerText : this.Display;
|
|
4076
|
+
this.Class = this.myself.nativeElement.className.replace("app-display-none", "");
|
|
4077
|
+
//Resize
|
|
4078
|
+
if (this.Resizable)
|
|
4079
|
+
this.renderer.addClass(this.myself.nativeElement, "app-relative");
|
|
4080
|
+
}
|
|
4081
|
+
/** Emette l'evento di unpinning */
|
|
4082
|
+
unpin() {
|
|
4083
|
+
this.onUnpinning.emit(this.ID);
|
|
4084
|
+
}
|
|
4085
|
+
/** Gestisce la modifica dell'ordinamento qualora venisse cliccato su questa colonna */
|
|
4086
|
+
setupNextOrderAndNotify() {
|
|
4087
|
+
if (!this.ID) {
|
|
4088
|
+
console.log("Attempt to order a column without ID. Operation ignored");
|
|
4089
|
+
return;
|
|
4090
|
+
}
|
|
4091
|
+
if (this.SearchInProgress) {
|
|
4092
|
+
console.log("Attempt to order a column during a search. Operation ignored");
|
|
4093
|
+
return;
|
|
4094
|
+
}
|
|
4095
|
+
if (!this.OrderBy || !this.Orderable)
|
|
4096
|
+
return;
|
|
4097
|
+
var nextOrder = this.orderNext[this.Order || "NONE"];
|
|
4098
|
+
this.Order = nextOrder;
|
|
4099
|
+
this.onOrderChange.emit(this.Order);
|
|
4100
|
+
}
|
|
4101
|
+
/**
|
|
4102
|
+
* Evento di inizio resize della colonna
|
|
4103
|
+
*
|
|
4104
|
+
* @param {any} ev Evento MouseDown
|
|
4105
|
+
*/
|
|
4106
|
+
onResizeStart(ev) {
|
|
4107
|
+
if (!this.Resizable)
|
|
4108
|
+
return;
|
|
4109
|
+
this.resizingThis = true;
|
|
4110
|
+
this.startOffset = this.myself.nativeElement.offsetWidth - ev.pageX;
|
|
4111
|
+
}
|
|
4112
|
+
/** Listener per la fine dell'operazione di resize */
|
|
4113
|
+
onMouseUp() {
|
|
4114
|
+
if (!this.Resizable)
|
|
4115
|
+
return;
|
|
4116
|
+
this.resizingThis = false;
|
|
4117
|
+
}
|
|
4118
|
+
/**
|
|
4119
|
+
* Listener per gestire il movimento del mouse qualora un'operazione di resize fosse in esecuzione
|
|
4120
|
+
*
|
|
4121
|
+
* @param {$event} ev Evento MouseMove
|
|
4122
|
+
*/
|
|
4123
|
+
onMouseMove($event) {
|
|
4124
|
+
if (!this.Resizable || !this.resizingThis)
|
|
4125
|
+
return;
|
|
4126
|
+
//Uso jquery per non dover far partire un intero ciclo di change detection solo per fare un resize del cazzo
|
|
4127
|
+
//(anche perché viene lanciato ogni 0.1 secondo quindi not a good idea)
|
|
4128
|
+
this.myself.nativeElement.style.width = (this.startOffset + $event.pageX) + "px";
|
|
4129
|
+
//Fermo il bubbling per non fare cose strane
|
|
4130
|
+
$event.preventDefault();
|
|
4436
4131
|
}
|
|
4437
4132
|
}
|
|
4438
|
-
|
|
4439
|
-
{ type:
|
|
4133
|
+
EsTh.decorators = [
|
|
4134
|
+
{ type: Component, args: [{
|
|
4135
|
+
selector: "[es-th]",
|
|
4136
|
+
template: "<span (click)=\"setupNextOrderAndNotify()\" [class.app-no-selection]=\"!!ID && Orderable\" [class.app-pointer]=\"!!ID && Orderable\">\r\n <span #content>\r\n <ng-container *ngIf=\"Template\">\r\n <ng-container *ngTemplateOutlet=\"Template\"></ng-container>\r\n </ng-container>\r\n <ng-content *ngIf=\"!Template\"></ng-content>\r\n </span> \r\n <span class=\"fa\" [class.fa-chevron-down]=\"Order == 'DESC'\" [class.fa-chevron-up]=\"Order == 'ASC'\"></span>\r\n</span>\r\n<span *ngIf=\"Pinned && !Fixed\" class=\"app-pointer fa fa-thumb-tack est-quick-unpin\" (click)=\"unpin()\"></span>\r\n<div [hidden]=\"!Resizable || Fixed || Pinned\" class=\"est-head-resizer\" (mousedown)=\"onResizeStart($event)\">\r\n <div class=\"est-head-resizer-internal\"></div>\r\n</div>",
|
|
4137
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
4138
|
+
},] }
|
|
4440
4139
|
];
|
|
4441
|
-
|
|
4442
|
-
{ type:
|
|
4443
|
-
|
|
4140
|
+
EsTh.ctorParameters = () => [
|
|
4141
|
+
{ type: ElementRef },
|
|
4142
|
+
{ type: Renderer2 }
|
|
4143
|
+
];
|
|
4144
|
+
EsTh.propDecorators = {
|
|
4145
|
+
ID: [{ type: Input, args: ['es-th',] }],
|
|
4146
|
+
Order: [{ type: Input }],
|
|
4147
|
+
Orderable: [{ type: Input }],
|
|
4148
|
+
Display: [{ type: Input }],
|
|
4149
|
+
Resizable: [{ type: Input }],
|
|
4150
|
+
Pinned: [{ type: Input }],
|
|
4151
|
+
SearchInProgress: [{ type: Input }],
|
|
4152
|
+
OrderBy: [{ type: Input }],
|
|
4153
|
+
Wrap: [{ type: Input }],
|
|
4154
|
+
Fixed: [{ type: Input }],
|
|
4155
|
+
Template: [{ type: Input }],
|
|
4156
|
+
onOrderChange: [{ type: Output }],
|
|
4157
|
+
onUnpinning: [{ type: Output }],
|
|
4158
|
+
content: [{ type: ViewChild, args: ["content", { static: false },] }],
|
|
4159
|
+
Visible: [{ type: Input }],
|
|
4160
|
+
onMouseUp: [{ type: HostListener, args: ['window:mouseup.out-zone',] }],
|
|
4161
|
+
onMouseMove: [{ type: HostListener, args: ['window:mousemove.out-zone', ['$event'],] }]
|
|
4162
|
+
};
|
|
4444
4163
|
|
|
4445
|
-
//
|
|
4446
|
-
/** Componente
|
|
4447
|
-
class
|
|
4448
|
-
/** @ignore */
|
|
4449
|
-
constructor(msgExts, lc, cdr, locale) {
|
|
4450
|
-
this.msgExts = msgExts;
|
|
4451
|
-
this.lc = lc;
|
|
4452
|
-
this.cdr = cdr;
|
|
4453
|
-
this.locale = locale;
|
|
4454
|
-
/** Indica se deve mostrare un warning quando si cercano di solezionare come elementi da visualizzare "Tutti" */
|
|
4455
|
-
this.WarnOnAll = true;
|
|
4456
|
-
/** Indica se dare la possibilità o meno di selezionare "Tutti" nelle opzioni di paginazione */
|
|
4457
|
-
this.AllSearch = true;
|
|
4458
|
-
/** Placeholder che identifica il "Tutti" */
|
|
4459
|
-
this.DefaultAll = 999999;
|
|
4460
|
-
/** Indica se attivare la modalità gruppo con stili più snelli per apparire sotto ai raggruppamenti */
|
|
4461
|
-
this.GroupMode = false;
|
|
4462
|
-
/** Indica se utilizzare il conteggio dei gruppi o degli oggetti */
|
|
4463
|
-
this.GroupCount = false;
|
|
4464
|
-
/** Indica il testo che va a sostituire "Oggetti Visualizzati" in caso si stia facendo qualcosa di custom, Ignorato in caso di gruppi */
|
|
4465
|
-
this.CountLabel = null;
|
|
4466
|
-
/** Indica se visualizzare il numero totale di oggeti presenti */
|
|
4467
|
-
this.ShowCount = true;
|
|
4468
|
-
/** Indica se visualizzare il numero totale di oggeti presenti */
|
|
4469
|
-
this.ShowPaging = true;
|
|
4470
|
-
/** Output invocato quando il numero di elementi per pagina viene modificato da un click utente */
|
|
4471
|
-
this.pagingSelected = new EventEmitter();
|
|
4472
|
-
/** Opzioni di paginazione */
|
|
4473
|
-
this.PagingOptions = [10, 15, 30, 45, 100];
|
|
4474
|
-
}
|
|
4475
|
-
/** @ignore */
|
|
4476
|
-
ngOnInit() {
|
|
4477
|
-
this.Model = this.View ? (this.View.itemsperpageoverride || 15) : this.CurrentPageSize;
|
|
4478
|
-
if (this.AllSearch)
|
|
4479
|
-
this.PagingOptions.push(this.DefaultAll);
|
|
4480
|
-
}
|
|
4164
|
+
//Angular
|
|
4165
|
+
/** Componente rappresentante una singola cella del body della tabella */
|
|
4166
|
+
class EsTd {
|
|
4481
4167
|
/** @ignore */
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4168
|
+
constructor(myself, renderer, _viewContainer, sanitizer) {
|
|
4169
|
+
this.myself = myself;
|
|
4170
|
+
this.renderer = renderer;
|
|
4171
|
+
this._viewContainer = _viewContainer;
|
|
4172
|
+
this.sanitizer = sanitizer;
|
|
4173
|
+
/** Id della cella, dev'essere lo stesso della colonna **EsTh** relativa */
|
|
4174
|
+
this.ID = "";
|
|
4175
|
+
/** Valore da mostrare all'interno della cella. Se omesso verrà proiettato il contenuto dal template in cui è stata usata */
|
|
4176
|
+
this.Display = null;
|
|
4177
|
+
/** Template Angular da istanziare per questo TD */
|
|
4178
|
+
this.Template = null;
|
|
4487
4179
|
}
|
|
4488
4180
|
/**
|
|
4489
|
-
*
|
|
4181
|
+
* Imposta la visibilità o meno della cella, si traduce nell'applicazione o rimozione della classe **app-display-none**
|
|
4490
4182
|
*
|
|
4491
|
-
*
|
|
4183
|
+
* @param {boolean} expression Indicazione della visibilità
|
|
4184
|
+
*/
|
|
4185
|
+
set Visible(expression) {
|
|
4186
|
+
this._Visible = expression;
|
|
4187
|
+
if (expression)
|
|
4188
|
+
this.renderer.removeClass(this.myself.nativeElement, "app-display-none");
|
|
4189
|
+
else
|
|
4190
|
+
this.renderer.addClass(this.myself.nativeElement, "app-display-none");
|
|
4191
|
+
}
|
|
4192
|
+
/**
|
|
4193
|
+
* Restituisce lo stato di Visibilità della cella in oggetto
|
|
4492
4194
|
*
|
|
4493
|
-
* @
|
|
4195
|
+
* @returns {boolean} **true** se visibile, **false** altrimenti
|
|
4494
4196
|
*/
|
|
4495
|
-
|
|
4496
|
-
if (
|
|
4497
|
-
this.
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
this.pagingSelected.emit(pageSize);
|
|
4508
|
-
this.Model = pageSize;
|
|
4509
|
-
}
|
|
4197
|
+
get Visible() {
|
|
4198
|
+
if (this._Visible == undefined)
|
|
4199
|
+
this._Visible = true;
|
|
4200
|
+
return this._Visible;
|
|
4201
|
+
}
|
|
4202
|
+
/** @ignore */
|
|
4203
|
+
ngAfterViewInit() {
|
|
4204
|
+
// Se è Internal significa che è gestita internamente da ES-TABLE quindi evito di fare sti due passaggi di lettura del DOM
|
|
4205
|
+
if (this.Internal)
|
|
4206
|
+
return;
|
|
4207
|
+
this.Content = this.Display === null || this.Display === "" ? this.sanitizer.bypassSecurityTrustHtml(this.myself.nativeElement.innerHTML) : this.sanitizer.bypassSecurityTrustHtml(this.Display);
|
|
4208
|
+
this.Class = this.myself.nativeElement.className.replace("app-display-none", "");
|
|
4510
4209
|
}
|
|
4511
4210
|
}
|
|
4512
|
-
|
|
4211
|
+
EsTd.decorators = [
|
|
4513
4212
|
{ type: Component, args: [{
|
|
4514
|
-
selector: "
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
encapsulation: ViewEncapsulation.None,
|
|
4518
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4519
|
-
styles: [".est-ipp-sel,.est-ipp-sel-all,.est-rg-ipp-sel,.est-rg-ipp-sel-all{color:#0275d8!important;cursor:pointer;text-decoration:none;display:block;display:inline}.est-ipp-bold{font-weight:700}.mat-paginator-page-size-select{margin:6px 4px 0;width:50px}.mat-paginator-page-size-select .mat-form-field-wrapper{height:52px!important;margin-top:-15px!important;padding:0!important}.mat-form-field-type-mat-native-select .mat-form-field-infix:after{margin-top:-5.5px!important}"]
|
|
4213
|
+
selector: "[es-td]",
|
|
4214
|
+
template: "<span>\r\n <ng-content></ng-content>\r\n</span>",
|
|
4215
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
4520
4216
|
},] }
|
|
4521
4217
|
];
|
|
4522
|
-
|
|
4523
|
-
{ type:
|
|
4524
|
-
{ type:
|
|
4525
|
-
{ type:
|
|
4526
|
-
{ type:
|
|
4218
|
+
EsTd.ctorParameters = () => [
|
|
4219
|
+
{ type: ElementRef },
|
|
4220
|
+
{ type: Renderer2 },
|
|
4221
|
+
{ type: ViewContainerRef },
|
|
4222
|
+
{ type: DomSanitizer }
|
|
4527
4223
|
];
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
CountLabel: [{ type: Input }],
|
|
4537
|
-
ShowCount: [{ type: Input }],
|
|
4538
|
-
ShowPaging: [{ type: Input }],
|
|
4539
|
-
PagerCount: [{ type: Input }],
|
|
4540
|
-
Hidden: [{ type: Input }],
|
|
4541
|
-
pagingSelected: [{ type: Output }]
|
|
4224
|
+
EsTd.propDecorators = {
|
|
4225
|
+
ID: [{ type: Input, args: ['es-td',] }],
|
|
4226
|
+
Internal: [{ type: Input }],
|
|
4227
|
+
RouterLink: [{ type: Input }],
|
|
4228
|
+
Display: [{ type: Input }],
|
|
4229
|
+
Template: [{ type: Input }],
|
|
4230
|
+
Context: [{ type: Input }],
|
|
4231
|
+
Visible: [{ type: Input }]
|
|
4542
4232
|
};
|
|
4543
4233
|
|
|
4544
4234
|
class EsTableModule {
|
|
@@ -4569,17 +4259,66 @@ EsTableModule.decorators = [
|
|
|
4569
4259
|
],
|
|
4570
4260
|
declarations: [EsTh, EsTd, EsTableComponent, EsTdDirective, EsThDirective, TablePagerComponent],
|
|
4571
4261
|
providers: [UtilityService, ExportService, HashingService, MessageService],
|
|
4572
|
-
exports: [
|
|
4262
|
+
exports: [EsTableComponent, EsTdDirective, EsThDirective, TablePagerComponent]
|
|
4573
4263
|
},] }
|
|
4574
4264
|
];
|
|
4575
4265
|
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4266
|
+
/** Indica un'opzione cliccabile nel Corner Menù della tabella (il menù richiamabile dai 3 pallini verticli in alto a destra) */
|
|
4267
|
+
class CornerMenuOption {
|
|
4268
|
+
}
|
|
4269
|
+
|
|
4270
|
+
/** Indica operazioni dinamiche generiche che possono essere effettuate per riga. Appaiono come colonne extra sul lato sinistro della tabella */
|
|
4271
|
+
class EsTableOperationDefinition {
|
|
4272
|
+
/**
|
|
4273
|
+
* Costruttore
|
|
4274
|
+
*
|
|
4275
|
+
* @param {string} id Codice dell'operazione
|
|
4276
|
+
* @param {string} title Titolo dell'operazione, da presentare all'utente su hover della cella
|
|
4277
|
+
* @param {string} iconClass Classe che fornisca un iconcina Es. "fa fa-remove"
|
|
4278
|
+
* @param {string} text Eventuale testo presentato nella cella, genericamente va in alternativa a **iconClass**
|
|
4279
|
+
* @param {string} conditionField Indica il campo dell'oggetto sottostante su cui verificare la visibilità o meno di questa icona
|
|
4280
|
+
* @param {string} conditionValue Indica il valore che la proprietà **conditionField** dell'oggetto sottostante deve assumere affinché questa opzione si veda
|
|
4281
|
+
*/
|
|
4282
|
+
constructor(id, title, iconClass, text, conditionField, conditionValue) {
|
|
4283
|
+
this.id = id;
|
|
4284
|
+
this.title = title;
|
|
4285
|
+
this.iconClass = iconClass;
|
|
4286
|
+
this.text = text;
|
|
4287
|
+
this.conditionField = conditionField;
|
|
4288
|
+
this.conditionValue = conditionValue;
|
|
4289
|
+
}
|
|
4290
|
+
}
|
|
4291
|
+
|
|
4292
|
+
/** Classe che definisce un oggetto generico come lista di proprietà-valore */
|
|
4293
|
+
class GenericItem {
|
|
4294
|
+
/** @ignore */
|
|
4295
|
+
constructor() {
|
|
4296
|
+
this._selected = false;
|
|
4297
|
+
this._rowClass = null;
|
|
4298
|
+
this._hash = null;
|
|
4299
|
+
this.properties = {};
|
|
4300
|
+
}
|
|
4301
|
+
}
|
|
4302
|
+
|
|
4303
|
+
/** Classe che rappresenta una colonna di un report */
|
|
4304
|
+
class ReportColumn {
|
|
4305
|
+
}
|
|
4306
|
+
|
|
4307
|
+
/** Classe che identifica un parametro generico per un report */
|
|
4308
|
+
class ReportParam {
|
|
4309
|
+
}
|
|
4310
|
+
|
|
4311
|
+
/** Classe che rappresenta una lista di oggetti generati da un report */
|
|
4312
|
+
class ReportResult {
|
|
4313
|
+
}
|
|
4314
|
+
|
|
4315
|
+
/** Classe che rappresenta i valori delle proprietà di un oggetto Report */
|
|
4316
|
+
class ReportRow {
|
|
4317
|
+
}
|
|
4579
4318
|
|
|
4580
4319
|
/**
|
|
4581
4320
|
* Generated bundle index. Do not edit.
|
|
4582
4321
|
*/
|
|
4583
4322
|
|
|
4584
|
-
export { AppOrdering, AppSearch, CornerMenuOption, EsTableColumnsDefinition, EsTableComponent, EsTableDefaultable, EsTableModule, EsTableModuleConfig, EsTableOperationDefinition,
|
|
4323
|
+
export { AppOrdering, AppSearch, CornerMenuOption, EsTableColumnsDefinition, EsTableComponent, EsTableDefaultable, EsTableModule, EsTableModuleConfig, EsTableOperationDefinition, EsTdDirective, EsThDirective, GenericItem, Group, GroupAggregation, GroupFilter, GroupOrAggregation, ItemsSelection, ReportColumn, ReportDefinition, ReportOrder, ReportParam, ReportResult, ReportRow, TablePagerComponent, TablePagerLoc as ɵa, EST_LOCALE as ɵb, EST_DEBUG as ɵc, EST_DEFAULTS as ɵd, EsTableLoc as ɵe, UtilitiesHandler as ɵf, EsTh as ɵg, EsTd as ɵh };
|
|
4585
4324
|
//# sourceMappingURL=esfaenza-es-table.js.map
|