Skip to content
Permalink
Browse files

fix(settings): add missing types

add missing export close #382
  • Loading branch information
StrahilKazlachev committed Sep 14, 2019
1 parent 55061cb commit 0a518f17d724632e8caa5b643074ba6fb2a41d50
Showing with 10 additions and 0 deletions.
  1. +1 −0 src/aurelia-dialog.ts
  2. +9 −0 src/dialog-settings.ts
@@ -19,6 +19,7 @@ export * from './dialog-settings';
export * from './dialog-configuration';
export * from './renderer';
export * from './dialog-cancel-error';
export * from './dialog-close-error';
export * from './dialog-result';
export * from './dialog-service';
export * from './dialog-controller';
@@ -92,6 +92,14 @@ export interface DialogSettings {
* When invoked the function is passed the dialog container and the dialog overlay elements.
*/
position?: (dialogContainer: Element, dialogOverlay?: Element) => void;

/**
* This function is called when a dialog closes to restore focus to the last
* element that was focused when the dialog opened. It can be overridden in
* general settings, or on a case by case basis by providing an override when
* a particular dialog is opened.
*/
restoreFocus?: (lastActiveElement: HTMLElement) => void;
}

/**
@@ -105,4 +113,5 @@ export class DefaultDialogSettings implements DialogSettings {
public rejectOnCancel = false;
public ignoreTransitions = false;
public position?: (dialogContainer: Element, dialogOverlay: Element) => void;
public restoreFocus = (lastActiveElement: HTMLElement) => lastActiveElement.focus();
}

0 comments on commit 0a518f1

Please sign in to comment.
You can’t perform that action at this time.