@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.
Files changed (128) hide show
  1. package/bundles/esfaenza-es-table.umd.js +622 -630
  2. package/bundles/esfaenza-es-table.umd.js.map +1 -1
  3. package/bundles/esfaenza-es-table.umd.min.js +1 -1
  4. package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
  5. package/esfaenza-es-table.d.ts +5 -6
  6. package/esfaenza-es-table.metadata.json +1 -1
  7. package/esm2015/esfaenza-es-table.js +6 -7
  8. package/esm2015/lib/components/es-table/es_table.component.js +23 -9
  9. package/esm2015/lib/core/handlers/ColumnMetadataHandler.js +669 -0
  10. package/esm2015/lib/core/handlers/DynamicModeHandler.js +63 -0
  11. package/esm2015/lib/core/handlers/ExportHandler.js +106 -0
  12. package/esm2015/lib/core/handlers/HierarchyModeHandler.js +136 -0
  13. package/esm2015/lib/core/handlers/ItemsHandler.js +112 -0
  14. package/esm2015/lib/core/handlers/ReportModeHandler.js +70 -0
  15. package/esm2015/lib/core/handlers/RowGroupingHandler.js +481 -0
  16. package/esm2015/lib/core/handlers/SelectionHandler.js +526 -0
  17. package/esm2015/lib/core/handlers/UtilitiesHandler.js +155 -0
  18. package/esm2015/lib/directives/es_th.directive.js +4 -1
  19. package/esm2015/lib/domain/configuration/EsTableDefaultable.js +1 -1
  20. package/esm2015/lib/domain/configuration/EsTableModuleConfig.js +1 -1
  21. package/esm2015/lib/domain/externals/CornerMenuOption.js +4 -0
  22. package/esm2015/lib/domain/externals/EsTableColumnsDefinition.js +31 -0
  23. package/esm2015/lib/domain/externals/EsTableOperationDefinition.js +22 -0
  24. package/esm2015/lib/domain/externals/appsearch/AppOrdering.js +16 -0
  25. package/esm2015/lib/domain/externals/appsearch/AppSearch.js +35 -0
  26. package/esm2015/lib/domain/externals/appsearch/GenericItem.js +11 -0
  27. package/esm2015/lib/domain/externals/appsearch/Group.js +17 -0
  28. package/esm2015/lib/domain/externals/appsearch/GroupAggregation.js +16 -0
  29. package/esm2015/lib/domain/externals/appsearch/GroupFilter.js +14 -0
  30. package/esm2015/lib/domain/externals/appsearch/GroupOrAggregation.js +16 -0
  31. package/esm2015/lib/domain/externals/appsearch/ItemsSelection.js +23 -0
  32. package/esm2015/lib/domain/externals/report/ReportColumn.js +4 -0
  33. package/esm2015/lib/domain/externals/report/ReportDefinition.js +4 -0
  34. package/esm2015/lib/domain/externals/report/ReportOrder.js +4 -0
  35. package/esm2015/lib/domain/externals/report/ReportParam.js +4 -0
  36. package/esm2015/lib/domain/externals/report/ReportResult.js +4 -0
  37. package/esm2015/lib/domain/externals/report/ReportRow.js +4 -0
  38. package/esm2015/lib/domain/internals/CacheTriptic.js +16 -0
  39. package/esm2015/lib/domain/internals/EsTableColumn.js +27 -0
  40. package/esm2015/lib/domain/internals/GroupPager.js +22 -0
  41. package/esm2015/lib/domain/internals/GroupRouteFragment.js +17 -0
  42. package/esm2015/lib/domain/internals/TdElement.js +2 -0
  43. package/esm2015/lib/domain/internals/ThAggregation.js +16 -0
  44. package/esm2015/lib/domain/internals/ThElement.js +2 -0
  45. package/esm2015/lib/es-table.module.js +4 -3
  46. package/esm2015/public-api.js +19 -5
  47. package/fesm2015/esfaenza-es-table.js +582 -591
  48. package/fesm2015/esfaenza-es-table.js.map +1 -1
  49. package/lib/components/es-table/es_table.component.d.ts +25 -5
  50. package/lib/core/handlers/{classes/ColumnMetadataHandler.d.ts → ColumnMetadataHandler.d.ts} +9 -7
  51. package/lib/core/handlers/{classes/DynamicModeHandler.d.ts → DynamicModeHandler.d.ts} +2 -2
  52. package/lib/core/handlers/{classes/ExportHandler.d.ts → ExportHandler.d.ts} +1 -1
  53. package/lib/core/handlers/{classes/HierarchyModeHandler.d.ts → HierarchyModeHandler.d.ts} +1 -1
  54. package/lib/core/handlers/{classes/ItemsHandler.d.ts → ItemsHandler.d.ts} +1 -1
  55. package/lib/core/handlers/{classes/ReportModeHandler.d.ts → ReportModeHandler.d.ts} +2 -2
  56. package/lib/core/handlers/{classes/RowGroupingHandler.d.ts → RowGroupingHandler.d.ts} +8 -3
  57. package/lib/core/handlers/{classes/SelectionHandler.d.ts → SelectionHandler.d.ts} +3 -3
  58. package/lib/core/handlers/{classes/UtilitiesHandler.d.ts → UtilitiesHandler.d.ts} +0 -0
  59. package/lib/directives/es_th.directive.d.ts +3 -1
  60. package/lib/domain/configuration/EsTableDefaultable.d.ts +1 -0
  61. package/lib/domain/configuration/EsTableModuleConfig.d.ts +1 -1
  62. package/lib/domain/externals/{classes/CornerMenuOption.d.ts → CornerMenuOption.d.ts} +0 -0
  63. package/lib/domain/externals/{classes/EsTableColumnsDefinition.d.ts → EsTableColumnsDefinition.d.ts} +0 -0
  64. package/lib/domain/externals/{classes/EsTableOperationDefinition.d.ts → EsTableOperationDefinition.d.ts} +0 -0
  65. package/lib/domain/externals/{classes/appsearch → appsearch}/AppOrdering.d.ts +0 -0
  66. package/lib/domain/externals/{classes/appsearch → appsearch}/AppSearch.d.ts +0 -0
  67. package/lib/domain/externals/{classes/appsearch → appsearch}/GenericItem.d.ts +0 -0
  68. package/lib/domain/externals/{classes/appsearch → appsearch}/Group.d.ts +0 -0
  69. package/lib/domain/externals/{classes/appsearch → appsearch}/GroupAggregation.d.ts +0 -0
  70. package/lib/domain/externals/{classes/appsearch → appsearch}/GroupFilter.d.ts +0 -0
  71. package/lib/domain/externals/{classes/appsearch → appsearch}/GroupOrAggregation.d.ts +0 -0
  72. package/lib/domain/externals/{classes/appsearch → appsearch}/ItemsSelection.d.ts +1 -1
  73. package/lib/domain/externals/{classes/report → report}/ReportColumn.d.ts +0 -0
  74. package/lib/domain/externals/{classes/report → report}/ReportDefinition.d.ts +3 -1
  75. package/lib/domain/externals/{classes/report → report}/ReportOrder.d.ts +0 -0
  76. package/lib/domain/externals/{classes/report → report}/ReportParam.d.ts +0 -0
  77. package/lib/domain/externals/{classes/report → report}/ReportResult.d.ts +2 -1
  78. package/lib/domain/externals/{classes/report → report}/ReportRow.d.ts +0 -0
  79. package/lib/domain/internals/{classes/CacheTriptic.d.ts → CacheTriptic.d.ts} +0 -0
  80. package/lib/domain/internals/{classes/EsTableColumn.d.ts → EsTableColumn.d.ts} +2 -1
  81. package/lib/domain/internals/{classes/GroupPager.d.ts → GroupPager.d.ts} +4 -1
  82. package/lib/domain/internals/{classes/GroupRouteFragment.d.ts → GroupRouteFragment.d.ts} +0 -0
  83. package/lib/domain/internals/{classes/TdElement.d.ts → TdElement.d.ts} +17 -1
  84. package/lib/domain/internals/{classes/ThAggregation.d.ts → ThAggregation.d.ts} +0 -0
  85. package/lib/domain/internals/{classes/ThElement.d.ts → ThElement.d.ts} +0 -0
  86. package/package.json +1 -1
  87. package/public-api.d.ts +18 -1
  88. package/esm2015/lib/core/handlers/classes/ColumnMetadataHandler.js +0 -667
  89. package/esm2015/lib/core/handlers/classes/DynamicModeHandler.js +0 -64
  90. package/esm2015/lib/core/handlers/classes/ExportHandler.js +0 -106
  91. package/esm2015/lib/core/handlers/classes/HierarchyModeHandler.js +0 -136
  92. package/esm2015/lib/core/handlers/classes/ItemsHandler.js +0 -112
  93. package/esm2015/lib/core/handlers/classes/ReportModeHandler.js +0 -70
  94. package/esm2015/lib/core/handlers/classes/RowGroupingHandler.js +0 -473
  95. package/esm2015/lib/core/handlers/classes/SelectionHandler.js +0 -527
  96. package/esm2015/lib/core/handlers/classes/UtilitiesHandler.js +0 -155
  97. package/esm2015/lib/core/handlers/index.js +0 -10
  98. package/esm2015/lib/domain/externals/classes/CornerMenuOption.js +0 -4
  99. package/esm2015/lib/domain/externals/classes/EsTableColumnsDefinition.js +0 -31
  100. package/esm2015/lib/domain/externals/classes/EsTableOperationDefinition.js +0 -22
  101. package/esm2015/lib/domain/externals/classes/appsearch/AppOrdering.js +0 -16
  102. package/esm2015/lib/domain/externals/classes/appsearch/AppSearch.js +0 -35
  103. package/esm2015/lib/domain/externals/classes/appsearch/GenericItem.js +0 -11
  104. package/esm2015/lib/domain/externals/classes/appsearch/Group.js +0 -17
  105. package/esm2015/lib/domain/externals/classes/appsearch/GroupAggregation.js +0 -16
  106. package/esm2015/lib/domain/externals/classes/appsearch/GroupFilter.js +0 -14
  107. package/esm2015/lib/domain/externals/classes/appsearch/GroupOrAggregation.js +0 -16
  108. package/esm2015/lib/domain/externals/classes/appsearch/ItemsSelection.js +0 -23
  109. package/esm2015/lib/domain/externals/classes/report/ReportColumn.js +0 -4
  110. package/esm2015/lib/domain/externals/classes/report/ReportDefinition.js +0 -4
  111. package/esm2015/lib/domain/externals/classes/report/ReportOrder.js +0 -4
  112. package/esm2015/lib/domain/externals/classes/report/ReportParam.js +0 -4
  113. package/esm2015/lib/domain/externals/classes/report/ReportResult.js +0 -4
  114. package/esm2015/lib/domain/externals/classes/report/ReportRow.js +0 -4
  115. package/esm2015/lib/domain/externals/index.js +0 -18
  116. package/esm2015/lib/domain/index.js +0 -3
  117. package/esm2015/lib/domain/internals/classes/CacheTriptic.js +0 -16
  118. package/esm2015/lib/domain/internals/classes/EsTableColumn.js +0 -26
  119. package/esm2015/lib/domain/internals/classes/GroupPager.js +0 -21
  120. package/esm2015/lib/domain/internals/classes/GroupRouteFragment.js +0 -17
  121. package/esm2015/lib/domain/internals/classes/TdElement.js +0 -2
  122. package/esm2015/lib/domain/internals/classes/ThAggregation.js +0 -16
  123. package/esm2015/lib/domain/internals/classes/ThElement.js +0 -2
  124. package/esm2015/lib/domain/internals/index.js +0 -8
  125. package/lib/core/handlers/index.d.ts +0 -9
  126. package/lib/domain/externals/index.d.ts +0 -17
  127. package/lib/domain/index.d.ts +0 -2
  128. package/lib/domain/internals/index.d.ts +0 -7
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@esfaenza/extensions'), require('@esfaenza/localizations'), require('@esfaenza/preferences'), require('@angular/cdk/drag-drop'), require('@angular/common'), require('@angular/router'), require('@angular/material/select'), require('@angular/material/input'), require('@angular/platform-browser'), require('ngx-bootstrap/modal'), require('ngx-bootstrap/dropdown'), require('@ctrl/ngx-csv'), require('@esfaenza/ngx-contextmenu')) :
3
- typeof define === 'function' && define.amd ? define('@esfaenza/es-table', ['exports', '@angular/core', '@angular/forms', '@esfaenza/extensions', '@esfaenza/localizations', '@esfaenza/preferences', '@angular/cdk/drag-drop', '@angular/common', '@angular/router', '@angular/material/select', '@angular/material/input', '@angular/platform-browser', 'ngx-bootstrap/modal', 'ngx-bootstrap/dropdown', '@ctrl/ngx-csv', '@esfaenza/ngx-contextmenu'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.esfaenza = global.esfaenza || {}, global.esfaenza['es-table'] = {}), global.ng.core, global.ng.forms, global.i1, global.localizations, global.preferences, global.ng.cdk.dragDrop, global.ng.common, global.ng.router, global.ng.material.select, global.ng.material.input, global.ng.platformBrowser, global.modal, global.dropdown, global.ngxCsv, global.ngxContextmenu));
5
- }(this, (function (exports, i0, forms, i1, localizations, preferences, dragDrop, common, router, select, input, platformBrowser, modal, dropdown, ngxCsv, ngxContextmenu) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@esfaenza/localizations'), require('@esfaenza/extensions'), require('@angular/forms'), require('@esfaenza/preferences'), require('@angular/cdk/drag-drop'), require('@angular/common'), require('@angular/router'), require('@angular/material/select'), require('@angular/material/input'), require('@angular/platform-browser'), require('ngx-bootstrap/modal'), require('ngx-bootstrap/dropdown'), require('@ctrl/ngx-csv'), require('@esfaenza/ngx-contextmenu')) :
3
+ typeof define === 'function' && define.amd ? define('@esfaenza/es-table', ['exports', '@angular/core', '@esfaenza/localizations', '@esfaenza/extensions', '@angular/forms', '@esfaenza/preferences', '@angular/cdk/drag-drop', '@angular/common', '@angular/router', '@angular/material/select', '@angular/material/input', '@angular/platform-browser', 'ngx-bootstrap/modal', 'ngx-bootstrap/dropdown', '@ctrl/ngx-csv', '@esfaenza/ngx-contextmenu'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.esfaenza = global.esfaenza || {}, global.esfaenza['es-table'] = {}), global.ng.core, global.localizations, global.i1, global.ng.forms, global.preferences, global.ng.cdk.dragDrop, global.ng.common, global.ng.router, global.ng.material.select, global.ng.material.input, global.ng.platformBrowser, global.modal, global.dropdown, global.ngxCsv, global.ngxContextmenu));
5
+ }(this, (function (exports, i0, localizations, i1, forms, preferences, dragDrop, common, router, select, input, platformBrowser, modal, dropdown, ngxCsv, ngxContextmenu) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -336,22 +336,135 @@
336
336
  return value;
337
337
  }
338
338
 
339
- /**
340
- * Classe che identifica un ordinamento di una colonna
341
- */
342
- var AppOrdering = /** @class */ (function () {
339
+ /** Token che indica il locale da utilizzare all'interno del componente. Supportati solo "it-IT" ed "en-US" */
340
+ var EST_LOCALE = new i0.InjectionToken('EST_LOCALE');
341
+ /** Token che indica se emettere log a console o meno */
342
+ var EST_DEBUG = new i0.InjectionToken('EST_DEBUG');
343
+ /** Token che indica i default da assegnare agli Input */
344
+ var EST_DEFAULTS = new i0.InjectionToken('EST_DEFAULTS');
345
+
346
+ /** Classe di localizzazione per il componente **TablePagerComponent** */
347
+ var TablePagerLoc = /** @class */ (function (_super) {
348
+ __extends(TablePagerLoc, _super);
349
+ /** @ignore */
350
+ function TablePagerLoc(LOC_LOCALE) {
351
+ var _this = _super.call(this, LOC_LOCALE !== null && LOC_LOCALE !== void 0 ? LOC_LOCALE : 'it-IT') || this;
352
+ _super.prototype.set.call(_this, "en->it", "All", ["Tutto"]);
353
+ _super.prototype.set.call(_this, "en->it", "Shown Elements", ["Elementi visualizzati"]);
354
+ _super.prototype.set.call(_this, "en->it", "Shown Groups", ["Gruppi visualizzati"]);
355
+ _super.prototype.set.call(_this, "en->it", "Are you sure you want to retrieve all results?", ["Si è sicuri di voler caricare tutti i risultati?"]);
356
+ _super.prototype.set.call(_this, "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"]);
357
+ return _this;
358
+ }
359
+ return TablePagerLoc;
360
+ }(localizations.LocalizationService));
361
+ TablePagerLoc.decorators = [
362
+ { type: i0.Injectable }
363
+ ];
364
+ TablePagerLoc.ctorParameters = function () { return [
365
+ { type: String, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [EST_LOCALE,] }] }
366
+ ]; };
367
+
368
+ // Angular
369
+ /** Componente che si occupa della paginazione di una tabella */
370
+ var TablePagerComponent = /** @class */ (function () {
371
+ /** @ignore */
372
+ function TablePagerComponent(msgExts, lc, cdr, locale) {
373
+ this.msgExts = msgExts;
374
+ this.lc = lc;
375
+ this.cdr = cdr;
376
+ this.locale = locale;
377
+ /** Indica se deve mostrare un warning quando si cercano di solezionare come elementi da visualizzare "Tutti" */
378
+ this.WarnOnAll = true;
379
+ /** Indica se dare la possibilità o meno di selezionare "Tutti" nelle opzioni di paginazione */
380
+ this.AllSearch = true;
381
+ /** Placeholder che identifica il "Tutti" */
382
+ this.DefaultAll = 999999;
383
+ /** Indica se attivare la modalità gruppo con stili più snelli per apparire sotto ai raggruppamenti */
384
+ this.GroupMode = false;
385
+ /** Indica se utilizzare il conteggio dei gruppi o degli oggetti */
386
+ this.GroupCount = false;
387
+ /** Indica il testo che va a sostituire "Oggetti Visualizzati" in caso si stia facendo qualcosa di custom, Ignorato in caso di gruppi */
388
+ this.CountLabel = null;
389
+ /** Indica se visualizzare il numero totale di oggeti presenti */
390
+ this.ShowCount = true;
391
+ /** Indica se visualizzare il numero totale di oggeti presenti */
392
+ this.ShowPaging = true;
393
+ /** Output invocato quando il numero di elementi per pagina viene modificato da un click utente */
394
+ this.pagingSelected = new i0.EventEmitter();
395
+ /** Opzioni di paginazione */
396
+ this.PagingOptions = [10, 15, 30, 45, 100];
397
+ }
398
+ /** @ignore */
399
+ TablePagerComponent.prototype.ngOnInit = function () {
400
+ this.Model = this.View ? (this.View.itemsperpageoverride || 15) : this.CurrentPageSize;
401
+ if (this.AllSearch)
402
+ this.PagingOptions.push(this.DefaultAll);
403
+ };
404
+ /** @ignore */
405
+ TablePagerComponent.prototype.ngOnChanges = function (changes) {
406
+ var newView = changes['View'];
407
+ var newCPS = changes['CurrentPageSize'];
408
+ if ((newView && !newView.firstChange) || (newCPS && !newCPS.firstChange))
409
+ 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;
410
+ };
343
411
  /**
344
- * Costruttore
412
+ * Funzione richiamata dal template quando un utente clicca su un numero di paginazione.
345
413
  *
346
- * @param {string} id ID della colonna a cui si vogliono applicare ordinamenti, deve combaciare all'id messo nella dichiarazione dell'ES-TD/TH
347
- * @param {'DESC' | 'ASC' } order Ordinamento da applicare alla colonna, Discendente/Ascendente, default 'null' per indicare assenza di ordine
414
+ * Cliccare 2 volte sullo stesso numero causa comunque un refresh dei dati
415
+ *
416
+ * @param {number} pageSize Dimensione selezionata lato UI
348
417
  */
349
- function AppOrdering(id, order) {
350
- this.id = id;
351
- this.order = order;
352
- }
353
- return AppOrdering;
354
- }());
418
+ TablePagerComponent.prototype.choice = function (pageSize) {
419
+ var _this = this;
420
+ if (pageSize == this.DefaultAll && this.WarnOnAll) {
421
+ 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"), function () { _this.pagingSelected.emit(pageSize); _this.Model = pageSize; }, function () {
422
+ // Dio solo sa perché mi tocca fare sta roba... qui dentro per qualche motivo la CD non prende
423
+ var prevModel = _this.Model;
424
+ _this.Model = null;
425
+ _this.cdr.detectChanges();
426
+ _this.Model = prevModel;
427
+ _this.cdr.detectChanges();
428
+ });
429
+ }
430
+ else {
431
+ this.pagingSelected.emit(pageSize);
432
+ this.Model = pageSize;
433
+ }
434
+ };
435
+ return TablePagerComponent;
436
+ }());
437
+ TablePagerComponent.decorators = [
438
+ { type: i0.Component, args: [{
439
+ selector: "app-paging",
440
+ viewProviders: [{ provide: localizations.LocalizationService, useClass: TablePagerLoc }],
441
+ template: "<ng-container *ngIf=\"!Hidden\">\r\n <span class=\"est-fs-14\"> {{CountLabel && !GroupMode ? CountLabel : ((GroupMode ? 'Shown Groups' : 'Shown Elements') | localize : lc)}}:&nbsp;</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\">&nbsp;/&nbsp;</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>",
442
+ encapsulation: i0.ViewEncapsulation.None,
443
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
444
+ 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}"]
445
+ },] }
446
+ ];
447
+ TablePagerComponent.ctorParameters = function () { return [
448
+ { type: i1.MessageService },
449
+ { type: localizations.LocalizationService },
450
+ { type: i0.ChangeDetectorRef },
451
+ { type: String, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [EST_LOCALE,] }] }
452
+ ]; };
453
+ TablePagerComponent.propDecorators = {
454
+ CurrentPageSize: [{ type: i0.Input }],
455
+ View: [{ type: i0.Input }],
456
+ WarnOnAll: [{ type: i0.Input }],
457
+ AllSearch: [{ type: i0.Input }],
458
+ DefaultAll: [{ type: i0.Input }],
459
+ GroupMode: [{ type: i0.Input }],
460
+ GroupCount: [{ type: i0.Input }],
461
+ CountLabel: [{ type: i0.Input }],
462
+ ShowCount: [{ type: i0.Input }],
463
+ ShowPaging: [{ type: i0.Input }],
464
+ PagerCount: [{ type: i0.Input }],
465
+ Hidden: [{ type: i0.Input }],
466
+ pagingSelected: [{ type: i0.Output }]
467
+ };
355
468
 
356
469
  /**
357
470
  * Classe che identifica una ricerca paginata in tutte le sue sfumature (di grigio)
@@ -366,343 +479,80 @@
366
479
  this.orders = [];
367
480
  this.columns = [];
368
481
  this.column_ordering = [];
369
- this.savedstate = false;
370
- this.searchinprogress = false;
371
- this.firstsearch = true;
372
- }
373
- /**
374
- * Permette di resettare questo oggetto ai valori di default
375
- */
376
- AppSearch.prototype.reset = function () {
377
- this.pages = 1;
378
- this.objectcount = 0;
379
- this.searchinprogress = false;
380
- this.firstsearch = false;
381
- this.page = 1;
382
- this.itemsperpageoverride = 15;
383
- this.items = [];
384
- this.orders = [];
385
- this.columns = [];
386
- this.column_ordering = [];
387
- this.savedstate = false;
388
- };
389
- return AppSearch;
390
- }());
391
-
392
- /** Classe che identifica una colonna. Utilizzata in modalità "Colonne dinamiche" */
393
- var EsTableColumnsDefinition = /** @class */ (function () {
394
- /**
395
- * Costruttore
396
- *
397
- * @param {string} description Descrizione della colonna
398
- * @param {string} propertyName Nome della proprietà del modello in cui sono contenuti i dati da visualizzare per questa colonna
399
- * @param {string} routePath Route di navigazione. Es. "['/pages/mod/mod_detail', { 'idItem': '{0}', 'idItem2' : '{1}' }]"
400
- * @param {string[]} routeParameterProperties Proprietà da bindare a **routePath** per generare la route completa.
401
- * L'indice scritto in **routePath** è l'indice di accesso a questo array. Es. ["iditem", "iditem2"]
402
- * @param {'ASC' | 'DESC' } dataOrder Ordinamento dei dati presentati in questa colonna
403
- * @param {number} columnOrder Ordinamento di questa colonna
404
- * @param {boolean} visible Visibilità o meno della colonna
405
- * @param {string} clss Classe da applicare sia ai TD che ai TH relativi a questa colonna
406
- * @param {boolean} orderable Indica se la colonna è ordinabile o no (nel senso ASC / DESC / NONE)
407
- * @param {boolean} headerWraps Indica se il testo dell'header dev'essere wrappato all'interno del th. Di default no.
408
- */
409
- function EsTableColumnsDefinition(description, propertyName, routePath, routeParameterProperties, dataOrder, columnOrder, visible, clss, orderable, headerWraps) {
410
- if (routePath === void 0) { routePath = null; }
411
- if (routeParameterProperties === void 0) { routeParameterProperties = null; }
412
- if (dataOrder === void 0) { dataOrder = null; }
413
- if (columnOrder === void 0) { columnOrder = null; }
414
- if (visible === void 0) { visible = true; }
415
- if (clss === void 0) { clss = null; }
416
- if (orderable === void 0) { orderable = true; }
417
- if (headerWraps === void 0) { headerWraps = false; }
418
- this.description = description;
419
- this.propertyName = propertyName;
420
- this.routePath = routePath;
421
- this.routeParameterProperties = routeParameterProperties;
422
- this.dataOrder = dataOrder;
423
- this.columnOrder = columnOrder;
424
- this.visible = visible;
425
- this.clss = clss;
426
- this.orderable = orderable;
427
- this.headerWraps = headerWraps;
428
- }
429
- return EsTableColumnsDefinition;
430
- }());
431
-
432
- /** Classe che definisce un oggetto generico come lista di proprietà-valore */
433
- var GenericItem = /** @class */ (function () {
434
- /** @ignore */
435
- function GenericItem() {
436
- this._selected = false;
437
- this._rowClass = null;
438
- this._hash = null;
439
- this.properties = {};
440
- }
441
- return GenericItem;
442
- }());
443
-
444
- /** Indica un'opzione cliccabile nel Corner Menù della tabella (il menù richiamabile dai 3 pallini verticli in alto a destra) */
445
- var CornerMenuOption = /** @class */ (function () {
446
- function CornerMenuOption() {
447
- }
448
- return CornerMenuOption;
449
- }());
450
-
451
- /** Definizione generica di un report che può o no disporre di paginazione/export e la cui richiesta è basata su uno o più parametri */
452
- var ReportDefinition = /** @class */ (function () {
453
- function ReportDefinition() {
454
- }
455
- return ReportDefinition;
456
- }());
457
-
458
- /** Classe che identifica una direttiva di ordinamento per un report */
459
- var ReportOrder = /** @class */ (function () {
460
- function ReportOrder() {
461
- }
462
- return ReportOrder;
463
- }());
464
-
465
- /** Classe che rappresenta una colonna di un report */
466
- var ReportColumn = /** @class */ (function () {
467
- function ReportColumn() {
468
- }
469
- return ReportColumn;
470
- }());
471
-
472
- /** Classe che rappresenta una lista di oggetti generati da un report */
473
- var ReportResult = /** @class */ (function () {
474
- function ReportResult() {
475
- }
476
- return ReportResult;
477
- }());
478
-
479
- /** Classe che rappresenta i valori delle proprietà di un oggetto Report */
480
- var ReportRow = /** @class */ (function () {
481
- function ReportRow() {
482
- }
483
- return ReportRow;
484
- }());
485
-
486
- /** Classe che identifica un parametro generico per un report */
487
- var ReportParam = /** @class */ (function () {
488
- function ReportParam() {
489
- }
490
- return ReportParam;
491
- }());
492
-
493
- /** Indica operazioni dinamiche generiche che possono essere effettuate per riga. Appaiono come colonne extra sul lato sinistro della tabella */
494
- var EsTableOperationDefinition = /** @class */ (function () {
495
- /**
496
- * Costruttore
497
- *
498
- * @param {string} id Codice dell'operazione
499
- * @param {string} title Titolo dell'operazione, da presentare all'utente su hover della cella
500
- * @param {string} iconClass Classe che fornisca un iconcina Es. "fa fa-remove"
501
- * @param {string} text Eventuale testo presentato nella cella, genericamente va in alternativa a **iconClass**
502
- * @param {string} conditionField Indica il campo dell'oggetto sottostante su cui verificare la visibilità o meno di questa icona
503
- * @param {string} conditionValue Indica il valore che la proprietà **conditionField** dell'oggetto sottostante deve assumere affinché questa opzione si veda
504
- */
505
- function EsTableOperationDefinition(id, title, iconClass, text, conditionField, conditionValue) {
506
- this.id = id;
507
- this.title = title;
508
- this.iconClass = iconClass;
509
- this.text = text;
510
- this.conditionField = conditionField;
511
- this.conditionValue = conditionValue;
512
- }
513
- return EsTableOperationDefinition;
514
- }());
515
-
516
- /** Identifica una selezione applicabile agli oggetti presentati in una tabella */
517
- var ItemsSelection = /** @class */ (function () {
518
- /**
519
- * Costruttore
520
- *
521
- * @param {T[]} selected Oggetti da considerare selezionati
522
- */
523
- function ItemsSelection(selected) {
524
- /** Indica se tutti gli elementi sono da considerarsi selezionati (anche quelli di altre pagine) */
525
- this.all = false;
526
- /** Se **all** è **true**, indica gli elementi da escludere, altrimenti è insensato */
527
- this.exclusions = [];
528
- /** Se **all** è **true**, indica i gruppi da escludere, altrimenti è insensato */
529
- this.group_exclusions = [];
530
- this.count = selected.length;
531
- this.items = selected;
532
- this.all = false;
533
- this.exclusions = [];
534
- this.groups = [];
535
- this.group_exclusions = [];
536
- }
537
- return ItemsSelection;
538
- }());
539
-
540
- /** Classe che rappresenta un Gruppo con le proprie aggregazioni */
541
- var Group = /** @class */ (function () {
542
- /**
543
- * Costruttore
544
- *
545
- * @param {string} column ID della colonna raggruppata
546
- * @param {number} count Numero di elementi raggruppati sotto questa colonna
547
- * @param {string} value Valore del Gruppo
548
- */
549
- function Group(column, count, value) {
550
- this.column = column;
551
- this.count = count;
552
- this.value = value;
553
- this.aggregations = [];
554
- }
555
- return Group;
556
- }());
557
-
558
- /** Classe che rappresenta un'aggregazione */
559
- var GroupAggregation = /** @class */ (function () {
560
- /**
561
- * Costruttore
562
- *
563
- * @param {string} column ID della colonna aggregata
564
- * @param {'min' | 'max' | 'sum' } aggregation Aggregazione da effettuare su questa colonna
565
- * @param {string} value Valore dell'aggregazione
566
- */
567
- function GroupAggregation(column, aggregation, value) {
568
- this.column = column;
569
- this.aggregation = aggregation;
570
- this.value = value;
571
- }
572
- return GroupAggregation;
573
- }());
574
-
575
- /** Classe che rappresenta un filtro su un gruppo */
576
- var GroupFilter = /** @class */ (function () {
577
- /**
578
- * Costruttore
579
- *
580
- * @param {string} column ID della colonna gruppata per cui si richiede di filtrare
581
- * @param {string} value Valore del gruppo su questa **column** per cui si richiede di filtrare
582
- */
583
- function GroupFilter(column, value) {
584
- this.column = column;
585
- this.value = value;
586
- }
587
- return GroupFilter;
588
- }());
589
-
590
- /** Classe che rappresenta o un gruppo o una aggregazione su una colonna. Usata solo internamente */
591
- var GroupOrAggregation = /** @class */ (function () {
592
- /**
593
- * Costruttore
594
- *
595
- * @param {string} column Colonna su cui è presente o un gruppo o un'aggregazione
596
- * @param {'min' | 'max' | 'sum' } aggregation Aggregazione presente sulla **column**. Se questo campo è nullo significa che è un gruppo.
597
- * @param {'string' | 'date' | 'number'} datatype Tipo di dati contenuto nella colonna **column** se non c'è alcuna aggregazione è inutile, pertanto non sarà valorizzato
598
- */
599
- function GroupOrAggregation(column, aggregation, datatype) {
600
- this.column = column;
601
- this.aggregation = aggregation;
602
- this.datatype = datatype;
603
- }
604
- return GroupOrAggregation;
605
- }());
606
-
607
- /** 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 */
608
- var CacheTriptic = /** @class */ (function () {
609
- /**
610
- * Costruttore
611
- *
612
- * @param {Map<string, any>} cache Cache Chiave-Oggetto
613
- * @param {Map<string, number>} index_cache Cache Indice-Oggetto
614
- * @param {any[]} array Array contenente gli oggetti
615
- */
616
- function CacheTriptic(cache, index_cache, array) {
617
- this.cache = cache;
618
- this.index_cache = index_cache;
619
- this.array = array;
620
- }
621
- return CacheTriptic;
622
- }());
623
-
624
- /** Definizione di una colonna, utilizzato nella dialog che permette di modificare le posizioni e le visibilità */
625
- var EsTableColumn = /** @class */ (function () {
482
+ this.savedstate = false;
483
+ this.searchinprogress = false;
484
+ this.firstsearch = true;
485
+ }
626
486
  /**
627
- * Costruttore
628
- *
629
- * @param {string} id Id colonna
630
- * @param {string} description Descrizione (Header)
631
- * @param {boolean} visible Indica se di default mostrarla o meno
632
- * @param {boolean} fixed Indica se è una colonna fixed
633
- * @param {boolean} pinned Indica se è una colonna pinnata
634
- * @param {number} pinnedWidth Indica la dimensione da assegnare a questa colonna quando è pinnata
635
- * @param {TemplateRef<any>} template Indica il template da usare per mostrare il testo dell'Header
636
- * @param {TemplateRef<any>[]} parentTemplates Indica la lista di template padri collegata a questo header
487
+ * Permette di resettare questo oggetto ai valori di default
637
488
  */
638
- function EsTableColumn(id, description, visible, fixed, pinned, pinnedWidth, template, parentTemplates) {
639
- this.id = id;
640
- this.description = description;
641
- this.visible = visible;
642
- this.fixed = fixed;
643
- this.pinned = pinned;
644
- this.pinnedWidth = pinnedWidth;
645
- this.template = template;
646
- this.parentTemplates = parentTemplates;
489
+ AppSearch.prototype.reset = function () {
490
+ this.pages = 1;
491
+ this.objectcount = 0;
492
+ this.searchinprogress = false;
493
+ this.firstsearch = false;
494
+ this.page = 1;
495
+ this.itemsperpageoverride = 15;
496
+ this.items = [];
497
+ this.orders = [];
498
+ this.columns = [];
499
+ this.column_ordering = [];
500
+ this.savedstate = false;
501
+ };
502
+ return AppSearch;
503
+ }());
504
+
505
+ /** Definizione generica di un report che può o no disporre di paginazione/export e la cui richiesta è basata su uno o più parametri */
506
+ var ReportDefinition = /** @class */ (function () {
507
+ function ReportDefinition() {
647
508
  }
648
- return EsTableColumn;
509
+ return ReportDefinition;
649
510
  }());
650
511
 
651
- /** Classe che rappresenta un separatore da inserire fra gli oggetti dell'es-table per le operazioni di paginazione dei raggruppamenti per riga */
652
- var GroupPager = /** @class */ (function () {
512
+ /** Identifica una selezione applicabile agli oggetti presentati in una tabella */
513
+ var ItemsSelection = /** @class */ (function () {
653
514
  /**
654
515
  * Costruttore
655
516
  *
656
- * @param {number} groupLevel Livello del gruppo a cui questo separatore fa riferimento
657
- * @param {string} parentKey Chiave del gruppo parent se esiste
658
- * @param {AppSearch<any>} view Vista di ricerca collegata a questo elemento
659
- * @param {'groups' | 'items'} searches Indica che cosa cerca questo separatore, se sottogruppi o oggetti
517
+ * @param {T[]} selected Oggetti da considerare selezionati
660
518
  */
661
- function GroupPager(_grouplevel, _thisRoute, _parent, view, searches) {
662
- this._grouplevel = _grouplevel;
663
- this._thisRoute = _thisRoute;
664
- this._parent = _parent;
665
- this.view = view;
666
- this.searches = searches;
667
- this._sep = true;
668
- this.buttons = [];
519
+ function ItemsSelection(selected) {
520
+ /** Indica se tutti gli elementi sono da considerarsi selezionati (anche quelli di altre pagine) */
521
+ this.all = false;
522
+ /** Se **all** è **true**, indica gli elementi da escludere, altrimenti è insensato */
523
+ this.exclusions = [];
524
+ /** Se **all** è **true**, indica i gruppi da escludere, altrimenti è insensato */
525
+ this.group_exclusions = [];
526
+ this.count = selected.length;
527
+ this.items = selected;
528
+ this.all = false;
529
+ this.exclusions = [];
530
+ this.groups = [];
531
+ this.group_exclusions = [];
669
532
  }
670
- return GroupPager;
533
+ return ItemsSelection;
671
534
  }());
672
535
 
673
- /**
674
- * 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
675
- * per arrivare ad una ricerca su sottogruppi o elementi relativi
676
- */
677
- var GroupRouteFragment = /** @class */ (function () {
536
+ /** Classe che rappresenta un filtro su un gruppo */
537
+ var GroupFilter = /** @class */ (function () {
678
538
  /**
679
539
  * Costruttore
680
540
  *
681
- * @param {string} column Colonna di raggruppamento
682
- * @param {string} value Valore della colonna di raggruppamento
541
+ * @param {string} column ID della colonna gruppata per cui si richiede di filtrare
542
+ * @param {string} value Valore del gruppo su questa **column** per cui si richiede di filtrare
683
543
  */
684
- function GroupRouteFragment(column, value) {
544
+ function GroupFilter(column, value) {
685
545
  this.column = column;
686
546
  this.value = value;
687
547
  }
688
- return GroupRouteFragment;
548
+ return GroupFilter;
689
549
  }());
690
550
 
691
- /** Classe rappresentante una singola aggregazione effettuata su una colonna */
692
- var ThAggregation = /** @class */ (function () {
693
- /**
694
- * Costruttore
695
- *
696
- * @param {'min' | 'max' | 'sum'} func Funzione di aggergazione, può essere **min**, **max** o **sum**
697
- * @param {string} format Formato richiesto per il valore dell'aggregazione
698
- * @param {string} match Match intero del pezzo di testo da cui si è estrapolata l'aggregazione, da rimpiazzare col valore calcolato
699
- */
700
- function ThAggregation(func, format, match) {
701
- this.func = func;
702
- this.format = format;
703
- this.match = match;
551
+ /** Raccolta di tutti gli Input dell'EsTable a cui può essere logicamente sensato assegnare default per progetto */
552
+ var EsTableDefaultable = /** @class */ (function () {
553
+ function EsTableDefaultable() {
704
554
  }
705
- return ThAggregation;
555
+ return EsTableDefaultable;
706
556
  }());
707
557
 
708
558
  /** Direttiva per la dichiarazione snella di un EsTd da emettere per ogni elemento, data una colonna */
@@ -753,6 +603,8 @@
753
603
  this.th = "";
754
604
  /** Indica se la colonna è pinnata o no */
755
605
  this.thPinned = false;
606
+ /** Indica se la colonna è pinnabile o no */
607
+ this.thPinnable = true;
756
608
  /** Indica le dimensioni che deve avere questa colonna quando viene pinnata, senza questo tutte le colonne mi collasserebbero l'una sull'altra */
757
609
  this.thPinnedWidth = 150;
758
610
  /** Indicazione sulla visibilità della colonna */
@@ -787,6 +639,7 @@
787
639
  EsThDirective.propDecorators = {
788
640
  th: [{ type: i0.Input }],
789
641
  thPinned: [{ type: i0.Input }],
642
+ thPinnable: [{ type: i0.Input }],
790
643
  thPinnedWidth: [{ type: i0.Input }],
791
644
  thVisible: [{ type: i0.Input }],
792
645
  thFixed: [{ type: i0.Input }],
@@ -803,13 +656,6 @@
803
656
  thAggregation: [{ type: i0.Input }]
804
657
  };
805
658
 
806
- /** Token che indica il locale da utilizzare all'interno del componente. Supportati solo "it-IT" ed "en-US" */
807
- var EST_LOCALE = new i0.InjectionToken('EST_LOCALE');
808
- /** Token che indica se emettere log a console o meno */
809
- var EST_DEBUG = new i0.InjectionToken('EST_DEBUG');
810
- /** Token che indica i default da assegnare agli Input */
811
- var EST_DEFAULTS = new i0.InjectionToken('EST_DEFAULTS');
812
-
813
659
  /** Classe di localizzazione per il componente **EsTableComponent** */
814
660
  var EsTableLoc = /** @class */ (function (_super) {
815
661
  __extends(EsTableLoc, _super);
@@ -846,14 +692,184 @@
846
692
  { type: String, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [EST_LOCALE,] }] }
847
693
  ]; };
848
694
 
849
- /** Raccolta di tutti gli Input dell'EsTable a cui può essere logicamente sensato assegnare default per progetto */
850
- var EsTableDefaultable = /** @class */ (function () {
851
- function EsTableDefaultable() {
695
+ /** Classe contenente la gestione delle importazioni */
696
+ var ExportHandler = /** @class */ (function () {
697
+ /** @ignore Costruttore*/
698
+ function ExportHandler(est, expExts, msgExts, utiExts, dateExts) {
699
+ this.est = est;
700
+ this.expExts = expExts;
701
+ this.msgExts = msgExts;
702
+ this.utiExts = utiExts;
703
+ this.dateExts = dateExts;
704
+ }
705
+ /**
706
+ * Effettua l'esportazione dei dati
707
+ *
708
+ * @param {string} format Formato di esportazione. Letto solo in modalità Report della tabella
709
+ */
710
+ ExportHandler.prototype.tryExport = function (format) {
711
+ var _this = this;
712
+ if (!this.est.ExportFunction)
713
+ return;
714
+ if (this.est.reportMode)
715
+ this.est.ExportFunction(format);
716
+ else
717
+ this.est.ExportFunction(function (data, cancel) {
718
+ if (cancel === void 0) { cancel = false; }
719
+ return __awaiter(_this, void 0, void 0, function () {
720
+ var _b, _a_1;
721
+ var _this = this;
722
+ return __generator(this, function (_c) {
723
+ switch (_c.label) {
724
+ case 0:
725
+ if (cancel)
726
+ return [2 /*return*/];
727
+ if (data.length == 0) {
728
+ this.msgExts.simpleWarning(this.est.lc.loc("Cannot export an empty dataset"));
729
+ return [2 /*return*/];
730
+ }
731
+ this.setupExport(data);
732
+ if (!(format == "CSV")) return [3 /*break*/, 1];
733
+ this.est.cdr.detectChanges();
734
+ setTimeout(function () { _this.est.exportDownloader.nativeElement.click(); });
735
+ return [3 /*break*/, 7];
736
+ case 1:
737
+ if (!(format == "XLSX")) return [3 /*break*/, 6];
738
+ if (this.ExcelJS != null) {
739
+ this.exportExcel();
740
+ return [2 /*return*/];
741
+ }
742
+ _c.label = 2;
743
+ case 2:
744
+ _c.trys.push([2, 4, , 5]);
745
+ _b = this;
746
+ return [4 /*yield*/, import('exceljs')];
747
+ case 3:
748
+ _b.ExcelJS = _c.sent();
749
+ this.exportExcel();
750
+ return [3 /*break*/, 5];
751
+ case 4:
752
+ _a_1 = _c.sent();
753
+ throw "Impossibile caricare la libreria per l'esportazione in Excel";
754
+ case 5: return [3 /*break*/, 7];
755
+ case 6: throw "Formato di esportazione non riconosciuto";
756
+ case 7: return [2 /*return*/];
757
+ }
758
+ });
759
+ });
760
+ });
761
+ };
762
+ /** Effettua l'esportazione del file Excel basandosi sul modulo **ExcelJS**, sugli header **this.est.headers** e sui dati **this.est.data** */
763
+ ExportHandler.prototype.exportExcel = function () {
764
+ return __awaiter(this, void 0, void 0, function () {
765
+ var iFix, workbook, sheet, header, i, h, i, row, item, i_1, h, cell, val, buffer, blob, objectUrl, fn;
766
+ return __generator(this, function (_b) {
767
+ switch (_b.label) {
768
+ case 0:
769
+ iFix = 1;
770
+ workbook = new this.ExcelJS.Workbook();
771
+ workbook.creator = "Ema's big Es-Table";
772
+ workbook.created = new Date();
773
+ sheet = workbook.addWorksheet('Data');
774
+ header = sheet.getRow(1);
775
+ header.font = { bold: true };
776
+ this.est.headers = this.est.headers.sort(function (a, b) { return a.order - b.order; });
777
+ for (i = 0; i < this.est.headers.length; i++) {
778
+ h = this.est.headers[i];
779
+ header.getCell(i + iFix).value = h.label;
780
+ }
781
+ for (i = 0; i < this.est.data.length; i++) {
782
+ row = sheet.getRow(i + iFix + 1);
783
+ item = this.est.data[i];
784
+ for (i_1 = 0; i_1 < this.est.headers.length; i_1++) {
785
+ h = this.est.headers[i_1];
786
+ cell = row.getCell(i_1 + 1);
787
+ val = item[h.key];
788
+ if (val == null || val == undefined)
789
+ cell.value = "";
790
+ else {
791
+ switch (h.type) {
792
+ case 'date':
793
+ cell.value = this.dateExts.getDateConvertion(val).toDate();
794
+ case 'number':
795
+ cell.value = parseFloat(val.replace(',', '.'));
796
+ default:
797
+ cell.value = val;
798
+ }
799
+ }
800
+ }
801
+ }
802
+ return [4 /*yield*/, workbook.xlsx.writeBuffer()];
803
+ case 1:
804
+ buffer = _b.sent();
805
+ blob = new Blob([buffer], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;" });
806
+ objectUrl = window.URL.createObjectURL(blob);
807
+ fn = this.est.ExportFileName;
808
+ this.utiExts.fileDownload(objectUrl, fn.endsWith('.csv') ? fn.replace('.csv', '.xlsx') : fn.endsWith('.xlsx') ? fn : fn + ".xlsx");
809
+ return [2 /*return*/];
810
+ }
811
+ });
812
+ });
813
+ };
814
+ /**
815
+ * Metodo che effettivamente genera gli header e i dati per l'esportazione con **ngx-csv**
816
+ *
817
+ * @param {any[]} items Oggetti da esportare
818
+ */
819
+ ExportHandler.prototype.setupExport = function (items) {
820
+ var drcd = this.est.DynamicRowColumnsDefinition;
821
+ this.est.headers = drcd && drcd.length > 0 ? this.expExts.setupForGenericExport(items, drcd.map(function (t) { return { label: t.description, key: t.propertyName, order: t.columnOrder, type: 'string' }; })) : this.expExts.setupForExport(items);
822
+ this.est.data = items;
823
+ };
824
+ return ExportHandler;
825
+ }());
826
+
827
+ /**
828
+ * Classe che identifica un ordinamento di una colonna
829
+ */
830
+ var AppOrdering = /** @class */ (function () {
831
+ /**
832
+ * Costruttore
833
+ *
834
+ * @param {string} id ID della colonna a cui si vogliono applicare ordinamenti, deve combaciare all'id messo nella dichiarazione dell'ES-TD/TH
835
+ * @param {'DESC' | 'ASC' } order Ordinamento da applicare alla colonna, Discendente/Ascendente, default 'null' per indicare assenza di ordine
836
+ */
837
+ function AppOrdering(id, order) {
838
+ this.id = id;
839
+ this.order = order;
840
+ }
841
+ return AppOrdering;
842
+ }());
843
+
844
+ /** Definizione di una colonna, utilizzato nella dialog che permette di modificare le posizioni e le visibilità */
845
+ var EsTableColumn = /** @class */ (function () {
846
+ /**
847
+ * Costruttore
848
+ *
849
+ * @param {string} id Id colonna
850
+ * @param {string} description Descrizione (Header)
851
+ * @param {boolean} visible Indica se di default mostrarla o meno
852
+ * @param {boolean} fixed Indica se è una colonna fixed
853
+ * @param {boolean} pinned Indica se è una colonna pinnata
854
+ * @param {number} pinnedWidth Indica la dimensione da assegnare a questa colonna quando è pinnata
855
+ * @param {TemplateRef<any>} template Indica il template da usare per mostrare il testo dell'Header
856
+ * @param {TemplateRef<any>[]} parentTemplates Indica la lista di template padri collegata a questo header
857
+ */
858
+ function EsTableColumn(id, description, visible, fixed, pinned, pinnable, pinnedWidth, template, parentTemplates) {
859
+ this.id = id;
860
+ this.description = description;
861
+ this.visible = visible;
862
+ this.fixed = fixed;
863
+ this.pinned = pinned;
864
+ this.pinnable = pinnable;
865
+ this.pinnedWidth = pinnedWidth;
866
+ this.template = template;
867
+ this.parentTemplates = parentTemplates;
852
868
  }
853
- return EsTableDefaultable;
869
+ return EsTableColumn;
854
870
  }());
855
871
 
856
- // Modelli
872
+ // Angular
857
873
  /** Classe che gestisce tutte le informaizoni relative alle colonne: visibilità, posizione, stato di pin/unpin, ecc ecc... */
858
874
  var ColumnMetadataHandler = /** @class */ (function () {
859
875
  /** @ignore Costruttore*/
@@ -935,7 +951,7 @@
935
951
  // Di default la visibilità è quella impostata nel componente
936
952
  if ((this_1.est.HiddenColumns || th.thVisible) && th.thIf) {
937
953
  var previouslyPinned = !this_1.est.ColumnsList || this_1.est.ColumnsList.length == 0 ? null : this_1.est.ColumnsList.find(function (t) { return t.id == column; }) || null;
938
- var toAdd = new EsTableColumn(column, null, th.thVisible, (th.thFixed || th.thGroup), previouslyPinned == null ? th.thPinned : previouslyPinned.pinned, th.thPinnedWidth, th.Template, th._thParents);
954
+ var 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);
939
955
  if (previouslyPinned)
940
956
  toAdd.prev_index = previouslyPinned.prev_index;
941
957
  this_1.est.TMPColumnsList.push(toAdd);
@@ -1537,7 +1553,46 @@
1537
1553
  return ColumnMetadataHandler;
1538
1554
  }());
1539
1555
 
1540
- // Dominio
1556
+ /** Classe che identifica una colonna. Utilizzata in modalità "Colonne dinamiche" */
1557
+ var EsTableColumnsDefinition = /** @class */ (function () {
1558
+ /**
1559
+ * Costruttore
1560
+ *
1561
+ * @param {string} description Descrizione della colonna
1562
+ * @param {string} propertyName Nome della proprietà del modello in cui sono contenuti i dati da visualizzare per questa colonna
1563
+ * @param {string} routePath Route di navigazione. Es. "['/pages/mod/mod_detail', { 'idItem': '{0}', 'idItem2' : '{1}' }]"
1564
+ * @param {string[]} routeParameterProperties Proprietà da bindare a **routePath** per generare la route completa.
1565
+ * L'indice scritto in **routePath** è l'indice di accesso a questo array. Es. ["iditem", "iditem2"]
1566
+ * @param {'ASC' | 'DESC' } dataOrder Ordinamento dei dati presentati in questa colonna
1567
+ * @param {number} columnOrder Ordinamento di questa colonna
1568
+ * @param {boolean} visible Visibilità o meno della colonna
1569
+ * @param {string} clss Classe da applicare sia ai TD che ai TH relativi a questa colonna
1570
+ * @param {boolean} orderable Indica se la colonna è ordinabile o no (nel senso ASC / DESC / NONE)
1571
+ * @param {boolean} headerWraps Indica se il testo dell'header dev'essere wrappato all'interno del th. Di default no.
1572
+ */
1573
+ function EsTableColumnsDefinition(description, propertyName, routePath, routeParameterProperties, dataOrder, columnOrder, visible, clss, orderable, headerWraps) {
1574
+ if (routePath === void 0) { routePath = null; }
1575
+ if (routeParameterProperties === void 0) { routeParameterProperties = null; }
1576
+ if (dataOrder === void 0) { dataOrder = null; }
1577
+ if (columnOrder === void 0) { columnOrder = null; }
1578
+ if (visible === void 0) { visible = true; }
1579
+ if (clss === void 0) { clss = null; }
1580
+ if (orderable === void 0) { orderable = true; }
1581
+ if (headerWraps === void 0) { headerWraps = false; }
1582
+ this.description = description;
1583
+ this.propertyName = propertyName;
1584
+ this.routePath = routePath;
1585
+ this.routeParameterProperties = routeParameterProperties;
1586
+ this.dataOrder = dataOrder;
1587
+ this.columnOrder = columnOrder;
1588
+ this.visible = visible;
1589
+ this.clss = clss;
1590
+ this.orderable = orderable;
1591
+ this.headerWraps = headerWraps;
1592
+ }
1593
+ return EsTableColumnsDefinition;
1594
+ }());
1595
+
1541
1596
  /** Classe contenente le gestioni particolari della modalità dinamica dell'es-table */
1542
1597
  var DynamicModeHandler = /** @class */ (function () {
1543
1598
  /** @ignore Costruttore*/
@@ -1601,138 +1656,6 @@
1601
1656
  return DynamicModeHandler;
1602
1657
  }());
1603
1658
 
1604
- /** Classe contenente la gestione delle importazioni */
1605
- var ExportHandler = /** @class */ (function () {
1606
- /** @ignore Costruttore*/
1607
- function ExportHandler(est, expExts, msgExts, utiExts, dateExts) {
1608
- this.est = est;
1609
- this.expExts = expExts;
1610
- this.msgExts = msgExts;
1611
- this.utiExts = utiExts;
1612
- this.dateExts = dateExts;
1613
- }
1614
- /**
1615
- * Effettua l'esportazione dei dati
1616
- *
1617
- * @param {string} format Formato di esportazione. Letto solo in modalità Report della tabella
1618
- */
1619
- ExportHandler.prototype.tryExport = function (format) {
1620
- var _this = this;
1621
- if (!this.est.ExportFunction)
1622
- return;
1623
- if (this.est.reportMode)
1624
- this.est.ExportFunction(format);
1625
- else
1626
- this.est.ExportFunction(function (data, cancel) {
1627
- if (cancel === void 0) { cancel = false; }
1628
- return __awaiter(_this, void 0, void 0, function () {
1629
- var _b, _a_1;
1630
- var _this = this;
1631
- return __generator(this, function (_c) {
1632
- switch (_c.label) {
1633
- case 0:
1634
- if (cancel)
1635
- return [2 /*return*/];
1636
- if (data.length == 0) {
1637
- this.msgExts.simpleWarning(this.est.lc.loc("Cannot export an empty dataset"));
1638
- return [2 /*return*/];
1639
- }
1640
- this.setupExport(data);
1641
- if (!(format == "CSV")) return [3 /*break*/, 1];
1642
- this.est.cdr.detectChanges();
1643
- setTimeout(function () { _this.est.exportDownloader.nativeElement.click(); });
1644
- return [3 /*break*/, 7];
1645
- case 1:
1646
- if (!(format == "XLSX")) return [3 /*break*/, 6];
1647
- if (this.ExcelJS != null) {
1648
- this.exportExcel();
1649
- return [2 /*return*/];
1650
- }
1651
- _c.label = 2;
1652
- case 2:
1653
- _c.trys.push([2, 4, , 5]);
1654
- _b = this;
1655
- return [4 /*yield*/, import('exceljs')];
1656
- case 3:
1657
- _b.ExcelJS = _c.sent();
1658
- this.exportExcel();
1659
- return [3 /*break*/, 5];
1660
- case 4:
1661
- _a_1 = _c.sent();
1662
- throw "Impossibile caricare la libreria per l'esportazione in Excel";
1663
- case 5: return [3 /*break*/, 7];
1664
- case 6: throw "Formato di esportazione non riconosciuto";
1665
- case 7: return [2 /*return*/];
1666
- }
1667
- });
1668
- });
1669
- });
1670
- };
1671
- /** Effettua l'esportazione del file Excel basandosi sul modulo **ExcelJS**, sugli header **this.est.headers** e sui dati **this.est.data** */
1672
- ExportHandler.prototype.exportExcel = function () {
1673
- return __awaiter(this, void 0, void 0, function () {
1674
- var iFix, workbook, sheet, header, i, h, i, row, item, i_1, h, cell, val, buffer, blob, objectUrl, fn;
1675
- return __generator(this, function (_b) {
1676
- switch (_b.label) {
1677
- case 0:
1678
- iFix = 1;
1679
- workbook = new this.ExcelJS.Workbook();
1680
- workbook.creator = "Ema's big Es-Table";
1681
- workbook.created = new Date();
1682
- sheet = workbook.addWorksheet('Data');
1683
- header = sheet.getRow(1);
1684
- header.font = { bold: true };
1685
- this.est.headers = this.est.headers.sort(function (a, b) { return a.order - b.order; });
1686
- for (i = 0; i < this.est.headers.length; i++) {
1687
- h = this.est.headers[i];
1688
- header.getCell(i + iFix).value = h.label;
1689
- }
1690
- for (i = 0; i < this.est.data.length; i++) {
1691
- row = sheet.getRow(i + iFix + 1);
1692
- item = this.est.data[i];
1693
- for (i_1 = 0; i_1 < this.est.headers.length; i_1++) {
1694
- h = this.est.headers[i_1];
1695
- cell = row.getCell(i_1 + 1);
1696
- val = item[h.key];
1697
- if (val == null || val == undefined)
1698
- cell.value = "";
1699
- else {
1700
- switch (h.type) {
1701
- case 'date':
1702
- cell.value = this.dateExts.getDateConvertion(val).toDate();
1703
- case 'number':
1704
- cell.value = parseFloat(val.replace(',', '.'));
1705
- default:
1706
- cell.value = val;
1707
- }
1708
- }
1709
- }
1710
- }
1711
- return [4 /*yield*/, workbook.xlsx.writeBuffer()];
1712
- case 1:
1713
- buffer = _b.sent();
1714
- blob = new Blob([buffer], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;" });
1715
- objectUrl = window.URL.createObjectURL(blob);
1716
- fn = this.est.ExportFileName;
1717
- this.utiExts.fileDownload(objectUrl, fn.endsWith('.csv') ? fn.replace('.csv', '.xlsx') : fn.endsWith('.xlsx') ? fn : fn + ".xlsx");
1718
- return [2 /*return*/];
1719
- }
1720
- });
1721
- });
1722
- };
1723
- /**
1724
- * Metodo che effettivamente genera gli header e i dati per l'esportazione con **ngx-csv**
1725
- *
1726
- * @param {any[]} items Oggetti da esportare
1727
- */
1728
- ExportHandler.prototype.setupExport = function (items) {
1729
- var drcd = this.est.DynamicRowColumnsDefinition;
1730
- this.est.headers = drcd && drcd.length > 0 ? this.expExts.setupForGenericExport(items, drcd.map(function (t) { return { label: t.description, key: t.propertyName, order: t.columnOrder, type: 'string' }; })) : this.expExts.setupForExport(items);
1731
- this.est.data = items;
1732
- };
1733
- return ExportHandler;
1734
- }());
1735
-
1736
1659
  /** Classe contenente la gestione della modalità gerarchica */
1737
1660
  var HierarchyModeHandler = /** @class */ (function () {
1738
1661
  /** @ignore Costruttore*/
@@ -1987,7 +1910,13 @@
1987
1910
  return ItemsHandler;
1988
1911
  }());
1989
1912
 
1990
- // Modelli
1913
+ /** Classe che identifica una direttiva di ordinamento per un report */
1914
+ var ReportOrder = /** @class */ (function () {
1915
+ function ReportOrder() {
1916
+ }
1917
+ return ReportOrder;
1918
+ }());
1919
+
1991
1920
  /** Classe che gestisce la modalità Report dell'es-table utilizzata nel Metering */
1992
1921
  var ReportModeHandler = /** @class */ (function () {
1993
1922
  /** @ignore Costruttore */
@@ -2058,6 +1987,99 @@
2058
1987
  return ReportModeHandler;
2059
1988
  }());
2060
1989
 
1990
+ /** Classe che rappresenta un Gruppo con le proprie aggregazioni */
1991
+ var Group = /** @class */ (function () {
1992
+ /**
1993
+ * Costruttore
1994
+ *
1995
+ * @param {string} column ID della colonna raggruppata
1996
+ * @param {number} count Numero di elementi raggruppati sotto questa colonna
1997
+ * @param {string} value Valore del Gruppo
1998
+ */
1999
+ function Group(column, count, value) {
2000
+ this.column = column;
2001
+ this.count = count;
2002
+ this.value = value;
2003
+ this.aggregations = [];
2004
+ }
2005
+ return Group;
2006
+ }());
2007
+
2008
+ /** Classe che rappresenta un'aggregazione */
2009
+ var GroupAggregation = /** @class */ (function () {
2010
+ /**
2011
+ * Costruttore
2012
+ *
2013
+ * @param {string} column ID della colonna aggregata
2014
+ * @param {'min' | 'max' | 'sum' } aggregation Aggregazione da effettuare su questa colonna
2015
+ * @param {string} value Valore dell'aggregazione
2016
+ */
2017
+ function GroupAggregation(column, aggregation, value) {
2018
+ this.column = column;
2019
+ this.aggregation = aggregation;
2020
+ this.value = value;
2021
+ }
2022
+ return GroupAggregation;
2023
+ }());
2024
+
2025
+ /** Classe che rappresenta o un gruppo o una aggregazione su una colonna. Usata solo internamente */
2026
+ var GroupOrAggregation = /** @class */ (function () {
2027
+ /**
2028
+ * Costruttore
2029
+ *
2030
+ * @param {string} column Colonna su cui è presente o un gruppo o un'aggregazione
2031
+ * @param {'min' | 'max' | 'sum' } aggregation Aggregazione presente sulla **column**. Se questo campo è nullo significa che è un gruppo.
2032
+ * @param {'string' | 'date' | 'number'} datatype Tipo di dati contenuto nella colonna **column** se non c'è alcuna aggregazione è inutile, pertanto non sarà valorizzato
2033
+ */
2034
+ function GroupOrAggregation(column, aggregation, datatype) {
2035
+ this.column = column;
2036
+ this.aggregation = aggregation;
2037
+ this.datatype = datatype;
2038
+ }
2039
+ return GroupOrAggregation;
2040
+ }());
2041
+
2042
+ /** Classe che rappresenta un separatore da inserire fra gli oggetti dell'es-table per le operazioni di paginazione dei raggruppamenti per riga */
2043
+ var GroupPager = /** @class */ (function () {
2044
+ /**
2045
+ * Costruttore
2046
+ *
2047
+ * @param {number} groupLevel Livello del gruppo a cui questo separatore fa riferimento
2048
+ * @param {string} parentKey Chiave del gruppo parent se esiste
2049
+ * @param {AppSearch<any>} view Vista di ricerca collegata a questo elemento
2050
+ * @param {'groups' | 'items'} searches Indica che cosa cerca questo separatore, se sottogruppi o oggetti
2051
+ */
2052
+ function GroupPager(_grouplevel, _thisRoute, _parent, view, searches) {
2053
+ this._grouplevel = _grouplevel;
2054
+ this._thisRoute = _thisRoute;
2055
+ this._parent = _parent;
2056
+ this.view = view;
2057
+ this.searches = searches;
2058
+ this._sep = true;
2059
+ this.buttons = [];
2060
+ this._thisKey = _parent + "_sep";
2061
+ }
2062
+ return GroupPager;
2063
+ }());
2064
+
2065
+ /**
2066
+ * 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
2067
+ * per arrivare ad una ricerca su sottogruppi o elementi relativi
2068
+ */
2069
+ var GroupRouteFragment = /** @class */ (function () {
2070
+ /**
2071
+ * Costruttore
2072
+ *
2073
+ * @param {string} column Colonna di raggruppamento
2074
+ * @param {string} value Valore della colonna di raggruppamento
2075
+ */
2076
+ function GroupRouteFragment(column, value) {
2077
+ this.column = column;
2078
+ this.value = value;
2079
+ }
2080
+ return GroupRouteFragment;
2081
+ }());
2082
+
2061
2083
  /** Classe che gestisce la modalità Row Grouping dell'es-table */
2062
2084
  var RowGroupingHandler = /** @class */ (function () {
2063
2085
  /** @ignore Costruttore */
@@ -2106,7 +2128,7 @@
2106
2128
  this.est.BaseItemsCount = view.objectcount;
2107
2129
  }
2108
2130
  else {
2109
- // 2) Se viene richiesto il dettaglio di un qualsiasi gruppo diverso dall'ultimo vuol dire che devo aggiungere
2131
+ // 2) Se viene richiesto il dettaglio di un qualsiasi gruppo diverso dall'ultimo vuol dire che devo aggiungere
2110
2132
  // dopo al gruppo che ho cliccato la lista dei gruppi tirata fuori questa volta (intermediateGroup = true)
2111
2133
  /*
2112
2134
  * GruppoA GruppoA
@@ -2117,7 +2139,7 @@
2117
2139
  * GruppoD
2118
2140
  * GruppoE
2119
2141
  */
2120
- // 3) se i gruppi richiesti dalla view sono uguali ai gruppi presenti vuol dire che sto prendendo gli oggetti veri e propri, sono in
2142
+ // 3) se i gruppi richiesti dalla view sono uguali ai gruppi presenti vuol dire che sto prendendo gli oggetti veri e propri, sono in
2121
2143
  // view.items e quindi in TMPBoundSource, ho inoltre le informazioni di paginazione **per il singolo sottogruppo** (intermediateGroup = false)
2122
2144
  /*
2123
2145
  * GruppoA GruppoA
@@ -2213,15 +2235,20 @@
2213
2235
  itemsCacheReference_1.push(itm);
2214
2236
  }
2215
2237
  });
2216
- // Elimino gli oggetti vecchi
2238
+ // Elimino gli oggetti vecchi
2217
2239
  // 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
2218
2240
  // le cache di ricerca effettuate su una path più profonda dell'attuale
2219
2241
  // 2) Ricerca finale o ricerca intermedia senza stato salvato - Elimino tutti gli item relativi alla path corrente
2220
- // Per "stato salvato" si intendono ricerche vecchie salvate per poter essere rieffettuate in caso di ordinamenti su colonne di interesse
2242
+ // Per "stato salvato" si intendono ricerche vecchie salvate per poter essere rieffettuate in caso di ordinamenti su colonne di interesse
2221
2243
  if (intermediateGroup_1 && view.savedstate) {
2222
2244
  this.est.boundSource = this.est.boundSource.filter(function (t) { return !(t._item || t._thisRoute.length > groupRoute_1.length); });
2223
2245
  this.est.groupSearchRequestsCache = this.est.groupSearchRequestsCache.filter(function (t) { return !(t.route.length > groupRoute_1.length); });
2224
2246
  }
2247
+ else if (intermediateGroup_1) {
2248
+ // Se invece lo stato non è salvato vuol dire che c'è stato un cambio di pagina interno ad un gruppo già aperto:
2249
+ // - Elimino tutti gli elementi riconducibili a questo gruppo che erano già presenti
2250
+ this.est.boundSource = this.est.boundSource.filter(function (t) { return !(t._item || (t._thisKey.startsWith(groupKey_1) && t._thisKey != groupKey_1)); });
2251
+ }
2225
2252
  this.est.boundSource = this.est.boundSource.filter(function (t) { return !(t._parent == groupKey_1); });
2226
2253
  var thisGroup = this.est.boundSource[insertIndex];
2227
2254
  if (intermediateGroup_1)
@@ -2357,7 +2384,7 @@
2357
2384
  anygp._thisKey = parent._thisKey + gp.value;
2358
2385
  anygp._grouplevel = parent._grouplevel + 1;
2359
2386
  }
2360
- // Pusho il gruppo, tutti i gruppi del livello sotto, o gli item se io sono l'ultimo gruppo.
2387
+ // Pusho il gruppo, tutti i gruppi del livello sotto, o gli item se io sono l'ultimo gruppo.
2361
2388
  // La visibilità è solo per il gruppo a livello 0, tutti gli altri gruppi saranno mostrati o nascosti di conseguenza
2362
2389
  if (currentIndex == 0)
2363
2390
  anygp._visible = true;
@@ -2560,6 +2587,23 @@
2560
2587
  return RowGroupingHandler;
2561
2588
  }());
2562
2589
 
2590
+ /** 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 */
2591
+ var CacheTriptic = /** @class */ (function () {
2592
+ /**
2593
+ * Costruttore
2594
+ *
2595
+ * @param {Map<string, any>} cache Cache Chiave-Oggetto
2596
+ * @param {Map<string, number>} index_cache Cache Indice-Oggetto
2597
+ * @param {any[]} array Array contenente gli oggetti
2598
+ */
2599
+ function CacheTriptic(cache, index_cache, array) {
2600
+ this.cache = cache;
2601
+ this.index_cache = index_cache;
2602
+ this.array = array;
2603
+ }
2604
+ return CacheTriptic;
2605
+ }());
2606
+
2563
2607
  /** Classe che gestisce le selezioni degli oggetti */
2564
2608
  var SelectionHandler = /** @class */ (function () {
2565
2609
  /** @ignore Costruttore */
@@ -3287,7 +3331,7 @@
3287
3331
  var EsTableComponent = /** @class */ (function () {
3288
3332
  /** @ignore */
3289
3333
  function EsTableComponent(ngControl, prefService, deafults, locale, lc, cdr, utilities_H, utiExts, expExts, dateExts, msgExts) {
3290
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
3334
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
3291
3335
  this.ngControl = ngControl;
3292
3336
  this.prefService = prefService;
3293
3337
  this.deafults = deafults;
@@ -3376,6 +3420,8 @@
3376
3420
  this.CornerMenuOptions = null;
3377
3421
  /** Indica se dev'essere possibile effettuare il resize delle colonne */
3378
3422
  this.ColumnsResizable = null;
3423
+ /** Indica se dev'essere possibile effettuare il pinning delle colonne */
3424
+ this.ColumnsPinnable = null;
3379
3425
  /** Indica se dev'essere disponibile il sistema di aggiornamento automatico */
3380
3426
  this.AutoUpdate = null;
3381
3427
  /**
@@ -3601,6 +3647,7 @@
3601
3647
  this.UseSelectionCache = this.utilities_H.InputOrDefault(this.UseSelectionCache, (_p = this.deafults) === null || _p === void 0 ? void 0 : _p.UseSelectionCache, true);
3602
3648
  this.ShowItemGroupsColumns = this.utilities_H.InputOrDefault(this.ShowItemGroupsColumns, (_q = this.deafults) === null || _q === void 0 ? void 0 : _q.ShowItemGroupsColumns, false);
3603
3649
  this.ArraymodeItemsPerPage = this.utilities_H.InputOrDefault(this.ArraymodeItemsPerPage, (_r = this.deafults) === null || _r === void 0 ? void 0 : _r.ArraymodeItemsPerPage, 15);
3650
+ this.ColumnsPinnable = this.utilities_H.InputOrDefault(this.ColumnsPinnable, (_s = this.deafults) === null || _s === void 0 ? void 0 : _s.ColumnsPinnable, true);
3604
3651
  }
3605
3652
  /** @ignore */
3606
3653
  EsTableComponent.prototype.ngOnInit = function () {
@@ -3651,7 +3698,7 @@
3651
3698
  EsTableComponent.prototype.ngOnChanges = function (changes) {
3652
3699
  return __awaiter(this, void 0, void 0, function () {
3653
3700
  var newSearchView;
3654
- return __generator(this, function (_s) {
3701
+ return __generator(this, function (_t) {
3655
3702
  newSearchView = changes['SearchView'];
3656
3703
  if (newSearchView && this.SearchView)
3657
3704
  this.arrayPulsanti = this.utilities_H.getPagesArray(6, this.SearchView.page, this.SearchView.pages || 1, this.SearchView.items.length, this.SearchView.itemsperpageoverride);
@@ -3670,8 +3717,8 @@
3670
3717
  var _a;
3671
3718
  return __awaiter(this, void 0, void 0, function () {
3672
3719
  var firstItemGroupOrNoGrouping, prefs, prefs;
3673
- return __generator(this, function (_s) {
3674
- switch (_s.label) {
3720
+ return __generator(this, function (_t) {
3721
+ switch (_t.label) {
3675
3722
  case 0:
3676
3723
  this.View = obj ? obj : null;
3677
3724
  // Mi è arrivata l'AppSearch quindi di sicuro non ho una ricerca in progress
@@ -3721,10 +3768,10 @@
3721
3768
  return [3 /*break*/, 5];
3722
3769
  case 3: return [4 /*yield*/, this.prefService.getItem(this.ngControl.name).toPromise()];
3723
3770
  case 4:
3724
- prefs = _s.sent();
3771
+ prefs = _t.sent();
3725
3772
  this.View.columns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
3726
3773
  this.View.column_ordering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
3727
- _s.label = 5;
3774
+ _t.label = 5;
3728
3775
  case 5:
3729
3776
  // La paginazione devo farla solamente quando richiedo o un gruppo principale (se sono in row grouping) o se non richiedo gruppi (in tutti lgi altri casi)
3730
3777
  if (firstItemGroupOrNoGrouping)
@@ -3748,14 +3795,14 @@
3748
3795
  return [3 /*break*/, 10];
3749
3796
  case 8: return [4 /*yield*/, this.prefService.getItem(this.ngControl.name).toPromise()];
3750
3797
  case 9:
3751
- prefs = _s.sent();
3798
+ prefs = _t.sent();
3752
3799
  this.arrayColumns = (prefs === null || prefs === void 0 ? void 0 : prefs.columns) || [];
3753
3800
  this.arrayColumnOrdering = (prefs === null || prefs === void 0 ? void 0 : prefs.column_ordering) || [];
3754
- _s.label = 10;
3801
+ _t.label = 10;
3755
3802
  case 10:
3756
3803
  if (this.SearchView)
3757
3804
  this.arrayPulsanti = this.utilities_H.getPagesArray(6, this.SearchView.page, this.SearchView.pages || 1, this.SearchView.items.length, this.SearchView.itemsperpageoverride);
3758
- _s.label = 11;
3805
+ _t.label = 11;
3759
3806
  case 11:
3760
3807
  if (this.View && !(this.View instanceof ReportDefinition))
3761
3808
  this.finalizeContext();
@@ -3910,7 +3957,7 @@
3910
3957
  var _a, _b;
3911
3958
  if (!this.TMPBoundSource || this.TMPBoundSource.length == 0) {
3912
3959
  this.BaseItemsCount = 0;
3913
- this.boundSource = this.TMPBoundSource;
3960
+ this.boundSource = [];
3914
3961
  return;
3915
3962
  }
3916
3963
  if (this.arrayMode || !this.UseCustomCells) {
@@ -4057,7 +4104,7 @@
4057
4104
  * @param {EsThDirective[]} ths Colonne della tabella
4058
4105
  */
4059
4106
  EsTableComponent.prototype.evaluateRowThs = function (ths) {
4060
- var _s;
4107
+ var _t;
4061
4108
  if (ths.length == 0)
4062
4109
  return;
4063
4110
  var columnsListCache = {};
@@ -4082,7 +4129,7 @@
4082
4129
  if (!castedView.groupings)
4083
4130
  castedView.groupings = groupAggregations;
4084
4131
  else
4085
- (_s = castedView.groupings).push.apply(_s, __spread(groupAggregations));
4132
+ (_t = castedView.groupings).push.apply(_t, __spread(groupAggregations));
4086
4133
  this.ResearchNeeded = true;
4087
4134
  }
4088
4135
  }
@@ -4383,7 +4430,7 @@
4383
4430
  viewProviders: [{ provide: localizations.LocalizationService, useClass: EsTableLoc }],
4384
4431
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
4385
4432
  encapsulation: i0.ViewEncapsulation.None,
4386
- template: "<!-- Patacchino di autoaggiornamento -->\r\n<div class=\"w-100\" *ngIf=\"AutoUpdate\">\r\n <div class=\"pull-right\">\r\n {{'Update every' | localize : lc}}&nbsp;<input [readonly]=\"autoUpdate\" maxlength=\"3\" class=\"form-control est-custom-input\" type=\"text\" [(ngModel)]=\"seconds\" />&nbsp;{{'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>&nbsp;{{'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>&nbsp;\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 &nbsp;\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\">&times;</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 (&nbsp;\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\">&nbsp;-&nbsp;</span>\r\n </ng-container>\r\n &nbsp;)\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>",
4433
+ template: "<!-- Patacchino di autoaggiornamento -->\r\n<div class=\"w-100\" *ngIf=\"AutoUpdate\">\r\n <div class=\"pull-right\">\r\n {{'Update every' | localize : lc}}&nbsp;<input [readonly]=\"autoUpdate\" maxlength=\"3\" class=\"form-control est-custom-input\" type=\"text\" [(ngModel)]=\"seconds\" />&nbsp;{{'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>&nbsp;{{'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>&nbsp;\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 &nbsp;\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\">&times;</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 (&nbsp;\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\">&nbsp;-&nbsp;</span>\r\n </ng-container>\r\n &nbsp;)\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>",
4387
4434
  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)}"]
4388
4435
  },] }
4389
4436
  ];
@@ -4409,6 +4456,7 @@
4409
4456
  secondaryHeaderGroupRef: [{ type: i0.ContentChild, args: ['secondaryHeaderGroup', { static: false },] }],
4410
4457
  CornerMenuOptions: [{ type: i0.Input }],
4411
4458
  ColumnsResizable: [{ type: i0.Input }],
4459
+ ColumnsPinnable: [{ type: i0.Input }],
4412
4460
  AutoUpdate: [{ type: i0.Input }],
4413
4461
  UseCustomCells: [{ type: i0.Input }],
4414
4462
  MaxHeight: [{ type: i0.Input }],
@@ -4477,129 +4525,6 @@
4477
4525
  return EsTableModuleConfig;
4478
4526
  }());
4479
4527
 
4480
- /** Classe di localizzazione per il componente **TablePagerComponent** */
4481
- var TablePagerLoc = /** @class */ (function (_super) {
4482
- __extends(TablePagerLoc, _super);
4483
- /** @ignore */
4484
- function TablePagerLoc(LOC_LOCALE) {
4485
- var _this = _super.call(this, LOC_LOCALE !== null && LOC_LOCALE !== void 0 ? LOC_LOCALE : 'it-IT') || this;
4486
- _super.prototype.set.call(_this, "en->it", "All", ["Tutto"]);
4487
- _super.prototype.set.call(_this, "en->it", "Shown Elements", ["Elementi visualizzati"]);
4488
- _super.prototype.set.call(_this, "en->it", "Shown Groups", ["Gruppi visualizzati"]);
4489
- _super.prototype.set.call(_this, "en->it", "Are you sure you want to retrieve all results?", ["Si è sicuri di voler caricare tutti i risultati?"]);
4490
- _super.prototype.set.call(_this, "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"]);
4491
- return _this;
4492
- }
4493
- return TablePagerLoc;
4494
- }(localizations.LocalizationService));
4495
- TablePagerLoc.decorators = [
4496
- { type: i0.Injectable }
4497
- ];
4498
- TablePagerLoc.ctorParameters = function () { return [
4499
- { type: String, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [EST_LOCALE,] }] }
4500
- ]; };
4501
-
4502
- // Angular
4503
- /** Componente che si occupa della paginazione di una tabella */
4504
- var TablePagerComponent = /** @class */ (function () {
4505
- /** @ignore */
4506
- function TablePagerComponent(msgExts, lc, cdr, locale) {
4507
- this.msgExts = msgExts;
4508
- this.lc = lc;
4509
- this.cdr = cdr;
4510
- this.locale = locale;
4511
- /** Indica se deve mostrare un warning quando si cercano di solezionare come elementi da visualizzare "Tutti" */
4512
- this.WarnOnAll = true;
4513
- /** Indica se dare la possibilità o meno di selezionare "Tutti" nelle opzioni di paginazione */
4514
- this.AllSearch = true;
4515
- /** Placeholder che identifica il "Tutti" */
4516
- this.DefaultAll = 999999;
4517
- /** Indica se attivare la modalità gruppo con stili più snelli per apparire sotto ai raggruppamenti */
4518
- this.GroupMode = false;
4519
- /** Indica se utilizzare il conteggio dei gruppi o degli oggetti */
4520
- this.GroupCount = false;
4521
- /** Indica il testo che va a sostituire "Oggetti Visualizzati" in caso si stia facendo qualcosa di custom, Ignorato in caso di gruppi */
4522
- this.CountLabel = null;
4523
- /** Indica se visualizzare il numero totale di oggeti presenti */
4524
- this.ShowCount = true;
4525
- /** Indica se visualizzare il numero totale di oggeti presenti */
4526
- this.ShowPaging = true;
4527
- /** Output invocato quando il numero di elementi per pagina viene modificato da un click utente */
4528
- this.pagingSelected = new i0.EventEmitter();
4529
- /** Opzioni di paginazione */
4530
- this.PagingOptions = [10, 15, 30, 45, 100];
4531
- }
4532
- /** @ignore */
4533
- TablePagerComponent.prototype.ngOnInit = function () {
4534
- this.Model = this.View ? (this.View.itemsperpageoverride || 15) : this.CurrentPageSize;
4535
- if (this.AllSearch)
4536
- this.PagingOptions.push(this.DefaultAll);
4537
- };
4538
- /** @ignore */
4539
- TablePagerComponent.prototype.ngOnChanges = function (changes) {
4540
- var newView = changes['View'];
4541
- var newCPS = changes['CurrentPageSize'];
4542
- if ((newView && !newView.firstChange) || (newCPS && !newCPS.firstChange))
4543
- 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;
4544
- };
4545
- /**
4546
- * Funzione richiamata dal template quando un utente clicca su un numero di paginazione.
4547
- *
4548
- * Cliccare 2 volte sullo stesso numero causa comunque un refresh dei dati
4549
- *
4550
- * @param {number} pageSize Dimensione selezionata lato UI
4551
- */
4552
- TablePagerComponent.prototype.choice = function (pageSize) {
4553
- var _this = this;
4554
- if (pageSize == this.DefaultAll && this.WarnOnAll) {
4555
- 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"), function () { _this.pagingSelected.emit(pageSize); _this.Model = pageSize; }, function () {
4556
- // Dio solo sa perché mi tocca fare sta roba... qui dentro per qualche motivo la CD non prende
4557
- var prevModel = _this.Model;
4558
- _this.Model = null;
4559
- _this.cdr.detectChanges();
4560
- _this.Model = prevModel;
4561
- _this.cdr.detectChanges();
4562
- });
4563
- }
4564
- else {
4565
- this.pagingSelected.emit(pageSize);
4566
- this.Model = pageSize;
4567
- }
4568
- };
4569
- return TablePagerComponent;
4570
- }());
4571
- TablePagerComponent.decorators = [
4572
- { type: i0.Component, args: [{
4573
- selector: "app-paging",
4574
- viewProviders: [{ provide: localizations.LocalizationService, useClass: TablePagerLoc }],
4575
- template: "<ng-container *ngIf=\"!Hidden\">\r\n <span class=\"est-fs-14\"> {{CountLabel && !GroupMode ? CountLabel : ((GroupMode ? 'Shown Groups' : 'Shown Elements') | localize : lc)}}:&nbsp;</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\">&nbsp;/&nbsp;</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>",
4576
- encapsulation: i0.ViewEncapsulation.None,
4577
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
4578
- 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}"]
4579
- },] }
4580
- ];
4581
- TablePagerComponent.ctorParameters = function () { return [
4582
- { type: i1.MessageService },
4583
- { type: localizations.LocalizationService },
4584
- { type: i0.ChangeDetectorRef },
4585
- { type: String, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [EST_LOCALE,] }] }
4586
- ]; };
4587
- TablePagerComponent.propDecorators = {
4588
- CurrentPageSize: [{ type: i0.Input }],
4589
- View: [{ type: i0.Input }],
4590
- WarnOnAll: [{ type: i0.Input }],
4591
- AllSearch: [{ type: i0.Input }],
4592
- DefaultAll: [{ type: i0.Input }],
4593
- GroupMode: [{ type: i0.Input }],
4594
- GroupCount: [{ type: i0.Input }],
4595
- CountLabel: [{ type: i0.Input }],
4596
- ShowCount: [{ type: i0.Input }],
4597
- ShowPaging: [{ type: i0.Input }],
4598
- PagerCount: [{ type: i0.Input }],
4599
- Hidden: [{ type: i0.Input }],
4600
- pagingSelected: [{ type: i0.Output }]
4601
- };
4602
-
4603
4528
  //Angular
4604
4529
  /** Componente rappresentante una Colonna della tabella */
4605
4530
  var EsTh = /** @class */ (function () {
@@ -4847,7 +4772,8 @@
4847
4772
  ngModule: EsTableModule,
4848
4773
  providers: [
4849
4774
  { provide: EST_LOCALE, useValue: (config === null || config === void 0 ? void 0 : config.locale) || 'it-IT' },
4850
- { provide: EST_DEBUG, useValue: (config === null || config === void 0 ? void 0 : config.debugMode) || false }
4775
+ { provide: EST_DEBUG, useValue: (config === null || config === void 0 ? void 0 : config.debugMode) || false },
4776
+ { provide: EST_DEFAULTS, useValue: (config === null || config === void 0 ? void 0 : config.defaults) || null },
4851
4777
  ]
4852
4778
  };
4853
4779
  };
@@ -4874,9 +4800,75 @@
4874
4800
  },] }
4875
4801
  ];
4876
4802
 
4877
- /*
4878
- * Public API Surface of es-table
4879
- */
4803
+ /** Indica un'opzione cliccabile nel Corner Menù della tabella (il menù richiamabile dai 3 pallini verticli in alto a destra) */
4804
+ var CornerMenuOption = /** @class */ (function () {
4805
+ function CornerMenuOption() {
4806
+ }
4807
+ return CornerMenuOption;
4808
+ }());
4809
+
4810
+ /** Indica operazioni dinamiche generiche che possono essere effettuate per riga. Appaiono come colonne extra sul lato sinistro della tabella */
4811
+ var EsTableOperationDefinition = /** @class */ (function () {
4812
+ /**
4813
+ * Costruttore
4814
+ *
4815
+ * @param {string} id Codice dell'operazione
4816
+ * @param {string} title Titolo dell'operazione, da presentare all'utente su hover della cella
4817
+ * @param {string} iconClass Classe che fornisca un iconcina Es. "fa fa-remove"
4818
+ * @param {string} text Eventuale testo presentato nella cella, genericamente va in alternativa a **iconClass**
4819
+ * @param {string} conditionField Indica il campo dell'oggetto sottostante su cui verificare la visibilità o meno di questa icona
4820
+ * @param {string} conditionValue Indica il valore che la proprietà **conditionField** dell'oggetto sottostante deve assumere affinché questa opzione si veda
4821
+ */
4822
+ function EsTableOperationDefinition(id, title, iconClass, text, conditionField, conditionValue) {
4823
+ this.id = id;
4824
+ this.title = title;
4825
+ this.iconClass = iconClass;
4826
+ this.text = text;
4827
+ this.conditionField = conditionField;
4828
+ this.conditionValue = conditionValue;
4829
+ }
4830
+ return EsTableOperationDefinition;
4831
+ }());
4832
+
4833
+ /** Classe che definisce un oggetto generico come lista di proprietà-valore */
4834
+ var GenericItem = /** @class */ (function () {
4835
+ /** @ignore */
4836
+ function GenericItem() {
4837
+ this._selected = false;
4838
+ this._rowClass = null;
4839
+ this._hash = null;
4840
+ this.properties = {};
4841
+ }
4842
+ return GenericItem;
4843
+ }());
4844
+
4845
+ /** Classe che rappresenta una colonna di un report */
4846
+ var ReportColumn = /** @class */ (function () {
4847
+ function ReportColumn() {
4848
+ }
4849
+ return ReportColumn;
4850
+ }());
4851
+
4852
+ /** Classe che identifica un parametro generico per un report */
4853
+ var ReportParam = /** @class */ (function () {
4854
+ function ReportParam() {
4855
+ }
4856
+ return ReportParam;
4857
+ }());
4858
+
4859
+ /** Classe che rappresenta una lista di oggetti generati da un report */
4860
+ var ReportResult = /** @class */ (function () {
4861
+ function ReportResult() {
4862
+ }
4863
+ return ReportResult;
4864
+ }());
4865
+
4866
+ /** Classe che rappresenta i valori delle proprietà di un oggetto Report */
4867
+ var ReportRow = /** @class */ (function () {
4868
+ function ReportRow() {
4869
+ }
4870
+ return ReportRow;
4871
+ }());
4880
4872
 
4881
4873
  /**
4882
4874
  * Generated bundle index. Do not edit.
@@ -4905,15 +4897,15 @@
4905
4897
  exports.ReportParam = ReportParam;
4906
4898
  exports.ReportResult = ReportResult;
4907
4899
  exports.ReportRow = ReportRow;
4908
- exports.ɵa = EsTableLoc;
4900
+ exports.TablePagerComponent = TablePagerComponent;
4901
+ exports.ɵa = TablePagerLoc;
4909
4902
  exports.ɵb = EST_LOCALE;
4910
4903
  exports.ɵc = EST_DEBUG;
4911
4904
  exports.ɵd = EST_DEFAULTS;
4912
- exports.ɵe = UtilitiesHandler;
4913
- exports.ɵf = EsTh;
4914
- exports.ɵg = EsTd;
4915
- exports.ɵh = TablePagerComponent;
4916
- exports.ɵi = TablePagerLoc;
4905
+ exports.ɵe = EsTableLoc;
4906
+ exports.ɵf = UtilitiesHandler;
4907
+ exports.ɵg = EsTh;
4908
+ exports.ɵh = EsTd;
4917
4909
 
4918
4910
  Object.defineProperty(exports, '__esModule', { value: true });
4919
4911