@esfaenza/es-table 11.2.3 → 11.2.7
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 +33 -17
- package/bundles/esfaenza-es-table.umd.js.map +1 -1
- package/bundles/esfaenza-es-table.umd.min.js +2 -2
- package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
- package/esfaenza-es-table.metadata.json +1 -1
- package/esm2015/lib/es_table.component.js +29 -18
- package/esm2015/lib/es_td.component.js +6 -1
- package/fesm2015/esfaenza-es-table.js +33 -17
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/es_table.component.d.ts +11 -3
- package/lib/es_td.component.d.ts +4 -0
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@esfaenza/extensions"),require("@esfaenza/localizations"),require("@esfaenza/preferences"),require("@angular/platform-browser"),require("@angular/common"),require("@angular/router"),require("ngx-bootstrap/modal"),require("ngx-bootstrap/dropdown"),require("@ctrl/ngx-csv"),require("@esfaenza/ngx-contextmenu")):"function"==typeof define&&define.amd?define("@esfaenza/es-table",["exports","@angular/core","@angular/forms","@esfaenza/extensions","@esfaenza/localizations","@esfaenza/preferences","@angular/platform-browser","@angular/common","@angular/router","ngx-bootstrap/modal","ngx-bootstrap/dropdown","@ctrl/ngx-csv","@esfaenza/ngx-contextmenu"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).esfaenza=e.esfaenza||{},e.esfaenza["es-table"]={}),e.ng.core,e.ng.forms,e.extensions,e.localizations,e.preferences,e.ng.platformBrowser,e.ng.common,e.ng.router,e.modal,e.dropdown,e.ngxCsv,e.ngxContextmenu)}(this,(function(e,t,n,i,r,o,s,a,l,c,p,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@esfaenza/extensions"),require("@esfaenza/localizations"),require("@esfaenza/preferences"),require("@angular/platform-browser"),require("@angular/common"),require("@angular/router"),require("ngx-bootstrap/modal"),require("ngx-bootstrap/dropdown"),require("@ctrl/ngx-csv"),require("@esfaenza/ngx-contextmenu")):"function"==typeof define&&define.amd?define("@esfaenza/es-table",["exports","@angular/core","@angular/forms","@esfaenza/extensions","@esfaenza/localizations","@esfaenza/preferences","@angular/platform-browser","@angular/common","@angular/router","ngx-bootstrap/modal","ngx-bootstrap/dropdown","@ctrl/ngx-csv","@esfaenza/ngx-contextmenu"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).esfaenza=e.esfaenza||{},e.esfaenza["es-table"]={}),e.ng.core,e.ng.forms,e.extensions,e.localizations,e.preferences,e.ng.platformBrowser,e.ng.common,e.ng.router,e.modal,e.dropdown,e.ngxCsv,e.ngxContextmenu)}(this,(function(e,t,n,i,r,o,s,a,l,c,d,p,h){"use strict";
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function m(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(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(s,a)}l((i=i.apply(e,t||[])).next())}))}function f(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}Object.create;Object.create;var v=function(e,t){this.id=e,this.order=t},w=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}(),y=function(e,t,n,i,r,o,s,a,l){void 0===n&&(n=null),void 0===i&&(i=null),void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=!0),void 0===a&&(a=null),void 0===l&&(l=!0),this.description=e,this.propertyName=t,this.routePath=n,this.routeParameterProperties=i,this.dataOrder=r,this.columnOrder=o,this.visible=s,this.clss=a,this.orderable=l},C=function(){this._selected=!1,this._rowClass=null,this.hash=null,this.properties={}},b=function(){},x=function(){},S=function(){},I=function(){},O=function(){},V=function(){},P=function(){},T=function(e,t,n,i,r,o){this.id=e,this.title=t,this.iconClass=n,this.text=i,this.conditionField=r,this.conditionValue=o},D=function(e,t,n){this.id=e,this.description=t,this.visible=n},M=function(e){this.all=!1,this.exclusions=[],this.count=e.length,this.items=e,this.all=!1,this.exclusions=[]},R=function(){function e(e,t,n,i){this.myself=e,this.renderer=t,this._viewContainer=n,this.sanitizer=i,this.ID="",this.Display=null}return Object.defineProperty(e.prototype,"Visible",{get:function(){return null==this._Visible&&(this._Visible=!0),this._Visible},set:function(e){this._Visible=e,e?this.renderer.removeClass(this.myself.nativeElement,"app-display-none"):this.renderer.addClass(this.myself.nativeElement,"app-display-none")},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){if(!this.Internal){var e,t=this._viewContainer;if(null==(e=null==t._view?null:t._view.parent&&!t._view.context.$implicit&&t._view.parent.context&&t._view.parent.context.$implicit?t._view.parent.context.$implicit:t._view.context&&t._view.context.ngIf?t._view.viewContainerParent.context.$implicit:t._view.context.$implicit))for(var n=this._viewContainer._hostLView,i=0;i<n.length;i++){var r=n[i];if(r&&r.$implicit&&!r.ngIf){e=r.$implicit;break}if(r&&r.length&&r.length>0)for(var o=0;o<r.length;o++){var s=r[o];if(s&&s.$implicit&&!s.ngIf){e=s.$implicit;break}}if(e)break}var a=e.hash;this.Context=a,this.Content=null===this.Display||""===this.Display?this.sanitizer.bypassSecurityTrustHtml(this.myself.nativeElement.innerHTML):this.sanitizer.bypassSecurityTrustHtml(this.Display),this.Class=this.myself.nativeElement.className.replace("app-display-none","")}},e}();R.decorators=[{type:t.Component,args:[{selector:"[es-td]",template:"<span>\r\n <ng-content></ng-content>\r\n</span>",changeDetection:t.ChangeDetectionStrategy.OnPush}]}],R.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:s.DomSanitizer}]},R.propDecorators={ID:[{type:t.Input,args:["es-td"]}],Internal:[{type:t.Input}],RouterLink:[{type:t.Input}],Display:[{type:t.Input}],Visible:[{type:t.Input}]};var z=function(){function e(e,n){this.myself=e,this.renderer=n,this.orderNext={NONE:"DESC",DESC:"ASC",ASC:null},this.resizingThis=!1,this.startOffset=null,this.ID="",this.Orderable=!0,this.Display="",this.Resizable=!1,this.SearchInProgress=!1,this.onOrderChange=new t.EventEmitter,this.Referenced=!1}return Object.defineProperty(e.prototype,"Visible",{get:function(){return null==this._Visible&&(this._Visible=!0),this._Visible},set:function(e){this._Visible=e,e?this.renderer.removeClass(this.myself.nativeElement,"app-display-none"):this.renderer.addClass(this.myself.nativeElement,"app-display-none")},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.Description=null===this.Display||""===this.Display?this.content.nativeElement.innerText:this.Display,this.Class=this.myself.nativeElement.className.replace("app-display-none",""),this.Resizable&&this.renderer.addClass(this.myself.nativeElement,"app-relative")},e.prototype.setupNextOrderAndNotify=function(){if(this.ID){if(this.SearchInProgress)console.log("Attempt to order a column during a search. Operation ignored");else if(this.OrderBy&&this.Orderable){var e=this.orderNext[this.Order||"NONE"];this.Order=e,this.onOrderChange.emit(this.Order)}}else console.log("Attempt to order a column without ID. Operation ignored")},e.prototype.onResizeStart=function(e){this.Resizable&&(this.resizingThis=!0,this.startOffset=this.myself.nativeElement.offsetWidth-e.pageX)},e.prototype.onMouseUp=function(){this.Resizable&&(this.resizingThis=!1)},e.prototype.onMouseMove=function(e){this.Resizable&&this.resizingThis&&(this.myself.nativeElement.style.width=this.startOffset+e.pageX+"px",e.preventDefault())},e}();z.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-content></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<div [hidden]="!Resizable" style="top:0; right:0; bottom: 0; width:2px; position:absolute; cursor:col-resize; background-color:#ccc" (mousedown)="onResizeStart($event)"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush}]}],z.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},z.propDecorators={ID:[{type:t.Input,args:["es-th"]}],Order:[{type:t.Input}],Orderable:[{type:t.Input}],Display:[{type:t.Input}],Resizable:[{type:t.Input}],Internal:[{type:t.Input}],SearchInProgress:[{type:t.Input}],OrderBy:[{type:t.Input}],onOrderChange:[{type:t.Output}],content:[{type:t.ViewChild,args:["content",{static:!1}]}],Visible:[{type:t.Input}],onMouseUp:[{type:t.HostListener,args:["window:mouseup.out-zone"]}],onMouseMove:[{type:t.HostListener,args:["window:mousemove.out-zone",["$event"]]}]};var H=new t.InjectionToken("EST_LOCALE"),E=function(e){function t(t){var n=e.call(this,null!=t?t:"it-IT")||this;return e.prototype.set.call(n,"en->it","Performing Table bootstrap",["Sto caricando la Tabella"]),e.prototype.set.call(n,"en->it","Update every",["Aggiorna ogni"]),e.prototype.set.call(n,"en->it","second/s",["secondo/i"]),e.prototype.set.call(n,"en->it","Export View",["Esporta Vista"]),e.prototype.set.call(n,"en->it","Column Name",["Nome Colonna"]),e.prototype.set.call(n,"en->it","Columns Order",["Ordine Colonne"]),e.prototype.set.call(n,"en->it","Columns Visibility",["Visibilità Colonne"]),e.prototype.set.call(n,"en->it","There are no columns configured to be hidden/shown in this view",["Non ci sono colonne configurate per essere visualizzate/nascoste in questa vista dati"]),e.prototype.set.call(n,"en->it","Columns Visibility and Order",["Visibilità e Ordine Colonne"]),e.prototype.set.call(n,"en->it","Objects Selected",["Oggetti Selezionati"]),e.prototype.set.call(n,"en->it","Object Selected",["Oggetto Selezionato"]),e.prototype.set.call(n,"en->it","Select Everything",["Seleziona Tutto"]),e.prototype.set.call(n,"en->it","Reset Selection",["Resetta Selezione"]),e.prototype.set.call(n,"en->it","No operations available",["Nessuna operazione disponibile"]),e.prototype.set.call(n,"en->it","Paging options are not available for this report",["Le opzioni di paginazione non sono disponibili per questo report"]),n}return g(t,e),t}(r.LocalizationService);E.decorators=[{type:t.Injectable}],E.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[H]}]}]};var k=function(){function e(e,n,i,r,o,s,a){this.ngControl=e,this.prefService=n,this.lc=i,this.cdr=r,this.hashExts=o,this.utiExts=s,this.expExts=a,this.View=null,this.globalCheck=!1,this.lastSelected=null,this.selectedObjects=0,this.canSelectAll=!1,this.viewMode=!1,this.arrayMode=!1,this.reportMode=!1,this.boundSource=[],this.TMPBoundSource=[],this.boundSubSources=[],this.addedSlices=[],this.defaultAllPageOverride=999999,this.autoUpdate=!1,this.seconds="10",this.researchInProgress=!1,this.RowTDs=null,this.TMPRowTDs=null,this.RowTHs=null,this.TMPRowTHs=null,this.DynamicTableRouterLinkCache={},this.RowContexts=[],this.OrderDirectives=[],this.lastSelectedItemID=null,this.UserDefinedDynamicCols=!1,this.FirstBind=!0,this.ColumnsList=[],this.TMPColumnsList=[],this.globalColVisCheck=!1,this.EsThsOrderChangeSubscriptions=[],this.CornerMenuOptions=null,this.ColumnsResizable=!1,this.AutoUpdate=!1,this.UseCustomCellActions=!1,this.CustomCellActionsOn="",this.CellActionPropagates=!0,this.UseCustomCells=!1,this.MaxHeight=null,this.Class="",this.XLSXExport=!1,this.CSVExport=!0,this.AllSearch=!0,this.HighCellDensity=!1,this.Selection=!1,this.ShowLoadingOnBootstrap=!1,this.Removal=!1,this.RemovalCondition="",this.Export=!1,this.ShiftClick=!1,this.ShowPaging=!0,this.HidePaging=!1,this.HidePagingCount=!1,this.HidePagingButtons=!1,this.ContextMenu=null,this.ExportFileName="Export.csv",this.TableClass="table table-striped table-hover table-sm",this.CountLabel=this.lc.loc("Found objects"),this.HasHeaderGroup=!1,this.HasSecondaryHeaderGroup=!1,this.SliceSize=100,this.EndlessScroll=!1,this.EndlessScrollOnlyForAll=!0,this.HeaderHidden=!1,this.BodyHidden=!1,this.SelectionDisabled=!1,this.SingleSelection=!1,this.RowClassAssigner=null,this.OrderByColumn=!1,this.MultipleOrderingDirectives=!0,this.HiddenColumns=!1,this.ColumnsOrdering=!1,this.SearchView=null,this.SelectAll=!1,this.UseArrayModePaging=!0,this.DynamicRowColumnsDefinition=null,this.DynamicOperations=[],this.Hierarchy=!1,this.ParentKey="",this.OwnKey="",this.StartsExpanded=!0,this.SavePreferences=!1,this.SecondarySource=!1,this.TertiarySource=!1,this.UseSelectionCache=!0,this.onOrderChanged=new t.EventEmitter,this.onSearchRequest=new t.EventEmitter,this.onSelectionChanged=new t.EventEmitter,this.onRemoval=new t.EventEmitter,this.onAbortRemoval=new t.EventEmitter,this.onCellClick=new t.EventEmitter,this.onCornerAction=new t.EventEmitter,this.onDynamicOperation=new t.EventEmitter,this.arraymodePage=1,this.arraymodePages=1,this.arraymodeItemsPerPage=15,this.internalWriteCall=!1,this.selOrDeselCache={},this.propagateChange=function(e){},e&&(e.valueAccessor=this)}return e.prototype.ngOnInit=function(){var e=this;if(this.Hierarchy&&!this.UseCustomCells)throw'Es-table error: Per poter utilizzare l\'es-table con [Hierarchy]="true" è richiesto anche [UseCustomCells]="true"';this.ctxMenuSubscription=(this.ContextMenu||this.tableEmptyMenu).open.subscribe((function(t){var n=!t.item._selected;t.item._selected=!0;var i=e.handleItemsSelection([t.item]);e.changed(),n&&e.onSelectionChanged.emit(i)}))},e.prototype.ngOnDestroy=function(){this.ctxMenuSubscription&&this.ctxMenuSubscription.unsubscribe(),this.EsThsOrderChangeSubscriptions.forEach((function(e){e.unsubscribe()}))},e.prototype.ngOnChanges=function(e){return m(this,void 0,void 0,(function(){return f(this,(function(t){return e.SearchView&&this.SearchView&&(this.arrayPulsanti=this.getPagesArray(6,this.SearchView.page,this.SearchView.pages||1)),[2]}))}))},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(e){},e.prototype.changed=function(){this.propagateChange(this.View)},e.prototype.writeValue=function(e){if(this.View=e||null,this.researchInProgress=!1,!this.View&&!this.SearchView)return this.boundSource=this.TMPBoundSource||[],void this.cdr.markForCheck();if(!this.View||void 0===this.View.result||this.View instanceof x?!this.View||void 0===this.View.itemsperpageoverride||this.View instanceof w?!this.SearchView||void 0===this.SearchView.itemsperpageoverride||this.SearchView instanceof w||(this.SearchView.__proto__=new w):this.View.__proto__=new w:this.View.__proto__=new x,this.View&&this.View instanceof x)this.setMode("report"),this.ReportValues=this.View.result,this.ReportValues&&this.reviewReportBindings();else if(this.View&&this.View instanceof w){if(this.setMode("view"),this.View.selection&&this.View.internalsearchrequest&&this.UseSelectionCache||(this.selOrDeselCache={},this.View.selection=new M([]),this.onSelectionChanged.emit(this.View.selection)),this.View.internalsearchrequest=!1,this.SavePreferences)if(this.ngControl.name)if(this.prefService){var t=this.prefService.retrieve(this.ngControl.name);t&&(this.View.columns=t.columns,this.View.column_ordering=t.column_ordering)}else console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato");else console.error("Non posso utilizzare le preference senza avere un 'name' per questa tabella");this.arrayPulsanti=this.getPagesArray(6,this.View.page,this.View.pages||1)}else this.View&&null!=this.View.length&&null!=this.View.length&&(this.setMode("array"),this.UseSelectionCache&&this.arraymodeSelection||(this.selOrDeselCache={},this.arraymodeSelection=new M([]),this.onSelectionChanged.emit(this.arraymodeSelection)),this.SearchView&&(this.arrayPulsanti=this.getPagesArray(6,this.SearchView.page,this.SearchView.pages||1)));if(this.View&&!(this.View instanceof x)){var n=this.View,i=this.viewMode&&n.itemsperpageoverride==this.defaultAllPageOverride,r=this.viewMode&&n.itemsperpageoverride!=this.defaultAllPageOverride;if(this.UseEndlessscroll=this.EndlessScroll&&(this.arrayMode||i||r&&!this.EndlessScrollOnlyForAll),this.UseEndlessscroll?(this.addedSlices=[],this.boundSubSources=this.getItemSlices(),this.TMPBoundSource=this.boundSubSources[0]?this.boundSubSources[0]:[],this.boundSubSources[0]&&this.addedSlices.push(0)):this.TMPBoundSource=this.getItemsByMode(!1,!this.internalWriteCall),this.Hierarchy&&this.assignHierarchyLevels(this.TMPBoundSource),this.calculateHash(this.TMPBoundSource),this.TMPBoundSource&&this.RowClassAssigner||this.Hierarchy)for(var o=0;o<this.TMPBoundSource.length;o++){var s=this.TMPBoundSource[o];s._rowClass=this.RowClassAssigner?this.RowClassAssigner(s):"",s._rowClass+=this.Hierarchy?" est-row-lvl-"+s.level:""}}this.postBoundSourceCalculation()},e.prototype.getItemsByMode=function(e,t,n){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!1);var i=[];return this.viewMode&&this.View instanceof w?i=this.getViewItemsBySource():this.arrayMode&&(this.UseArrayModePaging&&!n?(this.SearchView&&(this.arraymodeItemsPerPage=this.SearchView.itemsperpageoverride),t&&this.refreshPaging(this.arraymodeItemsPerPage),i=this.adaptViewToPaging()):i=this.View),e?i.filter((function(e){return e._selected})):i},e.prototype.getViewItemsBySource=function(){return this.SecondarySource?this.View.items2:this.TertiarySource?this.View.items3:this.View.items},e.prototype.getItemSlices=function(){var e=this.getItemsByMode();if(!e)return[];for(var t=[],n=Math.ceil(e.length/this.SliceSize),i=0;i<n;i++){var r=e.slice(i*this.SliceSize,i*this.SliceSize+this.SliceSize);t.push(r)}return t},e.prototype.onScroll=function(e){var t=this,n=e.target.offsetHeight,i=e.target.scrollHeight;if(e.target.scrollTop>i-n-200){var r=Math.floor(this.TMPBoundSource.length/100);this.boundSubSources[r]&&-1==this.addedSlices.indexOf(r)&&(this.calculateHash(this.boundSubSources[r]),this.TMPBoundSource=this.TMPBoundSource.concat(this.boundSubSources[r]),this.addedSlices.push(r),setTimeout((function(){t.postBoundSourceCalculation()})))}},e.prototype.postBoundSourceCalculation=function(){var e=this;this.RowContexts=[],this.OrderDirectives=[],this.lastSelectedItemID=null,this.cdr.detectChanges(),setTimeout((function(){if(e.eventuallyReviewDynamicColumns(),e.viewMode&&e.UseCustomCells){var t=e.View,n=e.EsThs?e.EsThs.toArray():[],i=e.EsTds?e.EsTds.toArray():[];e.alignColumnsIfLoadedView(t),e.refreshColumnsVisibility(n,i,t),e.alignHeadersOrdering(n,t),e.reviewColumnsList(n),e.evaluateRowThs(n),e.evaluateRowTds(n,i),e.generateDefaultOrder(t),e.applyOrdering(t,!0),e.evaluateSelection(t.items,t.selection)}else if(e.viewMode&&!e.UseCustomCells){t=e.View;e.evaluateSelection(t.items,t.selection)}else e.arrayMode&&e.arrayModeEvaluateSelection(e.View);e.boundSource=e.TMPBoundSource,e.cdr.markForCheck(),e.FirstBind=!1}))},e.prototype.evaluateSelection=function(e,t){t&&this.handleSelectionEvaluation(e,t)},e.prototype.arrayModeEvaluateSelection=function(e){0!=e.length&&this.handleSelectionEvaluation(e,this.arraymodeSelection)},e.prototype.handleSelectionEvaluation=function(e,t){for(var n=!0,i=0;i<e.length;i++){var r=e[i];this.selOrDeselCache[r.hash]&&(this.selOrDeselCache[r.hash]=r),t.all?r._selected=!this.selOrDeselCache[r.hash]:r._selected=!!this.selOrDeselCache[r.hash],n=n&&r._selected}if(this.globalCheck=n||t.all,this.canSelectAll=t.count>0&&this.SelectAll,this.arrayMode){var o=this.selectedObjects;this.finalizeSelectionInformations(t),this.selectedObjects!=o&&this.onSelectionChanged.emit(t)}},e.prototype.eventuallyReviewDynamicColumns=function(){if(this.TMPBoundSource&&0!=this.TMPBoundSource.length&&(!!this.TMPBoundSource[0].properties&&!(!this.FirstBind&&this.DynamicRowColumnsDefinition&&this.DynamicRowColumnsDefinition.length>0)))if(this.DynamicRowColumnsDefinition&&0!=this.DynamicRowColumnsDefinition.length)this.UserDefinedDynamicCols=!0;else{var e=this.TMPBoundSource[0].properties;for(var t in this.DynamicRowColumnsDefinition=[],e)this.DynamicRowColumnsDefinition.push(new y(t,t));this.UserDefinedDynamicCols=!1}},e.prototype.reviewColumnsList=function(e){var t=this;if(this.ColumnsList=[],0!=e.length)for(var n=function(n){var r=e[n];if(!r.ID||r.Internal)return"continue";if(r.OrderBy=i.OrderByColumn,i.OrderByColumn&&r.Orderable){var o=r.onOrderChange.subscribe((function(e){t.thOrderChanged(r.ID,e)}));i.EsThsOrderChangeSubscriptions.push(o)}(i.HiddenColumns||r.Visible)&&i.ColumnsList.push(new D(r.ID,r.Description,r.Visible))},i=this,r=0;r<e.length;r++)n(r)},e.prototype.alignColumnsIfLoadedView=function(e){var t=this,n=e.savedstate,i=[];if(this.ColumnsList&&0!=this.ColumnsList.length){if(this.ColumnsList.forEach((function(t){var n=e.columns.filter((function(e){return e==t.id}));t.visible&&0==e.columns.length?i.push(t.id):1!=n.length||t.visible?0==n.length&&t.visible&&(t.visible=!1):t.visible=!0})),0==e.columns.length&&(e.columns=i),e.savedstate&&this.ColumnsOrdering&&e.column_ordering.length>0){var r=[];e.column_ordering.forEach((function(e){t.ColumnsList.forEach((function(t){t.id==e&&r.push(t)}))})),this.ColumnsList=r}e.savedstate=!1,n&&this.changed()}},e.prototype.thOrderChanged=function(e,t){if(this.viewMode){if(this.OrderByColumn){var n=this.View,i=!0,r=null;n.orders||(n.orders=[]);for(var o=0;o<n.orders.length;o++){var s=n.orders[o];s.id==e&&(t?(s.order=t,i=!1):r=o)}null!=r?n.orders.splice(r,1):i&&(this.MultipleOrderingDirectives?n.orders.push(new v(e,t)):n.orders=[new v(e,t)]),this.onOrderChanged.emit({id:e,order:t}),this.emitSearchRequest(!1)}}else console.warn("Order changed on a table not in viewMode. Operation not supported")},e.prototype.emitSearchRequest=function(e){this.viewMode&&(this.View.internalsearchrequest=!0,this.changed()),this.researchInProgress=!0,this.onSearchRequest.emit(e)},e.prototype.refreshColumnsVisibility=function(e,t,n){for(var i={},r=[],o=0;o<this.ColumnsList.length;o++){var s=this.ColumnsList[o];i[s.id]=s,s.visible&&r.push(s.id)}if(n.columns=r,e)for(var a=0;a<e.length;a++){var l=e[a];l.Internal||(l.Visible=i[l.ID]?i[l.ID].visible:l.Visible)}if(t)for(a=0;a<t.length;a++){var c=t[a];c.Internal||(c.Visible=i[c.ID]?i[c.ID].visible:c.Visible)}this.changed()},e.prototype.alignHeadersOrdering=function(e,t){for(var n=function(n){var i=e[n];if(i.Internal)return"continue";i.Order=null,t.orders.forEach((function(e){e.id==i.ID&&(i.Order=e.order)}))},i=0;i<e.length;i++)n(i)},e.prototype.evaluateRowTds=function(e,t){if(0!=t.length){for(var n={},i=0;i<e.length;i++){(a=e[i]).Internal||(n[a.ID]=a)}this.TMPRowTDs={};for(i=0;i<t.length;i++){var r=t[i];if(!r.Internal){if(!!!n[r.ID])throw"ID dell'oggeto EsTd non compatibile con gli ID dicharati negli EsTh: "+r.ID;n[r.ID].Referenced=!0;var o={ID:r.ID,Visible:r.Visible,Class:r.Class,Content:r.Content,RouterLink:r.RouterLink};this.TMPRowTDs[r.Context]?this.TMPRowTDs[r.Context].push(o):(this.RowContexts.push(r.Context),this.TMPRowTDs[r.Context]=[o])}}var s=[];for(i=0;i<e.length;i++){var a;(a=e[i]).Referenced||s.push(a.ID)}if(s.length>0)throw"L'ID di uno o più EsTh non hanno alcun EsTd associato: "+s.join(", ")}},e.prototype.evaluateRowThs=function(e){if(0!=e.length){this.TMPRowTHs=[];for(var t=0;t<e.length;t++){var n=e[t];n.Internal||this.TMPRowTHs.push({ID:n.ID,Visible:n.Visible,Class:n.Class,Content:n.Description,Order:n.Order,Orderable:n.Orderable})}}},e.prototype.generateDefaultOrder=function(e){if(0!=this.TMPRowTHs.length)if(e.column_ordering&&0!=e.column_ordering.length)this.OrderDirectives=e.column_ordering;else for(var t=0;t<this.TMPRowTHs.length;t++)this.OrderDirectives.push(this.TMPRowTHs[t].ID)},e.prototype.applyOrdering=function(e,t){var n=this,i=[];this.OrderDirectives.forEach((function(e){var t=n.TMPRowTHs.filter((function(t){return t.ID==e}))[0];i.push(t)})),this.TMPRowTHs=i;for(var r=function(e){var t=o.TMPRowTDs[o.RowContexts[e]],n=[];o.OrderDirectives.forEach((function(e){var i=t.filter((function(t){return t.ID==e}))[0];n.push(i)})),o.TMPRowTDs[o.RowContexts[e]]=n},o=this,s=0;s<this.RowContexts.length;s++)r(s);t&&(this.RowTDs=this.TMPRowTDs,this.RowTHs=this.TMPRowTHs),e.column_ordering=this.OrderDirectives,this.changed()},e.prototype.sendUp=function(e){var t=this.TMPColumnsList.indexOf(e);this.utiExts.swap(this.TMPColumnsList,t,t-1),this.TMPColumnsList=JSON.parse(JSON.stringify(this.TMPColumnsList))},e.prototype.sendDown=function(e){var t=this.TMPColumnsList.indexOf(e);this.utiExts.swap(this.TMPColumnsList,t,t+1),this.TMPColumnsList=JSON.parse(JSON.stringify(this.TMPColumnsList))},e.prototype.columnClicked=function(e){this.lastSelectedItemID=e.id,this.HiddenColumns&&(e.visible=!e.visible,this.updateGlobalColVisCheck())},e.prototype.resetColumnVisSelection=function(){var e=this;this.TMPColumnsList=JSON.parse(JSON.stringify(this.ColumnsList));var t=[];this.ColumnsOrdering&&(this.OrderDirectives.forEach((function(n){var i=e.TMPColumnsList.filter((function(e){return e.id==n}))[0];i&&t.push(i)})),this.TMPColumnsList=t),this.updateGlobalColVisCheck()},e.prototype.refreshColumnOrdering=function(){this.OrderDirectives=[];for(var e=0;e<this.ColumnsList.length;e++)this.OrderDirectives.push(this.ColumnsList[e].id)},e.prototype.updateGlobalColVisCheck=function(){this.globalColVisCheck=this.TMPColumnsList.every((function(e){return e.visible}))},e.prototype.confirmColumnVisibilitySelection=function(){var e=this;if(this.TMPColumnsList.every((function(e){return!e.visible})))return!1;var t=this.View;if(this.ColumnsList=JSON.parse(JSON.stringify(this.TMPColumnsList)),this.refreshColumnOrdering(),this.refreshColumnsVisibility(null,null,t),this.applyOrdering(t,!1),this.SavePreferences){if(!this.ngControl.name)return console.error("Non posso utilizzare le preference senza avere un 'name' per la tabella"),!1;if(!this.prefService)return console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato"),!1;var n={columns:JSON.parse(JSON.stringify(t.columns)),column_ordering:JSON.parse(JSON.stringify(t.column_ordering))};this.prefService.store(this.ngControl.name,n)}return setTimeout((function(){e.emitSearchRequest(!1)})),this.lastSelectedItemID=null,!0},e.prototype.globalColVisCheckChanged=function(){var e=this;this.TMPColumnsList.forEach((function(t){t.visible=e.globalColVisCheck}))},e.prototype.assignHierarchyLevels=function(e){if(e&&e.length)if(this.ParentKey||this.OwnKey||(void 0!==e[0].parentid&&(this.ParentKey="parentid"),void 0!==e[0].id&&(this.OwnKey="id")),this.ParentKey&&this.OwnKey){var t=1,n=0;do{n=this.assignLevel(e,t),t++}while(n>0)}else console.error("Per utilizzare il sistema in modalità gerarchica è obbligatorio specificare sia ParentKey che OwnKey. Fallback a sistema non gerarchico")},e.prototype.assignLevel=function(e,t){for(var n=0,i=0;i<e.length;i++){var r=e[i];if(r[this.ParentKey]||1!=t){if(r[this.ParentKey]&&t>1)for(var o=0;o<e.length;o++){var s=e[o];if(s[this.OwnKey]==r[this.ParentKey]&&s.level==t-1){r.level=t,s.expanded=this.StartsExpanded,s.parent=!0,r.visible=this.StartsExpanded,n++;break}}}else r.level=1,r.visible=!0,r.expanded=this.StartsExpanded,n++}return n},e.prototype.expandParent=function(e){for(var t=0;t<this.boundSource.length;t++){var n=this.boundSource[t];if(n[this.OwnKey]==e){n.expanded=!0;for(var i=0;i<this.boundSource.length;i++){var r=this.boundSource[i];r[this.ParentKey]==e&&(r.visible=!0)}return}}},e.prototype.collapseParent=function(e){for(var t=0;t<this.boundSource.length;t++){var n=this.boundSource[t];if(n[this.OwnKey]==e)return n.expanded=!1,void this.collapseChildOfParent(e)}},e.prototype.collapseChildOfParent=function(e){for(var t=0;t<this.boundSource.length;t++){var n=this.boundSource[t];n[this.ParentKey]!=e||n.parent?n[this.ParentKey]==e&&n.parent&&(n.expanded=!1,n.visible=!1,this.collapseChildOfParent(n[this.OwnKey])):n.visible=!1}},e.prototype.globalCheckChanged=function(e){void 0===e&&(e=null);var t=this.getItemsByMode(),n=this.handleItemsSelection(t,e,this.globalCheck);this.changed(),this.onSelectionChanged.emit(n)},e.prototype.handleItemsSelection=function(e,t,n){var i,r;void 0===t&&(t=null),void 0===n&&(n=null);var o=(null===(i=this.View)||void 0===i?void 0:i.selection)||this.arraymodeSelection;if(this.SingleSelection&&(null===(r=e[0])||void 0===r?void 0:r._selected)){if(e.length>0&&null==t)throw"Tentativo di selezionare o deselezionare più di un elemento con SingleSelection attivo";1==e.length&&null==t&&(o=this.handleItemsSelection(this.getItemsByMode(),!1,null))}for(var s=0;s<e.length;s++){var a=e[s];(null!=t?a._selected!=t:null!=n&&a._selected!=this.globalCheck)&&!a.locked&&(a._selected=null!=t?t:this.globalCheck),o.all?a._selected&&this.selOrDeselCache[a.hash]?(o.exclusions.splice(o.exclusions.indexOf(this.selOrDeselCache[a.hash]),1),delete this.selOrDeselCache[a.hash]):a._selected||this.selOrDeselCache[a.hash]||(this.selOrDeselCache[a.hash]=a,o.exclusions.push(a)):a._selected&&!this.selOrDeselCache[a.hash]?(this.selOrDeselCache[a.hash]=a,o.items.push(a)):!a._selected&&this.selOrDeselCache[a.hash]&&(o.items.splice(o.items.indexOf(this.selOrDeselCache[a.hash]),1),delete this.selOrDeselCache[a.hash])}return null==n&&(this.globalCheck=!e.some((function(e){return!e._selected}))&&!this.getItemsByMode().some((function(e){return!e._selected}))),this.finalizeSelectionInformations(o),o},e.prototype.finalizeSelectionInformations=function(e){e.count=this.evaluateSelected(),0==e.count&&e.all&&(e.all=!1,e.exclusions=[],e.items=[],this.selOrDeselCache={}),this.canSelectAll=e.count>0&&this.SelectAll},e.prototype.handleClick=function(e,t){if(("Range"==e.view.getSelection().type||e.view.getSelection().toString().length>0)&&!e.shiftKey)return!1;("Range"==e.view.getSelection().type||e.view.getSelection().toString().length>0)&&e.shiftKey&&this.utiExts.clearTextSelection();var n=[];if(e.shiftKey&&this.ShiftClick&&!this.SingleSelection)for(var i=!1,r=this.getItemsByMode(),o=0;o<r.length;o++){var s=r[o];i&&(s._selected=!0,n.push(s)),s!=t&&s!=this.lastSelected||i?s!=t&&s!=this.lastSelected||!i||(i=!1):(i=!0,s._selected=!0,n.push(s))}else t._selected=!t._selected,this.lastSelected=t,n.push(t);var a=this.handleItemsSelection(n);return this.changed(),this.onSelectionChanged.emit(a),!0},e.prototype.evaluateSelected=function(){var e,t=(null===(e=this.View)||void 0===e?void 0:e.selection)||this.arraymodeSelection;return this.selectedObjects=t.all?(this.View.objectcount||this.View.length)-t.exclusions.length:t.items.length,this.selectedObjects},e.prototype.selectAllOrResetSelection=function(){var e=this.View.selection||this.arraymodeSelection;this.selOrDeselCache={},e.all=!e.all,e.exclusions=[],e.items=[],e.all||(this.canSelectAll=!1,this.globalCheck=!1),this.finalizeSelectionInformations(e),this.onSelectionChanged.emit(e),this.evaluateSelection(this.viewMode?this.View.items:this.View,e)},e.prototype.addToPage=function(e){(this.View instanceof w||this.SearchView instanceof w||this.View instanceof x)&&this.goToPage((this.SearchView||this.View).page+e)},e.prototype.goToPage=function(e){if(this.View instanceof w||this.SearchView instanceof w||this.View instanceof x){var t=this.SearchView||this.View;0===e||e>t.pages||(t.page=e,this.arrayPulsanti=this.getPagesArray(6,t.page,t.pages),this.emitSearchRequest(!1))}},e.prototype.onItemsPerPageChanged=function(){this.emitSearchRequest(!0)},e.prototype.tryExport=function(e){var t=this;this.ExportFunction&&(this.reportMode?this.ExportFunction(e):this.ExportFunction((function(e,n){void 0===n&&(n=!1),n||(t.setupExport(e),t.cdr.detectChanges(),setTimeout((function(){t.exportDownloader.nativeElement.click()})))})))},e.prototype.setupExport=function(e){var t=this.DynamicRowColumnsDefinition;this.headers=t&&t.length>0?this.expExts.setupForGenericExport(e,t.map((function(e){return{label:e.description,key:e.propertyName,order:e.columnOrder}}))):this.expExts.setupForExport(e),this.data=e},e.prototype.setupNextOrderAndSearch=function(e){if(this.View instanceof x){var t,n={NONE:"DESC",DESC:"ASC",ASC:null}[e.order||"NONE"];e.order=n;var i=this.View.orders?this.View.orders.filter((function(t){return t.column==e.id})):[];0==i.length&&e.order?((t=new S).column=e.id,t.order=e.order,this.View.orders||(this.View.orders=[]),this.View.orders.push(t)):1==i.length?e.order?i[0].order=e.order:i=[]:console.warn("Impossibile settare ordinamento. Colonna "+e.id+" direttive di ordinamento "+i.length+" ordinamento scelto "+e.order),this.emitSearchRequest(!1)}else console.error("View diversa da reportdefinition entrata nel metodo setupNextOrderAndSearch")},e.prototype.reviewReportBindings=function(){var e=this;if(this.View instanceof x){this.View.orders&&this.View.orders.length>0&&this.View.orders.forEach((function(t){e.ReportValues.columns.filter((function(e){return e.id==t.column}))[0].order=t.order})),-2!=this.ReportValues.count?this.previousCount=this.ReportValues.count:-2==this.ReportValues.count&&(this.ReportValues.count=this.previousCount);var t=this.View.itemsperpageoverride||15;this.View.pages=Math.ceil(this.ReportValues.count/t),this.arrayPulsanti=this.getPagesArray(6,this.View.page,this.View.pages)}else console.error("View diversa da reportdefinition entrata nel metodo reviewReportBindings")},e.prototype.autoUpdateChanged=function(){var e=this;/^[1-9]\d*$/.test(this.seconds)||(this.seconds="10");var t=1e3*parseInt(this.seconds,null);this.autoUpdate?this.updateTimer=setInterval((function(){e.emitSearchRequest(!1)}),t):clearInterval(this.updateTimer)},e.prototype.dynamicOperation=function(e,t){this.onDynamicOperation.emit({id:t,item:e})},e.prototype.generateRouterLink=function(e,t,n){if(this.DynamicTableRouterLinkCache[n.hash+e])return this.DynamicTableRouterLinkCache[n.hash+e];var i=this.getRouterLink(e,t,n);return this.DynamicTableRouterLinkCache[n.hash+e]=i,i},e.prototype.getRouterLink=function(e,t,n){for(var i=0;i<t.length;i++)e=e.replace("{"+i+"}",n.properties[t[i]]);return e=e.replace(/'/g,'"').replace(/ /g,""),JSON.parse(e)},e.prototype.arrayAddToPage=function(e){this.arrayGoToPage(this.arraymodePage+e)},e.prototype.arrayGoToPage=function(e){0===e||e>this.arraymodePages||(this.arraymodePage=e,this.internalWriteValue())},e.prototype.refreshPaging=function(e){this.arraymodeItemsPerPage=e,this.arraymodePages=Math.ceil(this.View.length/this.arraymodeItemsPerPage),this.arraymodePage=1,this.internalWriteValue()},e.prototype.adaptViewToPaging=function(){var e=[];this.arrayPulsanti=this.getPagesArray(6,this.arraymodePage,this.arraymodePages);for(var t=(this.arraymodePage-1)*this.arraymodeItemsPerPage;t<this.arraymodePage*this.arraymodeItemsPerPage;t++)t<=this.View.length-1&&e.push(this.View[t]);return e},e.prototype.cellClicked=function(e,t){return!(!this.UseCustomCellActions||-1==this.CustomCellActionsOn.split("$").indexOf(e))&&(this.onCellClick.emit({column:e,model:t}),!0)},e.prototype.cornerActionClicked=function(e){this.onCornerAction.emit({id:e,estable:this})},e.prototype.setMode=function(e){this.viewMode="view"==e,this.arrayMode="array"==e,this.reportMode="report"==e,this.reportMode&&(this.XLSXExport=!0,this.CSVExport=!1)},e.prototype.internalWriteValue=function(){this.internalWriteCall=!0,this.writeValue(this.View),this.internalWriteCall=!1},e.prototype.getPagesArray=function(e,t,n){var i,r,o=[];if(-1==n&&(n=t+1),n<=e)i=1,r=n-1;else{var s=(e-2)/2;r=t+s,(i=t-s)<1?(i=1,r=e-1):r>=n&&(i=n-e+1,r=n-1)}if(o.push({val:1,cssClass:1===t?"btn-main app-white-text":"app-white-button"}),r>=i){for(var a=i;a<=r;a++)1!==a&&o.push({val:a,cssClass:a===t?"btn-main app-white-text":"app-white-button"});o.push({val:n,cssClass:n===t?"btn-main app-white-text":"app-white-button"})}return o},e.prototype.calculateHash=function(e){if(e)for(var t={},n=0;n<e.length;n++){var i=e[n];delete i._selected,delete i.hash;var r=this.hashExts.hashObject(i);t[r]=t[r]?t[r]+1:1,i.hash=r+(t[r]>1?"_"+t[r]:"")}},e.prototype.forceRefresh=function(){var e,t;this.arrayMode&&(e=this.arraymodePage,t=this.arraymodeItemsPerPage),this.writeValue(this.View),this.cdr.detectChanges(),this.arrayMode&&(this.arraymodeItemsPerPage=t,this.arrayGoToPage(e))},e}();k.decorators=[{type:t.Component,args:[{selector:"es-table",viewProviders:[{provide:r.LocalizationService,useClass:E}],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>\r\n\r\n\x3c!--\r\nI TH sono contenuto statico, questo significa che senza condizione per RowTHs arriverebbero sia qui sia nell ng-container dell\'header in fase non inizializzata, duplicando fisicamente le colonne.\r\nPer ovviare al problema, questo pezzo lo faccio apparire solo se ci sono già dei RowTHs, quindi su valorizzazione della View succederà:\r\n1) appaiono i th nell\' ng-container dell\'header, e NON qui\r\n2) i TH vengono presi, elaborati e trasformati in RowTHs\r\n3) l\'ng-container dell\'header sparisce (per la condizione !UseCustomCells || !RowTHs) e qui appaiono i nuovi TH (che poi sono gli stessi di prima che girano)\r\n4) Vengono presi i nuovi TH da qui e trasformati a loro volta in RowTHs\r\n--\x3e\r\n<div hidden *ngIf="UseCustomCells && RowTHs">\r\n <ng-container *ngIf="View">\r\n \x3c!--Qui invece ci sono tutti i TH--\x3e\r\n <ng-container *ngTemplateOutlet="templateRefHeader"></ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n\x3c!--\r\nQuesta parte è un po\' più semplice del sopra. Infatti i TD vengono sì bindati in entrambi i punti (qui e nell\'ng-container del body), ma avrò le TD statiche prima di generare la TMPBoundSource.\r\nQuesto significa che il workflow di binding sarà:\r\n1) Appaiono i TD statici nel body e NON qui, perché i TMPBoundSource non sono ancora stati emessi\r\n2) Contemporaneamente all\'emissione dei TMPBoundSource vengono anche emessi i RowTds\r\n3) Considerando il punto 2, al giro dopo appariranno i TD qui, perché è stata generata la TMPBoundSource, e spariranno contemporaneamente dall\'ng-container del body (per la condizione !UseCustomCells || !RowTDs)\r\n--\x3e\r\n<div hidden *ngIf="UseCustomCells">\r\n <ng-container *ngIf="View">\r\n \x3c!--Tutti i TD che dopo verranno presi ed elaborati internamente--\x3e\r\n <ng-container *ngFor="let item of TMPBoundSource">\r\n <ng-container *ngTemplateOutlet="templateRef; context : {$implicit: item}"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-container *ngIf="View">\r\n <div *ngIf="FirstBind && ShowLoadingOnBootstrap" class="est-loading-box">\r\n <div class="est-loading-content">\r\n <span class="fa fa-spinner fa-spin"></span> {{\'Performing Table bootstrap\' | localize: lc}}...\r\n </div>\r\n </div>\r\n\r\n <div class="table-responsive datatable {{Class}}" [class.est-scrollable]="UseEndlessscroll" (scroll)="UseEndlessscroll && onScroll($event)" [style.max-height.px]="MaxHeight">\r\n <table class="{{ TableClass }}" [class.est-high-density]="HighCellDensity">\r\n <thead [hidden]="HeaderHidden || FirstBind">\r\n\r\n \x3c!-- Aggiungo il pezzo che gestisce la selezione di tutto se attivo da config --\x3e\r\n <tr *ngIf="SelectAll">\r\n <th colspan="42" [class.est-hidden]="!canSelectAll && !(View?.selection || arraymodeSelection).all">\r\n <span>{{ (selectedObjects || 0).toString() + \' \' + ((selectedObjects == 1 ? \'Object Selected\' : \'Objects Selected\') | localize : lc) }}</span> \r\n <span class="app-link app-inline" (click)="selectAllOrResetSelection()">{{ (View?.selection || arraymodeSelection).all ? (\'Reset Selection\' | localize : lc) : (\'Select Everything\' | localize : lc)}}</span>\r\n </th>\r\n </tr>\r\n\r\n \x3c!-- Blocco header group --\x3e\r\n <tr *ngIf="HasHeaderGroup">\r\n <ng-container *ngTemplateOutlet="templateRefHeaderGroup"></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="templateRefSecondaryHeaderGroup"></ng-container>\r\n <th *ngIf="Export"></th>\r\n </tr>\r\n\r\n \x3c!-- Blocco effettivo degli header --\x3e\r\n <tr>\r\n \x3c!-- Aggiungo una checkbox se la selezione è attiva --\x3e\r\n <th class="est-col-min" *ngIf="Selection">\r\n <input *ngIf="!SingleSelection" class="est-pointer" type="checkbox" [disabled]="SelectionDisabled" [(ngModel)]="globalCheck" [ngModelOptions]="{\'standalone\': true}" (ngModelChange)="globalCheckChanged();">\r\n </th>\r\n\r\n \x3c!-- Header che valgono per view mode e array mode, mostro solo su DisplayReady per evitare di far flashare in modo brutto --\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="templateRefHeader"></ng-container>\r\n </ng-container>\r\n\r\n \x3c!-- Se ho un modello dinamico dell\'oggetto creo le colonne in base alle proprietà --\x3e\r\n <ng-container *ngIf="(!UseCustomCells || !RowTHs) && DynamicRowColumnsDefinition">\r\n <ng-container *ngFor="let operation of DynamicOperations">\r\n <th class="est-col-min est-no-side-padding"></th>\r\n </ng-container>\r\n \r\n <ng-container *ngFor="let rowHeader of DynamicRowColumnsDefinition">\r\n <ng-container *ngIf="rowHeader.visible">\r\n <th *ngIf="OrderByColumn" es-th="{{rowHeader.propertyName}}" class="{{UserDefinedDynamicCols ? rowHeader.clss : \'est-nowrap\'}}" [Order]="rowHeader.dataOrder" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.orderable" [Internal]="false" [OrderBy]="OrderByColumn" [SearchInProgress]="!!researchInProgress" (onOrderChange)="thOrderChanged(rowHeader.propertyName, $event)">{{rowHeader.description}}</th>\r\n <th *ngIf="!OrderByColumn" es-th="{{rowHeader.propertyName}}" class="{{UserDefinedDynamicCols ? rowHeader.clss : \'est-nowrap\'}}" [Order]="rowHeader.dataOrder" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.orderable" [Internal]="false" [OrderBy]="OrderByColumn">{{rowHeader.description}}</th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n \x3c!-- Se non ho un modello dinamico ma invece delle celle custom, genero gli header in base ai row th --\x3e\r\n <ng-container *ngIf="UseCustomCells && RowTHs">\r\n <ng-container *ngFor="let rowHeader of RowTHs">\r\n <ng-container *ngIf="rowHeader && rowHeader.Visible">\r\n <th *ngIf="OrderByColumn" es-th="{{rowHeader.ID}}" class="{{rowHeader.Class}}" [Order]="rowHeader.Order" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.Orderable" [Internal]="true" [OrderBy]="OrderByColumn" [SearchInProgress]="!!researchInProgress" (onOrderChange)="thOrderChanged(rowHeader.ID, $event)">{{rowHeader.Content}}</th>\r\n <th *ngIf="!OrderByColumn" es-th="{{rowHeader.ID}}" class="{{rowHeader.Class}}" [Order]="rowHeader.Order" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.Orderable" [Internal]="true" [OrderBy]="OrderByColumn">{{rowHeader.Content}}</th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n \x3c!--Casistica in cui ho il setup proveniente da un report. Gli header sono definiti da come è fatto il report--\x3e\r\n <ng-container *ngIf="reportMode">\r\n <th [style.color]="clm.color" *ngFor="let clm of ReportValues.columns" class="app-no-selection app-pointer est-nowrap" (click)="setupNextOrderAndSearch(clm)">\r\n {{clm.description}}\r\n <span class="fa" [class.fa-chevron-down]="clm.order == \'DESC\'" [class.fa-chevron-up]="clm.order == \'ASC\'"></span>\r\n </th>\r\n </ng-container>\r\n\r\n \x3c!--Per l\'eliminazione mi serve un header aggiuntivo--\x3e\r\n <th *ngIf="Removal" [class.app-right-10]="Export || HiddenColumns" class="est-col-min app-sticky-last-column"><span class="fa fa-trash"></span></th>\r\n\r\n \x3c!--Per l\'esportazione mi serve l\'header extra da cui faccio uscire i 3 pallocchi--\x3e\r\n <th *ngIf="Export || HiddenColumns || ColumnsOrdering || CornerMenuOptions" class="app-table-dotted-menu app-sticky-last-column est-col-min text-sm-center">\r\n \r\n \x3c!-- Link nascosto che serve a scaricare il file --\x3e\r\n <a *ngIf="headers" hidden #exportDownloader csvLink [data]="data" [headers]="headers" [delimiter]="\';\'" [filename]="ExportFileName"></a>\r\n\r\n \x3c!-- Blocco con i 3 pallocchi che tira fuori il context menu delle operazioni --\x3e\r\n <div class="btn-group" container="body" placement="bottom right" dropdown #dropdown="bs-dropdown" [autoClose]="true">\r\n <span dropdownToggle class="fa fa-ellipsis-v app-fs-18 app-pointer app-padding-3"></span>\r\n\r\n <div *dropdownMenu class="dropdown-menu dropdown-menu-right app-bring-to-front-strong">\r\n <div class="est-pointer">\r\n <a class="dropdown-item" *ngIf="(HiddenColumns || ColumnsOrdering)" (click)="resetColumnVisSelection(); changeColumnVisibilityModal.show();">\r\n <ng-container *ngIf="!HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Order\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && !ColumnsOrdering">\r\n {{\'Columns Visibility\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Visibility and Order\' | localize : lc}}\r\n </ng-container>\r\n </a>\r\n <a class="dropdown-item" *ngIf="Export && CSVExport" (click)="tryExport(\'CSV\')">{{\'Export View\' | localize : lc}} (CSV)</a>\r\n <a class="dropdown-item" *ngIf="Export && XLSXExport" (click)="tryExport(\'XLSX\')">{{\'Export View\' | localize : lc}} (XLSX)</a>\r\n <a class="dropdown-item" *ngFor="let option of CornerMenuOptions" (click)="cornerActionClicked(option.id)">{{option.description}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n </tr>\r\n </thead>\r\n \r\n \x3c!-- Valido per modalità View o Array. Se sono in report mode il body è creato in altro modo, mostro solo su DisplayReady per evitare di far flashare in modo brutto --\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; context: { $implicit: { sel: Selection }}"></ng-container>\r\n </ng-container>\r\n </tbody>\r\n\r\n \x3c!-- Per la modalità a report c\'è un body particolare semi-dinamico --\x3e\r\n <tbody [hidden]="BodyHidden" *ngIf="reportMode">\r\n <tr *ngFor="let row of ReportValues.rows; let even = even;">\r\n <td class="est-nowrap" *ngFor="let val of row.values">{{val}}</td>\r\n <td class="app-sticky-last-column{{even && !Hierarchy ? \'-alt\' : \'\'}}"></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n <ng-container *ngIf="ShowPaging && !FirstBind">\r\n\r\n \x3c!-- Paginatore dove appare la count e le opzioni di paginazione --\x3e\r\n <div class="pull-left m-t-min-3">\r\n <ng-container *ngIf="viewMode">\r\n <ng-container *ngTemplateOutlet="pagerSelector; context: { $implicit: { ShowCount: !HidePagingCount || (View && View.objectcount && View.objectcount != -1), ShowPaging: !HidePaging, View: View, UsesView: true }}"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="arrayMode && (!UseArrayModePaging || SearchView)">\r\n <ng-container *ngTemplateOutlet="pagerSelector; context: { $implicit: { ShowCount: !HidePagingCount || (View && View.length) || (SearchView && SearchView.objectcount && SearchView.objectcount != -1), ShowPaging: !HidePaging && SearchView, View: SearchView, SecondaryView: View, UsesView: true }}"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="arrayMode && (UseArrayModePaging && !SearchView)">\r\n <ng-container *ngTemplateOutlet="pagerSelector; context: { $implicit: { ShowCount: !HidePagingCount, ShowPaging: !HidePaging && View.length > 10, View: View, UsesView: false }}"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="reportMode">\r\n <ng-container *ngTemplateOutlet="pagerSelector; context: { $implicit: { ShowCount: !HidePagingCount || (View && View.objectcount && View.objectcount != -1), ShowPaging: View.pagingavailable, MightBeNoPaging: true, View: View, Report: ReportValues, UsesView: true }}"></ng-container>\r\n </ng-container>\r\n </div>\r\n \r\n \x3c!-- Pulsanti avanti-indietro di paginazione --\x3e\r\n <div class="pull-right btn-toolbar" *ngIf="ShowPaging && !HidePagingButtons">\r\n <ng-container *ngIf="(!reportMode || View?.pagingavailable) && (!arrayMode || SearchView)">\r\n <ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { ATP: addToPage.bind(this), GTP: goToPage.bind(this), Array: arrayPulsanti }}"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="arrayMode && UseArrayModePaging && !SearchView">\r\n <ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { ATP: arrayAddToPage.bind(this), GTP: arrayGoToPage.bind(this), Array: arrayPulsanti }}"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class="clearfix"></div>\r\n </ng-container>\r\n</ng-container>\r\n\r\n\x3c!-- Template che contiene i pulsanti per cambiare pagina --\x3e\r\n<ng-template #pagingButtons let-options>\r\n <a class="btn app-white-button app-no-margin" (click)="options.ATP(-1)"><span class="fa fa-chevron-left"></span></a>\r\n <div *ngIf="options.Array" class="app-inline">\r\n <a *ngFor="let p of options.Array" class="btn {{p.cssClass}} app-no-margin" (click)="options.GTP(p.val)">{{p.val}}</a>\r\n </div>\r\n <a class="btn app-white-button app-no-margin" (click)="options.ATP(1)"><span class="fa fa-chevron-right"></span></a>\r\n</ng-template>\r\n\r\n\x3c!-- Template che mostra le informazioni base di paginazione: conteggio oggetti, paginazione attuale e pulsanti per cambiarla --\x3e\r\n<ng-template #pagerSelector let-options>\r\n <div *ngIf="options.ShowCount">\r\n {{ CountLabel }}: \r\n <strong *ngIf="options.UsesView && !options.Report">\r\n {{ options.View?.objectcount ? options.View.objectcount : options.SecondaryView && options.SecondaryView.length ? options.SecondaryView.length : "0" }}\r\n </strong>\r\n <strong *ngIf="!options.UsesView && !options.Report">\r\n {{ options.View.length ? options.View.length : "0" }}\r\n </strong>\r\n <strong *ngIf="options.Report">\r\n {{ options.Report.count && options.Report.count == -1 ? options.Report.rows.length : options.Report.count && options.Report.count > 0 ? options.Report.count : 0 }}\r\n </strong>\r\n </div>\r\n <div *ngIf="options.ShowPaging">\r\n <app-paging *ngIf="!options.UsesView" [Hidden]="!options.View || options.View.length == 0" [WarnOnAll]="false" [CurrentPageSize]="arraymodeItemsPerPage" (pagingSelected)="refreshPaging($event)"></app-paging>\r\n <app-paging *ngIf="options.UsesView" [AllSearch]="AllSearch" [DefaultAll]="defaultAllPageOverride" [View]="options.View" (pagingSelected)="options.View.itemsperpageoverride = $event; changed(); onItemsPerPageChanged();"></app-paging>\r\n </div>\r\n <div *ngIf="options.MightBeNoPaging && !options.ShowPaging">\r\n <em>{{\'Paging options are not available for this report\' | localize: lc}}</em>\r\n </div>\r\n</ng-template>\r\n\r\n\x3c!-- Questi due template rappresentano effettivamente il body della tabella. essendo il tr l\'unica cosa che davvero cambia, il resto è templatizzato --\x3e\r\n<ng-template #TBodySelection let-templateOptions>\r\n <ng-container *ngFor="let item of boundSource; let even = even; let i=index;">\r\n <tr *ngIf="item.visible || !Hierarchy" \r\n [class]="item._rowClass ? item._rowClass : \'\'" [class.est-line-through]="item.removed || item.deleted" [class.est-pointer]="!item.locked" [class.est-white-selected]="item._selected && !item.locked"\r\n [contextMenu]="!item.locked ? (ContextMenu || emptyMenu) : emptyMenu" [contextMenuSubject]="item"\r\n (click)="!item.locked && handleClick($event, item)">\r\n \r\n <td *ngIf="!item.locked"><input type="checkbox" [disabled]="templateOptions.selDisabled" [class.est-pointer]="!item.locked" [(ngModel)]="item._selected" name="check{{i}}"></td>\r\n <td *ngIf="item.locked"></td>\r\n\r\n <ng-container *ngTemplateOutlet="basicColumns; context: { $implicit: { item: item }}"></ng-container>\r\n <ng-container *ngTemplateOutlet="dynamicColumns; context: { $implicit: { item: item }}"></ng-container>\r\n <ng-container *ngTemplateOutlet="customCells; context: { $implicit: { item: item }}"></ng-container>\r\n <ng-container *ngTemplateOutlet="bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}"></ng-container>\r\n\r\n </tr>\r\n </ng-container>\r\n</ng-template> \r\n\r\n<ng-template #TBody let-templateOptions>\r\n <ng-container *ngFor="let item of boundSource; let even = even;">\r\n <tr *ngIf="item.visible || !Hierarchy" [class]="item._rowClass ? item._rowClass : \'\'" [class.est-line-through]="item.removed || item.deleted">\r\n\r\n <ng-container *ngTemplateOutlet="basicColumns; context: { $implicit: { item: item }}"></ng-container>\r\n <ng-container *ngTemplateOutlet="dynamicColumns; context: { $implicit: { item: item }}"></ng-container>\r\n <ng-container *ngTemplateOutlet="customCells; context: { $implicit: { item: item }}"></ng-container>\r\n <ng-container *ngTemplateOutlet="bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}"></ng-container>\r\n\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\x3c!-- Questo template contiene la print condizionale su tabelle semplici, con header e body scritti a manazza --\x3e\r\n<ng-template #basicColumns let-options>\r\n <ng-container *ngIf="(!UseCustomCells || !RowTDs) && !DynamicRowColumnsDefinition">\r\n <ng-container *ngTemplateOutlet="templateRef; context : {$implicit: options.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-options>\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 || (options.item.properties[operation.conditionField] == operation.conditionValue)">\r\n <td [class.est-no-right-padding]="last" [class.est-no-left-padding]="!first" class="est-col-min"><span title="{{operation.title}}" class="{{operation.iconClass}} app-pointer" (click)="dynamicOperation(options.item, operation.id)">{{operation.text}}</span></td>\r\n </ng-container>\r\n <ng-container *ngIf="operation.conditionField && (options.item.properties[operation.conditionField] != operation.conditionValue)">\r\n <td class="est-col-min est-no-side-padding"></td>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor="let rowItem of DynamicRowColumnsDefinition">\r\n <ng-container *ngIf="rowItem.routePath && rowItem.visible">\r\n <td es-td="{{rowItem.propertyName}}" class="{{UserDefinedDynamicCols ? rowItem.clss : \'est-nowrap\'}}" [Internal]="false">\r\n <a [routerLink]="generateRouterLink(rowItem.routePath, rowItem.routeParameterProperties, options.item)" class="app-link" [innerHTML]="options.item.properties[rowItem.propertyName]"></a>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf="!rowItem.routePath && rowItem.visible">\r\n <td es-td="{{rowItem.propertyName}}" class="{{UserDefinedDynamicCols ? rowItem.clss : \'est-nowrap\'}}" [class.app-pointer]="UseCustomCellActions && CustomCellActionsOn.indexOf(\'$\' + rowItem.propertyName + \'$\') != -1" (click)="cellClicked(rowItem.propertyName, options.item) && !CellActionPropagates && $event.stopPropagation()" [Internal]="false" [innerHTML]="options.item.properties[rowItem.propertyName]"></td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\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-options>\r\n <ng-container *ngIf="UseCustomCells && RowTDs">\r\n <ng-container *ngFor="let rowItem of RowTDs[options.item.hash]; let i = index">\r\n <ng-container *ngIf="rowItem">\r\n <ng-container *ngIf="rowItem.RouterLink && rowItem.Visible">\r\n <td es-td="{{rowItem.ID}}" class="{{rowItem.Class}}" [class.est-nowrap]="Hierarchy" [Internal]="true">\r\n <ng-container *ngIf="Hierarchy && i == 0">\r\n <span *ngIf="!options.item.parent" class="fa fa-chevron-down" style="visibility:hidden"></span>\r\n <span *ngIf="options.item.parent && options.item.expanded" class="fa fa-chevron-down est-pointer app-no-selection" (click)="collapseParent(options.item[this.OwnKey])"></span>\r\n <span *ngIf="options.item.parent && !options.item.expanded" class="fa fa-chevron-up est-pointer app-no-selection" (click)="expandParent(options.item[this.OwnKey])"></span>\r\n \r\n </ng-container>\r\n <a [routerLink]=\'rowItem.RouterLink\' class="app-link" [innerHTML]="rowItem.Content"></a>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf="!rowItem.RouterLink && rowItem.Visible">\r\n <td es-td="{{rowItem.ID}}" class="{{rowItem.Class}}" [class.est-nowrap]="Hierarchy" [class.app-pointer]="UseCustomCellActions && CustomCellActionsOn.indexOf(\'$\' + $any(rowItem).ID + \'$\') != -1" (click)="cellClicked(rowItem.ID, options.item) && !CellActionPropagates && $event.stopPropagation()" [Internal]="true">\r\n <ng-container *ngIf="Hierarchy && i == 0">\r\n <span *ngIf="!options.item.parent" class="fa fa-chevron-down" style="visibility:hidden"></span>\r\n <span *ngIf="options.item.parent && options.item.expanded" class="fa fa-chevron-down est-pointer app-no-selection" (click)="collapseParent(options.item[this.OwnKey])"></span>\r\n <span *ngIf="options.item.parent && !options.item.expanded" class="fa fa-chevron-up est-pointer app-no-selection" (click)="expandParent(options.item[this.OwnKey])"></span>\r\n \r\n </ng-container>\r\n <span [innerHTML]="rowItem.Content"></span>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\x3c!-- Questo template contiene i pulsanti di eliminazione/undo eliminazione ed esportazione che vanno in fondo ad un record edlla tabella --\x3e\r\n<ng-template #bodyDeleteAndExport let-options>\r\n <ng-container *ngIf="Removal && !RemovalCondition">\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="!(options.item.removed || options.item.deleted)"><span class="fa fa-remove app-pointer text-danger" [hidden]="options.item.removable != undefined && !options.item.removable" (click)="onRemoval.emit(options.item)"></span></td>\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="(options.item.removed || options.item.deleted)"><span class="fa fa-undo text-warning app-pointer" (click)="onAbortRemoval.emit(options.item)"></span></td>\r\n </ng-container>\r\n <ng-container *ngIf="Removal && RemovalCondition">\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="!(options.item.removed || options.item.deleted) && options.item[RemovalCondition]"><span class="fa fa-remove app-pointer text-danger" [hidden]="options.item.removable != undefined && !options.item.removable" (click)="onRemoval.emit(options.item)"></span></td>\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="(options.item.removed || options.item.deleted) && options.item[RemovalCondition]"><span class="fa fa-undo text-warning app-pointer" (click)="onAbortRemoval.emit(options.item)"></span></td>\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="!options.item[RemovalCondition]"><span class="fa fa-remove app-hidden-view"></span></td>\r\n </ng-container>\r\n <td *ngIf="Export || HiddenColumns || CornerMenuOptions" class="app-sticky-last-column{{options.even && !Hierarchy ? \'-alt\' : \'\'}}"></td>\r\n</ng-template>\r\n\r\n\x3c!-- Context menu vuoto default per tutte le tabella che non ce l\'hanno, in modo che al click destro appaia "nessuna op disponibile" --\x3e\r\n<context-menu #emptyMenu>\r\n <ng-template contextMenuItem>\r\n <span>\r\n <em>{{\'No operations available\' | localize : lc}}...</em>\r\n </span>\r\n </ng-template>\r\n</context-menu>\r\n\r\n\x3c!-- Modal per cambiare posizione e visibilità delle colonne dell\'es-table --\x3e\r\n<div bsModal #changeColumnVisibilityModal="bs-modal" class="modal fade" role="dialog" aria-hidden="true">\r\n <div class="modal-dialog modal-lg" app-draggable=".modal-header">\r\n <div class="modal-content" app-draggable=".modal-header">\r\n <div class="modal-header">\r\n <h5 class="modal-title pull-left">\r\n <ng-container *ngIf="!HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Order\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && !ColumnsOrdering">\r\n {{\'Columns Visibility\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Visibility and Order\' | localize : lc}}\r\n </ng-container>\r\n </h5>\r\n <button type="button" class="close pull-right" (click)="changeColumnVisibilityModal.hide();" aria-label="Close">\r\n <span aria-hidden="true">×</span>\r\n </button>\r\n </div>\r\n <div class="modal-body">\r\n <div *ngIf="!TMPColumnsList || TMPColumnsList.length == 0" class="card card-info app-padding-10 app-margin-bottom-0">\r\n {{\'There are no columns configured to be hidden/shown in this view\' | localize : lc}}\r\n </div>\r\n <div *ngIf="TMPColumnsList && TMPColumnsList.length > 0" style="max-height:500px; overflow-y:auto">\r\n \x3c!--Aaaaaaah la tristezza... qui mi servirebbe l\'es-table per facilitare la selezione multipla ecc... peccato che se la linko qui entro in un loop impressionante--\x3e\r\n <table class="table table-striped table-sm app-margin-bottom-0">\r\n <thead>\r\n <tr>\r\n <th class="est-col-min" *ngIf="HiddenColumns">\r\n <input class="est-pointer" type="checkbox" [(ngModel)]="globalColVisCheck" [ngModelOptions]="{\'standalone\': true}" (ngModelChange)="globalColVisCheckChanged();">\r\n </th>\r\n <th class="est-col-min" *ngIf="ColumnsOrdering"></th>\r\n <th class="est-col-min est-nowrap">{{\'Column Name\' | localize : lc}}</th>\r\n \x3c!--Filler--\x3e\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor="let item of TMPColumnsList; let i = index; let last = last" class="est-pointer" [class.est-white-selected]="lastSelectedItemID == item.id" [class.est-no-selection]="!item.visible" (click)="columnClicked(item);">\r\n <td *ngIf="HiddenColumns"><input type="checkbox" class="est-pointer" [(ngModel)]="item.visible" name="visible{{i}}" (ngModelChange)="updateGlobalColVisCheck();" /></td>\r\n <td class="est-nowrap" *ngIf="ColumnsOrdering">\r\n <span class="fa fa-arrow-up" (click)="lastSelectedItemID = item.id; i != 0 && sendUp(item)"></span>\r\n <span class="fa fa-arrow-down" (click)="lastSelectedItemID = item.id; !last && sendDown(item)"></span>\r\n </td>\r\n <td class="est-nowrap">{{item.description}}</td>\r\n \x3c!--Filler--\x3e\r\n <td></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div class="modal-footer">\r\n <button type="button" class="btn btn-secondary app-margin-right-10" (click)="lastSelectedItemID = null; changeColumnVisibilityModal.hide();">{{\'Close\' | localize : lc}}</button>\r\n <button type="button" [disabled]="!TMPColumnsList || TMPColumnsList.length == 0" class="btn btn-primary" (click)="confirmColumnVisibilitySelection() && changeColumnVisibilityModal.hide()">{{\'Confirm\' | localize : lc}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>',styles:['.est-loading-box{height:200px;text-align:center;position:relative;background:#ccc}.est-loading-content{margin:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:35px}.est-scrollable{max-height:600px;overflow:auto}.est-pointer{cursor:pointer}.est-high-density td,.est-high-density th{padding:0 .2rem}.est-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.est-nowrap{white-space:nowrap}.est-white-selected{background-color:#ddd!important}.est-line-through{text-decoration:line-through}.est-no-side-padding{padding-left:0;padding-right:0}.est-no-left-padding,.est-no-right-padding{padding-left:0}.est-col-min{width:1px}.est-switch{position:relative;display:inline-block;width:30px;height:17px;margin-bottom:0;margin-right:5px;margin-left:5px}.est-switch input{display:none}.est-slider{cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc}.est-slider,.est-slider:before{position:absolute;transition:.4s}.est-slider:before{content:"";height:13px;width:13px;left:3px;bottom:2px;background-color:#fff}input:checked+.est-slider{background-color:#2196f3}input:focus+.est-slider{box-shadow:0 0 1px #2196f3}input:checked+.est-slider:before{transform:translateX(11px)}.est-slider.round{border-radius:10px}.est-slider.round:before{border-radius:50%}.est-custom-input{width:30px;display:inline;padding:1px;height:20px}.est-row-lvl-1 td:first-child{padding-left:5px}.est-row-lvl-2 td:first-child{padding-left:20px}.est-row-lvl-3 td:first-child{padding-left:35px}.est-row-lvl-4 td:first-child{padding-left:50px}.est-row-lvl-5 td:first-child{padding-left:65px}.est-row-lvl-6 td:first-child{padding-left:80px}.est-row-lvl-7 td:first-child{padding-left:95px}.est-row-lvl-8 td:first-child{padding-left:110px}.est-row-lvl-9 td:first-child{padding-left:125px}.est-row-lvl-10 td:first-child{padding-left:140px}.est-row-lvl-11 td:first-child{padding-left:155px}.est-row-lvl-12 td:first-child{padding-left:170px}.est-row-lvl-13 td:first-child{padding-left:185px}.est-row-lvl-14 td:first-child{padding-left:200px}.est-row-lvl-15 td:first-child{padding-left:215px}.est-row-lvl-16 td:first-child{padding-left:230px}.est-row-lvl-17 td:first-child{padding-left:245px}.est-row-lvl-18 td:first-child{padding-left:260px}.est-row-lvl-19 td:first-child{padding-left:275px}.est-row-lvl-20 td:first-child{padding-left:290px}.est-row-lvl-21 td:first-child{padding-left:305px}.est-row-lvl-22 td:first-child{padding-left:320px}.est-row-lvl-23 td:first-child{padding-left:335px}.est-row-lvl-24 td:first-child{padding-left:350px}.est-row-lvl-25 td:first-child{padding-left:365px}.est-row-lvl-26 td:first-child{padding-left:380px}.est-row-lvl-27 td:first-child{padding-left:395px}.est-row-lvl-28 td:first-child{padding-left:410px}.est-row-lvl-29 td:first-child{padding-left:425px}.est-row-lvl-30 td:first-child{padding-left:440px}.est-row-lvl-31 td:first-child{padding-left:455px}.est-row-lvl-32 td:first-child{padding-left:470px}.est-row-lvl-33 td:first-child{padding-left:485px}.est-row-lvl-34 td:first-child{padding-left:500px}.est-row-lvl-35 td:first-child{padding-left:515px}.est-row-lvl-36 td:first-child{padding-left:530px}.est-row-lvl-37 td:first-child{padding-left:545px}.est-row-lvl-38 td:first-child{padding-left:560px}.est-row-lvl-39 td:first-child{padding-left:575px}.est-row-lvl-40 td:first-child{padding-left:590px}.est-row-lvl-41 td:first-child{padding-left:605px}.est-row-lvl-42 td:first-child{padding-left:620px}.est-row-lvl-43 td:first-child{padding-left:635px}.est-row-lvl-44 td:first-child{padding-left:650px}.est-row-lvl-45 td:first-child{padding-left:665px}.est-row-lvl-46 td:first-child{padding-left:680px}.est-row-lvl-47 td:first-child{padding-left:695px}.est-row-lvl-48 td:first-child{padding-left:710px}.est-row-lvl-49 td:first-child{padding-left:725px}.est-row-lvl-50 td:first-child{padding-left:740px}.est-row-lvl-51 td:first-child{padding-left:755px}.est-row-lvl-52 td:first-child{padding-left:770px}.est-row-lvl-53 td:first-child{padding-left:785px}.est-row-lvl-54 td:first-child{padding-left:800px}.est-row-lvl-55 td:first-child{padding-left:815px}.est-row-lvl-56 td:first-child{padding-left:830px}.est-row-lvl-57 td:first-child{padding-left:845px}.est-row-lvl-58 td:first-child{padding-left:860px}.est-row-lvl-59 td:first-child{padding-left:875px}.est-row-lvl-60 td:first-child{padding-left:890px}.est-row-lvl-61 td:first-child{padding-left:905px}.est-row-lvl-62 td:first-child{padding-left:920px}.est-row-lvl-63 td:first-child{padding-left:935px}.est-row-lvl-64 td:first-child{padding-left:950px}.est-row-lvl-65 td:first-child{padding-left:965px}.est-row-lvl-66 td:first-child{padding-left:980px}.est-row-lvl-67 td:first-child{padding-left:995px}.est-row-lvl-68 td:first-child{padding-left:1010px}.est-row-lvl-69 td:first-child{padding-left:1025px}.est-row-lvl-70 td:first-child{padding-left:1040px}.est-row-lvl-71 td:first-child{padding-left:1055px}.est-row-lvl-72 td:first-child{padding-left:1070px}.est-row-lvl-73 td:first-child{padding-left:1085px}.est-row-lvl-74 td:first-child{padding-left:1100px}.est-row-lvl-75 td:first-child{padding-left:1115px}.est-row-lvl-76 td:first-child{padding-left:1130px}.est-row-lvl-77 td:first-child{padding-left:1145px}.est-row-lvl-78 td:first-child{padding-left:1160px}.est-row-lvl-79 td:first-child{padding-left:1175px}.est-row-lvl-80 td:first-child{padding-left:1190px}.est-row-lvl-81 td:first-child{padding-left:1205px}.est-row-lvl-82 td:first-child{padding-left:1220px}.est-row-lvl-83 td:first-child{padding-left:1235px}.est-row-lvl-84 td:first-child{padding-left:1250px}.est-row-lvl-85 td:first-child{padding-left:1265px}.est-row-lvl-86 td:first-child{padding-left:1280px}.est-row-lvl-87 td:first-child{padding-left:1295px}.est-row-lvl-88 td:first-child{padding-left:1310px}.est-row-lvl-89 td:first-child{padding-left:1325px}.est-row-lvl-90 td:first-child{padding-left:1340px}.est-row-lvl-91 td:first-child{padding-left:1355px}.est-row-lvl-92 td:first-child{padding-left:1370px}.est-row-lvl-93 td:first-child{padding-left:1385px}.est-row-lvl-94 td:first-child{padding-left:1400px}.est-row-lvl-95 td:first-child{padding-left:1415px}.est-row-lvl-96 td:first-child{padding-left:1430px}.est-row-lvl-97 td:first-child{padding-left:1445px}.est-row-lvl-98 td:first-child{padding-left:1460px}.est-row-lvl-99 td:first-child{padding-left:1475px}.est-right-10{right:10px}.est-hidden{visibility:hidden}']}]}],k.ctorParameters=function(){return[{type:n.NgControl,decorators:[{type:t.Self},{type:t.Optional}]},{type:o.PreferencesService,decorators:[{type:t.Optional}]},{type:r.LocalizationService},{type:t.ChangeDetectorRef},{type:i.HashingService},{type:i.UtilityService},{type:i.ExportService}]},k.propDecorators={EsThs:[{type:t.ContentChildren,args:[t.forwardRef((function(){return z}))]}],EsTds:[{type:t.ContentChildren,args:[t.forwardRef((function(){return R}))]}],templateRef:[{type:t.ContentChild,args:["body",{static:!1}]}],templateRefHeader:[{type:t.ContentChild,args:["header",{static:!1}]}],templateRefHeaderGroup:[{type:t.ContentChild,args:["headerGroup",{static:!1}]}],templateRefSecondaryHeaderGroup:[{type:t.ContentChild,args:["secondaryHeaderGroup",{static:!1}]}],CornerMenuOptions:[{type:t.Input}],ColumnsResizable:[{type:t.Input}],AutoUpdate:[{type:t.Input}],UseCustomCellActions:[{type:t.Input}],CustomCellActionsOn:[{type:t.Input}],CellActionPropagates:[{type:t.Input}],UseCustomCells:[{type:t.Input}],MaxHeight:[{type:t.Input}],Class:[{type:t.Input}],XLSXExport:[{type:t.Input}],CSVExport:[{type:t.Input}],AllSearch:[{type:t.Input}],HighCellDensity:[{type:t.Input}],Selection:[{type:t.Input}],ShowLoadingOnBootstrap:[{type:t.Input}],Removal:[{type:t.Input}],RemovalCondition:[{type:t.Input}],Export:[{type:t.Input}],ShiftClick:[{type:t.Input}],ShowPaging:[{type:t.Input}],HidePaging:[{type:t.Input}],HidePagingCount:[{type:t.Input}],HidePagingButtons:[{type:t.Input}],ContextMenu:[{type:t.Input}],ExportFileName:[{type:t.Input}],TableClass:[{type:t.Input}],CountLabel:[{type:t.Input}],ExportFunction:[{type:t.Input}],HasHeaderGroup:[{type:t.Input}],HasSecondaryHeaderGroup:[{type:t.Input}],SliceSize:[{type:t.Input}],EndlessScroll:[{type:t.Input}],EndlessScrollOnlyForAll:[{type:t.Input}],HeaderHidden:[{type:t.Input}],BodyHidden:[{type:t.Input}],SelectionDisabled:[{type:t.Input}],SingleSelection:[{type:t.Input}],RowClassAssigner:[{type:t.Input}],OrderByColumn:[{type:t.Input}],MultipleOrderingDirectives:[{type:t.Input}],HiddenColumns:[{type:t.Input}],ColumnsOrdering:[{type:t.Input}],SearchView:[{type:t.Input}],SelectAll:[{type:t.Input}],UseArrayModePaging:[{type:t.Input}],DynamicRowColumnsDefinition:[{type:t.Input}],DynamicOperations:[{type:t.Input}],Hierarchy:[{type:t.Input}],ParentKey:[{type:t.Input}],OwnKey:[{type:t.Input}],StartsExpanded:[{type:t.Input}],SavePreferences:[{type:t.Input}],SecondarySource:[{type:t.Input}],TertiarySource:[{type:t.Input}],UseSelectionCache:[{type:t.Input}],onOrderChanged:[{type:t.Output}],onSearchRequest:[{type:t.Output}],onSelectionChanged:[{type:t.Output}],onRemoval:[{type:t.Output}],onAbortRemoval:[{type:t.Output}],onCellClick:[{type:t.Output}],onCornerAction:[{type:t.Output}],onDynamicOperation:[{type:t.Output}],exportDownloader:[{type:t.ViewChild,args:["exportDownloader",{static:!1}]}],tableEmptyMenu:[{type:t.ViewChild,args:["emptyMenu",{static:!0}]}]};var A=function(){},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",["Tutto"]),e.prototype.set.call(n,"en->it","Are you sure you want to retrieve all results?",["Si è sicuri di voler caricare tutti i risultati?"]),e.prototype.set.call(n,"en->it","This might slow down the page and possibly crash the entire application",["L'operazione potrebbe rallentare la pagina fino al crash dell'applicazione"]),n}return g(t,e),t}(r.LocalizationService);L.decorators=[{type:t.Injectable}],L.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[H]}]}]};var B=function(){function e(e,n){this.msgExts=e,this.lc=n,this.WarnOnAll=!0,this.AllSearch=!0,this.DefaultAll=999999,this.pagingSelected=new t.EventEmitter}return e.prototype.choice=function(e){var t=this;e==this.DefaultAll&&this.WarnOnAll?this.msgExts.simpleWarningWithChoice(this.lc.loc("Are you sure you want to retrieve all results?"),this.lc.loc("This might slow down the page and possibly crash the entire application"),(function(){t.pagingSelected.emit(e)})):this.pagingSelected.emit(e)},e}();B.decorators=[{type:t.Component,args:[{selector:"app-paging",viewProviders:[{provide:r.LocalizationService,useClass:L}],template:'\x3c!--Se non ho almeno 10 elementi non ha senso far vedere le opzioni di paginazione--\x3e\r\n<ng-container *ngIf="View ? ((View.objectcount && View.objectcount >= 10) || View.pagingavailable) : !Hidden">\r\n {{\'Paging\' | localize : lc}}: \r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 10 : CurrentPageSize == 10"\r\n (click)="choice(10);">\r\n 10\r\n </span> | \r\n\r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 15 : CurrentPageSize == 15"\r\n (click)="choice(15);">\r\n 15\r\n </span> | \r\n\r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 30 : CurrentPageSize == 30"\r\n (click)="choice(30);">\r\n 30\r\n </span> | \r\n\r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 45 : CurrentPageSize == 45"\r\n (click)="choice(45);">\r\n 45\r\n </span> | \r\n\r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 100 : CurrentPageSize == 100"\r\n (click)="choice(100);">\r\n 100\r\n </span><span *ngIf="AllSearch"> | </span>\r\n <span *ngIf="AllSearch" class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == DefaultAll : CurrentPageSize == DefaultAll"\r\n (click)="choice(DefaultAll);">\r\n {{\'All\' | localize : lc}}\r\n </span>\r\n</ng-container>'}]}],B.ctorParameters=function(){return[{type:i.MessageService},{type:r.LocalizationService}]},B.propDecorators={CurrentPageSize:[{type:t.Input}],View:[{type:t.Input}],Hidden:[{type:t.Input}],WarnOnAll:[{type:t.Input}],AllSearch:[{type:t.Input}],DefaultAll:[{type:t.Input}],pagingSelected:[{type:t.Output}]};var _=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:H,useValue:(null==t?void 0:t.locale)||"it-IT"}]}},e}();_.decorators=[{type:t.NgModule,args:[{imports:[a.CommonModule,n.FormsModule,l.RouterModule,r.LocalizationModule,c.ModalModule,p.BsDropdownModule,d.CsvModule,h.ContextMenuModule],declarations:[z,R,k,B],providers:[i.UtilityService,i.ExportService,i.HashingService,i.MessageService],exports:[z,R,k,B]}]}],e.AppOrdering=v,e.AppSearch=w,e.CornerMenuOption=b,e.EsTableColumn=D,e.EsTableColumnsDefinition=y,e.EsTableComponent=k,e.EsTableModule=_,e.EsTableModuleConfig=A,e.EsTableOperationDefinition=T,e.EsTd=R,e.EsTh=z,e.GenericItem=C,e.ItemsSelection=M,e.ReportColumn=I,e.ReportDefinition=x,e.ReportOrder=S,e.ReportParam=P,e.ReportResult=O,e.ReportRow=V,e.ɵa=E,e.ɵb=H,e.ɵc=B,e.ɵd=L,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function m(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(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(s,a)}l((i=i.apply(e,t||[])).next())}))}function f(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}Object.create;Object.create;var v=function(e,t){this.id=e,this.order=t},w=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}(),y=function(e,t,n,i,r,o,s,a,l){void 0===n&&(n=null),void 0===i&&(i=null),void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=!0),void 0===a&&(a=null),void 0===l&&(l=!0),this.description=e,this.propertyName=t,this.routePath=n,this.routeParameterProperties=i,this.dataOrder=r,this.columnOrder=o,this.visible=s,this.clss=a,this.orderable=l},C=function(){this._selected=!1,this._rowClass=null,this.hash=null,this.properties={}},b=function(){},x=function(){},S=function(){},I=function(){},O=function(){},V=function(){},P=function(){},T=function(e,t,n,i,r,o){this.id=e,this.title=t,this.iconClass=n,this.text=i,this.conditionField=r,this.conditionValue=o},D=function(e,t,n){this.id=e,this.description=t,this.visible=n},M=function(e){this.all=!1,this.exclusions=[],this.count=e.length,this.items=e,this.all=!1,this.exclusions=[]},R=function(){function e(e,t,n,i){this.myself=e,this.renderer=t,this._viewContainer=n,this.sanitizer=i,this.ID="",this.Display=null,this.Template=null}return Object.defineProperty(e.prototype,"Visible",{get:function(){return null==this._Visible&&(this._Visible=!0),this._Visible},set:function(e){this._Visible=e,e?this.renderer.removeClass(this.myself.nativeElement,"app-display-none"):this.renderer.addClass(this.myself.nativeElement,"app-display-none")},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){if(!this.Internal){var e,t=this._viewContainer;if(null==(e=null==t._view?null:t._view.parent&&!t._view.context.$implicit&&t._view.parent.context&&t._view.parent.context.$implicit?t._view.parent.context.$implicit:t._view.context&&t._view.context.ngIf?t._view.viewContainerParent.context.$implicit:t._view.context.$implicit))for(var n=this._viewContainer._hostLView,i=0;i<n.length;i++){var r=n[i];if(r&&r.$implicit&&!r.ngIf){e=r.$implicit;break}if(r&&r.length&&r.length>0)for(var o=0;o<r.length;o++){var s=r[o];if(s&&s.$implicit&&!s.ngIf){e=s.$implicit;break}}if(e)break}var a=e.hash;this.Context=a,this.Content=null===this.Display||""===this.Display?this.sanitizer.bypassSecurityTrustHtml(this.myself.nativeElement.innerHTML):this.sanitizer.bypassSecurityTrustHtml(this.Display),this.Class=this.myself.nativeElement.className.replace("app-display-none","")}},e}();R.decorators=[{type:t.Component,args:[{selector:"[es-td]",template:"<span>\r\n <ng-content></ng-content>\r\n</span>",changeDetection:t.ChangeDetectionStrategy.OnPush}]}],R.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:s.DomSanitizer}]},R.propDecorators={ID:[{type:t.Input,args:["es-td"]}],Internal:[{type:t.Input}],RouterLink:[{type:t.Input}],Display:[{type:t.Input}],Template:[{type:t.Input}],Visible:[{type:t.Input}]};var z=function(){function e(e,n){this.myself=e,this.renderer=n,this.orderNext={NONE:"DESC",DESC:"ASC",ASC:null},this.resizingThis=!1,this.startOffset=null,this.ID="",this.Orderable=!0,this.Display="",this.Resizable=!1,this.SearchInProgress=!1,this.onOrderChange=new t.EventEmitter,this.Referenced=!1}return Object.defineProperty(e.prototype,"Visible",{get:function(){return null==this._Visible&&(this._Visible=!0),this._Visible},set:function(e){this._Visible=e,e?this.renderer.removeClass(this.myself.nativeElement,"app-display-none"):this.renderer.addClass(this.myself.nativeElement,"app-display-none")},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.Description=null===this.Display||""===this.Display?this.content.nativeElement.innerText:this.Display,this.Class=this.myself.nativeElement.className.replace("app-display-none",""),this.Resizable&&this.renderer.addClass(this.myself.nativeElement,"app-relative")},e.prototype.setupNextOrderAndNotify=function(){if(this.ID){if(this.SearchInProgress)console.log("Attempt to order a column during a search. Operation ignored");else if(this.OrderBy&&this.Orderable){var e=this.orderNext[this.Order||"NONE"];this.Order=e,this.onOrderChange.emit(this.Order)}}else console.log("Attempt to order a column without ID. Operation ignored")},e.prototype.onResizeStart=function(e){this.Resizable&&(this.resizingThis=!0,this.startOffset=this.myself.nativeElement.offsetWidth-e.pageX)},e.prototype.onMouseUp=function(){this.Resizable&&(this.resizingThis=!1)},e.prototype.onMouseMove=function(e){this.Resizable&&this.resizingThis&&(this.myself.nativeElement.style.width=this.startOffset+e.pageX+"px",e.preventDefault())},e}();z.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-content></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<div [hidden]="!Resizable" style="top:0; right:0; bottom: 0; width:2px; position:absolute; cursor:col-resize; background-color:#ccc" (mousedown)="onResizeStart($event)"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush}]}],z.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},z.propDecorators={ID:[{type:t.Input,args:["es-th"]}],Order:[{type:t.Input}],Orderable:[{type:t.Input}],Display:[{type:t.Input}],Resizable:[{type:t.Input}],Internal:[{type:t.Input}],SearchInProgress:[{type:t.Input}],OrderBy:[{type:t.Input}],onOrderChange:[{type:t.Output}],content:[{type:t.ViewChild,args:["content",{static:!1}]}],Visible:[{type:t.Input}],onMouseUp:[{type:t.HostListener,args:["window:mouseup.out-zone"]}],onMouseMove:[{type:t.HostListener,args:["window:mousemove.out-zone",["$event"]]}]};var H=new t.InjectionToken("EST_LOCALE"),E=function(e){function t(t){var n=e.call(this,null!=t?t:"it-IT")||this;return e.prototype.set.call(n,"en->it","Performing Table bootstrap",["Sto caricando la Tabella"]),e.prototype.set.call(n,"en->it","Update every",["Aggiorna ogni"]),e.prototype.set.call(n,"en->it","second/s",["secondo/i"]),e.prototype.set.call(n,"en->it","Export View",["Esporta Vista"]),e.prototype.set.call(n,"en->it","Column Name",["Nome Colonna"]),e.prototype.set.call(n,"en->it","Columns Order",["Ordine Colonne"]),e.prototype.set.call(n,"en->it","Columns Visibility",["Visibilità Colonne"]),e.prototype.set.call(n,"en->it","There are no columns configured to be hidden/shown in this view",["Non ci sono colonne configurate per essere visualizzate/nascoste in questa vista dati"]),e.prototype.set.call(n,"en->it","Columns Visibility and Order",["Visibilità e Ordine Colonne"]),e.prototype.set.call(n,"en->it","Objects Selected",["Oggetti Selezionati"]),e.prototype.set.call(n,"en->it","Object Selected",["Oggetto Selezionato"]),e.prototype.set.call(n,"en->it","Select Everything",["Seleziona Tutto"]),e.prototype.set.call(n,"en->it","Reset Selection",["Resetta Selezione"]),e.prototype.set.call(n,"en->it","No operations available",["Nessuna operazione disponibile"]),e.prototype.set.call(n,"en->it","Paging options are not available for this report",["Le opzioni di paginazione non sono disponibili per questo report"]),n}return g(t,e),t}(r.LocalizationService);E.decorators=[{type:t.Injectable}],E.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[H]}]}]};var k=function(){function e(e,n,i,r,o,s,a){this.ngControl=e,this.prefService=n,this.lc=i,this.cdr=r,this.hashExts=o,this.utiExts=s,this.expExts=a,this.View=null,this.globalCheck=!1,this.lastSelected=null,this.selectedObjects=0,this.canSelectAll=!1,this.viewMode=!1,this.arrayMode=!1,this.reportMode=!1,this.boundSource=[],this.TMPBoundSource=[],this.boundSubSources=[],this.addedSlices=[],this.defaultAllPageOverride=999999,this.autoUpdate=!1,this.seconds="10",this.researchInProgress=!1,this.RowTDs=null,this.TMPRowTDs=null,this.RowTHs=null,this.TMPRowTHs=null,this.DynamicTableRouterLinkCache={},this.RowContexts=[],this.OrderDirectives=[],this.lastSelectedItemID=null,this.UserDefinedDynamicCols=!1,this.FirstBind=!0,this.ColumnsList=[],this.TMPColumnsList=[],this.globalColVisCheck=!1,this.EsThsOrderChangeSubscriptions=[],this.CornerMenuOptions=null,this.ColumnsResizable=!1,this.AutoUpdate=!1,this.UseCustomCellActions=!1,this.CustomCellActionsOn="",this.CellActionPropagates=!0,this.UseCustomCells=!1,this.MaxHeight=null,this.Class="",this.XLSXExport=!1,this.CSVExport=!0,this.AllSearch=!0,this.HighCellDensity=!1,this.Selection=!1,this.ShowLoadingOnBootstrap=!1,this.Removal=!1,this.RemovalCondition="",this.Export=!1,this.ShiftClick=!1,this.ShowPaging=!0,this.HidePaging=!1,this.HidePagingCount=!1,this.HidePagingButtons=!1,this.ContextMenu=null,this.ExportFileName="Export.csv",this.TableClass="table table-striped table-hover table-sm",this.CountLabel=this.lc.loc("Found objects"),this.HasHeaderGroup=!1,this.HasSecondaryHeaderGroup=!1,this.SliceSize=100,this.EndlessScroll=!1,this.EndlessScrollOnlyForAll=!0,this.HeaderHidden=!1,this.BodyHidden=!1,this.SelectionDisabled=!1,this.SingleSelection=!1,this.RowClassAssigner=null,this.OrderByColumn=!1,this.MultipleOrderingDirectives=!0,this.HiddenColumns=!1,this.ColumnsOrdering=!1,this.SearchView=null,this.SelectAll=!1,this.UseArrayModePaging=!0,this.DynamicRowColumnsDefinition=null,this.DynamicOperations=[],this.Hierarchy=!1,this.ParentKey="",this.OwnKey="",this.StartsExpanded=!0,this.SavePreferences=!1,this.SecondarySource=!1,this.TertiarySource=!1,this.UseSelectionCache=!0,this.onOrderChanged=new t.EventEmitter,this.onSearchRequest=new t.EventEmitter,this.onSelectionChanged=new t.EventEmitter,this.onRemoval=new t.EventEmitter,this.onAbortRemoval=new t.EventEmitter,this.onCellClick=new t.EventEmitter,this.onCornerAction=new t.EventEmitter,this.onDynamicOperation=new t.EventEmitter,this.arraymodePage=1,this.arraymodePages=1,this.ArraymodeItemsPerPage=15,this.internalWriteCall=!1,this.selOrDeselCache={},this.propagateChange=function(e){},e&&(e.valueAccessor=this)}return e.prototype.ngOnInit=function(){var e=this;if(this.Hierarchy&&!this.UseCustomCells)throw'Es-table error: Per poter utilizzare l\'es-table con [Hierarchy]="true" è richiesto anche [UseCustomCells]="true"';this.ctxMenuSubscription=(this.ContextMenu||this.tableEmptyMenu).open.subscribe((function(t){var n=!t.item._selected;t.item._selected=!0;var i=e.handleItemsSelection([t.item]);e.changed(),n&&e.onSelectionChanged.emit(i)}))},e.prototype.ngOnDestroy=function(){this.ctxMenuSubscription&&this.ctxMenuSubscription.unsubscribe(),this.EsThsOrderChangeSubscriptions.forEach((function(e){e.unsubscribe()}))},e.prototype.ngOnChanges=function(e){return m(this,void 0,void 0,(function(){return f(this,(function(t){return e.SearchView&&this.SearchView&&(this.arrayPulsanti=this.getPagesArray(6,this.SearchView.page,this.SearchView.pages||1)),[2]}))}))},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(e){},e.prototype.changed=function(){this.propagateChange(this.View)},e.prototype.writeValue=function(e){if(this.View=e||null,this.researchInProgress=!1,!this.View&&!this.SearchView)return this.boundSource=this.TMPBoundSource||[],void this.cdr.markForCheck();if(!this.View||void 0===this.View.result||this.View instanceof x?!this.View||void 0===this.View.itemsperpageoverride||this.View instanceof w?!this.SearchView||void 0===this.SearchView.itemsperpageoverride||this.SearchView instanceof w||(this.SearchView.__proto__=new w):this.View.__proto__=new w:this.View.__proto__=new x,this.View&&this.View instanceof x)this.setMode("report"),this.ReportValues=this.View.result,this.ReportValues&&this.reviewReportBindings();else if(this.View&&this.View instanceof w){if(this.setMode("view"),this.View.selection&&this.View.internalsearchrequest&&this.UseSelectionCache||(this.selOrDeselCache={},this.View.selection=new M([]),this.onSelectionChanged.emit(this.View.selection)),this.View.internalsearchrequest=!1,this.SavePreferences)if(this.ngControl.name)if(this.prefService){var t=this.prefService.retrieve(this.ngControl.name);t&&(this.View.columns=t.columns,this.View.column_ordering=t.column_ordering)}else console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato");else console.error("Non posso utilizzare le preference senza avere un 'name' per questa tabella");this.arrayPulsanti=this.getPagesArray(6,this.View.page,this.View.pages||1)}else this.View&&null!=this.View.length&&null!=this.View.length&&(this.setMode("array"),this.UseSelectionCache&&this.arraymodeSelection||(this.selOrDeselCache={},this.arraymodeSelection=new M([]),this.onSelectionChanged.emit(this.arraymodeSelection)),this.SearchView&&(this.arrayPulsanti=this.getPagesArray(6,this.SearchView.page,this.SearchView.pages||1)));if(this.View&&!(this.View instanceof x)){var n=this.View,i=this.viewMode&&n.itemsperpageoverride==this.defaultAllPageOverride,r=this.viewMode&&n.itemsperpageoverride!=this.defaultAllPageOverride;if(this.UseEndlessscroll=this.EndlessScroll&&(this.arrayMode||i||r&&!this.EndlessScrollOnlyForAll),this.UseEndlessscroll?(this.addedSlices=[],this.boundSubSources=this.getItemSlices(),this.TMPBoundSource=this.boundSubSources[0]?this.boundSubSources[0]:[],this.boundSubSources[0]&&this.addedSlices.push(0)):this.TMPBoundSource=this.getItemsByMode(!1,!this.internalWriteCall),this.Hierarchy&&this.assignHierarchyLevels(this.TMPBoundSource),this.calculateHash(this.TMPBoundSource),this.TMPBoundSource&&this.RowClassAssigner||this.Hierarchy)for(var o=0;o<this.TMPBoundSource.length;o++){var s=this.TMPBoundSource[o];s._rowClass=this.RowClassAssigner?this.RowClassAssigner(s):"",s._rowClass+=this.Hierarchy?" est-row-lvl-"+s.level:""}}this.postBoundSourceCalculation()},e.prototype.getItemsByMode=function(e,t,n){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!1);var i=[];return this.viewMode&&this.View instanceof w?i=this.getViewItemsBySource():this.arrayMode&&(this.UseArrayModePaging&&!n?(this.SearchView&&(this.ArraymodeItemsPerPage=this.SearchView.itemsperpageoverride),t&&this.refreshPaging(this.ArraymodeItemsPerPage),i=this.adaptViewToPaging()):i=this.View),e?i.filter((function(e){return e._selected})):i},e.prototype.getViewItemsBySource=function(){return this.SecondarySource?this.View.items2:this.TertiarySource?this.View.items3:this.View.items},e.prototype.getItemSlices=function(){var e=this.getItemsByMode();if(!e)return[];for(var t=[],n=Math.ceil(e.length/this.SliceSize),i=0;i<n;i++){var r=e.slice(i*this.SliceSize,i*this.SliceSize+this.SliceSize);t.push(r)}return t},e.prototype.onScroll=function(e){var t=this,n=e.target.offsetHeight,i=e.target.scrollHeight;if(e.target.scrollTop>i-n-200){var r=Math.floor(this.TMPBoundSource.length/100);this.boundSubSources[r]&&-1==this.addedSlices.indexOf(r)&&(this.calculateHash(this.boundSubSources[r]),this.TMPBoundSource=this.TMPBoundSource.concat(this.boundSubSources[r]),this.addedSlices.push(r),setTimeout((function(){t.postBoundSourceCalculation()})))}},e.prototype.postBoundSourceCalculation=function(){var e=this;this.RowContexts=[],this.OrderDirectives=[],this.lastSelectedItemID=null,this.cdr.detectChanges(),setTimeout((function(){if(e.eventuallyReviewDynamicColumns(),e.viewMode&&e.UseCustomCells){var t=e.View,n=e.EsThs?e.EsThs.toArray():[],i=e.EsTds?e.EsTds.toArray():[];e.alignColumnsIfLoadedView(t),e.refreshColumnsVisibility(n,i,t),e.alignHeadersOrdering(n,t),e.reviewColumnsList(n),e.evaluateRowThs(n),e.evaluateRowTds(n,i),e.generateDefaultOrder(t),e.applyOrdering(t,!0),e.evaluateSelection(t.items,t.selection)}else if(e.viewMode&&!e.UseCustomCells){t=e.View;e.evaluateSelection(t.items,t.selection)}else e.arrayMode&&e.arrayModeEvaluateSelection(e.View);e.boundSource=e.TMPBoundSource,e.cdr.markForCheck(),e.FirstBind=!1}))},e.prototype.evaluateSelection=function(e,t){t&&this.handleSelectionEvaluation(e,t)},e.prototype.arrayModeEvaluateSelection=function(e){0!=e.length&&this.handleSelectionEvaluation(e,this.arraymodeSelection)},e.prototype.handleSelectionEvaluation=function(e,t){for(var n=!0,i=0;i<e.length;i++){var r=e[i];this.selOrDeselCache[r.hash]&&(this.selOrDeselCache[r.hash]=r),t.all?r._selected=!this.selOrDeselCache[r.hash]:r._selected=!!this.selOrDeselCache[r.hash],n=n&&r._selected}if(this.globalCheck=n||t.all,this.canSelectAll=t.count>0&&this.SelectAll,this.arrayMode){var o=this.selectedObjects;this.finalizeSelectionInformations(t),this.selectedObjects!=o&&this.onSelectionChanged.emit(t)}},e.prototype.eventuallyReviewDynamicColumns=function(){if(this.TMPBoundSource&&0!=this.TMPBoundSource.length&&(!!this.TMPBoundSource[0].properties&&!(!this.FirstBind&&this.DynamicRowColumnsDefinition&&this.DynamicRowColumnsDefinition.length>0)))if(this.DynamicRowColumnsDefinition&&0!=this.DynamicRowColumnsDefinition.length)this.UserDefinedDynamicCols=!0;else{var e=this.TMPBoundSource[0].properties;for(var t in this.DynamicRowColumnsDefinition=[],e)this.DynamicRowColumnsDefinition.push(new y(t,t));this.UserDefinedDynamicCols=!1}},e.prototype.reviewColumnsList=function(e){var t=this;if(this.ColumnsList=[],0!=e.length)for(var n=function(n){var r=e[n];if(!r.ID||r.Internal)return"continue";if(r.OrderBy=i.OrderByColumn,i.OrderByColumn&&r.Orderable){var o=r.onOrderChange.subscribe((function(e){t.thOrderChanged(r.ID,e)}));i.EsThsOrderChangeSubscriptions.push(o)}(i.HiddenColumns||r.Visible)&&i.ColumnsList.push(new D(r.ID,r.Description,r.Visible))},i=this,r=0;r<e.length;r++)n(r)},e.prototype.alignColumnsIfLoadedView=function(e){var t=this,n=e.savedstate,i=[];if(this.ColumnsList&&0!=this.ColumnsList.length){if(this.ColumnsList.forEach((function(t){var n=e.columns.filter((function(e){return e==t.id}));t.visible&&0==e.columns.length?i.push(t.id):1!=n.length||t.visible?0==n.length&&t.visible&&(t.visible=!1):t.visible=!0})),0==e.columns.length&&(e.columns=i),e.savedstate&&this.ColumnsOrdering&&e.column_ordering.length>0){var r=[];e.column_ordering.forEach((function(e){t.ColumnsList.forEach((function(t){t.id==e&&r.push(t)}))})),this.ColumnsList=r}e.savedstate=!1,n&&this.changed()}},e.prototype.thOrderChanged=function(e,t){if(this.viewMode){if(this.OrderByColumn){var n=this.View,i=!0,r=null;n.orders||(n.orders=[]);for(var o=0;o<n.orders.length;o++){var s=n.orders[o];s.id==e&&(t?(s.order=t,i=!1):r=o)}null!=r?n.orders.splice(r,1):i&&(this.MultipleOrderingDirectives?n.orders.push(new v(e,t)):n.orders=[new v(e,t)]),this.onOrderChanged.emit({id:e,order:t}),this.emitSearchRequest(!1)}}else console.warn("Order changed on a table not in viewMode. Operation not supported")},e.prototype.emitSearchRequest=function(e){this.viewMode&&(this.View.internalsearchrequest=!0,this.changed()),this.researchInProgress=!0,this.onSearchRequest.emit(e)},e.prototype.refreshColumnsVisibility=function(e,t,n){for(var i={},r=[],o=0;o<this.ColumnsList.length;o++){var s=this.ColumnsList[o];i[s.id]=s,s.visible&&r.push(s.id)}if(n.columns=r,e)for(var a=0;a<e.length;a++){var l=e[a];l.Internal||(l.Visible=i[l.ID]?i[l.ID].visible:l.Visible)}if(t)for(a=0;a<t.length;a++){var c=t[a];c.Internal||(c.Visible=i[c.ID]?i[c.ID].visible:c.Visible)}this.changed()},e.prototype.alignHeadersOrdering=function(e,t){for(var n=function(n){var i=e[n];if(i.Internal)return"continue";i.Order=null,t.orders.forEach((function(e){e.id==i.ID&&(i.Order=e.order)}))},i=0;i<e.length;i++)n(i)},e.prototype.evaluateRowTds=function(e,t){if(0!=t.length){for(var n={},i=0;i<e.length;i++){(a=e[i]).Internal||(n[a.ID]=a)}this.TMPRowTDs={};for(i=0;i<t.length;i++){var r=t[i];if(!r.Internal){if(!!!n[r.ID])throw"ID dell'oggeto EsTd non compatibile con gli ID dicharati negli EsTh: "+r.ID;n[r.ID].Referenced=!0;var o={ID:r.ID,Visible:r.Visible,Class:r.Class,Content:r.Content,RouterLink:r.RouterLink,Template:r.Template};this.TMPRowTDs[r.Context]?this.TMPRowTDs[r.Context].push(o):(this.RowContexts.push(r.Context),this.TMPRowTDs[r.Context]=[o])}}var s=[];for(i=0;i<e.length;i++){var a;(a=e[i]).Referenced||s.push(a.ID)}if(s.length>0)throw"L'ID di uno o più EsTh non hanno alcun EsTd associato: "+s.join(", ")}},e.prototype.evaluateRowThs=function(e){if(0!=e.length){this.TMPRowTHs=[];for(var t=0;t<e.length;t++){var n=e[t];n.Internal||this.TMPRowTHs.push({ID:n.ID,Visible:n.Visible,Class:n.Class,Content:n.Description,Order:n.Order,Orderable:n.Orderable})}}},e.prototype.generateDefaultOrder=function(e){if(0!=this.TMPRowTHs.length)if(e.column_ordering&&0!=e.column_ordering.length)this.OrderDirectives=e.column_ordering;else for(var t=0;t<this.TMPRowTHs.length;t++)this.OrderDirectives.push(this.TMPRowTHs[t].ID)},e.prototype.applyOrdering=function(e,t){var n=this,i=[];this.OrderDirectives.forEach((function(e){var t=n.TMPRowTHs.filter((function(t){return t.ID==e}))[0];i.push(t)})),this.TMPRowTHs=i;for(var r=function(e){var t=o.TMPRowTDs[o.RowContexts[e]],n=[];o.OrderDirectives.forEach((function(e){var i=t.filter((function(t){return t.ID==e}))[0];n.push(i)})),o.TMPRowTDs[o.RowContexts[e]]=n},o=this,s=0;s<this.RowContexts.length;s++)r(s);t&&(this.RowTDs=this.TMPRowTDs,this.RowTHs=this.TMPRowTHs),e.column_ordering=this.OrderDirectives,this.changed()},e.prototype.sendUp=function(e){var t=this.TMPColumnsList.indexOf(e);this.utiExts.swap(this.TMPColumnsList,t,t-1),this.TMPColumnsList=JSON.parse(JSON.stringify(this.TMPColumnsList))},e.prototype.sendDown=function(e){var t=this.TMPColumnsList.indexOf(e);this.utiExts.swap(this.TMPColumnsList,t,t+1),this.TMPColumnsList=JSON.parse(JSON.stringify(this.TMPColumnsList))},e.prototype.columnClicked=function(e){this.lastSelectedItemID=e.id,this.HiddenColumns&&(e.visible=!e.visible,this.updateGlobalColVisCheck())},e.prototype.resetColumnVisSelection=function(){var e=this;this.TMPColumnsList=JSON.parse(JSON.stringify(this.ColumnsList));var t=[];this.ColumnsOrdering&&(this.OrderDirectives.forEach((function(n){var i=e.TMPColumnsList.filter((function(e){return e.id==n}))[0];i&&t.push(i)})),this.TMPColumnsList=t),this.updateGlobalColVisCheck()},e.prototype.refreshColumnOrdering=function(){this.OrderDirectives=[];for(var e=0;e<this.ColumnsList.length;e++)this.OrderDirectives.push(this.ColumnsList[e].id)},e.prototype.updateGlobalColVisCheck=function(){this.globalColVisCheck=this.TMPColumnsList.every((function(e){return e.visible}))},e.prototype.confirmColumnVisibilitySelection=function(){var e=this;if(this.TMPColumnsList.every((function(e){return!e.visible})))return!1;var t=this.View;if(this.ColumnsList=JSON.parse(JSON.stringify(this.TMPColumnsList)),this.refreshColumnOrdering(),this.refreshColumnsVisibility(null,null,t),this.applyOrdering(t,!1),this.SavePreferences){if(!this.ngControl.name)return console.error("Non posso utilizzare le preference senza avere un 'name' per la tabella"),!1;if(!this.prefService)return console.error("Non posso utilizzare le preference senza che il pacchetto @esfaenza/preferences sia installato"),!1;var n={columns:JSON.parse(JSON.stringify(t.columns)),column_ordering:JSON.parse(JSON.stringify(t.column_ordering))};this.prefService.store(this.ngControl.name,n)}return setTimeout((function(){e.emitSearchRequest(!1)})),this.lastSelectedItemID=null,!0},e.prototype.globalColVisCheckChanged=function(){var e=this;this.TMPColumnsList.forEach((function(t){t.visible=e.globalColVisCheck}))},e.prototype.assignHierarchyLevels=function(e){if(e&&e.length)if(this.ParentKey||this.OwnKey||(void 0!==e[0].parentid&&(this.ParentKey="parentid"),void 0!==e[0].id&&(this.OwnKey="id")),this.ParentKey&&this.OwnKey){var t=1,n=0;do{n=this.assignLevel(e,t),t++}while(n>0)}else console.error("Per utilizzare il sistema in modalità gerarchica è obbligatorio specificare sia ParentKey che OwnKey. Fallback a sistema non gerarchico")},e.prototype.assignLevel=function(e,t){for(var n=0,i=0;i<e.length;i++){var r=e[i];if(r[this.ParentKey]||1!=t){if(r[this.ParentKey]&&t>1)for(var o=0;o<e.length;o++){var s=e[o];if(s[this.OwnKey]==r[this.ParentKey]&&s.level==t-1){r.level=t,s.expanded=this.StartsExpanded,s.parent=!0,r.visible=this.StartsExpanded,n++;break}}}else r.level=1,r.visible=!0,r.expanded=this.StartsExpanded,n++}return n},e.prototype.expandParent=function(e){for(var t=0;t<this.boundSource.length;t++){var n=this.boundSource[t];if(n[this.OwnKey]==e){n.expanded=!0;for(var i=0;i<this.boundSource.length;i++){var r=this.boundSource[i];r[this.ParentKey]==e&&(r.visible=!0)}return}}},e.prototype.collapseParent=function(e){for(var t=0;t<this.boundSource.length;t++){var n=this.boundSource[t];if(n[this.OwnKey]==e)return n.expanded=!1,void this.collapseChildOfParent(e)}},e.prototype.collapseChildOfParent=function(e){for(var t=0;t<this.boundSource.length;t++){var n=this.boundSource[t];n[this.ParentKey]!=e||n.parent?n[this.ParentKey]==e&&n.parent&&(n.expanded=!1,n.visible=!1,this.collapseChildOfParent(n[this.OwnKey])):n.visible=!1}},e.prototype.globalCheckChanged=function(e){void 0===e&&(e=null);var t=this.getItemsByMode(),n=this.handleItemsSelection(t,e,this.globalCheck);this.changed(),this.onSelectionChanged.emit(n)},e.prototype.handleItemsSelection=function(e,t,n){var i,r;void 0===t&&(t=null),void 0===n&&(n=null);var o=(null===(i=this.View)||void 0===i?void 0:i.selection)||this.arraymodeSelection;if(this.SingleSelection&&(null===(r=e[0])||void 0===r?void 0:r._selected)){if(e.length>1&&null==t)throw"Tentativo di selezionare o deselezionare più di un elemento con SingleSelection attivo";1==e.length&&null==t&&(o=this.handleItemsSelection(this.getItemsByMode(),!1,null),e[0]._selected=!0)}for(var s=0;s<e.length;s++){var a=e[s];(null!=t?a._selected!=t:null!=n&&a._selected!=this.globalCheck)&&!a.locked&&(a._selected=null!=t?t:this.globalCheck),o.all?a._selected&&this.selOrDeselCache[a.hash]?(o.exclusions.splice(o.exclusions.indexOf(this.selOrDeselCache[a.hash]),1),delete this.selOrDeselCache[a.hash]):a._selected||this.selOrDeselCache[a.hash]||(this.selOrDeselCache[a.hash]=a,o.exclusions.push(a)):a._selected&&!this.selOrDeselCache[a.hash]?(this.selOrDeselCache[a.hash]=a,o.items.push(a)):!a._selected&&this.selOrDeselCache[a.hash]&&(o.items.splice(o.items.indexOf(this.selOrDeselCache[a.hash]),1),delete this.selOrDeselCache[a.hash])}return null==n&&(this.globalCheck=!e.some((function(e){return!e._selected}))&&!this.getItemsByMode().some((function(e){return!e._selected}))),this.finalizeSelectionInformations(o),o},e.prototype.finalizeSelectionInformations=function(e){e.count=this.evaluateSelected(),0==e.count&&e.all&&(e.all=!1,e.exclusions=[],e.items=[],this.selOrDeselCache={}),this.canSelectAll=e.count>0&&this.SelectAll},e.prototype.handleClick=function(e,t){if(("Range"==e.view.getSelection().type||e.view.getSelection().toString().length>0)&&!e.shiftKey)return!1;("Range"==e.view.getSelection().type||e.view.getSelection().toString().length>0)&&e.shiftKey&&this.utiExts.clearTextSelection();var n=[];if(e.shiftKey&&this.ShiftClick&&!this.SingleSelection)for(var i=!1,r=this.getItemsByMode(),o=0;o<r.length;o++){var s=r[o];i&&(s._selected=!0,n.push(s)),s!=t&&s!=this.lastSelected||i?s!=t&&s!=this.lastSelected||!i||(i=!1):(i=!0,s._selected=!0,n.push(s))}else t._selected=!t._selected,this.lastSelected=t,n.push(t);var a=this.handleItemsSelection(n);return this.changed(),this.onSelectionChanged.emit(a),!0},e.prototype.evaluateSelected=function(){var e,t=(null===(e=this.View)||void 0===e?void 0:e.selection)||this.arraymodeSelection;return this.selectedObjects=t.all?(this.View.objectcount||this.View.length)-t.exclusions.length:t.items.length,this.selectedObjects},e.prototype.selectAllOrResetSelection=function(){var e=this.View.selection||this.arraymodeSelection;this.selOrDeselCache={},e.all=!e.all,e.exclusions=[],e.items=[],e.all||(this.canSelectAll=!1,this.globalCheck=!1),this.finalizeSelectionInformations(e),this.onSelectionChanged.emit(e),this.evaluateSelection(this.viewMode?this.View.items:this.View,e)},e.prototype.addToPage=function(e){(this.View instanceof w||this.SearchView instanceof w||this.View instanceof x)&&this.goToPage((this.SearchView||this.View).page+e)},e.prototype.goToPage=function(e){if(this.View instanceof w||this.SearchView instanceof w||this.View instanceof x){var t=this.SearchView||this.View;0===e||e>t.pages||(t.page=e,this.arrayPulsanti=this.getPagesArray(6,t.page,t.pages),this.emitSearchRequest(!1))}},e.prototype.onItemsPerPageChanged=function(){this.emitSearchRequest(!0)},e.prototype.tryExport=function(e){var t=this;this.ExportFunction&&(this.reportMode?this.ExportFunction(e):this.ExportFunction((function(e,n){void 0===n&&(n=!1),n||(t.setupExport(e),t.cdr.detectChanges(),setTimeout((function(){t.exportDownloader.nativeElement.click()})))})))},e.prototype.setupExport=function(e){var t=this.DynamicRowColumnsDefinition;this.headers=t&&t.length>0?this.expExts.setupForGenericExport(e,t.map((function(e){return{label:e.description,key:e.propertyName,order:e.columnOrder}}))):this.expExts.setupForExport(e),this.data=e},e.prototype.setupNextOrderAndSearch=function(e){if(this.View instanceof x){var t,n={NONE:"DESC",DESC:"ASC",ASC:null}[e.order||"NONE"];e.order=n;var i=this.View.orders?this.View.orders.filter((function(t){return t.column==e.id})):[];0==i.length&&e.order?((t=new S).column=e.id,t.order=e.order,this.View.orders||(this.View.orders=[]),this.View.orders.push(t)):1==i.length?e.order?i[0].order=e.order:i=[]:console.warn("Impossibile settare ordinamento. Colonna "+e.id+" direttive di ordinamento "+i.length+" ordinamento scelto "+e.order),this.emitSearchRequest(!1)}else console.error("View diversa da reportdefinition entrata nel metodo setupNextOrderAndSearch")},e.prototype.reviewReportBindings=function(){var e=this;if(this.View instanceof x){this.View.orders&&this.View.orders.length>0&&this.View.orders.forEach((function(t){e.ReportValues.columns.filter((function(e){return e.id==t.column}))[0].order=t.order})),-2!=this.ReportValues.count?this.previousCount=this.ReportValues.count:-2==this.ReportValues.count&&(this.ReportValues.count=this.previousCount);var t=this.View.itemsperpageoverride||15;this.View.pages=Math.ceil(this.ReportValues.count/t),this.arrayPulsanti=this.getPagesArray(6,this.View.page,this.View.pages)}else console.error("View diversa da reportdefinition entrata nel metodo reviewReportBindings")},e.prototype.autoUpdateChanged=function(){var e=this;/^[1-9]\d*$/.test(this.seconds)||(this.seconds="10");var t=1e3*parseInt(this.seconds,null);this.autoUpdate?this.updateTimer=setInterval((function(){e.emitSearchRequest(!1)}),t):clearInterval(this.updateTimer)},e.prototype.dynamicOperation=function(e,t){this.onDynamicOperation.emit({id:t,item:e})},e.prototype.generateRouterLink=function(e,t,n){if(this.DynamicTableRouterLinkCache[n.hash+e])return this.DynamicTableRouterLinkCache[n.hash+e];var i=this.getRouterLink(e,t,n);return this.DynamicTableRouterLinkCache[n.hash+e]=i,i},e.prototype.getRouterLink=function(e,t,n){for(var i=0;i<t.length;i++)e=e.replace("{"+i+"}",n.properties[t[i]]);return e=e.replace(/'/g,'"').replace(/ /g,""),JSON.parse(e)},e.prototype.arrayAddToPage=function(e){this.arrayGoToPage(this.arraymodePage+e)},e.prototype.arrayGoToPage=function(e){0===e||e>this.arraymodePages||(this.arraymodePage=e,this.internalWriteValue())},e.prototype.refreshPaging=function(e){this.ArraymodeItemsPerPage=e,this.arraymodePages=Math.ceil(this.View.length/this.ArraymodeItemsPerPage),this.arraymodePage=1,this.internalWriteValue()},e.prototype.adaptViewToPaging=function(){var e=[];this.arrayPulsanti=this.getPagesArray(6,this.arraymodePage,this.arraymodePages);for(var t=(this.arraymodePage-1)*this.ArraymodeItemsPerPage;t<this.arraymodePage*this.ArraymodeItemsPerPage;t++)t<=this.View.length-1&&e.push(this.View[t]);return e},e.prototype.cellClicked=function(e,t){return!(!this.UseCustomCellActions||-1==this.CustomCellActionsOn.split("$").indexOf(e))&&(this.onCellClick.emit({column:e,model:t}),!0)},e.prototype.cornerActionClicked=function(e){this.onCornerAction.emit({id:e,estable:this})},e.prototype.setMode=function(e){this.viewMode="view"==e,this.arrayMode="array"==e,this.reportMode="report"==e,this.reportMode&&(this.XLSXExport=!0,this.CSVExport=!1)},e.prototype.internalWriteValue=function(){this.internalWriteCall=!0,this.writeValue(this.View),this.internalWriteCall=!1},e.prototype.getPagesArray=function(e,t,n){var i,r,o=[];if(-1==n&&(n=t+1),n<=e)i=1,r=n-1;else{var s=(e-2)/2;r=t+s,(i=t-s)<1?(i=1,r=e-1):r>=n&&(i=n-e+1,r=n-1)}if(o.push({val:1,cssClass:1===t?"btn-main app-white-text":"app-white-button"}),r>=i){for(var a=i;a<=r;a++)1!==a&&o.push({val:a,cssClass:a===t?"btn-main app-white-text":"app-white-button"});o.push({val:n,cssClass:n===t?"btn-main app-white-text":"app-white-button"})}return o},e.prototype.calculateHash=function(e){if(e)for(var t={},n=0;n<e.length;n++){var i=e[n];delete i._selected,delete i.hash;var r=this.hashExts.hashObject(i);t[r]=t[r]?t[r]+1:1,i.hash=r+(t[r]>1?"_"+t[r]:"")}},e.prototype.forceRefresh=function(){var e,t;this.arrayMode&&(e=this.arraymodePage,t=this.ArraymodeItemsPerPage),this.writeValue(this.View),this.cdr.detectChanges(),this.arrayMode&&(this.ArraymodeItemsPerPage=t,this.arrayGoToPage(e))},e}();k.decorators=[{type:t.Component,args:[{selector:"es-table",viewProviders:[{provide:r.LocalizationService,useClass:E}],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>\r\n\r\n\x3c!--\r\nI TH sono contenuto statico, questo significa che senza condizione per RowTHs arriverebbero sia qui sia nell ng-container dell\'header in fase non inizializzata, duplicando fisicamente le colonne.\r\nPer ovviare al problema, questo pezzo lo faccio apparire solo se ci sono già dei RowTHs, quindi su valorizzazione della View succederà:\r\n1) appaiono i th nell\' ng-container dell\'header, e NON qui\r\n2) i TH vengono presi, elaborati e trasformati in RowTHs\r\n3) l\'ng-container dell\'header sparisce (per la condizione !UseCustomCells || !RowTHs) e qui appaiono i nuovi TH (che poi sono gli stessi di prima che girano)\r\n4) Vengono presi i nuovi TH da qui e trasformati a loro volta in RowTHs\r\n--\x3e\r\n<div hidden *ngIf="UseCustomCells && RowTHs">\r\n <ng-container *ngIf="View">\r\n \x3c!--Qui invece ci sono tutti i TH--\x3e\r\n <ng-container *ngTemplateOutlet="templateRefHeader"></ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n\x3c!--\r\nQuesta parte è un po\' più semplice del sopra. Infatti i TD vengono sì bindati in entrambi i punti (qui e nell\'ng-container del body), ma avrò le TD statiche prima di generare la TMPBoundSource.\r\nQuesto significa che il workflow di binding sarà:\r\n1) Appaiono i TD statici nel body e NON qui, perché i TMPBoundSource non sono ancora stati emessi\r\n2) Contemporaneamente all\'emissione dei TMPBoundSource vengono anche emessi i RowTds\r\n3) Considerando il punto 2, al giro dopo appariranno i TD qui, perché è stata generata la TMPBoundSource, e spariranno contemporaneamente dall\'ng-container del body (per la condizione !UseCustomCells || !RowTDs)\r\n--\x3e\r\n<div hidden *ngIf="UseCustomCells">\r\n <ng-container *ngIf="View">\r\n \x3c!--Tutti i TD che dopo verranno presi ed elaborati internamente--\x3e\r\n <ng-container *ngFor="let item of TMPBoundSource">\r\n <ng-container *ngTemplateOutlet="templateRef; context : {$implicit: item}"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-container *ngIf="View">\r\n <div *ngIf="FirstBind && ShowLoadingOnBootstrap" class="est-loading-box">\r\n <div class="est-loading-content">\r\n <span class="fa fa-spinner fa-spin"></span> {{\'Performing Table bootstrap\' | localize: lc}}...\r\n </div>\r\n </div>\r\n\r\n <div class="table-responsive datatable {{Class}}" [class.est-scrollable]="UseEndlessscroll" (scroll)="UseEndlessscroll && onScroll($event)" [style.max-height.px]="MaxHeight">\r\n <table class="{{ TableClass }}" [class.est-high-density]="HighCellDensity">\r\n <thead [hidden]="HeaderHidden || FirstBind">\r\n\r\n \x3c!-- Aggiungo il pezzo che gestisce la selezione di tutto se attivo da config --\x3e\r\n <tr *ngIf="SelectAll">\r\n <th colspan="42" [class.est-hidden]="!canSelectAll && !(View?.selection || arraymodeSelection).all">\r\n <span>{{ (selectedObjects || 0).toString() + \' \' + ((selectedObjects == 1 ? \'Object Selected\' : \'Objects Selected\') | localize : lc) }}</span> \r\n <span class="app-link app-inline" (click)="selectAllOrResetSelection()">{{ (View?.selection || arraymodeSelection).all ? (\'Reset Selection\' | localize : lc) : (\'Select Everything\' | localize : lc)}}</span>\r\n </th>\r\n </tr>\r\n\r\n \x3c!-- Blocco header group --\x3e\r\n <tr *ngIf="HasHeaderGroup">\r\n <ng-container *ngTemplateOutlet="templateRefHeaderGroup"></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="templateRefSecondaryHeaderGroup"></ng-container>\r\n <th *ngIf="Export"></th>\r\n </tr>\r\n\r\n \x3c!-- Blocco effettivo degli header --\x3e\r\n <tr>\r\n \x3c!-- Aggiungo una checkbox se la selezione è attiva --\x3e\r\n <th class="est-col-min" *ngIf="Selection">\r\n <input *ngIf="!SingleSelection" class="est-pointer" type="checkbox" [disabled]="SelectionDisabled" [(ngModel)]="globalCheck" [ngModelOptions]="{\'standalone\': true}" (ngModelChange)="globalCheckChanged();">\r\n </th>\r\n\r\n \x3c!-- Header che valgono per view mode e array mode, mostro solo su DisplayReady per evitare di far flashare in modo brutto --\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="templateRefHeader"></ng-container>\r\n </ng-container>\r\n\r\n \x3c!-- Se ho un modello dinamico dell\'oggetto creo le colonne in base alle proprietà --\x3e\r\n <ng-container *ngIf="(!UseCustomCells || !RowTHs) && DynamicRowColumnsDefinition">\r\n <ng-container *ngFor="let operation of DynamicOperations">\r\n <th class="est-col-min est-no-side-padding"></th>\r\n </ng-container>\r\n \r\n <ng-container *ngFor="let rowHeader of DynamicRowColumnsDefinition">\r\n <ng-container *ngIf="rowHeader.visible">\r\n <th *ngIf="OrderByColumn" es-th="{{rowHeader.propertyName}}" class="{{UserDefinedDynamicCols ? rowHeader.clss : \'est-nowrap\'}}" [Order]="rowHeader.dataOrder" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.orderable" [Internal]="false" [OrderBy]="OrderByColumn" [SearchInProgress]="!!researchInProgress" (onOrderChange)="thOrderChanged(rowHeader.propertyName, $event)">{{rowHeader.description}}</th>\r\n <th *ngIf="!OrderByColumn" es-th="{{rowHeader.propertyName}}" class="{{UserDefinedDynamicCols ? rowHeader.clss : \'est-nowrap\'}}" [Order]="rowHeader.dataOrder" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.orderable" [Internal]="false" [OrderBy]="OrderByColumn">{{rowHeader.description}}</th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n \x3c!-- Se non ho un modello dinamico ma invece delle celle custom, genero gli header in base ai row th --\x3e\r\n <ng-container *ngIf="UseCustomCells && RowTHs">\r\n <ng-container *ngFor="let rowHeader of RowTHs">\r\n <ng-container *ngIf="rowHeader && rowHeader.Visible">\r\n <th *ngIf="OrderByColumn" es-th="{{rowHeader.ID}}" class="{{rowHeader.Class}}" [Order]="rowHeader.Order" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.Orderable" [Internal]="true" [OrderBy]="OrderByColumn" [SearchInProgress]="!!researchInProgress" (onOrderChange)="thOrderChanged(rowHeader.ID, $event)">{{rowHeader.Content}}</th>\r\n <th *ngIf="!OrderByColumn" es-th="{{rowHeader.ID}}" class="{{rowHeader.Class}}" [Order]="rowHeader.Order" [Resizable]="ColumnsResizable" [Orderable]="rowHeader.Orderable" [Internal]="true" [OrderBy]="OrderByColumn">{{rowHeader.Content}}</th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n \x3c!--Casistica in cui ho il setup proveniente da un report. Gli header sono definiti da come è fatto il report--\x3e\r\n <ng-container *ngIf="reportMode">\r\n <th [style.color]="clm.color" *ngFor="let clm of ReportValues.columns" class="app-no-selection app-pointer est-nowrap" (click)="setupNextOrderAndSearch(clm)">\r\n {{clm.description}}\r\n <span class="fa" [class.fa-chevron-down]="clm.order == \'DESC\'" [class.fa-chevron-up]="clm.order == \'ASC\'"></span>\r\n </th>\r\n </ng-container>\r\n\r\n \x3c!--Per l\'eliminazione mi serve un header aggiuntivo--\x3e\r\n <th *ngIf="Removal" [class.app-right-10]="Export || HiddenColumns" class="est-col-min app-sticky-last-column"><span class="fa fa-trash"></span></th>\r\n\r\n \x3c!--Per l\'esportazione mi serve l\'header extra da cui faccio uscire i 3 pallocchi--\x3e\r\n <th *ngIf="Export || HiddenColumns || ColumnsOrdering || CornerMenuOptions" class="app-table-dotted-menu app-sticky-last-column est-col-min text-sm-center">\r\n \r\n \x3c!-- Link nascosto che serve a scaricare il file --\x3e\r\n <a *ngIf="headers" hidden #exportDownloader csvLink [data]="data" [headers]="headers" [delimiter]="\';\'" [filename]="ExportFileName"></a>\r\n\r\n \x3c!-- Blocco con i 3 pallocchi che tira fuori il context menu delle operazioni --\x3e\r\n <div class="btn-group" container="body" placement="bottom right" dropdown #dropdown="bs-dropdown" [autoClose]="true">\r\n <span dropdownToggle class="fa fa-ellipsis-v app-fs-18 app-pointer app-padding-3"></span>\r\n\r\n <div *dropdownMenu class="dropdown-menu dropdown-menu-right app-bring-to-front-strong">\r\n <div class="est-pointer">\r\n <a class="dropdown-item" *ngIf="(HiddenColumns || ColumnsOrdering)" (click)="resetColumnVisSelection(); changeColumnVisibilityModal.show();">\r\n <ng-container *ngIf="!HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Order\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && !ColumnsOrdering">\r\n {{\'Columns Visibility\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Visibility and Order\' | localize : lc}}\r\n </ng-container>\r\n </a>\r\n <a class="dropdown-item" *ngIf="Export && CSVExport" (click)="tryExport(\'CSV\')">{{\'Export View\' | localize : lc}} (CSV)</a>\r\n <a class="dropdown-item" *ngIf="Export && XLSXExport" (click)="tryExport(\'XLSX\')">{{\'Export View\' | localize : lc}} (XLSX)</a>\r\n <a class="dropdown-item" *ngFor="let option of CornerMenuOptions" (click)="cornerActionClicked(option.id)">{{option.description}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n </tr>\r\n </thead>\r\n \r\n \x3c!-- Valido per modalità View o Array. Se sono in report mode il body è creato in altro modo, mostro solo su DisplayReady per evitare di far flashare in modo brutto --\x3e\r\n <tbody [hidden]="BodyHidden || FirstBind" *ngIf="(arrayMode || viewMode)">\r\n \x3c!--Con selection attiva richiamo il template che gestisce il context menu--\x3e\r\n <ng-container *ngIf="Selection">\r\n <ng-container *ngTemplateOutlet="TBodySelection; context: { $implicit: { selDisabled: arrayMode ? false : SelectionDisabled, sel: Selection }}"></ng-container>\r\n </ng-container>\r\n\r\n \x3c!--Senza selection richiamo il template che NON gestisce il context menu--\x3e\r\n <ng-container *ngIf="!Selection">\r\n <ng-container *ngTemplateOutlet="TBody"></ng-container>\r\n </ng-container>\r\n </tbody>\r\n\r\n \x3c!-- Per la modalità a report c\'è un body particolare semi-dinamico --\x3e\r\n <tbody [hidden]="BodyHidden" *ngIf="reportMode">\r\n <tr *ngFor="let row of ReportValues.rows; let even = even;">\r\n <td class="est-nowrap" *ngFor="let val of row.values">{{val}}</td>\r\n <td class="app-sticky-last-column{{even && !Hierarchy ? \'-alt\' : \'\'}}"></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n <ng-container *ngIf="ShowPaging && !FirstBind">\r\n\r\n \x3c!-- Paginatore dove appare la count e le opzioni di paginazione --\x3e\r\n <div class="pull-left m-t-min-3">\r\n <ng-container *ngIf="viewMode">\r\n <ng-container *ngTemplateOutlet="pagerSelector; context: { $implicit: { ShowCount: !HidePagingCount || (View && View.objectcount && View.objectcount != -1), ShowPaging: !HidePaging, View: View, UsesView: true }}"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="arrayMode && (!UseArrayModePaging || SearchView)">\r\n <ng-container *ngTemplateOutlet="pagerSelector; context: { $implicit: { ShowCount: !HidePagingCount || (View && View.length) || (SearchView && SearchView.objectcount && SearchView.objectcount != -1), ShowPaging: !HidePaging && SearchView, View: SearchView, SecondaryView: View, UsesView: true }}"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="arrayMode && (UseArrayModePaging && !SearchView)">\r\n <ng-container *ngTemplateOutlet="pagerSelector; context: { $implicit: { ShowCount: !HidePagingCount, ShowPaging: !HidePaging && View.length > 10, View: View, UsesView: false }}"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="reportMode">\r\n <ng-container *ngTemplateOutlet="pagerSelector; context: { $implicit: { ShowCount: !HidePagingCount || (View && View.objectcount && View.objectcount != -1), ShowPaging: View.pagingavailable, MightBeNoPaging: true, View: View, Report: ReportValues, UsesView: true }}"></ng-container>\r\n </ng-container>\r\n </div>\r\n \r\n \x3c!-- Pulsanti avanti-indietro di paginazione --\x3e\r\n <div class="pull-right btn-toolbar" *ngIf="ShowPaging && !HidePagingButtons">\r\n <ng-container *ngIf="(!reportMode || View?.pagingavailable) && (!arrayMode || SearchView)">\r\n <ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { ATP: addToPage.bind(this), GTP: goToPage.bind(this), Array: arrayPulsanti }}"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf="arrayMode && UseArrayModePaging && !SearchView">\r\n <ng-container *ngTemplateOutlet="pagingButtons; context: { $implicit: { ATP: arrayAddToPage.bind(this), GTP: arrayGoToPage.bind(this), Array: arrayPulsanti }}"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class="clearfix"></div>\r\n </ng-container>\r\n</ng-container>\r\n\r\n\x3c!-- Template che contiene i pulsanti per cambiare pagina --\x3e\r\n<ng-template #pagingButtons let-options>\r\n <a class="btn app-white-button app-no-margin" (click)="options.ATP(-1)"><span class="fa fa-chevron-left"></span></a>\r\n <div *ngIf="options.Array" class="app-inline">\r\n <a *ngFor="let p of options.Array" class="btn {{p.cssClass}} app-no-margin" (click)="options.GTP(p.val)">{{p.val}}</a>\r\n </div>\r\n <a class="btn app-white-button app-no-margin" (click)="options.ATP(1)"><span class="fa fa-chevron-right"></span></a>\r\n</ng-template>\r\n\r\n\x3c!-- Template che mostra le informazioni base di paginazione: conteggio oggetti, paginazione attuale e pulsanti per cambiarla --\x3e\r\n<ng-template #pagerSelector let-options>\r\n <div *ngIf="options.ShowCount">\r\n {{ CountLabel }}: \r\n <strong *ngIf="options.UsesView && !options.Report">\r\n {{ options.View?.objectcount ? options.View.objectcount : options.SecondaryView && options.SecondaryView.length ? options.SecondaryView.length : "0" }}\r\n </strong>\r\n <strong *ngIf="!options.UsesView && !options.Report">\r\n {{ options.View.length ? options.View.length : "0" }}\r\n </strong>\r\n <strong *ngIf="options.Report">\r\n {{ options.Report.count && options.Report.count == -1 ? options.Report.rows.length : options.Report.count && options.Report.count > 0 ? options.Report.count : 0 }}\r\n </strong>\r\n </div>\r\n <div *ngIf="options.ShowPaging">\r\n <app-paging *ngIf="!options.UsesView" [Hidden]="!options.View || options.View.length == 0" [WarnOnAll]="false" [CurrentPageSize]="ArraymodeItemsPerPage" (pagingSelected)="refreshPaging($event)"></app-paging>\r\n <app-paging *ngIf="options.UsesView" [AllSearch]="AllSearch" [DefaultAll]="defaultAllPageOverride" [View]="options.View" (pagingSelected)="options.View.itemsperpageoverride = $event; changed(); onItemsPerPageChanged();"></app-paging>\r\n </div>\r\n <div *ngIf="options.MightBeNoPaging && !options.ShowPaging">\r\n <em>{{\'Paging options are not available for this report\' | localize: lc}}</em>\r\n </div>\r\n</ng-template>\r\n\r\n\x3c!-- Questi due template rappresentano effettivamente il body della tabella. essendo il tr l\'unica cosa che davvero cambia, il resto è templatizzato --\x3e\r\n<ng-template #TBodySelection let-templateOptions>\r\n <ng-container *ngFor="let item of boundSource; let even = even; let i=index;">\r\n <tr *ngIf="item.visible || !Hierarchy" \r\n [class]="item._rowClass ? item._rowClass : \'\'" [class.est-line-through]="item.removed || item.deleted" [class.est-pointer]="!item.locked" [class.est-white-selected]="item._selected && !item.locked"\r\n [contextMenu]="!item.locked ? (ContextMenu || emptyMenu) : emptyMenu" [contextMenuSubject]="item"\r\n (click)="!item.locked && handleClick($event, item)">\r\n \r\n <td *ngIf="!item.locked"><input type="checkbox" [disabled]="templateOptions.selDisabled" [class.est-pointer]="!item.locked" [(ngModel)]="item._selected" name="check{{i}}"></td>\r\n <td *ngIf="item.locked"></td>\r\n\r\n <ng-container *ngTemplateOutlet="basicColumns; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="dynamicColumns; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="customCells; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}"></ng-container>\r\n\r\n </tr>\r\n </ng-container>\r\n</ng-template> \r\n\r\n<ng-template #TBody>\r\n <ng-container *ngFor="let item of boundSource; let even = even;">\r\n <tr *ngIf="item.visible || !Hierarchy" [class]="item._rowClass ? item._rowClass : \'\'" [class.est-line-through]="item.removed || item.deleted">\r\n\r\n <ng-container *ngTemplateOutlet="basicColumns; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="dynamicColumns; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="customCells; context: { $implicit: item }"></ng-container>\r\n <ng-container *ngTemplateOutlet="bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}"></ng-container>\r\n\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\x3c!-- Questo template contiene la print condizionale su tabelle semplici, con header e body scritti a manazza --\x3e\r\n<ng-template #basicColumns let-item>\r\n <ng-container *ngIf="(!UseCustomCells || !RowTDs) && !DynamicRowColumnsDefinition">\r\n <ng-container *ngTemplateOutlet="templateRef; context : {$implicit: item}"></ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\x3c!-- Questo template contiene la print condizionale su tabelle definite in maniera dinamica dal modello --\x3e\r\n<ng-template #dynamicColumns let-item>\r\n <ng-container *ngIf="(!UseCustomCells || !RowTDs) && DynamicRowColumnsDefinition">\r\n <ng-container *ngFor="let operation of DynamicOperations; let first = first; let last = last;">\r\n <ng-container *ngIf="!operation.conditionField || (item.properties[operation.conditionField] == operation.conditionValue)">\r\n <td [class.est-no-right-padding]="last" [class.est-no-left-padding]="!first" class="est-col-min"><span title="{{operation.title}}" class="{{operation.iconClass}} app-pointer" (click)="dynamicOperation(item, operation.id)">{{operation.text}}</span></td>\r\n </ng-container>\r\n <ng-container *ngIf="operation.conditionField && (item.properties[operation.conditionField] != operation.conditionValue)">\r\n <td class="est-col-min est-no-side-padding"></td>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor="let rowItem of DynamicRowColumnsDefinition">\r\n <ng-container *ngIf="rowItem.routePath && rowItem.visible">\r\n <td es-td="{{rowItem.propertyName}}" class="{{UserDefinedDynamicCols ? rowItem.clss : \'est-nowrap\'}}" [Internal]="false">\r\n <a [routerLink]="generateRouterLink(rowItem.routePath, rowItem.routeParameterProperties, item)" class="app-link" [innerHTML]="item.properties[rowItem.propertyName]"></a>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf="!rowItem.routePath && rowItem.visible">\r\n <td es-td="{{rowItem.propertyName}}" class="{{UserDefinedDynamicCols ? rowItem.clss : \'est-nowrap\'}}" [class.app-pointer]="UseCustomCellActions && CustomCellActionsOn.indexOf(\'$\' + rowItem.propertyName + \'$\') != -1" (click)="cellClicked(rowItem.propertyName, item) && !CellActionPropagates && $event.stopPropagation()" [Internal]="false" [innerHTML]="item.properties[rowItem.propertyName]"></td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\x3c!-- Questo template contiene la print condizionale delle celle custom se configurate --\x3e\r\n<ng-template #customCells let-item>\r\n <ng-container *ngIf="UseCustomCells && RowTDs">\r\n <ng-container *ngFor="let rowItem of RowTDs[item.hash]; let i = index">\r\n <ng-container *ngIf="rowItem">\r\n <ng-container *ngIf="rowItem.RouterLink && rowItem.Visible">\r\n <td es-td="{{rowItem.ID}}" class="{{rowItem.Class}}" [class.est-nowrap]="Hierarchy" [Internal]="true">\r\n <ng-container *ngIf="Hierarchy && i == 0">\r\n <span *ngIf="!item.parent" class="fa fa-chevron-down" style="visibility:hidden"></span>\r\n <span *ngIf="item.parent && item.expanded" class="fa fa-chevron-down est-pointer app-no-selection" (click)="collapseParent(item[this.OwnKey])"></span>\r\n <span *ngIf="item.parent && !item.expanded" class="fa fa-chevron-up est-pointer app-no-selection" (click)="expandParent(item[this.OwnKey])"></span>\r\n \r\n </ng-container>\r\n <a [routerLink]=\'rowItem.RouterLink\' class="app-link" [innerHTML]="rowItem.Content"></a>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf="!rowItem.RouterLink && rowItem.Visible">\r\n <td es-td="{{rowItem.ID}}" class="{{rowItem.Class}}" [class.est-nowrap]="Hierarchy" [class.app-pointer]="UseCustomCellActions && CustomCellActionsOn.indexOf(\'$\' + $any(rowItem).ID + \'$\') != -1" (click)="cellClicked(rowItem.ID, item) && !CellActionPropagates && $event.stopPropagation()" [Internal]="true">\r\n <ng-container *ngIf="Hierarchy && i == 0">\r\n <span *ngIf="!item.parent" class="fa fa-chevron-down" style="visibility:hidden"></span>\r\n <span *ngIf="item.parent && item.expanded" class="fa fa-chevron-down est-pointer app-no-selection" (click)="collapseParent(item[this.OwnKey])"></span>\r\n <span *ngIf="item.parent && !item.expanded" class="fa fa-chevron-up est-pointer app-no-selection" (click)="expandParent(item[this.OwnKey])"></span>\r\n \r\n </ng-container>\r\n <ng-container *ngIf="rowItem.Template">\r\n <ng-container *ngTemplateOutlet="rowItem.Template; context: { $implicit: item }"></ng-container>\r\n </ng-container>\r\n <span *ngIf="!rowItem.Template" [innerHTML]="rowItem.Content"></span>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\x3c!-- Questo template contiene i pulsanti di eliminazione/undo eliminazione ed esportazione che vanno in fondo ad un record edlla tabella --\x3e\r\n<ng-template #bodyDeleteAndExport let-options>\r\n <ng-container *ngIf="Removal && !RemovalCondition">\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="!(options.item.removed || options.item.deleted)"><span class="fa fa-remove app-pointer text-danger" [hidden]="options.item.removable != undefined && !options.item.removable" (click)="onRemoval.emit(options.item)"></span></td>\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="(options.item.removed || options.item.deleted)"><span class="fa fa-undo text-warning app-pointer" (click)="onAbortRemoval.emit(options.item)"></span></td>\r\n </ng-container>\r\n <ng-container *ngIf="Removal && RemovalCondition">\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="!(options.item.removed || options.item.deleted) && options.item[RemovalCondition]"><span class="fa fa-remove app-pointer text-danger" [hidden]="options.item.removable != undefined && !options.item.removable" (click)="onRemoval.emit(options.item)"></span></td>\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="(options.item.removed || options.item.deleted) && options.item[RemovalCondition]"><span class="fa fa-undo text-warning app-pointer" (click)="onAbortRemoval.emit(options.item)"></span></td>\r\n <td class="app-sticky-last-column{{options.even? \'-alt\' : \'\'}} {{Export || HiddenColumns || CornerMenuOptions ? \'est-right-10\' : \'\'}}" *ngIf="!options.item[RemovalCondition]"><span class="fa fa-remove app-hidden-view"></span></td>\r\n </ng-container>\r\n <td *ngIf="Export || HiddenColumns || CornerMenuOptions" class="app-sticky-last-column{{options.even && !Hierarchy ? \'-alt\' : \'\'}}"></td>\r\n</ng-template>\r\n\r\n\x3c!-- Context menu vuoto default per tutte le tabella che non ce l\'hanno, in modo che al click destro appaia "nessuna op disponibile" --\x3e\r\n<context-menu #emptyMenu>\r\n <ng-template contextMenuItem>\r\n <span>\r\n <em>{{\'No operations available\' | localize : lc}}...</em>\r\n </span>\r\n </ng-template>\r\n</context-menu>\r\n\r\n\x3c!-- Modal per cambiare posizione e visibilità delle colonne dell\'es-table --\x3e\r\n<div bsModal #changeColumnVisibilityModal="bs-modal" class="modal fade" role="dialog" aria-hidden="true">\r\n <div class="modal-dialog modal-lg" app-draggable=".modal-header">\r\n <div class="modal-content" app-draggable=".modal-header">\r\n <div class="modal-header">\r\n <h5 class="modal-title pull-left">\r\n <ng-container *ngIf="!HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Order\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && !ColumnsOrdering">\r\n {{\'Columns Visibility\' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf="HiddenColumns && ColumnsOrdering">\r\n {{\'Columns Visibility and Order\' | localize : lc}}\r\n </ng-container>\r\n </h5>\r\n <button type="button" class="close pull-right" (click)="changeColumnVisibilityModal.hide();" aria-label="Close">\r\n <span aria-hidden="true">×</span>\r\n </button>\r\n </div>\r\n <div class="modal-body">\r\n <div *ngIf="!TMPColumnsList || TMPColumnsList.length == 0" class="card card-info app-padding-10 app-margin-bottom-0">\r\n {{\'There are no columns configured to be hidden/shown in this view\' | localize : lc}}\r\n </div>\r\n <div *ngIf="TMPColumnsList && TMPColumnsList.length > 0" style="max-height:500px; overflow-y:auto">\r\n \x3c!--Aaaaaaah la tristezza... qui mi servirebbe l\'es-table per facilitare la selezione multipla ecc... peccato che se la linko qui entro in un loop impressionante--\x3e\r\n <table class="table table-striped table-sm app-margin-bottom-0">\r\n <thead>\r\n <tr>\r\n <th class="est-col-min" *ngIf="HiddenColumns">\r\n <input class="est-pointer" type="checkbox" [(ngModel)]="globalColVisCheck" [ngModelOptions]="{\'standalone\': true}" (ngModelChange)="globalColVisCheckChanged();">\r\n </th>\r\n <th class="est-col-min" *ngIf="ColumnsOrdering"></th>\r\n <th class="est-col-min est-nowrap">{{\'Column Name\' | localize : lc}}</th>\r\n \x3c!--Filler--\x3e\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor="let item of TMPColumnsList; let i = index; let last = last" class="est-pointer" [class.est-white-selected]="lastSelectedItemID == item.id" [class.est-no-selection]="!item.visible" (click)="columnClicked(item);">\r\n <td *ngIf="HiddenColumns"><input type="checkbox" class="est-pointer" [(ngModel)]="item.visible" name="visible{{i}}" (ngModelChange)="updateGlobalColVisCheck();" /></td>\r\n <td class="est-nowrap" *ngIf="ColumnsOrdering">\r\n <span class="fa fa-arrow-up" (click)="lastSelectedItemID = item.id; i != 0 && sendUp(item)"></span>\r\n <span class="fa fa-arrow-down" (click)="lastSelectedItemID = item.id; !last && sendDown(item)"></span>\r\n </td>\r\n <td class="est-nowrap">{{item.description}}</td>\r\n \x3c!--Filler--\x3e\r\n <td></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div class="modal-footer">\r\n <button type="button" class="btn btn-secondary app-margin-right-10" (click)="lastSelectedItemID = null; changeColumnVisibilityModal.hide();">{{\'Close\' | localize : lc}}</button>\r\n <button type="button" [disabled]="!TMPColumnsList || TMPColumnsList.length == 0" class="btn btn-primary" (click)="confirmColumnVisibilitySelection() && changeColumnVisibilityModal.hide()">{{\'Confirm\' | localize : lc}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>',styles:['.est-loading-box{height:200px;text-align:center;position:relative;background:#ccc}.est-loading-content{margin:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:35px}.est-scrollable{max-height:600px;overflow:auto}.est-pointer{cursor:pointer}.est-high-density td,.est-high-density th{padding:0 .2rem}.est-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.est-nowrap{white-space:nowrap}.est-white-selected{background-color:#ddd!important}.est-line-through{text-decoration:line-through}.est-no-side-padding{padding-left:0;padding-right:0}.est-no-left-padding,.est-no-right-padding{padding-left:0}.est-col-min{width:1px}.est-switch{position:relative;display:inline-block;width:30px;height:17px;margin-bottom:0;margin-right:5px;margin-left:5px}.est-switch input{display:none}.est-slider{cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc}.est-slider,.est-slider:before{position:absolute;transition:.4s}.est-slider:before{content:"";height:13px;width:13px;left:3px;bottom:2px;background-color:#fff}input:checked+.est-slider{background-color:#2196f3}input:focus+.est-slider{box-shadow:0 0 1px #2196f3}input:checked+.est-slider:before{transform:translateX(11px)}.est-slider.round{border-radius:10px}.est-slider.round:before{border-radius:50%}.est-custom-input{width:30px;display:inline;padding:1px;height:20px}.est-row-lvl-1 td:first-child{padding-left:5px}.est-row-lvl-2 td:first-child{padding-left:20px}.est-row-lvl-3 td:first-child{padding-left:35px}.est-row-lvl-4 td:first-child{padding-left:50px}.est-row-lvl-5 td:first-child{padding-left:65px}.est-row-lvl-6 td:first-child{padding-left:80px}.est-row-lvl-7 td:first-child{padding-left:95px}.est-row-lvl-8 td:first-child{padding-left:110px}.est-row-lvl-9 td:first-child{padding-left:125px}.est-row-lvl-10 td:first-child{padding-left:140px}.est-row-lvl-11 td:first-child{padding-left:155px}.est-row-lvl-12 td:first-child{padding-left:170px}.est-row-lvl-13 td:first-child{padding-left:185px}.est-row-lvl-14 td:first-child{padding-left:200px}.est-row-lvl-15 td:first-child{padding-left:215px}.est-row-lvl-16 td:first-child{padding-left:230px}.est-row-lvl-17 td:first-child{padding-left:245px}.est-row-lvl-18 td:first-child{padding-left:260px}.est-row-lvl-19 td:first-child{padding-left:275px}.est-row-lvl-20 td:first-child{padding-left:290px}.est-row-lvl-21 td:first-child{padding-left:305px}.est-row-lvl-22 td:first-child{padding-left:320px}.est-row-lvl-23 td:first-child{padding-left:335px}.est-row-lvl-24 td:first-child{padding-left:350px}.est-row-lvl-25 td:first-child{padding-left:365px}.est-row-lvl-26 td:first-child{padding-left:380px}.est-row-lvl-27 td:first-child{padding-left:395px}.est-row-lvl-28 td:first-child{padding-left:410px}.est-row-lvl-29 td:first-child{padding-left:425px}.est-row-lvl-30 td:first-child{padding-left:440px}.est-row-lvl-31 td:first-child{padding-left:455px}.est-row-lvl-32 td:first-child{padding-left:470px}.est-row-lvl-33 td:first-child{padding-left:485px}.est-row-lvl-34 td:first-child{padding-left:500px}.est-row-lvl-35 td:first-child{padding-left:515px}.est-row-lvl-36 td:first-child{padding-left:530px}.est-row-lvl-37 td:first-child{padding-left:545px}.est-row-lvl-38 td:first-child{padding-left:560px}.est-row-lvl-39 td:first-child{padding-left:575px}.est-row-lvl-40 td:first-child{padding-left:590px}.est-row-lvl-41 td:first-child{padding-left:605px}.est-row-lvl-42 td:first-child{padding-left:620px}.est-row-lvl-43 td:first-child{padding-left:635px}.est-row-lvl-44 td:first-child{padding-left:650px}.est-row-lvl-45 td:first-child{padding-left:665px}.est-row-lvl-46 td:first-child{padding-left:680px}.est-row-lvl-47 td:first-child{padding-left:695px}.est-row-lvl-48 td:first-child{padding-left:710px}.est-row-lvl-49 td:first-child{padding-left:725px}.est-row-lvl-50 td:first-child{padding-left:740px}.est-row-lvl-51 td:first-child{padding-left:755px}.est-row-lvl-52 td:first-child{padding-left:770px}.est-row-lvl-53 td:first-child{padding-left:785px}.est-row-lvl-54 td:first-child{padding-left:800px}.est-row-lvl-55 td:first-child{padding-left:815px}.est-row-lvl-56 td:first-child{padding-left:830px}.est-row-lvl-57 td:first-child{padding-left:845px}.est-row-lvl-58 td:first-child{padding-left:860px}.est-row-lvl-59 td:first-child{padding-left:875px}.est-row-lvl-60 td:first-child{padding-left:890px}.est-row-lvl-61 td:first-child{padding-left:905px}.est-row-lvl-62 td:first-child{padding-left:920px}.est-row-lvl-63 td:first-child{padding-left:935px}.est-row-lvl-64 td:first-child{padding-left:950px}.est-row-lvl-65 td:first-child{padding-left:965px}.est-row-lvl-66 td:first-child{padding-left:980px}.est-row-lvl-67 td:first-child{padding-left:995px}.est-row-lvl-68 td:first-child{padding-left:1010px}.est-row-lvl-69 td:first-child{padding-left:1025px}.est-row-lvl-70 td:first-child{padding-left:1040px}.est-row-lvl-71 td:first-child{padding-left:1055px}.est-row-lvl-72 td:first-child{padding-left:1070px}.est-row-lvl-73 td:first-child{padding-left:1085px}.est-row-lvl-74 td:first-child{padding-left:1100px}.est-row-lvl-75 td:first-child{padding-left:1115px}.est-row-lvl-76 td:first-child{padding-left:1130px}.est-row-lvl-77 td:first-child{padding-left:1145px}.est-row-lvl-78 td:first-child{padding-left:1160px}.est-row-lvl-79 td:first-child{padding-left:1175px}.est-row-lvl-80 td:first-child{padding-left:1190px}.est-row-lvl-81 td:first-child{padding-left:1205px}.est-row-lvl-82 td:first-child{padding-left:1220px}.est-row-lvl-83 td:first-child{padding-left:1235px}.est-row-lvl-84 td:first-child{padding-left:1250px}.est-row-lvl-85 td:first-child{padding-left:1265px}.est-row-lvl-86 td:first-child{padding-left:1280px}.est-row-lvl-87 td:first-child{padding-left:1295px}.est-row-lvl-88 td:first-child{padding-left:1310px}.est-row-lvl-89 td:first-child{padding-left:1325px}.est-row-lvl-90 td:first-child{padding-left:1340px}.est-row-lvl-91 td:first-child{padding-left:1355px}.est-row-lvl-92 td:first-child{padding-left:1370px}.est-row-lvl-93 td:first-child{padding-left:1385px}.est-row-lvl-94 td:first-child{padding-left:1400px}.est-row-lvl-95 td:first-child{padding-left:1415px}.est-row-lvl-96 td:first-child{padding-left:1430px}.est-row-lvl-97 td:first-child{padding-left:1445px}.est-row-lvl-98 td:first-child{padding-left:1460px}.est-row-lvl-99 td:first-child{padding-left:1475px}.est-right-10{right:10px}.est-hidden{visibility:hidden}']}]}],k.ctorParameters=function(){return[{type:n.NgControl,decorators:[{type:t.Self},{type:t.Optional}]},{type:o.PreferencesService,decorators:[{type:t.Optional}]},{type:r.LocalizationService},{type:t.ChangeDetectorRef},{type:i.HashingService},{type:i.UtilityService},{type:i.ExportService}]},k.propDecorators={EsThs:[{type:t.ContentChildren,args:[t.forwardRef((function(){return z}))]}],EsTds:[{type:t.ContentChildren,args:[t.forwardRef((function(){return R}))]}],templateRef:[{type:t.ContentChild,args:["body",{static:!1}]}],templateRefHeader:[{type:t.ContentChild,args:["header",{static:!1}]}],templateRefHeaderGroup:[{type:t.ContentChild,args:["headerGroup",{static:!1}]}],templateRefSecondaryHeaderGroup:[{type:t.ContentChild,args:["secondaryHeaderGroup",{static:!1}]}],CornerMenuOptions:[{type:t.Input}],ColumnsResizable:[{type:t.Input}],AutoUpdate:[{type:t.Input}],UseCustomCellActions:[{type:t.Input}],CustomCellActionsOn:[{type:t.Input}],CellActionPropagates:[{type:t.Input}],UseCustomCells:[{type:t.Input}],MaxHeight:[{type:t.Input}],Class:[{type:t.Input}],XLSXExport:[{type:t.Input}],CSVExport:[{type:t.Input}],AllSearch:[{type:t.Input}],HighCellDensity:[{type:t.Input}],Selection:[{type:t.Input}],ShowLoadingOnBootstrap:[{type:t.Input}],Removal:[{type:t.Input}],RemovalCondition:[{type:t.Input}],Export:[{type:t.Input}],ShiftClick:[{type:t.Input}],ShowPaging:[{type:t.Input}],HidePaging:[{type:t.Input}],HidePagingCount:[{type:t.Input}],HidePagingButtons:[{type:t.Input}],ContextMenu:[{type:t.Input}],ExportFileName:[{type:t.Input}],TableClass:[{type:t.Input}],CountLabel:[{type:t.Input}],ExportFunction:[{type:t.Input}],HasHeaderGroup:[{type:t.Input}],HasSecondaryHeaderGroup:[{type:t.Input}],SliceSize:[{type:t.Input}],EndlessScroll:[{type:t.Input}],EndlessScrollOnlyForAll:[{type:t.Input}],HeaderHidden:[{type:t.Input}],BodyHidden:[{type:t.Input}],SelectionDisabled:[{type:t.Input}],SingleSelection:[{type:t.Input}],RowClassAssigner:[{type:t.Input}],OrderByColumn:[{type:t.Input}],MultipleOrderingDirectives:[{type:t.Input}],HiddenColumns:[{type:t.Input}],ColumnsOrdering:[{type:t.Input}],SearchView:[{type:t.Input}],SelectAll:[{type:t.Input}],UseArrayModePaging:[{type:t.Input}],DynamicRowColumnsDefinition:[{type:t.Input}],DynamicOperations:[{type:t.Input}],Hierarchy:[{type:t.Input}],ParentKey:[{type:t.Input}],OwnKey:[{type:t.Input}],StartsExpanded:[{type:t.Input}],SavePreferences:[{type:t.Input}],SecondarySource:[{type:t.Input}],TertiarySource:[{type:t.Input}],UseSelectionCache:[{type:t.Input}],onOrderChanged:[{type:t.Output}],onSearchRequest:[{type:t.Output}],onSelectionChanged:[{type:t.Output}],onRemoval:[{type:t.Output}],onAbortRemoval:[{type:t.Output}],onCellClick:[{type:t.Output}],onCornerAction:[{type:t.Output}],onDynamicOperation:[{type:t.Output}],exportDownloader:[{type:t.ViewChild,args:["exportDownloader",{static:!1}]}],tableEmptyMenu:[{type:t.ViewChild,args:["emptyMenu",{static:!0}]}],ArraymodeItemsPerPage:[{type:t.Input}]};var A=function(){},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",["Tutto"]),e.prototype.set.call(n,"en->it","Are you sure you want to retrieve all results?",["Si è sicuri di voler caricare tutti i risultati?"]),e.prototype.set.call(n,"en->it","This might slow down the page and possibly crash the entire application",["L'operazione potrebbe rallentare la pagina fino al crash dell'applicazione"]),n}return g(t,e),t}(r.LocalizationService);L.decorators=[{type:t.Injectable}],L.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[H]}]}]};var _=function(){function e(e,n){this.msgExts=e,this.lc=n,this.WarnOnAll=!0,this.AllSearch=!0,this.DefaultAll=999999,this.pagingSelected=new t.EventEmitter}return e.prototype.choice=function(e){var t=this;e==this.DefaultAll&&this.WarnOnAll?this.msgExts.simpleWarningWithChoice(this.lc.loc("Are you sure you want to retrieve all results?"),this.lc.loc("This might slow down the page and possibly crash the entire application"),(function(){t.pagingSelected.emit(e)})):this.pagingSelected.emit(e)},e}();_.decorators=[{type:t.Component,args:[{selector:"app-paging",viewProviders:[{provide:r.LocalizationService,useClass:L}],template:'\x3c!--Se non ho almeno 10 elementi non ha senso far vedere le opzioni di paginazione--\x3e\r\n<ng-container *ngIf="View ? ((View.objectcount && View.objectcount >= 10) || View.pagingavailable) : !Hidden">\r\n {{\'Paging\' | localize : lc}}: \r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 10 : CurrentPageSize == 10"\r\n (click)="choice(10);">\r\n 10\r\n </span> | \r\n\r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 15 : CurrentPageSize == 15"\r\n (click)="choice(15);">\r\n 15\r\n </span> | \r\n\r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 30 : CurrentPageSize == 30"\r\n (click)="choice(30);">\r\n 30\r\n </span> | \r\n\r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 45 : CurrentPageSize == 45"\r\n (click)="choice(45);">\r\n 45\r\n </span> | \r\n\r\n <span class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == 100 : CurrentPageSize == 100"\r\n (click)="choice(100);">\r\n 100\r\n </span><span *ngIf="AllSearch"> | </span>\r\n <span *ngIf="AllSearch" class="app-link app-inline"\r\n [class.app-bold]="View ? View.itemsperpageoverride && View.itemsperpageoverride == DefaultAll : CurrentPageSize == DefaultAll"\r\n (click)="choice(DefaultAll);">\r\n {{\'All\' | localize : lc}}\r\n </span>\r\n</ng-container>'}]}],_.ctorParameters=function(){return[{type:i.MessageService},{type:r.LocalizationService}]},_.propDecorators={CurrentPageSize:[{type:t.Input}],View:[{type:t.Input}],Hidden:[{type:t.Input}],WarnOnAll:[{type:t.Input}],AllSearch:[{type:t.Input}],DefaultAll:[{type:t.Input}],pagingSelected:[{type:t.Output}]};var B=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:H,useValue:(null==t?void 0:t.locale)||"it-IT"}]}},e}();B.decorators=[{type:t.NgModule,args:[{imports:[a.CommonModule,n.FormsModule,l.RouterModule,r.LocalizationModule,c.ModalModule,d.BsDropdownModule,p.CsvModule,h.ContextMenuModule],declarations:[z,R,k,_],providers:[i.UtilityService,i.ExportService,i.HashingService,i.MessageService],exports:[z,R,k,_]}]}],e.AppOrdering=v,e.AppSearch=w,e.CornerMenuOption=b,e.EsTableColumn=D,e.EsTableColumnsDefinition=y,e.EsTableComponent=k,e.EsTableModule=B,e.EsTableModuleConfig=A,e.EsTableOperationDefinition=T,e.EsTd=R,e.EsTh=z,e.GenericItem=C,e.ItemsSelection=M,e.ReportColumn=I,e.ReportDefinition=x,e.ReportOrder=S,e.ReportParam=P,e.ReportResult=O,e.ReportRow=V,e.ɵa=E,e.ɵb=H,e.ɵc=_,e.ɵd=L,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=esfaenza-es-table.umd.min.js.map
|