@angular/material 21.0.0-rc.3 → 21.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/_animation-chunk.mjs.map +1 -1
- package/fesm2022/_date-formats-chunk.mjs.map +1 -1
- package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
- package/fesm2022/_error-options-chunk.mjs.map +1 -1
- package/fesm2022/_error-state-chunk.mjs.map +1 -1
- package/fesm2022/_form-field-chunk.mjs.map +1 -1
- package/fesm2022/_icon-button-chunk.mjs.map +1 -1
- package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
- package/fesm2022/_input-harness-chunk.mjs.map +1 -1
- package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
- package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
- package/fesm2022/_line-chunk.mjs.map +1 -1
- package/fesm2022/_option-chunk.mjs.map +1 -1
- package/fesm2022/_option-harness-chunk.mjs.map +1 -1
- package/fesm2022/_option-module-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
- package/fesm2022/_public-api-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
- package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
- package/fesm2022/_tooltip-chunk.mjs.map +1 -1
- package/fesm2022/autocomplete-testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge-testing.mjs.map +1 -1
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-testing.mjs.map +1 -1
- package/fesm2022/button-toggle-testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card-testing.mjs.map +1 -1
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox-testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips-testing.mjs.map +1 -1
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core-testing.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker-testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog-testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider-testing.mjs.map +1 -1
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion-testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field-testing-control.mjs.map +1 -1
- package/fesm2022/form-field-testing.mjs.map +1 -1
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list-testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon-testing.mjs.map +1 -1
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input-testing.mjs.map +1 -1
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list-testing.mjs.map +1 -1
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs.map +1 -1
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator-testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar-testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner-testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio-testing.mjs.map +1 -1
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select-testing.mjs.map +1 -1
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav-testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle-testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider-testing.mjs.map +1 -1
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar-testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort-testing.mjs.map +1 -1
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper-testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table-testing.mjs.map +1 -1
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs-testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker-testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip-testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs.map +1 -1
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +6 -6
- package/schematics/ng-add/index.js +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paginator-testing.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"paginator-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/paginator/testing/paginator-harness.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.dev/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {MatSelectHarness} from '../../select/testing';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {PaginatorHarnessFilters} from './paginator-harness-filters';\n\n/** Harness for interacting with a mat-paginator in tests. */\nexport class MatPaginatorHarness extends ComponentHarness {\n /** Selector used to find paginator instances. */\n static hostSelector = '.mat-mdc-paginator';\n private _nextButton = this.locatorFor('.mat-mdc-paginator-navigation-next');\n private _previousButton = this.locatorFor('.mat-mdc-paginator-navigation-previous');\n private _firstPageButton = this.locatorForOptional('.mat-mdc-paginator-navigation-first');\n private _lastPageButton = this.locatorForOptional('.mat-mdc-paginator-navigation-last');\n _select = this.locatorForOptional(\n MatSelectHarness.with({\n ancestor: '.mat-mdc-paginator-page-size',\n }),\n );\n private _pageSizeFallback = this.locatorFor('.mat-mdc-paginator-page-size-value');\n _rangeLabel = this.locatorFor('.mat-mdc-paginator-range-label');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a paginator with specific attributes.\n * @param options Options for filtering which paginator instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatPaginatorHarness>(\n this: ComponentHarnessConstructor<T>,\n options: PaginatorHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options);\n }\n\n /** Goes to the next page in the paginator. */\n async goToNextPage(): Promise<void> {\n return (await this._nextButton()).click();\n }\n\n /** Returns whether or not the next page button is disabled. */\n async isNextPageDisabled(): Promise<boolean> {\n const disabledValue = await (await this._nextButton()).getAttribute('aria-disabled');\n return disabledValue == 'true';\n }\n\n /* Returns whether or not the previous page button is disabled. */\n async isPreviousPageDisabled(): Promise<boolean> {\n const disabledValue = await (await this._previousButton()).getAttribute('aria-disabled');\n return disabledValue == 'true';\n }\n\n /** Goes to the previous page in the paginator. */\n async goToPreviousPage(): Promise<void> {\n return (await this._previousButton()).click();\n }\n\n /** Goes to the first page in the paginator. */\n async goToFirstPage(): Promise<void> {\n const button = await this._firstPageButton();\n\n // The first page button isn't enabled by default so we need to check for it.\n if (!button) {\n throw Error(\n 'Could not find first page button inside paginator. ' +\n 'Make sure that `showFirstLastButtons` is enabled.',\n );\n }\n\n return button.click();\n }\n\n /** Goes to the last page in the paginator. */\n async goToLastPage(): Promise<void> {\n const button = await this._lastPageButton();\n\n // The last page button isn't enabled by default so we need to check for it.\n if (!button) {\n throw Error(\n 'Could not find last page button inside paginator. ' +\n 'Make sure that `showFirstLastButtons` is enabled.',\n );\n }\n\n return button.click();\n }\n\n /**\n * Sets the page size of the paginator.\n * @param size Page size that should be select.\n */\n async setPageSize(size: number): Promise<void> {\n const select = await this._select();\n\n // The select is only available if the `pageSizeOptions` are\n // set to an array with more than one item.\n if (!select) {\n throw Error(\n 'Cannot find page size selector in paginator. ' +\n 'Make sure that the `pageSizeOptions` have been configured.',\n );\n }\n\n return select.clickOptions({text: `${size}`});\n }\n\n /** Gets the page size of the paginator. */\n async getPageSize(): Promise<number> {\n const select = await this._select();\n const value = select ? select.getValueText() : (await this._pageSizeFallback()).text();\n return coerceNumberProperty(await value);\n }\n\n /** Gets the text of the range label of the paginator. */\n async getRangeLabel(): Promise<string> {\n return (await this._rangeLabel()).text();\n }\n}\n"],"names":["MatPaginatorHarness","ComponentHarness","hostSelector","_nextButton","locatorFor","_previousButton","_firstPageButton","locatorForOptional","_lastPageButton","_select","MatSelectHarness","with","ancestor","_pageSizeFallback","_rangeLabel","options","HarnessPredicate","goToNextPage","click","isNextPageDisabled","disabledValue","getAttribute","isPreviousPageDisabled","goToPreviousPage","goToFirstPage","button","Error","goToLastPage","setPageSize","size","select","clickOptions","text","getPageSize","value","getValueText","coerceNumberProperty","getRangeLabel"],"mappings":";;;;;;AAkBM,MAAOA,mBAAoB,SAAQC,gBAAgB,CAAA;EAEvD,OAAOC,YAAY,GAAG,oBAAoB;AAClCC,EAAAA,WAAW,GAAG,IAAI,CAACC,UAAU,CAAC,oCAAoC,CAAC;AACnEC,EAAAA,eAAe,GAAG,IAAI,CAACD,UAAU,CAAC,wCAAwC,CAAC;AAC3EE,EAAAA,gBAAgB,GAAG,IAAI,CAACC,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AOD,MAAM,CAACP,KAAK,EAAE;AACvB;EAGA,MAAMS,YAAYA,GAAA;AAChB,IAAA,MAAMF,MAAM,GAAG,MAAM,IAAI,CAACjB,eAAe,EAAE;IAG3C,IAAI,CAACiB,MAAM,EAAE;AACX,MAAA,MAAMC,KAAK,CACT,oDAAoD,GAClD,mDAAmD,CACtD;AACH;AAEA,IAAA,OAAOD,MAAM,CAACP,KAAK,EAAE;AACvB;EAMA,MAAMU,WAAWA,CAACC,IAAY,EAAA;AAC5B,IAAA,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACrB,OAAO,EAAE;IAInC,IAAI,CAACqB,MAAM,EAAE;AACX,MAAA,MAAMJ,KAAK,CACT,+CAA+C,GAC7C,4DAA4D,CAC/D;AACH;IAEA,OAAOI,MAAM,CAACC,YAAY,CAAC;MAACC,IAAI,EAAE,GAAGH,IAAI,CAAA;AAAG,KAAA,CAAC;AAC/C;EAGA,MAAMI,WAAWA,GAAA;AACf,IAAA,MAAMH,MAAM,GAAG,MAAM,IAAI,CAACrB,OAAO,EAAE;IACnC,MAAMyB,KAAK,GAAGJ,MAAM,GAAGA,MAAM,CAACK,YAAY,EAAE,GAAG,CAAC,MAAM,IAAI,CAACtB,iBAAiB,EAAE,EAAEmB,IAAI,EAAE;AACtF,IAAA,OAAOI,oBAAoB,CAAC,MAAMF,KAAK,CAAC;AAC1C;EAGA,MAAMG,aAAaA,GAAA;IACjB,OAAO,CAAC,MAAM,IAAI,CAACvB,WAAW,EAAE,EAAEkB,IAAI,EAAE;AAC1C;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paginator.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/paginator/paginator-intl.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/paginator/paginator.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/paginator/paginator.html","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/paginator/paginator-module.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.dev/license\n */\n\nimport {Injectable} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n/**\n * To modify the labels and text displayed, create a new instance of MatPaginatorIntl and\n * include it in a custom provider\n */\n@Injectable({providedIn: 'root'})\nexport class MatPaginatorIntl {\n /**\n * Stream to emit from when labels are changed. Use this to notify components when the labels have\n * changed after initialization.\n */\n readonly changes: Subject<void> = new Subject<void>();\n\n /** A label for the page size selector. */\n itemsPerPageLabel: string = 'Items per page:';\n\n /** A label for the button that increments the current page. */\n nextPageLabel: string = 'Next page';\n\n /** A label for the button that decrements the current page. */\n previousPageLabel: string = 'Previous page';\n\n /** A label for the button that moves to the first page. */\n firstPageLabel: string = 'First page';\n\n /** A label for the button that moves to the last page. */\n lastPageLabel: string = 'Last page';\n\n /** A label for the range of items within the current page and the length of the whole list. */\n getRangeLabel: (page: number, pageSize: number, length: number) => string = (\n page: number,\n pageSize: number,\n length: number,\n ) => {\n if (length == 0 || pageSize == 0) {\n return `0 of ${length}`;\n }\n\n length = Math.max(length, 0);\n\n const startIndex = page * pageSize;\n\n // If the start index exceeds the list length, do not try and fix the end index to the end.\n const endIndex =\n startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;\n\n return `${startIndex + 1} – ${endIndex} of ${length}`;\n };\n}\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.dev/license\n */\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n InjectionToken,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n numberAttribute,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {MatOption, ThemePalette} from '../core';\nimport {MatSelect} from '../select';\nimport {MatIconButton} from '../button';\nimport {MatTooltip} from '../tooltip';\nimport {MatFormField, MatFormFieldAppearance} from '../form-field';\nimport {Observable, ReplaySubject, Subscription} from 'rxjs';\nimport {MatPaginatorIntl} from './paginator-intl';\n\n/** The default page size if there is no page size and there are no provided page size options. */\nconst DEFAULT_PAGE_SIZE = 50;\n\n/** Object that can used to configure the underlying `MatSelect` inside a `MatPaginator`. */\nexport interface MatPaginatorSelectConfig {\n /** Whether to center the active option over the trigger. */\n disableOptionCentering?: boolean;\n\n /** Classes to be passed to the select panel. */\n panelClass?: string | string[] | Set<string> | {[key: string]: any};\n}\n\n/**\n * Change event object that is emitted when the user selects a\n * different page size or navigates to another page.\n */\nexport class PageEvent {\n /** The current page index. */\n pageIndex: number;\n\n /**\n * Index of the page that was selected previously.\n * @breaking-change 8.0.0 To be made into a required property.\n */\n previousPageIndex?: number;\n\n /** The current page size. */\n pageSize: number;\n\n /** The current total number of items being paged. */\n length: number;\n}\n\n// Note that while `MatPaginatorDefaultOptions` and `MAT_PAGINATOR_DEFAULT_OPTIONS` are identical\n// between the MDC and non-MDC versions, we have to duplicate them, because the type of\n// `formFieldAppearance` is narrower in the MDC version.\n\n/** Object that can be used to configure the default options for the paginator module. */\nexport interface MatPaginatorDefaultOptions {\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?: MatFormFieldAppearance;\n}\n\n/** Injection token that can be used to provide the default options for the paginator module. */\nexport const MAT_PAGINATOR_DEFAULT_OPTIONS = new InjectionToken<MatPaginatorDefaultOptions>(\n 'MAT_PAGINATOR_DEFAULT_OPTIONS',\n);\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 */\n@Component({\n selector: 'mat-paginator',\n exportAs: 'matPaginator',\n templateUrl: 'paginator.html',\n styleUrl: 'paginator.css',\n host: {\n 'class': 'mat-mdc-paginator',\n 'role': 'group',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [MatFormField, MatSelect, MatOption, MatIconButton, MatTooltip],\n})\nexport class MatPaginator implements OnInit, OnDestroy {\n _intl = inject(MatPaginatorIntl);\n private _changeDetectorRef = inject(ChangeDetectorRef);\n\n /** If set, styles the \"page size\" form field with the designated style. */\n _formFieldAppearance?: MatFormFieldAppearance;\n\n /** ID for the DOM node containing the paginator's items per page label. */\n readonly _pageSizeLabelId = inject(_IdGenerator).getId('mat-paginator-page-size-label-');\n\n private _intlChanges: Subscription;\n private _isInitialized = false;\n private _initializedStream = new ReplaySubject<void>(1);\n\n /**\n * Theme color of the underlying form controls. This API is supported in M2\n * themes only,it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/paginator/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input() color: ThemePalette;\n\n /** The zero-based page index of the displayed list of items. Defaulted to 0. */\n @Input({transform: numberAttribute})\n get pageIndex(): number {\n return this._pageIndex;\n }\n set pageIndex(value: number) {\n this._pageIndex = Math.max(value || 0, 0);\n this._changeDetectorRef.markForCheck();\n }\n private _pageIndex = 0;\n\n /** The length of the total number of items that are being paginated. Defaulted to 0. */\n @Input({transform: numberAttribute})\n get length(): number {\n return this._length;\n }\n set length(value: number) {\n this._length = value || 0;\n this._changeDetectorRef.markForCheck();\n }\n private _length = 0;\n\n /** Number of items to display on a page. By default set to 50. */\n @Input({transform: numberAttribute})\n get pageSize(): number {\n return this._pageSize;\n }\n set pageSize(value: number) {\n this._pageSize = Math.max(value || 0, 0);\n this._updateDisplayedPageSizeOptions();\n }\n private _pageSize: number;\n\n /** The set of provided page size options to display to the user. */\n @Input()\n get pageSizeOptions(): number[] {\n return this._pageSizeOptions;\n }\n set pageSizeOptions(value: number[] | readonly number[]) {\n this._pageSizeOptions = (value || ([] as number[])).map(p => numberAttribute(p, 0));\n this._updateDisplayedPageSizeOptions();\n }\n private _pageSizeOptions: number[] = [];\n\n /** Whether to hide the page size selection UI from the user. */\n @Input({transform: booleanAttribute})\n hidePageSize: boolean = false;\n\n /** Whether to show the first/last buttons UI to the user. */\n @Input({transform: booleanAttribute})\n showFirstLastButtons: boolean = false;\n\n /** Used to configure the underlying `MatSelect` inside the paginator. */\n @Input() selectConfig: MatPaginatorSelectConfig = {};\n\n /** Whether the paginator is disabled. */\n @Input({transform: booleanAttribute})\n disabled: boolean = false;\n\n /** Event emitted when the paginator changes the page size or page index. */\n @Output() readonly page: EventEmitter<PageEvent> = new EventEmitter<PageEvent>();\n\n /** Displayed set of page size options. Will be sorted and include current page size. */\n _displayedPageSizeOptions: number[];\n\n /** Emits when the paginator is initialized. */\n initialized: Observable<void> = this._initializedStream;\n\n /** Inserted by Angular inject() migration for backwards compatibility */\n constructor(...args: unknown[]);\n\n constructor() {\n const _intl = this._intl;\n const defaults = inject<MatPaginatorDefaultOptions>(MAT_PAGINATOR_DEFAULT_OPTIONS, {\n optional: true,\n });\n\n this._intlChanges = _intl.changes.subscribe(() => this._changeDetectorRef.markForCheck());\n\n if (defaults) {\n const {pageSize, pageSizeOptions, hidePageSize, showFirstLastButtons} = defaults;\n\n if (pageSize != null) {\n this._pageSize = pageSize;\n }\n\n if (pageSizeOptions != null) {\n this._pageSizeOptions = pageSizeOptions;\n }\n\n if (hidePageSize != null) {\n this.hidePageSize = hidePageSize;\n }\n\n if (showFirstLastButtons != null) {\n this.showFirstLastButtons = showFirstLastButtons;\n }\n }\n\n this._formFieldAppearance = defaults?.formFieldAppearance || 'outline';\n }\n\n ngOnInit() {\n this._isInitialized = true;\n this._updateDisplayedPageSizeOptions();\n this._initializedStream.next();\n }\n\n ngOnDestroy() {\n this._initializedStream.complete();\n this._intlChanges.unsubscribe();\n }\n\n /** Advances to the next page if it exists. */\n nextPage(): void {\n if (this.hasNextPage()) {\n this._navigate(this.pageIndex + 1);\n }\n }\n\n /** Move back to the previous page if it exists. */\n previousPage(): void {\n if (this.hasPreviousPage()) {\n this._navigate(this.pageIndex - 1);\n }\n }\n\n /** Move to the first page if not already there. */\n firstPage(): void {\n // hasPreviousPage being false implies at the start\n if (this.hasPreviousPage()) {\n this._navigate(0);\n }\n }\n\n /** Move to the last page if not already there. */\n lastPage(): void {\n // hasNextPage being false implies at the end\n if (this.hasNextPage()) {\n this._navigate(this.getNumberOfPages() - 1);\n }\n }\n\n /** Whether there is a previous page. */\n hasPreviousPage(): boolean {\n return this.pageIndex >= 1 && this.pageSize != 0;\n }\n\n /** Whether there is a next page. */\n hasNextPage(): boolean {\n const maxPageIndex = this.getNumberOfPages() - 1;\n return this.pageIndex < maxPageIndex && this.pageSize != 0;\n }\n\n /** Calculate the number of pages */\n getNumberOfPages(): number {\n if (!this.pageSize) {\n return 0;\n }\n\n return Math.ceil(this.length / this.pageSize);\n }\n\n /**\n * Changes the page size so that the first item displayed on the page will still be\n * displayed using the new page size.\n *\n * For example, if the page size is 10 and on the second page (items indexed 10-19) then\n * switching so that the page size is 5 will set the third page as the current page so\n * that the 10th item will still be displayed.\n */\n _changePageSize(pageSize: number) {\n // Current page needs to be updated to reflect the new page size. Navigate to the page\n // containing the previous page's first item.\n const startIndex = this.pageIndex * this.pageSize;\n const previousPageIndex = this.pageIndex;\n\n this.pageIndex = Math.floor(startIndex / pageSize) || 0;\n this.pageSize = pageSize;\n this._emitPageEvent(previousPageIndex);\n }\n\n /** Checks whether the buttons for going forwards should be disabled. */\n _nextButtonsDisabled() {\n return this.disabled || !this.hasNextPage();\n }\n\n /** Checks whether the buttons for going backwards should be disabled. */\n _previousButtonsDisabled() {\n return this.disabled || !this.hasPreviousPage();\n }\n\n /**\n * Updates the list of page size options to display to the user. Includes making sure that\n * the page size is an option and that the list is sorted.\n */\n private _updateDisplayedPageSizeOptions() {\n if (!this._isInitialized) {\n return;\n }\n\n // If no page size is provided, use the first page size option or the default page size.\n if (!this.pageSize) {\n this._pageSize =\n this.pageSizeOptions.length != 0 ? this.pageSizeOptions[0] : DEFAULT_PAGE_SIZE;\n }\n\n this._displayedPageSizeOptions = this.pageSizeOptions.slice();\n\n if (this._displayedPageSizeOptions.indexOf(this.pageSize) === -1) {\n this._displayedPageSizeOptions.push(this.pageSize);\n }\n\n // Sort the numbers using a number-specific sort function.\n this._displayedPageSizeOptions.sort((a, b) => a - b);\n this._changeDetectorRef.markForCheck();\n }\n\n /** Emits an event notifying that a change of the paginator's properties has been triggered. */\n private _emitPageEvent(previousPageIndex: number) {\n this.page.emit({\n previousPageIndex,\n pageIndex: this.pageIndex,\n pageSize: this.pageSize,\n length: this.length,\n });\n }\n\n /** Navigates to a specific page index. */\n private _navigate(index: number) {\n const previousIndex = this.pageIndex;\n\n if (index !== previousIndex) {\n this.pageIndex = index;\n this._emitPageEvent(previousIndex);\n }\n }\n\n /**\n * Callback invoked when one of the navigation buttons is called.\n * @param targetIndex Index to which the paginator should navigate.\n * @param isDisabled Whether the button is disabled.\n */\n protected _buttonClicked(targetIndex: number, isDisabled: boolean) {\n // Note that normally disabled buttons won't dispatch the click event, but the paginator ones\n // do, because we're using `disabledInteractive` to allow them to be focusable. We need to\n // check here to avoid the navigation.\n if (!isDisabled) {\n this._navigate(targetIndex);\n }\n }\n}\n","<div class=\"mat-mdc-paginator-outer-container\">\n <div class=\"mat-mdc-paginator-container\">\n @if (!hidePageSize) {\n <div class=\"mat-mdc-paginator-page-size\">\n <div class=\"mat-mdc-paginator-page-size-label\" [attr.id]=\"_pageSizeLabelId\" aria-hidden=\"true\">\n {{_intl.itemsPerPageLabel}}\n </div>\n\n @if (_displayedPageSizeOptions.length > 1) {\n <mat-form-field\n [appearance]=\"_formFieldAppearance!\"\n [color]=\"color\"\n class=\"mat-mdc-paginator-page-size-select\">\n <mat-select\n #selectRef\n [value]=\"pageSize\"\n [disabled]=\"disabled\"\n [aria-labelledby]=\"_pageSizeLabelId\"\n [panelClass]=\"selectConfig.panelClass || ''\"\n [disableOptionCentering]=\"selectConfig.disableOptionCentering\"\n (selectionChange)=\"_changePageSize($event.value)\"\n hideSingleSelectionIndicator>\n @for (pageSizeOption of _displayedPageSizeOptions; track pageSizeOption) {\n <mat-option [value]=\"pageSizeOption\">\n {{pageSizeOption}}\n </mat-option>\n }\n </mat-select>\n <div class=\"mat-mdc-paginator-touch-target\" (click)=\"selectRef.open()\"></div>\n </mat-form-field>\n }\n\n @if (_displayedPageSizeOptions.length <= 1) {\n <div class=\"mat-mdc-paginator-page-size-value\">{{pageSize}}</div>\n }\n </div>\n }\n\n <div class=\"mat-mdc-paginator-range-actions\">\n <div class=\"mat-mdc-paginator-range-label\" aria-atomic=\"true\" aria-live=\"polite\" role=\"status\">\n {{_intl.getRangeLabel(pageIndex, pageSize, length)}}\n </div>\n\n <!--\n The buttons use `disabledInteractive` so that they can retain focus if they become disabled,\n otherwise focus is moved to the document body. However, users should not be able to navigate\n into these buttons, so `tabindex` is set to -1 when disabled.\n -->\n\n @if (showFirstLastButtons) {\n <button matIconButton type=\"button\"\n class=\"mat-mdc-paginator-navigation-first\"\n (click)=\"_buttonClicked(0, _previousButtonsDisabled())\"\n [attr.aria-label]=\"_intl.firstPageLabel\"\n [matTooltip]=\"_intl.firstPageLabel\"\n [matTooltipDisabled]=\"_previousButtonsDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"_previousButtonsDisabled()\"\n [tabindex]=\"_previousButtonsDisabled() ? -1 : null\"\n disabledInteractive>\n <svg class=\"mat-mdc-paginator-icon\"\n viewBox=\"0 0 24 24\"\n focusable=\"false\"\n aria-hidden=\"true\">\n <path d=\"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z\"/>\n </svg>\n </button>\n }\n <button matIconButton type=\"button\"\n class=\"mat-mdc-paginator-navigation-previous\"\n (click)=\"_buttonClicked(pageIndex - 1, _previousButtonsDisabled())\"\n [attr.aria-label]=\"_intl.previousPageLabel\"\n [matTooltip]=\"_intl.previousPageLabel\"\n [matTooltipDisabled]=\"_previousButtonsDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"_previousButtonsDisabled()\"\n [tabindex]=\"_previousButtonsDisabled() ? -1 : null\"\n disabledInteractive>\n <svg class=\"mat-mdc-paginator-icon\"\n viewBox=\"0 0 24 24\"\n focusable=\"false\"\n aria-hidden=\"true\">\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"/>\n </svg>\n </button>\n <button matIconButton type=\"button\"\n class=\"mat-mdc-paginator-navigation-next\"\n (click)=\"_buttonClicked(pageIndex + 1, _nextButtonsDisabled())\"\n [attr.aria-label]=\"_intl.nextPageLabel\"\n [matTooltip]=\"_intl.nextPageLabel\"\n [matTooltipDisabled]=\"_nextButtonsDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"_nextButtonsDisabled()\"\n [tabindex]=\"_nextButtonsDisabled() ? -1 : null\"\n disabledInteractive>\n <svg class=\"mat-mdc-paginator-icon\"\n viewBox=\"0 0 24 24\"\n focusable=\"false\"\n aria-hidden=\"true\">\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/>\n </svg>\n </button>\n @if (showFirstLastButtons) {\n <button matIconButton type=\"button\"\n class=\"mat-mdc-paginator-navigation-last\"\n (click)=\"_buttonClicked(getNumberOfPages() - 1, _nextButtonsDisabled())\"\n [attr.aria-label]=\"_intl.lastPageLabel\"\n [matTooltip]=\"_intl.lastPageLabel\"\n [matTooltipDisabled]=\"_nextButtonsDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"_nextButtonsDisabled()\"\n [tabindex]=\"_nextButtonsDisabled() ? -1 : null\"\n disabledInteractive>\n <svg class=\"mat-mdc-paginator-icon\"\n viewBox=\"0 0 24 24\"\n focusable=\"false\"\n aria-hidden=\"true\">\n <path d=\"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z\"/>\n </svg>\n </button>\n }\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.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '../button';\nimport {MatSelectModule} from '../select';\nimport {MatTooltipModule} from '../tooltip';\nimport {MatPaginator} from './paginator';\n\n@NgModule({\n imports: [MatButtonModule, MatSelectModule, MatTooltipModule, MatPaginator],\n exports: [MatPaginator],\n})\nexport class MatPaginatorModule {}\n"],"names":["MatPaginatorIntl","changes","Subject","itemsPerPageLabel","nextPageLabel","previousPageLabel","firstPageLabel","lastPageLabel","getRangeLabel","page","pageSize","length","Math","max","startIndex","endIndex","min","deps","target","i0","ɵɵFactoryTarget","Injectable","ɵprov","ɵɵngDeclareInjectable","minVersion","version","ngImport","type","decorators","providedIn","DEFAULT_PAGE_SIZE","PageEvent","pageIndex","previousPageIndex","MAT_PAGINATOR_DEFAULT_OPTIONS","InjectionToken","MatPaginator","_intl","inject","_changeDetectorRef","ChangeDetectorRef","_formFieldAppearance","_pageSizeLabelId","_IdGenerator","getId","_intlChanges","_isInitialized","_initializedStream","ReplaySubject","color","_pageIndex","value","markForCheck","_length","_pageSize","_updateDisplayedPageSizeOptions","pageSizeOptions","_pageSizeOptions","map","p","numberAttribute","hidePageSize","showFirstLastButtons","selectConfig","disabled","EventEmitter","_displayedPageSizeOptions","initialized","constructor","defaults","optional","subscribe","formFieldAppearance","ngOnInit","next","ngOnDestroy","complete","unsubscribe","nextPage","hasNextPage","_navigate","previousPage","hasPreviousPage","firstPage","lastPage","getNumberOfPages","maxPageIndex","ceil","_changePageSize","floor","_emitPageEvent","_nextButtonsDisabled","_previousButtonsDisabled","slice","indexOf","push","sort","a","b","emit","index","previousIndex","_buttonClicked","targetIndex","isDisabled","Component","isStandalone","selector","inputs","booleanAttribute","outputs","host","attributes","classAttribute","exportAs","template","styles","dependencies","kind","MatFormField","MatSelect","MatOption","MatIconButton","MatTooltip","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","imports","Input","transform","Output","MatPaginatorModule","NgModule","MatButtonModule","MatSelectModule","MatTooltipModule","exports","ɵinj","ɵɵngDeclareInjector","args"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgBaA,gBAAgB,CAAA;AAKlBC,EAAAA,OAAO,GAAkB,IAAIC,OAAO,EAAQ;AAGrDC,EAAAA,iBAAiB,GAAW,iBAAiB;AAG7CC,EAAAA,aAAa,GAAW,WAAW;AAGnCC,EAAAA,iBAAiB,GAAW,eAAe;AAG3CC,EAAAA,cAAc,GAAW,YAAY;AAGrCC,EAAAA,aAAa,GAAW,WAAW;AAGnCC,EAAAA,aAAa,GAA+DA,CAC1EC,IAAY,EACZC,QAAgB,EAChBC,MAAc,KACZ;AACF,IAAA,IAAIA,MAAM,IAAI,CAAC,IAAID,QAAQ,IAAI,CAAC,EAAE;MAChC,OAAO,CAAA,KAAA,EAAQC,MAAM,CAAE,CAAA;AACzB;IAEAA,MAAM,GAAGC,IAAI,CAACC,GAAG,CAACF,MAAM,EAAE,CAAC,CAAC;AAE5B,IAAA,MAAMG,UAAU,GAAGL,IAAI,GAAGC,QAAQ;AAGlC,IAAA,MAAMK,QAAQ,GACZD,UAAU,GAAGH,MAAM,GAAGC,IAAI,CAACI,GAAG,CAACF,UAAU,GAAGJ,QAAQ,EAAEC,MAAM,CAAC,GAAGG,UAAU,GAAGJ,QAAQ;IAEvF,OAAO,CAAA,EAAGI,UAAU,GAAG,CAAC,MAAMC,QAAQ,CAAA,IAAA,EAAOJ,MAAM,CAAE,CAAA;GACtD;;;;;UAzCUX,gBAAgB;AAAAiB,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC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;;;;;ME/KUC,kBAAkB,CAAA;;;;;UAAlBA,kBAAkB;AAAArH,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAmH;AAAA,GAAA,CAAA;;;;;UAAlBD,kBAAkB;IAAAJ,OAAA,EAAA,CAHnBM,eAAe,EAAEC,eAAe,EAAEC,gBAAgB,EAAEtG,YAAY,CAAA;IAAAuG,OAAA,EAAA,CAChEvG,YAAY;AAAA,GAAA,CAAA;AAEX,EAAA,OAAAwG,IAAA,GAAAzH,EAAA,CAAA0H,mBAAA,CAAA;AAAArH,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,eAAA;AAAAC,IAAAA,QAAA,EAAAP,EAAA;AAAAQ,IAAAA,IAAA,EAAA2G,kBAAkB;cAHnBE,eAAe,EAAEC,eAAe,EAAEC,gBAAgB,EAAEtG,YAAY;AAAA,GAAA,CAAA;;;;;;QAG/DkG,kBAAkB;AAAA1G,EAAAA,UAAA,EAAA,CAAA;UAJ9B2G,QAAQ;AAACO,IAAAA,IAAA,EAAA,CAAA;MACRZ,OAAO,EAAE,CAACM,eAAe,EAAEC,eAAe,EAAEC,gBAAgB,EAAEtG,YAAY,CAAC;MAC3EuG,OAAO,EAAE,CAACvG,YAAY;KACvB;;;;;;"}
|
|
1
|
+
{"version":3,"file":"paginator.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/paginator/paginator-intl.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/paginator/paginator.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/paginator/paginator.html","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/paginator/paginator-module.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.dev/license\n */\n\nimport {Injectable} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n/**\n * To modify the labels and text displayed, create a new instance of MatPaginatorIntl and\n * include it in a custom provider\n */\n@Injectable({providedIn: 'root'})\nexport class MatPaginatorIntl {\n /**\n * Stream to emit from when labels are changed. Use this to notify components when the labels have\n * changed after initialization.\n */\n readonly changes: Subject<void> = new Subject<void>();\n\n /** A label for the page size selector. */\n itemsPerPageLabel: string = 'Items per page:';\n\n /** A label for the button that increments the current page. */\n nextPageLabel: string = 'Next page';\n\n /** A label for the button that decrements the current page. */\n previousPageLabel: string = 'Previous page';\n\n /** A label for the button that moves to the first page. */\n firstPageLabel: string = 'First page';\n\n /** A label for the button that moves to the last page. */\n lastPageLabel: string = 'Last page';\n\n /** A label for the range of items within the current page and the length of the whole list. */\n getRangeLabel: (page: number, pageSize: number, length: number) => string = (\n page: number,\n pageSize: number,\n length: number,\n ) => {\n if (length == 0 || pageSize == 0) {\n return `0 of ${length}`;\n }\n\n length = Math.max(length, 0);\n\n const startIndex = page * pageSize;\n\n // If the start index exceeds the list length, do not try and fix the end index to the end.\n const endIndex =\n startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;\n\n return `${startIndex + 1} – ${endIndex} of ${length}`;\n };\n}\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.dev/license\n */\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n InjectionToken,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n numberAttribute,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {MatOption, ThemePalette} from '../core';\nimport {MatSelect} from '../select';\nimport {MatIconButton} from '../button';\nimport {MatTooltip} from '../tooltip';\nimport {MatFormField, MatFormFieldAppearance} from '../form-field';\nimport {Observable, ReplaySubject, Subscription} from 'rxjs';\nimport {MatPaginatorIntl} from './paginator-intl';\n\n/** The default page size if there is no page size and there are no provided page size options. */\nconst DEFAULT_PAGE_SIZE = 50;\n\n/** Object that can used to configure the underlying `MatSelect` inside a `MatPaginator`. */\nexport interface MatPaginatorSelectConfig {\n /** Whether to center the active option over the trigger. */\n disableOptionCentering?: boolean;\n\n /** Classes to be passed to the select panel. */\n panelClass?: string | string[] | Set<string> | {[key: string]: any};\n}\n\n/**\n * Change event object that is emitted when the user selects a\n * different page size or navigates to another page.\n */\nexport class PageEvent {\n /** The current page index. */\n pageIndex: number;\n\n /**\n * Index of the page that was selected previously.\n * @breaking-change 8.0.0 To be made into a required property.\n */\n previousPageIndex?: number;\n\n /** The current page size. */\n pageSize: number;\n\n /** The current total number of items being paged. */\n length: number;\n}\n\n// Note that while `MatPaginatorDefaultOptions` and `MAT_PAGINATOR_DEFAULT_OPTIONS` are identical\n// between the MDC and non-MDC versions, we have to duplicate them, because the type of\n// `formFieldAppearance` is narrower in the MDC version.\n\n/** Object that can be used to configure the default options for the paginator module. */\nexport interface MatPaginatorDefaultOptions {\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?: MatFormFieldAppearance;\n}\n\n/** Injection token that can be used to provide the default options for the paginator module. */\nexport const MAT_PAGINATOR_DEFAULT_OPTIONS = new InjectionToken<MatPaginatorDefaultOptions>(\n 'MAT_PAGINATOR_DEFAULT_OPTIONS',\n);\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 */\n@Component({\n selector: 'mat-paginator',\n exportAs: 'matPaginator',\n templateUrl: 'paginator.html',\n styleUrl: 'paginator.css',\n host: {\n 'class': 'mat-mdc-paginator',\n 'role': 'group',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [MatFormField, MatSelect, MatOption, MatIconButton, MatTooltip],\n})\nexport class MatPaginator implements OnInit, OnDestroy {\n _intl = inject(MatPaginatorIntl);\n private _changeDetectorRef = inject(ChangeDetectorRef);\n\n /** If set, styles the \"page size\" form field with the designated style. */\n _formFieldAppearance?: MatFormFieldAppearance;\n\n /** ID for the DOM node containing the paginator's items per page label. */\n readonly _pageSizeLabelId = inject(_IdGenerator).getId('mat-paginator-page-size-label-');\n\n private _intlChanges: Subscription;\n private _isInitialized = false;\n private _initializedStream = new ReplaySubject<void>(1);\n\n /**\n * Theme color of the underlying form controls. This API is supported in M2\n * themes only,it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/paginator/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input() color: ThemePalette;\n\n /** The zero-based page index of the displayed list of items. Defaulted to 0. */\n @Input({transform: numberAttribute})\n get pageIndex(): number {\n return this._pageIndex;\n }\n set pageIndex(value: number) {\n this._pageIndex = Math.max(value || 0, 0);\n this._changeDetectorRef.markForCheck();\n }\n private _pageIndex = 0;\n\n /** The length of the total number of items that are being paginated. Defaulted to 0. */\n @Input({transform: numberAttribute})\n get length(): number {\n return this._length;\n }\n set length(value: number) {\n this._length = value || 0;\n this._changeDetectorRef.markForCheck();\n }\n private _length = 0;\n\n /** Number of items to display on a page. By default set to 50. */\n @Input({transform: numberAttribute})\n get pageSize(): number {\n return this._pageSize;\n }\n set pageSize(value: number) {\n this._pageSize = Math.max(value || 0, 0);\n this._updateDisplayedPageSizeOptions();\n }\n private _pageSize: number;\n\n /** The set of provided page size options to display to the user. */\n @Input()\n get pageSizeOptions(): number[] {\n return this._pageSizeOptions;\n }\n set pageSizeOptions(value: number[] | readonly number[]) {\n this._pageSizeOptions = (value || ([] as number[])).map(p => numberAttribute(p, 0));\n this._updateDisplayedPageSizeOptions();\n }\n private _pageSizeOptions: number[] = [];\n\n /** Whether to hide the page size selection UI from the user. */\n @Input({transform: booleanAttribute})\n hidePageSize: boolean = false;\n\n /** Whether to show the first/last buttons UI to the user. */\n @Input({transform: booleanAttribute})\n showFirstLastButtons: boolean = false;\n\n /** Used to configure the underlying `MatSelect` inside the paginator. */\n @Input() selectConfig: MatPaginatorSelectConfig = {};\n\n /** Whether the paginator is disabled. */\n @Input({transform: booleanAttribute})\n disabled: boolean = false;\n\n /** Event emitted when the paginator changes the page size or page index. */\n @Output() readonly page: EventEmitter<PageEvent> = new EventEmitter<PageEvent>();\n\n /** Displayed set of page size options. Will be sorted and include current page size. */\n _displayedPageSizeOptions: number[];\n\n /** Emits when the paginator is initialized. */\n initialized: Observable<void> = this._initializedStream;\n\n /** Inserted by Angular inject() migration for backwards compatibility */\n constructor(...args: unknown[]);\n\n constructor() {\n const _intl = this._intl;\n const defaults = inject<MatPaginatorDefaultOptions>(MAT_PAGINATOR_DEFAULT_OPTIONS, {\n optional: true,\n });\n\n this._intlChanges = _intl.changes.subscribe(() => this._changeDetectorRef.markForCheck());\n\n if (defaults) {\n const {pageSize, pageSizeOptions, hidePageSize, showFirstLastButtons} = defaults;\n\n if (pageSize != null) {\n this._pageSize = pageSize;\n }\n\n if (pageSizeOptions != null) {\n this._pageSizeOptions = pageSizeOptions;\n }\n\n if (hidePageSize != null) {\n this.hidePageSize = hidePageSize;\n }\n\n if (showFirstLastButtons != null) {\n this.showFirstLastButtons = showFirstLastButtons;\n }\n }\n\n this._formFieldAppearance = defaults?.formFieldAppearance || 'outline';\n }\n\n ngOnInit() {\n this._isInitialized = true;\n this._updateDisplayedPageSizeOptions();\n this._initializedStream.next();\n }\n\n ngOnDestroy() {\n this._initializedStream.complete();\n this._intlChanges.unsubscribe();\n }\n\n /** Advances to the next page if it exists. */\n nextPage(): void {\n if (this.hasNextPage()) {\n this._navigate(this.pageIndex + 1);\n }\n }\n\n /** Move back to the previous page if it exists. */\n previousPage(): void {\n if (this.hasPreviousPage()) {\n this._navigate(this.pageIndex - 1);\n }\n }\n\n /** Move to the first page if not already there. */\n firstPage(): void {\n // hasPreviousPage being false implies at the start\n if (this.hasPreviousPage()) {\n this._navigate(0);\n }\n }\n\n /** Move to the last page if not already there. */\n lastPage(): void {\n // hasNextPage being false implies at the end\n if (this.hasNextPage()) {\n this._navigate(this.getNumberOfPages() - 1);\n }\n }\n\n /** Whether there is a previous page. */\n hasPreviousPage(): boolean {\n return this.pageIndex >= 1 && this.pageSize != 0;\n }\n\n /** Whether there is a next page. */\n hasNextPage(): boolean {\n const maxPageIndex = this.getNumberOfPages() - 1;\n return this.pageIndex < maxPageIndex && this.pageSize != 0;\n }\n\n /** Calculate the number of pages */\n getNumberOfPages(): number {\n if (!this.pageSize) {\n return 0;\n }\n\n return Math.ceil(this.length / this.pageSize);\n }\n\n /**\n * Changes the page size so that the first item displayed on the page will still be\n * displayed using the new page size.\n *\n * For example, if the page size is 10 and on the second page (items indexed 10-19) then\n * switching so that the page size is 5 will set the third page as the current page so\n * that the 10th item will still be displayed.\n */\n _changePageSize(pageSize: number) {\n // Current page needs to be updated to reflect the new page size. Navigate to the page\n // containing the previous page's first item.\n const startIndex = this.pageIndex * this.pageSize;\n const previousPageIndex = this.pageIndex;\n\n this.pageIndex = Math.floor(startIndex / pageSize) || 0;\n this.pageSize = pageSize;\n this._emitPageEvent(previousPageIndex);\n }\n\n /** Checks whether the buttons for going forwards should be disabled. */\n _nextButtonsDisabled() {\n return this.disabled || !this.hasNextPage();\n }\n\n /** Checks whether the buttons for going backwards should be disabled. */\n _previousButtonsDisabled() {\n return this.disabled || !this.hasPreviousPage();\n }\n\n /**\n * Updates the list of page size options to display to the user. Includes making sure that\n * the page size is an option and that the list is sorted.\n */\n private _updateDisplayedPageSizeOptions() {\n if (!this._isInitialized) {\n return;\n }\n\n // If no page size is provided, use the first page size option or the default page size.\n if (!this.pageSize) {\n this._pageSize =\n this.pageSizeOptions.length != 0 ? this.pageSizeOptions[0] : DEFAULT_PAGE_SIZE;\n }\n\n this._displayedPageSizeOptions = this.pageSizeOptions.slice();\n\n if (this._displayedPageSizeOptions.indexOf(this.pageSize) === -1) {\n this._displayedPageSizeOptions.push(this.pageSize);\n }\n\n // Sort the numbers using a number-specific sort function.\n this._displayedPageSizeOptions.sort((a, b) => a - b);\n this._changeDetectorRef.markForCheck();\n }\n\n /** Emits an event notifying that a change of the paginator's properties has been triggered. */\n private _emitPageEvent(previousPageIndex: number) {\n this.page.emit({\n previousPageIndex,\n pageIndex: this.pageIndex,\n pageSize: this.pageSize,\n length: this.length,\n });\n }\n\n /** Navigates to a specific page index. */\n private _navigate(index: number) {\n const previousIndex = this.pageIndex;\n\n if (index !== previousIndex) {\n this.pageIndex = index;\n this._emitPageEvent(previousIndex);\n }\n }\n\n /**\n * Callback invoked when one of the navigation buttons is called.\n * @param targetIndex Index to which the paginator should navigate.\n * @param isDisabled Whether the button is disabled.\n */\n protected _buttonClicked(targetIndex: number, isDisabled: boolean) {\n // Note that normally disabled buttons won't dispatch the click event, but the paginator ones\n // do, because we're using `disabledInteractive` to allow them to be focusable. We need to\n // check here to avoid the navigation.\n if (!isDisabled) {\n this._navigate(targetIndex);\n }\n }\n}\n","<div class=\"mat-mdc-paginator-outer-container\">\n <div class=\"mat-mdc-paginator-container\">\n @if (!hidePageSize) {\n <div class=\"mat-mdc-paginator-page-size\">\n <div class=\"mat-mdc-paginator-page-size-label\" [attr.id]=\"_pageSizeLabelId\" aria-hidden=\"true\">\n {{_intl.itemsPerPageLabel}}\n </div>\n\n @if (_displayedPageSizeOptions.length > 1) {\n <mat-form-field\n [appearance]=\"_formFieldAppearance!\"\n [color]=\"color\"\n class=\"mat-mdc-paginator-page-size-select\">\n <mat-select\n #selectRef\n [value]=\"pageSize\"\n [disabled]=\"disabled\"\n [aria-labelledby]=\"_pageSizeLabelId\"\n [panelClass]=\"selectConfig.panelClass || ''\"\n [disableOptionCentering]=\"selectConfig.disableOptionCentering\"\n (selectionChange)=\"_changePageSize($event.value)\"\n hideSingleSelectionIndicator>\n @for (pageSizeOption of _displayedPageSizeOptions; track pageSizeOption) {\n <mat-option [value]=\"pageSizeOption\">\n {{pageSizeOption}}\n </mat-option>\n }\n </mat-select>\n <div class=\"mat-mdc-paginator-touch-target\" (click)=\"selectRef.open()\"></div>\n </mat-form-field>\n }\n\n @if (_displayedPageSizeOptions.length <= 1) {\n <div class=\"mat-mdc-paginator-page-size-value\">{{pageSize}}</div>\n }\n </div>\n }\n\n <div class=\"mat-mdc-paginator-range-actions\">\n <div class=\"mat-mdc-paginator-range-label\" aria-atomic=\"true\" aria-live=\"polite\" role=\"status\">\n {{_intl.getRangeLabel(pageIndex, pageSize, length)}}\n </div>\n\n <!--\n The buttons use `disabledInteractive` so that they can retain focus if they become disabled,\n otherwise focus is moved to the document body. However, users should not be able to navigate\n into these buttons, so `tabindex` is set to -1 when disabled.\n -->\n\n @if (showFirstLastButtons) {\n <button matIconButton type=\"button\"\n class=\"mat-mdc-paginator-navigation-first\"\n (click)=\"_buttonClicked(0, _previousButtonsDisabled())\"\n [attr.aria-label]=\"_intl.firstPageLabel\"\n [matTooltip]=\"_intl.firstPageLabel\"\n [matTooltipDisabled]=\"_previousButtonsDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"_previousButtonsDisabled()\"\n [tabindex]=\"_previousButtonsDisabled() ? -1 : null\"\n disabledInteractive>\n <svg class=\"mat-mdc-paginator-icon\"\n viewBox=\"0 0 24 24\"\n focusable=\"false\"\n aria-hidden=\"true\">\n <path d=\"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z\"/>\n </svg>\n </button>\n }\n <button matIconButton type=\"button\"\n class=\"mat-mdc-paginator-navigation-previous\"\n (click)=\"_buttonClicked(pageIndex - 1, _previousButtonsDisabled())\"\n [attr.aria-label]=\"_intl.previousPageLabel\"\n [matTooltip]=\"_intl.previousPageLabel\"\n [matTooltipDisabled]=\"_previousButtonsDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"_previousButtonsDisabled()\"\n [tabindex]=\"_previousButtonsDisabled() ? -1 : null\"\n disabledInteractive>\n <svg class=\"mat-mdc-paginator-icon\"\n viewBox=\"0 0 24 24\"\n focusable=\"false\"\n aria-hidden=\"true\">\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"/>\n </svg>\n </button>\n <button matIconButton type=\"button\"\n class=\"mat-mdc-paginator-navigation-next\"\n (click)=\"_buttonClicked(pageIndex + 1, _nextButtonsDisabled())\"\n [attr.aria-label]=\"_intl.nextPageLabel\"\n [matTooltip]=\"_intl.nextPageLabel\"\n [matTooltipDisabled]=\"_nextButtonsDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"_nextButtonsDisabled()\"\n [tabindex]=\"_nextButtonsDisabled() ? -1 : null\"\n disabledInteractive>\n <svg class=\"mat-mdc-paginator-icon\"\n viewBox=\"0 0 24 24\"\n focusable=\"false\"\n aria-hidden=\"true\">\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/>\n </svg>\n </button>\n @if (showFirstLastButtons) {\n <button matIconButton type=\"button\"\n class=\"mat-mdc-paginator-navigation-last\"\n (click)=\"_buttonClicked(getNumberOfPages() - 1, _nextButtonsDisabled())\"\n [attr.aria-label]=\"_intl.lastPageLabel\"\n [matTooltip]=\"_intl.lastPageLabel\"\n [matTooltipDisabled]=\"_nextButtonsDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"_nextButtonsDisabled()\"\n [tabindex]=\"_nextButtonsDisabled() ? -1 : null\"\n disabledInteractive>\n <svg class=\"mat-mdc-paginator-icon\"\n viewBox=\"0 0 24 24\"\n focusable=\"false\"\n aria-hidden=\"true\">\n <path d=\"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z\"/>\n </svg>\n </button>\n }\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.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '../button';\nimport {MatSelectModule} from '../select';\nimport {MatTooltipModule} from '../tooltip';\nimport {MatPaginator} from './paginator';\n\n@NgModule({\n imports: [MatButtonModule, MatSelectModule, MatTooltipModule, MatPaginator],\n exports: [MatPaginator],\n})\nexport class MatPaginatorModule {}\n"],"names":["MatPaginatorIntl","changes","Subject","itemsPerPageLabel","nextPageLabel","previousPageLabel","firstPageLabel","lastPageLabel","getRangeLabel","page","pageSize","length","Math","max","startIndex","endIndex","min","deps","target","i0","ɵɵFactoryTarget","Injectable","ɵprov","ɵɵngDeclareInjectable","minVersion","version","ngImport","type","decorators","providedIn","DEFAULT_PAGE_SIZE","PageEvent","pageIndex","previousPageIndex","MAT_PAGINATOR_DEFAULT_OPTIONS","InjectionToken","MatPaginator","_intl","inject","_changeDetectorRef","ChangeDetectorRef","_formFieldAppearance","_pageSizeLabelId","_IdGenerator","getId","_intlChanges","_isInitialized","_initializedStream","ReplaySubject","color","_pageIndex","value","markForCheck","_length","_pageSize","_updateDisplayedPageSizeOptions","pageSizeOptions","_pageSizeOptions","map","p","numberAttribute","hidePageSize","showFirstLastButtons","selectConfig","disabled","EventEmitter","_displayedPageSizeOptions","initialized","constructor","defaults","optional","subscribe","formFieldAppearance","ngOnInit","next","ngOnDestroy","complete","unsubscribe","nextPage","hasNextPage","_navigate","previousPage","hasPreviousPage","firstPage","lastPage","getNumberOfPages","maxPageIndex","ceil","_changePageSize","floor","_emitPageEvent","_nextButtonsDisabled","_previousButtonsDisabled","slice","indexOf","push","sort","a","b","emit","index","previousIndex","_buttonClicked","targetIndex","isDisabled","Component","isStandalone","selector","inputs","booleanAttribute","outputs","host","attributes","classAttribute","exportAs","template","styles","dependencies","kind","MatFormField","MatSelect","MatOption","MatIconButton","MatTooltip","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","imports","Input","transform","Output","MatPaginatorModule","NgModule","MatButtonModule","MatSelectModule","MatTooltipModule","exports","ɵinj","ɵɵngDeclareInjector","args"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgBaA,gBAAgB,CAAA;AAKlBC,EAAAA,OAAO,GAAkB,IAAIC,OAAO,EAAQ;AAGrDC,EAAAA,iBAAiB,GAAW,iBAAiB;AAG7CC,EAAAA,aAAa,GAAW,WAAW;AAGnCC,EAAAA,iBAAiB,GAAW,eAAe;AAG3CC,EAAAA,cAAc,GAAW,YAAY;AAGrCC,EAAAA,aAAa,GAAW,WAAW;AAGnCC,EAAAA,aAAa,GAA+DA,CAC1EC,IAAY,EACZC,QAAgB,EAChBC,MAAc,KACZ;AACF,IAAA,IAAIA,MAAM,IAAI,CAAC,IAAID,QAAQ,IAAI,CAAC,EAAE;MAChC,OAAO,CAAA,KAAA,EAAQC,MAAM,CAAE,CAAA;AACzB;IAEAA,MAAM,GAAGC,IAAI,CAACC,GAAG,CAACF,MAAM,EAAE,CAAC,CAAC;AAE5B,IAAA,MAAMG,UAAU,GAAGL,IAAI,GAAGC,QAAQ;AAGlC,IAAA,MAAMK,QAAQ,GACZD,UAAU,GAAGH,MAAM,GAAGC,IAAI,CAACI,GAAG,CAACF,UAAU,GAAGJ,QAAQ,EAAEC,MAAM,CAAC,GAAGG,UAAU,GAAGJ,QAAQ;IAEvF,OAAO,CAAA,EAAGI,UAAU,GAAG,CAAC,MAAMC,QAAQ,CAAA,IAAA,EAAOJ,MAAM,CAAE,CAAA;GACtD;;;;;UAzCUX,gBAAgB;AAAAiB,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAC;AAAA,GAAA,CAAA;AAAhB,EAAA,OAAAC,KAAA,GAAAH,EAAA,CAAAI,qBAAA,CAAA;AAAAC,IAAAA,UAAA,EAAA,QAAA;AAA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,CAAAmH;AAAA,GAAA,CAAA;;;;;UAAlBD,kBAAkB;IAAAJ,OAAA,EAAA,CAHnBM,eAAe,EAAEC,eAAe,EAAEC,gBAAgB,EAAEtG,YAAY,CAAA;IAAAuG,OAAA,EAAA,CAChEvG,YAAY;AAAA,GAAA,CAAA;AAEX,EAAA,OAAAwG,IAAA,GAAAzH,EAAA,CAAA0H,mBAAA,CAAA;AAAArH,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,eAAA;AAAAC,IAAAA,QAAA,EAAAP,EAAA;AAAAQ,IAAAA,IAAA,EAAA2G,kBAAkB;cAHnBE,eAAe,EAAEC,eAAe,EAAEC,gBAAgB,EAAEtG,YAAY;AAAA,GAAA,CAAA;;;;;;QAG/DkG,kBAAkB;AAAA1G,EAAAA,UAAA,EAAA,CAAA;UAJ9B2G,QAAQ;AAACO,IAAAA,IAAA,EAAA,CAAA;MACRZ,OAAO,EAAE,CAACM,eAAe,EAAEC,eAAe,EAAEC,gBAAgB,EAAEtG,YAAY,CAAC;MAC3EuG,OAAO,EAAE,CAACvG,YAAY;KACvB;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar-testing.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"progress-bar-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-bar/testing/progress-bar-harness.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.dev/license\n */\n\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {ProgressBarHarnessFilters} from './progress-bar-harness-filters';\n\n/** Harness for interacting with a `mat-progress-bar` in tests. */\nexport class MatProgressBarHarness extends ComponentHarness {\n static hostSelector = '.mat-mdc-progress-bar';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a progress bar with specific\n * attributes.\n * @param options Options for filtering which progress bar instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatProgressBarHarness>(\n this: ComponentHarnessConstructor<T>,\n options: ProgressBarHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options);\n }\n\n /** Gets a promise for the progress bar's value. */\n async getValue(): Promise<number | null> {\n const host = await this.host();\n const ariaValue = await host.getAttribute('aria-valuenow');\n return ariaValue ? coerceNumberProperty(ariaValue) : null;\n }\n\n /** Gets a promise for the progress bar's mode. */\n async getMode(): Promise<string | null> {\n return (await this.host()).getAttribute('mode');\n }\n}\n"],"names":["MatProgressBarHarness","ComponentHarness","hostSelector","with","options","HarnessPredicate","getValue","host","ariaValue","getAttribute","coerceNumberProperty","getMode"],"mappings":";;;AAiBM,MAAOA,qBAAsB,SAAQC,gBAAgB,CAAA;EACzD,OAAOC,YAAY,GAAG,uBAAuB;AAQ7C,EAAA,OAAOC,IAAIA,CAETC,OAAA,GAAqC,EAAE,EAAA;AAEvC,IAAA,OAAO,IAAIC,gBAAgB,CAAC,IAAI,EAAED,OAAO,CAAC;AAC5C;EAGA,MAAME,QAAQA,GAAA;AACZ,IAAA,MAAMC,IAAI,GAAG,MAAM,IAAI,CAACA,IAAI,EAAE;IAC9B,MAAMC,SAAS,GAAG,MAAMD,IAAI,CAACE,YAAY,CAAC,eAAe,CAAC;AAC1D,IAAA,OAAOD,SAAS,GAAGE,oBAAoB,CAACF,SAAS,CAAC,GAAG,IAAI;AAC3D;EAGA,MAAMG,OAAOA,GAAA;IACX,OAAO,CAAC,MAAM,IAAI,CAACJ,IAAI,EAAE,EAAEE,YAAY,CAAC,MAAM,CAAC;AACjD;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-bar/progress-bar.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-bar/progress-bar.html","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-bar/progress-bar-module.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.dev/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n ElementRef,\n NgZone,\n Input,\n Output,\n EventEmitter,\n AfterViewInit,\n OnDestroy,\n ChangeDetectorRef,\n InjectionToken,\n inject,\n numberAttribute,\n Renderer2,\n DOCUMENT,\n} from '@angular/core';\n\nimport {_getAnimationsState, ThemePalette} from '../core';\n\n/** Last animation end data. */\nexport interface ProgressAnimationEnd {\n value: number;\n}\n\n/** Default `mat-progress-bar` options that can be overridden. */\nexport interface MatProgressBarDefaultOptions {\n /**\n * Default theme color of the progress bar. This API is supported in M2 themes only,\n * it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-bar/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color?: ThemePalette;\n\n /** Default mode of the progress bar. */\n mode?: ProgressBarMode;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-bar`. */\nexport const MAT_PROGRESS_BAR_DEFAULT_OPTIONS = new InjectionToken<MatProgressBarDefaultOptions>(\n 'MAT_PROGRESS_BAR_DEFAULT_OPTIONS',\n);\n\n/**\n * Injection token used to provide the current location to `MatProgressBar`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const MAT_PROGRESS_BAR_LOCATION = new InjectionToken<MatProgressBarLocation>(\n 'mat-progress-bar-location',\n {\n providedIn: 'root',\n factory: () => {\n const _document = inject(DOCUMENT);\n const _location = _document ? _document.location : null;\n\n return {\n // Note that this needs to be a function, rather than a property, because Angular\n // will only resolve it once, but we want the current path on each call.\n getPathname: () => (_location ? _location.pathname + _location.search : ''),\n };\n },\n },\n);\n\n/**\n * Stubbed out location for `MatProgressBar`.\n * @docs-private\n */\nexport interface MatProgressBarLocation {\n getPathname: () => string;\n}\n\nexport type ProgressBarMode = 'determinate' | 'indeterminate' | 'buffer' | 'query';\n\n@Component({\n selector: 'mat-progress-bar',\n exportAs: 'matProgressBar',\n host: {\n 'role': 'progressbar',\n 'aria-valuemin': '0',\n 'aria-valuemax': '100',\n // set tab index to -1 so screen readers will read the aria-label\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n 'tabindex': '-1',\n '[attr.aria-valuenow]': '_isIndeterminate() ? null : value',\n '[attr.mode]': 'mode',\n 'class': 'mat-mdc-progress-bar mdc-linear-progress',\n '[class]': '\"mat-\" + color',\n '[class._mat-animation-noopable]': '_isNoopAnimation',\n '[class.mdc-linear-progress--animation-ready]': '!_isNoopAnimation',\n '[class.mdc-linear-progress--indeterminate]': '_isIndeterminate()',\n },\n templateUrl: 'progress-bar.html',\n styleUrl: 'progress-bar.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatProgressBar implements AfterViewInit, OnDestroy {\n readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _ngZone = inject(NgZone);\n private _changeDetectorRef = inject(ChangeDetectorRef);\n private _renderer = inject(Renderer2);\n private _cleanupTransitionEnd: (() => void) | undefined;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const animationsState = _getAnimationsState();\n\n const defaults = inject<MatProgressBarDefaultOptions>(MAT_PROGRESS_BAR_DEFAULT_OPTIONS, {\n optional: true,\n });\n\n this._isNoopAnimation = animationsState === 'di-disabled';\n\n if (animationsState === 'reduced-motion') {\n this._elementRef.nativeElement.classList.add('mat-progress-bar-reduced-motion');\n }\n\n if (defaults) {\n if (defaults.color) {\n this.color = this._defaultColor = defaults.color;\n }\n\n this.mode = defaults.mode || this.mode;\n }\n }\n\n /** Flag that indicates whether NoopAnimations mode is set to true. */\n _isNoopAnimation: boolean;\n\n // TODO: should be typed as `ThemePalette` but internal apps pass in arbitrary strings.\n /**\n * Theme color of the progress bar. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-bar/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input()\n get color() {\n return this._color || this._defaultColor;\n }\n set color(value: string | null | undefined) {\n this._color = value;\n }\n private _color: string | null | undefined;\n private _defaultColor: ThemePalette = 'primary';\n\n /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\n @Input({transform: numberAttribute})\n get value(): number {\n return this._value;\n }\n set value(v: number) {\n this._value = clamp(v || 0);\n this._changeDetectorRef.markForCheck();\n }\n private _value = 0;\n\n /** Buffer value of the progress bar. Defaults to zero. */\n @Input({transform: numberAttribute})\n get bufferValue(): number {\n return this._bufferValue || 0;\n }\n set bufferValue(v: number) {\n this._bufferValue = clamp(v || 0);\n this._changeDetectorRef.markForCheck();\n }\n private _bufferValue = 0;\n\n /**\n * Event emitted when animation of the primary progress bar completes. This event will not\n * be emitted when animations are disabled, nor will it be emitted for modes with continuous\n * animations (indeterminate and query).\n */\n @Output() readonly animationEnd = new EventEmitter<ProgressAnimationEnd>();\n\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n @Input()\n get mode(): ProgressBarMode {\n return this._mode;\n }\n set mode(value: ProgressBarMode) {\n // Note that we don't technically need a getter and a setter here,\n // but we use it to match the behavior of the existing mat-progress-bar.\n this._mode = value;\n this._changeDetectorRef.markForCheck();\n }\n private _mode: ProgressBarMode = 'determinate';\n\n ngAfterViewInit() {\n // Run outside angular so change detection didn't get triggered on every transition end\n // instead only on the animation that we care about (primary value bar's transitionend)\n this._ngZone.runOutsideAngular(() => {\n this._cleanupTransitionEnd = this._renderer.listen(\n this._elementRef.nativeElement,\n 'transitionend',\n this._transitionendHandler,\n );\n });\n }\n\n ngOnDestroy() {\n this._cleanupTransitionEnd?.();\n }\n\n /** Gets the transform style that should be applied to the primary bar. */\n _getPrimaryBarTransform(): string {\n return `scaleX(${this._isIndeterminate() ? 1 : this.value / 100})`;\n }\n\n /** Gets the `flex-basis` value that should be applied to the buffer bar. */\n _getBufferBarFlexBasis(): string {\n return `${this.mode === 'buffer' ? this.bufferValue : 100}%`;\n }\n\n /** Returns whether the progress bar is indeterminate. */\n _isIndeterminate(): boolean {\n return this.mode === 'indeterminate' || this.mode === 'query';\n }\n\n /** Event handler for `transitionend` events. */\n private _transitionendHandler = (event: TransitionEvent) => {\n if (\n this.animationEnd.observers.length === 0 ||\n !event.target ||\n !(event.target as HTMLElement).classList.contains('mdc-linear-progress__primary-bar')\n ) {\n return;\n }\n\n if (this.mode === 'determinate' || this.mode === 'buffer') {\n this._ngZone.run(() => this.animationEnd.next({value: this.value}));\n }\n };\n}\n\n/** Clamps a value to be between two numbers, by default 0 and 100. */\nfunction clamp(v: number, min = 0, max = 100) {\n return Math.max(min, Math.min(max, v));\n}\n","<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<div class=\"mdc-linear-progress__buffer\" aria-hidden=\"true\">\n <div\n class=\"mdc-linear-progress__buffer-bar\"\n [style.flex-basis]=\"_getBufferBarFlexBasis()\"></div>\n <!-- Remove the dots outside of buffer mode since they can cause CSP issues (see #28938) -->\n @if (mode === 'buffer') {\n <div class=\"mdc-linear-progress__buffer-dots\"></div>\n }\n</div>\n<div\n class=\"mdc-linear-progress__bar mdc-linear-progress__primary-bar\"\n aria-hidden=\"true\"\n [style.transform]=\"_getPrimaryBarTransform()\">\n <span class=\"mdc-linear-progress__bar-inner\"></span>\n</div>\n<div class=\"mdc-linear-progress__bar mdc-linear-progress__secondary-bar\" aria-hidden=\"true\">\n <span class=\"mdc-linear-progress__bar-inner\"></span>\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.dev/license\n */\n\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {NgModule} from '@angular/core';\nimport {MatProgressBar} from './progress-bar';\n\n@NgModule({\n imports: [MatProgressBar],\n exports: [MatProgressBar, BidiModule],\n})\nexport class MatProgressBarModule {}\n"],"names":["MAT_PROGRESS_BAR_DEFAULT_OPTIONS","InjectionToken","MAT_PROGRESS_BAR_LOCATION","providedIn","factory","_document","inject","DOCUMENT","_location","location","getPathname","pathname","search","MatProgressBar","_elementRef","ElementRef","_ngZone","NgZone","_changeDetectorRef","ChangeDetectorRef","_renderer","Renderer2","_cleanupTransitionEnd","constructor","animationsState","_getAnimationsState","defaults","optional","_isNoopAnimation","nativeElement","classList","add","color","_defaultColor","mode","_color","value","_value","v","clamp","markForCheck","bufferValue","_bufferValue","animationEnd","EventEmitter","_mode","ngAfterViewInit","runOutsideAngular","listen","_transitionendHandler","ngOnDestroy","_getPrimaryBarTransform","_isIndeterminate","_getBufferBarFlexBasis","event","observers","length","target","contains","run","next","deps","i0","ɵɵFactoryTarget","Component","ɵcmp","ɵɵngDeclareComponent","minVersion","version","type","isStandalone","selector","inputs","numberAttribute","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","exportAs","host","template","Input","transform","Output","min","max","Math","MatProgressBarModule","NgModule","ɵmod","ɵɵngDeclareNgModule","ngImport","imports","exports","BidiModule","ɵinj","ɵɵngDeclareInjector","args"],"mappings":";;;;;;MAkDaA,gCAAgC,GAAG,IAAIC,cAAc,CAChE,kCAAkC;MAQvBC,yBAAyB,GAAG,IAAID,cAAc,CACzD,2BAA2B,EAC3B;AACEE,EAAAA,UAAU,EAAE,MAAM;EAClBC,OAAO,EAAEA,MAAK;AACZ,IAAA,MAAMC,SAAS,GAAGC,MAAM,CAACC,QAAQ,CAAC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AACzBoF,MAAAA,OAAO,EAAE,CAACpF,cAAc,EAAEqF,UAAU;KACrC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"progress-bar.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-bar/progress-bar.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-bar/progress-bar.html","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-bar/progress-bar-module.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.dev/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n ElementRef,\n NgZone,\n Input,\n Output,\n EventEmitter,\n AfterViewInit,\n OnDestroy,\n ChangeDetectorRef,\n InjectionToken,\n inject,\n numberAttribute,\n Renderer2,\n DOCUMENT,\n} from '@angular/core';\n\nimport {_getAnimationsState, ThemePalette} from '../core';\n\n/** Last animation end data. */\nexport interface ProgressAnimationEnd {\n value: number;\n}\n\n/** Default `mat-progress-bar` options that can be overridden. */\nexport interface MatProgressBarDefaultOptions {\n /**\n * Default theme color of the progress bar. This API is supported in M2 themes only,\n * it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-bar/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color?: ThemePalette;\n\n /** Default mode of the progress bar. */\n mode?: ProgressBarMode;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-bar`. */\nexport const MAT_PROGRESS_BAR_DEFAULT_OPTIONS = new InjectionToken<MatProgressBarDefaultOptions>(\n 'MAT_PROGRESS_BAR_DEFAULT_OPTIONS',\n);\n\n/**\n * Injection token used to provide the current location to `MatProgressBar`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const MAT_PROGRESS_BAR_LOCATION = new InjectionToken<MatProgressBarLocation>(\n 'mat-progress-bar-location',\n {\n providedIn: 'root',\n factory: () => {\n const _document = inject(DOCUMENT);\n const _location = _document ? _document.location : null;\n\n return {\n // Note that this needs to be a function, rather than a property, because Angular\n // will only resolve it once, but we want the current path on each call.\n getPathname: () => (_location ? _location.pathname + _location.search : ''),\n };\n },\n },\n);\n\n/**\n * Stubbed out location for `MatProgressBar`.\n * @docs-private\n */\nexport interface MatProgressBarLocation {\n getPathname: () => string;\n}\n\nexport type ProgressBarMode = 'determinate' | 'indeterminate' | 'buffer' | 'query';\n\n@Component({\n selector: 'mat-progress-bar',\n exportAs: 'matProgressBar',\n host: {\n 'role': 'progressbar',\n 'aria-valuemin': '0',\n 'aria-valuemax': '100',\n // set tab index to -1 so screen readers will read the aria-label\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n 'tabindex': '-1',\n '[attr.aria-valuenow]': '_isIndeterminate() ? null : value',\n '[attr.mode]': 'mode',\n 'class': 'mat-mdc-progress-bar mdc-linear-progress',\n '[class]': '\"mat-\" + color',\n '[class._mat-animation-noopable]': '_isNoopAnimation',\n '[class.mdc-linear-progress--animation-ready]': '!_isNoopAnimation',\n '[class.mdc-linear-progress--indeterminate]': '_isIndeterminate()',\n },\n templateUrl: 'progress-bar.html',\n styleUrl: 'progress-bar.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatProgressBar implements AfterViewInit, OnDestroy {\n readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _ngZone = inject(NgZone);\n private _changeDetectorRef = inject(ChangeDetectorRef);\n private _renderer = inject(Renderer2);\n private _cleanupTransitionEnd: (() => void) | undefined;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const animationsState = _getAnimationsState();\n\n const defaults = inject<MatProgressBarDefaultOptions>(MAT_PROGRESS_BAR_DEFAULT_OPTIONS, {\n optional: true,\n });\n\n this._isNoopAnimation = animationsState === 'di-disabled';\n\n if (animationsState === 'reduced-motion') {\n this._elementRef.nativeElement.classList.add('mat-progress-bar-reduced-motion');\n }\n\n if (defaults) {\n if (defaults.color) {\n this.color = this._defaultColor = defaults.color;\n }\n\n this.mode = defaults.mode || this.mode;\n }\n }\n\n /** Flag that indicates whether NoopAnimations mode is set to true. */\n _isNoopAnimation: boolean;\n\n // TODO: should be typed as `ThemePalette` but internal apps pass in arbitrary strings.\n /**\n * Theme color of the progress bar. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-bar/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input()\n get color() {\n return this._color || this._defaultColor;\n }\n set color(value: string | null | undefined) {\n this._color = value;\n }\n private _color: string | null | undefined;\n private _defaultColor: ThemePalette = 'primary';\n\n /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\n @Input({transform: numberAttribute})\n get value(): number {\n return this._value;\n }\n set value(v: number) {\n this._value = clamp(v || 0);\n this._changeDetectorRef.markForCheck();\n }\n private _value = 0;\n\n /** Buffer value of the progress bar. Defaults to zero. */\n @Input({transform: numberAttribute})\n get bufferValue(): number {\n return this._bufferValue || 0;\n }\n set bufferValue(v: number) {\n this._bufferValue = clamp(v || 0);\n this._changeDetectorRef.markForCheck();\n }\n private _bufferValue = 0;\n\n /**\n * Event emitted when animation of the primary progress bar completes. This event will not\n * be emitted when animations are disabled, nor will it be emitted for modes with continuous\n * animations (indeterminate and query).\n */\n @Output() readonly animationEnd = new EventEmitter<ProgressAnimationEnd>();\n\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n @Input()\n get mode(): ProgressBarMode {\n return this._mode;\n }\n set mode(value: ProgressBarMode) {\n // Note that we don't technically need a getter and a setter here,\n // but we use it to match the behavior of the existing mat-progress-bar.\n this._mode = value;\n this._changeDetectorRef.markForCheck();\n }\n private _mode: ProgressBarMode = 'determinate';\n\n ngAfterViewInit() {\n // Run outside angular so change detection didn't get triggered on every transition end\n // instead only on the animation that we care about (primary value bar's transitionend)\n this._ngZone.runOutsideAngular(() => {\n this._cleanupTransitionEnd = this._renderer.listen(\n this._elementRef.nativeElement,\n 'transitionend',\n this._transitionendHandler,\n );\n });\n }\n\n ngOnDestroy() {\n this._cleanupTransitionEnd?.();\n }\n\n /** Gets the transform style that should be applied to the primary bar. */\n _getPrimaryBarTransform(): string {\n return `scaleX(${this._isIndeterminate() ? 1 : this.value / 100})`;\n }\n\n /** Gets the `flex-basis` value that should be applied to the buffer bar. */\n _getBufferBarFlexBasis(): string {\n return `${this.mode === 'buffer' ? this.bufferValue : 100}%`;\n }\n\n /** Returns whether the progress bar is indeterminate. */\n _isIndeterminate(): boolean {\n return this.mode === 'indeterminate' || this.mode === 'query';\n }\n\n /** Event handler for `transitionend` events. */\n private _transitionendHandler = (event: TransitionEvent) => {\n if (\n this.animationEnd.observers.length === 0 ||\n !event.target ||\n !(event.target as HTMLElement).classList.contains('mdc-linear-progress__primary-bar')\n ) {\n return;\n }\n\n if (this.mode === 'determinate' || this.mode === 'buffer') {\n this._ngZone.run(() => this.animationEnd.next({value: this.value}));\n }\n };\n}\n\n/** Clamps a value to be between two numbers, by default 0 and 100. */\nfunction clamp(v: number, min = 0, max = 100) {\n return Math.max(min, Math.min(max, v));\n}\n","<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<div class=\"mdc-linear-progress__buffer\" aria-hidden=\"true\">\n <div\n class=\"mdc-linear-progress__buffer-bar\"\n [style.flex-basis]=\"_getBufferBarFlexBasis()\"></div>\n <!-- Remove the dots outside of buffer mode since they can cause CSP issues (see #28938) -->\n @if (mode === 'buffer') {\n <div class=\"mdc-linear-progress__buffer-dots\"></div>\n }\n</div>\n<div\n class=\"mdc-linear-progress__bar mdc-linear-progress__primary-bar\"\n aria-hidden=\"true\"\n [style.transform]=\"_getPrimaryBarTransform()\">\n <span class=\"mdc-linear-progress__bar-inner\"></span>\n</div>\n<div class=\"mdc-linear-progress__bar mdc-linear-progress__secondary-bar\" aria-hidden=\"true\">\n <span class=\"mdc-linear-progress__bar-inner\"></span>\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.dev/license\n */\n\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {NgModule} from '@angular/core';\nimport {MatProgressBar} from './progress-bar';\n\n@NgModule({\n imports: [MatProgressBar],\n exports: [MatProgressBar, BidiModule],\n})\nexport class MatProgressBarModule {}\n"],"names":["MAT_PROGRESS_BAR_DEFAULT_OPTIONS","InjectionToken","MAT_PROGRESS_BAR_LOCATION","providedIn","factory","_document","inject","DOCUMENT","_location","location","getPathname","pathname","search","MatProgressBar","_elementRef","ElementRef","_ngZone","NgZone","_changeDetectorRef","ChangeDetectorRef","_renderer","Renderer2","_cleanupTransitionEnd","constructor","animationsState","_getAnimationsState","defaults","optional","_isNoopAnimation","nativeElement","classList","add","color","_defaultColor","mode","_color","value","_value","v","clamp","markForCheck","bufferValue","_bufferValue","animationEnd","EventEmitter","_mode","ngAfterViewInit","runOutsideAngular","listen","_transitionendHandler","ngOnDestroy","_getPrimaryBarTransform","_isIndeterminate","_getBufferBarFlexBasis","event","observers","length","target","contains","run","next","deps","i0","ɵɵFactoryTarget","Component","ɵcmp","ɵɵngDeclareComponent","minVersion","version","type","isStandalone","selector","inputs","numberAttribute","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","exportAs","host","template","Input","transform","Output","min","max","Math","MatProgressBarModule","NgModule","ɵmod","ɵɵngDeclareNgModule","ngImport","imports","exports","BidiModule","ɵinj","ɵɵngDeclareInjector","args"],"mappings":";;;;;;MAkDaA,gCAAgC,GAAG,IAAIC,cAAc,C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AsB,oBAAoB;cAFLO,UAAU;AAAA,GAAA,CAAA;;;;;;QAEzBP,oBAAoB;AAAAV,EAAAA,UAAA,EAAA,CAAA;UAJhCW,QAAQ;AAACS,IAAAA,IAAA,EAAA,CAAA;MACRL,OAAO,EAAE,CAACnF,cAAc,CAAC;AACzBoF,MAAAA,OAAO,EAAE,CAACpF,cAAc,EAAEqF,UAAU;KACrC;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-spinner-testing.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"progress-spinner-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-spinner/testing/progress-spinner-harness.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.dev/license\n */\n\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {ProgressSpinnerMode} from '../progress-spinner';\nimport {ProgressSpinnerHarnessFilters} from './progress-spinner-harness-filters';\n\n/** Harness for interacting with a MDC based mat-progress-spinner in tests. */\nexport class MatProgressSpinnerHarness extends ComponentHarness {\n /** The selector for the host element of a `MatProgressSpinner` instance. */\n static hostSelector = '.mat-mdc-progress-spinner';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a progress spinnner with specific\n * attributes.\n * @param options Options for filtering which progress spinner instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatProgressSpinnerHarness>(\n this: ComponentHarnessConstructor<T>,\n options: ProgressSpinnerHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options);\n }\n\n /** Gets the progress spinner's value. */\n async getValue(): Promise<number | null> {\n const host = await this.host();\n const ariaValue = await host.getAttribute('aria-valuenow');\n return ariaValue ? coerceNumberProperty(ariaValue) : null;\n }\n\n /** Gets the progress spinner's mode. */\n async getMode(): Promise<ProgressSpinnerMode> {\n const modeAttr = (await this.host()).getAttribute('mode');\n return (await modeAttr) as ProgressSpinnerMode;\n }\n}\n"],"names":["MatProgressSpinnerHarness","ComponentHarness","hostSelector","with","options","HarnessPredicate","getValue","host","ariaValue","getAttribute","coerceNumberProperty","getMode","modeAttr"],"mappings":";;;AAkBM,MAAOA,yBAA0B,SAAQC,gBAAgB,CAAA;EAE7D,OAAOC,YAAY,GAAG,2BAA2B;AAQjD,EAAA,OAAOC,IAAIA,CAETC,OAAA,GAAyC,EAAE,EAAA;AAE3C,IAAA,OAAO,IAAIC,gBAAgB,CAAC,IAAI,EAAED,OAAO,CAAC;AAC5C;EAGA,MAAME,QAAQA,GAAA;AACZ,IAAA,MAAMC,IAAI,GAAG,MAAM,IAAI,CAACA,IAAI,EAAE;IAC9B,MAAMC,SAAS,GAAG,MAAMD,IAAI,CAACE,YAAY,CAAC,eAAe,CAAC;AAC1D,IAAA,OAAOD,SAAS,GAAGE,oBAAoB,CAACF,SAAS,CAAC,GAAG,IAAI;AAC3D;EAGA,MAAMG,OAAOA,GAAA;AACX,IAAA,MAAMC,QAAQ,GAAG,CAAC,MAAM,IAAI,CAACL,IAAI,EAAE,EAAEE,YAAY,CAAC,MAAM,CAAC;AACzD,IAAA,OAAQ,MAAMG,QAAQ;AACxB;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-spinner.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-spinner/progress-spinner.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-spinner/progress-spinner.html","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-spinner/progress-spinner-module.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.dev/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n InjectionToken,\n Input,\n ViewChild,\n ViewEncapsulation,\n numberAttribute,\n inject,\n} from '@angular/core';\nimport {_getAnimationsState, ThemePalette} from '../core';\nimport {NgTemplateOutlet} from '@angular/common';\n\n/** Possible mode for a progress spinner. */\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\n\n/** Default `mat-progress-spinner` options that can be overridden. */\nexport interface MatProgressSpinnerDefaultOptions {\n /**\n * Default theme color of the progress spinner. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-spinner/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color?: ThemePalette;\n /** Diameter of the spinner. */\n diameter?: number;\n /** Width of the spinner's stroke. */\n strokeWidth?: number;\n /**\n * Whether the animations should be force to be enabled, ignoring if the current environment\n * disables them.\n */\n _forceAnimations?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-spinner`. */\nexport const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS =\n new InjectionToken<MatProgressSpinnerDefaultOptions>('mat-progress-spinner-default-options', {\n providedIn: 'root',\n factory: () => ({diameter: BASE_SIZE}),\n });\n\n/**\n * Base reference size of the spinner.\n */\nconst BASE_SIZE = 100;\n\n/**\n * Base reference stroke width of the spinner.\n */\nconst BASE_STROKE_WIDTH = 10;\n\n@Component({\n selector: 'mat-progress-spinner, mat-spinner',\n exportAs: 'matProgressSpinner',\n host: {\n 'role': 'progressbar',\n 'class': 'mat-mdc-progress-spinner mdc-circular-progress',\n // set tab index to -1 so screen readers will read the aria-label\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n 'tabindex': '-1',\n '[class]': '\"mat-\" + color',\n '[class._mat-animation-noopable]': `_noopAnimations`,\n '[class.mdc-circular-progress--indeterminate]': 'mode === \"indeterminate\"',\n '[style.width.px]': 'diameter',\n '[style.height.px]': 'diameter',\n '[style.--mat-progress-spinner-size]': 'diameter + \"px\"',\n '[style.--mat-progress-spinner-active-indicator-width]': 'diameter + \"px\"',\n '[attr.aria-valuemin]': '0',\n '[attr.aria-valuemax]': '100',\n '[attr.aria-valuenow]': 'mode === \"determinate\" ? value : null',\n '[attr.mode]': 'mode',\n },\n templateUrl: 'progress-spinner.html',\n styleUrl: 'progress-spinner.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet],\n})\nexport class MatProgressSpinner {\n readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Whether the _mat-animation-noopable class should be applied, disabling animations. */\n _noopAnimations: boolean;\n\n // TODO: should be typed as `ThemePalette` but internal apps pass in arbitrary strings.\n /**\n * Theme color of the progress spinner. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-spinner/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input()\n get color() {\n return this._color || this._defaultColor;\n }\n set color(value: string | null | undefined) {\n this._color = value;\n }\n private _color: string | null | undefined;\n private _defaultColor: ThemePalette = 'primary';\n\n /** The element of the determinate spinner. */\n @ViewChild('determinateSpinner') _determinateCircle: ElementRef<HTMLElement>;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const defaults = inject<MatProgressSpinnerDefaultOptions>(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS);\n const animationsState = _getAnimationsState();\n const element = this._elementRef.nativeElement;\n\n this._noopAnimations =\n animationsState === 'di-disabled' && !!defaults && !defaults._forceAnimations;\n this.mode = element.nodeName.toLowerCase() === 'mat-spinner' ? 'indeterminate' : 'determinate';\n\n if (!this._noopAnimations && animationsState === 'reduced-motion') {\n element.classList.add('mat-progress-spinner-reduced-motion');\n }\n\n if (defaults) {\n if (defaults.color) {\n this.color = this._defaultColor = defaults.color;\n }\n\n if (defaults.diameter) {\n this.diameter = defaults.diameter;\n }\n\n if (defaults.strokeWidth) {\n this.strokeWidth = defaults.strokeWidth;\n }\n }\n }\n\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n @Input() mode: ProgressSpinnerMode;\n\n /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\n @Input({transform: numberAttribute})\n get value(): number {\n return this.mode === 'determinate' ? this._value : 0;\n }\n set value(v: number) {\n this._value = Math.max(0, Math.min(100, v || 0));\n }\n private _value = 0;\n\n /** The diameter of the progress spinner (will set width and height of svg). */\n @Input({transform: numberAttribute})\n get diameter(): number {\n return this._diameter;\n }\n set diameter(size: number) {\n this._diameter = size || 0;\n }\n private _diameter = BASE_SIZE;\n\n /** Stroke width of the progress spinner. */\n @Input({transform: numberAttribute})\n get strokeWidth(): number {\n return this._strokeWidth ?? this.diameter / 10;\n }\n set strokeWidth(value: number) {\n this._strokeWidth = value || 0;\n }\n private _strokeWidth: number;\n\n /** The radius of the spinner, adjusted for stroke width. */\n _circleRadius(): number {\n return (this.diameter - BASE_STROKE_WIDTH) / 2;\n }\n\n /** The view box of the spinner's svg element. */\n _viewBox() {\n const viewBox = this._circleRadius() * 2 + this.strokeWidth;\n return `0 0 ${viewBox} ${viewBox}`;\n }\n\n /** The stroke circumference of the svg circle. */\n _strokeCircumference(): number {\n return 2 * Math.PI * this._circleRadius();\n }\n\n /** The dash offset of the svg circle. */\n _strokeDashOffset() {\n if (this.mode === 'determinate') {\n return (this._strokeCircumference() * (100 - this._value)) / 100;\n }\n return null;\n }\n\n /** Stroke width of the circle in percent. */\n _circleStrokeWidth() {\n return (this.strokeWidth / this.diameter) * 100;\n }\n}\n\n/**\n * @deprecated Import Progress Spinner instead. Note that the\n * `mat-spinner` selector isn't deprecated.\n * @breaking-change 16.0.0\n */\n// tslint:disable-next-line:variable-name\nexport const MatSpinner = MatProgressSpinner;\n","<ng-template #circle>\n <svg [attr.viewBox]=\"_viewBox()\" class=\"mdc-circular-progress__indeterminate-circle-graphic\"\n xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\">\n <circle [attr.r]=\"_circleRadius()\"\n [style.stroke-dasharray.px]=\"_strokeCircumference()\"\n [style.stroke-dashoffset.px]=\"_strokeCircumference() / 2\"\n [style.stroke-width.%]=\"_circleStrokeWidth()\"\n cx=\"50%\" cy=\"50%\"/>\n </svg>\n</ng-template>\n\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<div class=\"mdc-circular-progress__determinate-container\" aria-hidden=\"true\" #determinateSpinner>\n <svg [attr.viewBox]=\"_viewBox()\" class=\"mdc-circular-progress__determinate-circle-graphic\"\n xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\">\n <circle [attr.r]=\"_circleRadius()\"\n [style.stroke-dasharray.px]=\"_strokeCircumference()\"\n [style.stroke-dashoffset.px]=\"_strokeDashOffset()\"\n [style.stroke-width.%]=\"_circleStrokeWidth()\"\n class=\"mdc-circular-progress__determinate-circle\"\n cx=\"50%\" cy=\"50%\"/>\n </svg>\n</div>\n<!--TODO: figure out why there are 3 separate svgs-->\n<div class=\"mdc-circular-progress__indeterminate-container\" aria-hidden=\"true\">\n <div class=\"mdc-circular-progress__spinner-layer\">\n <div class=\"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\n </div>\n <div class=\"mdc-circular-progress__gap-patch\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\n </div>\n <div class=\"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-right\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\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.dev/license\n */\n\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {NgModule} from '@angular/core';\nimport {MatProgressSpinner, MatSpinner} from './progress-spinner';\n\n@NgModule({\n imports: [MatProgressSpinner, MatSpinner],\n exports: [MatProgressSpinner, MatSpinner, BidiModule],\n})\nexport class MatProgressSpinnerModule {}\n"],"names":["MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS","InjectionToken","providedIn","factory","diameter","BASE_SIZE","BASE_STROKE_WIDTH","MatProgressSpinner","_elementRef","inject","ElementRef","_noopAnimations","color","_color","_defaultColor","value","_determinateCircle","constructor","defaults","animationsState","_getAnimationsState","element","nativeElement","_forceAnimations","mode","nodeName","toLowerCase","classList","add","strokeWidth","_value","v","Math","max","min","_diameter","size","_strokeWidth","_circleRadius","_viewBox","viewBox","_strokeCircumference","PI","_strokeDashOffset","_circleStrokeWidth","deps","target","i0","ɵɵFactoryTarget","Component","isStandalone","selector","inputs","numberAttribute","host","attributes","properties","classAttribute","viewQueries","propertyName","first","predicate","descendants","exportAs","ngImport","template","styles","dependencies","kind","type","NgTemplateOutlet","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","imports","Input","ViewChild","transform","MatSpinner","MatProgressSpinnerModule","NgModule","BidiModule","ɵinj","ɵɵngDeclareInjector","minVersion","version","args","exports"],"mappings":";;;;;;;MA+CaA,oCAAoC,GAC/C,IAAIC,cAAc,CAAmC,sCAAsC,EAAE;AAC3FC,EAAAA,UAAU,EAAE,MAAM;EAClBC,OAAO,EAAEA,OAAO;AAACC,IAAAA,QAAQ,EAAEC;GAAU;AACtC,CAAA;AAKH,MAAMA,SAAS,GAAG,GAAG;AAKrB,MAAMC,iBAAiB,GAAG,EAAE;MA6BfC,kBAAkB,CAAA;AACpBC,EAAAA,WAAW,GAAGC,MAAM,CAA0BC,UAAU,CAAC;EAGlEC,eAAe;EAUf,IACIC,KAAKA,GAAA;AACP,IAAA,OAAO,IAAI,CAACC,MAAM,IAAI,IAAI,CAACC,a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AA,EAAA,CAAA;UAJpCO,QAAQ;AAACM,IAAAA,IAAA,EAAA,CAAA;AACRZ,MAAAA,OAAO,EAAE,CAACvE,kBAAkB,EAAE2E,UAAU,CAAC;AACzCS,MAAAA,OAAO,EAAE,CAACpF,kBAAkB,EAAE2E,UAAU,EAAEG,UAAU;KACrD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"progress-spinner.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-spinner/progress-spinner.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-spinner/progress-spinner.html","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/progress-spinner/progress-spinner-module.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.dev/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n InjectionToken,\n Input,\n ViewChild,\n ViewEncapsulation,\n numberAttribute,\n inject,\n} from '@angular/core';\nimport {_getAnimationsState, ThemePalette} from '../core';\nimport {NgTemplateOutlet} from '@angular/common';\n\n/** Possible mode for a progress spinner. */\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\n\n/** Default `mat-progress-spinner` options that can be overridden. */\nexport interface MatProgressSpinnerDefaultOptions {\n /**\n * Default theme color of the progress spinner. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-spinner/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color?: ThemePalette;\n /** Diameter of the spinner. */\n diameter?: number;\n /** Width of the spinner's stroke. */\n strokeWidth?: number;\n /**\n * Whether the animations should be force to be enabled, ignoring if the current environment\n * disables them.\n */\n _forceAnimations?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-spinner`. */\nexport const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS =\n new InjectionToken<MatProgressSpinnerDefaultOptions>('mat-progress-spinner-default-options', {\n providedIn: 'root',\n factory: () => ({diameter: BASE_SIZE}),\n });\n\n/**\n * Base reference size of the spinner.\n */\nconst BASE_SIZE = 100;\n\n/**\n * Base reference stroke width of the spinner.\n */\nconst BASE_STROKE_WIDTH = 10;\n\n@Component({\n selector: 'mat-progress-spinner, mat-spinner',\n exportAs: 'matProgressSpinner',\n host: {\n 'role': 'progressbar',\n 'class': 'mat-mdc-progress-spinner mdc-circular-progress',\n // set tab index to -1 so screen readers will read the aria-label\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n 'tabindex': '-1',\n '[class]': '\"mat-\" + color',\n '[class._mat-animation-noopable]': `_noopAnimations`,\n '[class.mdc-circular-progress--indeterminate]': 'mode === \"indeterminate\"',\n '[style.width.px]': 'diameter',\n '[style.height.px]': 'diameter',\n '[style.--mat-progress-spinner-size]': 'diameter + \"px\"',\n '[style.--mat-progress-spinner-active-indicator-width]': 'diameter + \"px\"',\n '[attr.aria-valuemin]': '0',\n '[attr.aria-valuemax]': '100',\n '[attr.aria-valuenow]': 'mode === \"determinate\" ? value : null',\n '[attr.mode]': 'mode',\n },\n templateUrl: 'progress-spinner.html',\n styleUrl: 'progress-spinner.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet],\n})\nexport class MatProgressSpinner {\n readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Whether the _mat-animation-noopable class should be applied, disabling animations. */\n _noopAnimations: boolean;\n\n // TODO: should be typed as `ThemePalette` but internal apps pass in arbitrary strings.\n /**\n * Theme color of the progress spinner. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/progress-spinner/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input()\n get color() {\n return this._color || this._defaultColor;\n }\n set color(value: string | null | undefined) {\n this._color = value;\n }\n private _color: string | null | undefined;\n private _defaultColor: ThemePalette = 'primary';\n\n /** The element of the determinate spinner. */\n @ViewChild('determinateSpinner') _determinateCircle: ElementRef<HTMLElement>;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const defaults = inject<MatProgressSpinnerDefaultOptions>(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS);\n const animationsState = _getAnimationsState();\n const element = this._elementRef.nativeElement;\n\n this._noopAnimations =\n animationsState === 'di-disabled' && !!defaults && !defaults._forceAnimations;\n this.mode = element.nodeName.toLowerCase() === 'mat-spinner' ? 'indeterminate' : 'determinate';\n\n if (!this._noopAnimations && animationsState === 'reduced-motion') {\n element.classList.add('mat-progress-spinner-reduced-motion');\n }\n\n if (defaults) {\n if (defaults.color) {\n this.color = this._defaultColor = defaults.color;\n }\n\n if (defaults.diameter) {\n this.diameter = defaults.diameter;\n }\n\n if (defaults.strokeWidth) {\n this.strokeWidth = defaults.strokeWidth;\n }\n }\n }\n\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n @Input() mode: ProgressSpinnerMode;\n\n /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\n @Input({transform: numberAttribute})\n get value(): number {\n return this.mode === 'determinate' ? this._value : 0;\n }\n set value(v: number) {\n this._value = Math.max(0, Math.min(100, v || 0));\n }\n private _value = 0;\n\n /** The diameter of the progress spinner (will set width and height of svg). */\n @Input({transform: numberAttribute})\n get diameter(): number {\n return this._diameter;\n }\n set diameter(size: number) {\n this._diameter = size || 0;\n }\n private _diameter = BASE_SIZE;\n\n /** Stroke width of the progress spinner. */\n @Input({transform: numberAttribute})\n get strokeWidth(): number {\n return this._strokeWidth ?? this.diameter / 10;\n }\n set strokeWidth(value: number) {\n this._strokeWidth = value || 0;\n }\n private _strokeWidth: number;\n\n /** The radius of the spinner, adjusted for stroke width. */\n _circleRadius(): number {\n return (this.diameter - BASE_STROKE_WIDTH) / 2;\n }\n\n /** The view box of the spinner's svg element. */\n _viewBox() {\n const viewBox = this._circleRadius() * 2 + this.strokeWidth;\n return `0 0 ${viewBox} ${viewBox}`;\n }\n\n /** The stroke circumference of the svg circle. */\n _strokeCircumference(): number {\n return 2 * Math.PI * this._circleRadius();\n }\n\n /** The dash offset of the svg circle. */\n _strokeDashOffset() {\n if (this.mode === 'determinate') {\n return (this._strokeCircumference() * (100 - this._value)) / 100;\n }\n return null;\n }\n\n /** Stroke width of the circle in percent. */\n _circleStrokeWidth() {\n return (this.strokeWidth / this.diameter) * 100;\n }\n}\n\n/**\n * @deprecated Import Progress Spinner instead. Note that the\n * `mat-spinner` selector isn't deprecated.\n * @breaking-change 16.0.0\n */\n// tslint:disable-next-line:variable-name\nexport const MatSpinner = MatProgressSpinner;\n","<ng-template #circle>\n <svg [attr.viewBox]=\"_viewBox()\" class=\"mdc-circular-progress__indeterminate-circle-graphic\"\n xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\">\n <circle [attr.r]=\"_circleRadius()\"\n [style.stroke-dasharray.px]=\"_strokeCircumference()\"\n [style.stroke-dashoffset.px]=\"_strokeCircumference() / 2\"\n [style.stroke-width.%]=\"_circleStrokeWidth()\"\n cx=\"50%\" cy=\"50%\"/>\n </svg>\n</ng-template>\n\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<div class=\"mdc-circular-progress__determinate-container\" aria-hidden=\"true\" #determinateSpinner>\n <svg [attr.viewBox]=\"_viewBox()\" class=\"mdc-circular-progress__determinate-circle-graphic\"\n xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\">\n <circle [attr.r]=\"_circleRadius()\"\n [style.stroke-dasharray.px]=\"_strokeCircumference()\"\n [style.stroke-dashoffset.px]=\"_strokeDashOffset()\"\n [style.stroke-width.%]=\"_circleStrokeWidth()\"\n class=\"mdc-circular-progress__determinate-circle\"\n cx=\"50%\" cy=\"50%\"/>\n </svg>\n</div>\n<!--TODO: figure out why there are 3 separate svgs-->\n<div class=\"mdc-circular-progress__indeterminate-container\" aria-hidden=\"true\">\n <div class=\"mdc-circular-progress__spinner-layer\">\n <div class=\"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\n </div>\n <div class=\"mdc-circular-progress__gap-patch\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\n </div>\n <div class=\"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-right\">\n <ng-container [ngTemplateOutlet]=\"circle\"></ng-container>\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.dev/license\n */\n\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {NgModule} from '@angular/core';\nimport {MatProgressSpinner, MatSpinner} from './progress-spinner';\n\n@NgModule({\n imports: [MatProgressSpinner, MatSpinner],\n exports: [MatProgressSpinner, MatSpinner, BidiModule],\n})\nexport class MatProgressSpinnerModule {}\n"],"names":["MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS","InjectionToken","providedIn","factory","diameter","BASE_SIZE","BASE_STROKE_WIDTH","MatProgressSpinner","_elementRef","inject","ElementRef","_noopAnimations","color","_color","_defaultColor","value","_determinateCircle","constructor","defaults","animationsState","_getAnimationsState","element","nativeElement","_forceAnimations","mode","nodeName","toLowerCase","classList","add","strokeWidth","_value","v","Math","max","min","_diameter","size","_strokeWidth","_circleRadius","_viewBox","viewBox","_strokeCircumference","PI","_strokeDashOffset","_circleStrokeWidth","deps","target","i0","ɵɵFactoryTarget","Component","isStandalone","selector","inputs","numberAttribute","host","attributes","properties","classAttribute","viewQueries","propertyName","first","predicate","descendants","exportAs","ngImport","template","styles","dependencies","kind","type","NgTemplateOutlet","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","imports","Input","ViewChild","transform","MatSpinner","MatProgressSpinnerModule","NgModule","BidiModule","ɵinj","ɵɵngDeclareInjector","minVersion","version","args","exports"],"mappings":";;;;;;;MA+CaA,oCAAoC,GAC/C,IAAIC,cAAc,CAAmC,sCAAsC,EAAE;AAC3FC,EAAAA,UAAU,EAAE,MAAM;EAClBC,OAAO,EAAEA,OAAO;AAACC,IAAAA,QAAQ,EAAEC;GAAU;AACtC,CAAA;AAKH,MAAMA,SAAS,GAAG,GAAG;AAKrB,MAAMC,iBAAiB,GAAG,EAAE;MA6BfC,kBAAkB,CAAA;AACpBC,EAAAA,WAAW,GAAGC,MAAM,CAA0BC,UAAU,CAAC;EAGlEC,eAAe;EAUf,IACIC,KAAKA,GAAA;AACP,IAAA,OAAO,IAAI,CAACC,MAAM,IAAI,IAAI,CAACC,aAAa;AAC1C;EACA,IAAIF,KAAKA,CAACG,KAAgC,EAAA;IACxC,IAAI,CAACF,MAAM,GAAGE,KAAK;AACrB;EACQF,MAAM;AACNC,EAAAA,aAAa,GAAiB,SAAS;EAGdE,kBAAkB;AAInDC,EAAAA,WAAAA,GAAA;AACE,IAAA,MAAMC,QAAQ,GAAGT,MAAM,CAAmCT,oCAAoC,CAAC;AAC/F,IAAA,MAAMmB,eAAe,GAAGC,mBAAmB,EAAE;AAC7C,IAAA,MAAMC,OAAO,GAAG,IAAI,CAACb,WAAW,CAACc,aAAa;AAE9C,IAAA,IAAI,CAACX,eAAe,GAClBQ,eAAe,KAAK,aAAa,IAAI,CAAC,CAACD,QAAQ,IAAI,CAACA,QAAQ,CAACK,gBAAgB;AAC/E,IAAA,IAAI,CAACC,IAAI,GAAGH,OAAO,CAACI,QAAQ,CAACC,WAAW,EAAE,KAAK,aAAa,GAAG,eAAe,GAAG,aAAa;IAE9F,IAAI,CAAC,IAAI,CAACf,eAAe,IAAIQ,eAAe,KAAK,gBAAgB,EAAE;AACjE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;ME9Mb4E,wBAAwB,CAAA;;;;;UAAxBA,wBAAwB;AAAAtC,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAoC;AAAA,GAAA,CAAA;;;;;UAAxBD,wBAAwB;AAAAL,IAAAA,OAAA,EAAA,CAHzBvE,kBAAkB,EAAE2E,UAAU;cAC9B3E,kBAAkB,EAAE2E,UAAU,EAAEG,UAAU;AAAA,GAAA,CAAA;AAEzC,EAAA,OAAAC,IAAA,GAAAvC,EAAA,CAAAwC,mBAAA,CAAA;AAAAC,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,eAAA;AAAAzB,IAAAA,QAAA,EAAAjB,EAAA;AAAAsB,IAAAA,IAAA,EAAAc,wBAAwB;cAFOE,UAAU;AAAA,GAAA,CAAA;;;;;;QAEzCF,wBAAwB;AAAAN,EAAAA,UAAA,EAAA,CAAA;UAJpCO,QAAQ;AAACM,IAAAA,IAAA,EAAA,CAAA;AACRZ,MAAAA,OAAO,EAAE,CAACvE,kBAAkB,EAAE2E,UAAU,CAAC;AACzCS,MAAAA,OAAO,EAAE,CAACpF,kBAAkB,EAAE2E,UAAU,EAAEG,UAAU;KACrD;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-testing.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/radio/testing/radio-harness.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.dev/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {RadioButtonHarnessFilters, RadioGroupHarnessFilters} from './radio-harness-filters';\n\n/** Harness for interacting with a mat-radio-group in tests. */\nexport class MatRadioGroupHarness extends ComponentHarness {\n /** The selector for the host element of a `MatRadioGroup` instance. */\n static hostSelector = '.mat-mdc-radio-group';\n\n private _buttonClass = MatRadioButtonHarness;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a radio group with specific\n * attributes.\n * @param options Options for filtering which radio group instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatRadioGroupHarness>(\n this: ComponentHarnessConstructor<T>,\n options: RadioGroupHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options).addOption(\n 'name',\n options.name,\n MatRadioGroupHarness._checkRadioGroupName,\n );\n }\n\n /** Gets the name of the radio-group. */\n async getName(): Promise<string | null> {\n const hostName = await this._getGroupNameFromHost();\n // It's not possible to always determine the \"name\" of a radio-group by reading\n // the attribute. This is because the radio-group does not set the \"name\" as an\n // element attribute if the \"name\" value is set through a binding.\n if (hostName !== null) {\n return hostName;\n }\n // In case we couldn't determine the \"name\" of a radio-group by reading the\n // \"name\" attribute, we try to determine the \"name\" of the group by going\n // through all radio buttons.\n const radioNames = await this._getNamesFromRadioButtons();\n if (!radioNames.length) {\n return null;\n }\n if (!this._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error('Radio buttons in radio-group have mismatching names.');\n }\n return radioNames[0]!;\n }\n\n /** Gets the id of the radio-group. */\n async getId(): Promise<string | null> {\n return (await this.host()).getProperty<string | null>('id');\n }\n\n /** Gets the checked radio-button in a radio-group. */\n async getCheckedRadioButton(): Promise<MatRadioButtonHarness | null> {\n for (let radioButton of await this.getRadioButtons()) {\n if (await radioButton.isChecked()) {\n return radioButton;\n }\n }\n return null;\n }\n\n /** Gets the checked value of the radio-group. */\n async getCheckedValue(): Promise<string | null> {\n const checkedRadio = await this.getCheckedRadioButton();\n if (!checkedRadio) {\n return null;\n }\n return checkedRadio.getValue();\n }\n\n /**\n * Gets a list of radio buttons which are part of the radio-group.\n * @param filter Optionally filters which radio buttons are included.\n */\n async getRadioButtons(filter?: RadioButtonHarnessFilters): Promise<MatRadioButtonHarness[]> {\n return this.locatorForAll(this._buttonClass.with(filter))();\n }\n\n /**\n * Checks a radio button in this group.\n * @param filter An optional filter to apply to the child radio buttons. The first tab matching\n * the filter will be selected.\n */\n async checkRadioButton(filter?: RadioButtonHarnessFilters): Promise<void> {\n const radioButtons = await this.getRadioButtons(filter);\n if (!radioButtons.length) {\n throw Error(`Could not find radio button matching ${JSON.stringify(filter)}`);\n }\n return radioButtons[0].check();\n }\n\n /** Gets the name attribute of the host element. */\n private async _getGroupNameFromHost() {\n return (await this.host()).getAttribute('name');\n }\n\n /** Gets a list of the name attributes of all child radio buttons. */\n private async _getNamesFromRadioButtons(): Promise<string[]> {\n const groupNames: string[] = [];\n for (let radio of await this.getRadioButtons()) {\n const radioName = await radio.getName();\n if (radioName !== null) {\n groupNames.push(radioName);\n }\n }\n return groupNames;\n }\n\n /** Checks if the specified radio names are all equal. */\n private _checkRadioNamesInGroupEqual(radioNames: string[]): boolean {\n let groupName: string | null = null;\n for (let radioName of radioNames) {\n if (groupName === null) {\n groupName = radioName;\n } else if (groupName !== radioName) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Checks if a radio-group harness has the given name. Throws if a radio-group with\n * matching name could be found but has mismatching radio-button names.\n */\n protected static async _checkRadioGroupName(harness: MatRadioGroupHarness, name: string) {\n // Check if there is a radio-group which has the \"name\" attribute set\n // to the expected group name. It's not possible to always determine\n // the \"name\" of a radio-group by reading the attribute. This is because\n // the radio-group does not set the \"name\" as an element attribute if the\n // \"name\" value is set through a binding.\n if ((await harness._getGroupNameFromHost()) === name) {\n return true;\n }\n // Check if there is a group with radio-buttons that all have the same\n // expected name. This implies that the group has the given name. It's\n // not possible to always determine the name of a radio-group through\n // the attribute because there is\n const radioNames = await harness._getNamesFromRadioButtons();\n if (radioNames.indexOf(name) === -1) {\n return false;\n }\n if (!harness._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error(\n `The locator found a radio-group with name \"${name}\", but some ` +\n `radio-button's within the group have mismatching names, which is invalid.`,\n );\n }\n return true;\n }\n}\n\n/** Harness for interacting with a mat-radio-button in tests. */\nexport class MatRadioButtonHarness extends ComponentHarness {\n /** The selector for the host element of a `MatRadioButton` instance. */\n static hostSelector = '.mat-mdc-radio-button';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a radio button with specific\n * attributes.\n * @param options Options for filtering which radio button instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatRadioButtonHarness>(\n this: ComponentHarnessConstructor<T>,\n options: RadioButtonHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getLabelText(), label),\n )\n .addOption('name', options.name, async (harness, name) => (await harness.getName()) === name)\n .addOption(\n 'checked',\n options.checked,\n async (harness, checked) => (await harness.isChecked()) == checked,\n );\n }\n\n protected _textLabel = this.locatorFor('label');\n protected _clickLabel = this._textLabel;\n private _input = this.locatorFor('input');\n\n /** Whether the radio-button is checked. */\n async isChecked(): Promise<boolean> {\n const checked = (await this._input()).getProperty<boolean>('checked');\n return coerceBooleanProperty(await checked);\n }\n\n /** Whether the radio-button is disabled. */\n async isDisabled(): Promise<boolean> {\n const input = await this._input();\n const disabled = await input.getAttribute('disabled');\n\n if (disabled !== null) {\n return coerceBooleanProperty(disabled);\n }\n\n return (await input.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the radio-button is required. */\n async isRequired(): Promise<boolean> {\n const required = (await this._input()).getAttribute('required');\n return coerceBooleanProperty(await required);\n }\n\n /** Gets the radio-button's name. */\n async getName(): Promise<string | null> {\n return (await this._input()).getAttribute('name');\n }\n\n /** Gets the radio-button's id. */\n async getId(): Promise<string | null> {\n return (await this.host()).getProperty<string>('id');\n }\n\n /**\n * Gets the value of the radio-button. The radio-button value will be converted to a string.\n *\n * Note: This means that for radio-button's with an object as a value `[object Object]` is\n * intentionally returned.\n */\n async getValue(): Promise<string | null> {\n return (await this._input()).getProperty('value');\n }\n\n /** Gets the radio-button's label text. */\n async getLabelText(): Promise<string> {\n return (await this._textLabel()).text();\n }\n\n /** Focuses the radio-button. */\n async focus(): Promise<void> {\n return (await this._input()).focus();\n }\n\n /** Blurs the radio-button. */\n async blur(): Promise<void> {\n return (await this._input()).blur();\n }\n\n /** Whether the radio-button is focused. */\n async isFocused(): Promise<boolean> {\n return (await this._input()).isFocused();\n }\n\n /**\n * Puts the radio-button in a checked state by clicking it if it is currently unchecked,\n * or doing nothing if it is already checked.\n */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n return (await this._clickLabel()).click();\n }\n }\n}\n"],"names":["MatRadioGroupHarness","ComponentHarness","hostSelector","_buttonClass","MatRadioButtonHarness","with","options","HarnessPredicate","addOption","name","_checkRadioGroupName","getName","hostName","_getGroupNameFromHost","radioNames","_getNamesFromRadioButtons","length","_checkRadioNamesInGroupEqual","Error","getId","host","getProperty","getCheckedRadioButton","radioButton","getRadioButtons","isChecked","getCheckedValue","checkedRadio","getValue","filter","locatorForAll","checkRadioButton","radioButtons","JSON","stringify","check","getAttribute","groupNames","radio","radioName","push","groupName","harness","indexOf","label","stringMatches","getLabelText","checked","_textLabel","locatorFor","_clickLabel","_input","coerceBooleanProperty","isDisabled","input","disabled","isRequired","required","text","focus","blur","isFocused","click"],"mappings":";;;AAiBM,MAAOA,oBAAqB,SAAQC,gBAAgB,CAAA;EAExD,OAAOC,YAAY,GAAG,sBAAsB;AAEpCC,EAAAA,YAAY,GAAGC,qBAAqB;AAQ5C,EAAA,OAAOC,IAAIA,CAETC,OAAA,GAAoC,EAAE,EAAA;AAEtC,IAAA,OAAO,IAAIC,gBAAgB,CAAC,IAAI,EAAED,OAAO,CAAC,CAACE,SAAS,CAClD,MAAM,EACNF,OAAO,CAACG,IAAI,EACZT,oBAAoB,CAACU,oBAAoB,CAC1C;AACH;EAGA,MAAMC,OAAOA,GAAA;AACX,IAAA,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACC,qBAAqB,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M,EAAE,EAAEU,SAAS,EAAE;AAC1C;EAMA,MAAM1B,KAAKA,GAAA;IACT,IAAI,EAAE,MAAM,IAAI,CAACV,SAAS,EAAE,CAAC,EAAE;MAC7B,OAAO,CAAC,MAAM,IAAI,CAACyB,WAAW,EAAE,EAAEY,KAAK,EAAE;AAC3C;AACF;;;;;"}
|
|
1
|
+
{"version":3,"file":"radio-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/radio/testing/radio-harness.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.dev/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {RadioButtonHarnessFilters, RadioGroupHarnessFilters} from './radio-harness-filters';\n\n/** Harness for interacting with a mat-radio-group in tests. */\nexport class MatRadioGroupHarness extends ComponentHarness {\n /** The selector for the host element of a `MatRadioGroup` instance. */\n static hostSelector = '.mat-mdc-radio-group';\n\n private _buttonClass = MatRadioButtonHarness;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a radio group with specific\n * attributes.\n * @param options Options for filtering which radio group instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatRadioGroupHarness>(\n this: ComponentHarnessConstructor<T>,\n options: RadioGroupHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options).addOption(\n 'name',\n options.name,\n MatRadioGroupHarness._checkRadioGroupName,\n );\n }\n\n /** Gets the name of the radio-group. */\n async getName(): Promise<string | null> {\n const hostName = await this._getGroupNameFromHost();\n // It's not possible to always determine the \"name\" of a radio-group by reading\n // the attribute. This is because the radio-group does not set the \"name\" as an\n // element attribute if the \"name\" value is set through a binding.\n if (hostName !== null) {\n return hostName;\n }\n // In case we couldn't determine the \"name\" of a radio-group by reading the\n // \"name\" attribute, we try to determine the \"name\" of the group by going\n // through all radio buttons.\n const radioNames = await this._getNamesFromRadioButtons();\n if (!radioNames.length) {\n return null;\n }\n if (!this._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error('Radio buttons in radio-group have mismatching names.');\n }\n return radioNames[0]!;\n }\n\n /** Gets the id of the radio-group. */\n async getId(): Promise<string | null> {\n return (await this.host()).getProperty<string | null>('id');\n }\n\n /** Gets the checked radio-button in a radio-group. */\n async getCheckedRadioButton(): Promise<MatRadioButtonHarness | null> {\n for (let radioButton of await this.getRadioButtons()) {\n if (await radioButton.isChecked()) {\n return radioButton;\n }\n }\n return null;\n }\n\n /** Gets the checked value of the radio-group. */\n async getCheckedValue(): Promise<string | null> {\n const checkedRadio = await this.getCheckedRadioButton();\n if (!checkedRadio) {\n return null;\n }\n return checkedRadio.getValue();\n }\n\n /**\n * Gets a list of radio buttons which are part of the radio-group.\n * @param filter Optionally filters which radio buttons are included.\n */\n async getRadioButtons(filter?: RadioButtonHarnessFilters): Promise<MatRadioButtonHarness[]> {\n return this.locatorForAll(this._buttonClass.with(filter))();\n }\n\n /**\n * Checks a radio button in this group.\n * @param filter An optional filter to apply to the child radio buttons. The first tab matching\n * the filter will be selected.\n */\n async checkRadioButton(filter?: RadioButtonHarnessFilters): Promise<void> {\n const radioButtons = await this.getRadioButtons(filter);\n if (!radioButtons.length) {\n throw Error(`Could not find radio button matching ${JSON.stringify(filter)}`);\n }\n return radioButtons[0].check();\n }\n\n /** Gets the name attribute of the host element. */\n private async _getGroupNameFromHost() {\n return (await this.host()).getAttribute('name');\n }\n\n /** Gets a list of the name attributes of all child radio buttons. */\n private async _getNamesFromRadioButtons(): Promise<string[]> {\n const groupNames: string[] = [];\n for (let radio of await this.getRadioButtons()) {\n const radioName = await radio.getName();\n if (radioName !== null) {\n groupNames.push(radioName);\n }\n }\n return groupNames;\n }\n\n /** Checks if the specified radio names are all equal. */\n private _checkRadioNamesInGroupEqual(radioNames: string[]): boolean {\n let groupName: string | null = null;\n for (let radioName of radioNames) {\n if (groupName === null) {\n groupName = radioName;\n } else if (groupName !== radioName) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Checks if a radio-group harness has the given name. Throws if a radio-group with\n * matching name could be found but has mismatching radio-button names.\n */\n protected static async _checkRadioGroupName(harness: MatRadioGroupHarness, name: string) {\n // Check if there is a radio-group which has the \"name\" attribute set\n // to the expected group name. It's not possible to always determine\n // the \"name\" of a radio-group by reading the attribute. This is because\n // the radio-group does not set the \"name\" as an element attribute if the\n // \"name\" value is set through a binding.\n if ((await harness._getGroupNameFromHost()) === name) {\n return true;\n }\n // Check if there is a group with radio-buttons that all have the same\n // expected name. This implies that the group has the given name. It's\n // not possible to always determine the name of a radio-group through\n // the attribute because there is\n const radioNames = await harness._getNamesFromRadioButtons();\n if (radioNames.indexOf(name) === -1) {\n return false;\n }\n if (!harness._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error(\n `The locator found a radio-group with name \"${name}\", but some ` +\n `radio-button's within the group have mismatching names, which is invalid.`,\n );\n }\n return true;\n }\n}\n\n/** Harness for interacting with a mat-radio-button in tests. */\nexport class MatRadioButtonHarness extends ComponentHarness {\n /** The selector for the host element of a `MatRadioButton` instance. */\n static hostSelector = '.mat-mdc-radio-button';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a radio button with specific\n * attributes.\n * @param options Options for filtering which radio button instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatRadioButtonHarness>(\n this: ComponentHarnessConstructor<T>,\n options: RadioButtonHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getLabelText(), label),\n )\n .addOption('name', options.name, async (harness, name) => (await harness.getName()) === name)\n .addOption(\n 'checked',\n options.checked,\n async (harness, checked) => (await harness.isChecked()) == checked,\n );\n }\n\n protected _textLabel = this.locatorFor('label');\n protected _clickLabel = this._textLabel;\n private _input = this.locatorFor('input');\n\n /** Whether the radio-button is checked. */\n async isChecked(): Promise<boolean> {\n const checked = (await this._input()).getProperty<boolean>('checked');\n return coerceBooleanProperty(await checked);\n }\n\n /** Whether the radio-button is disabled. */\n async isDisabled(): Promise<boolean> {\n const input = await this._input();\n const disabled = await input.getAttribute('disabled');\n\n if (disabled !== null) {\n return coerceBooleanProperty(disabled);\n }\n\n return (await input.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the radio-button is required. */\n async isRequired(): Promise<boolean> {\n const required = (await this._input()).getAttribute('required');\n return coerceBooleanProperty(await required);\n }\n\n /** Gets the radio-button's name. */\n async getName(): Promise<string | null> {\n return (await this._input()).getAttribute('name');\n }\n\n /** Gets the radio-button's id. */\n async getId(): Promise<string | null> {\n return (await this.host()).getProperty<string>('id');\n }\n\n /**\n * Gets the value of the radio-button. The radio-button value will be converted to a string.\n *\n * Note: This means that for radio-button's with an object as a value `[object Object]` is\n * intentionally returned.\n */\n async getValue(): Promise<string | null> {\n return (await this._input()).getProperty('value');\n }\n\n /** Gets the radio-button's label text. */\n async getLabelText(): Promise<string> {\n return (await this._textLabel()).text();\n }\n\n /** Focuses the radio-button. */\n async focus(): Promise<void> {\n return (await this._input()).focus();\n }\n\n /** Blurs the radio-button. */\n async blur(): Promise<void> {\n return (await this._input()).blur();\n }\n\n /** Whether the radio-button is focused. */\n async isFocused(): Promise<boolean> {\n return (await this._input()).isFocused();\n }\n\n /**\n * Puts the radio-button in a checked state by clicking it if it is currently unchecked,\n * or doing nothing if it is already checked.\n */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n return (await this._clickLabel()).click();\n }\n }\n}\n"],"names":["MatRadioGroupHarness","ComponentHarness","hostSelector","_buttonClass","MatRadioButtonHarness","with","options","HarnessPredicate","addOption","name","_checkRadioGroupName","getName","hostName","_getGroupNameFromHost","radioNames","_getNamesFromRadioButtons","length","_checkRadioNamesInGroupEqual","Error","getId","host","getProperty","getCheckedRadioButton","radioButton","getRadioButtons","isChecked","getCheckedValue","checkedRadio","getValue","filter","locatorForAll","checkRadioButton","radioButtons","JSON","stringify","check","getAttribute","groupNames","radio","radioName","push","groupName","harness","indexOf","label","stringMatches","getLabelText","checked","_textLabel","locatorFor","_clickLabel","_input","coerceBooleanProperty","isDisabled","input","disabled","isRequired","required","text","focus","blur","isFocused","click"],"mappings":";;;AAiBM,MAAOA,oBAAqB,SAAQC,gBAAgB,CAAA;EAExD,OAAOC,YAAY,GAAG,sBAAsB;AAEpCC,EAAAA,YAAY,GAAGC,qBAAqB;AAQ5C,EAAA,OAAOC,IAAIA,CAETC,OAAA,GAAoC,EAAE,EAAA;AAEtC,IAAA,OAAO,IAAIC,gBAAgB,CAAC,IAAI,EAAED,OAAO,CAAC,CAACE,SAAS,CAClD,MAAM,EACNF,OAAO,CAACG,IAAI,EACZT,oBAAoB,CAACU,oBAAoB,CAC1C;AACH;EAGA,MAAMC,OAAOA,GAAA;AACX,IAAA,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACC,qBAAqB,EAAE;IAInD,IAAID,QAAQ,KAAK,IAAI,EAAE;AACrB,MAAA,OAAOA,QAAQ;AACjB;AAIA,IAAA,MAAME,UAAU,GAAG,MAAM,IAAI,CAACC,yBAAyB,EAAE;AACzD,IAAA,IAAI,CAACD,UAAU,CAACE,MAAM,EAAE;AACtB,MAAA,OAAO,IAAI;AACb;AACA,IAAA,IAAI,CAAC,IAAI,CAACC,4BAA4B,CAACH,UAAU,CAAC,EAAE;MAClD,MAAMI,KAAK,CAAC,sDAAsD,CAAC;AACrE;IACA,OAAOJ,UAAU,CAAC,CAAC,CAAE;AACvB;EAGA,MAAMK,KAAKA,GAAA;IACT,OAAO,CAAC,MAAM,IAAI,CAACC,IAAI,EAAE,EAAEC,WAAW,CAAgB,IAAI,CAAC;AAC7D;EAGA,MAAMC,qBAAqBA,GAAA;IACzB,KAAK,IAAIC,WAAW,IAAI,MAAM,IAAI,CAACC,eAAe,EAAE,EAAE;AACpD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