@angular/cdk 9.2.0-next.0 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/bundles/cdk-coercion.umd.js +0 -1
  2. package/bundles/cdk-coercion.umd.js.map +1 -1
  3. package/bundles/cdk-coercion.umd.min.js.map +1 -1
  4. package/bundles/cdk-table.umd.js +58 -27
  5. package/bundles/cdk-table.umd.js.map +1 -1
  6. package/bundles/cdk-table.umd.min.js +12 -5
  7. package/bundles/cdk-table.umd.min.js.map +1 -1
  8. package/bundles/cdk.umd.js +1 -1
  9. package/bundles/cdk.umd.js.map +1 -1
  10. package/bundles/cdk.umd.min.js +1 -1
  11. package/bundles/cdk.umd.min.js.map +1 -1
  12. package/coercion/array.d.ts +1 -0
  13. package/esm2015/coercion/array.js +1 -2
  14. package/esm2015/table/cell.js +18 -8
  15. package/esm2015/table/public-api.js +3 -2
  16. package/esm2015/table/row.js +24 -8
  17. package/esm2015/table/table.js +26 -12
  18. package/esm2015/table/text-column.js +3 -26
  19. package/esm2015/table/tokens.js +44 -0
  20. package/esm2015/version.js +1 -1
  21. package/esm5/coercion/array.js +1 -2
  22. package/esm5/table/cell.js +13 -8
  23. package/esm5/table/public-api.js +2 -1
  24. package/esm5/table/row.js +21 -11
  25. package/esm5/table/table.js +16 -11
  26. package/esm5/table/text-column.js +3 -4
  27. package/esm5/table/tokens.js +16 -0
  28. package/esm5/version.js +1 -1
  29. package/fesm2015/cdk.js +1 -1
  30. package/fesm2015/cdk.js.map +1 -1
  31. package/fesm2015/coercion.js +0 -1
  32. package/fesm2015/coercion.js.map +1 -1
  33. package/fesm2015/table.js +98 -49
  34. package/fesm2015/table.js.map +1 -1
  35. package/fesm5/cdk.js +1 -1
  36. package/fesm5/cdk.js.map +1 -1
  37. package/fesm5/coercion.js +0 -1
  38. package/fesm5/coercion.js.map +1 -1
  39. package/fesm5/table.js +59 -29
  40. package/fesm5/table.js.map +1 -1
  41. package/package.json +1 -1
  42. package/schematics/ng-add/index.js +1 -1
  43. package/table/cell.d.ts +2 -0
  44. package/table/index.metadata.json +1 -1
  45. package/table/public-api.d.ts +1 -0
  46. package/table/row.d.ts +6 -3
  47. package/table/table.d.ts +2 -0
  48. package/table/text-column.d.ts +2 -13
  49. package/table/tokens.d.ts +25 -0
package/fesm5/cdk.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cdk.js","sources":["../../../../../../src/cdk/version.ts","../../../../../../src/cdk/public-api.ts","../../../../../../src/cdk/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('9.2.0-next.0');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './version';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;AAQA,AAEA;AACA,IAAa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC;;ACXvD;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
1
+ {"version":3,"file":"cdk.js","sources":["../../../../../../src/cdk/version.ts","../../../../../../src/cdk/public-api.ts","../../../../../../src/cdk/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('9.2.0');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './version';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;AAQA,AAEA;AACA,IAAa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC;;ACXvD;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
package/fesm5/coercion.js CHANGED
@@ -41,7 +41,6 @@ function _isNumberValue(value) {
41
41
  * Use of this source code is governed by an MIT-style license that can be
42
42
  * found in the LICENSE file at https://angular.io/license
43
43
  */
44
- /** Wraps the provided value in an array, unless the provided value is an array. */
45
44
  function coerceArray(value) {
46
45
  return Array.isArray(value) ? value : [value];
47
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"coercion.js","sources":["../../../../../../src/cdk/coercion/boolean-property.ts","../../../../../../src/cdk/coercion/number-property.ts","../../../../../../src/cdk/coercion/array.ts","../../../../../../src/cdk/coercion/css-pixel-value.ts","../../../../../../src/cdk/coercion/element.ts","../../../../../../src/cdk/coercion/public-api.ts","../../../../../../src/cdk/coercion/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Type describing the allowed values for a boolean input.\n * @docs-private\n */\nexport type BooleanInput = string | boolean | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a boolean. */\nexport function coerceBooleanProperty(value: any): boolean {\n return value != null && `${value}` !== 'false';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Type describing the allowed values for a number input\n * @docs-private\n */\nexport type NumberInput = string | number | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a number. */\nexport function coerceNumberProperty(value: any): number;\nexport function coerceNumberProperty<D>(value: any, fallback: D): number | D;\nexport function coerceNumberProperty(value: any, fallbackValue = 0) {\n return _isNumberValue(value) ? Number(value) : fallbackValue;\n}\n\n/**\n * Whether the provided value is considered a number.\n * @docs-private\n */\nexport function _isNumberValue(value: any): boolean {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value as any)) && !isNaN(Number(value));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** Wraps the provided value in an array, unless the provided value is an array. */\nexport function coerceArray<T>(value: T | T[]): T[] {\n return Array.isArray(value) ? value : [value];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** Coerces a value to a CSS pixel value. */\nexport function coerceCssPixelValue(value: any): string {\n if (value == null) {\n return '';\n }\n\n return typeof value === 'string' ? value : `${value}px`;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ElementRef} from '@angular/core';\n\n/**\n * Coerces an ElementRef or an Element into an element.\n * Useful for APIs that can accept either a ref or the native element itself.\n */\nexport function coerceElement<T>(elementOrRef: ElementRef<T> | T): T {\n return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './boolean-property';\nexport * from './number-property';\nexport * from './array';\nexport * from './css-pixel-value';\nexport * from './element';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;;AAeA,SAAgB,qBAAqB,CAAC,KAAU;IAC9C,OAAO,KAAK,IAAI,IAAI,IAAI,KAAG,KAAO,KAAK,OAAO,CAAC;CAChD;;ACjBD;;;;;;;AAiBA,SAAgB,oBAAoB,CAAC,KAAU,EAAE,aAAiB;IAAjB,8BAAA,EAAA,iBAAiB;IAChE,OAAO,cAAc,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC;CAC9D;;;;;AAMD,SAAgB,cAAc,CAAC,KAAU;;;;IAIvC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,KAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;CAClE;;AC9BD;;;;;;;;AASA,SAAgB,WAAW,CAAI,KAAc;IAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;CAC/C;;ACXD;;;;;;;;AASA,SAAgB,mBAAmB,CAAC,KAAU;IAC5C,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,EAAE,CAAC;KACX;IAED,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAM,KAAK,OAAI,CAAC;CACzD;;ACfD;;;;;;;AAQA,AAEA;;;;AAIA,SAAgB,aAAa,CAAI,YAA+B;IAC9D,OAAO,YAAY,YAAY,UAAU,GAAG,YAAY,CAAC,aAAa,GAAG,YAAY,CAAC;CACvF;;AChBD;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
1
+ {"version":3,"file":"coercion.js","sources":["../../../../../../src/cdk/coercion/boolean-property.ts","../../../../../../src/cdk/coercion/number-property.ts","../../../../../../src/cdk/coercion/array.ts","../../../../../../src/cdk/coercion/css-pixel-value.ts","../../../../../../src/cdk/coercion/element.ts","../../../../../../src/cdk/coercion/public-api.ts","../../../../../../src/cdk/coercion/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Type describing the allowed values for a boolean input.\n * @docs-private\n */\nexport type BooleanInput = string | boolean | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a boolean. */\nexport function coerceBooleanProperty(value: any): boolean {\n return value != null && `${value}` !== 'false';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Type describing the allowed values for a number input\n * @docs-private\n */\nexport type NumberInput = string | number | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a number. */\nexport function coerceNumberProperty(value: any): number;\nexport function coerceNumberProperty<D>(value: any, fallback: D): number | D;\nexport function coerceNumberProperty(value: any, fallbackValue = 0) {\n return _isNumberValue(value) ? Number(value) : fallbackValue;\n}\n\n/**\n * Whether the provided value is considered a number.\n * @docs-private\n */\nexport function _isNumberValue(value: any): boolean {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value as any)) && !isNaN(Number(value));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** Wraps the provided value in an array, unless the provided value is an array. */\nexport function coerceArray<T>(value: T | T[]): T[];\nexport function coerceArray<T>(value: T | readonly T[]): readonly T[];\nexport function coerceArray<T>(value: T | T[]): T[] {\n return Array.isArray(value) ? value : [value];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** Coerces a value to a CSS pixel value. */\nexport function coerceCssPixelValue(value: any): string {\n if (value == null) {\n return '';\n }\n\n return typeof value === 'string' ? value : `${value}px`;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ElementRef} from '@angular/core';\n\n/**\n * Coerces an ElementRef or an Element into an element.\n * Useful for APIs that can accept either a ref or the native element itself.\n */\nexport function coerceElement<T>(elementOrRef: ElementRef<T> | T): T {\n return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './boolean-property';\nexport * from './number-property';\nexport * from './array';\nexport * from './css-pixel-value';\nexport * from './element';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;;AAeA,SAAgB,qBAAqB,CAAC,KAAU;IAC9C,OAAO,KAAK,IAAI,IAAI,IAAI,KAAG,KAAO,KAAK,OAAO,CAAC;CAChD;;ACjBD;;;;;;;AAiBA,SAAgB,oBAAoB,CAAC,KAAU,EAAE,aAAiB;IAAjB,8BAAA,EAAA,iBAAiB;IAChE,OAAO,cAAc,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC;CAC9D;;;;;AAMD,SAAgB,cAAc,CAAC,KAAU;;;;IAIvC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,KAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;CAClE;;AC9BD;;;;;;;AAWA,SAAgB,WAAW,CAAI,KAAc;IAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;CAC/C;;ACbD;;;;;;;;AASA,SAAgB,mBAAmB,CAAC,KAAU;IAC5C,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,EAAE,CAAC;KACX;IAED,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAM,KAAK,OAAI,CAAC;CACzD;;ACfD;;;;;;;AAQA,AAEA;;;;AAIA,SAAgB,aAAa,CAAI,YAA+B;IAC9D,OAAO,YAAY,YAAY,UAAU,GAAG,YAAY,CAAC,aAAa,GAAG,YAAY,CAAC;CACvF;;AChBD;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
package/fesm5/table.js CHANGED
@@ -5,7 +5,7 @@ import { isDataSource } from '@angular/cdk/collections';
5
5
  export { DataSource } from '@angular/cdk/collections';
6
6
  import { Platform } from '@angular/cdk/platform';
7
7
  import { DOCUMENT } from '@angular/common';
8
- import { Directive, TemplateRef, Input, ContentChild, ElementRef, IterableDiffers, ViewContainerRef, Component, ChangeDetectionStrategy, ViewEncapsulation, EmbeddedViewRef, isDevMode, ChangeDetectorRef, Attribute, Optional, Inject, ViewChild, ContentChildren, InjectionToken, NgModule } from '@angular/core';
8
+ import { InjectionToken, Directive, TemplateRef, Inject, Optional, Input, ContentChild, ElementRef, IterableDiffers, ViewContainerRef, Component, ChangeDetectionStrategy, ViewEncapsulation, EmbeddedViewRef, isDevMode, ChangeDetectorRef, Attribute, ViewChild, ContentChildren, NgModule } from '@angular/core';
9
9
  import { Subject, BehaviorSubject, isObservable, of } from 'rxjs';
10
10
  import { takeUntil } from 'rxjs/operators';
11
11
 
@@ -61,6 +61,21 @@ function mixinHasStickyInput(base) {
61
61
  }(base));
62
62
  }
63
63
 
64
+ /**
65
+ * @license
66
+ * Copyright Google LLC All Rights Reserved.
67
+ *
68
+ * Use of this source code is governed by an MIT-style license that can be
69
+ * found in the LICENSE file at https://angular.io/license
70
+ */
71
+ /**
72
+ * Used to provide a table to some of the sub-components without causing a circular dependency.
73
+ * @docs-private
74
+ */
75
+ var CDK_TABLE = new InjectionToken('CDK_TABLE');
76
+ /** Injection token that can be used to specify the text column options. */
77
+ var TEXT_COLUMN_OPTIONS = new InjectionToken('text-column-options');
78
+
64
79
  /**
65
80
  * @license
66
81
  * Copyright Google LLC All Rights Reserved.
@@ -133,8 +148,9 @@ var _CdkColumnDefBase = mixinHasStickyInput(CdkColumnDefBase);
133
148
  */
134
149
  var CdkColumnDef = /** @class */ (function (_super) {
135
150
  __extends(CdkColumnDef, _super);
136
- function CdkColumnDef() {
137
- var _this = _super !== null && _super.apply(this, arguments) || this;
151
+ function CdkColumnDef(_table) {
152
+ var _this = _super.call(this) || this;
153
+ _this._table = _table;
138
154
  _this._stickyEnd = false;
139
155
  return _this;
140
156
  }
@@ -146,11 +162,10 @@ var CdkColumnDef = /** @class */ (function (_super) {
146
162
  set: function (name) {
147
163
  // If the directive is set without a name (updated programatically), then this setter will
148
164
  // trigger with an empty string and should not overwrite the programatically set value.
149
- if (!name) {
150
- return;
165
+ if (name) {
166
+ this._name = name;
167
+ this.cssClassFriendlyName = name.replace(/[^a-z0-9_-]/ig, '-');
151
168
  }
152
- this._name = name;
153
- this.cssClassFriendlyName = name.replace(/[^a-z0-9_-]/ig, '-');
154
169
  },
155
170
  enumerable: true,
156
171
  configurable: true
@@ -179,6 +194,10 @@ var CdkColumnDef = /** @class */ (function (_super) {
179
194
  providers: [{ provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef }],
180
195
  },] }
181
196
  ];
197
+ /** @nocollapse */
198
+ CdkColumnDef.ctorParameters = function () { return [
199
+ { type: undefined, decorators: [{ type: Inject, args: [CDK_TABLE,] }, { type: Optional }] }
200
+ ]; };
182
201
  CdkColumnDef.propDecorators = {
183
202
  name: [{ type: Input, args: ['cdkColumnDef',] }],
184
203
  stickyEnd: [{ type: Input, args: ['stickyEnd',] }],
@@ -331,8 +350,10 @@ var _CdkHeaderRowDefBase = mixinHasStickyInput(CdkHeaderRowDefBase);
331
350
  */
332
351
  var CdkHeaderRowDef = /** @class */ (function (_super) {
333
352
  __extends(CdkHeaderRowDef, _super);
334
- function CdkHeaderRowDef(template, _differs) {
335
- return _super.call(this, template, _differs) || this;
353
+ function CdkHeaderRowDef(template, _differs, _table) {
354
+ var _this = _super.call(this, template, _differs) || this;
355
+ _this._table = _table;
356
+ return _this;
336
357
  }
337
358
  // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
338
359
  // Explicitly define it so that the method is called as part of the Angular lifecycle.
@@ -348,7 +369,8 @@ var CdkHeaderRowDef = /** @class */ (function (_super) {
348
369
  /** @nocollapse */
349
370
  CdkHeaderRowDef.ctorParameters = function () { return [
350
371
  { type: TemplateRef },
351
- { type: IterableDiffers }
372
+ { type: IterableDiffers },
373
+ { type: undefined, decorators: [{ type: Inject, args: [CDK_TABLE,] }, { type: Optional }] }
352
374
  ]; };
353
375
  return CdkHeaderRowDef;
354
376
  }(_CdkHeaderRowDefBase));
@@ -368,8 +390,10 @@ var _CdkFooterRowDefBase = mixinHasStickyInput(CdkFooterRowDefBase);
368
390
  */
369
391
  var CdkFooterRowDef = /** @class */ (function (_super) {
370
392
  __extends(CdkFooterRowDef, _super);
371
- function CdkFooterRowDef(template, _differs) {
372
- return _super.call(this, template, _differs) || this;
393
+ function CdkFooterRowDef(template, _differs, _table) {
394
+ var _this = _super.call(this, template, _differs) || this;
395
+ _this._table = _table;
396
+ return _this;
373
397
  }
374
398
  // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
375
399
  // Explicitly define it so that the method is called as part of the Angular lifecycle.
@@ -385,7 +409,8 @@ var CdkFooterRowDef = /** @class */ (function (_super) {
385
409
  /** @nocollapse */
386
410
  CdkFooterRowDef.ctorParameters = function () { return [
387
411
  { type: TemplateRef },
388
- { type: IterableDiffers }
412
+ { type: IterableDiffers },
413
+ { type: undefined, decorators: [{ type: Inject, args: [CDK_TABLE,] }, { type: Optional }] }
389
414
  ]; };
390
415
  return CdkFooterRowDef;
391
416
  }(_CdkFooterRowDefBase));
@@ -398,8 +423,10 @@ var CdkRowDef = /** @class */ (function (_super) {
398
423
  __extends(CdkRowDef, _super);
399
424
  // TODO(andrewseguin): Add an input for providing a switch function to determine
400
425
  // if this template should be used.
401
- function CdkRowDef(template, _differs) {
402
- return _super.call(this, template, _differs) || this;
426
+ function CdkRowDef(template, _differs, _table) {
427
+ var _this = _super.call(this, template, _differs) || this;
428
+ _this._table = _table;
429
+ return _this;
403
430
  }
404
431
  CdkRowDef.decorators = [
405
432
  { type: Directive, args: [{
@@ -410,7 +437,8 @@ var CdkRowDef = /** @class */ (function (_super) {
410
437
  /** @nocollapse */
411
438
  CdkRowDef.ctorParameters = function () { return [
412
439
  { type: TemplateRef },
413
- { type: IterableDiffers }
440
+ { type: IterableDiffers },
441
+ { type: undefined, decorators: [{ type: Inject, args: [CDK_TABLE,] }, { type: Optional }] }
414
442
  ]; };
415
443
  return CdkRowDef;
416
444
  }(BaseRowDef));
@@ -1406,7 +1434,7 @@ var CdkTable = /** @class */ (function () {
1406
1434
  CdkTable.prototype._cacheColumnDefs = function () {
1407
1435
  var _this = this;
1408
1436
  this._columnDefsByName.clear();
1409
- var columnDefs = mergeQueryListAndSet(this._contentColumnDefs, this._customColumnDefs);
1437
+ var columnDefs = mergeArrayAndSet(this._getOwnDefs(this._contentColumnDefs), this._customColumnDefs);
1410
1438
  columnDefs.forEach(function (columnDef) {
1411
1439
  if (_this._columnDefsByName.has(columnDef.name)) {
1412
1440
  throw getTableDuplicateColumnNameError(columnDef.name);
@@ -1416,11 +1444,9 @@ var CdkTable = /** @class */ (function () {
1416
1444
  };
1417
1445
  /** Update the list of all available row definitions that can be used. */
1418
1446
  CdkTable.prototype._cacheRowDefs = function () {
1419
- this._headerRowDefs =
1420
- mergeQueryListAndSet(this._contentHeaderRowDefs, this._customHeaderRowDefs);
1421
- this._footerRowDefs =
1422
- mergeQueryListAndSet(this._contentFooterRowDefs, this._customFooterRowDefs);
1423
- this._rowDefs = mergeQueryListAndSet(this._contentRowDefs, this._customRowDefs);
1447
+ this._headerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentHeaderRowDefs), this._customHeaderRowDefs);
1448
+ this._footerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentFooterRowDefs), this._customFooterRowDefs);
1449
+ this._rowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentRowDefs), this._customRowDefs);
1424
1450
  // After all row definitions are determined, find the row definition to be considered default.
1425
1451
  var defaultRowDefs = this._rowDefs.filter(function (def) { return !def.when; });
1426
1452
  if (!this.multiTemplateDataRows && defaultRowDefs.length > 1) {
@@ -1721,6 +1747,11 @@ var CdkTable = /** @class */ (function () {
1721
1747
  _this.updateStickyColumnStyles();
1722
1748
  });
1723
1749
  };
1750
+ /** Filters definitions that belong to this table from a QueryList. */
1751
+ CdkTable.prototype._getOwnDefs = function (items) {
1752
+ var _this = this;
1753
+ return items.filter(function (item) { return !item._table || item._table === _this; });
1754
+ };
1724
1755
  CdkTable.decorators = [
1725
1756
  { type: Component, args: [{
1726
1757
  selector: 'cdk-table, table[cdk-table]',
@@ -1734,7 +1765,8 @@ var CdkTable = /** @class */ (function () {
1734
1765
  // The view for `MatTable` consists entirely of templates declared in other views. As they are
1735
1766
  // declared elsewhere, they are checked when their declaration points are checked.
1736
1767
  // tslint:disable-next-line:validate-decorators
1737
- changeDetection: ChangeDetectionStrategy.Default
1768
+ changeDetection: ChangeDetectionStrategy.Default,
1769
+ providers: [{ provide: CDK_TABLE, useExisting: CdkTable }]
1738
1770
  }] }
1739
1771
  ];
1740
1772
  /** @nocollapse */
@@ -1765,9 +1797,9 @@ var CdkTable = /** @class */ (function () {
1765
1797
  };
1766
1798
  return CdkTable;
1767
1799
  }());
1768
- /** Utility function that gets a merged list of the entries in a QueryList and values of a Set. */
1769
- function mergeQueryListAndSet(queryList, set) {
1770
- return queryList.toArray().concat(Array.from(set));
1800
+ /** Utility function that gets a merged list of the entries in an array and values of a Set. */
1801
+ function mergeArrayAndSet(array, set) {
1802
+ return array.concat(Array.from(set));
1771
1803
  }
1772
1804
 
1773
1805
  /**
@@ -1777,8 +1809,6 @@ function mergeQueryListAndSet(queryList, set) {
1777
1809
  * Use of this source code is governed by an MIT-style license that can be
1778
1810
  * found in the LICENSE file at https://angular.io/license
1779
1811
  */
1780
- /** Injection token that can be used to specify the text column options. */
1781
- var TEXT_COLUMN_OPTIONS = new InjectionToken('text-column-options');
1782
1812
  /**
1783
1813
  * Column that simply shows text content for the header and row cells. Assumes that the table
1784
1814
  * is using the native table implementation (`<table>`).
@@ -1939,5 +1969,5 @@ var CdkTableModule = /** @class */ (function () {
1939
1969
  * Generated bundle index. Do not edit.
1940
1970
  */
1941
1971
 
1942
- export { BaseCdkCell, BaseRowDef, CDK_ROW_TEMPLATE, CDK_TABLE_TEMPLATE, CdkCell, CdkCellDef, CdkCellOutlet, CdkColumnDef, CdkFooterCell, CdkFooterCellDef, CdkFooterRow, CdkFooterRowDef, CdkHeaderCell, CdkHeaderCellDef, CdkHeaderRow, CdkHeaderRowDef, CdkRow, CdkRowDef, CdkTable, CdkTableModule, CdkTextColumn, DataRowOutlet, FooterRowOutlet, HeaderRowOutlet, STICKY_DIRECTIONS, StickyStyler, TEXT_COLUMN_OPTIONS, mixinHasStickyInput };
1972
+ export { BaseCdkCell, BaseRowDef, CDK_ROW_TEMPLATE, CDK_TABLE, CDK_TABLE_TEMPLATE, CdkCell, CdkCellDef, CdkCellOutlet, CdkColumnDef, CdkFooterCell, CdkFooterCellDef, CdkFooterRow, CdkFooterRowDef, CdkHeaderCell, CdkHeaderCellDef, CdkHeaderRow, CdkHeaderRowDef, CdkRow, CdkRowDef, CdkTable, CdkTableModule, CdkTextColumn, DataRowOutlet, FooterRowOutlet, HeaderRowOutlet, STICKY_DIRECTIONS, StickyStyler, TEXT_COLUMN_OPTIONS, mixinHasStickyInput };
1943
1973
  //# sourceMappingURL=table.js.map