UNPKG

ngx-json-ui

Version:

This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.

56 lines (55 loc) 2.7 kB
import { DpRule } from "../../../features/data-population/models/dp-rule.model"; import { ComponentModel } from "../component.model"; export interface FormControlComponentModel extends ComponentModel { /** * rows is a number property that specifies the number of visible rows in a textarea. * It is used to control the height of the textarea and how much content is visible at once. * For example, if rows is set to 5, the textarea will display 5 lines of text at a time. * This property is optional and should only be used if the component is a textarea or similar input type. */ rows: number; /** * readOnly is a boolean property that indicates whether the form control is read-only. * If set to true, the form control will not be editable by the user. * This is useful for displaying information that should not be modified by the user. */ readOnly?: boolean; /** * The type of the button. * Can be 'submit', 'button', or 'reset'. */ disabled?: boolean; /** * An optional rule for data population. * This is an object that defines how data should be populated in the component. * For example, it can specify a data source, transformation rules, or validation rules. * This property is optional and should only be used if the component supports data population. */ dpRule?: DpRule; /** * An optional unique form-control id for targeted any form operations. * This is useful for identifying the form control in the DOM or for JavaScript operations. * For example, 'form1234' for a specific form control instance. * If not provided, the component will not have a unique identifier. */ id?: string | null | undefined; /** * An optional unique form-control id for targeted any form operations. * This is useful for identifying the form control in the DOM or for JavaScript operations. * For example, 'form1234' for a specific form control instance. * If not provided, the component will not have a unique identifier. */ placeholder?: string | null | undefined; /** * An error message to be displayed when the form control is invalid. * This is useful for providing feedback to the user about what went wrong. * For example, 'This field is required' or 'Invalid email address'. */ errorMessageClass?: string | null | undefined; /** * An error message to be displayed when the form control is invalid. * This is useful to show this input is invalid. * For example, 'This field is required' or 'Invalid email address'. */ errorInputClass?: string | null | undefined; }