smart-webcomponents-angular
Version:
[](https://jqwidgets.com/license/)
98 lines (97 loc) • 4.98 kB
TypeScript
import { Form } from './../index';
import { FormLabelPosition, 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, FormLabelPosition, Control, ElementRenderMode } from './../index';
export { Smart } from './smart.element';
export { Form } from './../index';
export declare class FormComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges {
constructor(ref: ElementRef<Form>);
private eventHandlers;
nativeElement: Form;
/** @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 Sets or gets the form columns. */
get columns(): number;
set columns(value: number);
/** @description Sets or gets the form controls. */
get controls(): Control[];
set controls(value: Control[]);
/** @description Sets or Gets the labels position. */
get onStatusChanges(): {
(value: string): void;
};
set onStatusChanges(value: {
(value: string): void;
});
/** @description Makes the form readonly. */
get onValueChanges(): {
(value: any): void;
};
set onValueChanges(value: {
(value: any): void;
});
/** @description Shows / hides the colon after the labels. */
get labelPosition(): FormLabelPosition | string;
set labelPosition(value: FormLabelPosition | string);
/** @description Shows / hides validation summary. */
get readonly(): boolean;
set readonly(value: boolean);
/** @description Gets the Form's state. Each member in the state has { dirty, untouched, disabled } properties. */
get showColonAfterLabel(): boolean;
set showColonAfterLabel(value: boolean);
/** @description Gets or Sets the Form value. */
get showSummary(): boolean;
set showSummary(value: boolean);
/** @description Automatically validates the form when it is created. */
get state(): any;
set state(value: any);
/** @description undefined */
get value(): any;
set value(value: any);
/** @description undefined */
get validateOnLoad(): boolean;
set validateOnLoad(value: boolean);
/** @description Adds a control to the Form.
* @param {any} controlOptions. Control options. The control options description is available in the <em>controls</em> property.
*/
addControl(controlOptions: any): void;
/** @description Gets a control by its name(dataField).
* @param {string} dataField. dataField of a FormControl or FormGroup
* @returns {Control}
*/
getControl(dataField: any): Promise<any>;
/** @description Inserts a control to the Form.
* @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 Remove a control from the Form.
* @param {any} controlOptions. Control options. The control options description is available in the <em>controls</em> property.
*/
removeControl(controlOptions: any): void;
/** @description Submits the form.
* @param {any} submitOptions?. Sets the submit options object. The object may have the following properties: <em>async</em>, <em>action</em>, <em>target</em>, <em>method</em>. <em>async</em> determines whether the form will be submitted asynchronously. <em>action</em> determines the submit url, <em>method</em> sets whether the submit is through 'GET' or 'POST'. <em>target</em> determines the submit target.
*/
submit(submitOptions?: any): void;
/** @description Clears the form.
*/
reset(): void;
/** @description Validates the form.
*/
validate(): 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<FormComponent, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<FormComponent, "smart-form, [smart-form]", ["smart-form"], { "columns": "columns"; "controls": "controls"; "onStatusChanges": "onStatusChanges"; "onValueChanges": "onValueChanges"; "labelPosition": "labelPosition"; "readonly": "readonly"; "showColonAfterLabel": "showColonAfterLabel"; "showSummary": "showSummary"; "state": "state"; "value": "value"; "validateOnLoad": "validateOnLoad"; }, {}, never>;
}