blob: 50bd3fd5f7d8d2d8a745171d86b0c318dd5563ee [file] [log] [blame]
{"version":3,"file":"table.es5.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","tslib_1.__extends"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AO0CA,AAAA,SAAgB,mBAAm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