Skip to content

Commit 8078efc

Browse files
committed
fix(cdk/table): breaking changes for v20
Makes the breaking changes for v20 in `cdk/table`. BREAKING CHANGE: * `Constructor` symbol has been removed. * `CanStickCtor` symbol has been removed. * `mixinHasStickyInput` has been removed. Implement the `CanStick` interface instead.
1 parent b3e516f commit 8078efc

File tree

2 files changed

+0
-59
lines changed

2 files changed

+0
-59
lines changed

src/cdk/table/can-stick.ts

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';
10-
11-
/** @docs-private */
12-
export type Constructor<T> = new (...args: any[]) => T;
13-
149
/**
1510
* Interface for a mixin to provide a directive with a function that checks if the sticky input has
1611
* been changed since the last time the function was called. Essentially adds a dirty-check to the
@@ -27,48 +22,3 @@ export interface CanStick {
2722
/** Resets the dirty check for cases where the sticky state has been used without checking. */
2823
resetStickyChanged(): void;
2924
}
30-
31-
/** @docs-private */
32-
export type CanStickCtor = Constructor<CanStick>;
33-
34-
/**
35-
* Mixin to provide a directive with a function that checks if the sticky input has been
36-
* changed since the last time the function was called. Essentially adds a dirty-check to the
37-
* sticky value.
38-
* @docs-private
39-
* @deprecated Implement the `CanStick` interface instead.
40-
* @breaking-change 19.0.0
41-
*/
42-
export function mixinHasStickyInput<T extends Constructor<{}>>(base: T): CanStickCtor & T {
43-
return class extends base {
44-
/** Whether sticky positioning should be applied. */
45-
get sticky(): boolean {
46-
return this._sticky;
47-
}
48-
set sticky(v: BooleanInput) {
49-
const prevValue = this._sticky;
50-
this._sticky = coerceBooleanProperty(v);
51-
this._hasStickyChanged = prevValue !== this._sticky;
52-
}
53-
_sticky: boolean = false;
54-
55-
/** Whether the sticky input has changed since it was last checked. */
56-
_hasStickyChanged: boolean = false;
57-
58-
/** Whether the sticky value has changed since this was last called. */
59-
hasStickyChanged(): boolean {
60-
const hasStickyChanged = this._hasStickyChanged;
61-
this._hasStickyChanged = false;
62-
return hasStickyChanged;
63-
}
64-
65-
/** Resets the dirty check for cases where the sticky state has been used without checking. */
66-
resetStickyChanged() {
67-
this._hasStickyChanged = false;
68-
}
69-
70-
constructor(...args: any[]) {
71-
super(...args);
72-
}
73-
};
74-
}

tools/public_api_guard/cdk/table.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ export interface CanStick {
6363
sticky: boolean;
6464
}
6565

66-
// @public
67-
export type CanStickCtor = Constructor<CanStick>;
68-
6966
// @public
7067
export const CDK_ROW_TEMPLATE = "<ng-container cdkCellOutlet></ng-container>";
7168

@@ -442,9 +439,6 @@ export class _CoalescedStyleScheduler {
442439
static ɵprov: i0.ɵɵInjectableDeclaration<_CoalescedStyleScheduler>;
443440
}
444441

445-
// @public
446-
export type Constructor<T> = new (...args: any[]) => T;
447-
448442
// @public
449443
export class DataRowOutlet implements RowOutlet {
450444
constructor(...args: unknown[]);
@@ -486,9 +480,6 @@ export class HeaderRowOutlet implements RowOutlet {
486480
static ɵfac: i0.ɵɵFactoryDeclaration<HeaderRowOutlet, never>;
487481
}
488482

489-
// @public @deprecated
490-
export function mixinHasStickyInput<T extends Constructor<{}>>(base: T): CanStickCtor & T;
491-
492483
// @public
493484
export class NoDataRowOutlet implements RowOutlet {
494485
constructor(...args: unknown[]);

0 commit comments

Comments
 (0)