UNPKG

@stratio/egeo

Version:
79 lines (78 loc) 3.21 kB
import { EventEmitter, AfterViewChecked, OnInit, OnDestroy, AfterViewInit } from '@angular/core'; import { ControlValueAccessor, NgForm, FormControl } from '@angular/forms'; /** * @description {Component} [Dynamic form] * * The form component allows to generate forms dynamically using a JSON schema. * * @example * * {html} * * ``` * <st-form [schema]="jsonSchema" [(ngModel)]="model" #formModel="ngModel"> * </st-form> * * ``` * */ export declare class StFormComponent implements AfterViewInit, AfterViewChecked, ControlValueAccessor, OnInit, OnDestroy { /** @Input {any} [schema=] JSON schema needed to generate the form */ schema: any; /** @Input {string} [parentName=] Name of the parent section. By default, it is undefined */ parentName: string; /** @Input {string} [nestingLevel=0] This informs about the nesting level of the form. This input is only used for design purposes */ nestingLevel: number; /** @Input {boolean} [forceValidations=] Boolean to force the field validations */ forceValidations: boolean; /** @Input {string} [disabledSectionMessage='for this instance is disabled.'] * Message displayed when a section is disabled. This is always displayed after the section name */ disabledSectionMessage: string; /** @Input {number} [sectionDescriptionLevel=-1] Level of the section to which description is displayed. * By default, section descriptions are not displayed. */ sectionDescriptionLevel: number; /** @Input {number} [textFieldMaxWidth=] Maximum width of a field needed to paint a input or textarea */ textFieldMaxWidth: number; /** @Input {boolean} [showTooltips=-1] Enable or disable displaying of tooltips * By default, tooltips are displayed */ showTooltips: boolean; /** @Output {any} [valueChange=] Event emitted when value is changed. This emits the current form value */ valueChange: EventEmitter<any>; form: NgForm; showCollapsedSectionFields: boolean; innerValue: any; private _value; private _parentFieldSubscription; private _parentFields; ngOnInit(): void; ngAfterViewInit(): void; ngAfterViewChecked(): void; onChange(_: any): void; onTouched: () => void; validate(control: FormControl): any; isRequired(propertyName: string): boolean; isCollapsedSection(): boolean; iShowMoreSection(): boolean; isAParentField(propertyName: string): boolean; getOptionalButtonLabel(): string; onChangeOptionalFieldsVisibility(): void; getFieldClasses(propertyName: string): any; fieldHasToBeCreated(propertyName: string): boolean; isRelatedField(propertyName: string): boolean; writeValue(value: any): void; onChangeProperty(value: any, property: string): void; registerOnChange(fn: (_: any) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(disable: boolean): void; ngOnDestroy(): void; isInADisabledSection(): boolean; isASwitchSection(): boolean; isAnAccordion(): boolean; onClickTitle(): void; isTheFirstField(propertyName: string): boolean; private getParentField; private fulfillDependencyVisibility; }