2020-10-29 18:20:42 +00:00
|
|
|
import { IModalSettings } from "./IModalSettings";
|
|
|
|
import { ITab } from './ITab';
|
|
|
|
|
|
|
|
export interface ILayout {
|
2020-10-30 18:30:59 +00:00
|
|
|
|
|
|
|
currentMousePosition: MouseEvent;
|
|
|
|
|
|
|
|
hotkeysEnabled: boolean;
|
|
|
|
|
2020-10-29 18:20:42 +00:00
|
|
|
/**
|
|
|
|
* Opens a Popup
|
|
|
|
*
|
|
|
|
* @param {IModalSettings} settings
|
|
|
|
* @return {*} {() => void}
|
|
|
|
* @memberof ILayout
|
|
|
|
*/
|
|
|
|
openPopup(settings: IModalSettings): () => void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Opens a Popup and awaits the result. Therefore the Componenten
|
|
|
|
* which is rendered must implement use the functions onSubmit(data)
|
|
|
|
* and onCancel(error) to cancel.
|
|
|
|
*
|
|
|
|
* @template T
|
|
|
|
* @param {IModalSettings} settings
|
|
|
|
* @return {*} {Promise<T>}
|
|
|
|
* @memberof ILayout
|
|
|
|
*/
|
|
|
|
getDialogData<T = any>(settings: IModalSettings): Promise<T>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Helper Function to render a Toast.
|
|
|
|
* @param message The Message of the Toast
|
|
|
|
* @param type The Type.
|
|
|
|
* @param timeout A Timeout in [ms], after which the Toast should disapear. 0 = infinity
|
|
|
|
*/
|
|
|
|
showToast(message: string, type?: 'info' | 'warning' | 'success' | 'error' | 'default' | 'dark' | 'light' | 'dark', autoClose?: number): void;
|
|
|
|
}
|