Skip to content

Commit 29ed93a

Browse files
committed
fix(material/legacy-autocomplete): deprecate all ts symbols
1 parent 5351506 commit 29ed93a

File tree

9 files changed

+77
-10
lines changed

9 files changed

+77
-10
lines changed

src/material/legacy-autocomplete/autocomplete-module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ import {MatLegacyAutocomplete} from './autocomplete';
1717
import {MatLegacyAutocompleteTrigger} from './autocomplete-trigger';
1818
import {MatLegacyAutocompleteOrigin} from './autocomplete-origin';
1919

20+
/**
21+
* @deprecated Use `MatAutocompleteModule` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
22+
* @breaking-change 17.0.0
23+
*/
2024
@NgModule({
2125
imports: [OverlayModule, MatLegacyOptionModule, MatCommonModule, CommonModule],
2226
exports: [

src/material/legacy-autocomplete/autocomplete-origin.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import {_MatAutocompleteOriginBase} from '@angular/material/autocomplete';
1212
/**
1313
* Directive applied to an element to make it usable
1414
* as a connection point for an autocomplete panel.
15+
* @deprecated Use `MatAutocompleteOrigin` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
16+
* @breaking-change 17.0.0
1517
*/
1618
@Directive({
1719
selector: '[matAutocompleteOrigin]',

src/material/legacy-autocomplete/autocomplete-trigger.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@ import {
1616
/**
1717
* Provider that allows the autocomplete to register as a ControlValueAccessor.
1818
* @docs-private
19+
* @deprecated Use `MAT_AUTOCOMPLETE_VALUE_ACCESSOR` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
20+
* @breaking-change 17.0.0
1921
*/
2022
export const MAT_LEGACY_AUTOCOMPLETE_VALUE_ACCESSOR: any = {
2123
provide: NG_VALUE_ACCESSOR,
2224
useExisting: forwardRef(() => MatLegacyAutocompleteTrigger),
2325
multi: true,
2426
};
2527

28+
/**
29+
* @deprecated Use `MatAutocompleteTrigger` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
30+
* @breaking-change 17.0.0
31+
*/
2632
@Directive({
2733
selector: `input[matAutocomplete], textarea[matAutocomplete]`,
2834
host: {

src/material/legacy-autocomplete/autocomplete.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ import {
2323
} from '@angular/material/legacy-core';
2424
import {_MatAutocompleteBase} from '@angular/material/autocomplete';
2525

26+
/**
27+
* @deprecated Use `MatAutocomplete` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
28+
* @breaking-change 17.0.0
29+
*/
2630
@Component({
2731
selector: 'mat-autocomplete',
2832
templateUrl: 'autocomplete.html',

src/material/legacy-autocomplete/public-api.ts

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,58 @@ export {
1414
} from './autocomplete-trigger';
1515
export {MatLegacyAutocompleteOrigin} from './autocomplete-origin';
1616

17-
// Everything from `material/autocomplete`, except for `MatAutcomplete` and `MatAutocompleteModule`.
1817
export {
18+
/**
19+
* @deprecated Use `getMatAutocompleteMissingPanelError` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
20+
* @breaking-change 17.0.0
21+
*/
1922
getMatAutocompleteMissingPanelError as getMatLegacyAutocompleteMissingPanelError,
23+
24+
/**
25+
* @deprecated Use `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
26+
* @breaking-change 17.0.0
27+
*/
2028
MAT_AUTOCOMPLETE_DEFAULT_OPTIONS as MAT_LEGACY_AUTOCOMPLETE_DEFAULT_OPTIONS,
29+
30+
/**
31+
* @deprecated Use `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
32+
* @breaking-change 17.0.0
33+
*/
2134
MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY as MAT_LEGACY_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY,
35+
36+
/**
37+
* @deprecated Use `MAT_AUTOCOMPLETE_SCROLL_STRATEGY` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
38+
* @breaking-change 17.0.0
39+
*/
2240
MAT_AUTOCOMPLETE_SCROLL_STRATEGY as MAT_LEGACY_AUTOCOMPLETE_SCROLL_STRATEGY,
41+
42+
/**
43+
* @deprecated Use `MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
44+
* @breaking-change 17.0.0
45+
*/
2346
MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY as MAT_LEGACY_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY,
47+
48+
/**
49+
* @deprecated Use `MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
50+
* @breaking-change 17.0.0
51+
*/
2452
MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER as MAT_LEGACY_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER,
53+
54+
/**
55+
* @deprecated Use `MatAutocompleteActivatedEvent` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
56+
* @breaking-change 17.0.0
57+
*/
2558
MatAutocompleteActivatedEvent as MatLegacyAutocompleteActivatedEvent,
59+
60+
/**
61+
* @deprecated Use `MatAutocompleteDefaultOptions` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
62+
* @breaking-change 17.0.0
63+
*/
2664
MatAutocompleteDefaultOptions as MatLegacyAutocompleteDefaultOptions,
65+
66+
/**
67+
* @deprecated Use `MatAutocompleteSelectedEvent` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
68+
* @breaking-change 17.0.0
69+
*/
2770
MatAutocompleteSelectedEvent as MatLegacyAutocompleteSelectedEvent,
2871
} from '@angular/material/autocomplete';

src/material/legacy-autocomplete/testing/autocomplete-harness-filters.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99
import {BaseHarnessFilters} from '@angular/cdk/testing';
1010

11-
/** A set of criteria that can be used to filter a list of `MatAutocompleteHarness` instances. */
11+
/**
12+
* A set of criteria that can be used to filter a list of `MatAutocompleteHarness` instances.
13+
* @deprecated Use `AutocompleteHarnessFilters` from `@angular/material/autocomplete/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
14+
* @breaking-change 17.0.0
15+
*/
1216
export interface LegacyAutocompleteHarnessFilters extends BaseHarnessFilters {
1317
/** Only find instances whose associated input element matches the given value. */
1418
value?: string | RegExp;

src/material/legacy-autocomplete/testing/autocomplete-harness.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ import {
1616
import {_MatAutocompleteHarnessBase} from '@angular/material/autocomplete/testing';
1717
import {LegacyAutocompleteHarnessFilters} from './autocomplete-harness-filters';
1818

19-
/** Harness for interacting with a standard mat-autocomplete in tests. */
19+
/**
20+
* Harness for interacting with a standard mat-autocomplete in tests.
21+
* @deprecated Use `MatAutocompleteHarness` from `@angular/material/autocomplete/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
22+
* @breaking-change 17.0.0
23+
*/
2024
export class MatLegacyAutocompleteHarness extends _MatAutocompleteHarnessBase<
2125
typeof MatLegacyOptionHarness,
2226
MatLegacyOptionHarness,

tools/public_api_guard/material/legacy-autocomplete-testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import { MatLegacyOptionHarness } from '@angular/material/legacy-core/testing';
1212
import { OptgroupHarnessFilters } from '@angular/material/legacy-core/testing';
1313
import { OptionHarnessFilters } from '@angular/material/legacy-core/testing';
1414

15-
// @public
15+
// @public @deprecated
1616
export interface LegacyAutocompleteHarnessFilters extends BaseHarnessFilters {
1717
value?: string | RegExp;
1818
}
1919

20-
// @public
20+
// @public @deprecated
2121
export class MatLegacyAutocompleteHarness extends _MatAutocompleteHarnessBase<typeof MatLegacyOptionHarness, MatLegacyOptionHarness, OptionHarnessFilters, typeof MatLegacyOptgroupHarness, MatLegacyOptgroupHarness, OptgroupHarnessFilters> {
2222
static hostSelector: string;
2323
// (undocumented)

tools/public_api_guard/material/legacy-autocomplete.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ export { MAT_LEGACY_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY }
3838

3939
export { MAT_LEGACY_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER }
4040

41-
// @public
41+
// @public @deprecated
4242
export const MAT_LEGACY_AUTOCOMPLETE_VALUE_ACCESSOR: any;
4343

44-
// @public (undocumented)
44+
// @public @deprecated (undocumented)
4545
export class MatLegacyAutocomplete extends _MatAutocompleteBase {
4646
// (undocumented)
4747
protected _hiddenClass: string;
@@ -59,7 +59,7 @@ export { MatLegacyAutocompleteActivatedEvent }
5959

6060
export { MatLegacyAutocompleteDefaultOptions }
6161

62-
// @public (undocumented)
62+
// @public @deprecated (undocumented)
6363
export class MatLegacyAutocompleteModule {
6464
// (undocumented)
6565
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyAutocompleteModule, never>;
@@ -69,7 +69,7 @@ export class MatLegacyAutocompleteModule {
6969
static ɵmod: i0.ɵɵNgModuleDeclaration<MatLegacyAutocompleteModule, [typeof i1.MatLegacyAutocomplete, typeof i2.MatLegacyAutocompleteTrigger, typeof i3.MatLegacyAutocompleteOrigin], [typeof i4.OverlayModule, typeof i5.MatLegacyOptionModule, typeof i6.MatCommonModule, typeof i7.CommonModule], [typeof i1.MatLegacyAutocomplete, typeof i2.MatLegacyAutocompleteTrigger, typeof i3.MatLegacyAutocompleteOrigin, typeof i8.CdkScrollableModule, typeof i5.MatLegacyOptionModule, typeof i6.MatCommonModule]>;
7070
}
7171

72-
// @public
72+
// @public @deprecated
7373
export class MatLegacyAutocompleteOrigin extends _MatAutocompleteOriginBase {
7474
// (undocumented)
7575
static ɵdir: i0.ɵɵDirectiveDeclaration<MatLegacyAutocompleteOrigin, "[matAutocompleteOrigin]", ["matAutocompleteOrigin"], {}, {}, never, never, false>;
@@ -79,7 +79,7 @@ export class MatLegacyAutocompleteOrigin extends _MatAutocompleteOriginBase {
7979

8080
export { MatLegacyAutocompleteSelectedEvent }
8181

82-
// @public (undocumented)
82+
// @public @deprecated (undocumented)
8383
export class MatLegacyAutocompleteTrigger extends _MatAutocompleteTriggerBase {
8484
// (undocumented)
8585
protected _aboveClass: string;

0 commit comments

Comments
 (0)