@esfaenza/es-table 11.2.122 → 11.2.123

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 (44) hide show
  1. package/bundles/esfaenza-es-table.umd.js +471 -263
  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 +8 -4
  6. package/esfaenza-es-table.metadata.json +1 -1
  7. package/esm2015/esfaenza-es-table.js +9 -5
  8. package/esm2015/lib/components/es-table/es_table.component.js +145 -79
  9. package/esm2015/lib/components/es-td/es_td.component.js +10 -52
  10. package/esm2015/lib/components/es-th/es_th.component.js +2 -2
  11. package/esm2015/lib/components/pipes/est-renderer.pipe.js +36 -0
  12. package/esm2015/lib/components/pipes/est-routerlink.pipe.js +37 -0
  13. package/esm2015/lib/components/pipes/est_editor.pipe.js +36 -0
  14. package/esm2015/lib/core/CopyPasteDetector.js +4 -2
  15. package/esm2015/lib/core/Logger.js +23 -0
  16. package/esm2015/lib/core/handlers/ColumnMetadataHandler.js +14 -12
  17. package/esm2015/lib/core/handlers/DynamicModeHandler.js +59 -37
  18. package/esm2015/lib/core/handlers/SelectionHandler.js +46 -50
  19. package/esm2015/lib/core/handlers/UtilitiesHandler.js +2 -5
  20. package/esm2015/lib/directives/es_th.directive.js +9 -2
  21. package/esm2015/lib/domain/externals/EsTableColumnsDefinition.js +4 -3
  22. package/esm2015/lib/domain/externals/ItemPropEditableReference.js +1 -1
  23. package/esm2015/lib/domain/internals/EsTableColumn.js +2 -2
  24. package/esm2015/lib/domain/internals/PagerInfos.js +15 -0
  25. package/esm2015/lib/domain/internals/ThGroup.js +2 -0
  26. package/esm2015/lib/es-table.module.js +42 -19
  27. package/fesm2015/esfaenza-es-table.js +451 -251
  28. package/fesm2015/esfaenza-es-table.js.map +1 -1
  29. package/lib/components/es-table/es_table.component.d.ts +55 -60
  30. package/lib/components/es-td/es_td.component.d.ts +6 -34
  31. package/lib/components/pipes/est-renderer.pipe.d.ts +12 -0
  32. package/lib/components/pipes/est-routerlink.pipe.d.ts +17 -0
  33. package/lib/components/pipes/est_editor.pipe.d.ts +12 -0
  34. package/lib/core/Logger.d.ts +7 -0
  35. package/lib/core/handlers/DynamicModeHandler.d.ts +11 -23
  36. package/lib/core/handlers/SelectionHandler.d.ts +16 -3
  37. package/lib/core/handlers/UtilitiesHandler.d.ts +4 -1
  38. package/lib/directives/es_th.directive.d.ts +25 -0
  39. package/lib/domain/externals/EsTableColumnsDefinition.d.ts +3 -9
  40. package/lib/domain/externals/ItemPropEditableReference.d.ts +4 -0
  41. package/lib/domain/internals/EsTableColumn.d.ts +3 -1
  42. package/lib/domain/internals/PagerInfos.d.ts +13 -0
  43. package/lib/domain/internals/ThGroup.d.ts +10 -0
  44. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
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('rxjs'), require('@angular/common'), require('@angular/router'), require('@angular/material/select'), require('@angular/material/input'), require('@angular/material/tooltip'), require('@esfaenza/forms-and-validations'), require('@angular/platform-browser'), require('ngx-bootstrap/modal'), require('ngx-bootstrap/dropdown'), 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', 'rxjs', '@angular/common', '@angular/router', '@angular/material/select', '@angular/material/input', '@angular/material/tooltip', '@esfaenza/forms-and-validations', '@angular/platform-browser', 'ngx-bootstrap/modal', 'ngx-bootstrap/dropdown', '@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.rxjs, global.ng.common, global.ng.router, global.ng.material.select, global.ng.material.input, global.ng.material.tooltip, global.formsAndValidations, global.ng.platformBrowser, global.modal, global.dropdown, global.ngxContextmenu));
5
- }(this, (function (exports, i0, localizations, i1, forms, preferences, dragDrop, rxjs, common, router, select, input, tooltip, formsAndValidations, platformBrowser, modal, dropdown, 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('rxjs'), require('@angular/common'), require('@angular/router'), require('@angular/material/select'), require('@angular/material/input'), require('@angular/material/tooltip'), require('@esfaenza/forms-and-validations'), require('ngx-bootstrap/modal'), require('ngx-bootstrap/dropdown'), 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', 'rxjs', '@angular/common', '@angular/router', '@angular/material/select', '@angular/material/input', '@angular/material/tooltip', '@esfaenza/forms-and-validations', 'ngx-bootstrap/modal', 'ngx-bootstrap/dropdown', '@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.rxjs, global.ng.common, global.ng.router, global.ng.material.select, global.ng.material.input, global.ng.material.tooltip, global.formsAndValidations, global.modal, global.dropdown, global.ngxContextmenu));
5
+ }(this, (function (exports, i0, localizations, i1, forms, preferences, dragDrop, rxjs, common, router, select, input, tooltip, formsAndValidations, modal, dropdown, ngxContextmenu) { 'use strict';
6
6
 
7
7
  /******************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -515,6 +515,22 @@
515
515
  return AppSearch;
516
516
  }());
517
517
 
518
+ /** Classe che rappresenta le informazioni di paginazione della tabella attuale */
519
+ var PagerInfos = /** @class */ (function () {
520
+ function PagerInfos() {
521
+ this.PagerCount = null;
522
+ this.ShowCount = true;
523
+ this.ShowPaging = true;
524
+ this.ShowButtons = true;
525
+ this.ShowPagingOptions = true;
526
+ this.UsesView = true;
527
+ this.View = null;
528
+ this.Ready = false;
529
+ this.Searches = 'items';
530
+ }
531
+ return PagerInfos;
532
+ }());
533
+
518
534
  /** Identifica una selezione applicabile agli oggetti presentati in una tabella */
519
535
  var ItemsSelection = /** @class */ (function () {
520
536
  /**
@@ -667,6 +683,8 @@
667
683
  this.thType = null;
668
684
  /** Sorgente dei valori disponibili per questa cella se il **Type** è di tipo 'enum' */
669
685
  this.thSource = null;
686
+ /** Opzioni da applicare all'editor di questa colonna */
687
+ this.thEditorOptions = {};
670
688
  }
671
689
  return EsThDirective;
672
690
  }());
@@ -701,7 +719,12 @@
701
719
  thStaticContent: [{ type: i0.Input }],
702
720
  thBackgroundColor: [{ type: i0.Input }],
703
721
  thAlignment: [{ type: i0.Input }],
704
- thFormat: [{ type: i0.Input }]
722
+ thFormat: [{ type: i0.Input }],
723
+ thEditorName: [{ type: i0.Input }],
724
+ thEditorOptions: [{ type: i0.Input }],
725
+ thRendererName: [{ type: i0.Input }],
726
+ thRoutePath: [{ type: i0.Input }],
727
+ thRouteParameterProperties: [{ type: i0.Input }]
705
728
  };
706
729
 
707
730
  /** Direttiva che rappresenta il template dell'editor di una cella all'interno della tabella */
@@ -957,7 +980,7 @@
957
980
  * @param {boolean} pinned Indica se è una colonna pinnata
958
981
  * @param {number} pinnedWidth Indica la dimensione da assegnare a questa colonna quando è pinnata
959
982
  * @param {TemplateRef<any>} template Indica il template da usare per mostrare il testo dell'Header
960
- * @param {{ tmpl: TemplateRef<any>, content: string }[]} parentTemplates Indica la lista di template padri collegata a questo header, rappresentati come Template o come stringa qualora fosse generato automaticamente (caso **Multi**)
983
+ * @param {{ id: string, tmpl: TemplateRef<any>, content: string }[]} parentTemplates Indica la lista di template padri collegata a questo header, rappresentati come Template o come stringa qualora fosse generato automaticamente (caso **Multi**)
961
984
  * @param {boolean} multi Indica che la colonna deriva da una direttiva **Multi**
962
985
  * @param {string} multiContent Indica il contenuto della direttiva **Multi** per questa colonna
963
986
  */
@@ -1436,7 +1459,7 @@
1436
1459
  return;
1437
1460
  /****** STEP 1: Creo l'output dei raggruppamenti per header in modo da non dovermi preoccupare di celle non inizializzate ******/
1438
1461
  var expandedGroups = [];
1439
- var visibleUnpinnedLeafs = infos.leafs.filter(function (t) { return t.thVisible && !t.thPinned; });
1462
+ var visibleUnpinnedLeafs = infos.leafs.filter(function (t) { return t.thVisible && t.thIf && !t.thPinned; });
1440
1463
  for (var l = 0; l < infos.groupingLevel; l++) {
1441
1464
  expandedGroups.push([]);
1442
1465
  for (var i = 0; i < visibleUnpinnedLeafs.length; i++)
@@ -1446,7 +1469,7 @@
1446
1469
  var orderedLeafs = [];
1447
1470
  for (var i = 0; i < this.est.OrderDirectives.length; i++) {
1448
1471
  var leaf = infos.thsCache[this.est.OrderDirectives[i]];
1449
- if (leaf.thVisible && !leaf.thPinned)
1472
+ if (leaf.thVisible && leaf.thIf && !leaf.thPinned)
1450
1473
  orderedLeafs.push(leaf);
1451
1474
  }
1452
1475
  /****** STEP 3: Creo l'array group con tutti i riferimenti del caso ******/
@@ -1470,7 +1493,7 @@
1470
1493
  }
1471
1494
  }
1472
1495
  }
1473
- /****** STEP 4: Compatto nell'elemento finale su cui bindarmi ******/
1496
+ /****** STEP 4: Compatto nell'elemento finale su cui bindarmi. L'ID assegnato è SOLO per ottimizzare gli ngFor ******/
1474
1497
  currentParent = "";
1475
1498
  var currentSpan = 0;
1476
1499
  var finalHeaders = [];
@@ -1478,25 +1501,25 @@
1478
1501
  var levelArray = [];
1479
1502
  finalHeaders.push(levelArray);
1480
1503
  if (this.est.Selection || this.est.HasPinnedColumns)
1481
- levelArray.push({ Span: 1, Template: null, Pinned: this.est.HasPinnedColumns });
1504
+ levelArray.push({ ID: "_base_sel_pinned", Span: 1, Template: null, Pinned: this.est.HasPinnedColumns });
1482
1505
  for (var h = 0; h < expandedGroups[l].length; h++) {
1483
1506
  var item = expandedGroups[l][h];
1484
1507
  if (item == currentParent)
1485
1508
  currentSpan++;
1486
1509
  else {
1487
1510
  if (currentSpan > 0)
1488
- levelArray.push({ Span: currentSpan, Template: currentParent ? infos.thsCache[currentParent].Template : null, Content: currentParent ? infos.thsCache[currentParent]._multi_content : null, Borders: !!currentParent });
1511
+ levelArray.push({ ID: (currentParent ? infos.thsCache[currentParent].th : 'noth') + "_" + currentSpan, Span: currentSpan, Template: currentParent ? infos.thsCache[currentParent].Template : null, Content: currentParent ? infos.thsCache[currentParent]._multi_content : null, Borders: !!currentParent });
1489
1512
  currentSpan = 1;
1490
1513
  currentParent = item;
1491
1514
  }
1492
1515
  }
1493
1516
  // Ultima aggiunta che altrimenti mi rimarrebbe in cache
1494
- levelArray.push({ Span: currentSpan, Template: currentParent ? infos.thsCache[currentParent].Template : null, Content: currentParent ? infos.thsCache[currentParent]._multi_content : null, Borders: !!currentParent });
1517
+ levelArray.push({ ID: (currentParent ? infos.thsCache[currentParent].th : 'noth') + "_" + currentSpan, Span: currentSpan, Template: currentParent ? infos.thsCache[currentParent].Template : null, Content: currentParent ? infos.thsCache[currentParent]._multi_content : null, Borders: !!currentParent });
1495
1518
  // Aggiungo i pezzettini per la rimozione e gli export, se presenti
1496
1519
  if (this.est.Removal)
1497
- levelArray.push({ Span: 1, Template: null });
1520
+ levelArray.push({ ID: "_base_removal", Span: 1, Template: null });
1498
1521
  if (this.est.Export || this.est.HiddenColumns || this.est.ColumnsOrdering || this.est.CornerMenuOptions)
1499
- levelArray.push({ Span: 1, Template: null });
1522
+ levelArray.push({ ID: "_base_extra_opts", Span: 1, Template: null });
1500
1523
  currentSpan = 0;
1501
1524
  currentParent = "";
1502
1525
  }
@@ -1532,9 +1555,9 @@
1532
1555
  if (parent) {
1533
1556
  th = thsCache[parent];
1534
1557
  if (!th.thEmpty && !th._multi_content)
1535
- parentsPrepend.unshift({ tmpl: th.Template });
1558
+ parentsPrepend.unshift({ id: th.th, tmpl: th.Template });
1536
1559
  else if (!th.thEmpty && th._multi_content)
1537
- parentsPrepend.unshift({ content: th._multi_content });
1560
+ parentsPrepend.unshift({ id: th.th, content: th._multi_content });
1538
1561
  jumps++;
1539
1562
  }
1540
1563
  } while (parent);
@@ -1599,7 +1622,9 @@
1599
1622
  var newContext = [];
1600
1623
  this_3.est.OrderDirectives.forEach(function (o) {
1601
1624
  var contextItem = context.filter(function (t) { return t.ID == o; })[0];
1602
- newContext.push(contextItem);
1625
+ // potrebbe esser undefined nel caso ci fossero colonne sotto thIf
1626
+ if (contextItem)
1627
+ newContext.push(contextItem);
1603
1628
  });
1604
1629
  this_3.est.TMPRowTDs[this_3.est.RowContexts[i]] = newContext;
1605
1630
  };
@@ -1824,7 +1849,7 @@
1824
1849
  * @param {string} EditorName Nome dell'editor da utilizzare per la modifica di questo campo
1825
1850
  * @param {string} RendererName Nome del renderer da utilizzare per visualizzare questo campo
1826
1851
  */
1827
- function EsTableColumnsDefinition(Description, PropertyName, RoutePath, RouteParameterProperties, DataOrder, ColumnOrder, Visible, Clss, Orderable, HeaderWraps, PropertyType, PropertySource, EditorName, RendererName, EditorOptions, Pinned, Grouping) {
1852
+ function EsTableColumnsDefinition(Description, PropertyName, RoutePath, RouteParameterProperties, DataOrder, ColumnOrder, Visible, Clss, Orderable, HeaderWraps, PropertyType, PropertySource, EditorName, RendererName, EditorOptions, Pinned, PinnedWidth, Pinnable, Grouping) {
1828
1853
  if (RoutePath === void 0) { RoutePath = null; }
1829
1854
  if (RouteParameterProperties === void 0) { RouteParameterProperties = null; }
1830
1855
  if (DataOrder === void 0) { DataOrder = null; }
@@ -1839,6 +1864,8 @@
1839
1864
  if (RendererName === void 0) { RendererName = ""; }
1840
1865
  if (EditorOptions === void 0) { EditorOptions = {}; }
1841
1866
  if (Pinned === void 0) { Pinned = false; }
1867
+ if (PinnedWidth === void 0) { PinnedWidth = 150; }
1868
+ if (Pinnable === void 0) { Pinnable = true; }
1842
1869
  if (Grouping === void 0) { Grouping = ""; }
1843
1870
  this.Description = Description;
1844
1871
  this.PropertyName = PropertyName;
@@ -1856,8 +1883,9 @@
1856
1883
  this.RendererName = RendererName;
1857
1884
  this.EditorOptions = EditorOptions;
1858
1885
  this.Pinned = Pinned;
1886
+ this.PinnedWidth = PinnedWidth;
1887
+ this.Pinnable = Pinnable;
1859
1888
  this.Grouping = Grouping;
1860
- this.edits = {};
1861
1889
  }
1862
1890
  EsTableColumnsDefinition.build = function (parsObj) {
1863
1891
  return new EsTableColumnsDefinition(parsObj.Description, parsObj.PropertyName, parsObj.RoutePath, parsObj.RouteParameterProperties, parsObj.DataOrder, parsObj.ColumnOrder, parsObj.Visible || true, parsObj.Clss, parsObj.Orderable || true, parsObj.HeaderWraps, parsObj.PropertyType, parsObj.PropertySource, parsObj.EditorName, parsObj.RendererName, parsObj.Pinned, parsObj.Grouping);
@@ -1871,42 +1899,6 @@
1871
1899
  function DynamicModeHandler(est) {
1872
1900
  this.est = est;
1873
1901
  }
1874
- /**
1875
- * Metodo di supporto alla creazione di un router link parametrizzato all'oggetto corrente utilizzato nella modalità dinamica
1876
- *
1877
- * @param {string} path Path su cui navigare con eventuali parametri riferiti all'oggetto cotnestuale come {0}, {1}, ecc...
1878
- * @param {string[]} parameterProps Lista posizionale delle proprietà a cui bindare i riferimenti del parametro **path**
1879
- * Es. Il valore dela proprietà all'indice 0 di questo array verrà sostituita al valore {0} del parametro **path**
1880
- * @param {GenericItem} item Oggetto generico collegato a questo contesto
1881
- *
1882
- * @returns {any} Router link generato in base al parametri
1883
- */
1884
- DynamicModeHandler.prototype.generateRouterLink = function (path, parameterProps, item) {
1885
- if (this.est.DynamicTableRouterLinkCache[item._hash + path]) {
1886
- return this.est.DynamicTableRouterLinkCache[item._hash + path];
1887
- }
1888
- else {
1889
- var link = this.getRouterLink(path, parameterProps, item);
1890
- this.est.DynamicTableRouterLinkCache[item._hash + path] = link;
1891
- return link;
1892
- }
1893
- };
1894
- /**
1895
- * Crea un router link
1896
- *
1897
- * @param {string} path Path su cui navigare con eventuali parametri riferiti all'oggetto cotnestuale come {0}, {1}, ecc...
1898
- * @param {string[]} pars Lista posizionale delle proprietà a cui bindare i riferimenti del parametro **path**
1899
- * Es. Il valore dela proprietà all'indice 0 di questo array verrà sostituita al valore {0} del parametro **path**
1900
- * @param {GenericItem} item Oggetto generico collegato a questo contesto
1901
- *
1902
- * @returns {any} Router link generato in base al parametri
1903
- */
1904
- DynamicModeHandler.prototype.getRouterLink = function (path, pars, item) {
1905
- for (var i = 0; i < pars.length; i++)
1906
- path = path.replace('{' + i + '}', item.properties[pars[i]]);
1907
- path = path.replace(/'/g, '"').replace(/ /g, '');
1908
- return JSON.parse(path);
1909
- };
1910
1902
  /** Se non ho l'Input **DynamicRowColumnsDefinition** in modalità dinamica lo riempio con il default nome della colonna = testo della colonna */
1911
1903
  DynamicModeHandler.prototype.eventuallyReviewDynamicColumns = function () {
1912
1904
  // Senza oggetti esco
@@ -1925,6 +1917,61 @@
1925
1917
  else
1926
1918
  this.est.UserDefinedDynamicCols = true;
1927
1919
  };
1920
+ /** Genera partendo dalle **DynamicRowColumnsDefinition** la lista di **EsThDirective** e **EsTdDirective** che servono per la tabella */
1921
+ DynamicModeHandler.prototype.emitThsAndTdsBasedOnDynamicDefinition = function () {
1922
+ // Senza dynamic columns esco
1923
+ if (!this.est.DynamicRowColumnsDefinition || this.est.DynamicRowColumnsDefinition.length == 0)
1924
+ return null;
1925
+ var ths = [];
1926
+ var tds = [];
1927
+ for (var i = 0; i < this.est.DynamicRowColumnsDefinition.length; i++) {
1928
+ var col = this.est.DynamicRowColumnsDefinition[i];
1929
+ ths.push(this.getTh(col));
1930
+ tds.push(this.getTd(col));
1931
+ }
1932
+ return { ths: ths, tds: tds };
1933
+ };
1934
+ /** @ignore Helper */
1935
+ DynamicModeHandler.prototype.getTh = function (col) {
1936
+ var ret = new EsThDirective(null);
1937
+ ret.th = col.PropertyName;
1938
+ ret.thPinned = col.Pinned;
1939
+ ret.thPinnable = col.Pinnable;
1940
+ ret.thPinnedWidth = col.PinnedWidth;
1941
+ ret.thVisible = col.Visible;
1942
+ ret.thOrder = col.DataOrder;
1943
+ ret.thOrderable = col.Orderable;
1944
+ ret.thWrap = col.HeaderWraps;
1945
+ ret.thClass = col.Clss;
1946
+ ret.thProperty = col.PropertyName;
1947
+ ret.thType = col.PropertyType;
1948
+ ret.thSource = col.PropertySource;
1949
+ ret.thEditorName = col.EditorName;
1950
+ ret.thEditorOptions = col.EditorOptions;
1951
+ ret.thRendererName = col.RendererName;
1952
+ ret.thRoutePath = col.RoutePath;
1953
+ ret.thRouteParameterProperties = col.RouteParameterProperties;
1954
+ //ret.thFixed = col.Fixed;
1955
+ //ret.thResizable = col.Resizable;
1956
+ //ret.thGroupClass = col.GroupClass;
1957
+ //ret.thGroup = col.Group;
1958
+ //ret.thAggregation = col.Aggregation;
1959
+ //ret.thMulti = col.Multi;
1960
+ //ret.thStaticContent = col.StaticContent;
1961
+ //ret.thBackgroundColor = col.BackgroundColor;
1962
+ //ret.thAlignment = col.Alignment;
1963
+ //ret.thFormat = col.Format;
1964
+ return ret;
1965
+ };
1966
+ /** @ignore Helper */
1967
+ DynamicModeHandler.prototype.getTd = function (col) {
1968
+ var ret = new EsTdDirective(null);
1969
+ ret.td = col.PropertyName;
1970
+ ret.tdClass = col.Clss;
1971
+ //ret.tdAlignment = col.Alignment;
1972
+ //ret.tdFormat = col.Format;
1973
+ return ret;
1974
+ };
1928
1975
  return DynamicModeHandler;
1929
1976
  }());
1930
1977
 
@@ -3571,65 +3618,61 @@
3571
3618
  * @param {{ row: number, column: number }} firstSelectionOverride Permette di overridare il primo elemento selezionato
3572
3619
  */
3573
3620
  SelectionHandler.prototype.singleCellSelection = function (event, row, column, firstSelectionOverride) {
3621
+ // Recupero la selezione precedente se presente come punto di partenza
3574
3622
  var first = firstSelectionOverride || this.lastSingleSelection;
3623
+ //Il punto di arrivo, che diventerà il prossimo punto di partenza, è la selezione corrente
3624
+ this.lastSingleSelection = { row: row, column: column };
3575
3625
  this.clearTextSelection(event);
3576
- // Nella selezione a range chissene frega se c'è o meno lo shift, si ragiona sempre a range
3577
- if (event.shiftKey && first) {
3578
- this.clearSelectionStatus({ row: row, column: column });
3579
- var rowAddition = row < first.row ? -1 : +1;
3580
- var columnAddition = column < first.column ? -1 : +1;
3581
- for (var ir = first.row; ir != row + rowAddition; ir += rowAddition) {
3582
- var firstRow = ir == first.row;
3583
- var lastRow = ir == row;
3584
- for (var ic = first.column; ic != column + columnAddition; ic += columnAddition) {
3585
- var firstCol = ic == first.column;
3586
- var lastCol = ic == column;
3587
- this.est.selectionStatus[ir][ic].selected = true;
3588
- this.est.selectionStatus[ir][ic].lborder = columnAddition > 0 ? firstCol : lastCol;
3589
- if (ic > 0)
3590
- this.est.selectionStatus[ir][ic - 1].roverlaps = this.est.selectionStatus[ir][ic].lborder;
3591
- this.est.selectionStatus[ir][ic].tborder = rowAddition > 0 ? firstRow : lastRow;
3592
- this.est.selectionStatus[ir][ic].rborder = columnAddition > 0 ? lastCol : firstCol;
3593
- if (this.est.selectionStatus[ir][ic + 1])
3594
- this.est.selectionStatus[ir][ic + 1].loverlaps = this.est.selectionStatus[ir][ic].rborder;
3595
- this.est.selectionStatus[ir][ic].bborder = rowAddition > 0 ? lastRow : firstRow;
3596
- }
3597
- }
3598
- this.lastSingleSelection = { row: row, column: column };
3599
- }
3600
- else {
3601
- // Ripulisco escludendo l'oggetto attuale che eventualmente ci penso io a deseezionare
3602
- this.clearSelectionStatus({ row: row, column: column });
3603
- var item = this.est.selectionStatus[row][column];
3604
- item.selected = !item.selected;
3605
- item.lborder = item.selected;
3606
- if (column > 0)
3607
- this.est.selectionStatus[row][column - 1].roverlaps = item.lborder;
3608
- item.tborder = item.selected;
3609
- item.rborder = item.selected;
3610
- if (this.est.selectionStatus[row][column + 1])
3611
- this.est.selectionStatus[row][column + 1].loverlaps = item.rborder;
3612
- item.bborder = item.selected;
3613
- this.lastSingleSelection = { row: row, column: column };
3614
- }
3626
+ this.clearSelectionStatusExcluding(this.lastSingleSelection);
3627
+ this.setSelectionStatusBorders(event.range && first ? first : this.lastSingleSelection, this.lastSingleSelection);
3615
3628
  // Ora che non è attaccato direttamente all'html devo fare un markforcheck finite le operazioni sui grouping
3616
3629
  this.est.cdr.markForCheck();
3617
3630
  };
3631
+ SelectionHandler.prototype.setSelectionStatusBorders = function (from, to) {
3632
+ var rowAddition = to.row < from.row ? -1 : +1;
3633
+ var columnAddition = to.column < from.column ? -1 : +1;
3634
+ var singleItem = from == to;
3635
+ for (var ir = from.row; ir != to.row + rowAddition; ir += rowAddition) {
3636
+ var firstRow = ir == from.row;
3637
+ var lastRow = ir == to.row;
3638
+ for (var ic = from.column; ic != to.column + columnAddition; ic += columnAddition) {
3639
+ var firstCol = ic == from.column;
3640
+ var lastCol = ic == to.column;
3641
+ var current = this.est.selectionStatus[ir][ic];
3642
+ var prevColumn = ic > 0 ? this.est.selectionStatus[ir][ic - 1] : null;
3643
+ var nextcolumn = this.est.selectionStatus[ir][ic + 1];
3644
+ var prevRow = ir > 0 ? this.est.selectionStatus[ir - 1][ic] : null;
3645
+ var nextRow = this.est.selectionStatus[ir + 1] ? this.est.selectionStatus[ir + 1][ic] : null;
3646
+ current.selected = singleItem ? !current.selected : true;
3647
+ current.lborder = !current.selected ? false : columnAddition > 0 ? firstCol : lastCol;
3648
+ current.tborder = !current.selected ? false : rowAddition > 0 ? firstRow : lastRow;
3649
+ current.rborder = !current.selected ? false : columnAddition > 0 ? lastCol : firstCol;
3650
+ current.bborder = !current.selected ? false : rowAddition > 0 ? lastRow : firstRow;
3651
+ if (prevRow)
3652
+ prevRow.boverlaps = current.tborder;
3653
+ if (nextRow)
3654
+ nextRow.toverlaps = current.bborder;
3655
+ if (prevColumn)
3656
+ prevColumn.roverlaps = current.lborder;
3657
+ if (nextcolumn)
3658
+ nextcolumn.loverlaps = current.rborder;
3659
+ }
3660
+ }
3661
+ };
3618
3662
  /**
3619
3663
  * Helper per ripulire lo stato di selezione delle singole celle della tabella, ad esclusione di una singola coordinata
3620
3664
  *
3621
3665
  * @param {{row: number, column: number}} exclusion Coordinata da escludere nella pulizia
3622
3666
  */
3623
- SelectionHandler.prototype.clearSelectionStatus = function (exclusion) {
3667
+ SelectionHandler.prototype.clearSelectionStatusExcluding = function (exclusion) {
3624
3668
  for (var row in this.est.selectionStatus) {
3625
3669
  for (var column in this.est.selectionStatus[row]) {
3626
- if (!exclusion || (exclusion && (row != exclusion.row.toString() || column != exclusion.column.toString()))) {
3627
- this.est.selectionStatus[row][column].selected = false;
3628
- this.est.selectionStatus[row][column].lborder = false;
3629
- this.est.selectionStatus[row][column].tborder = false;
3630
- this.est.selectionStatus[row][column].rborder = false;
3631
- this.est.selectionStatus[row][column].bborder = false;
3632
- }
3670
+ // Se è l'elemento che ho escluso dal cleanup, skippo
3671
+ if (exclusion && row == exclusion.row.toString() && column == exclusion.column.toString())
3672
+ continue;
3673
+ // Altrimenti pulisco
3674
+ var curr = this.est.selectionStatus[row][column];
3675
+ curr.selected = curr.lborder = curr.rborder = curr.tborder = curr.bborder = curr.loverlaps = curr.roverlaps = curr.toverlaps = curr.boverlaps = false;
3633
3676
  }
3634
3677
  }
3635
3678
  };
@@ -3659,10 +3702,10 @@
3659
3702
  */
3660
3703
  SelectionHandler.prototype.clearTextSelection = function (event) {
3661
3704
  // Seleziono del testo ma non ho shift premuto -> ignoro la selezione
3662
- if ((event.view.getSelection().type == 'Range' || event.view.getSelection().toString().length > 0) && !event.shiftKey)
3705
+ if ((event.view.getSelection().type == 'Range' || event.view.getSelection().toString().length > 0) && !event.range)
3663
3706
  return false;
3664
3707
  // Seleziono del testo e ho shift premuto -> annullo la selezione del testo
3665
- if ((event.view.getSelection().type == 'Range' || event.view.getSelection().toString().length > 0) && event.shiftKey)
3708
+ if ((event.view.getSelection().type == 'Range' || event.view.getSelection().toString().length > 0) && event.range)
3666
3709
  this.est.utiExts.clearTextSelection();
3667
3710
  };
3668
3711
  /**
@@ -3811,10 +3854,7 @@
3811
3854
  for (var i = min; i <= max; i++)
3812
3855
  if (i !== 1)
3813
3856
  result.push({ val: i, cssClass: (i === page ? 'btn-main app-white-text' : 'app-white-button') });
3814
- result.push({
3815
- val: lastPage,
3816
- cssClass: (lastPage === page ? 'btn-main app-white-text' : 'app-white-button')
3817
- });
3857
+ result.push({ val: lastPage, cssClass: (lastPage === page ? 'btn-main app-white-text' : 'app-white-button') });
3818
3858
  }
3819
3859
  return result;
3820
3860
  };
@@ -3892,15 +3932,36 @@
3892
3932
  }
3893
3933
  return CopyPasteDetector;
3894
3934
  }());
3935
+ CopyPasteDetector.ɵprov = i0.ɵɵdefineInjectable({ factory: function CopyPasteDetector_Factory() { return new CopyPasteDetector(); }, token: CopyPasteDetector, providedIn: "root" });
3895
3936
  CopyPasteDetector.decorators = [
3896
- { type: i0.Injectable }
3937
+ { type: i0.Injectable, args: [{ providedIn: "root" },] }
3897
3938
  ];
3898
3939
  CopyPasteDetector.ctorParameters = function () { return []; };
3899
3940
 
3941
+ /** Classe che fornisce dei metodi di estensione in grado di riconoscere e dispatchare l'evento copia e incolla lanciato su una pagina web */
3942
+ var Logger = /** @class */ (function () {
3943
+ /** @ignore */
3944
+ function Logger(debugMode) {
3945
+ this.debugMode = debugMode;
3946
+ }
3947
+ Logger.prototype.log = function (text) {
3948
+ if (this.debugMode)
3949
+ console.log("[@esfaenza/es-table @ " + (new Date()).toISOString() + "] " + text);
3950
+ };
3951
+ return Logger;
3952
+ }());
3953
+ Logger.ɵprov = i0.ɵɵdefineInjectable({ factory: function Logger_Factory() { return new Logger(i0.ɵɵinject(EST_DEBUG, 8)); }, token: Logger, providedIn: "root" });
3954
+ Logger.decorators = [
3955
+ { type: i0.Injectable, args: [{ providedIn: "root" },] }
3956
+ ];
3957
+ Logger.ctorParameters = function () { return [
3958
+ { type: Boolean, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [EST_DEBUG,] }] }
3959
+ ]; };
3960
+
3900
3961
  /** Componente che permette di rappresentare una griglia di valori */
3901
3962
  var EsTableComponent = /** @class */ (function () {
3902
3963
  /** @ignore */
3903
- function EsTableComponent(ngControl, prefService, deafults, locale, lc, cdr, utilities_H, utiExts, expExts, dateExts, msgExts, copyPasteDetector, clipboardService) {
3964
+ function EsTableComponent(ngControl, prefService, deafults, locale, lc, cdr, utilities_H, utiExts, expExts, dateExts, msgExts, copyPasteDetector, clipboardService, logger) {
3904
3965
  var _this = this;
3905
3966
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
3906
3967
  this.ngControl = ngControl;
@@ -3916,6 +3977,7 @@
3916
3977
  this.msgExts = msgExts;
3917
3978
  this.copyPasteDetector = copyPasteDetector;
3918
3979
  this.clipboardService = clipboardService;
3980
+ this.logger = logger;
3919
3981
  /** Subject utilizzato internamente lato EsTable per causare il Focus lato componente di Input */
3920
3982
  this.FocusSubject = new rxjs.Subject();
3921
3983
  /** Se vengono effettuati 2 click a distanza inferiore a questi Millisecondi viene considerato un doppio click */
@@ -3941,9 +4003,9 @@
3941
4003
  this.boundSource = [];
3942
4004
  /** Stessa cosa della **boundSource**, utilizzata come appoggio temporaneo interno */
3943
4005
  this.TMPBoundSource = [];
3944
- /** "Fetta" di oggetti utilizzata nell'endless scroll, ogni elemento di questo array è un blocchetto di 100 elementi */
4006
+ /** @deprecated "Fetta" di oggetti utilizzata nell'endless scroll, ogni elemento di questo array è un blocchetto di 100 elementi */
3945
4007
  this.boundSubSources = [];
3946
- /** Questa funge da indicatore per gli slice inseriti, la lunghezza dovrebbe essere corrispondente a **boundSubSources** */
4008
+ /** @deprecated Questa funge da indicatore per gli slice inseriti, la lunghezza dovrebbe essere corrispondente a **boundSubSources** */
3947
4009
  this.addedSlices = [];
3948
4010
  /** Variabile che identifica il valore del "seleziona Tutto" nella paginazione */
3949
4011
  this.defaultAllPageOverride = 999999;
@@ -3953,22 +4015,20 @@
3953
4015
  this.seconds = '10';
3954
4016
  /** Impostata a true ogni volta che viene avviata una ricerca, e a false ogni volta che un nuovo valore viene ricevuto */
3955
4017
  this.researchInProgress = false;
4018
+ /** Modello di appoggio temporaneo per i **RowTDs** */
4019
+ this.TMPRowTDs = null;
3956
4020
  /** Modello rappresentante un dizionario di righe della tabella, con chiave l'hash e valore la lista di celle */
3957
4021
  this.RowTDs = null;
3958
4022
  /** Indica se **RowTDs** è un oggetto vuoto o meno */
3959
4023
  this.EmptyRowTds = true;
3960
- /** Modello di appoggio temporaneo per i **RowTDs** */
3961
- this.TMPRowTDs = null;
3962
- /** Modello rappresentante un singolo th della tabella, generato in base alle configurazioni e agli oggetti ricevuti */
3963
- this.RowTHs = null;
3964
4024
  /** Modello di appoggio temporaneo per i **RowTHs** */
3965
4025
  this.TMPRowTHs = null;
4026
+ /** Modello rappresentante un singolo th della tabella, generato in base alle configurazioni e agli oggetti ricevuti */
4027
+ this.RowTHs = null;
3966
4028
  /** Modello di appoggio temporaneo per i **RowThGroups** */
3967
4029
  this.TMPRowThGroups = null;
3968
4030
  /** Modello rappresentante un singolo header group della tabella. Questa lista è già ordinata e pronta per essere utilizzata in ngFor */
3969
4031
  this.RowThGroups = null;
3970
- /** Cache per i routerLink generati nelle tabelle dinamiche */
3971
- this.DynamicTableRouterLinkCache = {};
3972
4032
  /**
3973
4033
  * Lista dei contesti. Un contesto non è altro che un hash particolare calcolato su un oggetto che identifica univocamente tale oggetto.
3974
4034
  *
@@ -3979,6 +4039,19 @@
3979
4039
  this.OrderDirectives = [];
3980
4040
  /** Codice dell'ultimo oggetto solezionato */
3981
4041
  this.lastSelectedItemID = null;
4042
+ /**
4043
+ * Decide se utilizzare o meno le CustomCells. Impostandolo a **true** l'es-table diventa in grado di gestire nativamente:
4044
+ *
4045
+ * 1) Ordinamento e visibilità delle colonne
4046
+ *
4047
+ * 2) Ordinamento dei dati
4048
+ *
4049
+ * 3) Modalità Gerarchica
4050
+ *
4051
+ * ecc...
4052
+ * viene dedotto dal sistema in automatico
4053
+ */
4054
+ this.UseCustomCells = null;
3982
4055
  /**
3983
4056
  * Indica se oltre alle colonne dinamiche specifiche di un tipo di oggetto ci sono anche colonne dinamiche aggiunte dall'utente
3984
4057
  *
@@ -4005,24 +4078,8 @@
4005
4078
  this.Height = null;
4006
4079
  /** Indica il colore di sfondo dello spazio vuoto (non ricoperto da dati). Particolarmente utile da impostare in caso di **Height** diverso da null */
4007
4080
  this.EmptySpaceBackgroundColor = null;
4008
- /**
4009
- * @experimental Indica se dev'essere l'estable a gestire la ricerca, anche la prima.
4010
- *
4011
- * **ATTENZIONE: RICHIEDE MODIFICHE NON TRIVIALI ALLA PAGINA DI RICERCA CHE UTILIZZA QUESTO TIPO DI ES-TABLE. NON UTILIZZARE SE NON SI SA CIO' CHE SI STA FACENDO**
4012
- **/
4081
+ /** Indica se dev'essere l'estable a gestire la ricerca, anche la prima. **/
4013
4082
  this.EsTableHandledSearch = false;
4014
- /**
4015
- * Decide se utilizzare o meno le CustomCells. Impostandolo a **true** l'es-table diventa in grado di gestire nativamente:
4016
- *
4017
- * 1) Ordinamento e visibilità delle colonne
4018
- *
4019
- * 2) Ordinamento dei dati
4020
- *
4021
- * 3) Modalità Gerarchica
4022
- *
4023
- * ecc...
4024
- */
4025
- this.UseCustomCells = null;
4026
4083
  /** Permette di impostare l'altezza massima della tabella. Se null la dimensione si adatta al numero di elementi attualmente in visualizzazione */
4027
4084
  this.MaxHeight = null;
4028
4085
  /** Classi da applicare al contenitore della tabella */
@@ -4067,9 +4124,9 @@
4067
4124
  this.TableClass = null;
4068
4125
  /** Indica di esportare solo le colonne attualmente visibili della view */
4069
4126
  this.ExportOnlyVisibleColumns = false;
4070
- /** Indica la presenza di raggruppamenti a livello di header */
4127
+ /** @deprecated Indica la presenza di raggruppamenti a livello di header */
4071
4128
  this.HasHeaderGroup = null;
4072
- /** Indica la presenza di raggruppamenti a livello del raggruppamento precedentemente esistente, chiaramente è insensata senza **HasHeaderGroup** */
4129
+ /** @deprecated Indica la presenza di raggruppamenti a livello del raggruppamento precedentemente esistente, chiaramente è insensata senza **HasHeaderGroup** */
4073
4130
  this.HasSecondaryHeaderGroup = null;
4074
4131
  /** Indica se nascondere gli Header della tabella */
4075
4132
  this.HeaderHidden = null;
@@ -4095,7 +4152,7 @@
4095
4152
  this.HiddenColumns = null;
4096
4153
  /** Permette di riordinare le colonne in base alle impostazioni effettuate dal Menù contestuale in alto a destra */
4097
4154
  this.ColumnsOrdering = null;
4098
- /** Eventuale supporto alle ricerche applicate alla modalità Array */
4155
+ /** @deprecated Eventuale supporto alle ricerche applicate alla modalità Array */
4099
4156
  this.SearchView = null;
4100
4157
  /** Abilita o disabilita il sistema che permette di selezionare tutti gli elementi nella vista */
4101
4158
  this.SelectAll = null;
@@ -4217,13 +4274,23 @@
4217
4274
  **/
4218
4275
  this.useLocalVisibility = false;
4219
4276
  /** Opzioni di paginazione */
4220
- this.PagerOptions = { PagerCount: null, ShowCount: true, ShowPaging: true, ShowButtons: true, ShowPagingOptions: true, UsesView: true, View: null, Ready: false, Searches: 'items' };
4277
+ this.PagerOptions = new PagerInfos();
4221
4278
  /** @ignore */
4222
4279
  this.propagateChange = function (_) { };
4223
4280
  /** Funzione di trackby per il body che dovrebbe evitare il 90% delle change detection */
4224
- this.bodyTrackBy = function (index, item) { return item._hash; };
4281
+ this.bodyTrackBy = function (_, item) { return item._hash; };
4282
+ /** Funzione di trackby generica per tutti gli oggetti che hanno il campo id */
4283
+ this.idTrackBy = function (_, item) { return item.id; };
4284
+ /** Funzione di trackby generica per tutti gli oggetti che hanno il campo PropertyName */
4285
+ this.PropertyNameTrackBy = function (_, item) { return item.PropertyName; };
4286
+ /** Funzione di trackby generica per tutti gli oggetti che hanno il campo ID */
4287
+ this.IDTrackBy = function (_, item) { return item.ID; };
4288
+ /** Funzione di trackby generica per tutti gli oggetti che hanno il campo ID */
4289
+ this.valTrackBy = function (_, item) { return item.val; };
4225
4290
  // Range selection Experimentals
4226
4291
  this.mouseIsDown = false;
4292
+ this.rangeSelected = false;
4293
+ this.rangeStartWasIgnored = false;
4227
4294
  this.firstCoordinates = null;
4228
4295
  //* Piango
4229
4296
  this.EsTdsCache = {};
@@ -4275,7 +4342,7 @@
4275
4342
  return;
4276
4343
  var shouldEmit = !t.item._selected;
4277
4344
  t.item._selected = true;
4278
- _this.selection_H.clearSelectionStatus();
4345
+ _this.selection_H.clearSelectionStatusExcluding(null);
4279
4346
  var itemSelection = _this.selection_H.handleItemsSelection([t.item]);
4280
4347
  _this.changed();
4281
4348
  if (shouldEmit)
@@ -4595,7 +4662,7 @@
4595
4662
  };
4596
4663
  /** Per poter distinguere le chiamate a questo metodo: Dopo il setTimeout se uso gli EsTd/EsTh vecchi, senza il setTimeout se uso le nuove direttive */
4597
4664
  EsTableComponent.prototype.internalPostBoundSource = function () {
4598
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
4665
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
4599
4666
  var View = this.View;
4600
4667
  var tdsD = this.EsTdsDirective.length == 0 ? ((_c = (_b = (_a = this.EsTableTemplate) === null || _a === void 0 ? void 0 : _a.Template) === null || _b === void 0 ? void 0 : _b.EsTdsDirective) === null || _c === void 0 ? void 0 : _c.length) > 0 ? (_e = (_d = this.EsTableTemplate) === null || _d === void 0 ? void 0 : _d.Template) === null || _e === void 0 ? void 0 : _e.EsTdsDirective : this.EsTdsDirective : this.EsTdsDirective;
4601
4668
  var thsD = this.EsThsDirective.length == 0 ? ((_h = (_g = (_f = this.EsTableTemplate) === null || _f === void 0 ? void 0 : _f.Template) === null || _g === void 0 ? void 0 : _g.EsThsDirective) === null || _h === void 0 ? void 0 : _h.length) > 0 ? (_k = (_j = this.EsTableTemplate) === null || _j === void 0 ? void 0 : _j.Template) === null || _k === void 0 ? void 0 : _k.EsThsDirective : this.EsThsDirective : this.EsThsDirective;
@@ -4603,6 +4670,7 @@
4603
4670
  var tds = tdsD && tdsD.length > 0 ? tdsD.toArray() : [];
4604
4671
  // Se non ho colonne dinamiche ma sono in modalità dinamica (lo capisco perché c'è una view piena di genericitem) metto il default delle colonne
4605
4672
  this.dynamicMode_H.eventuallyReviewDynamicColumns();
4673
+ // Gestisce la richiesta per gruppi o per singoli oggetti
4606
4674
  this.bindDisplayToLoadedItemsOrGroups(View);
4607
4675
  // Questo dev'essere per forza lanciato dopo **bindDisplayToLoadedItemsOrGroups** dato che è lì che alcune cose vengono valorizzate
4608
4676
  this.setupPagingInformations();
@@ -4613,16 +4681,24 @@
4613
4681
  var si = this.viewMode ? view.selection : this.arraymodeSelection;
4614
4682
  // N.B: Rispettare l'ordine di queste 3 macrocategorie è VITALE
4615
4683
  // ************************************* Sistemazioni di TH, TD, e visibilità varie *************************************
4684
+ // Se ho definizioni dinamiche, prima di qualsiasi altra cosa devo trasformarle in th/td in modo che poi il codice qui sotto faccia le sue magie
4685
+ if (!this.arrayMode && ((_l = this.DynamicRowColumnsDefinition) === null || _l === void 0 ? void 0 : _l.length) > 0) {
4686
+ this.logger.log("Generating ths and tds from Dynamic definition");
4687
+ var ret_1 = this.dynamicMode_H.emitThsAndTdsBasedOnDynamicDefinition();
4688
+ ths = ret_1.ths;
4689
+ tds = ret_1.tds;
4690
+ }
4691
+ // Gestione delle view in modalità report, i th e i td vengono rigenerati dalle configurazioni della view
4692
+ if (!this.arrayMode && view.report_columns) {
4693
+ this.logger.log("Generating ths and tds from report results");
4694
+ var ret_2 = this.reportMode_H.generateThsAndTdsFromView(view);
4695
+ ths = ret_2.ths;
4696
+ tds = ret_2.tds;
4697
+ }
4616
4698
  // Espando i th e i td multipli duplicandoli
4617
4699
  var ret = this.columnMetadata_H.expandMultiThsAndTds(ths, tds, itemsAndGroups);
4618
4700
  ths = ret.expThs;
4619
4701
  tds = ret.expTds;
4620
- // Gestione delle view in modalità report, i th e i td vengono rigenerati dalle configurazioni della view
4621
- if (!this.arrayMode && view.report_columns) {
4622
- var ret_1 = this.reportMode_H.generateThsAndTdsFromView(view);
4623
- ths = ret_1.ths;
4624
- tds = ret_1.tds;
4625
- }
4626
4702
  // Genero la cache dei th da usare da qui in poi, dopo avergli lasciato fare le sue cose in caso ci siano dei multi o dei report
4627
4703
  for (var i = 0; i < ths.length; i++) {
4628
4704
  var th = ths[i];
@@ -4786,6 +4862,7 @@
4786
4862
  * @param {EsTdDirective[]} tds Celle della tabella
4787
4863
  */
4788
4864
  EsTableComponent.prototype.evaluateRowTds = function (ths, tds) {
4865
+ var _a;
4789
4866
  if (tds.length == 0)
4790
4867
  return;
4791
4868
  var columnsCache = {};
@@ -4818,13 +4895,14 @@
4818
4895
  PinnedWidth: thCasted.thPinnedWidth,
4819
4896
  GroupHeader: false,
4820
4897
  GroupAggregation: false,
4821
- Visible: columnsCache[td.td].visible, Wraps: false,
4898
+ Visible: columnsCache[td.td].visible,
4899
+ Wraps: false,
4822
4900
  Class: td.tdClass,
4823
4901
  Template: thCasted.thGroup && !this.ShowItemGroupsColumns ? null : td.Template,
4824
4902
  Multi: td._multi,
4825
4903
  MultiProp: td._multi ? td.td.split('_')[0] : null,
4826
4904
  MultiIndex: td._multi ? td.td.split('_')[1] : null,
4827
- Alignment: td.tdAlignment || th.thAlignment,
4905
+ Alignment: (_a = (td.tdAlignment || th.thAlignment)) === null || _a === void 0 ? void 0 : _a.toLowerCase(),
4828
4906
  Format: td.tdFormat || th.thFormat,
4829
4907
  PropertyName: th.thProperty,
4830
4908
  PropertyType: th.thType,
@@ -4895,7 +4973,24 @@
4895
4973
  var toAdd = void 0;
4896
4974
  if (th.thIf || th.thGroup) {
4897
4975
  var thClass = (th.thClass || '') + (th.thGroup ? " est-col-min" : "");
4898
- toAdd = { Pinned: columnsListCache[th.th].pinned, Fixed: th.thFixed, PinnedWidth: th.thPinnedWidth, ID: th.th, Visible: th.thVisible, Class: thClass, Order: th.thOrder, Orderable: th.thOrderable, Template: th.Template, Content: th.thStaticContent, Wrap: th.thWrap, LeftBorder: th._lbord, RightBorder: th._rbord, Multi: th._multi, MultiContent: th._multi_content };
4976
+ toAdd = {
4977
+ Pinned: columnsListCache[th.th].pinned,
4978
+ Fixed: th.thFixed,
4979
+ PinnedWidth: th.thPinnedWidth,
4980
+ ID: th.th,
4981
+ Visible: th.thVisible,
4982
+ Class: thClass,
4983
+ Order: th.thOrder,
4984
+ Orderable: th.thOrderable,
4985
+ Template: th.Template,
4986
+ // Se non è nessun contenuto né nessun template mostro semplicemente l'ID dell'header
4987
+ Content: th.thStaticContent || th.Template ? '' : th.th,
4988
+ Wrap: th.thWrap,
4989
+ LeftBorder: th._lbord,
4990
+ RightBorder: th._rbord,
4991
+ Multi: th._multi,
4992
+ MultiContent: th._multi_content
4993
+ };
4899
4994
  this.TMPRowTHs.push(toAdd);
4900
4995
  // Se ho un modello che deve funzionare a rowgrouping ma non è ancora stata effettuata nessuna ricerca sui gruppi principali (groupingsUndefined)
4901
4996
  // li genero e mando la prima ricerca che dev'essere spedita al backend per il primo caricamento dei gruppi
@@ -4996,7 +5091,7 @@
4996
5091
  */
4997
5092
  EsTableComponent.prototype.globalCheckChanged = function (forcedVal) {
4998
5093
  if (forcedVal === void 0) { forcedVal = null; }
4999
- this.selection_H.clearSelectionStatus();
5094
+ this.selection_H.clearSelectionStatusExcluding(null);
5000
5095
  // Prendo tutti gli elementi presenti in questa vista. Se ho gruppi prendo solo i gruppi a livello 0, altrimenti prendo tutti gli oggetti per selezionarli
5001
5096
  var items = this.boundSource.find(function (t) { return t._group; }) ? this.boundSource.filter(function (t) { return t._group && !t._parent; }) : this.boundSource;
5002
5097
  var itemSelection = this.selection_H.handleItemsSelection(items, forcedVal, this.globalCheck);
@@ -5015,7 +5110,7 @@
5015
5110
  */
5016
5111
  EsTableComponent.prototype.handleClick = function (event, item) {
5017
5112
  this.selection_H.clearTextSelection(event);
5018
- this.selection_H.clearSelectionStatus();
5113
+ this.selection_H.clearSelectionStatusExcluding(null);
5019
5114
  var selecteditems = [];
5020
5115
  if (event.shiftKey && this.ShiftClick && !this.SingleSelection) {
5021
5116
  var startSelecting = false;
@@ -5240,25 +5335,35 @@
5240
5335
  * @param {any} $event Evento nativo javascript
5241
5336
  * @param {TdElement} rowItem Riferimento a binder della riga
5242
5337
  * @param {any} item Item che rappresenta il contesto su cui è stato effettuato un click
5243
- * @param {number} rowIndex Indice della riga
5244
5338
  */
5245
- EsTableComponent.prototype.dbClickEditOrSingleClickRowSelection = function ($event, rowItem, item, rowIndex) {
5339
+ EsTableComponent.prototype.dbClickEditOrSingleClickRowSelection = function ($event, rowItem, item) {
5246
5340
  var _this = this;
5247
- var _a, _b;
5341
+ // Prima cosa da fare è controllare se ci sono dei range lasciati da operazioni precedenti (se applicabile) e ripulirli
5342
+ if (this.rangeSelected && !$event.ctrlKey && this.Selection) {
5343
+ this.logger.log("clearing previously selected range");
5344
+ this.selection_H.clearSelectionStatusExcluding(null);
5345
+ this.rangeSelected = false;
5346
+ return;
5347
+ }
5248
5348
  // Modalità Editable, gestisco i doppi click senza però rallentare la modalità di selezione a range
5249
5349
  if (this.Editable) {
5250
5350
  // Secondo click: se il timer non è scaduto è un doppio click ed eseguo il resto
5251
5351
  if (this.cellDbClickTimer) {
5352
+ this.logger.log("handling doubleclick on editable cell: " + (rowItem.PropertyName ? 'edit mode for property ' + rowItem.PropertyName : 'no property set, fallback to simple click'));
5252
5353
  if (rowItem.PropertyName)
5253
5354
  this.setupUserEdit(rowItem, item);
5355
+ else
5356
+ this.handleRowClick($event, item, this.Selection, true);
5254
5357
  this.clearCellClickTimer();
5255
5358
  return;
5256
5359
  }
5257
5360
  // Primo click: non fa niente e se il tempo per il secondo click scade resetta tutto
5258
5361
  this.cellDbClickTimer = setTimeout(function () {
5259
5362
  _this.clearCellClickTimer();
5260
- if (!_this.RangeSelection)
5363
+ if (!_this.RangeSelection || !_this.mouseIsDown) {
5364
+ _this.logger.log("time's up for second click, handling single click");
5261
5365
  _this.handleRowClick($event, item, _this.Selection, true);
5366
+ }
5262
5367
  }, this.doubleClickBufferMs);
5263
5368
  }
5264
5369
  // In modalità a range la creazione del range è gestita dai mousedown, move ed up...
@@ -5269,8 +5374,7 @@
5269
5374
  if ($event.ctrlKey)
5270
5375
  return;
5271
5376
  // Tutti i click su una cella già in edit non devono effettuare la selezione della riga
5272
- if ((((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0 && rowItem.edits && ((_b = rowItem.edits[item._hash]) === null || _b === void 0 ? void 0 : _b._editing)) ||
5273
- rowItem._editing)
5377
+ if (rowItem._editing)
5274
5378
  return;
5275
5379
  // Per evitare di rallentare a prescindere
5276
5380
  if (!this.Editable) {
@@ -5354,14 +5458,12 @@
5354
5458
  // Stessa cosa se ho custom cell dato che la gestione dei click viene affidata ai singoli TD
5355
5459
  if ($event.ctrlKey || (this.UseCustomCells && !internalCall))
5356
5460
  return true;
5357
- if (selection && !item.locked && !item._sep && !item._group) {
5358
- this.selection_H.clearSelectionStatus();
5461
+ if (selection)
5462
+ this.selection_H.clearSelectionStatusExcluding(null);
5463
+ if (selection && !item.locked && !item._sep && !item._group)
5359
5464
  this.handleClick($event, item);
5360
- }
5361
- else if (item._group) {
5362
- this.selection_H.clearSelectionStatus();
5465
+ else if (item._group)
5363
5466
  this.handleGroupClick(item);
5364
- }
5365
5467
  // Ora che non è attaccato direttamente all'html devo fare un markforcheck finite le operazioni sui grouping
5366
5468
  this.cdr.markForCheck();
5367
5469
  };
@@ -5383,15 +5485,11 @@
5383
5485
  EsTableComponent.prototype.setupUserEdit = function (rowItem, item) {
5384
5486
  var _this = this;
5385
5487
  var _a;
5386
- this.selection_H.clearSelectionStatus();
5488
+ this.selection_H.clearSelectionStatusExcluding(null);
5387
5489
  if (this.Editable && rowItem.PropertyName) {
5388
- if (((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0) {
5389
- rowItem.edits[item._hash] = { _editing: true, old_value: item.properties[rowItem.PropertyName] };
5390
- }
5391
- else {
5392
- rowItem._editing = true;
5393
- rowItem.old_value = item[rowItem.PropertyName];
5394
- }
5490
+ var dynMode = ((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0;
5491
+ rowItem._editing = true;
5492
+ rowItem.old_value = dynMode ? item.properties[rowItem.PropertyName] : item[rowItem.PropertyName];
5395
5493
  }
5396
5494
  this.cdr.detectChanges();
5397
5495
  setTimeout(function () { _this.FocusSubject.next(); });
@@ -5406,7 +5504,7 @@
5406
5504
  EsTableComponent.prototype.finalizeUserEdit = function (rowItem, item, columnIndex) {
5407
5505
  var _a;
5408
5506
  var dynMode = ((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0;
5409
- var rowItm = dynMode ? (rowItem.edits[item._hash]) : rowItem;
5507
+ var rowItm = rowItem;
5410
5508
  rowItm._editing = false;
5411
5509
  var old = rowItm.old_value;
5412
5510
  var niu = dynMode ? item.properties[rowItem.PropertyName] : item[rowItem.PropertyName];
@@ -5417,22 +5515,27 @@
5417
5515
  this.onModelChange.emit([new EsTableModelChange(item, rowItem.ID, rowItem.PropertyName, old, niu)]);
5418
5516
  this.selectionStatus[item._ordinal][columnIndex].val_setter(niu);
5419
5517
  };
5420
- EsTableComponent.prototype.mousedown = function (event, rowItem, item) {
5421
- var _a, _b;
5518
+ EsTableComponent.prototype.mousedown = function (event, rowItem, _) {
5422
5519
  // Tasto diverso dal click sinistro -> ciao è stato bello e intenso
5423
5520
  if (event.buttons != 1 || !this.RangeSelection)
5424
5521
  return;
5425
5522
  // Sto lavorando su QUESTA es-table
5426
5523
  this.copyPasteDetector.ActiveEstReference = this;
5427
5524
  // Tutti i click su una cella già in edit non devono effettuare la selezione della riga
5428
- if ((((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0 && rowItem.edits && ((_b = rowItem.edits[item._hash]) === null || _b === void 0 ? void 0 : _b._editing)) ||
5429
- rowItem._editing)
5525
+ if (rowItem._editing)
5430
5526
  return;
5431
- var id = event.currentTarget.id;
5432
5527
  this.mouseIsDown = true;
5433
- var coords = id.split('_');
5434
- this.firstCoordinates = { row: parseInt(coords[coords.length - 2]), column: parseInt(coords[coords.length - 1]) };
5435
- this.selection_H.singleCellSelection({ view: event.view, shiftKey: false }, this.firstCoordinates.row, this.firstCoordinates.column);
5528
+ var coords = event.currentTarget.id.split('_');
5529
+ var row = parseInt(coords[coords.length - 2]);
5530
+ var column = parseInt(coords[coords.length - 1]);
5531
+ this.firstCoordinates = { row: row, column: column };
5532
+ // Se ho già un range di selezione ignoro temporanemaente questa selezione in modo da capire bene cosa devo fare dopo (click sulla riga / altra selezione)
5533
+ // e gestire la grafica in maniera un po' più precisa
5534
+ if (!this.rangeSelected || (event.ctrlKey || !this.Selection))
5535
+ this.selection_H.singleCellSelection({ view: event.view, range: false }, row, column);
5536
+ else
5537
+ this.rangeStartWasIgnored = true;
5538
+ this.logger.log("mouse down on " + row + ":" + column);
5436
5539
  };
5437
5540
  EsTableComponent.prototype.mouseenter = function (event) {
5438
5541
  if (!this.RangeSelection)
@@ -5442,14 +5545,34 @@
5442
5545
  if (this.mouseIsDown && this.firstCoordinates) {
5443
5546
  var id = event.currentTarget.id;
5444
5547
  var coords = id.split('_');
5445
- var newCoords = { row: parseInt(coords[coords.length - 2]), column: parseInt(coords[coords.length - 1]) };
5446
- this.selection_H.singleCellSelection({ view: event.view, shiftKey: true }, newCoords.row, newCoords.column, this.firstCoordinates);
5548
+ var row = parseInt(coords[coords.length - 2]);
5549
+ var column = parseInt(coords[coords.length - 1]);
5550
+ // Se ho ignorato l'inizio della selezione nel mousedown lo recupero qui
5551
+ if (this.rangeStartWasIgnored) {
5552
+ this.selection_H.singleCellSelection({ view: event.view, range: false }, this.firstCoordinates.row, this.firstCoordinates.column);
5553
+ this.rangeStartWasIgnored = false;
5554
+ }
5555
+ this.selection_H.singleCellSelection({ view: event.view, range: true }, row, column, this.firstCoordinates);
5556
+ this.logger.log("mouse move over " + row + ":" + column);
5557
+ this.rangeSelected = true;
5447
5558
  }
5448
5559
  };
5449
5560
  EsTableComponent.prototype.mouseup = function (event) {
5450
5561
  if (!this.RangeSelection)
5451
5562
  return;
5563
+ var id = event.currentTarget.id;
5564
+ var coords = id.split('_');
5565
+ var row = parseInt(coords[coords.length - 2]);
5566
+ var column = parseInt(coords[coords.length - 1]);
5567
+ // Se il mouseup viene effettuato sulla stessa cella del primo mousedown e siamo in modalità di selezione deseleziono la cella perché è un semplice click
5568
+ if (this.mouseIsDown && this.firstCoordinates) {
5569
+ if (this.firstCoordinates.row == row && this.firstCoordinates.column == column && !event.ctrlKey && !this.rangeStartWasIgnored && this.Selection)
5570
+ this.selection_H.singleCellSelection({ view: event.view, range: false }, row, column);
5571
+ else if (event.ctrlKey || !this.Selection)
5572
+ this.rangeSelected = true;
5573
+ }
5452
5574
  this.mouseIsDown = false;
5575
+ this.logger.log("mouse lifted up");
5453
5576
  };
5454
5577
  EsTableComponent.prototype.getCellReference = function (object, column) {
5455
5578
  var fkThisShitImOut = this.utiExts.deepClone(object);
@@ -5470,8 +5593,8 @@
5470
5593
  viewProviders: [{ provide: localizations.LocalizationService, useClass: EsTableLoc }],
5471
5594
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
5472
5595
  encapsulation: i0.ViewEncapsulation.None,
5473
- 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\" [style.height]=\"Height\" [style.background-color]=\"EmptySpaceBackgroundColor\">\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 || (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 est-full-height {{ContainerClass}}\" [style.max-height.px]=\"MaxHeight\">\r\n <table class=\"{{ TableClass }} est-margin-bottom-10 est\" style=\"background-color: white;\" [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 && !SingleSelection) || PagingStyle != 'bottom'\">\r\n <th class=\"est-no-selection\" [attr.colspan]=\"Columns.Global\" [class.est-hidden-view]=\"!canSelectAll && !(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;\">\r\n <div class=\"est-pinned-border est-cell-group-padding\"></div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!cell.Pinned && cell.Content; Else: cell.Template\">\r\n {{cell.Content}}\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=\"arrayMode || viewMode\">\r\n <!-- In una tabella base prendo semplicemente i th scritti dall'utente nell'HTML -->\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTHs || RowTHs.length == 0) && !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 || RowTHs.length == 0) && 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\" id=\"esth_{{rowHeader.PropertyName}}\" 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\" id=\"esth_{{rowHeader.PropertyName}}\" 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 && RowTHs.length > 0\">\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)=\"thOrderChanged(rowHeader.ID, $event)\">\r\n <ng-container *ngIf=\"rowHeader.Template\"><ng-container *ngTemplateOutlet=\"rowHeader.Template; context: { $implicit: rowHeader.Multi ? rowHeader.MultiContent : null } \"></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\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)=\"thOrderChanged(rowHeader.ID, $event)\">\r\n <ng-container *ngIf=\"rowHeader.Template\"><ng-container *ngTemplateOutlet=\"rowHeader.Template; context: { $implicit: rowHeader.Multi ? rowHeader.MultiContent : null }\"></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 <!--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 <!-- 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 <tbody [hidden]=\"BodyHidden || FirstBind\" [class.est-no-selection]=\"RangeSelection\">\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 </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=\"PagerOptions.View?.pagingavailable || viewMode\">\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>\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)=\"!RangeSelection && handleRowClick($event, item, true)\"\r\n (contextmenu)=\"onRightClick();\">\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)=\"handleRowClick($event, item, false)\">\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 || EmptyRowTds) && !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 || EmptyRowTds) && 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\r\n <ng-container *ngFor=\"let rowItem of DynamicRowColumnsDefinition; let i = index\">\r\n\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\r\n <ng-container *ngIf=\"!rowItem.RoutePath && rowItem.Visible\">\r\n <td es-td=\"{{rowItem.PropertyName}}\" \r\n [class.est-selected-cell]=\"selectionStatus[item._ordinal][i]?.selected\" \r\n [class.est-cell-lborder]=\"selectionStatus[item._ordinal][i]?.lborder\"\r\n [class.est-cell-tborder]=\"selectionStatus[item._ordinal][i]?.tborder\"\r\n [class.est-cell-rborder]=\"selectionStatus[item._ordinal][i]?.rborder\"\r\n [class.est-cell-bborder]=\"selectionStatus[item._ordinal][i]?.bborder\"\r\n [class.est-cell-lborder-tmp]=\"!selectionStatus[item._ordinal][i]?.lborder && !selectionStatus[item._ordinal][i]?.loverlaps\"\r\n [class.est-cell-rborder-tmp]=\"!selectionStatus[item._ordinal][i]?.rborder && !selectionStatus[item._ordinal][i]?.roverlaps\"\r\n (click)=\"dbClickEditOrSingleClickRowSelection($event, rowItem, item, i)\" \r\n class=\"{{UserDefinedDynamicCols ? rowItem.Clss : 'est-nowrap'}} est-default-row-height\" \r\n [Internal]=\"false\" [class.est-no-selection]=\"!!Editable\" [Context]=\"item._hash\"\r\n id=\"estd_{{rowItem.PropertyName}}_{{item._ordinal}}_{{i}}\" (mousedown)=\"mousedown($event, rowItem, item)\" (mouseenter)=\"mouseenter($event)\" (mouseup)=\"mouseup($event)\">\r\n\r\n <div [class.est-edit-hidden]=\"rowItem.edits[item._hash]?._editing\" >\r\n <ng-container *ngTemplateOutlet=\"findEsTd(rowItem.PropertyName, rowItem.RendererName) || defaultEsTd; context: { $implicit: { definition: rowItem, value: item.properties[rowItem.PropertyName], type: rowItem.PropertyType} }\"></ng-container>\r\n </div>\r\n <div *ngIf=\"rowItem.edits[item._hash]?._editing\" class=\"est-mt-min-5\">\r\n <ng-container *ngTemplateOutlet=\"findEditor(rowItem.PropertyName, rowItem.EditorName) || defaultEditor; context: { $implicit: { definition: rowItem, columnIndex: i, item: item, finalizer: finalizeUserEdit.bind(this, rowItem, item, i) } }\"></ng-container>\r\n </div>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEditor let-ctx>\r\n <ng-container *ngIf=\"ctx.item.properties\">\r\n <form-adaptive [FormLayout]=\"false\" [Validation]=\"false\" [Options]=\"ctx.definition.EditorOptions\" [FocusSubject]=\"FocusSubject\" [(ngModel)]=\"ctx.item.properties[ctx.definition.PropertyName]\" name=\"{{ ctx.definition.PropertyName + '_' + ctx.item._hash }}\" [Type]=\"ctx.definition.PropertyType\" [Source]=\"ctx.definition.PropertySource\" (inputFinalized)=\"ctx.finalizer()\"></form-adaptive>\r\n </ng-container>\r\n <ng-container *ngIf=\"!ctx.item.properties\">\r\n <form-adaptive [FormLayout]=\"false\" [Validation]=\"false\" [Options]=\"ctx.definition.EditorOptions\" [FocusSubject]=\"FocusSubject\" [(ngModel)]=\"ctx.item[ctx.definition.PropertyName]\" name=\"{{ ctx.definition.PropertyName + '_' + ctx.item._hash }}\" [Type]=\"ctx.definition.PropertyType\" [Source]=\"ctx.definition.PropertySource\" (inputFinalized)=\"ctx.finalizer()\"></form-adaptive>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEsTd let-ctx>\r\n <!-- Formattare il valore in base a valType.type -->\r\n <ng-container *ngIf=\"ctx.type == 'enum'\">\r\n {{ (ctx.value | est_lookup : ctx.definition.PropertySource).description }}\r\n </ng-container>\r\n <ng-container *ngIf=\"ctx.type != 'enum'\">\r\n {{ctx.value}}\r\n </ng-container>\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 && !EmptyRowTds\">\r\n <td *ngIf=\"HasPinnedColumns\" \r\n 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-selection]=\"Editable &&!!rowItem.PropertyName\" [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\" (click)=\"dbClickEditOrSingleClickRowSelection($event, rowItem, item, i)\">\r\n\r\n <div [class.est-edit-hidden]=\"rowItem._editing\" [class.est-pre]=\"!(Hierarchy && i == 0)\"\r\n [style.text-align]=\"rowItem.Alignment == 'Center' ? 'center' : rowItem.Alignment == 'Left' ? 'left' : rowItem.Alignment == 'Right' ? 'right' : null\"\r\n [style.color]=\"item.forecolors && rowItem.PropAccessor ? item.forecolors[rowItem.PropAccessor] : null\"\r\n [style.background-color]=\"item.backcolors && rowItem.PropAccessor ? item.backcolors[rowItem.PropAccessor] : null\">\r\n <ng-container *ngIf=\"Hierarchy && i == 0\"><ng-container *ngTemplateOutlet=\"HierarchyNavigator; context: { $implicit: rowItem.Multi ? (item[rowItem.MultiProp] ? item[rowItem.MultiProp][rowItem.MultiIndex] : {}) : item }\"></ng-container></ng-container>\r\n <ng-container *ngIf=\"!rowItem.Multi && rowItem.Template\"><ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: rowItem.Multi ? (item[rowItem.MultiProp] ? item[rowItem.MultiProp][rowItem.MultiIndex] : {}) : item }\"></ng-container></ng-container>\r\n <span *ngIf=\"rowItem.Multi && rowItem.Template\"><ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: (item[rowItem.MultiProp] ? item[rowItem.MultiProp][rowItem.MultiIndex] : {}) }\"></ng-container></span>\r\n <ng-container *ngIf=\"!rowItem.Template && !rowItem.Multi\">\r\n <span *ngIf=\"rowItem.Content && !rowItem.PropAccessor\">{{rowItem.Content}}</span>\r\n <span *ngIf=\"!rowItem.Content && rowItem.PropAccessor\">{{(item.values? item.values[rowItem.PropAccessor] : item[rowItem.PropAccessor]) | est_format: rowItem.Format }}</span>\r\n </ng-container>\r\n </div>\r\n <div *ngIf=\"rowItem._editing\" class=\"est-mt-min-5\">\r\n <ng-container *ngTemplateOutlet=\"findEditor(rowItem.PropertyName) || defaultEditor; context: { $implicit: { definition: rowItem, columnIndex: i, item: item, finalizer: finalizeUserEdit.bind(this, rowItem, item, i) } }\"></ng-container>\r\n </div>\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}}\" \r\n [class.est-selected-cell]=\"selectionStatus[item._ordinal][i]?.selected\" \r\n [class.est-cell-lborder]=\"selectionStatus[item._ordinal][i]?.lborder\"\r\n [class.est-cell-tborder]=\"selectionStatus[item._ordinal][i]?.tborder\"\r\n [class.est-cell-rborder]=\"selectionStatus[item._ordinal][i]?.rborder\"\r\n [class.est-cell-bborder]=\"selectionStatus[item._ordinal][i]?.bborder\"\r\n [class.est-ltab-border]=\"rowItem.LeftBorder && !selectionStatus[item._ordinal][i]?.lborder\" \r\n [class.est-rtab-border]=\"rowItem.RightBorder && !selectionStatus[item._ordinal][i]?.rborder\" \r\n [class.est-cell-lborder-tmp]=\"!selectionStatus[item._ordinal][i]?.lborder && !selectionStatus[item._ordinal][i]?.loverlaps && !rowItem.LeftBorder\"\r\n [class.est-cell-rborder-tmp]=\"!selectionStatus[item._ordinal][i]?.rborder && !selectionStatus[item._ordinal][i]?.roverlaps && !rowItem.RightBorder\"\r\n [class.est-no-selection]=\"Editable && !!rowItem.PropertyName\" [class.est-rg-hdr]=\"rowItem.GroupHeader\" [class.est-rg-agg]=\"rowItem.GroupAggregation\" \r\n [class.est-nowrap]=\"Hierarchy || !rowItem.Wraps\" [Internal]=\"true\" (click)=\"dbClickEditOrSingleClickRowSelection($event, rowItem, item, i)\"\r\n (onCellGeneration)=\"registerCell($event)\" [Context]=\"item._hash\"\r\n id=\"{{item._ordinal}}_{{i}}\" (mousedown)=\"mousedown($event, rowItem, item)\" (mouseenter)=\"mouseenter($event)\" (mouseup)=\"mouseup($event)\"\r\n [style.text-align]=\"rowItem.Alignment == 'Center' ? 'center' : rowItem.Alignment == 'Left' ? 'left' : rowItem.Alignment == 'Right' ? 'right' : null\"\r\n [style.color]=\"item.forecolors && rowItem.PropAccessor ? item.forecolors[rowItem.PropAccessor] : null\"\r\n [style.background-color]=\"item.backcolors && rowItem.PropAccessor ? item.backcolors[rowItem.PropAccessor] : null\">\r\n \r\n <div [class.est-edit-hidden]=\"rowItem._editing\" [class.est-pre]=\"!(Hierarchy && i == 0)\" >\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.Multi && rowItem.Template\"><ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: item }\"></ng-container></ng-container>\r\n <span *ngIf=\"rowItem.Multi && rowItem.Template\"><ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: (item[rowItem.MultiProp] ? item[rowItem.MultiProp][rowItem.MultiIndex] : {}) }\"></ng-container></span>\r\n <ng-container *ngIf=\"!rowItem.Template && !rowItem.Multi\">\r\n <span *ngIf=\"rowItem.Content && !rowItem.PropAccessor\">{{rowItem.Content}}</span>\r\n <span *ngIf=\"!rowItem.Content && rowItem.PropAccessor\">{{(item.values? item.values[rowItem.PropAccessor] : item[rowItem.PropAccessor]) | est_format: rowItem.Format }}</span>\r\n </ng-container>\r\n </div>\r\n <div *ngIf=\"rowItem._editing\" class=\"est-mt-min-5\">\r\n <ng-container *ngTemplateOutlet=\"findEditor(rowItem.PropertyName) || defaultEditor; context: { $implicit: { definition: rowItem, columnIndex: i, item: item, finalizer: finalizeUserEdit.bind(this, rowItem, item, i) } }\"></ng-container>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\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 *ngIf=\"parent.tmpl\"><ng-container *ngTemplateOutlet=\"parent.tmpl\"></ng-container></ng-container>\r\n <ng-container *ngIf=\"parent.content\">{{parent.content}}</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; context: { $implicit: item.multi ? item.multiContent : null }\"></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>",
5474
- 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-default-row-height{height:31px}.est-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.est-edit-hidden{height:1px!important}.est-edit-hidden,.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-full-height{height:100%}.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:-webkit-sticky;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:-webkit-sticky;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:-webkit-sticky;position:sticky;z-index:0;background-color:#fff}.est-sticky-last-column-alt{right:-1px;position:-webkit-sticky;position:sticky;z-index:0;background-color:#f2f2f2}.est-ltab-border{border-left:1px solid #bbb!important}.est-rtab-border{border-right:1px solid #bbb!important}.est-cell-group-padding{padding:calc(.3rem + 1px);position:absolute;top:0;left:0;height:100%;width:100%}.est-selected-cell{background-color:rgba(33,150,243,.2)}.est-cell-lborder{border-left:1.02px solid #2196f3!important}.est-cell-lborder-tmp{border-left:1.02px solid transparent!important}.est-cell-tborder{border-top:1.02px solid #2196f3!important}.est-cell-rborder{border-right:1.02px solid #2196f3!important}.est-cell-rborder-tmp{border-right:1.02px solid transparent!important}.est-cell-bborder{border-bottom:1.02px solid #2196f3!important}.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)}.est-pre{white-space:pre}.est val-datetime .mat-form-field-appearance-outline .mat-form-field-infix input{margin-bottom:3px!important;min-width:130px!important}.est .mat-form-field-flex{height:29px!important;padding:0!important}.est .mat-form-field-flex .mat-form-field-outline{color:#00f}.est .mat-form-field-flex .mat-form-field-outline .mat-form-field-outline-start{border-left:none;border-top:none;border-radius:0}.est .mat-form-field-flex .mat-form-field-outline .mat-form-field-outline-end{border-top:none;border-radius:0;border-right:none}.est .mat-form-field-wrapper{height:20px;min-height:20px!important;margin-top:0!important}.est .mat-form-field-infix{width:100%!important;min-width:50px!important}.est .mat-form-field-infix select.mat-input-element{margin-top:-5px!important}.est .mat-datepicker-input{margin-bottom:3px!important}.est input{height:20px;padding-top:0!important}"]
5596
+ 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\" [style.height]=\"Height\" [style.background-color]=\"EmptySpaceBackgroundColor\">\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 || (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 est-full-height {{ContainerClass}}\" [style.max-height.px]=\"MaxHeight\">\r\n <table class=\"{{ TableClass }} est-margin-bottom-10 est\" style=\"background-color: white;\" [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 && !SingleSelection) || PagingStyle != 'bottom'\">\r\n <th class=\"est-no-selection\" [attr.colspan]=\"Columns.Global\" [class.est-hidden-view]=\"!canSelectAll && !(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; trackBy: IDTrackBy\">\r\n <th *ngFor=\"let cell of level; trackBy: IDTrackBy\" [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;\">\r\n <div [style.width.px]=\"PinnedContainerWidth\" class=\"est-pinned-border est-cell-group-padding\"></div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!cell.Pinned && cell.Content; Else: cell.Template\">\r\n {{cell.Content}}\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=\"arrayMode || viewMode\">\r\n <!-- In una tabella base prendo semplicemente i th scritti dall'utente nell'HTML -->\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTHs || RowTHs.length == 0) && !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 || RowTHs.length == 0) && DynamicRowColumnsDefinition\">\r\n <th *ngFor=\"let operation of DynamicOperations; trackBy: idTrackBy\" class=\"est-col-min est-no-side-padding\"></th>\r\n \r\n <ng-container *ngFor=\"let rowHeader of DynamicRowColumnsDefinition; trackBy: PropertyNameTrackBy\">\r\n <ng-container *ngIf=\"rowHeader.Visible\">\r\n <th *ngIf=\"OrderByColumn\" id=\"esth_{{rowHeader.PropertyName}}\" 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\" id=\"esth_{{rowHeader.PropertyName}}\" 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?.length > 0\">\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; trackBy: IDTrackBy\">\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)=\"thOrderChanged(rowHeader.ID, $event)\">\r\n <ng-container *ngIf=\"rowHeader.Template\"><ng-container *ngTemplateOutlet=\"rowHeader.Template; context: { $implicit: rowHeader.Multi ? rowHeader.MultiContent : null } \"></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; trackBy: IDTrackBy\">\r\n\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)=\"thOrderChanged(rowHeader.ID, $event)\">\r\n <ng-container *ngIf=\"rowHeader.Template\"><ng-container *ngTemplateOutlet=\"rowHeader.Template; context: { $implicit: rowHeader.Multi ? rowHeader.MultiContent : null }\"></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 <!--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 <!-- 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; trackBy: idTrackBy\" (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 <tbody [hidden]=\"BodyHidden || FirstBind\" [class.est-no-selection]=\"RangeSelection\">\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 </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=\"PagerOptions.View?.pagingavailable || viewMode\">\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>\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; trackBy: valTrackBy\" 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)=\"!RangeSelection && handleRowClick($event, item, true)\"\r\n (contextmenu)=\"onRightClick();\">\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=\"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; trackBy: bodyTrackBy\">\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)=\"handleRowClick($event, item, false)\">\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=\"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\">\r\n <div [style.width.px]=\"PinnedContainerWidth\" class=\"est-pinned-border est-cell-group-padding\"></div>\r\n </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 || EmptyRowTds) && !DynamicRowColumnsDefinition\">\r\n <ng-container *ngTemplateOutlet=\"bodyRef; context : {$implicit: item}\"></ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEditor let-ctx>\r\n <!-- Un po' triste ma questo \u00E8 il metodo pi\u00F9 semplice per gestire il cambio di modello -->\r\n <ng-container *ngIf=\"ctx.item.properties\">\r\n <form-adaptive [FormLayout]=\"false\" [Validation]=\"false\" [Options]=\"ctx.definition.EditorOptions\" [FocusSubject]=\"FocusSubject\" [(ngModel)]=\"ctx.item.properties[ctx.definition.PropertyName]\" name=\"{{ ctx.definition.PropertyName + '_' + ctx.item._hash }}\" [Type]=\"ctx.definition.PropertyType\" [Source]=\"ctx.definition.PropertySource\" (inputFinalized)=\"ctx.finalizer()\"></form-adaptive>\r\n </ng-container>\r\n <ng-container *ngIf=\"!ctx.item.properties\">\r\n <form-adaptive [FormLayout]=\"false\" [Validation]=\"false\" [Options]=\"ctx.definition.EditorOptions\" [FocusSubject]=\"FocusSubject\" [(ngModel)]=\"ctx.item[ctx.definition.PropertyName]\" name=\"{{ ctx.definition.PropertyName + '_' + ctx.item._hash }}\" [Type]=\"ctx.definition.PropertyType\" [Source]=\"ctx.definition.PropertySource\" (inputFinalized)=\"ctx.finalizer()\"></form-adaptive>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEsTd let-ctx>\r\n <!-- TODO: Formattare il valore in base a valType.type -->\r\n <ng-container *ngIf=\"ctx.type == 'enum'\">\r\n {{ (ctx.value | est_lookup : ctx.definition.PropertySource).description }}\r\n </ng-container>\r\n <ng-container *ngIf=\"ctx.type != 'enum'\">\r\n {{ctx.value}}\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #customCells let-item let-opt=\"templateOptions\">\r\n <ng-container *ngIf=\"UseCustomCells && !EmptyRowTds\">\r\n <!-- Cella che aggrega tutte le colonne che devono essere pinnate -->\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; trackBy: IDTrackBy\">\r\n <ng-container *ngIf=\"rowItem.Pinned\">\r\n <ng-container *ngTemplateOutlet=\"customTd; context: { $implicit: { item: item, rowItem : rowItem, i:i, Pinned: true } };\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </td>\r\n\r\n <!-- Eventuali operazioni custom nelle prime righe... hanno senso solo in modalit\u00E0 dinamica ma non si sa mai -->\r\n <ng-container *ngTemplateOutlet=\"customOperations; context: {$implicit: item };\"></ng-container>\r\n\r\n <!-- Body effettivo della riga -->\r\n <ng-container *ngFor=\"let rowItem of RowTDs[item._hash]; let i = index; trackBy: IDTrackBy\">\r\n <ng-container *ngIf=\"!rowItem.Pinned\">\r\n <ng-container *ngTemplateOutlet=\"customTd; context: {$implicit: {item: item, rowItem : rowItem, i:i, Pinned: false} };\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n </ng-container>\r\n</ng-template>\r\n\r\n<!-- Blocco di operazioni custom da far apparire all'inizio della tabella -->\r\n<ng-template #customOperations let-item>\r\n <ng-container *ngFor=\"let operation of DynamicOperations; let first = first; let last = last; trackBy: idTrackBy\">\r\n <ng-container *ngIf=\"!operation.conditionField || ((item.properties ? item.properties[operation.conditionField] : item[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 ? item.properties[operation.conditionField] : item[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-template>\r\n\r\n<!-- Cella customizzata, elemento grafico base per la tabella -->\r\n<ng-template #customTd let-ctx>\r\n <!-----------------------------------------------------------------------------------------------------------------------\r\n - ATTENZIONE: Gli spazi fra le propriet\u00E0 di questo mega td sono significativi e dividono la dichiarazione in sezioni: -\r\n - . Generiche -\r\n - . Gestione allineamento e colori per la modalit\u00E0 report -\r\n - . Gestioni grafiche particolari per il Pinned -\r\n - . Gestione della selezione a singola cella in assenza di pinned -\r\n - . Gestione click classico -\r\n ------------------------------------------------------------------------------------------------------------------------->\r\n\r\n <!-- class=\"{{ UserDefinedDynamicCols ? ctx.rowItem.Class : 'est-nowrap'}} est-default-row-height\" -->\r\n\r\n <td *ngIf=\"ctx.rowItem?.Visible\" \r\n es-td=\"{{ctx.rowItem.Property || ctx.rowItem.ID}}\"\r\n id=\"estd_{{ctx.rowItem.Property || ctx.rowItem.ID}}_{{ctx.item._ordinal}}_{{ctx.i}}\" \r\n class=\"{{ ctx.rowItem.Class }} est-default-row-height\" \r\n [Context]=\"ctx.item._hash\" \r\n [class.est-no-selection]=\"Editable && ctx.rowItem.PropertyName\" \r\n [class.est-rg-hdr]=\"ctx.rowItem.GroupHeader\" \r\n [class.est-rg-agg]=\"ctx.rowItem.GroupAggregation\"\r\n [class.est-nowrap]=\"Hierarchy || !ctx.rowItem.Wraps\"\r\n \r\n [style.text-align]=\" (!ctx.Pinned && ctx.rowItem.Alignment) ? ctx.rowItem.Alignment : null\"\r\n [style.color]=\"(!ctx.Pinned && ctx.item.forecolors && ctx.rowItem.PropAccessor) ? ctx.item.forecolors[ctx.rowItem.PropAccessor] : null\"\r\n [style.background-color]=\"(!ctx.Pinned && ctx.item.backcolors && ctx.rowItem.PropAccessor) ? ctx.item.backcolors[ctx.rowItem.PropAccessor] : null\"\r\n\r\n [style.width.px]=\"ctx.Pinned ? ctx.rowItem.PinnedWidth : null\"\r\n [class.est-no-border]=\"ctx.Pinned\"\r\n\r\n [class.est-ltab-border]=\"ctx.rowItem.LeftBorder && !selectionStatus[ctx.item._ordinal][ctx.i]?.lborder\" \r\n [class.est-rtab-border]=\"ctx.rowItem.RightBorder && !selectionStatus[ctx.item._ordinal][ctx.i]?.rborder\" \r\n\r\n [class.est-selected-cell]=\"selectionStatus[ctx.item._ordinal][ctx.i]?.selected\"\r\n [class.est-cell-lborder]=\"selectionStatus[ctx.item._ordinal][ctx.i]?.lborder\"\r\n [class.est-cell-rborder]=\"selectionStatus[ctx.item._ordinal][ctx.i]?.rborder\"\r\n [class.est-cell-tborder]=\"selectionStatus[ctx.item._ordinal][ctx.i]?.tborder\"\r\n [class.est-cell-bborder]=\"selectionStatus[ctx.item._ordinal][ctx.i]?.bborder\"\r\n\r\n [class.est-cell-lborder-tmp]=\"!ctx.rowItem.LeftBorder && !selectionStatus[ctx.item._ordinal][ctx.i]?.lborder && !selectionStatus[ctx.item._ordinal][ctx.i]?.loverlaps\"\r\n [class.est-cell-rborder-tmp]=\"!ctx.rowItem.RightBorder && !selectionStatus[ctx.item._ordinal][ctx.i]?.rborder && !selectionStatus[ctx.item._ordinal][ctx.i]?.roverlaps\"\r\n [class.est-cell-tborder-tmp]=\"!selectionStatus[ctx.item._ordinal][ctx.i]?.tborder && !selectionStatus[ctx.item._ordinal][ctx.i]?.toverlaps\"\r\n [class.est-cell-bborder-tmp]=\"!selectionStatus[ctx.item._ordinal][ctx.i]?.bborder && !selectionStatus[ctx.item._ordinal][ctx.i]?.boverlaps\"\r\n\r\n (mousedown)=\"mousedown($event, ctx.rowItem, ctx.item)\" \r\n (mouseenter)=\"mouseenter($event)\" \r\n (mouseup)=\"mouseup($event)\"\r\n (onCellGeneration)=\"registerCell($event)\"\r\n \r\n (click)=\"dbClickEditOrSingleClickRowSelection($event, ctx.rowItem, ctx.item)\">\r\n\r\n <div [class.est-edit-hidden]=\"ctx.rowItem._editing\" [class.est-pre]=\"!(Hierarchy && ctx.i == 0)\">\r\n\r\n <ng-container #DEBUG>\r\n <!-- Debug box in caso la roba che viene scritta nelle celle non torni. Scirvere qui i propri binding per controllare cose -->\r\n </ng-container>\r\n\r\n <!-- 90% Template disponibile, quindi derivante da *td, controllo giusto che non sia un field particolare multi -->\r\n <ng-container *ngIf=\"ctx.rowItem.Template\">\r\n <ng-container *ngIf=\"!ctx.rowItem.Multi\"><ng-container *ngTemplateOutlet=\"ctx.rowItem.Template; context: { $implicit: ctx.item }\"></ng-container></ng-container>\r\n <span *ngIf=\"ctx.rowItem.Multi\"><ng-container *ngTemplateOutlet=\"ctx.rowItem.Template; context: { $implicit: (ctx.item[ctx.rowItem.MultiProp] ? ctx.item[ctx.rowItem.MultiProp][ctx.rowItem.MultiIndex] : {}) }\"></ng-container></span>\r\n </ng-container>\r\n \r\n <!-- 8%\r\n Template non disponibile, pu\u00F2 venire da \r\n RoutePath in caso sia un link di una tabella dinamica\r\n PropAccessor in caso di ReportRow (quindi oggetti con \"values\" dentro), \r\n o Renderer se modalit\u00E0 dinamica/standard (in qual caso il renderer \u00E8 il default)\r\n -->\r\n <ng-container *ngIf=\"!ctx.rowItem.Template && !ctx.rowItem.Multi && !ctx.rowItem.Content\">\r\n <a *ngIf=\"ctx.rowItem.RoutePath\" [routerLink]=\"ctx.item | est_routerlink : ctx.rowItem.RoutePath : ctx.rowItem.RouteParameterProperties\" class=\"est-link\" [innerHTML]=\"ctx.item.properties ? ctx.item.properties[ctx.rowItem.PropertyName] : ctx.item[ctx.rowItem.PropertyName]\"></a>\r\n \r\n <span *ngIf=\"ctx.rowItem.PropAccessor\">\r\n {{(ctx.item.values? ctx.item.values[ctx.rowItem.PropAccessor] : ctx.item[ctx.rowItem.PropAccessor]) | est_format: ctx.rowItem.Format }}\r\n </span>\r\n\r\n <ng-container *ngIf=\"!ctx.rowItem.PropAccessor && !ctx.rowItem.RoutePath\">\r\n <ng-container *ngTemplateOutlet=\"ctx.rowItem.PropertyName | est_renderer: { name: ctx.rowItem.RendererName, src: EsTdsDirective, fallback: defaultEsTd }; context: { $implicit: { definition: ctx.rowItem, value: ctx.item.properties ? ctx.item.properties[ctx.rowItem.PropertyName] : ctx.item[ctx.rowItem.PropertyName], type: ctx.rowItem.PropertyType} }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- 1% Se in modalit\u00E0 gerarchica metto il td per navigare la gerarchia -->\r\n <ng-container *ngIf=\"Hierarchy && ctx.i == 0\"><ng-container *ngTemplateOutlet=\"HierarchyNavigator; context: { $implicit: ctx.item }\"></ng-container></ng-container>\r\n\r\n <!-- 1% Content programmatico per le casistiche di Row Grouping ecc... -->\r\n <ng-container *ngIf=\"ctx.rowItem.Content\">\r\n {{ctx.rowItem.Content}}\r\n </ng-container>\r\n </div>\r\n\r\n <div *ngIf=\"ctx.rowItem._editing\" class=\"est-mt-min-5\">\r\n <ng-container *ngTemplateOutlet=\"ctx.rowItem.PropertyName | est_editor: { name: ctx.rowItem.EditorName, src: EsTdEditorDirectives, fallback: defaultEditor}; context: { $implicit: { definition: ctx.rowItem, columnIndex: ctx.i, item: ctx.item, finalizer: finalizeUserEdit.bind(this, ctx.rowItem, ctx.item, ctx.i) } }\"></ng-container>\r\n </div>\r\n </td>\r\n</ng-template>\r\n\r\n<!-- Navigatore della gerarchia di una view gerarchica, con tasto per espandere e collassare -->\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<!-- 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><span><em>{{'No operations available' | localize : lc}}...</em></span></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; trackBy: idTrackBy\" \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; trackBy: idTrackBy\">\r\n <ng-container *ngIf=\"parent.tmpl\"><ng-container *ngTemplateOutlet=\"parent.tmpl\"></ng-container></ng-container>\r\n <ng-container *ngIf=\"parent.content\">{{parent.content}}</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; context: { $implicit: item.multi ? item.multiContent : null }\"></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>",
5597
+ 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-default-row-height{height:31px}.est-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.est-edit-hidden{height:1px!important}.est-edit-hidden,.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-full-height{height:100%}.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:-webkit-sticky;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:-webkit-sticky;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:-webkit-sticky;position:sticky;z-index:0;background-color:#fff}.est-sticky-last-column-alt{right:-1px;position:-webkit-sticky;position:sticky;z-index:0;background-color:#f2f2f2}.est-ltab-border{border-left:1px solid #bbb!important}.est-rtab-border{border-right:1px solid #bbb!important}.est-cell-group-padding{padding:calc(.3rem + 1px);position:absolute;top:0;left:0;height:100%;width:100%}.est-selected-cell{background-color:rgba(33,150,243,.2)}.est-cell-lborder{border-left:1.02px solid #2196f3!important}.est-cell-tborder{border-top:1.02px solid #2196f3!important}.est-cell-rborder{border-right:1.02px solid #2196f3!important}.est-cell-bborder{border-bottom:1.02px solid #2196f3!important}.est-cell-lborder-tmp{border-left:1.02px solid transparent!important}.est-cell-tborder-tmp{border-top:1.02px solid transparent!important}.est-cell-rborder-tmp{border-right:1.02px solid transparent!important}.est-cell-bborder-tmp{border-bottom:1.02px solid transparent!important}.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)}.est-pre{white-space:pre}.est val-datetime .mat-form-field-appearance-outline .mat-form-field-infix input{margin-bottom:3px!important;min-width:130px!important}.est .mat-form-field-flex{height:29px!important;padding:0!important}.est .mat-form-field-flex .mat-form-field-outline{color:#00f}.est .mat-form-field-flex .mat-form-field-outline .mat-form-field-outline-start{border-left:none;border-top:none;border-radius:0}.est .mat-form-field-flex .mat-form-field-outline .mat-form-field-outline-end{border-top:none;border-radius:0;border-right:none}.est .mat-form-field-wrapper{height:20px;min-height:20px!important;margin-top:0!important}.est .mat-form-field-infix{width:100%!important;min-width:50px!important}.est .mat-form-field-infix select.mat-input-element{margin-top:-5px!important}.est .mat-datepicker-input{margin-bottom:3px!important}.est input{height:20px;padding-top:0!important}"]
5475
5598
  },] }
5476
5599
  ];
5477
5600
  EsTableComponent.ctorParameters = function () { return [
@@ -5487,7 +5610,8 @@
5487
5610
  { type: i1.DateService },
5488
5611
  { type: i1.MessageService },
5489
5612
  { type: CopyPasteDetector },
5490
- { type: i1.ClipboardService }
5613
+ { type: i1.ClipboardService },
5614
+ { type: Logger }
5491
5615
  ]; };
5492
5616
  EsTableComponent.propDecorators = {
5493
5617
  EsTdEditorDirectives: [{ type: i0.ContentChildren, args: [EsTdEditorDirective,] }],
@@ -5506,7 +5630,6 @@
5506
5630
  Height: [{ type: i0.Input }],
5507
5631
  EmptySpaceBackgroundColor: [{ type: i0.Input }],
5508
5632
  EsTableHandledSearch: [{ type: i0.Input }],
5509
- UseCustomCells: [{ type: i0.Input }],
5510
5633
  MaxHeight: [{ type: i0.Input }],
5511
5634
  ContainerClass: [{ type: i0.Input }],
5512
5635
  XLSXExport: [{ type: i0.Input }],
@@ -5738,7 +5861,7 @@
5738
5861
  EsTh.decorators = [
5739
5862
  { type: i0.Component, args: [{
5740
5863
  selector: "[es-th]",
5741
- template: "<span (click)=\"setupNextOrderAndNotify()\" [class.app-no-selection]=\"!!ID && Orderable\" [class.app-pointer]=\"!!ID && Orderable\">\r\n <span #content>\r\n <ng-container *ngIf=\"Template\">\r\n <ng-container *ngTemplateOutlet=\"Template\"></ng-container>\r\n </ng-container>\r\n <ng-content *ngIf=\"!Template\"></ng-content>\r\n </span>&nbsp;\r\n <span class=\"fa\" [class.fa-chevron-down]=\"Order == 'DESC'\" [class.fa-chevron-up]=\"Order == 'ASC'\"></span>\r\n</span>\r\n<span *ngIf=\"Pinned && !Fixed\" class=\"app-pointer fa fa-thumb-tack est-quick-unpin\" (click)=\"unpin()\"></span>\r\n<div [hidden]=\"!Resizable || Fixed || Pinned\" class=\"est-head-resizer\" (mousedown)=\"onResizeStart($event)\">\r\n <div class=\"est-head-resizer-internal\"></div>\r\n</div>",
5864
+ template: "<span (click)=\"setupNextOrderAndNotify()\" [class.app-no-selection]=\"!!ID && Orderable\" [class.app-pointer]=\"!!ID && Orderable\">\r\n <span #content>\r\n <ng-container *ngIf=\"!!Template\">\r\n <ng-container *ngTemplateOutlet=\"Template\"></ng-container>\r\n </ng-container>\r\n <ng-content *ngIf=\"!Template\"></ng-content>\r\n </span>&nbsp;\r\n <span class=\"fa\" [class.fa-chevron-down]=\"Order == 'DESC'\" [class.fa-chevron-up]=\"Order == 'ASC'\"></span>\r\n</span>\r\n<span *ngIf=\"Pinned && !Fixed\" class=\"app-pointer fa fa-thumb-tack est-quick-unpin\" (click)=\"unpin()\"></span>\r\n<div [hidden]=\"!Resizable || Fixed || Pinned\" class=\"est-head-resizer\" (mousedown)=\"onResizeStart($event)\">\r\n <div class=\"est-head-resizer-internal\"></div>\r\n</div>",
5742
5865
  changeDetection: i0.ChangeDetectionStrategy.OnPush
5743
5866
  },] }
5744
5867
  ];
@@ -5766,63 +5889,26 @@
5766
5889
  onMouseMove: [{ type: i0.HostListener, args: ['window:mousemove.out-zone', ['$event'],] }]
5767
5890
  };
5768
5891
 
5769
- //Angular
5892
+ // Angular
5770
5893
  /** Componente rappresentante una singola cella del body della tabella */
5771
5894
  var EsTd = /** @class */ (function () {
5772
5895
  /** @ignore */
5773
- function EsTd(cdr, myself, renderer, sanitizer) {
5896
+ function EsTd(cdr) {
5774
5897
  this.cdr = cdr;
5775
- this.myself = myself;
5776
- this.renderer = renderer;
5777
- this.sanitizer = sanitizer;
5778
5898
  /** Id della cella, dev'essere lo stesso della colonna **EsTh** relativa */
5779
5899
  this.ID = "";
5780
- /** Valore da mostrare all'interno della cella. Se omesso verrà proiettato il contenuto dal template in cui è stata usata */
5781
- this.Display = null;
5782
- /** Template Angular da istanziare per questo TD */
5783
- this.Template = null;
5784
5900
  /** Quando questa cella viene generata questo evento permette di dire "ehi, sono nato!" */
5785
5901
  this.onCellGeneration = new i0.EventEmitter();
5786
- // Ema commenta grazie
5902
+ /** Errore attualmente presente sulla cella */
5787
5903
  this.ValidationError = "";
5788
5904
  }
5789
- Object.defineProperty(EsTd.prototype, "Visible", {
5790
- /**
5791
- * Restituisce lo stato di Visibilità della cella in oggetto
5792
- *
5793
- * @returns {boolean} **true** se visibile, **false** altrimenti
5794
- */
5795
- get: function () {
5796
- if (this._Visible == undefined)
5797
- this._Visible = true;
5798
- return this._Visible;
5799
- },
5800
- /**
5801
- * Imposta la visibilità o meno della cella, si traduce nell'applicazione o rimozione della classe **app-display-none**
5802
- *
5803
- * @param {boolean} expression Indicazione della visibilità
5804
- */
5805
- set: function (expression) {
5806
- this._Visible = expression;
5807
- if (expression)
5808
- this.renderer.removeClass(this.myself.nativeElement, "app-display-none");
5809
- else
5810
- this.renderer.addClass(this.myself.nativeElement, "app-display-none");
5811
- },
5812
- enumerable: false,
5813
- configurable: true
5814
- });
5815
5905
  /** @ignore */
5816
5906
  EsTd.prototype.ngAfterViewInit = function () {
5817
5907
  this.onCellGeneration.emit({ id: this.ID, hash: this.Context, self: this });
5818
- // Se è Internal significa che è gestita internamente da ES-TABLE quindi evito di fare sti due passaggi di lettura del DOM
5819
- if (this.Internal)
5820
- return;
5821
- this.Content = this.Display === null || this.Display === "" ? this.sanitizer.bypassSecurityTrustHtml(this.myself.nativeElement.innerHTML) : this.sanitizer.bypassSecurityTrustHtml(this.Display);
5822
- this.Class = this.myself.nativeElement.className.replace("app-display-none", "");
5823
5908
  };
5824
- EsTd.prototype.validationError = function (isError, error) {
5825
- this.ValidationError = isError ? error : "";
5909
+ /** Api per impostare un "errore" su questa cella in maniera programmatica */
5910
+ EsTd.prototype.validationError = function (error) {
5911
+ this.ValidationError = error;
5826
5912
  this.cdr.markForCheck();
5827
5913
  };
5828
5914
  return EsTd;
@@ -5836,20 +5922,12 @@
5836
5922
  },] }
5837
5923
  ];
5838
5924
  EsTd.ctorParameters = function () { return [
5839
- { type: i0.ChangeDetectorRef },
5840
- { type: i0.ElementRef },
5841
- { type: i0.Renderer2 },
5842
- { type: platformBrowser.DomSanitizer }
5925
+ { type: i0.ChangeDetectorRef }
5843
5926
  ]; };
5844
5927
  EsTd.propDecorators = {
5845
5928
  ID: [{ type: i0.Input, args: ['es-td',] }],
5846
- Internal: [{ type: i0.Input }],
5847
- RouterLink: [{ type: i0.Input }],
5848
- Display: [{ type: i0.Input }],
5849
- Template: [{ type: i0.Input }],
5850
5929
  Context: [{ type: i0.Input }],
5851
- onCellGeneration: [{ type: i0.Output }],
5852
- Visible: [{ type: i0.Input }]
5930
+ onCellGeneration: [{ type: i0.Output }]
5853
5931
  };
5854
5932
 
5855
5933
  // Angular
@@ -5911,6 +5989,146 @@
5911
5989
  { type: i0.Pipe, args: [{ name: 'est_lookup' },] }
5912
5990
  ];
5913
5991
 
5992
+ var EstRouterLinkPipe = /** @class */ (function () {
5993
+ function EstRouterLinkPipe() {
5994
+ /** Cache per i routerLink generati nelle tabelle dinamiche */
5995
+ this.routerLinksCache = {};
5996
+ }
5997
+ EstRouterLinkPipe.prototype.transform = function (item, path, parameters) {
5998
+ if (this.routerLinksCache[item._hash + path]) {
5999
+ return this.routerLinksCache[item._hash + path];
6000
+ }
6001
+ else {
6002
+ var link = this.getRouterLink(path, parameters, item);
6003
+ this.routerLinksCache[item._hash + path] = link;
6004
+ return link;
6005
+ }
6006
+ };
6007
+ /**
6008
+ * Crea un router link
6009
+ *
6010
+ * @param {string} path Path su cui navigare con eventuali parametri riferiti all'oggetto cotnestuale come {0}, {1}, ecc...
6011
+ * @param {string[]} pars Lista posizionale delle proprietà a cui bindare i riferimenti del parametro **path**
6012
+ * Es. Il valore dela proprietà all'indice 0 di questo array verrà sostituita al valore {0} del parametro **path**
6013
+ * @param {any} item Oggetto collegato a questo contesto. Può essere un oggetto generico (con "properties") o un oggetto ben definito
6014
+ *
6015
+ * @returns {any} Router link generato in base al parametri
6016
+ */
6017
+ EstRouterLinkPipe.prototype.getRouterLink = function (path, pars, item) {
6018
+ for (var i = 0; i < pars.length; i++)
6019
+ path = path.replace('{' + i + '}', item.properties ? item.properties[pars[i]] : item[pars[i]]);
6020
+ path = path.replace(/'/g, '"').replace(/ /g, '');
6021
+ return JSON.parse(path);
6022
+ };
6023
+ return EstRouterLinkPipe;
6024
+ }());
6025
+ EstRouterLinkPipe.decorators = [
6026
+ { type: i0.Pipe, args: [{ name: 'est_routerlink' },] }
6027
+ ];
6028
+
6029
+ // Angular
6030
+ var EstRendererPipe = /** @class */ (function () {
6031
+ function EstRendererPipe(logger) {
6032
+ this.logger = logger;
6033
+ }
6034
+ EstRendererPipe.prototype.transform = function (propName, params) {
6035
+ var EsTd = null;
6036
+ // Perf. Version di `params.src.find((item) => params.name ? item.td === params.name : item.tdForProperty === propName);`
6037
+ for (var i = 0; i < params.src.length; i++) {
6038
+ var item = params.src.get(i);
6039
+ if (params.name && item.td === params.name ||
6040
+ !params.name && item.tdForProperty === propName) {
6041
+ EsTd = item;
6042
+ break;
6043
+ }
6044
+ }
6045
+ // Name non trovato, fallback al nome della colonna
6046
+ if (propName && params.name && !EsTd) {
6047
+ this.logger.log("Renderer retrieved in a non performant way");
6048
+ EsTd = params.src.find(function (item) { return item.tdForProperty === propName; });
6049
+ }
6050
+ this.logger.log("Renderer " + (EsTd ? 'found' : 'NOT found') + " for '" + propName + (params.name ? '/' + params.name : '') + "'" + (!EsTd ? '. Using fallback renderer' : ''));
6051
+ var ret = EsTd ? EsTd.Template : params.fallback;
6052
+ return ret;
6053
+ };
6054
+ return EstRendererPipe;
6055
+ }());
6056
+ EstRendererPipe.decorators = [
6057
+ { type: i0.Pipe, args: [{ name: 'est_renderer' },] }
6058
+ ];
6059
+ EstRendererPipe.ctorParameters = function () { return [
6060
+ { type: Logger }
6061
+ ]; };
6062
+
6063
+ // Angular
6064
+ var EstEditorPipe = /** @class */ (function () {
6065
+ function EstEditorPipe(logger) {
6066
+ this.logger = logger;
6067
+ }
6068
+ EstEditorPipe.prototype.transform = function (propName, params) {
6069
+ var Editor = null;
6070
+ // Perf. Version di `params.src.find((item) => params.name ? item.editor === params.name : item.editorForProperty === propName);`
6071
+ for (var i = 0; i < params.src.length; i++) {
6072
+ var item = params.src.get(i);
6073
+ if (params.name && item.editor === params.name ||
6074
+ !params.name && item.editorForProperty === propName) {
6075
+ Editor = item;
6076
+ break;
6077
+ }
6078
+ }
6079
+ // Name non trovato, fallback al nome della colonna
6080
+ if (propName && params.name && !Editor) {
6081
+ this.logger.log("Editor retrieved in a non performant way");
6082
+ Editor = params.src.find(function (item) { return item.editorForProperty === propName; });
6083
+ }
6084
+ this.logger.log("Editor " + (Editor ? 'found' : 'NOT found') + " for '" + propName + (params.name ? '/' + params.name : '') + "'" + (!Editor ? '. Using fallback editor' : ''));
6085
+ var ret = Editor ? Editor.Template : params.fallback;
6086
+ return ret;
6087
+ };
6088
+ return EstEditorPipe;
6089
+ }());
6090
+ EstEditorPipe.decorators = [
6091
+ { type: i0.Pipe, args: [{ name: 'est_editor' },] }
6092
+ ];
6093
+ EstEditorPipe.ctorParameters = function () { return [
6094
+ { type: Logger }
6095
+ ]; };
6096
+
6097
+ var MODULES = [
6098
+ common.CommonModule,
6099
+ forms.FormsModule,
6100
+ router.RouterModule,
6101
+ localizations.LocalizationModule,
6102
+ modal.ModalModule,
6103
+ dropdown.BsDropdownModule,
6104
+ ngxContextmenu.ContextMenuModule,
6105
+ select.MatSelectModule,
6106
+ input.MatInputModule,
6107
+ tooltip.MatTooltipModule,
6108
+ dragDrop.DragDropModule,
6109
+ formsAndValidations.FormsAndValidationsModule
6110
+ ];
6111
+ var PUBLIC_ELEMENTS = [
6112
+ // Direttive
6113
+ EsTdDirective,
6114
+ EsThDirective,
6115
+ EsTdEditorDirective,
6116
+ // Componenti
6117
+ EsTableComponent,
6118
+ TablePagerComponent,
6119
+ EsTableTemplate
6120
+ ];
6121
+ var PRIVATE_ELEMENTS = [
6122
+ // Componenti
6123
+ EsTh,
6124
+ EsTd,
6125
+ // Pipes
6126
+ EstFormatPipe,
6127
+ EstLookupPipe,
6128
+ EstRouterLinkPipe,
6129
+ EstRendererPipe,
6130
+ EstEditorPipe
6131
+ ];
5914
6132
  var EsTableModule = /** @class */ (function () {
5915
6133
  function EsTableModule() {
5916
6134
  }
@@ -5918,7 +6136,6 @@
5918
6136
  return {
5919
6137
  ngModule: EsTableModule,
5920
6138
  providers: [
5921
- CopyPasteDetector,
5922
6139
  { provide: EST_LOCALE, useValue: (config === null || config === void 0 ? void 0 : config.locale) || 'it-IT' },
5923
6140
  { provide: EST_DEBUG, useValue: (config === null || config === void 0 ? void 0 : config.debugMode) || false },
5924
6141
  { provide: EST_DEFAULTS, useValue: (config === null || config === void 0 ? void 0 : config.defaults) || null },
@@ -5929,23 +6146,10 @@
5929
6146
  }());
5930
6147
  EsTableModule.decorators = [
5931
6148
  { type: i0.NgModule, args: [{
5932
- imports: [
5933
- common.CommonModule,
5934
- forms.FormsModule,
5935
- router.RouterModule,
5936
- localizations.LocalizationModule,
5937
- modal.ModalModule,
5938
- dropdown.BsDropdownModule,
5939
- ngxContextmenu.ContextMenuModule,
5940
- select.MatSelectModule,
5941
- input.MatInputModule,
5942
- tooltip.MatTooltipModule,
5943
- dragDrop.DragDropModule,
5944
- formsAndValidations.FormsAndValidationsModule
5945
- ],
5946
- declarations: [EsTh, EsTd, EsTableComponent, EsTdDirective, EsThDirective, EsTdEditorDirective, TablePagerComponent, EsTableTemplate, EstFormatPipe, EstLookupPipe],
6149
+ imports: [MODULES],
6150
+ declarations: __spread(PUBLIC_ELEMENTS, PRIVATE_ELEMENTS),
5947
6151
  providers: [i1.UtilityService, i1.ExportService, i1.HashingService, i1.MessageService],
5948
- exports: [EsTableComponent, EsTdDirective, EsThDirective, EsTdEditorDirective, TablePagerComponent, EsTableTemplate]
6152
+ exports: __spread(PUBLIC_ELEMENTS)
5949
6153
  },] }
5950
6154
  ];
5951
6155
 
@@ -6085,10 +6289,14 @@
6085
6289
  exports.ɵe = EsTableLoc;
6086
6290
  exports.ɵf = UtilitiesHandler;
6087
6291
  exports.ɵg = CopyPasteDetector;
6088
- exports.ɵh = EsTh;
6089
- exports.ɵi = EsTd;
6090
- exports.ɵj = EstFormatPipe;
6091
- exports.ɵk = EstLookupPipe;
6292
+ exports.ɵh = Logger;
6293
+ exports.ɵi = EsTh;
6294
+ exports.ɵj = EsTd;
6295
+ exports.ɵk = EstFormatPipe;
6296
+ exports.ɵl = EstLookupPipe;
6297
+ exports.ɵm = EstRouterLinkPipe;
6298
+ exports.ɵn = EstRendererPipe;
6299
+ exports.ɵo = EstEditorPipe;
6092
6300
 
6093
6301
  Object.defineProperty(exports, '__esModule', { value: true });
6094
6302