Skip to content

Commit

Permalink
fix(material/legacy-paginator): 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 4e56db6 commit b6f9d66
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/material/legacy-paginator/paginator-module.ts
Expand Up @@ -15,6 +15,10 @@ import {MatLegacyTooltipModule} from '@angular/material/legacy-tooltip';
import {MatLegacyPaginator} from './paginator';
import {MAT_PAGINATOR_INTL_PROVIDER} from '@angular/material/paginator';

/**
* @deprecated Use `MatPaginatorModule` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
@NgModule({
imports: [
CommonModule,
Expand Down
14 changes: 12 additions & 2 deletions src/material/legacy-paginator/paginator.ts
Expand Up @@ -18,7 +18,11 @@ import {
import {MatLegacyFormFieldAppearance} from '@angular/material/legacy-form-field';
import {_MatPaginatorBase, MatPaginatorIntl} from '@angular/material/paginator';

/** Object that can be used to configure the default options for the paginator module. */
/**
* Object that can be used to configure the default options for the paginator module.
* @deprecated Use `MatPaginatorDefaultOptions` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
export interface MatLegacyPaginatorDefaultOptions {
/** Number of items to display on a page. By default set to 50. */
pageSize?: number;
Expand All @@ -36,14 +40,20 @@ export interface MatLegacyPaginatorDefaultOptions {
formFieldAppearance?: MatLegacyFormFieldAppearance;
}

/** Injection token that can be used to provide the default options for the paginator module. */
/**
* Injection token that can be used to provide the default options for the paginator module.
* @deprecated Use `MAT_PAGINATOR_DEFAULT_OPTIONS` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
export const MAT_LEGACY_PAGINATOR_DEFAULT_OPTIONS =
new InjectionToken<MatLegacyPaginatorDefaultOptions>('MAT_LEGACY_PAGINATOR_DEFAULT_OPTIONS');

/**
* Component to provide navigation between paged information. Displays the size of the current
* page, user-selectable options to change that size, what items are being shown, and
* navigational button to go to the previous or next page.
* @deprecated Use `MatPaginator` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
@Component({
selector: 'mat-paginator',
Expand Down
29 changes: 29 additions & 0 deletions src/material/legacy-paginator/public-api.ts
Expand Up @@ -13,10 +13,39 @@ export {
MatLegacyPaginator,
} from './paginator';
export {
/**
* @deprecated Use `MatPaginatorIntl` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
MatPaginatorIntl as MatLegacyPaginatorIntl,

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

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

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

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

/**
* @deprecated Use `_MatPaginatorBase` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
_MatPaginatorBase as _MatLegacyPaginatorBase,
} from '@angular/material/paginator';
6 changes: 5 additions & 1 deletion src/material/legacy-paginator/testing/paginator-harness.ts
Expand Up @@ -13,7 +13,11 @@ import {
PaginatorHarnessFilters,
} from '@angular/material/paginator/testing';

/** Harness for interacting with a standard mat-paginator in tests. */
/**
* Harness for interacting with a standard mat-paginator in tests.
* @deprecated Use `MatPaginatorHarness` from `@angular/material/paginator/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
export class MatLegacyPaginatorHarness extends _MatPaginatorHarnessBase {
/** Selector used to find paginator instances. */
static hostSelector = '.mat-paginator';
Expand Down
9 changes: 9 additions & 0 deletions src/material/legacy-paginator/testing/public-api.ts
Expand Up @@ -8,6 +8,15 @@

export {MatLegacyPaginatorHarness} from './paginator-harness';
export {
/**
* @deprecated Use `_MatPaginatorHarnessBase` from `@angular/material/paginator/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
_MatPaginatorHarnessBase as _MatLegacyPaginatorHarnessBase,

/**
* @deprecated Use `PaginatorHarnessFilters` from `@angular/material/paginator/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
PaginatorHarnessFilters as LegacyPaginatorHarnessFilters,
} from '@angular/material/paginator/testing';
Expand Up @@ -13,7 +13,7 @@ import { TestElement } from '@angular/cdk/testing';

export { LegacyPaginatorHarnessFilters }

// @public
// @public @deprecated
export class MatLegacyPaginatorHarness extends _MatLegacyPaginatorHarnessBase {
// (undocumented)
protected _firstPageButton: AsyncFactoryFn<TestElement | null>;
Expand Down
8 changes: 4 additions & 4 deletions tools/public_api_guard/material/legacy-paginator.md
Expand Up @@ -22,14 +22,14 @@ import { MatPaginatorSelectConfig as MatLegacyPaginatorSelectConfig } from '@ang

export { LegacyPageEvent }

// @public
// @public @deprecated
export const MAT_LEGACY_PAGINATOR_DEFAULT_OPTIONS: InjectionToken<MatLegacyPaginatorDefaultOptions>;

export { MAT_LEGACY_PAGINATOR_INTL_PROVIDER }

export { MAT_LEGACY_PAGINATOR_INTL_PROVIDER_FACTORY }

// @public
// @public @deprecated
export class MatLegacyPaginator extends _MatLegacyPaginatorBase<MatLegacyPaginatorDefaultOptions> {
constructor(intl: MatLegacyPaginatorIntl, changeDetectorRef: ChangeDetectorRef, defaults?: MatLegacyPaginatorDefaultOptions);
_formFieldAppearance?: MatLegacyFormFieldAppearance;
Expand All @@ -41,7 +41,7 @@ export class MatLegacyPaginator extends _MatLegacyPaginatorBase<MatLegacyPaginat

export { _MatLegacyPaginatorBase }

// @public
// @public @deprecated
export interface MatLegacyPaginatorDefaultOptions {
formFieldAppearance?: MatLegacyFormFieldAppearance;
hidePageSize?: boolean;
Expand All @@ -52,7 +52,7 @@ export interface MatLegacyPaginatorDefaultOptions {

export { MatLegacyPaginatorIntl }

// @public (undocumented)
// @public @deprecated (undocumented)
export class MatLegacyPaginatorModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacyPaginatorModule, never>;
Expand Down

0 comments on commit b6f9d66

Please sign in to comment.