Skip to content

Commit b84ebdc

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

File tree

148 files changed

+297
-209
lines changed

Some content is hidden

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

148 files changed

+297
-209
lines changed

integration/harness-e2e-cli/src/app/app.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {Component} from '@angular/core';
33
@Component({
44
selector: 'app-root',
55
templateUrl: './app.component.html',
6+
standalone: false,
67
})
78
export class AppComponent {
89
title = 'harness-e2e-cli';

integration/yarn-pnp-compat/src/app/app.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {Component} from '@angular/core';
44
selector: 'app-root',
55
templateUrl: './app.component.html',
66
styleUrls: ['./app.component.scss'],
7+
standalone: false,
78
})
89
export class AppComponent {
910
title = 'yarn-pnp-compat';

src/material/autocomplete/autocomplete-origin.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {Directive, ElementRef, inject} from '@angular/core';
1515
@Directive({
1616
selector: '[matAutocompleteOrigin]',
1717
exportAs: 'matAutocompleteOrigin',
18-
standalone: true,
1918
})
2019
export class MatAutocompleteOrigin {
2120
elementRef = inject<ElementRef<HTMLElement>>(ElementRef);

src/material/autocomplete/autocomplete-trigger.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ export const MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = {
126126
},
127127
exportAs: 'matAutocompleteTrigger',
128128
providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR],
129-
standalone: true,
130129
})
131130
export class MatAutocompleteTrigger
132131
implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy

src/material/autocomplete/autocomplete.spec.ts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3962,7 +3962,7 @@ const SIMPLE_AUTOCOMPLETE_TEMPLATE = `
39623962
</mat-autocomplete>
39633963
`;
39643964

3965-
@Component({template: SIMPLE_AUTOCOMPLETE_TEMPLATE})
3965+
@Component({template: SIMPLE_AUTOCOMPLETE_TEMPLATE, standalone: false})
39663966
class SimpleAutocomplete implements OnDestroy {
39673967
stateCtrl = new FormControl<{name: string; code: string} | string | null>(null);
39683968
filteredStates: any[];
@@ -4018,7 +4018,11 @@ class SimpleAutocomplete implements OnDestroy {
40184018
}
40194019
}
40204020

4021-
@Component({template: SIMPLE_AUTOCOMPLETE_TEMPLATE, encapsulation: ViewEncapsulation.ShadowDom})
4021+
@Component({
4022+
template: SIMPLE_AUTOCOMPLETE_TEMPLATE,
4023+
encapsulation: ViewEncapsulation.ShadowDom,
4024+
standalone: false,
4025+
})
40224026
class SimpleAutocompleteShadowDom extends SimpleAutocomplete {}
40234027

40244028
@Component({
@@ -4037,6 +4041,7 @@ class SimpleAutocompleteShadowDom extends SimpleAutocomplete {}
40374041
}
40384042
</mat-autocomplete>
40394043
`,
4044+
standalone: false,
40404045
})
40414046
class NgIfAutocomplete {
40424047
optionCtrl = new FormControl('');
@@ -4074,6 +4079,7 @@ class NgIfAutocomplete {
40744079
}
40754080
</mat-autocomplete>
40764081
`,
4082+
standalone: false,
40774083
})
40784084
class AutocompleteWithoutForms {
40794085
filteredStates: any[];
@@ -4103,6 +4109,7 @@ class AutocompleteWithoutForms {
41034109
}
41044110
</mat-autocomplete>
41054111
`,
4112+
standalone: false,
41064113
})
41074114
class AutocompleteWithNgModel {
41084115
filteredStates: any[];
@@ -4134,6 +4141,7 @@ class AutocompleteWithNgModel {
41344141
}
41354142
</mat-autocomplete>
41364143
`,
4144+
standalone: false,
41374145
})
41384146
class AutocompleteWithNumbers {
41394147
selectedNumber: number;
@@ -4153,6 +4161,7 @@ class AutocompleteWithNumbers {
41534161
}
41544162
</mat-autocomplete>
41554163
`,
4164+
standalone: false,
41564165
})
41574166
class AutocompleteWithOnPushDelay implements OnInit {
41584167
@ViewChild(MatAutocompleteTrigger) trigger: MatAutocompleteTrigger;
@@ -4175,6 +4184,7 @@ class AutocompleteWithOnPushDelay implements OnInit {
41754184
}
41764185
</mat-autocomplete>
41774186
`,
4187+
standalone: false,
41784188
})
41794189
class AutocompleteWithNativeInput {
41804190
optionCtrl = new FormControl('');
@@ -4198,6 +4208,7 @@ class AutocompleteWithNativeInput {
41984208

41994209
@Component({
42004210
template: `<input placeholder="Choose" [matAutocomplete]="auto" [formControl]="control">`,
4211+
standalone: false,
42014212
})
42024213
class AutocompleteWithoutPanel {
42034214
@ViewChild(MatAutocompleteTrigger) trigger: MatAutocompleteTrigger;
@@ -4222,6 +4233,7 @@ class AutocompleteWithoutPanel {
42224233
}
42234234
</mat-autocomplete>
42244235
`,
4236+
standalone: false,
42254237
})
42264238
class AutocompleteWithGroups {
42274239
@ViewChild(MatAutocompleteTrigger) trigger: MatAutocompleteTrigger;
@@ -4262,6 +4274,7 @@ class AutocompleteWithGroups {
42624274
}
42634275
</mat-autocomplete>
42644276
`,
4277+
standalone: false,
42654278
})
42664279
class AutocompleteWithIndirectGroups extends AutocompleteWithGroups {}
42674280

@@ -4279,6 +4292,7 @@ class AutocompleteWithIndirectGroups extends AutocompleteWithGroups {}
42794292
}
42804293
</mat-autocomplete>
42814294
`,
4295+
standalone: false,
42824296
})
42834297
class AutocompleteWithSelectEvent {
42844298
selectedState: string;
@@ -4294,6 +4308,7 @@ class AutocompleteWithSelectEvent {
42944308
<input [formControl]="formControl" [matAutocomplete]="auto"/>
42954309
<mat-autocomplete #auto="matAutocomplete"></mat-autocomplete>
42964310
`,
4311+
standalone: false,
42974312
})
42984313
class PlainAutocompleteInputWithFormControl {
42994314
formControl = new FormControl('');
@@ -4311,6 +4326,7 @@ class PlainAutocompleteInputWithFormControl {
43114326
}
43124327
</mat-autocomplete>
43134328
`,
4329+
standalone: false,
43144330
})
43154331
class AutocompleteWithNumberInputAndNgModel {
43164332
selectedValue: number;
@@ -4343,6 +4359,7 @@ class AutocompleteWithNumberInputAndNgModel {
43434359
}
43444360
</mat-autocomplete>
43454361
`,
4362+
standalone: false,
43464363
})
43474364
class AutocompleteWithDifferentOrigin {
43484365
@ViewChild(MatAutocompleteTrigger) trigger: MatAutocompleteTrigger;
@@ -4357,13 +4374,15 @@ class AutocompleteWithDifferentOrigin {
43574374
<input autocomplete="changed" [(ngModel)]="value" [matAutocomplete]="auto"/>
43584375
<mat-autocomplete #auto="matAutocomplete"></mat-autocomplete>
43594376
`,
4377+
standalone: false,
43604378
})
43614379
class AutocompleteWithNativeAutocompleteAttribute {
43624380
value: string;
43634381
}
43644382

43654383
@Component({
43664384
template: '<input [matAutocomplete]="null" matAutocompleteDisabled>',
4385+
standalone: false,
43674386
})
43684387
class InputWithoutAutocompleteAndDisabled {}
43694388

@@ -4379,6 +4398,7 @@ class InputWithoutAutocompleteAndDisabled {}
43794398
}
43804399
</mat-autocomplete>
43814400
`,
4401+
standalone: false,
43824402
})
43834403
class AutocompleteWithActivatedEvent {
43844404
states = ['California', 'West Virginia', 'Florida'];
@@ -4408,6 +4428,7 @@ class AutocompleteWithActivatedEvent {
44084428
</div>
44094429
</ng-template>
44104430
`,
4431+
standalone: false,
44114432
})
44124433
class AutocompleteInsideAModal {
44134434
foods = [

src/material/autocomplete/autocomplete.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ export function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY(): MatAutocompleteDefau
116116
},
117117
providers: [{provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete}],
118118
animations: [panelAnimation],
119-
standalone: true,
120119
})
121120
export class MatAutocomplete implements AfterContentInit, OnDestroy {
122121
private _changeDetectorRef = inject(ChangeDetectorRef);

src/material/autocomplete/autocomplete.zone.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const SIMPLE_AUTOCOMPLETE_TEMPLATE = `
123123
</mat-autocomplete>
124124
`;
125125

126-
@Component({template: SIMPLE_AUTOCOMPLETE_TEMPLATE})
126+
@Component({template: SIMPLE_AUTOCOMPLETE_TEMPLATE, standalone: false})
127127
class SimpleAutocomplete implements OnDestroy {
128128
stateCtrl = new FormControl<{name: string; code: string} | string | null>(null);
129129
filteredStates: any[];

src/material/badge/badge.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ const BADGE_CONTENT_CLASS = 'mat-badge-content';
4949
* @docs-private
5050
*/
5151
@Component({
52-
standalone: true,
5352
styleUrl: 'badge.css',
5453
encapsulation: ViewEncapsulation.None,
5554
template: '',
@@ -73,7 +72,6 @@ export class _MatBadgeStyleLoader {}
7372
'[class.mat-badge-hidden]': 'hidden || !content',
7473
'[class.mat-badge-disabled]': 'disabled',
7574
},
76-
standalone: true,
7775
})
7876
export class MatBadge implements OnInit, OnDestroy {
7977
private _ngZone = inject(NgZone);

src/material/bottom-sheet/bottom-sheet-container.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ import {CdkPortalOutlet} from '@angular/cdk/portal';
4646
'(@state.start)': '_onAnimationStart($event)',
4747
'(@state.done)': '_onAnimationDone($event)',
4848
},
49-
standalone: true,
5049
imports: [CdkPortalOutlet],
5150
})
5251
export class MatBottomSheetContainer extends CdkDialogContainer implements OnDestroy {

src/material/button-toggle/button-toggle.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ export class MatButtonToggleChange {
134134
'[class.mat-button-toggle-group-appearance-standard]': 'appearance === "standard"',
135135
},
136136
exportAs: 'matButtonToggleGroup',
137-
standalone: true,
138137
})
139138
export class MatButtonToggleGroup implements ControlValueAccessor, OnInit, AfterContentInit {
140139
private _changeDetector = inject(ChangeDetectorRef);
@@ -557,7 +556,6 @@ export class MatButtonToggleGroup implements ControlValueAccessor, OnInit, After
557556
'(focus)': 'focus()',
558557
'role': 'presentation',
559558
},
560-
standalone: true,
561559
imports: [MatRipple, MatPseudoCheckbox],
562560
})
563561
export class MatButtonToggle implements OnInit, AfterViewInit, OnDestroy {

src/material/button/button.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import {MAT_ANCHOR_HOST, MAT_BUTTON_HOST, MatAnchorBase, MatButtonBase} from './
2929
exportAs: 'matButton',
3030
encapsulation: ViewEncapsulation.None,
3131
changeDetection: ChangeDetectionStrategy.OnPush,
32-
standalone: true,
3332
})
3433
export class MatButton extends MatButtonBase {}
3534

@@ -51,6 +50,5 @@ export class MatButton extends MatButtonBase {}
5150
styleUrls: ['button.css', 'button-high-contrast.css'],
5251
encapsulation: ViewEncapsulation.None,
5352
changeDetection: ChangeDetectionStrategy.OnPush,
54-
standalone: true,
5553
})
5654
export class MatAnchor extends MatAnchorBase {}

src/material/button/fab.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ const defaults = MAT_FAB_DEFAULT_OPTIONS_FACTORY();
7171
exportAs: 'matButton',
7272
encapsulation: ViewEncapsulation.None,
7373
changeDetection: ChangeDetectionStrategy.OnPush,
74-
standalone: true,
7574
})
7675
export class MatFabButton extends MatButtonBase {
7776
private _options = inject<MatFabDefaultOptions>(MAT_FAB_DEFAULT_OPTIONS, {optional: true});
@@ -102,7 +101,6 @@ export class MatFabButton extends MatButtonBase {
102101
exportAs: 'matButton',
103102
encapsulation: ViewEncapsulation.None,
104103
changeDetection: ChangeDetectionStrategy.OnPush,
105-
standalone: true,
106104
})
107105
export class MatMiniFabButton extends MatButtonBase {
108106
private _options = inject<MatFabDefaultOptions>(MAT_FAB_DEFAULT_OPTIONS, {optional: true});
@@ -137,7 +135,6 @@ export class MatMiniFabButton extends MatButtonBase {
137135
exportAs: 'matButton, matAnchor',
138136
encapsulation: ViewEncapsulation.None,
139137
changeDetection: ChangeDetectionStrategy.OnPush,
140-
standalone: true,
141138
})
142139
export class MatFabAnchor extends MatAnchor {
143140
private _options = inject<MatFabDefaultOptions>(MAT_FAB_DEFAULT_OPTIONS, {optional: true});
@@ -168,7 +165,6 @@ export class MatFabAnchor extends MatAnchor {
168165
exportAs: 'matButton, matAnchor',
169166
encapsulation: ViewEncapsulation.None,
170167
changeDetection: ChangeDetectionStrategy.OnPush,
171-
standalone: true,
172168
})
173169
export class MatMiniFabAnchor extends MatAnchor {
174170
private _options = inject<MatFabDefaultOptions>(MAT_FAB_DEFAULT_OPTIONS, {optional: true});

src/material/button/icon-button.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {MAT_ANCHOR_HOST, MAT_BUTTON_HOST, MatAnchorBase, MatButtonBase} from './
2222
exportAs: 'matButton',
2323
encapsulation: ViewEncapsulation.None,
2424
changeDetection: ChangeDetectionStrategy.OnPush,
25-
standalone: true,
2625
})
2726
export class MatIconButton extends MatButtonBase {
2827
constructor(...args: unknown[]);
@@ -46,6 +45,5 @@ export class MatIconButton extends MatButtonBase {
4645
exportAs: 'matButton, matAnchor',
4746
encapsulation: ViewEncapsulation.None,
4847
changeDetection: ChangeDetectionStrategy.OnPush,
49-
standalone: true,
5048
})
5149
export class MatIconAnchor extends MatAnchorBase {}

0 commit comments

Comments
 (0)