### File

`packages/components/eui-dialog/services/eui-dialog.service.ts`

### Description

Service for programmatically creating and managing modal dialog windows. Provides centralized dialog lifecycle management including opening, closing, and tracking multiple dialogs. Built on Angular CDK Overlay for positioning, backdrop, and scroll blocking. Supports custom header, body, and footer components with dependency injection for parent component providers. Manages dialog stack with automatic z-index handling for multiple simultaneous dialogs. Provides button state control methods for default dialog footer actions. Injected at root level for application-wide dialog management.

### Index

###### Methods
Public closeAllDialogs Public closeDialog Public disableAcceptButton Public disableDismissButton Public enableAcceptButton Public enableDismissButton Public getDialog Public getOpenedDialog Public openDialog

### Methods

Public closeAllDialogs
`closeAllDialogs()`
Close all the dialogs. Returns : `void`

Public closeDialog
`closeDialog(dialogId?: string)`
Close a dialog Parameters :
Name | Type | Optional | Description
dialogId | `string` | Yes | The id of the dialog to close. If not provided the last opened one will be closed.
Returns : `void`

Public disableAcceptButton
`disableAcceptButton()`
Disable Accept button of default eui-dialog footer. Returns : `void`

Public disableDismissButton
`disableDismissButton()`
Disable Dismiss button of default eui-dialog footer. Returns : `void`

Public enableAcceptButton
`enableAcceptButton()`
Enable Accept button of default eui-dialog footer. Returns : `void`

Public enableDismissButton
`enableDismissButton()`
Enable Dismiss button of default eui-dialog footer. Returns : `void`

Public getDialog
`getDialog(dialogId: string)`
Returns an `Object` with a dialog Parameters :
Name | Type | Optional | Description
dialogId | `string` | No | id of the dialog to be returned
Returns : `OpenedDialog` `OpenedDialog`

Public getOpenedDialog
`getOpenedDialog()`
Returns an `Observable` with all opened windows. Returns : `Observable<OpenedDialog[]>` `Observable` of `OpenedDialog[]`.

Public openDialog
`openDialog(config: EuiDialogInterface<HC | HCC | BC | BCC | FC | FCC>, parentInjector?: Injector)`
Type parameters : HC HCC BC BCC FC FCC
Open a dialog. Parameters :
Name | Type | Optional | Default value | Description
config | `EuiDialogInterface<HC | HCC | BC | BCC | FC | FCC>` | No | `{}` | Configuration applied to the dialog.
parentInjector | `Injector` | Yes |  | The injector of the calling component, used to expose its local providers to the dynamically created component.
Returns : `OpenedDialog` A dialog object of type `OpenedDialog`

# results matching ""

# No results matching ""