@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
71 lines (70 loc) • 2.82 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Component, HostBinding, Input } from '@angular/core';
import * as i0 from "@angular/core";
let serial = 0;
/**
* Represents the Kendo UI FormError component.
* Displays an error message under a Kendo Angular component or native HTML form-bound component after validation.
*
* @example
* ```html
* <kendo-formerror>Error message here</kendo-formerror>
* ```
*/
export class ErrorComponent {
hostClass = true;
/**
* Sets the alignment of the error message.
*
* @default 'start'
*/
align = 'start';
/**
* @hidden
*/
id = `kendo-error-${serial++}`;
roleAttribute = 'alert';
get startClass() {
return this.align === 'start';
}
get endClass() {
return this.align === 'end';
}
get idAttribute() {
return this.id;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ErrorComponent, isStandalone: true, selector: "kendo-formerror", inputs: { align: "align" }, host: { properties: { "class.k-form-error": "this.hostClass", "attr.role": "this.roleAttribute", "class.k-text-start": "this.startClass", "class.k-text-end": "this.endClass", "attr.id": "this.idAttribute" } }, ngImport: i0, template: `
<ng-content></ng-content>
`, isInline: true });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ErrorComponent, decorators: [{
type: Component,
args: [{
selector: 'kendo-formerror',
template: `
<ng-content></ng-content>
`,
standalone: true
}]
}], propDecorators: { hostClass: [{
type: HostBinding,
args: ['class.k-form-error']
}], align: [{
type: Input
}], roleAttribute: [{
type: HostBinding,
args: ['attr.role']
}], startClass: [{
type: HostBinding,
args: ['class.k-text-start']
}], endClass: [{
type: HostBinding,
args: ['class.k-text-end']
}], idAttribute: [{
type: HostBinding,
args: ['attr.id']
}] } });