import { AdaptableButton } from './AdaptableButton'; import { BaseContext } from '../../types'; /** * Data which appears in an AdapTable Form */ export type AdaptableFormData = Record; /** * Defines a form which appears dynamically; used by Alerts & Export Custom Destinations */ export interface AdaptableForm { /** * Title to appear in the Form */ title?: string; /** * Additional information to appear in the Form */ description?: string; /** * Collection of Dynamic Fields to display */ fields?: (AdaptableFormField | AdaptableFormField[])[]; /** * Buttons to include in the Form */ buttons?: AdaptableButton[]; } /** * Defines a Field that appears in an Adaptable Form */ export interface AdaptableFormField { /** * Name of the Field */ name: string; /** * Label to display in the Field */ label: string; /** * Field Type: text, date, number, checkbox, select, textOutput */ fieldType: AdaptableFormFieldType; /** * Field Default Value - can be of type string, boolean, number */ defaultValue?: string | boolean | number; /** * Items to populate the 'select' fieldType */ options?: { value: any; label: string; }[]; } /** * Types of Controls used in an AdapTable Form */ export type AdaptableFormFieldType = 'text' | 'select' | 'date' | 'number' | 'checkbox' | 'textOutput'; export declare function getDefaultAdaptableFormData(formDef?: AdaptableForm): AdaptableFormData;