@angular/material 21.0.0 → 21.0.2
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 +6 -6
- package/fesm2022/_error-options-chunk.mjs.map +1 -1
- package/fesm2022/_error-state-chunk.mjs.map +1 -1
- package/fesm2022/_form-field-chunk.mjs +60 -30
- package/fesm2022/_form-field-chunk.mjs.map +1 -1
- package/fesm2022/_icon-button-chunk.mjs +6 -6
- package/fesm2022/_icon-button-chunk.mjs.map +1 -1
- package/fesm2022/_icon-registry-chunk.mjs +4 -22
- 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 +3 -3
- package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
- package/fesm2022/_line-chunk.mjs +7 -7
- package/fesm2022/_line-chunk.mjs.map +1 -1
- package/fesm2022/_option-chunk.mjs +6 -6
- package/fesm2022/_option-chunk.mjs.map +1 -1
- package/fesm2022/_option-harness-chunk.mjs.map +1 -1
- package/fesm2022/_option-module-chunk.mjs +4 -4
- package/fesm2022/_option-module-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-chunk.mjs +3 -3
- package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs +4 -4
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
- package/fesm2022/_public-api-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-chunk.mjs +6 -6
- package/fesm2022/_ripple-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-loader-chunk.mjs +3 -3
- package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-module-chunk.mjs +4 -4
- package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
- package/fesm2022/_structural-styles-chunk.mjs +3 -3
- package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
- package/fesm2022/_tooltip-chunk.mjs +6 -6
- package/fesm2022/_tooltip-chunk.mjs.map +1 -1
- package/fesm2022/autocomplete-testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +19 -15
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge-testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +10 -10
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +10 -10
- 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 +10 -10
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +13 -13
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card-testing.mjs.map +1 -1
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox-testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +7 -7
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips-testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +46 -46
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core-testing.mjs.map +1 -1
- package/fesm2022/core.mjs +12 -12
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker-testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +85 -83
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog-testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +25 -25
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider-testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +7 -7
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion-testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +25 -25
- 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 +4 -4
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list-testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +22 -22
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon-testing.mjs +8 -7
- package/fesm2022/icon-testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +8 -7
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input-testing.mjs.map +1 -1
- package/fesm2022/input.mjs +7 -7
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list-testing.mjs.map +1 -1
- package/fesm2022/list.mjs +49 -49
- 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 +22 -22
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator-testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +10 -10
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar-testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +7 -7
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner-testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio-testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +10 -10
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select-testing.mjs.map +1 -1
- package/fesm2022/select.mjs +16 -16
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav-testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +22 -22
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle-testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +7 -7
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider-testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +16 -16
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar-testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +22 -22
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort-testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +13 -13
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper-testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +31 -31
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table-testing.mjs.map +1 -1
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs-testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +43 -43
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker-testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +214 -49
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip-testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +4 -4
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -25
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/types/datepicker.d.ts +4 -0
- package/types/timepicker.d.ts +4 -4
package/fesm2022/sort.mjs
CHANGED
|
@@ -97,7 +97,7 @@ class MatSort {
|
|
|
97
97
|
}
|
|
98
98
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
99
99
|
minVersion: "12.0.0",
|
|
100
|
-
version: "
|
|
100
|
+
version: "21.0.0",
|
|
101
101
|
ngImport: i0,
|
|
102
102
|
type: MatSort,
|
|
103
103
|
deps: [{
|
|
@@ -108,7 +108,7 @@ class MatSort {
|
|
|
108
108
|
});
|
|
109
109
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
110
110
|
minVersion: "16.1.0",
|
|
111
|
-
version: "
|
|
111
|
+
version: "21.0.0",
|
|
112
112
|
type: MatSort,
|
|
113
113
|
isStandalone: true,
|
|
114
114
|
selector: "[matSort]",
|
|
@@ -132,7 +132,7 @@ class MatSort {
|
|
|
132
132
|
}
|
|
133
133
|
i0.ɵɵngDeclareClassMetadata({
|
|
134
134
|
minVersion: "12.0.0",
|
|
135
|
-
version: "
|
|
135
|
+
version: "21.0.0",
|
|
136
136
|
ngImport: i0,
|
|
137
137
|
type: MatSort,
|
|
138
138
|
decorators: [{
|
|
@@ -202,7 +202,7 @@ class MatSortHeaderIntl {
|
|
|
202
202
|
changes = new Subject();
|
|
203
203
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
204
204
|
minVersion: "12.0.0",
|
|
205
|
-
version: "
|
|
205
|
+
version: "21.0.0",
|
|
206
206
|
ngImport: i0,
|
|
207
207
|
type: MatSortHeaderIntl,
|
|
208
208
|
deps: [],
|
|
@@ -210,7 +210,7 @@ class MatSortHeaderIntl {
|
|
|
210
210
|
});
|
|
211
211
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
212
212
|
minVersion: "12.0.0",
|
|
213
|
-
version: "
|
|
213
|
+
version: "21.0.0",
|
|
214
214
|
ngImport: i0,
|
|
215
215
|
type: MatSortHeaderIntl,
|
|
216
216
|
providedIn: 'root'
|
|
@@ -218,7 +218,7 @@ class MatSortHeaderIntl {
|
|
|
218
218
|
}
|
|
219
219
|
i0.ɵɵngDeclareClassMetadata({
|
|
220
220
|
minVersion: "12.0.0",
|
|
221
|
-
version: "
|
|
221
|
+
version: "21.0.0",
|
|
222
222
|
ngImport: i0,
|
|
223
223
|
type: MatSortHeaderIntl,
|
|
224
224
|
decorators: [{
|
|
@@ -333,7 +333,7 @@ class MatSortHeader {
|
|
|
333
333
|
}
|
|
334
334
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
335
335
|
minVersion: "12.0.0",
|
|
336
|
-
version: "
|
|
336
|
+
version: "21.0.0",
|
|
337
337
|
ngImport: i0,
|
|
338
338
|
type: MatSortHeader,
|
|
339
339
|
deps: [],
|
|
@@ -341,7 +341,7 @@ class MatSortHeader {
|
|
|
341
341
|
});
|
|
342
342
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
343
343
|
minVersion: "17.0.0",
|
|
344
|
-
version: "
|
|
344
|
+
version: "21.0.0",
|
|
345
345
|
type: MatSortHeader,
|
|
346
346
|
isStandalone: true,
|
|
347
347
|
selector: "[mat-sort-header]",
|
|
@@ -375,7 +375,7 @@ class MatSortHeader {
|
|
|
375
375
|
}
|
|
376
376
|
i0.ɵɵngDeclareClassMetadata({
|
|
377
377
|
minVersion: "12.0.0",
|
|
378
|
-
version: "
|
|
378
|
+
version: "21.0.0",
|
|
379
379
|
ngImport: i0,
|
|
380
380
|
type: MatSortHeader,
|
|
381
381
|
decorators: [{
|
|
@@ -430,7 +430,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
430
430
|
class MatSortModule {
|
|
431
431
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
432
432
|
minVersion: "12.0.0",
|
|
433
|
-
version: "
|
|
433
|
+
version: "21.0.0",
|
|
434
434
|
ngImport: i0,
|
|
435
435
|
type: MatSortModule,
|
|
436
436
|
deps: [],
|
|
@@ -438,7 +438,7 @@ class MatSortModule {
|
|
|
438
438
|
});
|
|
439
439
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
440
440
|
minVersion: "14.0.0",
|
|
441
|
-
version: "
|
|
441
|
+
version: "21.0.0",
|
|
442
442
|
ngImport: i0,
|
|
443
443
|
type: MatSortModule,
|
|
444
444
|
imports: [MatSort, MatSortHeader],
|
|
@@ -446,7 +446,7 @@ class MatSortModule {
|
|
|
446
446
|
});
|
|
447
447
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
448
448
|
minVersion: "12.0.0",
|
|
449
|
-
version: "
|
|
449
|
+
version: "21.0.0",
|
|
450
450
|
ngImport: i0,
|
|
451
451
|
type: MatSortModule,
|
|
452
452
|
imports: [BidiModule]
|
|
@@ -454,7 +454,7 @@ class MatSortModule {
|
|
|
454
454
|
}
|
|
455
455
|
i0.ɵɵngDeclareClassMetadata({
|
|
456
456
|
minVersion: "12.0.0",
|
|
457
|
-
version: "
|
|
457
|
+
version: "21.0.0",
|
|
458
458
|
ngImport: i0,
|
|
459
459
|
type: MatSortModule,
|
|
460
460
|
decorators: [{
|
package/fesm2022/sort.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/sort/sort-errors.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/sort/sort.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/sort/sort-header-intl.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/sort/sort-header.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/sort/sort-header.html","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/sort/sort-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\n/** @docs-private */\nexport function getSortDuplicateSortableIdError(id: string): Error {\n return Error(`Cannot have two MatSortables with the same id (${id}).`);\n}\n\n/** @docs-private */\nexport function getSortHeaderNotContainedWithinSortError(): Error {\n return Error(`MatSortHeader must be placed within a parent element with the MatSort directive.`);\n}\n\n/** @docs-private */\nexport function getSortHeaderMissingIdError(): Error {\n return Error(`MatSortHeader must be provided with a unique id.`);\n}\n\n/** @docs-private */\nexport function getSortInvalidDirectionError(direction: string): Error {\n return Error(`${direction} is not a valid sort direction ('asc' or 'desc').`);\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 Directive,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n booleanAttribute,\n} from '@angular/core';\nimport {Observable, ReplaySubject, Subject} from 'rxjs';\nimport {SortDirection} from './sort-direction';\nimport {\n getSortDuplicateSortableIdError,\n getSortHeaderMissingIdError,\n getSortInvalidDirectionError,\n} from './sort-errors';\n\n/** Position of the arrow that displays when sorted. */\nexport type SortHeaderArrowPosition = 'before' | 'after';\n\n/** Interface for a directive that holds sorting state consumed by `MatSortHeader`. */\nexport interface MatSortable {\n /** The id of the column being sorted. */\n id: string;\n\n /** Starting sort direction. */\n start: SortDirection;\n\n /** Whether to disable clearing the sorting state. */\n disableClear: boolean;\n}\n\n/** The current sort state. */\nexport interface Sort {\n /** The id of the column being sorted. */\n active: string;\n\n /** The sort direction. */\n direction: SortDirection;\n}\n\n/** Default options for `mat-sort`. */\nexport interface MatSortDefaultOptions {\n /** Whether to disable clearing the sorting state. */\n disableClear?: boolean;\n /** Position of the arrow that displays when sorted. */\n arrowPosition?: SortHeaderArrowPosition;\n}\n\n/** Injection token to be used to override the default options for `mat-sort`. */\nexport const MAT_SORT_DEFAULT_OPTIONS = new InjectionToken<MatSortDefaultOptions>(\n 'MAT_SORT_DEFAULT_OPTIONS',\n);\n\n/** Container for MatSortables to manage the sort state and provide default sort parameters. */\n@Directive({\n selector: '[matSort]',\n exportAs: 'matSort',\n host: {\n 'class': 'mat-sort',\n },\n})\nexport class MatSort implements OnChanges, OnDestroy, OnInit {\n private _initializedStream = new ReplaySubject<void>(1);\n\n /** Collection of all registered sortables that this directive manages. */\n sortables = new Map<string, MatSortable>();\n\n /** Used to notify any child components listening to state changes. */\n readonly _stateChanges = new Subject<void>();\n\n /** The id of the most recently sorted MatSortable. */\n @Input('matSortActive') active: string;\n\n /**\n * The direction to set when an MatSortable is initially sorted.\n * May be overridden by the MatSortable's sort start.\n */\n @Input('matSortStart') start: SortDirection = 'asc';\n\n /** The sort direction of the currently active MatSortable. */\n @Input('matSortDirection')\n get direction(): SortDirection {\n return this._direction;\n }\n set direction(direction: SortDirection) {\n if (\n direction &&\n direction !== 'asc' &&\n direction !== 'desc' &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw getSortInvalidDirectionError(direction);\n }\n this._direction = direction;\n }\n private _direction: SortDirection = '';\n\n /**\n * Whether to disable the user from clearing the sort by finishing the sort direction cycle.\n * May be overridden by the MatSortable's disable clear input.\n */\n @Input({alias: 'matSortDisableClear', transform: booleanAttribute})\n disableClear: boolean;\n\n /** Whether the sortable is disabled. */\n @Input({alias: 'matSortDisabled', transform: booleanAttribute})\n disabled: boolean = false;\n\n /** Event emitted when the user changes either the active sort or sort direction. */\n @Output('matSortChange') readonly sortChange: EventEmitter<Sort> = new EventEmitter<Sort>();\n\n /** Emits when the paginator is initialized. */\n initialized: Observable<void> = this._initializedStream;\n\n constructor(\n @Optional()\n @Inject(MAT_SORT_DEFAULT_OPTIONS)\n private _defaultOptions?: MatSortDefaultOptions,\n ) {}\n\n /**\n * Register function to be used by the contained MatSortables. Adds the MatSortable to the\n * collection of MatSortables.\n */\n register(sortable: MatSortable): void {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!sortable.id) {\n throw getSortHeaderMissingIdError();\n }\n\n if (this.sortables.has(sortable.id)) {\n throw getSortDuplicateSortableIdError(sortable.id);\n }\n }\n\n this.sortables.set(sortable.id, sortable);\n }\n\n /**\n * Unregister function to be used by the contained MatSortables. Removes the MatSortable from the\n * collection of contained MatSortables.\n */\n deregister(sortable: MatSortable): void {\n this.sortables.delete(sortable.id);\n }\n\n /** Sets the active sort id and determines the new sort direction. */\n sort(sortable: MatSortable): void {\n if (this.active != sortable.id) {\n this.active = sortable.id;\n this.direction = sortable.start ? sortable.start : this.start;\n } else {\n this.direction = this.getNextSortDirection(sortable);\n }\n\n this.sortChange.emit({active: this.active, direction: this.direction});\n }\n\n /** Returns the next sort direction of the active sortable, checking for potential overrides. */\n getNextSortDirection(sortable: MatSortable): SortDirection {\n if (!sortable) {\n return '';\n }\n\n // Get the sort direction cycle with the potential sortable overrides.\n const disableClear =\n sortable?.disableClear ?? this.disableClear ?? !!this._defaultOptions?.disableClear;\n let sortDirectionCycle = getSortDirectionCycle(sortable.start || this.start, disableClear);\n\n // Get and return the next direction in the cycle\n let nextDirectionIndex = sortDirectionCycle.indexOf(this.direction) + 1;\n if (nextDirectionIndex >= sortDirectionCycle.length) {\n nextDirectionIndex = 0;\n }\n return sortDirectionCycle[nextDirectionIndex];\n }\n\n ngOnInit() {\n this._initializedStream.next();\n }\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n this._initializedStream.complete();\n }\n}\n\n/** Returns the sort direction cycle to use given the provided parameters of order and clear. */\nfunction getSortDirectionCycle(start: SortDirection, disableClear: boolean): SortDirection[] {\n let sortOrder: SortDirection[] = ['asc', 'desc'];\n if (start == 'desc') {\n sortOrder.reverse();\n }\n if (!disableClear) {\n sortOrder.push('');\n }\n\n return sortOrder;\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 {Injectable} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n/**\n * To modify the labels and text displayed, create a new instance of MatSortHeaderIntl and\n * include it in a custom provider.\n */\n@Injectable({providedIn: 'root'})\nexport class MatSortHeaderIntl {\n /**\n * Stream that emits whenever the labels here are changed. Use this to notify\n * components if the labels have changed after initialization.\n */\n readonly changes: Subject<void> = new Subject<void>();\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 {AriaDescriber, FocusMonitor} from '@angular/cdk/a11y';\nimport {ENTER, SPACE} from '@angular/cdk/keycodes';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n signal,\n ChangeDetectorRef,\n} from '@angular/core';\nimport {merge, Subscription} from 'rxjs';\nimport {\n MAT_SORT_DEFAULT_OPTIONS,\n MatSort,\n MatSortable,\n MatSortDefaultOptions,\n SortHeaderArrowPosition,\n} from './sort';\nimport {SortDirection} from './sort-direction';\nimport {getSortHeaderNotContainedWithinSortError} from './sort-errors';\nimport {MatSortHeaderIntl} from './sort-header-intl';\nimport {_CdkPrivateStyleLoader} from '@angular/cdk/private';\nimport {_animationsDisabled, _StructuralStylesLoader} from '../core';\n\n/**\n * Valid positions for the arrow to be in for its opacity and translation. If the state is a\n * sort direction, the position of the arrow will be above/below and opacity 0. If the state is\n * hint, the arrow will be in the center with a slight opacity. Active state means the arrow will\n * be fully opaque in the center.\n *\n * @docs-private\n * @deprecated No longer being used, to be removed.\n * @breaking-change 21.0.0\n */\nexport type ArrowViewState = SortDirection | 'hint' | 'active';\n\n/**\n * States describing the arrow's animated position (animating fromState to toState).\n * If the fromState is not defined, there will be no animated transition to the toState.\n * @docs-private\n * @deprecated No longer being used, to be removed.\n * @breaking-change 21.0.0\n */\nexport interface ArrowViewStateTransition {\n fromState?: ArrowViewState;\n toState?: ArrowViewState;\n}\n\n/** Column definition associated with a `MatSortHeader`. */\ninterface MatSortHeaderColumnDef {\n name: string;\n}\n\n/**\n * Applies sorting behavior (click to change sort) and styles to an element, including an\n * arrow to display the current sort direction.\n *\n * Must be provided with an id and contained within a parent MatSort directive.\n *\n * If used on header cells in a CdkTable, it will automatically default its id from its containing\n * column definition.\n */\n@Component({\n selector: '[mat-sort-header]',\n exportAs: 'matSortHeader',\n templateUrl: 'sort-header.html',\n styleUrl: 'sort-header.css',\n host: {\n 'class': 'mat-sort-header',\n '(click)': '_toggleOnInteraction()',\n '(keydown)': '_handleKeydown($event)',\n '(mouseleave)': '_recentlyCleared.set(null)',\n '[attr.aria-sort]': '_getAriaSortAttribute()',\n '[class.mat-sort-header-disabled]': '_isDisabled()',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatSortHeader implements MatSortable, OnDestroy, OnInit, AfterViewInit {\n _intl = inject(MatSortHeaderIntl);\n _sort = inject(MatSort, {optional: true})!;\n _columnDef = inject<MatSortHeaderColumnDef>('MAT_SORT_HEADER_COLUMN_DEF' as any, {\n optional: true,\n });\n private _changeDetectorRef = inject(ChangeDetectorRef);\n private _focusMonitor = inject(FocusMonitor);\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _ariaDescriber = inject(AriaDescriber, {optional: true});\n private _renderChanges: Subscription | undefined;\n protected _animationsDisabled = _animationsDisabled();\n\n /**\n * Indicates which state was just cleared from the sort header.\n * Will be reset on the next interaction. Used for coordinating animations.\n */\n protected _recentlyCleared = signal<SortDirection | null>(null);\n\n /**\n * The element with role=\"button\" inside this component's view. We need this\n * in order to apply a description with AriaDescriber.\n */\n private _sortButton: HTMLElement;\n\n /**\n * ID of this sort header. If used within the context of a CdkColumnDef, this will default to\n * the column's name.\n */\n @Input('mat-sort-header') id: string;\n\n /** Sets the position of the arrow that displays when sorted. */\n @Input() arrowPosition: SortHeaderArrowPosition = 'after';\n\n /** Overrides the sort start value of the containing MatSort for this MatSortable. */\n @Input() start: SortDirection;\n\n /** whether the sort header is disabled. */\n @Input({transform: booleanAttribute})\n disabled: boolean = false;\n\n /**\n * Description applied to MatSortHeader's button element with aria-describedby. This text should\n * describe the action that will occur when the user clicks the sort header.\n */\n @Input()\n get sortActionDescription(): string {\n return this._sortActionDescription;\n }\n set sortActionDescription(value: string) {\n this._updateSortActionDescription(value);\n }\n // Default the action description to \"Sort\" because it's better than nothing.\n // Without a description, the button's label comes from the sort header text content,\n // which doesn't give any indication that it performs a sorting operation.\n private _sortActionDescription: string = 'Sort';\n\n /** Overrides the disable clear value of the containing MatSort for this MatSortable. */\n @Input({transform: booleanAttribute})\n disableClear: boolean;\n\n constructor(...args: unknown[]);\n\n constructor() {\n inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\n const defaultOptions = inject<MatSortDefaultOptions>(MAT_SORT_DEFAULT_OPTIONS, {\n optional: true,\n });\n\n // Note that we use a string token for the `_columnDef`, because the value is provided both by\n // `material/table` and `cdk/table` and we can't have the CDK depending on Material,\n // and we want to avoid having the sort header depending on the CDK table because\n // of this single reference.\n if (!this._sort && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getSortHeaderNotContainedWithinSortError();\n }\n\n if (defaultOptions?.arrowPosition) {\n this.arrowPosition = defaultOptions?.arrowPosition;\n }\n }\n\n ngOnInit() {\n if (!this.id && this._columnDef) {\n this.id = this._columnDef.name;\n }\n\n this._sort.register(this);\n this._renderChanges = merge(this._sort._stateChanges, this._sort.sortChange).subscribe(() =>\n this._changeDetectorRef.markForCheck(),\n );\n this._sortButton = this._elementRef.nativeElement.querySelector('.mat-sort-header-container')!;\n this._updateSortActionDescription(this._sortActionDescription);\n }\n\n ngAfterViewInit() {\n // We use the focus monitor because we also want to style\n // things differently based on the focus origin.\n this._focusMonitor.monitor(this._elementRef, true).subscribe(() => {\n // We need the delay here, because we can trigger a signal write error if the header\n // has a signal bound to `disabled` which causes it to be blurred (see #31723.)\n Promise.resolve().then(() => this._recentlyCleared.set(null));\n });\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._sort.deregister(this);\n this._renderChanges?.unsubscribe();\n\n if (this._sortButton) {\n this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);\n }\n }\n\n /** Triggers the sort on this sort header and removes the indicator hint. */\n _toggleOnInteraction() {\n if (!this._isDisabled()) {\n const wasSorted = this._isSorted();\n const prevDirection = this._sort.direction;\n this._sort.sort(this);\n this._recentlyCleared.set(wasSorted && !this._isSorted() ? prevDirection : null);\n }\n }\n\n _handleKeydown(event: KeyboardEvent) {\n if (event.keyCode === SPACE || event.keyCode === ENTER) {\n event.preventDefault();\n this._toggleOnInteraction();\n }\n }\n\n /** Whether this MatSortHeader is currently sorted in either ascending or descending order. */\n _isSorted() {\n return (\n this._sort.active == this.id &&\n (this._sort.direction === 'asc' || this._sort.direction === 'desc')\n );\n }\n\n _isDisabled() {\n return this._sort.disabled || this.disabled;\n }\n\n /**\n * Gets the aria-sort attribute that should be applied to this sort header. If this header\n * is not sorted, returns null so that the attribute is removed from the host element. Aria spec\n * says that the aria-sort property should only be present on one header at a time, so removing\n * ensures this is true.\n */\n _getAriaSortAttribute() {\n if (!this._isSorted()) {\n return 'none';\n }\n\n return this._sort.direction == 'asc' ? 'ascending' : 'descending';\n }\n\n /** Whether the arrow inside the sort header should be rendered. */\n _renderArrow() {\n return !this._isDisabled() || this._isSorted();\n }\n\n private _updateSortActionDescription(newDescription: string) {\n // We use AriaDescriber for the sort button instead of setting an `aria-label` because some\n // screen readers (notably VoiceOver) will read both the column header *and* the button's label\n // for every *cell* in the table, creating a lot of unnecessary noise.\n\n // If _sortButton is undefined, the component hasn't been initialized yet so there's\n // nothing to update in the DOM.\n if (this._sortButton) {\n // removeDescription will no-op if there is no existing message.\n // TODO(jelbourn): remove optional chaining when AriaDescriber is required.\n this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);\n this._ariaDescriber?.describe(this._sortButton, newDescription);\n }\n\n this._sortActionDescription = newDescription;\n }\n}\n","<!--\n We set the `tabindex` on an element inside the table header, rather than the header itself,\n because of a bug in NVDA where having a `tabindex` on a `th` breaks keyboard navigation in the\n table (see https://github.com/nvaccess/nvda/issues/7718). This allows for the header to both\n be focusable, and have screen readers read out its `aria-sort` state. We prefer this approach\n over having a button with an `aria-label` inside the header, because the button's `aria-label`\n will be read out as the user is navigating the table's cell (see #13012).\n\n The approach is based off of: https://dequeuniversity.com/library/aria/tables/sf-sortable-grid\n-->\n<div class=\"mat-sort-header-container mat-focus-indicator\"\n [class.mat-sort-header-sorted]=\"_isSorted()\"\n [class.mat-sort-header-position-before]=\"arrowPosition === 'before'\"\n [class.mat-sort-header-descending]=\"_sort.direction === 'desc'\"\n [class.mat-sort-header-ascending]=\"_sort.direction === 'asc'\"\n [class.mat-sort-header-recently-cleared-ascending]=\"_recentlyCleared() === 'asc'\"\n [class.mat-sort-header-recently-cleared-descending]=\"_recentlyCleared() === 'desc'\"\n [class.mat-sort-header-animations-disabled]=\"_animationsDisabled\"\n [attr.tabindex]=\"_isDisabled() ? null : 0\"\n [attr.role]=\"_isDisabled() ? null : 'button'\">\n\n <!--\n TODO(crisbeto): this div isn't strictly necessary, but we have to keep it due to a large\n number of screenshot diff failures. It should be removed eventually. Note that the difference\n isn't visible with a shorter header, but once it breaks up into multiple lines, this element\n causes it to be center-aligned, whereas removing it will keep the text to the left.\n -->\n <div class=\"mat-sort-header-content\">\n <ng-content></ng-content>\n </div>\n\n <!-- Disable animations while a current animation is running -->\n @if (_renderArrow()) {\n <div class=\"mat-sort-header-arrow\">\n <ng-content select=\"[matSortHeaderIcon]\">\n <svg viewBox=\"0 -960 960 960\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z\"/>\n </svg>\n </ng-content>\n </div>\n }\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 {MatSortHeader} from './sort-header';\nimport {MatSort} from './sort';\n\n@NgModule({\n imports: [MatSort, MatSortHeader],\n exports: [MatSort, MatSortHeader, BidiModule],\n})\nexport class MatSortModule {}\n"],"names":["getSortDuplicateSortableIdError","id","Error","getSortHeaderNotContainedWithinSortError","getSortHeaderMissingIdError","getSortInvalidDirectionError","direction","MAT_SORT_DEFAULT_OPTIONS","InjectionToken","MatSort","_defaultOptions","_initializedStream","ReplaySubject","sortables","Map","_stateChanges","Subject","active","start","_direction","ngDevMode","disableClear","disabled","sortChange","EventEmitter","initialized","constructor","register","sortable","has","set","deregister","delete","sort","getNextSortDirection","emit","sortDirectionCycle","getSortDirectionCycle","nextDirectionIndex","indexOf","length","ngOnInit","next","ngOnChanges","ngOnDestroy","complete","ɵfac","i0","ɵɵngDeclareFactory","minVersion","version","ngImport","type","optional","target","ɵɵFactoryTarget","Directive","isStandalone","selector","inputs","booleanAttribute","outputs","host","classAttribute","exportAs","usesOnChanges","decorators","args","Optional","Inject","Input","alias","transform","Output","sortOrder","reverse","push","MatSortHeaderIntl","changes","deps","Injectable","ɵprov","ɵɵngDeclareInjectable","providedIn","MatSortHeader","_intl","inject","_sort","_columnDef","_changeDetectorRef","ChangeDetectorRef","_focusMonitor","FocusMonitor","_elementRef","ElementRef","_ariaDescriber","AriaDescriber","_renderChanges","_animationsDisabled","_recentlyCleared","signal","_sortButton","arrowPosition","sortActionDescription","_sortActionDescription","value","_updateSortActionDescription","_CdkPrivateStyleLoader","load","_StructuralStylesLoader","defaultOptions","name","merge","subscribe","markForCheck","nativeElement","querySelector","ngAfterViewInit","monitor","Promise","resolve","then","stopMonitoring","unsubscribe","removeDescription","_toggleOnInteraction","_isDisabled","wasSorted","_isSorted","prevDirection","_handleKeydown","event","keyCode","SPACE","ENTER","preventDefault","_getAriaSortAttribute","_renderArrow","newDescription","describe","Component","ɵcmp","ɵɵngDeclareComponent","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","template","MatSortModule","NgModule","imports","BidiModule","ɵinj","ɵɵngDeclareIn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AA5G,EAAA,CAAA6G,mBAAA,CAAA;AAAA3G,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,eAAA;AAAAC,IAAAA,QAAA,EAAAJ,EAAA;AAAAK,IAAAA,IAAA,EAAAmG,aAAa;cAFUG,UAAU;AAAA,GAAA,CAAA;;;;;;QAEjCH,aAAa;AAAArF,EAAAA,UAAA,EAAA,CAAA;UAJzBsF,QAAQ;AAACrF,IAAAA,IAAA,EAAA,CAAA;AACRsF,MAAAA,OAAO,EAAE,CAAChJ,OAAO,EAAE2E,aAAa,CAAC;AACjCyE,MAAAA,OAAO,EAAE,CAACpJ,OAAO,EAAE2E,aAAa,EAAEsE,UAAU;KAC7C;;;;;;"}
|
|
1
|
+
{"version":3,"file":"sort.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/sort/sort-errors.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/sort/sort.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/sort/sort-header-intl.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/sort/sort-header.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/sort/sort-header.html","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/sort/sort-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\n/** @docs-private */\nexport function getSortDuplicateSortableIdError(id: string): Error {\n return Error(`Cannot have two MatSortables with the same id (${id}).`);\n}\n\n/** @docs-private */\nexport function getSortHeaderNotContainedWithinSortError(): Error {\n return Error(`MatSortHeader must be placed within a parent element with the MatSort directive.`);\n}\n\n/** @docs-private */\nexport function getSortHeaderMissingIdError(): Error {\n return Error(`MatSortHeader must be provided with a unique id.`);\n}\n\n/** @docs-private */\nexport function getSortInvalidDirectionError(direction: string): Error {\n return Error(`${direction} is not a valid sort direction ('asc' or 'desc').`);\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 Directive,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n booleanAttribute,\n} from '@angular/core';\nimport {Observable, ReplaySubject, Subject} from 'rxjs';\nimport {SortDirection} from './sort-direction';\nimport {\n getSortDuplicateSortableIdError,\n getSortHeaderMissingIdError,\n getSortInvalidDirectionError,\n} from './sort-errors';\n\n/** Position of the arrow that displays when sorted. */\nexport type SortHeaderArrowPosition = 'before' | 'after';\n\n/** Interface for a directive that holds sorting state consumed by `MatSortHeader`. */\nexport interface MatSortable {\n /** The id of the column being sorted. */\n id: string;\n\n /** Starting sort direction. */\n start: SortDirection;\n\n /** Whether to disable clearing the sorting state. */\n disableClear: boolean;\n}\n\n/** The current sort state. */\nexport interface Sort {\n /** The id of the column being sorted. */\n active: string;\n\n /** The sort direction. */\n direction: SortDirection;\n}\n\n/** Default options for `mat-sort`. */\nexport interface MatSortDefaultOptions {\n /** Whether to disable clearing the sorting state. */\n disableClear?: boolean;\n /** Position of the arrow that displays when sorted. */\n arrowPosition?: SortHeaderArrowPosition;\n}\n\n/** Injection token to be used to override the default options for `mat-sort`. */\nexport const MAT_SORT_DEFAULT_OPTIONS = new InjectionToken<MatSortDefaultOptions>(\n 'MAT_SORT_DEFAULT_OPTIONS',\n);\n\n/** Container for MatSortables to manage the sort state and provide default sort parameters. */\n@Directive({\n selector: '[matSort]',\n exportAs: 'matSort',\n host: {\n 'class': 'mat-sort',\n },\n})\nexport class MatSort implements OnChanges, OnDestroy, OnInit {\n private _initializedStream = new ReplaySubject<void>(1);\n\n /** Collection of all registered sortables that this directive manages. */\n sortables = new Map<string, MatSortable>();\n\n /** Used to notify any child components listening to state changes. */\n readonly _stateChanges = new Subject<void>();\n\n /** The id of the most recently sorted MatSortable. */\n @Input('matSortActive') active: string;\n\n /**\n * The direction to set when an MatSortable is initially sorted.\n * May be overridden by the MatSortable's sort start.\n */\n @Input('matSortStart') start: SortDirection = 'asc';\n\n /** The sort direction of the currently active MatSortable. */\n @Input('matSortDirection')\n get direction(): SortDirection {\n return this._direction;\n }\n set direction(direction: SortDirection) {\n if (\n direction &&\n direction !== 'asc' &&\n direction !== 'desc' &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw getSortInvalidDirectionError(direction);\n }\n this._direction = direction;\n }\n private _direction: SortDirection = '';\n\n /**\n * Whether to disable the user from clearing the sort by finishing the sort direction cycle.\n * May be overridden by the MatSortable's disable clear input.\n */\n @Input({alias: 'matSortDisableClear', transform: booleanAttribute})\n disableClear: boolean;\n\n /** Whether the sortable is disabled. */\n @Input({alias: 'matSortDisabled', transform: booleanAttribute})\n disabled: boolean = false;\n\n /** Event emitted when the user changes either the active sort or sort direction. */\n @Output('matSortChange') readonly sortChange: EventEmitter<Sort> = new EventEmitter<Sort>();\n\n /** Emits when the paginator is initialized. */\n initialized: Observable<void> = this._initializedStream;\n\n constructor(\n @Optional()\n @Inject(MAT_SORT_DEFAULT_OPTIONS)\n private _defaultOptions?: MatSortDefaultOptions,\n ) {}\n\n /**\n * Register function to be used by the contained MatSortables. Adds the MatSortable to the\n * collection of MatSortables.\n */\n register(sortable: MatSortable): void {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!sortable.id) {\n throw getSortHeaderMissingIdError();\n }\n\n if (this.sortables.has(sortable.id)) {\n throw getSortDuplicateSortableIdError(sortable.id);\n }\n }\n\n this.sortables.set(sortable.id, sortable);\n }\n\n /**\n * Unregister function to be used by the contained MatSortables. Removes the MatSortable from the\n * collection of contained MatSortables.\n */\n deregister(sortable: MatSortable): void {\n this.sortables.delete(sortable.id);\n }\n\n /** Sets the active sort id and determines the new sort direction. */\n sort(sortable: MatSortable): void {\n if (this.active != sortable.id) {\n this.active = sortable.id;\n this.direction = sortable.start ? sortable.start : this.start;\n } else {\n this.direction = this.getNextSortDirection(sortable);\n }\n\n this.sortChange.emit({active: this.active, direction: this.direction});\n }\n\n /** Returns the next sort direction of the active sortable, checking for potential overrides. */\n getNextSortDirection(sortable: MatSortable): SortDirection {\n if (!sortable) {\n return '';\n }\n\n // Get the sort direction cycle with the potential sortable overrides.\n const disableClear =\n sortable?.disableClear ?? this.disableClear ?? !!this._defaultOptions?.disableClear;\n let sortDirectionCycle = getSortDirectionCycle(sortable.start || this.start, disableClear);\n\n // Get and return the next direction in the cycle\n let nextDirectionIndex = sortDirectionCycle.indexOf(this.direction) + 1;\n if (nextDirectionIndex >= sortDirectionCycle.length) {\n nextDirectionIndex = 0;\n }\n return sortDirectionCycle[nextDirectionIndex];\n }\n\n ngOnInit() {\n this._initializedStream.next();\n }\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n this._initializedStream.complete();\n }\n}\n\n/** Returns the sort direction cycle to use given the provided parameters of order and clear. */\nfunction getSortDirectionCycle(start: SortDirection, disableClear: boolean): SortDirection[] {\n let sortOrder: SortDirection[] = ['asc', 'desc'];\n if (start == 'desc') {\n sortOrder.reverse();\n }\n if (!disableClear) {\n sortOrder.push('');\n }\n\n return sortOrder;\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 {Injectable} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n/**\n * To modify the labels and text displayed, create a new instance of MatSortHeaderIntl and\n * include it in a custom provider.\n */\n@Injectable({providedIn: 'root'})\nexport class MatSortHeaderIntl {\n /**\n * Stream that emits whenever the labels here are changed. Use this to notify\n * components if the labels have changed after initialization.\n */\n readonly changes: Subject<void> = new Subject<void>();\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 {AriaDescriber, FocusMonitor} from '@angular/cdk/a11y';\nimport {ENTER, SPACE} from '@angular/cdk/keycodes';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n signal,\n ChangeDetectorRef,\n} from '@angular/core';\nimport {merge, Subscription} from 'rxjs';\nimport {\n MAT_SORT_DEFAULT_OPTIONS,\n MatSort,\n MatSortable,\n MatSortDefaultOptions,\n SortHeaderArrowPosition,\n} from './sort';\nimport {SortDirection} from './sort-direction';\nimport {getSortHeaderNotContainedWithinSortError} from './sort-errors';\nimport {MatSortHeaderIntl} from './sort-header-intl';\nimport {_CdkPrivateStyleLoader} from '@angular/cdk/private';\nimport {_animationsDisabled, _StructuralStylesLoader} from '../core';\n\n/**\n * Valid positions for the arrow to be in for its opacity and translation. If the state is a\n * sort direction, the position of the arrow will be above/below and opacity 0. If the state is\n * hint, the arrow will be in the center with a slight opacity. Active state means the arrow will\n * be fully opaque in the center.\n *\n * @docs-private\n * @deprecated No longer being used, to be removed.\n * @breaking-change 21.0.0\n */\nexport type ArrowViewState = SortDirection | 'hint' | 'active';\n\n/**\n * States describing the arrow's animated position (animating fromState to toState).\n * If the fromState is not defined, there will be no animated transition to the toState.\n * @docs-private\n * @deprecated No longer being used, to be removed.\n * @breaking-change 21.0.0\n */\nexport interface ArrowViewStateTransition {\n fromState?: ArrowViewState;\n toState?: ArrowViewState;\n}\n\n/** Column definition associated with a `MatSortHeader`. */\ninterface MatSortHeaderColumnDef {\n name: string;\n}\n\n/**\n * Applies sorting behavior (click to change sort) and styles to an element, including an\n * arrow to display the current sort direction.\n *\n * Must be provided with an id and contained within a parent MatSort directive.\n *\n * If used on header cells in a CdkTable, it will automatically default its id from its containing\n * column definition.\n */\n@Component({\n selector: '[mat-sort-header]',\n exportAs: 'matSortHeader',\n templateUrl: 'sort-header.html',\n styleUrl: 'sort-header.css',\n host: {\n 'class': 'mat-sort-header',\n '(click)': '_toggleOnInteraction()',\n '(keydown)': '_handleKeydown($event)',\n '(mouseleave)': '_recentlyCleared.set(null)',\n '[attr.aria-sort]': '_getAriaSortAttribute()',\n '[class.mat-sort-header-disabled]': '_isDisabled()',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatSortHeader implements MatSortable, OnDestroy, OnInit, AfterViewInit {\n _intl = inject(MatSortHeaderIntl);\n _sort = inject(MatSort, {optional: true})!;\n _columnDef = inject<MatSortHeaderColumnDef>('MAT_SORT_HEADER_COLUMN_DEF' as any, {\n optional: true,\n });\n private _changeDetectorRef = inject(ChangeDetectorRef);\n private _focusMonitor = inject(FocusMonitor);\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _ariaDescriber = inject(AriaDescriber, {optional: true});\n private _renderChanges: Subscription | undefined;\n protected _animationsDisabled = _animationsDisabled();\n\n /**\n * Indicates which state was just cleared from the sort header.\n * Will be reset on the next interaction. Used for coordinating animations.\n */\n protected _recentlyCleared = signal<SortDirection | null>(null);\n\n /**\n * The element with role=\"button\" inside this component's view. We need this\n * in order to apply a description with AriaDescriber.\n */\n private _sortButton: HTMLElement;\n\n /**\n * ID of this sort header. If used within the context of a CdkColumnDef, this will default to\n * the column's name.\n */\n @Input('mat-sort-header') id: string;\n\n /** Sets the position of the arrow that displays when sorted. */\n @Input() arrowPosition: SortHeaderArrowPosition = 'after';\n\n /** Overrides the sort start value of the containing MatSort for this MatSortable. */\n @Input() start: SortDirection;\n\n /** whether the sort header is disabled. */\n @Input({transform: booleanAttribute})\n disabled: boolean = false;\n\n /**\n * Description applied to MatSortHeader's button element with aria-describedby. This text should\n * describe the action that will occur when the user clicks the sort header.\n */\n @Input()\n get sortActionDescription(): string {\n return this._sortActionDescription;\n }\n set sortActionDescription(value: string) {\n this._updateSortActionDescription(value);\n }\n // Default the action description to \"Sort\" because it's better than nothing.\n // Without a description, the button's label comes from the sort header text content,\n // which doesn't give any indication that it performs a sorting operation.\n private _sortActionDescription: string = 'Sort';\n\n /** Overrides the disable clear value of the containing MatSort for this MatSortable. */\n @Input({transform: booleanAttribute})\n disableClear: boolean;\n\n constructor(...args: unknown[]);\n\n constructor() {\n inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\n const defaultOptions = inject<MatSortDefaultOptions>(MAT_SORT_DEFAULT_OPTIONS, {\n optional: true,\n });\n\n // Note that we use a string token for the `_columnDef`, because the value is provided both by\n // `material/table` and `cdk/table` and we can't have the CDK depending on Material,\n // and we want to avoid having the sort header depending on the CDK table because\n // of this single reference.\n if (!this._sort && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getSortHeaderNotContainedWithinSortError();\n }\n\n if (defaultOptions?.arrowPosition) {\n this.arrowPosition = defaultOptions?.arrowPosition;\n }\n }\n\n ngOnInit() {\n if (!this.id && this._columnDef) {\n this.id = this._columnDef.name;\n }\n\n this._sort.register(this);\n this._renderChanges = merge(this._sort._stateChanges, this._sort.sortChange).subscribe(() =>\n this._changeDetectorRef.markForCheck(),\n );\n this._sortButton = this._elementRef.nativeElement.querySelector('.mat-sort-header-container')!;\n this._updateSortActionDescription(this._sortActionDescription);\n }\n\n ngAfterViewInit() {\n // We use the focus monitor because we also want to style\n // things differently based on the focus origin.\n this._focusMonitor.monitor(this._elementRef, true).subscribe(() => {\n // We need the delay here, because we can trigger a signal write error if the header\n // has a signal bound to `disabled` which causes it to be blurred (see #31723.)\n Promise.resolve().then(() => this._recentlyCleared.set(null));\n });\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._sort.deregister(this);\n this._renderChanges?.unsubscribe();\n\n if (this._sortButton) {\n this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);\n }\n }\n\n /** Triggers the sort on this sort header and removes the indicator hint. */\n _toggleOnInteraction() {\n if (!this._isDisabled()) {\n const wasSorted = this._isSorted();\n const prevDirection = this._sort.direction;\n this._sort.sort(this);\n this._recentlyCleared.set(wasSorted && !this._isSorted() ? prevDirection : null);\n }\n }\n\n _handleKeydown(event: KeyboardEvent) {\n if (event.keyCode === SPACE || event.keyCode === ENTER) {\n event.preventDefault();\n this._toggleOnInteraction();\n }\n }\n\n /** Whether this MatSortHeader is currently sorted in either ascending or descending order. */\n _isSorted() {\n return (\n this._sort.active == this.id &&\n (this._sort.direction === 'asc' || this._sort.direction === 'desc')\n );\n }\n\n _isDisabled() {\n return this._sort.disabled || this.disabled;\n }\n\n /**\n * Gets the aria-sort attribute that should be applied to this sort header. If this header\n * is not sorted, returns null so that the attribute is removed from the host element. Aria spec\n * says that the aria-sort property should only be present on one header at a time, so removing\n * ensures this is true.\n */\n _getAriaSortAttribute() {\n if (!this._isSorted()) {\n return 'none';\n }\n\n return this._sort.direction == 'asc' ? 'ascending' : 'descending';\n }\n\n /** Whether the arrow inside the sort header should be rendered. */\n _renderArrow() {\n return !this._isDisabled() || this._isSorted();\n }\n\n private _updateSortActionDescription(newDescription: string) {\n // We use AriaDescriber for the sort button instead of setting an `aria-label` because some\n // screen readers (notably VoiceOver) will read both the column header *and* the button's label\n // for every *cell* in the table, creating a lot of unnecessary noise.\n\n // If _sortButton is undefined, the component hasn't been initialized yet so there's\n // nothing to update in the DOM.\n if (this._sortButton) {\n // removeDescription will no-op if there is no existing message.\n // TODO(jelbourn): remove optional chaining when AriaDescriber is required.\n this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);\n this._ariaDescriber?.describe(this._sortButton, newDescription);\n }\n\n this._sortActionDescription = newDescription;\n }\n}\n","<!--\n We set the `tabindex` on an element inside the table header, rather than the header itself,\n because of a bug in NVDA where having a `tabindex` on a `th` breaks keyboard navigation in the\n table (see https://github.com/nvaccess/nvda/issues/7718). This allows for the header to both\n be focusable, and have screen readers read out its `aria-sort` state. We prefer this approach\n over having a button with an `aria-label` inside the header, because the button's `aria-label`\n will be read out as the user is navigating the table's cell (see #13012).\n\n The approach is based off of: https://dequeuniversity.com/library/aria/tables/sf-sortable-grid\n-->\n<div class=\"mat-sort-header-container mat-focus-indicator\"\n [class.mat-sort-header-sorted]=\"_isSorted()\"\n [class.mat-sort-header-position-before]=\"arrowPosition === 'before'\"\n [class.mat-sort-header-descending]=\"_sort.direction === 'desc'\"\n [class.mat-sort-header-ascending]=\"_sort.direction === 'asc'\"\n [class.mat-sort-header-recently-cleared-ascending]=\"_recentlyCleared() === 'asc'\"\n [class.mat-sort-header-recently-cleared-descending]=\"_recentlyCleared() === 'desc'\"\n [class.mat-sort-header-animations-disabled]=\"_animationsDisabled\"\n [attr.tabindex]=\"_isDisabled() ? null : 0\"\n [attr.role]=\"_isDisabled() ? null : 'button'\">\n\n <!--\n TODO(crisbeto): this div isn't strictly necessary, but we have to keep it due to a large\n number of screenshot diff failures. It should be removed eventually. Note that the difference\n isn't visible with a shorter header, but once it breaks up into multiple lines, this element\n causes it to be center-aligned, whereas removing it will keep the text to the left.\n -->\n <div class=\"mat-sort-header-content\">\n <ng-content></ng-content>\n </div>\n\n <!-- Disable animations while a current animation is running -->\n @if (_renderArrow()) {\n <div class=\"mat-sort-header-arrow\">\n <ng-content select=\"[matSortHeaderIcon]\">\n <svg viewBox=\"0 -960 960 960\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z\"/>\n </svg>\n </ng-content>\n </div>\n }\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 {MatSortHeader} from './sort-header';\nimport {MatSort} from './sort';\n\n@NgModule({\n imports: [MatSort, MatSortHeader],\n exports: [MatSort, MatSortHeader, BidiModule],\n})\nexport class MatSortModule {}\n"],"names":["getSortDuplicateSortableIdError","id","Error","getSortHeaderNotContainedWithinSortError","getSortHeaderMissingIdError","getSortInvalidDirectionError","direction","MAT_SORT_DEFAULT_OPTIONS","InjectionToken","MatSort","_defaultOptions","_initializedStream","ReplaySubject","sortables","Map","_stateChanges","Subject","active","start","_direction","ngDevMode","disableClear","disabled","sortChange","EventEmitter","initialized","constructor","register","sortable","has","set","deregister","delete","sort","getNextSortDirection","emit","sortDirectionCycle","getSortDirectionCycle","nextDirectionIndex","indexOf","length","ngOnInit","next","ngOnChanges","ngOnDestroy","complete","ɵfac","i0","ɵɵngDeclareFactory","minVersion","version","ngImport","type","optional","target","ɵɵFactoryTarget","Directive","isStandalone","selector","inputs","booleanAttribute","outputs","host","classAttribute","exportAs","usesOnChanges","decorators","args","Optional","Inject","Input","alias","transform","Output","sortOrder","reverse","push","MatSortHeaderIntl","changes","deps","Injectable","ɵprov","ɵɵngDeclareInjectable","providedIn","MatSortHeader","_intl","inject","_sort","_columnDef","_changeDetectorRef","ChangeDetectorRef","_focusMonitor","FocusMonitor","_elementRef","ElementRef","_ariaDescriber","AriaDescriber","_renderChanges","_animationsDisabled","_recentlyCleared","signal","_sortButton","arrowPosition","sortActionDescription","_sortActionDescription","value","_updateSortActionDescription","_CdkPrivateStyleLoader","load","_StructuralStylesLoader","defaultOptions","name","merge","subscribe","markForCheck","nativeElement","querySelector","ngAfterViewInit","monitor","Promise","resolve","then","stopMonitoring","unsubscribe","removeDescription","_toggleOnInteraction","_isDisabled","wasSorted","_isSorted","prevDirection","_handleKeydown","event","keyCode","SPACE","ENTER","preventDefault","_getAriaSortAttribute","_renderArrow","newDescription","describe","Component","ɵcmp","ɵɵngDeclareComponent","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","template","MatSortModule","NgModule","imports","BidiModule","ɵinj","ɵɵngDeclareInjector","exports"],"mappings":";;;;;;;;;;;AASM,SAAUA,+BAA+BA,CAACC,EAAU,EAAA;AACxD,EAAA,OAAOC,KAAK,CAAC,CAAkDD,+CAAAA,EAAAA,EAAE,IAAI,CAAC;A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-199a4f3c4e20/bin/src/material/stepper/testing/step-harness.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/stepper/testing/step-harness-filters.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/stepper/testing/stepper-harness.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/stepper/testing/stepper-button-harnesses.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 ContentContainerComponentHarness,\n HarnessPredicate,\n HarnessLoader,\n} from '@angular/cdk/testing';\nimport {StepHarnessFilters} from './step-harness-filters';\n\n/** Harness for interacting with a standard Angular Material step in tests. */\nexport class MatStepHarness extends ContentContainerComponentHarness<string> {\n /** The selector for the host element of a `MatStep` instance. */\n static hostSelector = '.mat-step-header';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatStepHarness` that meets\n * certain criteria.\n * @param options Options for filtering which steps are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: StepHarnessFilters = {}): HarnessPredicate<MatStepHarness> {\n return new HarnessPredicate(MatStepHarness, options)\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getLabel(), label),\n )\n .addOption(\n 'selected',\n options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected,\n )\n .addOption(\n 'completed',\n options.completed,\n async (harness, completed) => (await harness.isCompleted()) === completed,\n )\n .addOption(\n 'invalid',\n options.invalid,\n async (harness, invalid) => (await harness.hasErrors()) === invalid,\n );\n }\n\n /** Gets the label of the step. */\n async getLabel(): Promise<string> {\n return (await this.locatorFor('.mat-step-text-label')()).text();\n }\n\n /** Gets the `aria-label` of the step. */\n async getAriaLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** Gets the value of the `aria-labelledby` attribute. */\n async getAriaLabelledby(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-labelledby');\n }\n\n /** Whether the step is selected. */\n async isSelected(): Promise<boolean> {\n const host = await this.host();\n return (\n (await host.getAttribute('aria-selected')) === 'true' ||\n (await host.getAttribute('aria-current')) === 'step'\n );\n }\n\n /** Whether the step has been filled out. */\n async isCompleted(): Promise<boolean> {\n const state = await this._getIconState();\n return state === 'done' || (state === 'edit' && !(await this.isSelected()));\n }\n\n /**\n * Whether the step is currently showing its error state. Note that this doesn't mean that there\n * are or aren't any invalid form controls inside the step, but that the step is showing its\n * error-specific styling which depends on there being invalid controls, as well as the\n * `ErrorStateMatcher` determining that an error should be shown and that the `showErrors`\n * option was enabled through the `STEPPER_GLOBAL_OPTIONS` injection token.\n */\n async hasErrors(): Promise<boolean> {\n return (await this._getIconState()) === 'error';\n }\n\n /** Whether the step is optional. */\n async isOptional(): Promise<boolean> {\n // If the node with the optional text is present, it means that the step is optional.\n const optionalNode = await this.locatorForOptional('.mat-step-optional')();\n return !!optionalNode;\n }\n\n /**\n * Selects the given step by clicking on the label. The step may not be selected\n * if the stepper doesn't allow it (e.g. if there are validation errors).\n */\n async select(): Promise<void> {\n await (await this.host()).click();\n }\n\n protected override async getRootHarnessLoader(): Promise<HarnessLoader> {\n const contentId = await (await this.host()).getAttribute('aria-controls');\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${contentId}`);\n }\n\n /**\n * Gets the state of the step. Note that we have a `StepState` which we could use to type the\n * return value, but it's basically the same as `string`, because the type has `| string`.\n */\n private async _getIconState(): Promise<string> {\n // The state is exposed on the icon with a class that looks like `mat-step-icon-state-{{state}}`\n const icon = await this.locatorFor('.mat-step-icon')();\n const classes = (await icon.getAttribute('class'))!;\n const match = classes.match(/mat-step-icon-state-([a-z]+)/);\n\n if (!match) {\n throw Error(`Could not determine step state from \"${classes}\".`);\n }\n\n return match[1];\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 */\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** Possible orientations for a stepper. */\nexport enum StepperOrientation {\n HORIZONTAL,\n VERTICAL,\n}\n\n/** A set of criteria that can be used to filter a list of `MatStepHarness` instances. */\nexport interface StepHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose label matches the given value. */\n label?: string | RegExp;\n /** Only find steps with the given selected state. */\n selected?: boolean;\n /** Only find completed steps. */\n completed?: boolean;\n /** Only find steps that have errors. */\n invalid?: boolean;\n}\n\n/** A set of criteria that can be used to filter a list of `MatStepperHarness` instances. */\nexport interface StepperHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose orientation matches the given value. */\n orientation?: StepperOrientation;\n}\n\n/**\n * A set of criteria that can be used to filter a list of\n * `MatStepperNextHarness` and `MatStepperPreviousHarness` instances.\n */\nexport interface StepperButtonHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose text matches the given value. */\n text?: string | RegExp;\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 {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {MatStepHarness} from './step-harness';\nimport {\n StepperHarnessFilters,\n StepHarnessFilters,\n StepperOrientation,\n} from './step-harness-filters';\n\n/** Harness for interacting with a standard Material stepper in tests. */\nexport class MatStepperHarness extends ComponentHarness {\n /** The selector for the host element of a `MatStepper` instance. */\n static hostSelector = '.mat-stepper-horizontal, .mat-stepper-vertical';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatStepperHarness` that meets\n * certain criteria.\n * @param options Options for filtering which stepper instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: StepperHarnessFilters = {}): HarnessPredicate<MatStepperHarness> {\n return new HarnessPredicate(MatStepperHarness, options).addOption(\n 'orientation',\n options.orientation,\n async (harness, orientation) => (await harness.getOrientation()) === orientation,\n );\n }\n\n /**\n * Gets the list of steps in the stepper.\n * @param filter Optionally filters which steps are included.\n */\n async getSteps(filter: StepHarnessFilters = {}): Promise<MatStepHarness[]> {\n return this.locatorForAll(MatStepHarness.with(filter))();\n }\n\n /** Gets the orientation of the stepper. */\n async getOrientation(): Promise<StepperOrientation> {\n const host = await this.host();\n return (await host.hasClass('mat-stepper-horizontal'))\n ? StepperOrientation.HORIZONTAL\n : StepperOrientation.VERTICAL;\n }\n\n /**\n * Selects a step in this stepper.\n * @param filter An optional filter to apply to the child steps. The first step matching the\n * filter will be selected.\n */\n async selectStep(filter: StepHarnessFilters = {}): Promise<void> {\n const steps = await this.getSteps(filter);\n if (!steps.length) {\n throw Error(`Cannot find mat-step matching filter ${JSON.stringify(filter)}`);\n }\n await steps[0].select();\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 {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {StepperButtonHarnessFilters} from './step-harness-filters';\n\n/** Base class for stepper button harnesses. */\nabstract class StepperButtonHarness extends ComponentHarness {\n /** Gets the text of the button. */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Clicks the button. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n}\n\n/** Harness for interacting with a standard Angular Material stepper next button in tests. */\nexport class MatStepperNextHarness extends StepperButtonHarness {\n /** The selector for the host element of a `MatStep` instance. */\n static hostSelector = '.mat-stepper-next';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatStepperNextHarness` that meets\n * certain criteria.\n * @param options Options for filtering which steps are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: StepperButtonHarnessFilters = {}): HarnessPredicate<MatStepperNextHarness> {\n return new HarnessPredicate(MatStepperNextHarness, options).addOption(\n 'text',\n options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text),\n );\n }\n}\n\n/** Harness for interacting with a standard Angular Material stepper previous button in tests. */\nexport class MatStepperPreviousHarness extends StepperButtonHarness {\n /** The selector for the host element of a `MatStep` instance. */\n static hostSelector = '.mat-stepper-previous';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatStepperPreviousHarness`\n * that meets certain criteria.\n * @param options Options for filtering which steps are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(\n options: StepperButtonHarnessFilters = {},\n ): HarnessPredicate<MatStepperPreviousHarness> {\n return new HarnessPredicate(MatStepperPreviousHarness, options).addOption(\n 'text',\n options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text),\n );\n }\n}\n"],"names":["MatStepHarness","ContentContainerComponentHarness","hostSelector","with","options","HarnessPredicate","addOption","label","harness","stringMatches","getLabel","selected","isSelected","completed","isCompleted","invalid","hasErrors","locatorFor","text","getAriaLabel","host","getAttribute","getAriaLabelledby","state","_getIconState","isOptional","optionalNode","locatorForOptional","select","click","getRootHarnessLoader","contentId","documentRootLocatorFactory","harnessLoaderFor","icon","classes","match","Error","StepperOrientation","MatStepperHarness","ComponentHarness","orientation","getOrientation","getSteps","filter","locatorForAll","hasClass","HORIZONTAL","VERTICAL","selectStep","steps","length","JSON","stringify","StepperButtonHarness","getText","MatStepperNextHarness","MatStepperPreviousHarness"],"mappings":";;AAgBM,MAAOA,cAAe,SAAQC,gCAAwC,CAAA;EAE1E,OAAOC,YAAY,GAAG,kBAAkB;AAQxC,EAAA,OAAOC,IAAIA,CAACC,OAAA,GAA8B,EAAE,EAAA;IAC1C,OAAO,IAAIC,gBAAgB,CAACL,cAAc,EAAEI,OAAO,CAAA,CAChDE,SAAS,CAAC,OAAO,EAAEF,OAAO,CAACG,KAAK,EAAE,CAACC,OAAO,EAAED,KAAK,KAChDF,gBAAgB,CAACI,aAAa,CAACD,OAAO,CAACE,QAAQ,EAAE,EAAEH,KAAK,CAAC,CAAA,CAE1DD,SAAS,CACR,UAAU,EACVF,OAAO,CAACO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,KAAKA,GAAA;IACT,OAAO,CAAC,MAAM,IAAI,CAACT,IAAI,EAAE,EAAES,KAAK,EAAE;AACpC;AACD;AAGK,MAAO2B,qBAAsB,SAAQF,oBAAoB,CAAA;EAE7D,OAAOpD,YAAY,GAAG,mBAAmB;AAQzC,EAAA,OAAOC,IAAIA,CAACC,OAAA,GAAuC,EAAE,EAAA;AACnD,IAAA,OAAO,IAAIC,gBAAgB,CAACmD,qBAAqB,EAAEpD,OAAO,CAAC,CAACE,SAAS,CACnE,MAAM,EACNF,OAAO,CAACc,IAAI,EACZ,CAACV,OAAO,EAAEU,IAAI,KAAKb,gBAAgB,CAACI,aAAa,CAACD,OAAO,CAAC+C,OAAO,EAAE,EAAErC,IAAI,CAAC,CAC3E;AACH;;AAII,MAAOuC,yBAA0B,SAAQH,oBAAoB,CAAA;EAEjE,OAAOpD,YAAY,GAAG,uBAAuB;AAQ7C,EAAA,OAAOC,IAAIA,CACTC,OAAA,GAAuC,EAAE,EAAA;AAEzC,IAAA,OAAO,IAAIC,gBAAgB,CAACoD,yBAAyB,EAAErD,OAAO,CAAC,CAACE,SAAS,CACvE,MAAM,EACNF,OAAO,CAACc,IAAI,EACZ,CAACV,OAAO,EAAEU,IAAI,KAAKb,gBAAgB,CAACI,aAAa,CAACD,OAAO,CAAC+C,OAAO,EAAE,EAAErC,IAAI,CAAC,CAC3E;AACH;;;;;"}
|
|
1
|
+
{"version":3,"file":"stepper-testing.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/stepper/testing/step-harness.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/stepper/testing/step-harness-filters.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/stepper/testing/stepper-harness.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/stepper/testing/stepper-button-harnesses.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 ContentContainerComponentHarness,\n HarnessPredicate,\n HarnessLoader,\n} from '@angular/cdk/testing';\nimport {StepHarnessFilters} from './step-harness-filters';\n\n/** Harness for interacting with a standard Angular Material step in tests. */\nexport class MatStepHarness extends ContentContainerComponentHarness<string> {\n /** The selector for the host element of a `MatStep` instance. */\n static hostSelector = '.mat-step-header';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatStepHarness` that meets\n * certain criteria.\n * @param options Options for filtering which steps are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: StepHarnessFilters = {}): HarnessPredicate<MatStepHarness> {\n return new HarnessPredicate(MatStepHarness, options)\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getLabel(), label),\n )\n .addOption(\n 'selected',\n options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected,\n )\n .addOption(\n 'completed',\n options.completed,\n async (harness, completed) => (await harness.isCompleted()) === completed,\n )\n .addOption(\n 'invalid',\n options.invalid,\n async (harness, invalid) => (await harness.hasErrors()) === invalid,\n );\n }\n\n /** Gets the label of the step. */\n async getLabel(): Promise<string> {\n return (await this.locatorFor('.mat-step-text-label')()).text();\n }\n\n /** Gets the `aria-label` of the step. */\n async getAriaLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** Gets the value of the `aria-labelledby` attribute. */\n async getAriaLabelledby(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-labelledby');\n }\n\n /** Whether the step is selected. */\n async isSelected(): Promise<boolean> {\n const host = await this.host();\n return (\n (await host.getAttribute('aria-selected')) === 'true' ||\n (await host.getAttribute('aria-current')) === 'step'\n );\n }\n\n /** Whether the step has been filled out. */\n async isCompleted(): Promise<boolean> {\n const state = await this._getIconState();\n return state === 'done' || (state === 'edit' && !(await this.isSelected()));\n }\n\n /**\n * Whether the step is currently showing its error state. Note that this doesn't mean that there\n * are or aren't any invalid form controls inside the step, but that the step is showing its\n * error-specific styling which depends on there being invalid controls, as well as the\n * `ErrorStateMatcher` determining that an error should be shown and that the `showErrors`\n * option was enabled through the `STEPPER_GLOBAL_OPTIONS` injection token.\n */\n async hasErrors(): Promise<boolean> {\n return (await this._getIconState()) === 'error';\n }\n\n /** Whether the step is optional. */\n async isOptional(): Promise<boolean> {\n // If the node with the optional text is present, it means that the step is optional.\n const optionalNode = await this.locatorForOptional('.mat-step-optional')();\n return !!optionalNode;\n }\n\n /**\n * Selects the given step by clicking on the label. The step may not be selected\n * if the stepper doesn't allow it (e.g. if there are validation errors).\n */\n async select(): Promise<void> {\n await (await this.host()).click();\n }\n\n protected override async getRootHarnessLoader(): Promise<HarnessLoader> {\n const contentId = await (await this.host()).getAttribute('aria-controls');\n return this.documentRootLocatorFactory().harnessLoaderFor(`#${contentId}`);\n }\n\n /**\n * Gets the state of the step. Note that we have a `StepState` which we could use to type the\n * return value, but it's basically the same as `string`, because the type has `| string`.\n */\n private async _getIconState(): Promise<string> {\n // The state is exposed on the icon with a class that looks like `mat-step-icon-state-{{state}}`\n const icon = await this.locatorFor('.mat-step-icon')();\n const classes = (await icon.getAttribute('class'))!;\n const match = classes.match(/mat-step-icon-state-([a-z]+)/);\n\n if (!match) {\n throw Error(`Could not determine step state from \"${classes}\".`);\n }\n\n return match[1];\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 */\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** Possible orientations for a stepper. */\nexport enum StepperOrientation {\n HORIZONTAL,\n VERTICAL,\n}\n\n/** A set of criteria that can be used to filter a list of `MatStepHarness` instances. */\nexport interface StepHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose label matches the given value. */\n label?: string | RegExp;\n /** Only find steps with the given selected state. */\n selected?: boolean;\n /** Only find completed steps. */\n completed?: boolean;\n /** Only find steps that have errors. */\n invalid?: boolean;\n}\n\n/** A set of criteria that can be used to filter a list of `MatStepperHarness` instances. */\nexport interface StepperHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose orientation matches the given value. */\n orientation?: StepperOrientation;\n}\n\n/**\n * A set of criteria that can be used to filter a list of\n * `MatStepperNextHarness` and `MatStepperPreviousHarness` instances.\n */\nexport interface StepperButtonHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose text matches the given value. */\n text?: string | RegExp;\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 {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {MatStepHarness} from './step-harness';\nimport {\n StepperHarnessFilters,\n StepHarnessFilters,\n StepperOrientation,\n} from './step-harness-filters';\n\n/** Harness for interacting with a standard Material stepper in tests. */\nexport class MatStepperHarness extends ComponentHarness {\n /** The selector for the host element of a `MatStepper` instance. */\n static hostSelector = '.mat-stepper-horizontal, .mat-stepper-vertical';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatStepperHarness` that meets\n * certain criteria.\n * @param options Options for filtering which stepper instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: StepperHarnessFilters = {}): HarnessPredicate<MatStepperHarness> {\n return new HarnessPredicate(MatStepperHarness, options).addOption(\n 'orientation',\n options.orientation,\n async (harness, orientation) => (await harness.getOrientation()) === orientation,\n );\n }\n\n /**\n * Gets the list of steps in the stepper.\n * @param filter Optionally filters which steps are included.\n */\n async getSteps(filter: StepHarnessFilters = {}): Promise<MatStepHarness[]> {\n return this.locatorForAll(MatStepHarness.with(filter))();\n }\n\n /** Gets the orientation of the stepper. */\n async getOrientation(): Promise<StepperOrientation> {\n const host = await this.host();\n return (await host.hasClass('mat-stepper-horizontal'))\n ? StepperOrientation.HORIZONTAL\n : StepperOrientation.VERTICAL;\n }\n\n /**\n * Selects a step in this stepper.\n * @param filter An optional filter to apply to the child steps. The first step matching the\n * filter will be selected.\n */\n async selectStep(filter: StepHarnessFilters = {}): Promise<void> {\n const steps = await this.getSteps(filter);\n if (!steps.length) {\n throw Error(`Cannot find mat-step matching filter ${JSON.stringify(filter)}`);\n }\n await steps[0].select();\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 {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {StepperButtonHarnessFilters} from './step-harness-filters';\n\n/** Base class for stepper button harnesses. */\nabstract class StepperButtonHarness extends ComponentHarness {\n /** Gets the text of the button. */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Clicks the button. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n}\n\n/** Harness for interacting with a standard Angular Material stepper next button in tests. */\nexport class MatStepperNextHarness extends StepperButtonHarness {\n /** The selector for the host element of a `MatStep` instance. */\n static hostSelector = '.mat-stepper-next';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatStepperNextHarness` that meets\n * certain criteria.\n * @param options Options for filtering which steps are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: StepperButtonHarnessFilters = {}): HarnessPredicate<MatStepperNextHarness> {\n return new HarnessPredicate(MatStepperNextHarness, options).addOption(\n 'text',\n options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text),\n );\n }\n}\n\n/** Harness for interacting with a standard Angular Material stepper previous button in tests. */\nexport class MatStepperPreviousHarness extends StepperButtonHarness {\n /** The selector for the host element of a `MatStep` instance. */\n static hostSelector = '.mat-stepper-previous';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatStepperPreviousHarness`\n * that meets certain criteria.\n * @param options Options for filtering which steps are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(\n options: StepperButtonHarnessFilters = {},\n ): HarnessPredicate<MatStepperPreviousHarness> {\n return new HarnessPredicate(MatStepperPreviousHarness, options).addOption(\n 'text',\n options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text),\n );\n }\n}\n"],"names":["MatStepHarness","ContentContainerComponentHarness","hostSelector","with","options","HarnessPredicate","addOption","label","harness","stringMatches","getLabel","selected","isSelected","completed","isCompleted","invalid","hasErrors","locatorFor","text","getAriaLabel","host","getAttribute","getAriaLabelledby","state","_getIconState","isOptional","optionalNode","locatorForOptional","select","click","getRootHarnessLoader","contentId","documentRootLocatorFactory","harnessLoaderFor","icon","classes","match","Error","StepperOrientation","MatStepperHarness","ComponentHarness","orientation","getOrientation","getSteps","filter","locatorForAll","hasClass","HORIZONTAL","VERTICAL","selectStep","steps","length","JSON","stringify","StepperButtonHarness","getText","MatStepperNextHarness","MatStepperPreviousHarness"],"mappings":";;AAgBM,MAAOA,cAAe,SAAQC,gCAAwC,CAAA;EAE1E,OAAOC,YAAY,GAAG,kBAAkB;AAQxC,EAAA,OAAOC,IAAIA,CAACC,OAAA,GAA8B,EAAE,EAAA;IAC1C,OAAO,IAAIC,gBAAgB,CAACL,cAAc,EAAEI,OAAO,CAAA,CAChDE,SAAS,CAAC,OAAO,EAAEF,OAAO,CAACG,KAAK,EAAE,CAACC,OAAO,EAAED,KAAK,KAChDF,gBAAgB,CAACI,aAAa,CAACD,OAAO,CAACE,QAAQ,EAAE,EAAEH,KAAK,CAAC,CAAA,CAE1DD,SAAS,CACR,UAAU,EACVF,OAAO,CAACO,QAAQ,EAChB,OAAOH,OAAO,EAAEG,QAAQ,KAAK,CAAC,MAAMH,OAAO,CAACI,UAAU,EAAE,MAAMD,QAAQ,CAAA,CAEvEL,SAAS,CACR,WAAW,EACXF,OAAO,CAACS,SAAS,EACjB,OAAOL,OAAO,EAAEK,SAAS,KAAK,CAAC,MAAML,OAAO,CAACM,WAAW,EAAE,MAAMD,SAAS,CAAA,CAE1EP,SAAS,CACR,SAAS,EACTF,OAAO,CAACW,OAAO,EACf,OAAOP,OAAO,EAAEO,OAAO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,OAAO,CAACc,IAAI,EACZ,CAACV,OAAO,EAAEU,IAAI,KAAKb,gBAAgB,CAACI,aAAa,CAACD,OAAO,CAAC+C,OAAO,EAAE,EAAErC,IAAI,CAAC,CAC3E;AACH;;AAII,MAAOuC,yBAA0B,SAAQH,oBAAoB,CAAA;EAEjE,OAAOpD,YAAY,GAAG,uBAAuB;AAQ7C,EAAA,OAAOC,IAAIA,CACTC,OAAA,GAAuC,EAAE,EAAA;AAEzC,IAAA,OAAO,IAAIC,gBAAgB,CAACoD,yBAAyB,EAAErD,OAAO,CAAC,CAACE,SAAS,CACvE,MAAM,EACNF,OAAO,CAACc,IAAI,EACZ,CAACV,OAAO,EAAEU,IAAI,KAAKb,gBAAgB,CAACI,aAAa,CAACD,OAAO,CAAC+C,OAAO,EAAE,EAAErC,IAAI,CAAC,CAC3E;AACH;;;;;"}
|
package/fesm2022/stepper.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import '@angular/cdk/layout';
|
|
|
24
24
|
class MatStepLabel extends CdkStepLabel {
|
|
25
25
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
26
26
|
minVersion: "12.0.0",
|
|
27
|
-
version: "
|
|
27
|
+
version: "21.0.0",
|
|
28
28
|
ngImport: i0,
|
|
29
29
|
type: MatStepLabel,
|
|
30
30
|
deps: null,
|
|
@@ -32,7 +32,7 @@ class MatStepLabel extends CdkStepLabel {
|
|
|
32
32
|
});
|
|
33
33
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
34
34
|
minVersion: "14.0.0",
|
|
35
|
-
version: "
|
|
35
|
+
version: "21.0.0",
|
|
36
36
|
type: MatStepLabel,
|
|
37
37
|
isStandalone: true,
|
|
38
38
|
selector: "[matStepLabel]",
|
|
@@ -42,7 +42,7 @@ class MatStepLabel extends CdkStepLabel {
|
|
|
42
42
|
}
|
|
43
43
|
i0.ɵɵngDeclareClassMetadata({
|
|
44
44
|
minVersion: "12.0.0",
|
|
45
|
-
version: "
|
|
45
|
+
version: "21.0.0",
|
|
46
46
|
ngImport: i0,
|
|
47
47
|
type: MatStepLabel,
|
|
48
48
|
decorators: [{
|
|
@@ -60,7 +60,7 @@ class MatStepperIntl {
|
|
|
60
60
|
editableLabel = 'Editable';
|
|
61
61
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
62
62
|
minVersion: "12.0.0",
|
|
63
|
-
version: "
|
|
63
|
+
version: "21.0.0",
|
|
64
64
|
ngImport: i0,
|
|
65
65
|
type: MatStepperIntl,
|
|
66
66
|
deps: [],
|
|
@@ -68,7 +68,7 @@ class MatStepperIntl {
|
|
|
68
68
|
});
|
|
69
69
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
70
70
|
minVersion: "12.0.0",
|
|
71
|
-
version: "
|
|
71
|
+
version: "21.0.0",
|
|
72
72
|
ngImport: i0,
|
|
73
73
|
type: MatStepperIntl,
|
|
74
74
|
providedIn: 'root'
|
|
@@ -76,7 +76,7 @@ class MatStepperIntl {
|
|
|
76
76
|
}
|
|
77
77
|
i0.ɵɵngDeclareClassMetadata({
|
|
78
78
|
minVersion: "12.0.0",
|
|
79
|
-
version: "
|
|
79
|
+
version: "21.0.0",
|
|
80
80
|
ngImport: i0,
|
|
81
81
|
type: MatStepperIntl,
|
|
82
82
|
decorators: [{
|
|
@@ -155,7 +155,7 @@ class MatStepHeader extends CdkStepHeader {
|
|
|
155
155
|
}
|
|
156
156
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
157
157
|
minVersion: "12.0.0",
|
|
158
|
-
version: "
|
|
158
|
+
version: "21.0.0",
|
|
159
159
|
ngImport: i0,
|
|
160
160
|
type: MatStepHeader,
|
|
161
161
|
deps: [],
|
|
@@ -163,7 +163,7 @@ class MatStepHeader extends CdkStepHeader {
|
|
|
163
163
|
});
|
|
164
164
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
165
165
|
minVersion: "17.0.0",
|
|
166
|
-
version: "
|
|
166
|
+
version: "21.0.0",
|
|
167
167
|
type: MatStepHeader,
|
|
168
168
|
isStandalone: true,
|
|
169
169
|
selector: "mat-step-header",
|
|
@@ -217,7 +217,7 @@ class MatStepHeader extends CdkStepHeader {
|
|
|
217
217
|
}
|
|
218
218
|
i0.ɵɵngDeclareClassMetadata({
|
|
219
219
|
minVersion: "12.0.0",
|
|
220
|
-
version: "
|
|
220
|
+
version: "21.0.0",
|
|
221
221
|
ngImport: i0,
|
|
222
222
|
type: MatStepHeader,
|
|
223
223
|
decorators: [{
|
|
@@ -278,7 +278,7 @@ class MatStepperIcon {
|
|
|
278
278
|
constructor() {}
|
|
279
279
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
280
280
|
minVersion: "12.0.0",
|
|
281
|
-
version: "
|
|
281
|
+
version: "21.0.0",
|
|
282
282
|
ngImport: i0,
|
|
283
283
|
type: MatStepperIcon,
|
|
284
284
|
deps: [],
|
|
@@ -286,7 +286,7 @@ class MatStepperIcon {
|
|
|
286
286
|
});
|
|
287
287
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
288
288
|
minVersion: "14.0.0",
|
|
289
|
-
version: "
|
|
289
|
+
version: "21.0.0",
|
|
290
290
|
type: MatStepperIcon,
|
|
291
291
|
isStandalone: true,
|
|
292
292
|
selector: "ng-template[matStepperIcon]",
|
|
@@ -298,7 +298,7 @@ class MatStepperIcon {
|
|
|
298
298
|
}
|
|
299
299
|
i0.ɵɵngDeclareClassMetadata({
|
|
300
300
|
minVersion: "12.0.0",
|
|
301
|
-
version: "
|
|
301
|
+
version: "21.0.0",
|
|
302
302
|
ngImport: i0,
|
|
303
303
|
type: MatStepperIcon,
|
|
304
304
|
decorators: [{
|
|
@@ -321,7 +321,7 @@ class MatStepContent {
|
|
|
321
321
|
constructor() {}
|
|
322
322
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
323
323
|
minVersion: "12.0.0",
|
|
324
|
-
version: "
|
|
324
|
+
version: "21.0.0",
|
|
325
325
|
ngImport: i0,
|
|
326
326
|
type: MatStepContent,
|
|
327
327
|
deps: [],
|
|
@@ -329,7 +329,7 @@ class MatStepContent {
|
|
|
329
329
|
});
|
|
330
330
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
331
331
|
minVersion: "14.0.0",
|
|
332
|
-
version: "
|
|
332
|
+
version: "21.0.0",
|
|
333
333
|
type: MatStepContent,
|
|
334
334
|
isStandalone: true,
|
|
335
335
|
selector: "ng-template[matStepContent]",
|
|
@@ -338,7 +338,7 @@ class MatStepContent {
|
|
|
338
338
|
}
|
|
339
339
|
i0.ɵɵngDeclareClassMetadata({
|
|
340
340
|
minVersion: "12.0.0",
|
|
341
|
-
version: "
|
|
341
|
+
version: "21.0.0",
|
|
342
342
|
ngImport: i0,
|
|
343
343
|
type: MatStepContent,
|
|
344
344
|
decorators: [{
|
|
@@ -379,7 +379,7 @@ class MatStep extends CdkStep {
|
|
|
379
379
|
}
|
|
380
380
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
381
381
|
minVersion: "12.0.0",
|
|
382
|
-
version: "
|
|
382
|
+
version: "21.0.0",
|
|
383
383
|
ngImport: i0,
|
|
384
384
|
type: MatStep,
|
|
385
385
|
deps: null,
|
|
@@ -387,7 +387,7 @@ class MatStep extends CdkStep {
|
|
|
387
387
|
});
|
|
388
388
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
389
389
|
minVersion: "14.0.0",
|
|
390
|
-
version: "
|
|
390
|
+
version: "21.0.0",
|
|
391
391
|
type: MatStep,
|
|
392
392
|
isStandalone: true,
|
|
393
393
|
selector: "mat-step",
|
|
@@ -435,7 +435,7 @@ class MatStep extends CdkStep {
|
|
|
435
435
|
}
|
|
436
436
|
i0.ɵɵngDeclareClassMetadata({
|
|
437
437
|
minVersion: "12.0.0",
|
|
438
|
-
version: "
|
|
438
|
+
version: "21.0.0",
|
|
439
439
|
ngImport: i0,
|
|
440
440
|
type: MatStep,
|
|
441
441
|
decorators: [{
|
|
@@ -576,7 +576,7 @@ class MatStepper extends CdkStepper {
|
|
|
576
576
|
}
|
|
577
577
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
578
578
|
minVersion: "12.0.0",
|
|
579
|
-
version: "
|
|
579
|
+
version: "21.0.0",
|
|
580
580
|
ngImport: i0,
|
|
581
581
|
type: MatStepper,
|
|
582
582
|
deps: [],
|
|
@@ -584,7 +584,7 @@ class MatStepper extends CdkStepper {
|
|
|
584
584
|
});
|
|
585
585
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
586
586
|
minVersion: "17.0.0",
|
|
587
|
-
version: "
|
|
587
|
+
version: "21.0.0",
|
|
588
588
|
type: MatStepper,
|
|
589
589
|
isStandalone: true,
|
|
590
590
|
selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]",
|
|
@@ -653,7 +653,7 @@ class MatStepper extends CdkStepper {
|
|
|
653
653
|
}
|
|
654
654
|
i0.ɵɵngDeclareClassMetadata({
|
|
655
655
|
minVersion: "12.0.0",
|
|
656
|
-
version: "
|
|
656
|
+
version: "21.0.0",
|
|
657
657
|
ngImport: i0,
|
|
658
658
|
type: MatStepper,
|
|
659
659
|
decorators: [{
|
|
@@ -727,7 +727,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
727
727
|
class MatStepperNext extends CdkStepperNext {
|
|
728
728
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
729
729
|
minVersion: "12.0.0",
|
|
730
|
-
version: "
|
|
730
|
+
version: "21.0.0",
|
|
731
731
|
ngImport: i0,
|
|
732
732
|
type: MatStepperNext,
|
|
733
733
|
deps: null,
|
|
@@ -735,7 +735,7 @@ class MatStepperNext extends CdkStepperNext {
|
|
|
735
735
|
});
|
|
736
736
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
737
737
|
minVersion: "14.0.0",
|
|
738
|
-
version: "
|
|
738
|
+
version: "21.0.0",
|
|
739
739
|
type: MatStepperNext,
|
|
740
740
|
isStandalone: true,
|
|
741
741
|
selector: "button[matStepperNext]",
|
|
@@ -751,7 +751,7 @@ class MatStepperNext extends CdkStepperNext {
|
|
|
751
751
|
}
|
|
752
752
|
i0.ɵɵngDeclareClassMetadata({
|
|
753
753
|
minVersion: "12.0.0",
|
|
754
|
-
version: "
|
|
754
|
+
version: "21.0.0",
|
|
755
755
|
ngImport: i0,
|
|
756
756
|
type: MatStepperNext,
|
|
757
757
|
decorators: [{
|
|
@@ -768,7 +768,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
768
768
|
class MatStepperPrevious extends CdkStepperPrevious {
|
|
769
769
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
770
770
|
minVersion: "12.0.0",
|
|
771
|
-
version: "
|
|
771
|
+
version: "21.0.0",
|
|
772
772
|
ngImport: i0,
|
|
773
773
|
type: MatStepperPrevious,
|
|
774
774
|
deps: null,
|
|
@@ -776,7 +776,7 @@ class MatStepperPrevious extends CdkStepperPrevious {
|
|
|
776
776
|
});
|
|
777
777
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
778
778
|
minVersion: "14.0.0",
|
|
779
|
-
version: "
|
|
779
|
+
version: "21.0.0",
|
|
780
780
|
type: MatStepperPrevious,
|
|
781
781
|
isStandalone: true,
|
|
782
782
|
selector: "button[matStepperPrevious]",
|
|
@@ -792,7 +792,7 @@ class MatStepperPrevious extends CdkStepperPrevious {
|
|
|
792
792
|
}
|
|
793
793
|
i0.ɵɵngDeclareClassMetadata({
|
|
794
794
|
minVersion: "12.0.0",
|
|
795
|
-
version: "
|
|
795
|
+
version: "21.0.0",
|
|
796
796
|
ngImport: i0,
|
|
797
797
|
type: MatStepperPrevious,
|
|
798
798
|
decorators: [{
|
|
@@ -810,7 +810,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
810
810
|
class MatStepperModule {
|
|
811
811
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
812
812
|
minVersion: "12.0.0",
|
|
813
|
-
version: "
|
|
813
|
+
version: "21.0.0",
|
|
814
814
|
ngImport: i0,
|
|
815
815
|
type: MatStepperModule,
|
|
816
816
|
deps: [],
|
|
@@ -818,7 +818,7 @@ class MatStepperModule {
|
|
|
818
818
|
});
|
|
819
819
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
820
820
|
minVersion: "14.0.0",
|
|
821
|
-
version: "
|
|
821
|
+
version: "21.0.0",
|
|
822
822
|
ngImport: i0,
|
|
823
823
|
type: MatStepperModule,
|
|
824
824
|
imports: [PortalModule, CdkStepperModule, MatIconModule, MatRippleModule, MatStep, MatStepLabel, MatStepper, MatStepperNext, MatStepperPrevious, MatStepHeader, MatStepperIcon, MatStepContent],
|
|
@@ -826,7 +826,7 @@ class MatStepperModule {
|
|
|
826
826
|
});
|
|
827
827
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
828
828
|
minVersion: "12.0.0",
|
|
829
|
-
version: "
|
|
829
|
+
version: "21.0.0",
|
|
830
830
|
ngImport: i0,
|
|
831
831
|
type: MatStepperModule,
|
|
832
832
|
providers: [ErrorStateMatcher],
|
|
@@ -835,7 +835,7 @@ class MatStepperModule {
|
|
|
835
835
|
}
|
|
836
836
|
i0.ɵɵngDeclareClassMetadata({
|
|
837
837
|
minVersion: "12.0.0",
|
|
838
|
-
version: "
|
|
838
|
+
version: "21.0.0",
|
|
839
839
|
ngImport: i0,
|
|
840
840
|
type: MatStepperModule,
|
|
841
841
|
decorators: [{
|