@netgrif/components-core
Version:
Netgrif Application engine frontend core Angular library
50 lines (49 loc) • 1.83 kB
TypeScript
import { Behavior } from '../../models/behavior';
import { ValidatorFn } from '@angular/forms';
import { Layout } from '../../models/layout';
import { Validation } from '../../models/validation';
import { Component } from '../../models/component';
import { DataField } from '../../models/abstract-data-field';
export declare enum TextFieldView {
DEFAULT = "default",
TEXTAREA = "textarea",
RICHTEXTAREA = "richtextarea",
HTMLTEXTAREA = "htmltextarea"
}
/**
* A collection of Text field component names supported by the application engine.
*/
export declare enum TextFieldComponent {
PASSWORD = "password",
TEXT_AREA = "textarea",
RICH_TEXT_AREA = "richtextarea",
HTML_TEXT_AREA = "htmltextarea",
DASHBOARD_LINE_CHART = "dashboard_line_chart",
DASHBOARD_PIE_CHART = "dashboard_pie_chart",
DASHBOARD_BAR_CHART = "dashboard_bar_chart",
DASHBOARD_IFRAME = "dashboard_iframe",
DASHBOARD_PORTAL = "dashboard_portal"
}
export declare enum TextAreaHeight {
OUTLINE = 20,
FILL_STANDARD = 22
}
export declare enum TextFieldValidation {
REQUIRED = "required",
MIN_LENGTH = "minLength",
MAX_LENGTH = "maxLength",
VALID_MIN_LENGTH = "minlength",
VALID_MAX_LENGTH = "maxlength",
PATTERN = "pattern",
REGEX = "regex",
VALID_TEL_NUMBER = "validTelNumber",
TEL_NUMBER = "telNumber",
EMAIL = "email"
}
export declare class TextField extends DataField<string> {
static FIELD_HEIGHT: number;
constructor(stringId: string, title: string, value: string, behavior: Behavior, placeholder?: string, description?: string, layout?: Layout, validations?: Array<Validation>, _component?: Component, parentTaskId?: string);
getTypedComponentType(): string;
protected resolveValidations(): Array<ValidatorFn>;
private validTelNumber;
}