source: trip-planner-front/node_modules/@angular/cdk/table/row.d.ts@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 6.8 KB
Line 
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 */
8import { BooleanInput } from '@angular/cdk/coercion';
9import { IterableChanges, IterableDiffer, IterableDiffers, OnChanges, OnDestroy, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
10import { CanStick, CanStickCtor } from './can-stick';
11import { CdkCellDef, CdkColumnDef } from './cell';
12/**
13 * The row template that can be used by the mat-table. Should not be used outside of the
14 * material library.
15 */
16export declare const CDK_ROW_TEMPLATE = "<ng-container cdkCellOutlet></ng-container>";
17/**
18 * Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs
19 * for changes and notifying the table.
20 */
21export declare abstract class BaseRowDef implements OnChanges {
22 /** @docs-private */ template: TemplateRef<any>;
23 protected _differs: IterableDiffers;
24 /** The columns to be displayed on this row. */
25 columns: Iterable<string>;
26 /** Differ used to check if any changes were made to the columns. */
27 protected _columnsDiffer: IterableDiffer<any>;
28 constructor(
29 /** @docs-private */ template: TemplateRef<any>, _differs: IterableDiffers);
30 ngOnChanges(changes: SimpleChanges): void;
31 /**
32 * Returns the difference between the current columns and the columns from the last diff, or null
33 * if there is no difference.
34 */
35 getColumnsDiff(): IterableChanges<any> | null;
36 /** Gets this row def's relevant cell template from the provided column def. */
37 extractCellTemplate(column: CdkColumnDef): TemplateRef<any>;
38}
39/** @docs-private */
40declare class CdkHeaderRowDefBase extends BaseRowDef {
41}
42declare const _CdkHeaderRowDefBase: CanStickCtor & typeof CdkHeaderRowDefBase;
43/**
44 * Header row definition for the CDK table.
45 * Captures the header row's template and other header properties such as the columns to display.
46 */
47export declare class CdkHeaderRowDef extends _CdkHeaderRowDefBase implements CanStick, OnChanges {
48 _table?: any;
49 constructor(template: TemplateRef<any>, _differs: IterableDiffers, _table?: any);
50 ngOnChanges(changes: SimpleChanges): void;
51 static ngAcceptInputType_sticky: BooleanInput;
52}
53/** @docs-private */
54declare class CdkFooterRowDefBase extends BaseRowDef {
55}
56declare const _CdkFooterRowDefBase: CanStickCtor & typeof CdkFooterRowDefBase;
57/**
58 * Footer row definition for the CDK table.
59 * Captures the footer row's template and other footer properties such as the columns to display.
60 */
61export declare class CdkFooterRowDef extends _CdkFooterRowDefBase implements CanStick, OnChanges {
62 _table?: any;
63 constructor(template: TemplateRef<any>, _differs: IterableDiffers, _table?: any);
64 ngOnChanges(changes: SimpleChanges): void;
65 static ngAcceptInputType_sticky: BooleanInput;
66}
67/**
68 * Data row definition for the CDK table.
69 * Captures the header row's template and other row properties such as the columns to display and
70 * a when predicate that describes when this row should be used.
71 */
72export declare class CdkRowDef<T> extends BaseRowDef {
73 _table?: any;
74 /**
75 * Function that should return true if this row template should be used for the provided index
76 * and row data. If left undefined, this row will be considered the default row template to use
77 * when no other when functions return true for the data.
78 * For every row, there must be at least one when function that passes or an undefined to default.
79 */
80 when: (index: number, rowData: T) => boolean;
81 constructor(template: TemplateRef<any>, _differs: IterableDiffers, _table?: any);
82}
83/** Context provided to the row cells when `multiTemplateDataRows` is false */
84export interface CdkCellOutletRowContext<T> {
85 /** Data for the row that this cell is located within. */
86 $implicit?: T;
87 /** Index of the data object in the provided data array. */
88 index?: number;
89 /** Length of the number of total rows. */
90 count?: number;
91 /** True if this cell is contained in the first row. */
92 first?: boolean;
93 /** True if this cell is contained in the last row. */
94 last?: boolean;
95 /** True if this cell is contained in a row with an even-numbered index. */
96 even?: boolean;
97 /** True if this cell is contained in a row with an odd-numbered index. */
98 odd?: boolean;
99}
100/**
101 * Context provided to the row cells when `multiTemplateDataRows` is true. This context is the same
102 * as CdkCellOutletRowContext except that the single `index` value is replaced by `dataIndex` and
103 * `renderIndex`.
104 */
105export interface CdkCellOutletMultiRowContext<T> {
106 /** Data for the row that this cell is located within. */
107 $implicit?: T;
108 /** Index of the data object in the provided data array. */
109 dataIndex?: number;
110 /** Index location of the rendered row that this cell is located within. */
111 renderIndex?: number;
112 /** Length of the number of total rows. */
113 count?: number;
114 /** True if this cell is contained in the first row. */
115 first?: boolean;
116 /** True if this cell is contained in the last row. */
117 last?: boolean;
118 /** True if this cell is contained in a row with an even-numbered index. */
119 even?: boolean;
120 /** True if this cell is contained in a row with an odd-numbered index. */
121 odd?: boolean;
122}
123/**
124 * Outlet for rendering cells inside of a row or header row.
125 * @docs-private
126 */
127export declare class CdkCellOutlet implements OnDestroy {
128 _viewContainer: ViewContainerRef;
129 /** The ordered list of cells to render within this outlet's view container */
130 cells: CdkCellDef[];
131 /** The data context to be provided to each cell */
132 context: any;
133 /**
134 * Static property containing the latest constructed instance of this class.
135 * Used by the CDK table when each CdkHeaderRow and CdkRow component is created using
136 * createEmbeddedView. After one of these components are created, this property will provide
137 * a handle to provide that component's cells and context. After init, the CdkCellOutlet will
138 * construct the cells with the provided context.
139 */
140 static mostRecentCellOutlet: CdkCellOutlet | null;
141 constructor(_viewContainer: ViewContainerRef);
142 ngOnDestroy(): void;
143}
144/** Header template container that contains the cell outlet. Adds the right class and role. */
145export declare class CdkHeaderRow {
146}
147/** Footer template container that contains the cell outlet. Adds the right class and role. */
148export declare class CdkFooterRow {
149}
150/** Data row template container that contains the cell outlet. Adds the right class and role. */
151export declare class CdkRow {
152}
153/** Row that can be used to display a message when no data is shown in the table. */
154export declare class CdkNoDataRow {
155 templateRef: TemplateRef<any>;
156 constructor(templateRef: TemplateRef<any>);
157}
158export {};
Note: See TracBrowser for help on using the repository browser.