form-preview-df
Version:
Resusable Form Preview Components
61 lines • 2.25 kB
TypeScript
export interface IFieldConfig {
key: string;
label: string;
type: 'text' | 'number' | 'boolean' | 'select' | 'checkbox' | 'radio' | 'date' | 'date-time' | 'email' | 'textarea' | 'range' | 'signature' | 'options' | 'dynamic-columns';
defaultValue?: string | number | string[] | boolean;
placeholder?: string;
options?: {
label: string;
value: string;
}[];
validation?: {
required?: boolean;
minLength?: number;
maxLength?: number;
pattern?: string;
readonly?: boolean;
message?: string;
minCheckedNumber?: number;
maxCheckedNumber?: number;
minDate?: string;
maxDate?: string;
};
min?: number;
max?: number;
step?: number;
description?: string;
helpText?: string;
}
export interface ITabConfig {
id: string;
label: string;
fields: IFieldConfig[];
description?: string;
}
export interface IComponentConfig {
type: string;
tabs: ITabConfig[];
category?: 'Basic' | 'Advanced' | 'Layout' | 'Custom';
description?: string;
}
export declare const READONLY_FIELD: IFieldConfig;
export declare const REQUIRED_FIELD: IFieldConfig;
export declare const LABEL_ALIGNMENT_FIELD: IFieldConfig;
export declare const CUSTOM_VALIDATION_MESSAGE_FIELD: IFieldConfig;
export declare const LABEL_FIELD: IFieldConfig;
export declare const PLACEHOLDER_FIELD: IFieldConfig;
export declare const DEFAULT_VALUE_FIELD: IFieldConfig;
export declare const DESCRIPTION_FIELD: IFieldConfig;
export declare const HELP_TEXT_FIELD: IFieldConfig;
export declare const COMMENTS_FIELD: IFieldConfig;
export declare const INLINE_LAYOUT_FIELD: IFieldConfig;
export declare const ROWS_FIELD: IFieldConfig;
export declare const DECIMAL_PLACES_FIELD: IFieldConfig;
export declare const INTEGER_ONLY_FIELD: IFieldConfig;
export declare const MIN_CHECKED_NUMBER_FIELD: IFieldConfig;
export declare const MAX_CHECKED_NUMBER_FIELD: IFieldConfig;
export declare const TIME_FORMAT_FIELD: IFieldConfig;
export declare const HEIGHT_FIELD: IFieldConfig;
export declare const PEN_COLOR_FIELD: IFieldConfig;
export declare const BACKGROUND_COLOR_FIELD: IFieldConfig;
//# sourceMappingURL=field-config.model.d.ts.map