cell.d.ts 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 { ElementRef, TemplateRef } from '@angular/core';
  9. import { CanStick, CanStickCtor } from './can-stick';
  10. /** Base interface for a cell definition. Captures a column's cell template definition. */
  11. export interface CellDef {
  12. template: TemplateRef<any>;
  13. }
  14. /**
  15. * Cell definition for a CDK table.
  16. * Captures the template of a column's data row cell as well as cell-specific properties.
  17. */
  18. export declare class CdkCellDef implements CellDef {
  19. template: TemplateRef<any>;
  20. constructor(/** @docs-private */ template: TemplateRef<any>);
  21. }
  22. /**
  23. * Header cell definition for a CDK table.
  24. * Captures the template of a column's header cell and as well as cell-specific properties.
  25. */
  26. export declare class CdkHeaderCellDef implements CellDef {
  27. template: TemplateRef<any>;
  28. constructor(/** @docs-private */ template: TemplateRef<any>);
  29. }
  30. /**
  31. * Footer cell definition for a CDK table.
  32. * Captures the template of a column's footer cell and as well as cell-specific properties.
  33. */
  34. export declare class CdkFooterCellDef implements CellDef {
  35. template: TemplateRef<any>;
  36. constructor(/** @docs-private */ template: TemplateRef<any>);
  37. }
  38. /** @docs-private */
  39. declare class CdkColumnDefBase {
  40. }
  41. declare const _CdkColumnDefBase: CanStickCtor & typeof CdkColumnDefBase;
  42. /**
  43. * Column definition for the CDK table.
  44. * Defines a set of cells available for a table column.
  45. */
  46. export declare class CdkColumnDef extends _CdkColumnDefBase implements CanStick {
  47. /** Unique name for this column. */
  48. name: string;
  49. _name: string;
  50. /**
  51. * Whether this column should be sticky positioned on the end of the row. Should make sure
  52. * that it mimics the `CanStick` mixin such that `_hasStickyChanged` is set to true if the value
  53. * has been changed.
  54. */
  55. stickyEnd: boolean;
  56. _stickyEnd: boolean;
  57. /** @docs-private */
  58. cell: CdkCellDef;
  59. /** @docs-private */
  60. headerCell: CdkHeaderCellDef;
  61. /** @docs-private */
  62. footerCell: CdkFooterCellDef;
  63. /**
  64. * Transformed version of the column name that can be used as part of a CSS classname. Excludes
  65. * all non-alphanumeric characters and the special characters '-' and '_'. Any characters that
  66. * do not match are replaced by the '-' character.
  67. */
  68. cssClassFriendlyName: string;
  69. }
  70. /** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */
  71. export declare class BaseCdkCell {
  72. constructor(columnDef: CdkColumnDef, elementRef: ElementRef);
  73. }
  74. /** Header cell template container that adds the right classes and role. */
  75. export declare class CdkHeaderCell extends BaseCdkCell {
  76. constructor(columnDef: CdkColumnDef, elementRef: ElementRef);
  77. }
  78. /** Footer cell template container that adds the right classes and role. */
  79. export declare class CdkFooterCell extends BaseCdkCell {
  80. constructor(columnDef: CdkColumnDef, elementRef: ElementRef);
  81. }
  82. /** Cell template container that adds the right classes and role. */
  83. export declare class CdkCell extends BaseCdkCell {
  84. constructor(columnDef: CdkColumnDef, elementRef: ElementRef);
  85. }
  86. export {};