UNPKG

ng-zorro-antd

Version:

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

1 lines 64.3 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/cdk/bidi"),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("ng-zorro-antd/core/util"),require("rxjs"),require("rxjs/operators"),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/bidi","@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","ng-zorro-antd/core/util","rxjs","rxjs/operators","ng-zorro-antd/core/services","ng-zorro-antd/core/config"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self)["ng-zorro-antd"]=t["ng-zorro-antd"]||{},t["ng-zorro-antd"].table={}),t.ng.cdk.bidi,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["ng-zorro-antd"].core.util,t.rxjs,t.rxjs.operators,t["ng-zorro-antd"].core.services,t["ng-zorro-antd"].core.config)}(this,(function(t,e,n,i,o,r,a,s,l,c,h,p,u,d,f,g,z,m,y,b,S,C,v,O){"use strict";var x=function(){function t(t,e){this.cdr=t,this.elementRef=e,this.nzActive=!1,this.nzVisible=!1,this.nzHasBackdrop=!1,this.nzVisibleChange=new r.EventEmitter,this.elementRef.nativeElement.classList.add("ant-table-filter-trigger-container")}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}();x.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 [nzHasBackdrop]="nzHasBackdrop"\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-open]":"nzVisible"}}]}],x.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:r.ElementRef}]},x.propDecorators={nzActive:[{type:r.Input}],nzDropdownMenu:[{type:r.Input}],nzVisible:[{type:r.Input}],nzHasBackdrop:[{type:r.Input}],nzVisibleChange:[{type:r.Output}]};var w=function(){function t(t,e,n){this.cdr=t,this.i18n=e,this.elementRef=n,this.contentTemplate=null,this.customFilter=!1,this.extraTemplate=null,this.filterMultiple=!0,this.listOfFilter=[],this.filterChange=new r.EventEmitter,this.destroy$=new S.Subject,this.isChecked=!1,this.isVisible=!1,this.listOfParsedFilter=[],this.listOfChecked=[],this.elementRef.nativeElement.classList.add("ant-table-filter-column")}return t.prototype.trackByValue=function(t,e){return e.value},t.prototype.check=function(t){this.filterMultiple?(this.listOfParsedFilter=this.listOfParsedFilter.map((function(e){return e===t?Object.assign(Object.assign({},e),{checked:!t.checked}):e})),t.checked=!t.checked):this.listOfParsedFilter=this.listOfParsedFilter.map((function(e){return Object.assign(Object.assign({},e),{checked:e===t})})),this.isChecked=this.getCheckedStatus(this.listOfParsedFilter)},t.prototype.confirm=function(){this.isVisible=!1,this.emitFilterData()},t.prototype.reset=function(){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.listOfChecked=this.listOfParsedFilter.filter((function(t){return t.checked})).map((function(t){return t.value})):this.emitFilterData()},t.prototype.emitFilterData=function(){var t=this.listOfParsedFilter.filter((function(t){return t.checked})).map((function(t){return t.value}));b.arraysEqual(this.listOfChecked,t)||(this.filterMultiple?this.filterChange.emit(t):this.filterChange.emit(t.length>0?t[0]:null))},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(C.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}();w.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 '}]}],w.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:d.NzI18nService},{type:r.ElementRef}]},w.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}]};var I=function(){function t(t){this.elementRef=t,this.expand=!1,this.spaceMode=!1,this.expandChange=new r.EventEmitter,this.elementRef.nativeElement.classList.add("ant-table-row-expand-icon")}return t.prototype.onHostClick=function(){this.spaceMode||(this.expand=!this.expand,this.expandChange.next(this.expand))},t}();I.decorators=[{type:r.Directive,args:[{selector:"button[nz-row-expand-button]",host:{"[type]":"'button'","[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()"}}]}],I.ctorParameters=function(){return[{type:r.ElementRef}]},I.propDecorators={expand:[{type:r.Input}],spaceMode:[{type:r.Input}],expandChange:[{type:r.Output}]};var T=function(t){this.elementRef=t,this.indentSize=0,this.elementRef.nativeElement.classList.add("ant-table-row-indent")};T.decorators=[{type:r.Directive,args:[{selector:"nz-row-indent",host:{"[style.padding-left.px]":"indentSize"}}]}],T.ctorParameters=function(){return[{type:r.ElementRef}]},T.propDecorators={indentSize:[{type:r.Input}]};var k=function(){function t(t){this.elementRef=t,this.listOfSelections=[],this.checked=!1,this.disabled=!1,this.indeterminate=!1,this.showCheckbox=!1,this.showRowSelection=!1,this.checkedChange=new r.EventEmitter,this.elementRef.nativeElement.classList.add("ant-table-selection")}return t.prototype.onCheckedChange=function(t){this.checked=t,this.checkedChange.emit(t)},t}();k.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 ></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 '}]}],k.ctorParameters=function(){return[{type:r.ElementRef}]},k.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}]};var $=function(){function t(t){this.elementRef=t,this.sortDirections=["ascend","descend",null],this.sortOrder=null,this.contentTemplate=null,this.isUp=!1,this.isDown=!1,this.elementRef.nativeElement.classList.add("ant-table-column-sorters")}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 '}]}],$.ctorParameters=function(){return[{type:r.ElementRef}]},$.propDecorators={sortDirections:[{type:r.Input}],sortOrder:[{type:r.Input}],contentTemplate:[{type:r.Input}]};var D=function(){function t(t,e){this.renderer=t,this.elementRef=e,this.nzRight=!1,this.nzLeft=!1,this.colspan=null,this.colSpan=null,this.changes$=new S.Subject,this.isAutoLeft=!1,this.isAutoRight=!1,this.isFixedLeft=!1,this.isFixedRight=!1,this.isFixed=!1}return 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.setIsFirstRight=function(t){this.setFixClass(t,"ant-table-cell-fix-right-first")},t.prototype.setIsLastLeft=function(t){this.setFixClass(t,"ant-table-cell-fix-left-last")},t.prototype.setFixClass=function(t,e){this.renderer.removeClass(this.elementRef.nativeElement,e),t&&this.renderer.addClass(this.elementRef.nativeElement,e)},t.prototype.ngOnChanges=function(){this.setIsFirstRight(!1),this.setIsLastLeft(!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}();D.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","[style.position]":"isFixed? 'sticky' : null"}}]}],D.ctorParameters=function(){return[{type:r.Renderer2},{type:r.ElementRef}]},D.propDecorators={nzRight:[{type:r.Input}],nzLeft:[{type:r.Input}],colspan:[{type:r.Input}],colSpan:[{type:r.Input}]};function P(t,e,n,i){var o,r=arguments.length,a=r<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--)(o=t[s])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function F(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}Object.create;function E(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 R(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function M(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(R(arguments[e]));return t}Object.create;var W=function(){function t(){this.theadTemplate$=new S.ReplaySubject(1),this.hasFixLeft$=new S.ReplaySubject(1),this.hasFixRight$=new S.ReplaySubject(1),this.hostWidth$=new S.ReplaySubject(1),this.columnCount$=new S.ReplaySubject(1),this.showEmpty$=new S.ReplaySubject(1),this.noResult$=new S.ReplaySubject(1),this.listOfThWidthConfigPx$=new S.BehaviorSubject([]),this.tableWidthConfigPx$=new S.BehaviorSubject([]),this.manualWidthConfigPx$=S.combineLatest([this.tableWidthConfigPx$,this.listOfThWidthConfigPx$]).pipe(C.map((function(t){var e=R(t,2),n=e[0],i=e[1];return n.length?n:i}))),this.listOfAutoWidthPx$=new S.ReplaySubject(1),this.listOfListOfThWidthPx$=S.merge(this.manualWidthConfigPx$,S.combineLatest([this.listOfAutoWidthPx$,this.manualWidthConfigPx$]).pipe(C.map((function(t){var e=R(t,2),n=e[0],i=e[1];return n.length===i.length?n.map((function(t,e){return"0px"===t?i[e]||null:i[e]||t})):i})))),this.listOfMeasureColumn$=new S.ReplaySubject(1),this.listOfListOfThWidth$=this.listOfAutoWidthPx$.pipe(C.map((function(t){return t.map((function(t){return parseInt(t,10)}))}))),this.enableAutoMeasure$=new S.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&&+t.colspan||t.colSpan&&+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&&+t.colspan||t.colSpan&&+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}();W.decorators=[{type:r.Injectable}],W.ctorParameters=function(){return[]};var N=function(t){this.isInsideTable=!1,this.isInsideTable=!!t};N.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"}}]}],N.ctorParameters=function(){return[{type:W,decorators:[{type:r.Optional}]}]};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,o=t.nzShowExpand,r=t.nzShowCheckbox;o&&(this.isNzShowExpandChanged=!0),r&&(this.isNzShowCheckboxChanged=!0),e(n)&&!this.isNzShowExpandChanged&&(this.nzShowExpand=!0),e(i)&&!this.isNzShowCheckboxChanged&&(this.nzShowCheckbox=!0)},t}();B.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"}}]}],B.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}]},P([b.InputBoolean(),F("design:type",Object)],B.prototype,"nzShowExpand",void 0),P([b.InputBoolean(),F("design:type",Object)],B.prototype,"nzShowCheckbox",void 0),P([b.InputBoolean(),F("design:type",Object)],B.prototype,"nzExpand",void 0);var L=function(){function t(t){this.cdr=t,this.manualClickOrder$=new S.Subject,this.calcOperatorChange$=new S.Subject,this.nzFilterValue=null,this.sortOrder=null,this.sortDirections=["ascend","descend",null],this.sortOrderChange$=new S.Subject,this.destroy$=new S.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}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(C.takeUntil(this.destroy$)).subscribe((function(e){t.sortOrder!==e&&(t.sortOrder=e,t.nzSortOrderChange.emit(e)),t.updateCalcOperator(),t.cdr.markForCheck()}))},t.prototype.ngOnChanges=function(t){var e=t.nzSortDirections,n=t.nzFilters,i=t.nzSortOrder,o=t.nzSortFn,r=t.nzFilterFn,a=t.nzSortPriority,s=t.nzFilterMultiple,l=t.nzShowSort,c=t.nzShowFilter;e&&this.nzSortDirections&&this.nzSortDirections.length&&(this.sortDirections=this.nzSortDirections),i&&(this.sortOrder=this.nzSortOrder,this.setSortOrder(this.nzSortOrder)),l&&(this.isNzShowSortChanged=!0),c&&(this.isNzShowFilterChanged=!0);var h=function(t){return t&&t.firstChange&&void 0!==t.currentValue};if(!h(i)&&!h(o)||this.isNzShowSortChanged||(this.nzShowSort=!0),h(n)&&!this.isNzShowFilterChanged&&(this.nzShowFilter=!0),(n||s)&&this.nzShowFilter){var p=this.nzFilters.filter((function(t){return t.byDefault})).map((function(t){return t.value}));this.nzFilterValue=this.nzFilterMultiple?p:p[0]||null}(o||r||a||n)&&this.updateCalcOperator()},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t}();L.decorators=[{type:r.Component,args:[{selector:"th[nzColumnKey], 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()"}}]}],L.ctorParameters=function(){return[{type:r.ChangeDetectorRef}]},L.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}]},P([b.InputBoolean(),F("design:type",Object)],L.prototype,"nzShowSort",void 0),P([b.InputBoolean(),F("design:type",Object)],L.prototype,"nzShowFilter",void 0),P([b.InputBoolean(),F("design:type",Object)],L.prototype,"nzCustomFilter",void 0);var V=function(){function t(t,e){this.renderer=t,this.elementRef=e,this.changes$=new S.Subject,this.nzWidth=null,this.colspan=null,this.colSpan=null,this.rowspan=null,this.rowSpan=null}return t.prototype.ngOnChanges=function(t){var e=t.nzWidth,n=t.colspan,i=t.rowspan,o=t.colSpan,r=t.rowSpan;if(n||o){var a=this.colspan||this.colSpan;b.isNil(a)?this.renderer.removeAttribute(this.elementRef.nativeElement,"colspan"):this.renderer.setAttribute(this.elementRef.nativeElement,"colspan",""+a)}if(i||r){var s=this.rowspan||this.rowSpan;b.isNil(s)?this.renderer.removeAttribute(this.elementRef.nativeElement,"rowspan"):this.renderer.setAttribute(this.elementRef.nativeElement,"rowspan",""+s)}(e||n)&&this.changes$.next()},t}();V.decorators=[{type:r.Directive,args:[{selector:"th"}]}],V.ctorParameters=function(){return[{type:r.Renderer2},{type:r.ElementRef}]},V.propDecorators={nzWidth:[{type:r.Input}],colspan:[{type:r.Input}],colSpan:[{type:r.Input}],rowspan:[{type:r.Input}],rowSpan:[{type:r.Input}]};var j=function(){function t(t){this.elementRef=t,this.nzSelections=[],this.nzChecked=!1,this.nzDisabled=!1,this.nzIndeterminate=!1,this.nzShowCheckbox=!1,this.nzShowRowSelection=!1,this.nzCheckedChange=new r.EventEmitter,this.isNzShowExpandChanged=!1,this.isNzShowCheckboxChanged=!1,this.elementRef.nativeElement.classList.add("ant-table-selection-column")}return t.prototype.onCheckedChange=function(t){this.nzChecked=t,this.nzCheckedChange.emit(t)},t.prototype.ngOnChanges=function(t){var e=function(t){return t&&t.firstChange&&void 0!==t.currentValue},n=t.nzChecked,i=t.nzSelections,o=t.nzShowExpand,r=t.nzShowCheckbox;o&&(this.isNzShowExpandChanged=!0),r&&(this.isNzShowCheckboxChanged=!0),e(i)&&!this.isNzShowExpandChanged&&(this.nzShowRowSelection=!0),e(n)&&!this.isNzShowCheckboxChanged&&(this.nzShowCheckbox=!0)},t}();j.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 '}]}],j.ctorParameters=function(){return[{type:r.ElementRef}]},j.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}]},P([b.InputBoolean(),F("design:type",Object)],j.prototype,"nzShowCheckbox",void 0),P([b.InputBoolean(),F("design:type",Object)],j.prototype,"nzShowRowSelection",void 0);var A=function(){this.nzAlign=null};A.decorators=[{type:r.Directive,args:[{selector:"th[nzAlign],td[nzAlign]",host:{"[style.text-align]":"nzAlign"}}]}],A.propDecorators={nzAlign:[{type:r.Input}]};var U=function(){this.nzEllipsis=!0};U.decorators=[{type:r.Directive,args:[{selector:"th[nzEllipsis],td[nzEllipsis]",host:{"[class.ant-table-cell-ellipsis]":"nzEllipsis"}}]}],U.propDecorators={nzEllipsis:[{type:r.Input}]},P([b.InputBoolean(),F("design:type",Object)],U.prototype,"nzEllipsis",void 0);var q=function(){this.nzBreakWord=!0};q.decorators=[{type:r.Directive,args:[{selector:"th[nzBreakWord],td[nzBreakWord]",host:{"[style.word-break]":"nzBreakWord ? 'break-all' : ''"}}]}],q.propDecorators={nzBreakWord:[{type:r.Input}]},P([b.InputBoolean(),F("design:type",Object)],q.prototype,"nzBreakWord",void 0);var X=function(){this.tableLayout="auto",this.theadTemplate=null,this.contentTemplate=null,this.listOfColWidth=[],this.scrollX=null};X.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"}}]}],X.propDecorators={tableLayout:[{type:r.Input}],theadTemplate:[{type:r.Input}],contentTemplate:[{type:r.Input}],listOfColWidth:[{type:r.Input}],scrollX:[{type:r.Input}]};var H=function(){function t(t,e){this.nzTableStyleService=t,this.renderer=e,this.hostWidth$=new S.BehaviorSubject(null),this.enableAutoMeasure$=new S.BehaviorSubject(!1),this.destroy$=new S.Subject}return t.prototype.ngOnInit=function(){if(this.nzTableStyleService){var t=this.nzTableStyleService,e=t.enableAutoMeasure$,n=t.hostWidth$;e.pipe(C.takeUntil(this.destroy$)).subscribe(this.enableAutoMeasure$),n.subscribe(this.hostWidth$)}},t.prototype.ngAfterViewInit=function(){var t=this;this.nzTableStyleService.columnCount$.pipe(C.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}();H.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 '}]}],H.ctorParameters=function(){return[{type:W},{type:r.Renderer2}]},H.propDecorators={tdElement:[{type:r.ViewChild,args:["tdElement"]}]};var Y=function(t){this.elementRef=t,this.tableLayout="auto",this.listOfColWidth=[],this.theadTemplate=null,this.contentTemplate=null,this.elementRef.nativeElement.classList.add("ant-table-container")};Y.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 '}]}],Y.ctorParameters=function(){return[{type:r.ElementRef}]},Y.propDecorators={tableLayout:[{type:r.Input}],listOfColWidth:[{type:r.Input}],theadTemplate:[{type:r.Input}],contentTemplate:[{type:r.Input}]};var Q=function(){function t(t,e,n,i,o){this.renderer=t,this.ngZone=e,this.platform=n,this.resizeService=i,this.elementRef=o,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 S.Subject,this.scroll$=new S.Subject,this.destroy$=new S.Subject,this.elementRef.nativeElement.classList.add("ant-table-container")}return t.prototype.setScrollPositionClassName=function(t){void 0===t&&(t=!1);var e=this.tableBodyElement.nativeElement,n=e.scrollWidth,i=e.scrollLeft,o=e.clientWidth,r="ant-table-ping-left",a="ant-table-ping-right";n===o&&0!==n||t?(this.renderer.removeClass(this.tableMainElement,r),this.renderer.removeClass(this.tableMainElement,a)):0===i?(this.renderer.removeClass(this.tableMainElement,r),this.renderer.addClass(this.tableMainElement,a)):n===i+o?(this.renderer.removeClass(this.tableMainElement,a),this.renderer.addClass(this.tableMainElement,r)):(this.renderer.addClass(this.tableMainElement,r),this.renderer.addClass(this.tableMainElement,a))},t.prototype.ngOnChanges=function(t){var e=t.scrollX,n=t.scrollY,i=t.data;if(e||n){var o=0!==this.verticalScrollBarWidth;this.headerStyleMap={overflowX:"hidden",overflowY:this.scrollY&&o?"scroll":"hidden"},this.bodyStyleMap={overflowY:this.scrollY?"scroll":"hidden",overflowX:this.scrollX?"auto":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=t.scroll$.pipe(C.startWith(null),C.delay(0),C.switchMap((function(){return S.fromEvent(t.tableBodyElement.nativeElement,"scroll").pipe(C.startWith(!0))})),C.takeUntil(t.destroy$)),n=t.resizeService.subscribe().pipe(C.takeUntil(t.destroy$)),i=t.data$.pipe(C.takeUntil(t.destroy$));S.merge(e,n,i,t.scroll$).pipe(C.startWith(!0),C.delay(0),C.takeUntil(t.destroy$)).subscribe((function(){return t.setScrollPositionClassName()})),e.pipe(C.filter((function(){return!!t.scrollY}))).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}();Q.decorators=[{type:r.Component,args:[{selector:"nz-table-inner-scroll",changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,template:'\n <ng-container *ngIf="scrollY">\n <div #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 tableLayout="fixed"\n [scrollX]="scrollX"\n [listOfColWidth]="listOfColWidth"\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 </ng-container>\n <div class="ant-table-content" #tableBodyElement *ngIf="!scrollY" [ngStyle]="bodyStyleMap">\n <table\n nz-table-content\n tableLayout="fixed"\n [scrollX]="scrollX"\n [listOfColWidth]="listOfColWidth"\n [theadTemplate]="theadTemplate"\n [contentTemplate]="contentTemplate"\n ></table>\n </div>\n '}]}],Q.ctorParameters=function(){return[{type:r.Renderer2},{type:r.NgZone},{type:n.Platform},{type:v.NzResizeService},{type:r.ElementRef}]},Q.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:[i.CdkVirtualScrollViewport,{read:i.CdkVirtualScrollViewport}]}],verticalScrollBarWidth:[{type:r.Input}]};var Z=function(t){this.templateRef=t};Z.decorators=[{type:r.Directive,args:[{selector:"[nz-virtual-scroll]",exportAs:"nzVirtualScroll"}]}],Z.ctorParameters=function(){return[{type:r.TemplateRef}]};var J=function(){function t(){var t=this;this.destroy$=new S.Subject,this.pageIndex$=new S.BehaviorSubject(1),this.frontPagination$=new S.BehaviorSubject(!0),this.pageSize$=new S.BehaviorSubject(10),this.listOfData$=new S.BehaviorSubject([]),this.pageIndexDistinct$=this.pageIndex$.pipe(C.distinctUntilChanged()),this.pageSizeDistinct$=this.pageSize$.pipe(C.distinctUntilChanged()),this.listOfCalcOperator$=new S.BehaviorSubject([]),this.queryParams$=S.combineLatest([this.pageIndexDistinct$,this.pageSizeDistinct$,this.listOfCalcOperator$]).pipe(C.debounceTime(0),C.skip(1),C.map((function(t){var e=R(t,3),n=e[0],i=e[1],o=e[2];return{pageIndex:n,pageSize:i,sort:o.filter((function(t){return t.sortFn})).map((function(t){return{key:t.key,value:t.sortOrder}})),filter:o.filter((function(t){return t.filterFn})).map((function(t){return{key:t.key,value:t.filterValue}}))}}))),this.listOfDataAfterCalc$=S.combineLatest([this.listOfData$,this.listOfCalcOperator$]).pipe(C.map((function(t){var e,n,i=R(t,2),o=i[0],r=i[1],a=M(o),s=r.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=E(s),h=c.next();!h.done;h=c.next()){l(h.value)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}var p=r.filter((function(t){return null!==t.sortOrder&&"function"==typeof t.sortFn})).sort((function(t,e){return+e.sortPriority-+t.sortPriority}));return r.length&&a.sort((function(t,e){var n,i;try{for(var o=E(p),r=o.next();!r.done;r=o.next()){var a=r.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{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return 0})),a}))),this.listOfFrontEndCurrentPageData$=S.combineLatest([this.pageIndexDistinct$,this.pageSizeDistinct$,this.listOfDataAfterCalc$]).pipe(C.takeUntil(this.destroy$),C.filter((function(t){var e=R(t,3),n=e[0],i=e[1],o=e[2];return n<=(Math.ceil(o.length/i)||1)})),C.map((function(t){var e=R(t,3),n=e[0],i=e[1];return e[2].slice((n-1)*i,n*i)}))),this.listOfCurrentPageData$=this.frontPagination$.pipe(C.switchMap((function(e){return e?t.listOfFrontEndCurrentPageData$:t.listOfData$}))),this.total$=this.frontPagination$.pipe(C.switchMap((function(e){return e?t.listOfDataAfterCalc$:t.listOfData$})),C.map((function(t){return t.length})),C.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}();J.decorators=[{type:r.Injectable}],J.ctorParameters=function(){return[]};var _="table",K=function(){function t(t,e,n,i,o,a,s){var l=this;this.elementRef=t,this.nzResizeObserver=e,this.nzConfigService=n,this.cdr=i,this.nzTableStyleService=o,this.nzTableDataService=a,this.directionality=s,this._nzModuleName=_,this.nzTableLayout="auto",this.nzShowTotal=null,this.nzItemRender=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.nzPaginationType="default",this.nzFrontPagination=!0,this.nzTemplateMode=!1,this.nzShowPagination=!0,this.nzLoading=!1,this.nzOuterBordered=!1,this.nzLoadingIndicator=null,this.nzBordered=!1,this.nzSize="default",this.nzShowSizeChanger=!1,this.nzHideOnSinglePage=!1,this.nzShowQuickJumper=!1,this.nzSimple=!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.listOfAutoColWidth=[],this.listOfManualColWidth=[],this.hasFixLeft=!1,this.hasFixRight=!1,this.showPagination=!0,this.destroy$=new S.Subject,this.loading$=new S.BehaviorSubject(!1),this.templateMode$=new S.BehaviorSubject(!1),this.dir="ltr",this.verticalScrollBarWidth=0,this.elementRef.nativeElement.classList.add("ant-table-wrapper"),this.nzConfigService.getConfigChangeEventForComponent(_).pipe(C.takeUntil(this.destroy$)).subscribe((function(){l.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,e=this,n=this.nzTableDataService,i=n.pageIndexDistinct$,o=n.pageSizeDistinct$,r=n.listOfCurrentPageData$,a=n.total$,s=n.queryParams$,l=this.nzTableStyleService,c=l.theadTemplate$,h=l.hasFixLeft$,p=l.hasFixRight$;this.dir=this.directionality.value,null===(t=this.directionality.change)||void 0===t||t.pipe(C.takeUntil(this.destroy$)).subscribe((function(t){e.dir=t,e.cdr.detectChanges()})),s.pipe(C.takeUntil(this.destroy$)).subscribe(this.nzQueryParams),i.pipe(C.takeUntil(this.destroy$)).subscribe((function(t){t!==e.nzPageIndex&&(e.nzPageIndex=t,e.nzPageIndexChange.next(t))})),o.pipe(C.takeUntil(this.destroy$)).subscribe((function(t){t!==e.nzPageSize&&(e.nzPageSize=t,e.nzPageSizeChange.next(t))})),a.pipe(C.takeUntil(this.destroy$),C.filter((function(){return e.nzFrontPagination}))).subscribe((function(t){t!==e.nzTotal&&(e.nzTotal=t,e.cdr.markForCheck())})),r.pipe(C.takeUntil(this.destroy$)).subscribe((function(t){e.data=t,e.nzCurrentPageDataChange.next(t),e.cdr.markForCheck()})),c.pipe(C.takeUntil(this.destroy$)).subscribe((function(t){e.theadTemplate=t,e.cdr.markForCheck()})),h.pipe(C.takeUntil(this.destroy$)).subscribe((function(t){e.hasFixLeft=t,e.cdr.markForCheck()})),p.pipe(C.takeUntil(this.destroy$)).subscribe((function(t){e.hasFixRight=t,e.cdr.markForCheck()})),S.combineLatest([a,this.loading$,this.templateMode$]).pipe(C.map((function(t){var e=R(t,3),n=e[0],i=e[1],o=e[2];return 0===n&&!i&&!o})),C.takeUntil(this.destroy$)).subscribe((function(t){e.nzTableStyleService.setShowEmpty(t)})),this.verticalScrollBarWidth=b.measureScrollbar("vertical"),this.nzTableStyleService.listOfListOfThWidthPx$.pipe(C.takeUntil(this.destroy$)).subscribe((function(t){e.listOfAutoColWidth=t,e.cdr.markForCheck()})),this.nzTableStyleService.manualWidthConfigPx$.pipe(C.takeUntil(this.destroy$)).subscribe((function(t){e.listOfManualColWidth=t,e.cdr.markForCheck()}))},t.prototype.ngOnChanges=function(t){var e=t.nzScroll,n=t.nzPageIndex,i=t.nzPageSize,o=t.nzFrontPagination,r=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),r&&(this.nzData=this.nzData||[],this.nzTableDataService.updateListOfData(this.nzData)),o&&this.nzTableDataService.updateFrontPagination(this.nzFrontPagination),e&&this.setScrollOnChanges(),a&&this.nzTableStyleService.setTableWidthConfig(this.nzWidthConfig),l&&this.loading$.next(this.nzLoading),c&&this.templateMode$.next(this.nzTemplateMode),s&&this.nzTableStyleService.setNoResult(this.nzNoResult),this.updateShowPagination()},t.prototype.ngAfterViewInit=function(){var t=this;this.nzResizeObserver.observe(this.elementRef).pipe(C.map((function(e){var n=R(e,1)[0].target.getBoundingClientRect().width,i=t.scrollY?t.verticalScrollBarWidth:0;return Math.floor(n-i)})),C.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.prototype.setScrollOnChanges=function(){this.scrollX=this.nzScroll&&this.nzScroll.x||null,this.scrollY=this.nzScroll&&this.nzScroll.y||null,this.nzTableStyleService.setScroll(this.scrollX,this.scrollY)},t.prototype.updateShowPagination=function(){this.showPagination=this.nzHideOnSinglePage&&this.nzData.length>this.nzPageSize||this.nzData.length>0&&!this.nzHideOnSinglePage||!this.nzFrontPagination&&this.nzTotal>this.nzPageSize},t}();K.decorators=[{type:r.Component,args:[{selector:"nz-table",exportAs:"nzTable",providers:[W,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-rtl]="dir === \'rtl\'"\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.nz-table-out-bordered]="nzOuterBordered && !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]="listOfAutoColWidth"\n [theadTemplate]="theadTemplate"\n [verticalScrollBarWidth]="verticalScrollBarWidth"\n [virtualTemplate]="nzVirtualScrollDirective ? nzVirtualScrollDirective.templateRef : null"\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]="listOfManualColWidth"\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 [hidden]="!showPagination"\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]="nzPaginationType === \'small\' ? \'small\' : 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 ></nz-pagination>\n </ng-template>\n <ng-template #contentTemplate>\n <ng-content></ng-content>\n </ng-template>\n ',host:{"[class.ant-table-wrapper-rtl]":'dir === "rtl"'}}]}],K.ctorParameters=function(){return[{type:r.ElementRef},{type:h.NzResizeObserver},{type:O.NzConfigService},{type:r.ChangeDetectorRef},{type:W},{type:J},{type:e.Directionality,decorators:[{type:r.Optional}]}]},K.propDecorators={nzTableLayout:[{type:r.Input}],nzShowTotal:[{type:r.Input