UNPKG

@duoduo-oba/ng-devui

Version:

DevUI components based on Angular

15 lines (13 loc) 136 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs/operators"),require("ng-devui/window-ref"),require("rxjs"),require("ng-devui/input-number"),require("ng-devui/select"),require("ng-devui/tree-select"),require("ng-devui/utils"),require("ng-devui/i18n"),require("@angular/common"),require("@angular/forms"),require("@angular/cdk/scrolling"),require("ng-devui/pagination"),require("ng-devui/common"),require("ng-devui/datepicker"),require("ng-devui/checkbox"),require("ng-devui/button"),require("ng-devui/dropdown"),require("ng-devui/tooltip"),require("ng-devui/dragdrop")):"function"==typeof define&&define.amd?define("ng-devui/data-table",["exports","@angular/core","rxjs/operators","ng-devui/window-ref","rxjs","ng-devui/input-number","ng-devui/select","ng-devui/tree-select","ng-devui/utils","ng-devui/i18n","@angular/common","@angular/forms","@angular/cdk/scrolling","ng-devui/pagination","ng-devui/common","ng-devui/datepicker","ng-devui/checkbox","ng-devui/button","ng-devui/dropdown","ng-devui/tooltip","ng-devui/dragdrop"],t):t(((e=e||self)["ng-devui"]=e["ng-devui"]||{},e["ng-devui"]["data-table"]={}),e.ng.core,e.rxjs.operators,e["ng-devui"]["window-ref"],e.rxjs,e["ng-devui"]["input-number"],e["ng-devui"].select,e["ng-devui"]["tree-select"],e["ng-devui"].utils,e["ng-devui"].i18n,e.ng.common,e.ng.forms,e.ng.cdk.scrolling,e["ng-devui"].pagination,e["ng-devui"].common,e["ng-devui"].datepicker,e["ng-devui"].checkbox,e["ng-devui"].button,e["ng-devui"].dropdown,e["ng-devui"].tooltip,e["ng-devui"].dragdrop)}(this,(function(e,t,n,r,i,l,o,a,s,d,c,p,h,u,g,m,f,v,b,w,y){"use strict"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */var x=function(){return(x=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function C(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,l=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=l.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}return o}function I(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(C(arguments[t]));return e}var k=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"d-cell-edit",template:"",changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.propDecorators={template:[{type:t.ContentChild,args:[t.TemplateRef,{static:!1}]}]},e}();var E=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"d-cell",template:"",changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.propDecorators={template:[{type:t.ContentChild,args:[t.TemplateRef,{static:!1}]}]},e}();var T=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"d-head-cell",template:"",changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.propDecorators={template:[{type:t.ContentChild,args:[t.TemplateRef,{static:!1}]}]},e}();var S=function(){function e(){this.fieldType="text",this.order=Number.MAX_VALUE,this.nestedColumn=!1,this.filterChange=new t.EventEmitter,this.filterMultiple=!0,this.orderChange=new t.EventEmitter,this.selected=!1,this.filterIconActiveInner=!1}return e.prototype.ngOnInit=function(){var e=this;this.filterable&&this.filterList&&(this.searchFn||(this.searchFn=function(t){return i.of((e.filterList?e.filterList:[]).filter((function(e){return e.name.toLowerCase().includes(t.toLowerCase())})))}))},e.prototype.ngOnChanges=function(e){if(e.order&&this.orderChange.emit(e.order.currentValue),e.filterList){if(void 0!==this.filterIconActive)return;var t=this.filterList.filter((function(e){return e.checked}));t.length&&t.length<this.filterList.length?this.filterIconActiveInner=!0:this.filterIconActiveInner=!1}},e.prototype.ngOnDestroy=function(){this.orderChange.unsubscribe()},e.prototype.emitFilterData=function(e){this.filterChange.emit(e)},e.prototype.canFilter=function(e){var t=Promise.resolve(!0);if(this.beforeFilter){var n=this.beforeFilter(e);void 0!==n&&(t=n.then?n:n.subscribe?n.toPromise():Promise.resolve(n))}return t},e.decorators=[{type:t.Component,args:[{selector:"d-column",template:"",changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[]},e.propDecorators={advancedHeader:[{type:t.Input}],fieldType:[{type:t.Input}],maxWidth:[{type:t.Input}],minWidth:[{type:t.Input}],field:[{type:t.Input}],header:[{type:t.Input}],sortable:[{type:t.Input}],editable:[{type:t.Input}],unresizable:[{type:t.Input}],filterable:[{type:t.Input}],cellClass:[{type:t.Input}],width:[{type:t.Input}],fixedLeft:[{type:t.Input}],fixedRight:[{type:t.Input}],extraOptions:[{type:t.Input}],order:[{type:t.Input}],nestedColumn:[{type:t.Input}],filterList:[{type:t.Input}],filterChange:[{type:t.Output}],filterMultiple:[{type:t.Input}],filterIconActive:[{type:t.Input}],filterBoxWidth:[{type:t.Input}],filterBoxHeight:[{type:t.Input}],beforeFilter:[{type:t.Input}],cellCmp:[{type:t.ContentChild,args:[E,{static:!1}]}],cellEditCmp:[{type:t.ContentChild,args:[k,{static:!1}]}],headCellTmpl:[{type:t.ContentChild,args:[T,{static:!1}]}],customFilterTemplate:[{type:t.Input}],searchFn:[{type:t.Input}]},e}();var D=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"d-foot",template:"",changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.propDecorators={template:[{type:t.ContentChild,args:[t.TemplateRef,{static:!1}]}]},e}();var L=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"d-head",template:"",changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.propDecorators={template:[{type:t.ContentChild,args:[t.TemplateRef,{static:!1}]}]},e}();var O=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"d-pager-panel",template:"",changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.propDecorators={template:[{type:t.ContentChild,args:[t.TemplateRef,{static:!1}]}]},e}();var R=function(){function e(e,n,r,i,l){var o=this;this.windowRef=e,this.elementRef=n,this.changeDetectorRef=r,this.ngZone=i,this.renderer=l,this.editModel="cell",this.type="",this.hover=!0,this.tableWidth="100%",this.multiSort=[],this.colDropFreezeTo=0,this.timeout=300,this.showSortIcon=!0,this.multiSortChange=new t.EventEmitter,this.cellClick=new t.EventEmitter,this.cellDBClick=new t.EventEmitter,this.rowClick=new t.EventEmitter,this.rowDBClick=new t.EventEmitter,this.detialToggle=new t.EventEmitter,this.cellEditStart=new t.EventEmitter,this.cellEditEnd=new t.EventEmitter,this.rowCheckChange=new t.EventEmitter,this.checkAllChange=new t.EventEmitter,this.pageIndexChange=new t.EventEmitter,this.loadMore=new t.EventEmitter,this.resize=new t.EventEmitter,this.tableLevel=0,this.checkableRelation={upward:!0,downward:!0},this.childrenTableClose=new t.EventEmitter,this.allChildrenTableClose=new t.EventEmitter,this._dataSource=[],this._pageAllChecked=!1,this.selectable=!0,this.allChecked=[],this.documentClickEvent=new t.EventEmitter,this.cellEditorClickEvent=new t.EventEmitter,this._hideColumn=[],this._lazy=!1,this.scrollStream=new t.EventEmitter,this.searchQueryChange=new t.EventEmitter,this.halfChecked=!1,this.tableStatusEnum={open:!0,close:!1},this.scrollY=0,this.hasChecked=function(e){return!!e.$checked||(e.children?e.children.some(o.hasChecked):void 0)},this.hasUnChecked=function(e){return!e.$checked||(e.children?e.children.some(o.hasUnChecked):void 0)}}return Object.defineProperty(e.prototype,"resizeBar",{set:function(e){var t=this;setTimeout((function(){t.resizeBarRefElement=e,t.changeDetectorRef.destroyed||t.changeDetectorRef.detectChanges()}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSource},set:function(e){null!==e&&e||(e=[]),this._dataSource=e;var t=this.dataSource.some(this.hasChecked),n=this.dataSource.some(this.hasUnChecked);this._pageAllChecked=e&&e.length>0&&!n,this.halfChecked=t&&n},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hideColumn",{get:function(){return this._hideColumn},set:function(e){this._hideColumn=e,this._columns&&this.updateColumns()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pager",{get:function(){return this._pager},set:function(e){null!=e&&(this._pager={total:e.total,pageIndex:e.pageIndex||1,pageSize:e.pageSize||10,maxItems:e.maxItems||8,selectDirection:e.selectDirection||"auto"})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageAllChecked",{get:function(){return this._pageAllChecked},set:function(e){this.dataSource&&(this._dataSource=this.setCheckedStatus(this.dataSource,e)),this._pageAllChecked=e,this.halfChecked=this.dataSource.some(this.hasChecked)&&this.dataSource.some(this.hasUnChecked)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lazy",{get:function(){return this._lazy},set:function(e){this._lazy=e},enumerable:!0,configurable:!0}),e.prototype.getColumns=function(){var e=this,t=this.columns.filter((function(t){return!e.hideColumn.some((function(e){return t.field===e}))}));return t.sort((function(e,t){return e.order-t.order})),t},e.prototype.ngOnInit=function(){var e=this;this.lazy&&(this.pager=null),this.setupScrollEvent(),this.ngZone.runOutsideAngular((function(){document.addEventListener("click",e.onDocumentClick.bind(e)),window.addEventListener("wheel",e.onWinScroll.bind(e))}))},e.prototype.onDocumentClick=function(e){this.documentClickEvent.emit(e)},e.prototype.onWinScroll=function(e){var t=this;this.ngZone.run((function(){t.scrollStream.emit(e)}))},e.prototype.ngAfterContentInit=function(){var e=this;this.updateColumns(),this.columns.forEach((function(t){t.orderChange.subscribe((function(t){e.updateColumns()}))})),this.columns.changes.subscribe((function(){e.updateColumns()}))},e.prototype.updateColumns=function(){this._columns=this.getColumns()},e.prototype.getScrollbarWidth=function(){if(this.tableBodyEl){var e=this.tableBodyEl.nativeElement.parentNode;return e.parentNode.offsetWidth-e.offsetWidth}},e.prototype.ngOnDestroy=function(){this.unSubscription()},e.prototype.onHandleSort=function(e){for(var t=0;t<this.multiSort.length;t++)if(this.multiSort[t].field===e.field){this.multiSort[t].direction=e.direction;break}if(this.multiSort){var n=this.multiSort.findIndex((function(t){return t.field===e.field}));if(-1!==n&&this.multiSort.splice(n,1),""===e.direction)return void this.multiSortChange.emit(this.multiSort);this.onlyOneColumnSort?this.multiSort=[e]:this.multiSort.push(e)}else this.multiSort=[e];this.multiSortChange.emit(this.multiSort)},e.prototype.onCellClick=function(e){var t=this;this.selectedRowItem=e.rowItem,this.selectedColumnItem=e.column,this.ngZone.run((function(){t.cellClick.emit(e)}))},e.prototype.onCellEditStart=function(e){this.isCellEdit=!0,this.cellEditStart.emit(e)},e.prototype.onCellEditEnd=function(e){this.isCellEdit=!1,this.cellEditEnd.emit(e)},e.prototype.onCellDBClick=function(e){var t=this;this.ngZone.run((function(){t.cellDBClick.emit(e)}))},e.prototype.onRowClick=function(e){var t=this;this.selectedRowItem=e.rowItem,this.ngZone.run((function(){t.rowClick.emit(e)}))},e.prototype.onRowDBClick=function(e){var t=this;this.ngZone.run((function(){t.rowDBClick.emit(e)}))},e.prototype.onDetailToggle=function(e){this.detialToggle.emit(e)},e.prototype.onRowCheckChange=function(e){if(e.rowItem.children&&this.checkableRelation.downward&&this.setCheckedStatus(e.rowItem.children,e.checked),this.checkableRelation.upward){var t=e.nestedIndex.split(",");t.shift();var n=t.map((function(e){return parseInt(e)}));this.setParentCheckStatus(n)}var r=this.dataSource.some(this.hasChecked);if(e){var i=this.dataSource.some(this.hasUnChecked);this._pageAllChecked=!i,this.halfChecked=r&&i}else this._pageAllChecked=!1,this.halfChecked=r;this.rowCheckChange.emit(e)},e.prototype.setParentCheckStatus=function(e){if(e.length>0){var t=e[0],n=this.dataSource[t],r=I(e);r.shift();var i=this.findLastParent(n,r);this.setSelfCheckStatus(i),e.pop(),e.length>0&&this.setParentCheckStatus(e)}},e.prototype.findLastParent=function(e,t){if(e&&t.length>0){var n=t[0],r=e.children[n];return t.shift(),this.findLastParent(r,t)}return e},e.prototype.setSelfCheckStatus=function(e){if(e&&e.children){var t=e.children.some((function(e){return!e.$checked})),n=e.children.some((function(e){return e.$checked||e.$halfChecked}));e.$checked=!t,e.$halfChecked=t&&n}},e.prototype.setCheckedStatus=function(e,t){var n=this;return e.map((function(e){return e.$disabled||(e.$checked=t,e.$halfChecked=!1),e.children&&(e.children=n.setCheckedStatus(e.children,t)),e}))},e.prototype.onCheckAllChange=function(e){this.pageAllChecked=e,this.checkAllChange.emit(e)},e.prototype.onSearchQueryChange=function(e){this.searchQueryChange.emit(e)},e.prototype.onPageChange=function(e){this.pageIndexChange.emit({pageIndex:e,pageSize:this.pager.pageSize})},e.prototype.getSelectedRowItem=function(){return this.selectedRowItem},e.prototype.loadFinish=function(e){var t=this;if(e)return this.unSubscription();setTimeout((function(e){return t.onWinScroll(null)}),300)},e.prototype.onScrollChange=function(){var e=this.windowRef.innerHeight,t=this.windowRef.getBoundingClientRect(this.elementRef);t&&e-t.bottom>=40&&this.loadMore.emit(this)},e.prototype.beginResizeHandlerEvent=function(e){this.onDocumentClick(e)},e.prototype.onResizingFixedHandler=function(e){var t=this,n=e.column,r=e.width,i=e.nextElementWidth;this._columns=this._columns.map((function(e,l){return e.field===n.field?(t.ngZone.run((function(){l+1<t._columns.length&&t._columns[l+1].width&&e.width&&(t._columns[l+1].width=parseInt(i,10)+"px"),e.width=r+"px"})),e):e}))},e.prototype.handleDragTable=function(e){var t=this,n=e.from,r=e.to;!function(e,n,r){if(n<r){for(var i=e[n],l=function(i){i>=n&&i<r&&t.ngZone.run((function(){e[i]=e[i+1]}))},o=0;o<e.length;o++)l(o);t.ngZone.run((function(){e[r]=i}))}if(n>r){var a=e[n];for(o=e.length;o>0;o--)o<=n&&o>r&&(e[o]=e[o-1]);e[r]=a}}(this._columns,n,r),this._columns.forEach((function(e,t){e.order=t}))},e.prototype.onResizeHandler=function(e){var t=this,n=e.width,r=e.field,i=(e.isUserDefined,e.nextElementWidth);this._columns=this._columns.map((function(e,l){return e.field===r?(t.ngZone.run((function(){l+1<t._columns.length&&t._columns[l+1].width&&e.width&&(t._columns[l+1].width=parseInt(i,10)+"px"),e.width=parseInt(n,10)+"px";var r={currentColumn:e,nextColumn:t._columns[l+1]};t.resize.emit(r)})),e):e})),this.changeDetectorRef.markForCheck()},e.prototype.onBodyScroll=function(e){var t=e.target;if(this.isCellEdit){0===this.scrollY&&(this.scrollY=t.scrollTop);var n=t.scrollTop-this.scrollY;(n>40||n<-40)&&(this.cancelEditingStatus(),this.scrollY=0)}var r=t.scrollLeft;0===r?t.clientWidth===t.scrollWidth?this.setScrollViewClass("none"):this.setScrollViewClass("left"):r+t.clientWidth===t.scrollWidth?this.setScrollViewClass("right"):this.setScrollViewClass("middle"),this.fixHeader&&(this.fixHeaderContainerRefElement.nativeElement.scrollLeft=r)},e.prototype.setScrollViewClass=function(e){var t=this.tableViewRefElement.nativeElement,n="devui-talbe-scorll-"+e,r=t.classList;if(!r.contains(n)){for(var i=0;i<r.length;i++){var l=r[i];l.startsWith("devui-talbe-scorll-")&&this.renderer.removeClass(t,l)}this.renderer.addClass(t,n)}},e.prototype.unSubscription=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.colSubscription&&(this.colSubscription.unsubscribe(),this.colSubscription=null)},e.prototype.setupScrollEvent=function(){var e=this;this.subscription||(this.subscription=this.registerOnScrollStream(this.scrollStream).subscribe((function(t){return e.onScrollChange()})))},e.prototype.registerOnScrollStream=function(e){return e.pipe(n.debounceTime(300),n.distinctUntilChanged())},e.prototype.onToggleChildrenTable=function(e,t){var n=this;if(t===this.tableStatusEnum.open){var r=Promise.resolve(!0);this.loadChildrenTable&&(r=this.loadChildrenTable(e)),r.then((function(){e.$checked&&n.checkableRelation.downward&&n.setCheckedStatus(e.children,e.$checked)}))}else this.childrenTableClose.emit(e)},e.prototype.setChildrenToogleStatus=function(e,t){var n=this;return e.map((function(e){return e.children&&(e.$isChildTableOpen=t,e.children=n.setChildrenToogleStatus(e.children,t)),e}))},e.prototype.onToggleAllChildrenTable=function(e){var t=this;if(e===this.tableStatusEnum.open){var n=Promise.resolve(!0);this.loadAllChildrenTable&&(n=this.loadAllChildrenTable()),n.then((function(){t.dataSource.forEach((function(e){e.$checked&&e.children&&t.setCheckedStatus(e.children,!0)})),t.setChildrenToogleStatus(t.dataSource,e)}))}else this.setChildrenToogleStatus(this.dataSource,e),this.allChildrenTableClose.emit()},e.prototype.cancelEditingStatus=function(){this.documentClickEvent.emit("cancel")},e.prototype.collectCheckedRows=function(e,t){var n=this;t.forEach((function(t){t.$checked&&e.push(t),t.children&&n.collectCheckedRows(e,t.children)}))},e.prototype.getCheckedRows=function(){if(this.checkableRelation.upward)return this.dataSource?this.dataSource.filter((function(e){return e.$checked||e.$halfChecked})):[];var e=[];return this.collectCheckedRows(e,this.dataSource),e},e.decorators=[{type:t.Component,args:[{selector:"d-data-table",template:'<div class="devui-data-table {{ cssClass }}">\r\n <div class="devui-table-view" #tableView>\r\n <div\r\n *ngIf="fixHeader"\r\n #fixHeaderContainerRef\r\n class="table-wrap"\r\n [style.overflow]="\'hidden\'"\r\n [style.max-height]="maxHeight ? maxHeight : null"\r\n [style.max-width]="maxWidth ? maxWidth : null"\r\n [style.width]="!maxWidth ? tableWidth : null"\r\n >\r\n <table\r\n #fixHeaderTableRef\r\n class="devui-table {{ type ? \'table-\' + type : \'\' }} {{ hover ? \'table-hover\' : \'\' }} {{ fixHeader ? \'table-fix-header\' : \'\' }}"\r\n [style.table-layout]="\'fixed\'"\r\n >\r\n <ng-template [ngTemplateOutlet]="headerTpl"></ng-template>\r\n </table>\r\n </div>\r\n\r\n <div\r\n cdkScrollable\r\n *ngIf="!virtualScroll || dataSource.length === 0; else scrollViewTpl"\r\n class="devui-scrollbar"\r\n [ngClass]="{ \'scroll-view\': scrollable }"\r\n [style.max-height]="maxHeight ? maxHeight : null"\r\n [style.max-width]="maxWidth ? maxWidth : null"\r\n [style.width]="!maxWidth ? tableWidth : null"\r\n (scroll)="onBodyScroll($event)"\r\n >\r\n <div [ngClass]="{ \'table-wrap\': !fixHeader }">\r\n <ng-template [ngTemplateOutlet]="tableviewTpl"></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class="table-view-footer text-right" *ngIf="pager">\r\n <d-data-table-pager [pager]="pager" [pagerTemplate]="pagerTemplate"></d-data-table-pager>\r\n </div>\r\n</div>\r\n\r\n<ng-container *ngIf="!dataSource?.length && noResultTemplate != null">\r\n <ng-template [ngTemplateOutlet]="noResultTemplate" [ngTemplateOutletContext]="{ $implicit: this }"></ng-template>\r\n</ng-container>\r\n\r\n<ng-template #scrollViewTpl>\r\n <cdk-virtual-scroll-viewport\r\n [ngStyle]="{ height: maxHeight }"\r\n [itemSize]="40"\r\n class="devui-scrollbar table-wrap viewport-wrapper"\r\n [ngClass]="{ \'scroll-view\': scrollable }"\r\n [style.max-height]="maxHeight ? maxHeight : null"\r\n [style.max-width]="maxWidth ? maxWidth : null"\r\n [style.width]="!maxWidth ? tableWidth : null"\r\n (scroll)="onBodyScroll($event)"\r\n >\r\n <table #tableBody class="devui-table {{ type ? \'table-\' + type : \'\' }} {{ hover ? \'table-hover\' : \'\' }}" [style.table-layout]="\'fixed\'">\r\n <ng-template *ngIf="!fixHeader" [ngTemplateOutlet]="headerTpl"></ng-template>\r\n <tbody\r\n dDataTableBody\r\n [dataSource]="dataSource"\r\n [resizeable]="resizeable"\r\n [columns]="_columns"\r\n [checkable]="checkable"\r\n [allChecked]="_pageAllChecked"\r\n [selectable]="selectable"\r\n [editModel]="editModel"\r\n [editRowItem]="editRowItem"\r\n [showExpandToggle]="showExpandToggle"\r\n [detailTemplateRef]="detailTemplateRef"\r\n [timeout]="timeout"\r\n [type]="type"\r\n [hover]="hover"\r\n [tableLevel]="tableLevel"\r\n [virtualScroll]="virtualScroll"\r\n ></tbody>\r\n <tfoot *ngIf="footTemplate" dDataTableFoot [footTemplate]="footTemplate"></tfoot>\r\n <div #resizeBar class="resize-bar"></div>\r\n </table>\r\n </cdk-virtual-scroll-viewport>\r\n</ng-template>\r\n\r\n<ng-template #headerTpl>\r\n <thead\r\n dDataTableHead\r\n [resizeable]="resizeable"\r\n [resizeBarRefElement]="resizeBarRefElement"\r\n [tableViewRefElement]="tableViewRefElement"\r\n [multiSort]="multiSort"\r\n [columns]="_columns"\r\n [headTemplate]="headTemplate"\r\n [pager]="pager"\r\n [pageAllChecked]="_pageAllChecked"\r\n [checkable]="checkable"\r\n [showExpandToggle]="showExpandToggle"\r\n [showSortIcon]="showSortIcon"\r\n (resizeHandlerEvent)="onResizeHandler($event)"\r\n (headClickSortEvent)="onHandleSort($event)"\r\n [halfChecked]="halfChecked"\r\n [tableBodyEl]="tableBodyEl"\r\n [maxHeight]="maxHeight"\r\n (beginResizeHandlerEvent)="beginResizeHandlerEvent($event)"\r\n (resizingHandlerEvent)="onResizingFixedHandler($event)"\r\n [fixHeader]="fixHeader"\r\n (dragTableEndEvent)="handleDragTable($event)"\r\n [dataSource]="dataSource"\r\n [colDropFreezeTo]="colDropFreezeTo"\r\n [colDraggable]="colDraggable"\r\n ></thead>\r\n <tbody *ngIf="headerExpandConfig?.expand">\r\n <tr>\r\n <td *ngIf="checkable"></td>\r\n <td *ngIf="showExpandToggle"></td>\r\n <td [attr.colspan]="columns.length">\r\n <ng-template\r\n [ngTemplateOutlet]="headerExpandConfig?.expandTemplateRef || default"\r\n [ngTemplateOutletContext]="{$implicit: this, columns: columns}"\r\n >\r\n </ng-template>\r\n <ng-template #default>\r\n <div>{{ headerExpandConfig?.description }}</div>\r\n </ng-template>\r\n </td>\r\n </tr>\r\n </tbody>\r\n</ng-template>\r\n\r\n<ng-template #tableviewTpl>\r\n <table #tableBody class="devui-table {{ type ? \'table-\' + type : \'\' }} {{ hover ? \'table-hover\' : \'\' }}" [style.table-layout]="\'fixed\'">\r\n <ng-template *ngIf="!fixHeader" [ngTemplateOutlet]="headerTpl"></ng-template>\r\n <tbody\r\n dDataTableBody\r\n [dataSource]="dataSource"\r\n [resizeable]="resizeable"\r\n [columns]="_columns"\r\n [checkable]="checkable"\r\n [allChecked]="_pageAllChecked"\r\n [selectable]="selectable"\r\n [editModel]="editModel"\r\n [editRowItem]="editRowItem"\r\n [showExpandToggle]="showExpandToggle"\r\n [detailTemplateRef]="detailTemplateRef"\r\n [timeout]="timeout"\r\n [type]="type"\r\n [hover]="hover"\r\n [tableLevel]="tableLevel"\r\n [virtualScroll]="false"\r\n ></tbody>\r\n <tfoot *ngIf="footTemplate" dDataTableFoot [footTemplate]="footTemplate"></tfoot>\r\n <div #resizeBar class="resize-bar"></div>\r\n </table>\r\n</ng-template>\r\n\r\n<ng-template #fixColumnHeaderTemplate>\r\n <thead\r\n dDataTableHead\r\n [resizeBarRefElement]="resizeBarRefElement"\r\n [tableViewRefElement]="tableViewRefElement"\r\n [multiSort]="multiSort"\r\n [columns]="_columns"\r\n [headTemplate]="headTemplate"\r\n [pager]="pager"\r\n [pageAllChecked]="_pageAllChecked"\r\n [checkable]="checkable"\r\n [showExpandToggle]="showExpandToggle"\r\n [showSortIcon]="showSortIcon"\r\n (onResizeHandler)="onResizeHandler($event)"\r\n (onHeadClickSort)="onHandleSort($event)"\r\n [halfChecked]="halfChecked"\r\n [tableBodyEl]="tableBodyEl"\r\n [maxHeight]="maxHeight"\r\n (beginResizeHandlerEvent)="beginResizeHandlerEvent($event)"\r\n (resizingHandlerEvent)="onResizingFixedHandler($event)"\r\n [fixHeader]="fixHeader"\r\n (dragTableEndEvent)="handleDragTable($event)"\r\n [dataSource]="dataSource"\r\n ></thead>\r\n</ng-template>\r\n',exportAs:"dataTable",styles:[":host{display:block}.devui-data-table ::ng-deep{border:none}.devui-data-table ::ng-deep .devui-table-view{padding:0;border:none;position:relative}.devui-data-table ::ng-deep .devui-table-view .scroll-view{overflow-y:auto;overflow-x:auto}.devui-data-table ::ng-deep .devui-table-view .devui-table{border-collapse:separate;border-spacing:0;table-layout:fixed;width:100%;max-width:100%;position:relative;margin:0}.devui-data-table ::ng-deep .devui-table-view .devui-table>tbody+tbody{border-top:none}.devui-data-table ::ng-deep .devui-table-view .resize-bar{top:0;bottom:0;position:absolute;cursor:col-resize;background:#575d6c;width:2px;z-index:9999;display:none}.devui-data-table ::ng-deep .devui-table-view .resize-overlay{position:absolute;display:block;top:0;left:0;bottom:0;right:0;z-index:1000}.devui-data-table ::ng-deep .devui-table-view-footer{border:none;margin:0}.devui-data-table ::ng-deep .table-wrap{padding-top:8px}.devui-table ::ng-deep thead span{font-weight:700;color:#252b3a;font-size:14px}.devui-table ::ng-deep thead tr{background-color:#fff}.devui-table ::ng-deep thead tr th{text-align:left;position:relative;background-clip:padding-box!important;vertical-align:middle;border-bottom:1px solid #adb0b8;display:table-cell;padding:0 8px 0 2px;font-size:0;background-color:inherit}.devui-table ::ng-deep thead tr th .drag-icon{display:inline-block;vertical-align:middle;margin-right:2px;visibility:hidden}.devui-table ::ng-deep thead tr th .drag-icon+.childtable-toggler{padding-right:4px;vertical-align:middle}.devui-table ::ng-deep thead tr th .drag-icon+.childtable-toggler>.customized-icon{font-size:14px}.devui-table ::ng-deep thead tr th>*{display:inline-block}.devui-table ::ng-deep thead tr th .parent-title,.devui-table ::ng-deep thead tr th .title{display:inline-block;width:calc(100% - 16px - 2px);line-height:36px;vertical-align:middle;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:12px}.devui-table ::ng-deep thead tr th .title.can-filter{width:calc(100% - 16px - 2px - 16px)}.devui-table ::ng-deep thead tr th .childtable-toggler+.title{width:calc(100% - 16px - 2px - 20px)}.devui-table ::ng-deep thead tr th .childtable-toggler+.title.can-filter{width:calc(100% - 16px - 2px - 16px - 20px)}.devui-table ::ng-deep thead tr th .sort-clickable{position:absolute;top:-16px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);padding:8px}.devui-table ::ng-deep thead tr th.hover,.devui-table ::ng-deep thead tr th:hover{border-radius:2px 0 0 2px}.devui-table ::ng-deep thead tr th.hover .filter-icon,.devui-table ::ng-deep thead tr th:hover .filter-icon{visibility:visible}.devui-table ::ng-deep thead tr th.hover .sort-icon-default,.devui-table ::ng-deep thead tr th:hover .sort-icon-default{visibility:visible}.devui-table ::ng-deep thead tr th.operable:hover{background-color:#f2f5fc}.devui-table ::ng-deep thead tr th.sindu_handle.hover,.devui-table ::ng-deep thead tr th.sindu_handle:hover{border-radius:2px 0 0 2px}.devui-table ::ng-deep thead tr th.sindu_handle.hover .drag-icon,.devui-table ::ng-deep thead tr th.sindu_handle:hover .drag-icon{visibility:visible}.devui-table ::ng-deep thead tr th.sindu_handle.hover .hidden-icon.drag-icon,.devui-table ::ng-deep thead tr th.sindu_handle:hover .hidden-icon.drag-icon{visibility:hidden}.devui-table ::ng-deep thead tr th.gutter{margin:0;padding:0}.devui-table ::ng-deep thead tr th.gutter:hover{background:0 0}.devui-table ::ng-deep thead tr th.devui-checkable-cell{width:36px;padding:10px}.devui-table ::ng-deep thead tr th.devui-detail-cell{width:36px;text-align:center;padding:0;cursor:pointer}.devui-table ::ng-deep thead tr th.devui-sticky-left-cell,.devui-table ::ng-deep thead tr th.devui-sticky-right-cell{position:-webkit-sticky;position:sticky;z-index:1}.devui-table ::ng-deep thead tr .sort-active{background:#f2f5fc;border-radius:2px 0 0 2px}.devui-table ::ng-deep tbody>tr{background:#fff}.devui-table ::ng-deep tbody>tr.table-row-selected{background:#f2f5fc}.devui-table ::ng-deep tbody>tr>td{position:relative;background-clip:padding-box;vertical-align:middle;padding:7px 8px 8px 20px;border-top:none;word-wrap:break-word;word-break:normal;line-height:24px;font-size:14px;color:#252b3a;background-color:inherit;border-bottom:1px solid #dfe1e6}.devui-table ::ng-deep tbody>tr>td.devui-checkable-cell{width:36px;padding:10px}.devui-table ::ng-deep tbody>tr>td.devui-detail-cell{width:36px;text-align:center;padding:0;cursor:pointer}.devui-table ::ng-deep tbody>tr>td.devui-sticky-left-cell,.devui-table ::ng-deep tbody>tr>td.devui-sticky-right-cell{position:-webkit-sticky;position:sticky;z-index:1}.devui-table ::ng-deep tbody>tr>td a{color:#252b3a}.devui-table ::ng-deep td,.devui-table ::ng-deep th{position:relative}.devui-table ::ng-deep td:first-child,.devui-table ::ng-deep th:first-child{margin:0 5px}.devui-table ::ng-deep .clickable{cursor:pointer;vertical-align:middle}.devui-table ::ng-deep .devui-checkbox-material{margin-right:0}.devui-table ::ng-deep .d-checkbox>label{margin:auto}.devui-table ::ng-deep .resize-handle{display:inline-block;position:absolute;right:0;top:0;bottom:0;width:5px;cursor:col-resize}.devui-table ::ng-deep th.resizeable.last-resize-header .resize-handle{border-right:1px solid transparent}.devui-table ::ng-deep .resizeable.last-resize-header:hover .resize-handle,.devui-table ::ng-deep .resizeable:hover .resize-handle{border-right:3px solid #adb0b8}.devui-table.table-striped ::ng-deep tbody>tr:nth-of-type(odd){background:#f8f8f8}.devui-table.table-hover ::ng-deep tbody>tr:hover{background:#f2f5fc}:host ::ng-deep .devui-toggle-childtable{cursor:pointer;margin-right:5px}:host ::ng-deep .devui-toggle-childtable>svg{vertical-align:middle}:host ::ng-deep .devui-toggle-childtable>svg>g>path{fill:#8a8e99}:host ::ng-deep .full-width{width:100%}:host ::ng-deep .hover-bg{background:#f2f5fc;pointer-events:none}:host ::ng-deep .hover-bg+th{pointer-events:none}:host ::ng-deep .table-view-selector{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:col-resize}:host ::ng-deep .edit-padding-fix{margin-top:-6px;margin-bottom:-6px}:host ::ng-deep .childtable-toggler{cursor:pointer}:host ::ng-deep .childtable-toggler>svg{vertical-align:middle}:host ::ng-deep .childtable-toggler>svg>g>path{fill:#8a8e99}:host ::ng-deep .table.table-bordered.table-fix-header{border-bottom:0}:host ::ng-deep .table.table-bordered.table-fix-header th{border-bottom:0}:host ::ng-deep .devui-talbe-scorll-middle th .devui-sticky-left-cell,:host ::ng-deep .devui-talbe-scorll-middle tr .devui-sticky-left-cell,:host ::ng-deep .devui-talbe-scorll-right th .devui-sticky-left-cell,:host ::ng-deep .devui-talbe-scorll-right tr .devui-sticky-left-cell{box-shadow:rgba(0,0,0,.05) 6px 6px 6px 0}:host ::ng-deep .devui-talbe-scorll-left th .devui-sticky-right-cell,:host ::ng-deep .devui-talbe-scorll-left tr .devui-sticky-right-cell,:host ::ng-deep .devui-talbe-scorll-middle th .devui-sticky-right-cell,:host ::ng-deep .devui-talbe-scorll-middle tr .devui-sticky-right-cell{box-shadow:rgba(0,0,0,.05) -6px 6px 6px 0}:host ::ng-deep .gu-unselectable{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}:host ::ng-deep .gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;box-shadow:0 2px 4px 0 var(--dark-1-boxshadow,rgba(41,48,64,.2));background-color:#fff;list-style:none}:host ::ng-deep .gu-hide{display:none!important}:host ::ng-deep .sindu_dragger{list-style:none;margin:0;padding:0;box-sizing:border-box;display:-webkit-box;display:flex}:host ::ng-deep .sindu_handle>.drag-icon{cursor:move}:host ::ng-deep .sindu_dragger li{margin:0;padding:0;list-style:none;text-align:inherit}:host ::ng-deep .sindu_dragger li table,:host ::ng-deep .sindu_dragger td,:host ::ng-deep .sindu_dragger th,:host ::ng-deep .sindu_dragger tr{box-sizing:border-box}:host ::ng-deep .sindu_dragging .sindu_origin_table{visibility:hidden}:host ::ng-deep .gu-mirror li{margin:0;padding:0;list-style:none;text-align:inherit}:host ::ng-deep .gu-mirror li table,:host ::ng-deep .gu-mirror td,:host ::ng-deep .gu-mirror th,:host ::ng-deep .gu-mirror tr{box-sizing:border-box}:host ::ng-deep .gu-transit{opacity:.5}",":host ::ng-deep th .datatable-svg g#order-default path{fill:#dfe1e6}:host ::ng-deep th .datatable-svg g#order-desc polygon#Path-4{fill:#dfe1e6}:host ::ng-deep th .datatable-svg g#order-desc polygon#Path-4-Copy{fill:#5e7ce0}:host ::ng-deep th .datatable-svg g#order-asc polygon#Path-4{fill:#5e7ce0}:host ::ng-deep th .datatable-svg g#order-asc polygon#Path-4-Copy{fill:#dfe1e6}"]}]}],e.ctorParameters=function(){return[{type:r.WindowRef},{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:t.Renderer2}]},e.propDecorators={checkable:[{type:t.Input}],showExpandToggle:[{type:t.Input}],fixHeader:[{type:t.Input}],scrollable:[{type:t.Input}],editModel:[{type:t.Input}],maxWidth:[{type:t.Input}],maxHeight:[{type:t.Input}],type:[{type:t.Input}],hover:[{type:t.Input}],cssClass:[{type:t.Input}],tableWidth:[{type:t.Input}],onlyOneColumnSort:[{type:t.Input}],multiSort:[{type:t.Input}],resizeable:[{type:t.Input}],colDraggable:[{type:t.Input}],colDropFreezeTo:[{type:t.Input}],detailTemplateRef:[{type:t.Input}],timeout:[{type:t.Input}],showSortIcon:[{type:t.Input}],multiSortChange:[{type:t.Output}],cellClick:[{type:t.Output}],cellDBClick:[{type:t.Output}],rowClick:[{type:t.Output}],rowDBClick:[{type:t.Output}],detialToggle:[{type:t.Output}],beforeCellEdit:[{type:t.Input}],cellEditStart:[{type:t.Output}],cellEditEnd:[{type:t.Output}],rowCheckChange:[{type:t.Output}],checkAllChange:[{type:t.Output}],pageIndexChange:[{type:t.Output}],loadMore:[{type:t.Output}],resize:[{type:t.Output}],tableLevel:[{type:t.Input}],checkableRelation:[{type:t.Input}],loadChildrenTable:[{type:t.Input}],loadAllChildrenTable:[{type:t.Input}],virtualScroll:[{type:t.Input}],headerExpandConfig:[{type:t.Input}],childrenTableClose:[{type:t.Output}],allChildrenTableClose:[{type:t.Output}],columns:[{type:t.ContentChildren,args:[S]}],headTemplate:[{type:t.ContentChild,args:[L,{static:!1}]}],footTemplate:[{type:t.ContentChild,args:[D,{static:!1}]}],pagerTemplate:[{type:t.ContentChild,args:[O,{static:!1}]}],noResultTemplate:[{type:t.ContentChild,args:["noResultTemplateRef",{static:!1}]}],fixHeaderContainerRefElement:[{type:t.ViewChild,args:["fixHeaderContainerRef",{static:!1}]}],fixHeaderTableRefElement:[{type:t.ViewChild,args:["fixHeaderTableRef",{static:!1}]}],tableViewRefElement:[{type:t.ViewChild,args:["tableView",{static:!0}]}],resizeBar:[{type:t.ViewChild,args:["resizeBar",{static:!1}]}],dataSource:[{type:t.Input}],hideColumn:[{type:t.Input}],pager:[{type:t.Input}],pageAllChecked:[{type:t.Input}],lazy:[{type:t.Input}]},e}();var z={RowUpdate:0};z[z.RowUpdate]="RowUpdate";var F=function(){function e(e,n,r,i){this.dt=e,this.changeDetectorRef=n,this.rowRef=r,this.ngZone=i,this.fontWeight="400",this.verticalAlign="middle",this.detailChange=new t.EventEmitter,this.forceUpdateEvent=new t.EventEmitter,this.clickCount=0}return e.prototype.ngOnInit=function(){var e=this;this.ngZone.runOutsideAngular((function(){e.rowRef.nativeElement.addEventListener("click",e.onRowClick.bind(e)),e.rowRef.nativeElement.addEventListener("dblclick",e.onRowDBClick.bind(e)),e.rowRef.nativeElement.addEventListener("mouseenter",e.onRowMouseEnter.bind(e)),e.rowRef.nativeElement.addEventListener("mouseleave",e.onRowMouseLeave.bind(e))}))},e.prototype.forceUpdate=function(){this.changeDetectorRef.markForCheck(),this.forceUpdateEvent.emit(z.RowUpdate)},e.prototype.onRowClick=function(e){var t=this;this.clickCount++,1===this.clickCount&&(this.timeoutId=setTimeout((function(){1===t.clickCount&&t.dt.onRowClick({rowIndex:t.rowIndex,nestedIndex:t.nestedIndex,rowItem:t.rowItem,rowComponent:t}),t.clickCount=0,clearTimeout(t.timeoutId)}),this.timeout))},e.prototype.onRowDBClick=function(e){this.dt.onRowDBClick({rowIndex:this.rowIndex,nestedIndex:this.nestedIndex,rowItem:this.rowItem,rowComponent:this})},e.prototype.onRowMouseEnter=function(e){var t=this;this.ngZone.run((function(){t.rowItem.$hovered=!0}))},e.prototype.onRowMouseLeave=function(e){var t=this;this.ngZone.run((function(){t.rowItem.$hovered=!1}))},e.prototype.onRowCheckChange=function(e,t,n,r){r.$checked=e,r.$halfChecked=!1,this.dt.onRowCheckChange({rowItem:r,rowIndex:t,nestedIndex:n,checked:e})},e.prototype.toggle=function(){this.rowItem.$isDetailOpen=!this.rowItem.$isDetailOpen,this.rowItem.$expandConfig&&(this.rowItem.$expandConfig.expand=!this.rowItem.$expandConfig.expand),this.detailChange.emit({state:this.rowItem.$isDetailOpen,index:this.rowIndex}),this.dt.onDetailToggle({state:this.rowItem.$isDetailOpen,index:this.rowIndex})},e.prototype.trackByFn=function(e,t){return e},e.decorators=[{type:t.Component,args:[{selector:"d-data-table-row, [dDataTableRow]",template:'<td *ngIf="showExpandToggle" class="devui-detail-cell" [ngClass]="{ \'devui-sticky-left-cell\': columns[0]?.fixedLeft }" [style.left]="0">\r\n <div *ngIf="rowItem.detail || rowItem.$expandConfig" (click)="toggle()">\r\n <span [style.vertical-align]="\'middle\'" *ngIf="rowItem[\'$isDetailOpen\'] || rowItem.$expandConfig?.expand">\r\n <svg\r\n class="svg-icon-arrow"\r\n width="16px"\r\n height="16px"\r\n viewBox="0 0 16 16"\r\n version="1.1"\r\n xmlns="http://www.w3.org/2000/svg"\r\n xmlns:xlink="http://www.w3.org/1999/xlink"\r\n >\r\n <g id="chevron-down" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\r\n <polygon points="4.5 5 8 8.76923077 11.5 5 13 6.61538462 8 12 3 6.61538462"></polygon>\r\n </g>\r\n </svg>\r\n </span>\r\n <span [style.vertical-align]="\'middle\'" *ngIf="!rowItem[\'$isDetailOpen\'] && !rowItem.$expandConfig?.expand">\r\n <svg\r\n class="svg-icon-arrow"\r\n width="16px"\r\n height="16px"\r\n viewBox="0 0 16 16"\r\n version="1.1"\r\n xmlns="http://www.w3.org/2000/svg"\r\n xmlns:xlink="http://www.w3.org/1999/xlink"\r\n >\r\n <g id="chevron-up" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\r\n <polygon points="11.5 12 8 8.23076923 4.5 12 3 10.3846154 8 5 13 10.3846154"></polygon>\r\n </g>\r\n </svg>\r\n </span>\r\n </div>\r\n</td>\r\n<td\r\n *ngIf="checkable"\r\n class="devui-checkable-cell"\r\n [ngClass]="{ \'devui-sticky-left-cell\': columns[0]?.fixedLeft }"\r\n [style.left]="showExpandToggle && columns[0]?.fixedLeft ? \'36px\' : \'0\'"\r\n>\r\n <d-checkbox\r\n [ngModelOptions]="{ standalone: true }"\r\n (ngModelChange)="onRowCheckChange($event, rowIndex, nestedIndex, rowItem)"\r\n [ngModel]="rowItem.$checked"\r\n [halfchecked]="rowItem.$halfChecked"\r\n [disabled]="rowItem.$disabled"\r\n dTooltip\r\n [content]="rowItem.$checkBoxTips"\r\n [position]="\'top\'"\r\n [showAnimation]="false"\r\n >\r\n </d-checkbox>\r\n</td>\r\n<ng-container *ngFor="let column of columns; let colIndex = index; trackBy: trackByFn">\r\n <td\r\n dDataTableCell\r\n [rowIndex]="rowIndex"\r\n [colIndex]="colIndex"\r\n [column]="column"\r\n [rowItem]="rowItem"\r\n [style.width]="column.width || \'\'"\r\n [ngStyle]="column.style"\r\n [editModel]="rowItem.$$editModel || editModel"\r\n [isEditRow]="rowItem.$$edit"\r\n [timeout]="timeout"\r\n [tableLevel]="tableLevel"\r\n class="{{ column.cellClass ? column.cellClass : \'\' }}"\r\n [ngClass]="{\r\n \'devui-sticky-left-cell\': column.fixedLeft,\r\n \'devui-sticky-right-cell\': column.fixedRight\r\n }"\r\n [style.left]="column.fixedLeft ? column.fixedLeft : null"\r\n [style.right]="column.fixedRight ? column.fixedRight : null"\r\n ></td>\r\n</ng-container>\r\n',styles:["svg.svg-icon-arrow>g>polygon{fill:#252b3a}:host ::ng-deep d-button button.d-btn.d-btn-icon{padding:0!important}:host ::ng-deep .cell-modify{position:absolute;right:0;cursor:pointer}:host ::ng-deep .cell-modify>svg{vertical-align:middle}:host ::ng-deep .cell-modify>svg>g>g{fill:#9498a0}:host ::ng-deep .cell-modify:hover>svg>g>g{fill:#252b3a}:host ::ng-deep .cell-placeholder{display:inline-block;height:16px}:host ::ng-deep .cell-container{position:relative;height:24px}:host ::ng-deep .cell-container-inner{position:absolute;max-width:100%}:host ::ng-deep .cell-container-inner.modify-holder{padding-right:20px}:host ::ng-deep .cell-container-inner.modify-holder .cell-modify{display:none;position:absolute;right:0;cursor:pointer}:host ::ng-deep .cell-container-inner.modify-holder .cell-modify>svg{vertical-align:middle}:host ::ng-deep .cell-container-inner.modify-holder .cell-modify>svg>g{fill:#252b3a}:host ::ng-deep .cell-container-inner.modify-holder .cell-modify:hover>svg>g{fill:#344899}:host ::ng-deep .cell-container-inner.modify-holder:hover .cell-modify{display:inline}:host ::ng-deep .not-break{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;word-spacing:normal;word-wrap:normal}:host ::ng-deep .cell-editable{cursor:pointer;margin-left:-5px;padding-left:5px}:host ::ng-deep .cell-editable:hover{background:#f2f5fc}"]}]}],e.ctorParameters=function(){return[{type:R},{type:t.ChangeDetectorRef},{type:t.ElementRef},{type:t.NgZone}]},e.propDecorators={rowItem:[{type:t.Input}],fontWeight:[{type:t.HostBinding,args:["style.font-weight"]}],verticalAlign:[{type:t.HostBinding,args:["style.vertical-align"]}],selectable:[{type:t.Input}],checkable:[{type:t.Input}],showExpandToggle:[{type:t.Input}],rowIndex:[{type:t.Input}],allChecked:[{type:t.Input}],columns:[{type:t.Input}],editModel:[{type:t.Input}],editRowItem:[{type:t.Input}],resizeable:[{type:t.Input}],timeout:[{type:t.Input}],tableLevel:[{type:t.Input}],nestedIndex:[{type:t.Input}],detailChange:[{type:t.Output}]},e}();var H=function(){function e(e){this.viewContainerRef=e}return e.decorators=[{type:t.Directive,args:[{selector:"[dEditorHost]"}]}],e.ctorParameters=function(){return[{type:t.ViewContainerRef}]},e}();var M=function(){function e(e,t,n,r,i,l){this.dt=e,this.changeDetectorRef=t,this.componentFactoryResolver=n,this.rowComponent=r,this.cellRef=i,this.ngZone=l,this.clickCount=0}return e.prototype.ngOnInit=function(){var e=this;this.forceUpdateSubscription=this.rowComponent.forceUpdateEvent.subscribe((function(t){return e.forceUpdate()})),this.ngZone.runOutsideAngular((function(){e.cellRef.nativeElement.addEventListener("click",e.onCellClick.bind(e)),e.cellRef.nativeElement.addEventListener("dblclick",e.onCellDBClick.bind(e))}))},e.prototype.ngOnChanges=function(e){var t=e.rowItem;t&&this.updateEditable(t)},e.prototype.updateEditable=function(e){var t=this,n=e.currentValue.$editDeniedConfig;n?-1===n.findIndex((function(e){return e===t.column.field}))?this.fieldEditDenied&&(this.fieldEditDenied=!1):this.fieldEditDenied||(this.fieldEditDenied=!0):this.fieldEditDenied&&(this.fieldEditDenied=!1)},e.prototype.onCellClick=function(e){var t=this,n={rowIndex:this.rowIndex,colIndex:this.colIndex,column:this.column,rowItem:this.rowItem,cellComponent:this,rowComponent:this.rowComponent};this.clickCount++,1===this.clickCount&&(this.timeoutId=setTimeout((function(){1===t.clickCount&&t.dt.onCellClick(n),t.clickCount=0,clearTimeout(t.timeoutId)}),this.timeout))},e.prototype.onCellDBClick=function(e){var t={rowIndex:this.rowIndex,colIndex:this.colIndex,column:this.column,rowItem:this.rowItem,cellComponent:this,rowComponent:this.rowComponent};this.dt.onCellDBClick(t)},e.prototype.forceUpdate=function(){this.changeDetectorRef.markForCheck()},e.prototype.finishCellEdit=function(e){"cell"===this.editModel&&(this.isCellEdit=!1,this.editorHost.viewContainerRef.clear(),this.dynamicEditorActive=!1,this.templateEditorActive=!1,this.documentClickSubscription&&this.unSubscription(this.documentClickSubscription),this.cellEditorClickSubscription&&this.unSubscription(this.cellEditorClickSubscription),s.stopPropagationIfExist(e),this.dt.onCellEditEnd({rowIndex:this.rowIndex,colIndex:this.colIndex,column:this.column,rowItem:this.rowItem,cellComponent:this,rowComponent:this.rowComponent}))},e.prototype.isCellEditEnable=function(e,t){return"cell"===this.editModel?this.isCellEdit:this.isEditRow},e.prototype.ngOnDestroy=function(){this.forceUpdateSubscription&&this.unSubscription(this.forceUpdateSubscription),this.documentClickSubscription&&this.unSubscription(this.documentClickSubscription),this.cellEditorClickSubscription&&this.unSubscription(this.cellEditorClickSubscription),this.cellActionSubscription&&this.unSubscription(this.cellActionSubscription)},e.prototype.unSubscription=function(e){e&&(e.unsubscribe(),e=null)},e.prototype.creatCellEditor=function(){var e,t,n=this;switch(this.column.fieldType){case"number":t=l.InputNumberComponent;break;case"select":t=o.SelectComponent;break;case"treeSelect":t=a.TreeSelectComponent;break;default:this.templateEditorActive=!0}if(t){e=this.componentFactoryResolver.resolveComponentFactory(t);var r=this.editorHost.viewContainerRef;r.clear();var i=r.createComponent(e).instance;this.column.extraOptions&&e.inputs.forEach((function(e){n.column.extraOptions[e.templateName]&&(i[e.propName]=n.column.extraOptions[e.templateName])})),i.writeValue(this.rowItem[this.column.field]),i.registerOnChange((function(e){n.rowItem[n.column.field]=e,n.column.extraOptions&&n.column.extraOptions.finishEditingAfterValueChange&&n.finishCellEdit()})),this.dynamicEditorActive=!0}},e.prototype.cellEditing=function(e){var t=this;e.stopPropagation(),e.preventDefault();var n=Promise.resolve();this.dt.beforeCellEdit&&(n=this.dt.beforeCellEdit(this.rowItem,this.column)),n.then((function(n){n&&(t.column.extraOptions=n),t.dt.cellEditorClickEvent.emit(e);var r={rowIndex:t.rowIndex,colIndex:t.colIndex,column:t.column,rowItem:t.rowItem,cellComponent:t,rowComponent:t.rowComponent};t.column.editable&&"cell"===t.editModel&&(t.isCellEdit=!0,t.creatCellEditor(),t.documentClickSubscription=t.dt.documentClickEvent.subscribe((function(e){"cancel"!==e&&t.cellRef.nativeElement.contains(e.target)||t.ngZone.run((function(){t.finishCellEdit()}))})),t.cellEditorClickSubscription=t.dt.cellEditorClickEvent.subscribe((function(e){t.cellRef.nativeElement.contains(e.target)||t.finishCellEdit()})),t.dt.onCellEditStart(r))}))},e.prototype.toggleChildTable=function(e){e.$isChildTableOpen=!e.$isChildTableOpen,this.dt.onToggleChildrenTable(e,e.$isChildTableOpen)},e.decorators=[{type:t.Component,args:[{selector:"d-data-table-cell,[dDataTableCell]",template:'<ng-template *ngIf="!column.editable || fieldEditDenied" [ngTemplateOutlet]="cellViewTemp"></ng-template>\r\n\r\n<ng-container *ngIf="column.editable && !fieldEditDenied">\r\n <div *ngIf="!isCellEdit && column.extraOptions?.editableTip === \'btn\'" class="cell-container">\r\n <div class="cell-container-inner not-break modify-holder">\r\n <ng-template [ngTemplateOutlet]="cellViewTemp"></ng-template>\r\n <span class="cell-modify" (click)="cellEditing($event)">\r\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16px" height="16px" version="1.1">\r\n <g id="cell-modify" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1">\r\n <path\r\n id="cell-modify-copy"\r\n d="M 9.48528 3.41421 L 10.8995 2 L 13.7279 4.82843 L 12.3137 6.24264 L 9.48528 3.41421 Z M 5.24264 13.3137 L 2.41421 13.3137 L 2.41421 10.4853 L 8.77817 4.12132 L 11.6066 6.94975 L 5.24264 13.3137 Z"\r\n />\r\n </g>\r\n </svg>\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngIf="!isCellEdit && column.extraOptions?.editableTip !== \'btn\'" class="cell-editable" (click)="cellEditing($event)">\r\n <ng-template [ngTemplateOutlet]="cellViewTemp"></ng-template>\r\n </div>\r\n <div [ngClass]="{ \'edit-padding-fix\': dynamicEditorActive }">\r\n <ng-template dEditorHost></ng-template>\r\n </div>\r\n <ng-template\r\n *ngIf="templateEditorActive"\r\n [ngTemplateOutlet]="column.cellEditCmp ? column.cellEditCmp.template : column.fieldType === \'date\' ? dateEditTempate : textEditTempate"\r\n [ngTemplateOutletContext]="{\r\n rowIndex:rowIndex,\r\n colIndex:colIndex,\r\n column: column,\r\n rowItem:rowItem,\r\n $implicit: this,\r\n row: rowComponent\r\n }"\r\n >\r\n </ng-template>\r\n</ng-container>\r\n\r\n<ng-template #cellViewTemp>\r\n <ng-container *ngIf="column.nestedColumn">\r\n <span *ngIf="tableLevel > 0" class="cell-placeholder" [ngStyle]="{ width: tableLevel * 16 + \'px\' }"></span>\r\n <span [style.visibility]="rowItem.children ? \'visible\' : \'hidden\'" class="childtable-toggler" (click)="toggleChildTable(rowItem)">\r\n <ng-container *ngIf="rowItem[\'$isChildTableOpen\']">\r\n <svg\r\n *ngIf="!column.extraOptions?.iconFoldTable"\r\n class="svg-icon-close-folder"\r\n width="16px"\r\n height="16px"\r\n