@angular/material 21.0.0-next.0 → 21.0.0-next.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/_index.scss +1 -1
- package/autocomplete/index.d.ts +1 -23
- package/bottom-sheet/index.d.ts +1 -10
- package/button/index.d.ts +1 -7
- package/button-toggle/index.d.ts +1 -1
- package/button-toggle.d.d.ts +1 -7
- package/checkbox/index.d.ts +1 -7
- package/chips/_m3-chip.scss +5 -2
- package/chips/index.d.ts +19 -18
- package/core/index.d.ts +1 -1
- package/core/tokens/_classes.scss +40 -38
- package/date-adapter.d.d.ts +1 -7
- package/datepicker/index.d.ts +2 -55
- package/dialog/index.d.ts +1 -23
- package/expansion/index.d.ts +1 -36
- package/fesm2022/animation.mjs.map +1 -1
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +17 -45
- 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 +11 -92
- 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 +15 -23
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +19 -27
- 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 +17 -26
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +123 -111
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/common-module.mjs +4 -4
- package/fesm2022/common-module.mjs.map +1 -1
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +12 -13
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/date-formats.mjs +2 -10
- package/fesm2022/date-formats.mjs.map +1 -1
- package/fesm2022/date-range-input-harness.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +109 -260
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +5 -5
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +882 -114
- 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/error-options.mjs +6 -6
- package/fesm2022/error-options.mjs.map +1 -1
- package/fesm2022/error-state.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +26 -128
- 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 +37 -49
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/form-field2.mjs +30 -30
- package/fesm2022/form-field2.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 +7 -7
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon-button.mjs +6 -6
- package/fesm2022/icon-button.mjs.map +1 -1
- package/fesm2022/icon-registry.mjs +5 -32
- package/fesm2022/icon-registry.mjs.map +1 -1
- package/fesm2022/icon.mjs +18 -24
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input-harness.mjs.map +1 -1
- package/fesm2022/input-value-accessor.mjs.map +1 -1
- package/fesm2022/input.mjs +8 -8
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/internal-form-field.mjs +3 -3
- package/fesm2022/internal-form-field.mjs.map +1 -1
- package/fesm2022/line.mjs +7 -7
- package/fesm2022/line.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 +26 -173
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/option-harness.mjs.map +1 -1
- package/fesm2022/option-module.mjs +4 -4
- package/fesm2022/option-module.mjs.map +1 -1
- package/fesm2022/option.mjs +6 -6
- package/fesm2022/option.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +18 -37
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +20 -23
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +9 -17
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox-module.mjs +4 -4
- package/fesm2022/pseudo-checkbox-module.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox.mjs +3 -3
- package/fesm2022/pseudo-checkbox.mjs.map +1 -1
- package/fesm2022/public-api.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +14 -22
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/ripple-loader.mjs +3 -3
- package/fesm2022/ripple-loader.mjs.map +1 -1
- package/fesm2022/ripple-module.mjs +4 -4
- package/fesm2022/ripple-module.mjs.map +1 -1
- package/fesm2022/ripple.mjs +8 -8
- package/fesm2022/ripple.mjs.map +1 -1
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select.mjs +1293 -90
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +24 -110
- 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 +24 -102
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +20 -344
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +34 -201
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/structural-styles.mjs +3 -3
- package/fesm2022/structural-styles.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 +51 -196
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +13 -13
- 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 +21 -52
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/{tooltip-module.mjs → tooltip2.mjs} +17 -60
- package/fesm2022/tooltip2.mjs.map +1 -0
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -25
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/index.d.ts +1 -11
- package/icon/index.d.ts +2 -2
- package/icon-module.d.d.ts +1 -7
- package/icon-registry.d.d.ts +2 -18
- package/menu/index.d.ts +1 -42
- package/package.json +2 -2
- package/paginator/index.d.ts +3 -3
- package/paginator.d.d.ts +2 -18
- package/progress-bar/index.d.ts +1 -7
- package/progress-spinner/index.d.ts +1 -1
- package/progress-spinner.d.d.ts +3 -9
- package/radio/index.d.ts +1 -7
- package/ripple.d.d.ts +3 -3
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/index_bundled.js +7 -3
- package/schematics/ng-update/index_bundled.js.map +1 -1
- package/select/index.d.ts +439 -27
- package/sidenav/index.d.ts +1 -17
- package/snack-bar/index.d.ts +1 -17
- package/sort/index.d.ts +2 -33
- package/stepper/index.d.ts +2 -29
- package/tabs/index.d.ts +1 -18
- package/tooltip/index.d.ts +302 -16
- package/fesm2022/dialog-module.mjs +0 -891
- package/fesm2022/dialog-module.mjs.map +0 -1
- package/fesm2022/form-field-module.mjs +0 -39
- package/fesm2022/form-field-module.mjs.map +0 -1
- package/fesm2022/select-module.mjs +0 -1318
- package/fesm2022/select-module.mjs.map +0 -1
- package/fesm2022/tooltip-module.mjs.map +0 -1
- package/select-module.d.d.ts +0 -456
- package/tooltip-module.d.d.ts +0 -329
|
@@ -2,18 +2,18 @@ import { ContentContainerComponentHarness, HarnessPredicate, TestKey } from '@an
|
|
|
2
2
|
import { __decorate, __metadata } from 'tslib';
|
|
3
3
|
import { inject, NgZone, Component, ChangeDetectionStrategy, ViewEncapsulation, NgModule } from '@angular/core';
|
|
4
4
|
import { MATERIAL_ANIMATIONS } from '@angular/material/core';
|
|
5
|
-
import { MatDialog, MatDialogModule } from '../dialog
|
|
6
|
-
import '@angular/cdk/
|
|
5
|
+
import { MatDialog, MatDialogModule } from '../dialog.mjs';
|
|
6
|
+
import '@angular/cdk/a11y';
|
|
7
|
+
import '@angular/cdk/scrolling';
|
|
7
8
|
import '@angular/cdk/overlay';
|
|
8
|
-
import '@angular/cdk/
|
|
9
|
+
import '@angular/cdk/dialog';
|
|
9
10
|
import '@angular/cdk/coercion';
|
|
11
|
+
import '@angular/cdk/portal';
|
|
10
12
|
import '../animation.mjs';
|
|
11
13
|
import '@angular/cdk/layout';
|
|
12
14
|
import 'rxjs';
|
|
13
15
|
import 'rxjs/operators';
|
|
14
16
|
import '@angular/cdk/keycodes';
|
|
15
|
-
import '@angular/cdk/a11y';
|
|
16
|
-
import '@angular/cdk/scrolling';
|
|
17
17
|
import '../common-module.mjs';
|
|
18
18
|
import '@angular/cdk/bidi';
|
|
19
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/material/dialog/testing/dialog-harness.ts","../../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/material/dialog/testing/dialog-opener.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 ComponentHarnessConstructor,\n ContentContainerComponentHarness,\n HarnessPredicate,\n TestKey,\n} from '@angular/cdk/testing';\nimport {DialogHarnessFilters} from './dialog-harness-filters';\nimport {DialogRole} from '../../dialog';\n\n/** Selectors for different sections of the mat-dialog that can contain user content. */\nexport enum MatDialogSection {\n TITLE = '.mat-mdc-dialog-title',\n CONTENT = '.mat-mdc-dialog-content',\n ACTIONS = '.mat-mdc-dialog-actions',\n}\n\n/** Harness for interacting with a standard `MatDialog` in tests. */\nexport class MatDialogHarness\n // @breaking-change 14.0.0 change generic type to MatDialogSection.\n extends ContentContainerComponentHarness<MatDialogSection | string>\n{\n /** The selector for the host element of a `MatDialog` instance. */\n static hostSelector = '.mat-mdc-dialog-container';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a dialog with specific attributes.\n * @param options Options for filtering which dialog instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatDialogHarness>(\n this: ComponentHarnessConstructor<T>,\n options: DialogHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options);\n }\n\n protected _title = this.locatorForOptional(MatDialogSection.TITLE);\n protected _content = this.locatorForOptional(MatDialogSection.CONTENT);\n protected _actions = this.locatorForOptional(MatDialogSection.ACTIONS);\n\n /** Gets the id of the dialog. */\n async getId(): Promise<string | null> {\n const id = await (await this.host()).getAttribute('id');\n // In case no id has been specified, the \"id\" property always returns\n // an empty string. To make this method more explicit, we return null.\n return id !== '' ? id : null;\n }\n\n /** Gets the role of the dialog. */\n async getRole(): Promise<DialogRole | null> {\n return (await this.host()).getAttribute('role') as Promise<DialogRole | null>;\n }\n\n /** Gets the value of the dialog's \"aria-label\" attribute. */\n async getAriaLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** Gets the value of the dialog's \"aria-labelledby\" attribute. */\n async getAriaLabelledby(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-labelledby');\n }\n\n /** Gets the value of the dialog's \"aria-describedby\" attribute. */\n async getAriaDescribedby(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-describedby');\n }\n\n /**\n * Closes the dialog by pressing escape.\n *\n * Note: this method does nothing if `disableClose` has been set to `true` for the dialog.\n */\n async close(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.ESCAPE);\n }\n\n /** Gets the dialog's text. */\n async getText() {\n return (await this.host()).text();\n }\n\n /** Gets the dialog's title text. This only works if the dialog is using mat-dialog-title. */\n async getTitleText() {\n return (await this._title())?.text() ?? '';\n }\n\n /** Gets the dialog's content text. This only works if the dialog is using mat-dialog-content. */\n async getContentText() {\n return (await this._content())?.text() ?? '';\n }\n\n /** Gets the dialog's actions text. This only works if the dialog is using mat-dialog-actions. */\n async getActionsText() {\n return (await this._actions())?.text() ?? '';\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 {ComponentType} from '@angular/cdk/overlay';\nimport {\n ChangeDetectionStrategy,\n Component,\n NgModule,\n NgZone,\n OnDestroy,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport {MatDialog, MatDialogConfig, MatDialogModule, MatDialogRef} from '../../dialog';\nimport {Subscription} from 'rxjs';\nimport {AnimationsConfig, MATERIAL_ANIMATIONS} from '@angular/material/core';\n\n/** Test component that immediately opens a dialog when bootstrapped. */\n@Component({\n selector: 'mat-test-dialog-opener',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatTestDialogOpener<T = unknown, R = unknown> implements OnDestroy {\n dialog = inject(MatDialog);\n\n /** Component that should be opened with the MatDialog `open` method. */\n protected static component: ComponentType<unknown> | undefined;\n\n /** Config that should be provided to the MatDialog `open` method. */\n protected static config: MatDialogConfig | undefined;\n\n /** MatDialogRef returned from the MatDialog `open` method. */\n dialogRef: MatDialogRef<T, R>;\n\n /** Data passed to the `MatDialog` close method. */\n closedResult: R | undefined;\n\n private readonly _afterClosedSubscription: Subscription;\n\n private readonly _ngZone = inject(NgZone);\n\n /** Static method that prepares this class to open the provided component. */\n static withComponent<T = unknown, R = unknown>(\n component: ComponentType<T>,\n config?: MatDialogConfig,\n ) {\n MatTestDialogOpener.component = component;\n MatTestDialogOpener.config = config;\n return MatTestDialogOpener as ComponentType<MatTestDialogOpener<T, R>>;\n }\n\n constructor(...args: unknown[]);\n\n constructor() {\n if (!MatTestDialogOpener.component) {\n throw new Error(`MatTestDialogOpener does not have a component provided.`);\n }\n\n this.dialogRef = this._ngZone.run(() => {\n const config = {...(MatTestDialogOpener.config || {})};\n config.enterAnimationDuration = 0;\n config.exitAnimationDuration = 0;\n return this.dialog.open<T, R>(MatTestDialogOpener.component as ComponentType<T>, config);\n });\n this._afterClosedSubscription = this.dialogRef.afterClosed().subscribe(result => {\n this.closedResult = result;\n });\n }\n\n ngOnDestroy() {\n this._afterClosedSubscription.unsubscribe();\n MatTestDialogOpener.component = undefined;\n MatTestDialogOpener.config = undefined;\n }\n}\n\n@NgModule({\n imports: [MatDialogModule, MatTestDialogOpener],\n providers: [\n {\n provide: MATERIAL_ANIMATIONS,\n useValue: {\n animationsDisabled: true,\n } as AnimationsConfig,\n },\n ],\n})\nexport class MatTestDialogOpenerModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA;IACY;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,uBAA+B;AAC/B,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,yBAAmC;AACnC,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,yBAAmC;AACrC,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,GAI3B,EAAA,CAAA,CAAA;AAED;MACa;AACX;AACA,SAAQ,gCAA2D,CAAA;;AAGnE,IAAA,OAAO,YAAY,GAAG,2BAA2B;AAEjD;;;;AAIG;AACH,IAAA,OAAO,IAAI,CAET,OAAA,GAAgC,EAAE,EAAA;AAElC,QAAA,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC;;IAGlC,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,KAAK,CAAC;IACxD,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,OAAO,CAAC;IAC5D,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,OAAO,CAAC;;AAGtE,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC;;;QAGvD,OAAO,EAAE,KAAK,EAAE,GAAG,EA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;AAClC,QAAA,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;QAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;KACtC,CAAC;;AACW,CAAA,EAAA,mBAAmB,CAoD/B;AAaY,IAAA,yBAAyB,GAA/B,MAAM,yBAAyB,CAAA;;AAAzB,yBAAyB,GAAA,UAAA,CAAA;AAXrC,IAAA,QAAQ,CAAC;AACR,QAAA,OAAO,EAAE,CAAC,eAAe,EAAE,mBAAmB,CAAC;AAC/C,QAAA,SAAS,EAAE;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,mBAAmB;AAC5B,gBAAA,QAAQ,EAAE;AACR,oBAAA,kBAAkB,EAAE,IAAI;AACL,iBAAA;AACtB,aAAA;AACF,SAAA;KACF;AACY,CAAA,EAAA,yBAAyB,CAAG;;;;"}
|
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/dialog/testing/dialog-harness.ts","../../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/dialog/testing/dialog-opener.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 ComponentHarnessConstructor,\n ContentContainerComponentHarness,\n HarnessPredicate,\n TestKey,\n} from '@angular/cdk/testing';\nimport {DialogHarnessFilters} from './dialog-harness-filters';\nimport {DialogRole} from '../../dialog';\n\n/** Selectors for different sections of the mat-dialog that can contain user content. */\nexport enum MatDialogSection {\n TITLE = '.mat-mdc-dialog-title',\n CONTENT = '.mat-mdc-dialog-content',\n ACTIONS = '.mat-mdc-dialog-actions',\n}\n\n/** Harness for interacting with a standard `MatDialog` in tests. */\nexport class MatDialogHarness\n // @breaking-change 14.0.0 change generic type to MatDialogSection.\n extends ContentContainerComponentHarness<MatDialogSection | string>\n{\n /** The selector for the host element of a `MatDialog` instance. */\n static hostSelector = '.mat-mdc-dialog-container';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a dialog with specific attributes.\n * @param options Options for filtering which dialog instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatDialogHarness>(\n this: ComponentHarnessConstructor<T>,\n options: DialogHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options);\n }\n\n protected _title = this.locatorForOptional(MatDialogSection.TITLE);\n protected _content = this.locatorForOptional(MatDialogSection.CONTENT);\n protected _actions = this.locatorForOptional(MatDialogSection.ACTIONS);\n\n /** Gets the id of the dialog. */\n async getId(): Promise<string | null> {\n const id = await (await this.host()).getAttribute('id');\n // In case no id has been specified, the \"id\" property always returns\n // an empty string. To make this method more explicit, we return null.\n return id !== '' ? id : null;\n }\n\n /** Gets the role of the dialog. */\n async getRole(): Promise<DialogRole | null> {\n return (await this.host()).getAttribute('role') as Promise<DialogRole | null>;\n }\n\n /** Gets the value of the dialog's \"aria-label\" attribute. */\n async getAriaLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** Gets the value of the dialog's \"aria-labelledby\" attribute. */\n async getAriaLabelledby(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-labelledby');\n }\n\n /** Gets the value of the dialog's \"aria-describedby\" attribute. */\n async getAriaDescribedby(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-describedby');\n }\n\n /**\n * Closes the dialog by pressing escape.\n *\n * Note: this method does nothing if `disableClose` has been set to `true` for the dialog.\n */\n async close(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.ESCAPE);\n }\n\n /** Gets the dialog's text. */\n async getText() {\n return (await this.host()).text();\n }\n\n /** Gets the dialog's title text. This only works if the dialog is using mat-dialog-title. */\n async getTitleText() {\n return (await this._title())?.text() ?? '';\n }\n\n /** Gets the dialog's content text. This only works if the dialog is using mat-dialog-content. */\n async getContentText() {\n return (await this._content())?.text() ?? '';\n }\n\n /** Gets the dialog's actions text. This only works if the dialog is using mat-dialog-actions. */\n async getActionsText() {\n return (await this._actions())?.text() ?? '';\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 {ComponentType} from '@angular/cdk/overlay';\nimport {\n ChangeDetectionStrategy,\n Component,\n NgModule,\n NgZone,\n OnDestroy,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport {MatDialog, MatDialogConfig, MatDialogModule, MatDialogRef} from '../../dialog';\nimport {Subscription} from 'rxjs';\nimport {AnimationsConfig, MATERIAL_ANIMATIONS} from '@angular/material/core';\n\n/** Test component that immediately opens a dialog when bootstrapped. */\n@Component({\n selector: 'mat-test-dialog-opener',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatTestDialogOpener<T = unknown, R = unknown> implements OnDestroy {\n dialog = inject(MatDialog);\n\n /** Component that should be opened with the MatDialog `open` method. */\n protected static component: ComponentType<unknown> | undefined;\n\n /** Config that should be provided to the MatDialog `open` method. */\n protected static config: MatDialogConfig | undefined;\n\n /** MatDialogRef returned from the MatDialog `open` method. */\n dialogRef: MatDialogRef<T, R>;\n\n /** Data passed to the `MatDialog` close method. */\n closedResult: R | undefined;\n\n private readonly _afterClosedSubscription: Subscription;\n\n private readonly _ngZone = inject(NgZone);\n\n /** Static method that prepares this class to open the provided component. */\n static withComponent<T = unknown, R = unknown>(\n component: ComponentType<T>,\n config?: MatDialogConfig,\n ) {\n MatTestDialogOpener.component = component;\n MatTestDialogOpener.config = config;\n return MatTestDialogOpener as ComponentType<MatTestDialogOpener<T, R>>;\n }\n\n constructor(...args: unknown[]);\n\n constructor() {\n if (!MatTestDialogOpener.component) {\n throw new Error(`MatTestDialogOpener does not have a component provided.`);\n }\n\n this.dialogRef = this._ngZone.run(() => {\n const config = {...(MatTestDialogOpener.config || {})};\n config.enterAnimationDuration = 0;\n config.exitAnimationDuration = 0;\n return this.dialog.open<T, R>(MatTestDialogOpener.component as ComponentType<T>, config);\n });\n this._afterClosedSubscription = this.dialogRef.afterClosed().subscribe(result => {\n this.closedResult = result;\n });\n }\n\n ngOnDestroy() {\n this._afterClosedSubscription.unsubscribe();\n MatTestDialogOpener.component = undefined;\n MatTestDialogOpener.config = undefined;\n }\n}\n\n@NgModule({\n imports: [MatDialogModule, MatTestDialogOpener],\n providers: [\n {\n provide: MATERIAL_ANIMATIONS,\n useValue: {\n animationsDisabled: true,\n } as AnimationsConfig,\n },\n ],\n})\nexport class MatTestDialogOpenerModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA;IACY;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,uBAA+B;AAC/B,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,yBAAmC;AACnC,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,yBAAmC;AACrC,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,GAI3B,EAAA,CAAA,CAAA;AAED;MACa;AACX;AACA,SAAQ,gCAA2D,CAAA;;AAGnE,IAAA,OAAO,YAAY,GAAG,2BAA2B;AAEjD;;;;AAIG;AACH,IAAA,OAAO,IAAI,CAET,OAAA,GAAgC,EAAE,EAAA;AAElC,QAAA,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC;;IAGlC,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,KAAK,CAAC;IACxD,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,OAAO,CAAC;IAC5D,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,OAAO,CAAC;;AAGtE,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,IA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