smart-webcomponents-angular
Version:
[](https://jqwidgets.com/license/)
116 lines (115 loc) • 7.81 kB
TypeScript
import { FormControl } from './../index';
import { FormControlAction, FormControlAlign, FormControlControlType, FormControlLabelPosition, FormControlViewMode } from './../index';
import { AfterViewInit, ElementRef, OnInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
import { BaseElement } from './smart.element';
import * as i0 from "@angular/core";
export { FormControlAction, FormControlAlign, FormControlControlType, FormControlLabelPosition, FormControlViewMode, ElementRenderMode } from './../index';
export { Smart } from './smart.element';
export { FormControl } from './../index';
export declare class FormControlComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges {
constructor(ref: ElementRef<FormControl>);
private eventHandlers;
nativeElement: FormControl;
/** @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 FormControl Action. This property is used when the 'controlType' is 'button' or 'submit' */
get action(): FormControlAction | string;
set action(value: FormControlAction | string);
/** @description Sets or Gets the alignment of the FormControl */
get align(): FormControlAlign | string;
set align(value: FormControlAlign | string);
/** @description HTML Content displayed after the Form Control */
get appendHTML(): any;
set appendHTML(value: any);
/** @description JSON object with initialization properties of the UI component. Example: { dataSource: ['item 1', 'item 2', 'item 3'] } will set the dataSource property of the Form control. */
get controlOptions(): any;
set controlOptions(value: any);
/** @description The type of the control. */
get controlType(): FormControlControlType | string;
set controlType(value: FormControlControlType | string);
/** @description Sets the Form Group columns. */
get columns(): number;
set columns(value: number);
/** @description Sets the Form control column span. */
get columnSpan(): number;
set columnSpan(value: number);
/** @description Sets the Form control data field. The control's inner input's name is set to the dataField value and in the FormGroup it is accessible through the dataField value. */
get dataField(): string;
set dataField(value: string);
/** @description Sets the Form control disabled mode. */
get disabled(): boolean;
set disabled(value: boolean);
/** @description Gets whether the Form control is 'dirty' i.e its value is changed by the user. */
get dirty(): boolean;
set dirty(value: boolean);
/** @description Gets or Sets the Form control's info icon's tooltip. */
get info(): string;
set info(value: string);
/** @description Gets whether the Form control is invalid. */
get invalid(): boolean;
set invalid(value: boolean);
/** @description Gets or Sets the Form control's label. */
get label(): string;
set label(value: string);
/** @description Gets or Sets the Form control's label position. */
get labelPosition(): FormControlLabelPosition | string;
set labelPosition(value: FormControlLabelPosition | string);
/** @description Gets or Sets the offset between the label and the control. */
get labelOffset(): number;
set labelOffset(value: number);
/** @description FormGroup only(when controlType is set to 'group'). Gets or Sets whether the navigation buttons are displayed. The property has effect when the viewMode property is set. */
get labelAlign(): FormControlAlign | string;
set labelAlign(value: FormControlAlign | string);
/** @description FormGroup only(when controlType is set to 'group'). Gets or Sets the next button label. */
get nextButtonLabel(): string;
set nextButtonLabel(value: string);
/** @description FormGroup only(when controlType is set to 'group'). Gets or Sets the back button label. */
get backButtonLabel(): string;
set backButtonLabel(value: string);
/** @description Gets or Sets the FormControl placeholder. */
get placeholder(): string;
set placeholder(value: string);
/** @description HTML Content displayed before the Form Control */
get prependHTML(): any;
set prependHTML(value: any);
/** @description Gets or Sets the Form control readonly mode. */
get readonly(): boolean;
set readonly(value: boolean);
/** @description Gets or Sets whether this field is required. */
get required(): boolean;
set required(value: boolean);
/** @description Gets whether the Form control is not touched by the user. This flag is changed usually on blur, after the user interacted with the Form control */
get untouched(): boolean;
set untouched(value: boolean);
/** @description Gets or Sets whether colon is displayed after the label. */
get showColonAfterLabel(): boolean;
set showColonAfterLabel(value: boolean);
/** @description FormGroup only(when controlType is set to 'group'). Gets or Sets whether the navigation buttons are displayed. The property has effect when the viewMode property is set. */
get showButtons(): boolean;
set showButtons(value: boolean);
/** @description Sets or Gets the Form control or Form group value. */
get value(): any;
set value(value: any);
/** @description Gets whether the Form control is valid. */
get valid(): boolean;
set valid(value: boolean);
/** @description Sets or gets the column's validation rules. The expected value is an Array of Objects. Each object should have a 'type' property that can be set to 'required', 'min', 'max', 'minLength', 'maxLength', 'email', 'null', 'requiredTrue', 'minData', 'maxDate', 'pattern'. The 'value' property should be set, too. For validation rule types 'required', 'requiredTrue' and 'null' you can skip the 'value' property. Optional property is 'message', which determines the error message. */
get validationRules(): [] | null;
set validationRules(value: [] | null);
/** @description FormGroup only(when controlType is set to 'group'). Gets or Sets the form'group view mode. */
get viewMode(): FormControlViewMode | string;
set viewMode(value: FormControlViewMode | string);
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<FormControlComponent, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<FormControlComponent, "smart-form-control, [smart-form-control]", ["smart-form-control"], { "action": "action"; "align": "align"; "appendHTML": "appendHTML"; "controlOptions": "controlOptions"; "controlType": "controlType"; "columns": "columns"; "columnSpan": "columnSpan"; "dataField": "dataField"; "disabled": "disabled"; "dirty": "dirty"; "info": "info"; "invalid": "invalid"; "label": "label"; "labelPosition": "labelPosition"; "labelOffset": "labelOffset"; "labelAlign": "labelAlign"; "nextButtonLabel": "nextButtonLabel"; "backButtonLabel": "backButtonLabel"; "placeholder": "placeholder"; "prependHTML": "prependHTML"; "readonly": "readonly"; "required": "required"; "untouched": "untouched"; "showColonAfterLabel": "showColonAfterLabel"; "showButtons": "showButtons"; "value": "value"; "valid": "valid"; "validationRules": "validationRules"; "viewMode": "viewMode"; }, {}, never>;
}