ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
3,989 lines • 132 kB
JavaScript
import { Platform, PlatformModule } from '@angular/cdk/platform';
import { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
import { CommonModule } from '@angular/common';
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, ChangeDetectorRef, Input, Output, Directive, Renderer2, ElementRef, Injectable, Optional, ViewChild, NgZone, TemplateRef, ContentChild, ContentChildren, ViewChildren, NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
import { NzResizeObserver, NzResizeObserversModule } from 'ng-zorro-antd/core/resize-observers';
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
import { NzEmptyModule } from 'ng-zorro-antd/empty';
import { NzI18nService, NzI18nModule } from 'ng-zorro-antd/i18n';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzMenuModule } from 'ng-zorro-antd/menu';
import { NzPaginationModule } from 'ng-zorro-antd/pagination';
import { NzRadioModule } from 'ng-zorro-antd/radio';
import { NzSpinModule } from 'ng-zorro-antd/spin';
import { Subject, ReplaySubject, BehaviorSubject, combineLatest, merge, fromEvent, EMPTY, of } from 'rxjs';
import { takeUntil, map, filter, startWith, delay, distinctUntilChanged, debounceTime, skip, switchMap, flatMap } from 'rxjs/operators';
import { __decorate, __metadata } from 'tslib';
import { InputBoolean, measureScrollbar } from 'ng-zorro-antd/core/util';
import { warnDeprecation } from 'ng-zorro-antd/core/logger';
import { NzResizeService } from 'ng-zorro-antd/core/services';
import { NzConfigService, WithConfig } from 'ng-zorro-antd/core/config';
/**
* @fileoverview added by tsickle
* Generated from: src/addon/filter-trigger.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzFilterTriggerComponent {
/**
* @param {?} cdr
*/
constructor(cdr) {
this.cdr = cdr;
this.nzActive = false;
this.nzVisible = false;
this.nzVisibleChange = new EventEmitter();
}
/**
* @param {?} visible
* @return {?}
*/
onVisibleChange(visible) {
this.nzVisible = visible;
this.nzVisibleChange.next(visible);
}
/**
* @param {?} $event
* @return {?}
*/
onFilterClick($event) {
$event.stopPropagation();
}
/**
* @return {?}
*/
hide() {
this.nzVisible = false;
this.cdr.markForCheck();
}
/**
* @return {?}
*/
show() {
this.nzVisible = true;
this.cdr.markForCheck();
}
}
NzFilterTriggerComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-filter-trigger',
exportAs: `nzFilterTrigger`,
changeDetection: ChangeDetectionStrategy.OnPush,
preserveWhitespaces: false,
encapsulation: ViewEncapsulation.None,
template: `
<span
nz-dropdown
class="ant-table-filter-trigger"
nzTrigger="click"
nzPlacement="bottomRight"
[nzClickHide]="false"
[nzDropdownMenu]="nzDropdownMenu"
[class.active]="nzActive"
[class.ant-table-filter-open]="nzVisible"
[nzVisible]="nzVisible"
(nzVisibleChange)="onVisibleChange($event)"
(click)="onFilterClick($event)"
>
<ng-content></ng-content>
</span>
`,
host: {
'[class.ant-table-filter-trigger-container]': 'true',
'[class.ant-table-filter-trigger-container-open]': 'nzVisible'
}
}] }
];
/** @nocollapse */
NzFilterTriggerComponent.ctorParameters = () => [
{ type: ChangeDetectorRef }
];
NzFilterTriggerComponent.propDecorators = {
nzActive: [{ type: Input }],
nzDropdownMenu: [{ type: Input }],
nzVisible: [{ type: Input }],
nzVisibleChange: [{ type: Output }]
};
if (false) {
/** @type {?} */
NzFilterTriggerComponent.prototype.nzActive;
/** @type {?} */
NzFilterTriggerComponent.prototype.nzDropdownMenu;
/** @type {?} */
NzFilterTriggerComponent.prototype.nzVisible;
/** @type {?} */
NzFilterTriggerComponent.prototype.nzVisibleChange;
/**
* @type {?}
* @private
*/
NzFilterTriggerComponent.prototype.cdr;
}
/**
* @fileoverview added by tsickle
* Generated from: src/addon/filter.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function NzThItemInterface() { }
if (false) {
/** @type {?} */
NzThItemInterface.prototype.text;
/** @type {?} */
NzThItemInterface.prototype.value;
/** @type {?} */
NzThItemInterface.prototype.checked;
}
class NzTableFilterComponent {
/**
* @param {?} cdr
* @param {?} i18n
*/
constructor(cdr, i18n) {
this.cdr = cdr;
this.i18n = i18n;
this.contentTemplate = null;
this.customFilter = false;
this.extraTemplate = null;
this.filterMultiple = true;
this.listOfFilter = [];
this.filterChange = new EventEmitter();
this.destroy$ = new Subject();
this.locale = (/** @type {?} */ ({}));
this.isChanged = false;
this.isChecked = false;
this.isVisible = false;
this.listOfParsedFilter = [];
}
/**
* @param {?} _
* @param {?} item
* @return {?}
*/
trackByValue(_, item) {
return item.value;
}
/**
* @param {?} filter
* @return {?}
*/
check(filter) {
this.isChanged = true;
if (this.filterMultiple) {
this.listOfParsedFilter = this.listOfParsedFilter.map((/**
* @param {?} item
* @return {?}
*/
item => {
if (item === filter) {
return Object.assign(Object.assign({}, item), { checked: !filter.checked });
}
else {
return item;
}
}));
filter.checked = !filter.checked;
}
else {
this.listOfParsedFilter = this.listOfParsedFilter.map((/**
* @param {?} item
* @return {?}
*/
item => {
return Object.assign(Object.assign({}, item), { checked: item === filter });
}));
}
this.isChecked = this.getCheckedStatus(this.listOfParsedFilter);
}
/**
* @return {?}
*/
confirm() {
this.isVisible = false;
this.emitFilterData();
}
/**
* @return {?}
*/
reset() {
this.isChanged = true;
this.isVisible = false;
this.listOfParsedFilter = this.parseListOfFilter(this.listOfFilter, true);
this.isChecked = this.getCheckedStatus(this.listOfParsedFilter);
this.emitFilterData();
}
/**
* @param {?} value
* @return {?}
*/
onVisibleChange(value) {
this.isVisible = value;
if (!value) {
this.emitFilterData();
}
}
/**
* @return {?}
*/
emitFilterData() {
if (this.isChanged) {
/** @type {?} */
const listOfChecked = this.listOfParsedFilter.filter((/**
* @param {?} item
* @return {?}
*/
item => item.checked)).map((/**
* @param {?} item
* @return {?}
*/
item => item.value));
if (this.filterMultiple) {
this.filterChange.emit(listOfChecked);
}
else {
this.filterChange.emit(listOfChecked[0] || null);
}
this.isChanged = false;
}
}
/**
* @param {?} listOfFilter
* @param {?=} reset
* @return {?}
*/
parseListOfFilter(listOfFilter, reset) {
return listOfFilter.map((/**
* @param {?} item
* @return {?}
*/
item => {
/** @type {?} */
const checked = reset ? false : !!item.byDefault;
return { text: item.text, value: item.value, checked };
}));
}
/**
* @param {?} listOfParsedFilter
* @return {?}
*/
getCheckedStatus(listOfParsedFilter) {
return listOfParsedFilter.some((/**
* @param {?} item
* @return {?}
*/
item => item.checked));
}
/**
* @return {?}
*/
ngOnInit() {
this.i18n.localeChange.pipe(takeUntil(this.destroy$)).subscribe((/**
* @return {?}
*/
() => {
this.locale = this.i18n.getLocaleData('Table');
this.cdr.markForCheck();
}));
}
/**
* @param {?} changes
* @return {?}
*/
ngOnChanges(changes) {
const { listOfFilter } = changes;
if (listOfFilter && this.listOfFilter && this.listOfFilter.length) {
this.listOfParsedFilter = this.parseListOfFilter(this.listOfFilter);
this.isChecked = this.getCheckedStatus(this.listOfParsedFilter);
}
}
/**
* @return {?}
*/
ngOnDestroy() {
this.destroy$.next();
this.destroy$.complete();
}
}
NzTableFilterComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-table-filter',
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: `
<span class="ant-table-filter-column-title">
<ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
</span>
<ng-container *ngIf="!customFilter; else extraTemplate">
<nz-filter-trigger
[nzVisible]="isVisible"
[nzActive]="isChecked"
[nzDropdownMenu]="filterMenu"
(nzVisibleChange)="onVisibleChange($event)"
>
<i nz-icon nzType="filter" nzTheme="fill"></i>
</nz-filter-trigger>
<nz-dropdown-menu #filterMenu="nzDropdownMenu">
<div class="ant-table-filter-dropdown">
<ul nz-menu>
<li nz-menu-item [nzSelected]="f.checked" *ngFor="let f of listOfParsedFilter; trackBy: trackByValue" (click)="check(f)">
<label nz-radio *ngIf="!filterMultiple" [ngModel]="f.checked" (ngModelChange)="check(f)"></label>
<label nz-checkbox *ngIf="filterMultiple" [ngModel]="f.checked" (ngModelChange)="check(f)"></label>
<span>{{ f.text }}</span>
</li>
</ul>
<div class="ant-table-filter-dropdown-btns">
<button nz-button nzType="link" nzSize="small" (click)="reset()" [disabled]="!isChecked">{{ locale.filterReset }}</button>
<button nz-button nzType="primary" nzSize="small" (click)="confirm()">{{ locale.filterConfirm }}</button>
</div>
</div>
</nz-dropdown-menu>
</ng-container>
`,
host: {
'[class.ant-table-filter-column]': 'true'
}
}] }
];
/** @nocollapse */
NzTableFilterComponent.ctorParameters = () => [
{ type: ChangeDetectorRef },
{ type: NzI18nService }
];
NzTableFilterComponent.propDecorators = {
contentTemplate: [{ type: Input }],
customFilter: [{ type: Input }],
extraTemplate: [{ type: Input }],
filterMultiple: [{ type: Input }],
listOfFilter: [{ type: Input }],
filterChange: [{ type: Output }]
};
if (false) {
/** @type {?} */
NzTableFilterComponent.prototype.contentTemplate;
/** @type {?} */
NzTableFilterComponent.prototype.customFilter;
/** @type {?} */
NzTableFilterComponent.prototype.extraTemplate;
/** @type {?} */
NzTableFilterComponent.prototype.filterMultiple;
/** @type {?} */
NzTableFilterComponent.prototype.listOfFilter;
/** @type {?} */
NzTableFilterComponent.prototype.filterChange;
/**
* @type {?}
* @private
*/
NzTableFilterComponent.prototype.destroy$;
/** @type {?} */
NzTableFilterComponent.prototype.locale;
/** @type {?} */
NzTableFilterComponent.prototype.isChanged;
/** @type {?} */
NzTableFilterComponent.prototype.isChecked;
/** @type {?} */
NzTableFilterComponent.prototype.isVisible;
/** @type {?} */
NzTableFilterComponent.prototype.listOfParsedFilter;
/**
* @type {?}
* @private
*/
NzTableFilterComponent.prototype.cdr;
/**
* @type {?}
* @private
*/
NzTableFilterComponent.prototype.i18n;
}
/**
* @fileoverview added by tsickle
* Generated from: src/addon/row-expand-button.directive.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzRowExpandButtonDirective {
constructor() {
this.expand = false;
this.spaceMode = false;
this.expandChange = new EventEmitter();
}
/**
* @return {?}
*/
onHostClick() {
if (!this.spaceMode) {
this.expand = !this.expand;
this.expandChange.next(this.expand);
}
}
}
NzRowExpandButtonDirective.decorators = [
{ type: 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()'
}
},] }
];
NzRowExpandButtonDirective.propDecorators = {
expand: [{ type: Input }],
spaceMode: [{ type: Input }],
expandChange: [{ type: Output }]
};
if (false) {
/** @type {?} */
NzRowExpandButtonDirective.prototype.expand;
/** @type {?} */
NzRowExpandButtonDirective.prototype.spaceMode;
/** @type {?} */
NzRowExpandButtonDirective.prototype.expandChange;
}
/**
* @fileoverview added by tsickle
* Generated from: src/addon/row-indent.directive.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzRowIndentDirective {
constructor() {
this.indentSize = 0;
}
}
NzRowIndentDirective.decorators = [
{ type: Directive, args: [{
selector: 'nz-row-indent',
host: {
'[class.ant-table-row-indent]': 'true',
'[style.padding-left.px]': 'indentSize'
}
},] }
];
NzRowIndentDirective.propDecorators = {
indentSize: [{ type: Input }]
};
if (false) {
/** @type {?} */
NzRowIndentDirective.prototype.indentSize;
}
/**
* @fileoverview added by tsickle
* Generated from: src/addon/selection.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTableSelectionComponent {
constructor() {
this.listOfSelections = [];
this.checked = false;
this.disabled = false;
this.indeterminate = false;
this.showCheckbox = false;
this.showRowSelection = false;
this.checkedChange = new EventEmitter();
}
/**
* @param {?} checked
* @return {?}
*/
onCheckedChange(checked) {
this.checked = checked;
this.checkedChange.emit(checked);
}
}
NzTableSelectionComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-table-selection',
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: `
<label
*ngIf="showCheckbox"
nz-checkbox
[class.ant-table-selection-select-all-custom]="showRowSelection"
[ngModel]="checked"
[nzDisabled]="disabled"
[nzIndeterminate]="indeterminate"
(ngModelChange)="onCheckedChange($event)"
>
</label>
<div class="ant-table-selection-extra" *ngIf="showRowSelection">
<span nz-dropdown class="ant-table-selection-down" nzPlacement="bottomLeft" [nzDropdownMenu]="selectionMenu">
<i nz-icon nzType="down"></i>
</span>
<nz-dropdown-menu #selectionMenu="nzDropdownMenu">
<ul nz-menu class="ant-table-selection-menu">
<li nz-menu-item *ngFor="let selection of listOfSelections" (click)="selection.onSelect()">
{{ selection.text }}
</li>
</ul>
</nz-dropdown-menu>
</div>
`,
host: {
'[class.ant-table-selection]': 'true'
}
}] }
];
NzTableSelectionComponent.propDecorators = {
listOfSelections: [{ type: Input }],
checked: [{ type: Input }],
disabled: [{ type: Input }],
indeterminate: [{ type: Input }],
showCheckbox: [{ type: Input }],
showRowSelection: [{ type: Input }],
checkedChange: [{ type: Output }]
};
if (false) {
/** @type {?} */
NzTableSelectionComponent.prototype.listOfSelections;
/** @type {?} */
NzTableSelectionComponent.prototype.checked;
/** @type {?} */
NzTableSelectionComponent.prototype.disabled;
/** @type {?} */
NzTableSelectionComponent.prototype.indeterminate;
/** @type {?} */
NzTableSelectionComponent.prototype.showCheckbox;
/** @type {?} */
NzTableSelectionComponent.prototype.showRowSelection;
/** @type {?} */
NzTableSelectionComponent.prototype.checkedChange;
}
/**
* @fileoverview added by tsickle
* Generated from: src/addon/sorters.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTableSortersComponent {
constructor() {
this.sortDirections = ['ascend', 'descend', null];
this.sortOrder = null;
this.contentTemplate = null;
this.isUp = false;
this.isDown = false;
}
/**
* @param {?} changes
* @return {?}
*/
ngOnChanges(changes) {
const { sortDirections } = changes;
if (sortDirections) {
this.isUp = this.sortDirections.indexOf('ascend') !== -1;
this.isDown = this.sortDirections.indexOf('descend') !== -1;
}
}
}
NzTableSortersComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-table-sorters',
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: `
<span><ng-template [ngTemplateOutlet]="contentTemplate"></ng-template></span>
<span class="ant-table-column-sorter" [class.ant-table-column-sorter-full]="isDown && isUp">
<span class="ant-table-column-sorter-inner">
<i nz-icon nzType="caret-up" *ngIf="isUp" class="ant-table-column-sorter-up" [class.active]="sortOrder == 'ascend'"></i>
<i nz-icon nzType="caret-down" *ngIf="isDown" class="ant-table-column-sorter-down" [class.active]="sortOrder == 'descend'"></i>
</span>
</span>
`,
host: {
'[class.ant-table-column-sorters]': 'true'
}
}] }
];
NzTableSortersComponent.propDecorators = {
sortDirections: [{ type: Input }],
sortOrder: [{ type: Input }],
contentTemplate: [{ type: Input }]
};
if (false) {
/** @type {?} */
NzTableSortersComponent.prototype.sortDirections;
/** @type {?} */
NzTableSortersComponent.prototype.sortOrder;
/** @type {?} */
NzTableSortersComponent.prototype.contentTemplate;
/** @type {?} */
NzTableSortersComponent.prototype.isUp;
/** @type {?} */
NzTableSortersComponent.prototype.isDown;
}
/**
* @fileoverview added by tsickle
* Generated from: src/cell/cell-fixed.directive.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzCellFixedDirective {
/**
* @param {?} cdr
* @param {?} renderer
* @param {?} elementRef
*/
constructor(cdr, renderer, elementRef) {
this.cdr = cdr;
this.renderer = renderer;
this.elementRef = elementRef;
this.nzRight = false;
this.nzLeft = false;
this.colspan = null;
this.changes$ = new Subject();
this.isFirstRight = false;
this.isLastLeft = false;
this.isAutoLeft = false;
this.isAutoRight = false;
this.isFixedLeft = false;
this.isFixedRight = false;
this.isFixed = false;
}
/**
* @param {?} isRightFirst
* @return {?}
*/
setIsFirstRight(isRightFirst) {
this.isFirstRight = isRightFirst;
this.cdr.markForCheck();
}
/**
* @param {?} isLeftLast
* @return {?}
*/
setIsLastLeft(isLeftLast) {
this.isLastLeft = isLeftLast;
this.cdr.markForCheck();
}
/**
* @param {?} autoLeft
* @return {?}
*/
setAutoLeftWidth(autoLeft) {
this.renderer.setStyle(this.elementRef.nativeElement, 'left', autoLeft);
}
/**
* @param {?} autoRight
* @return {?}
*/
setAutoRightWidth(autoRight) {
this.renderer.setStyle(this.elementRef.nativeElement, 'right', autoRight);
}
/**
* @return {?}
*/
ngOnChanges() {
this.isFirstRight = false;
this.isLastLeft = false;
this.isAutoLeft = this.nzLeft === '' || this.nzLeft === true;
this.isAutoRight = this.nzRight === '' || this.nzRight === true;
this.isFixedLeft = this.nzLeft !== false;
this.isFixedRight = this.nzRight !== false;
this.isFixed = this.isFixedLeft || this.isFixedRight;
/** @type {?} */
const validatePx = (/**
* @param {?} value
* @return {?}
*/
(value) => {
if (typeof value === 'string' && value !== '') {
return value;
}
else {
return null;
}
});
this.setAutoLeftWidth(validatePx(this.nzLeft));
this.setAutoRightWidth(validatePx(this.nzRight));
this.changes$.next();
}
}
NzCellFixedDirective.decorators = [
{ type: 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`
}
},] }
];
/** @nocollapse */
NzCellFixedDirective.ctorParameters = () => [
{ type: ChangeDetectorRef },
{ type: Renderer2 },
{ type: ElementRef }
];
NzCellFixedDirective.propDecorators = {
nzRight: [{ type: Input }],
nzLeft: [{ type: Input }],
colspan: [{ type: Input }]
};
if (false) {
/** @type {?} */
NzCellFixedDirective.prototype.nzRight;
/** @type {?} */
NzCellFixedDirective.prototype.nzLeft;
/** @type {?} */
NzCellFixedDirective.prototype.colspan;
/** @type {?} */
NzCellFixedDirective.prototype.changes$;
/** @type {?} */
NzCellFixedDirective.prototype.isFirstRight;
/** @type {?} */
NzCellFixedDirective.prototype.isLastLeft;
/** @type {?} */
NzCellFixedDirective.prototype.isAutoLeft;
/** @type {?} */
NzCellFixedDirective.prototype.isAutoRight;
/** @type {?} */
NzCellFixedDirective.prototype.isFixedLeft;
/** @type {?} */
NzCellFixedDirective.prototype.isFixedRight;
/** @type {?} */
NzCellFixedDirective.prototype.isFixed;
/**
* @type {?}
* @private
*/
NzCellFixedDirective.prototype.cdr;
/**
* @type {?}
* @private
*/
NzCellFixedDirective.prototype.renderer;
/**
* @type {?}
* @private
*/
NzCellFixedDirective.prototype.elementRef;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table-style.service.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTableStyleService {
constructor() {
this.theadTemplate$ = new ReplaySubject(1);
this.hasFixLeft$ = new ReplaySubject(1);
this.hasFixRight$ = new ReplaySubject(1);
this.hostWidth$ = new ReplaySubject(1);
this.columnCount$ = new ReplaySubject(1);
this.showEmpty$ = new ReplaySubject(1);
this.noResult$ = new ReplaySubject(1);
this.listOfThWidthConfigPx$ = new BehaviorSubject([]);
this.tableWidthConfigPx$ = new BehaviorSubject([]);
this.manualWidthConfigPx$ = combineLatest([this.tableWidthConfigPx$, this.listOfThWidthConfigPx$]).pipe(map((/**
* @param {?} __0
* @return {?}
*/
([widthConfig, listOfWidth]) => (widthConfig.length ? widthConfig : listOfWidth))));
this.listOfAutoWidthPx$ = new ReplaySubject(1);
this.listOfListOfThWidthPx$ = merge(this.manualWidthConfigPx$, combineLatest([this.listOfAutoWidthPx$, this.manualWidthConfigPx$]).pipe(map((/**
* @param {?} __0
* @return {?}
*/
([autoWidth, manualWidth]) => {
/** use autoWidth until column length match **/
return autoWidth.length !== manualWidth.length ? manualWidth : autoWidth;
}))));
this.listOfMeasureColumn$ = new ReplaySubject(1);
this.listOfListOfThWidth$ = this.listOfAutoWidthPx$.pipe(map((/**
* @param {?} list
* @return {?}
*/
list => list.map((/**
* @param {?} width
* @return {?}
*/
width => parseInt(width, 10))))));
this.enableAutoMeasure$ = new ReplaySubject(1);
}
/**
* @param {?} template
* @return {?}
*/
setTheadTemplate(template) {
this.theadTemplate$.next(template);
}
/**
* @param {?} hasFixLeft
* @return {?}
*/
setHasFixLeft(hasFixLeft) {
this.hasFixLeft$.next(hasFixLeft);
}
/**
* @param {?} hasFixRight
* @return {?}
*/
setHasFixRight(hasFixRight) {
this.hasFixRight$.next(hasFixRight);
}
/**
* @param {?} widthConfig
* @return {?}
*/
setTableWidthConfig(widthConfig) {
this.tableWidthConfigPx$.next(widthConfig);
}
/**
* @param {?} listOfTh
* @return {?}
*/
setListOfTh(listOfTh) {
/** @type {?} */
let columnCount = 0;
listOfTh.forEach((/**
* @param {?} th
* @return {?}
*/
th => {
columnCount += th.colspan || 1;
}));
/** @type {?} */
const listOfThPx = listOfTh.map((/**
* @param {?} item
* @return {?}
*/
item => item.nzWidth));
this.columnCount$.next(columnCount);
this.listOfThWidthConfigPx$.next(listOfThPx);
}
/**
* @param {?} listOfTh
* @return {?}
*/
setListOfMeasureColumn(listOfTh) {
/** @type {?} */
const listOfKeys = [];
listOfTh.forEach((/**
* @param {?} th
* @return {?}
*/
th => {
/** @type {?} */
const length = th.colspan || 1;
for (let i = 0; i < length; i++) {
listOfKeys.push(`measure_key_${i}`);
}
}));
this.listOfMeasureColumn$.next(listOfKeys);
}
/**
* @param {?} listOfAutoWidth
* @return {?}
*/
setListOfAutoWidth(listOfAutoWidth) {
this.listOfAutoWidthPx$.next(listOfAutoWidth.map((/**
* @param {?} width
* @return {?}
*/
width => `${width}px`)));
}
/**
* @param {?} showEmpty
* @return {?}
*/
setShowEmpty(showEmpty) {
this.showEmpty$.next(showEmpty);
}
/**
* @param {?} noResult
* @return {?}
*/
setNoResult(noResult) {
this.noResult$.next(noResult);
}
/**
* @param {?} scrollX
* @param {?} scrollY
* @return {?}
*/
setScroll(scrollX, scrollY) {
/** @type {?} */
const enableAutoMeasure = !!(scrollX || scrollY);
if (!enableAutoMeasure) {
this.setListOfAutoWidth([]);
}
this.enableAutoMeasure$.next(enableAutoMeasure);
}
}
NzTableStyleService.decorators = [
{ type: Injectable }
];
/** @nocollapse */
NzTableStyleService.ctorParameters = () => [];
if (false) {
/** @type {?} */
NzTableStyleService.prototype.theadTemplate$;
/** @type {?} */
NzTableStyleService.prototype.hasFixLeft$;
/** @type {?} */
NzTableStyleService.prototype.hasFixRight$;
/** @type {?} */
NzTableStyleService.prototype.hostWidth$;
/** @type {?} */
NzTableStyleService.prototype.columnCount$;
/** @type {?} */
NzTableStyleService.prototype.showEmpty$;
/** @type {?} */
NzTableStyleService.prototype.noResult$;
/**
* @type {?}
* @private
*/
NzTableStyleService.prototype.listOfThWidthConfigPx$;
/**
* @type {?}
* @private
*/
NzTableStyleService.prototype.tableWidthConfigPx$;
/**
* @type {?}
* @private
*/
NzTableStyleService.prototype.manualWidthConfigPx$;
/**
* @type {?}
* @private
*/
NzTableStyleService.prototype.listOfAutoWidthPx$;
/** @type {?} */
NzTableStyleService.prototype.listOfListOfThWidthPx$;
/** @type {?} */
NzTableStyleService.prototype.listOfMeasureColumn$;
/** @type {?} */
NzTableStyleService.prototype.listOfListOfThWidth$;
/** @type {?} */
NzTableStyleService.prototype.enableAutoMeasure$;
}
/**
* @fileoverview added by tsickle
* Generated from: src/cell/cell.directive.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTableCellDirective {
/**
* @param {?} nzTableStyleService
*/
constructor(nzTableStyleService) {
this.isInsideTable = false;
this.isInsideTable = !!nzTableStyleService;
}
}
NzTableCellDirective.decorators = [
{ type: 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'
}
},] }
];
/** @nocollapse */
NzTableCellDirective.ctorParameters = () => [
{ type: NzTableStyleService, decorators: [{ type: Optional }] }
];
if (false) {
/** @type {?} */
NzTableCellDirective.prototype.isInsideTable;
}
/**
* @fileoverview added by tsickle
* Generated from: src/cell/td-addon.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTdAddOnComponent {
constructor() {
this.nzChecked = false;
this.nzDisabled = false;
this.nzIndeterminate = false;
this.nzIndentSize = 0;
this.nzShowExpand = false;
this.nzShowCheckbox = false;
this.nzExpand = false;
this.nzCheckedChange = new EventEmitter();
this.nzExpandChange = new EventEmitter();
this.isNzShowExpandChanged = false;
this.isNzShowCheckboxChanged = false;
}
/**
* @param {?} checked
* @return {?}
*/
onCheckedChange(checked) {
this.nzChecked = checked;
this.nzCheckedChange.emit(checked);
}
/**
* @param {?} expand
* @return {?}
*/
onExpandChange(expand) {
this.nzExpand = expand;
this.nzExpandChange.emit(expand);
}
/**
* @param {?} changes
* @return {?}
*/
ngOnChanges(changes) {
/** @type {?} */
const isFirstChange = (/**
* @param {?} value
* @return {?}
*/
(value) => value && value.firstChange && value.currentValue !== undefined);
const { nzExpand, nzChecked, nzShowExpand, nzShowCheckbox } = changes;
if (nzShowExpand) {
this.isNzShowExpandChanged = true;
}
if (nzShowCheckbox) {
this.isNzShowCheckboxChanged = true;
}
if (isFirstChange(nzExpand) && !this.isNzShowExpandChanged) {
this.nzShowExpand = true;
}
if (isFirstChange(nzChecked) && !this.isNzShowCheckboxChanged) {
this.nzShowCheckbox = true;
}
}
}
NzTdAddOnComponent.decorators = [
{ type: Component, args: [{
selector: 'td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]',
changeDetection: ChangeDetectionStrategy.OnPush,
preserveWhitespaces: false,
encapsulation: ViewEncapsulation.None,
template: `
<ng-container *ngIf="nzShowExpand || nzIndentSize > 0">
<nz-row-indent [indentSize]="nzIndentSize"></nz-row-indent>
<button nz-row-expand-button [expand]="nzExpand" (expandChange)="onExpandChange($event)" [spaceMode]="!nzShowExpand"></button>
</ng-container>
<label
nz-checkbox
*ngIf="nzShowCheckbox"
[nzDisabled]="nzDisabled"
[ngModel]="nzChecked"
[nzIndeterminate]="nzIndeterminate"
(ngModelChange)="onCheckedChange($event)"
>
</label>
<ng-content></ng-content>
`,
host: {
'[class.ant-table-cell-with-append]': `nzShowExpand || nzIndentSize > 0`,
'[class.ant-table-selection-column]': `nzShowCheckbox`
}
}] }
];
NzTdAddOnComponent.propDecorators = {
nzChecked: [{ type: Input }],
nzDisabled: [{ type: Input }],
nzIndeterminate: [{ type: Input }],
nzIndentSize: [{ type: Input }],
nzShowExpand: [{ type: Input }],
nzShowCheckbox: [{ type: Input }],
nzExpand: [{ type: Input }],
nzCheckedChange: [{ type: Output }],
nzExpandChange: [{ type: Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTdAddOnComponent.prototype, "nzShowExpand", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTdAddOnComponent.prototype, "nzShowCheckbox", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTdAddOnComponent.prototype, "nzExpand", void 0);
if (false) {
/** @type {?} */
NzTdAddOnComponent.ngAcceptInputType_nzShowExpand;
/** @type {?} */
NzTdAddOnComponent.ngAcceptInputType_nzShowCheckbox;
/** @type {?} */
NzTdAddOnComponent.ngAcceptInputType_nzExpand;
/** @type {?} */
NzTdAddOnComponent.prototype.nzChecked;
/** @type {?} */
NzTdAddOnComponent.prototype.nzDisabled;
/** @type {?} */
NzTdAddOnComponent.prototype.nzIndeterminate;
/** @type {?} */
NzTdAddOnComponent.prototype.nzIndentSize;
/** @type {?} */
NzTdAddOnComponent.prototype.nzShowExpand;
/** @type {?} */
NzTdAddOnComponent.prototype.nzShowCheckbox;
/** @type {?} */
NzTdAddOnComponent.prototype.nzExpand;
/** @type {?} */
NzTdAddOnComponent.prototype.nzCheckedChange;
/** @type {?} */
NzTdAddOnComponent.prototype.nzExpandChange;
/**
* @type {?}
* @private
*/
NzTdAddOnComponent.prototype.isNzShowExpandChanged;
/**
* @type {?}
* @private
*/
NzTdAddOnComponent.prototype.isNzShowCheckboxChanged;
}
/**
* @fileoverview added by tsickle
* Generated from: src/cell/th-addon.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzThAddOnComponent {
/**
* @param {?} cdr
*/
constructor(cdr) {
this.cdr = cdr;
this.manualClickOrder$ = new Subject();
this.calcOperatorChange$ = new Subject();
this.nzFilterValue = null;
this.sortOrder = null;
this.sortDirections = ['ascend', 'descend', null];
this.sortOrderChange$ = new Subject();
this.destroy$ = new Subject();
this.isNzShowSortChanged = false;
this.isNzShowFilterChanged = false;
this.nzFilterMultiple = true;
this.nzSortOrder = null;
this.nzSortPriority = false;
this.nzSortDirections = ['ascend', 'descend', null];
this.nzFilters = [];
this.nzSortFn = null;
this.nzFilterFn = null;
this.nzShowSort = false;
this.nzShowFilter = false;
this.nzCustomFilter = false;
this.nzCheckedChange = new EventEmitter();
this.nzSortOrderChange = new EventEmitter();
this.nzFilterChange = new EventEmitter();
/**
* @deprecated use nzSortOrder instead *
*/
this.nzSort = null;
/**
* @deprecated use nzSortOrderChange instead *
*/
this.nzSortChange = new EventEmitter();
}
/**
* @param {?} sortDirections
* @param {?} current
* @return {?}
*/
getNextSortDirection(sortDirections, current) {
/** @type {?} */
const index = sortDirections.indexOf(current);
if (index === sortDirections.length - 1) {
return sortDirections[0];
}
else {
return sortDirections[index + 1];
}
}
/**
* @return {?}
*/
emitNextSortValue() {
if (this.nzShowSort) {
/** @type {?} */
const nextOrder = this.getNextSortDirection(this.sortDirections, (/** @type {?} */ (this.sortOrder)));
this.setSortOrder(nextOrder);
this.manualClickOrder$.next(this);
}
}
/**
* @param {?} order
* @return {?}
*/
setSortOrder(order) {
this.sortOrderChange$.next(order);
}
/**
* @return {?}
*/
clearSortOrder() {
if (this.sortOrder !== null) {
this.setSortOrder(null);
}
}
/**
* @param {?} value
* @return {?}
*/
onFilterValueChange(value) {
this.nzFilterChange.emit(value);
this.nzFilterValue = value;
this.updateCalcOperator();
}
/**
* @return {?}
*/
updateCalcOperator() {
this.calcOperatorChange$.next();
}
/**
* @return {?}
*/
ngOnInit() {
this.sortOrderChange$.pipe(takeUntil(this.destroy$)).subscribe((/**
* @param {?} order
* @return {?}
*/
order => {
if (this.sortOrder !== order) {
this.sortOrder = order;
this.nzSortChange.emit(order);
this.nzSortOrderChange.emit(order);
}
this.updateCalcOperator();
this.cdr.markForCheck();
}));
}
/**
* @param {?} changes
* @return {?}
*/
ngOnChanges(changes) {
const { nzSortKey, nzSort, nzSortDirections, nzFilters, nzSortOrder, nzSortFn, nzFilterFn, nzSortPriority, nzFilterMultiple, nzShowSort, nzShowFilter } = changes;
if (nzSortDirections) {
if (this.nzSortDirections && this.nzSortDirections.length) {
this.sortDirections = this.nzSortDirections;
}
}
if (nzSort) {
this.sortOrder = this.nzSort;
this.setSortOrder(this.nzSort);
warnDeprecation(`'nzSort' and 'nzSortChange' is deprecated and will be removed in 10.0.0. Please use 'nzSortOrder' and 'nzSortOrderChange' instead.`);
}
if (nzSortKey) {
this.nzColumnKey = this.nzSortKey;
warnDeprecation(`'nzSortKey' is deprecated and will be removed in 10.0.0. Please use 'nzColumnKey' instead.`);
}
if (nzSortOrder) {
this.sortOrder = this.nzSortOrder;
this.setSortOrder(this.nzSortOrder);
}
if (nzShowSort) {
this.isNzShowSortChanged = true;
}
if (nzShowFilter) {
this.isNzShowFilterChanged = true;
}
/** @type {?} */
const isFirstChange = (/**
* @param {?} value
* @return {?}
*/
(value) => value && value.firstChange && value.currentValue !== undefined);
if ((isFirstChange(nzSortKey) || isFirstChange(nzSort) || isFirstChange(nzSortOrder) || isFirstChange(nzSortFn)) &&
!this.isNzShowSortChanged) {
this.nzShowSort = true;
}
if (isFirstChange(nzFilters) && !this.isNzShowFilterChanged) {
this.nzShowFilter = true;
}
if ((nzFilters || nzFilterMultiple) && this.nzShowFilter) {
/** @type {?} */
const listOfValue = this.nzFilters.filter((/**
* @param {?} item
* @return {?}
*/
item => item.byDefault)).map((/**
* @param {?} item
* @return {?}
*/
item => item.value));
this.nzFilterValue = this.nzFilterMultiple ? listOfValue : listOfValue[0] || null;
}
if (nzSortFn || nzFilterFn || nzSortPriority || nzFilters) {
this.updateCalcOperator();
}
}
/**
* @return {?}
*/
ngOnDestroy() {
this.destroy$.next();
this.destroy$.complete();
}
}
NzThAddOnComponent.decorators = [
{ type: Component, args: [{
selector: 'th[nzSortKey], th[nzColumnKey], th[nzSort], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]',
preserveWhitespaces: false,
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<nz-table-filter
*ngIf="nzShowFilter || nzCustomFilter; else notFilterTemplate"
[contentTemplate]="notFilterTemplate"
[extraTemplate]="extraTemplate"
[customFilter]="nzCustomFilter"
[filterMultiple]="nzFilterMultiple"
[listOfFilter]="nzFilters"
(filterChange)="onFilterValueChange($event)"
></nz-table-filter>
<ng-template #notFilterTemplate>
<ng-template [ngTemplateOutlet]="nzShowSort ? sortTemplate : contentTemplate"></ng-template>
</ng-template>
<ng-template #extraTemplate>
<ng-content select="[nz-th-extra]"></ng-content>
<ng-content select="nz-filter-trigger"></ng-content>
</ng-template>
<ng-template #sortTemplate>
<nz-table-sorters [sortOrder]="sortOrder" [sortDirections]="sortDirections" [contentTemplate]="contentTemplate"></nz-table-sorters>
</ng-template>
<ng-template #contentTemplate>
<ng-content></ng-content>
</ng-template>
`,
host: {
'[class.ant-table-column-has-sorters]': 'nzShowSort',
'[class.ant-table-column-sort]': `sortOrder === 'descend' || sortOrder === 'ascend'`,
'(click)': 'emitNextSortValue()'
}
}] }
];
/** @nocollapse */
NzThAddOnComponent.ctorParameters = () => [
{ type: ChangeDetectorRef }
];
NzThAddOnComponent.propDecorators = {
nzColumnKey: [{ type: Input }],
nzFilterMultiple: [{ type: Input }],
nzSortOrder: [{ type: Input }],
nzSortPriority: [{ type: Input }],
nzSortDirections: [{ type: Input }],
nzFilters: [{ type: Input }],
nzSortFn: [{ type: Input }],
nzFilterFn: [{ type: Input }],
nzShowSort: [{ type: Input }],
nzShowFilter: [{ type: Input }],
nzCustomFilter: [{ type: Input }],
nzCheckedChange: [{ type: Output }],
nzSortOrderChange: [{ type: Output }],
nzFilterChange: [{ type: Output }],
nzSortKey: [{ type: Input }],
nzSort: [{ type: Input }],
nzSortChange: [{ type: Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzThAddOnComponent.prototype, "nzShowSort", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzThAddOnComponent.prototype, "nzShowFilter", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzThAddOnComponent.prototype, "nzCustomFilter", void 0);
if (false) {
/** @type {?} */
NzThAddOnComponent.ngAcceptInputType_nzShowSort;
/** @type {?} */
NzThAddOnComponent.ngAcceptInputType_nzShowFilter;
/** @type {?} */
NzThAddOnComponent.ngAcceptInputType_nzCustomFilter;
/** @type {?} */
NzThAddOnComponent.prototype.manualClickOrder$;
/** @type {?} */
NzThAddOnComponent.prototype.calcOperatorChange$;
/** @type {?} */
NzThAddOnComponent.prototype.nzFilterValue;
/** @type {?} */
NzThAddOnComponent.prototype.sortOrder;
/** @type {?} */
NzThAddOnComponent.prototype.sortDirections;
/**
* @type {?}
* @private
*/
NzThAddOnComponent.prototype.sortOrderChange$;
/**
* @type {?}
* @private
*/
NzThAddOnComponent.prototype.destroy$;
/**
* @type {?}
* @private
*/
NzThAddOnComponent.prototype.isNzShowSortChanged;
/**
* @type {?}
* @private
*/
NzThAddOnComponent.prototype.isNzShowFilterChanged;
/** @type {?} */
NzThAddOnComponent.prototype.nzColumnKey;
/** @type {?} */
NzThAddOnComponent.prototype.nzFilterMultiple;
/** @type {?} */
NzThAddOnComponent.prototype.nzSortOrder;
/** @type {?} */
NzThAddOnComponent.prototype.nzSortPriority;
/** @type {?} */
NzThAddOnComponent.prototype.nzSortDirections;
/** @type {?} */
NzThAddOnComponent.prototype.nzFilters;
/** @type {?} */
NzThAddOnComponent.prototype.nzSortFn;
/** @type {?} */
NzThAddOnComponent.prototype.nzFilterFn;
/** @type {?} */
NzThAddOnComponent.prototype.nzShowSort;
/** @type {?} */
NzThAddOnComponent.prototype.nzShowFilter;
/** @type {?} */
NzThAddOnComponent.prototype.nzCustomFilter;
/** @type {?} */
NzThAddOnComponent.prototype.nzCheckedChange;
/** @type {?} */
NzThAddOnComponent.prototype.nzSortOrderChange;
/** @type {?} */
NzThAddOnComponent.prototype.nzFilterChange;
/**
* @deprecated use nzColumnKey instead *
* @type {?}
*/
NzThAddOnComponent.prototype.nzSortKey;
/**
* @deprecated use nzSortOrder instead *
* @type {?}
*/
NzThAddOnComponent.prototype.nzSort;
/**
* @deprecated use nzSortOrderChange instead *
* @type {?}
*/
NzThAddOnComponent.prototype.nzSortChange;
/**
* @type {?}
* @private
*/
NzThAddOnComponent.prototype.cdr;
}
/**
* @fileoverview added by tsickle
* Generated from: src/cell/th-measure.directive.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzThMeasureDirective {
constructor() {
this.changes$ = new Subject();
this.nzWidth = null;
this.colspan = null;
}
/**
* @param {?} changes
* @return {?}
*/
ngOnChanges(changes) {
const { nzWidth, colspan } = changes;
if (nzWidth || colspan) {
this.changes$.next();
}
}
}
NzThMeasureDirective.decorators = [
{ type: Directive, args: [{
selector: 'th'
},] }
];
NzThMeasureDirective.propDecorators = {
nzWidth: [{ type: Input }],
colspan: [{ type: Input }]
};
if (false) {
/** @type {?} */
NzThMeasureDirective.prototype.changes$;
/** @type {?} */
NzThMeasureDirective.prototype.nzWidth;
/** @type {?} */
NzThMeasureDirective.prototype.colspan;
}
/**
* @fileoverview added by tsickle
* Generated from: src/cell/th-selection.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzThSelectionComponent {
constructor() {
this.nzSelections = [];
this.nzChecked = false;
this.nzDisabled = false;
this.nzIndeterminate = false;
this.nzShowCheckbox = false;
this.nzShowRowSelection = false;
this.nzCheckedChange = new EventEmitter();
this.nzSortChangeWithKey = new EventEmitter();
}
/**
* @param {?} checked
* @return {?}
*/
onCheckedChange(checked) {
this.nzChecked = checked;
this.nzCheckedChange.emit(checked);
}
/**
* @param {?} changes
* @return {?}
*/
ngOnChanges(changes) {
const { nzChecked, nzSelections } = changes;
/** @type {?} */
const isShowCheckbox = nzChecked && nzChecked.firstChange;
if (isShowCheckbox) {
this.nzShowCheckbox = true;
}
/** @type {?} */
const isShowSelections = nzSelections && nzSelections.firstChange;
if (isShowSelections) {
this.nzShowRowSelection = true;
}
}
}
NzThSelectionComponent.decorators = [
{ type: Component, args: [{
selector: 'th[nzSelections],th[nzChecked],th[nzShowCheckbox],th[nzShowRowSelection]',
preserveWhitespaces: false,
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<nz-table-selection
[checked]="nzChecked"
[disabled]="nzDisabled"
[indeterminate]="nzIndeterminate"
[listOfSelections]="nzSelections"
[showCheckbox]="nzShowCheckbox"
[showRowSelection]="nzShowRowSelection"
(checkedChange)="onCheckedChange($event)"
></nz-table-selection>
<ng-content></ng-content>
`,
host: {
'[class.ant-table-selection-column]': 'true'
}
}] }
];
NzThSelectionComponent.propDecorators = {
nzSelections: [{ type: Input }],
nzChecked: [{ type: Input }],
nzDisabled: [{ type: Input }],
nzIndeterminate: [{ type: Input }],
nzShowCheckbox: [{ type: Input }],
nzShowRowSelection: [{ type: Input }],
nzCheckedChange: [{ type: Output }],
nzSortChangeWithKey: [{ type: Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzThSelectionComponent.prototype, "nzShowCheckbox", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzThSelectionComponent.prototype, "nzShowRowSelection", void 0);
if (false) {
/** @type {?} */
NzThSelectionComponent.ngAcceptInputType_nzShowCheckbox;
/** @type {?} */
NzThSelectionComponent.ngAcceptInputType_nzShowRowSelection;
/** @type {?} */
NzThSelectionComponent.prototype.nzSelections;
/** @type {?} */
NzThSelectionComponent.prototype.nzChecked;
/** @type {?} */
NzThSelectionComponent.prototype.nzDisabled;
/** @type {?} */
NzThSelectionComponent.prototype.nzIndeterminate;
/** @type {?} */
NzThSelectionComponent.prototype.nzShowCheckbox;
/** @type {?} */
NzThSelectionComponent.prototype.nzShowRowSelection;
/** @type {?} */
NzThSelectionComponent.prototype.nzCheckedChange;
/** @type {?} */
NzThSelectionComponent.prototype.nzSortChangeWithKey;
}
/**
* @fileoverview added by tsickle
* Generated from: src/styled/align.directive.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzCellAlignDirective {
constructor() {
this.nzAlign = null;
}
}
NzCellAlignDirective.decorators = [
{ type: Directive, args: [{
selector: 'th[nzAlign],td[nzAlign]',
host: {
'[style.text-align]': 'nzAlign'
}
},] }
];
NzCellAlignDirective.propDecorators = {
nzAlign: [{ type: Input }]
};
if (false) {
/** @type {?} */
NzCellAlignDirective.prototype.nzAlign;
}
/**
* @fileoverview added by tsickle
* Generated from: src/styled/ellipsis.directive.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzCellEllipsisDirective {
constructor() {
this.nzEllipsis = true;
}
}
NzCellEllipsisDirective.decorators = [
{ type: Directive, args: [{
selector: 'th[nzEllipsis],td[nzEllipsis]',
host: {
'[class.ant-table-cell-ellipsis]': 'nzEllipsis'
}
},] }
];
NzCellEllipsisDirective.propDecorators = {
nzEllipsis: [{ type: Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCellEllipsisDirective.prototype, "nzEllipsis", void 0);
if (false) {
/** @type {?} */
NzCellEllipsisDirective.ngAcceptInputType_nzEllipsis;
/** @type {?} */
NzCellEllipsisDirective.prototype.nzEllipsis;
}
/**
* @fileoverview added by tsickle
* Generated from: src/styled/word-break.directive.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzCellBreakWordDirective {
constructor() {
this.nzBreakWord = true;
}
}
NzCellBreakWordDirective.decorators = [
{ type: Directive, args: [{
selector: 'th[nzBreakWord],td[nzBreakWord]',
host: {
'[style.word-break]': `nzBreakWord ? 'break-all' : ''`
}
},] }
];
NzCellBreakWordDirective.propDecorators = {
nzBreakWord: [{ type: Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCellBreakWordDirective.prototype, "nzBreakWord", void 0);
if (false) {
/** @type {?} */
NzCellBreakWordDirective.ngAcceptInputType_nzBreakWord;
/** @type {?} */
NzCellBreakWordDirective.prototype.nzBreakWord;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table/table-content.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTableContentComponent {
constructor() {
this.tableLayout = 'auto';
this.theadTemplate = null;
this.contentTemplate = null;
this.listOfColWidth = [];
this.scrollX = null;
}
}
NzTableContentComponent.decorators = [
{ type: Component, args: [{
selector: 'table[nz-table-content]',
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: `
<col [style.width]="width" [style.minWidth]="width" *ngFor="let width of listOfColWidth" />
<thead class="ant-table-thead" *ngIf="theadTemplate">
<ng-template [ngTemplateOutlet]="theadTemplate"></ng-template>
</thead>
<ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
<ng-content></ng-content>
`,
host: {
'[style.table-layout]': 'tableLayout',
'[class.ant-table-fixed]': 'scrollX',
'[style.width]': 'scrollX',
'[style.min-width]': `scrollX ? '100%': null`
}
}] }
];
NzTableContentComponent.propDecorators = {
tableLayout: [{ type: Input }],
theadTemplate: [{ type: Input }],
contentTemplate: [{ type: Input }],
listOfColWidth: [{ type: Input }],
scrollX: [{ type: Input }]
};
if (false) {
/** @type {?} */
NzTableContentComponent.prototype.tableLayout;
/** @type {?} */
NzTableContentComponent.prototype.theadTemplate;
/** @type {?} */
NzTableContentComponent.prototype.contentTemplate;
/** @type {?} */
NzTableContentComponent.prototype.listOfColWidth;
/** @type {?} */
NzTableContentComponent.prototype.scrollX;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table/table-fixed-row.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTableFixedRowComponent {
/**
* @param {?} nzTableStyleService
* @param {?} renderer
*/
constructor(nzTableStyleService, renderer) {
this.nzTableStyleService = nzTableStyleService;
this.renderer = renderer;
this.hostWidth$ = new BehaviorSubject(null);
this.enableAutoMeasure$ = new BehaviorSubject(false);
this.destroy$ = new Subject();
}
/**
* @return {?}
*/
ngOnInit() {
if (this.nzTableStyleService) {
const { enableAutoMeasure$, hostWidth$ } = this.nzTableStyleService;
enableAutoMeasure$.subscribe(this.enableAutoMeasure$);
hostWidth$.subscribe(this.hostWidth$);
}
}
/**
* @return {?}
*/
ngAfterViewInit() {
this.nzTableStyleService.columnCount$.pipe(takeUntil(this.destroy$)).subscribe((/**
* @param {?} count
* @return {?}
*/
count => {
this.renderer.setAttribute(this.tdElement.nativeElement, 'colspan', `${count}`);
}));
}
/**
* @return {?}
*/
ngOnDestroy() {
this.destroy$.next();
this.destroy$.complete();
}
}
NzTableFixedRowComponent.decorators = [
{ type: Component, args: [{
selector: 'tr[nz-table-fixed-row], tr[nzExpand]',
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: `
<td class="nz-disable-td ant-table-cell" #tdElement>
<div
class="ant-table-expanded-row-fixed"
*ngIf="enableAutoMeasure$ | async; else contentTemplate"
style="position: sticky; left: 0px; overflow: hidden;"
[style.width.px]="hostWidth$ | async"
>
<ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
</div>
</td>
<ng-template #contentTemplate><ng-content></ng-content></ng-template>
`
}] }
];
/** @nocollapse */
NzTableFixedRowComponent.ctorParameters = () => [
{ type: NzTableStyleService },
{ type: Renderer2 }
];
NzTableFixedRowComponent.propDecorators = {
tdElement: [{ type: ViewChild, args: ['tdElement',] }]
};
if (false) {
/** @type {?} */
NzTableFixedRowComponent.prototype.tdElement;
/** @type {?} */
NzTableFixedRowComponent.prototype.hostWidth$;
/** @type {?} */
NzTableFixedRowComponent.prototype.enableAutoMeasure$;
/**
* @type {?}
* @private
*/
NzTableFixedRowComponent.prototype.destroy$;
/**
* @type {?}
* @private
*/
NzTableFixedRowComponent.prototype.nzTableStyleService;
/**
* @type {?}
* @private
*/
NzTableFixedRowComponent.prototype.renderer;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table/table-inner-default.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTableInnerDefaultComponent {
constructor() {
this.tableLayout = 'auto';
this.listOfColWidth = [];
this.theadTemplate = null;
this.contentTemplate = null;
}
}
NzTableInnerDefaultComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-table-inner-default',
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: `
<div class="ant-table-content">
<table
nz-table-content
[contentTemplate]="contentTemplate"
[tableLayout]="tableLayout"
[listOfColWidth]="listOfColWidth"
[theadTemplate]="theadTemplate"
></table>
</div>
`,
host: {
'[class.ant-table-container]': 'true'
}
}] }
];
NzTableInnerDefaultComponent.propDecorators = {
tableLayout: [{ type: Input }],
listOfColWidth: [{ type: Input }],
theadTemplate: [{ type: Input }],
contentTemplate: [{ type: Input }]
};
if (false) {
/** @type {?} */
NzTableInnerDefaultComponent.prototype.tableLayout;
/** @type {?} */
NzTableInnerDefaultComponent.prototype.listOfColWidth;
/** @type {?} */
NzTableInnerDefaultComponent.prototype.theadTemplate;
/** @type {?} */
NzTableInnerDefaultComponent.prototype.contentTemplate;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table/table-inner-scroll.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTableInnerScrollComponent {
/**
* @param {?} renderer
* @param {?} ngZone
* @param {?} platform
* @param {?} resizeService
*/
constructor(renderer, ngZone, platform, resizeService) {
this.renderer = renderer;
this.ngZone = ngZone;
this.platform = platform;
this.resizeService = resizeService;
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 = (/**
* @param {?} index
* @return {?}
*/
index => index);
this.headerStyleMap = {};
this.bodyStyleMap = {};
this.verticalScrollBarWidth = 0;
this.noDateVirtualHeight = '182px';
this.data$ = new Subject();
this.scroll$ = new Subject();
this.destroy$ = new Subject();
}
/**
* @param {?=} clear
* @return {?}
*/
setScrollPositionClassName(clear = false) {
const { scrollWidth, scrollLeft, clientWidth } = this.tableBodyElement.nativeElement;
/** @type {?} */
const leftClassName = 'ant-table-ping-left';
/** @type {?} */
const rightClassName = 'ant-table-ping-right';
if ((scrollWidth === clientWidth && scrollWidth !== 0) || clear) {
this.renderer.removeClass(this.tableMainElement, leftClassName);
this.renderer.removeClass(this.tableMainElement, rightClassName);
}
else if (scrollLeft === 0) {
this.renderer.removeClass(this.tableMainElement, leftClassName);
this.renderer.addClass(this.tableMainElement, rightClassName);
}
else if (scrollWidth === scrollLeft + clientWidth) {
this.renderer.removeClass(this.tableMainElement, rightClassName);
this.renderer.addClass(this.tableMainElement, leftClassName);
}
else {
this.renderer.addClass(this.tableMainElement, leftClassName);
this.renderer.addClass(this.tableMainElement, rightClassName);
}
}
/**
* @param {?} changes
* @return {?}
*/
ngOnChanges(changes) {
const { scrollX, scrollY, data } = changes;
if (scrollX || scrollY) {
/** @type {?} */
const hasVerticalScrollBar = this.verticalScrollBarWidth !== 0;
this.headerStyleMap = {
overflowX: 'hidden',
overflowY: this.scrollY && hasVerticalScrollBar ? 'scroll' : 'hidden'
};
this.bodyStyleMap = {
overflowY: this.scrollY ? 'scroll' : null,
overflowX: this.scrollX ? 'scroll' : null,
maxHeight: this.scrollY
};
this.scroll$.next();
}
if (data) {
this.data$.next();
}
}
/**
* @return {?}
*/
ngAfterViewInit() {
if (this.platform.isBrowser) {
this.ngZone.runOutsideAngular((/**
* @return {?}
*/
() => {
/** @type {?} */
const scrollEvent$ = fromEvent(this.tableBodyElement.nativeElement, 'scroll').pipe(takeUntil(this.destroy$));
/** @type {?} */
const scrollX$ = scrollEvent$.pipe(filter((/**
* @return {?}
*/
() => !!this.scrollX)));
/** @type {?} */
const scrollY$ = scrollEvent$.pipe(filter((/**
* @return {?}
*/
() => !!this.scrollY)));
/** @type {?} */
const resize$ = this.resizeService.subscribe().pipe(takeUntil(this.destroy$));
/** @type {?} */
const data$ = this.data$.pipe(takeUntil(this.destroy$));
/** @type {?} */
const setClassName$ = merge(scrollX$, resize$, data$, this.scroll$).pipe(startWith(true), delay(0));
setClassName$.subscribe((/**
* @return {?}
*/
() => this.setScrollPositionClassName()));
scrollY$.subscribe((/**
* @return {?}
*/
() => (this.tableHeaderElement.nativeElement.scrollLeft = this.tableBodyElement.nativeElement.scrollLeft)));
}));
}
}
/**
* @return {?}
*/
ngOnDestroy() {
this.setScrollPositionClassName(true);
this.destroy$.next();
this.destroy$.complete();
}
}
NzTableInnerScrollComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-table-inner-scroll',
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: `
<div class="ant-table-content">
<div *ngIf="scrollY" #tableHeaderElement [ngStyle]="headerStyleMap" class="ant-table-header nz-table-hide-scrollbar">
<table
nz-table-content
tableLayout="fixed"
[scrollX]="scrollX"
[listOfColWidth]="listOfColWidth"
[theadTemplate]="theadTemplate"
></table>
</div>
<div #tableBodyElement *ngIf="!virtualTemplate" class="ant-table-body" [ngStyle]="bodyStyleMap">
<table
nz-table-content
[scrollX]="scrollX"
tableLayout="fixed"
[listOfColWidth]="listOfColWidth"
[theadTemplate]="scrollY ? null : theadTemplate"
[contentTemplate]="contentTemplate"
></table>
</div>
<cdk-virtual-scroll-viewport
#tableBodyElement
*ngIf="virtualTemplate"
[itemSize]="virtualItemSize"
[maxBufferPx]="virtualMaxBufferPx"
[minBufferPx]="virtualMinBufferPx"
[style.height]="data.length ? scrollY : noDateVirtualHeight"
>
<table nz-table-content tableLayout="fixed" [scrollX]="scrollX" [listOfColWidth]="listOfColWidth">
<tbody>
<ng-container *cdkVirtualFor="let item of data; let i = index; trackBy: virtualForTrackBy">
<ng-template [ngTemplateOutlet]="virtualTemplate" [ngTemplateOutletContext]="{ $implicit: item, index: i }"></ng-template>
</ng-container>
</tbody>
</table>
</cdk-virtual-scroll-viewport>
</div>
`,
host: {
'[class.ant-table-container]': 'true'
}
}] }
];
/** @nocollapse */
NzTableInnerScrollComponent.ctorParameters = () => [
{ type: Renderer2 },
{ type: NgZone },
{ type: Platform },
{ type: NzResizeService }
];
NzTableInnerScrollComponent.propDecorators = {
data: [{ type: Input }],
scrollX: [{ type: Input }],
scrollY: [{ type: Input }],
contentTemplate: [{ type: Input }],
widthConfig: [{ type: Input }],
listOfColWidth: [{ type: Input }],
theadTemplate: [{ type: Input }],
virtualTemplate: [{ type: Input }],
virtualItemSize: [{ type: Input }],
virtualMaxBufferPx: [{ type: Input }],
virtualMinBufferPx: [{ type: Input }],
tableMainElement: [{ type: Input }],
virtualForTrackBy: [{ type: Input }],
tableHeaderElement: [{ type: ViewChild, args: ['tableHeaderElement', { read: ElementRef },] }],
tableBodyElement: [{ type: ViewChild, args: ['tableBodyElement', { read: ElementRef },] }],
cdkVirtualScrollViewport: [{ type: ViewChild, args: [CdkVirtualScrollViewport, { read: CdkVirtualScrollViewport },] }],
verticalScrollBarWidth: [{ type: Input }]
};
if (false) {
/** @type {?} */
NzTableInnerScrollComponent.prototype.data;
/** @type {?} */
NzTableInnerScrollComponent.prototype.scrollX;
/** @type {?} */
NzTableInnerScrollComponent.prototype.scrollY;
/** @type {?} */
NzTableInnerScrollComponent.prototype.contentTemplate;
/** @type {?} */
NzTableInnerScrollComponent.prototype.widthConfig;
/** @type {?} */
NzTableInnerScrollComponent.prototype.listOfColWidth;
/** @type {?} */
NzTableInnerScrollComponent.prototype.theadTemplate;
/** @type {?} */
NzTableInnerScrollComponent.prototype.virtualTemplate;
/** @type {?} */
NzTableInnerScrollComponent.prototype.virtualItemSize;
/** @type {?} */
NzTableInnerScrollComponent.prototype.virtualMaxBufferPx;
/** @type {?} */
NzTableInnerScrollComponent.prototype.virtualMinBufferPx;
/** @type {?} */
NzTableInnerScrollComponent.prototype.tableMainElement;
/** @type {?} */
NzTableInnerScrollComponent.prototype.virtualForTrackBy;
/** @type {?} */
NzTableInnerScrollComponent.prototype.tableHeaderElement;
/** @type {?} */
NzTableInnerScrollComponent.prototype.tableBodyElement;
/** @type {?} */
NzTableInnerScrollComponent.prototype.cdkVirtualScrollViewport;
/** @type {?} */
NzTableInnerScrollComponent.prototype.headerStyleMap;
/** @type {?} */
NzTableInnerScrollComponent.prototype.bodyStyleMap;
/** @type {?} */
NzTableInnerScrollComponent.prototype.verticalScrollBarWidth;
/** @type {?} */
NzTableInnerScrollComponent.prototype.noDateVirtualHeight;
/**
* @type {?}
* @private
*/
NzTableInnerScrollComponent.prototype.data$;
/**
* @type {?}
* @private
*/
NzTableInnerScrollComponent.prototype.scroll$;
/**
* @type {?}
* @private
*/
NzTableInnerScrollComponent.prototype.destroy$;
/**
* @type {?}
* @private
*/
NzTableInnerScrollComponent.prototype.renderer;
/**
* @type {?}
* @private
*/
NzTableInnerScrollComponent.prototype.ngZone;
/**
* @type {?}
* @private
*/
NzTableInnerScrollComponent.prototype.platform;
/**
* @type {?}
* @private
*/
NzTableInnerScrollComponent.prototype.resizeService;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table/table-virtual-scroll.directive.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTableVirtualScrollDirective {
/**
* @param {?} templateRef
*/
constructor(templateRef) {
this.templateRef = templateRef;
}
}
NzTableVirtualScrollDirective.decorators = [
{ type: Directive, args: [{
selector: '[nz-virtual-scroll]',
exportAs: 'nzVirtualScroll'
},] }
];
/** @nocollapse */
NzTableVirtualScrollDirective.ctorParameters = () => [
{ type: TemplateRef }
];
if (false) {
/** @type {?} */
NzTableVirtualScrollDirective.prototype.templateRef;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table-data.service.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTableDataService {
constructor() {
this.destroy$ = new Subject();
this.pageIndex$ = new BehaviorSubject(1);
this.frontPagination$ = new BehaviorSubject(true);
this.pageSize$ = new BehaviorSubject(10);
this.listOfData$ = new BehaviorSubject([]);
this.pageIndexDistinct$ = this.pageIndex$.pipe(distinctUntilChanged());
this.pageSizeDistinct$ = this.pageSize$.pipe(distinctUntilChanged());
this.listOfCalcOperator$ = new BehaviorSubject([]);
this.queryParams$ = combineLatest([
this.pageIndexDistinct$,
this.pageSizeDistinct$,
this.listOfCalcOperator$
]).pipe(debounceTime(300), skip(1), map((/**
* @param {?} __0
* @return {?}
*/
([pageIndex, pageSize, listOfCalc]) => {
return {
pageIndex,
pageSize,
sort: listOfCalc
.filter((/**
* @param {?} item
* @return {?}
*/
item => item.sortFn))
.map((/**
* @param {?} item
* @return {?}
*/
item => {
return {
key: (/** @type {?} */ (item.key)),
value: item.sortOrder
};
})),
filter: listOfCalc
.filter((/**
* @param {?} item
* @return {?}
*/
item => item.filterFn))
.map((/**
* @param {?} item
* @return {?}
*/
item => {
return {
key: (/** @type {?} */ (item.key)),
value: item.filterValue
};
}))
};
})));
this.listOfDataAfterCalc$ = combineLatest([this.listOfData$, this.listOfCalcOperator$]).pipe(map((/**
* @param {?} __0
* @return {?}
*/
([listOfData, listOfCalcOperator]) => {
/** @type {?} */
let listOfDataAfterCalc = [...listOfData];
/** @type {?} */
const listOfFilterOperator = listOfCalcOperator.filter((/**
* @param {?} item
* @return {?}
*/
item => {
const { filterValue, filterFn } = item;
/** @type {?} */
const isReset = filterValue === null || filterValue === undefined || (Array.isArray(filterValue) && (/** @type {?} */ (filterValue)).length === 0);
return !isReset && typeof filterFn === 'function';
}));
for (const item of listOfFilterOperator) {
const { filterFn, filterValue } = item;
listOfDataAfterCalc = listOfDataAfterCalc.filter((/**
* @param {?} data
* @return {?}
*/
data => ((/** @type {?} */ (filterFn)))(filterValue, data)));
}
/** @type {?} */
const listOfSortOperator = listOfCalcOperator
.filter((/**
* @param {?} item
* @return {?}
*/
item => item.sortOrder !== null && typeof item.sortFn === 'function'))
.sort((/**
* @param {?} a
* @param {?} b
* @return {?}
*/
(a, b) => +b.sortPriority - +a.sortPriority));
listOfDataAfterCalc.sort((/**
* @param {?} record1
* @param {?} record2
* @return {?}
*/
(record1, record2) => {
for (const item of listOfSortOperator) {
const { sortFn, sortOrder } = item;
if (sortFn && sortOrder) {
/** @type {?} */
const compareResult = ((/** @type {?} */ (sortFn)))(record1, record2, sortOrder);
if (compareResult !== 0) {
return sortOrder === 'ascend' ? compareResult : -compareResult;
}
}
}
return 0;
}));
return listOfDataAfterCalc;
})));
this.listOfFrontEndCurrentPageData$ = combineLatest([this.pageIndexDistinct$, this.pageSizeDistinct$, this.listOfDataAfterCalc$]).pipe(takeUntil(this.destroy$), filter((/**
* @param {?} value
* @return {?}
*/
value => {
const [pageIndex, pageSize, listOfData] = value;
/** @type {?} */
const maxPageIndex = Math.ceil(listOfData.length / pageSize) || 1;
return pageIndex <= maxPageIndex;
})), map((/**
* @param {?} __0
* @return {?}
*/
([pageIndex, pageSize, listOfData]) => {
return listOfData.slice((pageIndex - 1) * pageSize, pageIndex * pageSize);
})));
this.listOfCurrentPageData$ = this.frontPagination$.pipe(switchMap((/**
* @param {?} pagination
* @return {?}
*/
pagination => (pagination ? this.listOfFrontEndCurrentPageData$ : this.listOfData$))));
this.total$ = this.frontPagination$.pipe(switchMap((/**
* @param {?} pagination
* @return {?}
*/
pagination => (pagination ? this.listOfDataAfterCalc$ : this.listOfData$))), map((/**
* @param {?} list
* @return {?}
*/
list => list.length)), distinctUntilChanged());
}
/**
* @param {?} size
* @return {?}
*/
updatePageSize(size) {
this.pageSize$.next(size);
}
/**
* @param {?} pagination
* @return {?}
*/
updateFrontPagination(pagination) {
this.frontPagination$.next(pagination);
}
/**
* @param {?} index
* @return {?}
*/
updatePageIndex(index) {
this.pageIndex$.next(index);
}
/**
* @param {?} list
* @return {?}
*/
updateListOfData(list) {
this.listOfData$.next(list);
}
/**
* @return {?}
*/
ngOnDestroy() {
this.destroy$.next();
this.destroy$.complete();
}
}
NzTableDataService.decorators = [
{ type: Injectable }
];
/** @nocollapse */
NzTableDataService.ctorParameters = () => [];
if (false) {
/**
* @type {?}
* @private
*/
NzTableDataService.prototype.destroy$;
/**
* @type {?}
* @private
*/
NzTableDataService.prototype.pageIndex$;
/**
* @type {?}
* @private
*/
NzTableDataService.prototype.frontPagination$;
/**
* @type {?}
* @private
*/
NzTableDataService.prototype.pageSize$;
/**
* @type {?}
* @private
*/
NzTableDataService.prototype.listOfData$;
/** @type {?} */
NzTableDataService.prototype.pageIndexDistinct$;
/** @type {?} */
NzTableDataService.prototype.pageSizeDistinct$;
/** @type {?} */
NzTableDataService.prototype.listOfCalcOperator$;
/** @type {?} */
NzTableDataService.prototype.queryParams$;
/**
* @type {?}
* @private
*/
NzTableDataService.prototype.listOfDataAfterCalc$;
/**
* @type {?}
* @private
*/
NzTableDataService.prototype.listOfFrontEndCurrentPageData$;
/** @type {?} */
NzTableDataService.prototype.listOfCurrentPageData$;
/** @type {?} */
NzTableDataService.prototype.total$;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table/table.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
const NZ_CONFIG_COMPONENT_NAME = 'table';
class NzTableComponent {
/**
* @param {?} elementRef
* @param {?} nzResizeObserver
* @param {?} nzConfigService
* @param {?} cdr
* @param {?} nzTableStyleService
* @param {?} nzTableDataService
*/
constructor(elementRef, nzResizeObserver, nzConfigService, cdr, nzTableStyleService, nzTableDataService) {
this.elementRef = elementRef;
this.nzResizeObserver = nzResizeObserver;
this.nzConfigService = nzConfigService;
this.cdr = cdr;
this.nzTableStyleService = nzTableStyleService;
this.nzTableDataService = nzTableDataService;
this.nzTableLayout = 'auto';
this.nzShowTotal = null;
this.nzItemRender = null;
this.nzLoadingIndicator = null;
this.nzTitle = null;
this.nzFooter = null;
this.nzNoResult = undefined;
this.nzPageSizeOptions = [10, 20, 30, 40, 50];
this.nzVirtualItemSize = 0;
this.nzVirtualMaxBufferPx = 200;
this.nzVirtualMinBufferPx = 100;
this.nzVirtualForTrackBy = (/**
* @param {?} index
* @return {?}
*/
index => index);
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 = true;
this.nzTemplateMode = false;
this.nzShowPagination = true;
this.nzLoading = false;
this.nzPageSizeChange = new EventEmitter();
this.nzPageIndexChange = new EventEmitter();
this.nzQueryParams = new EventEmitter();
this.nzCurrentPageDataChange = new EventEmitter();
/**
* public data for ngFor tr
*/
this.data = [];
this.scrollX = null;
this.scrollY = null;
this.theadTemplate = null;
this.listOfColWidth = [];
this.hasFixLeft = false;
this.hasFixRight = false;
this.destroy$ = new Subject();
this.loading$ = new BehaviorSubject(false);
this.templateMode$ = new BehaviorSubject(false);
this.verticalScrollBarWidth = 0;
this.nzConfigService
.getConfigChangeEventForComponent(NZ_CONFIG_COMPONENT_NAME)
.pipe(takeUntil(this.destroy$))
.subscribe((/**
* @return {?}
*/
() => {
this.cdr.markForCheck();
}));
}
/**
* @param {?} size
* @return {?}
*/
onPageSizeChange(size) {
this.nzTableDataService.updatePageSize(size);
}
/**
* @param {?} index
* @return {?}
*/
onPageIndexChange(index) {
this.nzTableDataService.updatePageIndex(index);
}
/**
* @return {?}
*/
ngOnInit() {
const { pageIndexDistinct$, pageSizeDistinct$, listOfCurrentPageData$, total$, queryParams$ } = this.nzTableDataService;
const { theadTemplate$, hasFixLeft$, hasFixRight$ } = this.nzTableStyleService;
queryParams$.pipe(takeUntil(this.destroy$)).subscribe(this.nzQueryParams);
pageIndexDistinct$.pipe(takeUntil(this.destroy$)).subscribe((/**
* @param {?} pageIndex
* @return {?}
*/
pageIndex => {
if (pageIndex !== this.nzPageIndex) {
this.nzPageIndex = pageIndex;
this.nzPageIndexChange.next(pageIndex);
}
}));
pageSizeDistinct$.pipe(takeUntil(this.destroy$)).subscribe((/**
* @param {?} pageSize
* @return {?}
*/
pageSize => {
if (pageSize !== this.nzPageSize) {
this.nzPageSize = pageSize;
this.nzPageSizeChange.next(pageSize);
}
}));
total$
.pipe(takeUntil(this.destroy$), filter((/**
* @return {?}
*/
() => this.nzFrontPagination)))
.subscribe((/**
* @param {?} total
* @return {?}
*/
total => {
if (total !== this.nzTotal) {
this.nzTotal = total;
this.cdr.markForCheck();
}
}));
listOfCurrentPageData$.pipe(takeUntil(this.destroy$)).subscribe((/**
* @param {?} data
* @return {?}
*/
data => {
this.data = data;
this.nzCurrentPageDataChange.next(data);
this.cdr.markForCheck();
}));
theadTemplate$.pipe(takeUntil(this.destroy$)).subscribe((/**
* @param {?} theadTemplate
* @return {?}
*/
theadTemplate => {
this.theadTemplate = theadTemplate;
this.cdr.markForCheck();
}));
hasFixLeft$.pipe(takeUntil(this.destroy$)).subscribe((/**
* @param {?} hasFixLeft
* @return {?}
*/
hasFixLeft => {
this.hasFixLeft = hasFixLeft;
this.cdr.markForCheck();
}));
hasFixRight$.pipe(takeUntil(this.destroy$)).subscribe((/**
* @param {?} hasFixRight
* @return {?}
*/
hasFixRight => {
this.hasFixRight = hasFixRight;
this.cdr.markForCheck();
}));
combineLatest([total$, this.loading$, this.templateMode$])
.pipe(map((/**
* @param {?} __0
* @return {?}
*/
([total, loading, templateMode]) => total === 0 && !loading && !templateMode)), takeUntil(this.destroy$))
.subscribe((/**
* @param {?} empty
* @return {?}
*/
empty => {
this.nzTableStyleService.setShowEmpty(empty);
}));
this.verticalScrollBarWidth = measureScrollbar('vertical');
this.nzTableStyleService.listOfListOfThWidthPx$.pipe(takeUntil(this.destroy$)).subscribe((/**
* @param {?} listOfWidth
* @return {?}
*/
listOfWidth => {
this.listOfColWidth = listOfWidth;
this.cdr.markForCheck();
}));
}
/**
* @param {?} changes
* @return {?}
*/
ngOnChanges(changes) {
const { nzScroll, nzPageIndex, nzPageSize, nzFrontPagination, nzData, nzWidthConfig, nzNoResult, nzLoading, nzTemplateMode } = changes;
if (nzPageIndex) {
this.nzTableDataService.updatePageIndex(this.nzPageIndex);
}
if (nzPageSize) {
this.nzTableDataService.updatePageSize(this.nzPageSize);
}
if (nzData) {
this.nzData = this.nzData || [];
this.nzTableDataService.updateListOfData(this.nzData);
}
if (nzFrontPagination) {
this.nzTableDataService.updateFrontPagination(this.nzFrontPagination);
}
if (nzScroll) {
this.scrollX = (this.nzScroll && this.nzScroll.x) || null;
this.scrollY = (this.nzScroll && this.nzScroll.y) || null;
this.nzTableStyleService.setScroll(this.scrollX, this.scrollY);
}
if (nzWidthConfig) {
this.nzTableStyleService.setTableWidthConfig(this.nzWidthConfig);
}
if (nzLoading) {
this.loading$.next(this.nzLoading);
}
if (nzTemplateMode) {
this.templateMode$.next(this.nzTemplateMode);
}
if (nzNoResult) {
this.nzTableStyleService.setNoResult(this.nzNoResult);
}
}
/**
* @return {?}
*/
ngAfterViewInit() {
this.nzResizeObserver
.observe(this.elementRef)
.pipe(map((/**
* @param {?} __0
* @return {?}
*/
([entry]) => {
const { width } = entry.target.getBoundingClientRect();
/** @type {?} */
const scrollBarWidth = this.scrollY ? this.verticalScrollBarWidth : 0;
return Math.floor(width - scrollBarWidth);
})), takeUntil(this.destroy$))
.subscribe(this.nzTableStyleService.hostWidth$);
if (this.nzTableInnerScrollComponent && this.nzTableInnerScrollComponent.cdkVirtualScrollViewport) {
this.cdkVirtualScrollViewport = this.nzTableInnerScrollComponent.cdkVirtualScrollViewport;
}
}
/**
* @return {?}
*/
ngOnDestroy() {
this.destroy$.next();
this.destroy$.complete();
}
}
NzTableComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-table',
exportAs: 'nzTable',
providers: [NzTableStyleService, NzTableDataService],
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: `
<nz-spin [nzDelay]="nzLoadingDelay" [nzSpinning]="nzLoading" [nzIndicator]="nzLoadingIndicator">
<ng-container *ngIf="nzPaginationPosition === 'both' || nzPaginationPosition === 'top'">
<ng-template [ngTemplateOutlet]="paginationTemplate"></ng-template>
</ng-container>
<div
#tableMainElement
class="ant-table"
[class.ant-table-fixed-header]="nzData.length && scrollY"
[class.ant-table-fixed-column]="scrollX"
[class.ant-table-has-fix-left]="hasFixLeft"
[class.ant-table-has-fix-right]="hasFixRight"
[class.ant-table-bordered]="nzBordered"
[class.ant-table-middle]="nzSize === 'middle'"
[class.ant-table-small]="nzSize === 'small'"
>
<nz-table-title-footer [title]="nzTitle" *ngIf="nzTitle"></nz-table-title-footer>
<nz-table-inner-scroll
*ngIf="scrollY || scrollX; else defaultTemplate"
[data]="data"
[scrollX]="scrollX"
[scrollY]="scrollY"
[contentTemplate]="contentTemplate"
[listOfColWidth]="listOfColWidth"
[theadTemplate]="theadTemplate"
[verticalScrollBarWidth]="verticalScrollBarWidth"
[virtualTemplate]="nzVirtualScrollDirective?.templateRef"
[virtualItemSize]="nzVirtualItemSize"
[virtualMaxBufferPx]="nzVirtualMaxBufferPx"
[virtualMinBufferPx]="nzVirtualMinBufferPx"
[tableMainElement]="tableMainElement"
[virtualForTrackBy]="nzVirtualForTrackBy"
></nz-table-inner-scroll>
<ng-template #defaultTemplate>
<nz-table-inner-default
[tableLayout]="nzTableLayout"
[listOfColWidth]="listOfColWidth"
[theadTemplate]="theadTemplate"
[contentTemplate]="contentTemplate"
></nz-table-inner-default>
</ng-template>
<nz-table-title-footer [footer]="nzFooter" *ngIf="nzFooter"></nz-table-title-footer>
</div>
<ng-container *ngIf="nzPaginationPosition === 'both' || nzPaginationPosition === 'bottom'">
<ng-template [ngTemplateOutlet]="paginationTemplate"></ng-template>
</ng-container>
</nz-spin>
<ng-template #paginationTemplate>
<nz-pagination
*ngIf="nzShowPagination && data.length"
class="ant-table-pagination ant-table-pagination-right"
[nzShowSizeChanger]="nzShowSizeChanger"
[nzPageSizeOptions]="nzPageSizeOptions"
[nzItemRender]="nzItemRender"
[nzShowQuickJumper]="nzShowQuickJumper"
[nzHideOnSinglePage]="nzHideOnSinglePage"
[nzShowTotal]="nzShowTotal"
[nzSize]="nzSize === 'default' ? 'default' : 'small'"
[nzPageSize]="nzPageSize"
[nzTotal]="nzTotal"
[nzSimple]="nzSimple"
[nzPageIndex]="nzPageIndex"
(nzPageSizeChange)="onPageSizeChange($event)"
(nzPageIndexChange)="onPageIndexChange($event)"
>
</nz-pagination>
</ng-template>
<ng-template #contentTemplate><ng-content></ng-content></ng-template>
`,
host: {
'[class.ant-table-wrapper]': 'true'
}
}] }
];
/** @nocollapse */
NzTableComponent.ctorParameters = () => [
{ type: ElementRef },
{ type: NzResizeObserver },
{ type: NzConfigService },
{ type: ChangeDetectorRef },
{ type: NzTableStyleService },
{ type: NzTableDataService }
];
NzTableComponent.propDecorators = {
nzTableLayout: [{ type: Input }],
nzShowTotal: [{ type: Input }],
nzItemRender: [{ type: Input }],
nzLoadingIndicator: [{ type: Input }],
nzTitle: [{ type: Input }],
nzFooter: [{ type: Input }],
nzNoResult: [{ type: Input }],
nzPageSizeOptions: [{ type: Input }],
nzVirtualItemSize: [{ type: Input }],
nzVirtualMaxBufferPx: [{ type: Input }],
nzVirtualMinBufferPx: [{ type: Input }],
nzVirtualForTrackBy: [{ type: Input }],
nzLoadingDelay: [{ type: Input }],
nzPageIndex: [{ type: Input }],
nzPageSize: [{ type: Input }],
nzTotal: [{ type: Input }],
nzWidthConfig: [{ type: Input }],
nzData: [{ type: Input }],
nzPaginationPosition: [{ type: Input }],
nzScroll: [{ type: Input }],
nzFrontPagination: [{ type: Input }],
nzTemplateMode: [{ type: Input }],
nzShowPagination: [{ type: Input }],
nzLoading: [{ type: Input }],
nzBordered: [{ type: Input }],
nzSize: [{ type: Input }],
nzShowSizeChanger: [{ type: Input }],
nzHideOnSinglePage: [{ type: Input }],
nzShowQuickJumper: [{ type: Input }],
nzSimple: [{ type: Input }],
nzPageSizeChange: [{ type: Output }],
nzPageIndexChange: [{ type: Output }],
nzQueryParams: [{ type: Output }],
nzCurrentPageDataChange: [{ type: Output }],
nzVirtualScrollDirective: [{ type: ContentChild, args: [NzTableVirtualScrollDirective, { static: false },] }],
nzTableInnerScrollComponent: [{ type: ViewChild, args: [NzTableInnerScrollComponent,] }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzFrontPagination", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzTemplateMode", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzShowPagination", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzLoading", void 0);
__decorate([
WithConfig(NZ_CONFIG_COMPONENT_NAME, false), InputBoolean(),
__metadata("design:type", Boolean)
], NzTableComponent.prototype, "nzBordered", void 0);
__decorate([
WithConfig(NZ_CONFIG_COMPONENT_NAME, 'default'),
__metadata("design:type", String)
], NzTableComponent.prototype, "nzSize", void 0);
__decorate([
WithConfig(NZ_CONFIG_COMPONENT_NAME, false), InputBoolean(),
__metadata("design:type", Boolean)
], NzTableComponent.prototype, "nzShowSizeChanger", void 0);
__decorate([
WithConfig(NZ_CONFIG_COMPONENT_NAME, false), InputBoolean(),
__metadata("design:type", Boolean)
], NzTableComponent.prototype, "nzHideOnSinglePage", void 0);
__decorate([
WithConfig(NZ_CONFIG_COMPONENT_NAME, false), InputBoolean(),
__metadata("design:type", Boolean)
], NzTableComponent.prototype, "nzShowQuickJumper", void 0);
__decorate([
WithConfig(NZ_CONFIG_COMPONENT_NAME, false), InputBoolean(),
__metadata("design:type", Boolean)
], NzTableComponent.prototype, "nzSimple", void 0);
if (false) {
/** @type {?} */
NzTableComponent.ngAcceptInputType_nzFrontPagination;
/** @type {?} */
NzTableComponent.ngAcceptInputType_nzTemplateMode;
/** @type {?} */
NzTableComponent.ngAcceptInputType_nzShowPagination;
/** @type {?} */
NzTableComponent.ngAcceptInputType_nzLoading;
/** @type {?} */
NzTableComponent.ngAcceptInputType_nzBordered;
/** @type {?} */
NzTableComponent.ngAcceptInputType_nzShowSizeChanger;
/** @type {?} */
NzTableComponent.ngAcceptInputType_nzHideOnSinglePage;
/** @type {?} */
NzTableComponent.ngAcceptInputType_nzShowQuickJumper;
/** @type {?} */
NzTableComponent.ngAcceptInputType_nzSimple;
/** @type {?} */
NzTableComponent.prototype.nzTableLayout;
/** @type {?} */
NzTableComponent.prototype.nzShowTotal;
/** @type {?} */
NzTableComponent.prototype.nzItemRender;
/** @type {?} */
NzTableComponent.prototype.nzLoadingIndicator;
/** @type {?} */
NzTableComponent.prototype.nzTitle;
/** @type {?} */
NzTableComponent.prototype.nzFooter;
/** @type {?} */
NzTableComponent.prototype.nzNoResult;
/** @type {?} */
NzTableComponent.prototype.nzPageSizeOptions;
/** @type {?} */
NzTableComponent.prototype.nzVirtualItemSize;
/** @type {?} */
NzTableComponent.prototype.nzVirtualMaxBufferPx;
/** @type {?} */
NzTableComponent.prototype.nzVirtualMinBufferPx;
/** @type {?} */
NzTableComponent.prototype.nzVirtualForTrackBy;
/** @type {?} */
NzTableComponent.prototype.nzLoadingDelay;
/** @type {?} */
NzTableComponent.prototype.nzPageIndex;
/** @type {?} */
NzTableComponent.prototype.nzPageSize;
/** @type {?} */
NzTableComponent.prototype.nzTotal;
/** @type {?} */
NzTableComponent.prototype.nzWidthConfig;
/** @type {?} */
NzTableComponent.prototype.nzData;
/** @type {?} */
NzTableComponent.prototype.nzPaginationPosition;
/** @type {?} */
NzTableComponent.prototype.nzScroll;
/** @type {?} */
NzTableComponent.prototype.nzFrontPagination;
/** @type {?} */
NzTableComponent.prototype.nzTemplateMode;
/** @type {?} */
NzTableComponent.prototype.nzShowPagination;
/** @type {?} */
NzTableComponent.prototype.nzLoading;
/** @type {?} */
NzTableComponent.prototype.nzBordered;
/** @type {?} */
NzTableComponent.prototype.nzSize;
/** @type {?} */
NzTableComponent.prototype.nzShowSizeChanger;
/** @type {?} */
NzTableComponent.prototype.nzHideOnSinglePage;
/** @type {?} */
NzTableComponent.prototype.nzShowQuickJumper;
/** @type {?} */
NzTableComponent.prototype.nzSimple;
/** @type {?} */
NzTableComponent.prototype.nzPageSizeChange;
/** @type {?} */
NzTableComponent.prototype.nzPageIndexChange;
/** @type {?} */
NzTableComponent.prototype.nzQueryParams;
/** @type {?} */
NzTableComponent.prototype.nzCurrentPageDataChange;
/**
* public data for ngFor tr
* @type {?}
*/
NzTableComponent.prototype.data;
/** @type {?} */
NzTableComponent.prototype.cdkVirtualScrollViewport;
/** @type {?} */
NzTableComponent.prototype.scrollX;
/** @type {?} */
NzTableComponent.prototype.scrollY;
/** @type {?} */
NzTableComponent.prototype.theadTemplate;
/** @type {?} */
NzTableComponent.prototype.listOfColWidth;
/** @type {?} */
NzTableComponent.prototype.hasFixLeft;
/** @type {?} */
NzTableComponent.prototype.hasFixRight;
/**
* @type {?}
* @private
*/
NzTableComponent.prototype.destroy$;
/**
* @type {?}
* @private
*/
NzTableComponent.prototype.loading$;
/**
* @type {?}
* @private
*/
NzTableComponent.prototype.templateMode$;
/** @type {?} */
NzTableComponent.prototype.nzVirtualScrollDirective;
/** @type {?} */
NzTableComponent.prototype.nzTableInnerScrollComponent;
/** @type {?} */
NzTableComponent.prototype.verticalScrollBarWidth;
/**
* @type {?}
* @private
*/
NzTableComponent.prototype.elementRef;
/**
* @type {?}
* @private
*/
NzTableComponent.prototype.nzResizeObserver;
/**
* @type {?}
* @private
*/
NzTableComponent.prototype.nzConfigService;
/**
* @type {?}
* @private
*/
NzTableComponent.prototype.cdr;
/**
* @type {?}
* @private
*/
NzTableComponent.prototype.nzTableStyleService;
/**
* @type {?}
* @private
*/
NzTableComponent.prototype.nzTableDataService;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table/tbody.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTbodyComponent {
/**
* @param {?} nzTableStyleService
*/
constructor(nzTableStyleService) {
this.nzTableStyleService = nzTableStyleService;
this.isInsideTable = false;
this.showEmpty$ = new BehaviorSubject(false);
this.noResult$ = new BehaviorSubject(undefined);
this.listOfMeasureColumn$ = new BehaviorSubject([]);
this.isInsideTable = !!this.nzTableStyleService;
if (this.nzTableStyleService) {
const { showEmpty$, noResult$, listOfMeasureColumn$ } = this.nzTableStyleService;
noResult$.subscribe(this.noResult$);
listOfMeasureColumn$.subscribe(this.listOfMeasureColumn$);
showEmpty$.subscribe(this.showEmpty$);
}
}
/**
* @param {?} listOfAutoWidth
* @return {?}
*/
onListOfAutoWidthChange(listOfAutoWidth) {
this.nzTableStyleService.setListOfAutoWidth(listOfAutoWidth);
}
}
NzTbodyComponent.decorators = [
{ type: Component, args: [{
selector: 'tbody',
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: `
<tr
nz-table-measure-row
*ngIf="isInsideTable && (listOfMeasureColumn$ | async)!.length"
[listOfMeasureColumn]="listOfMeasureColumn$ | async"
(listOfAutoWidth)="onListOfAutoWidthChange($event)"
></tr>
<ng-content></ng-content>
<tr class="ant-table-placeholder" nz-table-fixed-row *ngIf="showEmpty$ | async">
<nz-embed-empty nzComponentName="table" [specificContent]="noResult$ | async"></nz-embed-empty>
</tr>
`,
host: {
'[class.ant-table-tbody]': 'isInsideTable'
}
}] }
];
/** @nocollapse */
NzTbodyComponent.ctorParameters = () => [
{ type: NzTableStyleService, decorators: [{ type: Optional }] }
];
if (false) {
/** @type {?} */
NzTbodyComponent.prototype.isInsideTable;
/** @type {?} */
NzTbodyComponent.prototype.showEmpty$;
/** @type {?} */
NzTbodyComponent.prototype.noResult$;
/** @type {?} */
NzTbodyComponent.prototype.listOfMeasureColumn$;
/**
* @type {?}
* @private
*/
NzTbodyComponent.prototype.nzTableStyleService;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table/tr.directive.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTrDirective {
/**
* @param {?} nzTableStyleService
*/
constructor(nzTableStyleService) {
this.nzTableStyleService = nzTableStyleService;
this.destroy$ = new Subject();
this.listOfFixedColumns$ = new ReplaySubject(1);
this.listOfColumns$ = new ReplaySubject(1);
this.listOfFixedColumnsChanges$ = this.listOfFixedColumns$.pipe(switchMap((/**
* @param {?} list
* @return {?}
*/
list => merge(...[this.listOfFixedColumns$, ...list.map((/**
* @param {?} c
* @return {?}
*/
(c) => c.changes$))]).pipe(flatMap((/**
* @return {?}
*/
() => this.listOfFixedColumns$))))), takeUntil(this.destroy$));
this.listOfFixedLeftColumnChanges$ = this.listOfFixedColumnsChanges$.pipe(map((/**
* @param {?} list
* @return {?}
*/
list => list.filter((/**
* @param {?} item
* @return {?}
*/
item => item.nzLeft !== false)))));
this.listOfFixedRightColumnChanges$ = this.listOfFixedColumnsChanges$.pipe(map((/**
* @param {?} list
* @return {?}
*/
list => list.filter((/**
* @param {?} item
* @return {?}
*/
item => item.nzRight !== false)))));
this.listOfColumnsChanges$ = this.listOfColumns$.pipe(switchMap((/**
* @param {?} list
* @return {?}
*/
list => merge(...[this.listOfColumns$, ...list.map((/**
* @param {?} c
* @return {?}
*/
(c) => c.changes$))]).pipe(flatMap((/**
* @return {?}
*/
() => this.listOfColumns$))))), takeUntil(this.destroy$));
this.isInsideTable = false;
this.isInsideTable = !!nzTableStyleService;
}
/**
* @return {?}
*/
ngAfterContentInit() {
if (this.nzTableStyleService) {
this.listOfCellFixedDirective.changes
.pipe(startWith(this.listOfCellFixedDirective), takeUntil(this.destroy$))
.subscribe(this.listOfFixedColumns$);
this.listOfNzThDirective.changes.pipe(startWith(this.listOfNzThDirective), takeUntil(this.destroy$)).subscribe(this.listOfColumns$);
/** set last left and first right **/
this.listOfFixedLeftColumnChanges$.subscribe((/**
* @param {?} listOfFixedLeft
* @return {?}
*/
listOfFixedLeft => {
listOfFixedLeft.forEach((/**
* @param {?} cell
* @return {?}
*/
cell => cell.setIsLastLeft(cell === listOfFixedLeft[listOfFixedLeft.length - 1])));
}));
this.listOfFixedRightColumnChanges$.subscribe((/**
* @param {?} listOfFixedRight
* @return {?}
*/
listOfFixedRight => {
listOfFixedRight.forEach((/**
* @param {?} cell
* @return {?}
*/
cell => cell.setIsFirstRight(cell === listOfFixedRight[0])));
}));
/** calculate fixed nzLeft and nzRight **/
combineLatest([this.nzTableStyleService.listOfListOfThWidth$, this.listOfFixedLeftColumnChanges$]).subscribe((/**
* @param {?} __0
* @return {?}
*/
([listOfAutoWidth, listOfLeftCell]) => {
listOfLeftCell.forEach((/**
* @param {?} cell
* @param {?} index
* @return {?}
*/
(cell, index) => {
if (cell.isAutoLeft) {
/** @type {?} */
const currentArray = listOfLeftCell.slice(0, index);
/** @type {?} */
const count = currentArray.reduce((/**
* @param {?} pre
* @param {?} cur
* @return {?}
*/
(pre, cur) => pre + (cur.colspan || 1)), 0);
/** @type {?} */
const width = listOfAutoWidth.slice(0, count).reduce((/**
* @param {?} pre
* @param {?} cur
* @return {?}
*/
(pre, cur) => pre + cur), 0);
cell.setAutoLeftWidth(`${width}px`);
}
}));
}));
combineLatest([this.nzTableStyleService.listOfListOfThWidth$, this.listOfFixedRightColumnChanges$]).subscribe((/**
* @param {?} __0
* @return {?}
*/
([listOfAutoWidth, listOfRightCell]) => {
listOfRightCell.forEach((/**
* @param {?} _
* @param {?} index
* @return {?}
*/
(_, index) => {
/** @type {?} */
const cell = listOfRightCell[listOfRightCell.length - index - 1];
if (cell.isAutoRight) {
/** @type {?} */
const currentArray = listOfRightCell.slice(listOfRightCell.length - index, listOfRightCell.length);
/** @type {?} */
const count = currentArray.reduce((/**
* @param {?} pre
* @param {?} cur
* @return {?}
*/
(pre, cur) => pre + (cur.colspan || 1)), 0);
/** @type {?} */
const width = listOfAutoWidth
.slice(listOfAutoWidth.length - count, listOfAutoWidth.length)
.reduce((/**
* @param {?} pre
* @param {?} cur
* @return {?}
*/
(pre, cur) => pre + cur), 0);
cell.setAutoRightWidth(`${width}px`);
}
}));
}));
}
}
/**
* @return {?}
*/
ngOnDestroy() {
this.destroy$.next();
this.destroy$.complete();
}
}
NzTrDirective.decorators = [
{ type: Directive, args: [{
selector: 'tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])',
host: {
'[class.ant-table-row]': 'isInsideTable'
}
},] }
];
/** @nocollapse */
NzTrDirective.ctorParameters = () => [
{ type: NzTableStyleService, decorators: [{ type: Optional }] }
];
NzTrDirective.propDecorators = {
listOfNzThDirective: [{ type: ContentChildren, args: [NzThMeasureDirective,] }],
listOfCellFixedDirective: [{ type: ContentChildren, args: [NzCellFixedDirective,] }]
};
if (false) {
/** @type {?} */
NzTrDirective.prototype.listOfNzThDirective;
/** @type {?} */
NzTrDirective.prototype.listOfCellFixedDirective;
/**
* @type {?}
* @private
*/
NzTrDirective.prototype.destroy$;
/**
* @type {?}
* @private
*/
NzTrDirective.prototype.listOfFixedColumns$;
/**
* @type {?}
* @private
*/
NzTrDirective.prototype.listOfColumns$;
/** @type {?} */
NzTrDirective.prototype.listOfFixedColumnsChanges$;
/** @type {?} */
NzTrDirective.prototype.listOfFixedLeftColumnChanges$;
/** @type {?} */
NzTrDirective.prototype.listOfFixedRightColumnChanges$;
/** @type {?} */
NzTrDirective.prototype.listOfColumnsChanges$;
/** @type {?} */
NzTrDirective.prototype.isInsideTable;
/**
* @type {?}
* @private
*/
NzTrDirective.prototype.nzTableStyleService;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table/thead.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTheadComponent {
/**
* @param {?} elementRef
* @param {?} renderer
* @param {?} nzTableStyleService
* @param {?} nzTableDataService
*/
constructor(elementRef, renderer, nzTableStyleService, nzTableDataService) {
this.elementRef = elementRef;
this.renderer = renderer;
this.nzTableStyleService = nzTableStyleService;
this.nzTableDataService = nzTableDataService;
this.destroy$ = new Subject();
this.isInsideTable = false;
/**
* @deprecated use nzSortFn and nzSortPriority instead *
*/
this.nzSingleSort = false;
/**
* @deprecated use nzSortOrderChange instead *
*/
this.nzSortChange = new EventEmitter();
this.nzSortOrderChange = new EventEmitter();
this.isInsideTable = !!this.nzTableStyleService;
}
/**
* @return {?}
*/
ngOnInit() {
if (this.nzTableStyleService) {
this.nzTableStyleService.setTheadTemplate(this.templateRef);
}
}
/**
* @param {?} changes
* @return {?}
*/
ngOnChanges(changes) {
const { nzSingleSort } = changes;
if (nzSingleSort) {
warnDeprecation(`'nzSingleSort' is deprecated and will be removed in 10.0.0. Please use use 'nzSortFn' and 'nzSortPriority' instead instead.`);
}
}
/**
* @return {?}
*/
ngAfterContentInit() {
if (this.nzTableStyleService) {
/** @type {?} */
const firstTableRow$ = (/** @type {?} */ (this.listOfNzTrDirective.changes.pipe(startWith(this.listOfNzTrDirective), map((/**
* @param {?} item
* @return {?}
*/
item => item && item.first)))));
/** @type {?} */
const listOfColumnsChanges$ = firstTableRow$.pipe(switchMap((/**
* @param {?} firstTableRow
* @return {?}
*/
firstTableRow => (firstTableRow ? firstTableRow.listOfColumnsChanges$ : EMPTY))), takeUntil(this.destroy$));
listOfColumnsChanges$.subscribe((/**
* @param {?} data
* @return {?}
*/
data => this.nzTableStyleService.setListOfTh(data)));
/** TODO: need reset the measure row when scrollX change **/
this.nzTableStyleService.enableAutoMeasure$
.pipe(switchMap((/**
* @param {?} enable
* @return {?}
*/
enable => (enable ? listOfColumnsChanges$ : of([])))))
.pipe(takeUntil(this.destroy$))
.subscribe((/**
* @param {?} data
* @return {?}
*/
data => this.nzTableStyleService.setListOfMeasureColumn(data)));
/** @type {?} */
const listOfFixedLeftColumnChanges$ = firstTableRow$.pipe(switchMap((/**
* @param {?} firstTr
* @return {?}
*/
firstTr => (firstTr ? firstTr.listOfFixedLeftColumnChanges$ : EMPTY))), takeUntil(this.destroy$));
/** @type {?} */
const listOfFixedRightColumnChanges$ = firstTableRow$.pipe(switchMap((/**
* @param {?} firstTr
* @return {?}
*/
firstTr => (firstTr ? firstTr.listOfFixedRightColumnChanges$ : EMPTY))), takeUntil(this.destroy$));
listOfFixedLeftColumnChanges$.subscribe((/**
* @param {?} listOfFixedLeftColumn
* @return {?}
*/
listOfFixedLeftColumn => {
this.nzTableStyleService.setHasFixLeft(listOfFixedLeftColumn.length !== 0);
}));
listOfFixedRightColumnChanges$.subscribe((/**
* @param {?} listOfFixedRightColumn
* @return {?}
*/
listOfFixedRightColumn => {
this.nzTableStyleService.setHasFixRight(listOfFixedRightColumn.length !== 0);
}));
}
if (this.nzTableDataService) {
/** @type {?} */
const listOfColumn$ = (/** @type {?} */ (this.listOfNzThAddOnComponent.changes.pipe(startWith(this.listOfNzThAddOnComponent))));
/** @type {?} */
const manualSort$ = listOfColumn$.pipe(switchMap((/**
* @return {?}
*/
() => merge(...this.listOfNzThAddOnComponent.map((/**
* @param {?} th
* @return {?}
*/
th => th.manualClickOrder$))))), takeUntil(this.destroy$));
manualSort$.subscribe((/**
* @param {?} data
* @return {?}
*/
(data) => {
/** @type {?} */
const emitValue = { key: data.nzColumnKey, value: data.sortOrder };
this.nzSortChange.emit(emitValue);
this.nzSortOrderChange.emit(emitValue);
if (this.nzSingleSort || (data.nzSortFn && data.nzSortPriority === false)) {
this.listOfNzThAddOnComponent.filter((/**
* @param {?} th
* @return {?}
*/
th => th !== data)).forEach((/**
* @param {?} th
* @return {?}
*/
th => th.clearSortOrder()));
}
}));
/** @type {?} */
const listOfCalcOperator$ = listOfColumn$.pipe(switchMap((/**
* @param {?} list
* @return {?}
*/
list => merge(...[listOfColumn$, ...list.map((/**
* @param {?} c
* @return {?}
*/
(c) => c.calcOperatorChange$))]).pipe(flatMap((/**
* @return {?}
*/
() => listOfColumn$))))), map((/**
* @param {?} list
* @return {?}
*/
list => list
.filter((/**
* @param {?} item
* @return {?}
*/
item => !!item.nzSortFn || !!item.nzFilterFn))
.map((/**
* @param {?} item
* @return {?}
*/
item => {
const { nzSortFn, sortOrder, nzFilterFn, nzFilterValue, nzSortPriority, nzColumnKey } = item;
return {
key: nzColumnKey,
sortFn: nzSortFn,
sortPriority: nzSortPriority,
sortOrder: (/** @type {?} */ (sortOrder)),
filterFn: (/** @type {?} */ (nzFilterFn)),
filterValue: nzFilterValue
};
})))),
// TODO: after checked error here
delay(0));
listOfCalcOperator$.subscribe((/**
* @param {?} list
* @return {?}
*/
list => {
this.nzTableDataService.listOfCalcOperator$.next(list);
}));
}
}
/**
* @return {?}
*/
ngAfterViewInit() {
if (this.nzTableStyleService) {
this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement), this.elementRef.nativeElement);
}
}
/**
* @return {?}
*/
ngOnDestroy() {
this.destroy$.next();
this.destroy$.complete();
}
}
NzTheadComponent.decorators = [
{ type: Component, args: [{
selector: 'thead:not(.ant-table-thead)',
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: `
<ng-template #contentTemplate>
<ng-content></ng-content>
</ng-template>
<ng-container *ngIf="!isInsideTable">
<ng-template [ngTemplateOutlet]="contentTemplate"></ng-template>
</ng-container>
`
}] }
];
/** @nocollapse */
NzTheadComponent.ctorParameters = () => [
{ type: ElementRef },
{ type: Renderer2 },
{ type: NzTableStyleService, decorators: [{ type: Optional }] },
{ type: NzTableDataService, decorators: [{ type: Optional }] }
];
NzTheadComponent.propDecorators = {
templateRef: [{ type: ViewChild, args: ['contentTemplate', { static: true },] }],
listOfNzTrDirective: [{ type: ContentChildren, args: [NzTrDirective,] }],
listOfNzThAddOnComponent: [{ type: ContentChildren, args: [NzThAddOnComponent, { descendants: true },] }],
nzSingleSort: [{ type: Input }],
nzSortChange: [{ type: Output }],
nzSortOrderChange: [{ type: Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTheadComponent.prototype, "nzSingleSort", void 0);
if (false) {
/** @type {?} */
NzTheadComponent.ngAcceptInputType_nzSingleSort;
/**
* @type {?}
* @private
*/
NzTheadComponent.prototype.destroy$;
/** @type {?} */
NzTheadComponent.prototype.isInsideTable;
/** @type {?} */
NzTheadComponent.prototype.templateRef;
/** @type {?} */
NzTheadComponent.prototype.listOfNzTrDirective;
/** @type {?} */
NzTheadComponent.prototype.listOfNzThAddOnComponent;
/**
* @deprecated use nzSortFn and nzSortPriority instead *
* @type {?}
*/
NzTheadComponent.prototype.nzSingleSort;
/**
* @deprecated use nzSortOrderChange instead *
* @type {?}
*/
NzTheadComponent.prototype.nzSortChange;
/** @type {?} */
NzTheadComponent.prototype.nzSortOrderChange;
/**
* @type {?}
* @private
*/
NzTheadComponent.prototype.elementRef;
/**
* @type {?}
* @private
*/
NzTheadComponent.prototype.renderer;
/**
* @type {?}
* @private
*/
NzTheadComponent.prototype.nzTableStyleService;
/**
* @type {?}
* @private
*/
NzTheadComponent.prototype.nzTableDataService;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table/title-footer.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTableTitleFooterComponent {
constructor() {
this.title = null;
this.footer = null;
}
}
NzTableTitleFooterComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-table-title-footer',
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: `
<ng-container *nzStringTemplateOutlet="title">{{ title }}</ng-container>
<ng-container *nzStringTemplateOutlet="footer">{{ footer }}</ng-container>
`,
host: {
'[class.ant-table-title]': `title !== null`,
'[class.ant-table-footer]': `footer !== null`
}
}] }
];
NzTableTitleFooterComponent.propDecorators = {
title: [{ type: Input }],
footer: [{ type: Input }]
};
if (false) {
/** @type {?} */
NzTableTitleFooterComponent.prototype.title;
/** @type {?} */
NzTableTitleFooterComponent.prototype.footer;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table/tr-expand.directive.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTrExpandDirective {
constructor() {
this.nzExpand = true;
}
}
NzTrExpandDirective.decorators = [
{ type: Directive, args: [{
selector: 'tr[nzExpand]',
host: {
'[class.ant-table-expanded-row]': 'true',
'[hidden]': `!nzExpand`
}
},] }
];
NzTrExpandDirective.propDecorators = {
nzExpand: [{ type: Input }]
};
if (false) {
/** @type {?} */
NzTrExpandDirective.prototype.nzExpand;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table/tr-measure.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTrMeasureComponent {
/**
* @param {?} nzResizeObserver
* @param {?} ngZone
*/
constructor(nzResizeObserver, ngZone) {
this.nzResizeObserver = nzResizeObserver;
this.ngZone = ngZone;
this.listOfMeasureColumn = [];
this.listOfAutoWidth = new EventEmitter();
this.destroy$ = new Subject();
}
/**
* @param {?} _
* @param {?} key
* @return {?}
*/
trackByFunc(_, key) {
return key;
}
/**
* @return {?}
*/
ngAfterViewInit() {
this.listOfTdElement.changes
.pipe(startWith(this.listOfTdElement))
.pipe(switchMap((/**
* @param {?} list
* @return {?}
*/
list => {
return (/** @type {?} */ (combineLatest(list.toArray().map((/**
* @param {?} item
* @return {?}
*/
(item) => {
return this.nzResizeObserver.observe(item).pipe(map((/**
* @param {?} __0
* @return {?}
*/
([entry]) => {
const { width } = entry.target.getBoundingClientRect();
return Math.floor(width);
})));
})))));
})), debounceTime(16), takeUntil(this.destroy$))
.subscribe((/**
* @param {?} data
* @return {?}
*/
data => {
this.ngZone.run((/**
* @return {?}
*/
() => {
this.listOfAutoWidth.next(data);
}));
}));
}
/**
* @return {?}
*/
ngOnDestroy() {
this.destroy$.next();
this.destroy$.complete();
}
}
NzTrMeasureComponent.decorators = [
{ type: Component, args: [{
selector: 'tr[nz-table-measure-row]',
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: `
<td
#tdElement
class="nz-disable-td"
style="padding: 0px; border: 0px; height: 0px;"
*ngFor="let th of listOfMeasureColumn; trackBy: trackByFunc"
></td>
`,
host: {
'[class.ant-table-measure-now]': 'true'
}
}] }
];
/** @nocollapse */
NzTrMeasureComponent.ctorParameters = () => [
{ type: NzResizeObserver },
{ type: NgZone }
];
NzTrMeasureComponent.propDecorators = {
listOfMeasureColumn: [{ type: Input }],
listOfAutoWidth: [{ type: Output }],
listOfTdElement: [{ type: ViewChildren, args: ['tdElement',] }]
};
if (false) {
/** @type {?} */
NzTrMeasureComponent.prototype.listOfMeasureColumn;
/** @type {?} */
NzTrMeasureComponent.prototype.listOfAutoWidth;
/** @type {?} */
NzTrMeasureComponent.prototype.listOfTdElement;
/**
* @type {?}
* @private
*/
NzTrMeasureComponent.prototype.destroy$;
/**
* @type {?}
* @private
*/
NzTrMeasureComponent.prototype.nzResizeObserver;
/**
* @type {?}
* @private
*/
NzTrMeasureComponent.prototype.ngZone;
}
/**
* @fileoverview added by tsickle
* Generated from: src/table.module.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NzTableModule {
}
NzTableModule.decorators = [
{ type: NgModule, args: [{
declarations: [
NzTableComponent,
NzThAddOnComponent,
NzTableCellDirective,
NzThMeasureDirective,
NzTdAddOnComponent,
NzTheadComponent,
NzTbodyComponent,
NzTrDirective,
NzTrExpandDirective,
NzTableVirtualScrollDirective,
NzCellFixedDirective,
NzTableContentComponent,
NzTableTitleFooterComponent,
NzTableInnerDefaultComponent,
NzTableInnerScrollComponent,
NzTrMeasureComponent,
NzRowIndentDirective,
NzRowExpandButtonDirective,
NzCellBreakWordDirective,
NzCellAlignDirective,
NzTableSortersComponent,
NzTableFilterComponent,
NzTableSelectionComponent,
NzCellEllipsisDirective,
NzFilterTriggerComponent,
NzTableFixedRowComponent,
NzThSelectionComponent
],
exports: [
NzTableComponent,
NzThAddOnComponent,
NzTableCellDirective,
NzThMeasureDirective,
NzTdAddOnComponent,
NzTheadComponent,
NzTbodyComponent,
NzTrDirective,
NzTableVirtualScrollDirective,
NzCellFixedDirective,
NzFilterTriggerComponent,
NzTrExpandDirective,
NzCellBreakWordDirective,
NzCellAlignDirective,
NzCellEllipsisDirective,
NzTableFixedRowComponent,
NzThSelectionComponent
],
imports: [
NzMenuModule,
FormsModule,
NzOutletModule,
NzRadioModule,
NzCheckboxModule,
NzDropDownModule,
NzButtonModule,
CommonModule,
PlatformModule,
NzPaginationModule,
NzResizeObserversModule,
NzSpinModule,
NzI18nModule,
NzIconModule,
NzEmptyModule,
ScrollingModule
]
},] }
];
/**
* @fileoverview added by tsickle
* Generated from: src/table.types.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @license
* Copyright Alibaba.com All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
/**
* @record
*/
function NzTableQueryParams() { }
if (false) {
/** @type {?} */
NzTableQueryParams.prototype.pageIndex;
/** @type {?} */
NzTableQueryParams.prototype.pageSize;
/** @type {?} */
NzTableQueryParams.prototype.sort;
/** @type {?} */
NzTableQueryParams.prototype.filter;
}
/**
* @fileoverview added by tsickle
* Generated from: public-api.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* Generated from: ng-zorro-antd-table.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
export { NzCellAlignDirective, NzCellBreakWordDirective, NzCellEllipsisDirective, NzCellFixedDirective, NzFilterTriggerComponent, NzRowExpandButtonDirective, NzRowIndentDirective, NzTableCellDirective, NzTableComponent, NzTableContentComponent, NzTableDataService, NzTableFilterComponent, NzTableFixedRowComponent, NzTableInnerDefaultComponent, NzTableInnerScrollComponent, NzTableModule, NzTableSelectionComponent, NzTableSortersComponent, NzTableStyleService, NzTableTitleFooterComponent, NzTableVirtualScrollDirective, NzTbodyComponent, NzTdAddOnComponent, NzThAddOnComponent, NzThMeasureDirective, NzThSelectionComponent, NzTheadComponent, NzTrDirective, NzTrExpandDirective, NzTrMeasureComponent };
//# sourceMappingURL=ng-zorro-antd-table.js.map