Skip to content

Commit 7fde1c2

Browse files
committed
refactor(multiple): remove standalone flag from CDK
Removes all of the `standalone` flag from all components in the CDK.
1 parent 0649e2f commit 7fde1c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+103
-91
lines changed

src/cdk/a11y/focus-monitor/focus-monitor.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,6 @@ export class FocusMonitor implements OnDestroy {
617617
@Directive({
618618
selector: '[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]',
619619
exportAs: 'cdkMonitorFocus',
620-
standalone: true,
621620
})
622621
export class CdkMonitorFocus implements AfterViewInit, OnDestroy {
623622
private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);

src/cdk/a11y/focus-trap/focus-trap.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ export class FocusTrapFactory {
403403
@Directive({
404404
selector: '[cdkTrapFocus]',
405405
exportAs: 'cdkTrapFocus',
406-
standalone: true,
407406
})
408407
export class CdkTrapFocus implements OnDestroy, AfterContentInit, OnChanges, DoCheck {
409408
private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);

src/cdk/a11y/live-announcer/live-announcer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ export class LiveAnnouncer implements OnDestroy {
210210
@Directive({
211211
selector: '[cdkAriaLive]',
212212
exportAs: 'cdkAriaLive',
213-
standalone: true,
214213
})
215214
export class CdkAriaLive implements OnDestroy {
216215
private _elementRef = inject(ElementRef);

src/cdk/accordion/accordion-item.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ let nextId = 0;
3636
// registering to the same accordion.
3737
{provide: CDK_ACCORDION, useValue: undefined},
3838
],
39-
standalone: true,
4039
})
4140
export class CdkAccordionItem implements OnInit, OnDestroy {
4241
accordion = inject<CdkAccordion>(CDK_ACCORDION, {optional: true, skipSelf: true})!;

src/cdk/accordion/accordion.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export const CDK_ACCORDION = new InjectionToken<CdkAccordion>('CdkAccordion');
3434
selector: 'cdk-accordion, [cdkAccordion]',
3535
exportAs: 'cdkAccordion',
3636
providers: [{provide: CDK_ACCORDION, useExisting: CdkAccordion}],
37-
standalone: true,
3837
})
3938
export class CdkAccordion implements OnDestroy, OnChanges {
4039
/** Emits when the state of the accordion changes */

src/cdk/bidi/dir.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {Direction, Directionality, _resolveDirectionality} from './directionalit
2121
providers: [{provide: Directionality, useExisting: Dir}],
2222
host: {'[attr.dir]': '_rawDir'},
2323
exportAs: 'dir',
24-
standalone: true,
2524
})
2625
export class Dir implements Directionality, AfterContentInit, OnDestroy {
2726
/** Normalized direction that accounts for invalid/unsupported values. */

src/cdk/clipboard/copy-to-clipboard.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export const CDK_COPY_TO_CLIPBOARD_CONFIG = new InjectionToken<CdkCopyToClipboar
3939
host: {
4040
'(click)': 'copy()',
4141
},
42-
standalone: true,
4342
})
4443
export class CdkCopyToClipboard implements OnDestroy {
4544
private _clipboard = inject(Clipboard);

src/cdk/dialog/dialog-container.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export function throwDialogContentAlreadyAttachedError() {
5656
// Using OnPush for dialogs caused some G3 sync issues. Disabled until we can track them down.
5757
// tslint:disable-next-line:validate-decorators
5858
changeDetection: ChangeDetectionStrategy.Default,
59-
standalone: true,
6059
imports: [CdkPortalOutlet],
6160
host: {
6261
'class': 'cdk-dialog-container',

src/cdk/dialog/dialog.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,6 +1214,7 @@ class DirectiveWithViewContainer {
12141214
@Component({
12151215
changeDetection: ChangeDetectionStrategy.OnPush,
12161216
template: 'hello',
1217+
standalone: false,
12171218
})
12181219
class ComponentWithOnPushViewContainer {
12191220
viewContainerRef = inject(ViewContainerRef);
@@ -1305,6 +1306,7 @@ class DialogWithoutFocusableElements {}
13051306
@Component({
13061307
template: `<button>I'm a button</button>`,
13071308
encapsulation: ViewEncapsulation.ShadowDom,
1309+
standalone: false,
13081310
})
13091311
class ShadowDomComponent {}
13101312

src/cdk/drag-drop/directives/drag-handle.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export const CDK_DRAG_HANDLE = new InjectionToken<CdkDragHandle>('CdkDragHandle'
3030
/** Handle that can be used to drag a CdkDrag instance. */
3131
@Directive({
3232
selector: '[cdkDragHandle]',
33-
standalone: true,
3433
host: {
3534
'class': 'cdk-drag-handle',
3635
},

0 commit comments

Comments
 (0)