@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.
- package/LICENSE +1 -1
- package/esm2020/a11y/focus-monitor/focus-monitor.mjs +2 -2
- package/esm2020/overlay/position/flexible-connected-position-strategy.mjs +23 -15
- package/esm2020/table/cell.mjs +2 -7
- package/esm2020/table/table.mjs +23 -6
- package/esm2020/testing/harness-environment.mjs +9 -2
- package/esm2020/testing/selenium-webdriver/selenium-web-driver-harness-environment.mjs +3 -2
- package/esm2020/testing/testbed/testbed-harness-environment.mjs +3 -2
- package/esm2020/text-field/autosize.mjs +7 -2
- package/esm2020/version.mjs +1 -1
- package/fesm2015/a11y.mjs +1 -1
- package/fesm2015/a11y.mjs.map +1 -1
- package/fesm2015/cdk.mjs +1 -1
- package/fesm2015/cdk.mjs.map +1 -1
- package/fesm2015/overlay.mjs +22 -14
- package/fesm2015/overlay.mjs.map +1 -1
- package/fesm2015/table.mjs +22 -10
- package/fesm2015/table.mjs.map +1 -1
- package/fesm2015/testing/selenium-webdriver.mjs +2 -1
- package/fesm2015/testing/selenium-webdriver.mjs.map +1 -1
- package/fesm2015/testing/testbed.mjs +2 -1
- package/fesm2015/testing/testbed.mjs.map +1 -1
- package/fesm2015/testing.mjs +8 -1
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2015/text-field.mjs +6 -1
- package/fesm2015/text-field.mjs.map +1 -1
- package/fesm2020/a11y.mjs +1 -1
- package/fesm2020/a11y.mjs.map +1 -1
- package/fesm2020/cdk.mjs +1 -1
- package/fesm2020/cdk.mjs.map +1 -1
- package/fesm2020/overlay.mjs +22 -14
- package/fesm2020/overlay.mjs.map +1 -1
- package/fesm2020/table.mjs +22 -10
- package/fesm2020/table.mjs.map +1 -1
- package/fesm2020/testing/selenium-webdriver.mjs +2 -1
- package/fesm2020/testing/selenium-webdriver.mjs.map +1 -1
- package/fesm2020/testing/testbed.mjs +2 -1
- package/fesm2020/testing/testbed.mjs.map +1 -1
- package/fesm2020/testing.mjs +8 -1
- package/fesm2020/testing.mjs.map +1 -1
- package/fesm2020/text-field.mjs +6 -1
- package/fesm2020/text-field.mjs.map +1 -1
- package/overlay/position/flexible-connected-position-strategy.d.ts +4 -2
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-update/migrations/tilde-import-v13/tilde-import-migration.js +5 -4
- package/schematics/ng-update/migrations/tilde-import-v13/tilde-import-migration.mjs +5 -4
- package/table/table.d.ts +13 -3
- package/testing/harness-environment.d.ts +3 -1
- package/testing/selenium-webdriver/selenium-web-driver-harness-environment.d.ts +2 -0
- package/testing/testbed/testbed-harness-environment.d.ts +2 -0
package/fesm2015/table.mjs
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|