@vendasta/store
Version:
Components and data for Store
46 lines (45 loc) • 1.37 kB
TypeScript
import { ValidatorFn } from '@angular/forms';
export declare const FILES = "file";
export declare const DROP_DOWN = "dropdown";
export declare const CHECK_BOX = "checkbox";
export declare const TEXT_AREA = "textarea";
export declare const TEXT_BOX = "textbox";
export declare const BUSINESS_USER = "vbcuser";
export declare type ControlType = 'checkbox' | 'dropdown' | 'file' | 'textbox' | 'textarea' | 'vbcuser';
export interface FieldBaseOptions {
id: string;
label: string;
required?: boolean;
description?: string;
type?: string;
prefix?: string;
suffix?: string;
regexValidator?: string;
regexErrorMessage?: string;
disabled?: boolean;
forOfficeUseOnly?: boolean;
officeEditableOnly?: boolean;
hidden?: boolean;
displayOnly?: boolean;
}
export declare abstract class FieldBase<T> implements FieldBaseOptions {
value: T;
id: string;
label: string;
required: boolean;
order: number;
description: string;
controlType: ControlType;
prefix: string;
suffix: string;
regexValidator: string;
regexErrorMessage: string;
disabled: boolean;
validator: ValidatorFn;
forOfficeUseOnly: boolean;
officeEditableOnly: boolean;
hidden: boolean;
displayOnly: boolean;
constructor(options: FieldBaseOptions);
protected validatorBuilder(): ValidatorFn;
}