|
@@ -36,15 +36,15 @@ let lastDialogId: string | null = null;
|
|
|
|
|
|
/** Creates and manages a modal dialog element */
|
|
/** Creates and manages a modal dialog element */
|
|
export class BytmDialog extends NanoEmitter<{
|
|
export class BytmDialog extends NanoEmitter<{
|
|
- /** Emitted just after the dialog is closed */
|
|
|
|
|
|
+ /** Emitted just **after** the dialog is closed */
|
|
close: () => void;
|
|
close: () => void;
|
|
- /** Emitted just after the dialog is opened */
|
|
|
|
|
|
+ /** Emitted just **after** the dialog is opened */
|
|
open: () => void;
|
|
open: () => void;
|
|
- /** Emitted just after the dialog contents are rendered */
|
|
|
|
|
|
+ /** Emitted just **after** the dialog contents are rendered */
|
|
render: () => void;
|
|
render: () => void;
|
|
- /** Emitted just after the dialog contents are cleared */
|
|
|
|
|
|
+ /** Emitted just **after** the dialog contents are cleared */
|
|
clear: () => void;
|
|
clear: () => void;
|
|
- /** Emitted just before the dialog is destroyed and all listeners are removed */
|
|
|
|
|
|
+ /** Emitted just **after** the dialog is destroyed and **before** all listeners are removed */
|
|
destroy: () => void;
|
|
destroy: () => void;
|
|
}> {
|
|
}> {
|
|
public readonly options;
|
|
public readonly options;
|
|
@@ -201,8 +201,8 @@ export class BytmDialog extends NanoEmitter<{
|
|
|
|
|
|
/** Clears the DOM of the dialog and removes all event listeners */
|
|
/** Clears the DOM of the dialog and removes all event listeners */
|
|
public destroy() {
|
|
public destroy() {
|
|
- this.events.emit("destroy");
|
|
|
|
this.unmount();
|
|
this.unmount();
|
|
|
|
+ this.events.emit("destroy");
|
|
this.unsubscribeAll();
|
|
this.unsubscribeAll();
|
|
}
|
|
}
|
|
|
|
|