[6a3a178] | 1 | /**
|
---|
| 2 | * @license
|
---|
| 3 | * Copyright Google LLC All Rights Reserved.
|
---|
| 4 | *
|
---|
| 5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
| 6 | * found in the LICENSE file at https://angular.io/license
|
---|
| 7 | */
|
---|
| 8 | import { Directive, Input } from '@angular/core';
|
---|
| 9 | import { CdkCell, CdkCellDef, CdkColumnDef, CdkFooterCell, CdkFooterCellDef, CdkHeaderCell, CdkHeaderCellDef, } from '@angular/cdk/table';
|
---|
| 10 | /**
|
---|
| 11 | * Cell definition for the mat-table.
|
---|
| 12 | * Captures the template of a column's data row cell as well as cell-specific properties.
|
---|
| 13 | */
|
---|
| 14 | export class MatCellDef extends CdkCellDef {
|
---|
| 15 | }
|
---|
| 16 | MatCellDef.decorators = [
|
---|
| 17 | { type: Directive, args: [{
|
---|
| 18 | selector: '[matCellDef]',
|
---|
| 19 | providers: [{ provide: CdkCellDef, useExisting: MatCellDef }]
|
---|
| 20 | },] }
|
---|
| 21 | ];
|
---|
| 22 | /**
|
---|
| 23 | * Header cell definition for the mat-table.
|
---|
| 24 | * Captures the template of a column's header cell and as well as cell-specific properties.
|
---|
| 25 | */
|
---|
| 26 | export class MatHeaderCellDef extends CdkHeaderCellDef {
|
---|
| 27 | }
|
---|
| 28 | MatHeaderCellDef.decorators = [
|
---|
| 29 | { type: Directive, args: [{
|
---|
| 30 | selector: '[matHeaderCellDef]',
|
---|
| 31 | providers: [{ provide: CdkHeaderCellDef, useExisting: MatHeaderCellDef }]
|
---|
| 32 | },] }
|
---|
| 33 | ];
|
---|
| 34 | /**
|
---|
| 35 | * Footer cell definition for the mat-table.
|
---|
| 36 | * Captures the template of a column's footer cell and as well as cell-specific properties.
|
---|
| 37 | */
|
---|
| 38 | export class MatFooterCellDef extends CdkFooterCellDef {
|
---|
| 39 | }
|
---|
| 40 | MatFooterCellDef.decorators = [
|
---|
| 41 | { type: Directive, args: [{
|
---|
| 42 | selector: '[matFooterCellDef]',
|
---|
| 43 | providers: [{ provide: CdkFooterCellDef, useExisting: MatFooterCellDef }]
|
---|
| 44 | },] }
|
---|
| 45 | ];
|
---|
| 46 | /**
|
---|
| 47 | * Column definition for the mat-table.
|
---|
| 48 | * Defines a set of cells available for a table column.
|
---|
| 49 | */
|
---|
| 50 | export class MatColumnDef extends CdkColumnDef {
|
---|
| 51 | /** Unique name for this column. */
|
---|
| 52 | get name() { return this._name; }
|
---|
| 53 | set name(name) { this._setNameInput(name); }
|
---|
| 54 | /**
|
---|
| 55 | * Add "mat-column-" prefix in addition to "cdk-column-" prefix.
|
---|
| 56 | * In the future, this will only add "mat-column-" and columnCssClassName
|
---|
| 57 | * will change from type string[] to string.
|
---|
| 58 | * @docs-private
|
---|
| 59 | */
|
---|
| 60 | _updateColumnCssClassName() {
|
---|
| 61 | super._updateColumnCssClassName();
|
---|
| 62 | this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`);
|
---|
| 63 | }
|
---|
| 64 | }
|
---|
| 65 | MatColumnDef.decorators = [
|
---|
| 66 | { type: Directive, args: [{
|
---|
| 67 | selector: '[matColumnDef]',
|
---|
| 68 | inputs: ['sticky'],
|
---|
| 69 | providers: [
|
---|
| 70 | { provide: CdkColumnDef, useExisting: MatColumnDef },
|
---|
| 71 | { provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: MatColumnDef }
|
---|
| 72 | ],
|
---|
| 73 | },] }
|
---|
| 74 | ];
|
---|
| 75 | MatColumnDef.propDecorators = {
|
---|
| 76 | name: [{ type: Input, args: ['matColumnDef',] }]
|
---|
| 77 | };
|
---|
| 78 | /** Header cell template container that adds the right classes and role. */
|
---|
| 79 | export class MatHeaderCell extends CdkHeaderCell {
|
---|
| 80 | }
|
---|
| 81 | MatHeaderCell.decorators = [
|
---|
| 82 | { type: Directive, args: [{
|
---|
| 83 | selector: 'mat-header-cell, th[mat-header-cell]',
|
---|
| 84 | host: {
|
---|
| 85 | 'class': 'mat-header-cell',
|
---|
| 86 | 'role': 'columnheader',
|
---|
| 87 | },
|
---|
| 88 | },] }
|
---|
| 89 | ];
|
---|
| 90 | /** Footer cell template container that adds the right classes and role. */
|
---|
| 91 | export class MatFooterCell extends CdkFooterCell {
|
---|
| 92 | }
|
---|
| 93 | MatFooterCell.decorators = [
|
---|
| 94 | { type: Directive, args: [{
|
---|
| 95 | selector: 'mat-footer-cell, td[mat-footer-cell]',
|
---|
| 96 | host: {
|
---|
| 97 | 'class': 'mat-footer-cell',
|
---|
| 98 | 'role': 'gridcell',
|
---|
| 99 | },
|
---|
| 100 | },] }
|
---|
| 101 | ];
|
---|
| 102 | /** Cell template container that adds the right classes and role. */
|
---|
| 103 | export class MatCell extends CdkCell {
|
---|
| 104 | }
|
---|
| 105 | MatCell.decorators = [
|
---|
| 106 | { type: Directive, args: [{
|
---|
| 107 | selector: 'mat-cell, td[mat-cell]',
|
---|
| 108 | host: {
|
---|
| 109 | 'class': 'mat-cell',
|
---|
| 110 | 'role': 'gridcell',
|
---|
| 111 | },
|
---|
| 112 | },] }
|
---|
| 113 | ];
|
---|
| 114 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC90YWJsZS9jZWxsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVILE9BQU8sRUFBQyxTQUFTLEVBQUUsS0FBSyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQy9DLE9BQU8sRUFDTCxPQUFPLEVBQ1AsVUFBVSxFQUNWLFlBQVksRUFBRSxhQUFhLEVBQUUsZ0JBQWdCLEVBQzdDLGFBQWEsRUFDYixnQkFBZ0IsR0FDakIsTUFBTSxvQkFBb0IsQ0FBQztBQUU1Qjs7O0dBR0c7QUFLSCxNQUFNLE9BQU8sVUFBVyxTQUFRL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