import { ReactElement } from 'react'; import { ForgeChildren, Handler } from './forge'; import { EffectsDispatcher } from './effect'; declare type Omit = Pick>; export declare type Rendered = Omit | 'children'> & { [K in FunctionPropertyNames]: Handler; } & (ComponentProps extends { children: any; } ? { children: ReactElement | ReactElement[]; } : {}); declare type FunctionPropertyNames = { [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]; export declare type WithDispatch = Omit & { dispatch: EffectsDispatcher; }; export interface AuxPipelineUserVisibleError extends Error { errorDetails?: string; } export interface ButtonProps { text: string; disabled?: boolean; onClick: () => Promise | void; } export interface ButtonSetProps { children: ForgeChildren; } export interface ErrorPanelProps { error: AuxPipelineUserVisibleError; } export interface FormProps { children: ForgeChildren; onSubmit: (data: Record) => Promise | void; submitButtonText?: string; } export interface ImageProps { src: string; alt: string; } export interface Option { label: string; value: any; } export interface SelectProps { label: string; name: string; options: Option[]; defaultValue?: Option[]; placeholder?: string; isMulti?: boolean; } export interface CheckboxProps { name?: string; label: string; value: string; defaultChecked?: boolean; } export interface CheckboxGroupProps { legend: string; name: string; children: ForgeChildren; } export interface DatePickerProps { name: string; label: string; defaultValue?: string; } export interface TextFieldProps { name: string; label: string; isRequired?: boolean; defaultValue?: string; } export interface ThreeLOPromptProps { message: string; promptText: string; authUrl: string; } export interface RadioGroupProps { options: Option[]; name: string; label: string; isRequired?: boolean; defaultValue?: string | number; } export interface TextAreaProps { name: string; label: string; defaultValue?: string; isMonospaced?: boolean; isRequired?: boolean; placeholder?: string; spellCheck?: boolean; } export interface JsxTextProps { format?: 'markdown' | 'plaintext'; content: string; } export declare type RenderedTextProps = { content: string; format?: 'plaintext'; } | { content: object; format: 'adf'; }; export interface TableProps { children: ForgeChildren; } export interface HeadProps { children: ForgeChildren; } export interface RowProps { children: ForgeChildren; } export interface CellProps { children: ForgeChildren; } export {};