catng
Version:
Angular Dynamic Form Input Component
108 lines (107 loc) • 2.92 kB
TypeScript
import { FormGroup } from "@angular/forms";
import { Ref } from "./ref.model";
import { FormListItemModel } from "./form/form-list-item.model";
export interface FormModel {
id: number;
name?: string;
title?: string;
description?: string;
tableName?: string;
getdataUrl?: string;
saveUrl?: string;
updateUrl?: string;
deleteUrl?: string;
formControlTemplateList?: FormControlTemplate[];
row: number;
col: number;
}
export interface RowConfig {
col?: number;
}
export declare class FormControlTemplate {
type?: string | any;
inputType?: string;
key: string | any;
label?: string | any;
value?: FormListItemModel[] | any;
explanation?: string | any;
placeholder?: string | any;
required?: boolean | any;
readonly?: boolean;
minLength?: number | any;
maxLength?: number | any;
autoComplete?: boolean;
newItemButton?: boolean;
newItemButtonLabel?: string;
newItemButtonClick?: (event?: any) => void;
class?: string | any;
style?: string | any;
show?: boolean;
oneMore?: boolean;
disabled?: boolean | any;
mask?: string | any;
min?: number | any;
max?: number | any;
prefix?: string | any;
suffix?: string | any;
step?: number | any;
options?: Ref[] | any;
optionLabel?: string | any;
optionValue?: string | any;
showClear?: boolean | any;
autoDisplayFirst?: boolean | any;
virtualScroll?: boolean | any;
filter?: boolean | any;
editable?: boolean | any;
virtualScrollItemSize?: number | any;
grouped?: boolean | any;
display?: string | any;
selectionLimit?: number | any;
refUrl?: string;
refKey?: string;
queryParameter?: string;
minDate?: Date | any;
maxDate?: Date | any;
showTime?: boolean;
timeOnly?: boolean;
showSeconds?: boolean;
rows?: number | any;
cols?: number | any;
autoResize?: boolean | any;
fileCanUpload?: boolean;
fileRefEntityId?: number;
fileEntityId?: number;
fileUrl?: string;
fileDeleteUrl?: string;
fileUploadUrl?: string;
fileDownloadUrl?: string;
fileListUrl?: string;
fileShowType?: string;
fileShowName?: string;
fileName?: string;
fileBorder?: string;
fileRadius?: string;
fileMime?: string;
fileWidth?: any;
fileHeight?: any;
fileButtonText?: string;
picklistTarget?: any[];
picklistSource?: any[];
children?: FormControlTemplate[];
showGrid?: boolean;
forceSelection?: boolean;
rowOrder?: number;
}
export declare class FormGroupTemplate {
refEntityId?: number;
controls: FormControlTemplate[];
formGroup: FormGroup | any;
formSubmited: boolean;
}
export declare class FormGroupControlTemplate {
key?: string;
refEntityId?: number;
control?: FormControlTemplate;
formGroup: FormGroup | any;
formSubmited: boolean;
}