\n \n } @else {\n \n }\n `,\n host: { class: 'ant-table-filter-column' },\n imports: [\n NgTemplateOutlet,\n NzFilterTriggerComponent,\n NzIconModule,\n NzDropDownModule,\n NzRadioComponent,\n NzCheckboxModule,\n FormsModule,\n NzButtonModule\n ]\n})\nexport class NzTableFilterComponent implements OnChanges, OnDestroy, OnInit {\n @Input() contentTemplate: TemplateRef | null = null;\n @Input() customFilter = false;\n @Input() extraTemplate: TemplateRef | null = null;\n @Input() filterMultiple = true;\n @Input() listOfFilter: NzTableFilterList = [];\n @Output() readonly filterChange = new EventEmitter();\n private destroy$ = new Subject();\n locale!: NzTableI18nInterface;\n isChecked = false;\n isVisible = false;\n listOfParsedFilter: NzThItemInterface[] = [];\n listOfChecked: NzSafeAny[] = [];\n\n check(filter: NzThItemInterface): void {\n if (this.filterMultiple) {\n this.listOfParsedFilter = this.listOfParsedFilter.map(item => {\n if (item === filter) {\n return { ...item, checked: !filter.checked };\n } else {\n return item;\n }\n });\n filter.checked = !filter.checked;\n } else {\n this.listOfParsedFilter = this.listOfParsedFilter.map(item => ({ ...item, checked: item === filter }));\n }\n this.isChecked = this.getCheckedStatus(this.listOfParsedFilter);\n }\n\n confirm(): void {\n this.isVisible = false;\n this.emitFilterData();\n }\n\n reset(): void {\n this.isVisible = false;\n this.listOfParsedFilter = this.parseListOfFilter(this.listOfFilter, true);\n this.isChecked = this.getCheckedStatus(this.listOfParsedFilter);\n this.emitFilterData();\n }\n\n onVisibleChange(value: boolean): void {\n this.isVisible = value;\n if (!value) {\n this.emitFilterData();\n } else {\n this.listOfChecked = this.listOfParsedFilter.filter(item => item.checked).map(item => item.value);\n }\n }\n\n emitFilterData(): void {\n const listOfChecked = this.listOfParsedFilter.filter(item => item.checked).map(item => item.value);\n if (!arraysEqual(this.listOfChecked, listOfChecked)) {\n if (this.filterMultiple) {\n this.filterChange.emit(listOfChecked);\n } else {\n this.filterChange.emit(listOfChecked.length > 0 ? listOfChecked[0] : null);\n }\n }\n }\n\n parseListOfFilter(listOfFilter: NzTableFilterList, reset?: boolean): NzThItemInterface[] {\n return listOfFilter.map(item => {\n const checked = reset ? false : !!item.byDefault;\n return { text: item.text, value: item.value, checked };\n });\n }\n\n getCheckedStatus(listOfParsedFilter: NzThItemInterface[]): boolean {\n return listOfParsedFilter.some(item => item.checked);\n }\n\n constructor(\n private cdr: ChangeDetectorRef,\n private i18n: NzI18nService\n ) {}\n\n ngOnInit(): void {\n this.i18n.localeChange.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.locale = this.i18n.getLocaleData('Table');\n this.cdr.markForCheck();\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { listOfFilter } = changes;\n if (listOfFilter && this.listOfFilter && this.listOfFilter.length) {\n this.listOfParsedFilter = this.parseListOfFilter(this.listOfFilter);\n this.isChecked = this.getCheckedStatus(this.listOfParsedFilter);\n }\n }\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive, EventEmitter, Input, Output } from '@angular/core';\n\n@Directive({\n selector: 'button[nz-row-expand-button]',\n host: {\n class: 'ant-table-row-expand-icon',\n '[type]': `'button'`,\n '[class.ant-table-row-expand-icon-expanded]': `!spaceMode && expand === true`,\n '[class.ant-table-row-expand-icon-collapsed]': `!spaceMode && expand === false`,\n '[class.ant-table-row-expand-icon-spaced]': 'spaceMode',\n '(click)': 'onHostClick()'\n }\n})\nexport class NzRowExpandButtonDirective {\n @Input() expand = false;\n @Input() spaceMode = false;\n @Output() readonly expandChange = new EventEmitter();\n\n onHostClick(): void {\n if (!this.spaceMode) {\n this.expand = !this.expand;\n this.expandChange.next(this.expand);\n }\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive, Input } from '@angular/core';\n\n@Directive({\n selector: 'nz-row-indent',\n host: {\n class: 'ant-table-row-indent',\n '[style.padding-left.px]': 'indentSize'\n }\n})\nexport class NzRowIndentDirective {\n @Input() indentSize = 0;\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { NzCheckboxModule } from 'ng-zorro-antd/checkbox';\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { NzDropDownModule } from 'ng-zorro-antd/dropdown';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\n@Component({\n selector: 'nz-table-selection',\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n @if (showCheckbox) {\n \n }\n @if (showRowSelection) {\n
\n \n \n \n \n
\n @for (selection of listOfSelections; track selection) {\n
\n {{ selection.text }}\n
\n }\n
\n \n
\n }\n `,\n host: { class: 'ant-table-selection' },\n imports: [FormsModule, NzCheckboxModule, NzDropDownModule, NzIconModule]\n})\nexport class NzTableSelectionComponent {\n @Input() listOfSelections: Array<{ text: string; onSelect(...args: NzSafeAny[]): NzSafeAny }> = [];\n @Input() checked = false;\n @Input() disabled = false;\n @Input() indeterminate = false;\n @Input() label: string | null = null;\n @Input() showCheckbox = false;\n @Input() showRowSelection = false;\n @Output() readonly checkedChange = new EventEmitter();\n\n onCheckedChange(checked: boolean): void {\n this.checked = checked;\n this.checkedChange.emit(checked);\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n Input,\n OnChanges,\n SimpleChanges,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\nimport { NzTableSortOrder } from '../table.types';\n\n@Component({\n selector: 'nz-table-sorters',\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n \n \n \n @if (isUp) {\n \n }\n @if (isDown) {\n \n }\n \n \n `,\n host: { class: 'ant-table-column-sorters' },\n imports: [NzIconModule, NgTemplateOutlet]\n})\nexport class NzTableSortersComponent implements OnChanges {\n @Input() sortDirections: NzTableSortOrder[] = ['ascend', 'descend', null];\n @Input() sortOrder: NzTableSortOrder = null;\n @Input() contentTemplate: TemplateRef | null = null;\n isUp = false;\n isDown = false;\n\n ngOnChanges(changes: SimpleChanges): void {\n const { sortDirections } = changes;\n if (sortDirections) {\n this.isUp = this.sortDirections.indexOf('ascend') !== -1;\n this.isDown = this.sortDirections.indexOf('descend') !== -1;\n }\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive, ElementRef, Input, OnChanges, Renderer2 } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Directive({\n selector: 'td[nzRight],th[nzRight],td[nzLeft],th[nzLeft]',\n host: {\n '[class.ant-table-cell-fix-right]': `isFixedRight`,\n '[class.ant-table-cell-fix-left]': `isFixedLeft`,\n '[style.position]': `isFixed? 'sticky' : null`\n }\n})\nexport class NzCellFixedDirective implements OnChanges {\n @Input() nzRight: string | boolean = false;\n @Input() nzLeft: string | boolean = false;\n @Input() colspan: number | null = null;\n @Input() colSpan: number | null = null;\n changes$ = new Subject();\n isAutoLeft = false;\n isAutoRight = false;\n isFixedLeft = false;\n isFixedRight = false;\n isFixed = false;\n\n setAutoLeftWidth(autoLeft: string | null): void {\n this.renderer.setStyle(this.elementRef.nativeElement, 'left', autoLeft);\n }\n\n setAutoRightWidth(autoRight: string | null): void {\n this.renderer.setStyle(this.elementRef.nativeElement, 'right', autoRight);\n }\n\n setIsFirstRight(isFirstRight: boolean): void {\n this.setFixClass(isFirstRight, 'ant-table-cell-fix-right-first');\n }\n\n setIsLastLeft(isLastLeft: boolean): void {\n this.setFixClass(isLastLeft, 'ant-table-cell-fix-left-last');\n }\n\n private setFixClass(flag: boolean, className: string): void {\n // the setFixClass function may call many times, so remove it first.\n this.renderer.removeClass(this.elementRef.nativeElement, className);\n\n if (flag) {\n this.renderer.addClass(this.elementRef.nativeElement, className);\n }\n }\n\n constructor(\n private renderer: Renderer2,\n private elementRef: ElementRef\n ) {}\n\n ngOnChanges(): void {\n this.setIsFirstRight(false);\n this.setIsLastLeft(false);\n this.isAutoLeft = this.nzLeft === '' || this.nzLeft === true;\n this.isAutoRight = this.nzRight === '' || this.nzRight === true;\n this.isFixedLeft = this.nzLeft !== false;\n this.isFixedRight = this.nzRight !== false;\n this.isFixed = this.isFixedLeft || this.isFixedRight;\n const validatePx = (value: string | boolean): string | null => {\n if (typeof value === 'string' && value !== '') {\n return value;\n } else {\n return null;\n }\n };\n this.setAutoLeftWidth(validatePx(this.nzLeft));\n this.setAutoRightWidth(validatePx(this.nzRight));\n this.changes$.next();\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Injectable, TemplateRef } from '@angular/core';\nimport { BehaviorSubject, combineLatest, merge, ReplaySubject } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { NzThMeasureDirective } from './cell/th-measure.directive';\nimport { NzTableSummaryFixedType } from './table.types';\n\n@Injectable()\nexport class NzTableStyleService {\n theadTemplate$ = new ReplaySubject>(1);\n tfootTemplate$ = new ReplaySubject>(1);\n tfootFixed$ = new ReplaySubject(1);\n hasFixLeft$ = new ReplaySubject(1);\n hasFixRight$ = new ReplaySubject(1);\n hostWidth$ = new ReplaySubject(1);\n columnCount$ = new ReplaySubject(1);\n showEmpty$ = new ReplaySubject(1);\n noResult$ = new ReplaySubject | undefined>(1);\n private listOfThWidthConfigPx$ = new BehaviorSubject>([]);\n private tableWidthConfigPx$ = new BehaviorSubject>([]);\n manualWidthConfigPx$ = combineLatest([this.tableWidthConfigPx$, this.listOfThWidthConfigPx$]).pipe(\n map(([widthConfig, listOfWidth]) => (widthConfig.length ? widthConfig : listOfWidth))\n );\n private listOfAutoWidthPx$ = new ReplaySubject(1);\n listOfListOfThWidthPx$ = merge(\n /** init with manual width **/\n this.manualWidthConfigPx$,\n combineLatest([this.listOfAutoWidthPx$, this.manualWidthConfigPx$]).pipe(\n map(([autoWidth, manualWidth]) => {\n /** use autoWidth until column length match **/\n if (autoWidth.length === manualWidth.length) {\n return autoWidth.map((width, index) => {\n if (width === '0px') {\n return manualWidth[index] || null;\n } else {\n return manualWidth[index] || width;\n }\n });\n } else {\n return manualWidth;\n }\n })\n )\n );\n listOfMeasureColumn$ = new ReplaySubject(1);\n listOfListOfThWidth$ = this.listOfAutoWidthPx$.pipe(map(list => list.map(width => parseInt(width, 10))));\n enableAutoMeasure$ = new ReplaySubject(1);\n\n setTheadTemplate(template: TemplateRef): void {\n this.theadTemplate$.next(template);\n }\n\n setTfootTemplate(template: TemplateRef): void {\n this.tfootTemplate$.next(template);\n }\n\n setTfootFixed(fixed: NzTableSummaryFixedType | null): void {\n this.tfootFixed$.next(fixed);\n }\n\n setHasFixLeft(hasFixLeft: boolean): void {\n this.hasFixLeft$.next(hasFixLeft);\n }\n\n setHasFixRight(hasFixRight: boolean): void {\n this.hasFixRight$.next(hasFixRight);\n }\n\n setTableWidthConfig(widthConfig: ReadonlyArray): void {\n this.tableWidthConfigPx$.next(widthConfig);\n }\n\n setListOfTh(listOfTh: readonly NzThMeasureDirective[]): void {\n let columnCount = 0;\n listOfTh.forEach(th => {\n columnCount += (th.colspan && +th.colspan) || (th.colSpan && +th.colSpan) || 1;\n });\n const listOfThPx = listOfTh.map(item => item.nzWidth);\n this.columnCount$.next(columnCount);\n this.listOfThWidthConfigPx$.next(listOfThPx);\n }\n\n setListOfMeasureColumn(listOfTh: readonly NzThMeasureDirective[]): void {\n const listOfKeys: string[] = [];\n listOfTh.forEach(th => {\n const length = (th.colspan && +th.colspan) || (th.colSpan && +th.colSpan) || 1;\n for (let i = 0; i < length; i++) {\n listOfKeys.push(`measure_key_${i}`);\n }\n });\n this.listOfMeasureColumn$.next(listOfKeys);\n }\n\n setListOfAutoWidth(listOfAutoWidth: number[]): void {\n this.listOfAutoWidthPx$.next(listOfAutoWidth.map(width => `${width}px`));\n }\n\n setShowEmpty(showEmpty: boolean): void {\n this.showEmpty$.next(showEmpty);\n }\n\n setNoResult(noResult: string | TemplateRef | undefined): void {\n this.noResult$.next(noResult);\n }\n\n setScroll(scrollX: string | null, scrollY: string | null): void {\n const enableAutoMeasure = !!(scrollX || scrollY);\n if (!enableAutoMeasure) {\n this.setListOfAutoWidth([]);\n }\n this.enableAutoMeasure$.next(enableAutoMeasure);\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive, inject } from '@angular/core';\n\nimport { NzTableStyleService } from '../table-style.service';\n\n@Directive({\n selector: 'th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])',\n host: {\n '[class.ant-table-cell]': 'isInsideTable'\n }\n})\nexport class NzTableCellDirective {\n isInsideTable = !!inject(NzTableStyleService, { optional: true });\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Injectable, OnDestroy } from '@angular/core';\nimport { BehaviorSubject, Observable, Subject, combineLatest } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, filter, map, skip, switchMap, takeUntil } from 'rxjs/operators';\n\nimport {\n NzCustomColumn,\n NzTableFilterFn,\n NzTableFilterValue,\n NzTableQueryParams,\n NzTableSortFn,\n NzTableSortOrder\n} from './table.types';\n\n@Injectable()\nexport class NzTableDataService implements OnDestroy {\n private destroy$ = new Subject();\n private pageIndex$ = new BehaviorSubject(1);\n private frontPagination$ = new BehaviorSubject(true);\n private pageSize$ = new BehaviorSubject(10);\n private listOfData$ = new BehaviorSubject([]);\n listOfCustomColumn$ = new BehaviorSubject([]);\n pageIndexDistinct$ = this.pageIndex$.pipe(distinctUntilChanged());\n pageSizeDistinct$ = this.pageSize$.pipe(distinctUntilChanged());\n listOfCalcOperator$ = new BehaviorSubject<\n Array<{\n key?: string;\n sortFn: NzTableSortFn | null | boolean;\n sortOrder: NzTableSortOrder;\n filterFn: NzTableFilterFn | null | boolean;\n filterValue: NzTableFilterValue;\n sortPriority: number | boolean;\n }>\n >([]);\n queryParams$: Observable = combineLatest([\n this.pageIndexDistinct$,\n this.pageSizeDistinct$,\n this.listOfCalcOperator$\n ]).pipe(\n debounceTime(0),\n skip(1),\n map(([pageIndex, pageSize, listOfCalc]) => ({\n pageIndex,\n pageSize,\n sort: listOfCalc\n .filter(item => item.sortFn)\n .map(item => ({\n key: item.key!,\n value: item.sortOrder\n })),\n filter: listOfCalc\n .filter(item => item.filterFn)\n .map(item => ({\n key: item.key!,\n value: item.filterValue\n }))\n }))\n );\n private listOfDataAfterCalc$ = combineLatest([this.listOfData$, this.listOfCalcOperator$]).pipe(\n map(([listOfData, listOfCalcOperator]) => {\n let listOfDataAfterCalc = [...listOfData];\n const listOfFilterOperator = listOfCalcOperator.filter(item => {\n const { filterValue, filterFn } = item;\n const isReset =\n filterValue === null ||\n filterValue === undefined ||\n (Array.isArray(filterValue) && filterValue!.length === 0);\n return !isReset && typeof filterFn === 'function';\n });\n for (const item of listOfFilterOperator) {\n const { filterFn, filterValue } = item;\n listOfDataAfterCalc = listOfDataAfterCalc.filter(data => (filterFn as NzTableFilterFn)(filterValue, data));\n }\n const listOfSortOperator = listOfCalcOperator\n .filter(item => item.sortOrder !== null && typeof item.sortFn === 'function')\n .sort((a, b) => +b.sortPriority - +a.sortPriority);\n if (listOfCalcOperator.length) {\n listOfDataAfterCalc.sort((record1, record2) => {\n for (const item of listOfSortOperator) {\n const { sortFn, sortOrder } = item;\n if (sortFn && sortOrder) {\n const compareResult = (sortFn as NzTableSortFn)(record1, record2, sortOrder);\n if (compareResult !== 0) {\n return sortOrder === 'ascend' ? compareResult : -compareResult;\n }\n }\n }\n return 0;\n });\n }\n return listOfDataAfterCalc;\n })\n );\n private listOfFrontEndCurrentPageData$ = combineLatest([\n this.pageIndexDistinct$,\n this.pageSizeDistinct$,\n this.listOfDataAfterCalc$\n ]).pipe(\n takeUntil(this.destroy$),\n filter(value => {\n const [pageIndex, pageSize, listOfData] = value;\n const maxPageIndex = Math.ceil(listOfData.length / pageSize) || 1;\n return pageIndex <= maxPageIndex;\n }),\n map(([pageIndex, pageSize, listOfData]) => listOfData.slice((pageIndex - 1) * pageSize, pageIndex * pageSize))\n );\n listOfCurrentPageData$ = this.frontPagination$.pipe(\n switchMap(pagination => (pagination ? this.listOfFrontEndCurrentPageData$ : this.listOfDataAfterCalc$))\n );\n total$ = this.frontPagination$.pipe(\n switchMap(pagination => (pagination ? this.listOfDataAfterCalc$ : this.listOfData$)),\n map(list => list.length),\n distinctUntilChanged()\n );\n\n updatePageSize(size: number): void {\n this.pageSize$.next(size);\n }\n updateFrontPagination(pagination: boolean): void {\n this.frontPagination$.next(pagination);\n }\n updatePageIndex(index: number): void {\n this.pageIndex$.next(index);\n }\n updateListOfData(list: readonly T[]): void {\n this.listOfData$.next(list);\n }\n updateListOfCustomColumn(list: NzCustomColumn[]): void {\n this.listOfCustomColumn$.next(list);\n }\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive, ElementRef, Input, OnDestroy, OnInit, Renderer2 } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { NzTableDataService } from '../table-data.service';\n\n@Directive({\n selector: 'td[nzCellControl],th[nzCellControl]'\n})\nexport class NzCustomColumnDirective implements OnInit, OnDestroy {\n @Input() nzCellControl: string | null = null;\n\n private destroy$ = new Subject();\n\n constructor(\n private el: ElementRef,\n private renderer: Renderer2,\n private nzTableDataService: NzTableDataService\n ) {}\n\n ngOnInit(): void {\n this.nzTableDataService.listOfCustomColumn$.pipe(takeUntil(this.destroy$)).subscribe(item => {\n if (item.length) {\n item.forEach((v, i) => {\n if (v.value === this.nzCellControl) {\n if (!v.default) {\n this.renderer.setStyle(this.el.nativeElement, 'display', 'none');\n } else {\n this.renderer.setStyle(this.el.nativeElement, 'display', 'block');\n }\n this.renderer.setStyle(this.el.nativeElement, 'order', i);\n if (!v?.fixWidth) {\n this.renderer.setStyle(this.el.nativeElement, 'flex', `1 1 ${v.width}px`);\n } else {\n this.renderer.setStyle(this.el.nativeElement, 'flex', `1 0 ${v.width}px`);\n }\n }\n });\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/* eslint-disable @angular-eslint/component-selector */\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChange,\n SimpleChanges,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { NzCheckboxModule } from 'ng-zorro-antd/checkbox';\n\nimport { NzRowExpandButtonDirective } from '../addon/row-expand-button.directive';\nimport { NzRowIndentDirective } from '../addon/row-indent.directive';\n\n@Component({\n selector:\n 'td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false,\n encapsulation: ViewEncapsulation.None,\n template: `\n @if (nzShowExpand || nzIndentSize > 0) {\n \n @if (nzExpandIcon) {\n \n } @else {\n \n }\n }\n @if (nzShowCheckbox) {\n \n }\n \n `,\n host: {\n '[class.ant-table-cell-with-append]': `nzShowExpand || nzIndentSize > 0`,\n '[class.ant-table-selection-column]': `nzShowCheckbox`\n },\n imports: [NzRowIndentDirective, NzRowExpandButtonDirective, NgTemplateOutlet, NzCheckboxModule, FormsModule]\n})\nexport class NzTdAddOnComponent implements OnChanges {\n @Input() nzChecked = false;\n @Input() nzDisabled = false;\n @Input() nzIndeterminate = false;\n @Input() nzLabel: string | null = null;\n @Input() nzIndentSize = 0;\n @Input({ transform: booleanAttribute }) nzShowExpand = false;\n @Input({ transform: booleanAttribute }) nzShowCheckbox = false;\n @Input({ transform: booleanAttribute }) nzExpand = false;\n @Input() nzExpandIcon: TemplateRef | null = null;\n @Output() readonly nzCheckedChange = new EventEmitter();\n @Output() readonly nzExpandChange = new EventEmitter();\n private isNzShowExpandChanged = false;\n private isNzShowCheckboxChanged = false;\n\n onCheckedChange(checked: boolean): void {\n this.nzChecked = checked;\n this.nzCheckedChange.emit(checked);\n }\n\n onExpandChange(expand: boolean): void {\n this.nzExpand = expand;\n this.nzExpandChange.emit(expand);\n }\n ngOnChanges(changes: SimpleChanges): void {\n const isFirstChange = (value: SimpleChange): boolean =>\n value && value.firstChange && value.currentValue !== undefined;\n const { nzExpand, nzChecked, nzShowExpand, nzShowCheckbox } = changes;\n if (nzShowExpand) {\n this.isNzShowExpandChanged = true;\n }\n if (nzShowCheckbox) {\n this.isNzShowCheckboxChanged = true;\n }\n if (isFirstChange(nzExpand) && !this.isNzShowExpandChanged) {\n this.nzShowExpand = true;\n }\n if (isFirstChange(nzChecked) && !this.isNzShowCheckboxChanged) {\n this.nzShowCheckbox = true;\n }\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/* eslint-disable @angular-eslint/component-selector */\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnInit,\n Output,\n SimpleChange,\n SimpleChanges,\n ViewEncapsulation,\n booleanAttribute\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\nimport { NzConfigKey, NzConfigService, WithConfig } from 'ng-zorro-antd/core/config';\nimport { NzDestroyService } from 'ng-zorro-antd/core/services';\nimport { fromEventOutsideAngular } from 'ng-zorro-antd/core/util';\n\nimport { NzTableFilterComponent } from '../addon/filter.component';\nimport { NzTableSortersComponent } from '../addon/sorters.component';\nimport {\n NzTableFilterFn,\n NzTableFilterList,\n NzTableFilterValue,\n NzTableSortFn,\n NzTableSortOrder\n} from '../table.types';\n\nconst NZ_CONFIG_MODULE_NAME: NzConfigKey = 'table';\n\n@Component({\n selector:\n 'th[nzColumnKey], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]',\n preserveWhitespaces: false,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (nzShowFilter || nzCustomFilter) {\n \n } @else {\n \n }\n \n \n \n \n \n \n \n \n \n \n \n \n \n `,\n host: {\n '[class.ant-table-column-has-sorters]': 'nzShowSort',\n '[class.ant-table-column-sort]': `sortOrder === 'descend' || sortOrder === 'ascend'`\n },\n providers: [NzDestroyService],\n imports: [NzTableFilterComponent, NgTemplateOutlet, NzTableSortersComponent]\n})\nexport class NzThAddOnComponent implements OnChanges, OnInit {\n readonly _nzModuleName: NzConfigKey = NZ_CONFIG_MODULE_NAME;\n\n manualClickOrder$ = new Subject>();\n calcOperatorChange$ = new Subject();\n nzFilterValue: NzTableFilterValue = null;\n sortOrder: NzTableSortOrder = null;\n sortDirections: NzTableSortOrder[] = ['ascend', 'descend', null];\n private sortOrderChange$ = new Subject();\n private isNzShowSortChanged = false;\n private isNzShowFilterChanged = false;\n @Input() nzColumnKey?: string;\n @Input() nzFilterMultiple = true;\n @Input() nzSortOrder: NzTableSortOrder = null;\n @Input() nzSortPriority: number | boolean = false;\n @Input() @WithConfig() nzSortDirections: NzTableSortOrder[] = ['ascend', 'descend', null];\n @Input() nzFilters: NzTableFilterList = [];\n @Input() nzSortFn: NzTableSortFn | boolean | null = null;\n @Input() nzFilterFn: NzTableFilterFn | boolean | null = null;\n @Input({ transform: booleanAttribute }) nzShowSort = false;\n @Input({ transform: booleanAttribute }) nzShowFilter = false;\n @Input({ transform: booleanAttribute }) nzCustomFilter = false;\n @Output() readonly nzCheckedChange = new EventEmitter();\n @Output() readonly nzSortOrderChange = new EventEmitter();\n @Output() readonly nzFilterChange = new EventEmitter();\n\n getNextSortDirection(sortDirections: NzTableSortOrder[], current: NzTableSortOrder): NzTableSortOrder {\n const index = sortDirections.indexOf(current);\n if (index === sortDirections.length - 1) {\n return sortDirections[0];\n } else {\n return sortDirections[index + 1];\n }\n }\n\n setSortOrder(order: NzTableSortOrder): void {\n this.sortOrderChange$.next(order);\n }\n\n clearSortOrder(): void {\n if (this.sortOrder !== null) {\n this.setSortOrder(null);\n }\n }\n\n onFilterValueChange(value: NzTableFilterValue): void {\n this.nzFilterChange.emit(value);\n this.nzFilterValue = value;\n this.updateCalcOperator();\n }\n\n updateCalcOperator(): void {\n this.calcOperatorChange$.next();\n }\n\n constructor(\n public nzConfigService: NzConfigService,\n private host: ElementRef,\n private cdr: ChangeDetectorRef,\n private ngZone: NgZone,\n private destroy$: NzDestroyService\n ) {}\n\n ngOnInit(): void {\n fromEventOutsideAngular(this.host.nativeElement, 'click')\n .pipe(\n filter(() => this.nzShowSort),\n takeUntil(this.destroy$)\n )\n .subscribe(() => {\n const nextOrder = this.getNextSortDirection(this.sortDirections, this.sortOrder!);\n this.ngZone.run(() => {\n this.setSortOrder(nextOrder);\n this.manualClickOrder$.next(this);\n });\n });\n\n this.sortOrderChange$.pipe(takeUntil(this.destroy$)).subscribe(order => {\n if (this.sortOrder !== order) {\n this.sortOrder = order;\n this.nzSortOrderChange.emit(order);\n }\n this.updateCalcOperator();\n this.cdr.markForCheck();\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const {\n nzSortDirections,\n nzFilters,\n nzSortOrder,\n nzSortFn,\n nzFilterFn,\n nzSortPriority,\n nzFilterMultiple,\n nzShowSort,\n nzShowFilter\n } = changes;\n if (nzSortDirections) {\n if (this.nzSortDirections && this.nzSortDirections.length) {\n this.sortDirections = this.nzSortDirections;\n }\n }\n if (nzSortOrder) {\n this.sortOrder = this.nzSortOrder;\n this.setSortOrder(this.nzSortOrder);\n }\n if (nzShowSort) {\n this.isNzShowSortChanged = true;\n }\n if (nzShowFilter) {\n this.isNzShowFilterChanged = true;\n }\n const isFirstChange = (value: SimpleChange): boolean =>\n value && value.firstChange && value.currentValue !== undefined;\n if ((isFirstChange(nzSortOrder) || isFirstChange(nzSortFn)) && !this.isNzShowSortChanged) {\n this.nzShowSort = true;\n }\n if (isFirstChange(nzFilters) && !this.isNzShowFilterChanged) {\n this.nzShowFilter = true;\n }\n if ((nzFilters || nzFilterMultiple) && this.nzShowFilter) {\n const listOfValue = this.nzFilters.filter(item => item.byDefault).map(item => item.value);\n this.nzFilterValue = this.nzFilterMultiple ? listOfValue : listOfValue[0] || null;\n }\n if (nzSortFn || nzFilterFn || nzSortPriority || nzFilters) {\n this.updateCalcOperator();\n }\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive, ElementRef, Input, OnChanges, Renderer2, SimpleChanges } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport { isNil } from 'ng-zorro-antd/core/util';\n\n@Directive({\n selector: 'th'\n})\nexport class NzThMeasureDirective implements OnChanges {\n changes$ = new Subject();\n @Input() nzWidth: string | null = null;\n @Input() colspan: string | number | null = null;\n @Input() colSpan: string | number | null = null;\n @Input() rowspan: string | number | null = null;\n @Input() rowSpan: string | number | null = null;\n constructor(\n private renderer: Renderer2,\n private elementRef: ElementRef\n ) {}\n ngOnChanges(changes: SimpleChanges): void {\n const { nzWidth, colspan, rowspan, colSpan, rowSpan } = changes;\n if (colspan || colSpan) {\n const col = this.colspan || this.colSpan;\n if (!isNil(col)) {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'colspan', `${col}`);\n } else {\n this.renderer.removeAttribute(this.elementRef.nativeElement, 'colspan');\n }\n }\n if (rowspan || rowSpan) {\n const row = this.rowspan || this.rowSpan;\n if (!isNil(row)) {\n this.renderer.setAttribute(this.elementRef.nativeElement, 'rowspan', `${row}`);\n } else {\n this.renderer.removeAttribute(this.elementRef.nativeElement, 'rowspan');\n }\n }\n if (nzWidth || colspan) {\n this.changes$.next();\n }\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/* eslint-disable @angular-eslint/component-selector */\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChange,\n SimpleChanges,\n ViewEncapsulation,\n booleanAttribute\n} from '@angular/core';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { NzTableSelectionComponent } from '../addon/selection.component';\n\n@Component({\n selector: 'th[nzSelections],th[nzChecked],th[nzShowCheckbox],th[nzShowRowSelection]',\n preserveWhitespaces: false,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n \n \n `,\n host: { class: 'ant-table-selection-column' },\n imports: [NzTableSelectionComponent]\n})\nexport class NzThSelectionComponent implements OnChanges {\n @Input() nzSelections: Array<{ text: string; onSelect(...args: NzSafeAny[]): NzSafeAny }> = [];\n @Input({ transform: booleanAttribute }) nzChecked = false;\n @Input({ transform: booleanAttribute }) nzDisabled = false;\n @Input() nzIndeterminate = false;\n @Input() nzLabel: string | null = null;\n @Input({ transform: booleanAttribute }) nzShowCheckbox = false;\n @Input({ transform: booleanAttribute }) nzShowRowSelection = false;\n @Output() readonly nzCheckedChange = new EventEmitter();\n\n private isNzShowExpandChanged = false;\n private isNzShowCheckboxChanged = false;\n\n onCheckedChange(checked: boolean): void {\n this.nzChecked = checked;\n this.nzCheckedChange.emit(checked);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const isFirstChange = (value: SimpleChange): boolean =>\n value && value.firstChange && value.currentValue !== undefined;\n const { nzChecked, nzSelections, nzShowExpand, nzShowCheckbox } = changes;\n if (nzShowExpand) {\n this.isNzShowExpandChanged = true;\n }\n if (nzShowCheckbox) {\n this.isNzShowCheckboxChanged = true;\n }\n if (isFirstChange(nzSelections) && !this.isNzShowExpandChanged) {\n this.nzShowRowSelection = true;\n }\n if (isFirstChange(nzChecked) && !this.isNzShowCheckboxChanged) {\n this.nzShowCheckbox = true;\n }\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive, Input } from '@angular/core';\n\n@Directive({\n selector: 'th[nzAlign],td[nzAlign]',\n host: {\n '[style.text-align]': 'nzAlign'\n }\n})\nexport class NzCellAlignDirective {\n @Input() nzAlign: 'left' | 'right' | 'center' | null = null;\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive, Input, booleanAttribute } from '@angular/core';\n\n@Directive({\n selector: 'th[nzEllipsis],td[nzEllipsis]',\n host: {\n '[class.ant-table-cell-ellipsis]': 'nzEllipsis'\n }\n})\nexport class NzCellEllipsisDirective {\n @Input({ transform: booleanAttribute }) nzEllipsis = true;\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive, Input, booleanAttribute } from '@angular/core';\n\n@Directive({\n selector: 'th[nzBreakWord],td[nzBreakWord]',\n host: {\n '[style.word-break]': `nzBreakWord ? 'break-all' : ''`\n }\n})\nexport class NzCellBreakWordDirective {\n @Input({ transform: booleanAttribute }) nzBreakWord = true;\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewEncapsulation } from '@angular/core';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { NzTableLayout } from '../table.types';\n\n@Component({\n selector: 'table[nz-table-content]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n @if (listOfColWidth.length > 0) {\n
\n @for (width of listOfColWidth; track $index) {\n
\n }\n
\n }\n @if (theadTemplate) {\n \n \n \n }\n \n \n @if (tfootTemplate) {\n \n \n \n }\n `,\n host: {\n '[style.table-layout]': 'tableLayout',\n '[class.ant-table-fixed]': 'scrollX',\n '[style.width]': 'scrollX',\n '[style.min-width]': `scrollX ? '100%' : null`\n },\n imports: [NgTemplateOutlet]\n})\nexport class NzTableContentComponent {\n @Input() tableLayout: NzTableLayout = 'auto';\n @Input() theadTemplate: TemplateRef | null = null;\n @Input() contentTemplate: TemplateRef | null = null;\n @Input() tfootTemplate: TemplateRef | null = null;\n @Input() listOfColWidth: ReadonlyArray = [];\n @Input() scrollX: string | null = null;\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { AsyncPipe, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { BehaviorSubject, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { NzTableStyleService } from '../table-style.service';\n\n@Component({\n selector: 'tr[nz-table-fixed-row], tr[nzExpand]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n
\n @if (enableAutoMeasure$ | async) {\n
\n \n
\n } @else {\n \n }\n
\n \n \n \n `,\n imports: [AsyncPipe, NgTemplateOutlet]\n})\nexport class NzTableFixedRowComponent implements OnInit, OnDestroy, AfterViewInit {\n @ViewChild('tdElement', { static: true }) tdElement!: ElementRef;\n hostWidth$ = new BehaviorSubject(null);\n enableAutoMeasure$ = new BehaviorSubject(false);\n private destroy$ = new Subject();\n\n constructor(\n private nzTableStyleService: NzTableStyleService,\n private renderer: Renderer2\n ) {}\n\n ngOnInit(): void {\n if (this.nzTableStyleService) {\n const { enableAutoMeasure$, hostWidth$ } = this.nzTableStyleService;\n enableAutoMeasure$.pipe(takeUntil(this.destroy$)).subscribe(this.enableAutoMeasure$);\n hostWidth$.pipe(takeUntil(this.destroy$)).subscribe(this.hostWidth$);\n }\n }\n\n ngAfterViewInit(): void {\n this.nzTableStyleService.columnCount$.pipe(takeUntil(this.destroy$)).subscribe(count => {\n this.renderer.setAttribute(this.tdElement.nativeElement, 'colspan', `${count}`);\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewEncapsulation } from '@angular/core';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { NzTableLayout } from '../table.types';\nimport { NzTableContentComponent } from './table-content.component';\n\n@Component({\n selector: 'nz-table-inner-default',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n
\n
\n
\n `,\n host: { class: 'ant-table-container' },\n imports: [NzTableContentComponent]\n})\nexport class NzTableInnerDefaultComponent {\n @Input() tableLayout: NzTableLayout = 'auto';\n @Input() listOfColWidth: ReadonlyArray = [];\n @Input() theadTemplate: TemplateRef | null = null;\n @Input() contentTemplate: TemplateRef | null = null;\n @Input() tfootTemplate: TemplateRef | null = null;\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnDestroy,\n Output,\n QueryList,\n ViewChildren,\n ViewEncapsulation\n} from '@angular/core';\nimport { Observable, Subject, combineLatest } from 'rxjs';\nimport { debounceTime, map, startWith, switchMap, takeUntil } from 'rxjs/operators';\n\nimport { NzResizeObserver } from 'ng-zorro-antd/cdk/resize-observer';\n\n@Component({\n selector: 'tr[nz-table-measure-row]',\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n @for (th of listOfMeasureColumn; track $index) {\n
\n }\n `,\n host: { class: 'ant-table-measure-now' }\n})\nexport class NzTrMeasureComponent implements AfterViewInit, OnDestroy {\n @Input() listOfMeasureColumn: readonly string[] = [];\n @Output() readonly listOfAutoWidth = new EventEmitter();\n @ViewChildren('tdElement') listOfTdElement!: QueryList;\n private destroy$ = new Subject();\n\n constructor(\n private nzResizeObserver: NzResizeObserver,\n private ngZone: NgZone\n ) {}\n\n ngAfterViewInit(): void {\n this.listOfTdElement.changes\n .pipe(startWith(this.listOfTdElement))\n .pipe(\n switchMap(\n list =>\n combineLatest(\n list.toArray().map((item: ElementRef) =>\n this.nzResizeObserver.observe(item).pipe(\n map(([entry]) => {\n const { width } = entry.target.getBoundingClientRect();\n return Math.floor(width);\n })\n )\n )\n ) as Observable\n ),\n debounceTime(16),\n takeUntil(this.destroy$)\n )\n .subscribe(data => {\n // Caretaker note: we don't have to re-enter the Angular zone each time the stream emits.\n // The below check is necessary to be sure that zone is not nooped through `BootstrapOptions`\n // (`bootstrapModule(AppModule, { ngZone: 'noop' }))`. The `ngZone instanceof NgZone` may return\n // `false` if zone is nooped, since `ngZone` will be an instance of the `NoopNgZone`.\n // The `ResizeObserver` might be also patched through `zone.js/dist/zone-patch-resize-observer`,\n // thus calling `ngZone.run` again will cause another change detection.\n if (this.ngZone instanceof NgZone && NgZone.isInAngularZone()) {\n this.listOfAutoWidth.next(data);\n } else {\n this.ngZone.run(() => this.listOfAutoWidth.next(data));\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\n/* eslint-disable @angular-eslint/component-selector */\n\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, OnDestroy, TemplateRef, ViewEncapsulation, inject } from '@angular/core';\nimport { BehaviorSubject, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { NzEmptyModule } from 'ng-zorro-antd/empty';\n\nimport { NzTableStyleService } from '../table-style.service';\nimport { NzTableFixedRowComponent } from './table-fixed-row.component';\nimport { NzTrMeasureComponent } from './tr-measure.component';\n\n@Component({\n selector: 'tbody',\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n @if (listOfMeasureColumn$ | async; as listOfMeasureColumn) {\n @if (isInsideTable && listOfMeasureColumn.length) {\n
\n }\n }\n \n @if (showEmpty$ | async) {\n
\n \n
\n }\n `,\n host: {\n '[class.ant-table-tbody]': 'isInsideTable'\n },\n imports: [AsyncPipe, NzTrMeasureComponent, NzTableFixedRowComponent, NzEmptyModule]\n})\nexport class NzTbodyComponent implements OnDestroy {\n isInsideTable = false;\n showEmpty$ = new BehaviorSubject(false);\n noResult$ = new BehaviorSubject | undefined>(undefined);\n listOfMeasureColumn$ = new BehaviorSubject([]);\n private destroy$ = new Subject();\n private nzTableStyleService = inject(NzTableStyleService, { optional: true });\n\n constructor() {\n this.isInsideTable = !!this.nzTableStyleService;\n if (this.nzTableStyleService) {\n const { showEmpty$, noResult$, listOfMeasureColumn$ } = this.nzTableStyleService;\n noResult$.pipe(takeUntil(this.destroy$)).subscribe(this.noResult$);\n listOfMeasureColumn$.pipe(takeUntil(this.destroy$)).subscribe(this.listOfMeasureColumn$);\n showEmpty$.pipe(takeUntil(this.destroy$)).subscribe(this.showEmpty$);\n }\n }\n\n onListOfAutoWidthChange(listOfAutoWidth: number[]): void {\n this.nzTableStyleService?.setListOfAutoWidth(listOfAutoWidth);\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Platform } from '@angular/cdk/platform';\nimport { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Renderer2,\n SimpleChanges,\n TemplateRef,\n TrackByFunction,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { merge, Subject } from 'rxjs';\nimport { delay, filter, startWith, switchMap, takeUntil } from 'rxjs/operators';\n\nimport { NzResizeService } from 'ng-zorro-antd/core/services';\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { fromEventOutsideAngular } from 'ng-zorro-antd/core/util';\n\nimport { NzTableSummaryFixedType } from '../table.types';\nimport { NzTableContentComponent } from './table-content.component';\nimport { NzTbodyComponent } from './tbody.component';\n\n@Component({\n selector: 'nz-table-inner-scroll',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n @if (scrollY) {\n
\n
\n
\n @if (!virtualTemplate) {\n
\n
\n
\n } @else {\n \n
\n \n \n \n \n \n
\n \n }\n @if (tfootFixed === 'bottom') {\n
\n
\n
\n }\n } @else {\n
\n
\n
\n }\n `,\n host: { class: 'ant-table-container' },\n imports: [NzTableContentComponent, ScrollingModule, NgTemplateOutlet, NzTbodyComponent]\n})\nexport class NzTableInnerScrollComponent implements OnChanges, AfterViewInit, OnDestroy {\n @Input() data: readonly T[] = [];\n @Input() scrollX: string | null = null;\n @Input() scrollY: string | null = null;\n @Input() contentTemplate: TemplateRef | null = null;\n @Input() widthConfig: string[] = [];\n @Input() listOfColWidth: ReadonlyArray = [];\n @Input() theadTemplate: TemplateRef | null = null;\n @Input() tfootTemplate: TemplateRef | null = null;\n @Input() tfootFixed: NzTableSummaryFixedType | null = null;\n @Input() virtualTemplate: TemplateRef | null = null;\n @Input() virtualItemSize = 0;\n @Input() virtualMaxBufferPx = 200;\n @Input() virtualMinBufferPx = 100;\n @Input() tableMainElement?: HTMLDivElement;\n @Input() virtualForTrackBy: TrackByFunction = index => index;\n @ViewChild('tableHeaderElement', { read: ElementRef }) tableHeaderElement!: ElementRef;\n @ViewChild('tableBodyElement', { read: ElementRef }) tableBodyElement!: ElementRef;\n @ViewChild('tableFootElement', { read: ElementRef }) tableFootElement?: ElementRef;\n @ViewChild(CdkVirtualScrollViewport, { read: CdkVirtualScrollViewport })\n cdkVirtualScrollViewport?: CdkVirtualScrollViewport;\n headerStyleMap = {};\n bodyStyleMap = {};\n @Input() verticalScrollBarWidth = 0;\n @Input() noDataVirtualHeight = '182px';\n private data$ = new Subject();\n private scroll$ = new Subject();\n private destroy$ = new Subject();\n\n setScrollPositionClassName(clear: boolean = false): void {\n const { scrollWidth, scrollLeft, clientWidth } = this.tableBodyElement.nativeElement;\n const leftClassName = 'ant-table-ping-left';\n const rightClassName = 'ant-table-ping-right';\n if ((scrollWidth === clientWidth && scrollWidth !== 0) || clear) {\n this.renderer.removeClass(this.tableMainElement, leftClassName);\n this.renderer.removeClass(this.tableMainElement, rightClassName);\n } else if (scrollLeft === 0) {\n this.renderer.removeClass(this.tableMainElement, leftClassName);\n this.renderer.addClass(this.tableMainElement, rightClassName);\n } else if (scrollWidth === scrollLeft + clientWidth) {\n this.renderer.removeClass(this.tableMainElement, rightClassName);\n this.renderer.addClass(this.tableMainElement, leftClassName);\n } else {\n this.renderer.addClass(this.tableMainElement, leftClassName);\n this.renderer.addClass(this.tableMainElement, rightClassName);\n }\n }\n\n constructor(\n private renderer: Renderer2,\n private ngZone: NgZone,\n private platform: Platform,\n private resizeService: NzResizeService\n ) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n const { scrollX, scrollY, data } = changes;\n if (scrollX || scrollY) {\n const hasVerticalScrollBar = this.verticalScrollBarWidth !== 0;\n this.headerStyleMap = {\n overflowX: 'hidden',\n overflowY: this.scrollY && hasVerticalScrollBar ? 'scroll' : 'hidden'\n };\n this.bodyStyleMap = {\n overflowY: this.scrollY ? 'scroll' : 'hidden',\n overflowX: this.scrollX ? 'auto' : null,\n maxHeight: this.scrollY\n };\n // Caretaker note: we have to emit the value outside the Angular zone, thus DOM timer (`delay(0)`) and `scroll`\n // event listener will be also added outside the Angular zone.\n this.ngZone.runOutsideAngular(() => this.scroll$.next());\n }\n if (data) {\n // See the comment above.\n this.ngZone.runOutsideAngular(() => this.data$.next());\n }\n }\n\n ngAfterViewInit(): void {\n if (this.platform.isBrowser) {\n this.ngZone.runOutsideAngular(() => {\n const scrollEvent$ = this.scroll$.pipe(\n startWith(null),\n delay(0),\n switchMap(() =>\n fromEventOutsideAngular(this.tableBodyElement.nativeElement, 'scroll').pipe(startWith(true))\n ),\n takeUntil(this.destroy$)\n );\n const resize$ = this.resizeService.subscribe().pipe(takeUntil(this.destroy$));\n const data$ = this.data$.pipe(takeUntil(this.destroy$));\n const setClassName$ = merge(scrollEvent$, resize$, data$, this.scroll$).pipe(\n startWith(true),\n delay(0),\n takeUntil(this.destroy$)\n );\n setClassName$.subscribe(() => this.setScrollPositionClassName());\n scrollEvent$.pipe(filter(() => !!this.scrollY)).subscribe(() => {\n this.tableHeaderElement.nativeElement.scrollLeft = this.tableBodyElement.nativeElement.scrollLeft;\n if (this.tableFootElement) {\n this.tableFootElement.nativeElement.scrollLeft = this.tableBodyElement.nativeElement.scrollLeft;\n }\n });\n });\n }\n }\n\n ngOnDestroy(): void {\n this.setScrollPositionClassName(true);\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive, TemplateRef } from '@angular/core';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Directive({\n selector: '[nz-virtual-scroll]',\n exportAs: 'nzVirtualScroll'\n})\nexport class NzTableVirtualScrollDirective {\n constructor(public templateRef: TemplateRef<{ $implicit: T; index: number }>) {}\n\n static ngTemplateContextGuard(\n _dir: NzTableVirtualScrollDirective,\n _ctx: NzSafeAny\n ): _ctx is { $implicit: T; index: number } {\n return true;\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewEncapsulation } from '@angular/core';\n\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Component({\n selector: 'nz-table-title-footer',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n {{ title }}\n {{ footer }}\n `,\n host: {\n '[class.ant-table-title]': `title !== null`,\n '[class.ant-table-footer]': `footer !== null`\n },\n imports: [NzOutletModule]\n})\nexport class NzTableTitleFooterComponent {\n @Input() title: string | TemplateRef | null = null;\n @Input() footer: string | TemplateRef | null = null;\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Direction, Directionality } from '@angular/cdk/bidi';\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n TrackByFunction,\n ViewChild,\n ViewEncapsulation,\n booleanAttribute\n} from '@angular/core';\nimport { BehaviorSubject, Subject, combineLatest } from 'rxjs';\nimport { filter, map, takeUntil } from 'rxjs/operators';\n\nimport { NzResizeObserver } from 'ng-zorro-antd/cdk/resize-observer';\nimport { NzConfigKey, NzConfigService, WithConfig } from 'ng-zorro-antd/core/config';\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { measureScrollbar } from 'ng-zorro-antd/core/util';\nimport { NzPaginationModule, PaginationItemRenderContext } from 'ng-zorro-antd/pagination';\nimport { NzSpinComponent } from 'ng-zorro-antd/spin';\n\nimport { NzTableDataService } from '../table-data.service';\nimport { NzTableStyleService } from '../table-style.service';\nimport {\n NzCustomColumn,\n NzTableLayout,\n NzTablePaginationPosition,\n NzTablePaginationType,\n NzTableQueryParams,\n NzTableSize,\n NzTableSummaryFixedType\n} from '../table.types';\nimport { NzTableInnerDefaultComponent } from './table-inner-default.component';\nimport { NzTableInnerScrollComponent } from './table-inner-scroll.component';\nimport { NzTableVirtualScrollDirective } from './table-virtual-scroll.directive';\nimport { NzTableTitleFooterComponent } from './title-footer.component';\n\nconst NZ_CONFIG_MODULE_NAME: NzConfigKey = 'table';\n\n@Component({\n selector: 'nz-table',\n exportAs: 'nzTable',\n providers: [NzTableStyleService, NzTableDataService],\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n \n @if (nzPaginationPosition === 'both' || nzPaginationPosition === 'top') {\n \n }\n