source: trip-planner-front/node_modules/@angular/cdk/esm2015/table/table.js@ bdd6491

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

initial commit

  • Property mode set to 100644
File size: 147.2 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 { Directionality } from '@angular/cdk/bidi';
9import { coerceBooleanProperty } from '@angular/cdk/coercion';
10import { _DisposeViewRepeaterStrategy, _RecycleViewRepeaterStrategy, isDataSource, _VIEW_REPEATER_STRATEGY, } from '@angular/cdk/collections';
11import { Platform } from '@angular/cdk/platform';
12import { ViewportRuler } from '@angular/cdk/scrolling';
13import { DOCUMENT } from '@angular/common';
14import { Attribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ContentChildren, Directive, ElementRef, EmbeddedViewRef, EventEmitter, Inject, Input, IterableDiffers, Optional, Output, QueryList, SkipSelf, ViewChild, ViewContainerRef, ViewEncapsulation, } from '@angular/core';
15import { BehaviorSubject, isObservable, of as observableOf, Subject, } from 'rxjs';
16import { takeUntil } from 'rxjs/operators';
17import { CdkColumnDef } from './cell';
18import { _CoalescedStyleScheduler, _COALESCED_STYLE_SCHEDULER } from './coalesced-style-scheduler';
19import { CdkCellOutlet, CdkFooterRowDef, CdkHeaderRowDef, CdkNoDataRow, CdkRowDef } from './row';
20import { StickyStyler } from './sticky-styler';
21import { getTableDuplicateColumnNameError, getTableMissingMatchingRowDefError, getTableMissingRowDefsError, getTableMultipleDefaultRowDefsError, getTableUnknownColumnError, getTableUnknownDataSourceError } from './table-errors';
22import { STICKY_POSITIONING_LISTENER } from './sticky-position-listener';
23import { CDK_TABLE } from './tokens';
24/**
25 * Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with
26 * tables that animate rows.
27 */
28export class CdkRecycleRows {
29}
30CdkRecycleRows.decorators = [
31 { type: Directive, args: [{
32 selector: 'cdk-table[recycleRows], table[cdk-table][recycleRows]',
33 providers: [
34 { provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy },
35 ],
36 },] }
37];
38/**
39 * Provides a handle for the table to grab the view container's ng-container to insert data rows.
40 * @docs-private
41 */
42export class DataRowOutlet {
43 constructor(viewContainer, elementRef) {
44 this.viewContainer = viewContainer;
45 this.elementRef = elementRef;
46 }
47}
48DataRowOutlet.decorators = [
49 { type: Directive, args: [{ selector: '[rowOutlet]' },] }
50];
51DataRowOutlet.ctorParameters = () => [
52 { type: ViewContainerRef },
53 { type: ElementRef }
54];
55/**
56 * Provides a handle for the table to grab the view container's ng-container to insert the header.
57 * @docs-private
58 */
59export class HeaderRowOutlet {
60 constructor(viewContainer, elementRef) {
61 this.viewContainer = viewContainer;
62 this.elementRef = elementRef;
63 }
64}
65HeaderRowOutlet.decorators = [
66 { type: Directive, args: [{ selector: '[headerRowOutlet]' },] }
67];
68HeaderRowOutlet.ctorParameters = () => [
69 { type: ViewContainerRef },
70 { type: ElementRef }
71];
72/**
73 * Provides a handle for the table to grab the view container's ng-container to insert the footer.
74 * @docs-private
75 */
76export class FooterRowOutlet {
77 constructor(viewContainer, elementRef) {
78 this.viewContainer = viewContainer;
79 this.elementRef = elementRef;
80 }
81}
82FooterRowOutlet.decorators = [
83 { type: Directive, args: [{ selector: '[footerRowOutlet]' },] }
84];
85FooterRowOutlet.ctorParameters = () => [
86 { type: ViewContainerRef },
87 { type: ElementRef }
88];
89/**
90 * Provides a handle for the table to grab the view
91 * container's ng-container to insert the no data row.
92 * @docs-private
93 */
94export class NoDataRowOutlet {
95 constructor(viewContainer, elementRef) {
96 this.viewContainer = viewContainer;
97 this.elementRef = elementRef;
98 }
99}
100NoDataRowOutlet.decorators = [
101 { type: Directive, args: [{ selector: '[noDataRowOutlet]' },] }
102];
103NoDataRowOutlet.ctorParameters = () => [
104 { type: ViewContainerRef },
105 { type: ElementRef }
106];
107/**
108 * The table template that can be used by the mat-table. Should not be used outside of the
109 * material library.
110 * @docs-private
111 */
112export const CDK_TABLE_TEMPLATE =
113// Note that according to MDN, the `caption` element has to be projected as the **first**
114// element in the table. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption
115`
116 <ng-content select="caption"></ng-content>
117 <ng-content select="colgroup, col"></ng-content>
118 <ng-container headerRowOutlet></ng-container>
119 <ng-container rowOutlet></ng-container>
120 <ng-container noDataRowOutlet></ng-container>
121 <ng-container footerRowOutlet></ng-container>
122`;
123/**
124 * Class used to conveniently type the embedded view ref for rows with a context.
125 * @docs-private
126 */
127class RowViewRef extends EmbeddedViewRef {
128}
129/**
130 * A data table that can render a header row, data rows, and a footer row.
131 * Uses the dataSource input to determine the data to be rendered. The data can be provided either
132 * as a data array, an Observable stream that emits the data array to render, or a DataSource with a
133 * connect function that will return an Observable stream that emits the data array to render.
134 */
135export class CdkTable {
136 constructor(_differs, _changeDetectorRef, _elementRef, role, _dir, _document, _platform, _viewRepeater, _coalescedStyleScheduler, _viewportRuler,
137 /**
138 * @deprecated `_stickyPositioningListener` parameter to become required.
139 * @breaking-change 13.0.0
140 */
141 _stickyPositioningListener) {
142 this._differs = _differs;
143 this._changeDetectorRef = _changeDetectorRef;
144 this._elementRef = _elementRef;
145 this._dir = _dir;
146 this._platform = _platform;
147 this._viewRepeater = _viewRepeater;
148 this._coalescedStyleScheduler = _coalescedStyleScheduler;
149 this._viewportRuler = _viewportRuler;
150 this._stickyPositioningListener = _stickyPositioningListener;
151 /** Subject that emits when the component has been destroyed. */
152 this._onDestroy = new Subject();
153 /**
154 * Map of all the user's defined columns (header, data, and footer cell template) identified by
155 * name. Collection populated by the column definitions gathered by `ContentChildren` as well as
156 * any custom column definitions added to `_customColumnDefs`.
157 */
158 this._columnDefsByName = new Map();
159 /**
160 * Column definitions that were defined outside of the direct content children of the table.
161 * These will be defined when, e.g., creating a wrapper around the cdkTable that has
162 * column definitions as *its* content child.
163 */
164 this._customColumnDefs = new Set();
165 /**
166 * Data row definitions that were defined outside of the direct content children of the table.
167 * These will be defined when, e.g., creating a wrapper around the cdkTable that has
168 * built-in data rows as *its* content child.
169 */
170 this._customRowDefs = new Set();
171 /**
172 * Header row definitions that were defined outside of the direct content children of the table.
173 * These will be defined when, e.g., creating a wrapper around the cdkTable that has
174 * built-in header rows as *its* content child.
175 */
176 this._customHeaderRowDefs = new Set();
177 /**
178 * Footer row definitions that were defined outside of the direct content children of the table.
179 * These will be defined when, e.g., creating a wrapper around the cdkTable that has a
180 * built-in footer row as *its* content child.
181 */
182 this._customFooterRowDefs = new Set();
183 /**
184 * Whether the header row definition has been changed. Triggers an update to the header row after
185 * content is checked. Initialized as true so that the table renders the initial set of rows.
186 */
187 this._headerRowDefChanged = true;
188 /**
189 * Whether the footer row definition has been changed. Triggers an update to the footer row after
190 * content is checked. Initialized as true so that the table renders the initial set of rows.
191 */
192 this._footerRowDefChanged = true;
193 /**
194 * Whether the sticky column styles need to be updated. Set to `true` when the visible columns
195 * change.
196 */
197 this._stickyColumnStylesNeedReset = true;
198 /**
199 * Whether the sticky styler should recalculate cell widths when applying sticky styles. If
200 * `false`, cached values will be used instead. This is only applicable to tables with
201 * {@link fixedLayout} enabled. For other tables, cell widths will always be recalculated.
202 */
203 this._forceRecalculateCellWidths = true;
204 /**
205 * Cache of the latest rendered `RenderRow` objects as a map for easy retrieval when constructing
206 * a new list of `RenderRow` objects for rendering rows. Since the new list is constructed with
207 * the cached `RenderRow` objects when possible, the row identity is preserved when the data
208 * and row template matches, which allows the `IterableDiffer` to check rows by reference
209 * and understand which rows are added/moved/removed.
210 *
211 * Implemented as a map of maps where the first key is the `data: T` object and the second is the
212 * `CdkRowDef<T>` object. With the two keys, the cache points to a `RenderRow<T>` object that
213 * contains an array of created pairs. The array is necessary to handle cases where the data
214 * array contains multiple duplicate data objects and each instantiated `RenderRow` must be
215 * stored.
216 */
217 this._cachedRenderRowsMap = new Map();
218 /**
219 * CSS class added to any row or cell that has sticky positioning applied. May be overriden by
220 * table subclasses.
221 */
222 this.stickyCssClass = 'cdk-table-sticky';
223 /**
224 * Whether to manually add positon: sticky to all sticky cell elements. Not needed if
225 * the position is set in a selector associated with the value of stickyCssClass. May be
226 * overridden by table subclasses
227 */
228 this.needsPositionStickyOnElement = true;
229 /** Whether the no data row is currently showing anything. */
230 this._isShowingNoDataRow = false;
231 this._multiTemplateDataRows = false;
232 this._fixedLayout = false;
233 /**
234 * Emits when the table completes rendering a set of data rows based on the latest data from the
235 * data source, even if the set of rows is empty.
236 */
237 this.contentChanged = new EventEmitter();
238 // TODO(andrewseguin): Remove max value as the end index
239 // and instead calculate the view on init and scroll.
240 /**
241 * Stream containing the latest information on what rows are being displayed on screen.
242 * Can be used by the data source to as a heuristic of what data should be provided.
243 *
244 * @docs-private
245 */
246 this.viewChange = new BehaviorSubject({ start: 0, end: Number.MAX_VALUE });
247 if (!role) {
248 this._elementRef.nativeElement.setAttribute('role', 'table');
249 }
250 this._document = _document;
251 this._isNativeHtmlTable = this._elementRef.nativeElement.nodeName === 'TABLE';
252 }
253 /**
254 * Tracking function that will be used to check the differences in data changes. Used similarly
255 * to `ngFor` `trackBy` function. Optimize row operations by identifying a row based on its data
256 * relative to the function to know if a row should be added/removed/moved.
257 * Accepts a function that takes two parameters, `index` and `item`.
258 */
259 get trackBy() {
260 return this._trackByFn;
261 }
262 set trackBy(fn) {
263 if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') {
264 console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}.`);
265 }
266 this._trackByFn = fn;
267 }
268 /**
269 * The table's source of data, which can be provided in three ways (in order of complexity):
270 * - Simple data array (each object represents one table row)
271 * - Stream that emits a data array each time the array changes
272 * - `DataSource` object that implements the connect/disconnect interface.
273 *
274 * If a data array is provided, the table must be notified when the array's objects are
275 * added, removed, or moved. This can be done by calling the `renderRows()` function which will
276 * render the diff since the last table render. If the data array reference is changed, the table
277 * will automatically trigger an update to the rows.
278 *
279 * When providing an Observable stream, the table will trigger an update automatically when the
280 * stream emits a new array of data.
281 *
282 * Finally, when providing a `DataSource` object, the table will use the Observable stream
283 * provided by the connect function and trigger updates when that stream emits new data array
284 * values. During the table's ngOnDestroy or when the data source is removed from the table, the
285 * table will call the DataSource's `disconnect` function (may be useful for cleaning up any
286 * subscriptions registered during the connect process).
287 */
288 get dataSource() {
289 return this._dataSource;
290 }
291 set dataSource(dataSource) {
292 if (this._dataSource !== dataSource) {
293 this._switchDataSource(dataSource);
294 }
295 }
296 /**
297 * Whether to allow multiple rows per data object by evaluating which rows evaluate their 'when'
298 * predicate to true. If `multiTemplateDataRows` is false, which is the default value, then each
299 * dataobject will render the first row that evaluates its when predicate to true, in the order
300 * defined in the table, or otherwise the default row which does not have a when predicate.
301 */
302 get multiTemplateDataRows() {
303 return this._multiTemplateDataRows;
304 }
305 set multiTemplateDataRows(v) {
306 this._multiTemplateDataRows = coerceBooleanProperty(v);
307 // In Ivy if this value is set via a static attribute (e.g. <table multiTemplateDataRows>),
308 // this setter will be invoked before the row outlet has been defined hence the null check.
309 if (this._rowOutlet && this._rowOutlet.viewContainer.length) {
310 this._forceRenderDataRows();
311 this.updateStickyColumnStyles();
312 }
313 }
314 /**
315 * Whether to use a fixed table layout. Enabling this option will enforce consistent column widths
316 * and optimize rendering sticky styles for native tables. No-op for flex tables.
317 */
318 get fixedLayout() {
319 return this._fixedLayout;
320 }
321 set fixedLayout(v) {
322 this._fixedLayout = coerceBooleanProperty(v);
323 // Toggling `fixedLayout` may change column widths. Sticky column styles should be recalculated.
324 this._forceRecalculateCellWidths = true;
325 this._stickyColumnStylesNeedReset = true;
326 }
327 ngOnInit() {
328 this._setupStickyStyler();
329 if (this._isNativeHtmlTable) {
330 this._applyNativeTableSections();
331 }
332 // Set up the trackBy function so that it uses the `RenderRow` as its identity by default. If
333 // the user has provided a custom trackBy, return the result of that function as evaluated
334 // with the values of the `RenderRow`'s data and index.
335 this._dataDiffer = this._differs.find([]).create((_i, dataRow) => {
336 return this.trackBy ? this.trackBy(dataRow.dataIndex, dataRow.data) : dataRow;
337 });
338 this._viewportRuler.change().pipe(takeUntil(this._onDestroy)).subscribe(() => {
339 this._forceRecalculateCellWidths = true;
340 });
341 }
342 ngAfterContentChecked() {
343 // Cache the row and column definitions gathered by ContentChildren and programmatic injection.
344 this._cacheRowDefs();
345 this._cacheColumnDefs();
346 // Make sure that the user has at least added header, footer, or data row def.
347 if (!this._headerRowDefs.length && !this._footerRowDefs.length && !this._rowDefs.length &&
348 (typeof ngDevMode === 'undefined' || ngDevMode)) {
349 throw getTableMissingRowDefsError();
350 }
351 // Render updates if the list of columns have been changed for the header, row, or footer defs.
352 const columnsChanged = this._renderUpdatedColumns();
353 const rowDefsChanged = columnsChanged || this._headerRowDefChanged || this._footerRowDefChanged;
354 // Ensure sticky column styles are reset if set to `true` elsewhere.
355 this._stickyColumnStylesNeedReset = this._stickyColumnStylesNeedReset || rowDefsChanged;
356 this._forceRecalculateCellWidths = rowDefsChanged;
357 // If the header row definition has been changed, trigger a render to the header row.
358 if (this._headerRowDefChanged) {
359 this._forceRenderHeaderRows();
360 this._headerRowDefChanged = false;
361 }
362 // If the footer row definition has been changed, trigger a render to the footer row.
363 if (this._footerRowDefChanged) {
364 this._forceRenderFooterRows();
365 this._footerRowDefChanged = false;
366 }
367 // If there is a data source and row definitions, connect to the data source unless a
368 // connection has already been made.
369 if (this.dataSource && this._rowDefs.length > 0 && !this._renderChangeSubscription) {
370 this._observeRenderChanges();
371 }
372 else if (this._stickyColumnStylesNeedReset) {
373 // In the above case, _observeRenderChanges will result in updateStickyColumnStyles being
374 // called when it row data arrives. Otherwise, we need to call it proactively.
375 this.updateStickyColumnStyles();
376 }
377 this._checkStickyStates();
378 }
379 ngOnDestroy() {
380 this._rowOutlet.viewContainer.clear();
381 this._noDataRowOutlet.viewContainer.clear();
382 this._headerRowOutlet.viewContainer.clear();
383 this._footerRowOutlet.viewContainer.clear();
384 this._cachedRenderRowsMap.clear();
385 this._onDestroy.next();
386 this._onDestroy.complete();
387 if (isDataSource(this.dataSource)) {
388 this.dataSource.disconnect(this);
389 }
390 }
391 /**
392 * Renders rows based on the table's latest set of data, which was either provided directly as an
393 * input or retrieved through an Observable stream (directly or from a DataSource).
394 * Checks for differences in the data since the last diff to perform only the necessary
395 * changes (add/remove/move rows).
396 *
397 * If the table's data source is a DataSource or Observable, this will be invoked automatically
398 * each time the provided Observable stream emits a new data array. Otherwise if your data is
399 * an array, this function will need to be called to render any changes.
400 */
401 renderRows() {
402 this._renderRows = this._getAllRenderRows();
403 const changes = this._dataDiffer.diff(this._renderRows);
404 if (!changes) {
405 this._updateNoDataRow();
406 this.contentChanged.next();
407 return;
408 }
409 const viewContainer = this._rowOutlet.viewContainer;
410 this._viewRepeater.applyChanges(changes, viewContainer, (record, _adjustedPreviousIndex, currentIndex) => this._getEmbeddedViewArgs(record.item, currentIndex), (record) => record.item.data, (change) => {
411 if (change.operation === 1 /* INSERTED */ && change.context) {
412 this._renderCellTemplateForItem(change.record.item.rowDef, change.context);
413 }
414 });
415 // Update the meta context of a row's context data (index, count, first, last, ...)
416 this._updateRowIndexContext();
417 // Update rows that did not get added/removed/moved but may have had their identity changed,
418 // e.g. if trackBy matched data on some property but the actual data reference changed.
419 changes.forEachIdentityChange((record) => {
420 const rowView = viewContainer.get(record.currentIndex);
421 rowView.context.$implicit = record.item.data;
422 });
423 this._updateNoDataRow();
424 this.updateStickyColumnStyles();
425 this.contentChanged.next();
426 }
427 /** Adds a column definition that was not included as part of the content children. */
428 addColumnDef(columnDef) {
429 this._customColumnDefs.add(columnDef);
430 }
431 /** Removes a column definition that was not included as part of the content children. */
432 removeColumnDef(columnDef) {
433 this._customColumnDefs.delete(columnDef);
434 }
435 /** Adds a row definition that was not included as part of the content children. */
436 addRowDef(rowDef) {
437 this._customRowDefs.add(rowDef);
438 }
439 /** Removes a row definition that was not included as part of the content children. */
440 removeRowDef(rowDef) {
441 this._customRowDefs.delete(rowDef);
442 }
443 /** Adds a header row definition that was not included as part of the content children. */
444 addHeaderRowDef(headerRowDef) {
445 this._customHeaderRowDefs.add(headerRowDef);
446 this._headerRowDefChanged = true;
447 }
448 /** Removes a header row definition that was not included as part of the content children. */
449 removeHeaderRowDef(headerRowDef) {
450 this._customHeaderRowDefs.delete(headerRowDef);
451 this._headerRowDefChanged = true;
452 }
453 /** Adds a footer row definition that was not included as part of the content children. */
454 addFooterRowDef(footerRowDef) {
455 this._customFooterRowDefs.add(footerRowDef);
456 this._footerRowDefChanged = true;
457 }
458 /** Removes a footer row definition that was not included as part of the content children. */
459 removeFooterRowDef(footerRowDef) {
460 this._customFooterRowDefs.delete(footerRowDef);
461 this._footerRowDefChanged = true;
462 }
463 /** Sets a no data row definition that was not included as a part of the content children. */
464 setNoDataRow(noDataRow) {
465 this._customNoDataRow = noDataRow;
466 }
467 /**
468 * Updates the header sticky styles. First resets all applied styles with respect to the cells
469 * sticking to the top. Then, evaluating which cells need to be stuck to the top. This is
470 * automatically called when the header row changes its displayed set of columns, or if its
471 * sticky input changes. May be called manually for cases where the cell content changes outside
472 * of these events.
473 */
474 updateStickyHeaderRowStyles() {
475 const headerRows = this._getRenderedRows(this._headerRowOutlet);
476 const tableElement = this._elementRef.nativeElement;
477 // Hide the thead element if there are no header rows. This is necessary to satisfy
478 // overzealous a11y checkers that fail because the `rowgroup` element does not contain
479 // required child `row`.
480 const thead = tableElement.querySelector('thead');
481 if (thead) {
482 thead.style.display = headerRows.length ? '' : 'none';
483 }
484 const stickyStates = this._headerRowDefs.map(def => def.sticky);
485 this._stickyStyler.clearStickyPositioning(headerRows, ['top']);
486 this._stickyStyler.stickRows(headerRows, stickyStates, 'top');
487 // Reset the dirty state of the sticky input change since it has been used.
488 this._headerRowDefs.forEach(def => def.resetStickyChanged());
489 }
490 /**
491 * Updates the footer sticky styles. First resets all applied styles with respect to the cells
492 * sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is
493 * automatically called when the footer row changes its displayed set of columns, or if its
494 * sticky input changes. May be called manually for cases where the cell content changes outside
495 * of these events.
496 */
497 updateStickyFooterRowStyles() {
498 const footerRows = this._getRenderedRows(this._footerRowOutlet);
499 const tableElement = this._elementRef.nativeElement;
500 // Hide the tfoot element if there are no footer rows. This is necessary to satisfy
501 // overzealous a11y checkers that fail because the `rowgroup` element does not contain
502 // required child `row`.
503 const tfoot = tableElement.querySelector('tfoot');
504 if (tfoot) {
505 tfoot.style.display = footerRows.length ? '' : 'none';
506 }
507 const stickyStates = this._footerRowDefs.map(def => def.sticky);
508 this._stickyStyler.clearStickyPositioning(footerRows, ['bottom']);
509 this._stickyStyler.stickRows(footerRows, stickyStates, 'bottom');
510 this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement, stickyStates);
511 // Reset the dirty state of the sticky input change since it has been used.
512 this._footerRowDefs.forEach(def => def.resetStickyChanged());
513 }
514 /**
515 * Updates the column sticky styles. First resets all applied styles with respect to the cells
516 * sticking to the left and right. Then sticky styles are added for the left and right according
517 * to the column definitions for each cell in each row. This is automatically called when
518 * the data source provides a new set of data or when a column definition changes its sticky
519 * input. May be called manually for cases where the cell content changes outside of these events.
520 */
521 updateStickyColumnStyles() {
522 const headerRows = this._getRenderedRows(this._headerRowOutlet);
523 const dataRows = this._getRenderedRows(this._rowOutlet);
524 const footerRows = this._getRenderedRows(this._footerRowOutlet);
525 // For tables not using a fixed layout, the column widths may change when new rows are rendered.
526 // In a table using a fixed layout, row content won't affect column width, so sticky styles
527 // don't need to be cleared unless either the sticky column config changes or one of the row
528 // defs change.
529 if ((this._isNativeHtmlTable && !this._fixedLayout)
530 || this._stickyColumnStylesNeedReset) {
531 // Clear the left and right positioning from all columns in the table across all rows since
532 // sticky columns span across all table sections (header, data, footer)
533 this._stickyStyler.clearStickyPositioning([...headerRows, ...dataRows, ...footerRows], ['left', 'right']);
534 this._stickyColumnStylesNeedReset = false;
535 }
536 // Update the sticky styles for each header row depending on the def's sticky state
537 headerRows.forEach((headerRow, i) => {
538 this._addStickyColumnStyles([headerRow], this._headerRowDefs[i]);
539 });
540 // Update the sticky styles for each data row depending on its def's sticky state
541 this._rowDefs.forEach(rowDef => {
542 // Collect all the rows rendered with this row definition.
543 const rows = [];
544 for (let i = 0; i < dataRows.length; i++) {
545 if (this._renderRows[i].rowDef === rowDef) {
546 rows.push(dataRows[i]);
547 }
548 }
549 this._addStickyColumnStyles(rows, rowDef);
550 });
551 // Update the sticky styles for each footer row depending on the def's sticky state
552 footerRows.forEach((footerRow, i) => {
553 this._addStickyColumnStyles([footerRow], this._footerRowDefs[i]);
554 });
555 // Reset the dirty state of the sticky input change since it has been used.
556 Array.from(this._columnDefsByName.values()).forEach(def => def.resetStickyChanged());
557 }
558 /**
559 * Get the list of RenderRow objects to render according to the current list of data and defined
560 * row definitions. If the previous list already contained a particular pair, it should be reused
561 * so that the differ equates their references.
562 */
563 _getAllRenderRows() {
564 const renderRows = [];
565 // Store the cache and create a new one. Any re-used RenderRow objects will be moved into the
566 // new cache while unused ones can be picked up by garbage collection.
567 const prevCachedRenderRows = this._cachedRenderRowsMap;
568 this._cachedRenderRowsMap = new Map();
569 // For each data object, get the list of rows that should be rendered, represented by the
570 // respective `RenderRow` object which is the pair of `data` and `CdkRowDef`.
571 for (let i = 0; i < this._data.length; i++) {
572 let data = this._data[i];
573 const renderRowsForData = this._getRenderRowsForData(data, i, prevCachedRenderRows.get(data));
574 if (!this._cachedRenderRowsMap.has(data)) {
575 this._cachedRenderRowsMap.set(data, new WeakMap());
576 }
577 for (let j = 0; j < renderRowsForData.length; j++) {
578 let renderRow = renderRowsForData[j];
579 const cache = this._cachedRenderRowsMap.get(renderRow.data);
580 if (cache.has(renderRow.rowDef)) {
581 cache.get(renderRow.rowDef).push(renderRow);
582 }
583 else {
584 cache.set(renderRow.rowDef, [renderRow]);
585 }
586 renderRows.push(renderRow);
587 }
588 }
589 return renderRows;
590 }
591 /**
592 * Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that
593 * should be rendered for this data. Reuses the cached RenderRow objects if they match the same
594 * `(T, CdkRowDef)` pair.
595 */
596 _getRenderRowsForData(data, dataIndex, cache) {
597 const rowDefs = this._getRowDefs(data, dataIndex);
598 return rowDefs.map(rowDef => {
599 const cachedRenderRows = (cache && cache.has(rowDef)) ? cache.get(rowDef) : [];
600 if (cachedRenderRows.length) {
601 const dataRow = cachedRenderRows.shift();
602 dataRow.dataIndex = dataIndex;
603 return dataRow;
604 }
605 else {
606 return { data, rowDef, dataIndex };
607 }
608 });
609 }
610 /** Update the map containing the content's column definitions. */
611 _cacheColumnDefs() {
612 this._columnDefsByName.clear();
613 const columnDefs = mergeArrayAndSet(this._getOwnDefs(this._contentColumnDefs), this._customColumnDefs);
614 columnDefs.forEach(columnDef => {
615 if (this._columnDefsByName.has(columnDef.name) &&
616 (typeof ngDevMode === 'undefined' || ngDevMode)) {
617 throw getTableDuplicateColumnNameError(columnDef.name);
618 }
619 this._columnDefsByName.set(columnDef.name, columnDef);
620 });
621 }
622 /** Update the list of all available row definitions that can be used. */
623 _cacheRowDefs() {
624 this._headerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentHeaderRowDefs), this._customHeaderRowDefs);
625 this._footerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentFooterRowDefs), this._customFooterRowDefs);
626 this._rowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentRowDefs), this._customRowDefs);
627 // After all row definitions are determined, find the row definition to be considered default.
628 const defaultRowDefs = this._rowDefs.filter(def => !def.when);
629 if (!this.multiTemplateDataRows && defaultRowDefs.length > 1 &&
630 (typeof ngDevMode === 'undefined' || ngDevMode)) {
631 throw getTableMultipleDefaultRowDefsError();
632 }
633 this._defaultRowDef = defaultRowDefs[0];
634 }
635 /**
636 * Check if the header, data, or footer rows have changed what columns they want to display or
637 * whether the sticky states have changed for the header or footer. If there is a diff, then
638 * re-render that section.
639 */
640 _renderUpdatedColumns() {
641 const columnsDiffReducer = (acc, def) => acc || !!def.getColumnsDiff();
642 // Force re-render data rows if the list of column definitions have changed.
643 const dataColumnsChanged = this._rowDefs.reduce(columnsDiffReducer, false);
644 if (dataColumnsChanged) {
645 this._forceRenderDataRows();
646 }
647 // Force re-render header/footer rows if the list of column definitions have changed.
648 const headerColumnsChanged = this._headerRowDefs.reduce(columnsDiffReducer, false);
649 if (headerColumnsChanged) {
650 this._forceRenderHeaderRows();
651 }
652 const footerColumnsChanged = this._footerRowDefs.reduce(columnsDiffReducer, false);
653 if (footerColumnsChanged) {
654 this._forceRenderFooterRows();
655 }
656 return dataColumnsChanged || headerColumnsChanged || footerColumnsChanged;
657 }
658 /**
659 * Switch to the provided data source by resetting the data and unsubscribing from the current
660 * render change subscription if one exists. If the data source is null, interpret this by
661 * clearing the row outlet. Otherwise start listening for new data.
662 */
663 _switchDataSource(dataSource) {
664 this._data = [];
665 if (isDataSource(this.dataSource)) {
666 this.dataSource.disconnect(this);
667 }
668 // Stop listening for data from the previous data source.
669 if (this._renderChangeSubscription) {
670 this._renderChangeSubscription.unsubscribe();
671 this._renderChangeSubscription = null;
672 }
673 if (!dataSource) {
674 if (this._dataDiffer) {
675 this._dataDiffer.diff([]);
676 }
677 this._rowOutlet.viewContainer.clear();
678 }
679 this._dataSource = dataSource;
680 }
681 /** Set up a subscription for the data provided by the data source. */
682 _observeRenderChanges() {
683 // If no data source has been set, there is nothing to observe for changes.
684 if (!this.dataSource) {
685 return;
686 }
687 let dataStream;
688 if (isDataSource(this.dataSource)) {
689 dataStream = this.dataSource.connect(this);
690 }
691 else if (isObservable(this.dataSource)) {
692 dataStream = this.dataSource;
693 }
694 else if (Array.isArray(this.dataSource)) {
695 dataStream = observableOf(this.dataSource);
696 }
697 if (dataStream === undefined && (typeof ngDevMode === 'undefined' || ngDevMode)) {
698 throw getTableUnknownDataSourceError();
699 }
700 this._renderChangeSubscription = dataStream.pipe(takeUntil(this._onDestroy))
701 .subscribe(data => {
702 this._data = data || [];
703 this.renderRows();
704 });
705 }
706 /**
707 * Clears any existing content in the header row outlet and creates a new embedded view
708 * in the outlet using the header row definition.
709 */
710 _forceRenderHeaderRows() {
711 // Clear the header row outlet if any content exists.
712 if (this._headerRowOutlet.viewContainer.length > 0) {
713 this._headerRowOutlet.viewContainer.clear();
714 }
715 this._headerRowDefs.forEach((def, i) => this._renderRow(this._headerRowOutlet, def, i));
716 this.updateStickyHeaderRowStyles();
717 }
718 /**
719 * Clears any existing content in the footer row outlet and creates a new embedded view
720 * in the outlet using the footer row definition.
721 */
722 _forceRenderFooterRows() {
723 // Clear the footer row outlet if any content exists.
724 if (this._footerRowOutlet.viewContainer.length > 0) {
725 this._footerRowOutlet.viewContainer.clear();
726 }
727 this._footerRowDefs.forEach((def, i) => this._renderRow(this._footerRowOutlet, def, i));
728 this.updateStickyFooterRowStyles();
729 }
730 /** Adds the sticky column styles for the rows according to the columns' stick states. */
731 _addStickyColumnStyles(rows, rowDef) {
732 const columnDefs = Array.from(rowDef.columns || []).map(columnName => {
733 const columnDef = this._columnDefsByName.get(columnName);
734 if (!columnDef && (typeof ngDevMode === 'undefined' || ngDevMode)) {
735 throw getTableUnknownColumnError(columnName);
736 }
737 return columnDef;
738 });
739 const stickyStartStates = columnDefs.map(columnDef => columnDef.sticky);
740 const stickyEndStates = columnDefs.map(columnDef => columnDef.stickyEnd);
741 this._stickyStyler.updateStickyColumns(rows, stickyStartStates, stickyEndStates, !this._fixedLayout || this._forceRecalculateCellWidths);
742 }
743 /** Gets the list of rows that have been rendered in the row outlet. */
744 _getRenderedRows(rowOutlet) {
745 const renderedRows = [];
746 for (let i = 0; i < rowOutlet.viewContainer.length; i++) {
747 const viewRef = rowOutlet.viewContainer.get(i);
748 renderedRows.push(viewRef.rootNodes[0]);
749 }
750 return renderedRows;
751 }
752 /**
753 * Get the matching row definitions that should be used for this row data. If there is only
754 * one row definition, it is returned. Otherwise, find the row definitions that has a when
755 * predicate that returns true with the data. If none return true, return the default row
756 * definition.
757 */
758 _getRowDefs(data, dataIndex) {
759 if (this._rowDefs.length == 1) {
760 return [this._rowDefs[0]];
761 }
762 let rowDefs = [];
763 if (this.multiTemplateDataRows) {
764 rowDefs = this._rowDefs.filter(def => !def.when || def.when(dataIndex, data));
765 }
766 else {
767 let rowDef = this._rowDefs.find(def => def.when && def.when(dataIndex, data)) || this._defaultRowDef;
768 if (rowDef) {
769 rowDefs.push(rowDef);
770 }
771 }
772 if (!rowDefs.length && (typeof ngDevMode === 'undefined' || ngDevMode)) {
773 throw getTableMissingMatchingRowDefError(data);
774 }
775 return rowDefs;
776 }
777 _getEmbeddedViewArgs(renderRow, index) {
778 const rowDef = renderRow.rowDef;
779 const context = { $implicit: renderRow.data };
780 return {
781 templateRef: rowDef.template,
782 context,
783 index,
784 };
785 }
786 /**
787 * Creates a new row template in the outlet and fills it with the set of cell templates.
788 * Optionally takes a context to provide to the row and cells, as well as an optional index
789 * of where to place the new row template in the outlet.
790 */
791 _renderRow(outlet, rowDef, index, context = {}) {
792 // TODO(andrewseguin): enforce that one outlet was instantiated from createEmbeddedView
793 const view = outlet.viewContainer.createEmbeddedView(rowDef.template, context, index);
794 this._renderCellTemplateForItem(rowDef, context);
795 return view;
796 }
797 _renderCellTemplateForItem(rowDef, context) {
798 for (let cellTemplate of this._getCellTemplates(rowDef)) {
799 if (CdkCellOutlet.mostRecentCellOutlet) {
800 CdkCellOutlet.mostRecentCellOutlet._viewContainer.createEmbeddedView(cellTemplate, context);
801 }
802 }
803 this._changeDetectorRef.markForCheck();
804 }
805 /**
806 * Updates the index-related context for each row to reflect any changes in the index of the rows,
807 * e.g. first/last/even/odd.
808 */
809 _updateRowIndexContext() {
810 const viewContainer = this._rowOutlet.viewContainer;
811 for (let renderIndex = 0, count = viewContainer.length; renderIndex < count; renderIndex++) {
812 const viewRef = viewContainer.get(renderIndex);
813 const context = viewRef.context;
814 context.count = count;
815 context.first = renderIndex === 0;
816 context.last = renderIndex === count - 1;
817 context.even = renderIndex % 2 === 0;
818 context.odd = !context.even;
819 if (this.multiTemplateDataRows) {
820 context.dataIndex = this._renderRows[renderIndex].dataIndex;
821 context.renderIndex = renderIndex;
822 }
823 else {
824 context.index = this._renderRows[renderIndex].dataIndex;
825 }
826 }
827 }
828 /** Gets the column definitions for the provided row def. */
829 _getCellTemplates(rowDef) {
830 if (!rowDef || !rowDef.columns) {
831 return [];
832 }
833 return Array.from(rowDef.columns, columnId => {
834 const column = this._columnDefsByName.get(columnId);
835 if (!column && (typeof ngDevMode === 'undefined' || ngDevMode)) {
836 throw getTableUnknownColumnError(columnId);
837 }
838 return rowDef.extractCellTemplate(column);
839 });
840 }
841 /** Adds native table sections (e.g. tbody) and moves the row outlets into them. */
842 _applyNativeTableSections() {
843 const documentFragment = this._document.createDocumentFragment();
844 const sections = [
845 { tag: 'thead', outlets: [this._headerRowOutlet] },
846 { tag: 'tbody', outlets: [this._rowOutlet, this._noDataRowOutlet] },
847 { tag: 'tfoot', outlets: [this._footerRowOutlet] },
848 ];
849 for (const section of sections) {
850 const element = this._document.createElement(section.tag);
851 element.setAttribute('role', 'rowgroup');
852 for (const outlet of section.outlets) {
853 element.appendChild(outlet.elementRef.nativeElement);
854 }
855 documentFragment.appendChild(element);
856 }
857 // Use a DocumentFragment so we don't hit the DOM on each iteration.
858 this._elementRef.nativeElement.appendChild(documentFragment);
859 }
860 /**
861 * Forces a re-render of the data rows. Should be called in cases where there has been an input
862 * change that affects the evaluation of which rows should be rendered, e.g. toggling
863 * `multiTemplateDataRows` or adding/removing row definitions.
864 */
865 _forceRenderDataRows() {
866 this._dataDiffer.diff([]);
867 this._rowOutlet.viewContainer.clear();
868 this.renderRows();
869 }
870 /**
871 * Checks if there has been a change in sticky states since last check and applies the correct
872 * sticky styles. Since checking resets the "dirty" state, this should only be performed once
873 * during a change detection and after the inputs are settled (after content check).
874 */
875 _checkStickyStates() {
876 const stickyCheckReducer = (acc, d) => {
877 return acc || d.hasStickyChanged();
878 };
879 // Note that the check needs to occur for every definition since it notifies the definition
880 // that it can reset its dirty state. Using another operator like `some` may short-circuit
881 // remaining definitions and leave them in an unchecked state.
882 if (this._headerRowDefs.reduce(stickyCheckReducer, false)) {
883 this.updateStickyHeaderRowStyles();
884 }
885 if (this._footerRowDefs.reduce(stickyCheckReducer, false)) {
886 this.updateStickyFooterRowStyles();
887 }
888 if (Array.from(this._columnDefsByName.values()).reduce(stickyCheckReducer, false)) {
889 this._stickyColumnStylesNeedReset = true;
890 this.updateStickyColumnStyles();
891 }
892 }
893 /**
894 * Creates the sticky styler that will be used for sticky rows and columns. Listens
895 * for directionality changes and provides the latest direction to the styler. Re-applies column
896 * stickiness when directionality changes.
897 */
898 _setupStickyStyler() {
899 const direction = this._dir ? this._dir.value : 'ltr';
900 this._stickyStyler = new StickyStyler(this._isNativeHtmlTable, this.stickyCssClass, direction, this._coalescedStyleScheduler, this._platform.isBrowser, this.needsPositionStickyOnElement, this._stickyPositioningListener);
901 (this._dir ? this._dir.change : observableOf())
902 .pipe(takeUntil(this._onDestroy))
903 .subscribe(value => {
904 this._stickyStyler.direction = value;
905 this.updateStickyColumnStyles();
906 });
907 }
908 /** Filters definitions that belong to this table from a QueryList. */
909 _getOwnDefs(items) {
910 return items.filter(item => !item._table || item._table === this);
911 }
912 /** Creates or removes the no data row, depending on whether any data is being shown. */
913 _updateNoDataRow() {
914 const noDataRow = this._customNoDataRow || this._noDataRow;
915 if (noDataRow) {
916 const shouldShow = this._rowOutlet.viewContainer.length === 0;
917 if (shouldShow !== this._isShowingNoDataRow) {
918 const container = this._noDataRowOutlet.viewContainer;
919 shouldShow ? container.createEmbeddedView(noDataRow.templateRef) : container.clear();
920 this._isShowingNoDataRow = shouldShow;
921 }
922 }
923 }
924}
925CdkTable.decorators = [
926 { type: Component, args: [{
927 selector: 'cdk-table, table[cdk-table]',
928 exportAs: 'cdkTable',
929 template: CDK_TABLE_TEMPLATE,
930 host: {
931 'class': 'cdk-table',
932 '[class.cdk-table-fixed-layout]': 'fixedLayout',
933 },
934 encapsulation: ViewEncapsulation.None,
935 // The "OnPush" status for the `MatTable` component is effectively a noop, so we are removing it.
936 // The view for `MatTable` consists entirely of templates declared in other views. As they are
937 // declared elsewhere, they are checked when their declaration points are checked.
938 // tslint:disable-next-line:validate-decorators
939 changeDetection: ChangeDetectionStrategy.Default,
940 providers: [
941 { provide: CDK_TABLE, useExisting: CdkTable },
942 { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },
943 { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },
944 // Prevent nested tables from seeing this table's StickyPositioningListener.
945 { provide: STICKY_POSITIONING_LISTENER, useValue: null },
946 ],
947 styles: [".cdk-table-fixed-layout{table-layout:fixed}\n"]
948 },] }
949];
950CdkTable.ctorParameters = () => [
951 { type: IterableDiffers },
952 { type: ChangeDetectorRef },
953 { type: ElementRef },
954 { type: String, decorators: [{ type: Attribute, args: ['role',] }] },
955 { type: Directionality, decorators: [{ type: Optional }] },
956 { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
957 { type: Platform },
958 { type: undefined, decorators: [{ type: Inject, args: [_VIEW_REPEATER_STRATEGY,] }] },
959 { type: _CoalescedStyleScheduler, decorators: [{ type: Inject, args: [_COALESCED_STYLE_SCHEDULER,] }] },
960 { type: ViewportRuler },
961 { type: undefined, decorators: [{ type: Optional }, { type: SkipSelf }, { type: Inject, args: [STICKY_POSITIONING_LISTENER,] }] }
962];
963CdkTable.propDecorators = {
964 trackBy: [{ type: Input }],
965 dataSource: [{ type: Input }],
966 multiTemplateDataRows: [{ type: Input }],
967 fixedLayout: [{ type: Input }],
968 contentChanged: [{ type: Output }],
969 _rowOutlet: [{ type: ViewChild, args: [DataRowOutlet, { static: true },] }],
970 _headerRowOutlet: [{ type: ViewChild, args: [HeaderRowOutlet, { static: true },] }],
971 _footerRowOutlet: [{ type: ViewChild, args: [FooterRowOutlet, { static: true },] }],
972 _noDataRowOutlet: [{ type: ViewChild, args: [NoDataRowOutlet, { static: true },] }],
973 _contentColumnDefs: [{ type: ContentChildren, args: [CdkColumnDef, { descendants: true },] }],
974 _contentRowDefs: [{ type: ContentChildren, args: [CdkRowDef, { descendants: true },] }],
975 _contentHeaderRowDefs: [{ type: ContentChildren, args: [CdkHeaderRowDef, {
976 descendants: true
977 },] }],
978 _contentFooterRowDefs: [{ type: ContentChildren, args: [CdkFooterRowDef, {
979 descendants: true
980 },] }],
981 _noDataRow: [{ type: ContentChild, args: [CdkNoDataRow,] }]
982};
983/** Utility function that gets a merged list of the entries in an array and values of a Set. */
984function mergeArrayAndSet(array, set) {
985 return array.concat(Array.from(set));
986}
987//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvY2RrL3RhYmxlL3RhYmxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVILE9BQU8sRUFBWSxjQUFjLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQUM1RCxPQUFPLEVBQWUscUJBQXFCLEVBQUMsTUFBTSx1QkFBdUIsQ0FBQztBQUMxRSxPQUFPLEVBR0wsNEJBQTRCLEVBQzVCLDRCQUE0QixFQUM1QixZQUFZLEVBQ1osdUJBQXVCLEdBS3hCLE1BQU0sMEJBQTBCLENBQUM7QUFDbEMsT0FBTyxFQUFDLFFBQVEsRUFBQyxNQUFNLHVCQUF1QixDQUFDO0FBQy9DLE9BQU8sRUFBQyxhQUFhLEVBQUMsTUFBTSx3QkFBd0IsQ0FBQztBQUNyRCxPQUFPLEVBQUMsUUFBUSxFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFDekMsT0FBTyxFQUVMLFNBQVMsRUFDVCx1QkFBdUIsRUFDdkIsaUJBQWlCLEVBQ2pCLFNBQVMsRUFDVCxZQUFZLEVBQ1osZUFBZSxFQUNmLFNBQVMsRUFDVCxVQUFVLEVBQ1YsZUFBZSxFQUNmLFlBQVksRUFDWixNQUFNLEVBQ04sS0F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XlvdXQ6IEJvb2xlYW5JbnB1dDtcbn1cblxuLyoqIFV0aWxpdHkgZnVuY3Rpb24gdGhhdCBnZXRzIGEgbWVyZ2VkIGxpc3Qgb2YgdGhlIGVudHJpZXMgaW4gYW4gYXJyYXkgYW5kIHZhbHVlcyBvZiBhIFNldC4gKi9cbmZ1bmN0aW9uIG1lcmdlQXJyYXlBbmRTZXQ8VD4oYXJyYXk6IFRbXSwgc2V0OiBTZXQ8VD4pOiBUW10ge1xuICByZXR1cm4gYXJyYXkuY29uY2F0KEFycmF5LmZyb20oc2V0KSk7XG59XG4iXX0=
Note: See TracBrowser for help on using the repository browser.