UNPKG

ng-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

15 lines (13 loc) 62.4 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/cdk/platform"),require("@angular/cdk/scrolling"),require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("ng-zorro-antd/button"),require("ng-zorro-antd/checkbox"),require("ng-zorro-antd/core/outlet"),require("ng-zorro-antd/core/resize-observers"),require("ng-zorro-antd/dropdown"),require("ng-zorro-antd/empty"),require("ng-zorro-antd/i18n"),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"),require("rxjs"),require("rxjs/operators"),require("ng-zorro-antd/core/util"),require("ng-zorro-antd/core/logger"),require("ng-zorro-antd/core/services"),require("ng-zorro-antd/core/config")):"function"==typeof define&&define.amd?define("ng-zorro-antd/table",["exports","@angular/cdk/platform","@angular/cdk/scrolling","@angular/common","@angular/core","@angular/forms","ng-zorro-antd/button","ng-zorro-antd/checkbox","ng-zorro-antd/core/outlet","ng-zorro-antd/core/resize-observers","ng-zorro-antd/dropdown","ng-zorro-antd/empty","ng-zorro-antd/i18n","ng-zorro-antd/icon","ng-zorro-antd/menu","ng-zorro-antd/pagination","ng-zorro-antd/radio","ng-zorro-antd/spin","rxjs","rxjs/operators","ng-zorro-antd/core/util","ng-zorro-antd/core/logger","ng-zorro-antd/core/services","ng-zorro-antd/core/config"],e):e(((t=t||self)["ng-zorro-antd"]=t["ng-zorro-antd"]||{},t["ng-zorro-antd"].table={}),t.ng.cdk.platform,t.ng.cdk.scrolling,t.ng.common,t.ng.core,t.ng.forms,t["ng-zorro-antd"].button,t["ng-zorro-antd"].checkbox,t["ng-zorro-antd"].core.outlet,t["ng-zorro-antd"].core["resize-observers"],t["ng-zorro-antd"].dropdown,t["ng-zorro-antd"].empty,t["ng-zorro-antd"].i18n,t["ng-zorro-antd"].icon,t["ng-zorro-antd"].menu,t["ng-zorro-antd"].pagination,t["ng-zorro-antd"].radio,t["ng-zorro-antd"].spin,t.rxjs,t.rxjs.operators,t["ng-zorro-antd"].core.util,t["ng-zorro-antd"].core.logger,t["ng-zorro-antd"].core.services,t["ng-zorro-antd"].core.config)}(this,(function(t,e,n,i,r,o,a,s,l,c,p,h,u,d,f,g,z,y,m,b,S,C,v,O){"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(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function w(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function I(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function T(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function k(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat($(arguments[e]));return t}var D=function(){function t(t){this.cdr=t,this.nzActive=!1,this.nzVisible=!1,this.nzVisibleChange=new r.EventEmitter}return t.prototype.onVisibleChange=function(t){this.nzVisible=t,this.nzVisibleChange.next(t)},t.prototype.onFilterClick=function(t){t.stopPropagation()},t.prototype.hide=function(){this.nzVisible=!1,this.cdr.markForCheck()},t.prototype.show=function(){this.nzVisible=!0,this.cdr.markForCheck()},t.decorators=[{type:r.Component,args:[{selector:"nz-filter-trigger",exportAs:"nzFilterTrigger",changeDetection:r.ChangeDetectionStrategy.OnPush,preserveWhitespaces:!1,encapsulation:r.ViewEncapsulation.None,template:'\n <span\n nz-dropdown\n class="ant-table-filter-trigger"\n nzTrigger="click"\n nzPlacement="bottomRight"\n [nzClickHide]="false"\n [nzDropdownMenu]="nzDropdownMenu"\n [class.active]="nzActive"\n [class.ant-table-filter-open]="nzVisible"\n [nzVisible]="nzVisible"\n (nzVisibleChange)="onVisibleChange($event)"\n (click)="onFilterClick($event)"\n >\n <ng-content></ng-content>\n </span>\n ',host:{"[class.ant-table-filter-trigger-container]":"true","[class.ant-table-filter-trigger-container-open]":"nzVisible"}}]}],t.ctorParameters=function(){return[{type:r.ChangeDetectorRef}]},t.propDecorators={nzActive:[{type:r.Input}],nzDropdownMenu:[{type:r.Input}],nzVisible:[{type:r.Input}],nzVisibleChange:[{type:r.Output}]},t}();var F=function(){function t(t,e){this.cdr=t,this.i18n=e,this.contentTemplate=null,this.customFilter=!1,this.extraTemplate=null,this.filterMultiple=!0,this.listOfFilter=[],this.filterChange=new r.EventEmitter,this.destroy$=new m.Subject,this.locale={},this.isChanged=!1,this.isChecked=!1,this.isVisible=!1,this.listOfParsedFilter=[]}return t.prototype.trackByValue=function(t,e){return e.value},t.prototype.check=function(t){this.isChanged=!0,this.filterMultiple?(this.listOfParsedFilter=this.listOfParsedFilter.map((function(e){return e===t?x(x({},e),{checked:!t.checked}):e})),t.checked=!t.checked):this.listOfParsedFilter=this.listOfParsedFilter.map((function(e){return x(x({},e),{checked:e===t})})),this.isChecked=this.getCheckedStatus(this.listOfParsedFilter)},t.prototype.confirm=function(){this.isVisible=!1,this.emitFilterData()},t.prototype.reset=function(){this.isChanged=!0,this.isVisible=!1,this.listOfParsedFilter=this.parseListOfFilter(this.listOfFilter,!0),this.isChecked=this.getCheckedStatus(this.listOfParsedFilter),this.emitFilterData()},t.prototype.onVisibleChange=function(t){this.isVisible=t,t||this.emitFilterData()},t.prototype.emitFilterData=function(){if(this.isChanged){var t=this.listOfParsedFilter.filter((function(t){return t.checked})).map((function(t){return t.value}));this.filterMultiple?this.filterChange.emit(t):this.filterChange.emit(t[0]||null),this.isChanged=!1}},t.prototype.parseListOfFilter=function(t,e){return t.map((function(t){var n=!e&&!!t.byDefault;return{text:t.text,value:t.value,checked:n}}))},t.prototype.getCheckedStatus=function(t){return t.some((function(t){return t.checked}))},t.prototype.ngOnInit=function(){var t=this;this.i18n.localeChange.pipe(b.takeUntil(this.destroy$)).subscribe((function(){t.locale=t.i18n.getLocaleData("Table"),t.cdr.markForCheck()}))},t.prototype.ngOnChanges=function(t){t.listOfFilter&&this.listOfFilter&&this.listOfFilter.length&&(this.listOfParsedFilter=this.parseListOfFilter(this.listOfFilter),this.isChecked=this.getCheckedStatus(this.listOfParsedFilter))},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.decorators=[{type:r.Component,args:[{selector:"nz-table-filter",preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,template:'\n <span class="ant-table-filter-column-title">\n <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>\n </span>\n <ng-container *ngIf="!customFilter; else extraTemplate">\n <nz-filter-trigger\n [nzVisible]="isVisible"\n [nzActive]="isChecked"\n [nzDropdownMenu]="filterMenu"\n (nzVisibleChange)="onVisibleChange($event)"\n >\n <i nz-icon nzType="filter" nzTheme="fill"></i>\n </nz-filter-trigger>\n <nz-dropdown-menu #filterMenu="nzDropdownMenu">\n <div class="ant-table-filter-dropdown">\n <ul nz-menu>\n <li nz-menu-item [nzSelected]="f.checked" *ngFor="let f of listOfParsedFilter; trackBy: trackByValue" (click)="check(f)">\n <label nz-radio *ngIf="!filterMultiple" [ngModel]="f.checked" (ngModelChange)="check(f)"></label>\n <label nz-checkbox *ngIf="filterMultiple" [ngModel]="f.checked" (ngModelChange)="check(f)"></label>\n <span>{{ f.text }}</span>\n </li>\n </ul>\n <div class="ant-table-filter-dropdown-btns">\n <button nz-button nzType="link" nzSize="small" (click)="reset()" [disabled]="!isChecked">{{ locale.filterReset }}</button>\n <button nz-button nzType="primary" nzSize="small" (click)="confirm()">{{ locale.filterConfirm }}</button>\n </div>\n </div>\n </nz-dropdown-menu>\n </ng-container>\n ',host:{"[class.ant-table-filter-column]":"true"}}]}],t.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:u.NzI18nService}]},t.propDecorators={contentTemplate:[{type:r.Input}],customFilter:[{type:r.Input}],extraTemplate:[{type:r.Input}],filterMultiple:[{type:r.Input}],listOfFilter:[{type:r.Input}],filterChange:[{type:r.Output}]},t}();var P=function(){function t(){this.expand=!1,this.spaceMode=!1,this.expandChange=new r.EventEmitter}return t.prototype.onHostClick=function(){this.spaceMode||(this.expand=!this.expand,this.expandChange.next(this.expand))},t.decorators=[{type:r.Directive,args:[{selector:"button[nz-row-expand-button]",host:{"[type]":"'button'","[class.ant-table-row-expand-icon]":"true","[class.ant-table-row-expand-icon-expanded]":"!spaceMode && expand === true","[class.ant-table-row-expand-icon-collapsed]":"!spaceMode && expand === false","[class.ant-table-row-expand-icon-spaced]":"spaceMode","(click)":"onHostClick()"}}]}],t.propDecorators={expand:[{type:r.Input}],spaceMode:[{type:r.Input}],expandChange:[{type:r.Output}]},t}();var E=function(){function t(){this.indentSize=0}return t.decorators=[{type:r.Directive,args:[{selector:"nz-row-indent",host:{"[class.ant-table-row-indent]":"true","[style.padding-left.px]":"indentSize"}}]}],t.propDecorators={indentSize:[{type:r.Input}]},t}();var M=function(){function t(){this.listOfSelections=[],this.checked=!1,this.disabled=!1,this.indeterminate=!1,this.showCheckbox=!1,this.showRowSelection=!1,this.checkedChange=new r.EventEmitter}return t.prototype.onCheckedChange=function(t){this.checked=t,this.checkedChange.emit(t)},t.decorators=[{type:r.Component,args:[{selector:"nz-table-selection",preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,template:'\n <label\n *ngIf="showCheckbox"\n nz-checkbox\n [class.ant-table-selection-select-all-custom]="showRowSelection"\n [ngModel]="checked"\n [nzDisabled]="disabled"\n [nzIndeterminate]="indeterminate"\n (ngModelChange)="onCheckedChange($event)"\n >\n </label>\n <div class="ant-table-selection-extra" *ngIf="showRowSelection">\n <span nz-dropdown class="ant-table-selection-down" nzPlacement="bottomLeft" [nzDropdownMenu]="selectionMenu">\n <i nz-icon nzType="down"></i>\n </span>\n <nz-dropdown-menu #selectionMenu="nzDropdownMenu">\n <ul nz-menu class="ant-table-selection-menu">\n <li nz-menu-item *ngFor="let selection of listOfSelections" (click)="selection.onSelect()">\n {{ selection.text }}\n </li>\n </ul>\n </nz-dropdown-menu>\n </div>\n ',host:{"[class.ant-table-selection]":"true"}}]}],t.propDecorators={listOfSelections:[{type:r.Input}],checked:[{type:r.Input}],disabled:[{type:r.Input}],indeterminate:[{type:r.Input}],showCheckbox:[{type:r.Input}],showRowSelection:[{type:r.Input}],checkedChange:[{type:r.Output}]},t}();var R=function(){function t(){this.sortDirections=["ascend","descend",null],this.sortOrder=null,this.contentTemplate=null,this.isUp=!1,this.isDown=!1}return t.prototype.ngOnChanges=function(t){t.sortDirections&&(this.isUp=-1!==this.sortDirections.indexOf("ascend"),this.isDown=-1!==this.sortDirections.indexOf("descend"))},t.decorators=[{type:r.Component,args:[{selector:"nz-table-sorters",preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,template:'\n <span><ng-template [ngTemplateOutlet]="contentTemplate"></ng-template></span>\n <span class="ant-table-column-sorter" [class.ant-table-column-sorter-full]="isDown && isUp">\n <span class="ant-table-column-sorter-inner">\n <i nz-icon nzType="caret-up" *ngIf="isUp" class="ant-table-column-sorter-up" [class.active]="sortOrder == \'ascend\'"></i>\n <i nz-icon nzType="caret-down" *ngIf="isDown" class="ant-table-column-sorter-down" [class.active]="sortOrder == \'descend\'"></i>\n </span>\n </span>\n ',host:{"[class.ant-table-column-sorters]":"true"}}]}],t.propDecorators={sortDirections:[{type:r.Input}],sortOrder:[{type:r.Input}],contentTemplate:[{type:r.Input}]},t}();var W=function(){function t(t,e,n){this.cdr=t,this.renderer=e,this.elementRef=n,this.nzRight=!1,this.nzLeft=!1,this.colspan=null,this.changes$=new m.Subject,this.isFirstRight=!1,this.isLastLeft=!1,this.isAutoLeft=!1,this.isAutoRight=!1,this.isFixedLeft=!1,this.isFixedRight=!1,this.isFixed=!1}return t.prototype.setIsFirstRight=function(t){this.isFirstRight=t,this.cdr.markForCheck()},t.prototype.setIsLastLeft=function(t){this.isLastLeft=t,this.cdr.markForCheck()},t.prototype.setAutoLeftWidth=function(t){this.renderer.setStyle(this.elementRef.nativeElement,"left",t)},t.prototype.setAutoRightWidth=function(t){this.renderer.setStyle(this.elementRef.nativeElement,"right",t)},t.prototype.ngOnChanges=function(){this.isFirstRight=!1,this.isLastLeft=!1,this.isAutoLeft=""===this.nzLeft||!0===this.nzLeft,this.isAutoRight=""===this.nzRight||!0===this.nzRight,this.isFixedLeft=!1!==this.nzLeft,this.isFixedRight=!1!==this.nzRight,this.isFixed=this.isFixedLeft||this.isFixedRight;var t=function(t){return"string"==typeof t&&""!==t?t:null};this.setAutoLeftWidth(t(this.nzLeft)),this.setAutoRightWidth(t(this.nzRight)),this.changes$.next()},t.decorators=[{type:r.Directive,args:[{selector:"td[nzRight],th[nzRight],td[nzLeft],th[nzLeft]",host:{"[class.ant-table-cell-fix-right]":"isFixedRight","[class.ant-table-cell-fix-left]":"isFixedLeft","[class.ant-table-cell-fix-right-first]":"isFirstRight","[class.ant-table-cell-fix-left-last]":"isLastLeft","[style.position]":"isFixed? 'sticky' : null"}}]}],t.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:r.Renderer2},{type:r.ElementRef}]},t.propDecorators={nzRight:[{type:r.Input}],nzLeft:[{type:r.Input}],colspan:[{type:r.Input}]},t}();var N=function(){function t(){this.theadTemplate$=new m.ReplaySubject(1),this.hasFixLeft$=new m.ReplaySubject(1),this.hasFixRight$=new m.ReplaySubject(1),this.hostWidth$=new m.ReplaySubject(1),this.columnCount$=new m.ReplaySubject(1),this.showEmpty$=new m.ReplaySubject(1),this.noResult$=new m.ReplaySubject(1),this.listOfThWidthConfigPx$=new m.BehaviorSubject([]),this.tableWidthConfigPx$=new m.BehaviorSubject([]),this.manualWidthConfigPx$=m.combineLatest([this.tableWidthConfigPx$,this.listOfThWidthConfigPx$]).pipe(b.map((function(t){var e=$(t,2),n=e[0],i=e[1];return n.length?n:i}))),this.listOfAutoWidthPx$=new m.ReplaySubject(1),this.listOfListOfThWidthPx$=m.merge(this.manualWidthConfigPx$,m.combineLatest([this.listOfAutoWidthPx$,this.manualWidthConfigPx$]).pipe(b.map((function(t){var e=$(t,2),n=e[0],i=e[1];return n.length!==i.length?i:n})))),this.listOfMeasureColumn$=new m.ReplaySubject(1),this.listOfListOfThWidth$=this.listOfAutoWidthPx$.pipe(b.map((function(t){return t.map((function(t){return parseInt(t,10)}))}))),this.enableAutoMeasure$=new m.ReplaySubject(1)}return t.prototype.setTheadTemplate=function(t){this.theadTemplate$.next(t)},t.prototype.setHasFixLeft=function(t){this.hasFixLeft$.next(t)},t.prototype.setHasFixRight=function(t){this.hasFixRight$.next(t)},t.prototype.setTableWidthConfig=function(t){this.tableWidthConfigPx$.next(t)},t.prototype.setListOfTh=function(t){var e=0;t.forEach((function(t){e+=t.colspan||1}));var n=t.map((function(t){return t.nzWidth}));this.columnCount$.next(e),this.listOfThWidthConfigPx$.next(n)},t.prototype.setListOfMeasureColumn=function(t){var e=[];t.forEach((function(t){for(var n=t.colspan||1,i=0;i<n;i++)e.push("measure_key_"+i)})),this.listOfMeasureColumn$.next(e)},t.prototype.setListOfAutoWidth=function(t){this.listOfAutoWidthPx$.next(t.map((function(t){return t+"px"})))},t.prototype.setShowEmpty=function(t){this.showEmpty$.next(t)},t.prototype.setNoResult=function(t){this.noResult$.next(t)},t.prototype.setScroll=function(t,e){var n=!(!t&&!e);n||this.setListOfAutoWidth([]),this.enableAutoMeasure$.next(n)},t.decorators=[{type:r.Injectable}],t.ctorParameters=function(){return[]},t}();var L=function(){function t(t){this.isInsideTable=!1,this.isInsideTable=!!t}return t.decorators=[{type:r.Directive,args:[{selector:"th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])",host:{"[class.ant-table-cell]":"isInsideTable"}}]}],t.ctorParameters=function(){return[{type:N,decorators:[{type:r.Optional}]}]},t}();var B=function(){function t(){this.nzChecked=!1,this.nzDisabled=!1,this.nzIndeterminate=!1,this.nzIndentSize=0,this.nzShowExpand=!1,this.nzShowCheckbox=!1,this.nzExpand=!1,this.nzCheckedChange=new r.EventEmitter,this.nzExpandChange=new r.EventEmitter,this.isNzShowExpandChanged=!1,this.isNzShowCheckboxChanged=!1}return t.prototype.onCheckedChange=function(t){this.nzChecked=t,this.nzCheckedChange.emit(t)},t.prototype.onExpandChange=function(t){this.nzExpand=t,this.nzExpandChange.emit(t)},t.prototype.ngOnChanges=function(t){var e=function(t){return t&&t.firstChange&&void 0!==t.currentValue},n=t.nzExpand,i=t.nzChecked,r=t.nzShowExpand,o=t.nzShowCheckbox;r&&(this.isNzShowExpandChanged=!0),o&&(this.isNzShowCheckboxChanged=!0),e(n)&&!this.isNzShowExpandChanged&&(this.nzShowExpand=!0),e(i)&&!this.isNzShowCheckboxChanged&&(this.nzShowCheckbox=!0)},t.decorators=[{type:r.Component,args:[{selector:"td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]",changeDetection:r.ChangeDetectionStrategy.OnPush,preserveWhitespaces:!1,encapsulation:r.ViewEncapsulation.None,template:'\n <ng-container *ngIf="nzShowExpand || nzIndentSize > 0">\n <nz-row-indent [indentSize]="nzIndentSize"></nz-row-indent>\n <button nz-row-expand-button [expand]="nzExpand" (expandChange)="onExpandChange($event)" [spaceMode]="!nzShowExpand"></button>\n </ng-container>\n <label\n nz-checkbox\n *ngIf="nzShowCheckbox"\n [nzDisabled]="nzDisabled"\n [ngModel]="nzChecked"\n [nzIndeterminate]="nzIndeterminate"\n (ngModelChange)="onCheckedChange($event)"\n >\n </label>\n <ng-content></ng-content>\n ',host:{"[class.ant-table-cell-with-append]":"nzShowExpand || nzIndentSize > 0","[class.ant-table-selection-column]":"nzShowCheckbox"}}]}],t.propDecorators={nzChecked:[{type:r.Input}],nzDisabled:[{type:r.Input}],nzIndeterminate:[{type:r.Input}],nzIndentSize:[{type:r.Input}],nzShowExpand:[{type:r.Input}],nzShowCheckbox:[{type:r.Input}],nzExpand:[{type:r.Input}],nzCheckedChange:[{type:r.Output}],nzExpandChange:[{type:r.Output}]},w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzShowExpand",void 0),w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzShowCheckbox",void 0),w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzExpand",void 0),t}();var V=function(){function t(t){this.cdr=t,this.manualClickOrder$=new m.Subject,this.calcOperatorChange$=new m.Subject,this.nzFilterValue=null,this.sortOrder=null,this.sortDirections=["ascend","descend",null],this.sortOrderChange$=new m.Subject,this.destroy$=new m.Subject,this.isNzShowSortChanged=!1,this.isNzShowFilterChanged=!1,this.nzFilterMultiple=!0,this.nzSortOrder=null,this.nzSortPriority=!1,this.nzSortDirections=["ascend","descend",null],this.nzFilters=[],this.nzSortFn=null,this.nzFilterFn=null,this.nzShowSort=!1,this.nzShowFilter=!1,this.nzCustomFilter=!1,this.nzCheckedChange=new r.EventEmitter,this.nzSortOrderChange=new r.EventEmitter,this.nzFilterChange=new r.EventEmitter,this.nzSort=null,this.nzSortChange=new r.EventEmitter}return t.prototype.getNextSortDirection=function(t,e){var n=t.indexOf(e);return n===t.length-1?t[0]:t[n+1]},t.prototype.emitNextSortValue=function(){if(this.nzShowSort){var t=this.getNextSortDirection(this.sortDirections,this.sortOrder);this.setSortOrder(t),this.manualClickOrder$.next(this)}},t.prototype.setSortOrder=function(t){this.sortOrderChange$.next(t)},t.prototype.clearSortOrder=function(){null!==this.sortOrder&&this.setSortOrder(null)},t.prototype.onFilterValueChange=function(t){this.nzFilterChange.emit(t),this.nzFilterValue=t,this.updateCalcOperator()},t.prototype.updateCalcOperator=function(){this.calcOperatorChange$.next()},t.prototype.ngOnInit=function(){var t=this;this.sortOrderChange$.pipe(b.takeUntil(this.destroy$)).subscribe((function(e){t.sortOrder!==e&&(t.sortOrder=e,t.nzSortChange.emit(e),t.nzSortOrderChange.emit(e)),t.updateCalcOperator(),t.cdr.markForCheck()}))},t.prototype.ngOnChanges=function(t){var e=t.nzSortKey,n=t.nzSort,i=t.nzSortDirections,r=t.nzFilters,o=t.nzSortOrder,a=t.nzSortFn,s=t.nzFilterFn,l=t.nzSortPriority,c=t.nzFilterMultiple,p=t.nzShowSort,h=t.nzShowFilter;i&&this.nzSortDirections&&this.nzSortDirections.length&&(this.sortDirections=this.nzSortDirections),n&&(this.sortOrder=this.nzSort,this.setSortOrder(this.nzSort),C.warnDeprecation("'nzSort' and 'nzSortChange' is deprecated and will be removed in 10.0.0. Please use 'nzSortOrder' and 'nzSortOrderChange' instead.")),e&&(this.nzColumnKey=this.nzSortKey,C.warnDeprecation("'nzSortKey' is deprecated and will be removed in 10.0.0. Please use 'nzColumnKey' instead.")),o&&(this.sortOrder=this.nzSortOrder,this.setSortOrder(this.nzSortOrder)),p&&(this.isNzShowSortChanged=!0),h&&(this.isNzShowFilterChanged=!0);var u=function(t){return t&&t.firstChange&&void 0!==t.currentValue};if((u(e)||u(n)||u(o)||u(a))&&!this.isNzShowSortChanged&&(this.nzShowSort=!0),u(r)&&!this.isNzShowFilterChanged&&(this.nzShowFilter=!0),(r||c)&&this.nzShowFilter){var d=this.nzFilters.filter((function(t){return t.byDefault})).map((function(t){return t.value}));this.nzFilterValue=this.nzFilterMultiple?d:d[0]||null}(a||s||l||r)&&this.updateCalcOperator()},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.decorators=[{type:r.Component,args:[{selector:"th[nzSortKey], th[nzColumnKey], th[nzSort], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]",preserveWhitespaces:!1,encapsulation:r.ViewEncapsulation.None,changeDetection:r.ChangeDetectionStrategy.OnPush,template:'\n <nz-table-filter\n *ngIf="nzShowFilter || nzCustomFilter; else notFilterTemplate"\n [contentTemplate]="notFilterTemplate"\n [extraTemplate]="extraTemplate"\n [customFilter]="nzCustomFilter"\n [filterMultiple]="nzFilterMultiple"\n [listOfFilter]="nzFilters"\n (filterChange)="onFilterValueChange($event)"\n ></nz-table-filter>\n <ng-template #notFilterTemplate>\n <ng-template [ngTemplateOutlet]="nzShowSort ? sortTemplate : contentTemplate"></ng-template>\n </ng-template>\n <ng-template #extraTemplate>\n <ng-content select="[nz-th-extra]"></ng-content>\n <ng-content select="nz-filter-trigger"></ng-content>\n </ng-template>\n <ng-template #sortTemplate>\n <nz-table-sorters [sortOrder]="sortOrder" [sortDirections]="sortDirections" [contentTemplate]="contentTemplate"></nz-table-sorters>\n </ng-template>\n <ng-template #contentTemplate>\n <ng-content></ng-content>\n </ng-template>\n ',host:{"[class.ant-table-column-has-sorters]":"nzShowSort","[class.ant-table-column-sort]":"sortOrder === 'descend' || sortOrder === 'ascend'","(click)":"emitNextSortValue()"}}]}],t.ctorParameters=function(){return[{type:r.ChangeDetectorRef}]},t.propDecorators={nzColumnKey:[{type:r.Input}],nzFilterMultiple:[{type:r.Input}],nzSortOrder:[{type:r.Input}],nzSortPriority:[{type:r.Input}],nzSortDirections:[{type:r.Input}],nzFilters:[{type:r.Input}],nzSortFn:[{type:r.Input}],nzFilterFn:[{type:r.Input}],nzShowSort:[{type:r.Input}],nzShowFilter:[{type:r.Input}],nzCustomFilter:[{type:r.Input}],nzCheckedChange:[{type:r.Output}],nzSortOrderChange:[{type:r.Output}],nzFilterChange:[{type:r.Output}],nzSortKey:[{type:r.Input}],nzSort:[{type:r.Input}],nzSortChange:[{type:r.Output}]},w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzShowSort",void 0),w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzShowFilter",void 0),w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzCustomFilter",void 0),t}();var j=function(){function t(){this.changes$=new m.Subject,this.nzWidth=null,this.colspan=null}return t.prototype.ngOnChanges=function(t){var e=t.nzWidth,n=t.colspan;(e||n)&&this.changes$.next()},t.decorators=[{type:r.Directive,args:[{selector:"th"}]}],t.propDecorators={nzWidth:[{type:r.Input}],colspan:[{type:r.Input}]},t}();var A=function(){function t(){this.nzSelections=[],this.nzChecked=!1,this.nzDisabled=!1,this.nzIndeterminate=!1,this.nzShowCheckbox=!1,this.nzShowRowSelection=!1,this.nzCheckedChange=new r.EventEmitter,this.nzSortChangeWithKey=new r.EventEmitter}return t.prototype.onCheckedChange=function(t){this.nzChecked=t,this.nzCheckedChange.emit(t)},t.prototype.ngOnChanges=function(t){var e=t.nzChecked,n=t.nzSelections;e&&e.firstChange&&(this.nzShowCheckbox=!0),n&&n.firstChange&&(this.nzShowRowSelection=!0)},t.decorators=[{type:r.Component,args:[{selector:"th[nzSelections],th[nzChecked],th[nzShowCheckbox],th[nzShowRowSelection]",preserveWhitespaces:!1,encapsulation:r.ViewEncapsulation.None,changeDetection:r.ChangeDetectionStrategy.OnPush,template:'\n <nz-table-selection\n [checked]="nzChecked"\n [disabled]="nzDisabled"\n [indeterminate]="nzIndeterminate"\n [listOfSelections]="nzSelections"\n [showCheckbox]="nzShowCheckbox"\n [showRowSelection]="nzShowRowSelection"\n (checkedChange)="onCheckedChange($event)"\n ></nz-table-selection>\n <ng-content></ng-content>\n ',host:{"[class.ant-table-selection-column]":"true"}}]}],t.propDecorators={nzSelections:[{type:r.Input}],nzChecked:[{type:r.Input}],nzDisabled:[{type:r.Input}],nzIndeterminate:[{type:r.Input}],nzShowCheckbox:[{type:r.Input}],nzShowRowSelection:[{type:r.Input}],nzCheckedChange:[{type:r.Output}],nzSortChangeWithKey:[{type:r.Output}]},w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzShowCheckbox",void 0),w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzShowRowSelection",void 0),t}();var U=function(){function t(){this.nzAlign=null}return t.decorators=[{type:r.Directive,args:[{selector:"th[nzAlign],td[nzAlign]",host:{"[style.text-align]":"nzAlign"}}]}],t.propDecorators={nzAlign:[{type:r.Input}]},t}();var q=function(){function t(){this.nzEllipsis=!0}return t.decorators=[{type:r.Directive,args:[{selector:"th[nzEllipsis],td[nzEllipsis]",host:{"[class.ant-table-cell-ellipsis]":"nzEllipsis"}}]}],t.propDecorators={nzEllipsis:[{type:r.Input}]},w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzEllipsis",void 0),t}();var X=function(){function t(){this.nzBreakWord=!0}return t.decorators=[{type:r.Directive,args:[{selector:"th[nzBreakWord],td[nzBreakWord]",host:{"[style.word-break]":"nzBreakWord ? 'break-all' : ''"}}]}],t.propDecorators={nzBreakWord:[{type:r.Input}]},w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzBreakWord",void 0),t}();var Y=function(){function t(){this.tableLayout="auto",this.theadTemplate=null,this.contentTemplate=null,this.listOfColWidth=[],this.scrollX=null}return t.decorators=[{type:r.Component,args:[{selector:"table[nz-table-content]",changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,template:'\n <col [style.width]="width" [style.minWidth]="width" *ngFor="let width of listOfColWidth" />\n <thead class="ant-table-thead" *ngIf="theadTemplate">\n <ng-template [ngTemplateOutlet]="theadTemplate"></ng-template>\n </thead>\n <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>\n <ng-content></ng-content>\n ',host:{"[style.table-layout]":"tableLayout","[class.ant-table-fixed]":"scrollX","[style.width]":"scrollX","[style.min-width]":"scrollX ? '100%': null"}}]}],t.propDecorators={tableLayout:[{type:r.Input}],theadTemplate:[{type:r.Input}],contentTemplate:[{type:r.Input}],listOfColWidth:[{type:r.Input}],scrollX:[{type:r.Input}]},t}();var H=function(){function t(t,e){this.nzTableStyleService=t,this.renderer=e,this.hostWidth$=new m.BehaviorSubject(null),this.enableAutoMeasure$=new m.BehaviorSubject(!1),this.destroy$=new m.Subject}return t.prototype.ngOnInit=function(){if(this.nzTableStyleService){var t=this.nzTableStyleService,e=t.enableAutoMeasure$,n=t.hostWidth$;e.subscribe(this.enableAutoMeasure$),n.subscribe(this.hostWidth$)}},t.prototype.ngAfterViewInit=function(){var t=this;this.nzTableStyleService.columnCount$.pipe(b.takeUntil(this.destroy$)).subscribe((function(e){t.renderer.setAttribute(t.tdElement.nativeElement,"colspan",""+e)}))},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.decorators=[{type:r.Component,args:[{selector:"tr[nz-table-fixed-row], tr[nzExpand]",changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,template:'\n <td class="nz-disable-td ant-table-cell" #tdElement>\n <div\n class="ant-table-expanded-row-fixed"\n *ngIf="enableAutoMeasure$ | async; else contentTemplate"\n style="position: sticky; left: 0px; overflow: hidden;"\n [style.width.px]="hostWidth$ | async"\n >\n <ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>\n </div>\n </td>\n <ng-template #contentTemplate><ng-content></ng-content></ng-template>\n '}]}],t.ctorParameters=function(){return[{type:N},{type:r.Renderer2}]},t.propDecorators={tdElement:[{type:r.ViewChild,args:["tdElement"]}]},t}();var K=function(){function t(){this.tableLayout="auto",this.listOfColWidth=[],this.theadTemplate=null,this.contentTemplate=null}return t.decorators=[{type:r.Component,args:[{selector:"nz-table-inner-default",changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,template:'\n <div class="ant-table-content">\n <table\n nz-table-content\n [contentTemplate]="contentTemplate"\n [tableLayout]="tableLayout"\n [listOfColWidth]="listOfColWidth"\n [theadTemplate]="theadTemplate"\n ></table>\n </div>\n ',host:{"[class.ant-table-container]":"true"}}]}],t.propDecorators={tableLayout:[{type:r.Input}],listOfColWidth:[{type:r.Input}],theadTemplate:[{type:r.Input}],contentTemplate:[{type:r.Input}]},t}();var Q=function(){function t(t,e,n,i){this.renderer=t,this.ngZone=e,this.platform=n,this.resizeService=i,this.data=[],this.scrollX=null,this.scrollY=null,this.contentTemplate=null,this.widthConfig=[],this.listOfColWidth=[],this.theadTemplate=null,this.virtualTemplate=null,this.virtualItemSize=0,this.virtualMaxBufferPx=200,this.virtualMinBufferPx=100,this.virtualForTrackBy=function(t){return t},this.headerStyleMap={},this.bodyStyleMap={},this.verticalScrollBarWidth=0,this.noDateVirtualHeight="182px",this.data$=new m.Subject,this.scroll$=new m.Subject,this.destroy$=new m.Subject}return t.prototype.setScrollPositionClassName=function(t){void 0===t&&(t=!1);var e=this.tableBodyElement.nativeElement,n=e.scrollWidth,i=e.scrollLeft,r=e.clientWidth;n===r&&0!==n||t?(this.renderer.removeClass(this.tableMainElement,"ant-table-ping-left"),this.renderer.removeClass(this.tableMainElement,"ant-table-ping-right")):0===i?(this.renderer.removeClass(this.tableMainElement,"ant-table-ping-left"),this.renderer.addClass(this.tableMainElement,"ant-table-ping-right")):n===i+r?(this.renderer.removeClass(this.tableMainElement,"ant-table-ping-right"),this.renderer.addClass(this.tableMainElement,"ant-table-ping-left")):(this.renderer.addClass(this.tableMainElement,"ant-table-ping-left"),this.renderer.addClass(this.tableMainElement,"ant-table-ping-right"))},t.prototype.ngOnChanges=function(t){var e=t.scrollX,n=t.scrollY,i=t.data;if(e||n){var r=0!==this.verticalScrollBarWidth;this.headerStyleMap={overflowX:"hidden",overflowY:this.scrollY&&r?"scroll":"hidden"},this.bodyStyleMap={overflowY:this.scrollY?"scroll":null,overflowX:this.scrollX?"scroll":null,maxHeight:this.scrollY},this.scroll$.next()}i&&this.data$.next()},t.prototype.ngAfterViewInit=function(){var t=this;this.platform.isBrowser&&this.ngZone.runOutsideAngular((function(){var e=m.fromEvent(t.tableBodyElement.nativeElement,"scroll").pipe(b.takeUntil(t.destroy$)),n=e.pipe(b.filter((function(){return!!t.scrollX}))),i=e.pipe(b.filter((function(){return!!t.scrollY}))),r=t.resizeService.subscribe().pipe(b.takeUntil(t.destroy$)),o=t.data$.pipe(b.takeUntil(t.destroy$));m.merge(n,r,o,t.scroll$).pipe(b.startWith(!0),b.delay(0)).subscribe((function(){return t.setScrollPositionClassName()})),i.subscribe((function(){return t.tableHeaderElement.nativeElement.scrollLeft=t.tableBodyElement.nativeElement.scrollLeft}))}))},t.prototype.ngOnDestroy=function(){this.setScrollPositionClassName(!0),this.destroy$.next(),this.destroy$.complete()},t.decorators=[{type:r.Component,args:[{selector:"nz-table-inner-scroll",changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,template:'\n <div class="ant-table-content">\n <div *ngIf="scrollY" #tableHeaderElement [ngStyle]="headerStyleMap" class="ant-table-header nz-table-hide-scrollbar">\n <table\n nz-table-content\n tableLayout="fixed"\n [scrollX]="scrollX"\n [listOfColWidth]="listOfColWidth"\n [theadTemplate]="theadTemplate"\n ></table>\n </div>\n <div #tableBodyElement *ngIf="!virtualTemplate" class="ant-table-body" [ngStyle]="bodyStyleMap">\n <table\n nz-table-content\n [scrollX]="scrollX"\n tableLayout="fixed"\n [listOfColWidth]="listOfColWidth"\n [theadTemplate]="scrollY ? null : theadTemplate"\n [contentTemplate]="contentTemplate"\n ></table>\n </div>\n <cdk-virtual-scroll-viewport\n #tableBodyElement\n *ngIf="virtualTemplate"\n [itemSize]="virtualItemSize"\n [maxBufferPx]="virtualMaxBufferPx"\n [minBufferPx]="virtualMinBufferPx"\n [style.height]="data.length ? scrollY : noDateVirtualHeight"\n >\n <table nz-table-content tableLayout="fixed" [scrollX]="scrollX" [listOfColWidth]="listOfColWidth">\n <tbody>\n <ng-container *cdkVirtualFor="let item of data; let i = index; trackBy: virtualForTrackBy">\n <ng-template [ngTemplateOutlet]="virtualTemplate" [ngTemplateOutletContext]="{ $implicit: item, index: i }"></ng-template>\n </ng-container>\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n </div>\n ',host:{"[class.ant-table-container]":"true"}}]}],t.ctorParameters=function(){return[{type:r.Renderer2},{type:r.NgZone},{type:e.Platform},{type:v.NzResizeService}]},t.propDecorators={data:[{type:r.Input}],scrollX:[{type:r.Input}],scrollY:[{type:r.Input}],contentTemplate:[{type:r.Input}],widthConfig:[{type:r.Input}],listOfColWidth:[{type:r.Input}],theadTemplate:[{type:r.Input}],virtualTemplate:[{type:r.Input}],virtualItemSize:[{type:r.Input}],virtualMaxBufferPx:[{type:r.Input}],virtualMinBufferPx:[{type:r.Input}],tableMainElement:[{type:r.Input}],virtualForTrackBy:[{type:r.Input}],tableHeaderElement:[{type:r.ViewChild,args:["tableHeaderElement",{read:r.ElementRef}]}],tableBodyElement:[{type:r.ViewChild,args:["tableBodyElement",{read:r.ElementRef}]}],cdkVirtualScrollViewport:[{type:r.ViewChild,args:[n.CdkVirtualScrollViewport,{read:n.CdkVirtualScrollViewport}]}],verticalScrollBarWidth:[{type:r.Input}]},t}();var Z=function(){function t(t){this.templateRef=t}return t.decorators=[{type:r.Directive,args:[{selector:"[nz-virtual-scroll]",exportAs:"nzVirtualScroll"}]}],t.ctorParameters=function(){return[{type:r.TemplateRef}]},t}();var J=function(){function t(){var t=this;this.destroy$=new m.Subject,this.pageIndex$=new m.BehaviorSubject(1),this.frontPagination$=new m.BehaviorSubject(!0),this.pageSize$=new m.BehaviorSubject(10),this.listOfData$=new m.BehaviorSubject([]),this.pageIndexDistinct$=this.pageIndex$.pipe(b.distinctUntilChanged()),this.pageSizeDistinct$=this.pageSize$.pipe(b.distinctUntilChanged()),this.listOfCalcOperator$=new m.BehaviorSubject([]),this.queryParams$=m.combineLatest([this.pageIndexDistinct$,this.pageSizeDistinct$,this.listOfCalcOperator$]).pipe(b.debounceTime(0),b.skip(1),b.map((function(t){var e=$(t,3),n=e[0],i=e[1],r=e[2];return{pageIndex:n,pageSize:i,sort:r.filter((function(t){return t.sortFn})).map((function(t){return{key:t.key,value:t.sortOrder}})),filter:r.filter((function(t){return t.filterFn})).map((function(t){return{key:t.key,value:t.filterValue}}))}}))),this.listOfDataAfterCalc$=m.combineLatest([this.listOfData$,this.listOfCalcOperator$]).pipe(b.map((function(t){var e,n,i=$(t,2),r=i[0],o=i[1],a=k(r),s=o.filter((function(t){var e=t.filterValue,n=t.filterFn;return!(null==e||Array.isArray(e)&&0===e.length)&&"function"==typeof n})),l=function(t){var e=t.filterFn,n=t.filterValue;a=a.filter((function(t){return e(n,t)}))};try{for(var c=T(s),p=c.next();!p.done;p=c.next()){l(p.value)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}var h=o.filter((function(t){return null!==t.sortOrder&&"function"==typeof t.sortFn})).sort((function(t,e){return+e.sortPriority-+t.sortPriority}));return a.sort((function(t,e){var n,i;try{for(var r=T(h),o=r.next();!o.done;o=r.next()){var a=o.value,s=a.sortFn,l=a.sortOrder;if(s&&l){var c=s(t,e,l);if(0!==c)return"ascend"===l?c:-c}}}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return 0})),a}))),this.listOfFrontEndCurrentPageData$=m.combineLatest([this.pageIndexDistinct$,this.pageSizeDistinct$,this.listOfDataAfterCalc$]).pipe(b.takeUntil(this.destroy$),b.filter((function(t){var e=$(t,3),n=e[0],i=e[1],r=e[2];return n<=(Math.ceil(r.length/i)||1)})),b.map((function(t){var e=$(t,3),n=e[0],i=e[1];return e[2].slice((n-1)*i,n*i)}))),this.listOfCurrentPageData$=this.frontPagination$.pipe(b.switchMap((function(e){return e?t.listOfFrontEndCurrentPageData$:t.listOfData$}))),this.total$=this.frontPagination$.pipe(b.switchMap((function(e){return e?t.listOfDataAfterCalc$:t.listOfData$})),b.map((function(t){return t.length})),b.distinctUntilChanged())}return t.prototype.updatePageSize=function(t){this.pageSize$.next(t)},t.prototype.updateFrontPagination=function(t){this.frontPagination$.next(t)},t.prototype.updatePageIndex=function(t){this.pageIndex$.next(t)},t.prototype.updateListOfData=function(t){this.listOfData$.next(t)},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.decorators=[{type:r.Injectable}],t.ctorParameters=function(){return[]},t}();var _=function(){function t(t,e,n,i,o,a){var s=this;this.elementRef=t,this.nzResizeObserver=e,this.nzConfigService=n,this.cdr=i,this.nzTableStyleService=o,this.nzTableDataService=a,this.nzTableLayout="auto",this.nzShowTotal=null,this.nzItemRender=null,this.nzLoadingIndicator=null,this.nzTitle=null,this.nzFooter=null,this.nzNoResult=void 0,this.nzPageSizeOptions=[10,20,30,40,50],this.nzVirtualItemSize=0,this.nzVirtualMaxBufferPx=200,this.nzVirtualMinBufferPx=100,this.nzVirtualForTrackBy=function(t){return t},this.nzLoadingDelay=0,this.nzPageIndex=1,this.nzPageSize=10,this.nzTotal=0,this.nzWidthConfig=[],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 r.EventEmitter,this.nzPageIndexChange=new r.EventEmitter,this.nzQueryParams=new r.EventEmitter,this.nzCurrentPageDataChange=new r.EventEmitter,this.data=[],this.scrollX=null,this.scrollY=null,this.theadTemplate=null,this.listOfColWidth=[],this.hasFixLeft=!1,this.hasFixRight=!1,this.destroy$=new m.Subject,this.loading$=new m.BehaviorSubject(!1),this.templateMode$=new m.BehaviorSubject(!1),this.verticalScrollBarWidth=0,this.nzConfigService.getConfigChangeEventForComponent("table").pipe(b.takeUntil(this.destroy$)).subscribe((function(){s.cdr.markForCheck()}))}return t.prototype.onPageSizeChange=function(t){this.nzTableDataService.updatePageSize(t)},t.prototype.onPageIndexChange=function(t){this.nzTableDataService.updatePageIndex(t)},t.prototype.ngOnInit=function(){var t=this,e=this.nzTableDataService,n=e.pageIndexDistinct$,i=e.pageSizeDistinct$,r=e.listOfCurrentPageData$,o=e.total$,a=e.queryParams$,s=this.nzTableStyleService,l=s.theadTemplate$,c=s.hasFixLeft$,p=s.hasFixRight$;a.pipe(b.takeUntil(this.destroy$)).subscribe(this.nzQueryParams),n.pipe(b.takeUntil(this.destroy$)).subscribe((function(e){e!==t.nzPageIndex&&(t.nzPageIndex=e,t.nzPageIndexChange.next(e))})),i.pipe(b.takeUntil(this.destroy$)).subscribe((function(e){e!==t.nzPageSize&&(t.nzPageSize=e,t.nzPageSizeChange.next(e))})),o.pipe(b.takeUntil(this.destroy$),b.filter((function(){return t.nzFrontPagination}))).subscribe((function(e){e!==t.nzTotal&&(t.nzTotal=e,t.cdr.markForCheck())})),r.pipe(b.takeUntil(this.destroy$)).subscribe((function(e){t.data=e,t.nzCurrentPageDataChange.next(e),t.cdr.markForCheck()})),l.pipe(b.takeUntil(this.destroy$)).subscribe((function(e){t.theadTemplate=e,t.cdr.markForCheck()})),c.pipe(b.takeUntil(this.destroy$)).subscribe((function(e){t.hasFixLeft=e,t.cdr.markForCheck()})),p.pipe(b.takeUntil(this.destroy$)).subscribe((function(e){t.hasFixRight=e,t.cdr.markForCheck()})),m.combineLatest([o,this.loading$,this.templateMode$]).pipe(b.map((function(t){var e=$(t,3),n=e[0],i=e[1],r=e[2];return 0===n&&!i&&!r})),b.takeUntil(this.destroy$)).subscribe((function(e){t.nzTableStyleService.setShowEmpty(e)})),this.verticalScrollBarWidth=S.measureScrollbar("vertical"),this.nzTableStyleService.listOfListOfThWidthPx$.pipe(b.takeUntil(this.destroy$)).subscribe((function(e){t.listOfColWidth=e,t.cdr.markForCheck()}))},t.prototype.ngOnChanges=function(t){var e=t.nzScroll,n=t.nzPageIndex,i=t.nzPageSize,r=t.nzFrontPagination,o=t.nzData,a=t.nzWidthConfig,s=t.nzNoResult,l=t.nzLoading,c=t.nzTemplateMode;n&&this.nzTableDataService.updatePageIndex(this.nzPageIndex),i&&this.nzTableDataService.updatePageSize(this.nzPageSize),o&&(this.nzData=this.nzData||[],this.nzTableDataService.updateListOfData(this.nzData)),r&&this.nzTableDataService.updateFrontPagination(this.nzFrontPagination),e&&(this.scrollX=this.nzScroll&&this.nzScroll.x||null,this.scrollY=this.nzScroll&&this.nzScroll.y||null,this.nzTableStyleService.setScroll(this.scrollX,this.scrollY)),a&&this.nzTableStyleService.setTableWidthConfig(this.nzWidthConfig),l&&this.loading$.next(this.nzLoading),c&&this.templateMode$.next(this.nzTemplateMode),s&&this.nzTableStyleService.setNoResult(this.nzNoResult)},t.prototype.ngAfterViewInit=function(){var t=this;this.nzResizeObserver.observe(this.elementRef).pipe(b.map((function(e){var n=$(e,1)[0].target.getBoundingClientRect().width,i=t.scrollY?t.verticalScrollBarWidth:0;return Math.floor(n-i)})),b.takeUntil(this.destroy$)).subscribe(this.nzTableStyleService.hostWidth$),this.nzTableInnerScrollComponent&&this.nzTableInnerScrollComponent.cdkVirtualScrollViewport&&(this.cdkVirtualScrollViewport=this.nzTableInnerScrollComponent.cdkVirtualScrollViewport)},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.decorators=[{type:r.Component,args:[{selector:"nz-table",exportAs:"nzTable",providers:[N,J],preserveWhitespaces:!1,changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,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\n #tableMainElement\n class="ant-table"\n [class.ant-table-fixed-header]="nzData.length && scrollY"\n [class.ant-table-fixed-column]="scrollX"\n [class.ant-table-has-fix-left]="hasFixLeft"\n [class.ant-table-has-fix-right]="hasFixRight"\n [class.ant-table-bordered]="nzBordered"\n [class.ant-table-middle]="nzSize === \'middle\'"\n [class.ant-table-small]="nzSize === \'small\'"\n >\n <nz-table-title-footer [title]="nzTitle" *ngIf="nzTitle"></nz-table-title-footer>\n <nz-table-inner-scroll\n *ngIf="scrollY || scrollX; else defaultTemplate"\n [data]="data"\n [scrollX]="scrollX"\n [scrollY]="scrollY"\n [contentTemplate]="contentTemplate"\n [listOfColWidth]="listOfColWidth"\n [theadTemplate]="theadTemplate"\n [verticalScrollBarWidth]="verticalScrollBarWidth"\n [virtualTemplate]="nzVirtualScrollDirective?.templateRef"\n [virtualItemSize]="nzVirtualItemSize"\n [virtualMaxBufferPx]="nzVirtualMaxBufferPx"\n [virtualMinBufferPx]="nzVirtualMinBufferPx"\n [tableMainElement]="tableMainElement"\n [virtualForTrackBy]="nzVirtualForTrackBy"\n ></nz-table-inner-scroll>\n <ng-template #defaultTemplate>\n <nz-table-inner-default\n [tableLayout]="nzTableLayout"\n [listOfColWidth]="listOfColWidth"\n [theadTemplate]="theadTemplate"\n [contentTemplate]="contentTemplate"\n ></nz-table-inner-default>\n </ng-template>\n <nz-table-title-footer [footer]="nzFooter" *ngIf="nzFooter"></nz-table-title-footer>\n </div>\n <ng-container *ngIf="nzPaginationPosition === \'both\' || nzPaginationPosition === \'bottom\'">\n <ng-template [ngTemplateOutlet]="paginationTemplate"></ng-template>\n </ng-container>\n </nz-spin>\n <ng-template #paginationTemplate>\n <nz-pagination\n *ngIf="nzShowPagination && data.length"\n class="ant-table-pagination ant-table-pagination-right"\n [nzShowSizeChanger]="nzShowSizeChanger"\n [nzPageSizeOptions]="nzPageSizeOptions"\n [nzItemRender]="nzItemRender"\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)="onPageSizeChange($event)"\n (nzPageIndexChange)="onPageIndexChange($event)"\n >\n </nz-pagination>\n </ng-template>\n <ng-template #contentTemplate><ng-content></ng-content></ng-template>\n ',host:{"[class.ant-table-wrapper]":"true"}}]}],t.ctorParameters=function(){return[{type:r.ElementRef},{type:c.NzResizeObserver},{type:O.NzConfigService},{type:r.ChangeDetectorRef},{type:N},{type:J}]},t.propDecorators={nzTableLayout:[{type:r.Input}],nzShowTotal:[{type:r.Input}],nzItemRender:[{type:r.Input}],nzLoadingIndicator:[{type:r.Input}],nzTitle:[{type:r.Input}],nzFooter:[{type:r.Input}],nzNoResult:[{type:r.Input}],nzPageSizeOptions:[{type:r.Input}],nzVirtualItemSize:[{type:r.Input}],nzVirtualMaxBufferPx:[{type:r.Input}],nzVirtualMinBufferPx:[{type:r.Input}],nzVirtualForTrackBy:[{type:r.Input}],nzLoadingDelay:[{type:r.Input}],nzPageIndex:[{type:r.Input}],nzPageSize:[{type:r.Input}],nzTotal:[{type:r.Input}],nzWidthConfig:[{type:r.Input}],nzData:[{type:r.Input}],nzPaginationPosition:[{type:r.Input}],nzScroll:[{type:r.Input}],nzFrontPagination:[{type:r.Input}],nzTemplateMode:[{type:r.Input}],nzShowPagination:[{type:r.Input}],nzLoading:[{type:r.Input}],nzBordered:[{type:r.Input}],nzSize:[{type:r.Input}],nzShowSizeChanger:[{type:r.Input}],nzHideOnSinglePage:[{type:r.Input}],nzShowQuickJumper:[{type:r.Input}],nzSimple:[{type:r.Input}],nzPageSizeChange:[{type:r.Output}],nzPageIndexChange:[{type:r.Output}],nzQueryParams:[{type:r.Output}],nzCurrentPageDataChange:[{type:r.Output}],nzVirtualScrollDirective:[{type:r.ContentChild,args:[Z,{static:!1}]}],nzTableInnerScrollComponent:[{type:r.ViewChild,args:[Q]}]},w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzFrontPagination",void 0),w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzTemplateMode",void 0),w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzShowPagination",void 0),w([S.InputBoolean(),I("design:type",Object)],t.prototype,"nzLoading",void 0),w([O.WithConfig("table",!1),S.InputBoolean(),I("design:type",Boolean)],t.prototype,"nzBordered",void 0),w([O.WithConfig("table","default"),I("design:type",String)],t.prototype,"nzSize",void 0),w([O.WithConfig("table",!1),S.InputBoolean(),I("design:type",Boolean)],t.prototype,"nzShowSizeChanger",void 0),w([O.WithConfig("table",!1),S.InputBoolean(),I("design:type",Boolean)],t.prototype,"nzHideO