UNPKG

@progress/kendo-angular-inputs

Version:

Kendo UI for Angular Inputs Package - Everything you need to build professional form functionality (Checkbox, ColorGradient, ColorPalette, ColorPicker, FlatColorPicker, FormField, MaskedTextBox, NumericTextBox, RadioButton, RangeSlider, Slider, Switch, Te

103 lines (102 loc) 4.24 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { AfterViewInit, ElementRef, Renderer2, QueryList, AfterViewChecked } from '@angular/core'; import { NgControl } from '@angular/forms'; import { LocalizationService } from '@progress/kendo-angular-l10n'; import { ShowOptions } from './models/show-options'; import { ErrorComponent } from './error.component'; import { HintComponent } from './hint.component'; import { Orientation } from './models/orientation'; import * as i0 from "@angular/core"; /** * Represents the Kendo UI FormField component for Angular. * Use this component to group form-bound controls (Kendo Angular components or native HTML controls). * Applies styling and behavior rules. * * @example * ```html * <kendo-formfield> * <kendo-label [for]="firstName"text="First Name"></kendo-label> * <kendo-textbox formControlName="firstName" #firstName></kendo-textbox> * <kendo-formhint>Enter your name.</kendo-formhint> * <kendo-formerror>First name is required.</kendo-formerror> * </kendo-formfield> * ``` * * @remarks * Supported children components are: {@link ErrorComponent}, {@link HintComponent}, {@link TextBoxComponent}, {@link NumericTextBoxComponent}, {@link MaskedTextBoxComponent}, {@link TextAreaComponent}, {@link DatePickerComponent}, {@link DateTimePickerComponent}, {@link DateInputComponent}, {@link OTPInputComponent}. */ export declare class FormFieldComponent implements AfterViewInit, AfterViewChecked { private renderer; private localizationService; private hostElement; hostClass: boolean; /** * @hidden */ direction: string; get errorClass(): boolean; get disabledClass(): boolean; set formControls(formControls: QueryList<NgControl>); controlElementRefs: QueryList<ElementRef>; kendoInput: any; errorChildren: QueryList<ErrorComponent>; hintChildren: QueryList<HintComponent>; /** * Specifies when to show the hint messages: * * `initial`&mdash;Shows hints when the form control is `valid` or `untouched` and `pristine`. * * `always`&mdash;Always shows hints. * * @default 'initial' */ showHints: ShowOptions; /** * Specifies the layout orientation of the form field. * * @default 'vertical' */ orientation: Orientation; /** * Specifies when to show the error messages: * * `initial`&mdash;Shows errors when the form control is `invalid` and `touched` or `dirty`. * * `always`&mdash;Always shows errors. * * @default 'initial' */ showErrors: ShowOptions; /** * @hidden */ get horizontal(): boolean; /** * @hidden */ get hasHints(): boolean; /** * @hidden */ get hasErrors(): boolean; private control; private subscriptions; private rtl; constructor(renderer: Renderer2, localizationService: LocalizationService, hostElement: ElementRef<HTMLElement>); ngAfterViewInit(): void; ngAfterViewChecked(): void; ngOnDestroy(): void; private disabledKendoInput; private disabledControl; private disabledElement; private validateFormControl; private isControlGroup; private isRadioControl; private updateDescription; private findControlElements; private generateDescriptionIds; private showHintsInitial; private showErrorsInitial; private setDescription; static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "kendo-formfield", never, { "showHints": { "alias": "showHints"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "showErrors": { "alias": "showErrors"; "required": false; }; }, {}, ["kendoInput", "formControls", "controlElementRefs", "errorChildren", "hintChildren"], ["label, kendo-label", "*", "kendo-formhint", "kendo-formerror"], true, never>; }