1 | import { AfterContentChecked } from '@angular/core';
|
2 | import { BehaviorSubject } from 'rxjs';
|
3 | import { BooleanInput } from '@angular/cdk/coercion';
|
4 | import { ChangeDetectorRef } from '@angular/core';
|
5 | import { CollectionViewer } from '@angular/cdk/collections';
|
6 | import { DataSource } from '@angular/cdk/collections';
|
7 | import { Direction } from '@angular/cdk/bidi';
|
8 | import { Directionality } from '@angular/cdk/bidi';
|
9 | import { ElementRef } from '@angular/core';
|
10 | import { EventEmitter } from '@angular/core';
|
11 | import * as i0 from '@angular/core';
|
12 | import * as i5 from '@angular/cdk/scrolling';
|
13 | import { InjectionToken } from '@angular/core';
|
14 | import { IterableChanges } from '@angular/core';
|
15 | import { IterableDiffer } from '@angular/core';
|
16 | import { IterableDiffers } from '@angular/core';
|
17 | import { NgZone } from '@angular/core';
|
18 | import { Observable } from 'rxjs';
|
19 | import { OnChanges } from '@angular/core';
|
20 | import { OnDestroy } from '@angular/core';
|
21 | import { OnInit } from '@angular/core';
|
22 | import { Platform } from '@angular/cdk/platform';
|
23 | import { QueryList } from '@angular/core';
|
24 | import { SimpleChanges } from '@angular/core';
|
25 | import { TemplateRef } from '@angular/core';
|
26 | import { TrackByFunction } from '@angular/core';
|
27 | import { ViewContainerRef } from '@angular/core';
|
28 | import { ViewportRuler } from '@angular/cdk/scrolling';
|
29 | import { _ViewRepeater } from '@angular/cdk/collections';
|
30 |
|
31 |
|
32 | export declare class BaseCdkCell {
|
33 | constructor(columnDef: CdkColumnDef, elementRef: ElementRef);
|
34 | }
|
35 |
|
36 | /**
|
37 | * Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs
|
38 | * for changes and notifying the table.
|
39 | */
|
40 | export declare abstract class BaseRowDef implements OnChanges {
|
41 | template: TemplateRef<any>;
|
42 | protected _differs: IterableDiffers;
|
43 |
|
44 | columns: Iterable<string>;
|
45 |
|
46 | protected _columnsDiffer: IterableDiffer<any>;
|
47 | constructor(
|
48 | template: TemplateRef<any>, _differs: IterableDiffers);
|
49 | ngOnChanges(changes: SimpleChanges): void;
|
50 | /**
|
51 | * Returns the difference between the current columns and the columns from the last diff, or null
|
52 | * if there is no difference.
|
53 | */
|
54 | getColumnsDiff(): IterableChanges<any> | null;
|
55 | /** Gets this row def's relevant cell template from the provided column def. */
|
56 | extractCellTemplate(column: CdkColumnDef): TemplateRef<any>;
|
57 | static ɵfac: i0.ɵɵFactoryDeclaration<BaseRowDef, never>;
|
58 | static ɵdir: i0.ɵɵDirectiveDeclaration<BaseRowDef, never, never, {}, {}, never, never, false, never>;
|
59 | }
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 | export declare interface CanStick {
|
68 |
|
69 | sticky: boolean;
|
70 |
|
71 | _hasStickyChanged: boolean;
|
72 |
|
73 | hasStickyChanged(): boolean;
|
74 |
|
75 | resetStickyChanged(): void;
|
76 | }
|
77 |
|
78 |
|
79 | export declare type CanStickCtor = Constructor<CanStick>;
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 | export declare const CDK_ROW_TEMPLATE = "<ng-container cdkCellOutlet></ng-container>";
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 | export declare const CDK_TABLE: InjectionToken<any>;
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 | export declare const CDK_TABLE_TEMPLATE = "\n <ng-content select=\"caption\"></ng-content>\n <ng-content select=\"colgroup, col\"></ng-content>\n <ng-container headerRowOutlet></ng-container>\n <ng-container rowOutlet></ng-container>\n <ng-container noDataRowOutlet></ng-container>\n <ng-container footerRowOutlet></ng-container>\n";
|
99 |
|
100 |
|
101 | export declare class CdkCell extends BaseCdkCell {
|
102 | constructor(columnDef: CdkColumnDef, elementRef: ElementRef);
|
103 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkCell, never>;
|
104 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkCell, "cdk-cell, td[cdk-cell]", never, {}, {}, never, never, false, never>;
|
105 | }
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 | export declare class CdkCellDef implements CellDef {
|
112 | template: TemplateRef<any>;
|
113 | constructor( template: TemplateRef<any>);
|
114 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkCellDef, never>;
|
115 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkCellDef, "[cdkCellDef]", never, {}, {}, never, never, false, never>;
|
116 | }
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 | export declare class CdkCellOutlet implements OnDestroy {
|
123 | _viewContainer: ViewContainerRef;
|
124 |
|
125 | cells: CdkCellDef[];
|
126 |
|
127 | context: any;
|
128 | |
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 | static mostRecentCellOutlet: CdkCellOutlet | null;
|
136 | constructor(_viewContainer: ViewContainerRef);
|
137 | ngOnDestroy(): void;
|
138 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkCellOutlet, never>;
|
139 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkCellOutlet, "[cdkCellOutlet]", never, {}, {}, never, never, false, never>;
|
140 | }
|
141 |
|
142 |
|
143 |
|
144 |
|
145 |
|
146 |
|
147 | export declare interface CdkCellOutletMultiRowContext<T> {
|
148 |
|
149 | $implicit?: T;
|
150 |
|
151 | dataIndex?: number;
|
152 |
|
153 | renderIndex?: number;
|
154 |
|
155 | count?: number;
|
156 |
|
157 | first?: boolean;
|
158 |
|
159 | last?: boolean;
|
160 |
|
161 | even?: boolean;
|
162 |
|
163 | odd?: boolean;
|
164 | }
|
165 |
|
166 |
|
167 | export declare interface CdkCellOutletRowContext<T> {
|
168 |
|
169 | $implicit?: T;
|
170 |
|
171 | index?: number;
|
172 |
|
173 | count?: number;
|
174 |
|
175 | first?: boolean;
|
176 |
|
177 | last?: boolean;
|
178 |
|
179 | even?: boolean;
|
180 |
|
181 | odd?: boolean;
|
182 | }
|
183 |
|
184 |
|
185 |
|
186 |
|
187 |
|
188 | export declare class CdkColumnDef extends _CdkColumnDefBase implements CanStick {
|
189 | _table?: any;
|
190 |
|
191 | get name(): string;
|
192 | set name(name: string);
|
193 | protected _name: string;
|
194 | |
195 |
|
196 |
|
197 |
|
198 |
|
199 | get stickyEnd(): boolean;
|
200 | set stickyEnd(v: BooleanInput);
|
201 | _stickyEnd: boolean;
|
202 |
|
203 | cell: CdkCellDef;
|
204 |
|
205 | headerCell: CdkHeaderCellDef;
|
206 |
|
207 | footerCell: CdkFooterCellDef;
|
208 | |
209 |
|
210 |
|
211 |
|
212 |
|
213 | cssClassFriendlyName: string;
|
214 | |
215 |
|
216 |
|
217 |
|
218 | _columnCssClassName: string[];
|
219 | constructor(_table?: any);
|
220 | /**
|
221 | * Overridable method that sets the css classes that will be added to every cell in this
|
222 | * column.
|
223 | * In the future, columnCssClassName will change from type string[] to string and this
|
224 | * will set a single string value.
|
225 | * @docs-private
|
226 | */
|
227 | protected _updateColumnCssClassName(): void;
|
228 | /**
|
229 | * This has been extracted to a util because of TS 4 and VE.
|
230 | * View Engine doesn't support property rename inheritance.
|
231 | * TS 4.0 doesn't allow properties to override accessors or vice-versa.
|
232 | * @docs-private
|
233 | */
|
234 | protected _setNameInput(value: string): void;
|
235 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkColumnDef, [{ optional: true; }]>;
|
236 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkColumnDef, "[cdkColumnDef]", never, { "sticky": { "alias": "sticky"; "required": false; }; "name": { "alias": "cdkColumnDef"; "required": false; }; "stickyEnd": { "alias": "stickyEnd"; "required": false; }; }, {}, ["cell", "headerCell", "footerCell"], never, false, never>;
|
237 | }
|
238 |
|
239 |
|
240 | declare class CdkColumnDefBase {
|
241 | }
|
242 |
|
243 | declare const _CdkColumnDefBase: CanStickCtor & typeof CdkColumnDefBase;
|
244 |
|
245 |
|
246 | export declare class CdkFooterCell extends BaseCdkCell {
|
247 | constructor(columnDef: CdkColumnDef, elementRef: ElementRef);
|
248 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkFooterCell, never>;
|
249 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkFooterCell, "cdk-footer-cell, td[cdk-footer-cell]", never, {}, {}, never, never, false, never>;
|
250 | }
|
251 |
|
252 |
|
253 |
|
254 |
|
255 |
|
256 | export declare class CdkFooterCellDef implements CellDef {
|
257 | template: TemplateRef<any>;
|
258 | constructor( template: TemplateRef<any>);
|
259 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkFooterCellDef, never>;
|
260 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkFooterCellDef, "[cdkFooterCellDef]", never, {}, {}, never, never, false, never>;
|
261 | }
|
262 |
|
263 |
|
264 | export declare class CdkFooterRow {
|
265 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkFooterRow, never>;
|
266 | static ɵcmp: i0.ɵɵComponentDeclaration<CdkFooterRow, "cdk-footer-row, tr[cdk-footer-row]", never, {}, {}, never, never, false, never>;
|
267 | }
|
268 |
|
269 |
|
270 |
|
271 |
|
272 |
|
273 | export declare class CdkFooterRowDef extends _CdkFooterRowDefBase implements CanStick, OnChanges {
|
274 | _table?: any;
|
275 | constructor(template: TemplateRef<any>, _differs: IterableDiffers, _table?: any);
|
276 | ngOnChanges(changes: SimpleChanges): void;
|
277 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkFooterRowDef, [null, null, { optional: true; }]>;
|
278 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkFooterRowDef, "[cdkFooterRowDef]", never, { "columns": { "alias": "cdkFooterRowDef"; "required": false; }; "sticky": { "alias": "cdkFooterRowDefSticky"; "required": false; }; }, {}, never, never, false, never>;
|
279 | }
|
280 |
|
281 |
|
282 | declare class CdkFooterRowDefBase extends BaseRowDef {
|
283 | }
|
284 |
|
285 | declare const _CdkFooterRowDefBase: CanStickCtor & typeof CdkFooterRowDefBase;
|
286 |
|
287 |
|
288 | export declare class CdkHeaderCell extends BaseCdkCell {
|
289 | constructor(columnDef: CdkColumnDef, elementRef: ElementRef);
|
290 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkHeaderCell, never>;
|
291 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkHeaderCell, "cdk-header-cell, th[cdk-header-cell]", never, {}, {}, never, never, false, never>;
|
292 | }
|
293 |
|
294 |
|
295 |
|
296 |
|
297 |
|
298 | export declare class CdkHeaderCellDef implements CellDef {
|
299 | template: TemplateRef<any>;
|
300 | constructor( template: TemplateRef<any>);
|
301 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkHeaderCellDef, never>;
|
302 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkHeaderCellDef, "[cdkHeaderCellDef]", never, {}, {}, never, never, false, never>;
|
303 | }
|
304 |
|
305 |
|
306 | export declare class CdkHeaderRow {
|
307 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkHeaderRow, never>;
|
308 | static ɵcmp: i0.ɵɵComponentDeclaration<CdkHeaderRow, "cdk-header-row, tr[cdk-header-row]", never, {}, {}, never, never, false, never>;
|
309 | }
|
310 |
|
311 |
|
312 |
|
313 |
|
314 |
|
315 | export declare class CdkHeaderRowDef extends _CdkHeaderRowDefBase implements CanStick, OnChanges {
|
316 | _table?: any;
|
317 | constructor(template: TemplateRef<any>, _differs: IterableDiffers, _table?: any);
|
318 | ngOnChanges(changes: SimpleChanges): void;
|
319 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkHeaderRowDef, [null, null, { optional: true; }]>;
|
320 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkHeaderRowDef, "[cdkHeaderRowDef]", never, { "columns": { "alias": "cdkHeaderRowDef"; "required": false; }; "sticky": { "alias": "cdkHeaderRowDefSticky"; "required": false; }; }, {}, never, never, false, never>;
|
321 | }
|
322 |
|
323 |
|
324 | declare class CdkHeaderRowDefBase extends BaseRowDef {
|
325 | }
|
326 |
|
327 | declare const _CdkHeaderRowDefBase: CanStickCtor & typeof CdkHeaderRowDefBase;
|
328 |
|
329 |
|
330 | export declare class CdkNoDataRow {
|
331 | templateRef: TemplateRef<any>;
|
332 | _contentClassName: string;
|
333 | constructor(templateRef: TemplateRef<any>);
|
334 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkNoDataRow, never>;
|
335 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkNoDataRow, "ng-template[cdkNoDataRow]", never, {}, {}, never, never, false, never>;
|
336 | }
|
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 | export declare class CdkRecycleRows {
|
343 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkRecycleRows, never>;
|
344 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkRecycleRows, "cdk-table[recycleRows], table[cdk-table][recycleRows]", never, {}, {}, never, never, false, never>;
|
345 | }
|
346 |
|
347 |
|
348 | export declare class CdkRow {
|
349 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkRow, never>;
|
350 | static ɵcmp: i0.ɵɵComponentDeclaration<CdkRow, "cdk-row, tr[cdk-row]", never, {}, {}, never, never, false, never>;
|
351 | }
|
352 |
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 | export declare class CdkRowDef<T> extends BaseRowDef {
|
359 | _table?: any;
|
360 | |
361 |
|
362 |
|
363 |
|
364 |
|
365 |
|
366 | when: (index: number, rowData: T) => boolean;
|
367 | constructor(template: TemplateRef<any>, _differs: IterableDiffers, _table?: any);
|
368 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkRowDef<any>, [null, null, { optional: true; }]>;
|
369 | static ɵdir: i0.ɵɵDirectiveDeclaration<CdkRowDef<any>, "[cdkRowDef]", never, { "columns": { "alias": "cdkRowDefColumns"; "required": false; }; "when": { "alias": "cdkRowDefWhen"; "required": false; }; }, {}, never, never, false, never>;
|
370 | }
|
371 |
|
372 |
|
373 |
|
374 |
|
375 |
|
376 |
|
377 |
|
378 | export declare class CdkTable<T> implements AfterContentChecked, CollectionViewer, OnDestroy, OnInit {
|
379 | protected readonly _differs: IterableDiffers;
|
380 | protected readonly _changeDetectorRef: ChangeDetectorRef;
|
381 | protected readonly _elementRef: ElementRef;
|
382 | protected readonly _dir: Directionality;
|
383 | private _platform;
|
384 | protected readonly _viewRepeater: _ViewRepeater<T, RenderRow<T>, RowContext<T>>;
|
385 | protected readonly _coalescedStyleScheduler: _CoalescedStyleScheduler;
|
386 | private readonly _viewportRuler;
|
387 | |
388 |
|
389 |
|
390 |
|
391 | protected readonly _stickyPositioningListener: StickyPositioningListener;
|
392 | |
393 |
|
394 |
|
395 |
|
396 | protected readonly _ngZone?: NgZone | undefined;
|
397 | private _document;
|
398 |
|
399 | protected _data: readonly T[];
|
400 |
|
401 | private readonly _onDestroy;
|
402 |
|
403 | private _renderRows;
|
404 |
|
405 | private _renderChangeSubscription;
|
406 | |
407 |
|
408 |
|
409 |
|
410 |
|
411 | private _columnDefsByName;
|
412 | |
413 |
|
414 |
|
415 |
|
416 | private _rowDefs;
|
417 | |
418 |
|
419 |
|
420 |
|
421 |
|
422 | private _headerRowDefs;
|
423 | |
424 |
|
425 |
|
426 |
|
427 |
|
428 | private _footerRowDefs;
|
429 |
|
430 | private _dataDiffer;
|
431 |
|
432 | private _defaultRowDef;
|
433 | |
434 |
|
435 |
|
436 |
|
437 |
|
438 | private _customColumnDefs;
|
439 | |
440 |
|
441 |
|
442 |
|
443 |
|
444 | private _customRowDefs;
|
445 | |
446 |
|
447 |
|
448 |
|
449 |
|
450 | private _customHeaderRowDefs;
|
451 | |
452 |
|
453 |
|
454 |
|
455 |
|
456 | private _customFooterRowDefs;
|
457 |
|
458 | private _customNoDataRow;
|
459 | |
460 |
|
461 |
|
462 |
|
463 | private _headerRowDefChanged;
|
464 | |
465 |
|
466 |
|
467 |
|
468 | private _footerRowDefChanged;
|
469 | |
470 |
|
471 |
|
472 |
|
473 | private _stickyColumnStylesNeedReset;
|
474 | |
475 |
|
476 |
|
477 |
|
478 |
|
479 | private _forceRecalculateCellWidths;
|
480 | |
481 |
|
482 |
|
483 |
|
484 |
|
485 |
|
486 |
|
487 |
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
|
493 | private _cachedRenderRowsMap;
|
494 |
|
495 | protected _isNativeHtmlTable: boolean;
|
496 | |
497 |
|
498 |
|
499 |
|
500 | private _stickyStyler;
|
501 | |
502 |
|
503 |
|
504 |
|
505 | protected stickyCssClass: string;
|
506 | |
507 |
|
508 |
|
509 |
|
510 |
|
511 | protected needsPositionStickyOnElement: boolean;
|
512 |
|
513 | private _isShowingNoDataRow;
|
514 | |
515 |
|
516 |
|
517 |
|
518 |
|
519 |
|
520 | get trackBy(): TrackByFunction<T>;
|
521 | set trackBy(fn: TrackByFunction<T>);
|
522 | private _trackByFn;
|
523 | |
524 |
|
525 |
|
526 |
|
527 |
|
528 |
|
529 |
|
530 |
|
531 |
|
532 |
|
533 |
|
534 |
|
535 |
|
536 |
|
537 |
|
538 |
|
539 |
|
540 |
|
541 |
|
542 |
|
543 | get dataSource(): CdkTableDataSourceInput<T>;
|
544 | set dataSource(dataSource: CdkTableDataSourceInput<T>);
|
545 | private _dataSource;
|
546 | |
547 |
|
548 |
|
549 |
|
550 |
|
551 |
|
552 | get multiTemplateDataRows(): boolean;
|
553 | set multiTemplateDataRows(v: BooleanInput);
|
554 | _multiTemplateDataRows: boolean;
|
555 | |
556 |
|
557 |
|
558 |
|
559 | get fixedLayout(): boolean;
|
560 | set fixedLayout(v: BooleanInput);
|
561 | private _fixedLayout;
|
562 | |
563 |
|
564 |
|
565 |
|
566 | readonly contentChanged: EventEmitter<void>;
|
567 | |
568 |
|
569 |
|
570 |
|
571 |
|
572 |
|
573 | readonly viewChange: BehaviorSubject<{
|
574 | start: number;
|
575 | end: number;
|
576 | }>;
|
577 | _rowOutlet: DataRowOutlet;
|
578 | _headerRowOutlet: HeaderRowOutlet;
|
579 | _footerRowOutlet: FooterRowOutlet;
|
580 | _noDataRowOutlet: NoDataRowOutlet;
|
581 | |
582 |
|
583 |
|
584 |
|
585 | _contentColumnDefs: QueryList<CdkColumnDef>;
|
586 |
|
587 | _contentRowDefs: QueryList<CdkRowDef<T>>;
|
588 |
|
589 | _contentHeaderRowDefs: QueryList<CdkHeaderRowDef>;
|
590 |
|
591 | _contentFooterRowDefs: QueryList<CdkFooterRowDef>;
|
592 |
|
593 | _noDataRow: CdkNoDataRow;
|
594 | constructor(_differs: IterableDiffers, _changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef, role: string, _dir: Directionality, _document: any, _platform: Platform, _viewRepeater: _ViewRepeater<T, RenderRow<T>, RowContext<T>>, _coalescedStyleScheduler: _CoalescedStyleScheduler, _viewportRuler: ViewportRuler,
|
595 | |
596 |
|
597 |
|
598 |
|
599 | _stickyPositioningListener: StickyPositioningListener,
|
600 | |
601 |
|
602 |
|
603 |
|
604 | _ngZone?: NgZone | undefined);
|
605 | ngOnInit(): void;
|
606 | ngAfterContentChecked(): void;
|
607 | ngOnDestroy(): void;
|
608 | /**
|
609 | * Renders rows based on the table's latest set of data, which was either provided directly as an
|
610 | * input or retrieved through an Observable stream (directly or from a DataSource).
|
611 | * Checks for differences in the data since the last diff to perform only the necessary
|
612 | * changes (add/remove/move rows).
|
613 | *
|
614 | * If the table's data source is a DataSource or Observable, this will be invoked automatically
|
615 | * each time the provided Observable stream emits a new data array. Otherwise if your data is
|
616 | * an array, this function will need to be called to render any changes.
|
617 | */
|
618 | renderRows(): void;
|
619 | /** Adds a column definition that was not included as part of the content children. */
|
620 | addColumnDef(columnDef: CdkColumnDef): void;
|
621 | /** Removes a column definition that was not included as part of the content children. */
|
622 | removeColumnDef(columnDef: CdkColumnDef): void;
|
623 | /** Adds a row definition that was not included as part of the content children. */
|
624 | addRowDef(rowDef: CdkRowDef<T>): void;
|
625 | /** Removes a row definition that was not included as part of the content children. */
|
626 | removeRowDef(rowDef: CdkRowDef<T>): void;
|
627 | /** Adds a header row definition that was not included as part of the content children. */
|
628 | addHeaderRowDef(headerRowDef: CdkHeaderRowDef): void;
|
629 | /** Removes a header row definition that was not included as part of the content children. */
|
630 | removeHeaderRowDef(headerRowDef: CdkHeaderRowDef): void;
|
631 | /** Adds a footer row definition that was not included as part of the content children. */
|
632 | addFooterRowDef(footerRowDef: CdkFooterRowDef): void;
|
633 | /** Removes a footer row definition that was not included as part of the content children. */
|
634 | removeFooterRowDef(footerRowDef: CdkFooterRowDef): void;
|
635 | /** Sets a no data row definition that was not included as a part of the content children. */
|
636 | setNoDataRow(noDataRow: CdkNoDataRow | null): void;
|
637 | /**
|
638 | * Updates the header sticky styles. First resets all applied styles with respect to the cells
|
639 | * sticking to the top. Then, evaluating which cells need to be stuck to the top. This is
|
640 | * automatically called when the header row changes its displayed set of columns, or if its
|
641 | * sticky input changes. May be called manually for cases where the cell content changes outside
|
642 | * of these events.
|
643 | */
|
644 | updateStickyHeaderRowStyles(): void;
|
645 | /**
|
646 | * Updates the footer sticky styles. First resets all applied styles with respect to the cells
|
647 | * sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is
|
648 | * automatically called when the footer row changes its displayed set of columns, or if its
|
649 | * sticky input changes. May be called manually for cases where the cell content changes outside
|
650 | * of these events.
|
651 | */
|
652 | updateStickyFooterRowStyles(): void;
|
653 | /**
|
654 | * Updates the column sticky styles. First resets all applied styles with respect to the cells
|
655 | * sticking to the left and right. Then sticky styles are added for the left and right according
|
656 | * to the column definitions for each cell in each row. This is automatically called when
|
657 | * the data source provides a new set of data or when a column definition changes its sticky
|
658 | * input. May be called manually for cases where the cell content changes outside of these events.
|
659 | */
|
660 | updateStickyColumnStyles(): void;
|
661 | /**
|
662 | * Get the list of RenderRow objects to render according to the current list of data and defined
|
663 | * row definitions. If the previous list already contained a particular pair, it should be reused
|
664 | * so that the differ equates their references.
|
665 | */
|
666 | private _getAllRenderRows;
|
667 | /**
|
668 | * Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that
|
669 | * should be rendered for this data. Reuses the cached RenderRow objects if they match the same
|
670 | * `(T, CdkRowDef)` pair.
|
671 | */
|
672 | private _getRenderRowsForData;
|
673 | /** Update the map containing the content's column definitions. */
|
674 | private _cacheColumnDefs;
|
675 | /** Update the list of all available row definitions that can be used. */
|
676 | private _cacheRowDefs;
|
677 | /**
|
678 | * Check if the header, data, or footer rows have changed what columns they want to display or
|
679 | * whether the sticky states have changed for the header or footer. If there is a diff, then
|
680 | * re-render that section.
|
681 | */
|
682 | private _renderUpdatedColumns;
|
683 | /**
|
684 | * Switch to the provided data source by resetting the data and unsubscribing from the current
|
685 | * render change subscription if one exists. If the data source is null, interpret this by
|
686 | * clearing the row outlet. Otherwise start listening for new data.
|
687 | */
|
688 | private _switchDataSource;
|
689 | /** Set up a subscription for the data provided by the data source. */
|
690 | private _observeRenderChanges;
|
691 | /**
|
692 | * Clears any existing content in the header row outlet and creates a new embedded view
|
693 | * in the outlet using the header row definition.
|
694 | */
|
695 | private _forceRenderHeaderRows;
|
696 | /**
|
697 | * Clears any existing content in the footer row outlet and creates a new embedded view
|
698 | * in the outlet using the footer row definition.
|
699 | */
|
700 | private _forceRenderFooterRows;
|
701 | /** Adds the sticky column styles for the rows according to the columns' stick states. */
|
702 | private _addStickyColumnStyles;
|
703 | /** Gets the list of rows that have been rendered in the row outlet. */
|
704 | _getRenderedRows(rowOutlet: RowOutlet): HTMLElement[];
|
705 | /**
|
706 | * Get the matching row definitions that should be used for this row data. If there is only
|
707 | * one row definition, it is returned. Otherwise, find the row definitions that has a when
|
708 | * predicate that returns true with the data. If none return true, return the default row
|
709 | * definition.
|
710 | */
|
711 | _getRowDefs(data: T, dataIndex: number): CdkRowDef<T>[];
|
712 | private _getEmbeddedViewArgs;
|
713 | /**
|
714 | * Creates a new row template in the outlet and fills it with the set of cell templates.
|
715 | * Optionally takes a context to provide to the row and cells, as well as an optional index
|
716 | * of where to place the new row template in the outlet.
|
717 | */
|
718 | private _renderRow;
|
719 | private _renderCellTemplateForItem;
|
720 | /**
|
721 | * Updates the index-related context for each row to reflect any changes in the index of the rows,
|
722 | * e.g. first/last/even/odd.
|
723 | */
|
724 | private _updateRowIndexContext;
|
725 | /** Gets the column definitions for the provided row def. */
|
726 | private _getCellTemplates;
|
727 | /** Adds native table sections (e.g. tbody) and moves the row outlets into them. */
|
728 | private _applyNativeTableSections;
|
729 | /**
|
730 | * Forces a re-render of the data rows. Should be called in cases where there has been an input
|
731 | * change that affects the evaluation of which rows should be rendered, e.g. toggling
|
732 | * `multiTemplateDataRows` or adding/removing row definitions.
|
733 | */
|
734 | private _forceRenderDataRows;
|
735 | /**
|
736 | * Checks if there has been a change in sticky states since last check and applies the correct
|
737 | * sticky styles. Since checking resets the "dirty" state, this should only be performed once
|
738 | * during a change detection and after the inputs are settled (after content check).
|
739 | */
|
740 | private _checkStickyStates;
|
741 | /**
|
742 | * Creates the sticky styler that will be used for sticky rows and columns. Listens
|
743 | * for directionality changes and provides the latest direction to the styler. Re-applies column
|
744 | * stickiness when directionality changes.
|
745 | */
|
746 | private _setupStickyStyler;
|
747 | /** Filters definitions that belong to this table from a QueryList. */
|
748 | private _getOwnDefs;
|
749 | /** Creates or removes the no data row, depending on whether any data is being shown. */
|
750 | private _updateNoDataRow;
|
751 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkTable<any>, [null, null, null, { attribute: "role"; }, { optional: true; }, null, null, null, null, null, { optional: true; skipSelf: true; }, { optional: true; }]>;
|
752 | static ɵcmp: i0.ɵɵComponentDeclaration<CdkTable<any>, "cdk-table, table[cdk-table]", ["cdkTable"], { "trackBy": { "alias": "trackBy"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "multiTemplateDataRows": { "alias": "multiTemplateDataRows"; "required": false; }; "fixedLayout": { "alias": "fixedLayout"; "required": false; }; }, { "contentChanged": "contentChanged"; }, ["_noDataRow", "_contentColumnDefs", "_contentRowDefs", "_contentHeaderRowDefs", "_contentFooterRowDefs"], ["caption", "colgroup, col"], false, never>;
|
753 | }
|
754 |
|
755 |
|
756 | export declare type CdkTableDataSourceInput<T> = readonly T[] | DataSource<T> | Observable<readonly T[]>;
|
757 |
|
758 | export declare class CdkTableModule {
|
759 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkTableModule, never>;
|
760 | static ɵmod: i0.ɵɵNgModuleDeclaration<CdkTableModule, [typeof i1.CdkTable, typeof i2.CdkRowDef, typeof i3.CdkCellDef, typeof i2.CdkCellOutlet, typeof i3.CdkHeaderCellDef, typeof i3.CdkFooterCellDef, typeof i3.CdkColumnDef, typeof i3.CdkCell, typeof i2.CdkRow, typeof i3.CdkHeaderCell, typeof i3.CdkFooterCell, typeof i2.CdkHeaderRow, typeof i2.CdkHeaderRowDef, typeof i2.CdkFooterRow, typeof i2.CdkFooterRowDef, typeof i1.DataRowOutlet, typeof i1.HeaderRowOutlet, typeof i1.FooterRowOutlet, typeof i4.CdkTextColumn, typeof i2.CdkNoDataRow, typeof i1.CdkRecycleRows, typeof i1.NoDataRowOutlet], [typeof i5.ScrollingModule], [typeof i1.CdkTable, typeof i2.CdkRowDef, typeof i3.CdkCellDef, typeof i2.CdkCellOutlet, typeof i3.CdkHeaderCellDef, typeof i3.CdkFooterCellDef, typeof i3.CdkColumnDef, typeof i3.CdkCell, typeof i2.CdkRow, typeof i3.CdkHeaderCell, typeof i3.CdkFooterCell, typeof i2.CdkHeaderRow, typeof i2.CdkHeaderRowDef, typeof i2.CdkFooterRow, typeof i2.CdkFooterRowDef, typeof i1.DataRowOutlet, typeof i1.HeaderRowOutlet, typeof i1.FooterRowOutlet, typeof i4.CdkTextColumn, typeof i2.CdkNoDataRow, typeof i1.CdkRecycleRows, typeof i1.NoDataRowOutlet]>;
|
761 | static ɵinj: i0.ɵɵInjectorDeclaration<CdkTableModule>;
|
762 | }
|
763 |
|
764 |
|
765 |
|
766 |
|
767 |
|
768 |
|
769 |
|
770 |
|
771 |
|
772 |
|
773 | export declare class CdkTextColumn<T> implements OnDestroy, OnInit {
|
774 | private _table;
|
775 | private _options;
|
776 |
|
777 | get name(): string;
|
778 | set name(name: string);
|
779 | _name: string;
|
780 | |
781 |
|
782 |
|
783 |
|
784 | headerText: string;
|
785 | |
786 |
|
787 |
|
788 |
|
789 |
|
790 |
|
791 | dataAccessor: (data: T, name: string) => string;
|
792 |
|
793 | justify: 'start' | 'end' | 'center';
|
794 |
|
795 | columnDef: CdkColumnDef;
|
796 | |
797 |
|
798 |
|
799 |
|
800 |
|
801 |
|
802 |
|
803 | cell: CdkCellDef;
|
804 | |
805 |
|
806 |
|
807 |
|
808 |
|
809 |
|
810 |
|
811 | headerCell: CdkHeaderCellDef;
|
812 | constructor(_table: CdkTable<T>, _options: TextColumnOptions<T>);
|
813 | ngOnInit(): void;
|
814 | ngOnDestroy(): void;
|
815 | /**
|
816 | * Creates a default header text. Use the options' header text transformation function if one
|
817 | * has been provided. Otherwise simply capitalize the column name.
|
818 | */
|
819 | _createDefaultHeaderText(): string;
|
820 | /** Synchronizes the column definition name with the text column name. */
|
821 | private _syncColumnDefName;
|
822 | static ɵfac: i0.ɵɵFactoryDeclaration<CdkTextColumn<any>, [{ optional: true; }, { optional: true; }]>;
|
823 | static ɵcmp: i0.ɵɵComponentDeclaration<CdkTextColumn<any>, "cdk-text-column", never, { "name": { "alias": "name"; "required": false; }; "headerText": { "alias": "headerText"; "required": false; }; "dataAccessor": { "alias": "dataAccessor"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; }, {}, never, never, false, never>;
|
824 | }
|
825 |
|
826 |
|
827 | export declare interface CellDef {
|
828 | template: TemplateRef<any>;
|
829 | }
|
830 |
|
831 |
|
832 | export declare const _COALESCED_STYLE_SCHEDULER: InjectionToken<_CoalescedStyleScheduler>;
|
833 |
|
834 |
|
835 |
|
836 |
|
837 |
|
838 |
|
839 |
|
840 |
|
841 | export declare class _CoalescedStyleScheduler implements OnDestroy {
|
842 | private readonly _ngZone;
|
843 | private _currentSchedule;
|
844 | private readonly _destroyed;
|
845 | constructor(_ngZone: NgZone);
|
846 | /**
|
847 | * Schedules the specified task to run at the end of the current VM turn.
|
848 | */
|
849 | schedule(task: () => unknown): void;
|
850 | /**
|
851 | * Schedules the specified task to run after other scheduled tasks at the end of the current
|
852 | * VM turn.
|
853 | */
|
854 | scheduleEnd(task: () => unknown): void;
|
855 | /** Prevent any further tasks from running. */
|
856 | ngOnDestroy(): void;
|
857 | private _createScheduleIfNeeded;
|
858 | private _getScheduleObservable;
|
859 | static ɵfac: i0.ɵɵFactoryDeclaration<_CoalescedStyleScheduler, never>;
|
860 | static ɵprov: i0.ɵɵInjectableDeclaration<_CoalescedStyleScheduler>;
|
861 | }
|
862 |
|
863 |
|
864 | /** @docs-private */
|
865 | export declare type Constructor<T> = new (...args: any[]) => T;
|
866 |
|
867 | /**
|
868 | * Provides a handle for the table to grab the view container's ng-container to insert data rows.
|
869 | * @docs-private
|
870 | */
|
871 | export declare class DataRowOutlet implements RowOutlet {
|
872 | viewContainer: ViewContainerRef;
|
873 | elementRef: ElementRef;
|
874 | constructor(viewContainer: ViewContainerRef, elementRef: ElementRef);
|
875 | static ɵfac: i0.ɵɵFactoryDeclaration<DataRowOutlet, never>;
|
876 | static ɵdir: i0.ɵɵDirectiveDeclaration<DataRowOutlet, "[rowOutlet]", never, {}, {}, never, never, false, never>;
|
877 | }
|
878 |
|
879 | export { DataSource }
|
880 |
|
881 |
|
882 |
|
883 |
|
884 |
|
885 | export declare class FooterRowOutlet implements RowOutlet {
|
886 | viewContainer: ViewContainerRef;
|
887 | elementRef: ElementRef;
|
888 | constructor(viewContainer: ViewContainerRef, elementRef: ElementRef);
|
889 | static ɵfac: i0.ɵɵFactoryDeclaration<FooterRowOutlet, never>;
|
890 | static ɵdir: i0.ɵɵDirectiveDeclaration<FooterRowOutlet, "[footerRowOutlet]", never, {}, {}, never, never, false, never>;
|
891 | }
|
892 |
|
893 |
|
894 |
|
895 |
|
896 |
|
897 | export declare class HeaderRowOutlet implements RowOutlet {
|
898 | viewContainer: ViewContainerRef;
|
899 | elementRef: ElementRef;
|
900 | constructor(viewContainer: ViewContainerRef, elementRef: ElementRef);
|
901 | static ɵfac: i0.ɵɵFactoryDeclaration<HeaderRowOutlet, never>;
|
902 | static ɵdir: i0.ɵɵDirectiveDeclaration<HeaderRowOutlet, "[headerRowOutlet]", never, {}, {}, never, never, false, never>;
|
903 | }
|
904 |
|
905 | declare namespace i1 {
|
906 | export {
|
907 | CdkRecycleRows,
|
908 | RowOutlet,
|
909 | CdkTableDataSourceInput,
|
910 | DataRowOutlet,
|
911 | HeaderRowOutlet,
|
912 | FooterRowOutlet,
|
913 | NoDataRowOutlet,
|
914 | CDK_TABLE_TEMPLATE,
|
915 | RowContext,
|
916 | RenderRow,
|
917 | CdkTable
|
918 | }
|
919 | }
|
920 |
|
921 | declare namespace i2 {
|
922 | export {
|
923 | CDK_ROW_TEMPLATE,
|
924 | BaseRowDef,
|
925 | CdkHeaderRowDef,
|
926 | CdkFooterRowDef,
|
927 | CdkRowDef,
|
928 | CdkCellOutletRowContext,
|
929 | CdkCellOutletMultiRowContext,
|
930 | CdkCellOutlet,
|
931 | CdkHeaderRow,
|
932 | CdkFooterRow,
|
933 | CdkRow,
|
934 | CdkNoDataRow
|
935 | }
|
936 | }
|
937 |
|
938 | declare namespace i3 {
|
939 | export {
|
940 | CellDef,
|
941 | CdkCellDef,
|
942 | CdkHeaderCellDef,
|
943 | CdkFooterCellDef,
|
944 | CdkColumnDef,
|
945 | BaseCdkCell,
|
946 | CdkHeaderCell,
|
947 | CdkFooterCell,
|
948 | CdkCell
|
949 | }
|
950 | }
|
951 |
|
952 | declare namespace i4 {
|
953 | export {
|
954 | CdkTextColumn
|
955 | }
|
956 | }
|
957 |
|
958 |
|
959 |
|
960 |
|
961 |
|
962 |
|
963 |
|
964 | export declare function mixinHasStickyInput<T extends Constructor<{}>>(base: T): CanStickCtor & T;
|
965 |
|
966 |
|
967 |
|
968 |
|
969 |
|
970 |
|
971 | export declare class NoDataRowOutlet implements RowOutlet {
|
972 | viewContainer: ViewContainerRef;
|
973 | elementRef: ElementRef;
|
974 | constructor(viewContainer: ViewContainerRef, elementRef: ElementRef);
|
975 | static ɵfac: i0.ɵɵFactoryDeclaration<NoDataRowOutlet, never>;
|
976 | static ɵdir: i0.ɵɵDirectiveDeclaration<NoDataRowOutlet, "[noDataRowOutlet]", never, {}, {}, never, never, false, never>;
|
977 | }
|
978 |
|
979 |
|
980 |
|
981 |
|
982 |
|
983 |
|
984 |
|
985 |
|
986 |
|
987 |
|
988 |
|
989 |
|
990 |
|
991 |
|
992 | export declare interface RenderRow<T> {
|
993 | data: T;
|
994 | dataIndex: number;
|
995 | rowDef: CdkRowDef<T>;
|
996 | }
|
997 |
|
998 |
|
999 |
|
1000 |
|
1001 |
|
1002 | export declare interface RowContext<T> extends CdkCellOutletMultiRowContext<T>, CdkCellOutletRowContext<T> {
|
1003 | }
|
1004 |
|
1005 |
|
1006 | export declare interface RowOutlet {
|
1007 | viewContainer: ViewContainerRef;
|
1008 | }
|
1009 |
|
1010 |
|
1011 |
|
1012 |
|
1013 | export declare class _Schedule {
|
1014 | tasks: (() => unknown)[];
|
1015 | endTasks: (() => unknown)[];
|
1016 | }
|
1017 |
|
1018 | /**
|
1019 | * List of all possible directions that can be used for sticky positioning.
|
1020 | * @docs-private
|
1021 | */
|
1022 | export declare const STICKY_DIRECTIONS: StickyDirection[];
|
1023 |
|
1024 | /** The injection token used to specify the StickyPositioningListener. */
|
1025 | export declare const STICKY_POSITIONING_LISTENER: InjectionToken<StickyPositioningListener>;
|
1026 |
|
1027 | export declare type StickyDirection = 'top' | 'bottom' | 'left' | 'right';
|
1028 |
|
1029 | export declare type StickyOffset = number | null | undefined;
|
1030 |
|
1031 | /**
|
1032 | * If provided, CdkTable will call the methods below when it updates the size/
|
1033 | * position/etc of its sticky rows and columns.
|
1034 | */
|
1035 | export declare interface StickyPositioningListener {
|
1036 | /** Called when CdkTable updates its sticky start columns. */
|
1037 | stickyColumnsUpdated(update: StickyUpdate): void;
|
1038 | /** Called when CdkTable updates its sticky end columns. */
|
1039 | stickyEndColumnsUpdated(update: StickyUpdate): void;
|
1040 | /** Called when CdkTable updates its sticky header rows. */
|
1041 | stickyHeaderRowsUpdated(update: StickyUpdate): void;
|
1042 | /** Called when CdkTable updates its sticky footer rows. */
|
1043 | stickyFooterRowsUpdated(update: StickyUpdate): void;
|
1044 | }
|
1045 |
|
1046 | export declare type StickySize = number | null | undefined;
|
1047 |
|
1048 | /**
|
1049 | * Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells.
|
1050 | * @docs-private
|
1051 | */
|
1052 | export declare class StickyStyler {
|
1053 | private _isNativeHtmlTable;
|
1054 | private _stickCellCss;
|
1055 | direction: Direction;
|
1056 | private _coalescedStyleScheduler;
|
1057 | private _isBrowser;
|
1058 | private readonly _needsPositionStickyOnElement;
|
1059 | private readonly _positionListener?;
|
1060 | private _cachedCellWidths;
|
1061 | private readonly _borderCellCss;
|
1062 | /**
|
1063 | * @param _isNativeHtmlTable Whether the sticky logic should be based on a table
|
1064 | * that uses the native `<table>` element.
|
1065 | * @param _stickCellCss The CSS class that will be applied to every row/cell that has
|
1066 | * sticky positioning applied.
|
1067 | * @param direction The directionality context of the table (ltr/rtl); affects column positioning
|
1068 | * by reversing left/right positions.
|
1069 | * @param _isBrowser Whether the table is currently being rendered on the server or the client.
|
1070 | * @param _needsPositionStickyOnElement Whether we need to specify position: sticky on cells
|
1071 | * using inline styles. If false, it is assumed that position: sticky is included in
|
1072 | * the component stylesheet for _stickCellCss.
|
1073 | * @param _positionListener A listener that is notified of changes to sticky rows/columns
|
1074 | * and their dimensions.
|
1075 | */
|
1076 | constructor(_isNativeHtmlTable: boolean, _stickCellCss: string, direction: Direction, _coalescedStyleScheduler: _CoalescedStyleScheduler, _isBrowser?: boolean, _needsPositionStickyOnElement?: boolean, _positionListener?: StickyPositioningListener | undefined);
|
1077 | /**
|
1078 | * Clears the sticky positioning styles from the row and its cells by resetting the `position`
|
1079 | * style, setting the zIndex to 0, and unsetting each provided sticky direction.
|
1080 | * @param rows The list of rows that should be cleared from sticking in the provided directions
|
1081 | * @param stickyDirections The directions that should no longer be set as sticky on the rows.
|
1082 | */
|
1083 | clearStickyPositioning(rows: HTMLElement[], stickyDirections: StickyDirection[]): void;
|
1084 | /**
|
1085 | * Applies sticky left and right positions to the cells of each row according to the sticky
|
1086 | * states of the rendered column definitions.
|
1087 | * @param rows The rows that should have its set of cells stuck according to the sticky states.
|
1088 | * @param stickyStartStates A list of boolean states where each state represents whether the cell
|
1089 | * in this index position should be stuck to the start of the row.
|
1090 | * @param stickyEndStates A list of boolean states where each state represents whether the cell
|
1091 | * in this index position should be stuck to the end of the row.
|
1092 | * @param recalculateCellWidths Whether the sticky styler should recalculate the width of each
|
1093 | * column cell. If `false` cached widths will be used instead.
|
1094 | */
|
1095 | updateStickyColumns(rows: HTMLElement[], stickyStartStates: boolean[], stickyEndStates: boolean[], recalculateCellWidths?: boolean): void;
|
1096 | /**
|
1097 | * Applies sticky positioning to the row's cells if using the native table layout, and to the
|
1098 | * row itself otherwise.
|
1099 | * @param rowsToStick The list of rows that should be stuck according to their corresponding
|
1100 | * sticky state and to the provided top or bottom position.
|
1101 | * @param stickyStates A list of boolean states where each state represents whether the row
|
1102 | * should be stuck in the particular top or bottom position.
|
1103 | * @param position The position direction in which the row should be stuck if that row should be
|
1104 | * sticky.
|
1105 | *
|
1106 | */
|
1107 | stickRows(rowsToStick: HTMLElement[], stickyStates: boolean[], position: 'top' | 'bottom'): void;
|
1108 | /**
|
1109 | * When using the native table in Safari, sticky footer cells do not stick. The only way to stick
|
1110 | * footer rows is to apply sticky styling to the tfoot container. This should only be done if
|
1111 | * all footer rows are sticky. If not all footer rows are sticky, remove sticky positioning from
|
1112 | * the tfoot element.
|
1113 | */
|
1114 | updateStickyFooterContainer(tableElement: Element, stickyStates: boolean[]): void;
|
1115 | /**
|
1116 | * Removes the sticky style on the element by removing the sticky cell CSS class, re-evaluating
|
1117 | * the zIndex, removing each of the provided sticky directions, and removing the
|
1118 | * sticky position if there are no more directions.
|
1119 | */
|
1120 | _removeStickyStyle(element: HTMLElement, stickyDirections: StickyDirection[]): void;
|
1121 | /**
|
1122 | * Adds the sticky styling to the element by adding the sticky style class, changing position
|
1123 | * to be sticky (and -webkit-sticky), setting the appropriate zIndex, and adding a sticky
|
1124 | * direction and value.
|
1125 | */
|
1126 | _addStickyStyle(element: HTMLElement, dir: StickyDirection, dirValue: number, isBorderElement: boolean): void;
|
1127 | /**
|
1128 | * Calculate what the z-index should be for the element, depending on what directions (top,
|
1129 | * bottom, left, right) have been set. It should be true that elements with a top direction
|
1130 | * should have the highest index since these are elements like a table header. If any of those
|
1131 | * elements are also sticky in another direction, then they should appear above other elements
|
1132 | * that are only sticky top (e.g. a sticky column on a sticky header). Bottom-sticky elements
|
1133 | * (e.g. footer rows) should then be next in the ordering such that they are below the header
|
1134 | * but above any non-sticky elements. Finally, left/right sticky elements (e.g. sticky columns)
|
1135 | * should minimally increment so that they are above non-sticky elements but below top and bottom
|
1136 | * elements.
|
1137 | */
|
1138 | _getCalculatedZIndex(element: HTMLElement): string;
|
1139 | /** Gets the widths for each cell in the provided row. */
|
1140 | _getCellWidths(row: HTMLElement, recalculateCellWidths?: boolean): number[];
|
1141 | /**
|
1142 | * Determines the left and right positions of each sticky column cell, which will be the
|
1143 | * accumulation of all sticky column cell widths to the left and right, respectively.
|
1144 | * Non-sticky cells do not need to have a value set since their positions will not be applied.
|
1145 | */
|
1146 | _getStickyStartColumnPositions(widths: number[], stickyStates: boolean[]): number[];
|
1147 | /**
|
1148 | * Determines the left and right positions of each sticky column cell, which will be the
|
1149 | * accumulation of all sticky column cell widths to the left and right, respectively.
|
1150 | * Non-sticky cells do not need to have a value set since their positions will not be applied.
|
1151 | */
|
1152 | _getStickyEndColumnPositions(widths: number[], stickyStates: boolean[]): number[];
|
1153 | }
|
1154 |
|
1155 | export declare interface StickyUpdate {
|
1156 | elements?: readonly (HTMLElement[] | undefined)[];
|
1157 | offsets?: StickyOffset[];
|
1158 | sizes: StickySize[];
|
1159 | }
|
1160 |
|
1161 | /** Injection token that can be used to specify the text column options. */
|
1162 | export declare const TEXT_COLUMN_OPTIONS: InjectionToken<TextColumnOptions<any>>;
|
1163 |
|
1164 | /** Configurable options for `CdkTextColumn`. */
|
1165 | export declare interface TextColumnOptions<T> {
|
1166 | /**
|
1167 | * Default function that provides the header text based on the column name if a header
|
1168 | * text is not provided.
|
1169 | */
|
1170 | defaultHeaderTextTransform?: (name: string) => string;
|
1171 |
|
1172 | defaultDataAccessor?: (data: T, name: string) => string;
|
1173 | }
|
1174 |
|
1175 | export { }
|