ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
2 lines • 32.3 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/platform"),require("@angular/cdk/scrolling"),require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("ng-zorro-antd/core"),require("ng-zorro-antd/i18n"),require("ng-zorro-antd/dropdown"),require("@angular/common"),require("@angular/forms"),require("ng-zorro-antd/checkbox"),require("ng-zorro-antd/empty"),require("ng-zorro-antd/icon"),require("ng-zorro-antd/menu"),require("ng-zorro-antd/pagination"),require("ng-zorro-antd/radio"),require("ng-zorro-antd/spin")):"function"==typeof define&&define.amd?define("ng-zorro-antd/table",["exports","@angular/cdk/platform","@angular/cdk/scrolling","@angular/core","rxjs","rxjs/operators","ng-zorro-antd/core","ng-zorro-antd/i18n","ng-zorro-antd/dropdown","@angular/common","@angular/forms","ng-zorro-antd/checkbox","ng-zorro-antd/empty","ng-zorro-antd/icon","ng-zorro-antd/menu","ng-zorro-antd/pagination","ng-zorro-antd/radio","ng-zorro-antd/spin"],t):t(((e=e||self)["ng-zorro-antd"]=e["ng-zorro-antd"]||{},e["ng-zorro-antd"].table={}),e.ng.cdk.platform,e.ng.cdk.scrolling,e.ng.core,e.rxjs,e.rxjs.operators,e["ng-zorro-antd"].core,e["ng-zorro-antd"].i18n,e["ng-zorro-antd"].dropdown,e.ng.common,e.ng.forms,e["ng-zorro-antd"].checkbox,e["ng-zorro-antd"].empty,e["ng-zorro-antd"].icon,e["ng-zorro-antd"].menu,e["ng-zorro-antd"].pagination,e["ng-zorro-antd"].radio,e["ng-zorro-antd"].spin)}(this,function(e,t,n,i,o,a,l,r,s,p,c,d,h,u,z,g,m,f){"use strict";function y(e,t,n,i){var o,a=arguments.length,l=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(l=(a<3?o(l):a>3?o(t,n,l):o(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l}function S(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)l.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return l}function C(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}var v=function(){function e(e,t){this.cdr=e,this.i18n=t,this.hasFilterValue=!1,this.filterVisible=!1,this.multipleFilterList=[],this.singleFilterList=[],this.locale={},this.nzWidthChange$=new o.Subject,this.destroy$=new o.Subject,this.hasDefaultFilter=!1,this.nzSelections=[],this.nzChecked=!1,this.nzDisabled=!1,this.nzIndeterminate=!1,this.nzFilterMultiple=!0,this.nzSort=null,this.nzFilters=[],this.nzExpand=!1,this.nzShowCheckbox=!1,this.nzCustomFilter=!1,this.nzShowSort=!1,this.nzShowFilter=!1,this.nzShowRowSelection=!1,this.nzCheckedChange=new i.EventEmitter,this.nzSortChange=new i.EventEmitter,this.nzSortChangeWithKey=new i.EventEmitter,this.nzFilterChange=new i.EventEmitter}return e.prototype.updateSortValue=function(){this.nzShowSort&&("ascend"===this.nzSort?this.setSortValue("descend"):"descend"===this.nzSort?this.setSortValue(null):this.setSortValue("ascend"))},e.prototype.setSortValue=function(e){this.nzSort=e,this.nzSortChangeWithKey.emit({key:this.nzSortKey,value:this.nzSort}),this.nzSortChange.emit(this.nzSort)},Object.defineProperty(e.prototype,"filterList",{get:function(){return this.multipleFilterList.filter(function(e){return e.checked}).map(function(e){return e.value})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filterValue",{get:function(){var e=this.singleFilterList.find(function(e){return e.checked});return e?e.value:null},enumerable:!0,configurable:!0}),e.prototype.updateFilterStatus=function(){this.nzFilterMultiple?this.hasFilterValue=this.filterList.length>0:this.hasFilterValue=l.isNotNil(this.filterValue)},e.prototype.search=function(){this.updateFilterStatus(),this.nzFilterMultiple?this.nzFilterChange.emit(this.filterList):this.nzFilterChange.emit(this.filterValue)},e.prototype.reset=function(){this.initMultipleFilterList(!0),this.initSingleFilterList(!0),this.hasFilterValue=!1},e.prototype.checkMultiple=function(e){e.checked=!e.checked},e.prototype.checkSingle=function(e){this.singleFilterList.forEach(function(t){return t.checked=t===e})},e.prototype.hideDropDown=function(){this.nzDropdownMenuComponent.setVisibleStateWhen(!1),this.filterVisible=!1},e.prototype.dropDownVisibleChange=function(e){this.filterVisible=e,e||this.search()},e.prototype.initMultipleFilterList=function(e){var t=this;this.multipleFilterList=this.nzFilters.map(function(n){var i=!e&&!!n.byDefault;return i&&(t.hasDefaultFilter=!0),{text:n.text,value:n.value,checked:i}}),this.checkDefaultFilters()},e.prototype.initSingleFilterList=function(e){var t=this;this.singleFilterList=this.nzFilters.map(function(n){var i=!e&&!!n.byDefault;return i&&(t.hasDefaultFilter=!0),{text:n.text,value:n.value,checked:i}}),this.checkDefaultFilters()},e.prototype.checkDefaultFilters=function(){this.nzFilters&&0!==this.nzFilters.length&&this.hasDefaultFilter&&this.updateFilterStatus()},e.prototype.marForCheck=function(){this.cdr.markForCheck()},e.prototype.ngOnInit=function(){var e=this;this.i18n.localeChange.pipe(a.takeUntil(this.destroy$)).subscribe(function(){e.locale=e.i18n.getLocaleData("Table"),e.cdr.markForCheck()})},e.prototype.ngOnChanges=function(e){e.nzFilters&&(this.initMultipleFilterList(),this.initSingleFilterList(),this.updateFilterStatus()),e.nzWidth&&this.nzWidthChange$.next(this.nzWidth)},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.decorators=[{type:i.Component,args:[{selector:"th:not(.nz-disable-th):not([mat-sort-header]):not([mat-header-cell])",preserveWhitespaces:!1,encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,template:'<ng-template #checkboxTemplate>\n <label nz-checkbox\n [class.ant-table-selection-select-all-custom]="nzShowRowSelection"\n [(ngModel)]="nzChecked"\n [nzDisabled]="nzDisabled"\n [nzIndeterminate]="nzIndeterminate"\n (ngModelChange)="nzCheckedChange.emit($event)">\n </label>\n</ng-template>\n<span class="ant-table-header-column">\n <div [class.ant-table-column-sorters]="nzShowSort" (click)="updateSortValue()">\n <span class="ant-table-column-title">\n <ng-container *ngIf="nzShowCheckbox && !nzShowRowSelection">\n <ng-template [ngTemplateOutlet]="checkboxTemplate"></ng-template>\n </ng-container>\n <div class="ant-table-selection" *ngIf="nzShowRowSelection">\n <ng-container *ngIf="nzShowCheckbox">\n <ng-template [ngTemplateOutlet]="checkboxTemplate"></ng-template>\n </ng-container>\n <div nz-dropdown class="ant-table-selection-down" nzPlacement="bottomLeft" [nzDropdownMenu]="selectionMenu">\n <i nz-icon nzType="down"></i>\n </div>\n <nz-dropdown-menu #selectionMenu="nzDropdownMenu">\n <ul nz-menu class="ant-table-selection-menu">\n <li nz-menu-item\n *ngFor="let selection of nzSelections"\n (click)="selection.onSelect()">{{selection.text}}</li>\n </ul>\n </nz-dropdown-menu>\n </div>\n <ng-content></ng-content>\n </span>\n <ng-content select="nz-dropdown"></ng-content>\n <div class="ant-table-column-sorter" *ngIf="nzShowSort">\n <div class="ant-table-column-sorter-inner ant-table-column-sorter-inner-full">\n <i nz-icon\n nzType="caret-up"\n class="ant-table-column-sorter-up"\n [class.on]="nzSort == \'ascend\'"\n [class.off]="nzSort != \'ascend\'"></i>\n <i nz-icon\n nzType="caret-down"\n class="ant-table-column-sorter-down"\n [class.on]="nzSort == \'descend\'"\n [class.off]="nzSort != \'descend\'"></i>\n </div>\n </div>\n </div>\n</span>\n<ng-content select="[nz-dropdown]"></ng-content>\n\n<ng-container *ngIf="nzShowFilter">\n <i nz-icon\n nz-dropdown\n nzType="filter"\n nzTheme="fill"\n nzTrigger="click"\n nzTableFilter\n [nzClickHide]="false"\n [nzDropdownMenu]="filterMenu"\n [class.ant-table-filter-selected]="hasFilterValue"\n [class.ant-table-filter-open]="filterVisible"\n (nzVisibleChange)="dropDownVisibleChange($event)"></i>\n <nz-dropdown-menu #filterMenu="nzDropdownMenu">\n <ul nz-menu>\n <ng-container *ngIf="nzFilterMultiple">\n <li nz-menu-item *ngFor="let filter of multipleFilterList" (click)="checkMultiple(filter)">\n <label nz-checkbox [ngModel]="filter.checked" (ngModelChange)="checkMultiple(filter)"></label>\n <span>{{filter.text}}</span>\n </li>\n </ng-container>\n <ng-container *ngIf="!nzFilterMultiple">\n <li nz-menu-item *ngFor="let filter of singleFilterList" (click)="checkSingle(filter)">\n <label nz-radio [ngModel]="filter.checked" (ngModelChange)="checkSingle(filter)">{{filter.text}}</label>\n </li>\n </ng-container>\n </ul>\n <div class="ant-table-filter-dropdown-btns">\n <a class="ant-table-filter-dropdown-link confirm" (click)="hideDropDown()">\n <span>{{ locale.filterConfirm }}</span>\n </a>\n <a class="ant-table-filter-dropdown-link clear" (click)="reset();hideDropDown()">\n <span>{{ locale.filterReset }}</span>\n </a>\n </div>\n </nz-dropdown-menu>\n</ng-container>\n',host:{"[class.ant-table-column-has-actions]":"nzShowFilter || nzShowSort || nzCustomFilter","[class.ant-table-column-has-filters]":"nzShowFilter || nzCustomFilter","[class.ant-table-column-has-sorters]":"nzShowSort","[class.ant-table-selection-column-custom]":"nzShowRowSelection","[class.ant-table-selection-column]":"nzShowCheckbox","[class.ant-table-expand-icon-th]":"nzExpand","[class.ant-table-th-left-sticky]":"nzLeft","[class.ant-table-th-right-sticky]":"nzRight","[class.ant-table-column-sort]":"nzSort === 'descend' || nzSort === 'ascend'","[style.left]":"nzLeft","[style.right]":"nzRight","[style.text-align]":"nzAlign"}}]}],e.ctorParameters=function(){return[{type:i.ChangeDetectorRef},{type:r.NzI18nService}]},e.propDecorators={nzDropdownMenuComponent:[{type:i.ViewChild,args:[s.NzDropdownMenuComponent,{static:!1}]}],nzSelections:[{type:i.Input}],nzChecked:[{type:i.Input}],nzDisabled:[{type:i.Input}],nzIndeterminate:[{type:i.Input}],nzSortKey:[{type:i.Input}],nzFilterMultiple:[{type:i.Input}],nzWidth:[{type:i.Input}],nzLeft:[{type:i.Input}],nzRight:[{type:i.Input}],nzAlign:[{type:i.Input}],nzSort:[{type:i.Input}],nzFilters:[{type:i.Input}],nzExpand:[{type:i.Input}],nzShowCheckbox:[{type:i.Input}],nzCustomFilter:[{type:i.Input}],nzShowSort:[{type:i.Input}],nzShowFilter:[{type:i.Input}],nzShowRowSelection:[{type:i.Input}],nzCheckedChange:[{type:i.Output}],nzSortChange:[{type:i.Output}],nzSortChangeWithKey:[{type:i.Output}],nzFilterChange:[{type:i.Output}]},y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzExpand",void 0),y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzShowCheckbox",void 0),y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzCustomFilter",void 0),y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzShowSort",void 0),y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzShowFilter",void 0),y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzShowRowSelection",void 0),e}();var I=function(){function e(e){this.templateRef=e}return e.decorators=[{type:i.Directive,args:[{selector:"[nz-virtual-scroll]",exportAs:"nzVirtualScroll"}]}],e.ctorParameters=function(){return[{type:i.TemplateRef}]},e}();var w=function(){function e(e,t,n,a,l,r,s){this.nzConfigService=e,this.renderer=t,this.ngZone=n,this.cdr=a,this.i18n=l,this.platform=r,this.data=[],this.locale={},this.lastScrollLeft=0,this.headerBottomStyle={},this.destroy$=new o.Subject,this.nzPageSizeOptions=[10,20,30,40,50],this.nzVirtualScroll=!1,this.nzVirtualItemSize=0,this.nzVirtualMaxBufferPx=200,this.nzVirtualMinBufferPx=100,this.nzLoadingDelay=0,this.nzTotal=0,this.nzWidthConfig=[],this.nzPageIndex=1,this.nzPageSize=10,this.nzData=[],this.nzPaginationPosition="bottom",this.nzScroll={x:null,y:null},this.nzFrontPagination=!0,this.nzTemplateMode=!1,this.nzShowPagination=!0,this.nzLoading=!1,this.nzPageSizeChange=new i.EventEmitter,this.nzPageIndexChange=new i.EventEmitter,this.nzCurrentPageDataChange=new i.EventEmitter,t.addClass(s.nativeElement,"ant-table-wrapper")}return Object.defineProperty(e.prototype,"itemRender",{get:function(){return this.nzItemRender||this.itemRenderChild},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tableBodyNativeElement",{get:function(){return this.tableBodyElement&&this.tableBodyElement.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tableHeaderNativeElement",{get:function(){return this.tableHeaderElement&&this.tableHeaderElement.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cdkVirtualScrollNativeElement",{get:function(){return this.cdkVirtualScrollElement&&this.cdkVirtualScrollElement.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mixTableBodyNativeElement",{get:function(){return this.tableBodyNativeElement||this.cdkVirtualScrollNativeElement},enumerable:!0,configurable:!0}),e.prototype.emitPageSizeOrIndex=function(e,t){this.nzPageSize===e&&this.nzPageIndex===t||(this.nzPageSize!==e&&(this.nzPageSize=e,this.nzPageSizeChange.emit(this.nzPageSize)),this.nzPageIndex!==t&&(this.nzPageIndex=t,this.nzPageIndexChange.emit(this.nzPageIndex)),this.updateFrontPaginationDataIfNeeded(this.nzPageSize!==e))},e.prototype.syncScrollTable=function(e){if(e.currentTarget===e.target){var t=e.target;t.scrollLeft!==this.lastScrollLeft&&this.nzScroll&&this.nzScroll.x&&(t===this.mixTableBodyNativeElement&&this.tableHeaderNativeElement?this.tableHeaderNativeElement.scrollLeft=t.scrollLeft:t===this.tableHeaderNativeElement&&this.mixTableBodyNativeElement&&(this.mixTableBodyNativeElement.scrollLeft=t.scrollLeft),this.setScrollPositionClassName()),this.lastScrollLeft=t.scrollLeft}},e.prototype.setScrollPositionClassName=function(){this.mixTableBodyNativeElement&&this.nzScroll&&this.nzScroll.x&&(this.mixTableBodyNativeElement.scrollWidth===this.mixTableBodyNativeElement.clientWidth&&0!==this.mixTableBodyNativeElement.scrollWidth?this.setScrollName():0===this.mixTableBodyNativeElement.scrollLeft?this.setScrollName("left"):this.mixTableBodyNativeElement.scrollWidth===this.mixTableBodyNativeElement.scrollLeft+this.mixTableBodyNativeElement.clientWidth?this.setScrollName("right"):this.setScrollName("middle"))},e.prototype.setScrollName=function(e){var t=this,n="ant-table-scroll-position";["left","right","middle"].forEach(function(e){t.renderer.removeClass(t.tableMainElement.nativeElement,n+"-"+e)}),e&&this.renderer.addClass(this.tableMainElement.nativeElement,n+"-"+e)},e.prototype.fitScrollBar=function(){if(this.nzScroll.y){var e=l.measureScrollbar("vertical"),t=l.measureScrollbar("horizontal","ant-table");t>0&&(this.headerBottomStyle={marginBottom:"-"+t+"px",paddingBottom:"0px",overflowX:"scroll",overflowY:0===e?"hidden":"scroll"},this.cdr.markForCheck())}},e.prototype.updateFrontPaginationDataIfNeeded=function(e){var t=this;void 0===e&&(e=!1);var n=this.nzData||[];if(this.nzFrontPagination){if(this.nzTotal=n.length,e){var i=Math.ceil(n.length/this.nzPageSize)||1,o=this.nzPageIndex>i?i:this.nzPageIndex;o!==this.nzPageIndex&&(this.nzPageIndex=o,Promise.resolve().then(function(){return t.nzPageIndexChange.emit(o)}))}n=n.slice((this.nzPageIndex-1)*this.nzPageSize,this.nzPageIndex*this.nzPageSize)}this.data=C(n),this.nzCurrentPageDataChange.emit(this.data)},e.prototype.ngOnInit=function(){var e=this;this.i18n.localeChange.pipe(a.takeUntil(this.destroy$)).subscribe(function(){e.locale=e.i18n.getLocaleData("Table"),e.cdr.markForCheck()})},e.prototype.ngOnChanges=function(e){e.nzScroll&&(e.nzScroll.currentValue?this.nzScroll=e.nzScroll.currentValue:this.nzScroll={x:null,y:null},this.fitScrollBar(),this.setScrollPositionClassName()),(e.nzPageIndex||e.nzPageSize||e.nzFrontPagination||e.nzData)&&this.updateFrontPaginationDataIfNeeded(!(!e.nzPageSize&&!e.nzData))},e.prototype.ngAfterViewInit=function(){var e=this;this.platform.isBrowser&&(setTimeout(function(){return e.setScrollPositionClassName()}),this.ngZone.runOutsideAngular(function(){o.merge(e.tableHeaderNativeElement?o.fromEvent(e.tableHeaderNativeElement,"scroll"):o.EMPTY,e.mixTableBodyNativeElement?o.fromEvent(e.mixTableBodyNativeElement,"scroll"):o.EMPTY).pipe(a.takeUntil(e.destroy$)).subscribe(function(t){e.syncScrollTable(t)}),o.fromEvent(window,"resize").pipe(a.startWith(!0),a.takeUntil(e.destroy$)).subscribe(function(){e.fitScrollBar(),e.setScrollPositionClassName()})}))},e.prototype.ngAfterContentInit=function(){var e=this;this.listOfNzThComponent.changes.pipe(a.startWith(!0),a.flatMap(function(){return o.merge.apply(void 0,C([e.listOfNzThComponent.changes],e.listOfNzThComponent.map(function(e){return e.nzWidthChange$})))}),a.takeUntil(this.destroy$)).subscribe(function(){e.cdr.markForCheck()})},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.decorators=[{type:i.Component,args:[{selector:"nz-table",exportAs:"nzTable",preserveWhitespaces:!1,changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,template:'<ng-template #renderItemTemplate let-type let-page="page">\n <a class="ant-pagination-item-link" *ngIf="type===\'pre\'"><i nz-icon nzType="left"></i></a>\n <a class="ant-pagination-item-link" *ngIf="type===\'next\'"><i nz-icon nzType="right"></i></a>\n <a *ngIf="type==\'page\'">{{ page }}</a>\n</ng-template>\n<ng-template #colGroupTemplate>\n <colgroup>\n <col [style.width]="width" [style.minWidth]="width" *ngFor="let width of nzWidthConfig">\n <ng-container *ngFor="let th of listOfNzThComponent">\n <col [style.width]="th.nzWidth" [style.minWidth]="th.nzWidth" *ngIf="th.nzWidth">\n </ng-container>\n </colgroup>\n</ng-template>\n<ng-template #headerTemplate>\n <ng-template [ngTemplateOutlet]="colGroupTemplate"></ng-template>\n <thead class="ant-table-thead" *ngIf="!nzScroll.y">\n <ng-template [ngTemplateOutlet]="nzTheadComponent?.templateRef"></ng-template>\n </thead>\n</ng-template>\n<ng-template #tableInnerTemplate>\n <div #tableHeaderElement\n *ngIf="nzScroll.y"\n [ngStyle]="headerBottomStyle"\n class="ant-table-header ant-table-hide-scrollbar">\n <table [class.ant-table-fixed]="nzScroll.x" [style.width]="nzScroll.x">\n <ng-template [ngTemplateOutlet]="colGroupTemplate"></ng-template>\n <thead class="ant-table-thead" *ngIf="nzScroll.y">\n <ng-template [ngTemplateOutlet]="nzTheadComponent?.templateRef"></ng-template>\n </thead>\n </table>\n </div>\n <div #tableBodyElement *ngIf="!nzVirtualScroll;else scrollViewTpl"\n class="ant-table-body"\n [style.maxHeight]="nzScroll.y"\n [style.overflow-y]="nzScroll.y ? \'scroll\' : \'\'"\n [style.overflow-x]="nzScroll.x ? \'auto\' : \'\'">\n <table [class.ant-table-fixed]="nzScroll.x" [style.width]="nzScroll.x">\n <ng-template [ngIf]="!nzVirtualScroll" [ngTemplateOutlet]="headerTemplate"></ng-template>\n <ng-content></ng-content>\n </table>\n </div>\n <ng-template #scrollViewTpl>\n <cdk-virtual-scroll-viewport\n class="ant-table-body"\n [hidden]="!data.length"\n [itemSize]="nzVirtualItemSize"\n [maxBufferPx]="nzVirtualMaxBufferPx"\n [minBufferPx]="nzVirtualMinBufferPx"\n [style.height]="nzScroll.y">\n <table [class.ant-table-fixed]="nzScroll.x" [style.width]="nzScroll.x">\n <ng-template [ngIf]="nzVirtualScroll" [ngTemplateOutlet]="headerTemplate"></ng-template>\n <tbody>\n <ng-container *cdkVirtualFor="let item of data; let i = index; trackBy:nzVirtualForTrackBy;">\n <ng-template [ngTemplateOutlet]="nzVirtualScrollDirective?.templateRef" [ngTemplateOutletContext]="{$implicit:item, index:i}"></ng-template>\n </ng-container>\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n </ng-template>\n <div class="ant-table-placeholder" *ngIf="data.length === 0 && !nzLoading && !nzTemplateMode">\n <nz-embed-empty [nzComponentName]="\'table\'" [specificContent]="nzNoResult"></nz-embed-empty>\n </div>\n <div class="ant-table-footer" *ngIf="nzFooter">\n <ng-container *nzStringTemplateOutlet="nzFooter">{{ nzFooter }}</ng-container>\n </div>\n</ng-template>\n<ng-template #paginationTemplate>\n <nz-pagination *ngIf="nzShowPagination && data.length"\n [nzInTable]="true"\n [nzShowSizeChanger]="nzShowSizeChanger"\n [nzPageSizeOptions]="nzPageSizeOptions"\n [nzItemRender]="itemRender"\n [nzShowQuickJumper]="nzShowQuickJumper"\n [nzHideOnSinglePage]="nzHideOnSinglePage"\n [nzShowTotal]="nzShowTotal"\n [nzSize]="nzSize === \'default\' ? \'default\' : \'small\'"\n [nzPageSize]="nzPageSize"\n [nzTotal]="nzTotal"\n [nzSimple]="nzSimple"\n [nzPageIndex]="nzPageIndex"\n (nzPageSizeChange)="emitPageSizeOrIndex($event,nzPageIndex)"\n (nzPageIndexChange)="emitPageSizeOrIndex(nzPageSize,$event)">\n </nz-pagination>\n</ng-template>\n<nz-spin [nzDelay]="nzLoadingDelay" [nzSpinning]="nzLoading" [nzIndicator]="nzLoadingIndicator">\n <ng-container *ngIf="nzPaginationPosition === \'both\' || nzPaginationPosition === \'top\'">\n <ng-template [ngTemplateOutlet]="paginationTemplate"></ng-template>\n </ng-container>\n <div #tableMainElement\n class="ant-table"\n [class.ant-table-fixed-header]="nzScroll.x || nzScroll.y"\n [class.ant-table-bordered]="nzBordered"\n [class.ant-table-default]="nzSize === \'default\'"\n [class.ant-table-middle]="nzSize === \'middle\'"\n [class.ant-table-small]="nzSize === \'small\'">\n <div class="ant-table-title" *ngIf="nzTitle">\n <ng-container *nzStringTemplateOutlet="nzTitle">{{ nzTitle }}</ng-container>\n </div>\n <div class="ant-table-content">\n <ng-container *ngIf="nzScroll.x || nzScroll.y; else tableInnerTemplate">\n <div class="ant-table-scroll">\n <ng-template [ngTemplateOutlet]="tableInnerTemplate"></ng-template>\n </div>\n </ng-container>\n </div>\n </div>\n <ng-container *ngIf="nzPaginationPosition === \'both\' || nzPaginationPosition === \'bottom\'">\n <ng-template [ngTemplateOutlet]="paginationTemplate"></ng-template>\n </ng-container>\n</nz-spin>\n',host:{"[class.ant-table-empty]":"data.length === 0 && !nzTemplateMode"},styles:["\n nz-table {\n display: block;\n }\n\n cdk-virtual-scroll-viewport.ant-table-body {\n overflow-y: scroll;\n }\n "]}]}],e.ctorParameters=function(){return[{type:l.NzConfigService},{type:i.Renderer2},{type:i.NgZone},{type:i.ChangeDetectorRef},{type:r.NzI18nService},{type:t.Platform},{type:i.ElementRef}]},e.propDecorators={listOfNzThComponent:[{type:i.ContentChildren,args:[v,{descendants:!0}]}],tableHeaderElement:[{type:i.ViewChild,args:["tableHeaderElement",{static:!1,read:i.ElementRef}]}],tableBodyElement:[{type:i.ViewChild,args:["tableBodyElement",{static:!1,read:i.ElementRef}]}],tableMainElement:[{type:i.ViewChild,args:["tableMainElement",{static:!1,read:i.ElementRef}]}],cdkVirtualScrollElement:[{type:i.ViewChild,args:[n.CdkVirtualScrollViewport,{static:!1,read:i.ElementRef}]}],cdkVirtualScrollViewport:[{type:i.ViewChild,args:[n.CdkVirtualScrollViewport,{static:!1,read:n.CdkVirtualScrollViewport}]}],nzVirtualScrollDirective:[{type:i.ContentChild,args:[I,{static:!1}]}],nzSize:[{type:i.Input}],nzShowTotal:[{type:i.Input}],nzPageSizeOptions:[{type:i.Input}],nzVirtualScroll:[{type:i.Input}],nzVirtualItemSize:[{type:i.Input}],nzVirtualMaxBufferPx:[{type:i.Input}],nzVirtualMinBufferPx:[{type:i.Input}],nzVirtualForTrackBy:[{type:i.Input}],nzLoadingDelay:[{type:i.Input}],nzLoadingIndicator:[{type:i.Input}],nzTotal:[{type:i.Input}],nzTitle:[{type:i.Input}],nzFooter:[{type:i.Input}],nzNoResult:[{type:i.Input}],nzWidthConfig:[{type:i.Input}],nzPageIndex:[{type:i.Input}],nzPageSize:[{type:i.Input}],nzData:[{type:i.Input}],nzPaginationPosition:[{type:i.Input}],nzScroll:[{type:i.Input}],nzItemRender:[{type:i.Input}],itemRenderChild:[{type:i.ViewChild,args:["renderItemTemplate",{static:!0}]}],nzFrontPagination:[{type:i.Input}],nzTemplateMode:[{type:i.Input}],nzBordered:[{type:i.Input}],nzShowPagination:[{type:i.Input}],nzLoading:[{type:i.Input}],nzShowSizeChanger:[{type:i.Input}],nzHideOnSinglePage:[{type:i.Input}],nzShowQuickJumper:[{type:i.Input}],nzSimple:[{type:i.Input}],nzPageSizeChange:[{type:i.Output}],nzPageIndexChange:[{type:i.Output}],nzCurrentPageDataChange:[{type:i.Output}]},y([l.WithConfig("default"),S("design:type",String)],e.prototype,"nzSize",void 0),y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzVirtualScroll",void 0),y([l.InputNumber(),S("design:type",Object)],e.prototype,"nzVirtualItemSize",void 0),y([l.InputNumber(),S("design:type",Object)],e.prototype,"nzVirtualMaxBufferPx",void 0),y([l.InputNumber(),S("design:type",Object)],e.prototype,"nzVirtualMinBufferPx",void 0),y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzFrontPagination",void 0),y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzTemplateMode",void 0),y([l.WithConfig(!1),l.InputBoolean(),S("design:type",Boolean)],e.prototype,"nzBordered",void 0),y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzShowPagination",void 0),y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzLoading",void 0),y([l.WithConfig(!1),l.InputBoolean(),S("design:type",Boolean)],e.prototype,"nzShowSizeChanger",void 0),y([l.WithConfig(!1),l.InputBoolean(),S("design:type",Boolean)],e.prototype,"nzHideOnSinglePage",void 0),y([l.WithConfig(!1),l.InputBoolean(),S("design:type",Boolean)],e.prototype,"nzShowQuickJumper",void 0),y([l.WithConfig(!1),l.InputBoolean(),S("design:type",Boolean)],e.prototype,"nzSimple",void 0),e}();var x=function(){function e(e){this.nzTableComponent=e}return e.decorators=[{type:i.Directive,args:[{selector:"tbody",host:{"[class.ant-table-tbody]":"nzTableComponent"}}]}],e.ctorParameters=function(){return[{type:w,decorators:[{type:i.Host},{type:i.Optional}]}]},e}();var P=function(){function e(e,t){this.elementRef=e,this.nzUpdateHostClassService=t,this.nzChecked=!1,this.nzDisabled=!1,this.nzIndeterminate=!1,this.nzExpand=!1,this.nzShowExpand=!1,this.nzShowCheckbox=!1,this.nzCheckedChange=new i.EventEmitter,this.nzExpandChange=new i.EventEmitter}return e.prototype.expandChange=function(e){e.stopPropagation(),this.nzExpand=!this.nzExpand,this.nzExpandChange.emit(this.nzExpand)},e.prototype.setClassMap=function(){var e;this.nzUpdateHostClassService.updateHostClass(this.elementRef.nativeElement,((e={})["ant-table-row-expand-icon-cell"]=this.nzShowExpand&&!l.isNotNil(this.nzIndentSize),e["ant-table-selection-column"]=this.nzShowCheckbox,e["ant-table-td-left-sticky"]=l.isNotNil(this.nzLeft),e["ant-table-td-right-sticky"]=l.isNotNil(this.nzRight),e))},e.prototype.ngOnChanges=function(e){(e.nzIndentSize||e.nzShowExpand||e.nzShowCheckbox||e.nzRight||e.nzLeft)&&this.setClassMap()},e.decorators=[{type:i.Component,args:[{selector:"td:not(.nz-disable-td):not([mat-cell])",changeDetection:i.ChangeDetectionStrategy.OnPush,providers:[l.NzUpdateHostClassService],preserveWhitespaces:!1,encapsulation:i.ViewEncapsulation.None,template:'<span class="ant-table-row-indent" *ngIf="nzIndentSize >= 0" [style.padding-left.px]="nzIndentSize"></span>\n<label *ngIf="nzShowCheckbox"\n nz-checkbox\n [nzDisabled]="nzDisabled"\n [(ngModel)]="nzChecked"\n [nzIndeterminate]="nzIndeterminate"\n (ngModelChange)="nzCheckedChange.emit($event)">\n</label>\n<span *ngIf="!nzShowExpand && nzIndentSize >= 0"\n class="ant-table-row-expand-icon ant-table-row-spaced">\n</span>\n<span *ngIf="nzShowExpand"\n class="ant-table-row-expand-icon"\n [class.ant-table-row-expanded]="nzExpand"\n [class.ant-table-row-collapsed]="!nzExpand"\n (click)="expandChange($event)">\n</span>\n<ng-content></ng-content>',host:{"[style.left]":"nzLeft","[style.right]":"nzRight","[style.text-align]":"nzAlign"}}]}],e.ctorParameters=function(){return[{type:i.ElementRef},{type:l.NzUpdateHostClassService}]},e.propDecorators={nzChecked:[{type:i.Input}],nzDisabled:[{type:i.Input}],nzIndeterminate:[{type:i.Input}],nzLeft:[{type:i.Input}],nzRight:[{type:i.Input}],nzAlign:[{type:i.Input}],nzIndentSize:[{type:i.Input}],nzExpand:[{type:i.Input}],nzShowExpand:[{type:i.Input}],nzShowCheckbox:[{type:i.Input}],nzCheckedChange:[{type:i.Output}],nzExpandChange:[{type:i.Output}]},y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzExpand",void 0),y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzShowExpand",void 0),y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzShowCheckbox",void 0),e}();var E=function(){function e(e,t,n){this.nzTableComponent=e,this.elementRef=t,this.renderer=n,this.destroy$=new o.Subject,this.nzSingleSort=!1,this.nzSortChange=new i.EventEmitter,this.nzTableComponent&&(this.nzTableComponent.nzTheadComponent=this)}return e.prototype.ngAfterContentInit=function(){var e=this;this.listOfNzThComponent.changes.pipe(a.startWith(!0),a.switchMap(function(){return o.merge.apply(void 0,C(e.listOfNzThComponent.map(function(e){return e.nzSortChangeWithKey})))}),a.takeUntil(this.destroy$)).subscribe(function(t){e.nzSortChange.emit(t),e.nzSingleSort&&e.listOfNzThComponent.forEach(function(e){e.nzSort=e.nzSortKey===t.key?e.nzSort:null,e.marForCheck()})})},e.prototype.ngAfterViewInit=function(){this.nzTableComponent&&this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),this.elementRef.nativeElement)},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.decorators=[{type:i.Component,args:[{selector:"thead:not(.ant-table-thead)",changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,template:'<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n<ng-container *ngIf="!nzTableComponent">\n <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>\n</ng-container>'}]}],e.ctorParameters=function(){return[{type:w,decorators:[{type:i.Host},{type:i.Optional}]},{type:i.ElementRef},{type:i.Renderer2}]},e.propDecorators={templateRef:[{type:i.ViewChild,args:["contentTemplate",{static:!0}]}],listOfNzThComponent:[{type:i.ContentChildren,args:[v,{descendants:!0}]}],nzSingleSort:[{type:i.Input}],nzSortChange:[{type:i.Output}]},y([l.InputBoolean(),S("design:type",Object)],e.prototype,"nzSingleSort",void 0),e}();var T=function(){function e(e,t,n){this.elementRef=e,this.renderer=t,this.nzTableComponent=n}return Object.defineProperty(e.prototype,"nzExpand",{set:function(e){l.toBoolean(e)?(this.renderer.removeStyle(this.elementRef.nativeElement,"display"),this.renderer.addClass(this.elementRef.nativeElement,"ant-table-expanded-row")):(this.renderer.setStyle(this.elementRef.nativeElement,"display","none"),this.renderer.removeClass(this.elementRef.nativeElement,"ant-table-expanded-row"))},enumerable:!0,configurable:!0}),e.decorators=[{type:i.Directive,args:[{selector:"tr:not([mat-row]):not([mat-header-row])",host:{"[class.ant-table-row]":"nzTableComponent"}}]}],e.ctorParameters=function(){return[{type:i.ElementRef},{type:i.Renderer2},{type:w,decorators:[{type:i.Host},{type:i.Optional}]}]},e.propDecorators={nzExpand:[{type:i.Input}]},e}();var k=function(){function e(){}return e.decorators=[{type:i.NgModule,args:[{declarations:[w,v,P,E,x,T,I],exports:[w,v,P,E,x,T,I],imports:[z.NzMenuModule,c.FormsModule,l.NzAddOnModule,m.NzRadioModule,d.NzCheckboxModule,s.NzDropDownModule,p.CommonModule,t.PlatformModule,g.NzPaginationModule,f.NzSpinModule,r.NzI18nModule,u.NzIconModule,h.NzEmptyModule,n.ScrollingModule]}]}],e}();e.NzTableComponent=w,e.NzTableModule=k,e.NzTbodyDirective=x,e.NzTdComponent=P,e.NzThComponent=v,e.NzTheadComponent=E,e.NzTrDirective=T,e.NzVirtualScrollDirective=I,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ng-zorro-antd-table.umd.min.js.map