blob: 21b9cf8d197796cc39faf6a5dab344dc49632b7e [file] [log] [blame]
{"version":3,"file":"table.js","sources":["../../../src/cdk/table/table-module.ts","../../../src/cdk/table/text-column.ts","../../../src/cdk/table/table.ts","../../../src/cdk/table/table-errors.ts","../../../src/cdk/table/sticky-styler.ts","../../../src/cdk/table/row.ts","../../../src/cdk/table/cell.ts","../../../src/cdk/table/can-stick.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\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://angular.io/license\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {HeaderRowOutlet, DataRowOutlet, CdkTable, FooterRowOutlet} from './table';\nimport {\n CdkCellOutlet, CdkFooterRow, CdkFooterRowDef, CdkHeaderRow, CdkHeaderRowDef, CdkRow,\n CdkRowDef\n} from './row';\nimport {\n CdkColumnDef, CdkHeaderCellDef, CdkHeaderCell, CdkCell, CdkCellDef,\n CdkFooterCellDef, CdkFooterCell\n} from './cell';\nimport {CdkTextColumn} from './text-column';\n\nconst EXPORTED_DECLARATIONS = [\n CdkTable,\n CdkRowDef,\n CdkCellDef,\n CdkCellOutlet,\n CdkHeaderCellDef,\n CdkFooterCellDef,\n CdkColumnDef,\n CdkCell,\n CdkRow,\n CdkHeaderCell,\n CdkFooterCell,\n CdkHeaderRow,\n CdkHeaderRowDef,\n CdkFooterRow,\n CdkFooterRowDef,\n DataRowOutlet,\n HeaderRowOutlet,\n FooterRowOutlet,\n CdkTextColumn,\n];\n\n@NgModule({\n imports: [CommonModule],\n exports: EXPORTED_DECLARATIONS,\n declarations: EXPORTED_DECLARATIONS\n\n})\nexport class CdkTableModule { }\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\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://angular.io/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n Inject,\n InjectionToken,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n ViewChild,\n ViewEncapsulation,\n isDevMode,\n} from '@angular/core';\nimport {CdkCellDef, CdkColumnDef, CdkHeaderCellDef} from './cell';\nimport {CdkTable} from './table';\nimport {\n getTableTextColumnMissingParentTableError,\n getTableTextColumnMissingNameError,\n} from './table-errors';\n\n\n/** Configurable options for `CdkTextColumn`. */\nexport interface TextColumnOptions<T> {\n /**\n * Default function that provides the header text based on the column name if a header\n * text is not provided.\n */\n defaultHeaderTextTransform?: (name: string) => string;\n\n /** Default data accessor to use if one is not provided. */\n defaultDataAccessor?: (data: T, name: string) => string;\n}\n\n/** Injection token that can be used to specify the text column options. */\nexport const TEXT_COLUMN_OPTIONS =\n new InjectionToken<TextColumnOptions<any>>('text-column-options');\n\n/**\n * Column that simply shows text content for the header and row cells. Assumes that the table\n * is using the native table implementation (`<table>`).\n *\n * By default, the name of this column will be the header text and data property accessor.\n * The header text can be overridden with the `headerText` input. Cell values can be overridden with\n * the `dataAccessor` input. Change the text justification to the start or end using the `justify`\n * input.\n */\n@Component({\n moduleId: module.id,\n selector: 'cdk-text-column',\n template: `\n <ng-container cdkColumnDef>\n <th cdk-header-cell *cdkHeaderCellDef [style.text-align]=\"justify\">\n {{headerText}}\n </th>\n <td cdk-cell *cdkCellDef=\"let data\" [style.text-align]=\"justify\">\n {{dataAccessor(data, name)}}\n </td>\n </ng-container>\n `,\n encapsulation: ViewEncapsulation.None,\n // Change detection is intentionally not set to OnPush. This component's template will be provided\n // to the table to be inserted into its view. This is problematic when change detection runs since\n // the bindings in this template will be evaluated _after_ the table's view is evaluated, which\n // mean's the template in the table's view will not have the updated value (and in fact will cause\n // an ExpressionChangedAfterItHasBeenCheckedError).\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class CdkTextColumn<T> implements OnDestroy, OnInit {\n /** Column name that should be used to reference this column. */\n @Input()\n get name(): string {\n return this._name;\n }\n set name(name: string) {\n this._name = name;\n\n // With Ivy, inputs can be initialized before static query results are\n // available. In that case, we defer the synchronization until \"ngOnInit\" fires.\n this._syncColumnDefName();\n }\n _name: string;\n\n /**\n * Text label that should be used for the column header. If this property is not\n * set, the header text will default to the column name with its first letter capitalized.\n */\n @Input() headerText: string;\n\n /**\n * Accessor function to retrieve the data rendered for each cell. If this\n * property is not set, the data cells will render the value found in the data's property matching\n * the column's name. For example, if the column is named `id`, then the rendered value will be\n * value defined by the data's `id` property.\n */\n @Input() dataAccessor: (data: T, name: string) => string;\n\n /** Alignment of the cell values. */\n @Input() justify: 'start'|'end' = 'start';\n\n /** @docs-private */\n @ViewChild(CdkColumnDef, {static: true}) columnDef: CdkColumnDef;\n\n /**\n * The column cell is provided to the column during `ngOnInit` with a static query.\n * Normally, this will be retrieved by the column using `ContentChild`, but that assumes the\n * column definition was provided in the same view as the table, which is not the case with this\n * component.\n * @docs-private\n */\n @ViewChild(CdkCellDef, {static: true}) cell: CdkCellDef;\n\n /**\n * The column headerCell is provided to the column during `ngOnInit` with a static query.\n * Normally, this will be retrieved by the column using `ContentChild`, but that assumes the\n * column definition was provided in the same view as the table, which is not the case with this\n * component.\n * @docs-private\n */\n @ViewChild(CdkHeaderCellDef, {static: true}) headerCell: CdkHeaderCellDef;\n\n constructor(\n @Optional() private _table: CdkTable<T>,\n @Optional() @Inject(TEXT_COLUMN_OPTIONS) private _options: TextColumnOptions<T>) {\n this._options = _options || {};\n }\n\n ngOnInit() {\n this._syncColumnDefName();\n\n if (this.headerText === undefined) {\n this.headerText = this._createDefaultHeaderText();\n }\n\n if (!this.dataAccessor) {\n this.dataAccessor =\n this._options.defaultDataAccessor || ((data: T, name: string) => (data as any)[name]);\n }\n\n if (this._table) {\n // Provide the cell and headerCell directly to the table with the static `ViewChild` query,\n // since the columnDef will not pick up its content by the time the table finishes checking\n // its content and initializing the rows.\n this.columnDef.cell = this.cell;\n this.columnDef.headerCell = this.headerCell;\n this._table.addColumnDef(this.columnDef);\n } else {\n throw getTableTextColumnMissingParentTableError();\n }\n }\n\n ngOnDestroy() {\n if (this._table) {\n this._table.removeColumnDef(this.columnDef);\n }\n }\n\n /**\n * Creates a default header text. Use the options' header text transformation function if one\n * has been provided. Otherwise simply capitalize the column name.\n */\n _createDefaultHeaderText() {\n const name = this.name;\n\n if (isDevMode() && !name) {\n throw getTableTextColumnMissingNameError();\n }\n\n if (this._options && this._options.defaultHeaderTextTransform) {\n return this._options.defaultHeaderTextTransform(name);\n }\n\n return name[0].toUpperCase() + name.slice(1);\n }\n\n /** Synchronizes the column definition name with the text column name. */\n private _syncColumnDefName() {\n if (this.columnDef) {\n this.columnDef.name = this.name;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\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://angular.io/license\n */\n\nimport {Direction, Directionality} from '@angular/cdk/bidi';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {CollectionViewer, DataSource, isDataSource} from '@angular/cdk/collections';\nimport {Platform} from '@angular/cdk/platform';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterContentChecked,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n Inject,\n Input,\n isDevMode,\n IterableChangeRecord,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n OnInit,\n Optional,\n QueryList,\n TemplateRef,\n TrackByFunction,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation\n} from '@angular/core';\nimport {BehaviorSubject, Observable, of as observableOf, Subject, Subscription} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {CdkColumnDef} from './cell';\nimport {\n BaseRowDef,\n CdkCellOutlet,\n CdkCellOutletMultiRowContext,\n CdkCellOutletRowContext,\n CdkFooterRowDef,\n CdkHeaderRowDef,\n CdkRowDef\n} from './row';\nimport {StickyStyler} from './sticky-styler';\nimport {\n getTableDuplicateColumnNameError,\n getTableMissingMatchingRowDefError,\n getTableMissingRowDefsError,\n getTableMultipleDefaultRowDefsError,\n getTableUnknownColumnError,\n getTableUnknownDataSourceError\n} from './table-errors';\n\n/** Interface used to provide an outlet for rows to be inserted into. */\nexport interface RowOutlet {\n viewContainer: ViewContainerRef;\n}\n\n/**\n * Union of the types that can be set as the data source for a `CdkTable`.\n * @docs-private\n */\ntype CdkTableDataSourceInput<T> =\n DataSource<T>|Observable<ReadonlyArray<T>|T[]>|ReadonlyArray<T>|T[];\n\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert data rows.\n * @docs-private\n */\n@Directive({selector: '[rowOutlet]'})\nexport class DataRowOutlet implements RowOutlet {\n constructor(public viewContainer: ViewContainerRef, public elementRef: ElementRef) {}\n}\n\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert the header.\n * @docs-private\n */\n@Directive({selector: '[headerRowOutlet]'})\nexport class HeaderRowOutlet implements RowOutlet {\n constructor(public viewContainer: ViewContainerRef, public elementRef: ElementRef) {}\n}\n\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert the footer.\n * @docs-private\n */\n@Directive({selector: '[footerRowOutlet]'})\nexport class FooterRowOutlet implements RowOutlet {\n constructor(public viewContainer: ViewContainerRef, public elementRef: ElementRef) {}\n}\n\n/**\n * The table template that can be used by the mat-table. Should not be used outside of the\n * material library.\n * @docs-private\n */\nexport const CDK_TABLE_TEMPLATE =\n // Note that according to MDN, the `caption` element has to be projected as the **first**\n // element in the table. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption\n `\n <ng-content select=\"caption\"></ng-content>\n <ng-container headerRowOutlet></ng-container>\n <ng-container rowOutlet></ng-container>\n <ng-container footerRowOutlet></ng-container>\n`;\n\n/**\n * Interface used to conveniently type the possible context interfaces for the render row.\n * @docs-private\n */\nexport interface RowContext<T> extends CdkCellOutletMultiRowContext<T>,\n CdkCellOutletRowContext<T> {}\n\n/**\n * Class used to conveniently type the embedded view ref for rows with a context.\n * @docs-private\n */\nabstract class RowViewRef<T> extends EmbeddedViewRef<RowContext<T>> {}\n\n/**\n * Set of properties that represents the identity of a single rendered row.\n *\n * When the table needs to determine the list of rows to render, it will do so by iterating through\n * each data object and evaluating its list of row templates to display (when multiTemplateDataRows\n * is false, there is only one template per data object). For each pair of data object and row\n * template, a `RenderRow` is added to the list of rows to render. If the data object and row\n * template pair has already been rendered, the previously used `RenderRow` is added; else a new\n * `RenderRow` is * created. Once the list is complete and all data objects have been itereated\n * through, a diff is performed to determine the changes that need to be made to the rendered rows.\n *\n * @docs-private\n */\nexport interface RenderRow<T> {\n data: T;\n dataIndex: number;\n rowDef: CdkRowDef<T>;\n}\n\n/**\n * A data table that can render a header row, data rows, and a footer row.\n * Uses the dataSource input to determine the data to be rendered. The data can be provided either\n * as a data array, an Observable stream that emits the data array to render, or a DataSource with a\n * connect function that will return an Observable stream that emits the data array to render.\n */\n@Component({\n moduleId: module.id,\n selector: 'cdk-table, table[cdk-table]',\n exportAs: 'cdkTable',\n template: CDK_TABLE_TEMPLATE,\n host: {\n 'class': 'cdk-table',\n },\n encapsulation: ViewEncapsulation.None,\n // The \"OnPush\" status for the `MatTable` component is effectively a noop, so we are removing it.\n // The view for `MatTable` consists entirely of templates declared in other views. As they are\n // declared elsewhere, they are checked when their declaration points are checked.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class CdkTable<T> implements AfterContentChecked, CollectionViewer, OnDestroy, OnInit {\n private _document: Document;\n\n /** Latest data provided by the data source. */\n protected _data: T[]|ReadonlyArray<T>;\n\n /** Subject that emits when the component has been destroyed. */\n private _onDestroy = new Subject<void>();\n\n /** List of the rendered rows as identified by their `RenderRow` object. */\n private _renderRows: RenderRow<T>[];\n\n /** Subscription that listens for the data provided by the data source. */\n private _renderChangeSubscription: Subscription|null;\n\n /**\n * Map of all the user's defined columns (header, data, and footer cell template) identified by\n * name. Collection populated by the column definitions gathered by `ContentChildren` as well as\n * any custom column definitions added to `_customColumnDefs`.\n */\n private _columnDefsByName = new Map<string, CdkColumnDef>();\n\n /**\n * Set of all row definitions that can be used by this table. Populated by the rows gathered by\n * using `ContentChildren` as well as any custom row definitions added to `_customRowDefs`.\n */\n private _rowDefs: CdkRowDef<T>[];\n\n /**\n * Set of all header row definitions that can be used by this table. Populated by the rows\n * gathered by using `ContentChildren` as well as any custom row definitions added to\n * `_customHeaderRowDefs`.\n */\n private _headerRowDefs: CdkHeaderRowDef[];\n\n /**\n * Set of all row definitions that can be used by this table. Populated by the rows gathered by\n * using `ContentChildren` as well as any custom row definitions added to\n * `_customFooterRowDefs`.\n */\n private _footerRowDefs: CdkFooterRowDef[];\n\n /** Differ used to find the changes in the data provided by the data source. */\n private _dataDiffer: IterableDiffer<RenderRow<T>>;\n\n /** Stores the row definition that does not have a when predicate. */\n private _defaultRowDef: CdkRowDef<T>|null;\n\n /**\n * Column definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n * column definitions as *it's* content child.\n */\n private _customColumnDefs = new Set<CdkColumnDef>();\n\n /**\n * Data row definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n * built-in data rows as *it's* content child.\n */\n private _customRowDefs = new Set<CdkRowDef<T>>();\n\n /**\n * Header row definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n * built-in header rows as *it's* content child.\n */\n private _customHeaderRowDefs = new Set<CdkHeaderRowDef>();\n\n /**\n * Footer row definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has a\n * built-in footer row as *it's* content child.\n */\n private _customFooterRowDefs = new Set<CdkFooterRowDef>();\n\n /**\n * Whether the header row definition has been changed. Triggers an update to the header row after\n * content is checked. Initialized as true so that the table renders the initial set of rows.\n */\n private _headerRowDefChanged = true;\n\n /**\n * Whether the footer row definition has been changed. Triggers an update to the footer row after\n * content is checked. Initialized as true so that the table renders the initial set of rows.\n */\n private _footerRowDefChanged = true;\n\n /**\n * Cache of the latest rendered `RenderRow` objects as a map for easy retrieval when constructing\n * a new list of `RenderRow` objects for rendering rows. Since the new list is constructed with\n * the cached `RenderRow` objects when possible, the row identity is preserved when the data\n * and row template matches, which allows the `IterableDiffer` to check rows by reference\n * and understand which rows are added/moved/removed.\n *\n * Implemented as a map of maps where the first key is the `data: T` object and the second is the\n * `CdkRowDef<T>` object. With the two keys, the cache points to a `RenderRow<T>` object that\n * contains an array of created pairs. The array is necessary to handle cases where the data\n * array contains multiple duplicate data objects and each instantiated `RenderRow` must be\n * stored.\n */\n private _cachedRenderRowsMap = new Map<T, WeakMap<CdkRowDef<T>, RenderRow<T>[]>>();\n\n /** Whether the table is applied to a native `<table>`. */\n private _isNativeHtmlTable: boolean;\n\n /**\n * Utility class that is responsible for applying the appropriate sticky positioning styles to\n * the table's rows and cells.\n */\n private _stickyStyler: StickyStyler;\n\n /**\n * CSS class added to any row or cell that has sticky positioning applied. May be overriden by\n * table subclasses.\n */\n protected stickyCssClass: string = 'cdk-table-sticky';\n\n /**\n * Tracking function that will be used to check the differences in data changes. Used similarly\n * to `ngFor` `trackBy` function. Optimize row operations by identifying a row based on its data\n * relative to the function to know if a row should be added/removed/moved.\n * Accepts a function that takes two parameters, `index` and `item`.\n */\n @Input()\n get trackBy(): TrackByFunction<T> {\n return this._trackByFn;\n }\n set trackBy(fn: TrackByFunction<T>) {\n if (isDevMode() && fn != null && typeof fn !== 'function' && <any>console &&\n <any>console.warn) {\n console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}.`);\n }\n this._trackByFn = fn;\n }\n private _trackByFn: TrackByFunction<T>;\n\n /**\n * The table's source of data, which can be provided in three ways (in order of complexity):\n * - Simple data array (each object represents one table row)\n * - Stream that emits a data array each time the array changes\n * - `DataSource` object that implements the connect/disconnect interface.\n *\n * If a data array is provided, the table must be notified when the array's objects are\n * added, removed, or moved. This can be done by calling the `renderRows()` function which will\n * render the diff since the last table render. If the data array reference is changed, the table\n * will automatically trigger an update to the rows.\n *\n * When providing an Observable stream, the table will trigger an update automatically when the\n * stream emits a new array of data.\n *\n * Finally, when providing a `DataSource` object, the table will use the Observable stream\n * provided by the connect function and trigger updates when that stream emits new data array\n * values. During the table's ngOnDestroy or when the data source is removed from the table, the\n * table will call the DataSource's `disconnect` function (may be useful for cleaning up any\n * subscriptions registered during the connect process).\n */\n @Input()\n get dataSource(): CdkTableDataSourceInput<T> {\n return this._dataSource;\n }\n set dataSource(dataSource: CdkTableDataSourceInput<T>) {\n if (this._dataSource !== dataSource) {\n this._switchDataSource(dataSource);\n }\n }\n private _dataSource: CdkTableDataSourceInput<T>;\n\n /**\n * Whether to allow multiple rows per data object by evaluating which rows evaluate their 'when'\n * predicate to true. If `multiTemplateDataRows` is false, which is the default value, then each\n * dataobject will render the first row that evaluates its when predicate to true, in the order\n * defined in the table, or otherwise the default row which does not have a when predicate.\n */\n @Input()\n get multiTemplateDataRows(): boolean {\n return this._multiTemplateDataRows;\n }\n set multiTemplateDataRows(v: boolean) {\n this._multiTemplateDataRows = coerceBooleanProperty(v);\n\n // In Ivy if this value is set via a static attribute (e.g. <table multiTemplateDataRows>),\n // this setter will be invoked before the row outlet has been defined hence the null check.\n if (this._rowOutlet && this._rowOutlet.viewContainer.length) {\n this._forceRenderDataRows();\n }\n }\n _multiTemplateDataRows: boolean = false;\n\n // TODO(andrewseguin): Remove max value as the end index\n // and instead calculate the view on init and scroll.\n /**\n * Stream containing the latest information on what rows are being displayed on screen.\n * Can be used by the data source to as a heuristic of what data should be provided.\n *\n * @docs-private\n */\n viewChange: BehaviorSubject<{start: number, end: number}> =\n new BehaviorSubject<{start: number, end: number}>({start: 0, end: Number.MAX_VALUE});\n\n // Outlets in the table's template where the header, data rows, and footer will be inserted.\n @ViewChild(DataRowOutlet, {static: true}) _rowOutlet: DataRowOutlet;\n @ViewChild(HeaderRowOutlet, {static: true}) _headerRowOutlet: HeaderRowOutlet;\n @ViewChild(FooterRowOutlet, {static: true}) _footerRowOutlet: FooterRowOutlet;\n\n /**\n * The column definitions provided by the user that contain what the header, data, and footer\n * cells should render for each column.\n */\n @ContentChildren(CdkColumnDef) _contentColumnDefs: QueryList<CdkColumnDef>;\n\n /** Set of data row definitions that were provided to the table as content children. */\n @ContentChildren(CdkRowDef) _contentRowDefs: QueryList<CdkRowDef<T>>;\n\n /** Set of header row definitions that were provided to the table as content children. */\n @ContentChildren(CdkHeaderRowDef) _contentHeaderRowDefs: QueryList<CdkHeaderRowDef>;\n\n /** Set of footer row definitions that were provided to the table as content children. */\n @ContentChildren(CdkFooterRowDef) _contentFooterRowDefs: QueryList<CdkFooterRowDef>;\n\n constructor(\n protected readonly _differs: IterableDiffers,\n protected readonly _changeDetectorRef: ChangeDetectorRef,\n protected readonly _elementRef: ElementRef, @Attribute('role') role: string,\n @Optional() protected readonly _dir: Directionality, @Inject(DOCUMENT) _document: any,\n private _platform: Platform) {\n if (!role) {\n this._elementRef.nativeElement.setAttribute('role', 'grid');\n }\n\n this._document = _document;\n this._isNativeHtmlTable = this._elementRef.nativeElement.nodeName === 'TABLE';\n }\n\n ngOnInit() {\n this._setupStickyStyler();\n\n if (this._isNativeHtmlTable) {\n this._applyNativeTableSections();\n }\n\n // Set up the trackBy function so that it uses the `RenderRow` as its identity by default. If\n // the user has provided a custom trackBy, return the result of that function as evaluated\n // with the values of the `RenderRow`'s data and index.\n this._dataDiffer = this._differs.find([]).create((_i: number, dataRow: RenderRow<T>) => {\n return this.trackBy ? this.trackBy(dataRow.dataIndex, dataRow.data) : dataRow;\n });\n }\n\n ngAfterContentChecked() {\n // Cache the row and column definitions gathered by ContentChildren and programmatic injection.\n this._cacheRowDefs();\n this._cacheColumnDefs();\n\n // Make sure that the user has at least added header, footer, or data row def.\n if (!this._headerRowDefs.length && !this._footerRowDefs.length && !this._rowDefs.length) {\n throw getTableMissingRowDefsError();\n }\n\n // Render updates if the list of columns have been changed for the header, row, or footer defs.\n this._renderUpdatedColumns();\n\n // If the header row definition has been changed, trigger a render to the header row.\n if (this._headerRowDefChanged) {\n this._forceRenderHeaderRows();\n this._headerRowDefChanged = false;\n }\n\n // If the footer row definition has been changed, trigger a render to the footer row.\n if (this._footerRowDefChanged) {\n this._forceRenderFooterRows();\n this._footerRowDefChanged = false;\n }\n\n // If there is a data source and row definitions, connect to the data source unless a\n // connection has already been made.\n if (this.dataSource && this._rowDefs.length > 0 && !this._renderChangeSubscription) {\n this._observeRenderChanges();\n }\n\n this._checkStickyStates();\n }\n\n ngOnDestroy() {\n this._rowOutlet.viewContainer.clear();\n this._headerRowOutlet.viewContainer.clear();\n this._footerRowOutlet.viewContainer.clear();\n\n this._cachedRenderRowsMap.clear();\n\n this._onDestroy.next();\n this._onDestroy.complete();\n\n if (isDataSource(this.dataSource)) {\n this.dataSource.disconnect(this);\n }\n }\n\n /**\n * Renders rows based on the table's latest set of data, which was either provided directly as an\n * input or retrieved through an Observable stream (directly or from a DataSource).\n * Checks for differences in the data since the last diff to perform only the necessary\n * changes (add/remove/move rows).\n *\n * If the table's data source is a DataSource or Observable, this will be invoked automatically\n * each time the provided Observable stream emits a new data array. Otherwise if your data is\n * an array, this function will need to be called to render any changes.\n */\n renderRows() {\n this._renderRows = this._getAllRenderRows();\n const changes = this._dataDiffer.diff(this._renderRows);\n if (!changes) {\n return;\n }\n\n const viewContainer = this._rowOutlet.viewContainer;\n\n changes.forEachOperation(\n (record: IterableChangeRecord<RenderRow<T>>, prevIndex: number|null,\n currentIndex: number|null) => {\n if (record.previousIndex == null) {\n this._insertRow(record.item, currentIndex!);\n } else if (currentIndex == null) {\n viewContainer.remove(prevIndex!);\n } else {\n const view = <RowViewRef<T>>viewContainer.get(prevIndex!);\n viewContainer.move(view!, currentIndex);\n }\n });\n\n // Update the meta context of a row's context data (index, count, first, last, ...)\n this._updateRowIndexContext();\n\n // Update rows that did not get added/removed/moved but may have had their identity changed,\n // e.g. if trackBy matched data on some property but the actual data reference changed.\n changes.forEachIdentityChange((record: IterableChangeRecord<RenderRow<T>>) => {\n const rowView = <RowViewRef<T>>viewContainer.get(record.currentIndex!);\n rowView.context.$implicit = record.item.data;\n });\n\n this.updateStickyColumnStyles();\n }\n\n /**\n * Sets the header row definition to be used. Overrides the header row definition gathered by\n * using `ContentChild`, if one exists. Sets a flag that will re-render the header row after the\n * table's content is checked.\n * @docs-private\n * @deprecated Use `addHeaderRowDef` and `removeHeaderRowDef` instead\n * @breaking-change 8.0.0\n */\n setHeaderRowDef(headerRowDef: CdkHeaderRowDef) {\n this._customHeaderRowDefs = new Set([headerRowDef]);\n this._headerRowDefChanged = true;\n }\n\n /**\n * Sets the footer row definition to be used. Overrides the footer row definition gathered by\n * using `ContentChild`, if one exists. Sets a flag that will re-render the footer row after the\n * table's content is checked.\n * @docs-private\n * @deprecated Use `addFooterRowDef` and `removeFooterRowDef` instead\n * @breaking-change 8.0.0\n */\n setFooterRowDef(footerRowDef: CdkFooterRowDef) {\n this._customFooterRowDefs = new Set([footerRowDef]);\n this._footerRowDefChanged = true;\n }\n\n /** Adds a column definition that was not included as part of the content children. */\n addColumnDef(columnDef: CdkColumnDef) {\n this._customColumnDefs.add(columnDef);\n }\n\n /** Removes a column definition that was not included as part of the content children. */\n removeColumnDef(columnDef: CdkColumnDef) {\n this._customColumnDefs.delete(columnDef);\n }\n\n /** Adds a row definition that was not included as part of the content children. */\n addRowDef(rowDef: CdkRowDef<T>) {\n this._customRowDefs.add(rowDef);\n }\n\n /** Removes a row definition that was not included as part of the content children. */\n removeRowDef(rowDef: CdkRowDef<T>) {\n this._customRowDefs.delete(rowDef);\n }\n\n /** Adds a header row definition that was not included as part of the content children. */\n addHeaderRowDef(headerRowDef: CdkHeaderRowDef) {\n this._customHeaderRowDefs.add(headerRowDef);\n this._headerRowDefChanged = true;\n }\n\n /** Removes a header row definition that was not included as part of the content children. */\n removeHeaderRowDef(headerRowDef: CdkHeaderRowDef) {\n this._customHeaderRowDefs.delete(headerRowDef);\n this._headerRowDefChanged = true;\n }\n\n /** Adds a footer row definition that was not included as part of the content children. */\n addFooterRowDef(footerRowDef: CdkFooterRowDef) {\n this._customFooterRowDefs.add(footerRowDef);\n this._footerRowDefChanged = true;\n }\n\n /** Removes a footer row definition that was not included as part of the content children. */\n removeFooterRowDef(footerRowDef: CdkFooterRowDef) {\n this._customFooterRowDefs.delete(footerRowDef);\n this._footerRowDefChanged = true;\n }\n\n /**\n * Updates the header sticky styles. First resets all applied styles with respect to the cells\n * sticking to the top. Then, evaluating which cells need to be stuck to the top. This is\n * automatically called when the header row changes its displayed set of columns, or if its\n * sticky input changes. May be called manually for cases where the cell content changes outside\n * of these events.\n */\n updateStickyHeaderRowStyles(): void {\n const headerRows = this._getRenderedRows(this._headerRowOutlet);\n const tableElement = this._elementRef.nativeElement as HTMLElement;\n\n // Hide the thead element if there are no header rows. This is necessary to satisfy\n // overzealous a11y checkers that fail because the `rowgroup` element does not contain\n // required child `row`.\n const thead = tableElement.querySelector('thead');\n if (thead) {\n thead.style.display = headerRows.length ? '' : 'none';\n }\n\n const stickyStates = this._headerRowDefs.map(def => def.sticky);\n this._stickyStyler.clearStickyPositioning(headerRows, ['top']);\n this._stickyStyler.stickRows(headerRows, stickyStates, 'top');\n\n // Reset the dirty state of the sticky input change since it has been used.\n this._headerRowDefs.forEach(def => def.resetStickyChanged());\n }\n\n /**\n * Updates the footer sticky styles. First resets all applied styles with respect to the cells\n * sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is\n * automatically called when the footer row changes its displayed set of columns, or if its\n * sticky input changes. May be called manually for cases where the cell content changes outside\n * of these events.\n */\n updateStickyFooterRowStyles(): void {\n const footerRows = this._getRenderedRows(this._footerRowOutlet);\n const tableElement = this._elementRef.nativeElement as HTMLElement;\n\n // Hide the tfoot element if there are no footer rows. This is necessary to satisfy\n // overzealous a11y checkers that fail because the `rowgroup` element does not contain\n // required child `row`.\n const tfoot = tableElement.querySelector('tfoot');\n if (tfoot) {\n tfoot.style.display = footerRows.length ? '' : 'none';\n }\n\n const stickyStates = this._footerRowDefs.map(def => def.sticky);\n this._stickyStyler.clearStickyPositioning(footerRows, ['bottom']);\n this._stickyStyler.stickRows(footerRows, stickyStates, 'bottom');\n this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement, stickyStates);\n\n // Reset the dirty state of the sticky input change since it has been used.\n this._footerRowDefs.forEach(def => def.resetStickyChanged());\n }\n\n /**\n * Updates the column sticky styles. First resets all applied styles with respect to the cells\n * sticking to the left and right. Then sticky styles are added for the left and right according\n * to the column definitions for each cell in each row. This is automatically called when\n * the data source provides a new set of data or when a column definition changes its sticky\n * input. May be called manually for cases where the cell content changes outside of these events.\n */\n updateStickyColumnStyles() {\n const headerRows = this._getRenderedRows(this._headerRowOutlet);\n const dataRows = this._getRenderedRows(this._rowOutlet);\n const footerRows = this._getRenderedRows(this._footerRowOutlet);\n\n // Clear the left and right positioning from all columns in the table across all rows since\n // sticky columns span across all table sections (header, data, footer)\n this._stickyStyler.clearStickyPositioning(\n [...headerRows, ...dataRows, ...footerRows], ['left', 'right']);\n\n // Update the sticky styles for each header row depending on the def's sticky state\n headerRows.forEach((headerRow, i) => {\n this._addStickyColumnStyles([headerRow], this._headerRowDefs[i]);\n });\n\n // Update the sticky styles for each data row depending on its def's sticky state\n this._rowDefs.forEach(rowDef => {\n // Collect all the rows rendered with this row definition.\n const rows: HTMLElement[] = [];\n for (let i = 0; i < dataRows.length; i++) {\n if (this._renderRows[i].rowDef === rowDef) {\n rows.push(dataRows[i]);\n }\n }\n\n this._addStickyColumnStyles(rows, rowDef);\n });\n\n // Update the sticky styles for each footer row depending on the def's sticky state\n footerRows.forEach((footerRow, i) => {\n this._addStickyColumnStyles([footerRow], this._footerRowDefs[i]);\n });\n\n // Reset the dirty state of the sticky input change since it has been used.\n Array.from(this._columnDefsByName.values()).forEach(def => def.resetStickyChanged());\n }\n\n /**\n * Get the list of RenderRow objects to render according to the current list of data and defined\n * row definitions. If the previous list already contained a particular pair, it should be reused\n * so that the differ equates their references.\n */\n private _getAllRenderRows(): RenderRow<T>[] {\n const renderRows: RenderRow<T>[] = [];\n\n // Store the cache and create a new one. Any re-used RenderRow objects will be moved into the\n // new cache while unused ones can be picked up by garbage collection.\n const prevCachedRenderRows = this._cachedRenderRowsMap;\n this._cachedRenderRowsMap = new Map();\n\n // For each data object, get the list of rows that should be rendered, represented by the\n // respective `RenderRow` object which is the pair of `data` and `CdkRowDef`.\n for (let i = 0; i < this._data.length; i++) {\n let data = this._data[i];\n const renderRowsForData = this._getRenderRowsForData(data, i, prevCachedRenderRows.get(data));\n\n if (!this._cachedRenderRowsMap.has(data)) {\n this._cachedRenderRowsMap.set(data, new WeakMap());\n }\n\n for (let j = 0; j < renderRowsForData.length; j++) {\n let renderRow = renderRowsForData[j];\n\n const cache = this._cachedRenderRowsMap.get(renderRow.data)!;\n if (cache.has(renderRow.rowDef)) {\n cache.get(renderRow.rowDef)!.push(renderRow);\n } else {\n cache.set(renderRow.rowDef, [renderRow]);\n }\n renderRows.push(renderRow);\n }\n }\n\n return renderRows;\n }\n\n /**\n * Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that\n * should be rendered for this data. Reuses the cached RenderRow objects if they match the same\n * `(T, CdkRowDef)` pair.\n */\n private _getRenderRowsForData(\n data: T, dataIndex: number, cache?: WeakMap<CdkRowDef<T>, RenderRow<T>[]>): RenderRow<T>[] {\n const rowDefs = this._getRowDefs(data, dataIndex);\n\n return rowDefs.map(rowDef => {\n const cachedRenderRows = (cache && cache.has(rowDef)) ? cache.get(rowDef)! : [];\n if (cachedRenderRows.length) {\n const dataRow = cachedRenderRows.shift()!;\n dataRow.dataIndex = dataIndex;\n return dataRow;\n } else {\n return {data, rowDef, dataIndex};\n }\n });\n }\n\n /** Update the map containing the content's column definitions. */\n private _cacheColumnDefs() {\n this._columnDefsByName.clear();\n\n const columnDefs = mergeQueryListAndSet(this._contentColumnDefs, this._customColumnDefs);\n columnDefs.forEach(columnDef => {\n if (this._columnDefsByName.has(columnDef.name)) {\n throw getTableDuplicateColumnNameError(columnDef.name);\n }\n this._columnDefsByName.set(columnDef.name, columnDef);\n });\n }\n\n /** Update the list of all available row definitions that can be used. */\n private _cacheRowDefs() {\n this._headerRowDefs =\n mergeQueryListAndSet(this._contentHeaderRowDefs, this._customHeaderRowDefs);\n this._footerRowDefs =\n mergeQueryListAndSet(this._contentFooterRowDefs, this._customFooterRowDefs);\n this._rowDefs = mergeQueryListAndSet(this._contentRowDefs, this._customRowDefs);\n\n // After all row definitions are determined, find the row definition to be considered default.\n const defaultRowDefs = this._rowDefs.filter(def => !def.when);\n if (!this.multiTemplateDataRows && defaultRowDefs.length > 1) {\n throw getTableMultipleDefaultRowDefsError();\n }\n this._defaultRowDef = defaultRowDefs[0];\n }\n\n /**\n * Check if the header, data, or footer rows have changed what columns they want to display or\n * whether the sticky states have changed for the header or footer. If there is a diff, then\n * re-render that section.\n */\n private _renderUpdatedColumns() {\n const columnsDiffReducer = (acc: boolean, def: BaseRowDef) => acc || !!def.getColumnsDiff();\n\n // Force re-render data rows if the list of column definitions have changed.\n if (this._rowDefs.reduce(columnsDiffReducer, false)) {\n this._forceRenderDataRows();\n }\n\n // Force re-render header/footer rows if the list of column definitions have changed..\n if (this._headerRowDefs.reduce(columnsDiffReducer, false)) {\n this._forceRenderHeaderRows();\n }\n\n if (this._footerRowDefs.reduce(columnsDiffReducer, false)) {\n this._forceRenderFooterRows();\n }\n }\n\n /**\n * Switch to the provided data source by resetting the data and unsubscribing from the current\n * render change subscription if one exists. If the data source is null, interpret this by\n * clearing the row outlet. Otherwise start listening for new data.\n */\n private _switchDataSource(dataSource: CdkTableDataSourceInput<T>) {\n this._data = [];\n\n if (isDataSource(this.dataSource)) {\n this.dataSource.disconnect(this);\n }\n\n // Stop listening for data from the previous data source.\n if (this._renderChangeSubscription) {\n this._renderChangeSubscription.unsubscribe();\n this._renderChangeSubscription = null;\n }\n\n if (!dataSource) {\n if (this._dataDiffer) {\n this._dataDiffer.diff([]);\n }\n this._rowOutlet.viewContainer.clear();\n }\n\n this._dataSource = dataSource;\n }\n\n /** Set up a subscription for the data provided by the data source. */\n private _observeRenderChanges() {\n // If no data source has been set, there is nothing to observe for changes.\n if (!this.dataSource) {\n return;\n }\n\n let dataStream: Observable<T[]|ReadonlyArray<T>>|undefined;\n\n if (isDataSource(this.dataSource)) {\n dataStream = this.dataSource.connect(this);\n } else if (this.dataSource instanceof Observable) {\n dataStream = this.dataSource;\n } else if (Array.isArray(this.dataSource)) {\n dataStream = observableOf(this.dataSource);\n }\n\n if (dataStream === undefined) {\n throw getTableUnknownDataSourceError();\n }\n\n this._renderChangeSubscription = dataStream.pipe(takeUntil(this._onDestroy)).subscribe(data => {\n this._data = data || [];\n this.renderRows();\n });\n }\n\n /**\n * Clears any existing content in the header row outlet and creates a new embedded view\n * in the outlet using the header row definition.\n */\n private _forceRenderHeaderRows() {\n // Clear the header row outlet if any content exists.\n if (this._headerRowOutlet.viewContainer.length > 0) {\n this._headerRowOutlet.viewContainer.clear();\n }\n\n this._headerRowDefs.forEach((def, i) => this._renderRow(this._headerRowOutlet, def, i));\n this.updateStickyHeaderRowStyles();\n this.updateStickyColumnStyles();\n }\n /**\n * Clears any existing content in the footer row outlet and creates a new embedded view\n * in the outlet using the footer row definition.\n */\n private _forceRenderFooterRows() {\n // Clear the footer row outlet if any content exists.\n if (this._footerRowOutlet.viewContainer.length > 0) {\n this._footerRowOutlet.viewContainer.clear();\n }\n\n this._footerRowDefs.forEach((def, i) => this._renderRow(this._footerRowOutlet, def, i));\n this.updateStickyFooterRowStyles();\n this.updateStickyColumnStyles();\n }\n\n /** Adds the sticky column styles for the rows according to the columns' stick states. */\n private _addStickyColumnStyles(rows: HTMLElement[], rowDef: BaseRowDef) {\n const columnDefs = Array.from(rowDef.columns || []).map(columnName => {\n const columnDef = this._columnDefsByName.get(columnName);\n if (!columnDef) {\n throw getTableUnknownColumnError(columnName);\n }\n return columnDef!;\n });\n const stickyStartStates = columnDefs.map(columnDef => columnDef.sticky);\n const stickyEndStates = columnDefs.map(columnDef => columnDef.stickyEnd);\n this._stickyStyler.updateStickyColumns(rows, stickyStartStates, stickyEndStates);\n }\n\n /** Gets the list of rows that have been rendered in the row outlet. */\n _getRenderedRows(rowOutlet: RowOutlet): HTMLElement[] {\n const renderedRows: HTMLElement[] = [];\n\n for (let i = 0; i < rowOutlet.viewContainer.length; i++) {\n const viewRef = (rowOutlet.viewContainer.get(i)! as EmbeddedViewRef<any>);\n renderedRows.push(viewRef.rootNodes[0]);\n }\n\n return renderedRows;\n }\n\n /**\n * Get the matching row definitions that should be used for this row data. If there is only\n * one row definition, it is returned. Otherwise, find the row definitions that has a when\n * predicate that returns true with the data. If none return true, return the default row\n * definition.\n */\n _getRowDefs(data: T, dataIndex: number): CdkRowDef<T>[] {\n if (this._rowDefs.length == 1) {\n return [this._rowDefs[0]];\n }\n\n let rowDefs: CdkRowDef<T>[] = [];\n if (this.multiTemplateDataRows) {\n rowDefs = this._rowDefs.filter(def => !def.when || def.when(dataIndex, data));\n } else {\n let rowDef =\n this._rowDefs.find(def => def.when && def.when(dataIndex, data)) || this._defaultRowDef;\n if (rowDef) {\n rowDefs.push(rowDef);\n }\n }\n\n if (!rowDefs.length) {\n throw getTableMissingMatchingRowDefError(data);\n }\n\n return rowDefs;\n }\n\n /**\n * Create the embedded view for the data row template and place it in the correct index location\n * within the data row view container.\n */\n private _insertRow(renderRow: RenderRow<T>, renderIndex: number) {\n const rowDef = renderRow.rowDef;\n const context: RowContext<T> = {$implicit: renderRow.data};\n this._renderRow(this._rowOutlet, rowDef, renderIndex, context);\n }\n\n /**\n * Creates a new row template in the outlet and fills it with the set of cell templates.\n * Optionally takes a context to provide to the row and cells, as well as an optional index\n * of where to place the new row template in the outlet.\n */\n private _renderRow(\n outlet: RowOutlet, rowDef: BaseRowDef, index: number, context: RowContext<T> = {}) {\n // TODO(andrewseguin): enforce that one outlet was instantiated from createEmbeddedView\n outlet.viewContainer.createEmbeddedView(rowDef.template, context, index);\n\n for (let cellTemplate of this._getCellTemplates(rowDef)) {\n if (CdkCellOutlet.mostRecentCellOutlet) {\n CdkCellOutlet.mostRecentCellOutlet._viewContainer.createEmbeddedView(cellTemplate, context);\n }\n }\n\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Updates the index-related context for each row to reflect any changes in the index of the rows,\n * e.g. first/last/even/odd.\n */\n private _updateRowIndexContext() {\n const viewContainer = this._rowOutlet.viewContainer;\n for (let renderIndex = 0, count = viewContainer.length; renderIndex < count; renderIndex++) {\n const viewRef = viewContainer.get(renderIndex) as RowViewRef<T>;\n const context = viewRef.context as RowContext<T>;\n context.count = count;\n context.first = renderIndex === 0;\n context.last = renderIndex === count - 1;\n context.even = renderIndex % 2 === 0;\n context.odd = !context.even;\n\n if (this.multiTemplateDataRows) {\n context.dataIndex = this._renderRows[renderIndex].dataIndex;\n context.renderIndex = renderIndex;\n } else {\n context.index = this._renderRows[renderIndex].dataIndex;\n }\n }\n }\n\n /** Gets the column definitions for the provided row def. */\n private _getCellTemplates(rowDef: BaseRowDef): TemplateRef<any>[] {\n if (!rowDef || !rowDef.columns) {\n return [];\n }\n return Array.from(rowDef.columns, columnId => {\n const column = this._columnDefsByName.get(columnId);\n\n if (!column) {\n throw getTableUnknownColumnError(columnId);\n }\n\n return rowDef.extractCellTemplate(column);\n });\n }\n\n /** Adds native table sections (e.g. tbody) and moves the row outlets into them. */\n private _applyNativeTableSections() {\n const documentFragment = this._document.createDocumentFragment();\n const sections = [\n {tag: 'thead', outlet: this._headerRowOutlet},\n {tag: 'tbody', outlet: this._rowOutlet},\n {tag: 'tfoot', outlet: this._footerRowOutlet},\n ];\n\n for (const section of sections) {\n const element = this._document.createElement(section.tag);\n element.setAttribute('role', 'rowgroup');\n element.appendChild(section.outlet.elementRef.nativeElement);\n documentFragment.appendChild(element);\n }\n\n // Use a DocumentFragment so we don't hit the DOM on each iteration.\n this._elementRef.nativeElement.appendChild(documentFragment);\n }\n\n /**\n * Forces a re-render of the data rows. Should be called in cases where there has been an input\n * change that affects the evaluation of which rows should be rendered, e.g. toggling\n * `multiTemplateDataRows` or adding/removing row definitions.\n */\n private _forceRenderDataRows() {\n this._dataDiffer.diff([]);\n this._rowOutlet.viewContainer.clear();\n this.renderRows();\n this.updateStickyColumnStyles();\n }\n\n /**\n * Checks if there has been a change in sticky states since last check and applies the correct\n * sticky styles. Since checking resets the \"dirty\" state, this should only be performed once\n * during a change detection and after the inputs are settled (after content check).\n */\n private _checkStickyStates() {\n const stickyCheckReducer = (acc: boolean, d: CdkHeaderRowDef|CdkFooterRowDef|CdkColumnDef) => {\n return acc || d.hasStickyChanged();\n };\n\n // Note that the check needs to occur for every definition since it notifies the definition\n // that it can reset its dirty state. Using another operator like `some` may short-circuit\n // remaining definitions and leave them in an unchecked state.\n\n if (this._headerRowDefs.reduce(stickyCheckReducer, false)) {\n this.updateStickyHeaderRowStyles();\n }\n\n if (this._footerRowDefs.reduce(stickyCheckReducer, false)) {\n this.updateStickyFooterRowStyles();\n }\n\n if (Array.from(this._columnDefsByName.values()).reduce(stickyCheckReducer, false)) {\n this.updateStickyColumnStyles();\n }\n }\n\n /**\n * Creates the sticky styler that will be used for sticky rows and columns. Listens\n * for directionality changes and provides the latest direction to the styler. Re-applies column\n * stickiness when directionality changes.\n */\n private _setupStickyStyler() {\n const direction: Direction = this._dir ? this._dir.value : 'ltr';\n this._stickyStyler = new StickyStyler(\n this._isNativeHtmlTable, this.stickyCssClass, direction, this._platform.isBrowser);\n (this._dir ? this._dir.change : observableOf<Direction>())\n .pipe(takeUntil(this._onDestroy))\n .subscribe(value => {\n this._stickyStyler.direction = value;\n this.updateStickyColumnStyles();\n });\n }\n}\n\n/** Utility function that gets a merged list of the entries in a QueryList and values of a Set. */\nfunction mergeQueryListAndSet<T>(queryList: QueryList<T>, set: Set<T>): T[] {\n return queryList.toArray().concat(Array.from(set));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\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://angular.io/license\n */\n\n/**\n * Returns an error to be thrown when attempting to find an unexisting column.\n * @param id Id whose lookup failed.\n * @docs-private\n */\nexport function getTableUnknownColumnError(id: string) {\n return Error(`Could not find column with id \"${id}\".`);\n}\n\n/**\n * Returns an error to be thrown when two column definitions have the same name.\n * @docs-private\n */\nexport function getTableDuplicateColumnNameError(name: string) {\n return Error(`Duplicate column definition name provided: \"${name}\".`);\n}\n\n/**\n * Returns an error to be thrown when there are multiple rows that are missing a when function.\n * @docs-private\n */\nexport function getTableMultipleDefaultRowDefsError() {\n return Error(`There can only be one default row without a when predicate function.`);\n}\n\n/**\n * Returns an error to be thrown when there are no matching row defs for a particular set of data.\n * @docs-private\n */\nexport function getTableMissingMatchingRowDefError(data: any) {\n return Error(`Could not find a matching row definition for the` +\n `provided row data: ${JSON.stringify(data)}`);\n}\n\n/**\n * Returns an error to be thrown when there is no row definitions present in the content.\n * @docs-private\n */\nexport function getTableMissingRowDefsError() {\n return Error('Missing definitions for header, footer, and row; ' +\n 'cannot determine which columns should be rendered.');\n}\n\n/**\n * Returns an error to be thrown when the data source does not match the compatible types.\n * @docs-private\n */\nexport function getTableUnknownDataSourceError() {\n return Error(`Provided data source did not match an array, Observable, or DataSource`);\n}\n\n/**\n * Returns an error to be thrown when the text column cannot find a parent table to inject.\n * @docs-private\n */\nexport function getTableTextColumnMissingParentTableError() {\n return Error(`Text column could not find a parent table for registration.`);\n}\n\n/**\n * Returns an error to be thrown when a table text column doesn't have a name.\n * @docs-private\n */\nexport function getTableTextColumnMissingNameError() {\n return Error(`Table text column must have a name.`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\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://angular.io/license\n */\n\n/**\n * Directions that can be used when setting sticky positioning.\n * @docs-private\n */\nimport {Direction} from '@angular/cdk/bidi';\n\nexport type StickyDirection = 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * List of all possible directions that can be used for sticky positioning.\n * @docs-private\n */\nexport const STICKY_DIRECTIONS: StickyDirection[] = ['top', 'bottom', 'left', 'right'];\n\n/**\n * Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells.\n * @docs-private\n */\nexport class StickyStyler {\n /**\n * @param _isNativeHtmlTable Whether the sticky logic should be based on a table\n * that uses the native `<table>` element.\n * @param _stickCellCss The CSS class that will be applied to every row/cell that has\n * sticky positioning applied.\n * @param direction The directionality context of the table (ltr/rtl); affects column positioning\n * by reversing left/right positions.\n * @param _isBrowser Whether the table is currently being rendered on the server or the client.\n */\n constructor(private _isNativeHtmlTable: boolean,\n private _stickCellCss: string,\n public direction: Direction,\n private _isBrowser = true) { }\n\n /**\n * Clears the sticky positioning styles from the row and its cells by resetting the `position`\n * style, setting the zIndex to 0, and unsetting each provided sticky direction.\n * @param rows The list of rows that should be cleared from sticking in the provided directions\n * @param stickyDirections The directions that should no longer be set as sticky on the rows.\n */\n clearStickyPositioning(rows: HTMLElement[], stickyDirections: StickyDirection[]) {\n for (const row of rows) {\n // If the row isn't an element (e.g. if it's an `ng-container`),\n // it won't have inline styles or `children` so we skip it.\n if (row.nodeType !== row.ELEMENT_NODE) {\n continue;\n }\n\n this._removeStickyStyle(row, stickyDirections);\n\n for (let i = 0; i < row.children.length; i++) {\n const cell = row.children[i] as HTMLElement;\n this._removeStickyStyle(cell, stickyDirections);\n }\n }\n }\n\n /**\n * Applies sticky left and right positions to the cells of each row according to the sticky\n * states of the rendered column definitions.\n * @param rows The rows that should have its set of cells stuck according to the sticky states.\n * @param stickyStartStates A list of boolean states where each state represents whether the cell\n * in this index position should be stuck to the start of the row.\n * @param stickyEndStates A list of boolean states where each state represents whether the cell\n * in this index position should be stuck to the end of the row.\n */\n updateStickyColumns(\n rows: HTMLElement[], stickyStartStates: boolean[], stickyEndStates: boolean[]) {\n const hasStickyColumns =\n stickyStartStates.some(state => state) || stickyEndStates.some(state => state);\n if (!rows.length || !hasStickyColumns || !this._isBrowser) {\n return;\n }\n\n const firstRow = rows[0];\n const numCells = firstRow.children.length;\n const cellWidths: number[] = this._getCellWidths(firstRow);\n\n const startPositions = this._getStickyStartColumnPositions(cellWidths, stickyStartStates);\n const endPositions = this._getStickyEndColumnPositions(cellWidths, stickyEndStates);\n const isRtl = this.direction === 'rtl';\n\n for (const row of rows) {\n for (let i = 0; i < numCells; i++) {\n const cell = row.children[i] as HTMLElement;\n if (stickyStartStates[i]) {\n this._addStickyStyle(cell, isRtl ? 'right' : 'left', startPositions[i]);\n }\n\n if (stickyEndStates[i]) {\n this._addStickyStyle(cell, isRtl ? 'left' : 'right', endPositions[i]);\n }\n }\n }\n }\n\n /**\n * Applies sticky positioning to the row's cells if using the native table layout, and to the\n * row itself otherwise.\n * @param rowsToStick The list of rows that should be stuck according to their corresponding\n * sticky state and to the provided top or bottom position.\n * @param stickyStates A list of boolean states where each state represents whether the row\n * should be stuck in the particular top or bottom position.\n * @param position The position direction in which the row should be stuck if that row should be\n * sticky.\n *\n */\n stickRows(rowsToStick: HTMLElement[], stickyStates: boolean[], position: 'top' | 'bottom') {\n // Since we can't measure the rows on the server, we can't stick the rows properly.\n if (!this._isBrowser) {\n return;\n }\n\n // If positioning the rows to the bottom, reverse their order when evaluating the sticky\n // position such that the last row stuck will be \"bottom: 0px\" and so on.\n const rows = position === 'bottom' ? rowsToStick.reverse() : rowsToStick;\n\n let stickyHeight = 0;\n for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {\n if (!stickyStates[rowIndex]) {\n continue;\n }\n\n const row = rows[rowIndex];\n if (this._isNativeHtmlTable) {\n for (let j = 0; j < row.children.length; j++) {\n const cell = row.children[j] as HTMLElement;\n this._addStickyStyle(cell, position, stickyHeight);\n }\n } else {\n // Flex does not respect the stick positioning on the cells, needs to be applied to the row.\n // If this is applied on a native table, Safari causes the header to fly in wrong direction.\n this._addStickyStyle(row, position, stickyHeight);\n }\n\n if (rowIndex === rows.length - 1) {\n // prevent unnecessary reflow from getBoundingClientRect()\n return;\n }\n stickyHeight += row.getBoundingClientRect().height;\n }\n }\n\n /**\n * When using the native table in Safari, sticky footer cells do not stick. The only way to stick\n * footer rows is to apply sticky styling to the tfoot container. This should only be done if\n * all footer rows are sticky. If not all footer rows are sticky, remove sticky positioning from\n * the tfoot element.\n */\n updateStickyFooterContainer(tableElement: Element, stickyStates: boolean[]) {\n if (!this._isNativeHtmlTable) {\n return;\n }\n\n const tfoot = tableElement.querySelector('tfoot')!;\n if (stickyStates.some(state => !state)) {\n this._removeStickyStyle(tfoot, ['bottom']);\n } else {\n this._addStickyStyle(tfoot, 'bottom', 0);\n }\n }\n\n /**\n * Removes the sticky style on the element by removing the sticky cell CSS class, re-evaluating\n * the zIndex, removing each of the provided sticky directions, and removing the\n * sticky position if there are no more directions.\n */\n _removeStickyStyle(element: HTMLElement, stickyDirections: StickyDirection[]) {\n for (const dir of stickyDirections) {\n element.style[dir] = '';\n }\n element.style.zIndex = this._getCalculatedZIndex(element);\n\n // If the element no longer has any more sticky directions, remove sticky positioning and\n // the sticky CSS class.\n const hasDirection = STICKY_DIRECTIONS.some(dir => !!element.style[dir]);\n if (!hasDirection) {\n element.style.position = '';\n element.classList.remove(this._stickCellCss);\n }\n }\n\n /**\n * Adds the sticky styling to the element by adding the sticky style class, changing position\n * to be sticky (and -webkit-sticky), setting the appropriate zIndex, and adding a sticky\n * direction and value.\n */\n _addStickyStyle(element: HTMLElement, dir: StickyDirection, dirValue: number) {\n element.classList.add(this._stickCellCss);\n element.style[dir] = `${dirValue}px`;\n element.style.cssText += 'position: -webkit-sticky; position: sticky; ';\n element.style.zIndex = this._getCalculatedZIndex(element);\n }\n\n /**\n * Calculate what the z-index should be for the element, depending on what directions (top,\n * bottom, left, right) have been set. It should be true that elements with a top direction\n * should have the highest index since these are elements like a table header. If any of those\n * elements are also sticky in another direction, then they should appear above other elements\n * that are only sticky top (e.g. a sticky column on a sticky header). Bottom-sticky elements\n * (e.g. footer rows) should then be next in the ordering such that they are below the header\n * but above any non-sticky elements. Finally, left/right sticky elements (e.g. sticky columns)\n * should minimally increment so that they are above non-sticky elements but below top and bottom\n * elements.\n */\n _getCalculatedZIndex(element: HTMLElement): string {\n const zIndexIncrements = {\n top: 100,\n bottom: 10,\n left: 1,\n right: 1,\n };\n\n let zIndex = 0;\n for (const dir of STICKY_DIRECTIONS) {\n if (element.style[dir]) {\n zIndex += zIndexIncrements[dir];\n }\n }\n\n return zIndex ? `${zIndex}` : '';\n }\n\n /** Gets the widths for each cell in the provided row. */\n _getCellWidths(row: HTMLElement): number[] {\n const cellWidths: number[] = [];\n const firstRowCells = row.children;\n for (let i = 0; i < firstRowCells.length; i++) {\n let cell: HTMLElement = firstRowCells[i] as HTMLElement;\n cellWidths.push(cell.getBoundingClientRect().width);\n }\n\n return cellWidths;\n }\n\n /**\n * Determines the left and right positions of each sticky column cell, which will be the\n * accumulation of all sticky column cell widths to the left and right, respectively.\n * Non-sticky cells do not need to have a value set since their positions will not be applied.\n */\n _getStickyStartColumnPositions(widths: number[], stickyStates: boolean[]): number[] {\n const positions: number[] = [];\n let nextPosition = 0;\n\n for (let i = 0; i < widths.length; i++) {\n if (stickyStates[i]) {\n positions[i] = nextPosition;\n nextPosition += widths[i];\n }\n }\n\n return positions;\n }\n\n /**\n * Determines the left and right positions of each sticky column cell, which will be the\n * accumulation of all sticky column cell widths to the left and right, respectively.\n * Non-sticky cells do not need to have a value set since their positions will not be applied.\n */\n _getStickyEndColumnPositions(widths: number[], stickyStates: boolean[]): number[] {\n const positions: number[] = [];\n let nextPosition = 0;\n\n for (let i = widths.length; i > 0; i--) {\n if (stickyStates[i]) {\n positions[i] = nextPosition;\n nextPosition += widths[i];\n }\n }\n\n return positions;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\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://angular.io/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n Directive,\n IterableChanges,\n IterableDiffer,\n IterableDiffers,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation\n} from '@angular/core';\nimport {CanStick, CanStickCtor, mixinHasStickyInput} from './can-stick';\nimport {CdkCellDef, CdkColumnDef} from './cell';\n\n/**\n * The row template that can be used by the mat-table. Should not be used outside of the\n * material library.\n */\nexport const CDK_ROW_TEMPLATE = `<ng-container cdkCellOutlet></ng-container>`;\n\n/**\n * Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs\n * for changes and notifying the table.\n */\nexport abstract class BaseRowDef implements OnChanges {\n /** The columns to be displayed on this row. */\n columns: Iterable<string>;\n\n /** Differ used to check if any changes were made to the columns. */\n protected _columnsDiffer: IterableDiffer<any>;\n\n constructor(\n /** @docs-private */ public template: TemplateRef<any>, protected _differs: IterableDiffers) {\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n // Create a new columns differ if one does not yet exist. Initialize it based on initial value\n // of the columns property or an empty array if none is provided.\n if (!this._columnsDiffer) {\n const columns = (changes['columns'] && changes['columns'].currentValue) || [];\n this._columnsDiffer = this._differs.find(columns).create();\n this._columnsDiffer.diff(columns);\n }\n }\n\n /**\n * Returns the difference between the current columns and the columns from the last diff, or null\n * if there is no difference.\n */\n getColumnsDiff(): IterableChanges<any>|null {\n return this._columnsDiffer.diff(this.columns);\n }\n\n /** Gets this row def's relevant cell template from the provided column def. */\n extractCellTemplate(column: CdkColumnDef): TemplateRef<any> {\n if (this instanceof CdkHeaderRowDef) {\n return column.headerCell.template;\n }\n if (this instanceof CdkFooterRowDef) {\n return column.footerCell.template;\n } else {\n return column.cell.template;\n }\n }\n}\n\n// Boilerplate for applying mixins to CdkHeaderRowDef.\n/** @docs-private */\nclass CdkHeaderRowDefBase extends BaseRowDef {}\nconst _CdkHeaderRowDefBase: CanStickCtor&typeof CdkHeaderRowDefBase =\n mixinHasStickyInput(CdkHeaderRowDefBase);\n\n/**\n * Header row definition for the CDK table.\n * Captures the header row's template and other header properties such as the columns to display.\n */\n@Directive({\n selector: '[cdkHeaderRowDef]',\n inputs: ['columns: cdkHeaderRowDef', 'sticky: cdkHeaderRowDefSticky'],\n})\nexport class CdkHeaderRowDef extends _CdkHeaderRowDefBase implements CanStick, OnChanges {\n constructor(template: TemplateRef<any>, _differs: IterableDiffers) {\n super(template, _differs);\n }\n\n // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.\n // Explicitly define it so that the method is called as part of the Angular lifecycle.\n ngOnChanges(changes: SimpleChanges): void {\n super.ngOnChanges(changes);\n }\n}\n\n// Boilerplate for applying mixins to CdkFooterRowDef.\n/** @docs-private */\nclass CdkFooterRowDefBase extends BaseRowDef {}\nconst _CdkFooterRowDefBase: CanStickCtor&typeof CdkFooterRowDefBase =\n mixinHasStickyInput(CdkFooterRowDefBase);\n\n/**\n * Footer row definition for the CDK table.\n * Captures the footer row's template and other footer properties such as the columns to display.\n */\n@Directive({\n selector: '[cdkFooterRowDef]',\n inputs: ['columns: cdkFooterRowDef', 'sticky: cdkFooterRowDefSticky'],\n})\nexport class CdkFooterRowDef extends _CdkFooterRowDefBase implements CanStick, OnChanges {\n constructor(template: TemplateRef<any>, _differs: IterableDiffers) {\n super(template, _differs);\n }\n\n // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.\n // Explicitly define it so that the method is called as part of the Angular lifecycle.\n ngOnChanges(changes: SimpleChanges): void {\n super.ngOnChanges(changes);\n }\n}\n\n/**\n * Data row definition for the CDK table.\n * Captures the header row's template and other row properties such as the columns to display and\n * a when predicate that describes when this row should be used.\n */\n@Directive({\n selector: '[cdkRowDef]',\n inputs: ['columns: cdkRowDefColumns', 'when: cdkRowDefWhen'],\n})\nexport class CdkRowDef<T> extends BaseRowDef {\n /**\n * Function that should return true if this row template should be used for the provided index\n * and row data. If left undefined, this row will be considered the default row template to use\n * when no other when functions return true for the data.\n * For every row, there must be at least one when function that passes or an undefined to default.\n */\n when: (index: number, rowData: T) => boolean;\n\n // TODO(andrewseguin): Add an input for providing a switch function to determine\n // if this template should be used.\n constructor(template: TemplateRef<any>, _differs: IterableDiffers) {\n super(template, _differs);\n }\n}\n\n/** Context provided to the row cells when `multiTemplateDataRows` is false */\nexport interface CdkCellOutletRowContext<T> {\n /** Data for the row that this cell is located within. */\n $implicit?: T;\n\n /** Index of the data object in the provided data array. */\n index?: number;\n\n /** Length of the number of total rows. */\n count?: number;\n\n /** True if this cell is contained in the first row. */\n first?: boolean;\n\n /** True if this cell is contained in the last row. */\n last?: boolean;\n\n /** True if this cell is contained in a row with an even-numbered index. */\n even?: boolean;\n\n /** True if this cell is contained in a row with an odd-numbered index. */\n odd?: boolean;\n}\n\n/**\n * Context provided to the row cells when `multiTemplateDataRows` is true. This context is the same\n * as CdkCellOutletRowContext except that the single `index` value is replaced by `dataIndex` and\n * `renderIndex`.\n */\nexport interface CdkCellOutletMultiRowContext<T> {\n /** Data for the row that this cell is located within. */\n $implicit?: T;\n\n /** Index of the data object in the provided data array. */\n dataIndex?: number;\n\n /** Index location of the rendered row that this cell is located within. */\n renderIndex?: number;\n\n /** Length of the number of total rows. */\n count?: number;\n\n /** True if this cell is contained in the first row. */\n first?: boolean;\n\n /** True if this cell is contained in the last row. */\n last?: boolean;\n\n /** True if this cell is contained in a row with an even-numbered index. */\n even?: boolean;\n\n /** True if this cell is contained in a row with an odd-numbered index. */\n odd?: boolean;\n}\n\n/**\n * Outlet for rendering cells inside of a row or header row.\n * @docs-private\n */\n@Directive({selector: '[cdkCellOutlet]'})\nexport class CdkCellOutlet implements OnDestroy {\n /** The ordered list of cells to render within this outlet's view container */\n cells: CdkCellDef[];\n\n /** The data context to be provided to each cell */\n context: any;\n\n /**\n * Static property containing the latest constructed instance of this class.\n * Used by the CDK table when each CdkHeaderRow and CdkRow component is created using\n * createEmbeddedView. After one of these components are created, this property will provide\n * a handle to provide that component's cells and context. After init, the CdkCellOutlet will\n * construct the cells with the provided context.\n */\n static mostRecentCellOutlet: CdkCellOutlet|null = null;\n\n constructor(public _viewContainer: ViewContainerRef) {\n CdkCellOutlet.mostRecentCellOutlet = this;\n }\n\n ngOnDestroy() {\n // If this was the last outlet being rendered in the view, remove the reference\n // from the static property after it has been destroyed to avoid leaking memory.\n if (CdkCellOutlet.mostRecentCellOutlet === this) {\n CdkCellOutlet.mostRecentCellOutlet = null;\n }\n }\n}\n\n/** Header template container that contains the cell outlet. Adds the right class and role. */\n@Component({\n moduleId: module.id,\n selector: 'cdk-header-row, tr[cdk-header-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'cdk-header-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n})\nexport class CdkHeaderRow {\n}\n\n\n/** Footer template container that contains the cell outlet. Adds the right class and role. */\n@Component({\n moduleId: module.id,\n selector: 'cdk-footer-row, tr[cdk-footer-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'cdk-footer-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n})\nexport class CdkFooterRow {\n}\n\n/** Data row template container that contains the cell outlet. Adds the right class and role. */\n@Component({\n moduleId: module.id,\n selector: 'cdk-row, tr[cdk-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'cdk-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n})\nexport class CdkRow {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\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://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {ContentChild, Directive, ElementRef, Input, TemplateRef} from '@angular/core';\nimport {CanStick, CanStickCtor, mixinHasStickyInput} from './can-stick';\n\n\n/** Base interface for a cell definition. Captures a column's cell template definition. */\nexport interface CellDef {\n template: TemplateRef<any>;\n}\n\n/**\n * Cell definition for a CDK table.\n * Captures the template of a column's data row cell as well as cell-specific properties.\n */\n@Directive({selector: '[cdkCellDef]'})\nexport class CdkCellDef implements CellDef {\n constructor(/** @docs-private */ public template: TemplateRef<any>) {}\n}\n\n/**\n * Header cell definition for a CDK table.\n * Captures the template of a column's header cell and as well as cell-specific properties.\n */\n@Directive({selector: '[cdkHeaderCellDef]'})\nexport class CdkHeaderCellDef implements CellDef {\n constructor(/** @docs-private */ public template: TemplateRef<any>) {}\n}\n\n/**\n * Footer cell definition for a CDK table.\n * Captures the template of a column's footer cell and as well as cell-specific properties.\n */\n@Directive({selector: '[cdkFooterCellDef]'})\nexport class CdkFooterCellDef implements CellDef {\n constructor(/** @docs-private */ public template: TemplateRef<any>) {}\n}\n\n// Boilerplate for applying mixins to CdkColumnDef.\n/** @docs-private */\nclass CdkColumnDefBase {}\nconst _CdkColumnDefBase: CanStickCtor&typeof CdkColumnDefBase =\n mixinHasStickyInput(CdkColumnDefBase);\n\n/**\n * Column definition for the CDK table.\n * Defines a set of cells available for a table column.\n */\n@Directive({\n selector: '[cdkColumnDef]',\n inputs: ['sticky'],\n providers: [{provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef}],\n})\nexport class CdkColumnDef extends _CdkColumnDefBase implements CanStick {\n /** Unique name for this column. */\n @Input('cdkColumnDef')\n get name(): string {\n return this._name;\n }\n set name(name: string) {\n // If the directive is set without a name (updated programatically), then this setter will\n // trigger with an empty string and should not overwrite the programatically set value.\n if (!name) {\n return;\n }\n\n this._name = name;\n this.cssClassFriendlyName = name.replace(/[^a-z0-9_-]/ig, '-');\n }\n _name: string;\n\n /**\n * Whether this column should be sticky positioned on the end of the row. Should make sure\n * that it mimics the `CanStick` mixin such that `_hasStickyChanged` is set to true if the value\n * has been changed.\n */\n @Input('stickyEnd')\n get stickyEnd(): boolean {\n return this._stickyEnd;\n }\n set stickyEnd(v: boolean) {\n const prevValue = this._stickyEnd;\n this._stickyEnd = coerceBooleanProperty(v);\n this._hasStickyChanged = prevValue !== this._stickyEnd;\n }\n _stickyEnd: boolean = false;\n\n /** @docs-private */\n @ContentChild(CdkCellDef, {static: false}) cell: CdkCellDef;\n\n /** @docs-private */\n @ContentChild(CdkHeaderCellDef, {static: false}) headerCell: CdkHeaderCellDef;\n\n /** @docs-private */\n @ContentChild(CdkFooterCellDef, {static: false}) footerCell: CdkFooterCellDef;\n\n /**\n * Transformed version of the column name that can be used as part of a CSS classname. Excludes\n * all non-alphanumeric characters and the special characters '-' and '_'. Any characters that\n * do not match are replaced by the '-' character.\n */\n cssClassFriendlyName: string;\n}\n\n/** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */\nexport class BaseCdkCell {\n constructor(columnDef: CdkColumnDef, elementRef: ElementRef) {\n const columnClassName = `cdk-column-${columnDef.cssClassFriendlyName}`;\n elementRef.nativeElement.classList.add(columnClassName);\n }\n}\n\n/** Header cell template container that adds the right classes and role. */\n@Directive({\n selector: 'cdk-header-cell, th[cdk-header-cell]',\n host: {\n 'class': 'cdk-header-cell',\n 'role': 'columnheader',\n },\n})\nexport class CdkHeaderCell extends BaseCdkCell {\n constructor(columnDef: CdkColumnDef, elementRef: ElementRef) {\n super(columnDef, elementRef);\n }\n}\n\n/** Footer cell template container that adds the right classes and role. */\n@Directive({\n selector: 'cdk-footer-cell, td[cdk-footer-cell]',\n host: {\n 'class': 'cdk-footer-cell',\n 'role': 'gridcell',\n },\n})\nexport class CdkFooterCell extends BaseCdkCell {\n constructor(columnDef: CdkColumnDef, elementRef: ElementRef) {\n super(columnDef, elementRef);\n }\n}\n\n/** Cell template container that adds the right classes and role. */\n@Directive({\n selector: 'cdk-cell, td[cdk-cell]',\n host: {\n 'class': 'cdk-cell',\n 'role': 'gridcell',\n },\n})\nexport class CdkCell extends BaseCdkCell {\n constructor(columnDef: CdkColumnDef, elementRef: ElementRef) {\n super(columnDef, elementRef);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\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://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\n\n/** @docs-private */\nexport type Constructor<T> = new(...args: any[]) => T;\n\n/**\n * Interface for a mixin to provide a directive with a function that checks if the sticky input has\n * been changed since the last time the function was called. Essentially adds a dirty-check to the\n * sticky value.\n * @docs-private\n */\nexport interface CanStick {\n /** Whether sticky positioning should be applied. */\n sticky: boolean;\n\n /** Whether the sticky input has changed since it was last checked. */\n _hasStickyChanged: boolean;\n\n /** Whether the sticky value has changed since this was last called. */\n hasStickyChanged(): boolean;\n\n /** Resets the dirty check for cases where the sticky state has been used without checking. */\n resetStickyChanged(): void;\n}\n\n/** @docs-private */\nexport type CanStickCtor = Constructor<CanStick>;\n\n/**\n * Mixin to provide a directive with a function that checks if the sticky input has been\n * changed since the last time the function was called. Essentially adds a dirty-check to the\n * sticky value.\n * @docs-private\n */\nexport function mixinHasStickyInput<T extends Constructor<{}>>(base: T): CanStickCtor & T {\n return class extends base {\n /** Whether sticky positioning should be applied. */\n get sticky(): boolean { return this._sticky; }\n set sticky(v: boolean) {\n const prevValue = this._sticky;\n this._sticky = coerceBooleanProperty(v);\n this._hasStickyChanged = prevValue !== this._sticky;\n }\n _sticky: boolean = false;\n\n /** Whether the sticky input has changed since it was last checked. */\n _hasStickyChanged: boolean = false;\n\n /** Whether the sticky value has changed since this was last called. */\n hasStickyChanged(): boolean {\n const hasStickyChanged = this._hasStickyChanged;\n this._hasStickyChanged = false;\n return hasStickyChanged;\n }\n\n /** Resets the dirty check for cases where the sticky state has been used without checking. */\n resetStickyChanged() {\n this._hasStickyChanged = false;\n }\n\n constructor(...args: any[]) { super(...args); }\n };\n}\n"],"names":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AO0CA,AAAA,SAAgB,mBAAmB,CAA4B,IAAO,EAAt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