@esfaenza/es-table 11.2.45 → 11.2.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/esfaenza-es-table.umd.js +54 -31
- package/bundles/esfaenza-es-table.umd.js.map +1 -1
- package/bundles/esfaenza-es-table.umd.min.js +1 -1
- package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
- package/esfaenza-es-table.metadata.json +1 -1
- package/esm2015/lib/components/es-table/es_table.component.js +51 -27
- package/fesm2015/esfaenza-es-table.js +50 -26
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +42 -9
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@esfaenza/localizations"),require("@esfaenza/extensions"),require("@angular/forms"),require("@esfaenza/preferences"),require("@angular/cdk/drag-drop"),require("@angular/common"),require("@angular/router"),require("@angular/material/select"),require("@angular/material/input"),require("@esfaenza/forms-and-validations"),require("@angular/platform-browser"),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","@esfaenza/localizations","@esfaenza/extensions","@angular/forms","@esfaenza/preferences","@angular/cdk/drag-drop","@angular/common","@angular/router","@angular/material/select","@angular/material/input","@esfaenza/forms-and-validations","@angular/platform-browser","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.localizations,e.i1,e.ng.forms,e.preferences,e.ng.cdk.dragDrop,e.ng.common,e.ng.router,e.ng.material.select,e.ng.material.input,e.formsAndValidations,e.ng.platformBrowser,e.modal,e.dropdown,e.ngxCsv,e.ngxContextmenu)}(this,(function(e,t,n,i,r,s,o,a,l,h,c,p,u,d,g,m,f){"use strict";function v(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var y=v(t),w=v(i),C=function(e,t){return(C=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 b(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}C(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function x(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 S(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 I(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 P(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 _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(P(arguments[t]));return e}Object.create;var O=new t.InjectionToken("EST_LOCALE"),M=new t.InjectionToken("EST_DEBUG"),T=new t.InjectionToken("EST_DEFAULTS"),V=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 b(t,e),t}(n.LocalizationService);V.decorators=[{type:t.Injectable}],V.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[O]}]}]};var H=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.CountLabel=null,this.ShowCount=!0,this.ShowPaging=!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||15:this.CurrentPageSize,this.AllSearch&&this.PagingOptions.push(this.DefaultAll)},e.prototype.ngOnChanges=function(e){var t=e.View,n=e.CurrentPageSize;(t&&!t.firstChange||n&&!n.firstChange)&&(this.Model=(null==t?void 0:t.currentValue)?t.currentValue.itemsperpageoverride||15:(null==n?void 0:n.currentValue)?n.currentValue:null)},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}();H.decorators=[{type:t.Component,args:[{selector:"app-paging",viewProviders:[{provide:n.LocalizationService,useClass:V}],template:'<ng-container *ngIf="!Hidden">\r\n <span class="est-fs-14"> {{CountLabel && !GroupMode ? CountLabel : ((GroupMode ? \'Shown Groups\' : \'Shown Elements\') | localize : lc)}}: </span>\r\n <ng-container *ngIf="ShowPaging && Model && (Model == DefaultAll || PagerCount >= Model || PagerCount == -1)">\r\n <mat-form-field [appearance]="\'legacy\'" class="mat-paginator-page-size-select est-fs-14 est-ipp-bold">\r\n <select matNativeControl [ngModel]="Model" name="input" (ngModelChange)="choice($event)">\r\n <ng-container *ngFor="let pOpt of PagingOptions">\r\n <option *ngIf="pOpt == DefaultAll || PagerCount >= pOpt || PagerCount == -1" [value]="pOpt">{{ pOpt == DefaultAll ? (\'All\' | localize : lc) : pOpt.toString()}}</option>\r\n </ng-container>\r\n </select>\r\n </mat-form-field>\r\n <span class="est-fs-14 est-ipp-bold" *ngIf="ShowCount && PagerCount != -1"> / </span>\r\n </ng-container>\r\n <span class="est-fs-14 est-ipp-bold" *ngIf="ShowCount && PagerCount != -1">{{PagerCount | number : \'0.0-0\' : locale}}</span>\r\n</ng-container>',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}"]}]}],H.ctorParameters=function(){return[{type:i.MessageService},{type:n.LocalizationService},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[O]}]}]},H.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}],CountLabel:[{type:t.Input}],ShowCount:[{type:t.Input}],ShowPaging:[{type:t.Input}],PagerCount:[{type:t.Input}],Hidden:[{type:t.Input}],pagingSelected:[{type:t.Output}]};var D=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}(),R=function(){},E=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=[]},k=function(e,t){this.column=e,this.value=t},G=function(){},A=function(e){this.Template=e,this._directive=!0,this._multi=!1,this.tdVisible=!0,this.tdIf=!0};A.decorators=[{type:t.Directive,args:[{selector:"[td]"}]}],A.ctorParameters=function(){return[{type:t.TemplateRef}]},A.propDecorators={tdVisible:[{type:t.Input}],td:[{type:t.Input}],tdIf:[{type:t.Input}],tdClass:[{type:t.Input}]};var z=function(e){this.Template=e,this._thAggregations=null,this._thParents=null,this._directive=!0,this._referenced=!1,this._multi=!1,this._multi_content="",this.th="",this.thPinned=!1,this.thPinnable=!0,this.thPinnedWidth=150,this.thVisible=!0,this.thFixed=!1,this.thParent="",this.thOrderable=!0,this.thWrap=!1,this.thResizable=!1,this.thIf=!0,this.thEmpty=!1,this.thGroup=!1,this.thAggregation=null,this.thUserEdits=null};z.decorators=[{type:t.Directive,args:[{selector:"[th]"}]}],z.ctorParameters=function(){return[{type:t.TemplateRef}]},z.propDecorators={th:[{type:t.Input}],thPinned:[{type:t.Input}],thPinnable:[{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}],thEmpty:[{type:t.Input}],thGroup:[{type:t.Input}],thAggregation:[{type:t.Input}],thUserEdits:[{type:t.Input}],thMulti:[{type:t.Input}]};var L=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 the",["Tutti gli"]),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 b(t,e),t}(n.LocalizationService);L.decorators=[{type:t.Injectable}],L.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[O]}]}]};var B=function(){function e(e,t,n,i,r){this.est=e,this.expExts=t,this.msgExts=n,this.utiExts=i,this.dateExts=r}return e.prototype.tryExport=function(e){var t=this;this.est.ExportFunction&&(this.est.reportMode?this.est.ExportFunction(e):this.est.ExportFunction((function(n,i){return void 0===i&&(i=!1),x(t,void 0,void 0,(function(){var t,r=this;return S(this,(function(s){switch(s.label){case 0:return i?[2]:0==n.length?(this.msgExts.simpleWarning(this.est.lc.loc("Cannot export an empty dataset")),[2]):(this.setupExport(n),"CSV"!=e?[3,1]:(this.est.cdr.detectChanges(),setTimeout((function(){r.est.exportDownloader.nativeElement.click()})),[3,7]));case 1:if("XLSX"!=e)return[3,6];if(null!=this.ExcelJS)return this.exportExcel(),[2];s.label=2;case 2:return s.trys.push([2,4,,5]),t=this,[4,import("exceljs")];case 3:return t.ExcelJS=s.sent(),this.exportExcel(),[3,5];case 4:throw s.sent(),"Impossibile caricare la libreria per l'esportazione in Excel";case 5:return[3,7];case 6:throw"Formato di esportazione non riconosciuto";case 7:return[2]}}))}))})))},e.prototype.exportExcel=function(){return x(this,void 0,void 0,(function(){var e,t,n,i,r,s,o,a,l,h,c,p,u,d;return S(this,(function(g){switch(g.label){case 0:for(1,(e=new this.ExcelJS.Workbook).creator="Ema's big Es-Table",e.created=new Date,t=e.addWorksheet("Data"),(n=t.getRow(1)).font={bold:!0},this.est.headers=this.est.headers.sort((function(e,t){return e.order-t.order})),i=0;i<this.est.headers.length;i++)a=this.est.headers[i],n.getCell(i+1).value=a.label;for(i=0;i<this.est.data.length;i++)for(r=t.getRow(i+1+1),s=this.est.data[i],o=0;o<this.est.headers.length;o++)if(a=this.est.headers[o],l=r.getCell(o+1),null==(h=s[a.key])||null==h)l.value="";else switch(a.type){case"date":l.value=this.dateExts.getDateConvertion(h).toDate();case"number":l.value=parseFloat(h.replace(",","."));default:l.value=h}return[4,e.xlsx.writeBuffer()];case 1:return c=g.sent(),p=new Blob([c],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;"}),u=window.URL.createObjectURL(p),d=this.est.ExportFileName,this.utiExts.fileDownload(u,d.endsWith(".csv")?d.replace(".csv",".xlsx"):d.endsWith(".xlsx")?d:d+".xlsx"),[2]}}))}))},e.prototype.setupExport=function(e){var t=this.est.DynamicRowColumnsDefinition;this.est.headers=t&&t.length>0?this.expExts.setupForGenericExport(e,t.map((function(e){return{label:e.description,key:e.propertyName,order:e.columnOrder,type:"string"}}))):this.expExts.setupForExport(e),this.est.data=e},e}(),U=function(e,t){this.id=e,this.order=t},F=function(e,t,n,i,r,s,o,a,l,h,c){this.id=e,this.description=t,this.visible=n,this.fixed=i,this.pinned=r,this.pinnable=s,this.pinnedWidth=o,this.template=a,this.parentTemplates=l,this.multi=h,this.multiContent=c},N=function(){function e(e,t,n,i,r){this.est=e,this.utilities=t,this.utiExts=n,this.prefService=i,this.rgH=r}return e.prototype.handleTHOrderChange=function(e,t){var n=this.est.viewMode?this.est.View.orders:this.est.arrayOrders,i=!0,r=null;!n&&this.est.viewMode?this.est.View.orders=[]:!n&&this.est.arrayMode&&(this.est.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.est.MultipleOrderingDirectives?n.push(new U(e,t)):this.est.viewMode?this.est.View.orders=[new U(e,t)]:this.est.arrayMode&&(this.est.arrayOrders=[new U(e,t)])),this.est.onOrderChanged.emit({id:e,order:t}),this.est.viewMode?this.est.groupSearchRequestsCache.length>0?this.rgH.emitRowGroupingSearches(e,n):this.est.emitSearchRequest(!1):this.est.arrayMode&&this.est.internalWriteValue()},e.prototype.reviewColumnsList=function(e){var t=this;if(this.est.TMPColumnsList=[],0!=e.length){for(var n=function(t){var n=e[t],r=n.th;if(!r)return"continue";if((i.est.HiddenColumns||n.thVisible)&&n.thIf){var s=i.est.ColumnsList&&0!=i.est.ColumnsList.length&&i.est.ColumnsList.find((function(e){return e.id==r}))||null,o=new F(r,null,n.thVisible,n.thFixed||n.thGroup,null==s?n.thPinned:s.pinned,n.thPinnable,n.thPinnedWidth,n.Template,n._thParents,n._multi,n._multi_content);s&&(o.prev_index=s.prev_index),i.est.TMPColumnsList.push(o)}},i=this,r=0;r<e.length;r++)n(r);this.est.ColumnsList=[],this.est.TMPColumnsList.forEach((function(e){t.est.ColumnsList.push(Object.assign({},e))}))}},e.prototype.expandMultiThsAndTds=function(e,t,n){for(var i={},r=0;r<e.length;r++){(P=e[r]).thMulti&&(i[P.th]={On:P.th,tdref:null,thref:P,thgen:{},tdgen:{}})}for(r=0;r<t.length;r++){(O=t[r])._multi=!!i[O.td],O._multi&&(i[O.td].tdref=O)}e=e.filter((function(e){return!e.thMulti})),t=t.filter((function(e){return!e._multi}));var s={},o={},a={},l=[];for(r=0;r<n.length;r++){var h=n[r];for(var c in i)if(h[c]&&h[c].length)for(var p=i[c],u=p.tdref,d=p.thref,g=0;g<h[c].length;g++){var m=h[c][g];m._headersHierarchy||(m._headersHierarchy=m.header_group?m.header_group.split(">").map((function(e){return e.trim()})):[]);var f=m.header,v=m.header_group||null,y=m._headersHierarchy;if(!o[v+"_"+f]){o[v+"_"+f]=!0;var w=new z(d.Template);w._multi=!0,w._multi_content=f,w.th=c+"_"+g,w.thClass=d.thClass,w.thIf=d.thIf,w.thVisible=d.thVisible,w.thWrap=d.thWrap,w.thParent=y[y.length-1],w.thOrderable=!1;for(var C=0;C<y.length;C++){var b=y[C];if(!s[b]){s[b]=!0;var x=new z(null);x.th=b,x._multi_content=b,x.thParent=C>0?y[C-1]:null,l.push(x)}}l.push(w);var S=new A(u.Template);S._multi=!0,S.td=c+"_"+g,S.tdClass=u.tdClass,S.tdIf=u.tdIf,S.tdVisible=u.tdVisible,a[S.td]=S}}}var I=[];for(r=0;r<l.length;r++)l[r].thParent||I.push(l[r]);for(var c in s)for(r=0;r<l.length;r++){var P;(P=l[r]).thParent&&P.thParent==c&&I.push(P)}e=_(e,l);for(r=0;r<l.length;r++){var O;(O=a[l[r].th])&&t.push(O)}return{expTds:t,expThs:e}},e.prototype.moveFixedColumnsAtTheBeginning=function(e,t){for(var n={},i=0,r=0,s={},o={},a=0;a<this.est.ColumnsList.length;a++){var l=this.est.ColumnsList[a];s[l.id]=l,l.pinned&&(a!=r&&this.utilities.arrayMove(this.est.ColumnsList,a,r),r++),l.fixed&&!l.pinned&&(a!=r+i&&this.utilities.arrayMove(e,a,r+i),i++)}r=i=0;for(var h=0;h<e.length;h++){var c=e[h];n[c.th]=c,c.thPinned=!s[c.th]&&c.thPinned||s[c.th]&&s[c.th].pinned,c.thPinned&&(h!=r&&this.utilities.arrayMove(e,h,r),r++),!c.thFixed&&!c.thGroup||c.thPinned||(h!=r+i&&this.utilities.arrayMove(e,h,r+i),i++)}for(h=0;h<e.length;h++)o[e[h].th]=h;var p=new Array(e.length);for(h=0;h<t.length;h++){var u=t[h];p[o[u.td]]=u}this.est.HasPinnedColumns=r>0},e.prototype.evaluatePinnedColumnsWidth=function(){if(this.est.HasPinnedColumns){this.est.PinnedContainerWidth=0;for(var e=0;e<this.est.ColumnsList.length;e++){var t=this.est.ColumnsList[e];t.pinned&&t.visible&&(this.est.PinnedContainerWidth+=t.pinnedWidth)}this.est.PinnedContainerWidth+=this.est.Selection?25:0}},e.prototype.alignColumnsIfLoadedView=function(e){var t=this,n=this.est.viewMode&&e.savedstate,i=[];if(this.est.ColumnsList&&0!=this.est.ColumnsList.length){var r=this.est.viewMode?e.columns:this.est.arrayColumns;if(this.est.ColumnsList.forEach((function(e){var t=r.filter((function(t){return(t.startsWith("§")?t.substring(1):t)==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.est.viewMode?e.columns=i:this.est.arrayColumns=i),this.est.viewMode&&e.savedstate&&this.est.ColumnsOrdering&&e.column_ordering.length>0){var s=[];e.column_ordering.forEach((function(e){t.est.ColumnsList.forEach((function(t){t.id==e&&s.push(t)}))})),this.est.ColumnsList.forEach((function(e){s.find((function(t){return t==e.id}))||s.push(e)})),this.est.ColumnsList=s}this.est.viewMode&&(e.savedstate=!1),n&&this.est.changed()}},e.prototype.refreshColumnsVisibility=function(e,t,n){for(var i=[],r={},s={},o=0;o<this.est.ColumnsList.length;o++){var a=this.est.ColumnsList[o];s[a.id]=a,a.visible&&i.push((a.pinned?"§":"")+a.id)}if(n?n.columns=i:this.est.arrayColumns=i,e)for(var l=0;l<e.length;l++){var h=e[l];h.thVisible=h.thFixed||(s[h.th]?s[h.th].visible:h.thVisible),(h.thFixed||h.thGroup)&&(r[h.th]=!0)}if(t)for(l=0;l<t.length;l++){var c=t[l];c.tdVisible=r[c.td]||(s[c.td]?s[c.td].visible:c.tdVisible)}this.est.changed()},e.prototype.alignHeadersOrdering=function(e,t){for(var n=t?t.orders:this.est.arrayOrders,i=0;i<e.length;i++){var r=e[i];r.thOrder=null;for(var s=0;s<n.length;s++){var o=n[s];o.id==r.th&&(r.thOrder=o.order)}}},e.prototype.evaluateHeadersGroupingInfos=function(e){for(var t={},n={},i=0;i<e.length;i++){n[(o=e[i]).th]=o,o.thParent&&!t[o.thParent]&&(t[o.thParent]=!0)}var r=0,s=[];for(i=0;i<e.length;i++){var o;if(!t[(o=e[i]).th]){s.push(o);var a=this.jumpsToFinalParent(o,n);r=a>r?a:r}}return{leafs:s,groupingLevel:r,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.est.OrderDirectives.length;r++){var o=e.thsCache[this.est.OrderDirectives[r]];o.thVisible&&!o.thPinned&&s.push(o)}var a="";for(r=0;r<s.length;r++){var l=s[r],h=r-1>=0?s[r-1]:null;l._lbord=l.thParent!=a,l._rbord=n.length==r+1,h&&(h._rbord=l.thParent!=a),a=l.thParent;for(i=0;i<e.groupingLevel;i++){var c=l.thParent;c&&!l.thPinned&&(t[i][r]=c,l=e.thsCache[c])}}a="";var p=0;this.est.TMPRowThGroups=[];for(i=0;i<t.length;i++){var u=[];this.est.TMPRowThGroups.push(u),(this.est.Selection||this.est.HasPinnedColumns)&&u.push({Span:1,Template:null,Pinned:this.est.HasPinnedColumns});for(var d=0;d<t[i].length;d++){var g=t[i][d];g==a?p++:(p>0&&u.push({Span:p,Template:a?e.thsCache[a].Template:null,Content:a?e.thsCache[a]._multi_content:null,Borders:!!a}),p=1,a=g)}u.push({Span:p,Template:a?e.thsCache[a].Template:null,Content:a?e.thsCache[a]._multi_content:null,Borders:!!a}),this.est.Removal&&u.push({Span:1,Template:null}),(this.est.Export||this.est.HiddenColumns||this.est.ColumnsOrdering||this.est.CornerMenuOptions)&&u.push({Span:1,Template:null}),p=0,a=""}}},e.prototype.jumpsToFinalParent=function(e,t){var n=0,i=null,r=[],s=e;do{(i=e.thParent)&&((e=t[i]).thEmpty||e._multi_content?!e.thEmpty&&e._multi_content&&r.unshift({content:e._multi_content}):r.unshift({tmpl:e.Template}),n++)}while(i);return s._thParents=r,n},e.prototype.generateDefaultOrder=function(e,t){if(0!=e.length){var n=this.est.viewMode?t.column_ordering:this.est.arrayColumnOrdering;if(n&&0!=n.length){this.est.OrderDirectives=n;var i=function(t){var n=e[t].th;r.est.OrderDirectives.find((function(e){return e==n}))||r.est.OrderDirectives.push(n)},r=this;for(s=0;s<e.length;s++)i(s)}else for(var s=0;s<e.length;s++){var o=e[s].th;this.est.OrderDirectives.push(o)}}},e.prototype.applyOrdering=function(e,t){var n=this,i=[];if(t){this.est.OrderDirectives.forEach((function(e){var t=n.est.TMPRowTHs.filter((function(t){return t.ID==e}))[0];t&&i.push(t)})),this.est.TMPRowTHs=i;for(var r=function(e){var t=s.est.TMPRowTDs[s.est.RowContexts[e]],n=[];s.est.OrderDirectives.forEach((function(e){var i=t.filter((function(t){return t.ID==e}))[0];n.push(i)})),s.est.TMPRowTDs[s.est.RowContexts[e]]=n},s=this,o=0;o<this.est.RowContexts.length;o++)r(o)}this.est.viewMode?e.column_ordering=this.est.OrderDirectives:this.est.arrayColumnOrdering=this.est.OrderDirectives,this.est.changed()},e.prototype.sendUp=function(e){var t=this.est.TMPColumnsList.indexOf(e);if(!this.est.TMPColumnsList[t-1].fixed&&!this.est.TMPColumnsList[t-1].pinned){this.utiExts.swap(this.est.TMPColumnsList,t,t-1);var n=[];this.est.TMPColumnsList.forEach((function(e){n.push(Object.assign({},e))})),this.est.TMPColumnsList=n}},e.prototype.sendDown=function(e){var t=this.est.TMPColumnsList.indexOf(e);this.utiExts.swap(this.est.TMPColumnsList,t,t+1);var n=[];this.est.TMPColumnsList.forEach((function(e){n.push(Object.assign({},e))})),this.est.TMPColumnsList=n},e.prototype.pinOrUnpinColumn=function(e){var t=this.est.TMPColumnsList.indexOf(e);if(e.pinned){if(null!=e.prev_index&&null!=e.prev_index)this.utilities.arrayMove(this.est.TMPColumnsList,t,e.prev_index);else for(n=0;n<this.est.TMPColumnsList.length;n++)if(!this.est.TMPColumnsList[n].pinned&&!this.est.TMPColumnsList[n].fixed){this.utilities.arrayMove(this.est.TMPColumnsList,t,n-1);break}}else{e.prev_index=t;for(var n=0;n<this.est.TMPColumnsList.length;n++)if(!this.est.TMPColumnsList[n].pinned){this.utilities.arrayMove(this.est.TMPColumnsList,t,n);break}}e.pinned=!e.pinned},e.prototype.columnClicked=function(e){this.est.lastSelectedItemID=e.id,this.est.HiddenColumns&&!e.fixed&&(e.visible=!e.visible,this.updateGlobalColVisCheck())},e.prototype.resetColumnVisSelection=function(){var e=this;this.est.TMPColumnsList=[],this.est.TMPColumnsList=[],this.est.ColumnsList.forEach((function(t){e.est.TMPColumnsList.push(Object.assign({},t))}));var t=[];this.est.ColumnsOrdering&&(this.est.OrderDirectives.forEach((function(n){var i=e.est.TMPColumnsList.filter((function(e){return e.id==n}))[0];i&&t.push(i)})),this.est.TMPColumnsList=t),this.updateGlobalColVisCheck()},e.prototype.refreshColumnOrdering=function(){this.est.OrderDirectives=[];for(var e=0;e<this.est.ColumnsList.length;e++)this.est.OrderDirectives.push(this.est.ColumnsList[e].id)},e.prototype.updateGlobalColVisCheck=function(){this.est.globalColVisCheck=this.est.TMPColumnsList.every((function(e){return e.visible}))},e.prototype.columnReordered=function(e){o.moveItemInArray(e.container.data,e.previousIndex,e.currentIndex)},e.prototype.sortPredicate=function(e,t){var n=this.est.ColumnsList[e];return!(n.fixed||n.pinned||t.data.pinned||t.data.pinned)},e.prototype.confirmColumnVisibilitySelection=function(){var e=this;if(this.est.TMPColumnsList.every((function(e){return!e.visible})))return!1;var t=this.est.viewMode?this.est.MainGroupView||this.est.View:null;if(this.est.ColumnsList=[],this.est.TMPColumnsList.forEach((function(t){e.est.ColumnsList.push(Object.assign({},t))})),this.refreshColumnOrdering(),this.applyOrdering(t,!1),this.refreshColumnsVisibility(null,null,t),this.est.SavePreferences){if(!this.est.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.est.arrayMode?this.est.arrayColumns:t.columns,i=this.est.arrayMode?this.est.arrayColumnOrdering:t.column_ordering,r={columns:JSON.parse(JSON.stringify(n)),column_ordering:JSON.parse(JSON.stringify(i))};this.prefService.setItem(this.est.ngControl.name,r,"preference").subscribe()}return this.est.viewMode?setTimeout((function(){if(e.est.MainGroupView)for(var t=0;t<e.est.groupSearchRequestsCache.length;t++){var n=e.est.groupSearchRequestsCache[t].view;n.columns=e.est.MainGroupView.columns,n.column_ordering=e.est.MainGroupView.column_ordering,e.est.emitSearchRequest(!0,e.est.groupSearchRequestsCache[t].view)}else e.est.emitSearchRequest(!0)})):this.est.arrayMode&&setTimeout((function(){e.est.internalWriteValue()})),this.est.lastSelectedItemID=null,!0},e.prototype.unpinColumn=function(e){this.resetColumnVisSelection(),this.pinOrUnpinColumn(this.est.TMPColumnsList.find((function(t){return t.id==e}))),this.confirmColumnVisibilitySelection()},e.prototype.globalColVisCheckChanged=function(){var e=this;this.est.TMPColumnsList.forEach((function(t){t.fixed||(t.visible=e.est.globalColVisCheck)}))},e}(),W=function(e,t,n,i,r,s,o,a,l,h){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===h&&(h=!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=h},q=function(){function e(e){this.est=e}return e.prototype.generateRouterLink=function(e,t,n){if(this.est.DynamicTableRouterLinkCache[n._hash+e])return this.est.DynamicTableRouterLinkCache[n._hash+e];var i=this.getRouterLink(e,t,n);return this.est.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.eventuallyReviewDynamicColumns=function(){if(this.est.TMPBoundSource&&0!=this.est.TMPBoundSource.length&&(!!this.est.TMPBoundSource[0].properties&&!(!this.est.FirstBind&&this.est.DynamicRowColumnsDefinition&&this.est.DynamicRowColumnsDefinition.length>0)))if(this.est.DynamicRowColumnsDefinition&&0!=this.est.DynamicRowColumnsDefinition.length)this.est.UserDefinedDynamicCols=!0;else{var e=this.est.TMPBoundSource[0].properties;for(var t in this.est.DynamicRowColumnsDefinition=[],e)this.est.DynamicRowColumnsDefinition.push(new W(t,t));this.est.UserDefinedDynamicCols=!1}},e}(),j=function(){function e(e){this.est=e}return e.prototype.assignHierarchyLevels=function(e){if(e&&e.length)if(this.est.ParentKey||this.est.OwnKey||(void 0!==e[0].parentid&&(this.est.ParentKey="parentid"),void 0!==e[0].id&&(this.est.OwnKey="id")),this.est.ParentKey&&this.est.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.est.ParentKey]||1!=t){if(r[this.est.ParentKey]&&t>1)for(var s=0;s<e.length;s++){var o=e[s];if(o[this.est.OwnKey]==r[this.est.ParentKey]&&o._level==t-1){r._level=t,o._expanded=this.est.StartsExpanded,o.parent=!0,r._visible=this.est.StartsExpanded,n++;break}}}else r._level=1,r._visible=!0,r._expanded=this.est.StartsExpanded,n++}return n},e.prototype.expandParent=function(e){for(var t=0;t<this.est.boundSource.length;t++){var n=this.est.boundSource[t];if(n[this.est.OwnKey]==e){n._expanded=!0;for(var i=0;i<this.est.boundSource.length;i++){var r=this.est.boundSource[i];r[this.est.ParentKey]==e&&(r._visible=!0)}return}}},e.prototype.collapseParent=function(e){for(var t=0;t<this.est.boundSource.length;t++){var n=this.est.boundSource[t];if(n[this.est.OwnKey]==e)return n._expanded=!1,void this.collapseChildOfParent(e)}},e.prototype.collapseChildOfParent=function(e){for(var t=0;t<this.est.boundSource.length;t++){var n=this.est.boundSource[t];n[this.est.ParentKey]!=e||n.parent?n[this.est.ParentKey]==e&&n.parent&&(n._expanded=!1,n._visible=!1,this.collapseChildOfParent(n[this.est.OwnKey])):n._visible=!1}},e}(),K=function(){function e(e,t){this.est=e,this.utilities=t}return 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.est.viewMode&&this.est.View instanceof D?i=this.getViewItemsBySource():this.est.arrayMode&&(this.est.View.forEach((function(e){e._item=!0})),this.est.UseArrayModePaging&&!n?(this.est.SearchView?(this.est.ArraymodeItemsPerPage=this.est.SearchView.itemsperpageoverride,this.est.arraymodePage=this.est.SearchView.page,this.est.arraymodePages=this.est.SearchView.pages):t&&this.refreshPaging(this.est.ArraymodeItemsPerPage),i=this.adaptViewToPaging()):i=this.est.View),e?i.filter((function(e){return e._selected})):i},e.prototype.refreshPaging=function(e){this.est.ArraymodeItemsPerPage=e,this.est.arraymodePages=Math.ceil(this.est.View.length/this.est.ArraymodeItemsPerPage),this.est.arraymodePage=1,this.est.internalWriteValue()},e.prototype.getViewItemsBySource=function(){var e,t,n,i=this,r=this.est.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.utilities.cacheAggregations(e)})),n):((n=this.est.SecondarySource?this.est.View.items2:this.est.TertiarySource?this.est.View.items3:this.est.View.items)||(n=[]),n.forEach((function(e){e._item=!0})),n)},e.prototype.adaptViewToPaging=function(){var e=[];if(this.est.SearchView)return this.est.View;this.est.arrayPulsanti=this.utilities.getPagesArray(6,this.est.arraymodePage,this.est.arraymodePages);for(var t=(this.est.arraymodePage-1)*this.est.ArraymodeItemsPerPage;t<this.est.arraymodePage*this.est.ArraymodeItemsPerPage;t++)t<=this.est.View.length-1&&e.push(this.est.View[t]);return e},e.prototype.arrayModeReviewOrderings=function(){var e=this;this.est.arrayOrders.length>0&&this.est.arrayOrders.forEach((function(t){e.est.boundSource=e.est.boundSource.sort((function(e,n){return(e[t.id]>n[t.id]?1:-1)*("DESC"==t.order?-1:1)}))}))},e}(),$=function(){},X=function(){function e(e,t){this.est=e,this.utilities=t}return e.prototype.setupNextOrderAndSearch=function(e){if(this.est.View instanceof R){var t,n={NONE:"DESC",DESC:"ASC",ASC:null}[e.order||"NONE"];e.order=n;var i=this.est.View.orders?this.est.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.est.View.orders||(this.est.View.orders=[]),this.est.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.est.emitSearchRequest(!1)}else console.error("View diversa da reportdefinition entrata nel metodo setupNextOrderAndSearch")},e.prototype.reviewReportBindings=function(){var e=this;if(this.est.View instanceof R){this.est.View.orders&&this.est.View.orders.length>0&&this.est.View.orders.forEach((function(t){e.est.ReportValues.columns.filter((function(e){return e.id==t.column}))[0].order=t.order})),-2!=this.est.ReportValues.count?this.est.previousCount=this.est.ReportValues.count:-2==this.est.ReportValues.count&&(this.est.ReportValues.count=this.est.previousCount);var t=this.est.View.itemsperpageoverride||15;this.est.View.pages=Math.ceil(this.est.ReportValues.count/t),this.est.arrayPulsanti=this.utilities.getPagesArray(6,this.est.View.page,this.est.View.pages)}else console.error("View diversa da reportdefinition entrata nel metodo reviewReportBindings")},e}(),J=function(e,t,n){this.column=e,this.count=t,this.value=n,this.aggregations=[]},Q=function(e,t,n){this.column=e,this.aggregation=t,this.value=n},Z=function(e,t,n){this.column=e,this.aggregation=t,this.datatype=n},Y=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=[],this._thisKey=n+"_sep"},ee=function(e,t){this.column=e,this.value=t},te=function(){function e(e,t,n){this.est=e,this.utilities=t,this.dateExts=n,this.rgGroupCache=new Map,this.rgItemCache=new Map,this.rgChildGroupsCache=new Map}return e.prototype.handleNewDataOnRowGrouping=function(e,t){var n,i,r,s,o,a,l,h=this;if(0==((null===(a=e.requestedgroups)||void 0===a?void 0:a.length)||0)){this.est.boundSource=this.est.TMPBoundSource,this.rgGroupCache=new Map,this.rgItemCache=new Map,this.rgChildGroupsCache=new Map,this.est.TMPBoundSource.forEach((function(e){e._thisRoute=e._group?[{column:e.column,value:e.value}]:[],e._thisKey=e._group?e.value:null,e._grouplevel=0,h.rgGroupCache.set(e._thisKey,e)}));var c=this.est.TMPBoundSource[0];this.est.MainGroupView=Object.assign({},e),this.est.groupSearchRequestsCache=[{path:"",route:[{column:c.column,value:c.value}],view:this.est.MainGroupView,group_column:this.est.TMPBoundSource[0].column}],this.est.BaseItemsCount=e.objectcount}else{for(var p,u,d=e.requestedgroups.length!=t,g=this.est.boundSource,m=0,f="",v=[],y=0;y<e.requestedgroups.length;y++){var w=e.requestedgroups[y];f+=w.value,v.push({column:w.column,value:w.value});for(var C=m;C<g.length;C++){var b=g[C];if(C>=m&&b._group&&b.column==w.column&&b.value==w.value){m=C,b._expanded=!0;break}}}if(d){try{for(var x=I(this.rgChildGroupsCache.keys()),S=x.next();!S.done;S=x.next()){(M=S.value).startsWith(f)&&this.rgChildGroupsCache.delete(M)}}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 P=I(this.rgItemCache.keys()),O=P.next();!O.done;O=P.next()){var M;(M=O.value).startsWith(f)&&this.rgItemCache.delete(M)}}catch(e){r={error:e}}finally{try{O&&!O.done&&(s=P.return)&&s.call(P)}finally{if(r)throw r.error}}this.rgChildGroupsCache.set(f,[]),u=this.rgChildGroupsCache.get(f)}else this.rgItemCache.set(f,[]),p=this.rgItemCache.get(f);this.est.TMPBoundSource.forEach((function(t){t._parent=f,t._parentRoute=v,t._thisRoute=t._group?_(v,[new ee(t.column,t.value)]):[],t._thisKey=t._group?f+t.value:f,d?(t._grouplevel=e.requestedgroups.length,h.rgGroupCache.set(t._thisKey,t),u.push(t)):p.push(t)})),d&&e.savedstate?(this.est.boundSource=this.est.boundSource.filter((function(e){return!(e._item||e._thisRoute.length>v.length)})),this.est.groupSearchRequestsCache=this.est.groupSearchRequestsCache.filter((function(e){return!(e.route.length>v.length)}))):d&&(this.est.boundSource=this.est.boundSource.filter((function(e){return!(e._item||e._thisKey.startsWith(f)&&e._thisKey!=f)}))),this.est.boundSource=this.est.boundSource.filter((function(e){return!(e._parent==f)}));var T=this.est.boundSource[m];d&&(T._groupscount=null===(l=this.est.View)||void 0===l?void 0:l.groupcount),(o=this.est.boundSource).splice.apply(o,_([m+1,0],this.est.TMPBoundSource));this.est.boundSource.splice(m+1+0,0,this.getGroupSeparator(e,f,v,e.requestedgroups.length,d?"groups":"items"));var V={path:f,route:v,view:Object.assign({},e),group_column:d?this.est.TMPBoundSource[0].column:""},H=this.est.groupSearchRequestsCache.findIndex((function(e){return e.path==V.path&&e.group_column==V.group_column}));-1==H?this.est.groupSearchRequestsCache.push(V):this.est.groupSearchRequestsCache.splice(H,1,V)}},e.prototype.arrayModeReviewGroupings=function(e){if(0!=e.length){for(var t=[],n=[],i=0;i<e.length;i++){var r=e[i];r.thGroup?t.push(new J(r.th,0,"")):r.thAggregation&&(n=_(n,this.getGroupAggregations(r)))}t.length>0&&(this.rgGroupCache.clear(),this.rgItemCache.clear(),this.rgChildGroupsCache.clear(),this.est.ArrayGrouping=!0,this.est.boundSource=this.getGroupsRecursive(t,0,this.est.boundSource,n,null))}},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.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.utilities.groupBy(n,s.column),h=function(n){var h=l[n],p=new J(s.column,h.length,n);p.aggregations=c.generateAggregations(h,i);var u=p;if(u._group=!0,u._expanded=!1,r?(u._parent=r._thisKey,u._parentRoute=r._thisRoute,u._thisRoute=_(r._thisRoute,[{column:p.column,value:p.value}]),u._thisKey=r._thisKey+p.value,u._grouplevel=r._grouplevel+1):(u._thisRoute=[{column:p.column,value:p.value}],u._thisKey=p.value,u._grouplevel=0),0==t&&(u._visible=!0),c.utilities.calculateHash([u]),c.utilities.cacheAggregations(u),o.push(u),c.rgGroupCache.set(u._thisKey,u),a)h.forEach((function(e){return e._thisKey=u._thisKey})),o.push.apply(o,_(h)),c.rgItemCache.set(u._thisKey,h);else{var d=c.getGroupsRecursive(e,t+1,h,i,u),g=d.filter((function(e){return e._group&&e._parent==u._thisKey}));u._groupscount=g.length,o.push.apply(o,_(d)),c.rgChildGroupsCache.set(u._thisKey,g)}},c=this;for(var p in l)h(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 h=t[l];if(r=h.column){switch(h.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(h.aggregation){case"max":switch(h.datatype){case"string":i=s.sort().reverse()[0];break;case"date":i=new Date(Math.max.apply(Math,_(o))).toString();break;case"number":i=Math.max.apply(Math,_(a)).toString()}break;case"min":switch(h.datatype){case"string":i=s.sort()[0];break;case"date":i=new Date(Math.min.apply(Math,_(o))).toString();break;case"number":i=Math.min.apply(Math,_(a)).toString()}break;case"sum":switch(h.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 Q(h.column,h.aggregation,i))}}return n},e.prototype.getGroupSeparator=function(e,t,n,i,r){var s=new Y(i,n,t,Object.assign({},e),r);return s.buttons=this.utilities.getPagesArray(6,e.page,e.pages),this.utilities.calculateHash([s]),s},e.prototype.emitRowGroupingSearches=function(e,t){var n=this,i=this.est.groupSearchRequestsCache.filter((function(t){return t.group_column==e})).map((function(e){return e.view}));i&&0!=i.length||(i=this.est.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.est.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.est.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.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}(),ne=function(e,t,n){this.cache=e,this.index_cache=t,this.array=n},ie=function(){function e(e,t){this.est=e,this.rgHandler=t,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}return 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.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.est.globalCheck=this.est.boundSource.length>0&&this.est.boundSource.filter((function(e){return e._group||e._item})).every((function(e){return e._selected})),this.est.canSelectAll=t.count>0&&this.est.SelectAll,this.est.arrayMode){var o=this.est.selectedObjects;this.finalizeSelectionInformations(t),this.est.selectedObjects!=o&&this.est.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.rgHandler.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.handleItemsSelection=function(e,t,n){var i,r,s;void 0===t&&(t=null),void 0===n&&(n=null);var o=(null===(i=this.est.View)||void 0===i?void 0:i.selection)||this.est.arraymodeSelection;if(this.est.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.est.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],h=null!=t?l._selected!=t:null!=n&&l._selected!=this.est.globalCheck;if(h&&!l.locked&&(l._selected=null!=t?t:this.est.globalCheck),h||null==n){var c=o.all,p=l._group,u=l._selected,d=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==(d=this.getItemGroup(l))?null:d._selected,b=null==d?null:!d._selected;this.est.ArrayGrouping?this.performSimpleSelectionOperations(o,l,p,u,d,m,f,g,v):this.performSelectionOperations(o,l,c,p,u,m,y,f,w,g,v,C,b)}}return null==n&&(this.est.globalCheck=!this.est.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 h=this,c=this.getTriptic("item",e);n?i?(l.forEach((function(e){e._selected=!0})),o&&o.forEach((function(e){e._selected=!0,h.addItem(e,c)}))):(l.forEach((function(e){e._selected=!1})),s&&s.forEach((function(e){e._selected=!1,h.removeItem(e,c)}))):i?(this.addItem(t,c),r&&a&&a.every((function(e){return e._selected}))&&this.selectGroup(r)):(this.removeItem(t,c),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,h,c,p,u){var d=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 d.removeItem(e,m)})),o&&o.forEach((function(e){return d.removeItem(e,g)})),h&&h.forEach((function(e){e._selected=!0,d.removeItem(e,f)})),c&&c.forEach((function(e){e._selected=!0,d.removeItem(e,v)}))):(n||p?this.addItem(t,v):this.removeItem(t,g),a&&a.forEach((function(e){return d.removeItem(e,f)})),l&&l.forEach((function(e){return d.removeItem(e,f)})),h&&h.forEach((function(e){e._selected=!1,d.removeItem(e,m)})),c&&c.forEach((function(e){e._selected=!1,d.removeItem(e,g)}))):r?null==u&&n||p?this.removeItem(t,f):this.addItem(t,m):u||!n&&null==u?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 ne(this.groupsCache,this.i_groupsCache,t.groups);case"item":return new ne(this.itemsCache,this.i_itemsCache,t.items);case"group_exclusion":return new ne(this.group_exclusionsCache,this.i_group_exclusionsCache,t.group_exclusions);case"exclusion":return new ne(this.exclusionsCache,this.i_exclusionsCache,t.exclusions)}},e.prototype.getItemGroup=function(e){var t=this.rgHandler.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=I(this.rgHandler.rgItemCache.keys()),h=l.next();!h.done;h=l.next()){var c=h.value;c.startsWith(t._thisKey)&&a.push.apply(a,_(this.rgHandler.rgItemCache.get(c)))}}catch(e){s={error:e}}finally{try{h&&!h.done&&(o=l.return)&&o.call(l)}finally{if(s)throw s.error}}else a=this.rgHandler.rgItemCache.get(t._thisKey);return 0!=(a=a.filter((function(e){return!n||e._selected&&"selected"==n||!e._selected&&"unselected"==n}))).length||!e||this.est.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.rgHandler.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.rgHandler.rgGroupCache.get(t._thisKey),l=[];if(r)l=r;else if(i)try{for(var h=I(this.rgHandler.rgChildGroupsCache.keys()),c=h.next();!c.done;c=h.next()){var p=c.value;p.startsWith(t._thisKey)&&l.push.apply(l,_(this.rgHandler.rgChildGroupsCache.get(p)))}}catch(e){s={error:e}}finally{try{c&&!c.done&&(o=h.return)&&o.call(h)}finally{if(s)throw s.error}}else l=this.rgHandler.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,h=0;h<e.items.length;h++)null!=e.items[h]?n.push(e.items[h]):o=!0;for(h=0;h<e.exclusions.length;h++)null!=e.exclusions[h]?i.push(e.exclusions[h]):a=!0;if(e.groups)for(h=0;h<e.groups.length;h++)null!=e.groups[h]?t.push(e.groups[h]):s=!0;if(e.group_exclusions)for(h=0;h<e.group_exclusions.length;h++)null!=e.group_exclusions[h]?r.push(e.group_exclusions[h]):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.est.boundSource.forEach((function(e){return e._selected=!1})),e.all=!1,e.exclusions=[],e.items=[],e.groups=[],e.group_exclusions=[],this.clearSelectionCaches()),this.est.canSelectAll=e.count>0&&this.est.SelectAll},e.prototype.compactIndexMap=function(e){var t,n,i=0,r=new Map;try{for(var s=I(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.evaluateSelected=function(){var e,t=(null===(e=this.est.View)||void 0===e?void 0:e.selection)||this.est.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.est.selectedObjects=(t.all?this.est.BaseItemsCount:i)-n+t.items.length-t.exclusions.length,this.est.selectedObjects},e.prototype.selectAllOrResetSelection=function(){var e=this.est.View.selection||this.est.arraymodeSelection;this.clearSelectionCaches(),e.all=!e.all,e.exclusions=[],e.groups=[],e.group_exclusions=[],e.items=[],e.all||(this.est.canSelectAll=!1,this.est.globalCheck=!1),this.finalizeSelectionInformations(e),this.est.onSelectionChanged.emit(e),this.evaluateSelection(this.est.boundSource,e)},e}(),re=function(){function e(e){this.hashExts=e}return 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.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.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.getPagesArray=function(e,t,n,i,r){void 0===i&&(i=null),void 0===r&&(r=null);var s,o,a=[];if(-1==n&&(null==i&&null==r||i==r)&&(n=t+1),-1==n&&0==i&&(n=t),n<=e)s=1,o=n-1;else{var l=(e-2)/2;o=t+l,(s=t-l)<1?(s=1,o=e-1):o>=n&&(s=n-e+1,o=n-1)}if(a.push({val:1,cssClass:1===t?"btn-main app-white-text":"app-white-button"}),o>=s){for(var h=s;h<=o;h++)1!==h&&a.push({val:h,cssClass:h===t?"btn-main app-white-text":"app-white-button"});a.push({val:n,cssClass:n===t?"btn-main app-white-text":"app-white-button"})}return a},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.InputOrDefault=function(e,t,n){return null!=e&&null!=e?e:null!=t&&null!=t?t:null!=n&&null!=n?n:null},e}();re.ɵprov=y.ɵɵdefineInjectable({factory:function(){return new re(y.ɵɵinject(w.HashingService))},token:re,providedIn:"root"}),re.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],re.ctorParameters=function(){return[{type:i.HashingService}]};var se=function(){function e(e,n,i,r,s,o,a,l,h,c,p){var u,d,g,m,f,v,y,w,C,b,x,S,I,P,_,O,M;this.ngControl=e,this.prefService=n,this.deafults=i,this.locale=r,this.lc=s,this.cdr=o,this.utilities_H=a,this.utiExts=l,this.expExts=h,this.dateExts=c,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.ColumnsPinnable=null,this.AutoUpdate=null,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.CountLabel=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.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.UserEdits=!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.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.ArrayGrouping=!1,this.DirectivesBased=!1,this.PagerOptions={PagerCount:null,ShowCount:!0,ShowPaging:!0,ShowButtons:!0,ShowPagingOptions:!0,UsesView:!0,View:null,Ready:!1,Searches:"items"},this.propagateChange=function(e){},this.bodyTrackBy=function(e,t){return t._hash},this.doubleClickBufferMs=100,this.export_H=new B(this,this.expExts,this.msgExts,this.utiExts,this.dateExts),this.rowGrouping_H=new te(this,this.utilities_H,this.dateExts),this.columnMetadata_H=new N(this,this.utilities_H,this.utiExts,this.prefService,this.rowGrouping_H),this.dynamicMode_H=new q(this),this.hierarchyMode_H=new j(this),this.items_H=new K(this,this.utilities_H),this.reportMode_H=new X(this,this.utilities_H),this.selection_H=new ie(this,this.rowGrouping_H),e&&(e.valueAccessor=this),this.ColumnsResizable=this.utilities_H.InputOrDefault(this.ColumnsResizable,null===(u=this.deafults)||void 0===u?void 0:u.ColumnsResizable),this.AutoUpdate=this.utilities_H.InputOrDefault(this.AutoUpdate,null===(d=this.deafults)||void 0===d?void 0:d.AutoUpdate),this.AllSearch=this.utilities_H.InputOrDefault(this.AllSearch,null===(g=this.deafults)||void 0===g?void 0:g.AllSearch,!0),this.Export=this.utilities_H.InputOrDefault(this.Export,null===(m=this.deafults)||void 0===m?void 0:m.Export),this.HidePaging=this.utilities_H.InputOrDefault(this.HidePaging,null===(f=this.deafults)||void 0===f?void 0:f.HidePaging,!1),this.HidePagingCount=this.utilities_H.InputOrDefault(this.HidePagingCount,null===(v=this.deafults)||void 0===v?void 0:v.HidePagingCount),this.HidePagingButtons=this.utilities_H.InputOrDefault(this.HidePagingButtons,null===(y=this.deafults)||void 0===y?void 0:y.HidePagingButtons),this.ContainerClass=this.utilities_H.InputOrDefault(this.ContainerClass,null===(w=this.deafults)||void 0===w?void 0:w.ContainerClass,""),this.TableClass=this.utilities_H.InputOrDefault(this.TableClass,null===(C=this.deafults)||void 0===C?void 0:C.TableClass,"table table-striped table-hover table-sm"),this.Selection=this.utilities_H.InputOrDefault(this.Selection,null===(b=this.deafults)||void 0===b?void 0:b.Selection),this.SavePreferences=this.utilities_H.InputOrDefault(this.SavePreferences,null===(x=this.deafults)||void 0===x?void 0:x.SavePreferences),this.PagingStyle=this.utilities_H.InputOrDefault(this.PagingStyle,null===(S=this.deafults)||void 0===S?void 0:S.PagingStyle,"bottom"),this.RowGroupingPagingStyle=this.utilities_H.InputOrDefault(this.RowGroupingPagingStyle,null===(I=this.deafults)||void 0===I?void 0:I.RowGroupingPagingStyle,"left"),this.UseSelectionCache=this.utilities_H.InputOrDefault(this.UseSelectionCache,null===(P=this.deafults)||void 0===P?void 0:P.UseSelectionCache,!0),this.ShowItemGroupsColumns=this.utilities_H.InputOrDefault(this.ShowItemGroupsColumns,null===(_=this.deafults)||void 0===_?void 0:_.ShowItemGroupsColumns,!1),this.ArraymodeItemsPerPage=this.utilities_H.InputOrDefault(this.ArraymodeItemsPerPage,null===(O=this.deafults)||void 0===O?void 0:O.ArraymodeItemsPerPage,15),this.ColumnsPinnable=this.utilities_H.InputOrDefault(this.ColumnsPinnable,null===(M=this.deafults)||void 0===M?void 0:M.ColumnsPinnable,!0)}return e.prototype.ngOnInit=function(){var e=this;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.selection_H.handleItemsSelection([t.item]);e.changed(),n&&e.onSelectionChanged.emit(i)}}))},e.prototype.ngAfterViewInit=function(){if(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),this.DirectivesBased=!0),this.Hierarchy&&!this.UseCustomCells)throw'Es-table error: Per poter utilizzare l\'es-table con [Hierarchy]="true" è richiesto anche [UseCustomCells]="true"'},e.prototype.ngOnDestroy=function(){this.ctxMenuSubscription&&this.ctxMenuSubscription.unsubscribe()},e.prototype.ngOnChanges=function(e){return x(this,void 0,void 0,(function(){return S(this,(function(t){return e.SearchView&&this.SearchView&&(this.arrayPulsanti=this.utilities_H.getPagesArray(6,this.SearchView.page,this.SearchView.pages||1,this.SearchView.items.length,this.SearchView.itemsperpageoverride)),[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;return x(this,void 0,void 0,(function(){var n,i;return S(this,(function(r){switch(r.label){case 0:return this.View=e||null,this.researchInProgress=!1,this.View||this.SearchView?(!this.View||void 0===this.View.result||this.View instanceof R?!this.View||void 0===this.View.itemsperpageoverride||this.View instanceof D?!this.SearchView||void 0===this.SearchView.itemsperpageoverride||this.SearchView instanceof D||(this.SearchView.__proto__=new D):this.View.__proto__=new D:this.View.__proto__=new R,this.View&&this.View instanceof R?(this.setMode("report"),this.ReportValues=this.View.result,this.ReportValues&&this.reportMode_H.reviewReportBindings(),[3,11]):[3,1]):(this.boundSource=this.TMPBoundSource||[],this.cdr.markForCheck(),[2]);case 1:return this.View&&this.View instanceof D?(this.setMode("view"),n=0==((null===(t=this.View.requestedgroups)||void 0===t?void 0:t.length)||0),this.View.selection&&(this.View.internalsearchrequest||!n)&&this.UseSelectionCache||(this.selection_H.clearSelectionCaches(),this.View.selection=new E([]),this.onSelectionChanged.emit(this.View.selection)),this.View.internalsearchrequest=!1,this.SavePreferences?this.ngControl.name?[3,2]:(console.error("Non posso utilizzare le preference senza avere un 'name' per questa tabella"),[3,5]):[3,5]):[3,6];case 2:return this.prefService?[3,3]:(console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato"),[3,5]);case 3:return[4,this.prefService.getItem(this.ngControl.name).toPromise()];case 4:i=r.sent(),this.View&&(this.View.columns=(null==i?void 0:i.columns)||[],this.View.column_ordering=(null==i?void 0:i.column_ordering)||[]),r.label=5;case 5:return n&&(this.arrayPulsanti=this.utilities_H.getPagesArray(6,this.View.page,this.View.pages||1,this.View.items.length,this.View.itemsperpageoverride)),[3,11];case 6:return this.View&&null!=this.View.length&&null!=this.View.length?(this.setMode("array"),this.UseSelectionCache&&this.arraymodeSelection||(this.selection_H.clearSelectionCaches(),this.arraymodeSelection=new E([]),this.onSelectionChanged.emit(this.arraymodeSelection)),this.SavePreferences?this.ngControl.name?[3,7]:(console.error("Non posso utilizzare le preference senza avere un 'name' per questa tabella"),[3,10]):[3,10]):[3,11];case 7:return this.prefService?[3,8]:(console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato"),[3,10]);case 8:return[4,this.prefService.getItem(this.ngControl.name).toPromise()];case 9:i=r.sent(),this.arrayColumns=(null==i?void 0:i.columns)||[],this.arrayColumnOrdering=(null==i?void 0:i.column_ordering)||[],r.label=10;case 10:this.SearchView&&(this.arrayPulsanti=this.utilities_H.getPagesArray(6,this.SearchView.page,this.SearchView.pages||1,this.SearchView.items.length,this.SearchView.itemsperpageoverride)),r.label=11;case 11:return!this.View||this.View instanceof R||this.finalizeContext(),this.postBoundSourceCalculation(),[2]}}))}))},e.prototype.finalizeContext=function(){var e=this.View,t=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&&t&&(this.UseArrayModePaging=!1),this.TMPBoundSource=this.items_H.getItemsByMode(!1,!this.internalWriteCall),this.Hierarchy&&!t&&this.hierarchyMode_H.assignHierarchyLevels(this.TMPBoundSource),this.utilities_H.calculateHash(this.TMPBoundSource),this.TMPBoundSource&&this.RowClassAssigner||this.Hierarchy)for(var n=0;n<this.TMPBoundSource.length;n++){var i=this.TMPBoundSource[n];i._rowClass=this.RowClassAssigner?this.RowClassAssigner(i):"",i._rowClass+=this.Hierarchy?" est-row-lvl-"+i._level:""}},e.prototype.setupPagingInformations=function(){var e;if(this.PagerOptions.ShowCount=!this.HidePagingCount,this.PagerOptions.ShowButtons=!this.HidePagingButtons,this.PagerOptions.ShowPaging=!this.HidePaging,this.PagerOptions.UsesView=!0,this.arrayMode&&this.UseArrayModePaging&&!this.SearchView)this.PagerOptions.PagerCount=this.View.length||0,this.PagerOptions.ShowButtons=this.PagerOptions.ShowButtons&&this.View.length>10,this.PagerOptions.View=this.View,this.PagerOptions.UsesView=!1,this.PagerOptions.ShowPagingOptions=this.PagerOptions.ShowButtons;else if(!this.arrayMode||this.UseArrayModePaging&&!this.SearchView){if(this.viewMode){var t=this.MainGroupView||this.View,n=(null==t?void 0:t.groupcount)||(null==t?void 0:t.objectcount);this.PagerOptions.Searches=null!=(null==t?void 0:t.groupcount)&&null!=(null==t?void 0:t.groupcount)?"groups":"items",this.PagerOptions.PagerCount=n||0,this.PagerOptions.View=t,this.PagerOptions.ShowCount=this.PagerOptions.ShowCount||t&&n&&-1!=n}else if(this.reportMode){var i=this.ReportValues.count;this.PagerOptions.View=this.View,this.PagerOptions.PagerCount=i&&-1==i?this.ReportValues.rows.length:i&&i>0?this.ReportValues.count:0,this.PagerOptions.ShowCount=this.PagerOptions.ShowCount||this.View&&-1!=this.View.result.count,this.PagerOptions.ShowButtons=this.PagerOptions.ShowButtons&&(this.View.pagingavailable||this.PagerOptions.ShowCount),this.PagerOptions.ShowPagingOptions=this.PagerOptions.ShowButtons}}else this.SearchView?(this.PagerOptions.View=this.SearchView,this.PagerOptions.PagerCount=this.SearchView.objectcount||0):this.PagerOptions.PagerCount=this.View.length||0,this.PagerOptions.ShowButtons=this.PagerOptions.ShowButtons&&(this.View.length>10||((null===(e=this.SearchView)||void 0===e?void 0:e.objectcount)||0)>10),this.PagerOptions.ShowCount=this.PagerOptions.ShowCount||this.View&&this.View.length||this.SearchView&&this.SearchView.objectcount&&-1!=this.SearchView.objectcount,this.PagerOptions.ShowPaging=this.PagerOptions.ShowButtons||this.PagerOptions.ShowCount,this.PagerOptions.ShowPagingOptions=this.PagerOptions.ShowButtons},e.prototype.postBoundSourceCalculation=function(){this.RowContexts=[],this.OrderDirectives=[],this.lastSelectedItemID=null,this.internalPostBoundSource()},e.prototype.internalPostBoundSource=function(){var e=this.View,t=this.EsThsDirective&&this.EsThsDirective.length>0?this.EsThsDirective.toArray():[],n=this.EsTdsDirective&&this.EsTdsDirective.length>0?this.EsTdsDirective.toArray():[];if(this.dynamicMode_H.eventuallyReviewDynamicColumns(),this.bindDisplayToLoadedItemsOrGroups(e),this.setupPagingInformations(),(this.viewMode||this.arrayMode)&&this.UseCustomCells){var i=this.viewMode?e:null,r=this.viewMode?_(i.items||[],i.groups||[]):e,s=this.viewMode?i.selection:this.arraymodeSelection,o=this.columnMetadata_H.expandMultiThsAndTds(t,n,r);t=o.expThs,n=o.expTds;var a=this.columnMetadata_H.evaluateHeadersGroupingInfos(t);this.arrayMode&&(this.items_H.arrayModeReviewOrderings(),this.rowGrouping_H.arrayModeReviewGroupings(a.leafs)),this.columnMetadata_H.reviewColumnsList(a.leafs),this.columnMetadata_H.alignColumnsIfLoadedView(i),this.columnMetadata_H.moveFixedColumnsAtTheBeginning(a.leafs,n),this.columnMetadata_H.alignHeadersOrdering(a.leafs,i),this.columnMetadata_H.refreshColumnsVisibility(a.leafs,n,i),this.columnMetadata_H.evaluatePinnedColumnsWidth(),this.columnMetadata_H.generateDefaultOrder(a.leafs,i),this.columnMetadata_H.evaluateHeaderGroups(a),this.evaluateRowThs(a.leafs),this.evaluateRowTds(a.leafs,n),this.columnMetadata_H.applyOrdering(i,!0),this.MoveTemporaryVariablesToRealOnes(),this.selection_H.evaluateSelection(r,s),this.ResearchNeeded&&(this.changed(),this.emitSearchRequest(!1),this.ResearchNeeded=!1)}else if((this.viewMode||this.arrayMode)&&!this.UseCustomCells){var l=this.viewMode?e.items:e;s=this.viewMode?e.selection:this.arraymodeSelection;this.selection_H.evaluateSelection(l,s)}this.cdr.markForCheck(),this.FirstBind=!1},e.prototype.bindDisplayToLoadedItemsOrGroups=function(e){var t,n;if(!this.TMPBoundSource||0==this.TMPBoundSource.length)return this.BaseItemsCount=0,void(this.boundSource=[]);if(this.arrayMode||!this.UseCustomCells)return this.boundSource=this.TMPBoundSource,void(this.BaseItemsCount=(null==e?void 0:e.objectcount)||(null==e?void 0:e.length)||0);var i=(null===(n=null===(t=null==e?void 0: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=(null==e?void 0:e.objectcount)||0);this.rowGrouping_H.handleNewDataOnRowGrouping(e,i)},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.selection_H.handleItemsSelection(e,t),this.cdr.markForCheck()},e.prototype.thOrderChanged=function(e,t){this.viewMode||this.arrayMode?this.OrderByColumn&&this.columnMetadata_H.handleTHOrderChange(e,t):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.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++){n[(v=e[o]).th]=v}this.TMPRowTDs={};var a={};for(o=0;o<t.length;o++)for(var l=t[o],h=0;h<this.boundSource.length;h++){var c=this.boundSource[h],p=c._hash,u=l.td;if(!(v=n[l.td]))throw"ID dell'oggeto EsTd non compatibile con gli ID dicharati negli EsTh: "+l.td;if(v._referenced=!0,l.tdIf||v.thGroup){var d=v,g=v.thFixed||v.thGroup||v.thPinned,m=c._item?{LeftBorder:d._lbord,RightBorder:d._rbord,ID:u,Pinned:i[l.td].pinned,PinnedWidth:d.thPinnedWidth,GroupHeader:!1,GroupAggregation:!1,Visible:i[l.td].visible,Wraps:!1,Class:l.tdClass,Template:d.thGroup&&!this.ShowItemGroupsColumns?null:l.Template,Multi:l._multi,MultiProp:l._multi?l.td.split("_")[0]:null,MultiIndex:l._multi?l.td.split("_")[1]:null}:{LeftBorder:d._lbord,RightBorder:d._rbord,ID:u,Pinned:i[l.td].pinned,PinnedWidth:d.thPinnedWidth,GroupHeader:d.thGroup,GroupAggregation:!!d.thAggregation,Visible:i[l.td].visible,Wraps:!1,Class:d.thGroupClass||"",Content:this.rowGrouping_H.getGroupCellDisplay(c,u,v)};this.TMPRowTDs[p]?this.TMPRowTDs[p].push(m):(this.RowContexts.push(p),this.TMPRowTDs[p]=[m],a[p]=g?1:0)}}if(0!=this.TMPBoundSource.length){var f=[];for(o=0;o<e.length;o++){var v;(v=e[o])._referenced||f.push(v.th)}if(f.length>0)throw"L'ID di uno o più EsTh non hanno alcun EsTd associato: "+f.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=[];for(s=0;s<e.length;s++){var a=e[s],l=void 0;if(a.thIf||a.thGroup){var h=(a.thClass||"")+(a.thGroup?" est-col-min":"");if(l={Pinned:n[a.th].pinned,Fixed:a.thFixed,PinnedWidth:a.thPinnedWidth,ID:a.th,Visible:a.thVisible,Class:h,Order:a.thOrder,Orderable:a.thOrderable,Template:a.Template,Content:null,Wrap:a.thWrap,LeftBorder:a._lbord,RightBorder:a._rbord,Multi:a._multi,MultiContent:a._multi_content},this.TMPRowTHs.push(l),r&&(a.thAggregation||a.thGroup)){var c=this.rowGrouping_H.getGroupAggregations(a);i.groupings?(t=i.groupings).push.apply(t,_(c)):i.groupings=c,this.ResearchNeeded=!0}}}}},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.pages>0||(n.page=e,t.buttons=this.utilities_H.getPagesArray(6,n.page,n.pages),this.emitSearchRequest(!1,n))},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.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.selection_H.handleItemsSelection(t,e,this.globalCheck);this.changed(),this.onSelectionChanged.emit(n)},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.selection_H.handleItemsSelection(n);return this.changed(),this.onSelectionChanged.emit(a),!0},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,n,i=this.MainGroupView?this.MainGroupView:this.arrayMode?this.SearchView:this.View;if(i.page&&i.pages){var r=this.SearchView||i;if(!(0===e||e>r.pages&&r.pages>0)){r.page=e;var s=this.reportMode?(null===(t=i.result)||void 0===t?void 0:t.count)||0:i.items.length||(null===(n=i.groups)||void 0===n?void 0:n.length)||0,o=(this.reportMode,i.itemsperpageoverride||15);this.arrayPulsanti=this.utilities_H.getPagesArray(6,r.page,r.pages,s,o);var a=!!this.MainGroupView;this.emitSearchRequest(!1,a?i:this.SearchView?this.SearchView:null)}}},e.prototype.onItemsPerPageChanged=function(e){this.PagerOptions.View.itemsperpageoverride=e,this.changed(),this.MainGroupView?this.emitSearchRequest(!0,this.MainGroupView):this.SearchView?(this.SearchView.page=1,this.emitSearchRequest(!0,this.SearchView)):this.emitSearchRequest(!0)},e.prototype.onGroupItemsPerPageChanged=function(e,t){e.view.itemsperpageoverride=t,this.emitSearchRequest(!0,e.view)},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.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.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.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.prototype.ensureNoDbClickAndSelect=function(e,t,n){var i=this;this.UserEdits?this.rowDbClickTimer?this.clearRowClickTimer():this.rowDbClickTimer=setTimeout((function(){i.handleRowClick(e,t,n),i.clearRowClickTimer()}),this.doubleClickBufferMs):this.handleRowClick(e,t,n)},e.prototype.clearRowClickTimer=function(){clearTimeout(this.rowDbClickTimer),this.rowDbClickTimer=null},e.prototype.ensureDbClickAndSetupEdit=function(e){var t=this;if(this.cellDbClickTimer)return this.UserEdits&&e.UserEdits&&this.setupUserEdit(e),void this.clearCellClickTimer();this.cellDbClickTimer=setTimeout((function(){t.clearCellClickTimer()}),this.doubleClickBufferMs)},e.prototype.clearCellClickTimer=function(){clearTimeout(this.cellDbClickTimer),this.cellDbClickTimer=null},e.prototype.handleRowClick=function(e,t,n){!n||t.locked||t._sep||t._group?t._group&&this.handleGroupClick(t):this.handleClick(e,t),this.cdr.markForCheck()},e.prototype.setupUserEdit=function(e){this.UserEdits&&e.UserEdits&&(e._editing=!0)},e.prototype.finalizeUserEdit=function(e,t){e._editing=!1},e}();se.decorators=[{type:t.Component,args:[{selector:"es-table",viewProviders:[{provide:n.LocalizationService,useClass:L}],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}} <input [readonly]="autoUpdate" maxlength="3" class="form-control est-custom-input" type="text" [(ngModel)]="seconds" /> {{\'second/s\' | localize : lc}}\r\n </div>\r\n <div class="pull-right m-t-2">\r\n <label class="est-switch">\r\n <input type="checkbox" [(ngModel)]="autoUpdate" (ngModelChange)="autoUpdateChanged();" />\r\n <div class="est-slider round"></div>\r\n </label>\r\n </div>\r\n <div class="clearfix"></div>\r\n</div>\r\n\r\n<div *ngIf="View" class="est-relative">\r\n <div *ngIf="FirstBind && ShowLoadingOnBootstrap" class="est-loading-box">\r\n <div class="est-loading-content">\r\n <span class="fa fa-spinner fa-spin"></span> {{\'Performing Table bootstrap\' | localize: lc}}...\r\n </div>\r\n </div>\r\n\r\n <div class="est-top-pager" *ngIf="PagingStyle == \'both\' || PagingStyle == \'top\'">\r\n <ng-container *ngTemplateOutlet="pagingElement"></ng-container>\r\n </div>\r\n\r\n <div class="est-top-allselect" *ngIf="canSelectAll || (!reportMode && (View?.selection || arraymodeSelection)?.all)">\r\n <span>{{ (selectedObjects == -1 ? (\'All the\' | localize : lc) : ((selectedObjects || 0) | number : \'0.0-0\' : locale)) + \' \' + ((selectedObjects == 1 ? \'Object Selected\' : \'Objects Selected\') | localize : lc) }}</span> \r\n <span class="est-link est-inline" (click)="selection_H.selectAllOrResetSelection()">{{ (View?.selection || arraymodeSelection)?.all ? (\'Reset Selection\' | localize : lc) : (\'Select Everything\' | localize : lc)}}</span>\r\n </div>\r\n\r\n <div class="table-responsive datatable {{ContainerClass}}" [style.max-height.px]="MaxHeight">\r\n <table class="{{ TableClass }} est-margin-bottom-10" [class.est-high-density]="HighCellDensity">\r\n <thead [hidden]="HeaderHidden || FirstBind">\r\n \x3c!-- Aggiungo il pezzo che gestisce la selezione di tutto se attivo da config --\x3e\r\n <tr *ngIf="SelectAll || PagingStyle != \'bottom\'">\r\n <th class="est-no-selection" [attr.colspan]="Columns.Global" [class.est-hidden-view]="!canSelectAll && (reportMode || !(View?.selection || arraymodeSelection)?.all) && PagingStyle == \'bottom\'">\r\n <p class="est-hidden-view app-margin-bottom-0">§</p>\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;">\r\n <div class="est-pinned-border est-cell-group-padding"></div>\r\n </ng-container>\r\n <ng-container *ngIf="!cell.Pinned && cell.Content; Else: cell.Template">\r\n {{cell.Content}}\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </ng-container>\r\n\r\n <ng-container *ngIf="!RowThGroups">\r\n <tr *ngIf="HasHeaderGroup">\r\n <ng-container *ngTemplateOutlet="headerGroupRef"></ng-container>\r\n <th *ngIf="Export"></th>\r\n </tr>\r\n \r\n \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 </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 est-simple-border-bottom">\r\n <th class="est-col-min est-no-border" *ngIf="Selection" [style.width.px]="20">\r\n <input *ngIf="!SingleSelection" class="est-pointer" type="checkbox" [disabled]="SelectionDisabled" [(ngModel)]="globalCheck" [ngModelOptions]="{\'standalone\': true}" (ngModelChange)="globalCheckChanged();">\r\n </th>\r\n <ng-container *ngFor="let rowHeader of RowTHs">\r\n <th *ngIf="rowHeader && rowHeader.Visible && rowHeader.Pinned" [style.width.px]="rowHeader.PinnedWidth" es-th="{{rowHeader.ID}}" \r\n class="{{rowHeader.Class || \'\'}}" \r\n [class.est-pinned-internal-header]="true" \r\n [class.est-no-border]="true" \r\n [class.est-nowrap]="!rowHeader.Wrap" \r\n [Pinned]="true" [Fixed]="rowHeader.Fixed" [Order]="rowHeader.Order" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.Orderable" [OrderBy]="OrderByColumn" [SearchInProgress]="!!researchInProgress" (onUnpinning)="columnMetadata_H.unpinColumn($event)" (onOrderChange)="OrderByColumn && thOrderChanged(rowHeader.ID, $event)">\r\n <ng-container *ngIf="rowHeader.Template"><ng-container *ngTemplateOutlet="rowHeader.Template; context: { $implicit: rowHeader.Multi ? rowHeader.MultiContent : null } "></ng-container></ng-container>\r\n <span *ngIf="!rowHeader.Template">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </div>\r\n </th>\r\n <ng-container *ngFor="let rowHeader of RowTHs">\r\n <th *ngIf="rowHeader && rowHeader.Visible && !rowHeader.Pinned" es-th="{{rowHeader.ID}}" class="{{rowHeader.Class || \'\'}}" [class.est-ltab-border]="rowHeader.LeftBorder" [class.est-rtab-border]="rowHeader.RightBorder" [class.est-nowrap]="!rowHeader.Wrap" [Order]="rowHeader.Order" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.Orderable" [OrderBy]="OrderByColumn" [SearchInProgress]="!!researchInProgress" (onOrderChange)="OrderByColumn && thOrderChanged(rowHeader.ID, $event)">\r\n <ng-container *ngIf="rowHeader.Template"><ng-container *ngTemplateOutlet="rowHeader.Template; context: { $implicit: rowHeader.Multi ? rowHeader.MultiContent : null }"></ng-container></ng-container>\r\n <span *ngIf="!rowHeader.Template">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n \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)="reportMode_H.setupNextOrderAndSearch(clm)">\r\n {{clm.description}}<span class="fa" [class.fa-chevron-down]="clm.order == \'DESC\'" [class.fa-chevron-up]="clm.order == \'ASC\'"></span>\r\n </th>\r\n </ng-container>\r\n\r\n \x3c!--Per l\'eliminazione mi serve un header aggiuntivo--\x3e\r\n <th *ngIf="Removal" [class.est-right-9]="Export || HiddenColumns" class="est-col-min est-sticky-last-column"><span class="fa fa-trash"></span></th>\r\n\r\n \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.endsWith(\'.xlsx\') ? ExportFileName.replace(\'.xlsx\', \'.csv\') : ExportFileName.endsWith(\'.csv\') ? ExportFileName : ExportFileName + \'.csv\'"></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)="columnMetadata_H.resetColumnVisSelection(); changeColumnVisibilityModal.show();">\r\n <ng-container *ngIf="!HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Order\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && !ColumnsOrdering">\r\n {{\'Columns Visibility\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Visibility and Order\' | localize : lc}}\r\n </ng-container>\r\n </a>\r\n <a class="dropdown-item" *ngIf="Export && CSVExport" (click)="export_H.tryExport(\'CSV\')">{{\'Export View\' | localize : lc}} (CSV)</a>\r\n <a class="dropdown-item" *ngIf="Export && XLSXExport" (click)="export_H.tryExport(\'XLSX\')">{{\'Export View\' | localize : lc}} (XLSX)</a>\r\n <a class="dropdown-item" *ngFor="let option of CornerMenuOptions" (click)="cornerActionClicked(option.id)">{{option.description}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n </tr>\r\n </thead>\r\n \r\n \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</div>\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 && PagerOptions.ShowButtons && (PagerOptions.PagerCount > 10 || PagerOptions.PagerCount == -1)" class="pull-right btn-toolbar">\r\n <ng-container *ngIf="(!reportMode || View?.pagingavailable) && (!arrayMode || SearchView)">\r\n <ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { Margin: true, ATP: addToPage.bind(this), GTP: goToPage.bind(this), Array: arrayPulsanti }}"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="arrayMode && UseArrayModePaging && !SearchView">\r\n <ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { Margin: true, ATP: arrayAddToPage.bind(this), GTP: arrayGoToPage.bind(this), Array: arrayPulsanti }}"></ng-container>\r\n </ng-container>\r\n </div>\r\n \x3c!-- Paginatore dove appare la count e le opzioni di paginazione --\x3e\r\n <div class="pull-right" *ngIf="PagerOptions.ShowCount || PagerOptions.ShowPagingOptions">\r\n <div class="est-mt-min-5" *ngIf="PagerOptions.ShowPaging">\r\n <app-paging *ngIf="!PagerOptions.UsesView" [CountLabel]="CountLabel" [ShowPaging]="PagerOptions.ShowPagingOptions" [ShowCount]="PagerOptions.ShowCount" [PagerCount]="PagerOptions.PagerCount" [WarnOnAll]="false" [CurrentPageSize]="ArraymodeItemsPerPage" (pagingSelected)="items_H.refreshPaging($event)"></app-paging>\r\n <app-paging *ngIf="PagerOptions.UsesView" [CountLabel]="CountLabel" [ShowPaging]="PagerOptions.ShowPagingOptions" [ShowCount]="PagerOptions.ShowCount" [PagerCount]="PagerOptions.PagerCount" [GroupMode]="PagerOptions.Searches == \'groups\'" [AllSearch]="AllSearch" [View]="PagerOptions.View" (pagingSelected)="onItemsPerPageChanged($event);"></app-paging>\r\n </div>\r\n <div *ngIf="reportMode && !PagerOptions.ShowPaging"><em>{{\'Paging options are not available for this report\' | localize: lc}}</em></div>\r\n </div>\r\n <div class="clearfix"></div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\x3c!-- Template che contiene i pulsanti per cambiare pagina --\x3e\r\n<ng-template #pagingButtons let-options>\r\n <div class="est-flex" [class.est-margin-left-50]="options.Margin">\r\n <a class="btn" class="est-page-prev app-pointer" (click)="options.ATP(-1, options.separator)"><span class="fa fa-chevron-left"></span></a>\r\n <div *ngIf="options.Array" class="est-inline"><a *ngFor="let p of options.Array" class="btn est-page-sel {{p.cssClass}}" (click)="options.GTP(p.val, options.separator)">{{p.val}}</a></div>\r\n <a class="btn" class="est-page-next app-pointer" (click)="options.ATP(1, options.separator)"><span class="fa fa-chevron-right"></span></a>\r\n </div>\r\n</ng-template>\r\n\r\n\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; trackBy: bodyTrackBy">\r\n <tr *ngIf="item._visible || (!Hierarchy && !ArrayGrouping)" \r\n [class]="item._rowClass ? item._rowClass : \'\'" \r\n [class.est-line-through]="item.removed || item.deleted" \r\n [class.est-pointer]="!item.locked" \r\n [class.est-white-selected]="item._selected && !item.locked"\r\n [class.est-rg]="item._group"\r\n [class.est-rg-sep]="item._sep"\r\n [contextMenu]="!item.locked ? (ContextMenu || emptyMenu) : emptyMenu" [contextMenuSubject]="item"\r\n (click)="ensureNoDbClickAndSelect($event, item, true)">\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)="ensureNoDbClickAndSelect($event, item, false)">\r\n\r\n <ng-container *ngIf="item._sep"><ng-container *ngTemplateOutlet="groupPager; context: { $implicit: item }"></ng-container></ng-container>\r\n\r\n <ng-container *ngIf="!item._sep">\r\n <ng-container *ngTemplateOutlet="basicColumns; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="dynamicColumns; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="customCells; context: { $implicit: item }"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet="bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}"></ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #groupPager let-item>\r\n <td class="est-pinned-body " *ngIf="HasPinnedColumns"><div class="est-pinned-border est-cell-group-padding"></div></td>\r\n <td *ngIf="item._grouplevel > 1" [attr.colspan]="item._grouplevel-1"></td>\r\n <td [attr.colspan]="Columns.VisibleUnpinned - (item._grouplevel > 0 ? item._grouplevel - 1 : 0)">\r\n <div class="est-rg-sep-flex-right" *ngIf="RowGroupingPagingStyle == \'right\'">\r\n <div class="est-rg-page"><ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { separator: item, ATP: addToPageGroup.bind(this), GTP: goToPageGroup.bind(this), Array: item.buttons }}"></ng-container></div>\r\n <div class="est-rg-ipp" *ngIf="(item.searches == \'groups\' ? item.view.groupcount : item.view.objectcount) > 10"><app-paging [CountLabel]="CountLabel" [AllSearch]="AllSearch" [GroupMode]="item.searches == \'groups\'" [PagerCount]="item.searches == \'groups\' ? item.view.groupcount : item.view.objectcount" [View]="item.view" (pagingSelected)="onGroupItemsPerPageChanged(item, $event);"></app-paging></div>\r\n </div>\r\n\r\n <div class="est-rg-sep-flex-left" *ngIf="RowGroupingPagingStyle == \'left\'">\r\n <div class="est-rg-ipp"><app-paging [AllSearch]="AllSearch" [CountLabel]="CountLabel" [GroupMode]="item.searches == \'groups\'" [PagerCount]="item.searches == \'groups\' ? item.view.groupcount : item.view.objectcount" [View]="item.view" (pagingSelected)="onGroupItemsPerPageChanged(item, $event);"></app-paging></div>\r\n <div class="est-rg-page" *ngIf="(item.searches == \'groups\' ? item.view.groupcount : item.view.objectcount) > 10"><ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { separator: item, ATP: addToPageGroup.bind(this), GTP: goToPageGroup.bind(this), Array: item.buttons }}"></ng-container></div>\r\n </div>\r\n </td>\r\n</ng-template>\r\n\r\n\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]="dynamicMode_H.generateRouterLink(rowItem.routePath, rowItem.routeParameterProperties, item)" class="est-link" [innerHTML]="item.properties[rowItem.propertyName]"></a>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf="!rowItem.routePath && rowItem.visible">\r\n <ng-container *ngTemplateOutlet="findEsTd(rowItem.propertyName) || defaultEsTd; context: { $implicit: item.properties[rowItem.propertyName], rowItem : rowItem, item : item }"> </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEsTd let-value let-rowItem=\'rowItem\' let-item=\'item\'>\r\n <td es-td="{{rowItem.propertyName}}" class="{{UserDefinedDynamicCols ? rowItem.clss : \'est-nowrap\'}}" [Internal]="false" [Context]="item._hash">\r\n {{value}}\r\n </td>\r\n</ng-template>\r\n\r\n\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" [style.width.px]="20">\r\n <input type="checkbox" [disabled]="opt.selDisabled" [class.est-pointer]="!item.locked" [(ngModel)]="item._selected" name="check{{item._hash}}" (click)="$event.stopPropagation(); handleClick($event, item);">\r\n </td>\r\n <td class="est-no-border est-col-min" *ngIf="(item.locked || item._sep) && Selection" [style.width.px]="20"></td>\r\n\r\n <ng-container *ngFor="let rowItem of RowTDs[item._hash]; let i = index">\r\n <td *ngIf="rowItem && rowItem.Pinned" [style.width.px]="rowItem.PinnedWidth" es-td="{{rowItem.ID}}" class="{{rowItem.Class}}" [class.est-no-selection]="rowItem.UserEdits" [class.est-no-border]="true" [class.est-rg-hdr]="rowItem.GroupHeader" [class.est-rg-agg]="rowItem.GroupAggregation" \r\n [class.est-nowrap]="Hierarchy || !rowItem.Wraps" [Internal]="true" (click)="ensureDbClickAndSetupEdit(rowItem)">\r\n\r\n <ng-container *ngIf="!rowItem._editing">\r\n <ng-container *ngIf="Hierarchy && i == 0"><ng-container *ngTemplateOutlet="HierarchyNavigator; context: { $implicit: rowItem.Multi ? item[rowItem.MultiProp][rowItem.MultiIndex] : item }"></ng-container></ng-container>\r\n <ng-container *ngIf="!rowItem.Multi && rowItem.Template"><ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: rowItem.Multi ? item[rowItem.MultiProp][rowItem.MultiIndex] : item }"></ng-container></ng-container>\r\n <span *ngIf="rowItem.Multi && rowItem.Template"><ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: item[rowItem.MultiProp][rowItem.MultiIndex] }"></ng-container></span>\r\n <span *ngIf="!rowItem.Template && !rowItem.Multi">{{rowItem.Content}}</span>\r\n </ng-container>\r\n \r\n <ng-container *ngIf="rowItem._editing">\r\n <form-adaptive [FormLayout]="false" [(ngModel)]="item[rowItem.UserEdits.Property]" name="{{ rowItem.UserEdits.Property + \'_\' + item._hash }}" [Type]="rowItem.UserEdits.Type" (inputChange)="finalizeUserEdit(rowItem, item)"></form-adaptive>\r\n </ng-container>\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-no-selection]="rowItem.UserEdits" [class.est-rg-hdr]="rowItem.GroupHeader" [class.est-rg-agg]="rowItem.GroupAggregation" \r\n [class.est-nowrap]="Hierarchy || !rowItem.Wraps" [Internal]="true" (click)="ensureDbClickAndSetupEdit(rowItem)">\r\n\r\n <ng-container *ngIf="!rowItem._editing">\r\n <ng-container *ngIf="Hierarchy && i == 0"><ng-container *ngTemplateOutlet="HierarchyNavigator; context: { $implicit: item }"></ng-container></ng-container>\r\n <ng-container *ngIf="!rowItem.Multi && rowItem.Template"><ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: item }"></ng-container></ng-container>\r\n <span *ngIf="rowItem.Multi && rowItem.Template"><ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: item[rowItem.MultiProp][rowItem.MultiIndex] }"></ng-container></span>\r\n <span *ngIf="!rowItem.Template && !rowItem.Multi">{{rowItem.Content}}</span>\r\n </ng-container>\r\n\r\n <ng-container *ngIf="rowItem._editing">\r\n <form-adaptive [FormLayout]="false" [(ngModel)]="item[rowItem.UserEdits.Property]" name="{{ rowItem.UserEdits.Property + \'_\' + item._hash }}" [Type]="rowItem.UserEdits.Type" (inputChange)="finalizeUserEdit(rowItem, item)"></form-adaptive>\r\n </ng-container>\r\n\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" [Internal]="true">\r\n <ng-container *ngIf="Hierarchy && i == 0">\r\n <ng-container *ngTemplateOutlet="HierarchyNavigator; context: { $implicit: item }"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="rowItem.Template">\r\n <ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: item }"></ng-container>\r\n </ng-container>\r\n <span *ngIf="!rowItem.Template" [innerHTML]="rowItem.Content"></span>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #HierarchyNavigator let-item>\r\n <span *ngIf="!item.parent" class="fa fa-chevron-down" style="visibility:hidden"></span>\r\n <span *ngIf="item.parent && item._expanded" class="fa fa-chevron-down est-pointer est-no-selection" (click)="hierarchyMode_H.collapseParent(item[this.OwnKey])"></span>\r\n <span *ngIf="item.parent && !item._expanded" class="fa fa-chevron-up est-pointer est-no-selection" (click)="hierarchyMode_H.expandParent(item[this.OwnKey])"></span>\r\n \r\n</ng-template>\r\n\r\n\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-9\' : \'\'}}" *ngIf="!(options.item.removed || options.item.deleted)"><span class="fa fa-remove est-pointer text-danger" [hidden]="options.item.removable != undefined && !options.item.removable" (click)="onRemoval.emit(options.item)"></span></td>\r\n <td class="est-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-9\' : \'\'}}" *ngIf="(options.item.removed || options.item.deleted)"><span class="fa fa-undo text-warning est-pointer" (click)="onAbortRemoval.emit(options.item)"></span></td>\r\n </ng-container>\r\n <ng-container *ngIf="Removal && RemovalCondition">\r\n <td class="est-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-9\' : \'\'}}" *ngIf="!(options.item.removed || options.item.deleted) && options.item[RemovalCondition]"><span class="fa fa-remove est-pointer text-danger" [hidden]="options.item.removable != undefined && !options.item.removable" (click)="onRemoval.emit(options.item)"></span></td>\r\n <td class="est-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-9\' : \'\'}}" *ngIf="(options.item.removed || options.item.deleted) && options.item[RemovalCondition]"><span class="fa fa-undo text-warning est-pointer" (click)="onAbortRemoval.emit(options.item)"></span></td>\r\n <td class="est-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-9\' : \'\'}}" *ngIf="!options.item[RemovalCondition]"><span class="fa fa-remove est-hidden-view"></span></td>\r\n </ng-container>\r\n <td *ngIf="Export || HiddenColumns || CornerMenuOptions" class="est-sticky-last-column{{options.even && !Hierarchy ? \'-alt\' : \'\'}}"></td>\r\n</ng-template>\r\n\r\n\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" cdkDrag>\r\n <div class="modal-content">\r\n <div class="modal-header est-pointer" cdkDragHandle>\r\n <h5 class="modal-title pull-left">\r\n <ng-container *ngIf="!HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Order\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && !ColumnsOrdering">\r\n {{\'Columns Visibility\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Visibility and Order\' | localize : lc}}\r\n </ng-container>\r\n </h5>\r\n <button type="button" class="close pull-right" (click)="changeColumnVisibilityModal.hide();" aria-label="Close">\r\n <span aria-hidden="true">×</span>\r\n </button>\r\n </div>\r\n <div class="modal-body">\r\n <div *ngIf="!TMPColumnsList || TMPColumnsList.length == 0" class="card card-info est-padding-10 est-margin-bottom-0">\r\n {{\'There are no columns configured to be hidden/shown in this view\' | localize : lc}}\r\n </div>\r\n <div *ngIf="TMPColumnsList && TMPColumnsList.length > 0" style="max-height:500px; overflow-y:auto">\r\n \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)="columnMetadata_H.globalColVisCheckChanged();">\r\n </th>\r\n \x3c!-- <th class="est-col-min" *ngIf="ColumnsOrdering"></th> --\x3e\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 *ngIf="DirectivesBased" class="est-col-min"></th>\r\n </tr>\r\n </thead>\r\n <tbody \r\n cdkDropList \r\n [cdkDropListData]="TMPColumnsList" \r\n (cdkDropListDropped)="columnMetadata_H.columnReordered($event)" \r\n [cdkDropListSortPredicate]="columnMetadata_H.sortPredicate.bind(this.columnMetadata_H)"\r\n class="est-dropbox">\r\n\r\n <tr *ngFor="let item of TMPColumnsList; let i = index; let last = last" \r\n class="est-pointer est-droplist" \r\n [class.est-white-selected]="lastSelectedItemID == item.id" \r\n [class.est-no-selection]="!item.visible"\r\n cdkDrag\r\n [cdkDragData]="item"\r\n [cdkDragDisabled]="!ColumnsOrdering || item.fixed || item.pinned">\r\n\r\n <td *ngIf="HiddenColumns">\r\n <input type="checkbox" [class.est-hidden-view]="item.fixed" class="est-pointer" [(ngModel)]="item.visible" name="visible{{i}}" (ngModelChange)="columnMetadata_H.updateGlobalColVisCheck();" />\r\n </td>\r\n <td class="est-nowrap drag-visible" (click)="columnMetadata_H.columnClicked(item);">\r\n <ng-container *ngIf="item.template">\r\n \x3c!-- Padri --\x3e\r\n <span *ngIf="item.parentTemplates && item.parentTemplates.length > 0" class="est-fw-bold est-fs-13">\r\n ( \r\n <ng-container *ngFor="let parent of item.parentTemplates; let last=last">\r\n <ng-container *ngIf="parent.tmpl"><ng-container *ngTemplateOutlet="parent.tmpl"></ng-container></ng-container>\r\n <ng-container *ngIf="parent.content">{{parent.content}}</ng-container>\r\n <span *ngIf="!last"> - </span>\r\n </ng-container>\r\n )\r\n </span>\r\n \x3c!-- Template header originale --\x3e\r\n <ng-container *ngTemplateOutlet="item.template; context: { $implicit: item.multi ? item.multiContent : null }"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="!item.template">{{item.description}}</ng-container>\r\n </td>\r\n \x3c!--Filler--\x3e\r\n <td (click)="columnMetadata_H.columnClicked(item);"></td>\r\n \x3c!-- Pinner --\x3e\r\n <td *ngIf="DirectivesBased && ColumnsPinnable"><span *ngIf="!item.fixed && item.pinnable" class="fa fa-thumb-tack" [class.text-success]="item.pinned" (click)="columnMetadata_H.pinOrUnpinColumn(item)"></span></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div class="modal-footer">\r\n <button type="button" class="btn btn-secondary est-margin-right-10" (click)="lastSelectedItemID = null; changeColumnVisibilityModal.hide();">{{\'Close\' | localize : lc}}</button>\r\n <button type="button" [disabled]="!TMPColumnsList || TMPColumnsList.length == 0" class="btn btn-primary" (click)="columnMetadata_H.confirmColumnVisibilitySelection() && changeColumnVisibilityModal.hide()">{{\'Confirm\' | localize : lc}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>',styles:['.est-loading-box{height:200px;text-align:center;position:relative;background:#ccc}.est-loading-content{margin:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:35px}.est-scrollable{max-height:600px;overflow:auto}.est-head-resizer{top:0;right:0;bottom:0;width:7px;position:absolute;cursor:col-resize}.est-head-resizer-internal{top:0;right:0;left:6px;bottom:0;width:1px;position:absolute;background-color:#ccc;height:100%}.est-pointer{cursor:pointer}.est-high-density td,.est-high-density th{padding:0 .2rem}.est-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.est-hidden-view{visibility:hidden}.est-no-border{border:none!important}.est-nowrap{white-space:nowrap}.est-mt-min-5{margin-top:-5px}.est-white-selected{background-color:#ddd!important}.est-line-through{text-decoration:line-through}.est-no-side-padding{padding-left:0;padding-right:0}.est-no-left-padding,.est-no-right-padding{padding-left:0}.est-col-min{width:1px}.est-margin-bottom-0{margin-bottom:0!important}.est-margin-right-10{margin-right:10px!important}.est-right-9{right:9px!important}.est-table-dotted-menu{padding:0 0 2px!important;color:#999}.est-fs-18{font-size:18px}.est-fs-13,.est-fs-14{font-size:14px}.est-fw-bold{font-weight:700}.est-padding-3{padding:3px!important}.est-page-container{position:relative}.est-bring-to-front-strong{z-index:99999999!important}.est-switch{position:relative;display:inline-block;width:30px;height:17px;margin-bottom:0;margin-right:5px;margin-left:5px}.est-switch input{display:none}.est-slider{cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc}.est-slider,.est-slider:before{position:absolute;transition:.4s}.est-slider:before{content:"";height:13px;width:13px;left:3px;bottom:2px;background-color:#fff}input:checked+.est-slider{background-color:#2196f3}input:focus+.est-slider{box-shadow:0 0 1px #2196f3}input:checked+.est-slider:before{transform:translateX(11px)}.est-slider.round{border-radius:10px}.est-slider.round:before{border-radius:50%}.est-custom-input{width:30px;display:inline;padding:1px;height:20px}.est-row-lvl-1 td:first-child{padding-left:5px}.est-row-lvl-2 td:first-child{padding-left:20px}.est-row-lvl-3 td:first-child{padding-left:35px}.est-row-lvl-4 td:first-child{padding-left:50px}.est-row-lvl-5 td:first-child{padding-left:65px}.est-row-lvl-6 td:first-child{padding-left:80px}.est-row-lvl-7 td:first-child{padding-left:95px}.est-row-lvl-8 td:first-child{padding-left:110px}.est-row-lvl-9 td:first-child{padding-left:125px}.est-row-lvl-10 td:first-child{padding-left:140px}.est-row-lvl-11 td:first-child{padding-left:155px}.est-row-lvl-12 td:first-child{padding-left:170px}.est-row-lvl-13 td:first-child{padding-left:185px}.est-row-lvl-14 td:first-child{padding-left:200px}.est-row-lvl-15 td:first-child{padding-left:215px}.est-row-lvl-16 td:first-child{padding-left:230px}.est-row-lvl-17 td:first-child{padding-left:245px}.est-row-lvl-18 td:first-child{padding-left:260px}.est-row-lvl-19 td:first-child{padding-left:275px}.est-row-lvl-20 td:first-child{padding-left:290px}.est-row-lvl-21 td:first-child{padding-left:305px}.est-row-lvl-22 td:first-child{padding-left:320px}.est-row-lvl-23 td:first-child{padding-left:335px}.est-row-lvl-24 td:first-child{padding-left:350px}.est-row-lvl-25 td:first-child{padding-left:365px}.est-row-lvl-26 td:first-child{padding-left:380px}.est-row-lvl-27 td:first-child{padding-left:395px}.est-row-lvl-28 td:first-child{padding-left:410px}.est-row-lvl-29 td:first-child{padding-left:425px}.est-row-lvl-30 td:first-child{padding-left:440px}.est-row-lvl-31 td:first-child{padding-left:455px}.est-row-lvl-32 td:first-child{padding-left:470px}.est-row-lvl-33 td:first-child{padding-left:485px}.est-row-lvl-34 td:first-child{padding-left:500px}.est-row-lvl-35 td:first-child{padding-left:515px}.est-row-lvl-36 td:first-child{padding-left:530px}.est-row-lvl-37 td:first-child{padding-left:545px}.est-row-lvl-38 td:first-child{padding-left:560px}.est-row-lvl-39 td:first-child{padding-left:575px}.est-row-lvl-40 td:first-child{padding-left:590px}.est-row-lvl-41 td:first-child{padding-left:605px}.est-row-lvl-42 td:first-child{padding-left:620px}.est-row-lvl-43 td:first-child{padding-left:635px}.est-row-lvl-44 td:first-child{padding-left:650px}.est-row-lvl-45 td:first-child{padding-left:665px}.est-row-lvl-46 td:first-child{padding-left:680px}.est-row-lvl-47 td:first-child{padding-left:695px}.est-row-lvl-48 td:first-child{padding-left:710px}.est-row-lvl-49 td:first-child{padding-left:725px}.est-row-lvl-50 td:first-child{padding-left:740px}.est-row-lvl-51 td:first-child{padding-left:755px}.est-row-lvl-52 td:first-child{padding-left:770px}.est-row-lvl-53 td:first-child{padding-left:785px}.est-row-lvl-54 td:first-child{padding-left:800px}.est-row-lvl-55 td:first-child{padding-left:815px}.est-row-lvl-56 td:first-child{padding-left:830px}.est-row-lvl-57 td:first-child{padding-left:845px}.est-row-lvl-58 td:first-child{padding-left:860px}.est-row-lvl-59 td:first-child{padding-left:875px}.est-row-lvl-60 td:first-child{padding-left:890px}.est-row-lvl-61 td:first-child{padding-left:905px}.est-row-lvl-62 td:first-child{padding-left:920px}.est-row-lvl-63 td:first-child{padding-left:935px}.est-row-lvl-64 td:first-child{padding-left:950px}.est-row-lvl-65 td:first-child{padding-left:965px}.est-row-lvl-66 td:first-child{padding-left:980px}.est-row-lvl-67 td:first-child{padding-left:995px}.est-row-lvl-68 td:first-child{padding-left:1010px}.est-row-lvl-69 td:first-child{padding-left:1025px}.est-row-lvl-70 td:first-child{padding-left:1040px}.est-row-lvl-71 td:first-child{padding-left:1055px}.est-row-lvl-72 td:first-child{padding-left:1070px}.est-row-lvl-73 td:first-child{padding-left:1085px}.est-row-lvl-74 td:first-child{padding-left:1100px}.est-row-lvl-75 td:first-child{padding-left:1115px}.est-row-lvl-76 td:first-child{padding-left:1130px}.est-row-lvl-77 td:first-child{padding-left:1145px}.est-row-lvl-78 td:first-child{padding-left:1160px}.est-row-lvl-79 td:first-child{padding-left:1175px}.est-row-lvl-80 td:first-child{padding-left:1190px}.est-row-lvl-81 td:first-child{padding-left:1205px}.est-row-lvl-82 td:first-child{padding-left:1220px}.est-row-lvl-83 td:first-child{padding-left:1235px}.est-row-lvl-84 td:first-child{padding-left:1250px}.est-row-lvl-85 td:first-child{padding-left:1265px}.est-row-lvl-86 td:first-child{padding-left:1280px}.est-row-lvl-87 td:first-child{padding-left:1295px}.est-row-lvl-88 td:first-child{padding-left:1310px}.est-row-lvl-89 td:first-child{padding-left:1325px}.est-row-lvl-90 td:first-child{padding-left:1340px}.est-row-lvl-91 td:first-child{padding-left:1355px}.est-row-lvl-92 td:first-child{padding-left:1370px}.est-row-lvl-93 td:first-child{padding-left:1385px}.est-row-lvl-94 td:first-child{padding-left:1400px}.est-row-lvl-95 td:first-child{padding-left:1415px}.est-row-lvl-96 td:first-child{padding-left:1430px}.est-row-lvl-97 td:first-child{padding-left:1445px}.est-row-lvl-98 td:first-child{padding-left:1460px}.est-row-lvl-99 td:first-child{padding-left:1475px}.est-relative{position:relative}.est-top-pager{position:absolute;right:0;top:5px}.est-top-allselect{position:absolute;left:0;top:5px;font-weight:700}.est-padding-10{padding:10px!important}.est-margin-right-50{margin-right:50px}.est-margin-left-50{margin-left:50px}.est-quick-unpin{color:#000;margin-left:8px;font-size:14px;transform:rotate(45deg)}.est-page-sel{color:#000;margin-left:3px;margin-right:3px;padding:0 5px;font-size:inherit;border:none;border-radius:15px}.est-page-next,.est-page-prev{color:#000;font-size:inherit;padding:2px 0 0}.est-pinned-header{background-color:#fff;left:0;top:0;position:sticky;z-index:1;border-bottom:1px solid #dee2e6!important;padding:0!important}.est-simple-border-bottom{border-bottom:1px solid #dee2e6}.est-pinned-internal-header{border-top:0;border-bottom:0 solid #dee2e6}.est-pinned-border{border-right:2px solid #dee2e6!important}.est-cell-padding{padding:.3rem}.est-pinned-body{background-color:#fff;left:0;position:sticky;z-index:1;border-top:1px solid #dee2e6!important;padding:0!important}.est-inline{display:inline!important}.est-inline-block{display:inline-block!important}.est-link{color:#0275d8!important;cursor:pointer;text-decoration:none;display:block}.est-link:hover{color:#23527c!important;cursor:pointer;text-decoration:underline!important}.est-sticky-last-column{right:-1px;position:sticky;z-index:0;background-color:#fff}.est-sticky-last-column-alt{right:-1px;position:sticky;z-index:0;background-color:#f2f2f2}.est-ltab-border{border-left:2px solid #bbb}.est-rtab-border{border-right:2px solid #bbb}.est-cell-group-padding{padding:calc(.3rem + 1px);position:absolute;top:0;left:0;height:100%;width:100%}.est-margin-bottom-10{margin-bottom:10px}.est-text-center{text-align:center}.est-flex{display:flex}.est-rg-sep-flex-right{display:flex;flex-direction:row-reverse;width:100%;margin:-5px}.est-rg-sep-flex-left{display:flex;flex-direction:row;width:100%;margin:-5px}.est-rg-hdr{font-weight:700}.est-rg-agg{font-style:italic}.est-rg{background-color:hsla(0,0%,46.7%,.4666666666666667)!important}.est-rg-sep{font-size:12px;padding-right:20px!important;background-color:hsla(0,0%,73.3%,.7333333333333333)!important}.est-rg-ipp{text-align:left;display:inline-flex;margin-right:25px}.est-rg-page{text-align:right;display:inline-flex;font-size:inherit;padding-top:5px}.est-droplist.cdk-drag-placeholder{opacity:0}.est-droplist.cdk-drag-preview{z-index:999999999!important;opacity:1;box-sizing:border-box;border-radius:4px;background-color:#fff;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.est-droplist.cdk-drag-preview td:not(.drag-visible){visibility:hidden}.est-droplist.cdk-drag-preview td.drag-visible{padding-top:3px}.est-droplist.cdk-drag-animating,.est-droplist.cdk-drop-list-dragging .est-dropbox:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}']}]}],se.ctorParameters=function(){return[{type:r.NgControl,decorators:[{type:t.Self},{type:t.Optional}]},{type:s.PreferencesService,decorators:[{type:t.Optional}]},{type:G,decorators:[{type:t.Optional},{type:t.Inject,args:[T]}]},{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[O]}]},{type:n.LocalizationService},{type:t.ChangeDetectorRef},{type:re},{type:i.UtilityService},{type:i.ExportService},{type:i.DateService},{type:i.MessageService}]},se.propDecorators={EsTdsDirective:[{type:t.ContentChildren,args:[A]}],EsThsDirective:[{type:t.ContentChildren,args:[z]}],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}],ColumnsPinnable:[{type:t.Input}],AutoUpdate:[{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}],CountLabel:[{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}],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}],UserEdits:[{type:t.Input}],onOrderChanged:[{type:t.Output}],onSearchRequest:[{type:t.Output}],onSelectionChanged:[{type:t.Output}],onRemoval:[{type:t.Output}],onAbortRemoval:[{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 oe=function(){},ae=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.Pinned=!1,this.SearchInProgress=!1,this.Wrap=!1,this.Fixed=!1,this.Template=null,this.onOrderChange=new t.EventEmitter,this.onUnpinning=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.unpin=function(){this.onUnpinning.emit(this.ID)},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}();ae.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> \r\n <span class="fa" [class.fa-chevron-down]="Order == \'DESC\'" [class.fa-chevron-up]="Order == \'ASC\'"></span>\r\n</span>\r\n<span *ngIf="Pinned && !Fixed" class="app-pointer fa fa-thumb-tack est-quick-unpin" (click)="unpin()"></span>\r\n<div [hidden]="!Resizable || Fixed || Pinned" class="est-head-resizer" (mousedown)="onResizeStart($event)">\r\n <div class="est-head-resizer-internal"></div>\r\n</div>',changeDetection:t.ChangeDetectionStrategy.OnPush}]}],ae.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},ae.propDecorators={ID:[{type:t.Input,args:["es-th"]}],Order:[{type:t.Input}],Orderable:[{type:t.Input}],Display:[{type:t.Input}],Resizable:[{type:t.Input}],Pinned:[{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}],onUnpinning:[{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 le=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.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}();le.decorators=[{type:t.Component,args:[{selector:"[es-td]",template:"<span>\r\n <ng-content></ng-content>\r\n</span>",changeDetection:t.ChangeDetectionStrategy.OnPush}]}],le.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:u.DomSanitizer}]},le.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 he=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:O,useValue:(null==t?void 0:t.locale)||"it-IT"},{provide:M,useValue:(null==t?void 0:t.debugMode)||!1},{provide:T,useValue:(null==t?void 0:t.defaults)||null}]}},e}();he.decorators=[{type:t.NgModule,args:[{imports:[a.CommonModule,r.FormsModule,l.RouterModule,n.LocalizationModule,d.ModalModule,g.BsDropdownModule,m.CsvModule,f.ContextMenuModule,h.MatSelectModule,c.MatInputModule,o.DragDropModule,p.FormsAndValidationsModule],declarations:[ae,le,se,A,z,H],providers:[i.UtilityService,i.ExportService,i.HashingService,i.MessageService],exports:[se,A,z,H]}]}];var ce=function(){},pe=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},ue=function(){this._selected=!1,this._rowClass=null,this._hash=null,this.properties={}},de=function(e,t,n,i,r){void 0===i&&(i=!1),void 0===r&&(r=""),this.value=e,this.header=t,this.header_group=n,this.exports=!1,this.export_format="",this.exports=i,this.export_format=r,this._headersHierarchy=n?n.split(">").map((function(e){return e.trim()})):[]},ge=function(){},me=function(){},fe=function(){},ve=function(){};e.AppOrdering=U,e.AppSearch=D,e.CornerMenuOption=ce,e.EsTableColumnsDefinition=W,e.EsTableComponent=se,e.EsTableDefaultable=G,e.EsTableModule=he,e.EsTableModuleConfig=oe,e.EsTableMultiValue=de,e.EsTableOperationDefinition=pe,e.EsTdDirective=A,e.EsThDirective=z,e.GenericItem=ue,e.Group=J,e.GroupAggregation=Q,e.GroupFilter=k,e.GroupOrAggregation=Z,e.ItemsSelection=E,e.ReportColumn=ge,e.ReportDefinition=R,e.ReportOrder=$,e.ReportParam=me,e.ReportResult=fe,e.ReportRow=ve,e.TablePagerComponent=H,e.ɵa=V,e.ɵb=O,e.ɵc=M,e.ɵd=T,e.ɵe=L,e.ɵf=re,e.ɵg=ae,e.ɵh=le,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@esfaenza/localizations"),require("@esfaenza/extensions"),require("@angular/forms"),require("@esfaenza/preferences"),require("@angular/cdk/drag-drop"),require("rxjs"),require("@angular/common"),require("@angular/router"),require("@angular/material/select"),require("@angular/material/input"),require("@esfaenza/forms-and-validations"),require("@angular/platform-browser"),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","@esfaenza/localizations","@esfaenza/extensions","@angular/forms","@esfaenza/preferences","@angular/cdk/drag-drop","rxjs","@angular/common","@angular/router","@angular/material/select","@angular/material/input","@esfaenza/forms-and-validations","@angular/platform-browser","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.localizations,e.i1,e.ng.forms,e.preferences,e.ng.cdk.dragDrop,e.rxjs,e.ng.common,e.ng.router,e.ng.material.select,e.ng.material.input,e.formsAndValidations,e.ng.platformBrowser,e.modal,e.dropdown,e.ngxCsv,e.ngxContextmenu)}(this,(function(e,t,i,n,r,s,o,a,l,h,c,p,u,d,g,m,f,v){"use strict";function y(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,Object.freeze(t)}var w=y(t),C=y(n),b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};function x(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}function S(e,t,i,n){return new(i||(i=Promise))((function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((n=n.apply(e,t||[])).next())}))}function I(e,t){var i,n,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(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=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++,n=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],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}Object.create;function P(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,s=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}function O(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e}Object.create;var M=new t.InjectionToken("EST_LOCALE"),T=new t.InjectionToken("EST_DEBUG"),V=new t.InjectionToken("EST_DEFAULTS"),H=function(e){function t(t){var i=e.call(this,null!=t?t:"it-IT")||this;return e.prototype.set.call(i,"en->it","All",["Tutto"]),e.prototype.set.call(i,"en->it","Shown Elements",["Elementi visualizzati"]),e.prototype.set.call(i,"en->it","Shown Groups",["Gruppi visualizzati"]),e.prototype.set.call(i,"en->it","Are you sure you want to retrieve all results?",["Si è sicuri di voler caricare tutti i risultati?"]),e.prototype.set.call(i,"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"]),i}return x(t,e),t}(i.LocalizationService);H.decorators=[{type:t.Injectable}],H.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[M]}]}]};var R=function(){function e(e,i,n,r){this.msgExts=e,this.lc=i,this.cdr=n,this.locale=r,this.WarnOnAll=!0,this.AllSearch=!0,this.DefaultAll=999999,this.GroupMode=!1,this.GroupCount=!1,this.CountLabel=null,this.ShowCount=!0,this.ShowPaging=!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||15:this.CurrentPageSize,this.AllSearch&&this.PagingOptions.push(this.DefaultAll)},e.prototype.ngOnChanges=function(e){var t=e.View,i=e.CurrentPageSize;(t&&!t.firstChange||i&&!i.firstChange)&&(this.Model=(null==t?void 0:t.currentValue)?t.currentValue.itemsperpageoverride||15:(null==i?void 0:i.currentValue)?i.currentValue:null)},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}();R.decorators=[{type:t.Component,args:[{selector:"app-paging",viewProviders:[{provide:i.LocalizationService,useClass:H}],template:'<ng-container *ngIf="!Hidden">\r\n <span class="est-fs-14"> {{CountLabel && !GroupMode ? CountLabel : ((GroupMode ? \'Shown Groups\' : \'Shown Elements\') | localize : lc)}}: </span>\r\n <ng-container *ngIf="ShowPaging && Model && (Model == DefaultAll || PagerCount >= Model || PagerCount == -1)">\r\n <mat-form-field [appearance]="\'legacy\'" class="mat-paginator-page-size-select est-fs-14 est-ipp-bold">\r\n <select matNativeControl [ngModel]="Model" name="input" (ngModelChange)="choice($event)">\r\n <ng-container *ngFor="let pOpt of PagingOptions">\r\n <option *ngIf="pOpt == DefaultAll || PagerCount >= pOpt || PagerCount == -1" [value]="pOpt">{{ pOpt == DefaultAll ? (\'All\' | localize : lc) : pOpt.toString()}}</option>\r\n </ng-container>\r\n </select>\r\n </mat-form-field>\r\n <span class="est-fs-14 est-ipp-bold" *ngIf="ShowCount && PagerCount != -1"> / </span>\r\n </ng-container>\r\n <span class="est-fs-14 est-ipp-bold" *ngIf="ShowCount && PagerCount != -1">{{PagerCount | number : \'0.0-0\' : locale}}</span>\r\n</ng-container>',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}"]}]}],R.ctorParameters=function(){return[{type:n.MessageService},{type:i.LocalizationService},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[M]}]}]},R.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}],CountLabel:[{type:t.Input}],ShowCount:[{type:t.Input}],ShowPaging:[{type:t.Input}],PagerCount:[{type:t.Input}],Hidden:[{type:t.Input}],pagingSelected:[{type:t.Output}]};var E=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}(),D=function(){},k=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=[]},G=function(e,t){this.column=e,this.value=t},z=function(){},A=function(e){this.Template=e,this._directive=!0,this._multi=!1,this.tdVisible=!0,this.tdIf=!0};A.decorators=[{type:t.Directive,args:[{selector:"[td]"}]}],A.ctorParameters=function(){return[{type:t.TemplateRef}]},A.propDecorators={tdVisible:[{type:t.Input}],td:[{type:t.Input}],tdIf:[{type:t.Input}],tdClass:[{type:t.Input}]};var L=function(e){this.Template=e,this._thAggregations=null,this._thParents=null,this._directive=!0,this._referenced=!1,this._multi=!1,this._multi_content="",this.th="",this.thPinned=!1,this.thPinnable=!0,this.thPinnedWidth=150,this.thVisible=!0,this.thFixed=!1,this.thParent="",this.thOrderable=!0,this.thWrap=!1,this.thResizable=!1,this.thIf=!0,this.thEmpty=!1,this.thGroup=!1,this.thAggregation=null,this.thUserEdits=null};L.decorators=[{type:t.Directive,args:[{selector:"[th]"}]}],L.ctorParameters=function(){return[{type:t.TemplateRef}]},L.propDecorators={th:[{type:t.Input}],thPinned:[{type:t.Input}],thPinnable:[{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}],thEmpty:[{type:t.Input}],thGroup:[{type:t.Input}],thAggregation:[{type:t.Input}],thUserEdits:[{type:t.Input}],thMulti:[{type:t.Input}]};var B=function(e){function t(t){var i=e.call(this,null!=t?t:"it-IT")||this;return e.prototype.set.call(i,"en->it","All the",["Tutti gli"]),e.prototype.set.call(i,"en->it","All",["Tutto"]),e.prototype.set.call(i,"en->it","Groups",["Gruppi"]),e.prototype.set.call(i,"en->it","Cannot export an empty dataset",["Impossibile esportare un dataset vuoto"]),e.prototype.set.call(i,"en->it","Performing Table bootstrap",["Sto caricando la Tabella"]),e.prototype.set.call(i,"en->it","Update every",["Aggiorna ogni"]),e.prototype.set.call(i,"en->it","second/s",["secondo/i"]),e.prototype.set.call(i,"en->it","Export View",["Esporta Vista"]),e.prototype.set.call(i,"en->it","Column Name",["Nome Colonna"]),e.prototype.set.call(i,"en->it","Columns Order",["Ordine Colonne"]),e.prototype.set.call(i,"en->it","Columns Visibility",["Visibilità Colonne"]),e.prototype.set.call(i,"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(i,"en->it","Columns Visibility and Order",["Visibilità e Ordine Colonne"]),e.prototype.set.call(i,"en->it","Objects Selected",["Oggetti Selezionati"]),e.prototype.set.call(i,"en->it","Object Selected",["Oggetto Selezionato"]),e.prototype.set.call(i,"en->it","Select Everything",["Seleziona Tutto"]),e.prototype.set.call(i,"en->it","Reset Selection",["Resetta Selezione"]),e.prototype.set.call(i,"en->it","No operations available",["Nessuna operazione disponibile"]),e.prototype.set.call(i,"en->it","Paging options are not available for this report",["Le opzioni di paginazione non sono disponibili per questo report"]),i}return x(t,e),t}(i.LocalizationService);B.decorators=[{type:t.Injectable}],B.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[M]}]}]};var U=function(){function e(e,t,i,n,r){this.est=e,this.expExts=t,this.msgExts=i,this.utiExts=n,this.dateExts=r}return e.prototype.tryExport=function(e){var t=this;this.est.ExportFunction&&(this.est.reportMode?this.est.ExportFunction(e):this.est.ExportFunction((function(i,n){return void 0===n&&(n=!1),S(t,void 0,void 0,(function(){var t,r=this;return I(this,(function(s){switch(s.label){case 0:return n?[2]:0==i.length?(this.msgExts.simpleWarning(this.est.lc.loc("Cannot export an empty dataset")),[2]):(this.setupExport(i),"CSV"!=e?[3,1]:(this.est.cdr.detectChanges(),setTimeout((function(){r.est.exportDownloader.nativeElement.click()})),[3,7]));case 1:if("XLSX"!=e)return[3,6];if(null!=this.ExcelJS)return this.exportExcel(),[2];s.label=2;case 2:return s.trys.push([2,4,,5]),t=this,[4,import("exceljs")];case 3:return t.ExcelJS=s.sent(),this.exportExcel(),[3,5];case 4:throw s.sent(),"Impossibile caricare la libreria per l'esportazione in Excel";case 5:return[3,7];case 6:throw"Formato di esportazione non riconosciuto";case 7:return[2]}}))}))})))},e.prototype.exportExcel=function(){return S(this,void 0,void 0,(function(){var e,t,i,n,r,s,o,a,l,h,c,p,u,d;return I(this,(function(g){switch(g.label){case 0:for(1,(e=new this.ExcelJS.Workbook).creator="Ema's big Es-Table",e.created=new Date,t=e.addWorksheet("Data"),(i=t.getRow(1)).font={bold:!0},this.est.headers=this.est.headers.sort((function(e,t){return e.order-t.order})),n=0;n<this.est.headers.length;n++)a=this.est.headers[n],i.getCell(n+1).value=a.label;for(n=0;n<this.est.data.length;n++)for(r=t.getRow(n+1+1),s=this.est.data[n],o=0;o<this.est.headers.length;o++)if(a=this.est.headers[o],l=r.getCell(o+1),null==(h=s[a.key])||null==h)l.value="";else switch(a.type){case"date":l.value=this.dateExts.getDateConvertion(h).toDate();case"number":l.value=parseFloat(h.replace(",","."));default:l.value=h}return[4,e.xlsx.writeBuffer()];case 1:return c=g.sent(),p=new Blob([c],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;"}),u=window.URL.createObjectURL(p),d=this.est.ExportFileName,this.utiExts.fileDownload(u,d.endsWith(".csv")?d.replace(".csv",".xlsx"):d.endsWith(".xlsx")?d:d+".xlsx"),[2]}}))}))},e.prototype.setupExport=function(e){var t=this.est.DynamicRowColumnsDefinition;this.est.headers=t&&t.length>0?this.expExts.setupForGenericExport(e,t.map((function(e){return{label:e.description,key:e.propertyName,order:e.columnOrder,type:"string"}}))):this.expExts.setupForExport(e),this.est.data=e},e}(),F=function(e,t){this.id=e,this.order=t},N=function(e,t,i,n,r,s,o,a,l,h,c){this.id=e,this.description=t,this.visible=i,this.fixed=n,this.pinned=r,this.pinnable=s,this.pinnedWidth=o,this.template=a,this.parentTemplates=l,this.multi=h,this.multiContent=c},W=function(){function e(e,t,i,n,r){this.est=e,this.utilities=t,this.utiExts=i,this.prefService=n,this.rgH=r}return e.prototype.handleTHOrderChange=function(e,t){var i=this.est.viewMode?this.est.View.orders:this.est.arrayOrders,n=!0,r=null;!i&&this.est.viewMode?this.est.View.orders=[]:!i&&this.est.arrayMode&&(this.est.arrayOrders=[]);for(var s=0;s<i.length;s++){var o=i[s];o.id==e&&(t?(o.order=t,n=!1):r=s)}null!=r?i.splice(r,1):n&&(this.est.MultipleOrderingDirectives?i.push(new F(e,t)):this.est.viewMode?this.est.View.orders=[new F(e,t)]:this.est.arrayMode&&(this.est.arrayOrders=[new F(e,t)])),this.est.onOrderChanged.emit({id:e,order:t}),this.est.viewMode?this.est.groupSearchRequestsCache.length>0?this.rgH.emitRowGroupingSearches(e,i):this.est.emitSearchRequest(!1):this.est.arrayMode&&this.est.internalWriteValue()},e.prototype.reviewColumnsList=function(e){var t=this;if(this.est.TMPColumnsList=[],0!=e.length){for(var i=function(t){var i=e[t],r=i.th;if(!r)return"continue";if((n.est.HiddenColumns||i.thVisible)&&i.thIf){var s=n.est.ColumnsList&&0!=n.est.ColumnsList.length&&n.est.ColumnsList.find((function(e){return e.id==r}))||null,o=new N(r,null,i.thVisible,i.thFixed||i.thGroup,null==s?i.thPinned:s.pinned,i.thPinnable,i.thPinnedWidth,i.Template,i._thParents,i._multi,i._multi_content);s&&(o.prev_index=s.prev_index),n.est.TMPColumnsList.push(o)}},n=this,r=0;r<e.length;r++)i(r);this.est.ColumnsList=[],this.est.TMPColumnsList.forEach((function(e){t.est.ColumnsList.push(Object.assign({},e))}))}},e.prototype.expandMultiThsAndTds=function(e,t,i){for(var n={},r=0;r<e.length;r++){(P=e[r]).thMulti&&(n[P.th]={On:P.th,tdref:null,thref:P,thgen:{},tdgen:{}})}for(r=0;r<t.length;r++){(_=t[r])._multi=!!n[_.td],_._multi&&(n[_.td].tdref=_)}e=e.filter((function(e){return!e.thMulti})),t=t.filter((function(e){return!e._multi}));var s={},o={},a={},l=[];for(r=0;r<i.length;r++){var h=i[r];for(var c in n)if(h[c]&&h[c].length)for(var p=n[c],u=p.tdref,d=p.thref,g=0;g<h[c].length;g++){var m=h[c][g];m._headersHierarchy||(m._headersHierarchy=m.header_group?m.header_group.split(">").map((function(e){return e.trim()})):[]);var f=m.header,v=m.header_group||null,y=m._headersHierarchy;if(!o[v+"_"+f]){o[v+"_"+f]=!0;var w=new L(d.Template);w._multi=!0,w._multi_content=f,w.th=c+"_"+g,w.thClass=d.thClass,w.thIf=d.thIf,w.thVisible=d.thVisible,w.thWrap=d.thWrap,w.thParent=y[y.length-1],w.thOrderable=!1;for(var C=0;C<y.length;C++){var b=y[C];if(!s[b]){s[b]=!0;var x=new L(null);x.th=b,x._multi_content=b,x.thParent=C>0?y[C-1]:null,l.push(x)}}l.push(w);var S=new A(u.Template);S._multi=!0,S.td=c+"_"+g,S.tdClass=u.tdClass,S.tdIf=u.tdIf,S.tdVisible=u.tdVisible,a[S.td]=S}}}var I=[];for(r=0;r<l.length;r++)l[r].thParent||I.push(l[r]);for(var c in s)for(r=0;r<l.length;r++){var P;(P=l[r]).thParent&&P.thParent==c&&I.push(P)}e=O(e,l);for(r=0;r<l.length;r++){var _;(_=a[l[r].th])&&t.push(_)}return{expTds:t,expThs:e}},e.prototype.moveFixedColumnsAtTheBeginning=function(e,t){for(var i={},n=0,r=0,s={},o={},a=0;a<this.est.ColumnsList.length;a++){var l=this.est.ColumnsList[a];s[l.id]=l,l.pinned&&(a!=r&&this.utilities.arrayMove(this.est.ColumnsList,a,r),r++),l.fixed&&!l.pinned&&(a!=r+n&&this.utilities.arrayMove(e,a,r+n),n++)}r=n=0;for(var h=0;h<e.length;h++){var c=e[h];i[c.th]=c,c.thPinned=!s[c.th]&&c.thPinned||s[c.th]&&s[c.th].pinned,c.thPinned&&(h!=r&&this.utilities.arrayMove(e,h,r),r++),!c.thFixed&&!c.thGroup||c.thPinned||(h!=r+n&&this.utilities.arrayMove(e,h,r+n),n++)}for(h=0;h<e.length;h++)o[e[h].th]=h;var p=new Array(e.length);for(h=0;h<t.length;h++){var u=t[h];p[o[u.td]]=u}this.est.HasPinnedColumns=r>0},e.prototype.evaluatePinnedColumnsWidth=function(){if(this.est.HasPinnedColumns){this.est.PinnedContainerWidth=0;for(var e=0;e<this.est.ColumnsList.length;e++){var t=this.est.ColumnsList[e];t.pinned&&t.visible&&(this.est.PinnedContainerWidth+=t.pinnedWidth)}this.est.PinnedContainerWidth+=this.est.Selection?25:0}},e.prototype.alignColumnsIfLoadedView=function(e){var t=this,i=this.est.viewMode&&e.savedstate,n=[];if(this.est.ColumnsList&&0!=this.est.ColumnsList.length){var r=this.est.viewMode?e.columns:this.est.arrayColumns;if(this.est.ColumnsList.forEach((function(e){var t=r.filter((function(t){return(t.startsWith("§")?t.substring(1):t)==e.id}));1==t.length&&(e.pinned=t[0].startsWith("§")),e.visible&&0==r.length?n.push(e.id):1!=t.length||e.visible?0==t.length&&e.visible&&(e.visible=!1):e.visible=!0})),0==r.length&&(this.est.viewMode?e.columns=n:this.est.arrayColumns=n),this.est.viewMode&&e.savedstate&&this.est.ColumnsOrdering&&e.column_ordering.length>0){var s=[];e.column_ordering.forEach((function(e){t.est.ColumnsList.forEach((function(t){t.id==e&&s.push(t)}))})),this.est.ColumnsList.forEach((function(e){s.find((function(t){return t==e.id}))||s.push(e)})),this.est.ColumnsList=s}this.est.viewMode&&(e.savedstate=!1),i&&this.est.changed()}},e.prototype.refreshColumnsVisibility=function(e,t,i){for(var n=[],r={},s={},o=0;o<this.est.ColumnsList.length;o++){var a=this.est.ColumnsList[o];s[a.id]=a,a.visible&&n.push((a.pinned?"§":"")+a.id)}if(i?i.columns=n:this.est.arrayColumns=n,e)for(var l=0;l<e.length;l++){var h=e[l];h.thVisible=h.thFixed||(s[h.th]?s[h.th].visible:h.thVisible),(h.thFixed||h.thGroup)&&(r[h.th]=!0)}if(t)for(l=0;l<t.length;l++){var c=t[l];c.tdVisible=r[c.td]||(s[c.td]?s[c.td].visible:c.tdVisible)}this.est.changed()},e.prototype.alignHeadersOrdering=function(e,t){for(var i=t?t.orders:this.est.arrayOrders,n=0;n<e.length;n++){var r=e[n];r.thOrder=null;for(var s=0;s<i.length;s++){var o=i[s];o.id==r.th&&(r.thOrder=o.order)}}},e.prototype.evaluateHeadersGroupingInfos=function(e){for(var t={},i={},n=0;n<e.length;n++){i[(o=e[n]).th]=o,o.thParent&&!t[o.thParent]&&(t[o.thParent]=!0)}var r=0,s=[];for(n=0;n<e.length;n++){var o;if(!t[(o=e[n]).th]){s.push(o);var a=this.jumpsToFinalParent(o,i);r=a>r?a:r}}return{leafs:s,groupingLevel:r,parentsCache:t,thsCache:i}},e.prototype.evaluateHeaderGroups=function(e){if(0!=e.groupingLevel){for(var t=[],i=e.leafs.filter((function(e){return e.thVisible&&!e.thPinned})),n=0;n<e.groupingLevel;n++){t.push([]);for(var r=0;r<i.length;r++)t[n].push("")}var s=[];for(r=0;r<this.est.OrderDirectives.length;r++){var o=e.thsCache[this.est.OrderDirectives[r]];o.thVisible&&!o.thPinned&&s.push(o)}var a="";for(r=0;r<s.length;r++){var l=s[r],h=r-1>=0?s[r-1]:null;l._lbord=l.thParent!=a,l._rbord=i.length==r+1,h&&(h._rbord=l.thParent!=a),a=l.thParent;for(n=0;n<e.groupingLevel;n++){var c=l.thParent;c&&!l.thPinned&&(t[n][r]=c,l=e.thsCache[c])}}a="";var p=0;this.est.TMPRowThGroups=[];for(n=0;n<t.length;n++){var u=[];this.est.TMPRowThGroups.push(u),(this.est.Selection||this.est.HasPinnedColumns)&&u.push({Span:1,Template:null,Pinned:this.est.HasPinnedColumns});for(var d=0;d<t[n].length;d++){var g=t[n][d];g==a?p++:(p>0&&u.push({Span:p,Template:a?e.thsCache[a].Template:null,Content:a?e.thsCache[a]._multi_content:null,Borders:!!a}),p=1,a=g)}u.push({Span:p,Template:a?e.thsCache[a].Template:null,Content:a?e.thsCache[a]._multi_content:null,Borders:!!a}),this.est.Removal&&u.push({Span:1,Template:null}),(this.est.Export||this.est.HiddenColumns||this.est.ColumnsOrdering||this.est.CornerMenuOptions)&&u.push({Span:1,Template:null}),p=0,a=""}}},e.prototype.jumpsToFinalParent=function(e,t){var i=0,n=null,r=[],s=e;do{(n=e.thParent)&&((e=t[n]).thEmpty||e._multi_content?!e.thEmpty&&e._multi_content&&r.unshift({content:e._multi_content}):r.unshift({tmpl:e.Template}),i++)}while(n);return s._thParents=r,i},e.prototype.generateDefaultOrder=function(e,t){if(0!=e.length){var i=this.est.viewMode?t.column_ordering:this.est.arrayColumnOrdering;if(i&&0!=i.length){this.est.OrderDirectives=i;var n=function(t){var i=e[t].th;r.est.OrderDirectives.find((function(e){return e==i}))||r.est.OrderDirectives.push(i)},r=this;for(s=0;s<e.length;s++)n(s)}else for(var s=0;s<e.length;s++){var o=e[s].th;this.est.OrderDirectives.push(o)}}},e.prototype.applyOrdering=function(e,t){var i=this,n=[];if(t){this.est.OrderDirectives.forEach((function(e){var t=i.est.TMPRowTHs.filter((function(t){return t.ID==e}))[0];t&&n.push(t)})),this.est.TMPRowTHs=n;for(var r=function(e){var t=s.est.TMPRowTDs[s.est.RowContexts[e]],i=[];s.est.OrderDirectives.forEach((function(e){var n=t.filter((function(t){return t.ID==e}))[0];i.push(n)})),s.est.TMPRowTDs[s.est.RowContexts[e]]=i},s=this,o=0;o<this.est.RowContexts.length;o++)r(o)}this.est.viewMode?e.column_ordering=this.est.OrderDirectives:this.est.arrayColumnOrdering=this.est.OrderDirectives,this.est.changed()},e.prototype.sendUp=function(e){var t=this.est.TMPColumnsList.indexOf(e);if(!this.est.TMPColumnsList[t-1].fixed&&!this.est.TMPColumnsList[t-1].pinned){this.utiExts.swap(this.est.TMPColumnsList,t,t-1);var i=[];this.est.TMPColumnsList.forEach((function(e){i.push(Object.assign({},e))})),this.est.TMPColumnsList=i}},e.prototype.sendDown=function(e){var t=this.est.TMPColumnsList.indexOf(e);this.utiExts.swap(this.est.TMPColumnsList,t,t+1);var i=[];this.est.TMPColumnsList.forEach((function(e){i.push(Object.assign({},e))})),this.est.TMPColumnsList=i},e.prototype.pinOrUnpinColumn=function(e){var t=this.est.TMPColumnsList.indexOf(e);if(e.pinned){if(null!=e.prev_index&&null!=e.prev_index)this.utilities.arrayMove(this.est.TMPColumnsList,t,e.prev_index);else for(i=0;i<this.est.TMPColumnsList.length;i++)if(!this.est.TMPColumnsList[i].pinned&&!this.est.TMPColumnsList[i].fixed){this.utilities.arrayMove(this.est.TMPColumnsList,t,i-1);break}}else{e.prev_index=t;for(var i=0;i<this.est.TMPColumnsList.length;i++)if(!this.est.TMPColumnsList[i].pinned){this.utilities.arrayMove(this.est.TMPColumnsList,t,i);break}}e.pinned=!e.pinned},e.prototype.columnClicked=function(e){this.est.lastSelectedItemID=e.id,this.est.HiddenColumns&&!e.fixed&&(e.visible=!e.visible,this.updateGlobalColVisCheck())},e.prototype.resetColumnVisSelection=function(){var e=this;this.est.TMPColumnsList=[],this.est.TMPColumnsList=[],this.est.ColumnsList.forEach((function(t){e.est.TMPColumnsList.push(Object.assign({},t))}));var t=[];this.est.ColumnsOrdering&&(this.est.OrderDirectives.forEach((function(i){var n=e.est.TMPColumnsList.filter((function(e){return e.id==i}))[0];n&&t.push(n)})),this.est.TMPColumnsList=t),this.updateGlobalColVisCheck()},e.prototype.refreshColumnOrdering=function(){this.est.OrderDirectives=[];for(var e=0;e<this.est.ColumnsList.length;e++)this.est.OrderDirectives.push(this.est.ColumnsList[e].id)},e.prototype.updateGlobalColVisCheck=function(){this.est.globalColVisCheck=this.est.TMPColumnsList.every((function(e){return e.visible}))},e.prototype.columnReordered=function(e){o.moveItemInArray(e.container.data,e.previousIndex,e.currentIndex)},e.prototype.sortPredicate=function(e,t){var i=this.est.ColumnsList[e];return!(i.fixed||i.pinned||t.data.pinned||t.data.pinned)},e.prototype.confirmColumnVisibilitySelection=function(){var e=this;if(this.est.TMPColumnsList.every((function(e){return!e.visible})))return!1;var t=this.est.viewMode?this.est.MainGroupView||this.est.View:null;if(this.est.ColumnsList=[],this.est.TMPColumnsList.forEach((function(t){e.est.ColumnsList.push(Object.assign({},t))})),this.refreshColumnOrdering(),this.applyOrdering(t,!1),this.refreshColumnsVisibility(null,null,t),this.est.SavePreferences){if(!this.est.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 i=this.est.arrayMode?this.est.arrayColumns:t.columns,n=this.est.arrayMode?this.est.arrayColumnOrdering:t.column_ordering,r={columns:JSON.parse(JSON.stringify(i)),column_ordering:JSON.parse(JSON.stringify(n))};this.prefService.setItem(this.est.ngControl.name,r,"preference").subscribe()}return this.est.viewMode?setTimeout((function(){if(e.est.MainGroupView)for(var t=0;t<e.est.groupSearchRequestsCache.length;t++){var i=e.est.groupSearchRequestsCache[t].view;i.columns=e.est.MainGroupView.columns,i.column_ordering=e.est.MainGroupView.column_ordering,e.est.emitSearchRequest(!0,e.est.groupSearchRequestsCache[t].view)}else e.est.emitSearchRequest(!0)})):this.est.arrayMode&&setTimeout((function(){e.est.internalWriteValue()})),this.est.lastSelectedItemID=null,!0},e.prototype.unpinColumn=function(e){this.resetColumnVisSelection(),this.pinOrUnpinColumn(this.est.TMPColumnsList.find((function(t){return t.id==e}))),this.confirmColumnVisibilitySelection()},e.prototype.globalColVisCheckChanged=function(){var e=this;this.est.TMPColumnsList.forEach((function(t){t.fixed||(t.visible=e.est.globalColVisCheck)}))},e}(),j=function(e,t,i,n,r,s,o,a,l,h){void 0===i&&(i=null),void 0===n&&(n=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===h&&(h=!1),this.description=e,this.propertyName=t,this.routePath=i,this.routeParameterProperties=n,this.dataOrder=r,this.columnOrder=s,this.visible=o,this.clss=a,this.orderable=l,this.headerWraps=h},q=function(){function e(e){this.est=e}return e.prototype.generateRouterLink=function(e,t,i){if(this.est.DynamicTableRouterLinkCache[i._hash+e])return this.est.DynamicTableRouterLinkCache[i._hash+e];var n=this.getRouterLink(e,t,i);return this.est.DynamicTableRouterLinkCache[i._hash+e]=n,n},e.prototype.getRouterLink=function(e,t,i){for(var n=0;n<t.length;n++)e=e.replace("{"+n+"}",i.properties[t[n]]);return e=e.replace(/'/g,'"').replace(/ /g,""),JSON.parse(e)},e.prototype.eventuallyReviewDynamicColumns=function(){if(this.est.TMPBoundSource&&0!=this.est.TMPBoundSource.length&&(!!this.est.TMPBoundSource[0].properties&&!(!this.est.FirstBind&&this.est.DynamicRowColumnsDefinition&&this.est.DynamicRowColumnsDefinition.length>0)))if(this.est.DynamicRowColumnsDefinition&&0!=this.est.DynamicRowColumnsDefinition.length)this.est.UserDefinedDynamicCols=!0;else{var e=this.est.TMPBoundSource[0].properties;for(var t in this.est.DynamicRowColumnsDefinition=[],e)this.est.DynamicRowColumnsDefinition.push(new j(t,t));this.est.UserDefinedDynamicCols=!1}},e}(),K=function(){function e(e){this.est=e}return e.prototype.assignHierarchyLevels=function(e){if(e&&e.length)if(this.est.ParentKey||this.est.OwnKey||(void 0!==e[0].parentid&&(this.est.ParentKey="parentid"),void 0!==e[0].id&&(this.est.OwnKey="id")),this.est.ParentKey&&this.est.OwnKey){var t=1,i=0;do{i=this.assignLevel(e,t),t++}while(i>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 i=0,n=0;n<e.length;n++){var r=e[n];if(r[this.est.ParentKey]||1!=t){if(r[this.est.ParentKey]&&t>1)for(var s=0;s<e.length;s++){var o=e[s];if(o[this.est.OwnKey]==r[this.est.ParentKey]&&o._level==t-1){r._level=t,o._expanded=this.est.StartsExpanded,o.parent=!0,r._visible=this.est.StartsExpanded,i++;break}}}else r._level=1,r._visible=!0,r._expanded=this.est.StartsExpanded,i++}return i},e.prototype.expandParent=function(e){for(var t=0;t<this.est.boundSource.length;t++){var i=this.est.boundSource[t];if(i[this.est.OwnKey]==e){i._expanded=!0;for(var n=0;n<this.est.boundSource.length;n++){var r=this.est.boundSource[n];r[this.est.ParentKey]==e&&(r._visible=!0)}return}}},e.prototype.collapseParent=function(e){for(var t=0;t<this.est.boundSource.length;t++){var i=this.est.boundSource[t];if(i[this.est.OwnKey]==e)return i._expanded=!1,void this.collapseChildOfParent(e)}},e.prototype.collapseChildOfParent=function(e){for(var t=0;t<this.est.boundSource.length;t++){var i=this.est.boundSource[t];i[this.est.ParentKey]!=e||i.parent?i[this.est.ParentKey]==e&&i.parent&&(i._expanded=!1,i._visible=!1,this.collapseChildOfParent(i[this.est.OwnKey])):i._visible=!1}},e}(),$=function(){function e(e,t){this.est=e,this.utilities=t}return e.prototype.getItemsByMode=function(e,t,i){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===i&&(i=!1);var n=[];return this.est.viewMode&&this.est.View instanceof E?n=this.getViewItemsBySource():this.est.arrayMode&&(this.est.View.forEach((function(e){e._item=!0})),this.est.UseArrayModePaging&&!i?(this.est.SearchView?(this.est.ArraymodeItemsPerPage=this.est.SearchView.itemsperpageoverride,this.est.arraymodePage=this.est.SearchView.page,this.est.arraymodePages=this.est.SearchView.pages):t&&this.refreshPaging(this.est.ArraymodeItemsPerPage),n=this.adaptViewToPaging()):n=this.est.View),e?n.filter((function(e){return e._selected})):n},e.prototype.refreshPaging=function(e){this.est.ArraymodeItemsPerPage=e,this.est.arraymodePages=Math.ceil(this.est.View.length/this.est.ArraymodeItemsPerPage),this.est.arraymodePage=1,this.est.internalWriteValue()},e.prototype.getViewItemsBySource=function(){var e,t,i,n=this,r=this.est.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?((i=r.groups).forEach((function(e){e._group=!0,n.utilities.cacheAggregations(e)})),i):((i=this.est.SecondarySource?this.est.View.items2:this.est.TertiarySource?this.est.View.items3:this.est.View.items)||(i=[]),i.forEach((function(e){e._item=!0})),i)},e.prototype.adaptViewToPaging=function(){var e=[];if(this.est.SearchView)return this.est.View;this.est.arrayPulsanti=this.utilities.getPagesArray(6,this.est.arraymodePage,this.est.arraymodePages);for(var t=(this.est.arraymodePage-1)*this.est.ArraymodeItemsPerPage;t<this.est.arraymodePage*this.est.ArraymodeItemsPerPage;t++)t<=this.est.View.length-1&&e.push(this.est.View[t]);return e},e.prototype.arrayModeReviewOrderings=function(){var e=this;this.est.arrayOrders.length>0&&this.est.arrayOrders.forEach((function(t){e.est.boundSource=e.est.boundSource.sort((function(e,i){return(e[t.id]>i[t.id]?1:-1)*("DESC"==t.order?-1:1)}))}))},e}(),X=function(){},J=function(){function e(e,t){this.est=e,this.utilities=t}return e.prototype.setupNextOrderAndSearch=function(e){if(this.est.View instanceof D){var t,i={NONE:"DESC",DESC:"ASC",ASC:null}[e.order||"NONE"];e.order=i;var n=this.est.View.orders?this.est.View.orders.filter((function(t){return t.column==e.id})):[];0==n.length&&e.order?((t=new X).column=e.id,t.order=e.order,this.est.View.orders||(this.est.View.orders=[]),this.est.View.orders.push(t)):1==n.length?e.order?n[0].order=e.order:n=[]:console.warn("Impossibile settare ordinamento. Colonna "+e.id+" direttive di ordinamento "+n.length+" ordinamento scelto "+e.order),this.est.emitSearchRequest(!1)}else console.error("View diversa da reportdefinition entrata nel metodo setupNextOrderAndSearch")},e.prototype.reviewReportBindings=function(){var e=this;if(this.est.View instanceof D){this.est.View.orders&&this.est.View.orders.length>0&&this.est.View.orders.forEach((function(t){e.est.ReportValues.columns.filter((function(e){return e.id==t.column}))[0].order=t.order})),-2!=this.est.ReportValues.count?this.est.previousCount=this.est.ReportValues.count:-2==this.est.ReportValues.count&&(this.est.ReportValues.count=this.est.previousCount);var t=this.est.View.itemsperpageoverride||15;this.est.View.pages=Math.ceil(this.est.ReportValues.count/t),this.est.arrayPulsanti=this.utilities.getPagesArray(6,this.est.View.page,this.est.View.pages)}else console.error("View diversa da reportdefinition entrata nel metodo reviewReportBindings")},e}(),Q=function(e,t,i){this.column=e,this.count=t,this.value=i,this.aggregations=[]},Z=function(e,t,i){this.column=e,this.aggregation=t,this.value=i},Y=function(e,t,i){this.column=e,this.aggregation=t,this.datatype=i},ee=function(e,t,i,n,r){this._grouplevel=e,this._thisRoute=t,this._parent=i,this.view=n,this.searches=r,this._sep=!0,this.buttons=[],this._thisKey=i+"_sep"},te=function(e,t){this.column=e,this.value=t},ie=function(){function e(e,t,i){this.est=e,this.utilities=t,this.dateExts=i,this.rgGroupCache=new Map,this.rgItemCache=new Map,this.rgChildGroupsCache=new Map}return e.prototype.handleNewDataOnRowGrouping=function(e,t){var i,n,r,s,o,a,l,h=this;if(0==((null===(a=e.requestedgroups)||void 0===a?void 0:a.length)||0)){this.est.boundSource=this.est.TMPBoundSource,this.rgGroupCache=new Map,this.rgItemCache=new Map,this.rgChildGroupsCache=new Map,this.est.TMPBoundSource.forEach((function(e){e._thisRoute=e._group?[{column:e.column,value:e.value}]:[],e._thisKey=e._group?e.value:null,e._grouplevel=0,h.rgGroupCache.set(e._thisKey,e)}));var c=this.est.TMPBoundSource[0];this.est.MainGroupView=Object.assign({},e),this.est.groupSearchRequestsCache=[{path:"",route:[{column:c.column,value:c.value}],view:this.est.MainGroupView,group_column:this.est.TMPBoundSource[0].column}],this.est.BaseItemsCount=e.objectcount}else{for(var p,u,d=e.requestedgroups.length!=t,g=this.est.boundSource,m=0,f="",v=[],y=0;y<e.requestedgroups.length;y++){var w=e.requestedgroups[y];f+=w.value,v.push({column:w.column,value:w.value});for(var C=m;C<g.length;C++){var b=g[C];if(C>=m&&b._group&&b.column==w.column&&b.value==w.value){m=C,b._expanded=!0;break}}}if(d){try{for(var x=P(this.rgChildGroupsCache.keys()),S=x.next();!S.done;S=x.next()){(M=S.value).startsWith(f)&&this.rgChildGroupsCache.delete(M)}}catch(e){i={error:e}}finally{try{S&&!S.done&&(n=x.return)&&n.call(x)}finally{if(i)throw i.error}}try{for(var I=P(this.rgItemCache.keys()),_=I.next();!_.done;_=I.next()){var M;(M=_.value).startsWith(f)&&this.rgItemCache.delete(M)}}catch(e){r={error:e}}finally{try{_&&!_.done&&(s=I.return)&&s.call(I)}finally{if(r)throw r.error}}this.rgChildGroupsCache.set(f,[]),u=this.rgChildGroupsCache.get(f)}else this.rgItemCache.set(f,[]),p=this.rgItemCache.get(f);this.est.TMPBoundSource.forEach((function(t){t._parent=f,t._parentRoute=v,t._thisRoute=t._group?O(v,[new te(t.column,t.value)]):[],t._thisKey=t._group?f+t.value:f,d?(t._grouplevel=e.requestedgroups.length,h.rgGroupCache.set(t._thisKey,t),u.push(t)):p.push(t)})),d&&e.savedstate?(this.est.boundSource=this.est.boundSource.filter((function(e){return!(e._item||e._thisRoute.length>v.length)})),this.est.groupSearchRequestsCache=this.est.groupSearchRequestsCache.filter((function(e){return!(e.route.length>v.length)}))):d&&(this.est.boundSource=this.est.boundSource.filter((function(e){return!(e._item||e._thisKey.startsWith(f)&&e._thisKey!=f)}))),this.est.boundSource=this.est.boundSource.filter((function(e){return!(e._parent==f)}));var T=this.est.boundSource[m];d&&(T._groupscount=null===(l=this.est.View)||void 0===l?void 0:l.groupcount),(o=this.est.boundSource).splice.apply(o,O([m+1,0],this.est.TMPBoundSource));this.est.boundSource.splice(m+1+0,0,this.getGroupSeparator(e,f,v,e.requestedgroups.length,d?"groups":"items"));var V={path:f,route:v,view:Object.assign({},e),group_column:d?this.est.TMPBoundSource[0].column:""},H=this.est.groupSearchRequestsCache.findIndex((function(e){return e.path==V.path&&e.group_column==V.group_column}));-1==H?this.est.groupSearchRequestsCache.push(V):this.est.groupSearchRequestsCache.splice(H,1,V)}},e.prototype.arrayModeReviewGroupings=function(e){if(0!=e.length){for(var t=[],i=[],n=0;n<e.length;n++){var r=e[n];r.thGroup?t.push(new Q(r.th,0,"")):r.thAggregation&&(i=O(i,this.getGroupAggregations(r)))}t.length>0&&(this.rgGroupCache.clear(),this.rgItemCache.clear(),this.rgChildGroupsCache.clear(),this.est.ArrayGrouping=!0,this.est.boundSource=this.getGroupsRecursive(t,0,this.est.boundSource,i,null))}},e.prototype.getGroupAggregations=function(e){var t=[];return e.thAggregation?this.getEsThDirectiveListOfAggregations(e).forEach((function(i){var n=i.format&&["small","long","verylong"].includes(i.format),r=i.format&&i.format.startsWith("F")&&!Number.isNaN(i.format.charAt(1))&&2==i.format.length;if(!n&&!r&&i.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 Y(e.th,i.func,n?"date":r?"number":"string"))})):e.thGroup&&t.push(new Y(e.th,null)),t},e.prototype.getEsThDirectiveListOfAggregations=function(e){if(!e.thAggregation)return[];if(e._thAggregations)return e._thAggregations;var t=[],i=e.thAggregation.match(/{[a-zA-Z0-9\/:]*}/gi);return i?(i.forEach((function(e){var i=e.split(":"),n=e,r="";i.length>0&&(n=i[0].substr(1),r=i[1].substr(0,i[1].length-1)),t.push({func:n,format:r,match:e})})),e._thAggregations=t,t):[]},e.prototype.getGroupsRecursive=function(e,t,i,n,r){0==t&&i.forEach((function(e){return e._visible=!1}));var s=e[t],o=[],a=e.length==t+1,l=this.utilities.groupBy(i,s.column),h=function(i){var h=l[i],p=new Q(s.column,h.length,i);p.aggregations=c.generateAggregations(h,n);var u=p;if(u._group=!0,u._expanded=!1,r?(u._parent=r._thisKey,u._parentRoute=r._thisRoute,u._thisRoute=O(r._thisRoute,[{column:p.column,value:p.value}]),u._thisKey=r._thisKey+p.value,u._grouplevel=r._grouplevel+1):(u._thisRoute=[{column:p.column,value:p.value}],u._thisKey=p.value,u._grouplevel=0),0==t&&(u._visible=!0),c.utilities.calculateHash([u]),c.utilities.cacheAggregations(u),o.push(u),c.rgGroupCache.set(u._thisKey,u),a)h.forEach((function(e){return e._thisKey=u._thisKey})),o.push.apply(o,O(h)),c.rgItemCache.set(u._thisKey,h);else{var d=c.getGroupsRecursive(e,t+1,h,n,u),g=d.filter((function(e){return e._group&&e._parent==u._thisKey}));u._groupscount=g.length,o.push.apply(o,O(d)),c.rgChildGroupsCache.set(u._thisKey,g)}},c=this;for(var p in l)h(p);return o},e.prototype.generateAggregations=function(e,t){for(var i=[],n="",r=null,s=null,o=null,a=null,l=0;l<t.length;l++){var h=t[l];if(r=h.column){switch(h.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(h.aggregation){case"max":switch(h.datatype){case"string":n=s.sort().reverse()[0];break;case"date":n=new Date(Math.max.apply(Math,O(o))).toString();break;case"number":n=Math.max.apply(Math,O(a)).toString()}break;case"min":switch(h.datatype){case"string":n=s.sort()[0];break;case"date":n=new Date(Math.min.apply(Math,O(o))).toString();break;case"number":n=Math.min.apply(Math,O(a)).toString()}break;case"sum":switch(h.datatype){case"string":n=s.join(", ");break;case"date":n="";break;case"number":n=a.reduce((function(e,t){return e+t}),0).toString()}}i.push(new Z(h.column,h.aggregation,n))}}return i},e.prototype.getGroupSeparator=function(e,t,i,n,r){var s=new ee(n,i,t,Object.assign({},e),r);return s.buttons=this.utilities.getPagesArray(6,e.page,e.pages),this.utilities.calculateHash([s]),s},e.prototype.emitRowGroupingSearches=function(e,t){var i=this,n=this.est.groupSearchRequestsCache.filter((function(t){return t.group_column==e})).map((function(e){return e.view}));n&&0!=n.length||(n=this.est.groupSearchRequestsCache.filter((function(e){return!e.group_column})).map((function(e){return e.view}))),n&&0!=n.length&&n.forEach((function(e){e.orders=t,e.savedstate=!0,i.est.emitSearchRequest(!1,e)}))},e.prototype.getGroupCellDisplay=function(e,t,i){var n=this;if(e._sep)return"";var r=i.thAggregation;if(e.column==t){var s=e._groupscount?" - "+e._groupscount+" "+this.est.lc.loc("Groups"):"";return e.value+" ("+e.count+s+")"}var o=e._aggregationsCache.get(t);return o?(this.getEsThDirectiveListOfAggregations(i).forEach((function(e){r=r.replace(e.match,n.formatAggregationValue(o.get(e.func),e.format))})),r):""},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 i=null;try{i=this.dateExts.getDateConvertion(e)}catch(e){}return i?this.dateExts.getFormatted(i,"small"==t,"verylong"==t):e},e}(),ne=function(e,t,i){this.cache=e,this.index_cache=t,this.array=i},re=function(){function e(e,t){this.est=e,this.rgHandler=t,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}return 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.evaluateSelection=function(e,t){t&&this.handleSelectionEvaluation(e,t)},e.prototype.handleSelectionEvaluation=function(e,t){for(var i=0;i<e.length;i++){var n=e[i],r=n._hash,s=n._group?null:this.getItemGroup(n);this.rehidrateCache(n),n._item?t.all?n._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)):n._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)):n._group&&(t.all?n._selected=!this.group_exclusionsCache.has(r)&&"excluded"!=this.parentTreeStatus(n):n._selected=this.groupsCache.has(r)||"included"==this.parentTreeStatus(n)&&!this.group_exclusionsCache.has(r))}if(this.est.globalCheck=this.est.boundSource.length>0&&this.est.boundSource.filter((function(e){return e._group||e._item})).every((function(e){return e._selected})),this.est.canSelectAll=t.count>0&&this.est.SelectAll,this.est.arrayMode){var o=this.est.selectedObjects;this.finalizeSelectionInformations(t),this.est.selectedObjects!=o&&this.est.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.rgHandler.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.handleItemsSelection=function(e,t,i){var n,r,s;void 0===t&&(t=null),void 0===i&&(i=null);var o=(null===(n=this.est.View)||void 0===n?void 0:n.selection)||this.est.arraymodeSelection;if(this.est.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.est.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],h=null!=t?l._selected!=t:null!=i&&l._selected!=this.est.globalCheck;if(h&&!l.locked&&(l._selected=null!=t?t:this.est.globalCheck),h||null==i){var c=o.all,p=l._group,u=l._selected,d=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==(d=this.getItemGroup(l))?null:d._selected,b=null==d?null:!d._selected;this.est.ArrayGrouping?this.performSimpleSelectionOperations(o,l,p,u,d,m,f,g,v):this.performSelectionOperations(o,l,c,p,u,m,y,f,w,g,v,C,b)}}return null==i&&(this.est.globalCheck=!this.est.boundSource.some((function(e){return!e._selected&&!e._sep}))),this.finalizeSelectionInformations(o),o},e.prototype.performSimpleSelectionOperations=function(e,t,i,n,r,s,o,a,l){var h=this,c=this.getTriptic("item",e);i?n?(l.forEach((function(e){e._selected=!0})),o&&o.forEach((function(e){e._selected=!0,h.addItem(e,c)}))):(l.forEach((function(e){e._selected=!1})),s&&s.forEach((function(e){e._selected=!1,h.removeItem(e,c)}))):n?(this.addItem(t,c),r&&a&&a.every((function(e){return e._selected}))&&this.selectGroup(r)):(this.removeItem(t,c),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,i,n,r,s,o,a,l,h,c,p,u){var d=this,g=this.getTriptic("group",e),m=this.getTriptic("item",e),f=this.getTriptic("exclusion",e),v=this.getTriptic("group_exclusion",e);n?r?(i||p?this.removeItem(t,v):this.addItem(t,g),s&&s.forEach((function(e){return d.removeItem(e,m)})),o&&o.forEach((function(e){return d.removeItem(e,g)})),h&&h.forEach((function(e){e._selected=!0,d.removeItem(e,f)})),c&&c.forEach((function(e){e._selected=!0,d.removeItem(e,v)}))):(i||p?this.addItem(t,v):this.removeItem(t,g),a&&a.forEach((function(e){return d.removeItem(e,f)})),l&&l.forEach((function(e){return d.removeItem(e,f)})),h&&h.forEach((function(e){e._selected=!1,d.removeItem(e,m)})),c&&c.forEach((function(e){e._selected=!1,d.removeItem(e,g)}))):r?null==u&&i||p?this.removeItem(t,f):this.addItem(t,m):u||!i&&null==u?this.removeItem(t,m):this.addItem(t,f)},e.prototype.removeItem=function(e,t){var i=t.index_cache.get(e._hash);return null!=i&&(t.cache.delete(e._hash),t.index_cache.delete(e._hash),t.array[i]=null),!!i},e.prototype.addItem=function(e,t){if(null==t.index_cache.get(e._hash)){var i=t.array.push(e)-1;return t.cache.set(e._hash,e),t.index_cache.set(e._hash,i),!0}return!1},e.prototype.getTriptic=function(e,t){switch(e){case"group":return new ne(this.groupsCache,this.i_groupsCache,t.groups);case"item":return new ne(this.itemsCache,this.i_itemsCache,t.items);case"group_exclusion":return new ne(this.group_exclusionsCache,this.i_group_exclusionsCache,t.group_exclusions);case"exclusion":return new ne(this.exclusionsCache,this.i_exclusionsCache,t.exclusions)}},e.prototype.getItemGroup=function(e){var t=this.rgHandler.rgGroupCache.get(e._thisKey);return t||null},e.prototype.getGroupItems=function(e,t,i,n,r){var s,o;void 0===n&&(n=!1),void 0===r&&(r=null);var a=[];if(r)a=r;else if(n)try{for(var l=P(this.rgHandler.rgItemCache.keys()),h=l.next();!h.done;h=l.next()){var c=h.value;c.startsWith(t._thisKey)&&a.push.apply(a,O(this.rgHandler.rgItemCache.get(c)))}}catch(e){s={error:e}}finally{try{h&&!h.done&&(o=l.return)&&o.call(l)}finally{if(s)throw s.error}}else a=this.rgHandler.rgItemCache.get(t._thisKey);return 0!=(a=a.filter((function(e){return!i||e._selected&&"selected"==i||!e._selected&&"unselected"==i}))).length||!e||this.est.arrayMode||("unselected"==i?a=e.exclusions.filter((function(e){return null!=e&&!n&&e._thisKey==t._thisKey||n&&e._thisKey.startsWith(t._thisKey)})):"selected"==i&&(a=e.items.filter((function(e){return null!=e&&!n&&e._thisKey==t._thisKey||n&&e._thisKey.startsWith(t._thisKey)})))),a},e.prototype.getGroupParent=function(e){var t=this.rgHandler.rgGroupCache.get(e._parent);return t||null},e.prototype.getGroupChildGroups=function(e,t,i,n,r){var s,o;void 0===n&&(n=!1),void 0===r&&(r=null);var a=this.rgHandler.rgGroupCache.get(t._thisKey),l=[];if(r)l=r;else if(n)try{for(var h=P(this.rgHandler.rgChildGroupsCache.keys()),c=h.next();!c.done;c=h.next()){var p=c.value;p.startsWith(t._thisKey)&&l.push.apply(l,O(this.rgHandler.rgChildGroupsCache.get(p)))}}catch(e){s={error:e}}finally{try{c&&!c.done&&(o=h.return)&&o.call(h)}finally{if(s)throw s.error}}else l=this.rgHandler.rgChildGroupsCache.get(t._thisKey);return 0==(l=l.filter((function(e){return!i||e._selected&&"selected"==i||!e._selected&&"unselected"==i}))).length&&e?l="unselected"==i?e.group_exclusions.filter((function(e){return null!=e&&(!n&&e._thisRoute.length==a._thisRoute.length+1&&e._thisRoute.startsWith(t._thisKey)||n&&e._thisKey.startsWith(t._thisKey))})):e.groups.filter((function(e){return null!=e&&(!n&&e._thisRoute.length==a._thisRoute.length+1&&e._thisRoute.startsWith(t._thisKey)||n&&e._thisKey.startsWith(t._thisKey))})):l},e.prototype.finalizeSelectionInformations=function(e){for(var t=[],i=[],n=[],r=[],s=!1,o=!1,a=!1,l=!1,h=0;h<e.items.length;h++)null!=e.items[h]?i.push(e.items[h]):o=!0;for(h=0;h<e.exclusions.length;h++)null!=e.exclusions[h]?n.push(e.exclusions[h]):a=!0;if(e.groups)for(h=0;h<e.groups.length;h++)null!=e.groups[h]?t.push(e.groups[h]):s=!0;if(e.group_exclusions)for(h=0;h<e.group_exclusions.length;h++)null!=e.group_exclusions[h]?r.push(e.group_exclusions[h]):l=!0;e.items=i,e.group_exclusions=r,e.exclusions=n,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.est.boundSource.forEach((function(e){return e._selected=!1})),e.all=!1,e.exclusions=[],e.items=[],e.groups=[],e.group_exclusions=[],this.clearSelectionCaches()),this.est.canSelectAll=e.count>0&&this.est.SelectAll},e.prototype.compactIndexMap=function(e){var t,i,n=0,r=new Map;try{for(var s=P(e.keys()),o=s.next();!o.done;o=s.next()){var a=o.value;r.set(a,n++)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(t)throw t.error}}return r},e.prototype.evaluateSelected=function(){var e,t=(null===(e=this.est.View)||void 0===e?void 0:e.selection)||this.est.arraymodeSelection,i=t.group_exclusions.reduce((function(e,t){return e+t.count}),0),n=t.groups.reduce((function(e,t){return e+t.count}),0);return this.est.selectedObjects=(t.all?this.est.BaseItemsCount:n)-i+t.items.length-t.exclusions.length,this.est.selectedObjects},e.prototype.selectAllOrResetSelection=function(){var e=this.est.View.selection||this.est.arraymodeSelection;this.clearSelectionCaches(),e.all=!e.all,e.exclusions=[],e.groups=[],e.group_exclusions=[],e.items=[],e.all||(this.est.canSelectAll=!1,this.est.globalCheck=!1),this.finalizeSelectionInformations(e),this.est.onSelectionChanged.emit(e),this.evaluateSelection(this.est.boundSource,e)},e}(),se=function(){function e(e){this.hashExts=e}return e.prototype.groupBy=function(e,t){for(var i={},n=0;n<e.length;n++){var r=e[n];(i[r[t]]=i[r[t]]||[]).push(r)}return i},e.prototype.cacheAggregations=function(e){e._aggregationsCache=new Map;for(var t=e._aggregationsCache,i=0;i<e.aggregations.length;i++){var n=e.aggregations[i];if(t.has(n.column))t.get(n.column).set(n.aggregation,n.value);else{var r=new Map;r.set(n.aggregation,n.value),t.set(n.column,r)}}},e.prototype.arrayMove=function(e,t,i){if(i>e.length-1||t>e.length-1||i<0||t<0)throw"Gli indici passati non fanno riferimento a una posizione dell'array. Length: "+e.length+" Old:"+t+" New: "+i;e.splice(i,0,e.splice(t,1)[0])},e.prototype.getPagesArray=function(e,t,i,n,r){void 0===n&&(n=null),void 0===r&&(r=null);var s,o,a=[];if(-1==i&&(null==n&&null==r||n==r)&&(i=t+1),-1==i&&0==n&&(i=t),i<=e)s=1,o=i-1;else{var l=(e-2)/2;o=t+l,(s=t-l)<1?(s=1,o=e-1):o>=i&&(s=i-e+1,o=i-1)}if(a.push({val:1,cssClass:1===t?"btn-main app-white-text":"app-white-button"}),o>=s){for(var h=s;h<=o;h++)1!==h&&a.push({val:h,cssClass:h===t?"btn-main app-white-text":"app-white-button"});a.push({val:i,cssClass:i===t?"btn-main app-white-text":"app-white-button"})}return a},e.prototype.calculateHash=function(e){if(e)for(var t={},i=0;i<e.length;i++){var n=e[i],r=Object.assign({},e[i]);delete r._selected,delete r._visible,delete r._hash;var s=this.hashExts.hashObject(r);t[s]=t[s]?t[s]+1:1,n._hash=s+(t[s]>1?"_"+t[s]:"")}},e.prototype.InputOrDefault=function(e,t,i){return null!=e&&null!=e?e:null!=t&&null!=t?t:null!=i&&null!=i?i:null},e}();se.ɵprov=w.ɵɵdefineInjectable({factory:function(){return new se(w.ɵɵinject(C.HashingService))},token:se,providedIn:"root"}),se.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],se.ctorParameters=function(){return[{type:n.HashingService}]};var oe=function(){function e(e,i,n,r,s,o,l,h,c,p,u){var d,g,m,f,v,y,w,C,b,x,S,I,P,_,O,M,T;this.ngControl=e,this.prefService=i,this.deafults=n,this.locale=r,this.lc=s,this.cdr=o,this.utilities_H=l,this.utiExts=h,this.expExts=c,this.dateExts=p,this.msgExts=u,this.FocusSubject=new a.Subject,this.doubleClickBufferMs=200,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.ColumnsPinnable=null,this.AutoUpdate=null,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.CountLabel=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.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.UserEdits=!1,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.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.ArrayGrouping=!1,this.DirectivesBased=!1,this.PagerOptions={PagerCount:null,ShowCount:!0,ShowPaging:!0,ShowButtons:!0,ShowPagingOptions:!0,UsesView:!0,View:null,Ready:!1,Searches:"items"},this.propagateChange=function(e){},this.bodyTrackBy=function(e,t){return t._hash},this.export_H=new U(this,this.expExts,this.msgExts,this.utiExts,this.dateExts),this.rowGrouping_H=new ie(this,this.utilities_H,this.dateExts),this.columnMetadata_H=new W(this,this.utilities_H,this.utiExts,this.prefService,this.rowGrouping_H),this.dynamicMode_H=new q(this),this.hierarchyMode_H=new K(this),this.items_H=new $(this,this.utilities_H),this.reportMode_H=new J(this,this.utilities_H),this.selection_H=new re(this,this.rowGrouping_H),e&&(e.valueAccessor=this),this.ColumnsResizable=this.utilities_H.InputOrDefault(this.ColumnsResizable,null===(d=this.deafults)||void 0===d?void 0:d.ColumnsResizable),this.AutoUpdate=this.utilities_H.InputOrDefault(this.AutoUpdate,null===(g=this.deafults)||void 0===g?void 0:g.AutoUpdate),this.AllSearch=this.utilities_H.InputOrDefault(this.AllSearch,null===(m=this.deafults)||void 0===m?void 0:m.AllSearch,!0),this.Export=this.utilities_H.InputOrDefault(this.Export,null===(f=this.deafults)||void 0===f?void 0:f.Export),this.HidePaging=this.utilities_H.InputOrDefault(this.HidePaging,null===(v=this.deafults)||void 0===v?void 0:v.HidePaging,!1),this.HidePagingCount=this.utilities_H.InputOrDefault(this.HidePagingCount,null===(y=this.deafults)||void 0===y?void 0:y.HidePagingCount),this.HidePagingButtons=this.utilities_H.InputOrDefault(this.HidePagingButtons,null===(w=this.deafults)||void 0===w?void 0:w.HidePagingButtons),this.ContainerClass=this.utilities_H.InputOrDefault(this.ContainerClass,null===(C=this.deafults)||void 0===C?void 0:C.ContainerClass,""),this.TableClass=this.utilities_H.InputOrDefault(this.TableClass,null===(b=this.deafults)||void 0===b?void 0:b.TableClass,"table table-striped table-hover table-sm"),this.Selection=this.utilities_H.InputOrDefault(this.Selection,null===(x=this.deafults)||void 0===x?void 0:x.Selection),this.SavePreferences=this.utilities_H.InputOrDefault(this.SavePreferences,null===(S=this.deafults)||void 0===S?void 0:S.SavePreferences),this.PagingStyle=this.utilities_H.InputOrDefault(this.PagingStyle,null===(I=this.deafults)||void 0===I?void 0:I.PagingStyle,"bottom"),this.RowGroupingPagingStyle=this.utilities_H.InputOrDefault(this.RowGroupingPagingStyle,null===(P=this.deafults)||void 0===P?void 0:P.RowGroupingPagingStyle,"left"),this.UseSelectionCache=this.utilities_H.InputOrDefault(this.UseSelectionCache,null===(_=this.deafults)||void 0===_?void 0:_.UseSelectionCache,!0),this.ShowItemGroupsColumns=this.utilities_H.InputOrDefault(this.ShowItemGroupsColumns,null===(O=this.deafults)||void 0===O?void 0:O.ShowItemGroupsColumns,!1),this.ArraymodeItemsPerPage=this.utilities_H.InputOrDefault(this.ArraymodeItemsPerPage,null===(M=this.deafults)||void 0===M?void 0:M.ArraymodeItemsPerPage,15),this.ColumnsPinnable=this.utilities_H.InputOrDefault(this.ColumnsPinnable,null===(T=this.deafults)||void 0===T?void 0:T.ColumnsPinnable,!0)}return e.prototype.ngOnInit=function(){var e=this;this.ctxMenuSubscription=(this.ContextMenu||this.tableEmptyMenu).open.subscribe((function(t){if(!t.item._sep){var i=!t.item._selected;t.item._selected=!0;var n=e.selection_H.handleItemsSelection([t.item]);e.changed(),i&&e.onSelectionChanged.emit(n)}}))},e.prototype.ngAfterViewInit=function(){if(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),this.DirectivesBased=!0),this.Hierarchy&&!this.UseCustomCells)throw'Es-table error: Per poter utilizzare l\'es-table con [Hierarchy]="true" è richiesto anche [UseCustomCells]="true"'},e.prototype.ngOnDestroy=function(){this.ctxMenuSubscription&&this.ctxMenuSubscription.unsubscribe()},e.prototype.ngOnChanges=function(e){return S(this,void 0,void 0,(function(){return I(this,(function(t){return e.SearchView&&this.SearchView&&(this.arrayPulsanti=this.utilities_H.getPagesArray(6,this.SearchView.page,this.SearchView.pages||1,this.SearchView.items.length,this.SearchView.itemsperpageoverride)),[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;return S(this,void 0,void 0,(function(){var i,n;return I(this,(function(r){switch(r.label){case 0:return this.View=e||null,this.researchInProgress=!1,this.View||this.SearchView?(!this.View||void 0===this.View.result||this.View instanceof D?!this.View||void 0===this.View.itemsperpageoverride||this.View instanceof E?!this.SearchView||void 0===this.SearchView.itemsperpageoverride||this.SearchView instanceof E||(this.SearchView.__proto__=new E):this.View.__proto__=new E:this.View.__proto__=new D,this.View&&this.View instanceof D?(this.setMode("report"),this.ReportValues=this.View.result,this.ReportValues&&this.reportMode_H.reviewReportBindings(),[3,11]):[3,1]):(this.boundSource=this.TMPBoundSource||[],this.cdr.markForCheck(),[2]);case 1:return this.View&&this.View instanceof E?(this.setMode("view"),i=0==((null===(t=this.View.requestedgroups)||void 0===t?void 0:t.length)||0),this.View.selection&&(this.View.internalsearchrequest||!i)&&this.UseSelectionCache||(this.selection_H.clearSelectionCaches(),this.View.selection=new k([]),this.onSelectionChanged.emit(this.View.selection)),this.View.internalsearchrequest=!1,this.SavePreferences?this.ngControl.name?[3,2]:(console.error("Non posso utilizzare le preference senza avere un 'name' per questa tabella"),[3,5]):[3,5]):[3,6];case 2:return this.prefService?[3,3]:(console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato"),[3,5]);case 3:return[4,this.prefService.getItem(this.ngControl.name).toPromise()];case 4:n=r.sent(),this.View&&(this.View.columns=(null==n?void 0:n.columns)||[],this.View.column_ordering=(null==n?void 0:n.column_ordering)||[]),r.label=5;case 5:return i&&(this.arrayPulsanti=this.utilities_H.getPagesArray(6,this.View.page,this.View.pages||1,this.View.items.length,this.View.itemsperpageoverride)),[3,11];case 6:return this.View&&null!=this.View.length&&null!=this.View.length?(this.setMode("array"),this.UseSelectionCache&&this.arraymodeSelection||(this.selection_H.clearSelectionCaches(),this.arraymodeSelection=new k([]),this.onSelectionChanged.emit(this.arraymodeSelection)),this.SavePreferences?this.ngControl.name?[3,7]:(console.error("Non posso utilizzare le preference senza avere un 'name' per questa tabella"),[3,10]):[3,10]):[3,11];case 7:return this.prefService?[3,8]:(console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato"),[3,10]);case 8:return[4,this.prefService.getItem(this.ngControl.name).toPromise()];case 9:n=r.sent(),this.arrayColumns=(null==n?void 0:n.columns)||[],this.arrayColumnOrdering=(null==n?void 0:n.column_ordering)||[],r.label=10;case 10:this.SearchView&&(this.arrayPulsanti=this.utilities_H.getPagesArray(6,this.SearchView.page,this.SearchView.pages||1,this.SearchView.items.length,this.SearchView.itemsperpageoverride)),r.label=11;case 11:return!this.View||this.View instanceof D||this.finalizeContext(),this.postBoundSourceCalculation(),[2]}}))}))},e.prototype.finalizeContext=function(){var e=this.View,t=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&&t&&(this.UseArrayModePaging=!1),this.TMPBoundSource=this.items_H.getItemsByMode(!1,!this.internalWriteCall),this.Hierarchy&&!t&&this.hierarchyMode_H.assignHierarchyLevels(this.TMPBoundSource),this.utilities_H.calculateHash(this.TMPBoundSource),this.TMPBoundSource&&this.RowClassAssigner||this.Hierarchy)for(var i=0;i<this.TMPBoundSource.length;i++){var n=this.TMPBoundSource[i];n._rowClass=this.RowClassAssigner?this.RowClassAssigner(n):"",n._rowClass+=this.Hierarchy?" est-row-lvl-"+n._level:""}},e.prototype.setupPagingInformations=function(){var e;if(this.PagerOptions.ShowCount=!this.HidePagingCount,this.PagerOptions.ShowButtons=!this.HidePagingButtons,this.PagerOptions.ShowPaging=!this.HidePaging,this.PagerOptions.UsesView=!0,this.arrayMode&&this.UseArrayModePaging&&!this.SearchView)this.PagerOptions.PagerCount=this.View.length||0,this.PagerOptions.ShowButtons=this.PagerOptions.ShowButtons&&this.View.length>10,this.PagerOptions.View=this.View,this.PagerOptions.UsesView=!1,this.PagerOptions.ShowPagingOptions=this.PagerOptions.ShowButtons;else if(!this.arrayMode||this.UseArrayModePaging&&!this.SearchView){if(this.viewMode){var t=this.MainGroupView||this.View,i=(null==t?void 0:t.groupcount)||(null==t?void 0:t.objectcount);this.PagerOptions.Searches=null!=(null==t?void 0:t.groupcount)&&null!=(null==t?void 0:t.groupcount)?"groups":"items",this.PagerOptions.PagerCount=i||0,this.PagerOptions.View=t,this.PagerOptions.ShowCount=this.PagerOptions.ShowCount||t&&i&&-1!=i}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&&-1!=this.View.result.count,this.PagerOptions.ShowButtons=this.PagerOptions.ShowButtons&&(this.View.pagingavailable||this.PagerOptions.ShowCount),this.PagerOptions.ShowPagingOptions=this.PagerOptions.ShowButtons}}else this.SearchView?(this.PagerOptions.View=this.SearchView,this.PagerOptions.PagerCount=this.SearchView.objectcount||0):this.PagerOptions.PagerCount=this.View.length||0,this.PagerOptions.ShowButtons=this.PagerOptions.ShowButtons&&(this.View.length>10||((null===(e=this.SearchView)||void 0===e?void 0:e.objectcount)||0)>10),this.PagerOptions.ShowCount=this.PagerOptions.ShowCount||this.View&&this.View.length||this.SearchView&&this.SearchView.objectcount&&-1!=this.SearchView.objectcount,this.PagerOptions.ShowPaging=this.PagerOptions.ShowButtons||this.PagerOptions.ShowCount,this.PagerOptions.ShowPagingOptions=this.PagerOptions.ShowButtons},e.prototype.postBoundSourceCalculation=function(){this.RowContexts=[],this.OrderDirectives=[],this.lastSelectedItemID=null,this.internalPostBoundSource()},e.prototype.internalPostBoundSource=function(){var e=this.View,t=this.EsThsDirective&&this.EsThsDirective.length>0?this.EsThsDirective.toArray():[],i=this.EsTdsDirective&&this.EsTdsDirective.length>0?this.EsTdsDirective.toArray():[];if(this.dynamicMode_H.eventuallyReviewDynamicColumns(),this.bindDisplayToLoadedItemsOrGroups(e),this.setupPagingInformations(),(this.viewMode||this.arrayMode)&&this.UseCustomCells){var n=this.viewMode?e:null,r=this.viewMode?O(n.items||[],n.groups||[]):e,s=this.viewMode?n.selection:this.arraymodeSelection,o=this.columnMetadata_H.expandMultiThsAndTds(t,i,r);t=o.expThs,i=o.expTds;var a=this.columnMetadata_H.evaluateHeadersGroupingInfos(t);this.arrayMode&&(this.items_H.arrayModeReviewOrderings(),this.rowGrouping_H.arrayModeReviewGroupings(a.leafs)),this.columnMetadata_H.reviewColumnsList(a.leafs),this.columnMetadata_H.alignColumnsIfLoadedView(n),this.columnMetadata_H.moveFixedColumnsAtTheBeginning(a.leafs,i),this.columnMetadata_H.alignHeadersOrdering(a.leafs,n),this.columnMetadata_H.refreshColumnsVisibility(a.leafs,i,n),this.columnMetadata_H.evaluatePinnedColumnsWidth(),this.columnMetadata_H.generateDefaultOrder(a.leafs,n),this.columnMetadata_H.evaluateHeaderGroups(a),this.evaluateRowThs(a.leafs),this.evaluateRowTds(a.leafs,i),this.columnMetadata_H.applyOrdering(n,!0),this.MoveTemporaryVariablesToRealOnes(),this.selection_H.evaluateSelection(r,s),this.ResearchNeeded&&(this.changed(),this.emitSearchRequest(!1),this.ResearchNeeded=!1)}else if((this.viewMode||this.arrayMode)&&!this.UseCustomCells){var l=this.viewMode?e.items:e;s=this.viewMode?e.selection:this.arraymodeSelection;this.selection_H.evaluateSelection(l,s)}this.cdr.markForCheck(),this.FirstBind=!1},e.prototype.bindDisplayToLoadedItemsOrGroups=function(e){var t,i;if(!this.TMPBoundSource||0==this.TMPBoundSource.length)return this.BaseItemsCount=0,void(this.boundSource=[]);if(this.arrayMode||!this.UseCustomCells)return this.boundSource=this.TMPBoundSource,void(this.BaseItemsCount=(null==e?void 0:e.objectcount)||(null==e?void 0:e.length)||0);var n=(null===(i=null===(t=null==e?void 0:e.groupings)||void 0===t?void 0:t.filter((function(e){return!e.aggregation})))||void 0===i?void 0:i.length)||0;if(0==n)return this.boundSource=this.TMPBoundSource,void(this.BaseItemsCount=(null==e?void 0:e.objectcount)||0);this.rowGrouping_H.handleNewDataOnRowGrouping(e,n)},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.selection_H.handleItemsSelection(e,t),this.cdr.markForCheck()},e.prototype.thOrderChanged=function(e,t){this.viewMode||this.arrayMode?this.OrderByColumn&&this.columnMetadata_H.handleTHOrderChange(e,t):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.evaluateRowTds=function(e,t){if(0!=t.length){for(var i={},n={},r=0;r<this.ColumnsList.length;r++){var s=this.ColumnsList[r];n[s.id]=s}for(var o=0;o<e.length;o++){i[(v=e[o]).th]=v}this.TMPRowTDs={};var a={};for(o=0;o<t.length;o++)for(var l=t[o],h=0;h<this.boundSource.length;h++){var c=this.boundSource[h],p=c._hash,u=l.td;if(!(v=i[l.td]))throw"ID dell'oggeto EsTd non compatibile con gli ID dicharati negli EsTh: "+l.td;if(v._referenced=!0,l.tdIf||v.thGroup){var d=v,g=v.thFixed||v.thGroup||v.thPinned,m=c._item?{LeftBorder:d._lbord,RightBorder:d._rbord,ID:u,Pinned:n[l.td].pinned,PinnedWidth:d.thPinnedWidth,GroupHeader:!1,GroupAggregation:!1,Visible:n[l.td].visible,Wraps:!1,Class:l.tdClass,Template:d.thGroup&&!this.ShowItemGroupsColumns?null:l.Template,Multi:l._multi,MultiProp:l._multi?l.td.split("_")[0]:null,MultiIndex:l._multi?l.td.split("_")[1]:null,UserEdits:v.thUserEdits}:{LeftBorder:d._lbord,RightBorder:d._rbord,ID:u,Pinned:n[l.td].pinned,PinnedWidth:d.thPinnedWidth,GroupHeader:d.thGroup,GroupAggregation:!!d.thAggregation,Visible:n[l.td].visible,Wraps:!1,Class:d.thGroupClass||"",Content:this.rowGrouping_H.getGroupCellDisplay(c,u,v)};this.TMPRowTDs[p]?this.TMPRowTDs[p].push(m):(this.RowContexts.push(p),this.TMPRowTDs[p]=[m],a[p]=g?1:0)}}if(0!=this.TMPBoundSource.length){var f=[];for(o=0;o<e.length;o++){var v;(v=e[o])._referenced||f.push(v.th)}if(f.length>0)throw"L'ID di uno o più EsTh non hanno alcun EsTd associato: "+f.join(", ")}}},e.prototype.evaluateRowThs=function(e){var t;if(0!=e.length){for(var i={},n=this.View,r=this.viewMode&&(n&&!n.groupings||0==n.groupings.length),s=0;s<this.ColumnsList.length;s++){var o=this.ColumnsList[s];i[o.id]=o}this.TMPRowTHs=[];for(s=0;s<e.length;s++){var a=e[s],l=void 0;if(a.thIf||a.thGroup){var h=(a.thClass||"")+(a.thGroup?" est-col-min":"");if(l={Pinned:i[a.th].pinned,Fixed:a.thFixed,PinnedWidth:a.thPinnedWidth,ID:a.th,Visible:a.thVisible,Class:h,Order:a.thOrder,Orderable:a.thOrderable,Template:a.Template,Content:null,Wrap:a.thWrap,LeftBorder:a._lbord,RightBorder:a._rbord,Multi:a._multi,MultiContent:a._multi_content},this.TMPRowTHs.push(l),r&&(a.thAggregation||a.thGroup)){var c=this.rowGrouping_H.getGroupAggregations(a);n.groupings?(t=n.groupings).push.apply(t,O(c)):n.groupings=c,this.ResearchNeeded=!0}}}}},e.prototype.addToPageGroup=function(e,t){this.goToPageGroup(t.view.page+e,t)},e.prototype.goToPageGroup=function(e,t){var i=t.view;0===e||e>i.pages&&i.pages>0||(i.page=e,t.buttons=this.utilities_H.getPagesArray(6,i.page,i.pages),this.emitSearchRequest(!1,i))},e.prototype.handleGroupClick=function(e){var t=this.View,i=e;if(i._expanded=!i._expanded,!this.ArrayGrouping){if(i._expanded){if(t.itemsperpageoverride=15,t.requestedgroups)i._grouplevel?(t.requestedgroups=[],i._parentRoute.forEach((function(e){t.requestedgroups.push(new G(e.column,e.value))})),t.requestedgroups.push(new G(e.column,e.value))):t.requestedgroups=[new G(e.column,e.value)];else t.requestedgroups=[new G(e.column,e.value)];this.changed(),this.emitSearchRequest(!0)}else{var n=(i._parent||"")+e.value;this.boundSource=this.boundSource.filter((function(e){return!e._parent||!e._parent.startsWith(n)})),this.groupSearchRequestsCache=this.groupSearchRequestsCache.filter((function(e){return e.path!=n}))}return!0}this.boundSource.filter((function(e){return e._group&&(i._expanded&&e._parent==i._thisKey||!i._expanded&&e._parent&&e._parent.startsWith(i._thisKey))||e._item&&(i._expanded&&e._thisKey==i._thisKey||!i._expanded&&e._thisKey.startsWith(i._thisKey))})).forEach((function(e){e._visible=i._expanded,e._group&&(e._expanded=!1)}))},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,i=this.selection_H.handleItemsSelection(t,e,this.globalCheck);this.changed(),this.onSelectionChanged.emit(i)},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 i=[];if(e.shiftKey&&this.ShiftClick&&!this.SingleSelection)for(var n=!1,r=this.boundSource.filter((function(e){return!e._group&&!e._sep})),s=0;s<r.length;s++){var o=r[s];n&&(o._selected=!0,i.push(o)),o!=t&&o!=this.lastSelected||n?o!=t&&o!=this.lastSelected||!n||(n=!1):(n=!0,o._selected=!0,i.push(o))}else t._selected=!t._selected,this.lastSelected=t,i.push(t);var a=this.selection_H.handleItemsSelection(i);return this.changed(),this.onSelectionChanged.emit(a),!0},e.prototype.addToPage=function(e){var t,i=this.MainGroupView?this.MainGroupView:this.View;this.goToPage(((null===(t=this.SearchView||i)||void 0===t?void 0:t.page)||0)+e)},e.prototype.goToPage=function(e){var t,i,n=this.MainGroupView?this.MainGroupView:this.arrayMode?this.SearchView:this.View;if(n.page&&n.pages){var r=this.SearchView||n;if(!(0===e||e>r.pages&&r.pages>0)){r.page=e;var s=this.reportMode?(null===(t=n.result)||void 0===t?void 0:t.count)||0:n.items.length||(null===(i=n.groups)||void 0===i?void 0:i.length)||0,o=(this.reportMode,n.itemsperpageoverride||15);this.arrayPulsanti=this.utilities_H.getPagesArray(6,r.page,r.pages,s,o);var a=!!this.MainGroupView;this.emitSearchRequest(!1,a?n:this.SearchView?this.SearchView:null)}}},e.prototype.onItemsPerPageChanged=function(e){this.PagerOptions.View.itemsperpageoverride=e,this.changed(),this.MainGroupView?this.emitSearchRequest(!0,this.MainGroupView):this.SearchView?(this.SearchView.page=1,this.emitSearchRequest(!0,this.SearchView)):this.emitSearchRequest(!0)},e.prototype.onGroupItemsPerPageChanged=function(e,t){e.view.itemsperpageoverride=t,this.emitSearchRequest(!0,e.view)},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.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.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.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.prototype.dbClickEditOrSingleClickRowSelection=function(e,t,i){var n=this;if(!t._editing){if(this.UserEdits)return this.cellDbClickTimer?(this.UserEdits&&t.UserEdits&&this.setupUserEdit(t),void this.clearCellClickTimer()):void(this.cellDbClickTimer=setTimeout((function(){n.clearCellClickTimer(),n.handleRowClick(e,i,n.Selection)}),this.doubleClickBufferMs));this.handleRowClick(e,i,this.Selection)}},e.prototype.clearCellClickTimer=function(){clearTimeout(this.cellDbClickTimer),this.cellDbClickTimer=null},e.prototype.handleRowClick=function(e,t,i){!i||t.locked||t._sep||t._group?t._group&&this.handleGroupClick(t):this.handleClick(e,t),this.cdr.markForCheck()},e.prototype.setupUserEdit=function(e){var t=this;this.UserEdits&&e.UserEdits&&(e._editing=!0),this.cdr.detectChanges(),setTimeout((function(){t.FocusSubject.next()}))},e.prototype.finalizeUserEdit=function(e,t){e._editing=!1},e}();oe.decorators=[{type:t.Component,args:[{selector:"es-table",viewProviders:[{provide:i.LocalizationService,useClass:B}],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}} <input [readonly]="autoUpdate" maxlength="3" class="form-control est-custom-input" type="text" [(ngModel)]="seconds" /> {{\'second/s\' | localize : lc}}\r\n </div>\r\n <div class="pull-right m-t-2">\r\n <label class="est-switch">\r\n <input type="checkbox" [(ngModel)]="autoUpdate" (ngModelChange)="autoUpdateChanged();" />\r\n <div class="est-slider round"></div>\r\n </label>\r\n </div>\r\n <div class="clearfix"></div>\r\n</div>\r\n\r\n<div *ngIf="View" class="est-relative">\r\n <div *ngIf="FirstBind && ShowLoadingOnBootstrap" class="est-loading-box">\r\n <div class="est-loading-content">\r\n <span class="fa fa-spinner fa-spin"></span> {{\'Performing Table bootstrap\' | localize: lc}}...\r\n </div>\r\n </div>\r\n\r\n <div class="est-top-pager" *ngIf="PagingStyle == \'both\' || PagingStyle == \'top\'">\r\n <ng-container *ngTemplateOutlet="pagingElement"></ng-container>\r\n </div>\r\n\r\n <div class="est-top-allselect" *ngIf="canSelectAll || (!reportMode && (View?.selection || arraymodeSelection)?.all)">\r\n <span>{{ (selectedObjects == -1 ? (\'All the\' | localize : lc) : ((selectedObjects || 0) | number : \'0.0-0\' : locale)) + \' \' + ((selectedObjects == 1 ? \'Object Selected\' : \'Objects Selected\') | localize : lc) }}</span> \r\n <span class="est-link est-inline" (click)="selection_H.selectAllOrResetSelection()">{{ (View?.selection || arraymodeSelection)?.all ? (\'Reset Selection\' | localize : lc) : (\'Select Everything\' | localize : lc)}}</span>\r\n </div>\r\n\r\n <div class="table-responsive datatable {{ContainerClass}}" [style.max-height.px]="MaxHeight">\r\n <table class="{{ TableClass }} est-margin-bottom-10 est" [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 || PagingStyle != \'bottom\'">\r\n <th class="est-no-selection" [attr.colspan]="Columns.Global" [class.est-hidden-view]="!canSelectAll && (reportMode || !(View?.selection || arraymodeSelection)?.all) && PagingStyle == \'bottom\'">\r\n <p class="est-hidden-view app-margin-bottom-0">§</p>\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;">\r\n <div class="est-pinned-border est-cell-group-padding"></div>\r\n </ng-container>\r\n <ng-container *ngIf="!cell.Pinned && cell.Content; Else: cell.Template">\r\n {{cell.Content}}\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </ng-container>\r\n\r\n <ng-container *ngIf="!RowThGroups">\r\n <tr *ngIf="HasHeaderGroup">\r\n <ng-container *ngTemplateOutlet="headerGroupRef"></ng-container>\r\n <th *ngIf="Export"></th>\r\n </tr>\r\n \r\n \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 </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 est-simple-border-bottom">\r\n <th class="est-col-min est-no-border" *ngIf="Selection" [style.width.px]="20">\r\n <input *ngIf="!SingleSelection" class="est-pointer" type="checkbox" [disabled]="SelectionDisabled" [(ngModel)]="globalCheck" [ngModelOptions]="{\'standalone\': true}" (ngModelChange)="globalCheckChanged();">\r\n </th>\r\n <ng-container *ngFor="let rowHeader of RowTHs">\r\n <th *ngIf="rowHeader && rowHeader.Visible && rowHeader.Pinned" [style.width.px]="rowHeader.PinnedWidth" es-th="{{rowHeader.ID}}" \r\n class="{{rowHeader.Class || \'\'}}" \r\n [class.est-pinned-internal-header]="true" \r\n [class.est-no-border]="true" \r\n [class.est-nowrap]="!rowHeader.Wrap" \r\n [Pinned]="true" [Fixed]="rowHeader.Fixed" [Order]="rowHeader.Order" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.Orderable" [OrderBy]="OrderByColumn" [SearchInProgress]="!!researchInProgress" (onUnpinning)="columnMetadata_H.unpinColumn($event)" (onOrderChange)="OrderByColumn && thOrderChanged(rowHeader.ID, $event)">\r\n <ng-container *ngIf="rowHeader.Template"><ng-container *ngTemplateOutlet="rowHeader.Template; context: { $implicit: rowHeader.Multi ? rowHeader.MultiContent : null } "></ng-container></ng-container>\r\n <span *ngIf="!rowHeader.Template">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </div>\r\n </th>\r\n <ng-container *ngFor="let rowHeader of RowTHs">\r\n <th *ngIf="rowHeader && rowHeader.Visible && !rowHeader.Pinned" es-th="{{rowHeader.ID}}" class="{{rowHeader.Class || \'\'}}" [class.est-ltab-border]="rowHeader.LeftBorder" [class.est-rtab-border]="rowHeader.RightBorder" [class.est-nowrap]="!rowHeader.Wrap" [Order]="rowHeader.Order" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.Orderable" [OrderBy]="OrderByColumn" [SearchInProgress]="!!researchInProgress" (onOrderChange)="OrderByColumn && thOrderChanged(rowHeader.ID, $event)">\r\n <ng-container *ngIf="rowHeader.Template"><ng-container *ngTemplateOutlet="rowHeader.Template; context: { $implicit: rowHeader.Multi ? rowHeader.MultiContent : null }"></ng-container></ng-container>\r\n <span *ngIf="!rowHeader.Template">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n \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)="reportMode_H.setupNextOrderAndSearch(clm)">\r\n {{clm.description}}<span class="fa" [class.fa-chevron-down]="clm.order == \'DESC\'" [class.fa-chevron-up]="clm.order == \'ASC\'"></span>\r\n </th>\r\n </ng-container>\r\n\r\n \x3c!--Per l\'eliminazione mi serve un header aggiuntivo--\x3e\r\n <th *ngIf="Removal" [class.est-right-9]="Export || HiddenColumns" class="est-col-min est-sticky-last-column"><span class="fa fa-trash"></span></th>\r\n\r\n \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.endsWith(\'.xlsx\') ? ExportFileName.replace(\'.xlsx\', \'.csv\') : ExportFileName.endsWith(\'.csv\') ? ExportFileName : ExportFileName + \'.csv\'"></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)="columnMetadata_H.resetColumnVisSelection(); changeColumnVisibilityModal.show();">\r\n <ng-container *ngIf="!HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Order\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && !ColumnsOrdering">\r\n {{\'Columns Visibility\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Visibility and Order\' | localize : lc}}\r\n </ng-container>\r\n </a>\r\n <a class="dropdown-item" *ngIf="Export && CSVExport" (click)="export_H.tryExport(\'CSV\')">{{\'Export View\' | localize : lc}} (CSV)</a>\r\n <a class="dropdown-item" *ngIf="Export && XLSXExport" (click)="export_H.tryExport(\'XLSX\')">{{\'Export View\' | localize : lc}} (XLSX)</a>\r\n <a class="dropdown-item" *ngFor="let option of CornerMenuOptions" (click)="cornerActionClicked(option.id)">{{option.description}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n </tr>\r\n </thead>\r\n \r\n \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</div>\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 && PagerOptions.ShowButtons && (PagerOptions.PagerCount > 10 || PagerOptions.PagerCount == -1)" class="pull-right btn-toolbar">\r\n <ng-container *ngIf="(!reportMode || View?.pagingavailable) && (!arrayMode || SearchView)">\r\n <ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { Margin: true, ATP: addToPage.bind(this), GTP: goToPage.bind(this), Array: arrayPulsanti }}"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="arrayMode && UseArrayModePaging && !SearchView">\r\n <ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { Margin: true, ATP: arrayAddToPage.bind(this), GTP: arrayGoToPage.bind(this), Array: arrayPulsanti }}"></ng-container>\r\n </ng-container>\r\n </div>\r\n \x3c!-- Paginatore dove appare la count e le opzioni di paginazione --\x3e\r\n <div class="pull-right" *ngIf="PagerOptions.ShowCount || PagerOptions.ShowPagingOptions">\r\n <div class="est-mt-min-5" *ngIf="PagerOptions.ShowPaging">\r\n <app-paging *ngIf="!PagerOptions.UsesView" [CountLabel]="CountLabel" [ShowPaging]="PagerOptions.ShowPagingOptions" [ShowCount]="PagerOptions.ShowCount" [PagerCount]="PagerOptions.PagerCount" [WarnOnAll]="false" [CurrentPageSize]="ArraymodeItemsPerPage" (pagingSelected)="items_H.refreshPaging($event)"></app-paging>\r\n <app-paging *ngIf="PagerOptions.UsesView" [CountLabel]="CountLabel" [ShowPaging]="PagerOptions.ShowPagingOptions" [ShowCount]="PagerOptions.ShowCount" [PagerCount]="PagerOptions.PagerCount" [GroupMode]="PagerOptions.Searches == \'groups\'" [AllSearch]="AllSearch" [View]="PagerOptions.View" (pagingSelected)="onItemsPerPageChanged($event);"></app-paging>\r\n </div>\r\n <div *ngIf="reportMode && !PagerOptions.ShowPaging"><em>{{\'Paging options are not available for this report\' | localize: lc}}</em></div>\r\n </div>\r\n <div class="clearfix"></div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\x3c!-- Template che contiene i pulsanti per cambiare pagina --\x3e\r\n<ng-template #pagingButtons let-options>\r\n <div class="est-flex" [class.est-margin-left-50]="options.Margin">\r\n <a class="btn" class="est-page-prev app-pointer" (click)="options.ATP(-1, options.separator)"><span class="fa fa-chevron-left"></span></a>\r\n <div *ngIf="options.Array" class="est-inline"><a *ngFor="let p of options.Array" class="btn est-page-sel {{p.cssClass}}" (click)="options.GTP(p.val, options.separator)">{{p.val}}</a></div>\r\n <a class="btn" class="est-page-next app-pointer" (click)="options.ATP(1, options.separator)"><span class="fa fa-chevron-right"></span></a>\r\n </div>\r\n</ng-template>\r\n\r\n\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; trackBy: bodyTrackBy">\r\n <tr *ngIf="item._visible || (!Hierarchy && !ArrayGrouping)" \r\n [class]="item._rowClass ? item._rowClass : \'\'" \r\n [class.est-line-through]="item.removed || item.deleted" \r\n [class.est-pointer]="!item.locked" \r\n [class.est-white-selected]="item._selected && !item.locked"\r\n [class.est-rg]="item._group"\r\n [class.est-rg-sep]="item._sep"\r\n [contextMenu]="!item.locked ? (ContextMenu || emptyMenu) : emptyMenu" [contextMenuSubject]="item"\r\n (click)="!UseCustomCells && handleRowClick($event, item, true)">\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)="!UseCustomCells && handleRowClick($event, item, false)">\r\n\r\n <ng-container *ngIf="item._sep"><ng-container *ngTemplateOutlet="groupPager; context: { $implicit: item }"></ng-container></ng-container>\r\n\r\n <ng-container *ngIf="!item._sep">\r\n <ng-container *ngTemplateOutlet="basicColumns; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="dynamicColumns; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="customCells; context: { $implicit: item }"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet="bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}"></ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #groupPager let-item>\r\n <td class="est-pinned-body " *ngIf="HasPinnedColumns"><div class="est-pinned-border est-cell-group-padding"></div></td>\r\n <td *ngIf="item._grouplevel > 1" [attr.colspan]="item._grouplevel-1"></td>\r\n <td [attr.colspan]="Columns.VisibleUnpinned - (item._grouplevel > 0 ? item._grouplevel - 1 : 0)">\r\n <div class="est-rg-sep-flex-right" *ngIf="RowGroupingPagingStyle == \'right\'">\r\n <div class="est-rg-page"><ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { separator: item, ATP: addToPageGroup.bind(this), GTP: goToPageGroup.bind(this), Array: item.buttons }}"></ng-container></div>\r\n <div class="est-rg-ipp" *ngIf="(item.searches == \'groups\' ? item.view.groupcount : item.view.objectcount) > 10"><app-paging [CountLabel]="CountLabel" [AllSearch]="AllSearch" [GroupMode]="item.searches == \'groups\'" [PagerCount]="item.searches == \'groups\' ? item.view.groupcount : item.view.objectcount" [View]="item.view" (pagingSelected)="onGroupItemsPerPageChanged(item, $event);"></app-paging></div>\r\n </div>\r\n\r\n <div class="est-rg-sep-flex-left" *ngIf="RowGroupingPagingStyle == \'left\'">\r\n <div class="est-rg-ipp"><app-paging [AllSearch]="AllSearch" [CountLabel]="CountLabel" [GroupMode]="item.searches == \'groups\'" [PagerCount]="item.searches == \'groups\' ? item.view.groupcount : item.view.objectcount" [View]="item.view" (pagingSelected)="onGroupItemsPerPageChanged(item, $event);"></app-paging></div>\r\n <div class="est-rg-page" *ngIf="(item.searches == \'groups\' ? item.view.groupcount : item.view.objectcount) > 10"><ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { separator: item, ATP: addToPageGroup.bind(this), GTP: goToPageGroup.bind(this), Array: item.buttons }}"></ng-container></div>\r\n </div>\r\n </td>\r\n</ng-template>\r\n\r\n\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]="dynamicMode_H.generateRouterLink(rowItem.routePath, rowItem.routeParameterProperties, item)" class="est-link" [innerHTML]="item.properties[rowItem.propertyName]"></a>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf="!rowItem.routePath && rowItem.visible">\r\n <ng-container *ngTemplateOutlet="findEsTd(rowItem.propertyName) || defaultEsTd; context: { $implicit: item.properties[rowItem.propertyName], rowItem : rowItem, item : item }"> </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEsTd let-value let-rowItem=\'rowItem\' let-item=\'item\'>\r\n <td es-td="{{rowItem.propertyName}}" class="{{UserDefinedDynamicCols ? rowItem.clss : \'est-nowrap\'}}" [Internal]="false" [Context]="item._hash">\r\n {{value}}\r\n </td>\r\n</ng-template>\r\n\r\n\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" [style.width.px]="20">\r\n <input type="checkbox" [disabled]="opt.selDisabled" [class.est-pointer]="!item.locked" [(ngModel)]="item._selected" name="check{{item._hash}}" (click)="$event.stopPropagation(); handleClick($event, item);">\r\n </td>\r\n <td class="est-no-border est-col-min" *ngIf="(item.locked || item._sep) && Selection" [style.width.px]="20"></td>\r\n\r\n <ng-container *ngFor="let rowItem of RowTDs[item._hash]; let i = index">\r\n <td *ngIf="rowItem && rowItem.Pinned" [style.width.px]="rowItem.PinnedWidth" es-td="{{rowItem.ID}}" class="{{rowItem.Class}}" [class.est-no-selection]="rowItem.UserEdits" [class.est-no-border]="true" [class.est-rg-hdr]="rowItem.GroupHeader" [class.est-rg-agg]="rowItem.GroupAggregation" \r\n [class.est-nowrap]="Hierarchy || !rowItem.Wraps" [Internal]="true" (click)="dbClickEditOrSingleClickRowSelection($event, rowItem, item)">\r\n\r\n <div [class.est-edit-hidden]="rowItem._editing" class="est-pre">\r\n <ng-container *ngIf="Hierarchy && i == 0"><ng-container *ngTemplateOutlet="HierarchyNavigator; context: { $implicit: rowItem.Multi ? (item[rowItem.MultiProp] ? item[rowItem.MultiProp][rowItem.MultiIndex] : {}) : item }"></ng-container></ng-container>\r\n <ng-container *ngIf="!rowItem.Multi && rowItem.Template"><ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: rowItem.Multi ? (item[rowItem.MultiProp] ? item[rowItem.MultiProp][rowItem.MultiIndex] : {}) : item }"></ng-container></ng-container>\r\n <span *ngIf="rowItem.Multi && rowItem.Template"><ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: (item[rowItem.MultiProp] ? item[rowItem.MultiProp][rowItem.MultiIndex] : {}) }"></ng-container></span>\r\n <span *ngIf="!rowItem.Template && !rowItem.Multi">{{rowItem.Content}}</span>\r\n </div>\r\n \r\n <div *ngIf="rowItem._editing" class="est-mt-min-5">\r\n <form-adaptive [FormLayout]="false" [FocusSubject]="FocusSubject" [(ngModel)]="item[rowItem.UserEdits.Property]" name="{{ rowItem.UserEdits.Property + \'_\' + item._hash }}" [Type]="rowItem.UserEdits.Type" (inputChange)="finalizeUserEdit(rowItem, item)" (inputFocus)="$event.stopPropagation();" ></form-adaptive>\r\n </div>\r\n </td>\r\n </ng-container>\r\n </div>\r\n </td>\r\n\r\n <ng-container *ngFor="let rowItem of RowTDs[item._hash]; let i = index">\r\n <ng-container *ngIf="rowItem && !rowItem.Pinned">\r\n\r\n \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-no-selection]="rowItem.UserEdits" [class.est-rg-hdr]="rowItem.GroupHeader" [class.est-rg-agg]="rowItem.GroupAggregation" \r\n [class.est-nowrap]="Hierarchy || !rowItem.Wraps" [Internal]="true" (click)="dbClickEditOrSingleClickRowSelection($event, rowItem, item)">\r\n\r\n <div [class.est-edit-hidden]="rowItem._editing" class="est-pre">\r\n <ng-container *ngIf="Hierarchy && i == 0"><ng-container *ngTemplateOutlet="HierarchyNavigator; context: { $implicit: item }"></ng-container></ng-container>\r\n <ng-container *ngIf="!rowItem.Multi && rowItem.Template"><ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: item }"></ng-container></ng-container>\r\n <span *ngIf="rowItem.Multi && rowItem.Template"><ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: (item[rowItem.MultiProp] ? item[rowItem.MultiProp][rowItem.MultiIndex] : {}) }"></ng-container></span>\r\n <span *ngIf="!rowItem.Template && !rowItem.Multi">{{rowItem.Content}}</span>\r\n </div>\r\n\r\n <div *ngIf="rowItem._editing" class="est-mt-min-5" #input>\r\n <form-adaptive [FormLayout]="false" [FocusSubject]="FocusSubject" [(ngModel)]="item[rowItem.UserEdits.Property]" name="{{ rowItem.UserEdits.Property + \'_\' + item._hash }}" [Type]="rowItem.UserEdits.Type" (inputFinalized)="finalizeUserEdit(rowItem, item)"></form-adaptive>\r\n </div>\r\n\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" [Internal]="true">\r\n <ng-container *ngIf="Hierarchy && i == 0">\r\n <ng-container *ngTemplateOutlet="HierarchyNavigator; context: { $implicit: item }"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="rowItem.Template">\r\n <ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: item }"></ng-container>\r\n </ng-container>\r\n <span *ngIf="!rowItem.Template" [innerHTML]="rowItem.Content"></span>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #HierarchyNavigator let-item>\r\n <span *ngIf="!item.parent" class="fa fa-chevron-down" style="visibility:hidden"></span>\r\n <span *ngIf="item.parent && item._expanded" class="fa fa-chevron-down est-pointer est-no-selection" (click)="hierarchyMode_H.collapseParent(item[this.OwnKey])"></span>\r\n <span *ngIf="item.parent && !item._expanded" class="fa fa-chevron-up est-pointer est-no-selection" (click)="hierarchyMode_H.expandParent(item[this.OwnKey])"></span>\r\n \r\n</ng-template>\r\n\r\n\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-9\' : \'\'}}" *ngIf="!(options.item.removed || options.item.deleted)"><span class="fa fa-remove est-pointer text-danger" [hidden]="options.item.removable != undefined && !options.item.removable" (click)="onRemoval.emit(options.item)"></span></td>\r\n <td class="est-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-9\' : \'\'}}" *ngIf="(options.item.removed || options.item.deleted)"><span class="fa fa-undo text-warning est-pointer" (click)="onAbortRemoval.emit(options.item)"></span></td>\r\n </ng-container>\r\n <ng-container *ngIf="Removal && RemovalCondition">\r\n <td class="est-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-9\' : \'\'}}" *ngIf="!(options.item.removed || options.item.deleted) && options.item[RemovalCondition]"><span class="fa fa-remove est-pointer text-danger" [hidden]="options.item.removable != undefined && !options.item.removable" (click)="onRemoval.emit(options.item)"></span></td>\r\n <td class="est-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-9\' : \'\'}}" *ngIf="(options.item.removed || options.item.deleted) && options.item[RemovalCondition]"><span class="fa fa-undo text-warning est-pointer" (click)="onAbortRemoval.emit(options.item)"></span></td>\r\n <td class="est-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-9\' : \'\'}}" *ngIf="!options.item[RemovalCondition]"><span class="fa fa-remove est-hidden-view"></span></td>\r\n </ng-container>\r\n <td *ngIf="Export || HiddenColumns || CornerMenuOptions" class="est-sticky-last-column{{options.even && !Hierarchy ? \'-alt\' : \'\'}}"></td>\r\n</ng-template>\r\n\r\n\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" cdkDrag>\r\n <div class="modal-content">\r\n <div class="modal-header est-pointer" cdkDragHandle>\r\n <h5 class="modal-title pull-left">\r\n <ng-container *ngIf="!HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Order\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && !ColumnsOrdering">\r\n {{\'Columns Visibility\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Visibility and Order\' | localize : lc}}\r\n </ng-container>\r\n </h5>\r\n <button type="button" class="close pull-right" (click)="changeColumnVisibilityModal.hide();" aria-label="Close">\r\n <span aria-hidden="true">×</span>\r\n </button>\r\n </div>\r\n <div class="modal-body">\r\n <div *ngIf="!TMPColumnsList || TMPColumnsList.length == 0" class="card card-info est-padding-10 est-margin-bottom-0">\r\n {{\'There are no columns configured to be hidden/shown in this view\' | localize : lc}}\r\n </div>\r\n <div *ngIf="TMPColumnsList && TMPColumnsList.length > 0" style="max-height:500px; overflow-y:auto">\r\n \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)="columnMetadata_H.globalColVisCheckChanged();">\r\n </th>\r\n \x3c!-- <th class="est-col-min" *ngIf="ColumnsOrdering"></th> --\x3e\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 *ngIf="DirectivesBased" class="est-col-min"></th>\r\n </tr>\r\n </thead>\r\n <tbody \r\n cdkDropList \r\n [cdkDropListData]="TMPColumnsList" \r\n (cdkDropListDropped)="columnMetadata_H.columnReordered($event)" \r\n [cdkDropListSortPredicate]="columnMetadata_H.sortPredicate.bind(this.columnMetadata_H)"\r\n class="est-dropbox">\r\n\r\n <tr *ngFor="let item of TMPColumnsList; let i = index; let last = last" \r\n class="est-pointer est-droplist" \r\n [class.est-white-selected]="lastSelectedItemID == item.id" \r\n [class.est-no-selection]="!item.visible"\r\n cdkDrag\r\n [cdkDragData]="item"\r\n [cdkDragDisabled]="!ColumnsOrdering || item.fixed || item.pinned">\r\n\r\n <td *ngIf="HiddenColumns">\r\n <input type="checkbox" [class.est-hidden-view]="item.fixed" class="est-pointer" [(ngModel)]="item.visible" name="visible{{i}}" (ngModelChange)="columnMetadata_H.updateGlobalColVisCheck();" />\r\n </td>\r\n <td class="est-nowrap drag-visible" (click)="columnMetadata_H.columnClicked(item);">\r\n <ng-container *ngIf="item.template">\r\n \x3c!-- Padri --\x3e\r\n <span *ngIf="item.parentTemplates && item.parentTemplates.length > 0" class="est-fw-bold est-fs-13">\r\n ( \r\n <ng-container *ngFor="let parent of item.parentTemplates; let last=last">\r\n <ng-container *ngIf="parent.tmpl"><ng-container *ngTemplateOutlet="parent.tmpl"></ng-container></ng-container>\r\n <ng-container *ngIf="parent.content">{{parent.content}}</ng-container>\r\n <span *ngIf="!last"> - </span>\r\n </ng-container>\r\n )\r\n </span>\r\n \x3c!-- Template header originale --\x3e\r\n <ng-container *ngTemplateOutlet="item.template; context: { $implicit: item.multi ? item.multiContent : null }"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="!item.template">{{item.description}}</ng-container>\r\n </td>\r\n \x3c!--Filler--\x3e\r\n <td (click)="columnMetadata_H.columnClicked(item);"></td>\r\n \x3c!-- Pinner --\x3e\r\n <td *ngIf="DirectivesBased && ColumnsPinnable"><span *ngIf="!item.fixed && item.pinnable" class="fa fa-thumb-tack" [class.text-success]="item.pinned" (click)="columnMetadata_H.pinOrUnpinColumn(item)"></span></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div class="modal-footer">\r\n <button type="button" class="btn btn-secondary est-margin-right-10" (click)="lastSelectedItemID = null; changeColumnVisibilityModal.hide();">{{\'Close\' | localize : lc}}</button>\r\n <button type="button" [disabled]="!TMPColumnsList || TMPColumnsList.length == 0" class="btn btn-primary" (click)="columnMetadata_H.confirmColumnVisibilitySelection() && changeColumnVisibilityModal.hide()">{{\'Confirm\' | localize : lc}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>',styles:['.est-loading-box{height:200px;text-align:center;position:relative;background:#ccc}.est-loading-content{margin:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:35px}.est-scrollable{max-height:600px;overflow:auto}.est-head-resizer{top:0;right:0;bottom:0;width:7px;position:absolute;cursor:col-resize}.est-head-resizer-internal{top:0;right:0;left:6px;bottom:0;width:1px;position:absolute;background-color:#ccc;height:100%}.est-pointer{cursor:pointer}.est-high-density td,.est-high-density th{padding:0 .2rem}.est-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.est-edit-hidden{height:1px!important}.est-edit-hidden,.est-hidden-view{visibility:hidden}.est-no-border{border:none!important}.est-nowrap{white-space:nowrap}.est-mt-min-5{margin-top:-5px}.est-white-selected{background-color:#ddd!important}.est-line-through{text-decoration:line-through}.est-no-side-padding{padding-left:0;padding-right:0}.est-no-left-padding,.est-no-right-padding{padding-left:0}.est-col-min{width:1px}.est-margin-bottom-0{margin-bottom:0!important}.est-margin-right-10{margin-right:10px!important}.est-right-9{right:9px!important}.est-table-dotted-menu{padding:0 0 2px!important;color:#999}.est-fs-18{font-size:18px}.est-fs-13,.est-fs-14{font-size:14px}.est-fw-bold{font-weight:700}.est-padding-3{padding:3px!important}.est-page-container{position:relative}.est-bring-to-front-strong{z-index:99999999!important}.est-switch{position:relative;display:inline-block;width:30px;height:17px;margin-bottom:0;margin-right:5px;margin-left:5px}.est-switch input{display:none}.est-slider{cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc}.est-slider,.est-slider:before{position:absolute;transition:.4s}.est-slider:before{content:"";height:13px;width:13px;left:3px;bottom:2px;background-color:#fff}input:checked+.est-slider{background-color:#2196f3}input:focus+.est-slider{box-shadow:0 0 1px #2196f3}input:checked+.est-slider:before{transform:translateX(11px)}.est-slider.round{border-radius:10px}.est-slider.round:before{border-radius:50%}.est-custom-input{width:30px;display:inline;padding:1px;height:20px}.est-row-lvl-1 td:first-child{padding-left:5px}.est-row-lvl-2 td:first-child{padding-left:20px}.est-row-lvl-3 td:first-child{padding-left:35px}.est-row-lvl-4 td:first-child{padding-left:50px}.est-row-lvl-5 td:first-child{padding-left:65px}.est-row-lvl-6 td:first-child{padding-left:80px}.est-row-lvl-7 td:first-child{padding-left:95px}.est-row-lvl-8 td:first-child{padding-left:110px}.est-row-lvl-9 td:first-child{padding-left:125px}.est-row-lvl-10 td:first-child{padding-left:140px}.est-row-lvl-11 td:first-child{padding-left:155px}.est-row-lvl-12 td:first-child{padding-left:170px}.est-row-lvl-13 td:first-child{padding-left:185px}.est-row-lvl-14 td:first-child{padding-left:200px}.est-row-lvl-15 td:first-child{padding-left:215px}.est-row-lvl-16 td:first-child{padding-left:230px}.est-row-lvl-17 td:first-child{padding-left:245px}.est-row-lvl-18 td:first-child{padding-left:260px}.est-row-lvl-19 td:first-child{padding-left:275px}.est-row-lvl-20 td:first-child{padding-left:290px}.est-row-lvl-21 td:first-child{padding-left:305px}.est-row-lvl-22 td:first-child{padding-left:320px}.est-row-lvl-23 td:first-child{padding-left:335px}.est-row-lvl-24 td:first-child{padding-left:350px}.est-row-lvl-25 td:first-child{padding-left:365px}.est-row-lvl-26 td:first-child{padding-left:380px}.est-row-lvl-27 td:first-child{padding-left:395px}.est-row-lvl-28 td:first-child{padding-left:410px}.est-row-lvl-29 td:first-child{padding-left:425px}.est-row-lvl-30 td:first-child{padding-left:440px}.est-row-lvl-31 td:first-child{padding-left:455px}.est-row-lvl-32 td:first-child{padding-left:470px}.est-row-lvl-33 td:first-child{padding-left:485px}.est-row-lvl-34 td:first-child{padding-left:500px}.est-row-lvl-35 td:first-child{padding-left:515px}.est-row-lvl-36 td:first-child{padding-left:530px}.est-row-lvl-37 td:first-child{padding-left:545px}.est-row-lvl-38 td:first-child{padding-left:560px}.est-row-lvl-39 td:first-child{padding-left:575px}.est-row-lvl-40 td:first-child{padding-left:590px}.est-row-lvl-41 td:first-child{padding-left:605px}.est-row-lvl-42 td:first-child{padding-left:620px}.est-row-lvl-43 td:first-child{padding-left:635px}.est-row-lvl-44 td:first-child{padding-left:650px}.est-row-lvl-45 td:first-child{padding-left:665px}.est-row-lvl-46 td:first-child{padding-left:680px}.est-row-lvl-47 td:first-child{padding-left:695px}.est-row-lvl-48 td:first-child{padding-left:710px}.est-row-lvl-49 td:first-child{padding-left:725px}.est-row-lvl-50 td:first-child{padding-left:740px}.est-row-lvl-51 td:first-child{padding-left:755px}.est-row-lvl-52 td:first-child{padding-left:770px}.est-row-lvl-53 td:first-child{padding-left:785px}.est-row-lvl-54 td:first-child{padding-left:800px}.est-row-lvl-55 td:first-child{padding-left:815px}.est-row-lvl-56 td:first-child{padding-left:830px}.est-row-lvl-57 td:first-child{padding-left:845px}.est-row-lvl-58 td:first-child{padding-left:860px}.est-row-lvl-59 td:first-child{padding-left:875px}.est-row-lvl-60 td:first-child{padding-left:890px}.est-row-lvl-61 td:first-child{padding-left:905px}.est-row-lvl-62 td:first-child{padding-left:920px}.est-row-lvl-63 td:first-child{padding-left:935px}.est-row-lvl-64 td:first-child{padding-left:950px}.est-row-lvl-65 td:first-child{padding-left:965px}.est-row-lvl-66 td:first-child{padding-left:980px}.est-row-lvl-67 td:first-child{padding-left:995px}.est-row-lvl-68 td:first-child{padding-left:1010px}.est-row-lvl-69 td:first-child{padding-left:1025px}.est-row-lvl-70 td:first-child{padding-left:1040px}.est-row-lvl-71 td:first-child{padding-left:1055px}.est-row-lvl-72 td:first-child{padding-left:1070px}.est-row-lvl-73 td:first-child{padding-left:1085px}.est-row-lvl-74 td:first-child{padding-left:1100px}.est-row-lvl-75 td:first-child{padding-left:1115px}.est-row-lvl-76 td:first-child{padding-left:1130px}.est-row-lvl-77 td:first-child{padding-left:1145px}.est-row-lvl-78 td:first-child{padding-left:1160px}.est-row-lvl-79 td:first-child{padding-left:1175px}.est-row-lvl-80 td:first-child{padding-left:1190px}.est-row-lvl-81 td:first-child{padding-left:1205px}.est-row-lvl-82 td:first-child{padding-left:1220px}.est-row-lvl-83 td:first-child{padding-left:1235px}.est-row-lvl-84 td:first-child{padding-left:1250px}.est-row-lvl-85 td:first-child{padding-left:1265px}.est-row-lvl-86 td:first-child{padding-left:1280px}.est-row-lvl-87 td:first-child{padding-left:1295px}.est-row-lvl-88 td:first-child{padding-left:1310px}.est-row-lvl-89 td:first-child{padding-left:1325px}.est-row-lvl-90 td:first-child{padding-left:1340px}.est-row-lvl-91 td:first-child{padding-left:1355px}.est-row-lvl-92 td:first-child{padding-left:1370px}.est-row-lvl-93 td:first-child{padding-left:1385px}.est-row-lvl-94 td:first-child{padding-left:1400px}.est-row-lvl-95 td:first-child{padding-left:1415px}.est-row-lvl-96 td:first-child{padding-left:1430px}.est-row-lvl-97 td:first-child{padding-left:1445px}.est-row-lvl-98 td:first-child{padding-left:1460px}.est-row-lvl-99 td:first-child{padding-left:1475px}.est-relative{position:relative}.est-top-pager{position:absolute;right:0;top:5px}.est-top-allselect{position:absolute;left:0;top:5px;font-weight:700}.est-padding-10{padding:10px!important}.est-margin-right-50{margin-right:50px}.est-margin-left-50{margin-left:50px}.est-quick-unpin{color:#000;margin-left:8px;font-size:14px;transform:rotate(45deg)}.est-page-sel{color:#000;margin-left:3px;margin-right:3px;padding:0 5px;font-size:inherit;border:none;border-radius:15px}.est-page-next,.est-page-prev{color:#000;font-size:inherit;padding:2px 0 0}.est-pinned-header{background-color:#fff;left:0;top:0;position:sticky;z-index:1;border-bottom:1px solid #dee2e6!important;padding:0!important}.est-simple-border-bottom{border-bottom:1px solid #dee2e6}.est-pinned-internal-header{border-top:0;border-bottom:0 solid #dee2e6}.est-pinned-border{border-right:2px solid #dee2e6!important}.est-cell-padding{padding:.3rem}.est-pinned-body{background-color:#fff;left:0;position:sticky;z-index:1;border-top:1px solid #dee2e6!important;padding:0!important}.est-inline{display:inline!important}.est-inline-block{display:inline-block!important}.est-link{color:#0275d8!important;cursor:pointer;text-decoration:none;display:block}.est-link:hover{color:#23527c!important;cursor:pointer;text-decoration:underline!important}.est-sticky-last-column{right:-1px;position:sticky;z-index:0;background-color:#fff}.est-sticky-last-column-alt{right:-1px;position:sticky;z-index:0;background-color:#f2f2f2}.est-ltab-border{border-left:2px solid #bbb}.est-rtab-border{border-right:2px solid #bbb}.est-cell-group-padding{padding:calc(.3rem + 1px);position:absolute;top:0;left:0;height:100%;width:100%}.est-margin-bottom-10{margin-bottom:10px}.est-text-center{text-align:center}.est-flex{display:flex}.est-rg-sep-flex-right{display:flex;flex-direction:row-reverse;width:100%;margin:-5px}.est-rg-sep-flex-left{display:flex;flex-direction:row;width:100%;margin:-5px}.est-rg-hdr{font-weight:700}.est-rg-agg{font-style:italic}.est-rg{background-color:hsla(0,0%,46.7%,.4666666666666667)!important}.est-rg-sep{font-size:12px;padding-right:20px!important;background-color:hsla(0,0%,73.3%,.7333333333333333)!important}.est-rg-ipp{text-align:left;display:inline-flex;margin-right:25px}.est-rg-page{text-align:right;display:inline-flex;font-size:inherit;padding-top:5px}.est-droplist.cdk-drag-placeholder{opacity:0}.est-droplist.cdk-drag-preview{z-index:999999999!important;opacity:1;box-sizing:border-box;border-radius:4px;background-color:#fff;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.est-droplist.cdk-drag-preview td:not(.drag-visible){visibility:hidden}.est-droplist.cdk-drag-preview td.drag-visible{padding-top:3px}.est-droplist.cdk-drag-animating,.est-droplist.cdk-drop-list-dragging .est-dropbox:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.est-pre{white-space:pre}.est .mat-form-field-flex{height:29px!important;padding:0!important}.est .mat-form-field-flex .mat-form-field-outline{color:#00f}.est .mat-form-field-flex .mat-form-field-outline .mat-form-field-outline-start{border-left:none;border-top:none;border-radius:0}.est .mat-form-field-flex .mat-form-field-outline .mat-form-field-outline-end{border-top:none;border-radius:0;border-right:none}.est .mat-form-field-wrapper{height:20px;min-height:20px!important;margin-top:0!important}.est .mat-form-field-infix{width:100%!important;min-width:50px!important}.est input{height:20px;padding-top:0!important}']}]}],oe.ctorParameters=function(){return[{type:r.NgControl,decorators:[{type:t.Self},{type:t.Optional}]},{type:s.PreferencesService,decorators:[{type:t.Optional}]},{type:z,decorators:[{type:t.Optional},{type:t.Inject,args:[V]}]},{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[M]}]},{type:i.LocalizationService},{type:t.ChangeDetectorRef},{type:se},{type:n.UtilityService},{type:n.ExportService},{type:n.DateService},{type:n.MessageService}]},oe.propDecorators={EsTdsDirective:[{type:t.ContentChildren,args:[A]}],EsThsDirective:[{type:t.ContentChildren,args:[L]}],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}]}],inputField:[{type:t.ViewChild,args:["input",{static:!1}]}],CornerMenuOptions:[{type:t.Input}],ColumnsResizable:[{type:t.Input}],ColumnsPinnable:[{type:t.Input}],AutoUpdate:[{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}],CountLabel:[{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}],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}],UserEdits:[{type:t.Input}],onOrderChanged:[{type:t.Output}],onSearchRequest:[{type:t.Output}],onSelectionChanged:[{type:t.Output}],onRemoval:[{type:t.Output}],onAbortRemoval:[{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 ae=function(){},le=function(){function e(e,i){this.myself=e,this.renderer=i,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.Pinned=!1,this.SearchInProgress=!1,this.Wrap=!1,this.Fixed=!1,this.Template=null,this.onOrderChange=new t.EventEmitter,this.onUnpinning=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.unpin=function(){this.onUnpinning.emit(this.ID)},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}();le.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> \r\n <span class="fa" [class.fa-chevron-down]="Order == \'DESC\'" [class.fa-chevron-up]="Order == \'ASC\'"></span>\r\n</span>\r\n<span *ngIf="Pinned && !Fixed" class="app-pointer fa fa-thumb-tack est-quick-unpin" (click)="unpin()"></span>\r\n<div [hidden]="!Resizable || Fixed || Pinned" class="est-head-resizer" (mousedown)="onResizeStart($event)">\r\n <div class="est-head-resizer-internal"></div>\r\n</div>',changeDetection:t.ChangeDetectionStrategy.OnPush}]}],le.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},le.propDecorators={ID:[{type:t.Input,args:["es-th"]}],Order:[{type:t.Input}],Orderable:[{type:t.Input}],Display:[{type:t.Input}],Resizable:[{type:t.Input}],Pinned:[{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}],onUnpinning:[{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 he=function(){function e(e,t,i,n){this.myself=e,this.renderer=t,this._viewContainer=i,this.sanitizer=n,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.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}();he.decorators=[{type:t.Component,args:[{selector:"[es-td]",template:"<span>\r\n <ng-content></ng-content>\r\n</span>",changeDetection:t.ChangeDetectionStrategy.OnPush}]}],he.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:d.DomSanitizer}]},he.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 ce=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:M,useValue:(null==t?void 0:t.locale)||"it-IT"},{provide:T,useValue:(null==t?void 0:t.debugMode)||!1},{provide:V,useValue:(null==t?void 0:t.defaults)||null}]}},e}();ce.decorators=[{type:t.NgModule,args:[{imports:[l.CommonModule,r.FormsModule,h.RouterModule,i.LocalizationModule,g.ModalModule,m.BsDropdownModule,f.CsvModule,v.ContextMenuModule,c.MatSelectModule,p.MatInputModule,o.DragDropModule,u.FormsAndValidationsModule],declarations:[le,he,oe,A,L,R],providers:[n.UtilityService,n.ExportService,n.HashingService,n.MessageService],exports:[oe,A,L,R]}]}];var pe=function(){},ue=function(e,t,i,n,r,s){this.id=e,this.title=t,this.iconClass=i,this.text=n,this.conditionField=r,this.conditionValue=s},de=function(){this._selected=!1,this._rowClass=null,this._hash=null,this.properties={}},ge=function(e,t,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=""),this.value=e,this.header=t,this.header_group=i,this.exports=!1,this.export_format="",this.exports=n,this.export_format=r,this._headersHierarchy=i?i.split(">").map((function(e){return e.trim()})):[]},me=function(){},fe=function(){},ve=function(){},ye=function(){};e.AppOrdering=F,e.AppSearch=E,e.CornerMenuOption=pe,e.EsTableColumnsDefinition=j,e.EsTableComponent=oe,e.EsTableDefaultable=z,e.EsTableModule=ce,e.EsTableModuleConfig=ae,e.EsTableMultiValue=ge,e.EsTableOperationDefinition=ue,e.EsTdDirective=A,e.EsThDirective=L,e.GenericItem=de,e.Group=Q,e.GroupAggregation=Z,e.GroupFilter=G,e.GroupOrAggregation=Y,e.ItemsSelection=k,e.ReportColumn=me,e.ReportDefinition=D,e.ReportOrder=X,e.ReportParam=fe,e.ReportResult=ve,e.ReportRow=ye,e.TablePagerComponent=R,e.ɵa=H,e.ɵb=M,e.ɵc=T,e.ɵd=V,e.ɵe=B,e.ɵf=se,e.ɵg=le,e.ɵh=he,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=esfaenza-es-table.umd.min.js.map
|