@esfaenza/es-table 11.2.38-beta1 → 11.2.42
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 +622 -630
- 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 +23 -9
- 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/configuration/EsTableModuleConfig.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 +4 -3
- package/esm2015/public-api.js +19 -5
- package/fesm2015/esfaenza-es-table.js +582 -591
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +25 -5
- package/lib/core/handlers/{classes/ColumnMetadataHandler.d.ts → ColumnMetadataHandler.d.ts} +9 -7
- 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 -1
- package/lib/core/handlers/{classes/ReportModeHandler.d.ts → ReportModeHandler.d.ts} +2 -2
- package/lib/core/handlers/{classes/RowGroupingHandler.d.ts → RowGroupingHandler.d.ts} +8 -3
- 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 -0
- package/lib/directives/es_th.directive.d.ts +3 -1
- package/lib/domain/configuration/EsTableDefaultable.d.ts +1 -0
- package/lib/domain/configuration/EsTableModuleConfig.d.ts +1 -1
- 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/{classes/TdElement.d.ts → TdElement.d.ts} +17 -1
- 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 +18 -1
- package/esm2015/lib/core/handlers/classes/ColumnMetadataHandler.js +0 -667
- 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 -112
- package/esm2015/lib/core/handlers/classes/ReportModeHandler.js +0 -70
- package/esm2015/lib/core/handlers/classes/RowGroupingHandler.js +0 -473
- package/esm2015/lib/core/handlers/classes/SelectionHandler.js +0 -527
- package/esm2015/lib/core/handlers/classes/UtilitiesHandler.js +0 -155
- 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/TdElement.js +0 -2
- 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 -8
- 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 -7
|
@@ -1,10 +1,10 @@
|
|
|
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
9
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
10
10
|
import { CommonModule } from '@angular/common';
|
|
@@ -17,21 +17,130 @@ 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)
|
|
@@ -49,276 +158,59 @@ class AppSearch {
|
|
|
49
158
|
this.savedstate = false;
|
|
50
159
|
this.searchinprogress = false;
|
|
51
160
|
this.firstsearch = true;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Permette di resettare questo oggetto ai valori di default
|
|
55
|
-
*/
|
|
56
|
-
reset() {
|
|
57
|
-
this.pages = 1;
|
|
58
|
-
this.objectcount = 0;
|
|
59
|
-
this.searchinprogress = false;
|
|
60
|
-
this.firstsearch = false;
|
|
61
|
-
this.page = 1;
|
|
62
|
-
this.itemsperpageoverride = 15;
|
|
63
|
-
this.items = [];
|
|
64
|
-
this.orders = [];
|
|
65
|
-
this.columns = [];
|
|
66
|
-
this.column_ordering = [];
|
|
67
|
-
this.savedstate = false;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
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
|
-
/** Definizione generica di un report che può o no disporre di paginazione/export e la cui richiesta è basata su uno o più parametri */
|
|
118
|
-
class ReportDefinition {
|
|
119
|
-
}
|
|
120
|
-
|
|
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
|
-
/** Identifica una selezione applicabile agli oggetti presentati in una tabella */
|
|
164
|
-
class ItemsSelection {
|
|
165
|
-
/**
|
|
166
|
-
* Costruttore
|
|
167
|
-
*
|
|
168
|
-
* @param {T[]} selected Oggetti da considerare selezionati
|
|
169
|
-
*/
|
|
170
|
-
constructor(selected) {
|
|
171
|
-
/** Indica se tutti gli elementi sono da considerarsi selezionati (anche quelli di altre pagine) */
|
|
172
|
-
this.all = false;
|
|
173
|
-
/** Se **all** è **true**, indica gli elementi da escludere, altrimenti è insensato */
|
|
174
|
-
this.exclusions = [];
|
|
175
|
-
/** Se **all** è **true**, indica i gruppi da escludere, altrimenti è insensato */
|
|
176
|
-
this.group_exclusions = [];
|
|
177
|
-
this.count = selected.length;
|
|
178
|
-
this.items = selected;
|
|
179
|
-
this.all = false;
|
|
180
|
-
this.exclusions = [];
|
|
181
|
-
this.groups = [];
|
|
182
|
-
this.group_exclusions = [];
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/** Classe che rappresenta un Gruppo con le proprie aggregazioni */
|
|
187
|
-
class Group {
|
|
188
|
-
/**
|
|
189
|
-
* Costruttore
|
|
190
|
-
*
|
|
191
|
-
* @param {string} column ID della colonna raggruppata
|
|
192
|
-
* @param {number} count Numero di elementi raggruppati sotto questa colonna
|
|
193
|
-
* @param {string} value Valore del Gruppo
|
|
194
|
-
*/
|
|
195
|
-
constructor(column, count, value) {
|
|
196
|
-
this.column = column;
|
|
197
|
-
this.count = count;
|
|
198
|
-
this.value = value;
|
|
199
|
-
this.aggregations = [];
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/** Classe che rappresenta un'aggregazione */
|
|
204
|
-
class GroupAggregation {
|
|
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
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
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 {
|
|
161
|
+
}
|
|
267
162
|
/**
|
|
268
|
-
*
|
|
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
|
|
163
|
+
* Permette di resettare questo oggetto ai valori di default
|
|
278
164
|
*/
|
|
279
|
-
|
|
280
|
-
this.
|
|
281
|
-
this.
|
|
282
|
-
this.
|
|
283
|
-
this.
|
|
284
|
-
this.
|
|
285
|
-
this.
|
|
286
|
-
this.
|
|
287
|
-
this.
|
|
165
|
+
reset() {
|
|
166
|
+
this.pages = 1;
|
|
167
|
+
this.objectcount = 0;
|
|
168
|
+
this.searchinprogress = false;
|
|
169
|
+
this.firstsearch = false;
|
|
170
|
+
this.page = 1;
|
|
171
|
+
this.itemsperpageoverride = 15;
|
|
172
|
+
this.items = [];
|
|
173
|
+
this.orders = [];
|
|
174
|
+
this.columns = [];
|
|
175
|
+
this.column_ordering = [];
|
|
176
|
+
this.savedstate = false;
|
|
288
177
|
}
|
|
289
178
|
}
|
|
290
179
|
|
|
291
|
-
/**
|
|
292
|
-
class
|
|
180
|
+
/** Definizione generica di un report che può o no disporre di paginazione/export e la cui richiesta è basata su uno o più parametri */
|
|
181
|
+
class ReportDefinition {
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/** Identifica una selezione applicabile agli oggetti presentati in una tabella */
|
|
185
|
+
class ItemsSelection {
|
|
293
186
|
/**
|
|
294
187
|
* Costruttore
|
|
295
188
|
*
|
|
296
|
-
* @param {
|
|
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
|
|
189
|
+
* @param {T[]} selected Oggetti da considerare selezionati
|
|
300
190
|
*/
|
|
301
|
-
constructor(
|
|
302
|
-
|
|
303
|
-
this.
|
|
304
|
-
|
|
305
|
-
this.
|
|
306
|
-
|
|
307
|
-
this.
|
|
308
|
-
this.
|
|
191
|
+
constructor(selected) {
|
|
192
|
+
/** Indica se tutti gli elementi sono da considerarsi selezionati (anche quelli di altre pagine) */
|
|
193
|
+
this.all = false;
|
|
194
|
+
/** Se **all** è **true**, indica gli elementi da escludere, altrimenti è insensato */
|
|
195
|
+
this.exclusions = [];
|
|
196
|
+
/** Se **all** è **true**, indica i gruppi da escludere, altrimenti è insensato */
|
|
197
|
+
this.group_exclusions = [];
|
|
198
|
+
this.count = selected.length;
|
|
199
|
+
this.items = selected;
|
|
200
|
+
this.all = false;
|
|
201
|
+
this.exclusions = [];
|
|
202
|
+
this.groups = [];
|
|
203
|
+
this.group_exclusions = [];
|
|
309
204
|
}
|
|
310
205
|
}
|
|
311
206
|
|
|
312
|
-
/**
|
|
313
|
-
|
|
314
|
-
* per arrivare ad una ricerca su sottogruppi o elementi relativi
|
|
315
|
-
*/
|
|
316
|
-
class GroupRouteFragment {
|
|
207
|
+
/** Classe che rappresenta un filtro su un gruppo */
|
|
208
|
+
class GroupFilter {
|
|
317
209
|
/**
|
|
318
210
|
* Costruttore
|
|
319
211
|
*
|
|
320
|
-
* @param {string} column
|
|
321
|
-
* @param {string} value Valore
|
|
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
|
|
322
214
|
*/
|
|
323
215
|
constructor(column, value) {
|
|
324
216
|
this.column = column;
|
|
@@ -326,20 +218,8 @@ class GroupRouteFragment {
|
|
|
326
218
|
}
|
|
327
219
|
}
|
|
328
220
|
|
|
329
|
-
/**
|
|
330
|
-
class
|
|
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
|
-
}
|
|
221
|
+
/** Raccolta di tutti gli Input dell'EsTable a cui può essere logicamente sensato assegnare default per progetto */
|
|
222
|
+
class EsTableDefaultable {
|
|
343
223
|
}
|
|
344
224
|
|
|
345
225
|
/** Direttiva per la dichiarazione snella di un EsTd da emettere per ogni elemento, data una colonna */
|
|
@@ -389,6 +269,8 @@ class EsThDirective {
|
|
|
389
269
|
this.th = "";
|
|
390
270
|
/** Indica se la colonna è pinnata o no */
|
|
391
271
|
this.thPinned = false;
|
|
272
|
+
/** Indica se la colonna è pinnabile o no */
|
|
273
|
+
this.thPinnable = true;
|
|
392
274
|
/** Indica le dimensioni che deve avere questa colonna quando viene pinnata, senza questo tutte le colonne mi collasserebbero l'una sull'altra */
|
|
393
275
|
this.thPinnedWidth = 150;
|
|
394
276
|
/** Indicazione sulla visibilità della colonna */
|
|
@@ -422,6 +304,7 @@ EsThDirective.ctorParameters = () => [
|
|
|
422
304
|
EsThDirective.propDecorators = {
|
|
423
305
|
th: [{ type: Input }],
|
|
424
306
|
thPinned: [{ type: Input }],
|
|
307
|
+
thPinnable: [{ type: Input }],
|
|
425
308
|
thPinnedWidth: [{ type: Input }],
|
|
426
309
|
thVisible: [{ type: Input }],
|
|
427
310
|
thFixed: [{ type: Input }],
|
|
@@ -438,13 +321,6 @@ EsThDirective.propDecorators = {
|
|
|
438
321
|
thAggregation: [{ type: Input }]
|
|
439
322
|
};
|
|
440
323
|
|
|
441
|
-
/** Token che indica il locale da utilizzare all'interno del componente. Supportati solo "it-IT" ed "en-US" */
|
|
442
|
-
const EST_LOCALE = new InjectionToken('EST_LOCALE');
|
|
443
|
-
/** Token che indica se emettere log a console o meno */
|
|
444
|
-
const EST_DEBUG = new InjectionToken('EST_DEBUG');
|
|
445
|
-
/** Token che indica i default da assegnare agli Input */
|
|
446
|
-
const EST_DEFAULTS = new InjectionToken('EST_DEFAULTS');
|
|
447
|
-
|
|
448
324
|
/** Classe di localizzazione per il componente **EsTableComponent** */
|
|
449
325
|
class EsTableLoc extends LocalizationService {
|
|
450
326
|
/** @ignore */
|
|
@@ -478,11 +354,155 @@ EsTableLoc.ctorParameters = () => [
|
|
|
478
354
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [EST_LOCALE,] }] }
|
|
479
355
|
];
|
|
480
356
|
|
|
481
|
-
/**
|
|
482
|
-
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
|
+
}
|
|
483
460
|
}
|
|
484
461
|
|
|
485
|
-
|
|
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
|
|
486
506
|
/** Classe che gestisce tutte le informaizoni relative alle colonne: visibilità, posizione, stato di pin/unpin, ecc ecc... */
|
|
487
507
|
class ColumnMetadataHandler {
|
|
488
508
|
/** @ignore Costruttore*/
|
|
@@ -564,7 +584,7 @@ class ColumnMetadataHandler {
|
|
|
564
584
|
// Di default la visibilità è quella impostata nel componente
|
|
565
585
|
if ((this.est.HiddenColumns || th.thVisible) && th.thIf) {
|
|
566
586
|
let previouslyPinned = !this.est.ColumnsList || this.est.ColumnsList.length == 0 ? null : this.est.ColumnsList.find(t => t.id == column) || null;
|
|
567
|
-
let toAdd = new EsTableColumn(column, null, th.thVisible, (th.thFixed || th.thGroup), previouslyPinned == null ? th.thPinned : previouslyPinned.pinned, th.thPinnedWidth, th.Template, th._thParents);
|
|
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);
|
|
568
588
|
if (previouslyPinned)
|
|
569
589
|
toAdd.prev_index = previouslyPinned.prev_index;
|
|
570
590
|
this.est.TMPColumnsList.push(toAdd);
|
|
@@ -1147,7 +1167,37 @@ class ColumnMetadataHandler {
|
|
|
1147
1167
|
}
|
|
1148
1168
|
}
|
|
1149
1169
|
|
|
1150
|
-
|
|
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
|
+
|
|
1151
1201
|
/** Classe contenente le gestioni particolari della modalità dinamica dell'es-table */
|
|
1152
1202
|
class DynamicModeHandler {
|
|
1153
1203
|
/** @ignore Costruttore*/
|
|
@@ -1210,111 +1260,6 @@ class DynamicModeHandler {
|
|
|
1210
1260
|
}
|
|
1211
1261
|
}
|
|
1212
1262
|
|
|
1213
|
-
/** Classe contenente la gestione delle importazioni */
|
|
1214
|
-
class ExportHandler {
|
|
1215
|
-
/** @ignore Costruttore*/
|
|
1216
|
-
constructor(est, expExts, msgExts, utiExts, dateExts) {
|
|
1217
|
-
this.est = est;
|
|
1218
|
-
this.expExts = expExts;
|
|
1219
|
-
this.msgExts = msgExts;
|
|
1220
|
-
this.utiExts = utiExts;
|
|
1221
|
-
this.dateExts = dateExts;
|
|
1222
|
-
}
|
|
1223
|
-
/**
|
|
1224
|
-
* Effettua l'esportazione dei dati
|
|
1225
|
-
*
|
|
1226
|
-
* @param {string} format Formato di esportazione. Letto solo in modalità Report della tabella
|
|
1227
|
-
*/
|
|
1228
|
-
tryExport(format) {
|
|
1229
|
-
if (!this.est.ExportFunction)
|
|
1230
|
-
return;
|
|
1231
|
-
if (this.est.reportMode)
|
|
1232
|
-
this.est.ExportFunction(format);
|
|
1233
|
-
else
|
|
1234
|
-
this.est.ExportFunction((data, cancel = false) => __awaiter(this, void 0, void 0, function* () {
|
|
1235
|
-
if (cancel)
|
|
1236
|
-
return;
|
|
1237
|
-
if (data.length == 0) {
|
|
1238
|
-
this.msgExts.simpleWarning(this.est.lc.loc("Cannot export an empty dataset"));
|
|
1239
|
-
return;
|
|
1240
|
-
}
|
|
1241
|
-
this.setupExport(data);
|
|
1242
|
-
if (format == "CSV") {
|
|
1243
|
-
this.est.cdr.detectChanges();
|
|
1244
|
-
setTimeout(() => { this.est.exportDownloader.nativeElement.click(); });
|
|
1245
|
-
}
|
|
1246
|
-
else if (format == "XLSX") {
|
|
1247
|
-
if (this.ExcelJS != null) {
|
|
1248
|
-
this.exportExcel();
|
|
1249
|
-
return;
|
|
1250
|
-
}
|
|
1251
|
-
try {
|
|
1252
|
-
this.ExcelJS = yield import('exceljs');
|
|
1253
|
-
this.exportExcel();
|
|
1254
|
-
}
|
|
1255
|
-
catch (_a) {
|
|
1256
|
-
throw "Impossibile caricare la libreria per l'esportazione in Excel";
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
else
|
|
1260
|
-
throw "Formato di esportazione non riconosciuto";
|
|
1261
|
-
}));
|
|
1262
|
-
}
|
|
1263
|
-
/** Effettua l'esportazione del file Excel basandosi sul modulo **ExcelJS**, sugli header **this.est.headers** e sui dati **this.est.data** */
|
|
1264
|
-
exportExcel() {
|
|
1265
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1266
|
-
let iFix = 1;
|
|
1267
|
-
let workbook = new this.ExcelJS.Workbook();
|
|
1268
|
-
workbook.creator = "Ema's big Es-Table";
|
|
1269
|
-
workbook.created = new Date();
|
|
1270
|
-
let sheet = workbook.addWorksheet('Data');
|
|
1271
|
-
let header = sheet.getRow(1);
|
|
1272
|
-
header.font = { bold: true };
|
|
1273
|
-
this.est.headers = this.est.headers.sort((a, b) => a.order - b.order);
|
|
1274
|
-
for (let i = 0; i < this.est.headers.length; i++) {
|
|
1275
|
-
let h = this.est.headers[i];
|
|
1276
|
-
header.getCell(i + iFix).value = h.label;
|
|
1277
|
-
}
|
|
1278
|
-
for (let i = 0; i < this.est.data.length; i++) {
|
|
1279
|
-
let row = sheet.getRow(i + iFix + 1);
|
|
1280
|
-
let item = this.est.data[i];
|
|
1281
|
-
for (let i = 0; i < this.est.headers.length; i++) {
|
|
1282
|
-
let h = this.est.headers[i];
|
|
1283
|
-
let cell = row.getCell(i + 1);
|
|
1284
|
-
let val = item[h.key];
|
|
1285
|
-
if (val == null || val == undefined)
|
|
1286
|
-
cell.value = "";
|
|
1287
|
-
else {
|
|
1288
|
-
switch (h.type) {
|
|
1289
|
-
case 'date':
|
|
1290
|
-
cell.value = this.dateExts.getDateConvertion(val).toDate();
|
|
1291
|
-
case 'number':
|
|
1292
|
-
cell.value = parseFloat(val.replace(',', '.'));
|
|
1293
|
-
default:
|
|
1294
|
-
cell.value = val;
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
let buffer = yield workbook.xlsx.writeBuffer();
|
|
1300
|
-
let blob = new Blob([buffer], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;" });
|
|
1301
|
-
let objectUrl = window.URL.createObjectURL(blob);
|
|
1302
|
-
let fn = this.est.ExportFileName;
|
|
1303
|
-
this.utiExts.fileDownload(objectUrl, fn.endsWith('.csv') ? fn.replace('.csv', '.xlsx') : fn.endsWith('.xlsx') ? fn : fn + ".xlsx");
|
|
1304
|
-
});
|
|
1305
|
-
}
|
|
1306
|
-
/**
|
|
1307
|
-
* Metodo che effettivamente genera gli header e i dati per l'esportazione con **ngx-csv**
|
|
1308
|
-
*
|
|
1309
|
-
* @param {any[]} items Oggetti da esportare
|
|
1310
|
-
*/
|
|
1311
|
-
setupExport(items) {
|
|
1312
|
-
let drcd = this.est.DynamicRowColumnsDefinition;
|
|
1313
|
-
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);
|
|
1314
|
-
this.est.data = items;
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
1263
|
/** Classe contenente la gestione della modalità gerarchica */
|
|
1319
1264
|
class HierarchyModeHandler {
|
|
1320
1265
|
/** @ignore Costruttore*/
|
|
@@ -1562,7 +1507,10 @@ class ItemsHandler {
|
|
|
1562
1507
|
}
|
|
1563
1508
|
}
|
|
1564
1509
|
|
|
1565
|
-
|
|
1510
|
+
/** Classe che identifica una direttiva di ordinamento per un report */
|
|
1511
|
+
class ReportOrder {
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1566
1514
|
/** Classe che gestisce la modalità Report dell'es-table utilizzata nel Metering */
|
|
1567
1515
|
class ReportModeHandler {
|
|
1568
1516
|
/** @ignore Costruttore */
|
|
@@ -1571,67 +1519,154 @@ class ReportModeHandler {
|
|
|
1571
1519
|
this.utilities = utilities;
|
|
1572
1520
|
}
|
|
1573
1521
|
/**
|
|
1574
|
-
* Sul click dell'Header di una colonna questo metodo si occupa di applicare l'ordinamento successivo e di notificare con **emitSearchRequest**
|
|
1575
|
-
* il bisogno di aggiornare i dati da parte del componente che utilizza la tabella
|
|
1576
|
-
*
|
|
1577
|
-
* 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
|
|
1578
1660
|
*
|
|
1579
|
-
* @param {
|
|
1661
|
+
* @param {string} column Colonna di raggruppamento
|
|
1662
|
+
* @param {string} value Valore della colonna di raggruppamento
|
|
1580
1663
|
*/
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
return;
|
|
1585
|
-
}
|
|
1586
|
-
let orderNext = { NONE: 'DESC', DESC: 'ASC', ASC: null };
|
|
1587
|
-
let nextOrder = orderNext[clm.order || 'NONE'];
|
|
1588
|
-
clm.order = nextOrder;
|
|
1589
|
-
let order;
|
|
1590
|
-
let clmOrder = this.est.View.orders ? this.est.View.orders.filter(t => t.column == clm.id) : [];
|
|
1591
|
-
if (clmOrder.length == 0 && clm.order) {
|
|
1592
|
-
order = new ReportOrder();
|
|
1593
|
-
order.column = clm.id;
|
|
1594
|
-
order.order = clm.order;
|
|
1595
|
-
if (!this.est.View.orders)
|
|
1596
|
-
this.est.View.orders = [];
|
|
1597
|
-
this.est.View.orders.push(order);
|
|
1598
|
-
}
|
|
1599
|
-
else if (clmOrder.length == 1) {
|
|
1600
|
-
// Rimuovo l'ordinamento o aggiorno quello già esistente
|
|
1601
|
-
if (!clm.order)
|
|
1602
|
-
clmOrder = [];
|
|
1603
|
-
else
|
|
1604
|
-
clmOrder[0].order = clm.order;
|
|
1605
|
-
}
|
|
1606
|
-
else
|
|
1607
|
-
console.warn('Impossibile settare ordinamento. Colonna ' + clm.id + ' direttive di ordinamento ' + clmOrder.length + ' ordinamento scelto ' + clm.order);
|
|
1608
|
-
// Dopo aver aggiornato l'ordinamento rilancio la ricerca
|
|
1609
|
-
this.est.emitSearchRequest(false);
|
|
1610
|
-
}
|
|
1611
|
-
/** Metodo che si occupa di gestire la grafica della tabella in base alle informazioni di ordinamento colonne e paginazione contenuti nel modello */
|
|
1612
|
-
reviewReportBindings() {
|
|
1613
|
-
if (!(this.est.View instanceof ReportDefinition)) {
|
|
1614
|
-
console.error('View diversa da reportdefinition entrata nel metodo reviewReportBindings');
|
|
1615
|
-
return;
|
|
1616
|
-
}
|
|
1617
|
-
// Allineo le informazioni su eventuali ordinamenti fatti precedentemente
|
|
1618
|
-
if (this.est.View.orders && this.est.View.orders.length > 0) {
|
|
1619
|
-
this.est.View.orders.forEach(t => {
|
|
1620
|
-
this.est.ReportValues.columns.filter(c => c.id == t.column)[0].order = t.order;
|
|
1621
|
-
});
|
|
1622
|
-
}
|
|
1623
|
-
// Recupero il count precedente se serve
|
|
1624
|
-
if (this.est.ReportValues.count != -2)
|
|
1625
|
-
this.est.previousCount = this.est.ReportValues.count;
|
|
1626
|
-
else if (this.est.ReportValues.count == -2)
|
|
1627
|
-
this.est.ReportValues.count = this.est.previousCount;
|
|
1628
|
-
let ipp = (this.est.View.itemsperpageoverride || 15);
|
|
1629
|
-
this.est.View.pages = Math.ceil(this.est.ReportValues.count / ipp);
|
|
1630
|
-
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;
|
|
1631
1667
|
}
|
|
1632
1668
|
}
|
|
1633
1669
|
|
|
1634
|
-
// Modelli
|
|
1635
1670
|
/** Classe che gestisce la modalità Row Grouping dell'es-table */
|
|
1636
1671
|
class RowGroupingHandler {
|
|
1637
1672
|
/** @ignore Costruttore */
|
|
@@ -1678,7 +1713,7 @@ class RowGroupingHandler {
|
|
|
1678
1713
|
this.est.BaseItemsCount = view.objectcount;
|
|
1679
1714
|
}
|
|
1680
1715
|
else {
|
|
1681
|
-
// 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
|
|
1682
1717
|
// dopo al gruppo che ho cliccato la lista dei gruppi tirata fuori questa volta (intermediateGroup = true)
|
|
1683
1718
|
/*
|
|
1684
1719
|
* GruppoA GruppoA
|
|
@@ -1689,7 +1724,7 @@ class RowGroupingHandler {
|
|
|
1689
1724
|
* GruppoD
|
|
1690
1725
|
* GruppoE
|
|
1691
1726
|
*/
|
|
1692
|
-
// 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
|
|
1693
1728
|
// view.items e quindi in TMPBoundSource, ho inoltre le informazioni di paginazione **per il singolo sottogruppo** (intermediateGroup = false)
|
|
1694
1729
|
/*
|
|
1695
1730
|
* GruppoA GruppoA
|
|
@@ -1763,15 +1798,20 @@ class RowGroupingHandler {
|
|
|
1763
1798
|
itemsCacheReference.push(itm);
|
|
1764
1799
|
}
|
|
1765
1800
|
});
|
|
1766
|
-
// Elimino gli oggetti vecchi
|
|
1801
|
+
// Elimino gli oggetti vecchi
|
|
1767
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
|
|
1768
1803
|
// le cache di ricerca effettuate su una path più profonda dell'attuale
|
|
1769
1804
|
// 2) Ricerca finale o ricerca intermedia senza stato salvato - Elimino tutti gli item relativi alla path corrente
|
|
1770
|
-
// 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
|
|
1771
1806
|
if (intermediateGroup && view.savedstate) {
|
|
1772
1807
|
this.est.boundSource = this.est.boundSource.filter(t => !(t._item || t._thisRoute.length > groupRoute.length));
|
|
1773
1808
|
this.est.groupSearchRequestsCache = this.est.groupSearchRequestsCache.filter(t => !(t.route.length > groupRoute.length));
|
|
1774
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
|
+
}
|
|
1775
1815
|
this.est.boundSource = this.est.boundSource.filter(t => !(t._parent == groupKey));
|
|
1776
1816
|
let thisGroup = this.est.boundSource[insertIndex];
|
|
1777
1817
|
if (intermediateGroup)
|
|
@@ -1907,7 +1947,7 @@ class RowGroupingHandler {
|
|
|
1907
1947
|
anygp._thisKey = parent._thisKey + gp.value;
|
|
1908
1948
|
anygp._grouplevel = parent._grouplevel + 1;
|
|
1909
1949
|
}
|
|
1910
|
-
// 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.
|
|
1911
1951
|
// La visibilità è solo per il gruppo a livello 0, tutti gli altri gruppi saranno mostrati o nascosti di conseguenza
|
|
1912
1952
|
if (currentIndex == 0)
|
|
1913
1953
|
anygp._visible = true;
|
|
@@ -2103,7 +2143,22 @@ class RowGroupingHandler {
|
|
|
2103
2143
|
}
|
|
2104
2144
|
}
|
|
2105
2145
|
|
|
2106
|
-
|
|
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
|
+
|
|
2107
2162
|
/** Classe che gestisce le selezioni degli oggetti */
|
|
2108
2163
|
class SelectionHandler {
|
|
2109
2164
|
/** @ignore Costruttore */
|
|
@@ -2783,7 +2838,7 @@ UtilitiesHandler.ctorParameters = () => [
|
|
|
2783
2838
|
class EsTableComponent {
|
|
2784
2839
|
/** @ignore */
|
|
2785
2840
|
constructor(ngControl, prefService, deafults, locale, lc, cdr, utilities_H, utiExts, expExts, dateExts, msgExts) {
|
|
2786
|
-
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;
|
|
2787
2842
|
this.ngControl = ngControl;
|
|
2788
2843
|
this.prefService = prefService;
|
|
2789
2844
|
this.deafults = deafults;
|
|
@@ -2872,6 +2927,8 @@ class EsTableComponent {
|
|
|
2872
2927
|
this.CornerMenuOptions = null;
|
|
2873
2928
|
/** Indica se dev'essere possibile effettuare il resize delle colonne */
|
|
2874
2929
|
this.ColumnsResizable = null;
|
|
2930
|
+
/** Indica se dev'essere possibile effettuare il pinning delle colonne */
|
|
2931
|
+
this.ColumnsPinnable = null;
|
|
2875
2932
|
/** Indica se dev'essere disponibile il sistema di aggiornamento automatico */
|
|
2876
2933
|
this.AutoUpdate = null;
|
|
2877
2934
|
/**
|
|
@@ -3097,6 +3154,7 @@ class EsTableComponent {
|
|
|
3097
3154
|
this.UseSelectionCache = this.utilities_H.InputOrDefault(this.UseSelectionCache, (_p = this.deafults) === null || _p === void 0 ? void 0 : _p.UseSelectionCache, true);
|
|
3098
3155
|
this.ShowItemGroupsColumns = this.utilities_H.InputOrDefault(this.ShowItemGroupsColumns, (_q = this.deafults) === null || _q === void 0 ? void 0 : _q.ShowItemGroupsColumns, false);
|
|
3099
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);
|
|
3100
3158
|
}
|
|
3101
3159
|
/** @ignore */
|
|
3102
3160
|
ngOnInit() {
|
|
@@ -3386,7 +3444,7 @@ class EsTableComponent {
|
|
|
3386
3444
|
var _a, _b;
|
|
3387
3445
|
if (!this.TMPBoundSource || this.TMPBoundSource.length == 0) {
|
|
3388
3446
|
this.BaseItemsCount = 0;
|
|
3389
|
-
this.boundSource =
|
|
3447
|
+
this.boundSource = [];
|
|
3390
3448
|
return;
|
|
3391
3449
|
}
|
|
3392
3450
|
if (this.arrayMode || !this.UseCustomCells) {
|
|
@@ -3852,7 +3910,7 @@ EsTableComponent.decorators = [
|
|
|
3852
3910
|
viewProviders: [{ provide: LocalizationService, useClass: EsTableLoc }],
|
|
3853
3911
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3854
3912
|
encapsulation: ViewEncapsulation.None,
|
|
3855
|
-
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\" [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\" *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>",
|
|
3856
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)}"]
|
|
3857
3915
|
},] }
|
|
3858
3916
|
];
|
|
@@ -3878,6 +3936,7 @@ EsTableComponent.propDecorators = {
|
|
|
3878
3936
|
secondaryHeaderGroupRef: [{ type: ContentChild, args: ['secondaryHeaderGroup', { static: false },] }],
|
|
3879
3937
|
CornerMenuOptions: [{ type: Input }],
|
|
3880
3938
|
ColumnsResizable: [{ type: Input }],
|
|
3939
|
+
ColumnsPinnable: [{ type: Input }],
|
|
3881
3940
|
AutoUpdate: [{ type: Input }],
|
|
3882
3941
|
UseCustomCells: [{ type: Input }],
|
|
3883
3942
|
MaxHeight: [{ type: Input }],
|
|
@@ -3943,124 +4002,6 @@ EsTableComponent.propDecorators = {
|
|
|
3943
4002
|
class EsTableModuleConfig {
|
|
3944
4003
|
}
|
|
3945
4004
|
|
|
3946
|
-
/** Classe di localizzazione per il componente **TablePagerComponent** */
|
|
3947
|
-
class TablePagerLoc extends LocalizationService {
|
|
3948
|
-
/** @ignore */
|
|
3949
|
-
constructor(LOC_LOCALE) {
|
|
3950
|
-
super(LOC_LOCALE !== null && LOC_LOCALE !== void 0 ? LOC_LOCALE : 'it-IT');
|
|
3951
|
-
super.set("en->it", "All", ["Tutto"]);
|
|
3952
|
-
super.set("en->it", "Shown Elements", ["Elementi visualizzati"]);
|
|
3953
|
-
super.set("en->it", "Shown Groups", ["Gruppi visualizzati"]);
|
|
3954
|
-
super.set("en->it", "Are you sure you want to retrieve all results?", ["Si è sicuri di voler caricare tutti i risultati?"]);
|
|
3955
|
-
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"]);
|
|
3956
|
-
}
|
|
3957
|
-
}
|
|
3958
|
-
TablePagerLoc.decorators = [
|
|
3959
|
-
{ type: Injectable }
|
|
3960
|
-
];
|
|
3961
|
-
TablePagerLoc.ctorParameters = () => [
|
|
3962
|
-
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [EST_LOCALE,] }] }
|
|
3963
|
-
];
|
|
3964
|
-
|
|
3965
|
-
// Angular
|
|
3966
|
-
/** Componente che si occupa della paginazione di una tabella */
|
|
3967
|
-
class TablePagerComponent {
|
|
3968
|
-
/** @ignore */
|
|
3969
|
-
constructor(msgExts, lc, cdr, locale) {
|
|
3970
|
-
this.msgExts = msgExts;
|
|
3971
|
-
this.lc = lc;
|
|
3972
|
-
this.cdr = cdr;
|
|
3973
|
-
this.locale = locale;
|
|
3974
|
-
/** Indica se deve mostrare un warning quando si cercano di solezionare come elementi da visualizzare "Tutti" */
|
|
3975
|
-
this.WarnOnAll = true;
|
|
3976
|
-
/** Indica se dare la possibilità o meno di selezionare "Tutti" nelle opzioni di paginazione */
|
|
3977
|
-
this.AllSearch = true;
|
|
3978
|
-
/** Placeholder che identifica il "Tutti" */
|
|
3979
|
-
this.DefaultAll = 999999;
|
|
3980
|
-
/** Indica se attivare la modalità gruppo con stili più snelli per apparire sotto ai raggruppamenti */
|
|
3981
|
-
this.GroupMode = false;
|
|
3982
|
-
/** Indica se utilizzare il conteggio dei gruppi o degli oggetti */
|
|
3983
|
-
this.GroupCount = false;
|
|
3984
|
-
/** Indica il testo che va a sostituire "Oggetti Visualizzati" in caso si stia facendo qualcosa di custom, Ignorato in caso di gruppi */
|
|
3985
|
-
this.CountLabel = null;
|
|
3986
|
-
/** Indica se visualizzare il numero totale di oggeti presenti */
|
|
3987
|
-
this.ShowCount = true;
|
|
3988
|
-
/** Indica se visualizzare il numero totale di oggeti presenti */
|
|
3989
|
-
this.ShowPaging = true;
|
|
3990
|
-
/** Output invocato quando il numero di elementi per pagina viene modificato da un click utente */
|
|
3991
|
-
this.pagingSelected = new EventEmitter();
|
|
3992
|
-
/** Opzioni di paginazione */
|
|
3993
|
-
this.PagingOptions = [10, 15, 30, 45, 100];
|
|
3994
|
-
}
|
|
3995
|
-
/** @ignore */
|
|
3996
|
-
ngOnInit() {
|
|
3997
|
-
this.Model = this.View ? (this.View.itemsperpageoverride || 15) : this.CurrentPageSize;
|
|
3998
|
-
if (this.AllSearch)
|
|
3999
|
-
this.PagingOptions.push(this.DefaultAll);
|
|
4000
|
-
}
|
|
4001
|
-
/** @ignore */
|
|
4002
|
-
ngOnChanges(changes) {
|
|
4003
|
-
let newView = changes['View'];
|
|
4004
|
-
let newCPS = changes['CurrentPageSize'];
|
|
4005
|
-
if ((newView && !newView.firstChange) || (newCPS && !newCPS.firstChange))
|
|
4006
|
-
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;
|
|
4007
|
-
}
|
|
4008
|
-
/**
|
|
4009
|
-
* Funzione richiamata dal template quando un utente clicca su un numero di paginazione.
|
|
4010
|
-
*
|
|
4011
|
-
* Cliccare 2 volte sullo stesso numero causa comunque un refresh dei dati
|
|
4012
|
-
*
|
|
4013
|
-
* @param {number} pageSize Dimensione selezionata lato UI
|
|
4014
|
-
*/
|
|
4015
|
-
choice(pageSize) {
|
|
4016
|
-
if (pageSize == this.DefaultAll && this.WarnOnAll) {
|
|
4017
|
-
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; }, () => {
|
|
4018
|
-
// Dio solo sa perché mi tocca fare sta roba... qui dentro per qualche motivo la CD non prende
|
|
4019
|
-
let prevModel = this.Model;
|
|
4020
|
-
this.Model = null;
|
|
4021
|
-
this.cdr.detectChanges();
|
|
4022
|
-
this.Model = prevModel;
|
|
4023
|
-
this.cdr.detectChanges();
|
|
4024
|
-
});
|
|
4025
|
-
}
|
|
4026
|
-
else {
|
|
4027
|
-
this.pagingSelected.emit(pageSize);
|
|
4028
|
-
this.Model = pageSize;
|
|
4029
|
-
}
|
|
4030
|
-
}
|
|
4031
|
-
}
|
|
4032
|
-
TablePagerComponent.decorators = [
|
|
4033
|
-
{ type: Component, args: [{
|
|
4034
|
-
selector: "app-paging",
|
|
4035
|
-
viewProviders: [{ provide: LocalizationService, useClass: TablePagerLoc }],
|
|
4036
|
-
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>",
|
|
4037
|
-
encapsulation: ViewEncapsulation.None,
|
|
4038
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4039
|
-
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}"]
|
|
4040
|
-
},] }
|
|
4041
|
-
];
|
|
4042
|
-
TablePagerComponent.ctorParameters = () => [
|
|
4043
|
-
{ type: MessageService },
|
|
4044
|
-
{ type: LocalizationService },
|
|
4045
|
-
{ type: ChangeDetectorRef },
|
|
4046
|
-
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [EST_LOCALE,] }] }
|
|
4047
|
-
];
|
|
4048
|
-
TablePagerComponent.propDecorators = {
|
|
4049
|
-
CurrentPageSize: [{ type: Input }],
|
|
4050
|
-
View: [{ type: Input }],
|
|
4051
|
-
WarnOnAll: [{ type: Input }],
|
|
4052
|
-
AllSearch: [{ type: Input }],
|
|
4053
|
-
DefaultAll: [{ type: Input }],
|
|
4054
|
-
GroupMode: [{ type: Input }],
|
|
4055
|
-
GroupCount: [{ type: Input }],
|
|
4056
|
-
CountLabel: [{ type: Input }],
|
|
4057
|
-
ShowCount: [{ type: Input }],
|
|
4058
|
-
ShowPaging: [{ type: Input }],
|
|
4059
|
-
PagerCount: [{ type: Input }],
|
|
4060
|
-
Hidden: [{ type: Input }],
|
|
4061
|
-
pagingSelected: [{ type: Output }]
|
|
4062
|
-
};
|
|
4063
|
-
|
|
4064
4005
|
//Angular
|
|
4065
4006
|
/** Componente rappresentante una Colonna della tabella */
|
|
4066
4007
|
class EsTh {
|
|
@@ -4296,7 +4237,8 @@ class EsTableModule {
|
|
|
4296
4237
|
ngModule: EsTableModule,
|
|
4297
4238
|
providers: [
|
|
4298
4239
|
{ provide: EST_LOCALE, useValue: (config === null || config === void 0 ? void 0 : config.locale) || 'it-IT' },
|
|
4299
|
-
{ provide: EST_DEBUG, useValue: (config === null || config === void 0 ? void 0 : config.debugMode) || false }
|
|
4240
|
+
{ provide: EST_DEBUG, useValue: (config === null || config === void 0 ? void 0 : config.debugMode) || false },
|
|
4241
|
+
{ provide: EST_DEFAULTS, useValue: (config === null || config === void 0 ? void 0 : config.defaults) || null },
|
|
4300
4242
|
]
|
|
4301
4243
|
};
|
|
4302
4244
|
}
|
|
@@ -4322,13 +4264,62 @@ EsTableModule.decorators = [
|
|
|
4322
4264
|
},] }
|
|
4323
4265
|
];
|
|
4324
4266
|
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4267
|
+
/** Indica un'opzione cliccabile nel Corner Menù della tabella (il menù richiamabile dai 3 pallini verticli in alto a destra) */
|
|
4268
|
+
class CornerMenuOption {
|
|
4269
|
+
}
|
|
4270
|
+
|
|
4271
|
+
/** Indica operazioni dinamiche generiche che possono essere effettuate per riga. Appaiono come colonne extra sul lato sinistro della tabella */
|
|
4272
|
+
class EsTableOperationDefinition {
|
|
4273
|
+
/**
|
|
4274
|
+
* Costruttore
|
|
4275
|
+
*
|
|
4276
|
+
* @param {string} id Codice dell'operazione
|
|
4277
|
+
* @param {string} title Titolo dell'operazione, da presentare all'utente su hover della cella
|
|
4278
|
+
* @param {string} iconClass Classe che fornisca un iconcina Es. "fa fa-remove"
|
|
4279
|
+
* @param {string} text Eventuale testo presentato nella cella, genericamente va in alternativa a **iconClass**
|
|
4280
|
+
* @param {string} conditionField Indica il campo dell'oggetto sottostante su cui verificare la visibilità o meno di questa icona
|
|
4281
|
+
* @param {string} conditionValue Indica il valore che la proprietà **conditionField** dell'oggetto sottostante deve assumere affinché questa opzione si veda
|
|
4282
|
+
*/
|
|
4283
|
+
constructor(id, title, iconClass, text, conditionField, conditionValue) {
|
|
4284
|
+
this.id = id;
|
|
4285
|
+
this.title = title;
|
|
4286
|
+
this.iconClass = iconClass;
|
|
4287
|
+
this.text = text;
|
|
4288
|
+
this.conditionField = conditionField;
|
|
4289
|
+
this.conditionValue = conditionValue;
|
|
4290
|
+
}
|
|
4291
|
+
}
|
|
4292
|
+
|
|
4293
|
+
/** Classe che definisce un oggetto generico come lista di proprietà-valore */
|
|
4294
|
+
class GenericItem {
|
|
4295
|
+
/** @ignore */
|
|
4296
|
+
constructor() {
|
|
4297
|
+
this._selected = false;
|
|
4298
|
+
this._rowClass = null;
|
|
4299
|
+
this._hash = null;
|
|
4300
|
+
this.properties = {};
|
|
4301
|
+
}
|
|
4302
|
+
}
|
|
4303
|
+
|
|
4304
|
+
/** Classe che rappresenta una colonna di un report */
|
|
4305
|
+
class ReportColumn {
|
|
4306
|
+
}
|
|
4307
|
+
|
|
4308
|
+
/** Classe che identifica un parametro generico per un report */
|
|
4309
|
+
class ReportParam {
|
|
4310
|
+
}
|
|
4311
|
+
|
|
4312
|
+
/** Classe che rappresenta una lista di oggetti generati da un report */
|
|
4313
|
+
class ReportResult {
|
|
4314
|
+
}
|
|
4315
|
+
|
|
4316
|
+
/** Classe che rappresenta i valori delle proprietà di un oggetto Report */
|
|
4317
|
+
class ReportRow {
|
|
4318
|
+
}
|
|
4328
4319
|
|
|
4329
4320
|
/**
|
|
4330
4321
|
* Generated bundle index. Do not edit.
|
|
4331
4322
|
*/
|
|
4332
4323
|
|
|
4333
|
-
export { AppOrdering, AppSearch, CornerMenuOption, EsTableColumnsDefinition, EsTableComponent, EsTableDefaultable, EsTableModule, EsTableModuleConfig, EsTableOperationDefinition, EsTdDirective, EsThDirective, GenericItem, Group, GroupAggregation, GroupFilter, GroupOrAggregation, ItemsSelection, ReportColumn, ReportDefinition, ReportOrder, ReportParam, ReportResult, ReportRow,
|
|
4324
|
+
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 };
|
|
4334
4325
|
//# sourceMappingURL=esfaenza-es-table.js.map
|