ngx-formly-helpers
Version:
A set of helper functions for ngx-formly
47 lines (46 loc) • 3.26 kB
TypeScript
import { FormlyFieldConfig, FormlyTemplateOptions } from "@ngx-formly/core";
export interface Option {
value: any;
label: string;
}
declare function field(key: string, type?: string, label?: string, templateOptions?: {}, otherOptions?: FormlyFieldConfig): FormlyFieldConfig;
declare function requiredField(key: string, type?: string, label?: string, templateOptions?: {}, otherOptions?: {}): FormlyFieldConfig;
declare function text(key: string, label: string, templateOptions?: {}): FormlyFieldConfig;
declare function number(key: string, label: string, templateOptions?: {}, otherOptions?: FormlyFieldConfig): FormlyFieldConfig;
declare function requiredNumber(key: string, label: string, templateOptions?: {}, otherOptions?: FormlyFieldConfig): FormlyFieldConfig;
declare function requiredText(key: string, label: string, templatOptions?: {}, otherOptions?: {}): FormlyFieldConfig;
declare function hidden(key: string): FormlyFieldConfig;
declare function checkbox(key: string, label: string, templateOptions?: {}): FormlyFieldConfig;
declare function requiredCheckbox(key: string, label: string, templateOptions?: {}): FormlyFieldConfig;
declare function select(key: string, label: string, options: Option[]): FormlyFieldConfig;
declare function requiredSelect(key: string, label?: string, options?: FormlyTemplateOptions, otherOptions?: {}): FormlyFieldConfig;
declare function multiSelect(key: string, label: string, options: any[], templateOptions?: {}): FormlyFieldConfig;
declare function requiredMultiSelect(key: string, label: string, options: any[], templateOptions?: FormlyTemplateOptions): FormlyFieldConfig;
declare function radio(key: string, label: string, options: any[], templateOptions?: FormlyTemplateOptions): FormlyFieldConfig;
declare function requiredRadio(key: string, label: string, options: any[], templateOptions?: FormlyTemplateOptions): FormlyFieldConfig;
declare function date(key: string, label: string, templateOptions?: FormlyTemplateOptions, otherOptions?: FormlyFieldConfig): FormlyFieldConfig;
declare function requiredDate(key: string, label: string, templateOptions?: FormlyTemplateOptions, otherOptions?: FormlyFieldConfig): FormlyFieldConfig;
declare function textArea(key: string, label: string, templateOptions?: FormlyTemplateOptions, otherOptions?: FormlyFieldConfig): FormlyFieldConfig;
declare function requiredTextArea(key: string, label: string, templatOptions?: FormlyTemplateOptions, otherOptions?: FormlyFieldConfig): FormlyFieldConfig;
export declare const formly: {
field: typeof field;
requiredField: typeof requiredField;
text: typeof text;
requiredText: typeof requiredText;
number: typeof number;
requiredNumber: typeof requiredNumber;
hidden: typeof hidden;
checkbox: typeof checkbox;
requiredCheckbox: typeof requiredCheckbox;
select: typeof select;
requiredSelect: typeof requiredSelect;
multiSelect: typeof multiSelect;
requiredMultiSelect: typeof requiredMultiSelect;
radio: typeof radio;
requiredRadio: typeof requiredRadio;
date: typeof date;
requiredDate: typeof requiredDate;
textArea: typeof textArea;
requiredTextArea: typeof requiredTextArea;
};
export {};