UNPKG

@adaptabletools/adaptable

Version:

Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

80 lines (79 loc) 2.28 kB
import { Action } from 'redux'; import { AdaptableMessageType } from '../../AdaptableState/Common/AdaptableMessageType'; import { AdaptableModule } from '../../AdaptableState/Common/Types'; import { AdaptableForm, BaseContext } from '../../types'; import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps'; export interface UIConfirmation { Header: string; Msg: string; ConfirmButtonText: string; CancelButtonText: string; ConfirmAction: Action; CancelAction: Action; ShowInputBox: boolean; MessageType: AdaptableMessageType; } export interface InputAction extends Action { InputText: string; } export interface UIPrompt { Header: string; Msg: string; DefaultValue?: string; ConfirmAction?: InputAction; ConfirmActionCreator?: (inputText: string) => Action; } export interface ScreenPopup { ShowScreenPopup: boolean; ComponentModule: AdaptableModule; ComponentName: string; Params: ModuleParams; PopupProps?: { [key: string]: any; }; } export interface ConfirmationPopup { ShowConfirmationPopup: boolean; Header: string; Msg: string; ConfirmButtonText: string; CancelButtonText: string; ConfirmAction: Action; CancelAction: Action; ShowInputBox: boolean; ConfirmationComment: string; MessageType: AdaptableMessageType; } export interface PromptPopup { ShowPromptPopup: boolean; Header: string; Message: string; ConfirmAction?: InputAction; DefaultValue?: string; ConfirmActionCreator?: (inputText: string) => Action; } export interface WindowPopup { PopupList: { /** * Used to identify the window. * - used to close the window * - used to identify the 'Component' name, to know what to instantiate */ Id: string; FactoryId: string; Title: string; PopupProps?: any; Icon?: string; }[]; } export interface FormPopup { FormList: { Id: string; FormProps: any; /** * Allows to customise the context before submitting the form */ prepareContext?: (context: BaseContext) => Promise<BaseContext> | BaseContext; Form: AdaptableForm<BaseContext>; }[]; }