From 4d5c95501869578c338865ea395f796ee8b7899c Mon Sep 17 00:00:00 2001 From: Will Martin Date: Fri, 15 Dec 2023 11:22:19 -0500 Subject: [PATCH] [CL-152] undeprecate openSimpleDialogRef (#7232) --- libs/components/src/dialog/dialog.service.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libs/components/src/dialog/dialog.service.ts b/libs/components/src/dialog/dialog.service.ts index 4ebd65ad55..9488da4ac6 100644 --- a/libs/components/src/dialog/dialog.service.ts +++ b/libs/components/src/dialog/dialog.service.ts @@ -86,10 +86,7 @@ export class DialogService extends Dialog implements OnDestroy { * @returns `boolean` - True if the user accepted the dialog, false otherwise. */ async openSimpleDialog(simpleDialogOptions: SimpleDialogOptions): Promise { - const dialogRef = this.open(SimpleConfigurableDialogComponent, { - data: simpleDialogOptions, - disableClose: simpleDialogOptions.disableClose, - }); + const dialogRef = this.openSimpleDialogRef(simpleDialogOptions); return firstValueFrom(dialogRef.closed); } @@ -97,16 +94,15 @@ export class DialogService extends Dialog implements OnDestroy { /** * Opens a simple dialog. * - * @deprecated Use `openSimpleDialog` instead. If you find a use case for the `dialogRef` - * please let #wg-component-library know and we can un-deprecate this method. + * You should probably use `openSimpleDialog` instead, unless you need to programmatically close the dialog. * * @param {SimpleDialogOptions} simpleDialogOptions - An object containing options for the dialog. * @returns `DialogRef` - The reference to the opened dialog. * Contains a closed observable which can be subscribed to for determining which button * a user pressed */ - openSimpleDialogRef(simpleDialogOptions: SimpleDialogOptions): DialogRef { - return this.open(SimpleConfigurableDialogComponent, { + openSimpleDialogRef(simpleDialogOptions: SimpleDialogOptions): DialogRef { + return this.open(SimpleConfigurableDialogComponent, { data: simpleDialogOptions, disableClose: simpleDialogOptions.disableClose, });