/**
* @license
* Copyright Google LLC 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://angular.dev/license
*/
import {ChangeDetectionStrategy, Component, Directive, ViewEncapsulation} from '@angular/core';
import {
CdkTable,
_CoalescedStyleScheduler,
_COALESCED_STYLE_SCHEDULER,
CDK_TABLE,
STICKY_POSITIONING_LISTENER,
HeaderRowOutlet,
DataRowOutlet,
NoDataRowOutlet,
FooterRowOutlet,
} from '@angular/cdk/table';
import {
_DisposeViewRepeaterStrategy,
_RecycleViewRepeaterStrategy,
_VIEW_REPEATER_STRATEGY,
} from '@angular/cdk/collections';
/**
* Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with
* tables that animate rows.
*/
@Directive({
selector: 'mat-table[recycleRows], table[mat-table][recycleRows]',
providers: [{provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy}],
})
export class MatRecycleRows {}
@Component({
selector: 'mat-table, table[mat-table]',
exportAs: 'matTable',
// Note that according to MDN, the `caption` element has to be projected as the **first**
// element in the table. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption
// We can't reuse `CDK_TABLE_TEMPLATE` because it's incompatible with local compilation mode.
template: `