@web-atoms/core
Version:
54 lines • 2.09 kB
TypeScript
import XNode from "../../core/XNode";
import { CancelToken, IClassOf } from "../../core/types";
import { AtomControl } from "../controls/AtomControl";
import type { IDialogOptions } from "./PopupService";
import "./PopupWindow.global.css";
export default class PopupWindow extends AtomControl {
static showWindow<T>(options?: IDialogOptions): Promise<T>;
static showWindow<T>(window: IClassOf<PopupWindow>, options?: IDialogOptions): Promise<T>;
static showModal<T>(options?: IDialogOptions): Promise<T>;
static showModal<T>(window: IClassOf<PopupWindow>, options?: IDialogOptions): Promise<T>;
title?: string;
viewModelTitle?: string;
close: (r?: any) => void;
cancel: (r?: any) => void;
titleRenderer: () => XNode;
closeButtonRenderer: () => XNode;
footerRenderer: () => XNode;
headerRenderer: () => XNode;
iconRenderer: () => XNode;
actionBarRenderer: () => XNode;
closeWarning: string;
protected readonly cancelToken: CancelToken;
private initialized;
onPropertyChanged(name: any): void;
protected init(): any;
protected requestCancel(): Promise<void>;
protected recreate(renderer: any, name: any): HTMLElement;
/**
* This is because if someone changes renderer, entire content will
* vanish, so we need to update allow update of only content element
* @returns
*/
protected rendererChanged(): void;
protected preCreate(): void;
protected render(node: XNode, e?: any, creator?: any): void;
protected setupDragging(tp: HTMLElement): void;
}
export declare class ConfirmPopup extends PopupWindow {
static confirm({ message, title, yesLabel, noLabel, cancelLabel }: {
message: any;
title?: string;
yesLabel?: string;
noLabel?: string;
cancelLabel?: any;
}): Promise<boolean>;
message: string;
messageRenderer: () => XNode;
yesLabel: string;
noLabel: string;
cancelLabel: string;
protected preCreate(): void;
protected requestCancel(): Promise<void>;
}
//# sourceMappingURL=PopupWindow.d.ts.map