Skip to content

Commit ce478f9

Browse files
committed
docs(material/dialog): add missing descriptions
Adds descriptions for public properties showing up in the API docs. DEPRECATED: `MatDialogClose#dialogRef` class member to become private.
1 parent ade0901 commit ce478f9

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/material/dialog/dialog-content-directives.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ export class MatDialogClose implements OnInit, OnChanges {
4646
@Input('matDialogClose') _matDialogClose: any;
4747

4848
constructor(
49+
50+
/**
51+
* Reference to the containing dialog.
52+
* @deprecated `dialogRef` property to become private.
53+
* @breaking-change 13.0.0
54+
*/
4955
// The dialog title directive is always used in combination with a `MatDialogRef`.
5056
// tslint:disable-next-line: lightweight-tokens
5157
@Optional() public dialogRef: MatDialogRef<any>,
@@ -93,6 +99,7 @@ export class MatDialogClose implements OnInit, OnChanges {
9399
},
94100
})
95101
export class MatDialogTitle implements OnInit {
102+
/** Unique id for the dialog title. If none is supplied, it will be auto-generated. */
96103
@Input() id: string = `mat-dialog-title-${dialogElementUid++}`;
97104

98105
constructor(

src/material/dialog/dialog-ref.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export class MatDialogRef<T, R = any> {
5454
constructor(
5555
private _overlayRef: OverlayRef,
5656
public _containerInstance: _MatDialogContainerBase,
57+
/** Id of the dialog. */
5758
readonly id: string = `mat-dialog-${uniqueId++}`) {
5859

5960
// Pass the id along to the container.

tools/public_api_guard/material/dialog.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ export declare class MatDialogClose implements OnInit, OnChanges {
8888
dialogRef: MatDialogRef<any>;
8989
dialogResult: any;
9090
type: 'submit' | 'button' | 'reset';
91-
constructor(dialogRef: MatDialogRef<any>, _elementRef: ElementRef<HTMLElement>, _dialog: MatDialog);
91+
constructor(
92+
dialogRef: MatDialogRef<any>, _elementRef: ElementRef<HTMLElement>, _dialog: MatDialog);
9293
_onButtonClick(event: MouseEvent): void;
9394
ngOnChanges(changes: SimpleChanges): void;
9495
ngOnInit(): void;
@@ -148,7 +149,8 @@ export declare class MatDialogRef<T, R = any> {
148149
componentInstance: T;
149150
disableClose: boolean | undefined;
150151
readonly id: string;
151-
constructor(_overlayRef: OverlayRef, _containerInstance: _MatDialogContainerBase, id?: string);
152+
constructor(_overlayRef: OverlayRef, _containerInstance: _MatDialogContainerBase,
153+
id?: string);
152154
addPanelClass(classes: string | string[]): this;
153155
afterClosed(): Observable<R | undefined>;
154156
afterOpened(): Observable<void>;

0 commit comments

Comments
 (0)