UNPKG

smart-webcomponents-angular

Version:

[![Price](https://img.shields.io/badge/price-COMMERCIAL-0098f7.svg)](https://jqwidgets.com/license/)

89 lines (88 loc) 6.55 kB
import { FormGroup } from './../index'; import { FormGroupLabelPosition, Control } from './../index'; import { AfterViewInit, ElementRef, OnInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core'; import { BaseElement } from './smart.element'; import * as i0 from "@angular/core"; export { ControlControlType, ControlLabelPosition, ControlViewMode, FormGroupLabelPosition, Control, ElementRenderMode } from './../index'; export { Smart } from './smart.element'; export { FormGroup } from './../index'; export declare class FormGroupComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges { constructor(ref: ElementRef<FormGroup>); private eventHandlers; nativeElement: FormGroup; /** @description Creates the component on demand. * @param properties An optional object of properties, which will be added to the template binded ones. */ createComponent(properties?: {}): any; /** @description Gets or sets the number of columns used to layout the form fields, allowing for multi-column form arrangements. */ get columns(): number; set columns(value: number); /** @description Defines the data field associated with the form control. The inner input element’s name attribute will be set to the specified dataField value, ensuring correct binding and form data serialization. Additionally, this value determines how the control is referenced within the FormGroup, making the form control’s value accessible via the dataField key in the form’s data model. */ get dataField(): string; set dataField(value: string); /** @description Retrieves or updates the text displayed as the label for the form control, allowing you to specify or modify the descriptive text shown to users alongside the input element. */ get label(): string; set label(value: string); /** @description */ get controls(): Control[]; set controls(value: Control[]); /** @description Specifies or retrieves the position of the labels relative to their associated element. This property can be used to define where labels are displayed, such as above, below, to the left, or to the right of the element. */ get onStatusChanges(): { (value: string): void; }; set onStatusChanges(value: { (value: string): void; }); /** @description Sets the form to read-only mode, preventing users from editing or modifying any of the input fields while still allowing them to view the current values. */ get onValueChanges(): { (value: any): void; }; set onValueChanges(value: { (value: any): void; }); /** @description Toggles the visibility of the colon character that appears immediately after label text, allowing you to choose whether or not a colon is displayed following each label. */ get labelPosition(): FormGroupLabelPosition | string; set labelPosition(value: FormGroupLabelPosition | string); /** @description Controls the visibility of the validation summary, allowing you to display or hide a summary of form validation errors to users. */ get readonly(): boolean; set readonly(value: boolean); /** @description Retrieves the current value of the form or updates it with a new value. This property can be used to access the form's data or set it programmatically. */ get showColonAfterLabel(): boolean; set showColonAfterLabel(value: boolean); /** @description undefined */ get showSummary(): boolean; set showSummary(value: boolean); /** @description undefined */ get value(): any; set value(value: any); /** @description Inserts a new input control (such as a text box, dropdown, or checkbox) into the Form, allowing users to provide or select additional information as part of their submission. * @param {any} controlOptions. Control options. The control options description is available in the <em>controls</em> property. */ addControl(controlOptions: any): void; /** @description Retrieves a specific control from the collection using its name, as specified by the dataField parameter. This function searches for a control whose name matches the provided dataField value and returns the corresponding control object, allowing you to access or manipulate its properties and methods. * @param {string} dataField. dataField of a FormControl or FormGroup * @returns {Control} */ getControl(dataField: any): Promise<any>; getControlSync(dataField: any): Control; /** @description Adds a user interface control (such as a text box, dropdown, or button) to the specified Form, enabling users to input or interact with form data. This operation dynamically updates the Form’s layout and may include assigning default properties, event handlers, and positioning options for the new control. * @param {number} index. Control insert index * @param {any} controlOptions. Control options. The control options description is available in the <em>controls</em> property. */ insertControl(index: number, controlOptions: any): void; /** @description Removes a specified control element from the Form, effectively deleting it from the Form’s structure and user interface. This operation detaches the control, ensuring it is no longer available for user interaction or data capture. Use this action to dynamically update the Form’s contents based on user actions or application logic. * @param {any} controlOptions. Control options. The control options description is available in the <em>controls</em> property. */ removeControl(controlOptions: any): void; get isRendered(): boolean; ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; ngOnChanges(changes: SimpleChanges): void; /** @description Add event listeners. */ private listen; /** @description Remove event listeners. */ private unlisten; static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupComponent, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<FormGroupComponent, "smart-form-group, [smart-form-group]", ["smart-form-group"], { "columns": "columns"; "dataField": "dataField"; "label": "label"; "controls": "controls"; "onStatusChanges": "onStatusChanges"; "onValueChanges": "onValueChanges"; "labelPosition": "labelPosition"; "readonly": "readonly"; "showColonAfterLabel": "showColonAfterLabel"; "showSummary": "showSummary"; "value": "value"; }, {}, never>; }