projects/ui-kit-lib/src/lib/v2/modals/dialog-ref.ts
Strongly-typed wrapper around CDK's DialogRef with MEF/MD container integration.
Responsibilities:
disableClose, ESC and backdrop click behavior.
Properties |
|
Methods |
constructor(_ref: DialogRef
|
||||||||||||
|
Parameters :
|
| Public _containerInstance |
Type : MDDialogContainer
|
|
Reference to the container component that hosts animations and structure. |
| componentInstance |
Type : T
|
|
Instance of the component hosted inside the dialog (if opened via component). |
| Readonly componentRef |
Type : ComponentRef<T> | null
|
|
Low-level componentRef for advanced users (null for TemplateRef opens). |
| disableClose |
Type : boolean | undefined
|
|
When true, ESC and backdrop click won't close the dialog. |
| id |
Type : string
|
|
Dialog id (auto-generated unless provided in config). |
| addPanelClass | ||||||
addPanelClass(classes: string | string[])
|
||||||
|
Adds one or more CSS classes to the overlay panel.
Parameters :
Returns :
unknown
|
| afterClosed |
afterClosed()
|
|
Stream that emits the result after the dialog is fully closed and disposed.
Returns :
Observable<R | undefined>
|
| afterOpened |
afterOpened()
|
|
Stream that emits once the dialog is fully opened (after enter animation).
Returns :
Observable<void>
|
| backdropClick |
backdropClick()
|
|
Backdrop click stream (useful for custom close logic / analytics).
Returns :
Observable<MouseEvent>
|
| beforeClosed |
beforeClosed()
|
|
Stream that emits right before the dialog starts closing with the result (if any).
Returns :
Observable<R | undefined>
|
| close | ||||||
close(dialogResult?: R)
|
||||||
|
Programmatically close the dialog with an optional result.
Respects an optional
Parameters :
Returns :
void
|
| getState |
getState()
|
|
Returns the current lifecycle state of the dialog.
Returns :
DialogState
|
| keydownEvents |
keydownEvents()
|
|
Keydown stream scoped to the dialog overlay (e.g., listen for ESC).
Returns :
Observable<KeyboardEvent>
|
| removePanelClass | ||||||
removePanelClass(classes: string | string[])
|
||||||
|
Removes one or more CSS classes from the overlay panel.
Parameters :
Returns :
unknown
|
| updatePosition | ||||||
updatePosition(position?: DialogPosition)
|
||||||
|
Updates the dialog position. If top/bottom or left/right are not provided, the dialog will be centered on that axis.
Parameters :
Returns :
unknown
|
| updateSize |
updateSize(width: string, height: string)
|
|
Updates dialog width/height (CSS length values, e.g. '600px', '80vh').
Returns :
unknown
|