Skip to content

Commit

Permalink
fix(material/legacy-autocomplete): deprecate all ts symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalerba committed Sep 7, 2022
1 parent 5351506 commit 29ed93a
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 10 deletions.
4 changes: 4 additions & 0 deletions src/material/legacy-autocomplete/autocomplete-module.ts
Expand Up @@ -17,6 +17,10 @@ import {MatLegacyAutocomplete} from './autocomplete';
import {MatLegacyAutocompleteTrigger} from './autocomplete-trigger';
import {MatLegacyAutocompleteOrigin} from './autocomplete-origin';

/**
* @deprecated Use `MatAutocompleteModule` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
@NgModule({
imports: [OverlayModule, MatLegacyOptionModule, MatCommonModule, CommonModule],
exports: [
Expand Down
2 changes: 2 additions & 0 deletions src/material/legacy-autocomplete/autocomplete-origin.ts
Expand Up @@ -12,6 +12,8 @@ import {_MatAutocompleteOriginBase} from '@angular/material/autocomplete';
/**
* Directive applied to an element to make it usable
* as a connection point for an autocomplete panel.
* @deprecated Use `MatAutocompleteOrigin` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
@Directive({
selector: '[matAutocompleteOrigin]',
Expand Down
6 changes: 6 additions & 0 deletions src/material/legacy-autocomplete/autocomplete-trigger.ts
Expand Up @@ -16,13 +16,19 @@ import {
/**
* Provider that allows the autocomplete to register as a ControlValueAccessor.
* @docs-private
* @deprecated Use `MAT_AUTOCOMPLETE_VALUE_ACCESSOR` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
export const MAT_LEGACY_AUTOCOMPLETE_VALUE_ACCESSOR: any = {
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => MatLegacyAutocompleteTrigger),
multi: true,
};

/**
* @deprecated Use `MatAutocompleteTrigger` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
@Directive({
selector: `input[matAutocomplete], textarea[matAutocomplete]`,
host: {
Expand Down
4 changes: 4 additions & 0 deletions src/material/legacy-autocomplete/autocomplete.ts
Expand Up @@ -23,6 +23,10 @@ import {
} from '@angular/material/legacy-core';
import {_MatAutocompleteBase} from '@angular/material/autocomplete';

/**
* @deprecated Use `MatAutocomplete` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
@Component({
selector: 'mat-autocomplete',
templateUrl: 'autocomplete.html',
Expand Down
45 changes: 44 additions & 1 deletion src/material/legacy-autocomplete/public-api.ts
Expand Up @@ -14,15 +14,58 @@ export {
} from './autocomplete-trigger';
export {MatLegacyAutocompleteOrigin} from './autocomplete-origin';

// Everything from `material/autocomplete`, except for `MatAutcomplete` and `MatAutocompleteModule`.
export {
/**
* @deprecated Use `getMatAutocompleteMissingPanelError` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
getMatAutocompleteMissingPanelError as getMatLegacyAutocompleteMissingPanelError,

/**
* @deprecated Use `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
MAT_AUTOCOMPLETE_DEFAULT_OPTIONS as MAT_LEGACY_AUTOCOMPLETE_DEFAULT_OPTIONS,

/**
* @deprecated Use `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY as MAT_LEGACY_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY,

/**
* @deprecated Use `MAT_AUTOCOMPLETE_SCROLL_STRATEGY` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
MAT_AUTOCOMPLETE_SCROLL_STRATEGY as MAT_LEGACY_AUTOCOMPLETE_SCROLL_STRATEGY,

/**
* @deprecated Use `MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY as MAT_LEGACY_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY,

/**
* @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.
* @breaking-change 17.0.0
*/
MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER as MAT_LEGACY_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER,

/**
* @deprecated Use `MatAutocompleteActivatedEvent` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
MatAutocompleteActivatedEvent as MatLegacyAutocompleteActivatedEvent,

/**
* @deprecated Use `MatAutocompleteDefaultOptions` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
MatAutocompleteDefaultOptions as MatLegacyAutocompleteDefaultOptions,

/**
* @deprecated Use `MatAutocompleteSelectedEvent` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
MatAutocompleteSelectedEvent as MatLegacyAutocompleteSelectedEvent,
} from '@angular/material/autocomplete';
Expand Up @@ -8,7 +8,11 @@

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

/** A set of criteria that can be used to filter a list of `MatAutocompleteHarness` instances. */
/**
* A set of criteria that can be used to filter a list of `MatAutocompleteHarness` instances.
* @deprecated Use `AutocompleteHarnessFilters` from `@angular/material/autocomplete/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
export interface LegacyAutocompleteHarnessFilters extends BaseHarnessFilters {
/** Only find instances whose associated input element matches the given value. */
value?: string | RegExp;
Expand Down
Expand Up @@ -16,7 +16,11 @@ import {
import {_MatAutocompleteHarnessBase} from '@angular/material/autocomplete/testing';
import {LegacyAutocompleteHarnessFilters} from './autocomplete-harness-filters';

/** Harness for interacting with a standard mat-autocomplete in tests. */
/**
* Harness for interacting with a standard mat-autocomplete in tests.
* @deprecated Use `MatAutocompleteHarness` from `@angular/material/autocomplete/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
export class MatLegacyAutocompleteHarness extends _MatAutocompleteHarnessBase<
typeof MatLegacyOptionHarness,
MatLegacyOptionHarness,
Expand Down
Expand Up @@ -12,12 +12,12 @@ import { MatLegacyOptionHarness } from '@angular/material/legacy-core/testing';
import { OptgroupHarnessFilters } from '@angular/material/legacy-core/testing';
import { OptionHarnessFilters } from '@angular/material/legacy-core/testing';

// @public
// @public @deprecated
export interface LegacyAutocompleteHarnessFilters extends BaseHarnessFilters {
value?: string | RegExp;
}

// @public
// @public @deprecated
export class MatLegacyAutocompleteHarness extends _MatAutocompleteHarnessBase<typeof MatLegacyOptionHarness, MatLegacyOptionHarness, OptionHarnessFilters, typeof MatLegacyOptgroupHarness, MatLegacyOptgroupHarness, OptgroupHarnessFilters> {
static hostSelector: string;
// (undocumented)
Expand Down
10 changes: 5 additions & 5 deletions tools/public_api_guard/material/legacy-autocomplete.md
Expand Up @@ -38,10 +38,10 @@ export { MAT_LEGACY_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY }

export { MAT_LEGACY_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER }

// @public
// @public @deprecated
export const MAT_LEGACY_AUTOCOMPLETE_VALUE_ACCESSOR: any;

// @public (undocumented)
// @public @deprecated (undocumented)
export class MatLegacyAutocomplete extends _MatAutocompleteBase {
// (undocumented)
protected _hiddenClass: string;
Expand All @@ -59,7 +59,7 @@ export { MatLegacyAutocompleteActivatedEvent }

export { MatLegacyAutocompleteDefaultOptions }

// @public (undocumented)
// @public @deprecated (undocumented)
export class MatLegacyAutocompleteModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyAutocompleteModule, never>;
Expand All @@ -69,7 +69,7 @@ export class MatLegacyAutocompleteModule {
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]>;
}

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

export { MatLegacyAutocompleteSelectedEvent }

// @public (undocumented)
// @public @deprecated (undocumented)
export class MatLegacyAutocompleteTrigger extends _MatAutocompleteTriggerBase {
// (undocumented)
protected _aboveClass: string;
Expand Down

0 comments on commit 29ed93a

Please sign in to comment.