import { SchemaManager } from './schemaManager'; import { IClasses } from './twtypes'; import { ICardComponent } from '../components/card'; import { IExpansionspanelComponent } from '../components/expansionspanel'; import { ILabelComponent } from '../components/label'; import { IButtonComponent } from '../components/button'; import { IInputComponent } from '../components/input'; import { ISelectComponent } from '../components/select'; import { ICheckboxComponent } from '../components/checkbox'; import { IFieldComponent } from '../components/field'; import { IRadioGroupComponent } from '../components/radiogroup'; import { IModalComponent } from '../components/modal'; import { IToolbarComponent } from '../components/toolbar'; import { IDataTableComponent } from '../components/datatable'; import { ICols } from './columns'; import { Color } from './themeColors'; import { IFormComponent } from '../components/form'; import { IPanelComponent } from '../components/panel'; import { IDividerComponent } from '../components/divider'; import { IImageComponent } from '../components/image'; import { ILinkComponent } from '../components/link'; import { IHtmlComponent } from '../components/html'; import { IIconComponent } from '../components/icon'; import { ITabsComponent } from '../components/tabs'; import { ITabComponent } from '../components/tab'; import { IErrorPanelComponent } from '../components/errorpanel'; import React from 'react'; export declare type IComponent = IPanelComponent | IFormComponent | ICardComponent | IExpansionspanelComponent | ITabsComponent | ITabComponent | IModalComponent | IToolbarComponent | IDataTableComponent | IFieldComponent | IInputComponent | ISelectComponent | ICheckboxComponent | IRadioGroupComponent | ILabelComponent | IButtonComponent | ILinkComponent | IDividerComponent | IImageComponent | IHtmlComponent | IIconComponent | IErrorPanelComponent; export type { IPanelComponent, IFormComponent, ICardComponent, IExpansionspanelComponent, ITabsComponent, ITabComponent, IModalComponent, IToolbarComponent, IDataTableComponent, IFieldComponent, IInputComponent, ISelectComponent, ICheckboxComponent, IRadioGroupComponent, ILabelComponent, IButtonComponent, ILinkComponent, IDividerComponent, IImageComponent, IHtmlComponent, IIconComponent, IErrorPanelComponent }; export declare type ISchema = IComponent & ISchemaProps; export interface ISchemaProps { onInitSchema?: IComponentFunction; onMount?: IComponentFunction; onUnMount?: IComponentFunction; validate?: IValidateFunction; onSubmit?: IComponentFunction; onReset?: IComponentFunction; onMakeVisible?: IComponentBoolFunction; tooltipComp?: any; tooltipProps?: IAnyObj; } export interface ICommonProps extends IStyles, IEventOptions { name?: string; hidden?: boolean | IComponentBoolFunction; disabled?: boolean | IComponentBoolFunction; themeColor?: Color; tooltip?: string; cols?: ICols; parentComp?: IComponent; addProps?: IAnyObj; tag?: any; } export interface IContainerComponent extends ICommonProps { children: Array; usesGrid?: boolean; } export interface IDataComponent extends ICommonProps { field: string; unbound?: boolean; dataType?: 'string' | 'float' | 'int' | 'bool' | 'date'; default?: any | IComponentAnyFunction; required?: boolean | IComponentBoolFunction; validate?: IValidateFunction; } export interface IEventParams { sm: SchemaManager; comp: IComponent; value?: any; event?: any; arrayInd?: number; } export interface IStyles { style?: React.CSSProperties; className?: string; classes?: IClasses; } export interface ICompStyles { [key: string]: IStyles; } export interface IDefaultStyle { style?: React.CSSProperties; class?: string; classes?: IClasses; } export interface IDefaultStyles { main: IDefaultStyle; [key: string]: IDefaultStyle; } export interface IPropStyle { style?: React.CSSProperties; className?: string; } export interface IPropStyles { [key: string]: IPropStyle; } export declare type IComponentFunction = (params: IEventParams) => void; export declare type IComponentBoolFunction = (params: IEventParams) => boolean; export declare type IValidateFunction = (params: IEventParams) => string | undefined; export declare type ISummaryFunction = (params: IEventParams) => any; export declare type IStringArrayFunction = (params: IEventParams) => string[]; export declare type ISelectItemArrayFunction = (params: IEventParams) => ISelectOptionItem[]; export declare type IComponentAnyFunction = (params: IEventParams) => any; export interface ISelectOptionProps { disabled?: boolean; className?: string; style?: React.CSSProperties; } export interface ISelectOptionItem { value: string | number | null; label: string; props?: ISelectOptionProps; } export interface IEventOptions { onChange?: IComponentFunction; onClick?: IComponentFunction; onDoubleClick?: IComponentFunction; onMouseDown?: IComponentFunction; onMouseEnter?: IComponentFunction; onMouseLeave?: IComponentFunction; onMouseMove?: IComponentFunction; onKeyDown?: IComponentFunction; onKeyPress?: IComponentFunction; onKeyUp?: IComponentFunction; onFocus?: IComponentFunction; onBlur?: IComponentFunction; onSelect?: IComponentFunction; onScroll?: IComponentFunction; onWheel?: IComponentFunction; } export interface ISchemaError { error: string; type: 'error' | 'warning'; comp: IComponent; } export interface IAnyObj { [key: string]: any; }