@esfaenza/es-table 11.2.121 → 11.2.123-beta1

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 (41) hide show
  1. package/bundles/esfaenza-es-table.umd.js +443 -235
  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 +126 -49
  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/ExportHandler.js +2 -2
  19. package/esm2015/lib/core/handlers/SelectionHandler.js +46 -50
  20. package/esm2015/lib/core/handlers/UtilitiesHandler.js +2 -5
  21. package/esm2015/lib/directives/es_th.directive.js +9 -2
  22. package/esm2015/lib/domain/externals/EsTableColumnsDefinition.js +7 -4
  23. package/esm2015/lib/domain/externals/ItemPropEditableReference.js +1 -1
  24. package/esm2015/lib/domain/internals/EsTableColumn.js +2 -2
  25. package/esm2015/lib/es-table.module.js +42 -19
  26. package/fesm2015/esfaenza-es-table.js +422 -223
  27. package/fesm2015/esfaenza-es-table.js.map +1 -1
  28. package/lib/components/es-table/es_table.component.d.ts +28 -8
  29. package/lib/components/es-td/es_td.component.d.ts +6 -34
  30. package/lib/components/pipes/est-renderer.pipe.d.ts +12 -0
  31. package/lib/components/pipes/est-routerlink.pipe.d.ts +17 -0
  32. package/lib/components/pipes/est_editor.pipe.d.ts +12 -0
  33. package/lib/core/Logger.d.ts +7 -0
  34. package/lib/core/handlers/DynamicModeHandler.d.ts +11 -23
  35. package/lib/core/handlers/SelectionHandler.d.ts +16 -3
  36. package/lib/core/handlers/UtilitiesHandler.d.ts +4 -1
  37. package/lib/directives/es_th.directive.d.ts +25 -0
  38. package/lib/domain/externals/EsTableColumnsDefinition.d.ts +5 -9
  39. package/lib/domain/externals/ItemPropEditableReference.d.ts +4 -0
  40. package/lib/domain/internals/EsTableColumn.d.ts +3 -1
  41. package/package.json +2 -2
@@ -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.
@@ -667,6 +667,8 @@
667
667
  this.thType = null;
668
668
  /** Sorgente dei valori disponibili per questa cella se il **Type** è di tipo 'enum' */
669
669
  this.thSource = null;
670
+ /** Opzioni da applicare all'editor di questa colonna */
671
+ this.thEditorOptions = {};
670
672
  }
671
673
  return EsThDirective;
672
674
  }());
@@ -701,7 +703,12 @@
701
703
  thStaticContent: [{ type: i0.Input }],
702
704
  thBackgroundColor: [{ type: i0.Input }],
703
705
  thAlignment: [{ type: i0.Input }],
704
- thFormat: [{ type: i0.Input }]
706
+ thFormat: [{ type: i0.Input }],
707
+ thEditorName: [{ type: i0.Input }],
708
+ thEditorOptions: [{ type: i0.Input }],
709
+ thRendererName: [{ type: i0.Input }],
710
+ thRoutePath: [{ type: i0.Input }],
711
+ thRouteParameterProperties: [{ type: i0.Input }]
705
712
  };
706
713
 
707
714
  /** Direttiva che rappresenta il template dell'editor di una cella all'interno della tabella */
@@ -920,7 +927,7 @@
920
927
  ExportHandler.prototype.setupExport = function (items) {
921
928
  var drcd = this.est.DynamicRowColumnsDefinition;
922
929
  this.est.headers = drcd && drcd.length > 0 ?
923
- this.expExts.setupForGenericExport(items, drcd.map(function (t) { return { label: t.Description, key: t.PropertyName, order: t.ColumnOrder, type: 'string' }; })) :
930
+ this.expExts.setupForGenericExport(items, drcd.map(function (t) { return { label: t.Description, key: t.PropertyName, propKey: t.PropertyName, order: t.ColumnOrder, type: 'string' }; })) :
924
931
  this.expExts.setupForExport(items, this.est.ExportOnlyVisibleColumns ? this.est.ColumnsList.filter(function (t) { return t.visible; }).map(function (t) { return t.id; }) : null);
925
932
  this.est.data = items;
926
933
  };
@@ -957,7 +964,7 @@
957
964
  * @param {boolean} pinned Indica se è una colonna pinnata
958
965
  * @param {number} pinnedWidth Indica la dimensione da assegnare a questa colonna quando è pinnata
959
966
  * @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**)
967
+ * @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
968
  * @param {boolean} multi Indica che la colonna deriva da una direttiva **Multi**
962
969
  * @param {string} multiContent Indica il contenuto della direttiva **Multi** per questa colonna
963
970
  */
@@ -1436,7 +1443,7 @@
1436
1443
  return;
1437
1444
  /****** STEP 1: Creo l'output dei raggruppamenti per header in modo da non dovermi preoccupare di celle non inizializzate ******/
1438
1445
  var expandedGroups = [];
1439
- var visibleUnpinnedLeafs = infos.leafs.filter(function (t) { return t.thVisible && !t.thPinned; });
1446
+ var visibleUnpinnedLeafs = infos.leafs.filter(function (t) { return t.thVisible && t.thIf && !t.thPinned; });
1440
1447
  for (var l = 0; l < infos.groupingLevel; l++) {
1441
1448
  expandedGroups.push([]);
1442
1449
  for (var i = 0; i < visibleUnpinnedLeafs.length; i++)
@@ -1446,7 +1453,7 @@
1446
1453
  var orderedLeafs = [];
1447
1454
  for (var i = 0; i < this.est.OrderDirectives.length; i++) {
1448
1455
  var leaf = infos.thsCache[this.est.OrderDirectives[i]];
1449
- if (leaf.thVisible && !leaf.thPinned)
1456
+ if (leaf.thVisible && leaf.thIf && !leaf.thPinned)
1450
1457
  orderedLeafs.push(leaf);
1451
1458
  }
1452
1459
  /****** STEP 3: Creo l'array group con tutti i riferimenti del caso ******/
@@ -1470,7 +1477,7 @@
1470
1477
  }
1471
1478
  }
1472
1479
  }
1473
- /****** STEP 4: Compatto nell'elemento finale su cui bindarmi ******/
1480
+ /****** STEP 4: Compatto nell'elemento finale su cui bindarmi. L'ID assegnato è SOLO per ottimizzare gli ngFor ******/
1474
1481
  currentParent = "";
1475
1482
  var currentSpan = 0;
1476
1483
  var finalHeaders = [];
@@ -1478,25 +1485,25 @@
1478
1485
  var levelArray = [];
1479
1486
  finalHeaders.push(levelArray);
1480
1487
  if (this.est.Selection || this.est.HasPinnedColumns)
1481
- levelArray.push({ Span: 1, Template: null, Pinned: this.est.HasPinnedColumns });
1488
+ levelArray.push({ ID: "_base_sel_pinned", Span: 1, Template: null, Pinned: this.est.HasPinnedColumns });
1482
1489
  for (var h = 0; h < expandedGroups[l].length; h++) {
1483
1490
  var item = expandedGroups[l][h];
1484
1491
  if (item == currentParent)
1485
1492
  currentSpan++;
1486
1493
  else {
1487
1494
  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 });
1495
+ 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
1496
  currentSpan = 1;
1490
1497
  currentParent = item;
1491
1498
  }
1492
1499
  }
1493
1500
  // 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 });
1501
+ 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
1502
  // Aggiungo i pezzettini per la rimozione e gli export, se presenti
1496
1503
  if (this.est.Removal)
1497
- levelArray.push({ Span: 1, Template: null });
1504
+ levelArray.push({ ID: "_base_removal", Span: 1, Template: null });
1498
1505
  if (this.est.Export || this.est.HiddenColumns || this.est.ColumnsOrdering || this.est.CornerMenuOptions)
1499
- levelArray.push({ Span: 1, Template: null });
1506
+ levelArray.push({ ID: "_base_extra_opts", Span: 1, Template: null });
1500
1507
  currentSpan = 0;
1501
1508
  currentParent = "";
1502
1509
  }
@@ -1532,9 +1539,9 @@
1532
1539
  if (parent) {
1533
1540
  th = thsCache[parent];
1534
1541
  if (!th.thEmpty && !th._multi_content)
1535
- parentsPrepend.unshift({ tmpl: th.Template });
1542
+ parentsPrepend.unshift({ id: th.th, tmpl: th.Template });
1536
1543
  else if (!th.thEmpty && th._multi_content)
1537
- parentsPrepend.unshift({ content: th._multi_content });
1544
+ parentsPrepend.unshift({ id: th.th, content: th._multi_content });
1538
1545
  jumps++;
1539
1546
  }
1540
1547
  } while (parent);
@@ -1599,7 +1606,9 @@
1599
1606
  var newContext = [];
1600
1607
  this_3.est.OrderDirectives.forEach(function (o) {
1601
1608
  var contextItem = context.filter(function (t) { return t.ID == o; })[0];
1602
- newContext.push(contextItem);
1609
+ // potrebbe esser undefined nel caso ci fossero colonne sotto thIf
1610
+ if (contextItem)
1611
+ newContext.push(contextItem);
1603
1612
  });
1604
1613
  this_3.est.TMPRowTDs[this_3.est.RowContexts[i]] = newContext;
1605
1614
  };
@@ -1824,7 +1833,7 @@
1824
1833
  * @param {string} EditorName Nome dell'editor da utilizzare per la modifica di questo campo
1825
1834
  * @param {string} RendererName Nome del renderer da utilizzare per visualizzare questo campo
1826
1835
  */
1827
- function EsTableColumnsDefinition(Description, PropertyName, RoutePath, RouteParameterProperties, DataOrder, ColumnOrder, Visible, Clss, Orderable, HeaderWraps, PropertyType, PropertySource, EditorName, RendererName, EditorOptions) {
1836
+ function EsTableColumnsDefinition(Description, PropertyName, RoutePath, RouteParameterProperties, DataOrder, ColumnOrder, Visible, Clss, Orderable, HeaderWraps, PropertyType, PropertySource, EditorName, RendererName, EditorOptions, Pinned, PinnedWidth, Pinnable, Grouping) {
1828
1837
  if (RoutePath === void 0) { RoutePath = null; }
1829
1838
  if (RouteParameterProperties === void 0) { RouteParameterProperties = null; }
1830
1839
  if (DataOrder === void 0) { DataOrder = null; }
@@ -1838,6 +1847,10 @@
1838
1847
  if (EditorName === void 0) { EditorName = ""; }
1839
1848
  if (RendererName === void 0) { RendererName = ""; }
1840
1849
  if (EditorOptions === void 0) { EditorOptions = {}; }
1850
+ if (Pinned === void 0) { Pinned = false; }
1851
+ if (PinnedWidth === void 0) { PinnedWidth = 150; }
1852
+ if (Pinnable === void 0) { Pinnable = true; }
1853
+ if (Grouping === void 0) { Grouping = ""; }
1841
1854
  this.Description = Description;
1842
1855
  this.PropertyName = PropertyName;
1843
1856
  this.RoutePath = RoutePath;
@@ -1853,10 +1866,13 @@
1853
1866
  this.EditorName = EditorName;
1854
1867
  this.RendererName = RendererName;
1855
1868
  this.EditorOptions = EditorOptions;
1856
- this.edits = {};
1869
+ this.Pinned = Pinned;
1870
+ this.PinnedWidth = PinnedWidth;
1871
+ this.Pinnable = Pinnable;
1872
+ this.Grouping = Grouping;
1857
1873
  }
1858
1874
  EsTableColumnsDefinition.build = function (parsObj) {
1859
- 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);
1875
+ 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);
1860
1876
  };
1861
1877
  return EsTableColumnsDefinition;
1862
1878
  }());
@@ -1867,42 +1883,6 @@
1867
1883
  function DynamicModeHandler(est) {
1868
1884
  this.est = est;
1869
1885
  }
1870
- /**
1871
- * Metodo di supporto alla creazione di un router link parametrizzato all'oggetto corrente utilizzato nella modalità dinamica
1872
- *
1873
- * @param {string} path Path su cui navigare con eventuali parametri riferiti all'oggetto cotnestuale come {0}, {1}, ecc...
1874
- * @param {string[]} parameterProps Lista posizionale delle proprietà a cui bindare i riferimenti del parametro **path**
1875
- * Es. Il valore dela proprietà all'indice 0 di questo array verrà sostituita al valore {0} del parametro **path**
1876
- * @param {GenericItem} item Oggetto generico collegato a questo contesto
1877
- *
1878
- * @returns {any} Router link generato in base al parametri
1879
- */
1880
- DynamicModeHandler.prototype.generateRouterLink = function (path, parameterProps, item) {
1881
- if (this.est.DynamicTableRouterLinkCache[item._hash + path]) {
1882
- return this.est.DynamicTableRouterLinkCache[item._hash + path];
1883
- }
1884
- else {
1885
- var link = this.getRouterLink(path, parameterProps, item);
1886
- this.est.DynamicTableRouterLinkCache[item._hash + path] = link;
1887
- return link;
1888
- }
1889
- };
1890
- /**
1891
- * Crea un router link
1892
- *
1893
- * @param {string} path Path su cui navigare con eventuali parametri riferiti all'oggetto cotnestuale come {0}, {1}, ecc...
1894
- * @param {string[]} pars Lista posizionale delle proprietà a cui bindare i riferimenti del parametro **path**
1895
- * Es. Il valore dela proprietà all'indice 0 di questo array verrà sostituita al valore {0} del parametro **path**
1896
- * @param {GenericItem} item Oggetto generico collegato a questo contesto
1897
- *
1898
- * @returns {any} Router link generato in base al parametri
1899
- */
1900
- DynamicModeHandler.prototype.getRouterLink = function (path, pars, item) {
1901
- for (var i = 0; i < pars.length; i++)
1902
- path = path.replace('{' + i + '}', item.properties[pars[i]]);
1903
- path = path.replace(/'/g, '"').replace(/ /g, '');
1904
- return JSON.parse(path);
1905
- };
1906
1886
  /** Se non ho l'Input **DynamicRowColumnsDefinition** in modalità dinamica lo riempio con il default nome della colonna = testo della colonna */
1907
1887
  DynamicModeHandler.prototype.eventuallyReviewDynamicColumns = function () {
1908
1888
  // Senza oggetti esco
@@ -1921,6 +1901,61 @@
1921
1901
  else
1922
1902
  this.est.UserDefinedDynamicCols = true;
1923
1903
  };
1904
+ /** Genera partendo dalle **DynamicRowColumnsDefinition** la lista di **EsThDirective** e **EsTdDirective** che servono per la tabella */
1905
+ DynamicModeHandler.prototype.emitThsAndTdsBasedOnDynamicDefinition = function () {
1906
+ // Senza dynamic columns esco
1907
+ if (!this.est.DynamicRowColumnsDefinition || this.est.DynamicRowColumnsDefinition.length == 0)
1908
+ return null;
1909
+ var ths = [];
1910
+ var tds = [];
1911
+ for (var i = 0; i < this.est.DynamicRowColumnsDefinition.length; i++) {
1912
+ var col = this.est.DynamicRowColumnsDefinition[i];
1913
+ ths.push(this.getTh(col));
1914
+ tds.push(this.getTd(col));
1915
+ }
1916
+ return { ths: ths, tds: tds };
1917
+ };
1918
+ /** @ignore Helper */
1919
+ DynamicModeHandler.prototype.getTh = function (col) {
1920
+ var ret = new EsThDirective(null);
1921
+ ret.th = col.PropertyName;
1922
+ ret.thPinned = col.Pinned;
1923
+ ret.thPinnable = col.Pinnable;
1924
+ ret.thPinnedWidth = col.PinnedWidth;
1925
+ ret.thVisible = col.Visible;
1926
+ ret.thOrder = col.DataOrder;
1927
+ ret.thOrderable = col.Orderable;
1928
+ ret.thWrap = col.HeaderWraps;
1929
+ ret.thClass = col.Clss;
1930
+ ret.thProperty = col.PropertyName;
1931
+ ret.thType = col.PropertyType;
1932
+ ret.thSource = col.PropertySource;
1933
+ ret.thEditorName = col.EditorName;
1934
+ ret.thEditorOptions = col.EditorOptions;
1935
+ ret.thRendererName = col.RendererName;
1936
+ ret.thRoutePath = col.RoutePath;
1937
+ ret.thRouteParameterProperties = col.RouteParameterProperties;
1938
+ //ret.thFixed = col.Fixed;
1939
+ //ret.thResizable = col.Resizable;
1940
+ //ret.thGroupClass = col.GroupClass;
1941
+ //ret.thGroup = col.Group;
1942
+ //ret.thAggregation = col.Aggregation;
1943
+ //ret.thMulti = col.Multi;
1944
+ //ret.thStaticContent = col.StaticContent;
1945
+ //ret.thBackgroundColor = col.BackgroundColor;
1946
+ //ret.thAlignment = col.Alignment;
1947
+ //ret.thFormat = col.Format;
1948
+ return ret;
1949
+ };
1950
+ /** @ignore Helper */
1951
+ DynamicModeHandler.prototype.getTd = function (col) {
1952
+ var ret = new EsTdDirective(null);
1953
+ ret.td = col.PropertyName;
1954
+ ret.tdClass = col.Clss;
1955
+ //ret.tdAlignment = col.Alignment;
1956
+ //ret.tdFormat = col.Format;
1957
+ return ret;
1958
+ };
1924
1959
  return DynamicModeHandler;
1925
1960
  }());
1926
1961
 
@@ -3567,65 +3602,61 @@
3567
3602
  * @param {{ row: number, column: number }} firstSelectionOverride Permette di overridare il primo elemento selezionato
3568
3603
  */
3569
3604
  SelectionHandler.prototype.singleCellSelection = function (event, row, column, firstSelectionOverride) {
3605
+ // Recupero la selezione precedente se presente come punto di partenza
3570
3606
  var first = firstSelectionOverride || this.lastSingleSelection;
3607
+ //Il punto di arrivo, che diventerà il prossimo punto di partenza, è la selezione corrente
3608
+ this.lastSingleSelection = { row: row, column: column };
3571
3609
  this.clearTextSelection(event);
3572
- // Nella selezione a range chissene frega se c'è o meno lo shift, si ragiona sempre a range
3573
- if (event.shiftKey && first) {
3574
- this.clearSelectionStatus({ row: row, column: column });
3575
- var rowAddition = row < first.row ? -1 : +1;
3576
- var columnAddition = column < first.column ? -1 : +1;
3577
- for (var ir = first.row; ir != row + rowAddition; ir += rowAddition) {
3578
- var firstRow = ir == first.row;
3579
- var lastRow = ir == row;
3580
- for (var ic = first.column; ic != column + columnAddition; ic += columnAddition) {
3581
- var firstCol = ic == first.column;
3582
- var lastCol = ic == column;
3583
- this.est.selectionStatus[ir][ic].selected = true;
3584
- this.est.selectionStatus[ir][ic].lborder = columnAddition > 0 ? firstCol : lastCol;
3585
- if (ic > 0)
3586
- this.est.selectionStatus[ir][ic - 1].roverlaps = this.est.selectionStatus[ir][ic].lborder;
3587
- this.est.selectionStatus[ir][ic].tborder = rowAddition > 0 ? firstRow : lastRow;
3588
- this.est.selectionStatus[ir][ic].rborder = columnAddition > 0 ? lastCol : firstCol;
3589
- if (this.est.selectionStatus[ir][ic + 1])
3590
- this.est.selectionStatus[ir][ic + 1].loverlaps = this.est.selectionStatus[ir][ic].rborder;
3591
- this.est.selectionStatus[ir][ic].bborder = rowAddition > 0 ? lastRow : firstRow;
3592
- }
3593
- }
3594
- this.lastSingleSelection = { row: row, column: column };
3595
- }
3596
- else {
3597
- // Ripulisco escludendo l'oggetto attuale che eventualmente ci penso io a deseezionare
3598
- this.clearSelectionStatus({ row: row, column: column });
3599
- var item = this.est.selectionStatus[row][column];
3600
- item.selected = !item.selected;
3601
- item.lborder = item.selected;
3602
- if (column > 0)
3603
- this.est.selectionStatus[row][column - 1].roverlaps = item.lborder;
3604
- item.tborder = item.selected;
3605
- item.rborder = item.selected;
3606
- if (this.est.selectionStatus[row][column + 1])
3607
- this.est.selectionStatus[row][column + 1].loverlaps = item.rborder;
3608
- item.bborder = item.selected;
3609
- this.lastSingleSelection = { row: row, column: column };
3610
- }
3610
+ this.clearSelectionStatusExcluding(this.lastSingleSelection);
3611
+ this.setSelectionStatusBorders(event.range && first ? first : this.lastSingleSelection, this.lastSingleSelection);
3611
3612
  // Ora che non è attaccato direttamente all'html devo fare un markforcheck finite le operazioni sui grouping
3612
3613
  this.est.cdr.markForCheck();
3613
3614
  };
3615
+ SelectionHandler.prototype.setSelectionStatusBorders = function (from, to) {
3616
+ var rowAddition = to.row < from.row ? -1 : +1;
3617
+ var columnAddition = to.column < from.column ? -1 : +1;
3618
+ var singleItem = from == to;
3619
+ for (var ir = from.row; ir != to.row + rowAddition; ir += rowAddition) {
3620
+ var firstRow = ir == from.row;
3621
+ var lastRow = ir == to.row;
3622
+ for (var ic = from.column; ic != to.column + columnAddition; ic += columnAddition) {
3623
+ var firstCol = ic == from.column;
3624
+ var lastCol = ic == to.column;
3625
+ var current = this.est.selectionStatus[ir][ic];
3626
+ var prevColumn = ic > 0 ? this.est.selectionStatus[ir][ic - 1] : null;
3627
+ var nextcolumn = this.est.selectionStatus[ir][ic + 1];
3628
+ var prevRow = ir > 0 ? this.est.selectionStatus[ir - 1][ic] : null;
3629
+ var nextRow = this.est.selectionStatus[ir + 1] ? this.est.selectionStatus[ir + 1][ic] : null;
3630
+ current.selected = singleItem ? !current.selected : true;
3631
+ current.lborder = !current.selected ? false : columnAddition > 0 ? firstCol : lastCol;
3632
+ current.tborder = !current.selected ? false : rowAddition > 0 ? firstRow : lastRow;
3633
+ current.rborder = !current.selected ? false : columnAddition > 0 ? lastCol : firstCol;
3634
+ current.bborder = !current.selected ? false : rowAddition > 0 ? lastRow : firstRow;
3635
+ if (prevRow)
3636
+ prevRow.boverlaps = current.tborder;
3637
+ if (nextRow)
3638
+ nextRow.toverlaps = current.bborder;
3639
+ if (prevColumn)
3640
+ prevColumn.roverlaps = current.lborder;
3641
+ if (nextcolumn)
3642
+ nextcolumn.loverlaps = current.rborder;
3643
+ }
3644
+ }
3645
+ };
3614
3646
  /**
3615
3647
  * Helper per ripulire lo stato di selezione delle singole celle della tabella, ad esclusione di una singola coordinata
3616
3648
  *
3617
3649
  * @param {{row: number, column: number}} exclusion Coordinata da escludere nella pulizia
3618
3650
  */
3619
- SelectionHandler.prototype.clearSelectionStatus = function (exclusion) {
3651
+ SelectionHandler.prototype.clearSelectionStatusExcluding = function (exclusion) {
3620
3652
  for (var row in this.est.selectionStatus) {
3621
3653
  for (var column in this.est.selectionStatus[row]) {
3622
- if (!exclusion || (exclusion && (row != exclusion.row.toString() || column != exclusion.column.toString()))) {
3623
- this.est.selectionStatus[row][column].selected = false;
3624
- this.est.selectionStatus[row][column].lborder = false;
3625
- this.est.selectionStatus[row][column].tborder = false;
3626
- this.est.selectionStatus[row][column].rborder = false;
3627
- this.est.selectionStatus[row][column].bborder = false;
3628
- }
3654
+ // Se è l'elemento che ho escluso dal cleanup, skippo
3655
+ if (exclusion && row == exclusion.row.toString() && column == exclusion.column.toString())
3656
+ continue;
3657
+ // Altrimenti pulisco
3658
+ var curr = this.est.selectionStatus[row][column];
3659
+ curr.selected = curr.lborder = curr.rborder = curr.tborder = curr.bborder = curr.loverlaps = curr.roverlaps = curr.toverlaps = curr.boverlaps = false;
3629
3660
  }
3630
3661
  }
3631
3662
  };
@@ -3655,10 +3686,10 @@
3655
3686
  */
3656
3687
  SelectionHandler.prototype.clearTextSelection = function (event) {
3657
3688
  // Seleziono del testo ma non ho shift premuto -> ignoro la selezione
3658
- if ((event.view.getSelection().type == 'Range' || event.view.getSelection().toString().length > 0) && !event.shiftKey)
3689
+ if ((event.view.getSelection().type == 'Range' || event.view.getSelection().toString().length > 0) && !event.range)
3659
3690
  return false;
3660
3691
  // Seleziono del testo e ho shift premuto -> annullo la selezione del testo
3661
- if ((event.view.getSelection().type == 'Range' || event.view.getSelection().toString().length > 0) && event.shiftKey)
3692
+ if ((event.view.getSelection().type == 'Range' || event.view.getSelection().toString().length > 0) && event.range)
3662
3693
  this.est.utiExts.clearTextSelection();
3663
3694
  };
3664
3695
  /**
@@ -3807,10 +3838,7 @@
3807
3838
  for (var i = min; i <= max; i++)
3808
3839
  if (i !== 1)
3809
3840
  result.push({ val: i, cssClass: (i === page ? 'btn-main app-white-text' : 'app-white-button') });
3810
- result.push({
3811
- val: lastPage,
3812
- cssClass: (lastPage === page ? 'btn-main app-white-text' : 'app-white-button')
3813
- });
3841
+ result.push({ val: lastPage, cssClass: (lastPage === page ? 'btn-main app-white-text' : 'app-white-button') });
3814
3842
  }
3815
3843
  return result;
3816
3844
  };
@@ -3888,15 +3916,36 @@
3888
3916
  }
3889
3917
  return CopyPasteDetector;
3890
3918
  }());
3919
+ CopyPasteDetector.ɵprov = i0.ɵɵdefineInjectable({ factory: function CopyPasteDetector_Factory() { return new CopyPasteDetector(); }, token: CopyPasteDetector, providedIn: "root" });
3891
3920
  CopyPasteDetector.decorators = [
3892
- { type: i0.Injectable }
3921
+ { type: i0.Injectable, args: [{ providedIn: "root" },] }
3893
3922
  ];
3894
3923
  CopyPasteDetector.ctorParameters = function () { return []; };
3895
3924
 
3925
+ /** Classe che fornisce dei metodi di estensione in grado di riconoscere e dispatchare l'evento copia e incolla lanciato su una pagina web */
3926
+ var Logger = /** @class */ (function () {
3927
+ /** @ignore */
3928
+ function Logger(debugMode) {
3929
+ this.debugMode = debugMode;
3930
+ }
3931
+ Logger.prototype.log = function (text) {
3932
+ if (this.debugMode)
3933
+ console.log("[@esfaenza/es-table @ " + (new Date()).toISOString() + "] " + text);
3934
+ };
3935
+ return Logger;
3936
+ }());
3937
+ Logger.ɵprov = i0.ɵɵdefineInjectable({ factory: function Logger_Factory() { return new Logger(i0.ɵɵinject(EST_DEBUG, 8)); }, token: Logger, providedIn: "root" });
3938
+ Logger.decorators = [
3939
+ { type: i0.Injectable, args: [{ providedIn: "root" },] }
3940
+ ];
3941
+ Logger.ctorParameters = function () { return [
3942
+ { type: Boolean, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [EST_DEBUG,] }] }
3943
+ ]; };
3944
+
3896
3945
  /** Componente che permette di rappresentare una griglia di valori */
3897
3946
  var EsTableComponent = /** @class */ (function () {
3898
3947
  /** @ignore */
3899
- function EsTableComponent(ngControl, prefService, deafults, locale, lc, cdr, utilities_H, utiExts, expExts, dateExts, msgExts, copyPasteDetector, clipboardService) {
3948
+ function EsTableComponent(ngControl, prefService, deafults, locale, lc, cdr, utilities_H, utiExts, expExts, dateExts, msgExts, copyPasteDetector, clipboardService, logger) {
3900
3949
  var _this = this;
3901
3950
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
3902
3951
  this.ngControl = ngControl;
@@ -3912,6 +3961,7 @@
3912
3961
  this.msgExts = msgExts;
3913
3962
  this.copyPasteDetector = copyPasteDetector;
3914
3963
  this.clipboardService = clipboardService;
3964
+ this.logger = logger;
3915
3965
  /** Subject utilizzato internamente lato EsTable per causare il Focus lato componente di Input */
3916
3966
  this.FocusSubject = new rxjs.Subject();
3917
3967
  /** Se vengono effettuati 2 click a distanza inferiore a questi Millisecondi viene considerato un doppio click */
@@ -3997,6 +4047,10 @@
3997
4047
  this.ColumnsPinnable = null;
3998
4048
  /** Indica se dev'essere disponibile il sistema di aggiornamento automatico */
3999
4049
  this.AutoUpdate = null;
4050
+ /** Indica l'altezza cablata che deve assumere la tabella. Es: "100px" | "100%" ... */
4051
+ this.Height = null;
4052
+ /** Indica il colore di sfondo dello spazio vuoto (non ricoperto da dati). Particolarmente utile da impostare in caso di **Height** diverso da null */
4053
+ this.EmptySpaceBackgroundColor = null;
4000
4054
  /**
4001
4055
  * @experimental Indica se dev'essere l'estable a gestire la ricerca, anche la prima.
4002
4056
  *
@@ -4213,9 +4267,19 @@
4213
4267
  /** @ignore */
4214
4268
  this.propagateChange = function (_) { };
4215
4269
  /** Funzione di trackby per il body che dovrebbe evitare il 90% delle change detection */
4216
- this.bodyTrackBy = function (index, item) { return item._hash; };
4270
+ this.bodyTrackBy = function (_, item) { return item._hash; };
4271
+ /** Funzione di trackby generica per tutti gli oggetti che hanno il campo id */
4272
+ this.idTrackBy = function (_, item) { return item.id; };
4273
+ /** Funzione di trackby generica per tutti gli oggetti che hanno il campo PropertyName */
4274
+ this.PropertyNameTrackBy = function (_, item) { return item.PropertyName; };
4275
+ /** Funzione di trackby generica per tutti gli oggetti che hanno il campo ID */
4276
+ this.IDTrackBy = function (_, item) { return item.ID; };
4277
+ /** Funzione di trackby generica per tutti gli oggetti che hanno il campo ID */
4278
+ this.valTrackBy = function (_, item) { return item.val; };
4217
4279
  // Range selection Experimentals
4218
4280
  this.mouseIsDown = false;
4281
+ this.rangeSelected = false;
4282
+ this.rangeStartWasIgnored = false;
4219
4283
  this.firstCoordinates = null;
4220
4284
  //* Piango
4221
4285
  this.EsTdsCache = {};
@@ -4267,7 +4331,7 @@
4267
4331
  return;
4268
4332
  var shouldEmit = !t.item._selected;
4269
4333
  t.item._selected = true;
4270
- _this.selection_H.clearSelectionStatus();
4334
+ _this.selection_H.clearSelectionStatusExcluding(null);
4271
4335
  var itemSelection = _this.selection_H.handleItemsSelection([t.item]);
4272
4336
  _this.changed();
4273
4337
  if (shouldEmit)
@@ -4587,7 +4651,7 @@
4587
4651
  };
4588
4652
  /** 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 */
4589
4653
  EsTableComponent.prototype.internalPostBoundSource = function () {
4590
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
4654
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
4591
4655
  var View = this.View;
4592
4656
  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;
4593
4657
  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;
@@ -4595,6 +4659,7 @@
4595
4659
  var tds = tdsD && tdsD.length > 0 ? tdsD.toArray() : [];
4596
4660
  // Se non ho colonne dinamiche ma sono in modalità dinamica (lo capisco perché c'è una view piena di genericitem) metto il default delle colonne
4597
4661
  this.dynamicMode_H.eventuallyReviewDynamicColumns();
4662
+ // Gestisce la richiesta per gruppi o per singoli oggetti
4598
4663
  this.bindDisplayToLoadedItemsOrGroups(View);
4599
4664
  // Questo dev'essere per forza lanciato dopo **bindDisplayToLoadedItemsOrGroups** dato che è lì che alcune cose vengono valorizzate
4600
4665
  this.setupPagingInformations();
@@ -4605,16 +4670,24 @@
4605
4670
  var si = this.viewMode ? view.selection : this.arraymodeSelection;
4606
4671
  // N.B: Rispettare l'ordine di queste 3 macrocategorie è VITALE
4607
4672
  // ************************************* Sistemazioni di TH, TD, e visibilità varie *************************************
4673
+ // 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
4674
+ if (!this.arrayMode && ((_l = this.DynamicRowColumnsDefinition) === null || _l === void 0 ? void 0 : _l.length) > 0) {
4675
+ this.logger.log("Generating ths and tds from Dynamic definition");
4676
+ var ret_1 = this.dynamicMode_H.emitThsAndTdsBasedOnDynamicDefinition();
4677
+ ths = ret_1.ths;
4678
+ tds = ret_1.tds;
4679
+ }
4680
+ // Gestione delle view in modalità report, i th e i td vengono rigenerati dalle configurazioni della view
4681
+ if (!this.arrayMode && view.report_columns) {
4682
+ this.logger.log("Generating ths and tds from report results");
4683
+ var ret_2 = this.reportMode_H.generateThsAndTdsFromView(view);
4684
+ ths = ret_2.ths;
4685
+ tds = ret_2.tds;
4686
+ }
4608
4687
  // Espando i th e i td multipli duplicandoli
4609
4688
  var ret = this.columnMetadata_H.expandMultiThsAndTds(ths, tds, itemsAndGroups);
4610
4689
  ths = ret.expThs;
4611
4690
  tds = ret.expTds;
4612
- // Gestione delle view in modalità report, i th e i td vengono rigenerati dalle configurazioni della view
4613
- if (!this.arrayMode && view.report_columns) {
4614
- var ret_1 = this.reportMode_H.generateThsAndTdsFromView(view);
4615
- ths = ret_1.ths;
4616
- tds = ret_1.tds;
4617
- }
4618
4691
  // 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
4619
4692
  for (var i = 0; i < ths.length; i++) {
4620
4693
  var th = ths[i];
@@ -4778,6 +4851,7 @@
4778
4851
  * @param {EsTdDirective[]} tds Celle della tabella
4779
4852
  */
4780
4853
  EsTableComponent.prototype.evaluateRowTds = function (ths, tds) {
4854
+ var _a;
4781
4855
  if (tds.length == 0)
4782
4856
  return;
4783
4857
  var columnsCache = {};
@@ -4810,13 +4884,14 @@
4810
4884
  PinnedWidth: thCasted.thPinnedWidth,
4811
4885
  GroupHeader: false,
4812
4886
  GroupAggregation: false,
4813
- Visible: columnsCache[td.td].visible, Wraps: false,
4887
+ Visible: columnsCache[td.td].visible,
4888
+ Wraps: false,
4814
4889
  Class: td.tdClass,
4815
4890
  Template: thCasted.thGroup && !this.ShowItemGroupsColumns ? null : td.Template,
4816
4891
  Multi: td._multi,
4817
4892
  MultiProp: td._multi ? td.td.split('_')[0] : null,
4818
4893
  MultiIndex: td._multi ? td.td.split('_')[1] : null,
4819
- Alignment: td.tdAlignment || th.thAlignment,
4894
+ Alignment: (_a = (td.tdAlignment || th.thAlignment)) === null || _a === void 0 ? void 0 : _a.toLowerCase(),
4820
4895
  Format: td.tdFormat || th.thFormat,
4821
4896
  PropertyName: th.thProperty,
4822
4897
  PropertyType: th.thType,
@@ -4887,7 +4962,24 @@
4887
4962
  var toAdd = void 0;
4888
4963
  if (th.thIf || th.thGroup) {
4889
4964
  var thClass = (th.thClass || '') + (th.thGroup ? " est-col-min" : "");
4890
- 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 };
4965
+ toAdd = {
4966
+ Pinned: columnsListCache[th.th].pinned,
4967
+ Fixed: th.thFixed,
4968
+ PinnedWidth: th.thPinnedWidth,
4969
+ ID: th.th,
4970
+ Visible: th.thVisible,
4971
+ Class: thClass,
4972
+ Order: th.thOrder,
4973
+ Orderable: th.thOrderable,
4974
+ Template: th.Template,
4975
+ // Se non è nessun contenuto né nessun template mostro semplicemente l'ID dell'header
4976
+ Content: th.thStaticContent || th.Template ? '' : th.th,
4977
+ Wrap: th.thWrap,
4978
+ LeftBorder: th._lbord,
4979
+ RightBorder: th._rbord,
4980
+ Multi: th._multi,
4981
+ MultiContent: th._multi_content
4982
+ };
4891
4983
  this.TMPRowTHs.push(toAdd);
4892
4984
  // Se ho un modello che deve funzionare a rowgrouping ma non è ancora stata effettuata nessuna ricerca sui gruppi principali (groupingsUndefined)
4893
4985
  // li genero e mando la prima ricerca che dev'essere spedita al backend per il primo caricamento dei gruppi
@@ -4988,7 +5080,7 @@
4988
5080
  */
4989
5081
  EsTableComponent.prototype.globalCheckChanged = function (forcedVal) {
4990
5082
  if (forcedVal === void 0) { forcedVal = null; }
4991
- this.selection_H.clearSelectionStatus();
5083
+ this.selection_H.clearSelectionStatusExcluding(null);
4992
5084
  // 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
4993
5085
  var items = this.boundSource.find(function (t) { return t._group; }) ? this.boundSource.filter(function (t) { return t._group && !t._parent; }) : this.boundSource;
4994
5086
  var itemSelection = this.selection_H.handleItemsSelection(items, forcedVal, this.globalCheck);
@@ -5007,7 +5099,7 @@
5007
5099
  */
5008
5100
  EsTableComponent.prototype.handleClick = function (event, item) {
5009
5101
  this.selection_H.clearTextSelection(event);
5010
- this.selection_H.clearSelectionStatus();
5102
+ this.selection_H.clearSelectionStatusExcluding(null);
5011
5103
  var selecteditems = [];
5012
5104
  if (event.shiftKey && this.ShiftClick && !this.SingleSelection) {
5013
5105
  var startSelecting = false;
@@ -5232,25 +5324,35 @@
5232
5324
  * @param {any} $event Evento nativo javascript
5233
5325
  * @param {TdElement} rowItem Riferimento a binder della riga
5234
5326
  * @param {any} item Item che rappresenta il contesto su cui è stato effettuato un click
5235
- * @param {number} rowIndex Indice della riga
5236
5327
  */
5237
- EsTableComponent.prototype.dbClickEditOrSingleClickRowSelection = function ($event, rowItem, item, rowIndex) {
5328
+ EsTableComponent.prototype.dbClickEditOrSingleClickRowSelection = function ($event, rowItem, item) {
5238
5329
  var _this = this;
5239
- var _a, _b;
5330
+ // Prima cosa da fare è controllare se ci sono dei range lasciati da operazioni precedenti (se applicabile) e ripulirli
5331
+ if (this.rangeSelected && !$event.ctrlKey && this.Selection) {
5332
+ this.logger.log("clearing previously selected range");
5333
+ this.selection_H.clearSelectionStatusExcluding(null);
5334
+ this.rangeSelected = false;
5335
+ return;
5336
+ }
5240
5337
  // Modalità Editable, gestisco i doppi click senza però rallentare la modalità di selezione a range
5241
5338
  if (this.Editable) {
5242
5339
  // Secondo click: se il timer non è scaduto è un doppio click ed eseguo il resto
5243
5340
  if (this.cellDbClickTimer) {
5341
+ this.logger.log("handling doubleclick on editable cell: " + (rowItem.PropertyName ? 'edit mode for property ' + rowItem.PropertyName : 'no property set, fallback to simple click'));
5244
5342
  if (rowItem.PropertyName)
5245
5343
  this.setupUserEdit(rowItem, item);
5344
+ else
5345
+ this.handleRowClick($event, item, this.Selection, true);
5246
5346
  this.clearCellClickTimer();
5247
5347
  return;
5248
5348
  }
5249
5349
  // Primo click: non fa niente e se il tempo per il secondo click scade resetta tutto
5250
5350
  this.cellDbClickTimer = setTimeout(function () {
5251
5351
  _this.clearCellClickTimer();
5252
- if (!_this.RangeSelection)
5352
+ if (!_this.RangeSelection || !_this.mouseIsDown) {
5353
+ _this.logger.log("time's up for second click, handling single click");
5253
5354
  _this.handleRowClick($event, item, _this.Selection, true);
5355
+ }
5254
5356
  }, this.doubleClickBufferMs);
5255
5357
  }
5256
5358
  // In modalità a range la creazione del range è gestita dai mousedown, move ed up...
@@ -5261,8 +5363,7 @@
5261
5363
  if ($event.ctrlKey)
5262
5364
  return;
5263
5365
  // Tutti i click su una cella già in edit non devono effettuare la selezione della riga
5264
- 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)) ||
5265
- rowItem._editing)
5366
+ if (rowItem._editing)
5266
5367
  return;
5267
5368
  // Per evitare di rallentare a prescindere
5268
5369
  if (!this.Editable) {
@@ -5346,14 +5447,12 @@
5346
5447
  // Stessa cosa se ho custom cell dato che la gestione dei click viene affidata ai singoli TD
5347
5448
  if ($event.ctrlKey || (this.UseCustomCells && !internalCall))
5348
5449
  return true;
5349
- if (selection && !item.locked && !item._sep && !item._group) {
5350
- this.selection_H.clearSelectionStatus();
5450
+ if (selection)
5451
+ this.selection_H.clearSelectionStatusExcluding(null);
5452
+ if (selection && !item.locked && !item._sep && !item._group)
5351
5453
  this.handleClick($event, item);
5352
- }
5353
- else if (item._group) {
5354
- this.selection_H.clearSelectionStatus();
5454
+ else if (item._group)
5355
5455
  this.handleGroupClick(item);
5356
- }
5357
5456
  // Ora che non è attaccato direttamente all'html devo fare un markforcheck finite le operazioni sui grouping
5358
5457
  this.cdr.markForCheck();
5359
5458
  };
@@ -5375,15 +5474,11 @@
5375
5474
  EsTableComponent.prototype.setupUserEdit = function (rowItem, item) {
5376
5475
  var _this = this;
5377
5476
  var _a;
5378
- this.selection_H.clearSelectionStatus();
5477
+ this.selection_H.clearSelectionStatusExcluding(null);
5379
5478
  if (this.Editable && rowItem.PropertyName) {
5380
- if (((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0) {
5381
- rowItem.edits[item._hash] = { _editing: true, old_value: item.properties[rowItem.PropertyName] };
5382
- }
5383
- else {
5384
- rowItem._editing = true;
5385
- rowItem.old_value = item[rowItem.PropertyName];
5386
- }
5479
+ var dynMode = ((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0;
5480
+ rowItem._editing = true;
5481
+ rowItem.old_value = dynMode ? item.properties[rowItem.PropertyName] : item[rowItem.PropertyName];
5387
5482
  }
5388
5483
  this.cdr.detectChanges();
5389
5484
  setTimeout(function () { _this.FocusSubject.next(); });
@@ -5398,7 +5493,7 @@
5398
5493
  EsTableComponent.prototype.finalizeUserEdit = function (rowItem, item, columnIndex) {
5399
5494
  var _a;
5400
5495
  var dynMode = ((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0;
5401
- var rowItm = dynMode ? (rowItem.edits[item._hash]) : rowItem;
5496
+ var rowItm = rowItem;
5402
5497
  rowItm._editing = false;
5403
5498
  var old = rowItm.old_value;
5404
5499
  var niu = dynMode ? item.properties[rowItem.PropertyName] : item[rowItem.PropertyName];
@@ -5409,22 +5504,27 @@
5409
5504
  this.onModelChange.emit([new EsTableModelChange(item, rowItem.ID, rowItem.PropertyName, old, niu)]);
5410
5505
  this.selectionStatus[item._ordinal][columnIndex].val_setter(niu);
5411
5506
  };
5412
- EsTableComponent.prototype.mousedown = function (event, rowItem, item) {
5413
- var _a, _b;
5507
+ EsTableComponent.prototype.mousedown = function (event, rowItem, _) {
5414
5508
  // Tasto diverso dal click sinistro -> ciao è stato bello e intenso
5415
5509
  if (event.buttons != 1 || !this.RangeSelection)
5416
5510
  return;
5417
5511
  // Sto lavorando su QUESTA es-table
5418
5512
  this.copyPasteDetector.ActiveEstReference = this;
5419
5513
  // Tutti i click su una cella già in edit non devono effettuare la selezione della riga
5420
- 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)) ||
5421
- rowItem._editing)
5514
+ if (rowItem._editing)
5422
5515
  return;
5423
- var id = event.currentTarget.id;
5424
5516
  this.mouseIsDown = true;
5425
- var coords = id.split('_');
5426
- this.firstCoordinates = { row: parseInt(coords[coords.length - 2]), column: parseInt(coords[coords.length - 1]) };
5427
- this.selection_H.singleCellSelection({ view: event.view, shiftKey: false }, this.firstCoordinates.row, this.firstCoordinates.column);
5517
+ var coords = event.currentTarget.id.split('_');
5518
+ var row = parseInt(coords[coords.length - 2]);
5519
+ var column = parseInt(coords[coords.length - 1]);
5520
+ this.firstCoordinates = { row: row, column: column };
5521
+ // 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)
5522
+ // e gestire la grafica in maniera un po' più precisa
5523
+ if (!this.rangeSelected || (event.ctrlKey || !this.Selection))
5524
+ this.selection_H.singleCellSelection({ view: event.view, range: false }, row, column);
5525
+ else
5526
+ this.rangeStartWasIgnored = true;
5527
+ this.logger.log("mouse down on " + row + ":" + column);
5428
5528
  };
5429
5529
  EsTableComponent.prototype.mouseenter = function (event) {
5430
5530
  if (!this.RangeSelection)
@@ -5434,14 +5534,34 @@
5434
5534
  if (this.mouseIsDown && this.firstCoordinates) {
5435
5535
  var id = event.currentTarget.id;
5436
5536
  var coords = id.split('_');
5437
- var newCoords = { row: parseInt(coords[coords.length - 2]), column: parseInt(coords[coords.length - 1]) };
5438
- this.selection_H.singleCellSelection({ view: event.view, shiftKey: true }, newCoords.row, newCoords.column, this.firstCoordinates);
5537
+ var row = parseInt(coords[coords.length - 2]);
5538
+ var column = parseInt(coords[coords.length - 1]);
5539
+ // Se ho ignorato l'inizio della selezione nel mousedown lo recupero qui
5540
+ if (this.rangeStartWasIgnored) {
5541
+ this.selection_H.singleCellSelection({ view: event.view, range: false }, this.firstCoordinates.row, this.firstCoordinates.column);
5542
+ this.rangeStartWasIgnored = false;
5543
+ }
5544
+ this.selection_H.singleCellSelection({ view: event.view, range: true }, row, column, this.firstCoordinates);
5545
+ this.logger.log("mouse move over " + row + ":" + column);
5546
+ this.rangeSelected = true;
5439
5547
  }
5440
5548
  };
5441
5549
  EsTableComponent.prototype.mouseup = function (event) {
5442
5550
  if (!this.RangeSelection)
5443
5551
  return;
5552
+ var id = event.currentTarget.id;
5553
+ var coords = id.split('_');
5554
+ var row = parseInt(coords[coords.length - 2]);
5555
+ var column = parseInt(coords[coords.length - 1]);
5556
+ // Se il mouseup viene effettuato sulla stessa cella del primo mousedown e siamo in modalità di selezione deseleziono la cella perché è un semplice click
5557
+ if (this.mouseIsDown && this.firstCoordinates) {
5558
+ if (this.firstCoordinates.row == row && this.firstCoordinates.column == column && !event.ctrlKey && !this.rangeStartWasIgnored && this.Selection)
5559
+ this.selection_H.singleCellSelection({ view: event.view, range: false }, row, column);
5560
+ else if (event.ctrlKey || !this.Selection)
5561
+ this.rangeSelected = true;
5562
+ }
5444
5563
  this.mouseIsDown = false;
5564
+ this.logger.log("mouse lifted up");
5445
5565
  };
5446
5566
  EsTableComponent.prototype.getCellReference = function (object, column) {
5447
5567
  var fkThisShitImOut = this.utiExts.deepClone(object);
@@ -5462,8 +5582,8 @@
5462
5582
  viewProviders: [{ provide: localizations.LocalizationService, useClass: EsTableLoc }],
5463
5583
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
5464
5584
  encapsulation: i0.ViewEncapsulation.None,
5465
- template: "<!-- Patacchino di autoaggiornamento -->\r\n<div class=\"w-100\" *ngIf=\"AutoUpdate\">\r\n <div class=\"pull-right\">\r\n {{'Update every' | localize : lc}}&nbsp;<input [readonly]=\"autoUpdate\" maxlength=\"3\" class=\"form-control est-custom-input\" type=\"text\" [(ngModel)]=\"seconds\" />&nbsp;{{'second/s' | localize : lc}}\r\n </div>\r\n <div class=\"pull-right m-t-2\">\r\n <label class=\"est-switch\">\r\n <input type=\"checkbox\" [(ngModel)]=\"autoUpdate\" (ngModelChange)=\"autoUpdateChanged();\" />\r\n <div class=\"est-slider round\"></div>\r\n </label>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<div *ngIf=\"View\" class=\"est-relative\">\r\n <div *ngIf=\"FirstBind && ShowLoadingOnBootstrap\" class=\"est-loading-box\">\r\n <div class=\"est-loading-content\">\r\n <span class=\"fa fa-spinner fa-spin\"></span>&nbsp;{{'Performing Table bootstrap' | localize: lc}}...\r\n </div>\r\n </div>\r\n\r\n <div class=\"est-top-pager\" *ngIf=\"PagingStyle == 'both' || PagingStyle == 'top'\">\r\n <ng-container *ngTemplateOutlet=\"pagingElement\"></ng-container>\r\n </div>\r\n\r\n <div class=\"est-top-allselect\" *ngIf=\"canSelectAll || (View?.selection || arraymodeSelection)?.all\">\r\n <span>{{ (selectedObjects == -1 ? ('All the' | localize : lc) : ((selectedObjects || 0) | number : '0.0-0' : locale)) + ' ' + ((selectedObjects == 1 ? 'Object Selected' : 'Objects Selected') | localize : lc) }}</span>&nbsp;\r\n <span class=\"est-link est-inline\" (click)=\"selection_H.selectAllOrResetSelection()\">{{ (View?.selection || arraymodeSelection)?.all ? ('Reset Selection' | localize : lc) : ('Select Everything' | localize : lc)}}</span>\r\n </div>\r\n\r\n <div class=\"table-responsive datatable {{ContainerClass}}\" [style.max-height.px]=\"MaxHeight\">\r\n <table class=\"{{ TableClass }} est-margin-bottom-10 est\" [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>",
5466
- 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-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}"]
5585
+ 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>",
5586
+ 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}"]
5467
5587
  },] }
5468
5588
  ];
5469
5589
  EsTableComponent.ctorParameters = function () { return [
@@ -5479,7 +5599,8 @@
5479
5599
  { type: i1.DateService },
5480
5600
  { type: i1.MessageService },
5481
5601
  { type: CopyPasteDetector },
5482
- { type: i1.ClipboardService }
5602
+ { type: i1.ClipboardService },
5603
+ { type: Logger }
5483
5604
  ]; };
5484
5605
  EsTableComponent.propDecorators = {
5485
5606
  EsTdEditorDirectives: [{ type: i0.ContentChildren, args: [EsTdEditorDirective,] }],
@@ -5495,6 +5616,8 @@
5495
5616
  ColumnsResizable: [{ type: i0.Input }],
5496
5617
  ColumnsPinnable: [{ type: i0.Input }],
5497
5618
  AutoUpdate: [{ type: i0.Input }],
5619
+ Height: [{ type: i0.Input }],
5620
+ EmptySpaceBackgroundColor: [{ type: i0.Input }],
5498
5621
  EsTableHandledSearch: [{ type: i0.Input }],
5499
5622
  UseCustomCells: [{ type: i0.Input }],
5500
5623
  MaxHeight: [{ type: i0.Input }],
@@ -5728,7 +5851,7 @@
5728
5851
  EsTh.decorators = [
5729
5852
  { type: i0.Component, args: [{
5730
5853
  selector: "[es-th]",
5731
- 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>",
5854
+ 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>",
5732
5855
  changeDetection: i0.ChangeDetectionStrategy.OnPush
5733
5856
  },] }
5734
5857
  ];
@@ -5756,63 +5879,26 @@
5756
5879
  onMouseMove: [{ type: i0.HostListener, args: ['window:mousemove.out-zone', ['$event'],] }]
5757
5880
  };
5758
5881
 
5759
- //Angular
5882
+ // Angular
5760
5883
  /** Componente rappresentante una singola cella del body della tabella */
5761
5884
  var EsTd = /** @class */ (function () {
5762
5885
  /** @ignore */
5763
- function EsTd(cdr, myself, renderer, sanitizer) {
5886
+ function EsTd(cdr) {
5764
5887
  this.cdr = cdr;
5765
- this.myself = myself;
5766
- this.renderer = renderer;
5767
- this.sanitizer = sanitizer;
5768
5888
  /** Id della cella, dev'essere lo stesso della colonna **EsTh** relativa */
5769
5889
  this.ID = "";
5770
- /** Valore da mostrare all'interno della cella. Se omesso verrà proiettato il contenuto dal template in cui è stata usata */
5771
- this.Display = null;
5772
- /** Template Angular da istanziare per questo TD */
5773
- this.Template = null;
5774
5890
  /** Quando questa cella viene generata questo evento permette di dire "ehi, sono nato!" */
5775
5891
  this.onCellGeneration = new i0.EventEmitter();
5776
- // Ema commenta grazie
5892
+ /** Errore attualmente presente sulla cella */
5777
5893
  this.ValidationError = "";
5778
5894
  }
5779
- Object.defineProperty(EsTd.prototype, "Visible", {
5780
- /**
5781
- * Restituisce lo stato di Visibilità della cella in oggetto
5782
- *
5783
- * @returns {boolean} **true** se visibile, **false** altrimenti
5784
- */
5785
- get: function () {
5786
- if (this._Visible == undefined)
5787
- this._Visible = true;
5788
- return this._Visible;
5789
- },
5790
- /**
5791
- * Imposta la visibilità o meno della cella, si traduce nell'applicazione o rimozione della classe **app-display-none**
5792
- *
5793
- * @param {boolean} expression Indicazione della visibilità
5794
- */
5795
- set: function (expression) {
5796
- this._Visible = expression;
5797
- if (expression)
5798
- this.renderer.removeClass(this.myself.nativeElement, "app-display-none");
5799
- else
5800
- this.renderer.addClass(this.myself.nativeElement, "app-display-none");
5801
- },
5802
- enumerable: false,
5803
- configurable: true
5804
- });
5805
5895
  /** @ignore */
5806
5896
  EsTd.prototype.ngAfterViewInit = function () {
5807
5897
  this.onCellGeneration.emit({ id: this.ID, hash: this.Context, self: this });
5808
- // Se è Internal significa che è gestita internamente da ES-TABLE quindi evito di fare sti due passaggi di lettura del DOM
5809
- if (this.Internal)
5810
- return;
5811
- this.Content = this.Display === null || this.Display === "" ? this.sanitizer.bypassSecurityTrustHtml(this.myself.nativeElement.innerHTML) : this.sanitizer.bypassSecurityTrustHtml(this.Display);
5812
- this.Class = this.myself.nativeElement.className.replace("app-display-none", "");
5813
5898
  };
5814
- EsTd.prototype.validationError = function (isError, error) {
5815
- this.ValidationError = isError ? error : "";
5899
+ /** Api per impostare un "errore" su questa cella in maniera programmatica */
5900
+ EsTd.prototype.validationError = function (error) {
5901
+ this.ValidationError = error;
5816
5902
  this.cdr.markForCheck();
5817
5903
  };
5818
5904
  return EsTd;
@@ -5826,20 +5912,12 @@
5826
5912
  },] }
5827
5913
  ];
5828
5914
  EsTd.ctorParameters = function () { return [
5829
- { type: i0.ChangeDetectorRef },
5830
- { type: i0.ElementRef },
5831
- { type: i0.Renderer2 },
5832
- { type: platformBrowser.DomSanitizer }
5915
+ { type: i0.ChangeDetectorRef }
5833
5916
  ]; };
5834
5917
  EsTd.propDecorators = {
5835
5918
  ID: [{ type: i0.Input, args: ['es-td',] }],
5836
- Internal: [{ type: i0.Input }],
5837
- RouterLink: [{ type: i0.Input }],
5838
- Display: [{ type: i0.Input }],
5839
- Template: [{ type: i0.Input }],
5840
5919
  Context: [{ type: i0.Input }],
5841
- onCellGeneration: [{ type: i0.Output }],
5842
- Visible: [{ type: i0.Input }]
5920
+ onCellGeneration: [{ type: i0.Output }]
5843
5921
  };
5844
5922
 
5845
5923
  // Angular
@@ -5901,6 +5979,146 @@
5901
5979
  { type: i0.Pipe, args: [{ name: 'est_lookup' },] }
5902
5980
  ];
5903
5981
 
5982
+ var EstRouterLinkPipe = /** @class */ (function () {
5983
+ function EstRouterLinkPipe() {
5984
+ /** Cache per i routerLink generati nelle tabelle dinamiche */
5985
+ this.routerLinksCache = {};
5986
+ }
5987
+ EstRouterLinkPipe.prototype.transform = function (item, path, parameters) {
5988
+ if (this.routerLinksCache[item._hash + path]) {
5989
+ return this.routerLinksCache[item._hash + path];
5990
+ }
5991
+ else {
5992
+ var link = this.getRouterLink(path, parameters, item);
5993
+ this.routerLinksCache[item._hash + path] = link;
5994
+ return link;
5995
+ }
5996
+ };
5997
+ /**
5998
+ * Crea un router link
5999
+ *
6000
+ * @param {string} path Path su cui navigare con eventuali parametri riferiti all'oggetto cotnestuale come {0}, {1}, ecc...
6001
+ * @param {string[]} pars Lista posizionale delle proprietà a cui bindare i riferimenti del parametro **path**
6002
+ * Es. Il valore dela proprietà all'indice 0 di questo array verrà sostituita al valore {0} del parametro **path**
6003
+ * @param {any} item Oggetto collegato a questo contesto. Può essere un oggetto generico (con "properties") o un oggetto ben definito
6004
+ *
6005
+ * @returns {any} Router link generato in base al parametri
6006
+ */
6007
+ EstRouterLinkPipe.prototype.getRouterLink = function (path, pars, item) {
6008
+ for (var i = 0; i < pars.length; i++)
6009
+ path = path.replace('{' + i + '}', item.properties ? item.properties[pars[i]] : item[pars[i]]);
6010
+ path = path.replace(/'/g, '"').replace(/ /g, '');
6011
+ return JSON.parse(path);
6012
+ };
6013
+ return EstRouterLinkPipe;
6014
+ }());
6015
+ EstRouterLinkPipe.decorators = [
6016
+ { type: i0.Pipe, args: [{ name: 'est_routerlink' },] }
6017
+ ];
6018
+
6019
+ // Angular
6020
+ var EstRendererPipe = /** @class */ (function () {
6021
+ function EstRendererPipe(logger) {
6022
+ this.logger = logger;
6023
+ }
6024
+ EstRendererPipe.prototype.transform = function (propName, params) {
6025
+ var EsTd = null;
6026
+ // Perf. Version di `params.src.find((item) => params.name ? item.td === params.name : item.tdForProperty === propName);`
6027
+ for (var i = 0; i < params.src.length; i++) {
6028
+ var item = params.src.get(i);
6029
+ if (params.name && item.td === params.name ||
6030
+ !params.name && item.tdForProperty === propName) {
6031
+ EsTd = item;
6032
+ break;
6033
+ }
6034
+ }
6035
+ // Name non trovato, fallback al nome della colonna
6036
+ if (propName && params.name && !EsTd) {
6037
+ this.logger.log("Renderer retrieved in a non performant way");
6038
+ EsTd = params.src.find(function (item) { return item.tdForProperty === propName; });
6039
+ }
6040
+ this.logger.log("Renderer " + (EsTd ? 'found' : 'NOT found') + " for '" + propName + (params.name ? '/' + params.name : '') + "'" + (!EsTd ? '. Using fallback renderer' : ''));
6041
+ var ret = EsTd ? EsTd.Template : params.fallback;
6042
+ return ret;
6043
+ };
6044
+ return EstRendererPipe;
6045
+ }());
6046
+ EstRendererPipe.decorators = [
6047
+ { type: i0.Pipe, args: [{ name: 'est_renderer' },] }
6048
+ ];
6049
+ EstRendererPipe.ctorParameters = function () { return [
6050
+ { type: Logger }
6051
+ ]; };
6052
+
6053
+ // Angular
6054
+ var EstEditorPipe = /** @class */ (function () {
6055
+ function EstEditorPipe(logger) {
6056
+ this.logger = logger;
6057
+ }
6058
+ EstEditorPipe.prototype.transform = function (propName, params) {
6059
+ var Editor = null;
6060
+ // Perf. Version di `params.src.find((item) => params.name ? item.editor === params.name : item.editorForProperty === propName);`
6061
+ for (var i = 0; i < params.src.length; i++) {
6062
+ var item = params.src.get(i);
6063
+ if (params.name && item.editor === params.name ||
6064
+ !params.name && item.editorForProperty === propName) {
6065
+ Editor = item;
6066
+ break;
6067
+ }
6068
+ }
6069
+ // Name non trovato, fallback al nome della colonna
6070
+ if (propName && params.name && !Editor) {
6071
+ this.logger.log("Editor retrieved in a non performant way");
6072
+ Editor = params.src.find(function (item) { return item.editorForProperty === propName; });
6073
+ }
6074
+ this.logger.log("Editor " + (Editor ? 'found' : 'NOT found') + " for '" + propName + (params.name ? '/' + params.name : '') + "'" + (!Editor ? '. Using fallback editor' : ''));
6075
+ var ret = Editor ? Editor.Template : params.fallback;
6076
+ return ret;
6077
+ };
6078
+ return EstEditorPipe;
6079
+ }());
6080
+ EstEditorPipe.decorators = [
6081
+ { type: i0.Pipe, args: [{ name: 'est_editor' },] }
6082
+ ];
6083
+ EstEditorPipe.ctorParameters = function () { return [
6084
+ { type: Logger }
6085
+ ]; };
6086
+
6087
+ var MODULES = [
6088
+ common.CommonModule,
6089
+ forms.FormsModule,
6090
+ router.RouterModule,
6091
+ localizations.LocalizationModule,
6092
+ modal.ModalModule,
6093
+ dropdown.BsDropdownModule,
6094
+ ngxContextmenu.ContextMenuModule,
6095
+ select.MatSelectModule,
6096
+ input.MatInputModule,
6097
+ tooltip.MatTooltipModule,
6098
+ dragDrop.DragDropModule,
6099
+ formsAndValidations.FormsAndValidationsModule
6100
+ ];
6101
+ var PUBLIC_ELEMENTS = [
6102
+ // Direttive
6103
+ EsTdDirective,
6104
+ EsThDirective,
6105
+ EsTdEditorDirective,
6106
+ // Componenti
6107
+ EsTableComponent,
6108
+ TablePagerComponent,
6109
+ EsTableTemplate
6110
+ ];
6111
+ var PRIVATE_ELEMENTS = [
6112
+ // Componenti
6113
+ EsTh,
6114
+ EsTd,
6115
+ // Pipes
6116
+ EstFormatPipe,
6117
+ EstLookupPipe,
6118
+ EstRouterLinkPipe,
6119
+ EstRendererPipe,
6120
+ EstEditorPipe
6121
+ ];
5904
6122
  var EsTableModule = /** @class */ (function () {
5905
6123
  function EsTableModule() {
5906
6124
  }
@@ -5908,7 +6126,6 @@
5908
6126
  return {
5909
6127
  ngModule: EsTableModule,
5910
6128
  providers: [
5911
- CopyPasteDetector,
5912
6129
  { provide: EST_LOCALE, useValue: (config === null || config === void 0 ? void 0 : config.locale) || 'it-IT' },
5913
6130
  { provide: EST_DEBUG, useValue: (config === null || config === void 0 ? void 0 : config.debugMode) || false },
5914
6131
  { provide: EST_DEFAULTS, useValue: (config === null || config === void 0 ? void 0 : config.defaults) || null },
@@ -5919,23 +6136,10 @@
5919
6136
  }());
5920
6137
  EsTableModule.decorators = [
5921
6138
  { type: i0.NgModule, args: [{
5922
- imports: [
5923
- common.CommonModule,
5924
- forms.FormsModule,
5925
- router.RouterModule,
5926
- localizations.LocalizationModule,
5927
- modal.ModalModule,
5928
- dropdown.BsDropdownModule,
5929
- ngxContextmenu.ContextMenuModule,
5930
- select.MatSelectModule,
5931
- input.MatInputModule,
5932
- tooltip.MatTooltipModule,
5933
- dragDrop.DragDropModule,
5934
- formsAndValidations.FormsAndValidationsModule
5935
- ],
5936
- declarations: [EsTh, EsTd, EsTableComponent, EsTdDirective, EsThDirective, EsTdEditorDirective, TablePagerComponent, EsTableTemplate, EstFormatPipe, EstLookupPipe],
6139
+ imports: [MODULES],
6140
+ declarations: __spread(PUBLIC_ELEMENTS, PRIVATE_ELEMENTS),
5937
6141
  providers: [i1.UtilityService, i1.ExportService, i1.HashingService, i1.MessageService],
5938
- exports: [EsTableComponent, EsTdDirective, EsThDirective, EsTdEditorDirective, TablePagerComponent, EsTableTemplate]
6142
+ exports: __spread(PUBLIC_ELEMENTS)
5939
6143
  },] }
5940
6144
  ];
5941
6145
 
@@ -6075,10 +6279,14 @@
6075
6279
  exports.ɵe = EsTableLoc;
6076
6280
  exports.ɵf = UtilitiesHandler;
6077
6281
  exports.ɵg = CopyPasteDetector;
6078
- exports.ɵh = EsTh;
6079
- exports.ɵi = EsTd;
6080
- exports.ɵj = EstFormatPipe;
6081
- exports.ɵk = EstLookupPipe;
6282
+ exports.ɵh = Logger;
6283
+ exports.ɵi = EsTh;
6284
+ exports.ɵj = EsTd;
6285
+ exports.ɵk = EstFormatPipe;
6286
+ exports.ɵl = EstLookupPipe;
6287
+ exports.ɵm = EstRouterLinkPipe;
6288
+ exports.ɵn = EstRendererPipe;
6289
+ exports.ɵo = EstEditorPipe;
6082
6290
 
6083
6291
  Object.defineProperty(exports, '__esModule', { value: true });
6084
6292