@angular/cdk 13.2.0-next.0 → 13.2.0-next.1

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 (52) hide show
  1. package/LICENSE +1 -1
  2. package/esm2020/a11y/focus-monitor/focus-monitor.mjs +2 -2
  3. package/esm2020/overlay/position/flexible-connected-position-strategy.mjs +23 -15
  4. package/esm2020/table/cell.mjs +2 -7
  5. package/esm2020/table/table.mjs +23 -6
  6. package/esm2020/testing/harness-environment.mjs +9 -2
  7. package/esm2020/testing/selenium-webdriver/selenium-web-driver-harness-environment.mjs +3 -2
  8. package/esm2020/testing/testbed/testbed-harness-environment.mjs +3 -2
  9. package/esm2020/text-field/autosize.mjs +7 -2
  10. package/esm2020/version.mjs +1 -1
  11. package/fesm2015/a11y.mjs +1 -1
  12. package/fesm2015/a11y.mjs.map +1 -1
  13. package/fesm2015/cdk.mjs +1 -1
  14. package/fesm2015/cdk.mjs.map +1 -1
  15. package/fesm2015/overlay.mjs +22 -14
  16. package/fesm2015/overlay.mjs.map +1 -1
  17. package/fesm2015/table.mjs +22 -10
  18. package/fesm2015/table.mjs.map +1 -1
  19. package/fesm2015/testing/selenium-webdriver.mjs +2 -1
  20. package/fesm2015/testing/selenium-webdriver.mjs.map +1 -1
  21. package/fesm2015/testing/testbed.mjs +2 -1
  22. package/fesm2015/testing/testbed.mjs.map +1 -1
  23. package/fesm2015/testing.mjs +8 -1
  24. package/fesm2015/testing.mjs.map +1 -1
  25. package/fesm2015/text-field.mjs +6 -1
  26. package/fesm2015/text-field.mjs.map +1 -1
  27. package/fesm2020/a11y.mjs +1 -1
  28. package/fesm2020/a11y.mjs.map +1 -1
  29. package/fesm2020/cdk.mjs +1 -1
  30. package/fesm2020/cdk.mjs.map +1 -1
  31. package/fesm2020/overlay.mjs +22 -14
  32. package/fesm2020/overlay.mjs.map +1 -1
  33. package/fesm2020/table.mjs +22 -10
  34. package/fesm2020/table.mjs.map +1 -1
  35. package/fesm2020/testing/selenium-webdriver.mjs +2 -1
  36. package/fesm2020/testing/selenium-webdriver.mjs.map +1 -1
  37. package/fesm2020/testing/testbed.mjs +2 -1
  38. package/fesm2020/testing/testbed.mjs.map +1 -1
  39. package/fesm2020/testing.mjs +8 -1
  40. package/fesm2020/testing.mjs.map +1 -1
  41. package/fesm2020/text-field.mjs +6 -1
  42. package/fesm2020/text-field.mjs.map +1 -1
  43. package/overlay/position/flexible-connected-position-strategy.d.ts +4 -2
  44. package/package.json +1 -1
  45. package/schematics/ng-add/index.js +1 -1
  46. package/schematics/ng-add/index.mjs +1 -1
  47. package/schematics/ng-update/migrations/tilde-import-v13/tilde-import-migration.js +5 -4
  48. package/schematics/ng-update/migrations/tilde-import-v13/tilde-import-migration.mjs +5 -4
  49. package/table/table.d.ts +13 -3
  50. package/testing/harness-environment.d.ts +3 -1
  51. package/testing/selenium-webdriver/selenium-web-driver-harness-environment.d.ts +2 -0
  52. package/testing/testbed/testbed-harness-environment.d.ts +2 -0
@@ -7,7 +7,7 @@ import * as i3 from '@angular/cdk/scrolling';
7
7
  import { ScrollingModule } from '@angular/cdk/scrolling';
8
8
  import { DOCUMENT } from '@angular/common';
9
9
  import * as i0 from '@angular/core';
10
- import { InjectionToken, Directive, Inject, Optional, Input, ContentChild, Injectable, Component, ChangeDetectionStrategy, ViewEncapsulation, EmbeddedViewRef, EventEmitter, Attribute, SkipSelf, Output, ViewChild, ContentChildren, NgModule } from '@angular/core';
10
+ import { InjectionToken, Directive, Inject, Optional, Input, ContentChild, Injectable, Component, ChangeDetectionStrategy, ViewEncapsulation, EmbeddedViewRef, EventEmitter, NgZone, Attribute, SkipSelf, Output, ViewChild, ContentChildren, NgModule } from '@angular/core';
11
11
  import { Subject, from, BehaviorSubject, isObservable, of } from 'rxjs';
12
12
  import { takeUntil, take } from 'rxjs/operators';
13
13
 
@@ -215,12 +215,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
215
215
  /** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */
216
216
  class BaseCdkCell {
217
217
  constructor(columnDef, elementRef) {
218
- // If IE 11 is dropped before we switch to setting a single class name, change to multi param
219
- // with destructuring.
220
- const classList = elementRef.nativeElement.classList;
221
- for (const className of columnDef._columnCssClassName) {
222
- classList.add(className);
223
- }
218
+ elementRef.nativeElement.classList.add(...columnDef._columnCssClassName);
224
219
  }
225
220
  }
226
221
  /** Header cell template container that adds the right classes and role. */
@@ -1174,7 +1169,12 @@ class CdkTable {
1174
1169
  * @deprecated `_stickyPositioningListener` parameter to become required.
1175
1170
  * @breaking-change 13.0.0
1176
1171
  */
1177
- _stickyPositioningListener) {
1172
+ _stickyPositioningListener,
1173
+ /**
1174
+ * @deprecated `_ngZone` parameter to become required.
1175
+ * @breaking-change 14.0.0
1176
+ */
1177
+ _ngZone) {
1178
1178
  this._differs = _differs;
1179
1179
  this._changeDetectorRef = _changeDetectorRef;
1180
1180
  this._elementRef = _elementRef;
@@ -1184,6 +1184,7 @@ class CdkTable {
1184
1184
  this._coalescedStyleScheduler = _coalescedStyleScheduler;
1185
1185
  this._viewportRuler = _viewportRuler;
1186
1186
  this._stickyPositioningListener = _stickyPositioningListener;
1187
+ this._ngZone = _ngZone;
1187
1188
  /** Subject that emits when the component has been destroyed. */
1188
1189
  this._onDestroy = new Subject();
1189
1190
  /**
@@ -1465,7 +1466,16 @@ class CdkTable {
1465
1466
  rowView.context.$implicit = record.item.data;
1466
1467
  });
1467
1468
  this._updateNoDataRow();
1468
- this.updateStickyColumnStyles();
1469
+ // Allow the new row data to render before measuring it.
1470
+ // @breaking-change 14.0.0 Remove undefined check once _ngZone is required.
1471
+ if (this._ngZone && NgZone.isInAngularZone()) {
1472
+ this._ngZone.onStable.pipe(take(1), takeUntil(this._onDestroy)).subscribe(() => {
1473
+ this.updateStickyColumnStyles();
1474
+ });
1475
+ }
1476
+ else {
1477
+ this.updateStickyColumnStyles();
1478
+ }
1469
1479
  this.contentChanged.next();
1470
1480
  }
1471
1481
  /** Adds a column definition that was not included as part of the content children. */
@@ -1981,7 +1991,7 @@ class CdkTable {
1981
1991
  this._isShowingNoDataRow = shouldShow;
1982
1992
  }
1983
1993
  }
1984
- CdkTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CdkTable, deps: [{ token: i0.IterableDiffers }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: 'role', attribute: true }, { token: i1.Directionality, optional: true }, { token: DOCUMENT }, { token: i2.Platform }, { token: _VIEW_REPEATER_STRATEGY }, { token: _COALESCED_STYLE_SCHEDULER }, { token: i3.ViewportRuler }, { token: STICKY_POSITIONING_LISTENER, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
1994
+ CdkTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CdkTable, deps: [{ token: i0.IterableDiffers }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: 'role', attribute: true }, { token: i1.Directionality, optional: true }, { token: DOCUMENT }, { token: i2.Platform }, { token: _VIEW_REPEATER_STRATEGY }, { token: _COALESCED_STYLE_SCHEDULER }, { token: i3.ViewportRuler }, { token: STICKY_POSITIONING_LISTENER, optional: true, skipSelf: true }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1985
1995
  CdkTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: CdkTable, selector: "cdk-table, table[cdk-table]", inputs: { trackBy: "trackBy", dataSource: "dataSource", multiTemplateDataRows: "multiTemplateDataRows", fixedLayout: "fixedLayout" }, outputs: { contentChanged: "contentChanged" }, host: { properties: { "class.cdk-table-fixed-layout": "fixedLayout" }, classAttribute: "cdk-table" }, providers: [
1986
1996
  { provide: CDK_TABLE, useExisting: CdkTable },
1987
1997
  { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },
@@ -2022,6 +2032,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
2022
2032
  }, {
2023
2033
  type: Inject,
2024
2034
  args: [STICKY_POSITIONING_LISTENER]
2035
+ }] }, { type: i0.NgZone, decorators: [{
2036
+ type: Optional
2025
2037
  }] }]; }, propDecorators: { trackBy: [{
2026
2038
  type: Input
2027
2039
  }], dataSource: [{