{"version":3,"file":"table.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/table/tokens.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/table/cell.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/table/row.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/table/sticky-styler.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/table/table-errors.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/table/sticky-position-listener.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/table/table.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/table/text-column.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/table/table-module.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.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/**\n * Used to provide a table to some of the sub-components without causing a circular dependency.\n * @docs-private\n */\nexport const CDK_TABLE = new InjectionToken('CDK_TABLE');\n\n/** Configurable options for `CdkTextColumn`. */\nexport interface TextColumnOptions {\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 = new InjectionToken>(\n 'text-column-options',\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.dev/license\n */\n\nimport {\n ContentChild,\n Directive,\n ElementRef,\n Input,\n TemplateRef,\n booleanAttribute,\n inject,\n} from '@angular/core';\nimport {CanStick} from './can-stick';\nimport {CDK_TABLE} from './tokens';\n\n/** Base interface for a cell definition. Captures a column's cell template definition. */\nexport interface CellDef {\n template: TemplateRef;\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({\n selector: '[cdkCellDef]',\n})\nexport class CdkCellDef implements CellDef {\n /** @docs-private */\n template = inject>(TemplateRef);\n\n constructor(...args: unknown[]);\n constructor() {}\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({\n selector: '[cdkHeaderCellDef]',\n})\nexport class CdkHeaderCellDef implements CellDef {\n /** @docs-private */\n template = inject>(TemplateRef);\n\n constructor(...args: unknown[]);\n constructor() {}\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({\n selector: '[cdkFooterCellDef]',\n})\nexport class CdkFooterCellDef implements CellDef {\n /** @docs-private */\n template = inject>(TemplateRef);\n\n constructor(...args: unknown[]);\n constructor() {}\n}\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 providers: [{provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef}],\n})\nexport class CdkColumnDef implements CanStick {\n _table? = inject(CDK_TABLE, {optional: true});\n\n private _hasStickyChanged = false;\n\n /** Unique name for this column. */\n @Input('cdkColumnDef')\n get name(): string {\n return this._name;\n }\n set name(name: string) {\n this._setNameInput(name);\n }\n protected _name: string;\n\n /** Whether the cell is sticky. */\n @Input({transform: booleanAttribute})\n get sticky(): boolean {\n return this._sticky;\n }\n set sticky(value: boolean) {\n if (value !== this._sticky) {\n this._sticky = value;\n this._hasStickyChanged = true;\n }\n }\n private _sticky = false;\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({transform: booleanAttribute})\n get stickyEnd(): boolean {\n return this._stickyEnd;\n }\n set stickyEnd(value: boolean) {\n if (value !== this._stickyEnd) {\n this._stickyEnd = value;\n this._hasStickyChanged = true;\n }\n }\n _stickyEnd: boolean = false;\n\n /** @docs-private */\n @ContentChild(CdkCellDef) cell: CdkCellDef;\n\n /** @docs-private */\n @ContentChild(CdkHeaderCellDef) headerCell: CdkHeaderCellDef;\n\n /** @docs-private */\n @ContentChild(CdkFooterCellDef) 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 * Class name for cells in this column.\n * @docs-private\n */\n _columnCssClassName: string[];\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /** Whether the sticky state has changed. */\n hasStickyChanged(): boolean {\n const hasStickyChanged = this._hasStickyChanged;\n this.resetStickyChanged();\n return hasStickyChanged;\n }\n\n /** Resets the sticky changed state. */\n resetStickyChanged(): void {\n this._hasStickyChanged = false;\n }\n\n /**\n * Overridable method that sets the css classes that will be added to every cell in this\n * column.\n * In the future, columnCssClassName will change from type string[] to string and this\n * will set a single string value.\n * @docs-private\n */\n protected _updateColumnCssClassName() {\n this._columnCssClassName = [`cdk-column-${this.cssClassFriendlyName}`];\n }\n\n /**\n * This has been extracted to a util because of TS 4 and VE.\n * View Engine doesn't support property rename inheritance.\n * TS 4.0 doesn't allow properties to override accessors or vice-versa.\n * @docs-private\n */\n protected _setNameInput(value: string) {\n // If the directive is set without a name (updated programmatically), then this setter will\n // trigger with an empty string and should not overwrite the programmatically set value.\n if (value) {\n this._name = value;\n this.cssClassFriendlyName = value.replace(/[^a-z0-9_-]/gi, '-');\n this._updateColumnCssClassName();\n }\n }\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 elementRef.nativeElement.classList.add(...columnDef._columnCssClassName);\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(...args: unknown[]);\n\n constructor() {\n super(inject(CdkColumnDef), inject(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 },\n})\nexport class CdkFooterCell extends BaseCdkCell {\n constructor(...args: unknown[]);\n\n constructor() {\n const columnDef = inject(CdkColumnDef);\n const elementRef = inject(ElementRef);\n\n super(columnDef, elementRef);\n\n const role = columnDef._table?._getCellRole();\n if (role) {\n elementRef.nativeElement.setAttribute('role', role);\n }\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 },\n})\nexport class CdkCell extends BaseCdkCell {\n constructor(...args: unknown[]);\n\n constructor() {\n const columnDef = inject(CdkColumnDef);\n const elementRef = inject(ElementRef);\n\n super(columnDef, elementRef);\n\n const role = columnDef._table?._getCellRole();\n if (role) {\n elementRef.nativeElement.setAttribute('role', role);\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.dev/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 Input,\n booleanAttribute,\n inject,\n} from '@angular/core';\nimport {CanStick} from './can-stick';\nimport {CdkCellDef, CdkColumnDef} from './cell';\nimport {CDK_TABLE} from './tokens';\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 = ``;\n\n/**\n * Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs\n * for changes and notifying the table.\n */\n@Directive()\nexport abstract class BaseRowDef implements OnChanges {\n template = inject>(TemplateRef);\n protected _differs = inject(IterableDiffers);\n\n /** The columns to be displayed on this row. */\n columns: Iterable;\n\n /** Differ used to check if any changes were made to the columns. */\n protected _columnsDiffer: IterableDiffer;\n\n constructor(...args: unknown[]);\n constructor() {}\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 | 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 {\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/**\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: [{name: 'columns', alias: 'cdkHeaderRowDef'}],\n})\nexport class CdkHeaderRowDef extends BaseRowDef implements CanStick, OnChanges {\n _table? = inject(CDK_TABLE, {optional: true});\n\n private _hasStickyChanged = false;\n\n /** Whether the row is sticky. */\n @Input({alias: 'cdkHeaderRowDefSticky', transform: booleanAttribute})\n get sticky(): boolean {\n return this._sticky;\n }\n set sticky(value: boolean) {\n if (value !== this._sticky) {\n this._sticky = value;\n this._hasStickyChanged = true;\n }\n }\n private _sticky = false;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super(inject>(TemplateRef), inject(IterableDiffers));\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 override ngOnChanges(changes: SimpleChanges): void {\n super.ngOnChanges(changes);\n }\n\n /** Whether the sticky state has changed. */\n hasStickyChanged(): boolean {\n const hasStickyChanged = this._hasStickyChanged;\n this.resetStickyChanged();\n return hasStickyChanged;\n }\n\n /** Resets the sticky changed state. */\n resetStickyChanged(): void {\n this._hasStickyChanged = false;\n }\n}\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: [{name: 'columns', alias: 'cdkFooterRowDef'}],\n})\nexport class CdkFooterRowDef extends BaseRowDef implements CanStick, OnChanges {\n _table? = inject(CDK_TABLE, {optional: true});\n\n private _hasStickyChanged = false;\n\n /** Whether the row is sticky. */\n @Input({alias: 'cdkFooterRowDefSticky', transform: booleanAttribute})\n get sticky(): boolean {\n return this._sticky;\n }\n set sticky(value: boolean) {\n if (value !== this._sticky) {\n this._sticky = value;\n this._hasStickyChanged = true;\n }\n }\n private _sticky = false;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super(inject>(TemplateRef), inject(IterableDiffers));\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 override ngOnChanges(changes: SimpleChanges): void {\n super.ngOnChanges(changes);\n }\n\n /** Whether the sticky state has changed. */\n hasStickyChanged(): boolean {\n const hasStickyChanged = this._hasStickyChanged;\n this.resetStickyChanged();\n return hasStickyChanged;\n }\n\n /** Resets the sticky changed state. */\n resetStickyChanged(): void {\n this._hasStickyChanged = false;\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: [\n {name: 'columns', alias: 'cdkRowDefColumns'},\n {name: 'when', alias: 'cdkRowDefWhen'},\n ],\n})\nexport class CdkRowDef extends BaseRowDef {\n _table? = inject(CDK_TABLE, {optional: true});\n\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 constructor(...args: unknown[]);\n\n constructor() {\n // TODO(andrewseguin): Add an input for providing a switch function to determine\n // if this template should be used.\n super(inject>(TemplateRef), inject(IterableDiffers));\n }\n}\n\n/** Context provided to the row cells when `multiTemplateDataRows` is false */\nexport interface CdkCellOutletRowContext {\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 {\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({\n selector: '[cdkCellOutlet]',\n})\nexport class CdkCellOutlet implements OnDestroy {\n _viewContainer = inject(ViewContainerRef);\n\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(...args: unknown[]);\n\n constructor() {\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 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 imports: [CdkCellOutlet],\n})\nexport class CdkHeaderRow {}\n\n/** Footer template container that contains the cell outlet. Adds the right class and role. */\n@Component({\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 imports: [CdkCellOutlet],\n})\nexport class CdkFooterRow {}\n\n/** Data row template container that contains the cell outlet. Adds the right class and role. */\n@Component({\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 imports: [CdkCellOutlet],\n})\nexport class CdkRow {}\n\n/** Row that can be used to display a message when no data is shown in the table. */\n@Directive({\n selector: 'ng-template[cdkNoDataRow]',\n})\nexport class CdkNoDataRow {\n templateRef = inject>(TemplateRef);\n\n _contentClassNames = ['cdk-no-data-row', 'cdk-row'];\n _cellClassNames = ['cdk-cell', 'cdk-no-data-cell'];\n _cellSelector = 'td, cdk-cell, [cdk-cell], .cdk-cell';\n\n constructor(...args: unknown[]);\n constructor() {}\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.dev/license\n */\n\n/**\n * Directions that can be used when setting sticky positioning.\n * @docs-private\n */\nimport {afterNextRender, Injector} from '@angular/core';\nimport {Direction} from '../bidi';\nimport {StickyPositioningListener} from './sticky-position-listener';\n\nexport type StickyDirection = 'top' | 'bottom' | 'left' | 'right';\n\ninterface UpdateStickyColumnsParams {\n rows: HTMLElement[];\n stickyStartStates: boolean[];\n stickyEndStates: boolean[];\n}\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 private _elemSizeCache = new WeakMap();\n private _resizeObserver = globalThis?.ResizeObserver\n ? new globalThis.ResizeObserver(entries => this._updateCachedSizes(entries))\n : null;\n private _updatedStickyColumnsParamsToReplay: UpdateStickyColumnsParams[] = [];\n private _stickyColumnsReplayTimeout: ReturnType | null = null;\n private _cachedCellWidths: number[] = [];\n private readonly _borderCellCss: Readonly<{[d in StickyDirection]: string}>;\n private _destroyed = false;\n\n /**\n * @param _isNativeHtmlTable Whether the sticky logic should be based on a table\n * that uses the native `` 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 * @param _needsPositionStickyOnElement Whether we need to specify position: sticky on cells\n * using inline styles. If false, it is assumed that position: sticky is included in\n * the component stylesheet for _stickCellCss.\n * @param _positionListener A listener that is notified of changes to sticky rows/columns\n * and their dimensions.\n * @param _tableInjector The table's Injector.\n */\n constructor(\n private _isNativeHtmlTable: boolean,\n private _stickCellCss: string,\n private _isBrowser = true,\n private readonly _needsPositionStickyOnElement = true,\n public direction: Direction,\n private readonly _positionListener: StickyPositioningListener,\n private readonly _tableInjector: Injector,\n ) {\n this._borderCellCss = {\n 'top': `${_stickCellCss}-border-elem-top`,\n 'bottom': `${_stickCellCss}-border-elem-bottom`,\n 'left': `${_stickCellCss}-border-elem-left`,\n 'right': `${_stickCellCss}-border-elem-right`,\n };\n }\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 if (stickyDirections.includes('left') || stickyDirections.includes('right')) {\n this._removeFromStickyColumnReplayQueue(rows);\n }\n\n const elementsToClear: HTMLElement[] = [];\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 elementsToClear.push(row, ...(Array.from(row.children) as HTMLElement[]));\n }\n\n // Coalesce with sticky row/column updates (and potentially other changes like column resize).\n afterNextRender(\n {\n write: () => {\n for (const element of elementsToClear) {\n this._removeStickyStyle(element, stickyDirections);\n }\n },\n },\n {\n injector: this._tableInjector,\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 * @param recalculateCellWidths Whether the sticky styler should recalculate the width of each\n * column cell. If `false` cached widths will be used instead.\n * @param replay Whether to enqueue this call for replay after a ResizeObserver update.\n */\n updateStickyColumns(\n rows: HTMLElement[],\n stickyStartStates: boolean[],\n stickyEndStates: boolean[],\n recalculateCellWidths = true,\n replay = true,\n ) {\n // Don't cache any state if none of the columns are sticky.\n if (\n !rows.length ||\n !this._isBrowser ||\n !(stickyStartStates.some(state => state) || stickyEndStates.some(state => state))\n ) {\n this._positionListener?.stickyColumnsUpdated({sizes: []});\n this._positionListener?.stickyEndColumnsUpdated({sizes: []});\n return;\n }\n\n // Coalesce with sticky row updates (and potentially other changes like column resize).\n const firstRow = rows[0];\n const numCells = firstRow.children.length;\n\n const isRtl = this.direction === 'rtl';\n const start = isRtl ? 'right' : 'left';\n const end = isRtl ? 'left' : 'right';\n\n const lastStickyStart = stickyStartStates.lastIndexOf(true);\n const firstStickyEnd = stickyEndStates.indexOf(true);\n\n let cellWidths: number[];\n let startPositions: number[];\n let endPositions: number[];\n\n if (replay) {\n this._updateStickyColumnReplayQueue({\n rows: [...rows],\n stickyStartStates: [...stickyStartStates],\n stickyEndStates: [...stickyEndStates],\n });\n }\n\n afterNextRender(\n {\n earlyRead: () => {\n cellWidths = this._getCellWidths(firstRow, recalculateCellWidths);\n\n startPositions = this._getStickyStartColumnPositions(cellWidths, stickyStartStates);\n endPositions = this._getStickyEndColumnPositions(cellWidths, stickyEndStates);\n },\n write: () => {\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, start, startPositions[i], i === lastStickyStart);\n }\n\n if (stickyEndStates[i]) {\n this._addStickyStyle(cell, end, endPositions[i], i === firstStickyEnd);\n }\n }\n }\n\n if (this._positionListener && cellWidths.some(w => !!w)) {\n this._positionListener.stickyColumnsUpdated({\n sizes:\n lastStickyStart === -1\n ? []\n : cellWidths\n .slice(0, lastStickyStart + 1)\n .map((width, index) => (stickyStartStates[index] ? width : null)),\n });\n this._positionListener.stickyEndColumnsUpdated({\n sizes:\n firstStickyEnd === -1\n ? []\n : cellWidths\n .slice(firstStickyEnd)\n .map((width, index) =>\n stickyEndStates[index + firstStickyEnd] ? width : null,\n )\n .reverse(),\n });\n }\n },\n },\n {\n injector: this._tableInjector,\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. Note that the\n // sticky states need to be reversed as well.\n const rows = position === 'bottom' ? rowsToStick.slice().reverse() : rowsToStick;\n const states = position === 'bottom' ? stickyStates.slice().reverse() : stickyStates;\n\n // Measure row heights all at once before adding sticky styles to reduce layout thrashing.\n const stickyOffsets: number[] = [];\n const stickyCellHeights: (number | undefined)[] = [];\n const elementsToStick: HTMLElement[][] = [];\n\n // Coalesce with other sticky row updates (top/bottom), sticky columns updates\n // (and potentially other changes like column resize).\n afterNextRender(\n {\n earlyRead: () => {\n for (let rowIndex = 0, stickyOffset = 0; rowIndex < rows.length; rowIndex++) {\n if (!states[rowIndex]) {\n continue;\n }\n\n stickyOffsets[rowIndex] = stickyOffset;\n const row = rows[rowIndex];\n elementsToStick[rowIndex] = this._isNativeHtmlTable\n ? (Array.from(row.children) as HTMLElement[])\n : [row];\n\n const height = this._retrieveElementSize(row).height;\n stickyOffset += height;\n stickyCellHeights[rowIndex] = height;\n }\n },\n write: () => {\n const borderedRowIndex = states.lastIndexOf(true);\n\n for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {\n if (!states[rowIndex]) {\n continue;\n }\n\n const offset = stickyOffsets[rowIndex];\n const isBorderedRowIndex = rowIndex === borderedRowIndex;\n for (const element of elementsToStick[rowIndex]) {\n this._addStickyStyle(element, position, offset, isBorderedRowIndex);\n }\n }\n\n if (position === 'top') {\n this._positionListener?.stickyHeaderRowsUpdated({\n sizes: stickyCellHeights,\n offsets: stickyOffsets,\n elements: elementsToStick,\n });\n } else {\n this._positionListener?.stickyFooterRowsUpdated({\n sizes: stickyCellHeights,\n offsets: stickyOffsets,\n elements: elementsToStick,\n });\n }\n },\n },\n {\n injector: this._tableInjector,\n },\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 // Coalesce with other sticky updates (and potentially other changes like column resize).\n afterNextRender(\n {\n write: () => {\n const tfoot = tableElement.querySelector('tfoot')!;\n\n if (tfoot) {\n if (stickyStates.some(state => !state)) {\n this._removeStickyStyle(tfoot, ['bottom']);\n } else {\n this._addStickyStyle(tfoot, 'bottom', 0, false);\n }\n }\n },\n },\n {\n injector: this._tableInjector,\n },\n );\n }\n\n /** Triggered by the table's OnDestroy hook. */\n destroy() {\n if (this._stickyColumnsReplayTimeout) {\n clearTimeout(this._stickyColumnsReplayTimeout);\n }\n\n this._resizeObserver?.disconnect();\n this._destroyed = true;\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 if (!element.classList.contains(this._stickCellCss)) {\n return;\n }\n\n for (const dir of stickyDirections) {\n element.style[dir] = '';\n element.classList.remove(this._borderCellCss[dir]);\n }\n\n // If the element no longer has any more sticky directions, remove sticky positioning and\n // the sticky CSS class.\n // Short-circuit checking element.style[dir] for stickyDirections as they\n // were already removed above.\n const hasDirection = STICKY_DIRECTIONS.some(\n dir => stickyDirections.indexOf(dir) === -1 && element.style[dir],\n );\n if (hasDirection) {\n element.style.zIndex = this._getCalculatedZIndex(element);\n } else {\n // When not hasDirection, _getCalculatedZIndex will always return ''.\n element.style.zIndex = '';\n if (this._needsPositionStickyOnElement) {\n element.style.position = '';\n }\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(\n element: HTMLElement,\n dir: StickyDirection,\n dirValue: number,\n isBorderElement: boolean,\n ) {\n element.classList.add(this._stickCellCss);\n if (isBorderElement) {\n element.classList.add(this._borderCellCss[dir]);\n }\n element.style[dir] = `${dirValue}px`;\n element.style.zIndex = this._getCalculatedZIndex(element);\n if (this._needsPositionStickyOnElement) {\n element.style.cssText += 'position: -webkit-sticky; position: sticky; ';\n }\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 // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,\n // loses the array generic type in the `for of`. But we *also* have to use `Array` because\n // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`\n for (const dir of STICKY_DIRECTIONS as Iterable & StickyDirection[]) {\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, recalculateCellWidths = true): number[] {\n if (!recalculateCellWidths && this._cachedCellWidths.length) {\n return this._cachedCellWidths;\n }\n\n const cellWidths: number[] = [];\n const firstRowCells = row.children;\n for (let i = 0; i < firstRowCells.length; i++) {\n const cell = firstRowCells[i] as HTMLElement;\n cellWidths.push(this._retrieveElementSize(cell).width);\n }\n\n this._cachedCellWidths = cellWidths;\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 * Retreives the most recently observed size of the specified element from the cache, or\n * meaures it directly if not yet cached.\n */\n private _retrieveElementSize(element: HTMLElement): {width: number; height: number} {\n const cachedSize = this._elemSizeCache.get(element);\n if (cachedSize) {\n return cachedSize;\n }\n\n const clientRect = element.getBoundingClientRect();\n const size = {width: clientRect.width, height: clientRect.height};\n\n if (!this._resizeObserver) {\n return size;\n }\n\n this._elemSizeCache.set(element, size);\n this._resizeObserver.observe(element, {box: 'border-box'});\n return size;\n }\n\n /**\n * Conditionally enqueue the requested sticky update and clear previously queued updates\n * for the same rows.\n */\n private _updateStickyColumnReplayQueue(params: UpdateStickyColumnsParams) {\n this._removeFromStickyColumnReplayQueue(params.rows);\n\n // No need to replay if a flush is pending.\n if (!this._stickyColumnsReplayTimeout) {\n this._updatedStickyColumnsParamsToReplay.push(params);\n }\n }\n\n /** Remove updates for the specified rows from the queue. */\n private _removeFromStickyColumnReplayQueue(rows: HTMLElement[]) {\n const rowsSet = new Set(rows);\n for (const update of this._updatedStickyColumnsParamsToReplay) {\n update.rows = update.rows.filter(row => !rowsSet.has(row));\n }\n this._updatedStickyColumnsParamsToReplay = this._updatedStickyColumnsParamsToReplay.filter(\n update => !!update.rows.length,\n );\n }\n\n /** Update _elemSizeCache with the observed sizes. */\n private _updateCachedSizes(entries: ResizeObserverEntry[]) {\n let needsColumnUpdate = false;\n for (const entry of entries) {\n const newEntry = entry.borderBoxSize?.length\n ? {\n width: entry.borderBoxSize[0].inlineSize,\n height: entry.borderBoxSize[0].blockSize,\n }\n : {\n width: entry.contentRect.width,\n height: entry.contentRect.height,\n };\n\n if (\n newEntry.width !== this._elemSizeCache.get(entry.target as HTMLElement)?.width &&\n isCell(entry.target)\n ) {\n needsColumnUpdate = true;\n }\n\n this._elemSizeCache.set(entry.target as HTMLElement, newEntry);\n }\n\n if (needsColumnUpdate && this._updatedStickyColumnsParamsToReplay.length) {\n if (this._stickyColumnsReplayTimeout) {\n clearTimeout(this._stickyColumnsReplayTimeout);\n }\n\n this._stickyColumnsReplayTimeout = setTimeout(() => {\n if (this._destroyed) {\n return;\n }\n\n for (const update of this._updatedStickyColumnsParamsToReplay) {\n this.updateStickyColumns(\n update.rows,\n update.stickyStartStates,\n update.stickyEndStates,\n true,\n false,\n );\n }\n this._updatedStickyColumnsParamsToReplay = [];\n this._stickyColumnsReplayTimeout = null;\n }, 0);\n }\n }\n}\n\nfunction isCell(element: Element) {\n return ['cdk-cell', 'cdk-header-cell', 'cdk-footer-cell'].some(klass =>\n element.classList.contains(klass),\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.dev/license\n */\n\n/**\n * Returns an error to be thrown when attempting to find an nonexistent 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(\n `There can only be one default row without a when predicate function. ` +\n 'Or set `multiTemplateDataRows`.'\n );\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(\n `Could not find a matching row definition for the ` +\n `provided row data: ${JSON.stringify(data)}`,\n );\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(\n 'Missing definitions for header, footer, and row; ' +\n 'cannot determine which columns should be rendered.',\n );\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.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/** The injection token used to specify the StickyPositioningListener. */\nexport const STICKY_POSITIONING_LISTENER = new InjectionToken('CDK_SPL');\n\nexport type StickySize = number | null | undefined;\nexport type StickyOffset = number | null | undefined;\n\nexport interface StickyUpdate {\n elements?: readonly (HTMLElement[] | undefined)[];\n offsets?: StickyOffset[];\n sizes: StickySize[];\n}\n\n/**\n * If provided, CdkTable will call the methods below when it updates the size/\n * position/etc of its sticky rows and columns.\n */\nexport interface StickyPositioningListener {\n /** Called when CdkTable updates its sticky start columns. */\n stickyColumnsUpdated(update: StickyUpdate): void;\n\n /** Called when CdkTable updates its sticky end columns. */\n stickyEndColumnsUpdated(update: StickyUpdate): void;\n\n /** Called when CdkTable updates its sticky header rows. */\n stickyHeaderRowsUpdated(update: StickyUpdate): void;\n\n /** Called when CdkTable updates its sticky footer rows. */\n stickyFooterRowsUpdated(update: StickyUpdate): void;\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.dev/license\n */\n\nimport {Direction, Directionality} from '../bidi';\nimport {\n CollectionViewer,\n DataSource,\n _DisposeViewRepeaterStrategy,\n _RecycleViewRepeaterStrategy,\n isDataSource,\n _VIEW_REPEATER_STRATEGY,\n _ViewRepeater,\n _ViewRepeaterItemChange,\n _ViewRepeaterItemInsertArgs,\n _ViewRepeaterOperation,\n} from '../collections';\nimport {Platform} from '../platform';\nimport {ViewportRuler} from '../scrolling';\n\nimport {\n AfterContentChecked,\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Input,\n IterableChangeRecord,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n TemplateRef,\n TrackByFunction,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n Injector,\n HostAttributeToken,\n DOCUMENT,\n} from '@angular/core';\nimport {\n BehaviorSubject,\n isObservable,\n Observable,\n of as observableOf,\n Subject,\n Subscription,\n} 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 CdkNoDataRow,\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';\nimport {STICKY_POSITIONING_LISTENER, StickyPositioningListener} from './sticky-position-listener';\nimport {CDK_TABLE} from './tokens';\n\n/**\n * Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with\n * tables that animate rows.\n */\n@Directive({\n selector: 'cdk-table[recycleRows], table[cdk-table][recycleRows]',\n providers: [{provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy}],\n})\nexport class CdkRecycleRows {}\n\n/** Interface used to provide an outlet for rows to be inserted into. */\nexport interface RowOutlet {\n viewContainer: ViewContainerRef;\n}\n\n/** Possible types that can be set as the data source for a `CdkTable`. */\nexport type CdkTableDataSourceInput = readonly T[] | DataSource | Observable;\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({\n selector: '[rowOutlet]',\n})\nexport class DataRowOutlet implements RowOutlet {\n viewContainer = inject(ViewContainerRef);\n elementRef = inject(ElementRef);\n\n constructor(...args: unknown[]);\n\n constructor() {\n const table = inject>(CDK_TABLE);\n table._rowOutlet = this;\n table._outletAssigned();\n }\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({\n selector: '[headerRowOutlet]',\n})\nexport class HeaderRowOutlet implements RowOutlet {\n viewContainer = inject(ViewContainerRef);\n elementRef = inject(ElementRef);\n\n constructor(...args: unknown[]);\n\n constructor() {\n const table = inject>(CDK_TABLE);\n table._headerRowOutlet = this;\n table._outletAssigned();\n }\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({\n selector: '[footerRowOutlet]',\n})\nexport class FooterRowOutlet implements RowOutlet {\n viewContainer = inject(ViewContainerRef);\n elementRef = inject(ElementRef);\n\n constructor(...args: unknown[]);\n\n constructor() {\n const table = inject>(CDK_TABLE);\n table._footerRowOutlet = this;\n table._outletAssigned();\n }\n}\n\n/**\n * Provides a handle for the table to grab the view\n * container's ng-container to insert the no data row.\n * @docs-private\n */\n@Directive({\n selector: '[noDataRowOutlet]',\n})\nexport class NoDataRowOutlet implements RowOutlet {\n viewContainer = inject(ViewContainerRef);\n elementRef = inject(ElementRef);\n\n constructor(...args: unknown[]);\n\n constructor() {\n const table = inject>(CDK_TABLE);\n table._noDataRowOutlet = this;\n table._outletAssigned();\n }\n}\n\n/**\n * Interface used to conveniently type the possible context interfaces for the render row.\n * @docs-private\n */\nexport interface RowContext\n extends CdkCellOutletMultiRowContext,\n CdkCellOutletRowContext {}\n\n/**\n * Class used to conveniently type the embedded view ref for rows with a context.\n * @docs-private\n */\nabstract class RowViewRef extends EmbeddedViewRef> {}\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 iterated\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 {\n data: T;\n dataIndex: number;\n rowDef: CdkRowDef;\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 selector: 'cdk-table, table[cdk-table]',\n exportAs: 'cdkTable',\n template: `\n \n \n\n \n @if (_isServer) {\n \n }\n\n @if (_isNativeHtmlTable) {\n \n \n \n \n \n \n \n \n \n \n } @else {\n \n \n \n \n }\n `,\n styleUrl: 'table.css',\n host: {\n 'class': 'cdk-table',\n '[class.cdk-table-fixed-layout]': 'fixedLayout',\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 providers: [\n {provide: CDK_TABLE, useExisting: CdkTable},\n {provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy},\n // Prevent nested tables from seeing this table's StickyPositioningListener.\n {provide: STICKY_POSITIONING_LISTENER, useValue: null},\n ],\n imports: [HeaderRowOutlet, DataRowOutlet, NoDataRowOutlet, FooterRowOutlet],\n})\nexport class CdkTable\n implements AfterContentInit, AfterContentChecked, CollectionViewer, OnDestroy, OnInit\n{\n protected readonly _differs = inject(IterableDiffers);\n protected readonly _changeDetectorRef = inject(ChangeDetectorRef);\n protected readonly _elementRef = inject(ElementRef);\n protected readonly _dir = inject(Directionality, {optional: true});\n private _platform = inject(Platform);\n protected readonly _viewRepeater =\n inject<_ViewRepeater, RowContext>>(_VIEW_REPEATER_STRATEGY);\n private readonly _viewportRuler = inject(ViewportRuler);\n protected readonly _stickyPositioningListener = inject(\n STICKY_POSITIONING_LISTENER,\n {optional: true, skipSelf: true},\n )!;\n\n private _document = inject(DOCUMENT);\n\n /** Latest data provided by the data source. */\n protected _data: readonly T[] | undefined;\n\n /** Subject that emits when the component has been destroyed. */\n private readonly _onDestroy = new Subject();\n\n /** List of the rendered rows as identified by their `RenderRow` object. */\n private _renderRows: RenderRow[];\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();\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[];\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>;\n\n /** Stores the row definition that does not have a when predicate. */\n private _defaultRowDef: CdkRowDef | 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 *its* content child.\n */\n private _customColumnDefs = new Set();\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 *its* content child.\n */\n private _customRowDefs = new Set>();\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 *its* content child.\n */\n private _customHeaderRowDefs = new Set();\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 *its* content child.\n */\n private _customFooterRowDefs = new Set();\n\n /** No data row that was defined outside of the direct content children of the table. */\n private _customNoDataRow: CdkNoDataRow | null;\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 * Whether the sticky column styles need to be updated. Set to `true` when the visible columns\n * change.\n */\n private _stickyColumnStylesNeedReset = true;\n\n /**\n * Whether the sticky styler should recalculate cell widths when applying sticky styles. If\n * `false`, cached values will be used instead. This is only applicable to tables with\n * `_fixedLayout` enabled. For other tables, cell widths will always be recalculated.\n */\n private _forceRecalculateCellWidths = 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` object. With the two keys, the cache points to a `RenderRow` 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, RenderRow[]>>();\n\n /** Whether the table is applied to a native `
`. */\n protected _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 overridden by\n * table subclasses.\n */\n protected stickyCssClass: string = 'cdk-table-sticky';\n\n /**\n * Whether to manually add position: sticky to all sticky cell elements. Not needed if\n * the position is set in a selector associated with the value of stickyCssClass. May be\n * overridden by table subclasses\n */\n protected needsPositionStickyOnElement = true;\n\n /** Whether the component is being rendered on the server. */\n protected _isServer: boolean;\n\n /** Whether the no data row is currently showing anything. */\n private _isShowingNoDataRow = false;\n\n /** Whether the table has rendered out all the outlets for the first time. */\n private _hasAllOutlets = false;\n\n /** Whether the table is done initializing. */\n private _hasInitialized = false;\n\n /** Aria role to apply to the table's cells based on the table's own role. */\n _getCellRole(): string | null {\n // Perform this lazily in case the table's role was updated by a directive after construction.\n if (this._cellRoleInternal === undefined) {\n // Note that we set `role=\"cell\"` even on native `td` elements,\n // because some browsers seem to require it. See #29784.\n const tableRole = this._elementRef.nativeElement.getAttribute('role');\n return tableRole === 'grid' || tableRole === 'treegrid' ? 'gridcell' : 'cell';\n }\n\n return this._cellRoleInternal;\n }\n private _cellRoleInternal: string | null | undefined = undefined;\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 {\n return this._trackByFn;\n }\n set trackBy(fn: TrackByFunction) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') {\n console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}.`);\n }\n this._trackByFn = fn;\n }\n private _trackByFn: TrackByFunction;\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 {\n return this._dataSource;\n }\n set dataSource(dataSource: CdkTableDataSourceInput) {\n if (this._dataSource !== dataSource) {\n this._switchDataSource(dataSource);\n }\n }\n private _dataSource: CdkTableDataSourceInput;\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({transform: booleanAttribute})\n get multiTemplateDataRows(): boolean {\n return this._multiTemplateDataRows;\n }\n set multiTemplateDataRows(value: boolean) {\n this._multiTemplateDataRows = value;\n\n // In Ivy if this value is set via a static attribute (e.g.
),\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 this.updateStickyColumnStyles();\n }\n }\n _multiTemplateDataRows: boolean = false;\n\n /**\n * Whether to use a fixed table layout. Enabling this option will enforce consistent column widths\n * and optimize rendering sticky styles for native tables. No-op for flex tables.\n */\n @Input({transform: booleanAttribute})\n get fixedLayout(): boolean {\n return this._fixedLayout;\n }\n set fixedLayout(value: boolean) {\n this._fixedLayout = value;\n\n // Toggling `fixedLayout` may change column widths. Sticky column styles should be recalculated.\n this._forceRecalculateCellWidths = true;\n this._stickyColumnStylesNeedReset = true;\n }\n private _fixedLayout: boolean = false;\n\n /**\n * Emits when the table completes rendering a set of data rows based on the latest data from the\n * data source, even if the set of rows is empty.\n */\n @Output()\n readonly contentChanged = new EventEmitter();\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 readonly viewChange = new BehaviorSubject<{start: number; end: number}>({\n start: 0,\n end: Number.MAX_VALUE,\n });\n\n // Outlets in the table's template where the header, data rows, and footer will be inserted.\n _rowOutlet: DataRowOutlet;\n _headerRowOutlet: HeaderRowOutlet;\n _footerRowOutlet: FooterRowOutlet;\n _noDataRowOutlet: NoDataRowOutlet;\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, {descendants: true}) _contentColumnDefs: QueryList;\n\n /** Set of data row definitions that were provided to the table as content children. */\n @ContentChildren(CdkRowDef, {descendants: true}) _contentRowDefs: QueryList>;\n\n /** Set of header row definitions that were provided to the table as content children. */\n @ContentChildren(CdkHeaderRowDef, {\n descendants: true,\n })\n _contentHeaderRowDefs: QueryList;\n\n /** Set of footer row definitions that were provided to the table as content children. */\n @ContentChildren(CdkFooterRowDef, {\n descendants: true,\n })\n _contentFooterRowDefs: QueryList;\n\n /** Row definition that will only be rendered if there's no data in the table. */\n @ContentChild(CdkNoDataRow) _noDataRow: CdkNoDataRow;\n\n private _injector = inject(Injector);\n\n constructor(...args: unknown[]);\n\n constructor() {\n const role = inject(new HostAttributeToken('role'), {optional: true});\n\n if (!role) {\n this._elementRef.nativeElement.setAttribute('role', 'table');\n }\n\n this._isServer = !this._platform.isBrowser;\n this._isNativeHtmlTable = this._elementRef.nativeElement.nodeName === 'TABLE';\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) => {\n return this.trackBy ? this.trackBy(dataRow.dataIndex, dataRow.data) : dataRow;\n });\n }\n\n ngOnInit() {\n this._setupStickyStyler();\n\n this._viewportRuler\n .change()\n .pipe(takeUntil(this._onDestroy))\n .subscribe(() => {\n this._forceRecalculateCellWidths = true;\n });\n }\n\n ngAfterContentInit() {\n this._hasInitialized = true;\n }\n\n ngAfterContentChecked() {\n // Only start re-rendering in `ngAfterContentChecked` after the first render.\n if (this._canRender()) {\n this._render();\n }\n }\n\n ngOnDestroy() {\n this._stickyStyler?.destroy();\n\n [\n this._rowOutlet?.viewContainer,\n this._headerRowOutlet?.viewContainer,\n this._footerRowOutlet?.viewContainer,\n this._cachedRenderRowsMap,\n this._customColumnDefs,\n this._customRowDefs,\n this._customHeaderRowDefs,\n this._customFooterRowDefs,\n this._columnDefsByName,\n ].forEach((def: ViewContainerRef | Set | Map | undefined) => {\n def?.clear();\n });\n\n this._headerRowDefs = [];\n this._footerRowDefs = [];\n this._defaultRowDef = null;\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 this._updateNoDataRow();\n this.contentChanged.next();\n return;\n }\n const viewContainer = this._rowOutlet.viewContainer;\n\n this._viewRepeater.applyChanges(\n changes,\n viewContainer,\n (\n record: IterableChangeRecord>,\n _adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n ) => this._getEmbeddedViewArgs(record.item, currentIndex!),\n record => record.item.data,\n (change: _ViewRepeaterItemChange, RowContext>) => {\n if (change.operation === _ViewRepeaterOperation.INSERTED && change.context) {\n this._renderCellTemplateForItem(change.record.item.rowDef, change.context);\n }\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>) => {\n const rowView = >viewContainer.get(record.currentIndex!);\n rowView.context.$implicit = record.item.data;\n });\n\n this._updateNoDataRow();\n\n this.contentChanged.next();\n this.updateStickyColumnStyles();\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) {\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) {\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 /** Sets a no data row definition that was not included as a part of the content children. */\n setNoDataRow(noDataRow: CdkNoDataRow | null) {\n this._customNoDataRow = noDataRow;\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\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 if (this._isNativeHtmlTable) {\n const thead = closestTableSection(this._headerRowOutlet, 'thead');\n if (thead) {\n thead.style.display = headerRows.length ? '' : 'none';\n }\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\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 if (this._isNativeHtmlTable) {\n const tfoot = closestTableSection(this._footerRowOutlet, 'tfoot');\n if (tfoot) {\n tfoot.style.display = footerRows.length ? '' : 'none';\n }\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 // For tables not using a fixed layout, the column widths may change when new rows are rendered.\n // In a table using a fixed layout, row content won't affect column width, so sticky styles\n // don't need to be cleared unless either the sticky column config changes or one of the row\n // defs change.\n if ((this._isNativeHtmlTable && !this._fixedLayout) || this._stickyColumnStylesNeedReset) {\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],\n ['left', 'right'],\n );\n this._stickyColumnStylesNeedReset = false;\n }\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 /** Invoked whenever an outlet is created and has been assigned to the table. */\n _outletAssigned(): void {\n // Trigger the first render once all outlets have been assigned. We do it this way, as\n // opposed to waiting for the next `ngAfterContentChecked`, because we don't know when\n // the next change detection will happen.\n // Also we can't use queries to resolve the outlets, because they're wrapped in a\n // conditional, so we have to rely on them being assigned via DI.\n if (\n !this._hasAllOutlets &&\n this._rowOutlet &&\n this._headerRowOutlet &&\n this._footerRowOutlet &&\n this._noDataRowOutlet\n ) {\n this._hasAllOutlets = true;\n\n // In some setups this may fire before `ngAfterContentInit`\n // so we need a check here. See #28538.\n if (this._canRender()) {\n this._render();\n }\n }\n }\n\n /** Whether the table has all the information to start rendering. */\n private _canRender(): boolean {\n return this._hasAllOutlets && this._hasInitialized;\n }\n\n /** Renders the table if its state has changed. */\n private _render(): void {\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 (\n !this._headerRowDefs.length &&\n !this._footerRowDefs.length &&\n !this._rowDefs.length &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw getTableMissingRowDefsError();\n }\n\n // Render updates if the list of columns have been changed for the header, row, or footer defs.\n const columnsChanged = this._renderUpdatedColumns();\n const rowDefsChanged = columnsChanged || this._headerRowDefChanged || this._footerRowDefChanged;\n // Ensure sticky column styles are reset if set to `true` elsewhere.\n this._stickyColumnStylesNeedReset = this._stickyColumnStylesNeedReset || rowDefsChanged;\n this._forceRecalculateCellWidths = rowDefsChanged;\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 } else if (this._stickyColumnStylesNeedReset) {\n // In the above case, _observeRenderChanges will result in updateStickyColumnStyles being\n // called when it row data arrives. Otherwise, we need to call it proactively.\n this.updateStickyColumnStyles();\n }\n\n this._checkStickyStates();\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[] {\n const renderRows: RenderRow[] = [];\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 if (!this._data) {\n return renderRows;\n }\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` 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,\n dataIndex: number,\n cache?: WeakMap, RenderRow[]>,\n ): RenderRow[] {\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 = mergeArrayAndSet(\n this._getOwnDefs(this._contentColumnDefs),\n this._customColumnDefs,\n );\n columnDefs.forEach(columnDef => {\n if (\n this._columnDefsByName.has(columnDef.name) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\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 = mergeArrayAndSet(\n this._getOwnDefs(this._contentHeaderRowDefs),\n this._customHeaderRowDefs,\n );\n this._footerRowDefs = mergeArrayAndSet(\n this._getOwnDefs(this._contentFooterRowDefs),\n this._customFooterRowDefs,\n );\n this._rowDefs = mergeArrayAndSet(this._getOwnDefs(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 (\n !this.multiTemplateDataRows &&\n defaultRowDefs.length > 1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\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(): boolean {\n const columnsDiffReducer = (acc: boolean, def: BaseRowDef) => {\n // The differ should be run for every column, even if `acc` is already\n // true (see #29922)\n const diff = !!def.getColumnsDiff();\n return acc || diff;\n };\n\n // Force re-render data rows if the list of column definitions have changed.\n const dataColumnsChanged = this._rowDefs.reduce(columnsDiffReducer, false);\n if (dataColumnsChanged) {\n this._forceRenderDataRows();\n }\n\n // Force re-render header/footer rows if the list of column definitions have changed.\n const headerColumnsChanged = this._headerRowDefs.reduce(columnsDiffReducer, false);\n if (headerColumnsChanged) {\n this._forceRenderHeaderRows();\n }\n\n const footerColumnsChanged = this._footerRowDefs.reduce(columnsDiffReducer, false);\n if (footerColumnsChanged) {\n this._forceRenderFooterRows();\n }\n\n return dataColumnsChanged || headerColumnsChanged || footerColumnsChanged;\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) {\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 if (this._rowOutlet) {\n this._rowOutlet.viewContainer.clear();\n }\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 | undefined;\n\n if (isDataSource(this.dataSource)) {\n dataStream = this.dataSource.connect(this);\n } else if (isObservable(this.dataSource)) {\n dataStream = this.dataSource;\n } else if (Array.isArray(this.dataSource)) {\n dataStream = observableOf(this.dataSource);\n }\n\n if (dataStream === undefined && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableUnknownDataSourceError();\n }\n\n this._renderChangeSubscription = dataStream!\n .pipe(takeUntil(this._onDestroy))\n .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 }\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 }\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 && (typeof ngDevMode === 'undefined' || ngDevMode)) {\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(\n rows,\n stickyStartStates,\n stickyEndStates,\n !this._fixedLayout || this._forceRecalculateCellWidths,\n );\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;\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[] {\n if (this._rowDefs.length == 1) {\n return [this._rowDefs[0]];\n }\n\n let rowDefs: CdkRowDef[] = [];\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 && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableMissingMatchingRowDefError(data);\n }\n\n return rowDefs;\n }\n\n private _getEmbeddedViewArgs(\n renderRow: RenderRow,\n index: number,\n ): _ViewRepeaterItemInsertArgs> {\n const rowDef = renderRow.rowDef;\n const context: RowContext = {$implicit: renderRow.data};\n return {\n templateRef: rowDef.template,\n context,\n index,\n };\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,\n rowDef: BaseRowDef,\n index: number,\n context: RowContext = {},\n ): EmbeddedViewRef> {\n // TODO(andrewseguin): enforce that one outlet was instantiated from createEmbeddedView\n const view = outlet.viewContainer.createEmbeddedView(rowDef.template, context, index);\n this._renderCellTemplateForItem(rowDef, context);\n return view;\n }\n\n private _renderCellTemplateForItem(rowDef: BaseRowDef, context: RowContext) {\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;\n const context = viewRef.context as RowContext;\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[] {\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 && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableUnknownColumnError(columnId);\n }\n\n return rowDef.extractCellTemplate(column!);\n });\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 }\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 = (\n acc: boolean,\n d: CdkHeaderRowDef | CdkFooterRowDef | CdkColumnDef,\n ) => {\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._stickyColumnStylesNeedReset = true;\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,\n this.stickyCssClass,\n this._platform.isBrowser,\n this.needsPositionStickyOnElement,\n direction,\n this._stickyPositioningListener,\n this._injector,\n );\n (this._dir ? this._dir.change : observableOf())\n .pipe(takeUntil(this._onDestroy))\n .subscribe(value => {\n this._stickyStyler.direction = value;\n this.updateStickyColumnStyles();\n });\n }\n\n /** Filters definitions that belong to this table from a QueryList. */\n private _getOwnDefs(items: QueryList): I[] {\n return items.filter(item => !item._table || item._table === this);\n }\n\n /** Creates or removes the no data row, depending on whether any data is being shown. */\n private _updateNoDataRow() {\n const noDataRow = this._customNoDataRow || this._noDataRow;\n\n if (!noDataRow) {\n return;\n }\n\n const shouldShow = this._rowOutlet.viewContainer.length === 0;\n\n if (shouldShow === this._isShowingNoDataRow) {\n return;\n }\n\n const container = this._noDataRowOutlet.viewContainer;\n\n if (shouldShow) {\n const view = container.createEmbeddedView(noDataRow.templateRef);\n const rootNode: HTMLElement | undefined = view.rootNodes[0];\n\n // Only add the attributes if we have a single root node since it's hard\n // to figure out which one to add it to when there are multiple.\n if (view.rootNodes.length === 1 && rootNode?.nodeType === this._document.ELEMENT_NODE) {\n rootNode.setAttribute('role', 'row');\n rootNode.classList.add(...noDataRow._contentClassNames);\n\n const cells = rootNode.querySelectorAll(noDataRow._cellSelector);\n\n for (let i = 0; i < cells.length; i++) {\n cells[i].classList.add(...noDataRow._cellClassNames);\n }\n }\n } else {\n container.clear();\n }\n\n this._isShowingNoDataRow = shouldShow;\n\n this._changeDetectorRef.markForCheck();\n }\n}\n\n/** Utility function that gets a merged list of the entries in an array and values of a Set. */\nfunction mergeArrayAndSet(array: T[], set: Set): T[] {\n return array.concat(Array.from(set));\n}\n\n/**\n * Finds the closest table section to an outlet. We can't use `HTMLElement.closest` for this,\n * because the node representing the outlet is a comment.\n */\nfunction closestTableSection(outlet: RowOutlet, section: string): HTMLElement | null {\n const uppercaseSection = section.toUpperCase();\n let current: Node | null = outlet.viewContainer.element.nativeElement;\n\n while (current) {\n // 1 is an element node.\n const nodeName = current.nodeType === 1 ? (current as HTMLElement).nodeName : null;\n if (nodeName === uppercaseSection) {\n return current as HTMLElement;\n } else if (nodeName === 'TABLE') {\n // Stop traversing past the `table` node.\n break;\n }\n current = current.parentNode;\n }\n\n return null;\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.dev/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n Input,\n OnDestroy,\n OnInit,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport {CdkCellDef, CdkColumnDef, CdkHeaderCellDef, CdkHeaderCell, CdkCell} from './cell';\nimport {CdkTable} from './table';\nimport {\n getTableTextColumnMissingParentTableError,\n getTableTextColumnMissingNameError,\n} from './table-errors';\nimport {TEXT_COLUMN_OPTIONS, TextColumnOptions} from './tokens';\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 (`
`).\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 selector: 'cdk-text-column',\n template: `\n \n \n \n \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 imports: [CdkColumnDef, CdkHeaderCellDef, CdkHeaderCell, CdkCellDef, CdkCell],\n})\nexport class CdkTextColumn implements OnDestroy, OnInit {\n private _table = inject>(CdkTable, {optional: true});\n private _options = inject>(TEXT_COLUMN_OPTIONS, {optional: true})!;\n\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' | 'center' = '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(...args: unknown[]);\n\n constructor() {\n this._options = this._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 if (typeof ngDevMode === 'undefined' || ngDevMode) {\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 (!name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\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.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {\n HeaderRowOutlet,\n DataRowOutlet,\n CdkTable,\n CdkRecycleRows,\n FooterRowOutlet,\n NoDataRowOutlet,\n} from './table';\nimport {\n CdkCellOutlet,\n CdkFooterRow,\n CdkFooterRowDef,\n CdkHeaderRow,\n CdkHeaderRowDef,\n CdkRow,\n CdkRowDef,\n CdkNoDataRow,\n} from './row';\nimport {\n CdkColumnDef,\n CdkHeaderCellDef,\n CdkHeaderCell,\n CdkCell,\n CdkCellDef,\n CdkFooterCellDef,\n CdkFooterCell,\n} from './cell';\nimport {CdkTextColumn} from './text-column';\nimport {ScrollingModule} from '../scrolling';\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 CdkNoDataRow,\n CdkRecycleRows,\n NoDataRowOutlet,\n];\n\n@NgModule({\n exports: EXPORTED_DECLARATIONS,\n imports: [ScrollingModule, ...EXPORTED_DECLARATIONS],\n})\nexport class CdkTableModule {}\n"],"names":["CDK_TABLE","InjectionToken","TEXT_COLUMN_OPTIONS","CdkCellDef","template","inject","TemplateRef","constructor","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","ngImport","decorators","args","CdkHeaderCellDef","CdkFooterCellDef","CdkColumnDef","_table","optional","_hasStickyChanged","name","_name","_setNameInput","sticky","_sticky","value","stickyEnd","_stickyEnd","cell","headerCell","footerCell","cssClassFriendlyName","_columnCssClassName","hasStickyChanged","resetStickyChanged","_updateColumnCssClassName","replace","inputs","booleanAttribute","provide","useExisting","descendants","propertyName","first","predicate","providers","Input","transform","ContentChild","BaseCdkCell","columnDef","elementRef","nativeElement","classList","add","CdkHeaderCell","ElementRef","host","attributes","classAttribute","usesInheritance","CdkFooterCell","role","_getCellRole","setAttribute","CdkCell","CDK_ROW_TEMPLATE","BaseRowDef","_differs","IterableDiffers","columns","_columnsDiffer","ngOnChanges","changes","currentValue","find","create","diff","getColumnsDiff","extractCellTemplate","column","CdkHeaderRowDef","CdkFooterRowDef","usesOnChanges","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","alias","CdkRowDef","when","CdkCellOutlet","_viewContainer","ViewContainerRef","cells","context","mostRecentCellOutlet","ngOnDestroy","CdkHeaderRow","Component","ɵcmp","ɵɵngDeclareComponent","changeDetection","ChangeDetectionStrategy","Default","encapsulation","ViewEncapsulation","None","imports","CdkFooterRow","CdkRow","CdkNoDataRow","templateRef","_contentClassNames","_cellClassNames","_cellSelector","STICKY_DIRECTIONS","StickyStyler","_isNativeHtmlTable","_stickCellCss","_isBrowser","_needsPositionStickyOnElement","direction","_positionListener","_tableInjector","_elemSizeCache","WeakMap","_resizeObserver","globalThis","ResizeObserver","entries","_updateCachedSizes","_updatedStickyColumnsParamsToReplay","_stickyColumnsReplayTimeout","_cachedCellWidths","_borderCellCss","_destroyed","clearStickyPositioning","rows","stickyDirections","includes","_removeFromStickyColumnReplayQueue","elementsToClear","row","nodeType","ELEMENT_NODE","push","Array","from","children","afterNextRender","write","element","_removeStickyStyle","injector","updateStickyColumns","stickyStartStates","stickyEndStates","recalculateCellWidths","replay","length","some","state","stickyColumnsUpdated","sizes","stickyEndColumnsUpdated","firstRow","numCells","isRtl","start","end","lastStickyStart","lastIndexOf","firstStickyEnd","indexOf","cellWidths","startPositions","endPositions","_updateStickyColumnReplayQueue","earlyRead","_getCellWidths","_getStickyStartColumnPositions","_getStickyEndColumnPositions","i","_addStickyStyle","w","slice","map","width","index","reverse","stickRows","rowsToStick","stickyStates","position","states","stickyOffsets","stickyCellHeights","elementsToStick","rowIndex","stickyOffset","height","_retrieveElementSize","borderedRowIndex","offset","isBorderedRowIndex","stickyHeaderRowsUpdated","offsets","elements","stickyFooterRowsUpdated","updateStickyFooterContainer","tableElement","tfoot","querySelector","destroy","clearTimeout","disconnect","contains","dir","style","remove","hasDirection","zIndex","_getCalculatedZIndex","dirValue","isBorderElement","cssText","zIndexIncrements","top","bottom","left","right","firstRowCells","widths","positions","nextPosition","cachedSize","get","clientRect","getBoundingClientRect","size","set","observe","box","params","rowsSet","Set","update","filter","has","needsColumnUpdate","entry","newEntry","borderBoxSize","inlineSize","blockSize","contentRect","isCell","setTimeout","klass","getTableUnknownColumnError","id","Error","getTableDuplicateColumnNameError","getTableMultipleDefaultRowDefsError","getTableMissingMatchingRowDefError","data","JSON","stringify","getTableMissingRowDefsError","getTableUnknownDataSourceError","getTableTextColumnMissingParentTableError","getTableTextColumnMissingNameError","STICKY_POSITIONING_LISTENER","CdkRecycleRows","_VIEW_REPEATER_STRATEGY","useClass","_RecycleViewRepeaterStrategy","DataRowOutlet","viewContainer","table","_rowOutlet","_outletAssigned","HeaderRowOutlet","_headerRowOutlet","FooterRowOutlet","_footerRowOutlet","NoDataRowOutlet","_noDataRowOutlet","CdkTable","_changeDetectorRef","ChangeDetectorRef","_elementRef","_dir","Directionality","_platform","Platform","_viewRepeater","_viewportRuler","ViewportRuler","_stickyPositioningListener","skipSelf","_document","DOCUMENT","_data","_onDestroy","Subject","_renderRows","_renderChangeSubscription","_columnDefsByName","Map","_rowDefs","_headerRowDefs","_footerRowDefs","_dataDiffer","_defaultRowDef","_customColumnDefs","_customRowDefs","_customHeaderRowDefs","_customFooterRowDefs","_customNoDataRow","_headerRowDefChanged","_footerRowDefChanged","_stickyColumnStylesNeedReset","_forceRecalculateCellWidths","_cachedRenderRowsMap","_stickyStyler","stickyCssClass","needsPositionStickyOnElement","_isServer","_isShowingNoDataRow","_hasAllOutlets","_hasInitialized","_cellRoleInternal","undefined","tableRole","getAttribute","trackBy","_trackByFn","fn","ngDevMode","console","warn","dataSource","_dataSource","_switchDataSource","multiTemplateDataRows","_multiTemplateDataRows","_forceRenderDataRows","updateStickyColumnStyles","fixedLayout","_fixedLayout","contentChanged","EventEmitter","viewChange","BehaviorSubject","Number","MAX_VALUE","_contentColumnDefs","_contentRowDefs","_contentHeaderRowDefs","_contentFooterRowDefs","_noDataRow","_injector","Injector","HostAttributeToken","isBrowser","nodeName","_i","dataRow","dataIndex","ngOnInit","_setupStickyStyler","change","pipe","takeUntil","subscribe","ngAfterContentInit","ngAfterContentChecked","_canRender","_render","forEach","def","clear","next","complete","isDataSource","renderRows","_getAllRenderRows","_updateNoDataRow","applyChanges","record","_adjustedPreviousIndex","currentIndex","_getEmbeddedViewArgs","item","operation","_ViewRepeaterOperation","INSERTED","_renderCellTemplateForItem","rowDef","_updateRowIndexContext","forEachIdentityChange","rowView","$implicit","addColumnDef","removeColumnDef","delete","addRowDef","removeRowDef","addHeaderRowDef","headerRowDef","removeHeaderRowDef","addFooterRowDef","footerRowDef","removeFooterRowDef","setNoDataRow","noDataRow","updateStickyHeaderRowStyles","headerRows","_getRenderedRows","thead","closestTableSection","display","updateStickyFooterRowStyles","footerRows","dataRows","headerRow","_addStickyColumnStyles","footerRow","values","_cacheRowDefs","_cacheColumnDefs","columnsChanged","_renderUpdatedColumns","rowDefsChanged","_forceRenderHeaderRows","_forceRenderFooterRows","_observeRenderChanges","_checkStickyStates","prevCachedRenderRows","renderRowsForData","_getRenderRowsForData","j","renderRow","cache","rowDefs","_getRowDefs","cachedRenderRows","shift","columnDefs","mergeArrayAndSet","_getOwnDefs","defaultRowDefs","columnsDiffReducer","acc","dataColumnsChanged","reduce","headerColumnsChanged","footerColumnsChanged","unsubscribe","dataStream","connect","isObservable","isArray","observableOf","_renderRow","columnName","rowOutlet","renderedRows","viewRef","rootNodes","outlet","view","createEmbeddedView","cellTemplate","_getCellTemplates","markForCheck","renderIndex","count","last","even","odd","columnId","stickyCheckReducer","d","items","shouldShow","container","rootNode","querySelectorAll","outputs","properties","_DisposeViewRepeaterStrategy","useValue","queries","exportAs","isInline","styles","dependencies","kind","Output","ContentChildren","array","concat","section","uppercaseSection","toUpperCase","current","parentNode","CdkTextColumn","_options","_syncColumnDefName","headerText","dataAccessor","justify","_createDefaultHeaderText","defaultDataAccessor","defaultHeaderTextTransform","static","ViewChild","EXPORTED_DECLARATIONS","CdkTableModule","NgModule","ScrollingModule","ɵinj","ɵɵngDeclareInjector","exports"],"mappings":";;;;;;;;;;;;;;;;MAcaA,SAAS,GAAG,IAAIC,cAAc,CAAM,WAAW;MAe/CC,mBAAmB,GAAG,IAAID,cAAc,CACnD,qBAAqB;;MCEVE,UAAU,CAAA;AAErBC,EAAAA,QAAQ,GAAGC,MAAM,CAAmBC,WAAW,CAAC;EAGhDC,WAAAA,GAAA;;;;;UALWJ,UAAU;AAAAK,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAC;AAAA,GAAA,CAAA;;;;UAAVT,UAAU;AAAAU,IAAAA,YAAA,EAAA,IAAA;AAAAC,IAAAA,QAAA,EAAA,cAAA;AAAAC,IAAAA,QAAA,EAAAL;AAAA,GAAA,CAA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