@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
@@ -3,7 +3,7 @@ import { _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy, isDataSource, _D
3
3
  export { DataSource } from '@angular/cdk/collections';
4
4
  import { DOCUMENT } from '@angular/common';
5
5
  import * as i0 from '@angular/core';
6
- import { InjectionToken, Directive, Inject, Optional, Input, ContentChild, Injectable, Component, ChangeDetectionStrategy, ViewEncapsulation, EmbeddedViewRef, EventEmitter, Attribute, SkipSelf, Output, ViewChild, ContentChildren, NgModule } from '@angular/core';
6
+ import { InjectionToken, Directive, Inject, Optional, Input, ContentChild, Injectable, Component, ChangeDetectionStrategy, ViewEncapsulation, EmbeddedViewRef, EventEmitter, NgZone, Attribute, SkipSelf, Output, ViewChild, ContentChildren, NgModule } from '@angular/core';
7
7
  import { Subject, from, BehaviorSubject, isObservable, of } from 'rxjs';
8
8
  import { takeUntil, take } from 'rxjs/operators';
9
9
  import * as i1 from '@angular/cdk/bidi';
@@ -217,12 +217,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
217
217
  /** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */
218
218
  class BaseCdkCell {
219
219
  constructor(columnDef, elementRef) {
220
- // If IE 11 is dropped before we switch to setting a single class name, change to multi param
221
- // with destructuring.
222
- const classList = elementRef.nativeElement.classList;
223
- for (const className of columnDef._columnCssClassName) {
224
- classList.add(className);
225
- }
220
+ elementRef.nativeElement.classList.add(...columnDef._columnCssClassName);
226
221
  }
227
222
  }
228
223
  /** Header cell template container that adds the right classes and role. */
@@ -1178,7 +1173,12 @@ class CdkTable {
1178
1173
  * @deprecated `_stickyPositioningListener` parameter to become required.
1179
1174
  * @breaking-change 13.0.0
1180
1175
  */
1181
- _stickyPositioningListener) {
1176
+ _stickyPositioningListener,
1177
+ /**
1178
+ * @deprecated `_ngZone` parameter to become required.
1179
+ * @breaking-change 14.0.0
1180
+ */
1181
+ _ngZone) {
1182
1182
  this._differs = _differs;
1183
1183
  this._changeDetectorRef = _changeDetectorRef;
1184
1184
  this._elementRef = _elementRef;
@@ -1188,6 +1188,7 @@ class CdkTable {
1188
1188
  this._coalescedStyleScheduler = _coalescedStyleScheduler;
1189
1189
  this._viewportRuler = _viewportRuler;
1190
1190
  this._stickyPositioningListener = _stickyPositioningListener;
1191
+ this._ngZone = _ngZone;
1191
1192
  /** Subject that emits when the component has been destroyed. */
1192
1193
  this._onDestroy = new Subject();
1193
1194
  /**
@@ -1469,7 +1470,16 @@ class CdkTable {
1469
1470
  rowView.context.$implicit = record.item.data;
1470
1471
  });
1471
1472
  this._updateNoDataRow();
1472
- this.updateStickyColumnStyles();
1473
+ // Allow the new row data to render before measuring it.
1474
+ // @breaking-change 14.0.0 Remove undefined check once _ngZone is required.
1475
+ if (this._ngZone && NgZone.isInAngularZone()) {
1476
+ this._ngZone.onStable.pipe(take(1), takeUntil(this._onDestroy)).subscribe(() => {
1477
+ this.updateStickyColumnStyles();
1478
+ });
1479
+ }
1480
+ else {
1481
+ this.updateStickyColumnStyles();
1482
+ }
1473
1483
  this.contentChanged.next();
1474
1484
  }
1475
1485
  /** Adds a column definition that was not included as part of the content children. */
@@ -1985,7 +1995,7 @@ class CdkTable {
1985
1995
  this._isShowingNoDataRow = shouldShow;
1986
1996
  }
1987
1997
  }
1988
- 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 });
1998
+ 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 });
1989
1999
  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: [
1990
2000
  { provide: CDK_TABLE, useExisting: CdkTable },
1991
2001
  { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },
@@ -2027,6 +2037,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
2027
2037
  }, {
2028
2038
  type: Inject,
2029
2039
  args: [STICKY_POSITIONING_LISTENER]
2040
+ }] }, { type: i0.NgZone, decorators: [{
2041
+ type: Optional
2030
2042
  }] }];
2031
2043
  }, propDecorators: { trackBy: [{
2032
2044
  type: Input