@esfaenza/es-table 11.2.21 → 11.2.22-beta4

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 (111) hide show
  1. package/bundles/esfaenza-es-table.umd.js +2262 -562
  2. package/bundles/esfaenza-es-table.umd.js.map +1 -1
  3. package/bundles/esfaenza-es-table.umd.min.js +2 -2
  4. package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
  5. package/esfaenza-es-table.d.ts +5 -5
  6. package/esfaenza-es-table.metadata.json +1 -1
  7. package/esm2015/esfaenza-es-table.js +6 -6
  8. package/esm2015/lib/directives/es_td.directive.js +2 -4
  9. package/esm2015/lib/directives/es_th.directive.js +23 -7
  10. package/esm2015/lib/domain/externals/classes/CornerMenuOption.js +4 -0
  11. package/esm2015/lib/domain/externals/classes/EsTableColumnsDefinition.js +31 -0
  12. package/esm2015/lib/domain/externals/classes/EsTableOperationDefinition.js +22 -0
  13. package/esm2015/lib/domain/externals/classes/appsearch/AppOrdering.js +16 -0
  14. package/esm2015/lib/domain/externals/classes/appsearch/AppSearch.js +35 -0
  15. package/esm2015/lib/domain/externals/classes/appsearch/GenericItem.js +11 -0
  16. package/esm2015/lib/domain/externals/classes/appsearch/Group.js +17 -0
  17. package/esm2015/lib/domain/externals/classes/appsearch/GroupAggregation.js +16 -0
  18. package/esm2015/lib/domain/externals/classes/appsearch/GroupFilter.js +14 -0
  19. package/esm2015/lib/domain/externals/classes/appsearch/GroupOrAggregation.js +16 -0
  20. package/esm2015/lib/domain/externals/classes/appsearch/ItemsSelection.js +23 -0
  21. package/esm2015/lib/domain/externals/classes/report/ReportColumn.js +4 -0
  22. package/esm2015/lib/domain/externals/classes/report/ReportDefinition.js +4 -0
  23. package/esm2015/lib/domain/externals/classes/report/ReportOrder.js +4 -0
  24. package/esm2015/lib/domain/externals/classes/report/ReportParam.js +4 -0
  25. package/esm2015/lib/domain/externals/classes/report/ReportResult.js +4 -0
  26. package/esm2015/lib/domain/externals/classes/report/ReportRow.js +4 -0
  27. package/esm2015/lib/domain/externals/index.js +18 -0
  28. package/esm2015/lib/domain/index.js +3 -16
  29. package/esm2015/lib/domain/internals/classes/CacheTriptic.js +16 -0
  30. package/esm2015/lib/domain/internals/classes/EsTableColumn.js +24 -0
  31. package/esm2015/lib/domain/internals/classes/GroupPager.js +21 -0
  32. package/esm2015/lib/domain/internals/classes/GroupRouteFragment.js +17 -0
  33. package/esm2015/lib/domain/internals/classes/ThAggregation.js +16 -0
  34. package/esm2015/lib/domain/internals/index.js +6 -0
  35. package/esm2015/lib/es-table.module.js +9 -4
  36. package/esm2015/lib/es_table.component.js +1829 -343
  37. package/esm2015/lib/es_table.component.loc.js +6 -7
  38. package/esm2015/lib/es_td.component.js +28 -43
  39. package/esm2015/lib/es_th.component.js +16 -44
  40. package/esm2015/lib/models/EsTableDefaultable.js +4 -0
  41. package/esm2015/lib/models/EsTableModuleConfig.js +2 -4
  42. package/esm2015/lib/pager/table_pager.component.js +48 -26
  43. package/esm2015/lib/pager/table_pager.component.loc.js +5 -7
  44. package/esm2015/lib/tokens.js +6 -4
  45. package/esm2015/public-api.js +3 -2
  46. package/fesm2015/esfaenza-es-table.js +2145 -553
  47. package/fesm2015/esfaenza-es-table.js.map +1 -1
  48. package/lib/directives/es_td.directive.d.ts +1 -3
  49. package/lib/directives/es_th.directive.d.ts +18 -5
  50. package/lib/domain/externals/classes/CornerMenuOption.d.ts +7 -0
  51. package/lib/domain/{classes → externals/classes}/EsTableColumnsDefinition.d.ts +5 -7
  52. package/lib/domain/{classes → externals/classes}/EsTableOperationDefinition.d.ts +1 -3
  53. package/lib/domain/{classes → externals/classes/appsearch}/AppOrdering.d.ts +0 -0
  54. package/lib/domain/externals/classes/appsearch/AppSearch.d.ts +67 -0
  55. package/lib/domain/externals/classes/appsearch/GenericItem.d.ts +13 -0
  56. package/lib/domain/externals/classes/appsearch/Group.d.ts +17 -0
  57. package/lib/domain/externals/classes/appsearch/GroupAggregation.d.ts +14 -0
  58. package/lib/domain/externals/classes/appsearch/GroupFilter.d.ts +12 -0
  59. package/lib/domain/externals/classes/appsearch/GroupOrAggregation.d.ts +14 -0
  60. package/lib/domain/externals/classes/appsearch/ItemsSelection.d.ts +22 -0
  61. package/lib/domain/externals/classes/report/ReportColumn.d.ts +15 -0
  62. package/lib/domain/externals/classes/report/ReportDefinition.d.ts +24 -0
  63. package/lib/domain/externals/classes/report/ReportOrder.d.ts +7 -0
  64. package/lib/domain/externals/classes/report/ReportParam.d.ts +40 -0
  65. package/lib/domain/externals/classes/report/ReportResult.d.ts +12 -0
  66. package/lib/domain/externals/classes/report/ReportRow.d.ts +5 -0
  67. package/lib/domain/externals/index.d.ts +17 -0
  68. package/lib/domain/index.d.ts +2 -15
  69. package/lib/domain/internals/classes/CacheTriptic.d.ts +14 -0
  70. package/lib/domain/{classes → internals/classes}/EsTableColumn.d.ts +6 -4
  71. package/lib/domain/internals/classes/GroupPager.d.ts +22 -0
  72. package/lib/domain/internals/classes/GroupRouteFragment.d.ts +15 -0
  73. package/lib/domain/internals/classes/ThAggregation.d.ts +14 -0
  74. package/lib/domain/internals/index.d.ts +5 -0
  75. package/lib/es_table.component.d.ts +456 -62
  76. package/lib/es_table.component.loc.d.ts +2 -6
  77. package/lib/es_td.component.d.ts +14 -36
  78. package/lib/es_th.component.d.ts +21 -61
  79. package/lib/models/EsTableDefaultable.d.ts +19 -0
  80. package/lib/models/EsTableModuleConfig.d.ts +8 -7
  81. package/lib/pager/table_pager.component.d.ts +27 -30
  82. package/lib/pager/table_pager.component.loc.d.ts +2 -6
  83. package/lib/tokens.d.ts +6 -3
  84. package/package.json +2 -1
  85. package/public-api.d.ts +2 -1
  86. package/esm2015/lib/domain/classes/AppOrdering.js +0 -16
  87. package/esm2015/lib/domain/classes/AppSearch.js +0 -35
  88. package/esm2015/lib/domain/classes/CornerMenuOption.js +0 -6
  89. package/esm2015/lib/domain/classes/EsTableColumn.js +0 -22
  90. package/esm2015/lib/domain/classes/EsTableColumnsDefinition.js +0 -31
  91. package/esm2015/lib/domain/classes/EsTableOperationDefinition.js +0 -24
  92. package/esm2015/lib/domain/classes/GenericItem.js +0 -15
  93. package/esm2015/lib/domain/classes/IAppSearch.js +0 -2
  94. package/esm2015/lib/domain/classes/ItemsSelection.js +0 -25
  95. package/esm2015/lib/domain/classes/ReportColumn.js +0 -6
  96. package/esm2015/lib/domain/classes/ReportDefinition.js +0 -6
  97. package/esm2015/lib/domain/classes/ReportOrder.js +0 -6
  98. package/esm2015/lib/domain/classes/ReportParam.js +0 -6
  99. package/esm2015/lib/domain/classes/ReportResult.js +0 -6
  100. package/esm2015/lib/domain/classes/ReportRow.js +0 -6
  101. package/lib/domain/classes/AppSearch.d.ts +0 -76
  102. package/lib/domain/classes/CornerMenuOption.d.ts +0 -13
  103. package/lib/domain/classes/GenericItem.d.ts +0 -25
  104. package/lib/domain/classes/IAppSearch.d.ts +0 -67
  105. package/lib/domain/classes/ItemsSelection.d.ts +0 -27
  106. package/lib/domain/classes/ReportColumn.d.ts +0 -29
  107. package/lib/domain/classes/ReportDefinition.d.ts +0 -46
  108. package/lib/domain/classes/ReportOrder.d.ts +0 -13
  109. package/lib/domain/classes/ReportParam.d.ts +0 -76
  110. package/lib/domain/classes/ReportResult.d.ts +0 -22
  111. package/lib/domain/classes/ReportRow.d.ts +0 -9
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@esfaenza/extensions"),require("@esfaenza/localizations"),require("@esfaenza/preferences"),require("@angular/platform-browser"),require("@angular/common"),require("@angular/router"),require("ngx-bootstrap/modal"),require("ngx-bootstrap/dropdown"),require("@ctrl/ngx-csv"),require("@esfaenza/ngx-contextmenu")):"function"==typeof define&&define.amd?define("@esfaenza/es-table",["exports","@angular/core","@angular/forms","@esfaenza/extensions","@esfaenza/localizations","@esfaenza/preferences","@angular/platform-browser","@angular/common","@angular/router","ngx-bootstrap/modal","ngx-bootstrap/dropdown","@ctrl/ngx-csv","@esfaenza/ngx-contextmenu"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).esfaenza=e.esfaenza||{},e.esfaenza["es-table"]={}),e.ng.core,e.ng.forms,e.extensions,e.localizations,e.preferences,e.ng.platformBrowser,e.ng.common,e.ng.router,e.modal,e.dropdown,e.ngxCsv,e.ngxContextmenu)}(this,(function(e,t,n,i,r,o,s,l,a,c,d,p,h){"use strict";
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@esfaenza/extensions"),require("@esfaenza/localizations"),require("@esfaenza/preferences"),require("@angular/platform-browser"),require("@angular/common"),require("@angular/router"),require("@angular/material/select"),require("@angular/material/input"),require("ngx-bootstrap/modal"),require("ngx-bootstrap/dropdown"),require("@ctrl/ngx-csv"),require("@esfaenza/ngx-contextmenu")):"function"==typeof define&&define.amd?define("@esfaenza/es-table",["exports","@angular/core","@angular/forms","@esfaenza/extensions","@esfaenza/localizations","@esfaenza/preferences","@angular/platform-browser","@angular/common","@angular/router","@angular/material/select","@angular/material/input","ngx-bootstrap/modal","ngx-bootstrap/dropdown","@ctrl/ngx-csv","@esfaenza/ngx-contextmenu"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).esfaenza=e.esfaenza||{},e.esfaenza["es-table"]={}),e.ng.core,e.ng.forms,e.extensions,e.localizations,e.preferences,e.ng.platformBrowser,e.ng.common,e.ng.router,e.ng.material.select,e.ng.material.input,e.modal,e.dropdown,e.ngxCsv,e.ngxContextmenu)}(this,(function(e,t,n,i,r,s,o,a,l,c,h,p,d,u,g){"use strict";
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,5 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function m(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{a(i.next(e))}catch(e){o(e)}}function l(e){try{a(i.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,l)}a((i=i.apply(e,t||[])).next())}))}function f(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}Object.create;Object.create;var v=function(e,t){this.id=e,this.order=t},y=function(){function e(){this.itemsperpageoverride=15,this.items=[],this.orders=[],this.columns=[],this.column_ordering=[],this.savedstate=!1,this.searchinprogress=!1,this.firstsearch=!0}return e.prototype.reset=function(){this.pages=1,this.objectcount=0,this.searchinprogress=!1,this.firstsearch=!1,this.page=1,this.itemsperpageoverride=15,this.items=[],this.orders=[],this.columns=[],this.column_ordering=[],this.savedstate=!1},e}(),w=function(e,t,n,i,r,o,s,l,a){void 0===n&&(n=null),void 0===i&&(i=null),void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=!0),void 0===l&&(l=null),void 0===a&&(a=!0),this.description=e,this.propertyName=t,this.routePath=n,this.routeParameterProperties=i,this.dataOrder=r,this.columnOrder=o,this.visible=s,this.clss=l,this.orderable=a},C=function(){this._selected=!1,this._rowClass=null,this.hash=null,this.properties={}},b=function(){},x=function(){},S=function(){},I=function(){},T=function(){},O=function(){},V=function(){},P=function(e,t,n,i,r,o){this.id=e,this.title=t,this.iconClass=n,this.text=i,this.conditionField=r,this.conditionValue=o},D=function(e,t,n,i,r){this.id=e,this.description=t,this.visible=n,this.fixed=i,this.template=r},M=function(e){this.all=!1,this.exclusions=[],this.count=e.length,this.items=e,this.all=!1,this.exclusions=[]},R=function(){function e(e,t,n,i){this.myself=e,this.renderer=t,this._viewContainer=n,this.sanitizer=i,this.ID="",this.Display=null,this.Template=null}return Object.defineProperty(e.prototype,"Visible",{get:function(){return null==this._Visible&&(this._Visible=!0),this._Visible},set:function(e){this._Visible=e,e?this.renderer.removeClass(this.myself.nativeElement,"app-display-none"):this.renderer.addClass(this.myself.nativeElement,"app-display-none")},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){if(!this.Internal){var e,t=this._viewContainer;if(null==(e=null==t._view?null:t._view.parent&&!t._view.context.$implicit&&t._view.parent.context&&t._view.parent.context.$implicit?t._view.parent.context.$implicit:t._view.context&&t._view.context.ngIf?t._view.viewContainerParent.context.$implicit:t._view.context.$implicit))for(var n=this._viewContainer._hostLView,i=0;i<n.length;i++){var r=n[i];if(r&&r.$implicit&&!r.ngIf){e=r.$implicit;break}if(r&&r.length&&r.length>0)for(var o=0;o<r.length;o++){var s=r[o];if(s&&s.$implicit&&!s.ngIf){e=s.$implicit;break}}if(e)break}var l=e.hash;this.Context=l,this.Content=null===this.Display||""===this.Display?this.sanitizer.bypassSecurityTrustHtml(this.myself.nativeElement.innerHTML):this.sanitizer.bypassSecurityTrustHtml(this.Display),this.Class=this.myself.nativeElement.className.replace("app-display-none","")}},e}();R.decorators=[{type:t.Component,args:[{selector:"[es-td]",template:"<span>\r\n <ng-content></ng-content>\r\n</span>",changeDetection:t.ChangeDetectionStrategy.OnPush}]}],R.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:s.DomSanitizer}]},R.propDecorators={ID:[{type:t.Input,args:["es-td"]}],Internal:[{type:t.Input}],RouterLink:[{type:t.Input}],Display:[{type:t.Input}],Template:[{type:t.Input}],Visible:[{type:t.Input}]};var E=function(){function e(e,n){this.myself=e,this.renderer=n,this.orderNext={NONE:"DESC",DESC:"ASC",ASC:null},this.resizingThis=!1,this.startOffset=null,this.ID="",this.Orderable=!0,this.Display="",this.Resizable=!1,this.SearchInProgress=!1,this.Wrap=!1,this.Fixed=!1,this.Template=null,this.onOrderChange=new t.EventEmitter,this.Referenced=!1}return Object.defineProperty(e.prototype,"Visible",{get:function(){return null==this._Visible&&(this._Visible=!0),this._Visible},set:function(e){this._Visible=e,e?this.renderer.removeClass(this.myself.nativeElement,"app-display-none"):this.renderer.addClass(this.myself.nativeElement,"app-display-none")},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.Description=null===this.Display||""===this.Display?this.content.nativeElement.innerText:this.Display,this.Class=this.myself.nativeElement.className.replace("app-display-none",""),this.Resizable&&this.renderer.addClass(this.myself.nativeElement,"app-relative")},e.prototype.setupNextOrderAndNotify=function(){if(this.ID){if(this.SearchInProgress)console.log("Attempt to order a column during a search. Operation ignored");else if(this.OrderBy&&this.Orderable){var e=this.orderNext[this.Order||"NONE"];this.Order=e,this.onOrderChange.emit(this.Order)}}else console.log("Attempt to order a column without ID. Operation ignored")},e.prototype.onResizeStart=function(e){this.Resizable&&(this.resizingThis=!0,this.startOffset=this.myself.nativeElement.offsetWidth-e.pageX)},e.prototype.onMouseUp=function(){this.Resizable&&(this.resizingThis=!1)},e.prototype.onMouseMove=function(e){this.Resizable&&this.resizingThis&&(this.myself.nativeElement.style.width=this.startOffset+e.pageX+"px",e.preventDefault())},e}();E.decorators=[{type:t.Component,args:[{selector:"[es-th]",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<div [hidden]="!Resizable" style="top:0; right:0; bottom: 0; width:2px; position:absolute; cursor:col-resize; background-color:#ccc" (mousedown)="onResizeStart($event)"></div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush}]}],E.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},E.propDecorators={ID:[{type:t.Input,args:["es-th"]}],Order:[{type:t.Input}],Orderable:[{type:t.Input}],Display:[{type:t.Input}],Resizable:[{type:t.Input}],SearchInProgress:[{type:t.Input}],OrderBy:[{type:t.Input}],Wrap:[{type:t.Input}],Fixed:[{type:t.Input}],Template:[{type:t.Input}],onOrderChange:[{type:t.Output}],content:[{type:t.ViewChild,args:["content",{static:!1}]}],Visible:[{type:t.Input}],onMouseUp:[{type:t.HostListener,args:["window:mouseup.out-zone"]}],onMouseMove:[{type:t.HostListener,args:["window:mousemove.out-zone",["$event"]]}]};var z=function(e){this.Template=e,this._directive=!0,this.tdVisible=!0,this.tdIf=!0};z.decorators=[{type:t.Directive,args:[{selector:"[td]"}]}],z.ctorParameters=function(){return[{type:t.TemplateRef}]},z.propDecorators={tdVisible:[{type:t.Input}],td:[{type:t.Input}],tdIf:[{type:t.Input}],tdClass:[{type:t.Input}]};var H=function(e){this.Template=e,this._directive=!0,this.th="",this.thVisible=!0,this.thFixed=!1,this.thOrderable=!0,this.thWrap=!1,this.thResizable=!1,this.thIf=!0,this.Referenced=!1};H.decorators=[{type:t.Directive,args:[{selector:"[th]"}]}],H.ctorParameters=function(){return[{type:t.TemplateRef}]},H.propDecorators={th:[{type:t.Input}],thVisible:[{type:t.Input}],thFixed:[{type:t.Input}],thOrder:[{type:t.Input}],thOrderable:[{type:t.Input}],thWrap:[{type:t.Input}],thResizable:[{type:t.Input}],thClass:[{type:t.Input}],thIf:[{type:t.Input}]};var k=new t.InjectionToken("EST_LOCALE"),A=function(e){function t(t){var n=e.call(this,null!=t?t:"it-IT")||this;return e.prototype.set.call(n,"en->it","Performing Table bootstrap",["Sto caricando la Tabella"]),e.prototype.set.call(n,"en->it","Update every",["Aggiorna ogni"]),e.prototype.set.call(n,"en->it","second/s",["secondo/i"]),e.prototype.set.call(n,"en->it","Export View",["Esporta Vista"]),e.prototype.set.call(n,"en->it","Column Name",["Nome Colonna"]),e.prototype.set.call(n,"en->it","Columns Order",["Ordine Colonne"]),e.prototype.set.call(n,"en->it","Columns Visibility",["Visibilità Colonne"]),e.prototype.set.call(n,"en->it","There are no columns configured to be hidden/shown in this view",["Non ci sono colonne configurate per essere visualizzate/nascoste in questa vista dati"]),e.prototype.set.call(n,"en->it","Columns Visibility and Order",["Visibilità e Ordine Colonne"]),e.prototype.set.call(n,"en->it","Objects Selected",["Oggetti Selezionati"]),e.prototype.set.call(n,"en->it","Object Selected",["Oggetto Selezionato"]),e.prototype.set.call(n,"en->it","Select Everything",["Seleziona Tutto"]),e.prototype.set.call(n,"en->it","Reset Selection",["Resetta Selezione"]),e.prototype.set.call(n,"en->it","No operations available",["Nessuna operazione disponibile"]),e.prototype.set.call(n,"en->it","Paging options are not available for this report",["Le opzioni di paginazione non sono disponibili per questo report"]),n}return g(t,e),t}(r.LocalizationService);A.decorators=[{type:t.Injectable}],A.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[k]}]}]};var L=function(){function e(e,n,i,r,o,s,l){this.ngControl=e,this.prefService=n,this.lc=i,this.cdr=r,this.hashExts=o,this.utiExts=s,this.expExts=l,this.View=null,this.globalCheck=!1,this.lastSelected=null,this.selectedObjects=0,this.canSelectAll=!1,this.viewMode=!1,this.arrayMode=!1,this.reportMode=!1,this.boundSource=[],this.TMPBoundSource=[],this.boundSubSources=[],this.addedSlices=[],this.defaultAllPageOverride=999999,this.autoUpdate=!1,this.seconds="10",this.researchInProgress=!1,this.RowTDs=null,this.TMPRowTDs=null,this.RowTHs=null,this.TMPRowTHs=null,this.DynamicTableRouterLinkCache={},this.RowContexts=[],this.OrderDirectives=[],this.lastSelectedItemID=null,this.UserDefinedDynamicCols=!1,this.FirstBind=!0,this.ColumnsList=[],this.TMPColumnsList=[],this.globalColVisCheck=!1,this.CornerMenuOptions=null,this.ColumnsResizable=null,this.AutoUpdate=null,this.UseCustomCellActions=null,this.CustomCellActionsOn="",this.CellActionPropagates=!0,this.UseCustomCells=null,this.MaxHeight=null,this.Class="",this.XLSXExport=null,this.CSVExport=!0,this.AllSearch=!0,this.HighCellDensity=null,this.Selection=null,this.ShowLoadingOnBootstrap=null,this.Removal=null,this.RemovalCondition="",this.Export=null,this.ShiftClick=null,this.ShowPaging=!0,this.HidePaging=null,this.HidePagingCount=null,this.HidePagingButtons=null,this.ContextMenu=null,this.ExportFileName="Export.csv",this.TableClass="table table-striped table-hover table-sm",this.CountLabel=this.lc.loc("Found objects"),this.HasHeaderGroup=null,this.HasSecondaryHeaderGroup=null,this.SliceSize=100,this.EndlessScroll=null,this.EndlessScrollOnlyForAll=!0,this.HeaderHidden=null,this.BodyHidden=null,this.SelectionDisabled=null,this.SingleSelection=null,this.RowClassAssigner=null,this.OrderByColumn=null,this.MultipleOrderingDirectives=!0,this.HiddenColumns=null,this.ColumnsOrdering=null,this.SearchView=null,this.SelectAll=null,this.UseArrayModePaging=!0,this.DynamicRowColumnsDefinition=null,this.DynamicOperations=[],this.Hierarchy=null,this.ParentKey="",this.OwnKey="",this.StartsExpanded=!0,this.SavePreferences=null,this.SecondarySource=null,this.TertiarySource=null,this.UseSelectionCache=!0,this.onOrderChanged=new t.EventEmitter,this.onSearchRequest=new t.EventEmitter,this.onSelectionChanged=new t.EventEmitter,this.onRemoval=new t.EventEmitter,this.onAbortRemoval=new t.EventEmitter,this.onCellClick=new t.EventEmitter,this.onCornerAction=new t.EventEmitter,this.onDynamicOperation=new t.EventEmitter,this.arraymodePage=1,this.arraymodePages=1,this.ArraymodeItemsPerPage=15,this.internalWriteCall=!1,this.selOrDeselCache={},this.propagateChange=function(e){},e&&(e.valueAccessor=this)}return e.prototype.ngOnInit=function(){var e=this;if(this.Hierarchy&&!this.UseCustomCells)throw'Es-table error: Per poter utilizzare l\'es-table con [Hierarchy]="true" è richiesto anche [UseCustomCells]="true"';this.ctxMenuSubscription=(this.ContextMenu||this.tableEmptyMenu).open.subscribe((function(t){var n=!t.item._selected;t.item._selected=!0;var i=e.handleItemsSelection([t.item]);e.changed(),n&&e.onSelectionChanged.emit(i)}))},e.prototype.ngAfterViewInit=function(){this.EsTdsDirective&&this.EsTdsDirective.length>0&&this.EsThsDirective&&this.EsThsDirective.length>0&&(null==this.UseCustomCells&&(this.UseCustomCells=!0),null==this.HiddenColumns&&this.UseCustomCells&&(this.HiddenColumns=!0),null==this.ColumnsOrdering&&this.UseCustomCells&&(this.ColumnsOrdering=!0),null==this.OrderByColumn&&this.UseCustomCells&&(this.OrderByColumn=!0),null==this.SelectAll&&this.Selection&&(this.SelectAll=!0),null==this.ShiftClick&&this.Selection&&(this.ShiftClick=!0))},e.prototype.ngOnDestroy=function(){this.ctxMenuSubscription&&this.ctxMenuSubscription.unsubscribe()},e.prototype.ngOnChanges=function(e){return m(this,void 0,void 0,(function(){return f(this,(function(t){return e.SearchView&&this.SearchView&&(this.arrayPulsanti=this.getPagesArray(6,this.SearchView.page,this.SearchView.pages||1)),[2]}))}))},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(e){},e.prototype.changed=function(){this.propagateChange(this.View)},e.prototype.writeValue=function(e){if(this.View=e||null,this.researchInProgress=!1,!this.View&&!this.SearchView)return this.boundSource=this.TMPBoundSource||[],void this.cdr.markForCheck();if(!this.View||void 0===this.View.result||this.View instanceof x?!this.View||void 0===this.View.itemsperpageoverride||this.View instanceof y?!this.SearchView||void 0===this.SearchView.itemsperpageoverride||this.SearchView instanceof y||(this.SearchView.__proto__=new y):this.View.__proto__=new y:this.View.__proto__=new x,this.View&&this.View instanceof x)this.setMode("report"),this.ReportValues=this.View.result,this.ReportValues&&this.reviewReportBindings();else if(this.View&&this.View instanceof y){if(this.setMode("view"),this.View.selection&&this.View.internalsearchrequest&&this.UseSelectionCache||(this.selOrDeselCache={},this.View.selection=new M([]),this.onSelectionChanged.emit(this.View.selection)),this.View.internalsearchrequest=!1,this.SavePreferences)if(this.ngControl.name)if(this.prefService){var t=this.prefService.retrieve(this.ngControl.name);t&&(this.View.columns=t.columns,this.View.column_ordering=t.column_ordering)}else console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato");else console.error("Non posso utilizzare le preference senza avere un 'name' per questa tabella");this.arrayPulsanti=this.getPagesArray(6,this.View.page,this.View.pages||1)}else this.View&&null!=this.View.length&&null!=this.View.length&&(this.setMode("array"),this.UseSelectionCache&&this.arraymodeSelection||(this.selOrDeselCache={},this.arraymodeSelection=new M([]),this.onSelectionChanged.emit(this.arraymodeSelection)),this.SearchView&&(this.arrayPulsanti=this.getPagesArray(6,this.SearchView.page,this.SearchView.pages||1)));if(this.View&&!(this.View instanceof x)){var n=this.View,i=this.viewMode&&n.itemsperpageoverride==this.defaultAllPageOverride,r=this.viewMode&&n.itemsperpageoverride!=this.defaultAllPageOverride;if(this.UseEndlessscroll=this.EndlessScroll&&(this.arrayMode||i||r&&!this.EndlessScrollOnlyForAll),this.UseEndlessscroll?(this.addedSlices=[],this.boundSubSources=this.getItemSlices(),this.TMPBoundSource=this.boundSubSources[0]?this.boundSubSources[0]:[],this.boundSubSources[0]&&this.addedSlices.push(0)):this.TMPBoundSource=this.getItemsByMode(!1,!this.internalWriteCall),this.Hierarchy&&this.assignHierarchyLevels(this.TMPBoundSource),this.calculateHash(this.TMPBoundSource),this.TMPBoundSource&&this.RowClassAssigner||this.Hierarchy)for(var o=0;o<this.TMPBoundSource.length;o++){var s=this.TMPBoundSource[o];s._rowClass=this.RowClassAssigner?this.RowClassAssigner(s):"",s._rowClass+=this.Hierarchy?" est-row-lvl-"+s.level:""}}this.postBoundSourceCalculation()},e.prototype.getItemsByMode=function(e,t,n){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!1);var i=[];return this.viewMode&&this.View instanceof y?i=this.getViewItemsBySource():this.arrayMode&&(this.UseArrayModePaging&&!n?(this.SearchView&&(this.ArraymodeItemsPerPage=this.SearchView.itemsperpageoverride),t&&this.refreshPaging(this.ArraymodeItemsPerPage),i=this.adaptViewToPaging()):i=this.View),e?i.filter((function(e){return e._selected})):i},e.prototype.getViewItemsBySource=function(){return this.SecondarySource?this.View.items2:this.TertiarySource?this.View.items3:this.View.items},e.prototype.getItemSlices=function(){var e=this.getItemsByMode();if(!e)return[];for(var t=[],n=Math.ceil(e.length/this.SliceSize),i=0;i<n;i++){var r=e.slice(i*this.SliceSize,i*this.SliceSize+this.SliceSize);t.push(r)}return t},e.prototype.onScroll=function(e){var t=this,n=e.target.offsetHeight,i=e.target.scrollHeight;if(e.target.scrollTop>i-n-200){var r=Math.floor(this.TMPBoundSource.length/100);this.boundSubSources[r]&&-1==this.addedSlices.indexOf(r)&&(this.calculateHash(this.boundSubSources[r]),this.TMPBoundSource=this.TMPBoundSource.concat(this.boundSubSources[r]),this.addedSlices.push(r),setTimeout((function(){t.postBoundSourceCalculation()})))}},e.prototype.postBoundSourceCalculation=function(){var e=this;this.RowContexts=[],this.OrderDirectives=[],this.lastSelectedItemID=null,this.cdr.detectChanges(),setTimeout((function(){if(e.eventuallyReviewDynamicColumns(),e.viewMode&&e.UseCustomCells){var t=e.View,n=e.EsThs&&e.EsThs.length>0?e.EsThs.toArray():e.EsThsDirective&&e.EsThsDirective.length>0?e.EsThsDirective.toArray():[],i=e.EsTds&&e.EsTds.length>0?e.EsTds.toArray():e.EsTdsDirective&&e.EsTdsDirective.length>0?e.EsTdsDirective.toArray():[];e.alignColumnsIfLoadedView(t),e.refreshColumnsVisibility(n,i,t),e.alignHeadersOrdering(n,t),e.reviewColumnsList(n),e.evaluateRowThs(n),e.evaluateRowTds(n,i),e.generateDefaultOrder(t),e.applyOrdering(t,!0),e.MoveTemporaryVariablesToRealOnes(),e.evaluateSelection(t.items,t.selection)}else if(e.viewMode&&!e.UseCustomCells){t=e.View;e.evaluateSelection(t.items,t.selection)}else e.arrayMode&&e.arrayModeEvaluateSelection(e.View);e.boundSource=e.TMPBoundSource,e.cdr.markForCheck(),e.FirstBind=!1}))},e.prototype.MoveTemporaryVariablesToRealOnes=function(){this.RowTDs=this.TMPRowTDs,this.RowTHs=this.TMPRowTHs},e.prototype.evaluateSelection=function(e,t){t&&this.handleSelectionEvaluation(e,t)},e.prototype.arrayModeEvaluateSelection=function(e){0!=e.length&&this.handleSelectionEvaluation(e,this.arraymodeSelection)},e.prototype.handleSelectionEvaluation=function(e,t){for(var n=!0,i=0;i<e.length;i++){var r=e[i];this.selOrDeselCache[r.hash]&&(this.selOrDeselCache[r.hash]=r),t.all?r._selected=!this.selOrDeselCache[r.hash]:r._selected=!!this.selOrDeselCache[r.hash],n=n&&r._selected}if(this.globalCheck=n||t.all,this.canSelectAll=t.count>0&&this.SelectAll,this.arrayMode){var o=this.selectedObjects;this.finalizeSelectionInformations(t),this.selectedObjects!=o&&this.onSelectionChanged.emit(t)}},e.prototype.setSelectionStatus=function(e,t){this.handleItemsSelection(e,t),this.cdr.markForCheck()},e.prototype.eventuallyReviewDynamicColumns=function(){if(this.TMPBoundSource&&0!=this.TMPBoundSource.length&&(!!this.TMPBoundSource[0].properties&&!(!this.FirstBind&&this.DynamicRowColumnsDefinition&&this.DynamicRowColumnsDefinition.length>0)))if(this.DynamicRowColumnsDefinition&&0!=this.DynamicRowColumnsDefinition.length)this.UserDefinedDynamicCols=!0;else{var e=this.TMPBoundSource[0].properties;for(var t in this.DynamicRowColumnsDefinition=[],e)this.DynamicRowColumnsDefinition.push(new w(t,t));this.UserDefinedDynamicCols=!1}},e.prototype.reviewColumnsList=function(e){if(this.ColumnsList=[],0!=e.length)for(var t=0;t<e.length;t++){var n=e[t];if(this.isEsTh(n)){if(!n.ID)continue;n.OrderBy=this.OrderByColumn,(this.HiddenColumns||n.Visible)&&this.ColumnsList.push(new D(n.ID,n.Description,n.Visible,n.Fixed,null))}else{if(!n.th)continue;(this.HiddenColumns||n.thVisible)&&this.ColumnsList.push(new D(n.th,null,n.thVisible,n.thFixed,n.Template))}}},e.prototype.alignColumnsIfLoadedView=function(e){var t=this,n=e.savedstate,i=[];if(this.ColumnsList&&0!=this.ColumnsList.length){if(this.ColumnsList.forEach((function(t){var n=e.columns.filter((function(e){return e==t.id}));t.visible&&0==e.columns.length?i.push(t.id):1!=n.length||t.visible?0==n.length&&t.visible&&(t.visible=!1):t.visible=!0})),0==e.columns.length&&(e.columns=i),e.savedstate&&this.ColumnsOrdering&&e.column_ordering.length>0){var r=[];e.column_ordering.forEach((function(e){t.ColumnsList.forEach((function(t){t.id==e&&r.push(t)}))})),this.ColumnsList=r}e.savedstate=!1,n&&this.changed()}},e.prototype.thOrderChanged=function(e,t){if(this.viewMode){if(this.OrderByColumn){var n=this.View,i=!0,r=null;n.orders||(n.orders=[]);for(var o=0;o<n.orders.length;o++){var s=n.orders[o];s.id==e&&(t?(s.order=t,i=!1):r=o)}null!=r?n.orders.splice(r,1):i&&(this.MultipleOrderingDirectives?n.orders.push(new v(e,t)):n.orders=[new v(e,t)]),this.onOrderChanged.emit({id:e,order:t}),this.emitSearchRequest(!1)}}else console.warn("Order changed on a table not in viewMode. Operation not supported")},e.prototype.emitSearchRequest=function(e){this.viewMode&&(this.View.internalsearchrequest=!0,this.changed()),this.researchInProgress=!0,this.onSearchRequest.emit(e)},e.prototype.refreshColumnsVisibility=function(e,t,n){for(var i={},r=[],o={},s=0;s<this.ColumnsList.length;s++){var l=this.ColumnsList[s];i[l.id]=l,l.visible&&r.push(l.id)}if(n.columns=r,e)for(var a=0;a<e.length;a++){var c=e[a];this.isEsTh(c)?(c.Visible=c.Fixed||(i[c.ID]?i[c.ID].visible:c.Visible),c.Fixed&&(o[c.ID]=!0)):(c.thVisible=c.thFixed||(i[c.th]?i[c.th].visible:c.thVisible),c.thFixed&&(o[c.th]=!0))}if(t)for(a=0;a<t.length;a++){var d=t[a];this.isEsTd(d)?d.Visible=o[d.ID]||(i[d.ID]?i[d.ID].visible:d.Visible):d.tdVisible=o[d.td]||(i[d.td]?i[d.td].visible:d.tdVisible)}this.changed()},e.prototype.isEsTd=function(e){return!e._directive},e.prototype.isEsTh=function(e){return!e._directive},e.prototype.alignHeadersOrdering=function(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(this.isEsTh(i)){i.Order=null;for(var r=0;r<t.orders.length;r++){(s=t.orders[r]).id==i.ID&&(i.Order=s.order)}}else{i.thOrder=null;for(var o=0;o<t.orders.length;o++){var s;(s=t.orders[o]).id==i.th&&(i.thOrder=s.order)}}}},e.prototype.evaluateRowTds=function(e,t){if(0!=t.length){for(var n={},i=0;i<e.length;i++){var r=e[i];n[this.isEsTh(r)?r.ID:r.th]=r}this.TMPRowTDs={};var o={};for(i=0;i<t.length;i++){var s=t[i];if(this.isEsTd(s)){if(!(r=n[s.ID]))throw"ID dell'oggeto EsTd non compatibile con gli ID dicharati negli EsTh: "+s.ID;r.Referenced=!0;var l=this.isEsTh(r)&&r.Fixed||!this.isEsTh(r)&&r.thFixed,a={ID:s.ID,Visible:s.Visible,Class:s.Class,Content:s.Content,RouterLink:s.RouterLink,Template:s.Template},c=s.Context;this.TMPRowTDs[c]?l?this.TMPRowTDs[c].splice(0+o[c]++,0,a):this.TMPRowTDs[c].push(a):(this.RowContexts.push(c),this.TMPRowTDs[c]=[a],o[c]=l?1:0)}else for(var d=0;d<this.TMPBoundSource.length;d++){c=this.TMPBoundSource[d].hash;var p=s.td;if(!(r=n[s.td]))throw"ID dell'oggeto EsTd non compatibile con gli ID dicharati negli EsTh: "+s.td;if(r.Referenced=!0,s.tdIf){l=this.isEsTh(r)&&r.Fixed||!this.isEsTh(r)&&r.thFixed,a={ID:p,Visible:s.tdVisible,Class:s.tdClass,Template:s.Template};this.TMPRowTDs[c]?l?this.TMPRowTDs[c].splice(0+o[c]++,0,a):this.TMPRowTDs[c].push(a):(this.RowContexts.push(c),this.TMPRowTDs[c]=[a],o[c]=l?1:0)}}}if(0!=this.TMPBoundSource.length){var h=[];for(i=0;i<e.length;i++){(r=e[i]).Referenced||h.push(this.isEsTh(r)?r.ID:r.th)}if(h.length>0)throw"L'ID di uno o più EsTh non hanno alcun EsTd associato: "+h.join(", ")}}},e.prototype.evaluateRowThs=function(e){if(0!=e.length){this.TMPRowTHs=[];for(var t=0,n=0;n<e.length;n++){var i=e[n],r=void 0;this.isEsTh(i)?(r={Fixed:i.Fixed,ID:i.ID,Visible:i.Visible,Class:i.Class,Order:i.Order,Orderable:i.Orderable,Template:null,Content:i.Description,Wrap:!1},i.Fixed?this.TMPRowTHs.splice(0+t++,0,r):this.TMPRowTHs.push(r)):i.thIf&&(r={Fixed:i.thFixed,ID:i.th,Visible:i.thVisible,Class:i.thClass,Order:i.thOrder,Orderable:i.thOrderable,Template:i.Template,Content:null,Wrap:!1},i.thFixed?this.TMPRowTHs.splice(0+t++,0,r):this.TMPRowTHs.push(r))}}},e.prototype.generateDefaultOrder=function(e){if(0!=this.TMPRowTHs.length)if(e.column_ordering&&0!=e.column_ordering.length)this.OrderDirectives=e.column_ordering;else for(var t=0;t<this.TMPRowTHs.length;t++)this.OrderDirectives.push(this.TMPRowTHs[t].ID)},e.prototype.applyOrdering=function(e,t){var n=this,i=[];if(t){this.OrderDirectives.forEach((function(e){var t=n.TMPRowTHs.filter((function(t){return t.ID==e}))[0];i.push(t)})),this.TMPRowTHs=i;for(var r=function(e){var t=o.TMPRowTDs[o.RowContexts[e]],n=[];o.OrderDirectives.forEach((function(e){var i=t.filter((function(t){return t.ID==e}))[0];n.push(i)})),o.TMPRowTDs[o.RowContexts[e]]=n},o=this,s=0;s<this.RowContexts.length;s++)r(s)}e.column_ordering=this.OrderDirectives,this.changed()},e.prototype.sendUp=function(e){var t=this.TMPColumnsList.indexOf(e);if(!this.TMPColumnsList[t-1].fixed){this.utiExts.swap(this.TMPColumnsList,t,t-1);var n=[];this.TMPColumnsList.forEach((function(e){n.push(Object.assign({},e))})),this.TMPColumnsList=n}},e.prototype.sendDown=function(e){var t=this.TMPColumnsList.indexOf(e);this.utiExts.swap(this.TMPColumnsList,t,t+1);var n=[];this.TMPColumnsList.forEach((function(e){n.push(Object.assign({},e))})),this.TMPColumnsList=n},e.prototype.columnClicked=function(e){this.lastSelectedItemID=e.id,this.HiddenColumns&&!e.fixed&&(e.visible=!e.visible,this.updateGlobalColVisCheck())},e.prototype.resetColumnVisSelection=function(){var e=this;this.TMPColumnsList=[],this.TMPColumnsList=[],this.ColumnsList.forEach((function(t){e.TMPColumnsList.push(Object.assign({},t))}));var t=[];this.ColumnsOrdering&&(this.OrderDirectives.forEach((function(n){var i=e.TMPColumnsList.filter((function(e){return e.id==n}))[0];i&&t.push(i)})),this.TMPColumnsList=t),this.updateGlobalColVisCheck()},e.prototype.refreshColumnOrdering=function(){this.OrderDirectives=[];for(var e=0;e<this.ColumnsList.length;e++)this.OrderDirectives.push(this.ColumnsList[e].id)},e.prototype.updateGlobalColVisCheck=function(){this.globalColVisCheck=this.TMPColumnsList.every((function(e){return e.visible}))},e.prototype.confirmColumnVisibilitySelection=function(){var e=this;if(this.TMPColumnsList.every((function(e){return!e.visible})))return!1;var t=this.View;if(this.ColumnsList=[],this.TMPColumnsList.forEach((function(t){e.ColumnsList.push(Object.assign({},t))})),this.refreshColumnOrdering(),this.refreshColumnsVisibility(null,null,t),this.applyOrdering(t,!1),this.SavePreferences){if(!this.ngControl.name)return console.error("Non posso utilizzare le preference senza avere un 'name' per la tabella"),!1;if(!this.prefService)return console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato"),!1;var n={columns:JSON.parse(JSON.stringify(t.columns)),column_ordering:JSON.parse(JSON.stringify(t.column_ordering))};this.prefService.store(this.ngControl.name,n)}return setTimeout((function(){e.emitSearchRequest(!1)})),this.lastSelectedItemID=null,!0},e.prototype.globalColVisCheckChanged=function(){var e=this;this.TMPColumnsList.forEach((function(t){t.visible=e.globalColVisCheck}))},e.prototype.assignHierarchyLevels=function(e){if(e&&e.length)if(this.ParentKey||this.OwnKey||(void 0!==e[0].parentid&&(this.ParentKey="parentid"),void 0!==e[0].id&&(this.OwnKey="id")),this.ParentKey&&this.OwnKey){var t=1,n=0;do{n=this.assignLevel(e,t),t++}while(n>0)}else console.error("Per utilizzare il sistema in modalità gerarchica è obbligatorio specificare sia ParentKey che OwnKey. Fallback a sistema non gerarchico")},e.prototype.assignLevel=function(e,t){for(var n=0,i=0;i<e.length;i++){var r=e[i];if(r[this.ParentKey]||1!=t){if(r[this.ParentKey]&&t>1)for(var o=0;o<e.length;o++){var s=e[o];if(s[this.OwnKey]==r[this.ParentKey]&&s.level==t-1){r.level=t,s.expanded=this.StartsExpanded,s.parent=!0,r.visible=this.StartsExpanded,n++;break}}}else r.level=1,r.visible=!0,r.expanded=this.StartsExpanded,n++}return n},e.prototype.expandParent=function(e){for(var t=0;t<this.boundSource.length;t++){var n=this.boundSource[t];if(n[this.OwnKey]==e){n.expanded=!0;for(var i=0;i<this.boundSource.length;i++){var r=this.boundSource[i];r[this.ParentKey]==e&&(r.visible=!0)}return}}},e.prototype.collapseParent=function(e){for(var t=0;t<this.boundSource.length;t++){var n=this.boundSource[t];if(n[this.OwnKey]==e)return n.expanded=!1,void this.collapseChildOfParent(e)}},e.prototype.collapseChildOfParent=function(e){for(var t=0;t<this.boundSource.length;t++){var n=this.boundSource[t];n[this.ParentKey]!=e||n.parent?n[this.ParentKey]==e&&n.parent&&(n.expanded=!1,n.visible=!1,this.collapseChildOfParent(n[this.OwnKey])):n.visible=!1}},e.prototype.globalCheckChanged=function(e){void 0===e&&(e=null);var t=this.getItemsByMode(),n=this.handleItemsSelection(t,e,this.globalCheck);this.changed(),this.onSelectionChanged.emit(n)},e.prototype.handleItemsSelection=function(e,t,n){var i,r;void 0===t&&(t=null),void 0===n&&(n=null);var o=(null===(i=this.View)||void 0===i?void 0:i.selection)||this.arraymodeSelection;if(this.SingleSelection&&(null===(r=e[0])||void 0===r?void 0:r._selected)){if(e.length>1&&null==t)throw"Tentativo di selezionare o deselezionare più di un elemento con SingleSelection attivo";1==e.length&&null==t&&(o=this.handleItemsSelection(this.getItemsByMode(),!1,null),e[0]._selected=!0)}for(var s=0;s<e.length;s++){var l=e[s];(null!=t?l._selected!=t:null!=n&&l._selected!=this.globalCheck)&&!l.locked&&(l._selected=null!=t?t:this.globalCheck),o.all?l._selected&&this.selOrDeselCache[l.hash]?(o.exclusions.splice(o.exclusions.indexOf(this.selOrDeselCache[l.hash]),1),delete this.selOrDeselCache[l.hash]):l._selected||this.selOrDeselCache[l.hash]||(this.selOrDeselCache[l.hash]=l,o.exclusions.push(l)):l._selected&&!this.selOrDeselCache[l.hash]?(this.selOrDeselCache[l.hash]=l,o.items.push(l)):!l._selected&&this.selOrDeselCache[l.hash]&&(o.items.splice(o.items.indexOf(this.selOrDeselCache[l.hash]),1),delete this.selOrDeselCache[l.hash])}return null==n&&(this.globalCheck=!e.some((function(e){return!e._selected}))&&!this.getItemsByMode().some((function(e){return!e._selected}))),this.finalizeSelectionInformations(o),o},e.prototype.finalizeSelectionInformations=function(e){e.count=this.evaluateSelected(),0==e.count&&e.all&&(e.all=!1,e.exclusions=[],e.items=[],this.selOrDeselCache={}),this.canSelectAll=e.count>0&&this.SelectAll},e.prototype.handleClick=function(e,t){if(("Range"==e.view.getSelection().type||e.view.getSelection().toString().length>0)&&!e.shiftKey)return!1;("Range"==e.view.getSelection().type||e.view.getSelection().toString().length>0)&&e.shiftKey&&this.utiExts.clearTextSelection();var n=[];if(e.shiftKey&&this.ShiftClick&&!this.SingleSelection)for(var i=!1,r=this.getItemsByMode(),o=0;o<r.length;o++){var s=r[o];i&&(s._selected=!0,n.push(s)),s!=t&&s!=this.lastSelected||i?s!=t&&s!=this.lastSelected||!i||(i=!1):(i=!0,s._selected=!0,n.push(s))}else t._selected=!t._selected,this.lastSelected=t,n.push(t);var l=this.handleItemsSelection(n);return this.changed(),this.onSelectionChanged.emit(l),!0},e.prototype.evaluateSelected=function(){var e,t=(null===(e=this.View)||void 0===e?void 0:e.selection)||this.arraymodeSelection;return this.selectedObjects=t.all?(this.View.objectcount||this.View.length)-t.exclusions.length:t.items.length,this.selectedObjects},e.prototype.selectAllOrResetSelection=function(){var e=this.View.selection||this.arraymodeSelection;this.selOrDeselCache={},e.all=!e.all,e.exclusions=[],e.items=[],e.all||(this.canSelectAll=!1,this.globalCheck=!1),this.finalizeSelectionInformations(e),this.onSelectionChanged.emit(e),this.evaluateSelection(this.viewMode?this.View.items:this.View,e)},e.prototype.addToPage=function(e){(this.View instanceof y||this.SearchView instanceof y||this.View instanceof x)&&this.goToPage((this.SearchView||this.View).page+e)},e.prototype.goToPage=function(e){if(this.View instanceof y||this.SearchView instanceof y||this.View instanceof x){var t=this.SearchView||this.View;0===e||e>t.pages||(t.page=e,this.arrayPulsanti=this.getPagesArray(6,t.page,t.pages),this.emitSearchRequest(!1))}},e.prototype.onItemsPerPageChanged=function(){this.emitSearchRequest(!0)},e.prototype.tryExport=function(e){var t=this;this.ExportFunction&&(this.reportMode?this.ExportFunction(e):this.ExportFunction((function(e,n){void 0===n&&(n=!1),n||(t.setupExport(e),t.cdr.detectChanges(),setTimeout((function(){t.exportDownloader.nativeElement.click()})))})))},e.prototype.setupExport=function(e){var t=this.DynamicRowColumnsDefinition;this.headers=t&&t.length>0?this.expExts.setupForGenericExport(e,t.map((function(e){return{label:e.description,key:e.propertyName,order:e.columnOrder}}))):this.expExts.setupForExport(e),this.data=e},e.prototype.setupNextOrderAndSearch=function(e){if(this.View instanceof x){var t,n={NONE:"DESC",DESC:"ASC",ASC:null}[e.order||"NONE"];e.order=n;var i=this.View.orders?this.View.orders.filter((function(t){return t.column==e.id})):[];0==i.length&&e.order?((t=new S).column=e.id,t.order=e.order,this.View.orders||(this.View.orders=[]),this.View.orders.push(t)):1==i.length?e.order?i[0].order=e.order:i=[]:console.warn("Impossibile settare ordinamento. Colonna "+e.id+" direttive di ordinamento "+i.length+" ordinamento scelto "+e.order),this.emitSearchRequest(!1)}else console.error("View diversa da reportdefinition entrata nel metodo setupNextOrderAndSearch")},e.prototype.reviewReportBindings=function(){var e=this;if(this.View instanceof x){this.View.orders&&this.View.orders.length>0&&this.View.orders.forEach((function(t){e.ReportValues.columns.filter((function(e){return e.id==t.column}))[0].order=t.order})),-2!=this.ReportValues.count?this.previousCount=this.ReportValues.count:-2==this.ReportValues.count&&(this.ReportValues.count=this.previousCount);var t=this.View.itemsperpageoverride||15;this.View.pages=Math.ceil(this.ReportValues.count/t),this.arrayPulsanti=this.getPagesArray(6,this.View.page,this.View.pages)}else console.error("View diversa da reportdefinition entrata nel metodo reviewReportBindings")},e.prototype.autoUpdateChanged=function(){var e=this;/^[1-9]\d*$/.test(this.seconds)||(this.seconds="10");var t=1e3*parseInt(this.seconds,null);this.autoUpdate?this.updateTimer=setInterval((function(){e.emitSearchRequest(!1)}),t):clearInterval(this.updateTimer)},e.prototype.dynamicOperation=function(e,t){this.onDynamicOperation.emit({id:t,item:e})},e.prototype.findEsTd=function(e){var t=this.EsTdsDirective.find((function(t){return t.td===e}));return t?t.Template:null},e.prototype.generateRouterLink=function(e,t,n){if(this.DynamicTableRouterLinkCache[n.hash+e])return this.DynamicTableRouterLinkCache[n.hash+e];var i=this.getRouterLink(e,t,n);return this.DynamicTableRouterLinkCache[n.hash+e]=i,i},e.prototype.getRouterLink=function(e,t,n){for(var i=0;i<t.length;i++)e=e.replace("{"+i+"}",n.properties[t[i]]);return e=e.replace(/'/g,'"').replace(/ /g,""),JSON.parse(e)},e.prototype.arrayAddToPage=function(e){this.arrayGoToPage(this.arraymodePage+e)},e.prototype.arrayGoToPage=function(e){0===e||e>this.arraymodePages||(this.arraymodePage=e,this.internalWriteValue())},e.prototype.refreshPaging=function(e){this.ArraymodeItemsPerPage=e,this.arraymodePages=Math.ceil(this.View.length/this.ArraymodeItemsPerPage),this.arraymodePage=1,this.internalWriteValue()},e.prototype.adaptViewToPaging=function(){var e=[];this.SearchView||(this.arrayPulsanti=this.getPagesArray(6,this.arraymodePage,this.arraymodePages));for(var t=(this.arraymodePage-1)*this.ArraymodeItemsPerPage;t<this.arraymodePage*this.ArraymodeItemsPerPage;t++)t<=this.View.length-1&&e.push(this.View[t]);return e},e.prototype.cellClicked=function(e,t){return!(!this.UseCustomCellActions||-1==this.CustomCellActionsOn.split("$").indexOf(e))&&(this.onCellClick.emit({column:e,model:t}),!0)},e.prototype.cornerActionClicked=function(e){this.onCornerAction.emit({id:e,estable:this})},e.prototype.setMode=function(e){this.viewMode="view"==e,this.arrayMode="array"==e,this.reportMode="report"==e,this.reportMode&&(this.XLSXExport=!0,this.CSVExport=!1)},e.prototype.internalWriteValue=function(){this.internalWriteCall=!0,this.writeValue(this.View),this.internalWriteCall=!1},e.prototype.getPagesArray=function(e,t,n){var i,r,o=[];if(-1==n&&(n=t+1),n<=e)i=1,r=n-1;else{var s=(e-2)/2;r=t+s,(i=t-s)<1?(i=1,r=e-1):r>=n&&(i=n-e+1,r=n-1)}if(o.push({val:1,cssClass:1===t?"btn-main app-white-text":"app-white-button"}),r>=i){for(var l=i;l<=r;l++)1!==l&&o.push({val:l,cssClass:l===t?"btn-main app-white-text":"app-white-button"});o.push({val:n,cssClass:n===t?"btn-main app-white-text":"app-white-button"})}return o},e.prototype.calculateHash=function(e){if(e)for(var t={},n=0;n<e.length;n++){var i=e[n];delete i._selected,delete i.hash;var r=this.hashExts.hashObject(i);t[r]=t[r]?t[r]+1:1,i.hash=r+(t[r]>1?"_"+t[r]:"")}},e.prototype.forceRefresh=function(){var e,t;this.arrayMode&&(e=this.arraymodePage,t=this.ArraymodeItemsPerPage),this.writeValue(this.View),this.cdr.detectChanges(),this.arrayMode&&(this.ArraymodeItemsPerPage=t,this.arrayGoToPage(e))},e}();L.decorators=[{type:t.Component,args:[{selector:"es-table",viewProviders:[{provide:r.LocalizationService,useClass:A}],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,template:'\x3c!-- Patacchino di autoaggiornamento --\x3e\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>\r\n\r\n\x3c!--\r\nI TH sono contenuto statico, questo significa che senza condizione per RowTHs arriverebbero sia qui sia nell ng-container dell\'header in fase non inizializzata, duplicando fisicamente le colonne.\r\nPer ovviare al problema, questo pezzo lo faccio apparire solo se ci sono già dei RowTHs, quindi su valorizzazione della View succederà:\r\n1) appaiono i th nell\' ng-container dell\'header, e NON qui\r\n2) i TH vengono presi, elaborati e trasformati in RowTHs\r\n3) l\'ng-container dell\'header sparisce (per la condizione !UseCustomCells || !RowTHs) e qui appaiono i nuovi TH (che poi sono gli stessi di prima che girano)\r\n4) Vengono presi i nuovi TH da qui e trasformati a loro volta in RowTHs\r\n--\x3e\r\n<div hidden *ngIf="UseCustomCells && RowTHs">\r\n <ng-container *ngIf="View">\r\n \x3c!--Qui invece ci sono tutti i TH--\x3e\r\n <ng-container *ngTemplateOutlet="headerRef"></ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n\x3c!--\r\nQuesta parte è un po\' più semplice del sopra. Infatti i TD vengono sì bindati in entrambi i punti (qui e nell\'ng-container del body), ma avrò le TD statiche prima di generare la TMPBoundSource.\r\nQuesto significa che il workflow di binding sarà:\r\n1) Appaiono i TD statici nel body e NON qui, perché i TMPBoundSource non sono ancora stati emessi\r\n2) Contemporaneamente all\'emissione dei TMPBoundSource vengono anche emessi i RowTds\r\n3) Considerando il punto 2, al giro dopo appariranno i TD qui, perché è stata generata la TMPBoundSource, e spariranno contemporaneamente dall\'ng-container del body (per la condizione !UseCustomCells || !RowTDs)\r\n--\x3e\r\n<div hidden *ngIf="UseCustomCells && bodyRef">\r\n <ng-container *ngIf="View">\r\n \x3c!--Tutti i TD che dopo verranno presi ed elaborati internamente--\x3e\r\n <ng-container *ngFor="let item of TMPBoundSource">\r\n <ng-container *ngTemplateOutlet="bodyRef; context : {$implicit: item}"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-container *ngIf="View">\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="table-responsive datatable {{Class}}" [class.est-scrollable]="UseEndlessscroll" (scroll)="UseEndlessscroll && onScroll($event)" [style.max-height.px]="MaxHeight">\r\n <table class="{{ TableClass }}" [class.est-high-density]="HighCellDensity">\r\n <thead [hidden]="HeaderHidden || FirstBind">\r\n\r\n \x3c!-- Aggiungo il pezzo che gestisce la selezione di tutto se attivo da config --\x3e\r\n <tr *ngIf="SelectAll">\r\n <th colspan="42" [class.est-hidden]="!canSelectAll && !(View?.selection || arraymodeSelection).all">\r\n <span>{{ (selectedObjects || 0).toString() + \' \' + ((selectedObjects == 1 ? \'Object Selected\' : \'Objects Selected\') | localize : lc) }}</span>&nbsp;\r\n <span class="app-link app-inline" (click)="selectAllOrResetSelection()">{{ (View?.selection || arraymodeSelection).all ? (\'Reset Selection\' | localize : lc) : (\'Select Everything\' | localize : lc)}}</span>\r\n </th>\r\n </tr>\r\n\r\n \x3c!-- Blocco header group --\x3e\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 \x3c!-- Blocco header group secondario --\x3e\r\n <tr *ngIf="HasSecondaryHeaderGroup">\r\n <ng-container *ngTemplateOutlet="secondaryHeaderGroupRef"></ng-container>\r\n <th *ngIf="Export"></th>\r\n </tr>\r\n\r\n \x3c!-- Blocco effettivo degli header --\x3e\r\n <tr>\r\n \x3c!-- Aggiungo una checkbox se la selezione è attiva --\x3e\r\n <th class="est-col-min" *ngIf="Selection">\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 \x3c!-- Header che valgono per view mode e array mode --\x3e\r\n <ng-container *ngIf="(viewMode || arrayMode)">\r\n\r\n \x3c!-- In una tabella base prendo semplicemente i th scritti dall\'utente nell\'HTML --\x3e\r\n <ng-container *ngIf="(!UseCustomCells || !RowTHs) && !DynamicRowColumnsDefinition">\r\n <ng-container *ngTemplateOutlet="headerRef"></ng-container>\r\n </ng-container>\r\n\r\n \x3c!-- Se ho un modello dinamico dell\'oggetto creo le colonne in base alle proprietà --\x3e\r\n <ng-container *ngIf="(!UseCustomCells || !RowTHs) && DynamicRowColumnsDefinition">\r\n <ng-container *ngFor="let operation of DynamicOperations">\r\n <th class="est-col-min est-no-side-padding"></th>\r\n </ng-container>\r\n \r\n <ng-container *ngFor="let rowHeader of DynamicRowColumnsDefinition">\r\n <ng-container *ngIf="rowHeader.visible">\r\n <th *ngIf="OrderByColumn" es-th="{{rowHeader.propertyName}}" class="{{UserDefinedDynamicCols ? rowHeader.clss : \' est-nowrap\'}}" [Order]="rowHeader.dataOrder" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.orderable" [OrderBy]="OrderByColumn" [SearchInProgress]="!!researchInProgress" (onOrderChange)="thOrderChanged(rowHeader.propertyName, $event)">{{rowHeader.description}}</th>\r\n <th *ngIf="!OrderByColumn" es-th="{{rowHeader.propertyName}}" class="{{UserDefinedDynamicCols ? rowHeader.clss : \' 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 \x3c!-- Se non ho un modello dinamico ma invece delle celle custom, genero gli header in base ai row th --\x3e\r\n <ng-container *ngIf="UseCustomCells && RowTHs">\r\n <ng-container *ngFor="let rowHeader of RowTHs">\r\n <ng-container *ngIf="rowHeader && rowHeader.Visible">\r\n <th es-th="{{rowHeader.ID}}" class="{{rowHeader.Class}}{{rowHeader.Wrap ? \'\' : \' est-nowrap\'}}" [Order]="rowHeader.Order" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.Orderable" [OrderBy]="OrderByColumn" [SearchInProgress]="!!researchInProgress" (onOrderChange)="OrderByColumn && thOrderChanged(rowHeader.ID, $event)">\r\n <ng-container *ngIf="rowHeader.Template">\r\n <ng-container *ngTemplateOutlet="rowHeader.Template;"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="!rowHeader.Template">\r\n {{rowHeader.Content}}\r\n </ng-container>\r\n </th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n \x3c!--Casistica in cui ho il setup proveniente da un report. Gli header sono definiti da come è fatto il report--\x3e\r\n <ng-container *ngIf="reportMode">\r\n <th [style.color]="clm.color" *ngFor="let clm of ReportValues.columns" class="app-no-selection app-pointer est-nowrap" (click)="setupNextOrderAndSearch(clm)">\r\n {{clm.description}}<span class="fa" [class.fa-chevron-down]="clm.order == \'DESC\'" [class.fa-chevron-up]="clm.order == \'ASC\'"></span>\r\n </th>\r\n </ng-container>\r\n\r\n \x3c!--Per l\'eliminazione mi serve un header aggiuntivo--\x3e\r\n <th *ngIf="Removal" [class.app-right-10]="Export || HiddenColumns" class="est-col-min app-sticky-last-column"><span class="fa fa-trash"></span></th>\r\n\r\n \x3c!--Per l\'esportazione mi serve l\'header extra da cui faccio uscire i 3 pallocchi--\x3e\r\n <th *ngIf="Export || HiddenColumns || ColumnsOrdering || CornerMenuOptions" class="app-table-dotted-menu app-sticky-last-column est-col-min text-sm-center">\r\n \r\n \x3c!-- Link nascosto che serve a scaricare il file --\x3e\r\n <a *ngIf="headers" hidden #exportDownloader csvLink [data]="data" [headers]="headers" [delimiter]="\';\'" [filename]="ExportFileName"></a>\r\n\r\n \x3c!-- Blocco con i 3 pallocchi che tira fuori il context menu delle operazioni --\x3e\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 app-fs-18 app-pointer app-padding-3"></span>\r\n\r\n <div *dropdownMenu class="dropdown-menu dropdown-menu-right app-bring-to-front-strong">\r\n <div class="est-pointer">\r\n <a class="dropdown-item" *ngIf="(HiddenColumns || ColumnsOrdering)" (click)="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)="tryExport(\'CSV\')">{{\'Export View\' | localize : lc}} (CSV)</a>\r\n <a class="dropdown-item" *ngIf="Export && XLSXExport" (click)="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 \x3c!-- Valido per modalità View o Array. Se sono in report mode il body è creato in altro modo --\x3e\r\n <tbody [hidden]="BodyHidden || FirstBind" *ngIf="(arrayMode || viewMode)">\r\n \x3c!--Con selection attiva richiamo il template che gestisce il context menu--\x3e\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 \x3c!--Senza selection richiamo il template che NON gestisce il context menu--\x3e\r\n <ng-container *ngIf="!Selection">\r\n <ng-container *ngTemplateOutlet="TBody"></ng-container>\r\n </ng-container>\r\n </tbody>\r\n\r\n \x3c!-- Per la modalità a report c\'è un body particolare semi-dinamico --\x3e\r\n <tbody [hidden]="BodyHidden" *ngIf="reportMode">\r\n <tr *ngFor="let row of ReportValues.rows; let even = even;">\r\n <td class="est-nowrap" *ngFor="let val of row.values">{{val}}</td>\r\n <td class="app-sticky-last-column{{even && !Hierarchy ? \'-alt\' : \'\'}}"></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n <ng-container *ngIf="ShowPaging && !FirstBind">\r\n\r\n \x3c!-- Paginatore dove appare la count e le opzioni di paginazione --\x3e\r\n <div class="pull-left m-t-min-3">\r\n <ng-container *ngIf="viewMode">\r\n <ng-container *ngTemplateOutlet="pagerSelector; context: { $implicit: { ShowCount: !HidePagingCount || (View && View.objectcount && View.objectcount != -1), ShowPaging: !HidePaging, View: View, UsesView: true }}"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="arrayMode && (!UseArrayModePaging || SearchView)">\r\n <ng-container *ngTemplateOutlet="pagerSelector; context: { $implicit: { ShowCount: !HidePagingCount || (View && View.length) || (SearchView && SearchView.objectcount && SearchView.objectcount != -1), ShowPaging: !HidePaging && SearchView, View: SearchView, SecondaryView: View, UsesView: true }}"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="arrayMode && (UseArrayModePaging && !SearchView)">\r\n <ng-container *ngTemplateOutlet="pagerSelector; context: { $implicit: { ShowCount: !HidePagingCount, ShowPaging: !HidePaging && View.length > 10, View: View, UsesView: false }}"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="reportMode">\r\n <ng-container *ngTemplateOutlet="pagerSelector; context: { $implicit: { ShowCount: !HidePagingCount || (View && View.objectcount && View.objectcount != -1), ShowPaging: View.pagingavailable, MightBeNoPaging: true, View: View, Report: ReportValues, UsesView: true }}"></ng-container>\r\n </ng-container>\r\n </div>\r\n \r\n \x3c!-- Pulsanti avanti-indietro di paginazione --\x3e\r\n <div class="pull-right btn-toolbar" *ngIf="ShowPaging && !HidePagingButtons">\r\n <ng-container *ngIf="(!reportMode || View?.pagingavailable) && (!arrayMode || SearchView)">\r\n <ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { 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: { ATP: arrayAddToPage.bind(this), GTP: arrayGoToPage.bind(this), Array: arrayPulsanti }}"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class="clearfix"></div>\r\n </ng-container>\r\n</ng-container>\r\n\r\n\x3c!-- Template che contiene i pulsanti per cambiare pagina --\x3e\r\n<ng-template #pagingButtons let-options>\r\n <a class="btn app-white-button app-no-margin" (click)="options.ATP(-1)"><span class="fa fa-chevron-left"></span></a>\r\n <div *ngIf="options.Array" class="app-inline">\r\n <a *ngFor="let p of options.Array" class="btn {{p.cssClass}} app-no-margin" (click)="options.GTP(p.val)">{{p.val}}</a>\r\n </div>\r\n <a class="btn app-white-button app-no-margin" (click)="options.ATP(1)"><span class="fa fa-chevron-right"></span></a>\r\n</ng-template>\r\n\r\n\x3c!-- Template che mostra le informazioni base di paginazione: conteggio oggetti, paginazione attuale e pulsanti per cambiarla --\x3e\r\n<ng-template #pagerSelector let-options>\r\n <div *ngIf="options.ShowCount">\r\n {{ CountLabel }}:&nbsp;\r\n <strong *ngIf="options.UsesView && !options.Report">\r\n {{ options.View?.objectcount ? options.View.objectcount : options.SecondaryView && options.SecondaryView.length ? options.SecondaryView.length : "0" }}\r\n </strong>\r\n <strong *ngIf="!options.UsesView && !options.Report">\r\n {{ options.View.length ? options.View.length : "0" }}\r\n </strong>\r\n <strong *ngIf="options.Report">\r\n {{ options.Report.count && options.Report.count == -1 ? options.Report.rows.length : options.Report.count && options.Report.count > 0 ? options.Report.count : 0 }}\r\n </strong>\r\n </div>\r\n <div *ngIf="options.ShowPaging">\r\n <app-paging *ngIf="!options.UsesView" [Hidden]="!options.View || options.View.length == 0" [WarnOnAll]="false" [CurrentPageSize]="ArraymodeItemsPerPage" (pagingSelected)="refreshPaging($event)"></app-paging>\r\n <app-paging *ngIf="options.UsesView" [AllSearch]="AllSearch" [DefaultAll]="defaultAllPageOverride" [View]="options.View" (pagingSelected)="options.View.itemsperpageoverride = $event; changed(); onItemsPerPageChanged();"></app-paging>\r\n </div>\r\n <div *ngIf="options.MightBeNoPaging && !options.ShowPaging">\r\n <em>{{\'Paging options are not available for this report\' | localize: lc}}</em>\r\n </div>\r\n</ng-template>\r\n\r\n\x3c!-- Questi due template rappresentano effettivamente il body della tabella. essendo il tr l\'unica cosa che davvero cambia, il resto è templatizzato --\x3e\r\n<ng-template #TBodySelection let-templateOptions>\r\n <ng-container *ngFor="let item of boundSource; let even = even; let i=index;">\r\n <tr *ngIf="item.visible || !Hierarchy" \r\n [class]="item._rowClass ? item._rowClass : \'\'" [class.est-line-through]="item.removed || item.deleted" [class.est-pointer]="!item.locked" [class.est-white-selected]="item._selected && !item.locked"\r\n [contextMenu]="!item.locked ? (ContextMenu || emptyMenu) : emptyMenu" [contextMenuSubject]="item"\r\n (click)="!item.locked && handleClick($event, item)">\r\n \r\n <td *ngIf="!item.locked"><input type="checkbox" [disabled]="templateOptions.selDisabled" [class.est-pointer]="!item.locked" [(ngModel)]="item._selected" name="check{{i}}"></td>\r\n <td *ngIf="item.locked"></td>\r\n\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 *ngTemplateOutlet="bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}"></ng-container>\r\n\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" [class]="item._rowClass ? item._rowClass : \'\'" [class.est-line-through]="item.removed || item.deleted">\r\n\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 *ngTemplateOutlet="bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}"></ng-container>\r\n\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\x3c!-- Questo template contiene la print condizionale su tabelle semplici, con header e body scritti a manazza --\x3e\r\n<ng-template #basicColumns let-item>\r\n <ng-container *ngIf="(!UseCustomCells || !RowTDs) && !DynamicRowColumnsDefinition">\r\n <ng-container *ngTemplateOutlet="bodyRef; context : {$implicit: item}"></ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\x3c!-- Questo template contiene la print condizionale su tabelle definite in maniera dinamica dal modello --\x3e\r\n<ng-template #dynamicColumns let-item>\r\n <ng-container *ngIf="(!UseCustomCells || !RowTDs) && DynamicRowColumnsDefinition">\r\n <ng-container *ngFor="let operation of DynamicOperations; let first = first; let last = last;">\r\n <ng-container *ngIf="!operation.conditionField || (item.properties[operation.conditionField] == operation.conditionValue)">\r\n <td [class.est-no-right-padding]="last" [class.est-no-left-padding]="!first" class="est-col-min"><span title="{{operation.title}}" class="{{operation.iconClass}} app-pointer" (click)="dynamicOperation(item, operation.id)">{{operation.text}}</span></td>\r\n </ng-container>\r\n <ng-container *ngIf="operation.conditionField && (item.properties[operation.conditionField] != operation.conditionValue)">\r\n <td class="est-col-min est-no-side-padding"></td>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor="let rowItem of DynamicRowColumnsDefinition">\r\n <ng-container *ngIf="rowItem.routePath && rowItem.visible">\r\n <td es-td="{{rowItem.propertyName}}" class="{{UserDefinedDynamicCols ? rowItem.clss : \'est-nowrap\'}}" [Internal]="false">\r\n <a [routerLink]="generateRouterLink(rowItem.routePath, rowItem.routeParameterProperties, item)" class="app-link" [innerHTML]="item.properties[rowItem.propertyName]"></a>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf="!rowItem.routePath && rowItem.visible">\r\n <ng-container *ngTemplateOutlet="findEsTd(rowItem.propertyName) || defaultEsTd; context: { $implicit: item.properties[rowItem.propertyName], rowItem : rowItem, item : item }"> </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEsTd let-value let-rowItem=\'rowItem\' let-item=\'item\'>\r\n <td es-td="{{rowItem.propertyName}}" class="{{UserDefinedDynamicCols ? rowItem.clss : \'est-nowrap\'}}"\r\n [class.app-pointer]="UseCustomCellActions && CustomCellActionsOn.indexOf(\'$\' + rowItem.propertyName + \'$\') != -1"\r\n (click)="cellClicked(rowItem.propertyName, item) && !CellActionPropagates && $event.stopPropagation()"\r\n [Internal]="false">\r\n {{value}}\r\n </td>\r\n</ng-template>\r\n\r\n\x3c!-- Questo template contiene la print condizionale delle celle custom se configurate --\x3e\r\n<ng-template #customCells let-item>\r\n <ng-container *ngIf="UseCustomCells && RowTDs">\r\n <ng-container *ngFor="let rowItem of RowTDs[item.hash]; let i = index">\r\n <ng-container *ngIf="rowItem">\r\n\r\n <ng-container *ngIf="!bodyRef && rowItem.Visible">\r\n <td es-td="{{rowItem.ID}}" class="{{rowItem.Class}}" [class.est-nowrap]="Hierarchy" [Internal]="true">\r\n <ng-container *ngIf="rowItem.Template">\r\n <ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: item }"></ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf="rowItem.RouterLink && rowItem.Visible && bodyRef">\r\n <td es-td="{{rowItem.ID}}" class="{{rowItem.Class}}" [class.est-nowrap]="Hierarchy" [Internal]="true">\r\n <ng-container *ngIf="Hierarchy && i == 0">\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 app-no-selection" (click)="collapseParent(item[this.OwnKey])"></span>\r\n <span *ngIf="item.parent && !item.expanded" class="fa fa-chevron-up est-pointer app-no-selection" (click)="expandParent(item[this.OwnKey])"></span>\r\n &nbsp;\r\n </ng-container>\r\n <a [routerLink]=\'rowItem.RouterLink\' class="app-link" [innerHTML]="rowItem.Content"></a>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf="!rowItem.RouterLink && rowItem.Visible && bodyRef">\r\n <td es-td="{{rowItem.ID}}" class="{{rowItem.Class}}" [class.est-nowrap]="Hierarchy" [class.app-pointer]="UseCustomCellActions && CustomCellActionsOn.indexOf(\'$\' + $any(rowItem).ID + \'$\') != -1" (click)="cellClicked(rowItem.ID, item) && !CellActionPropagates && $event.stopPropagation()" [Internal]="true">\r\n <ng-container *ngIf="Hierarchy && i == 0">\r\n <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 app-no-selection" (click)="collapseParent(item[this.OwnKey])"></span>\r\n <span *ngIf="item.parent && !item.expanded" class="fa fa-chevron-up est-pointer app-no-selection" (click)="expandParent(item[this.OwnKey])"></span>\r\n &nbsp;\r\n </ng-container>\r\n <ng-container *ngIf="rowItem.Template">\r\n <ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: item }"></ng-container>\r\n </ng-container>\r\n <span *ngIf="!rowItem.Template" [innerHTML]="rowItem.Content"></span>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\x3c!-- Questo template contiene i pulsanti di eliminazione/undo eliminazione ed esportazione che vanno in fondo ad un record edlla tabella --\x3e\r\n<ng-template #bodyDeleteAndExport let-options>\r\n <ng-container *ngIf="Removal && !RemovalCondition">\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="!(options.item.removed || options.item.deleted)"><span class="fa fa-remove app-pointer text-danger" [hidden]="options.item.removable != undefined && !options.item.removable" (click)="onRemoval.emit(options.item)"></span></td>\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="(options.item.removed || options.item.deleted)"><span class="fa fa-undo text-warning app-pointer" (click)="onAbortRemoval.emit(options.item)"></span></td>\r\n </ng-container>\r\n <ng-container *ngIf="Removal && RemovalCondition">\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="!(options.item.removed || options.item.deleted) && options.item[RemovalCondition]"><span class="fa fa-remove app-pointer text-danger" [hidden]="options.item.removable != undefined && !options.item.removable" (click)="onRemoval.emit(options.item)"></span></td>\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="(options.item.removed || options.item.deleted) && options.item[RemovalCondition]"><span class="fa fa-undo text-warning app-pointer" (click)="onAbortRemoval.emit(options.item)"></span></td>\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="!options.item[RemovalCondition]"><span class="fa fa-remove app-hidden-view"></span></td>\r\n </ng-container>\r\n <td *ngIf="Export || HiddenColumns || CornerMenuOptions" class="app-sticky-last-column{{options.even && !Hierarchy ? \'-alt\' : \'\'}}"></td>\r\n</ng-template>\r\n\r\n\x3c!-- Context menu vuoto default per tutte le tabella che non ce l\'hanno, in modo che al click destro appaia "nessuna op disponibile" --\x3e\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\x3c!-- Modal per cambiare posizione e visibilità delle colonne dell\'es-table --\x3e\r\n<div bsModal #changeColumnVisibilityModal="bs-modal" class="modal fade" role="dialog" aria-hidden="true">\r\n <div class="modal-dialog modal-lg">\r\n <div class="modal-content">\r\n <div class="modal-header">\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 app-padding-10 app-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 \x3c!--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--\x3e\r\n <table class="table table-striped table-sm app-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)="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 \x3c!--Filler--\x3e\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor="let item of TMPColumnsList; let i = index; let last = last" class="est-pointer" [class.est-white-selected]="lastSelectedItemID == item.id" [class.est-no-selection]="!item.visible" (click)="columnClicked(item);">\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)="updateGlobalColVisCheck();" />\r\n </td>\r\n <td class="est-nowrap" *ngIf="ColumnsOrdering">\r\n <span class="fa fa-arrow-up" [class.est-hidden-view]="item.fixed" (click)="lastSelectedItemID = item.id; i != 0 && !item.fixed && sendUp(item); $event.stopPropagation();"></span>\r\n <span class="fa fa-arrow-down" [class.est-hidden-view]="item.fixed" (click)="lastSelectedItemID = item.id; !last && !item.fixed && sendDown(item); $event.stopPropagation();"></span>\r\n </td>\r\n <td class="est-nowrap">\r\n <ng-container *ngIf="item.template">\r\n <ng-container *ngTemplateOutlet="item.template"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="!item.template">{{item.description}}</ng-container>\r\n </td>\r\n \x3c!--Filler--\x3e\r\n <td></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 app-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)="confirmColumnVisibilitySelection() && changeColumnVisibilityModal.hide()">{{\'Confirm\' | localize : lc}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>',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-pointer{cursor:pointer}.est-high-density td,.est-high-density th{padding:0 .2rem}.est-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.est-hidden-view{visibility:hidden}.est-nowrap{white-space:nowrap}.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-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-right-10{right:10px}.est-hidden{visibility:hidden}']}]}],L.ctorParameters=function(){return[{type:n.NgControl,decorators:[{type:t.Self},{type:t.Optional}]},{type:o.PreferencesService,decorators:[{type:t.Optional}]},{type:r.LocalizationService},{type:t.ChangeDetectorRef},{type:i.HashingService},{type:i.UtilityService},{type:i.ExportService}]},L.propDecorators={EsTdsDirective:[{type:t.ContentChildren,args:[z]}],EsThsDirective:[{type:t.ContentChildren,args:[H]}],EsThs:[{type:t.ContentChildren,args:[t.forwardRef((function(){return E}))]}],EsTds:[{type:t.ContentChildren,args:[t.forwardRef((function(){return R}))]}],bodyRef:[{type:t.ContentChild,args:["body",{static:!1}]}],headerRef:[{type:t.ContentChild,args:["header",{static:!1}]}],headerGroupRef:[{type:t.ContentChild,args:["headerGroup",{static:!1}]}],secondaryHeaderGroupRef:[{type:t.ContentChild,args:["secondaryHeaderGroup",{static:!1}]}],CornerMenuOptions:[{type:t.Input}],ColumnsResizable:[{type:t.Input}],AutoUpdate:[{type:t.Input}],UseCustomCellActions:[{type:t.Input}],CustomCellActionsOn:[{type:t.Input}],CellActionPropagates:[{type:t.Input}],UseCustomCells:[{type:t.Input}],MaxHeight:[{type:t.Input}],Class:[{type:t.Input}],XLSXExport:[{type:t.Input}],CSVExport:[{type:t.Input}],AllSearch:[{type:t.Input}],HighCellDensity:[{type:t.Input}],Selection:[{type:t.Input}],ShowLoadingOnBootstrap:[{type:t.Input}],Removal:[{type:t.Input}],RemovalCondition:[{type:t.Input}],Export:[{type:t.Input}],ShiftClick:[{type:t.Input}],ShowPaging:[{type:t.Input}],HidePaging:[{type:t.Input}],HidePagingCount:[{type:t.Input}],HidePagingButtons:[{type:t.Input}],ContextMenu:[{type:t.Input}],ExportFileName:[{type:t.Input}],TableClass:[{type:t.Input}],CountLabel:[{type:t.Input}],ExportFunction:[{type:t.Input}],HasHeaderGroup:[{type:t.Input}],HasSecondaryHeaderGroup:[{type:t.Input}],SliceSize:[{type:t.Input}],EndlessScroll:[{type:t.Input}],EndlessScrollOnlyForAll:[{type:t.Input}],HeaderHidden:[{type:t.Input}],BodyHidden:[{type:t.Input}],SelectionDisabled:[{type:t.Input}],SingleSelection:[{type:t.Input}],RowClassAssigner:[{type:t.Input}],OrderByColumn:[{type:t.Input}],MultipleOrderingDirectives:[{type:t.Input}],HiddenColumns:[{type:t.Input}],ColumnsOrdering:[{type:t.Input}],SearchView:[{type:t.Input}],SelectAll:[{type:t.Input}],UseArrayModePaging:[{type:t.Input}],DynamicRowColumnsDefinition:[{type:t.Input}],DynamicOperations:[{type:t.Input}],Hierarchy:[{type:t.Input}],ParentKey:[{type:t.Input}],OwnKey:[{type:t.Input}],StartsExpanded:[{type:t.Input}],SavePreferences:[{type:t.Input}],SecondarySource:[{type:t.Input}],TertiarySource:[{type:t.Input}],UseSelectionCache:[{type:t.Input}],onOrderChanged:[{type:t.Output}],onSearchRequest:[{type:t.Output}],onSelectionChanged:[{type:t.Output}],onRemoval:[{type:t.Output}],onAbortRemoval:[{type:t.Output}],onCellClick:[{type:t.Output}],onCornerAction:[{type:t.Output}],onDynamicOperation:[{type:t.Output}],exportDownloader:[{type:t.ViewChild,args:["exportDownloader",{static:!1}]}],tableEmptyMenu:[{type:t.ViewChild,args:["emptyMenu",{static:!0}]}],ArraymodeItemsPerPage:[{type:t.Input}]};var _=function(){},B=function(e){function t(t){var n=e.call(this,null!=t?t:"it-IT")||this;return e.prototype.set.call(n,"en->it","All",["Tutto"]),e.prototype.set.call(n,"en->it","Are you sure you want to retrieve all results?",["Si è sicuri di voler caricare tutti i risultati?"]),e.prototype.set.call(n,"en->it","This might slow down the page and possibly crash the entire application",["L'operazione potrebbe rallentare la pagina fino al crash dell'applicazione"]),n}return g(t,e),t}(r.LocalizationService);B.decorators=[{type:t.Injectable}],B.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[k]}]}]};var U=function(){function e(e,n){this.msgExts=e,this.lc=n,this.WarnOnAll=!0,this.AllSearch=!0,this.DefaultAll=999999,this.pagingSelected=new t.EventEmitter}return e.prototype.choice=function(e){var t=this;e==this.DefaultAll&&this.WarnOnAll?this.msgExts.simpleWarningWithChoice(this.lc.loc("Are you sure you want to retrieve all results?"),this.lc.loc("This might slow down the page and possibly crash the entire application"),(function(){t.pagingSelected.emit(e)})):this.pagingSelected.emit(e)},e}();U.decorators=[{type:t.Component,args:[{selector:"app-paging",viewProviders:[{provide:r.LocalizationService,useClass:B}],template:'\x3c!--Se non ho almeno 10 elementi non ha senso far vedere le opzioni di paginazione--\x3e\r\n<ng-container *ngIf="View ? ((View.objectcount && View.objectcount >= 10) || View.pagingavailable) : !Hidden">\r\n {{\'Paging\' | localize : lc}}:&nbsp;\r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 10 : CurrentPageSize == 10"\r\n (click)="choice(10);">\r\n 10\r\n </span>&nbsp;|&nbsp;\r\n\r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 15 : CurrentPageSize == 15"\r\n (click)="choice(15);">\r\n 15\r\n </span>&nbsp;|&nbsp;\r\n\r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 30 : CurrentPageSize == 30"\r\n (click)="choice(30);">\r\n 30\r\n </span>&nbsp;|&nbsp;\r\n\r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 45 : CurrentPageSize == 45"\r\n (click)="choice(45);">\r\n 45\r\n </span>&nbsp;|&nbsp;\r\n\r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 100 : CurrentPageSize == 100"\r\n (click)="choice(100);">\r\n 100\r\n </span><span *ngIf="AllSearch">&nbsp;|&nbsp;</span>\r\n <span *ngIf="AllSearch" class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == DefaultAll : CurrentPageSize == DefaultAll"\r\n (click)="choice(DefaultAll);">\r\n {{\'All\' | localize : lc}}\r\n </span>\r\n</ng-container>'}]}],U.ctorParameters=function(){return[{type:i.MessageService},{type:r.LocalizationService}]},U.propDecorators={CurrentPageSize:[{type:t.Input}],View:[{type:t.Input}],Hidden:[{type:t.Input}],WarnOnAll:[{type:t.Input}],AllSearch:[{type:t.Input}],DefaultAll:[{type:t.Input}],pagingSelected:[{type:t.Output}]};var F=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:k,useValue:(null==t?void 0:t.locale)||"it-IT"}]}},e}();F.decorators=[{type:t.NgModule,args:[{imports:[l.CommonModule,n.FormsModule,a.RouterModule,r.LocalizationModule,c.ModalModule,d.BsDropdownModule,p.CsvModule,h.ContextMenuModule],declarations:[E,R,L,z,H,U],providers:[i.UtilityService,i.ExportService,i.HashingService,i.MessageService],exports:[E,R,L,z,H,U]}]}],e.AppOrdering=v,e.AppSearch=y,e.CornerMenuOption=b,e.EsTableColumn=D,e.EsTableColumnsDefinition=w,e.EsTableComponent=L,e.EsTableModule=F,e.EsTableModuleConfig=_,e.EsTableOperationDefinition=P,e.EsTd=R,e.EsTh=E,e.GenericItem=C,e.ItemsSelection=M,e.ReportColumn=I,e.ReportDefinition=x,e.ReportOrder=S,e.ReportParam=V,e.ReportResult=T,e.ReportRow=O,e.ɵa=A,e.ɵb=k,e.ɵc=z,e.ɵd=H,e.ɵe=U,e.ɵf=B,Object.defineProperty(e,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function v(e,t,n,i){return new(n||(n=Promise))((function(r,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))}function y(e,t){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}Object.create;function w(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(C(arguments[t]));return e}Object.create;var x=function(e,t){this.id=e,this.order=t},S=function(){function e(){this.itemsperpageoverride=15,this.items=[],this.orders=[],this.columns=[],this.column_ordering=[],this.savedstate=!1,this.searchinprogress=!1,this.firstsearch=!0}return e.prototype.reset=function(){this.pages=1,this.objectcount=0,this.searchinprogress=!1,this.firstsearch=!1,this.page=1,this.itemsperpageoverride=15,this.items=[],this.orders=[],this.columns=[],this.column_ordering=[],this.savedstate=!1},e}(),I=function(e,t,n,i,r,s,o,a,l,c){void 0===n&&(n=null),void 0===i&&(i=null),void 0===r&&(r=null),void 0===s&&(s=null),void 0===o&&(o=!0),void 0===a&&(a=null),void 0===l&&(l=!0),void 0===c&&(c=!1),this.description=e,this.propertyName=t,this.routePath=n,this.routeParameterProperties=i,this.dataOrder=r,this.columnOrder=s,this.visible=o,this.clss=a,this.orderable=l,this.headerWraps=c},P=function(){this._selected=!1,this._rowClass=null,this._hash=null,this.properties={}},T=function(){},O=function(){},_=function(){},M=function(){},V=function(){},R=function(){},D=function(){},E=function(e,t,n,i,r,s){this.id=e,this.title=t,this.iconClass=n,this.text=i,this.conditionField=r,this.conditionValue=s},H=function(e){this.all=!1,this.exclusions=[],this.group_exclusions=[],this.count=e.length,this.items=e,this.all=!1,this.exclusions=[],this.groups=[],this.group_exclusions=[]},A=function(e,t,n){this.column=e,this.count=t,this.value=n,this.aggregations=[]},G=function(e,t,n){this.column=e,this.aggregation=t,this.value=n},k=function(e,t){this.column=e,this.value=t},z=function(e,t,n){this.column=e,this.aggregation=t,this.datatype=n},L=function(e,t,n){this.cache=e,this.index_cache=t,this.array=n},B=function(e,t,n,i,r,s,o){this.id=e,this.description=t,this.visible=n,this.fixed=i,this.pinned=r,this.pinnedWidth=s,this.template=o},N=function(e,t,n,i,r){this._grouplevel=e,this._thisRoute=t,this._parent=n,this.view=i,this.searches=r,this._sep=!0,this.buttons=[]},U=function(e,t){this.column=e,this.value=t},F=function(){function e(e,t,n,i){this.myself=e,this.renderer=t,this._viewContainer=n,this.sanitizer=i,this.ID="",this.Display=null,this.Template=null}return Object.defineProperty(e.prototype,"Visible",{get:function(){return null==this._Visible&&(this._Visible=!0),this._Visible},set:function(e){this._Visible=e,e?this.renderer.removeClass(this.myself.nativeElement,"app-display-none"):this.renderer.addClass(this.myself.nativeElement,"app-display-none")},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.Internal||(this.Context=this.Context||this.getTemplateContext()._hash,this.Content=null===this.Display||""===this.Display?this.sanitizer.bypassSecurityTrustHtml(this.myself.nativeElement.innerHTML):this.sanitizer.bypassSecurityTrustHtml(this.Display),this.Class=this.myself.nativeElement.className.replace("app-display-none",""))},e.prototype.getTemplateContext=function(){var e,t=this._viewContainer;if(e=null==t._view?null:t._view.parent&&!t._view.context.$implicit&&t._view.parent.context&&t._view.parent.context.$implicit?t._view.parent.context.$implicit:t._view.context&&t._view.context.ngIf?t._view.viewContainerParent.context.$implicit:t._view.context.$implicit)return e;for(var n=this._viewContainer._hostLView,i=0;i<n.length;i++){var r=n[i];if(r&&r.$implicit&&!r.ngIf)return r.$implicit;if(r&&r.length&&r.length>0)for(var s=0;s<r.length;s++){var o=r[s];if(o&&o.$implicit&&!o.ngIf)return o.$implicit}}},e}();F.decorators=[{type:t.Component,args:[{selector:"[es-td]",template:"<span>\r\n <ng-content></ng-content>\r\n</span>",changeDetection:t.ChangeDetectionStrategy.OnPush}]}],F.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:o.DomSanitizer}]},F.propDecorators={ID:[{type:t.Input,args:["es-td"]}],Internal:[{type:t.Input}],RouterLink:[{type:t.Input}],Display:[{type:t.Input}],Template:[{type:t.Input}],Context:[{type:t.Input}],Visible:[{type:t.Input}]};var q=function(){function e(e,n){this.myself=e,this.renderer=n,this.orderNext={NONE:"DESC",DESC:"ASC",ASC:null},this.resizingThis=!1,this.startOffset=null,this.ID="",this.Orderable=!0,this.Display="",this.Resizable=!1,this.SearchInProgress=!1,this.Wrap=!1,this.Fixed=!1,this.Template=null,this.onOrderChange=new t.EventEmitter,this._referenced=!1}return Object.defineProperty(e.prototype,"Visible",{get:function(){return null==this._Visible&&(this._Visible=!0),this._Visible},set:function(e){this._Visible=e,e?this.renderer.removeClass(this.myself.nativeElement,"app-display-none"):this.renderer.addClass(this.myself.nativeElement,"app-display-none")},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.Description=null===this.Display||""===this.Display?this.content.nativeElement.innerText:this.Display,this.Class=this.myself.nativeElement.className.replace("app-display-none",""),this.Resizable&&this.renderer.addClass(this.myself.nativeElement,"app-relative")},e.prototype.setupNextOrderAndNotify=function(){if(this.ID){if(this.SearchInProgress)console.log("Attempt to order a column during a search. Operation ignored");else if(this.OrderBy&&this.Orderable){var e=this.orderNext[this.Order||"NONE"];this.Order=e,this.onOrderChange.emit(this.Order)}}else console.log("Attempt to order a column without ID. Operation ignored")},e.prototype.onResizeStart=function(e){this.Resizable&&(this.resizingThis=!0,this.startOffset=this.myself.nativeElement.offsetWidth-e.pageX)},e.prototype.onMouseUp=function(){this.Resizable&&(this.resizingThis=!1)},e.prototype.onMouseMove=function(e){this.Resizable&&this.resizingThis&&(this.myself.nativeElement.style.width=this.startOffset+e.pageX+"px",e.preventDefault())},e}();q.decorators=[{type:t.Component,args:[{selector:"[es-th]",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<div [hidden]="!Resizable" style="top:0; right:0; bottom: 0; width:2px; position:absolute; cursor:col-resize; background-color:#ccc" (mousedown)="onResizeStart($event)"></div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush}]}],q.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},q.propDecorators={ID:[{type:t.Input,args:["es-th"]}],Order:[{type:t.Input}],Orderable:[{type:t.Input}],Display:[{type:t.Input}],Resizable:[{type:t.Input}],SearchInProgress:[{type:t.Input}],OrderBy:[{type:t.Input}],Wrap:[{type:t.Input}],Fixed:[{type:t.Input}],Template:[{type:t.Input}],onOrderChange:[{type:t.Output}],content:[{type:t.ViewChild,args:["content",{static:!1}]}],Visible:[{type:t.Input}],onMouseUp:[{type:t.HostListener,args:["window:mouseup.out-zone"]}],onMouseMove:[{type:t.HostListener,args:["window:mousemove.out-zone",["$event"]]}]};var W=function(e){this.Template=e,this._directive=!0,this.tdVisible=!0,this.tdIf=!0};W.decorators=[{type:t.Directive,args:[{selector:"[td]"}]}],W.ctorParameters=function(){return[{type:t.TemplateRef}]},W.propDecorators={tdVisible:[{type:t.Input}],td:[{type:t.Input}],tdIf:[{type:t.Input}],tdClass:[{type:t.Input}]};var K=function(e){this.Template=e,this._thAggregations=null,this._directive=!0,this._referenced=!1,this.th="",this.thPinned=!1,this.thPinnedWidth=150,this.thVisible=!0,this.thFixed=!1,this.thParent="",this.thOrderable=!0,this.thWrap=!1,this.thResizable=!1,this.thIf=!0,this.thGroup=!1,this.thAggregation=null};K.decorators=[{type:t.Directive,args:[{selector:"[th]"}]}],K.ctorParameters=function(){return[{type:t.TemplateRef}]},K.propDecorators={th:[{type:t.Input}],thPinned:[{type:t.Input}],thPinnedWidth:[{type:t.Input}],thVisible:[{type:t.Input}],thFixed:[{type:t.Input}],thParent:[{type:t.Input}],thOrder:[{type:t.Input}],thOrderable:[{type:t.Input}],thWrap:[{type:t.Input}],thResizable:[{type:t.Input}],thClass:[{type:t.Input}],thGroupClass:[{type:t.Input}],thIf:[{type:t.Input}],thGroup:[{type:t.Input}],thAggregation:[{type:t.Input}]};var $=new t.InjectionToken("EST_LOCALE"),j=new t.InjectionToken("EST_DEBUG"),X=new t.InjectionToken("EST_DEFAULTS"),Q=function(e){function t(t){var n=e.call(this,null!=t?t:"it-IT")||this;return e.prototype.set.call(n,"en->it","All",["Tutto"]),e.prototype.set.call(n,"en->it","Groups",["Gruppi"]),e.prototype.set.call(n,"en->it","Cannot export an empty dataset",["Impossibile esportare un dataset vuoto"]),e.prototype.set.call(n,"en->it","Performing Table bootstrap",["Sto caricando la Tabella"]),e.prototype.set.call(n,"en->it","Update every",["Aggiorna ogni"]),e.prototype.set.call(n,"en->it","second/s",["secondo/i"]),e.prototype.set.call(n,"en->it","Export View",["Esporta Vista"]),e.prototype.set.call(n,"en->it","Column Name",["Nome Colonna"]),e.prototype.set.call(n,"en->it","Columns Order",["Ordine Colonne"]),e.prototype.set.call(n,"en->it","Columns Visibility",["Visibilità Colonne"]),e.prototype.set.call(n,"en->it","There are no columns configured to be hidden/shown in this view",["Non ci sono colonne configurate per essere visualizzate/nascoste in questa vista dati"]),e.prototype.set.call(n,"en->it","Columns Visibility and Order",["Visibilità e Ordine Colonne"]),e.prototype.set.call(n,"en->it","Objects Selected",["Oggetti Selezionati"]),e.prototype.set.call(n,"en->it","Object Selected",["Oggetto Selezionato"]),e.prototype.set.call(n,"en->it","Select Everything",["Seleziona Tutto"]),e.prototype.set.call(n,"en->it","Reset Selection",["Resetta Selezione"]),e.prototype.set.call(n,"en->it","No operations available",["Nessuna operazione disponibile"]),e.prototype.set.call(n,"en->it","Paging options are not available for this report",["Le opzioni di paginazione non sono disponibili per questo report"]),n}return f(t,e),t}(r.LocalizationService);Q.decorators=[{type:t.Injectable}],Q.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[$]}]}]};var J=function(){},Z=function(){function e(e,n,i,r,s,o,a,l,c,h,p){var d,u,g,m,f,v,y,w,C,b,x,S,I,P,T,O;this.ngControl=e,this.prefService=n,this.deafults=i,this.locale=r,this.lc=s,this.cdr=o,this.hashExts=a,this.utiExts=l,this.expExts=c,this.dateExts=h,this.msgExts=p,this.View=null,this.globalCheck=!1,this.lastSelected=null,this.selectedObjects=0,this.canSelectAll=!1,this.viewMode=!1,this.arrayMode=!1,this.reportMode=!1,this.boundSource=[],this.TMPBoundSource=[],this.boundSubSources=[],this.addedSlices=[],this.defaultAllPageOverride=999999,this.autoUpdate=!1,this.seconds="10",this.researchInProgress=!1,this.RowTDs=null,this.TMPRowTDs=null,this.RowTHs=null,this.TMPRowTHs=null,this.TMPRowThGroups=null,this.RowThGroups=null,this.DynamicTableRouterLinkCache={},this.RowContexts=[],this.OrderDirectives=[],this.lastSelectedItemID=null,this.UserDefinedDynamicCols=!1,this.FirstBind=!0,this.ColumnsList=[],this.TMPColumnsList=[],this.globalColVisCheck=!1,this.CornerMenuOptions=null,this.ColumnsResizable=null,this.AutoUpdate=null,this.UseCustomCellActions=null,this.CustomCellActionsOn="",this.CellActionPropagates=!0,this.UseCustomCells=null,this.MaxHeight=null,this.ContainerClass=null,this.XLSXExport=null,this.CSVExport=!0,this.AllSearch=null,this.HighCellDensity=null,this.Selection=null,this.ShowLoadingOnBootstrap=null,this.Removal=null,this.RemovalCondition="",this.Export=null,this.ShiftClick=null,this.HidePaging=null,this.HidePagingCount=null,this.HidePagingButtons=null,this.ContextMenu=null,this.ExportFileName="Export.csv",this.TableClass=null,this.HasHeaderGroup=null,this.HasSecondaryHeaderGroup=null,this.SliceSize=100,this.EndlessScroll=null,this.EndlessScrollOnlyForAll=!0,this.HeaderHidden=null,this.BodyHidden=null,this.SelectionDisabled=null,this.SingleSelection=null,this.RowClassAssigner=null,this.OrderByColumn=null,this.MultipleOrderingDirectives=!0,this.HiddenColumns=null,this.ColumnsOrdering=null,this.SearchView=null,this.SelectAll=null,this.UseArrayModePaging=!0,this.DynamicRowColumnsDefinition=null,this.DynamicOperations=[],this.Hierarchy=null,this.ParentKey="",this.OwnKey="",this.StartsExpanded=!0,this.SavePreferences=null,this.PagingStyle=null,this.RowGroupingPagingStyle=null,this.SecondarySource=null,this.TertiarySource=null,this.UseSelectionCache=null,this.ShowItemGroupsColumns=null,this.onOrderChanged=new t.EventEmitter,this.onSearchRequest=new t.EventEmitter,this.onSelectionChanged=new t.EventEmitter,this.onRemoval=new t.EventEmitter,this.onAbortRemoval=new t.EventEmitter,this.onCellClick=new t.EventEmitter,this.onCornerAction=new t.EventEmitter,this.onDynamicOperation=new t.EventEmitter,this.arraymodePage=1,this.arraymodePages=1,this.ArraymodeItemsPerPage=null,this.arrayColumns=[],this.arrayColumnOrdering=[],this.arrayOrders=[],this.internalWriteCall=!1,this.groupSearchRequestsCache=[],this.ResearchNeeded=!1,this.Columns={Visibile:100,VisibleUnpinned:100,Global:100},this.MainGroupView=null,this.BaseItemsCount=null,this.rgGroupCache=new Map,this.rgItemCache=new Map,this.rgChildGroupsCache=new Map,this.itemsCache=new Map,this.groupsCache=new Map,this.exclusionsCache=new Map,this.group_exclusionsCache=new Map,this.i_itemsCache=new Map,this.i_groupsCache=new Map,this.i_exclusionsCache=new Map,this.i_group_exclusionsCache=new Map,this.ArrayGrouping=!1,this.PagerOptions={PagerCount:null,ShowCount:!0,ShowPaging:!0,UsesView:!0,View:null,Ready:!1,Searches:"items"},this.propagateChange=function(e){},e&&(e.valueAccessor=this),this.ColumnsResizable=this.InputOrDefault(this.ColumnsResizable,null===(d=this.deafults)||void 0===d?void 0:d.ColumnsResizable),this.AutoUpdate=this.InputOrDefault(this.AutoUpdate,null===(u=this.deafults)||void 0===u?void 0:u.AutoUpdate),this.AllSearch=this.InputOrDefault(this.AllSearch,null===(g=this.deafults)||void 0===g?void 0:g.AllSearch,!0),this.Export=this.InputOrDefault(this.Export,null===(m=this.deafults)||void 0===m?void 0:m.Export),this.HidePaging=this.InputOrDefault(this.HidePaging,null===(f=this.deafults)||void 0===f?void 0:f.HidePaging,!1),this.HidePagingCount=this.InputOrDefault(this.HidePagingCount,null===(v=this.deafults)||void 0===v?void 0:v.HidePagingCount),this.HidePagingButtons=this.InputOrDefault(this.HidePagingButtons,null===(y=this.deafults)||void 0===y?void 0:y.HidePagingButtons),this.ContainerClass=this.InputOrDefault(this.ContainerClass,null===(w=this.deafults)||void 0===w?void 0:w.ContainerClass,""),this.TableClass=this.InputOrDefault(this.TableClass,null===(C=this.deafults)||void 0===C?void 0:C.TableClass,"table table-striped table-hover table-sm"),this.Selection=this.InputOrDefault(this.Selection,null===(b=this.deafults)||void 0===b?void 0:b.Selection),this.SavePreferences=this.InputOrDefault(this.SavePreferences,null===(x=this.deafults)||void 0===x?void 0:x.SavePreferences),this.PagingStyle=this.InputOrDefault(this.PagingStyle,null===(S=this.deafults)||void 0===S?void 0:S.PagingStyle,"bottom"),this.RowGroupingPagingStyle=this.InputOrDefault(this.RowGroupingPagingStyle,null===(I=this.deafults)||void 0===I?void 0:I.RowGroupingPagingStyle,"left"),this.UseSelectionCache=this.InputOrDefault(this.UseSelectionCache,null===(P=this.deafults)||void 0===P?void 0:P.UseSelectionCache,!0),this.ShowItemGroupsColumns=this.InputOrDefault(this.ShowItemGroupsColumns,null===(T=this.deafults)||void 0===T?void 0:T.ShowItemGroupsColumns,!1),this.ArraymodeItemsPerPage=this.InputOrDefault(this.ArraymodeItemsPerPage,null===(O=this.deafults)||void 0===O?void 0:O.ArraymodeItemsPerPage,15)}return e.prototype.ngOnInit=function(){var e=this;if(this.Hierarchy&&!this.UseCustomCells)throw'Es-table error: Per poter utilizzare l\'es-table con [Hierarchy]="true" è richiesto anche [UseCustomCells]="true"';this.ctxMenuSubscription=(this.ContextMenu||this.tableEmptyMenu).open.subscribe((function(t){if(!t.item._sep){var n=!t.item._selected;t.item._selected=!0;var i=e.handleItemsSelection([t.item]);e.changed(),n&&e.onSelectionChanged.emit(i)}}))},e.prototype.ngAfterViewInit=function(){this.EsTdsDirective&&this.EsTdsDirective.length>0&&this.EsThsDirective&&this.EsThsDirective.length>0&&(null==this.UseCustomCells&&(this.UseCustomCells=!0),null==this.HiddenColumns&&this.UseCustomCells&&(this.HiddenColumns=!0),null==this.ColumnsOrdering&&this.UseCustomCells&&(this.ColumnsOrdering=!0),null==this.OrderByColumn&&this.UseCustomCells&&(this.OrderByColumn=!0),null==this.SelectAll&&this.Selection&&(this.SelectAll=!0),null==this.ShiftClick&&this.Selection&&(this.ShiftClick=!0))},e.prototype.InputOrDefault=function(e,t,n){return null!=e&&null!=e?e:null!=t&&null!=t?t:null!=n&&null!=n?n:null},e.prototype.ngOnDestroy=function(){this.ctxMenuSubscription&&this.ctxMenuSubscription.unsubscribe()},e.prototype.ngOnChanges=function(e){return v(this,void 0,void 0,(function(){return y(this,(function(t){return e.SearchView&&this.SearchView&&(this.arrayPulsanti=this.getPagesArray(6,this.SearchView.page,this.SearchView.pages||1)),[2]}))}))},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(e){},e.prototype.changed=function(){this.propagateChange(this.View)},e.prototype.writeValue=function(e){var t;if(this.View=e||null,this.researchInProgress=!1,!this.View&&!this.SearchView)return this.boundSource=this.TMPBoundSource||[],void this.cdr.markForCheck();if(!this.View||void 0===this.View.result||this.View instanceof O?!this.View||void 0===this.View.itemsperpageoverride||this.View instanceof S?!this.SearchView||void 0===this.SearchView.itemsperpageoverride||this.SearchView instanceof S||(this.SearchView.__proto__=new S):this.View.__proto__=new S:this.View.__proto__=new O,this.View&&this.View instanceof O)this.setMode("report"),this.ReportValues=this.View.result,this.ReportValues&&this.reviewReportBindings();else if(this.View&&this.View instanceof S){this.setMode("view");var n=0==((null===(t=this.View.requestedgroups)||void 0===t?void 0:t.length)||0);if(this.View.selection&&(this.View.internalsearchrequest||!n)&&this.UseSelectionCache||(this.clearSelectionCaches(),this.View.selection=new H([]),this.onSelectionChanged.emit(this.View.selection)),this.View.internalsearchrequest=!1,this.SavePreferences)if(this.ngControl.name)if(this.prefService){(i=this.prefService.retrieve(this.ngControl.name))&&(this.View.columns=i.columns,this.View.column_ordering=i.column_ordering)}else console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato");else console.error("Non posso utilizzare le preference senza avere un 'name' per questa tabella");n&&(this.arrayPulsanti=this.getPagesArray(6,this.View.page,this.View.pages||1))}else if(this.View&&null!=this.View.length&&null!=this.View.length){if(this.setMode("array"),this.UseSelectionCache&&this.arraymodeSelection||(this.clearSelectionCaches(),this.arraymodeSelection=new H([]),this.onSelectionChanged.emit(this.arraymodeSelection)),this.SavePreferences)if(this.ngControl.name)if(this.prefService){var i;(i=this.prefService.retrieve(this.ngControl.name))&&(this.arrayColumns=i.columns,this.arrayColumnOrdering=i.column_ordering)}else console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato");else console.error("Non posso utilizzare le preference senza avere un 'name' per questa tabella");this.SearchView&&(this.arrayPulsanti=this.getPagesArray(6,this.SearchView.page,this.SearchView.pages||1))}!this.View||this.View instanceof O||this.finalizeContext(),this.postBoundSourceCalculation()},e.prototype.finalizeContext=function(){var e=this.View,t=this.viewMode&&e.itemsperpageoverride==this.defaultAllPageOverride,n=this.viewMode&&e.itemsperpageoverride!=this.defaultAllPageOverride;this.UseEndlessscroll=this.EndlessScroll&&(this.arrayMode||t||n&&!this.EndlessScrollOnlyForAll);var i=e.groupings&&e.groupings.filter((function(e){return!e.aggregation})).length>0||this.arrayMode&&this.EsThsDirective.some((function(e){return e.thGroup}));if(this.arrayMode&&i&&(this.UseArrayModePaging=!1),this.UseEndlessscroll&&!i){this.addedSlices=[],this.boundSubSources=this.getItemSlices();var r=this.boundSubSources[0];this.TMPBoundSource=r||[],r&&this.addedSlices.push(0)}else this.TMPBoundSource=this.getItemsByMode(!1,!this.internalWriteCall);if(this.Hierarchy&&!i&&this.assignHierarchyLevels(this.TMPBoundSource),this.calculateHash(this.TMPBoundSource),this.TMPBoundSource&&this.RowClassAssigner||this.Hierarchy)for(var s=0;s<this.TMPBoundSource.length;s++){var o=this.TMPBoundSource[s];o._rowClass=this.RowClassAssigner?this.RowClassAssigner(o):"",o._rowClass+=this.Hierarchy?" est-row-lvl-"+o._level:""}},e.prototype.setupPagingInformations=function(){if(this.PagerOptions.ShowCount=!this.HidePagingCount,this.arrayMode&&this.UseArrayModePaging&&!this.SearchView)this.PagerOptions.PagerCount=this.View.length||0,this.PagerOptions.ShowPaging=!this.HidePaging&&this.View.length>10,this.PagerOptions.View=this.View,this.PagerOptions.UsesView=!1;else if(!this.arrayMode||this.UseArrayModePaging&&!this.SearchView){if(this.viewMode){var e=this.MainGroupView||this.View,t=(null==e?void 0:e.groupcount)||(null==e?void 0:e.objectcount);this.PagerOptions.Searches=null!=(null==e?void 0:e.groupcount)&&null!=(null==e?void 0:e.groupcount)?"groups":"items",this.PagerOptions.PagerCount=t||0,this.PagerOptions.View=e,this.PagerOptions.ShowCount=this.PagerOptions.ShowCount||e&&t&&-1!=t,this.PagerOptions.ShowPaging=!this.HidePaging}else if(this.reportMode){var n=this.ReportValues.count;this.PagerOptions.View=this.View,this.PagerOptions.PagerCount=n&&-1==n?this.ReportValues.rows.length:n&&n>0?this.ReportValues.count:0,this.PagerOptions.ShowCount=this.PagerOptions.ShowCount||this.View&&this.View.objectcount&&-1!=this.View.objectcount,this.PagerOptions.ShowPaging=!this.HidePaging&&this.View.pagingavailable}}else this.SearchView?(this.PagerOptions.View=this.SearchView,this.PagerOptions.PagerCount=this.SearchView.objectcount||0):this.PagerOptions.PagerCount=this.View.length||0,this.PagerOptions.ShowCount=this.PagerOptions.ShowCount||this.View&&this.View.length||this.SearchView&&this.SearchView.objectcount&&-1!=this.SearchView.objectcount},e.prototype.clearSelectionCaches=function(){this.itemsCache.clear(),this.groupsCache.clear(),this.exclusionsCache.clear(),this.group_exclusionsCache.clear(),this.i_itemsCache.clear(),this.i_groupsCache.clear(),this.i_exclusionsCache.clear(),this.i_group_exclusionsCache.clear()},e.prototype.getItemsByMode=function(e,t,n){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!1);var i=[];return this.viewMode&&this.View instanceof S?i=this.getViewItemsBySource():this.arrayMode&&(this.View.forEach((function(e){e._item=!0})),this.UseArrayModePaging&&!n?(this.SearchView&&(this.ArraymodeItemsPerPage=this.SearchView.itemsperpageoverride),t&&this.refreshPaging(this.ArraymodeItemsPerPage),i=this.adaptViewToPaging()):i=this.View),e?i.filter((function(e){return e._selected})):i},e.prototype.getViewItemsBySource=function(){var e,t,n,i=this,r=this.View,s=r.groupings?r.groupings.filter((function(e){return!e.aggregation})).length:0;return((null===(e=r.requestedgroups)||void 0===e?void 0:e.length)!=s||0==(null===(t=r.requestedgroups)||void 0===t?void 0:t.length))&&s>0?((n=r.groups).forEach((function(e){e._group=!0,i.cacheAggregations(e)})),n):((n=this.SecondarySource?this.View.items2:this.TertiarySource?this.View.items3:this.View.items).forEach((function(e){e._item=!0})),n)},e.prototype.cacheAggregations=function(e){e._aggregationsCache=new Map;for(var t=e._aggregationsCache,n=0;n<e.aggregations.length;n++){var i=e.aggregations[n];if(t.has(i.column))t.get(i.column).set(i.aggregation,i.value);else{var r=new Map;r.set(i.aggregation,i.value),t.set(i.column,r)}}},e.prototype.getItemSlices=function(){var e=this.getItemsByMode();if(!e)return[];for(var t=[],n=Math.ceil(e.length/this.SliceSize),i=0;i<n;i++){var r=e.slice(i*this.SliceSize,i*this.SliceSize+this.SliceSize);t.push(r)}return t},e.prototype.onScroll=function(e){var t=this,n=e.target.offsetHeight,i=e.target.scrollHeight;if(e.target.scrollTop>i-n-200){var r=Math.floor(this.TMPBoundSource.length/100);this.boundSubSources[r]&&-1==this.addedSlices.indexOf(r)&&(this.calculateHash(this.boundSubSources[r]),this.TMPBoundSource=this.TMPBoundSource.concat(this.boundSubSources[r]),this.addedSlices.push(r),setTimeout((function(){t.postBoundSourceCalculation()})))}},e.prototype.postBoundSourceCalculation=function(){var e=this;this.RowContexts=[],this.OrderDirectives=[],this.lastSelectedItemID=null,this.EsThsDirective&&this.EsThsDirective.length>0&&this.EsTdsDirective&&this.EsTdsDirective.length>0?this.internalPostBoundSource():(this.cdr.detectChanges(),setTimeout((function(){e.internalPostBoundSource()})))},e.prototype.internalPostBoundSource=function(){var e=this.View,t=this.EsThs&&this.EsThs.length>0?this.EsThs.toArray():this.EsThsDirective&&this.EsThsDirective.length>0?this.EsThsDirective.toArray():[],n=this.EsTds&&this.EsTds.length>0?this.EsTds.toArray():this.EsTdsDirective&&this.EsTdsDirective.length>0?this.EsTdsDirective.toArray():[];if(this.eventuallyReviewDynamicColumns(),this.bindDisplayToLoadedItemsOrGroups(e),this.setupPagingInformations(),(this.viewMode||this.arrayMode)&&this.UseCustomCells){var i=this.viewMode?e:null,r=this.viewMode?b(i.items||[],i.groups||[]):e,s=this.viewMode?i.selection:this.arraymodeSelection,o=this.evaluateHeadersGroupingInfos(t);this.arrayMode&&(this.arrayModeReviewOrderings(),this.arrayModeReviewGroupings(o.leafs)),this.reviewColumnsList(o.leafs),this.moveFixedColumnsAtTheBeginning(o.leafs,n),this.alignHeadersOrdering(o.leafs,i),this.alignColumnsIfLoadedView(i),this.refreshColumnsVisibility(o.leafs,n,i),this.evaluatePinnedColumnsWidth(),this.generateDefaultOrder(o.leafs,i),this.evaluateHeaderGroups(o),this.evaluateRowThs(o.leafs),this.evaluateRowTds(o.leafs,n),this.applyOrdering(i,!0),this.MoveTemporaryVariablesToRealOnes(),this.evaluateSelection(r,s),this.ResearchNeeded&&(this.changed(),this.emitSearchRequest(!1),this.ResearchNeeded=!1)}else if((this.viewMode||this.arrayMode)&&!this.UseCustomCells){var a=this.viewMode?e.items:e;s=this.viewMode?e.selection:this.arraymodeSelection;this.evaluateSelection(a,s)}this.cdr.markForCheck(),this.FirstBind=!1},e.prototype.arrayModeReviewOrderings=function(){var e=this;this.arrayOrders.length>0&&this.arrayOrders.forEach((function(t){e.boundSource=e.boundSource.sort((function(e,n){return(e[t.id]>n[t.id]?1:-1)*("DESC"==t.order?-1:1)}))}))},e.prototype.arrayModeReviewGroupings=function(e){if(0!=e.length&&!this.isEsTh(e[0])){for(var t=[],n=[],i=0;i<e.length;i++){var r=e[i];r.thGroup?t.push(new A(r.th,0,"")):r.thAggregation&&(n=b(n,this.getGroupAggregations(r)))}t.length>0&&(this.rgGroupCache.clear(),this.rgItemCache.clear(),this.rgChildGroupsCache.clear(),this.ArrayGrouping=!0,this.boundSource=this.getGroupsRecursive(t,0,this.boundSource,n,null))}},e.prototype.getGroupsRecursive=function(e,t,n,i,r){0==t&&n.forEach((function(e){return e._visible=!1}));var s=e[t],o=[],a=e.length==t+1,l=this.groupBy(n,s.column),c=function(n){var c=l[n],p=new A(s.column,c.length,n);p.aggregations=h.generateAggregations(c,i);var d=p;if(d._group=!0,d._expanded=!1,r?(d._parent=r._thisKey,d._parentRoute=r._thisRoute,d._thisRoute=b(r._thisRoute,[{column:p.column,value:p.value}]),d._thisKey=r._thisKey+p.value,d._grouplevel=r._grouplevel+1):(d._thisRoute=[{column:p.column,value:p.value}],d._thisKey=p.value,d._grouplevel=0),0==t&&(d._visible=!0),h.calculateHash([d]),h.cacheAggregations(d),o.push(d),h.rgGroupCache.set(d._thisKey,d),a)c.forEach((function(e){return e._thisKey=d._thisKey})),o.push.apply(o,b(c)),h.rgItemCache.set(d._thisKey,c);else{var u=h.getGroupsRecursive(e,t+1,c,i,d),g=u.filter((function(e){return e._group&&e._parent==d._thisKey}));d._groupscount=g.length,o.push.apply(o,b(u)),h.rgChildGroupsCache.set(d._thisKey,g)}},h=this;for(var p in l)c(p);return o},e.prototype.generateAggregations=function(e,t){for(var n=[],i="",r=null,s=null,o=null,a=null,l=0;l<t.length;l++){var c=t[l];if(r=c.column){switch(c.datatype){case"string":s=e.map((function(e){return e[r].toString()}));break;case"date":o=e.map((function(e){return new Date(e[r]).getTime()}));break;case"number":a=e.map((function(e){return parseFloat(e[r])}))}switch(c.aggregation){case"max":switch(c.datatype){case"string":i=s.sort().reverse()[0];break;case"date":i=new Date(Math.max.apply(Math,b(o))).toString();break;case"number":i=Math.max.apply(Math,b(a)).toString()}break;case"min":switch(c.datatype){case"string":i=s.sort()[0];break;case"date":i=new Date(Math.min.apply(Math,b(o))).toString();break;case"number":i=Math.min.apply(Math,b(a)).toString()}break;case"sum":switch(c.datatype){case"string":i=s.join(", ");break;case"date":i="";break;case"number":i=a.reduce((function(e,t){return e+t}),0).toString()}}n.push(new G(c.column,c.aggregation,i))}}return n},e.prototype.groupBy=function(e,t){for(var n={},i=0;i<e.length;i++){var r=e[i];(n[r[t]]=n[r[t]]||[]).push(r)}return n},e.prototype.bindDisplayToLoadedItemsOrGroups=function(e){var t,n;if(0!=this.TMPBoundSource.length){if(this.arrayMode||!this.UseCustomCells)return this.boundSource=this.TMPBoundSource,void(this.BaseItemsCount=(null==e?void 0:e.objectcount)||e.length);var i=(null===(n=null===(t=e.groupings)||void 0===t?void 0:t.filter((function(e){return!e.aggregation})))||void 0===n?void 0:n.length)||0;if(0==i)return this.boundSource=this.TMPBoundSource,void(this.BaseItemsCount=e.objectcount);this.handleNewDataOnRowGrouping(e,i)}else this.BaseItemsCount=0},e.prototype.handleNewDataOnRowGrouping=function(e,t){var n,i,r,s,o,a,l,c=this;if(0==((null===(a=e.requestedgroups)||void 0===a?void 0:a.length)||0)){this.boundSource=this.TMPBoundSource,this.rgGroupCache=new Map,this.rgItemCache=new Map,this.rgChildGroupsCache=new Map,this.TMPBoundSource.forEach((function(e){e._thisRoute=e._group?[{column:e.column,value:e.value}]:[],e._thisKey=e._group?e.value:null,e._grouplevel=0,c.rgGroupCache.set(e._thisKey,e)}));var h=this.TMPBoundSource[0];this.MainGroupView=Object.assign({},e),this.groupSearchRequestsCache=[{path:"",route:[{column:h.column,value:h.value}],view:this.MainGroupView,group_column:this.TMPBoundSource[0].column}],this.BaseItemsCount=e.objectcount}else{for(var p,d,u=e.requestedgroups.length!=t,g=this.boundSource,m=0,f="",v=[],y=function(t){var n=e.requestedgroups[t];f+=n.value,v.push({column:n.column,value:n.value}),m=g.findIndex((function(e,t){return t>=m&&e._group&&e.column==n.column&&e.value==n.value}))},C=0;C<e.requestedgroups.length;C++)y(C);if(u){try{for(var x=w(this.rgChildGroupsCache.keys()),S=x.next();!S.done;S=x.next()){(T=S.value).startsWith(f)&&this.rgChildGroupsCache.delete(T)}}catch(e){n={error:e}}finally{try{S&&!S.done&&(i=x.return)&&i.call(x)}finally{if(n)throw n.error}}try{for(var I=w(this.rgItemCache.keys()),P=I.next();!P.done;P=I.next()){var T;(T=P.value).startsWith(f)&&this.rgItemCache.delete(T)}}catch(e){r={error:e}}finally{try{P&&!P.done&&(s=I.return)&&s.call(I)}finally{if(r)throw r.error}}this.rgChildGroupsCache.set(f,[]),d=this.rgChildGroupsCache.get(f)}else this.rgItemCache.set(f,[]),p=this.rgItemCache.get(f);this.TMPBoundSource.forEach((function(t){t._parent=f,t._parentRoute=v,t._thisRoute=t._group?b(v,[new U(t.column,t.value)]):[],t._thisKey=t._group?f+t.value:f,u?(t._grouplevel=e.requestedgroups.length,c.rgGroupCache.set(t._thisKey,t),d.push(t)):p.push(t)})),u&&e.savedstate&&(this.boundSource=this.boundSource.filter((function(e){return!(e._item||e._thisRoute.length>v.length)})),this.groupSearchRequestsCache=this.groupSearchRequestsCache.filter((function(e){return!(e.route.length>v.length)}))),this.boundSource=this.boundSource.filter((function(e){return!(e._parent==f)}));var O=this.boundSource[m];u&&(O._groupscount=null===(l=this.View)||void 0===l?void 0:l.groupcount),(o=this.boundSource).splice.apply(o,b([m+1,0],this.TMPBoundSource));this.boundSource.splice(m+1+0,0,this.getGroupSeparator(e,f,v,e.requestedgroups.length,u?"groups":"items"));var _={path:f,route:v,view:Object.assign({},e),group_column:u?this.TMPBoundSource[0].column:""},M=this.groupSearchRequestsCache.findIndex((function(e){return e.path==_.path&&e.group_column==_.group_column}));-1==M?this.groupSearchRequestsCache.push(_):this.groupSearchRequestsCache.splice(M,1,_)}},e.prototype.MoveTemporaryVariablesToRealOnes=function(){this.RowTDs=this.TMPRowTDs,this.RowTHs=this.TMPRowTHs,this.RowThGroups=this.TMPRowThGroups?this.TMPRowThGroups.reverse():null,this.Columns.Visibile=this.RowTHs.filter((function(e){return e.Visible})).length,this.Columns.VisibleUnpinned=this.RowTHs.filter((function(e){return e.Visible&&!e.Pinned})).length,this.Columns.Global=this.Columns.VisibleUnpinned+(this.HasPinnedColumns?1:0)+(this.Selection?1:0)+(this.Removal?1:0)+(this.Export||this.HiddenColumns||this.ColumnsOrdering||this.CornerMenuOptions?1:0)},e.prototype.setSelectionStatus=function(e,t){this.handleItemsSelection(e,t),this.cdr.markForCheck()},e.prototype.eventuallyReviewDynamicColumns=function(){if(this.TMPBoundSource&&0!=this.TMPBoundSource.length&&(!!this.TMPBoundSource[0].properties&&!(!this.FirstBind&&this.DynamicRowColumnsDefinition&&this.DynamicRowColumnsDefinition.length>0)))if(this.DynamicRowColumnsDefinition&&0!=this.DynamicRowColumnsDefinition.length)this.UserDefinedDynamicCols=!0;else{var e=this.TMPBoundSource[0].properties;for(var t in this.DynamicRowColumnsDefinition=[],e)this.DynamicRowColumnsDefinition.push(new I(t,t));this.UserDefinedDynamicCols=!1}},e.prototype.reviewColumnsList=function(e){var t=this;if(this.TMPColumnsList=[],0!=e.length){for(var n=function(t){var n=e[t];if(i.isEsTh(n)){if(!n.ID)return"continue";n.OrderBy=i.OrderByColumn,(i.HiddenColumns||n.Visible)&&i.TMPColumnsList.push(new B(n.ID,n.Description,n.Visible,n.Fixed,null,null,null))}else{var r=n.th;if(!r)return"continue";if(i.HiddenColumns||n.thVisible){var s=i.ColumnsList&&0!=i.ColumnsList.length&&i.ColumnsList.find((function(e){return e.id==r}))?i.ColumnsList.find((function(e){return e.id==r})).pinned:null;i.TMPColumnsList.push(new B(r,null,n.thVisible,n.thFixed||n.thGroup,null==s?n.thPinned:s,n.thPinnedWidth,n.Template))}}},i=this,r=0;r<e.length;r++)n(r);this.ColumnsList=[],this.TMPColumnsList.forEach((function(e){t.ColumnsList.push(Object.assign({},e))}))}},e.prototype.moveFixedColumnsAtTheBeginning=function(e,t){for(var n={},i=0,r=0,s={},o={},a=0;a<this.ColumnsList.length;a++){var l=this.ColumnsList[a];s[l.id]=l}for(var c=0;c<e.length;c++){var h=e[c];this.isEsTh(h)?(n[h.ID]=h,h.Fixed&&(c!=r+i&&this.arrayMove(e,c,r+i),i++)):(n[h.th]=h,h.thPinned=!s[h.th]&&h.thPinned||s[h.th]&&s[h.th].pinned,h.thPinned&&(c!=r&&this.arrayMove(e,c,r),r++),(h.thFixed||h.thGroup)&&(c!=r+i&&this.arrayMove(e,c,r+i),i++))}if(!this.isEsTh(e[0])&&!this.isEsTd(t[0])){for(c=0;c<e.length;c++)o[e[c].th]=c;var p=new Array(e.length);for(c=0;c<t.length;c++){var d=t[c];p[o[d.td]]=d}this.HasPinnedColumns=r>0}},e.prototype.evaluatePinnedColumnsWidth=function(){if(this.HasPinnedColumns){this.PinnedContainerWidth=0;for(var e=0;e<this.ColumnsList.length;e++){var t=this.ColumnsList[e];t.pinned&&t.visible&&(this.PinnedContainerWidth+=t.pinnedWidth)}this.PinnedContainerWidth+=this.Selection?25:0}},e.prototype.arrayMove=function(e,t,n){if(n>e.length-1||t>e.length-1||n<0||t<0)throw"Gli indici passati non fanno riferimento a una posizione dell'array. Length: "+e.length+" Old:"+t+" New: "+n;e.splice(n,0,e.splice(t,1)[0])},e.prototype.alignColumnsIfLoadedView=function(e){var t=this,n=this.viewMode&&e.savedstate,i=[];if(this.ColumnsList&&0!=this.ColumnsList.length){var r=this.viewMode?e.columns:this.arrayColumns;if(this.ColumnsList.forEach((function(e){var t=r.filter((function(t){return t.replace("§","")==e.id}));1==t.length&&(e.pinned=t[0].startsWith("§")),e.visible&&0==r.length?i.push(e.id):1!=t.length||e.visible?0==t.length&&e.visible&&(e.visible=!1):e.visible=!0})),0==r.length&&(this.viewMode?e.columns=i:this.arrayColumns=i),this.viewMode&&e.savedstate&&this.ColumnsOrdering&&e.column_ordering.length>0){var s=[];e.column_ordering.forEach((function(e){t.ColumnsList.forEach((function(t){t.id==e&&s.push(t)}))})),this.ColumnsList=s}this.viewMode&&(e.savedstate=!1),n&&this.changed()}},e.prototype.thOrderChanged=function(e,t){if(this.viewMode||this.arrayMode){if(this.OrderByColumn){var n=this.viewMode?this.View.orders:this.arrayOrders,i=!0,r=null;!n&&this.viewMode?this.View.orders=[]:!n&&this.arrayMode&&(this.arrayOrders=[]);for(var s=0;s<n.length;s++){var o=n[s];o.id==e&&(t?(o.order=t,i=!1):r=s)}null!=r?n.splice(r,1):i&&(this.MultipleOrderingDirectives?n.push(new x(e,t)):this.viewMode?this.View.orders=[new x(e,t)]:this.arrayMode&&(this.arrayOrders=[new x(e,t)])),this.onOrderChanged.emit({id:e,order:t}),this.viewMode?this.groupSearchRequestsCache.length>0?this.emitRowGroupingSearches(e,n):this.emitSearchRequest(!1):this.arrayMode&&this.internalWriteValue()}}else console.warn("Order changed on a table not in viewMode or Array mode. Operation not supported")},e.prototype.emitSearchRequest=function(e,t){this.viewMode&&!t&&(this.View.internalsearchrequest=!0,this.changed()),t&&(e&&(t.page=1),t.internalsearchrequest=!0),this.researchInProgress=!0,this.onSearchRequest.emit(t||e)},e.prototype.refreshColumnsVisibility=function(e,t,n){for(var i=[],r={},s={},o=0;o<this.ColumnsList.length;o++){var a=this.ColumnsList[o];s[a.id]=a,a.visible&&i.push((a.pinned?"§":"")+a.id)}if(n?n.columns=i:this.arrayColumns=i,e)for(var l=0;l<e.length;l++){var c=e[l];this.isEsTh(c)?(c.Visible=c.Fixed||(s[c.ID]?s[c.ID].visible:c.Visible),c.Fixed&&(r[c.ID]=!0)):(c.thVisible=c.thFixed||(s[c.th]?s[c.th].visible:c.thVisible),(c.thFixed||c.thGroup)&&(r[c.th]=!0))}if(t)for(l=0;l<t.length;l++){var h=t[l];this.isEsTd(h)?h.Visible=r[h.ID]||(s[h.ID]?s[h.ID].visible:h.Visible):h.tdVisible=r[h.td]||(s[h.td]?s[h.td].visible:h.tdVisible)}this.changed()},e.prototype.alignHeadersOrdering=function(e,t){for(var n=t?t.orders:this.arrayOrders,i=0;i<e.length;i++){var r=e[i];if(this.isEsTh(r)){r.Order=null;for(var s=0;s<n.length;s++){(a=n[s]).id==r.ID&&(r.Order=a.order)}}else{r.thOrder=null;for(var o=0;o<n.length;o++){var a;(a=n[o]).id==r.th&&(r.thOrder=a.order)}}}},e.prototype.evaluateRowTds=function(e,t){if(0!=t.length){for(var n={},i={},r=0;r<this.ColumnsList.length;r++){var s=this.ColumnsList[r];i[s.id]=s}for(var o=0;o<e.length;o++){var a=e[o];n[this.isEsTh(a)?a.ID:a.th]=a}this.TMPRowTDs={};var l={};for(o=0;o<t.length;o++){var c=t[o];if(this.isEsTd(c)){if(!(a=n[c.ID]))throw"ID dell'oggeto EsTd non compatibile con gli ID dicharati negli EsTh: "+c.ID;a._referenced=!0;var h=this.isEsTh(a)&&a.Fixed||!this.isEsTh(a)&&(a.thFixed||a.thGroup),p={GroupAggregation:!1,GroupHeader:!1,Wraps:!0,ID:c.ID,Visible:c.Visible,Class:c.Class,Content:c.Content,RouterLink:c.RouterLink,Template:c.Template},d=c.Context;this.TMPRowTDs[d]?h?this.TMPRowTDs[d].splice(0+l[d]++,0,p):this.TMPRowTDs[d].push(p):(this.RowContexts.push(d),this.TMPRowTDs[d]=[p],l[d]=h?1:0)}else for(var u=0;u<this.boundSource.length;u++){var g=this.boundSource[u],m=(d=g._hash,c.td);if(!(a=n[c.td]))throw"ID dell'oggeto EsTd non compatibile con gli ID dicharati negli EsTh: "+c.td;if(a._referenced=!0,c.tdIf||!this.isEsTh(a)&&a.thGroup){var f=a;h=this.isEsTh(a)&&a.Fixed||!this.isEsTh(a)&&(a.thFixed||a.thGroup||a.thPinned),p=g._item?{LeftBorder:f._lbord,RightBorder:f._rbord,ID:m,Pinned:i[c.td].pinned,PinnedWidth:f.thPinnedWidth,GroupHeader:!1,GroupAggregation:!1,Visible:i[c.td].visible,Wraps:!1,Class:c.tdClass,Template:f.thGroup&&!this.ShowItemGroupsColumns?null:c.Template}:{LeftBorder:f._lbord,RightBorder:f._rbord,ID:m,Pinned:i[c.td].pinned,PinnedWidth:f.thPinnedWidth,GroupHeader:f.thGroup,GroupAggregation:!!f.thAggregation,Visible:i[c.td].visible,Wraps:!1,Class:f.thGroupClass||"",Content:this.getGroupCellDisplay(g,m,a)};this.TMPRowTDs[d]?this.TMPRowTDs[d].push(p):(this.RowContexts.push(d),this.TMPRowTDs[d]=[p],l[d]=h?1:0)}}}if(0!=this.TMPBoundSource.length){var v=[];for(o=0;o<e.length;o++){(a=e[o])._referenced||v.push(this.isEsTh(a)?a.ID:a.th)}if(v.length>0)throw"L'ID di uno o più EsTh non hanno alcun EsTd associato: "+v.join(", ")}}},e.prototype.evaluateRowThs=function(e){var t;if(0!=e.length){for(var n={},i=this.View,r=this.viewMode&&(i&&!i.groupings||0==i.groupings.length),s=0;s<this.ColumnsList.length;s++){var o=this.ColumnsList[s];n[o.id]=o}this.TMPRowTHs=[];var a=0;for(s=0;s<e.length;s++){var l=e[s],c=void 0;if(this.isEsTh(l))c={Pinned:!1,ID:l.ID,Visible:l.Visible,Class:l.Class,Order:l.Order,Orderable:l.Orderable,Template:null,Content:l.Description,Wrap:!1},l.Fixed?this.TMPRowTHs.splice(0+a++,0,c):this.TMPRowTHs.push(c);else if(l.thIf||l.thGroup){var h=(l.thClass||"")+(l.thGroup?" est-col-min":"");if(c={Pinned:n[l.th].pinned,PinnedWidth:l.thPinnedWidth,ID:l.th,Visible:l.thVisible,Class:h,Order:l.thOrder,Orderable:l.thOrderable,Template:l.Template,Content:null,Wrap:!1,LeftBorder:l._lbord,RightBorder:l._rbord},this.TMPRowTHs.push(c),r&&(l.thAggregation||l.thGroup)){var p=this.getGroupAggregations(l);i.groupings?(t=i.groupings).push.apply(t,b(p)):i.groupings=p,this.ResearchNeeded=!0}}}}},e.prototype.evaluateHeadersGroupingInfos=function(e){for(var t={},n={},i=0;i<e.length;i++){var r=e[i];this.isEsTh(r)||(n[r.th]=r,r.thParent&&!t[r.thParent]&&(t[r.thParent]=!0))}var s=0,o=[];for(i=0;i<e.length;i++){r=e[i];if(this.isEsTh(r))o.push(r);else if(!t[r.th]){o.push(r);var a=this.jumpsToFinalParent(r,n);s=a>s?a:s}}return{leafs:o,groupingLevel:s,parentsCache:t,thsCache:n}},e.prototype.evaluateHeaderGroups=function(e){if(0!=e.groupingLevel){for(var t=[],n=e.leafs.filter((function(e){return e.thVisible&&!e.thPinned})),i=0;i<e.groupingLevel;i++){t.push([]);for(var r=0;r<n.length;r++)t[i].push("")}var s=[];for(r=0;r<this.OrderDirectives.length;r++){var o=e.thsCache[this.OrderDirectives[r]];o.thVisible&&!o.thPinned&&s.push(o)}var a="";for(r=0;r<s.length;r++){var l=s[r],c=r-1>=0?s[r-1]:null;l._lbord=l.thParent!=a,l._rbord=n.length==r+1,c&&(c._rbord=l.thParent!=a),a=l.thParent;for(i=0;i<e.groupingLevel;i++){var h=l.thParent;h&&!l.thPinned&&(t[i][r]=h,l=e.thsCache[h])}}a="";var p=0;this.TMPRowThGroups=[];for(i=0;i<t.length;i++){var d=[];this.TMPRowThGroups.push(d),(this.Selection||this.HasPinnedColumns)&&d.push({Span:1,Template:null,Pinned:this.HasPinnedColumns});for(var u=0;u<t[i].length;u++){var g=t[i][u];g==a?p++:(p>0&&d.push({Span:p,Template:a?e.thsCache[a].Template:null,Borders:!!a}),p=1,a=g)}d.push({Span:p,Template:a?e.thsCache[a].Template:null,Borders:!!a}),this.Removal&&d.push({Span:1,Template:null}),(this.Export||this.HiddenColumns||this.ColumnsOrdering||this.CornerMenuOptions)&&d.push({Span:1,Template:null}),p=0,a=""}}},e.prototype.jumpsToFinalParent=function(e,t){var n=0,i=null;do{(i=e.thParent)&&n++,e=t[i]}while(i);return n},e.prototype.getGroupAggregations=function(e){var t=[];return e.thAggregation?this.getEsThDirectiveListOfAggregations(e).forEach((function(n){var i=n.format&&["small","long","verylong"].includes(n.format),r=n.format&&n.format.startsWith("F")&&!Number.isNaN(n.format.charAt(1))&&2==n.format.length;if(!i&&!r&&n.format)throw"Le aggergazioni supportate dall'es-table sono solo 'small', 'long', 'verylong' per le date e 'F0-9' per i numeri";t.push(new z(e.th,n.func,i?"date":r?"number":"string"))})):e.thGroup&&t.push(new z(e.th,null)),t},e.prototype.getEsThDirectiveListOfAggregations=function(e){if(!e.thAggregation)return[];if(e._thAggregations)return e._thAggregations;var t=[],n=e.thAggregation.match(/{[a-zA-Z0-9\/:]*}/gi);return n?(n.forEach((function(e){var n=e.split(":"),i=e,r="";n.length>0&&(i=n[0].substr(1),r=n[1].substr(0,n[1].length-1)),t.push({func:i,format:r,match:e})})),e._thAggregations=t,t):[]},e.prototype.generateDefaultOrder=function(e,t){if(0!=e.length){var n=this.viewMode?t.column_ordering:this.arrayColumnOrdering;if(n&&0!=n.length)this.OrderDirectives=n;else for(var i=0;i<e.length;i++){var r=e[i],s=this.isEsTh(r)?r.ID:r.th;this.OrderDirectives.push(s)}}},e.prototype.applyOrdering=function(e,t){var n=this,i=[];if(t){this.OrderDirectives.forEach((function(e){var t=n.TMPRowTHs.filter((function(t){return t.ID==e}))[0];t&&i.push(t)})),this.TMPRowTHs=i;for(var r=function(e){var t=s.TMPRowTDs[s.RowContexts[e]],n=[];s.OrderDirectives.forEach((function(e){var i=t.filter((function(t){return t.ID==e}))[0];n.push(i)})),s.TMPRowTDs[s.RowContexts[e]]=n},s=this,o=0;o<this.RowContexts.length;o++)r(o)}this.viewMode?e.column_ordering=this.OrderDirectives:this.arrayColumnOrdering=this.OrderDirectives,this.changed()},e.prototype.getGroupSeparator=function(e,t,n,i,r){var s=new N(i,n,t,Object.assign({},e),r);return s.buttons=this.getPagesArray(6,e.page,e.pages),this.calculateHash([s]),s},e.prototype.addToPageGroup=function(e,t){this.goToPageGroup(t.view.page+e,t)},e.prototype.goToPageGroup=function(e,t){var n=t.view;0===e||e>n.pages||(n.page=e,t.buttons=this.getPagesArray(6,n.page,n.pages),this.emitSearchRequest(!1,n))},e.prototype.emitRowGroupingSearches=function(e,t){var n=this,i=this.groupSearchRequestsCache.filter((function(t){return t.group_column==e})).map((function(e){return e.view}));i&&0!=i.length||(i=this.groupSearchRequestsCache.filter((function(e){return!e.group_column})).map((function(e){return e.view}))),i&&0!=i.length&&i.forEach((function(e){e.orders=t,e.savedstate=!0,n.emitSearchRequest(!1,e)}))},e.prototype.getGroupCellDisplay=function(e,t,n){var i=this;if(e._sep)return"";var r=n.thAggregation;if(e.column==t){var s=e._groupscount?" - "+e._groupscount+" "+this.lc.loc("Groups"):"";return e.value+" ("+e.count+s+")"}var o=e._aggregationsCache.get(t);return o?(this.getEsThDirectiveListOfAggregations(n).forEach((function(e){r=r.replace(e.match,i.formatAggregationValue(o.get(e.func),e.format))})),r):""},e.prototype.handleGroupClick=function(e){var t=this.View,n=e;if(n._expanded=!n._expanded,!this.ArrayGrouping){if(n._expanded){if(t.itemsperpageoverride=15,t.requestedgroups)n._grouplevel?(t.requestedgroups=[],n._parentRoute.forEach((function(e){t.requestedgroups.push(new k(e.column,e.value))})),t.requestedgroups.push(new k(e.column,e.value))):t.requestedgroups=[new k(e.column,e.value)];else t.requestedgroups=[new k(e.column,e.value)];this.changed(),this.emitSearchRequest(!0)}else{var i=(n._parent||"")+e.value;this.boundSource=this.boundSource.filter((function(e){return!e._parent||!e._parent.startsWith(i)})),this.groupSearchRequestsCache=this.groupSearchRequestsCache.filter((function(e){return e.path!=i}))}return!0}this.boundSource.filter((function(e){return e._group&&(n._expanded&&e._parent==n._thisKey||!n._expanded&&e._parent&&e._parent.startsWith(n._thisKey))||e._item&&(n._expanded&&e._thisKey==n._thisKey||!n._expanded&&e._thisKey.startsWith(n._thisKey))})).forEach((function(e){e._visible=n._expanded,e._group&&(e._expanded=!1)}))},e.prototype.formatAggregationValue=function(e,t){if(!t)return e;if(!Number.isNaN(e)&&(!t||t.startsWith("F"))&&t.startsWith("F")&&!Number.isNaN(t.substr(1)))return parseFloat(e).toFixed(parseInt(t.substr(1)));var n=null;try{n=this.dateExts.getDateConvertion(e)}catch(e){}return n?this.dateExts.getFormatted(n,"small"==t,"verylong"==t):e},e.prototype.sendUp=function(e){var t=this.TMPColumnsList.indexOf(e);if(!this.TMPColumnsList[t-1].fixed&&!this.TMPColumnsList[t-1].pinned){this.utiExts.swap(this.TMPColumnsList,t,t-1);var n=[];this.TMPColumnsList.forEach((function(e){n.push(Object.assign({},e))})),this.TMPColumnsList=n}},e.prototype.sendDown=function(e){var t=this.TMPColumnsList.indexOf(e);this.utiExts.swap(this.TMPColumnsList,t,t+1);var n=[];this.TMPColumnsList.forEach((function(e){n.push(Object.assign({},e))})),this.TMPColumnsList=n},e.prototype.pinOrUnpinColumn=function(e){for(var t=this.TMPColumnsList.indexOf(e),n=0;n<this.TMPColumnsList.length;n++)if(!this.TMPColumnsList[n].pinned){this.arrayMove(this.TMPColumnsList,t,n);break}e.pinned=!e.pinned},e.prototype.columnClicked=function(e){this.lastSelectedItemID=e.id,this.HiddenColumns&&!e.fixed&&(e.visible=!e.visible,this.updateGlobalColVisCheck())},e.prototype.resetColumnVisSelection=function(){var e=this;this.TMPColumnsList=[],this.TMPColumnsList=[],this.ColumnsList.forEach((function(t){e.TMPColumnsList.push(Object.assign({},t))}));var t=[];this.ColumnsOrdering&&(this.OrderDirectives.forEach((function(n){var i=e.TMPColumnsList.filter((function(e){return e.id==n}))[0];i&&t.push(i)})),this.TMPColumnsList=t),this.updateGlobalColVisCheck()},e.prototype.refreshColumnOrdering=function(){this.OrderDirectives=[];for(var e=0;e<this.ColumnsList.length;e++)this.OrderDirectives.push(this.ColumnsList[e].id)},e.prototype.updateGlobalColVisCheck=function(){this.globalColVisCheck=this.TMPColumnsList.every((function(e){return e.visible}))},e.prototype.confirmColumnVisibilitySelection=function(){var e=this;if(this.TMPColumnsList.every((function(e){return!e.visible})))return!1;var t=this.viewMode?this.View:null;if(this.ColumnsList=[],this.TMPColumnsList.forEach((function(t){e.ColumnsList.push(Object.assign({},t))})),this.refreshColumnOrdering(),this.applyOrdering(t,!1),this.refreshColumnsVisibility(null,null,t),this.SavePreferences){if(!this.ngControl.name)return console.error("Non posso utilizzare le preference senza avere un 'name' per la tabella"),!1;if(!this.prefService)return console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato"),!1;var n=this.arrayMode?this.arrayColumns:t.columns,i=this.arrayMode?this.arrayColumnOrdering:t.column_ordering,r={columns:JSON.parse(JSON.stringify(n)),column_ordering:JSON.parse(JSON.stringify(i))};this.prefService.store(this.ngControl.name,r)}return this.viewMode?setTimeout((function(){e.emitSearchRequest(!1)})):this.arrayMode&&setTimeout((function(){e.internalWriteValue()})),this.lastSelectedItemID=null,!0},e.prototype.globalColVisCheckChanged=function(){var e=this;this.TMPColumnsList.forEach((function(t){t.fixed||(t.visible=e.globalColVisCheck)}))},e.prototype.assignHierarchyLevels=function(e){if(e&&e.length)if(this.ParentKey||this.OwnKey||(void 0!==e[0].parentid&&(this.ParentKey="parentid"),void 0!==e[0].id&&(this.OwnKey="id")),this.ParentKey&&this.OwnKey){var t=1,n=0;do{n=this.assignLevel(e,t),t++}while(n>0)}else console.error("Per utilizzare il sistema in modalità gerarchica è obbligatorio specificare sia ParentKey che OwnKey. Fallback a sistema non gerarchico")},e.prototype.assignLevel=function(e,t){for(var n=0,i=0;i<e.length;i++){var r=e[i];if(r[this.ParentKey]||1!=t){if(r[this.ParentKey]&&t>1)for(var s=0;s<e.length;s++){var o=e[s];if(o[this.OwnKey]==r[this.ParentKey]&&o._level==t-1){r._level=t,o._expanded=this.StartsExpanded,o.parent=!0,r._visible=this.StartsExpanded,n++;break}}}else r._level=1,r._visible=!0,r._expanded=this.StartsExpanded,n++}return n},e.prototype.expandParent=function(e){for(var t=0;t<this.boundSource.length;t++){var n=this.boundSource[t];if(n[this.OwnKey]==e){n._expanded=!0;for(var i=0;i<this.boundSource.length;i++){var r=this.boundSource[i];r[this.ParentKey]==e&&(r._visible=!0)}return}}},e.prototype.collapseParent=function(e){for(var t=0;t<this.boundSource.length;t++){var n=this.boundSource[t];if(n[this.OwnKey]==e)return n._expanded=!1,void this.collapseChildOfParent(e)}},e.prototype.collapseChildOfParent=function(e){for(var t=0;t<this.boundSource.length;t++){var n=this.boundSource[t];n[this.ParentKey]!=e||n.parent?n[this.ParentKey]==e&&n.parent&&(n._expanded=!1,n._visible=!1,this.collapseChildOfParent(n[this.OwnKey])):n._visible=!1}},e.prototype.evaluateSelection=function(e,t){t&&this.handleSelectionEvaluation(e,t)},e.prototype.handleSelectionEvaluation=function(e,t){for(var n=0;n<e.length;n++){var i=e[n],r=i._hash,s=i._group?null:this.getItemGroup(i);this.rehidrateCache(i),i._item?t.all?i._selected=!this.exclusionsCache.has(r)&&(!this.groupsCache.has(null==s?void 0:s._hash)&&this.itemsCache.has(r)||!this.group_exclusionsCache.has(null==s?void 0:s._hash)):i._selected=!this.exclusionsCache.has(r)&&(this.groupsCache.has(null==s?void 0:s._hash)||this.itemsCache.has(r)||"included"==this.parentTreeStatus(s)&&!this.group_exclusionsCache.has(null==s?void 0:s._hash)):i._group&&(t.all?i._selected=!this.group_exclusionsCache.has(r)&&"excluded"!=this.parentTreeStatus(i):i._selected=this.groupsCache.has(r)||"included"==this.parentTreeStatus(i)&&!this.group_exclusionsCache.has(r))}if(this.globalCheck=this.boundSource.filter((function(e){return e._group||e._item})).every((function(e){return e._selected})),this.canSelectAll=t.count>0&&this.SelectAll,this.arrayMode){var o=this.selectedObjects;this.finalizeSelectionInformations(t),this.selectedObjects!=o&&this.onSelectionChanged.emit(t)}},e.prototype.rehidrateCache=function(e){var t=e._hash;this.itemsCache.has(t)&&this.itemsCache.set(t,e),this.group_exclusionsCache.has(t)&&this.group_exclusionsCache.set(t,e),this.groupsCache.has(t)&&this.groupsCache.set(t,e),this.exclusionsCache.has(t)&&this.exclusionsCache.set(t,e)},e.prototype.parentTreeStatus=function(e){if(!e)return"none";var t=this.rgGroupCache.get(e._parent);return t?this.group_exclusionsCache.has(t._hash)?"excluded":this.groupsCache.has(t._hash)?"included":this.parentTreeStatus(t):"none"},e.prototype.globalCheckChanged=function(e){void 0===e&&(e=null);var t=this.boundSource.find((function(e){return e._group}))?this.boundSource.filter((function(e){return e._group&&!e._parent})):this.boundSource,n=this.handleItemsSelection(t,e,this.globalCheck);this.changed(),this.onSelectionChanged.emit(n)},e.prototype.handleItemsSelection=function(e,t,n){var i,r,s;void 0===t&&(t=null),void 0===n&&(n=null);var o=(null===(i=this.View)||void 0===i?void 0:i.selection)||this.arraymodeSelection;if(this.SingleSelection&&(null===(r=e[0])||void 0===r?void 0:r._selected)&&!(null===(s=e[0])||void 0===s?void 0:s._group)){if(e.length>1&&null==t)throw"Tentativo di selezionare o deselezionare più di un elemento con SingleSelection attivo";1==e.length&&null==t&&(o=this.handleItemsSelection(this.boundSource.filter((function(e){return!e._group})),!1,null),e[0]._selected=!0)}for(var a=0;a<e.length;a++){var l=e[a],c=null!=t?l._selected!=t:null!=n&&l._selected!=this.globalCheck;if(c&&!l.locked&&(l._selected=null!=t?t:this.globalCheck),c||null==n){var h=o.all,p=l._group,d=l._selected,u=null,g=null,m=null,f=null,v=null,y=null,w=null,C=null,b=null;if(p){var x=this.parentTreeStatus(l);C="included"==x,b="excluded"==x,g=this.getGroupItems(o,l,null,!0),m=this.getGroupItems(o,l,"selected",!0,g),f=this.getGroupItems(o,l,"unselected",!0,g),v=this.getGroupChildGroups(o,l,null,!0),y=this.getGroupChildGroups(o,l,"selected",!0,v),w=this.getGroupChildGroups(o,l,"unselected",!0,v)}else C=null==(u=this.getItemGroup(l))?null:u._selected,b=null==u?null:!u._selected;this.ArrayGrouping?this.performSimpleSelectionOperations(o,l,p,d,u,m,f,g,v):this.performSelectionOperations(o,l,h,p,d,m,y,f,w,g,v,C,b)}}return null==n&&(this.globalCheck=!this.boundSource.some((function(e){return!e._selected&&!e._sep}))),this.finalizeSelectionInformations(o),o},e.prototype.performSimpleSelectionOperations=function(e,t,n,i,r,s,o,a,l){var c=this,h=this.getTriptic("item",e);n?i?(l.forEach((function(e){e._selected=!0})),o&&o.forEach((function(e){e._selected=!0,c.addItem(e,h)}))):(l.forEach((function(e){e._selected=!1})),s&&s.forEach((function(e){e._selected=!1,c.removeItem(e,h)}))):i?(this.addItem(t,h),r&&a&&a.every((function(e){return e._selected}))&&this.selectGroup(r)):(this.removeItem(t,h),r&&(r._selected=!1))},e.prototype.selectGroup=function(e){e._selected=!0;var t=this.getGroupParent(e);t&&this.getGroupChildGroups(null,t,null,!0).every((function(e){return e._selected}))&&this.selectGroup(t)},e.prototype.performSelectionOperations=function(e,t,n,i,r,s,o,a,l,c,h,p,d){var u=this,g=this.getTriptic("group",e),m=this.getTriptic("item",e),f=this.getTriptic("exclusion",e),v=this.getTriptic("group_exclusion",e);i?r?(n||p?this.removeItem(t,v):this.addItem(t,g),s&&s.forEach((function(e){return u.removeItem(e,m)})),o&&o.forEach((function(e){return u.removeItem(e,g)})),c&&c.forEach((function(e){e._selected=!0,u.removeItem(e,f)})),h&&h.forEach((function(e){e._selected=!0,u.removeItem(e,v)}))):(n||p?this.addItem(t,v):this.removeItem(t,g),a&&a.forEach((function(e){return u.removeItem(e,f)})),l&&l.forEach((function(e){return u.removeItem(e,f)})),c&&c.forEach((function(e){e._selected=!1,u.removeItem(e,m)})),h&&h.forEach((function(e){e._selected=!1,u.removeItem(e,g)}))):r?null==d&&n||p?this.removeItem(t,f):this.addItem(t,m):d||!n&&null==d?this.removeItem(t,m):this.addItem(t,f)},e.prototype.removeItem=function(e,t){var n=t.index_cache.get(e._hash);return null!=n&&(t.cache.delete(e._hash),t.index_cache.delete(e._hash),t.array[n]=null),!!n},e.prototype.addItem=function(e,t){if(null==t.index_cache.get(e._hash)){var n=t.array.push(e)-1;return t.cache.set(e._hash,e),t.index_cache.set(e._hash,n),!0}return!1},e.prototype.getTriptic=function(e,t){switch(e){case"group":return new L(this.groupsCache,this.i_groupsCache,t.groups);case"item":return new L(this.itemsCache,this.i_itemsCache,t.items);case"group_exclusion":return new L(this.group_exclusionsCache,this.i_group_exclusionsCache,t.group_exclusions);case"exclusion":return new L(this.exclusionsCache,this.i_exclusionsCache,t.exclusions)}},e.prototype.getItemGroup=function(e){var t=this.rgGroupCache.get(e._thisKey);return t||null},e.prototype.getGroupItems=function(e,t,n,i,r){var s,o;void 0===i&&(i=!1),void 0===r&&(r=null);var a=[];if(r)a=r;else if(i)try{for(var l=w(this.rgItemCache.keys()),c=l.next();!c.done;c=l.next()){var h=c.value;h.startsWith(t._thisKey)&&a.push.apply(a,b(this.rgItemCache.get(h)))}}catch(e){s={error:e}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(s)throw s.error}}else a=this.rgItemCache.get(t._thisKey);return 0!=(a=a.filter((function(e){return!n||e._selected&&"selected"==n||!e._selected&&"unselected"==n}))).length||!e||this.arrayMode||("unselected"==n?a=e.exclusions.filter((function(e){return null!=e&&!i&&e._thisKey==t._thisKey||i&&e._thisKey.startsWith(t._thisKey)})):"selected"==n&&(a=e.items.filter((function(e){return null!=e&&!i&&e._thisKey==t._thisKey||i&&e._thisKey.startsWith(t._thisKey)})))),a},e.prototype.getGroupParent=function(e){var t=this.rgGroupCache.get(e._parent);return t||null},e.prototype.getGroupChildGroups=function(e,t,n,i,r){var s,o;void 0===i&&(i=!1),void 0===r&&(r=null);var a=this.rgGroupCache.get(t._thisKey),l=[];if(r)l=r;else if(i)try{for(var c=w(this.rgChildGroupsCache.keys()),h=c.next();!h.done;h=c.next()){var p=h.value;p.startsWith(t._thisKey)&&l.push.apply(l,b(this.rgChildGroupsCache.get(p)))}}catch(e){s={error:e}}finally{try{h&&!h.done&&(o=c.return)&&o.call(c)}finally{if(s)throw s.error}}else l=this.rgChildGroupsCache.get(t._thisKey);return 0==(l=l.filter((function(e){return!n||e._selected&&"selected"==n||!e._selected&&"unselected"==n}))).length&&e?l="unselected"==n?e.group_exclusions.filter((function(e){return null!=e&&(!i&&e._thisRoute.length==a._thisRoute.length+1&&e._thisRoute.startsWith(t._thisKey)||i&&e._thisKey.startsWith(t._thisKey))})):e.groups.filter((function(e){return null!=e&&(!i&&e._thisRoute.length==a._thisRoute.length+1&&e._thisRoute.startsWith(t._thisKey)||i&&e._thisKey.startsWith(t._thisKey))})):l},e.prototype.finalizeSelectionInformations=function(e){for(var t=[],n=[],i=[],r=[],s=!1,o=!1,a=!1,l=!1,c=0;c<e.items.length;c++)null!=e.items[c]?n.push(e.items[c]):o=!0;for(c=0;c<e.groups.length;c++)null!=e.groups[c]?t.push(e.groups[c]):s=!0;for(c=0;c<e.exclusions.length;c++)null!=e.exclusions[c]?i.push(e.exclusions[c]):a=!0;for(c=0;c<e.group_exclusions.length;c++)null!=e.group_exclusions[c]?r.push(e.group_exclusions[c]):l=!0;e.items=n,e.group_exclusions=r,e.exclusions=i,e.groups=t,s&&(this.i_groupsCache=this.compactIndexMap(this.i_groupsCache)),o&&(this.i_itemsCache=this.compactIndexMap(this.i_itemsCache)),a&&(this.i_exclusionsCache=this.compactIndexMap(this.i_exclusionsCache)),l&&(this.i_group_exclusionsCache=this.compactIndexMap(this.i_group_exclusionsCache)),e.count=this.evaluateSelected(),0==e.count&&(this.boundSource.forEach((function(e){return e._selected=!1})),e.all=!1,e.exclusions=[],e.items=[],e.groups=[],e.group_exclusions=[],this.clearSelectionCaches()),this.canSelectAll=e.count>0&&this.SelectAll},e.prototype.compactIndexMap=function(e){var t,n,i=0,r=new Map;try{for(var s=w(e.keys()),o=s.next();!o.done;o=s.next()){var a=o.value;r.set(a,i++)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r},e.prototype.handleClick=function(e,t){if(("Range"==e.view.getSelection().type||e.view.getSelection().toString().length>0)&&!e.shiftKey)return!1;("Range"==e.view.getSelection().type||e.view.getSelection().toString().length>0)&&e.shiftKey&&this.utiExts.clearTextSelection();var n=[];if(e.shiftKey&&this.ShiftClick&&!this.SingleSelection)for(var i=!1,r=this.boundSource.filter((function(e){return!e._group&&!e._sep})),s=0;s<r.length;s++){var o=r[s];i&&(o._selected=!0,n.push(o)),o!=t&&o!=this.lastSelected||i?o!=t&&o!=this.lastSelected||!i||(i=!1):(i=!0,o._selected=!0,n.push(o))}else t._selected=!t._selected,this.lastSelected=t,n.push(t);var a=this.handleItemsSelection(n);return this.changed(),this.onSelectionChanged.emit(a),!0},e.prototype.evaluateSelected=function(){var e,t=(null===(e=this.View)||void 0===e?void 0:e.selection)||this.arraymodeSelection,n=t.group_exclusions.reduce((function(e,t){return e+t.count}),0),i=t.groups.reduce((function(e,t){return e+t.count}),0);return this.selectedObjects=(t.all?this.BaseItemsCount:i)-n+t.items.length-t.exclusions.length,this.selectedObjects},e.prototype.selectAllOrResetSelection=function(){var e=this.View.selection||this.arraymodeSelection;this.clearSelectionCaches(),e.all=!e.all,e.exclusions=[],e.groups=[],e.group_exclusions=[],e.items=[],e.all||(this.canSelectAll=!1,this.globalCheck=!1),this.finalizeSelectionInformations(e),this.onSelectionChanged.emit(e),this.evaluateSelection(this.boundSource,e)},e.prototype.addToPage=function(e){var t,n=this.MainGroupView?this.MainGroupView:this.View;this.goToPage(((null===(t=this.SearchView||n)||void 0===t?void 0:t.page)||0)+e)},e.prototype.goToPage=function(e){var t=this.MainGroupView?this.MainGroupView:this.View;if(t.page&&t.pages){var n=this.SearchView||t;if(!(0===e||e>n.pages)){n.page=e,this.arrayPulsanti=this.getPagesArray(6,n.page,n.pages);var i=!!this.MainGroupView;this.emitSearchRequest(!1,i?t:null)}}},e.prototype.onItemsPerPageChanged=function(e){this.PagerOptions.View.itemsperpageoverride=e,this.changed(),this.MainGroupView?this.emitSearchRequest(!0,this.MainGroupView):this.emitSearchRequest(!0)},e.prototype.onGroupItemsPerPageChanged=function(e,t){e.view.itemsperpageoverride=t,this.emitSearchRequest(!0,e.view)},e.prototype.tryExport=function(e){var t=this;this.ExportFunction&&(this.reportMode?this.ExportFunction(e):this.ExportFunction((function(e,n){void 0===n&&(n=!1),n||(0!=e.length?(t.setupExport(e),t.cdr.detectChanges(),setTimeout((function(){t.exportDownloader.nativeElement.click()}))):t.msgExts.simpleWarning(t.lc.loc("Cannot export an empty dataset")))})))},e.prototype.setupExport=function(e){var t=this.DynamicRowColumnsDefinition;this.headers=t&&t.length>0?this.expExts.setupForGenericExport(e,t.map((function(e){return{label:e.description,key:e.propertyName,order:e.columnOrder}}))):this.expExts.setupForExport(e),this.data=e},e.prototype.setupNextOrderAndSearch=function(e){if(this.View instanceof O){var t,n={NONE:"DESC",DESC:"ASC",ASC:null}[e.order||"NONE"];e.order=n;var i=this.View.orders?this.View.orders.filter((function(t){return t.column==e.id})):[];0==i.length&&e.order?((t=new _).column=e.id,t.order=e.order,this.View.orders||(this.View.orders=[]),this.View.orders.push(t)):1==i.length?e.order?i[0].order=e.order:i=[]:console.warn("Impossibile settare ordinamento. Colonna "+e.id+" direttive di ordinamento "+i.length+" ordinamento scelto "+e.order),this.emitSearchRequest(!1)}else console.error("View diversa da reportdefinition entrata nel metodo setupNextOrderAndSearch")},e.prototype.reviewReportBindings=function(){var e=this;if(this.View instanceof O){this.View.orders&&this.View.orders.length>0&&this.View.orders.forEach((function(t){e.ReportValues.columns.filter((function(e){return e.id==t.column}))[0].order=t.order})),-2!=this.ReportValues.count?this.previousCount=this.ReportValues.count:-2==this.ReportValues.count&&(this.ReportValues.count=this.previousCount);var t=this.View.itemsperpageoverride||15;this.View.pages=Math.ceil(this.ReportValues.count/t),this.arrayPulsanti=this.getPagesArray(6,this.View.page,this.View.pages)}else console.error("View diversa da reportdefinition entrata nel metodo reviewReportBindings")},e.prototype.autoUpdateChanged=function(){var e=this;/^[1-9]\d*$/.test(this.seconds)||(this.seconds="10");var t=1e3*parseInt(this.seconds,null);this.autoUpdate?this.updateTimer=setInterval((function(){e.emitSearchRequest(!1)}),t):clearInterval(this.updateTimer)},e.prototype.dynamicOperation=function(e,t){this.onDynamicOperation.emit({id:t,item:e})},e.prototype.findEsTd=function(e){var t=this.EsTdsDirective.find((function(t){return t.td===e}));return t?t.Template:null},e.prototype.generateRouterLink=function(e,t,n){if(this.DynamicTableRouterLinkCache[n._hash+e])return this.DynamicTableRouterLinkCache[n._hash+e];var i=this.getRouterLink(e,t,n);return this.DynamicTableRouterLinkCache[n._hash+e]=i,i},e.prototype.getRouterLink=function(e,t,n){for(var i=0;i<t.length;i++)e=e.replace("{"+i+"}",n.properties[t[i]]);return e=e.replace(/'/g,'"').replace(/ /g,""),JSON.parse(e)},e.prototype.arrayAddToPage=function(e){this.arrayGoToPage(this.arraymodePage+e)},e.prototype.arrayGoToPage=function(e){0===e||e>this.arraymodePages||(this.arraymodePage=e,this.internalWriteValue())},e.prototype.refreshPaging=function(e){this.ArraymodeItemsPerPage=e,this.arraymodePages=Math.ceil(this.View.length/this.ArraymodeItemsPerPage),this.arraymodePage=1,this.internalWriteValue()},e.prototype.adaptViewToPaging=function(){var e=[];this.SearchView||(this.arrayPulsanti=this.getPagesArray(6,this.arraymodePage,this.arraymodePages));for(var t=(this.arraymodePage-1)*this.ArraymodeItemsPerPage;t<this.arraymodePage*this.ArraymodeItemsPerPage;t++)t<=this.View.length-1&&e.push(this.View[t]);return e},e.prototype.cellClicked=function(e,t){return!(!this.UseCustomCellActions||-1==this.CustomCellActionsOn.split("$").indexOf(e))&&(this.onCellClick.emit({column:e,model:t}),!0)},e.prototype.cornerActionClicked=function(e){this.onCornerAction.emit({id:e,estable:this})},e.prototype.isEsTd=function(e){return!e._directive},e.prototype.isEsTh=function(e){return!e._directive},e.prototype.setMode=function(e){this.viewMode="view"==e,this.arrayMode="array"==e,this.reportMode="report"==e,this.reportMode&&(this.XLSXExport=!0,this.CSVExport=!1)},e.prototype.internalWriteValue=function(){this.internalWriteCall=!0,this.writeValue(this.View),this.internalWriteCall=!1},e.prototype.getPagesArray=function(e,t,n){var i,r,s=[];if(-1==n&&(n=t+1),n<=e)i=1,r=n-1;else{var o=(e-2)/2;r=t+o,(i=t-o)<1?(i=1,r=e-1):r>=n&&(i=n-e+1,r=n-1)}if(s.push({val:1,cssClass:1===t?"btn-main app-white-text":"app-white-button"}),r>=i){for(var a=i;a<=r;a++)1!==a&&s.push({val:a,cssClass:a===t?"btn-main app-white-text":"app-white-button"});s.push({val:n,cssClass:n===t?"btn-main app-white-text":"app-white-button"})}return s},e.prototype.calculateHash=function(e){if(e)for(var t={},n=0;n<e.length;n++){var i=e[n],r=Object.assign({},e[n]);delete r._selected,delete r._visible,delete r._hash;var s=this.hashExts.hashObject(r);t[s]=t[s]?t[s]+1:1,i._hash=s+(t[s]>1?"_"+t[s]:"")}},e.prototype.forceRefresh=function(){var e,t;this.arrayMode&&(e=this.arraymodePage,t=this.ArraymodeItemsPerPage),this.writeValue(this.View),this.cdr.detectChanges(),this.arrayMode&&(this.ArraymodeItemsPerPage=t,this.arrayGoToPage(e))},e}();Z.decorators=[{type:t.Component,args:[{selector:"es-table",viewProviders:[{provide:r.LocalizationService,useClass:Q}],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,template:'\x3c!-- Patacchino di autoaggiornamento --\x3e\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>\r\n\r\n\x3c!--\r\nI TH sono contenuto statico, questo significa che senza condizione per RowTHs arriverebbero sia qui sia nell ng-container dell\'header in fase non inizializzata, duplicando fisicamente le colonne.\r\nPer ovviare al problema, questo pezzo lo faccio apparire solo se ci sono già dei RowTHs, quindi su valorizzazione della View succederà:\r\n1) appaiono i th nell\' ng-container dell\'header, e NON qui\r\n2) i TH vengono presi, elaborati e trasformati in RowTHs\r\n3) l\'ng-container dell\'header sparisce (per la condizione !UseCustomCells || !RowTHs) e qui appaiono i nuovi TH (che poi sono gli stessi di prima che girano)\r\n4) Vengono presi i nuovi TH da qui e trasformati a loro volta in RowTHs\r\n--\x3e\r\n<div hidden *ngIf="UseCustomCells && RowTHs">\r\n <ng-container *ngIf="View">\r\n \x3c!--Qui invece ci sono tutti i TH--\x3e\r\n <ng-container *ngTemplateOutlet="headerRef"></ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n\x3c!--\r\nQuesta parte è un po\' più semplice del sopra. Infatti i TD vengono sì bindati in entrambi i punti (qui e nell\'ng-container del body), ma avrò le TD statiche prima di generare la TMPBoundSource.\r\nQuesto significa che il workflow di binding sarà:\r\n1) Appaiono i TD statici nel body e NON qui, perché i TMPBoundSource non sono ancora stati emessi\r\n2) Contemporaneamente all\'emissione dei TMPBoundSource vengono anche emessi i RowTds\r\n3) Considerando il punto 2, al giro dopo appariranno i TD qui, perché è stata generata la TMPBoundSource, e spariranno contemporaneamente dall\'ng-container del body (per la condizione !UseCustomCells || !RowTDs)\r\n--\x3e\r\n<div hidden *ngIf="UseCustomCells && bodyRef">\r\n <ng-container *ngIf="View">\r\n \x3c!--Tutti i TD che dopo verranno presi ed elaborati internamente--\x3e\r\n <ng-container *ngFor="let item of TMPBoundSource">\r\n <ng-container *ngTemplateOutlet="bodyRef; context : {$implicit: item}"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-container *ngIf="View">\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 *ngIf="PagingStyle == \'both\' || PagingStyle == \'top\'">\r\n <ng-container *ngTemplateOutlet="pagingElement"></ng-container>\r\n </div>\r\n\r\n <div class="table-responsive datatable {{ContainerClass}}" [class.est-scrollable]="UseEndlessscroll" (scroll)="UseEndlessscroll && onScroll($event)" [style.max-height.px]="MaxHeight">\r\n <table class="{{ TableClass }} est-margin-bottom-10" [class.est-high-density]="HighCellDensity">\r\n <thead [hidden]="HeaderHidden || FirstBind">\r\n \x3c!-- Aggiungo il pezzo che gestisce la selezione di tutto se attivo da config --\x3e\r\n <tr *ngIf="SelectAll">\r\n <th class="est-no-selection" [attr.colspan]="Columns.Global" [class.est-hidden]="!canSelectAll && !(View?.selection || arraymodeSelection).all">\r\n <span>{{ ((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)="selectAllOrResetSelection()">{{ (View?.selection || arraymodeSelection).all ? (\'Reset Selection\' | localize : lc) : (\'Select Everything\' | localize : lc)}}</span>\r\n </th>\r\n </tr>\r\n\r\n \x3c!-- Blocco header group --\x3e\r\n <ng-container *ngIf="RowThGroups">\r\n <tr *ngFor="let level of RowThGroups">\r\n <th *ngFor="let cell of level" [attr.colspan]="cell.Span" \r\n [class.est-pinned-header]="cell.Pinned" [class.est-col-min]="cell.Pinned"\r\n [class.est-ltab-border]="cell.Borders" [class.est-rtab-border]="cell.Borders"\r\n class="est-text-center">\r\n <ng-container *ngIf="cell.Pinned; Else: cell.Template">\r\n <div class="est-pinned-border est-cell-group-padding"></div>\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </ng-container>\r\n\r\n <ng-container *ngIf="!RowThGroups">\r\n <tr *ngIf="headerGroupRef">\r\n <ng-container *ngTemplateOutlet="headerGroupRef"></ng-container>\r\n <th *ngIf="Export"></th>\r\n </tr>\r\n \r\n \x3c!-- Blocco header group secondario --\x3e\r\n <tr *ngIf="secondaryHeaderGroupRef">\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 \x3c!-- Blocco effettivo degli header --\x3e\r\n <tr>\r\n \x3c!-- Aggiungo una checkbox se la selezione è attiva --\x3e\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 \x3c!-- Header che valgono per view mode e array mode --\x3e\r\n <ng-container *ngIf="(viewMode || arrayMode)">\r\n\r\n \x3c!-- In una tabella base prendo semplicemente i th scritti dall\'utente nell\'HTML --\x3e\r\n <ng-container *ngIf="(!UseCustomCells || !RowTHs) && !DynamicRowColumnsDefinition">\r\n <ng-container *ngTemplateOutlet="headerRef"></ng-container>\r\n </ng-container>\r\n\r\n \x3c!-- Se ho un modello dinamico dell\'oggetto creo le colonne in base alle proprietà --\x3e\r\n <ng-container *ngIf="(!UseCustomCells || !RowTHs) && DynamicRowColumnsDefinition">\r\n <th *ngFor="let operation of DynamicOperations" class="est-col-min est-no-side-padding"></th>\r\n \r\n <ng-container *ngFor="let rowHeader of DynamicRowColumnsDefinition">\r\n <ng-container *ngIf="rowHeader.visible">\r\n <th *ngIf="OrderByColumn" es-th="{{rowHeader.propertyName}}" class="{{UserDefinedDynamicCols ? ((rowHeader.clss || \'\') + (rowHeader.headerWraps ? \'\' : \' est-nowrap\')) : \' est-nowrap\'}}" [Order]="rowHeader.dataOrder" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.orderable" [OrderBy]="OrderByColumn" [SearchInProgress]="!!researchInProgress" (onOrderChange)="thOrderChanged(rowHeader.propertyName, $event)">{{rowHeader.description}}</th>\r\n <th *ngIf="!OrderByColumn" es-th="{{rowHeader.propertyName}}" class="{{UserDefinedDynamicCols ? ((rowHeader.clss || \'\') + (rowHeader.headerWraps ? \'\' : \' est-nowrap\')) : \' est-nowrap\'}}" [Order]="rowHeader.dataOrder" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.orderable" [OrderBy]="OrderByColumn">{{rowHeader.description}}</th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n \x3c!-- Se non ho un modello dinamico ma invece delle celle custom, genero gli header in base ai row th --\x3e\r\n <ng-container *ngIf="UseCustomCells && RowTHs">\r\n <th *ngIf="HasPinnedColumns" class="est-pinned-header est-col-min">\r\n <div [style.width.px]="PinnedContainerWidth" class="est-pinned-border">\r\n <th class="est-col-min est-no-border" *ngIf="Selection">\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}}" [class.est-no-border]="true" [class.est-nowrap]="!rowHeader.Wrap" class="{{rowHeader.Class || \'\'}}" [Order]="rowHeader.Order" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.Orderable" [OrderBy]="OrderByColumn" [SearchInProgress]="!!researchInProgress" (onOrderChange)="OrderByColumn && thOrderChanged(rowHeader.ID, $event)">\r\n <ng-container *ngIf="rowHeader.Template"><ng-container *ngTemplateOutlet="rowHeader.Template;"></ng-container></ng-container>\r\n <span *ngIf="!rowHeader.Template">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </div>\r\n </th>\r\n <ng-container *ngFor="let rowHeader of RowTHs">\r\n <th *ngIf="rowHeader && rowHeader.Visible && !rowHeader.Pinned" es-th="{{rowHeader.ID}}" [class.est-ltab-border]="rowHeader.LeftBorder" [class.est-rtab-border]="rowHeader.RightBorder" [class.est-nowrap]="!rowHeader.Wrap" class="{{rowHeader.Class || \'\'}}" [Order]="rowHeader.Order" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.Orderable" [OrderBy]="OrderByColumn" [SearchInProgress]="!!researchInProgress" (onOrderChange)="OrderByColumn && thOrderChanged(rowHeader.ID, $event)">\r\n <ng-container *ngIf="rowHeader.Template"><ng-container *ngTemplateOutlet="rowHeader.Template;"></ng-container></ng-container>\r\n <span *ngIf="!rowHeader.Template">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n \x3c!--Casistica in cui ho il setup proveniente da un report. Gli header sono definiti da come è fatto il report--\x3e\r\n <ng-container *ngIf="reportMode">\r\n <th [style.color]="clm.color" *ngFor="let clm of ReportValues.columns" class="est-no-selection est-pointer est-nowrap" (click)="setupNextOrderAndSearch(clm)">\r\n {{clm.description}}<span class="fa" [class.fa-chevron-down]="clm.order == \'DESC\'" [class.fa-chevron-up]="clm.order == \'ASC\'"></span>\r\n </th>\r\n </ng-container>\r\n\r\n \x3c!--Per l\'eliminazione mi serve un header aggiuntivo--\x3e\r\n <th *ngIf="Removal" [class.est-right-10]="Export || HiddenColumns" class="est-col-min est-sticky-last-column"><span class="fa fa-trash"></span></th>\r\n\r\n \x3c!--Per l\'esportazione mi serve l\'header extra da cui faccio uscire i 3 pallocchi--\x3e\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 \x3c!-- Link nascosto che serve a scaricare il file --\x3e\r\n <a *ngIf="headers" hidden #exportDownloader csvLink [data]="data" [headers]="headers" [delimiter]="\';\'" [filename]="ExportFileName"></a>\r\n\r\n \x3c!-- Blocco con i 3 pallocchi che tira fuori il context menu delle operazioni --\x3e\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)="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)="tryExport(\'CSV\')">{{\'Export View\' | localize : lc}} (CSV)</a>\r\n <a class="dropdown-item" *ngIf="Export && XLSXExport" (click)="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 \x3c!-- Valido per modalità View o Array. Se sono in report mode il body è creato in altro modo --\x3e\r\n <tbody [hidden]="BodyHidden || FirstBind" *ngIf="(arrayMode || viewMode)">\r\n \x3c!--Con selection attiva richiamo il template che gestisce il context menu--\x3e\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 \x3c!--Senza selection richiamo il template che NON gestisce il context menu--\x3e\r\n <ng-container *ngIf="!Selection">\r\n <ng-container *ngTemplateOutlet="TBody"></ng-container>\r\n </ng-container>\r\n </tbody>\r\n\r\n \x3c!-- Per la modalità a report c\'è un body particolare semi-dinamico --\x3e\r\n <tbody [hidden]="BodyHidden" *ngIf="reportMode">\r\n <tr *ngFor="let row of ReportValues.rows; let even = even;">\r\n <td class="est-nowrap" *ngFor="let val of row.values">{{val}}</td>\r\n <td class="est-sticky-last-column{{even && !Hierarchy ? \'-alt\' : \'\'}}"></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n <div *ngIf="PagingStyle == \'both\' || PagingStyle == \'bottom\'">\r\n <ng-container *ngTemplateOutlet="pagingElement"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n\x3c!-- Template che contiene tutte le info di paginazione in modo da poterlo replicare anche sopra --\x3e\r\n<ng-template #pagingElement>\r\n <ng-container *ngIf="!FirstBind">\r\n \x3c!-- Pulsanti avanti-indietro di paginazione --\x3e\r\n <div *ngIf="PagerOptions.ShowPaging && !HidePagingButtons" class="pull-right btn-toolbar">\r\n <ng-container *ngIf="(!reportMode || View?.pagingavailable) && (!arrayMode || SearchView)">\r\n <ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { 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: { ATP: arrayAddToPage.bind(this), GTP: arrayGoToPage.bind(this), Array: arrayPulsanti }}"></ng-container>\r\n </ng-container>\r\n </div>\r\n \x3c!-- Paginatore dove appare la count e le opzioni di paginazione --\x3e\r\n <div class="pull-right m-t-min-3 est-margin-right-50">\r\n <div *ngIf="PagerOptions.ShowPaging && (PagerOptions.PagerCount > 10 || reportMode && View.pagingavailable)">\r\n <app-paging *ngIf="!PagerOptions.UsesView" [ShowCount]="PagerOptions.ShowCount" [PagerCount]="PagerOptions.PagerCount" [WarnOnAll]="false" [CurrentPageSize]="ArraymodeItemsPerPage" (pagingSelected)="refreshPaging($event)"></app-paging>\r\n <app-paging *ngIf="PagerOptions.UsesView" [ShowCount]="PagerOptions.ShowCount" [PagerCount]="PagerOptions.PagerCount" [GroupMode]="PagerOptions.Searches == \'groups\'" [AllSearch]="AllSearch" [View]="PagerOptions.View" (pagingSelected)="onItemsPerPageChanged($event);"></app-paging>\r\n </div>\r\n <div *ngIf="reportMode && !PagerOptions.ShowPaging"><em>{{\'Paging options are not available for this report\' | localize: lc}}</em></div>\r\n </div>\r\n <div class="clearfix"></div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\x3c!-- Template che contiene i pulsanti per cambiare pagina --\x3e\r\n<ng-template #pagingButtons let-options>\r\n <a class="btn" class="est-page-prev app-pointer" (click)="options.ATP(-1, options.separator)">\r\n <span class="fa fa-chevron-left"></span>\r\n </a>\r\n <div *ngIf="options.Array" class="est-inline">\r\n <a *ngFor="let p of options.Array" class="btn est-page-sel {{p.cssClass}}" (click)="options.GTP(p.val, options.separator)">{{p.val}}</a>\r\n </div>\r\n <a class="btn" class="est-page-next app-pointer" (click)="options.ATP(1, options.separator)">\r\n <span class="fa fa-chevron-right"></span>\r\n </a>\r\n</ng-template>\r\n\r\n\x3c!-- Questi due template rappresentano effettivamente il body della tabella. essendo il tr l\'unica cosa che davvero cambia, il resto è templatizzato --\x3e\r\n<ng-template #TBodySelection let-templateOptions>\r\n <ng-container *ngFor="let item of boundSource; let even = even; let i=index;">\r\n <tr *ngIf="item._visible || (!Hierarchy && !ArrayGrouping)" \r\n [class]="item._rowClass ? item._rowClass : \'\'" \r\n [class.est-line-through]="item.removed || item.deleted" \r\n [class.est-pointer]="!item.locked" \r\n [class.est-white-selected]="item._selected && !item.locked"\r\n [class.est-rg]="item._group"\r\n [class.est-rg-sep]="item._sep"\r\n [contextMenu]="!item.locked ? (ContextMenu || emptyMenu) : emptyMenu" [contextMenuSubject]="item"\r\n (click)="(!item.locked && !item._sep && !item._group && handleClick($event, item)) || item._group && handleGroupClick(item)">\r\n\r\n <td *ngIf="!item.locked && !item._sep && !HasPinnedColumns">\r\n <input type="checkbox" \r\n [disabled]="templateOptions.selDisabled" \r\n [class.est-pointer]="!item.locked"\r\n [(ngModel)]="item._selected" name="check{{i}}" \r\n (click)="$event.stopPropagation(); handleClick($event, item);">\r\n </td>\r\n <td *ngIf="(item.locked || item._sep) && !HasPinnedColumns"></td>\r\n\r\n <ng-container *ngIf="item._sep"><ng-container *ngTemplateOutlet="groupPager; context: { $implicit: item }"></ng-container> </ng-container>\r\n\r\n <ng-container *ngIf="!item._sep">\r\n <ng-container *ngTemplateOutlet="basicColumns; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="dynamicColumns; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="customCells; context: { $implicit: item, templateOptions: templateOptions }"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet="bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}"></ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #TBody>\r\n <ng-container *ngFor="let item of boundSource; let even = even;">\r\n <tr *ngIf="item._visible || !Hierarchy" \r\n [class]="item._rowClass ? item._rowClass : \'\'" \r\n [class.est-line-through]="item.removed || item.deleted"\r\n [class.est-rg]="item._group"\r\n [class.est-rg-sep]="item._sep"\r\n (click)="item._group && handleGroupClick(item)">\r\n\r\n <ng-container *ngIf="item._sep"><ng-container *ngTemplateOutlet="groupPager; context: { $implicit: item }"></ng-container></ng-container>\r\n\r\n <ng-container *ngIf="!item._sep">\r\n <ng-container *ngTemplateOutlet="basicColumns; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="dynamicColumns; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="customCells; context: { $implicit: item }"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet="bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}"></ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #groupPager let-item>\r\n <td *ngIf="HasPinnedColumns"></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"><app-paging [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" [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"><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\x3c!-- Questo template contiene la print condizionale su tabelle semplici, con header e body scritti a manazza --\x3e\r\n<ng-template #basicColumns let-item>\r\n <ng-container *ngIf="(!UseCustomCells || !RowTDs) && !DynamicRowColumnsDefinition">\r\n <ng-container *ngTemplateOutlet="bodyRef; context : {$implicit: item}"></ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\x3c!-- Questo template contiene la print condizionale su tabelle definite in maniera dinamica dal modello --\x3e\r\n<ng-template #dynamicColumns let-item>\r\n <ng-container *ngIf="(!UseCustomCells || !RowTDs) && DynamicRowColumnsDefinition">\r\n <ng-container *ngFor="let operation of DynamicOperations; let first = first; let last = last;">\r\n <ng-container *ngIf="!operation.conditionField || (item.properties[operation.conditionField] == operation.conditionValue)">\r\n <td [class.est-no-right-padding]="last" [class.est-no-left-padding]="!first" class="est-col-min"><span title="{{operation.title}}" class="{{operation.iconClass}} est-pointer" (click)="dynamicOperation(item, operation.id)">{{operation.text}}</span></td>\r\n </ng-container>\r\n <ng-container *ngIf="operation.conditionField && (item.properties[operation.conditionField] != operation.conditionValue)">\r\n <td class="est-col-min est-no-side-padding"></td>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor="let rowItem of DynamicRowColumnsDefinition">\r\n <ng-container *ngIf="rowItem.routePath && rowItem.visible">\r\n <td es-td="{{rowItem.propertyName}}" class="{{UserDefinedDynamicCols ? rowItem.clss : \'est-nowrap\'}}" [Internal]="false" [Context]="item._hash">\r\n <a [routerLink]="generateRouterLink(rowItem.routePath, rowItem.routeParameterProperties, item)" class="est-link" [innerHTML]="item.properties[rowItem.propertyName]"></a>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf="!rowItem.routePath && rowItem.visible">\r\n <ng-container *ngTemplateOutlet="findEsTd(rowItem.propertyName) || defaultEsTd; context: { $implicit: item.properties[rowItem.propertyName], rowItem : rowItem, item : item }"> </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEsTd let-value let-rowItem=\'rowItem\' let-item=\'item\'>\r\n <td es-td="{{rowItem.propertyName}}" class="{{UserDefinedDynamicCols ? rowItem.clss : \'est-nowrap\'}}"\r\n [class.est-pointer]="UseCustomCellActions && CustomCellActionsOn.indexOf(\'$\' + rowItem.propertyName + \'$\') != -1"\r\n (click)="cellClicked(rowItem.propertyName, item) && !CellActionPropagates && $event.stopPropagation()"\r\n [Internal]="false" [Context]="item._hash">\r\n {{value}}\r\n </td>\r\n</ng-template>\r\n\r\n\x3c!-- Questo template contiene la print condizionale delle celle custom se configurate --\x3e\r\n<ng-template #customCells let-item let-opt="templateOptions">\r\n <ng-container *ngIf="UseCustomCells && RowTDs">\r\n\r\n <td *ngIf="HasPinnedColumns" class="est-pinned-body est-col-min" [class.est-white-selected]="item._selected">\r\n <div [style.width.px]="PinnedContainerWidth" class="est-pinned-border">\r\n <td *ngIf="!item.locked && !item._sep && Selection" class="est-no-border est-col-min">\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"></td>\r\n\r\n <ng-container *ngFor="let rowItem of RowTDs[item._hash]; let i = index">\r\n <td *ngIf="rowItem && rowItem.Pinned" [style.width.px]="rowItem.PinnedWidth" es-td="{{rowItem.ID}}" class="{{rowItem.Class}}" [class.est-no-border]="true" [class.est-rg-hdr]="rowItem.GroupHeader" [class.est-rg-agg]="rowItem.GroupAggregation" \r\n [class.est-nowrap]="Hierarchy || !rowItem.Wraps" [Internal]="true">\r\n <ng-container *ngIf="Hierarchy && i == 0"><ng-container *ngTemplateOutlet="HierarchyNavigator; context: { $implicit: item }"></ng-container></ng-container>\r\n <ng-container *ngIf="rowItem.Template"><ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: item }"></ng-container></ng-container>\r\n <span *ngIf="!rowItem.Template">{{rowItem.Content}}</span>\r\n </td>\r\n </ng-container>\r\n </div>\r\n </td>\r\n\r\n <ng-container *ngFor="let rowItem of RowTDs[item._hash]; let i = index">\r\n <ng-container *ngIf="rowItem && !rowItem.Pinned">\r\n\r\n \x3c!-- Casistica senza bodyRef, quindi con direttive per i td --\x3e\r\n <ng-container *ngIf="!bodyRef && rowItem.Visible">\r\n <td es-td="{{rowItem.ID}}" class="{{rowItem.Class}}" [class.est-ltab-border]="rowItem.LeftBorder" [class.est-rtab-border]="rowItem.RightBorder" [class.est-rg-hdr]="rowItem.GroupHeader" [class.est-rg-agg]="rowItem.GroupAggregation" \r\n [class.est-nowrap]="Hierarchy || !rowItem.Wraps" [Internal]="true">\r\n <ng-container *ngIf="Hierarchy && i == 0"><ng-container *ngTemplateOutlet="HierarchyNavigator; context: { $implicit: item }"></ng-container></ng-container>\r\n <ng-container *ngIf="rowItem.Template"><ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: item }"></ng-container></ng-container>\r\n <span *ngIf="!rowItem.Template">{{rowItem.Content}}</span>\r\n </td>\r\n </ng-container>\r\n\r\n \x3c!-- Casistica bodyRef, quindi con componenti per i td (RouterLink) DEPRECATO --\x3e\r\n <ng-container *ngIf="rowItem.RouterLink && rowItem.Visible && bodyRef">\r\n <td es-td="{{rowItem.ID}}" class="{{rowItem.Class}}" [class.est-nowrap]="Hierarchy || !rowItem.Wraps" [Internal]="true">\r\n <ng-container *ngIf="Hierarchy && i == 0">\r\n <ng-container *ngTemplateOutlet="HierarchyNavigator; context: { $implicit: item }"></ng-container>\r\n </ng-container>\r\n <a [routerLink]=\'rowItem.RouterLink\' class="est-link" [innerHTML]="rowItem.Content"></a>\r\n </td>\r\n </ng-container>\r\n\r\n \x3c!-- Casistica bodyRef, quindi con componenti per i td (NON RouterLink) DEPRECATO --\x3e\r\n <ng-container *ngIf="!rowItem.RouterLink && rowItem.Visible && bodyRef">\r\n <td es-td="{{rowItem.ID}}" class="{{rowItem.Class}}" [class.est-nowrap]="Hierarchy || !rowItem.Wraps" [class.est-pointer]="UseCustomCellActions && CustomCellActionsOn.indexOf(\'$\' + $any(rowItem).ID + \'$\') != -1" (click)="cellClicked(rowItem.ID, item) && !CellActionPropagates && $event.stopPropagation()" [Internal]="true">\r\n <ng-container *ngIf="Hierarchy && i == 0">\r\n <ng-container *ngTemplateOutlet="HierarchyNavigator; context: { $implicit: item }"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="rowItem.Template">\r\n <ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: item }"></ng-container>\r\n </ng-container>\r\n <span *ngIf="!rowItem.Template" [innerHTML]="rowItem.Content"></span>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #HierarchyNavigator let-item>\r\n <span *ngIf="!item.parent" class="fa fa-chevron-down" style="visibility:hidden"></span>\r\n <span *ngIf="item.parent && item._expanded" class="fa fa-chevron-down est-pointer est-no-selection" (click)="collapseParent(item[this.OwnKey])"></span>\r\n <span *ngIf="item.parent && !item._expanded" class="fa fa-chevron-up est-pointer est-no-selection" (click)="expandParent(item[this.OwnKey])"></span>\r\n &nbsp;\r\n</ng-template>\r\n\r\n\x3c!-- Questo template contiene i pulsanti di eliminazione/undo eliminazione ed esportazione che vanno in fondo ad un record edlla tabella --\x3e\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-10\' : \'\'}}" *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-10\' : \'\'}}" *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-10\' : \'\'}}" *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-10\' : \'\'}}" *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-10\' : \'\'}}" *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\x3c!-- Context menu vuoto default per tutte le tabella che non ce l\'hanno, in modo che al click destro appaia "nessuna op disponibile" --\x3e\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\x3c!-- Modal per cambiare posizione e visibilità delle colonne dell\'es-table --\x3e\r\n<div bsModal #changeColumnVisibilityModal="bs-modal" class="modal fade" role="dialog" aria-hidden="true">\r\n <div class="modal-dialog modal-lg">\r\n <div class="modal-content">\r\n <div class="modal-header">\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 \x3c!--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--\x3e\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)="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 \x3c!--Filler--\x3e\r\n <th></th>\r\n \x3c!-- Pinner --\x3e\r\n <th class="est-col-min"></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor="let item of TMPColumnsList; let i = index; let last = last" class="est-pointer" [class.est-white-selected]="lastSelectedItemID == item.id" [class.est-no-selection]="!item.visible">\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)="updateGlobalColVisCheck();" />\r\n </td>\r\n <td class="est-nowrap" *ngIf="ColumnsOrdering">\r\n <span class="fa fa-arrow-up" [class.est-hidden-view]="item.fixed || item.pinned" (click)="lastSelectedItemID = item.id; i != 0 && !item.fixed && sendUp(item); $event.stopPropagation();"></span>\r\n <span class="fa fa-arrow-down" [class.est-hidden-view]="item.fixed || item.pinned" (click)="lastSelectedItemID = item.id; !last && !item.fixed && sendDown(item); $event.stopPropagation();"></span>\r\n </td>\r\n <td class="est-nowrap" (click)="columnClicked(item);">\r\n <ng-container *ngIf="item.template">\r\n <ng-container *ngTemplateOutlet="item.template"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="!item.template">{{item.description}}</ng-container>\r\n </td>\r\n \x3c!--Filler--\x3e\r\n <td (click)="columnClicked(item);"></td>\r\n \x3c!-- Pinner --\x3e\r\n <td><span *ngIf="!item.fixed" class="fa fa-thumb-tack" [class.text-success]="item.pinned" (click)="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)="confirmColumnVisibilitySelection() && changeColumnVisibilityModal.hide()">{{\'Confirm\' | localize : lc}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>',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-pointer{cursor:pointer}.est-high-density td,.est-high-density th{padding:0 .2rem}.est-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.est-hidden-view{visibility:hidden}.est-no-border{border:none!important}.est-nowrap{white-space:nowrap}.est-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-10{right:10px!important}.est-table-dotted-menu{padding:0 0 2px!important;color:#999}.est-fs-18{font-size:18px}.est-fs-14{font-size:14px}.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-right-10{right:10px}.est-hidden{visibility:hidden}.est-padding-10{padding:10px!important}.est-margin-right-50{margin-right:50px}.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:3px 0 0}.est-pinned-header{background-color:#fff;left:0;top:0;position:sticky;z-index:1;border-bottom:1px solid #dee2e6!important;padding:0!important}.est-pinned-border{border-right:2px solid #dee2e6!important}.est-cell-padding{padding:.3rem}.est-pinned-body{background-color:#fff;left:0;position:sticky;z-index:1;border-top:1px solid #dee2e6!important;padding:0!important}.est-inline{display:inline!important}.est-inline-block{display:inline-block!important}.est-link{color:#0275d8!important;cursor:pointer;text-decoration:none;display:block}.est-link:hover{color:#23527c!important;cursor:pointer;text-decoration:underline!important}.est-sticky-last-column{right:-1px;position:sticky;z-index:0;background-color:#fff}.est-sticky-last-column-alt{right:-1px;position:sticky;z-index:0;background-color:#f2f2f2}.est-ltab-border{border-left:2px solid #bbb}.est-rtab-border{border-right:2px solid #bbb}.est-cell-group-padding{padding:calc(.3rem + 1px);position:absolute;top:0;left:0;height:100%;width:100%}.est-margin-bottom-10{margin-bottom:10px}.est-text-center{text-align:center}.est-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}']}]}],Z.ctorParameters=function(){return[{type:n.NgControl,decorators:[{type:t.Self},{type:t.Optional}]},{type:s.PreferencesService,decorators:[{type:t.Optional}]},{type:J,decorators:[{type:t.Optional},{type:t.Inject,args:[X]}]},{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[$]}]},{type:r.LocalizationService},{type:t.ChangeDetectorRef},{type:i.HashingService},{type:i.UtilityService},{type:i.ExportService},{type:i.DateService},{type:i.MessageService}]},Z.propDecorators={EsTdsDirective:[{type:t.ContentChildren,args:[W]}],EsThsDirective:[{type:t.ContentChildren,args:[K]}],EsThs:[{type:t.ContentChildren,args:[t.forwardRef((function(){return q}))]}],EsTds:[{type:t.ContentChildren,args:[t.forwardRef((function(){return F}))]}],bodyRef:[{type:t.ContentChild,args:["body",{static:!1}]}],headerRef:[{type:t.ContentChild,args:["header",{static:!1}]}],headerGroupRef:[{type:t.ContentChild,args:["headerGroup",{static:!1}]}],secondaryHeaderGroupRef:[{type:t.ContentChild,args:["secondaryHeaderGroup",{static:!1}]}],CornerMenuOptions:[{type:t.Input}],ColumnsResizable:[{type:t.Input}],AutoUpdate:[{type:t.Input}],UseCustomCellActions:[{type:t.Input}],CustomCellActionsOn:[{type:t.Input}],CellActionPropagates:[{type:t.Input}],UseCustomCells:[{type:t.Input}],MaxHeight:[{type:t.Input}],ContainerClass:[{type:t.Input}],XLSXExport:[{type:t.Input}],CSVExport:[{type:t.Input}],AllSearch:[{type:t.Input}],HighCellDensity:[{type:t.Input}],Selection:[{type:t.Input}],ShowLoadingOnBootstrap:[{type:t.Input}],Removal:[{type:t.Input}],RemovalCondition:[{type:t.Input}],Export:[{type:t.Input}],ShiftClick:[{type:t.Input}],HidePaging:[{type:t.Input}],HidePagingCount:[{type:t.Input}],HidePagingButtons:[{type:t.Input}],ContextMenu:[{type:t.Input}],ExportFileName:[{type:t.Input}],TableClass:[{type:t.Input}],ExportFunction:[{type:t.Input}],HasHeaderGroup:[{type:t.Input}],HasSecondaryHeaderGroup:[{type:t.Input}],SliceSize:[{type:t.Input}],EndlessScroll:[{type:t.Input}],EndlessScrollOnlyForAll:[{type:t.Input}],HeaderHidden:[{type:t.Input}],BodyHidden:[{type:t.Input}],SelectionDisabled:[{type:t.Input}],SingleSelection:[{type:t.Input}],RowClassAssigner:[{type:t.Input}],OrderByColumn:[{type:t.Input}],MultipleOrderingDirectives:[{type:t.Input}],HiddenColumns:[{type:t.Input}],ColumnsOrdering:[{type:t.Input}],SearchView:[{type:t.Input}],SelectAll:[{type:t.Input}],UseArrayModePaging:[{type:t.Input}],DynamicRowColumnsDefinition:[{type:t.Input}],DynamicOperations:[{type:t.Input}],Hierarchy:[{type:t.Input}],ParentKey:[{type:t.Input}],OwnKey:[{type:t.Input}],StartsExpanded:[{type:t.Input}],SavePreferences:[{type:t.Input}],PagingStyle:[{type:t.Input}],RowGroupingPagingStyle:[{type:t.Input}],SecondarySource:[{type:t.Input}],TertiarySource:[{type:t.Input}],UseSelectionCache:[{type:t.Input}],ShowItemGroupsColumns:[{type:t.Input}],onOrderChanged:[{type:t.Output}],onSearchRequest:[{type:t.Output}],onSelectionChanged:[{type:t.Output}],onRemoval:[{type:t.Output}],onAbortRemoval:[{type:t.Output}],onCellClick:[{type:t.Output}],onCornerAction:[{type:t.Output}],onDynamicOperation:[{type:t.Output}],exportDownloader:[{type:t.ViewChild,args:["exportDownloader",{static:!1}]}],tableEmptyMenu:[{type:t.ViewChild,args:["emptyMenu",{static:!0}]}],ArraymodeItemsPerPage:[{type:t.Input}]};var Y=function(){},ee=function(e){function t(t){var n=e.call(this,null!=t?t:"it-IT")||this;return e.prototype.set.call(n,"en->it","All",["Tutto"]),e.prototype.set.call(n,"en->it","Shown Elements",["Elementi visualizzati"]),e.prototype.set.call(n,"en->it","Shown Groups",["Gruppi visualizzati"]),e.prototype.set.call(n,"en->it","Are you sure you want to retrieve all results?",["Si è sicuri di voler caricare tutti i risultati?"]),e.prototype.set.call(n,"en->it","This might slow down the page and possibly crash the entire application",["L'operazione potrebbe rallentare la pagina fino al crash dell'applicazione"]),n}return f(t,e),t}(r.LocalizationService);ee.decorators=[{type:t.Injectable}],ee.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[$]}]}]};var te=function(){function e(e,n,i,r){this.msgExts=e,this.lc=n,this.cdr=i,this.locale=r,this.WarnOnAll=!0,this.AllSearch=!0,this.DefaultAll=999999,this.GroupMode=!1,this.GroupCount=!1,this.ShowCount=!0,this.pagingSelected=new t.EventEmitter,this.PagingOptions=[10,15,30,45,100]}return e.prototype.ngOnInit=function(){this.Model=this.View?this.View.itemsperpageoverride:this.CurrentPageSize,this.AllSearch&&this.PagingOptions.push(this.DefaultAll)},e.prototype.choice=function(e){var t=this;e==this.DefaultAll&&this.WarnOnAll?this.msgExts.simpleWarningWithChoice(this.lc.loc("Are you sure you want to retrieve all results?"),this.lc.loc("This might slow down the page and possibly crash the entire application"),(function(){t.pagingSelected.emit(e),t.Model=e}),(function(){var e=t.Model;t.Model=null,t.cdr.detectChanges(),t.Model=e,t.cdr.detectChanges()})):(this.pagingSelected.emit(e),this.Model=e)},e}();te.decorators=[{type:t.Component,args:[{selector:"app-paging",viewProviders:[{provide:r.LocalizationService,useClass:ee}],template:'<ng-container *ngIf="!Hidden">\r\n <span class="est-fs-14"> {{(GroupMode ? \'Shown Groups\' : \'Shown Elements\') | localize : lc}}:&nbsp;</span>\r\n <mat-form-field [appearance]="\'legacy\'" class="mat-paginator-page-size-select est-fs-14 est-ipp-bold" *ngIf="Model">\r\n <select matNativeControl [ngModel]="Model" name="input" (ngModelChange)="choice($event)">\r\n <ng-container *ngFor="let pOpt of PagingOptions">\r\n <option *ngIf="pOpt == DefaultAll || PagerCount > pOpt" [value]="pOpt">{{ pOpt == DefaultAll ? (\'All\' | localize : lc) : pOpt.toString()}}</option>\r\n </ng-container>\r\n </select>\r\n </mat-form-field>\r\n <span class="est-fs-14 est-ipp-bold" *ngIf="ShowCount">&nbsp;/&nbsp;{{PagerCount | number : \'0.0-0\' : locale}}\r\n </span>\r\n</ng-container>',encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".est-ipp-sel,.est-ipp-sel-all,.est-rg-ipp-sel,.est-rg-ipp-sel-all{color:#0275d8!important;cursor:pointer;text-decoration:none;display:block;display:inline}.est-ipp-bold{font-weight:700}.mat-paginator-page-size-select{margin:6px 4px 0;width:50px}.mat-paginator-page-size-select .mat-form-field-wrapper{height:52px!important;margin-top:-15px!important;padding:0!important}.mat-form-field-type-mat-native-select .mat-form-field-infix:after{margin-top:-5.5px!important}"]}]}],te.ctorParameters=function(){return[{type:i.MessageService},{type:r.LocalizationService},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[$]}]}]},te.propDecorators={CurrentPageSize:[{type:t.Input}],View:[{type:t.Input}],WarnOnAll:[{type:t.Input}],AllSearch:[{type:t.Input}],DefaultAll:[{type:t.Input}],GroupMode:[{type:t.Input}],GroupCount:[{type:t.Input}],ShowCount:[{type:t.Input}],PagerCount:[{type:t.Input}],Hidden:[{type:t.Input}],pagingSelected:[{type:t.Output}]};var ne=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:$,useValue:(null==t?void 0:t.locale)||"it-IT"},{provide:j,useValue:(null==t?void 0:t.debugMode)||!1}]}},e}();ne.decorators=[{type:t.NgModule,args:[{imports:[a.CommonModule,n.FormsModule,l.RouterModule,r.LocalizationModule,p.ModalModule,d.BsDropdownModule,u.CsvModule,g.ContextMenuModule,c.MatSelectModule,h.MatInputModule],declarations:[q,F,Z,W,K,te],providers:[i.UtilityService,i.ExportService,i.HashingService,i.MessageService],exports:[q,F,Z,W,K,te]}]}],e.AppOrdering=x,e.AppSearch=S,e.CornerMenuOption=T,e.EsTableColumnsDefinition=I,e.EsTableComponent=Z,e.EsTableDefaultable=J,e.EsTableModule=ne,e.EsTableModuleConfig=Y,e.EsTableOperationDefinition=E,e.EsTd=F,e.EsTh=q,e.GenericItem=P,e.Group=A,e.GroupAggregation=G,e.GroupFilter=k,e.GroupOrAggregation=z,e.ItemsSelection=H,e.ReportColumn=M,e.ReportDefinition=O,e.ReportOrder=_,e.ReportParam=D,e.ReportResult=V,e.ReportRow=R,e.ɵa=Q,e.ɵb=$,e.ɵc=j,e.ɵd=X,e.ɵe=W,e.ɵf=K,e.ɵg=te,e.ɵh=ee,Object.defineProperty(e,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=esfaenza-es-table.umd.min.js.map