UNPKG

@angular/material

Version:
1 lines 14.6 kB
{"version":3,"file":"legacy-paginator.mjs","sources":["../../../../../../src/material/legacy-paginator/paginator.ts","../../../../../../src/material/legacy-paginator/paginator.html","../../../../../../src/material/legacy-paginator/paginator-module.ts","../../../../../../src/material/legacy-paginator/public-api.ts","../../../../../../src/material/legacy-paginator/index.ts","../../../../../../src/material/legacy-paginator/legacy-paginator_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n InjectionToken,\n Optional,\n ViewEncapsulation,\n} from '@angular/core';\nimport {MatLegacyFormFieldAppearance} from '@angular/material/legacy-form-field';\nimport {_MatPaginatorBase, MatPaginatorIntl} from '@angular/material/paginator';\n\n/**\n * Object that can be used to configure the default options for the paginator module.\n * @deprecated Use `MatPaginatorDefaultOptions` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport interface MatLegacyPaginatorDefaultOptions {\n /** Number of items to display on a page. By default set to 50. */\n pageSize?: number;\n\n /** The set of provided page size options to display to the user. */\n pageSizeOptions?: number[];\n\n /** Whether to hide the page size selection UI from the user. */\n hidePageSize?: boolean;\n\n /** Whether to show the first/last buttons UI to the user. */\n showFirstLastButtons?: boolean;\n\n /** The default form-field appearance to apply to the page size options selector. */\n formFieldAppearance?: MatLegacyFormFieldAppearance;\n}\n\n/**\n * Injection token that can be used to provide the default options for the paginator module.\n * @deprecated Use `MAT_PAGINATOR_DEFAULT_OPTIONS` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport const MAT_LEGACY_PAGINATOR_DEFAULT_OPTIONS =\n new InjectionToken<MatLegacyPaginatorDefaultOptions>('MAT_LEGACY_PAGINATOR_DEFAULT_OPTIONS');\n\n/**\n * Component to provide navigation between paged information. Displays the size of the current\n * page, user-selectable options to change that size, what items are being shown, and\n * navigational button to go to the previous or next page.\n * @deprecated Use `MatPaginator` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@Component({\n selector: 'mat-paginator',\n exportAs: 'matPaginator',\n templateUrl: 'paginator.html',\n styleUrls: ['paginator.css'],\n inputs: ['disabled'],\n host: {\n 'class': 'mat-paginator',\n 'role': 'group',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatLegacyPaginator extends _MatPaginatorBase<MatLegacyPaginatorDefaultOptions> {\n /** If set, styles the \"page size\" form field with the designated style. */\n _formFieldAppearance?: MatLegacyFormFieldAppearance;\n\n constructor(\n intl: MatPaginatorIntl,\n changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(MAT_LEGACY_PAGINATOR_DEFAULT_OPTIONS)\n defaults?: MatLegacyPaginatorDefaultOptions,\n ) {\n super(intl, changeDetectorRef, defaults);\n\n if (defaults && defaults.formFieldAppearance != null) {\n this._formFieldAppearance = defaults.formFieldAppearance;\n }\n }\n}\n","<div class=\"mat-paginator-outer-container\">\n <div class=\"mat-paginator-container\">\n <div class=\"mat-paginator-page-size\" *ngIf=\"!hidePageSize\">\n <div class=\"mat-paginator-page-size-label\">\n {{_intl.itemsPerPageLabel}}\n </div>\n\n <mat-form-field\n *ngIf=\"_displayedPageSizeOptions.length > 1\"\n [appearance]=\"_formFieldAppearance!\"\n [color]=\"color\"\n class=\"mat-paginator-page-size-select\">\n <mat-select\n [value]=\"pageSize\"\n [disabled]=\"disabled\"\n [panelClass]=\"selectConfig.panelClass || ''\"\n [disableOptionCentering]=\"selectConfig.disableOptionCentering\"\n [aria-label]=\"_intl.itemsPerPageLabel\"\n (selectionChange)=\"_changePageSize($event.value)\">\n <mat-option *ngFor=\"let pageSizeOption of _displayedPageSizeOptions\" [value]=\"pageSizeOption\">\n {{pageSizeOption}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <div\n class=\"mat-paginator-page-size-value\"\n *ngIf=\"_displayedPageSizeOptions.length <= 1\">{{pageSize}}</div>\n </div>\n\n <div class=\"mat-paginator-range-actions\">\n <div class=\"mat-paginator-range-label\">\n {{_intl.getRangeLabel(pageIndex, pageSize, length)}}\n </div>\n\n <button mat-icon-button type=\"button\"\n class=\"mat-paginator-navigation-first\"\n (click)=\"firstPage()\"\n [attr.aria-label]=\"_intl.firstPageLabel\"\n [matTooltip]=\"_intl.firstPageLabel\"\n [matTooltipDisabled]=\"_previousButtonsDisabled()\"\n [matTooltipPosition]=\"'above'\"\n [disabled]=\"_previousButtonsDisabled()\"\n *ngIf=\"showFirstLastButtons\">\n <svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\">\n <path d=\"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z\"/>\n </svg>\n </button>\n <button mat-icon-button type=\"button\"\n class=\"mat-paginator-navigation-previous\"\n (click)=\"previousPage()\"\n [attr.aria-label]=\"_intl.previousPageLabel\"\n [matTooltip]=\"_intl.previousPageLabel\"\n [matTooltipDisabled]=\"_previousButtonsDisabled()\"\n [matTooltipPosition]=\"'above'\"\n [disabled]=\"_previousButtonsDisabled()\">\n <svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\">\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"/>\n </svg>\n </button>\n <button mat-icon-button type=\"button\"\n class=\"mat-paginator-navigation-next\"\n (click)=\"nextPage()\"\n [attr.aria-label]=\"_intl.nextPageLabel\"\n [matTooltip]=\"_intl.nextPageLabel\"\n [matTooltipDisabled]=\"_nextButtonsDisabled()\"\n [matTooltipPosition]=\"'above'\"\n [disabled]=\"_nextButtonsDisabled()\">\n <svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\">\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/>\n </svg>\n </button>\n <button mat-icon-button type=\"button\"\n class=\"mat-paginator-navigation-last\"\n (click)=\"lastPage()\"\n [attr.aria-label]=\"_intl.lastPageLabel\"\n [matTooltip]=\"_intl.lastPageLabel\"\n [matTooltipDisabled]=\"_nextButtonsDisabled()\"\n [matTooltipPosition]=\"'above'\"\n [disabled]=\"_nextButtonsDisabled()\"\n *ngIf=\"showFirstLastButtons\">\n <svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\">\n <path d=\"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z\"/>\n </svg>\n </button>\n </div>\n </div>\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatLegacyButtonModule} from '@angular/material/legacy-button';\nimport {MatLegacySelectModule} from '@angular/material/legacy-select';\nimport {MatLegacyTooltipModule} from '@angular/material/legacy-tooltip';\nimport {MatLegacyPaginator} from './paginator';\nimport {MAT_PAGINATOR_INTL_PROVIDER} from '@angular/material/paginator';\n\n/**\n * @deprecated Use `MatPaginatorModule` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@NgModule({\n imports: [\n CommonModule,\n MatLegacyButtonModule,\n MatLegacySelectModule,\n MatLegacyTooltipModule,\n MatCommonModule,\n ],\n exports: [MatLegacyPaginator],\n declarations: [MatLegacyPaginator],\n providers: [MAT_PAGINATOR_INTL_PROVIDER],\n})\nexport class MatLegacyPaginatorModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {MatLegacyPaginatorModule} from './paginator-module';\nexport {\n MatLegacyPaginatorDefaultOptions,\n MAT_LEGACY_PAGINATOR_DEFAULT_OPTIONS,\n MatLegacyPaginator,\n} from './paginator';\nexport {\n /**\n * @deprecated Use `MatPaginatorIntl` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n MatPaginatorIntl as MatLegacyPaginatorIntl,\n\n /**\n * @deprecated Use `MAT_PAGINATOR_INTL_PROVIDER_FACTORY` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n MAT_PAGINATOR_INTL_PROVIDER_FACTORY as MAT_LEGACY_PAGINATOR_INTL_PROVIDER_FACTORY,\n\n /**\n * @deprecated Use `MAT_PAGINATOR_INTL_PROVIDER` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n MAT_PAGINATOR_INTL_PROVIDER as MAT_LEGACY_PAGINATOR_INTL_PROVIDER,\n\n /**\n * @deprecated Use `PageEvent` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n PageEvent as LegacyPageEvent,\n\n /**\n * @deprecated Use `MatPaginatorSelectConfig` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n MatPaginatorSelectConfig as MatLegacyPaginatorSelectConfig,\n\n /**\n * @deprecated Use `_MatPaginatorBase` from `@angular/material/paginator` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n _MatPaginatorBase as _MatLegacyPaginatorBase,\n} from '@angular/material/paginator';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.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