UNPKG

devextreme-angular

Version:

Angular UI and visualization components based on DevExtreme widgets

171 lines (136 loc) 7.89 kB
import { TransferState } from '@angular/platform-browser'; import { ElementRef, NgZone, OnDestroy, EventEmitter, OnChanges, DoCheck, SimpleChanges, QueryList } from '@angular/core'; import DevExpress from 'devextreme/bundles/dx.all'; import DxValidator from 'devextreme/ui/validator'; import { DxComponentExtension, DxTemplateHost, NestedOptionHost, IterableDifferHelper, WatcherHelper } from 'devextreme-angular/core'; import { DxiValidationRuleComponent } from 'devextreme-angular/ui/nested'; import * as i0 from "@angular/core"; import * as i1 from "devextreme-angular/ui/nested"; import * as i2 from "devextreme-angular/core"; import * as i3 from "@angular/platform-browser"; /** * A UI component that is used to validate the associated DevExtreme editors against the defined validation rules. */ export declare class DxValidatorComponent extends DxComponentExtension implements OnDestroy, OnChanges, DoCheck { private _watcherHelper; private _idh; instance: DxValidator; /** * An object that specifies what and when to validate, and how to apply the validation result. */ get adapter(): { applyValidationResults?: Function; bypass?: Function; focus?: Function; getValue?: Function; reset?: Function; validationRequestsCallbacks?: Array<Function>; }; set adapter(value: { applyValidationResults?: Function; bypass?: Function; focus?: Function; getValue?: Function; reset?: Function; validationRequestsCallbacks?: Array<Function>; }); /** * Specifies the global attributes to be attached to the UI component&apos;s container element. */ get elementAttr(): any; set elementAttr(value: any); /** * Specifies the UI component&apos;s height. */ get height(): number | Function | string | undefined; set height(value: number | Function | string | undefined); /** * Specifies the editor name to be used in the validation default messages. */ get name(): string; set name(value: string); /** * Specifies the validation group the editor will be related to. */ get validationGroup(): string; set validationGroup(value: string); /** * An array of validation rules to be checked for the editor with which the dxValidator object is associated. */ get validationRules(): Array<DevExpress.ui.RequiredRule | DevExpress.ui.NumericRule | DevExpress.ui.RangeRule | DevExpress.ui.StringLengthRule | DevExpress.ui.CustomRule | DevExpress.ui.CompareRule | DevExpress.ui.PatternRule | DevExpress.ui.EmailRule | DevExpress.ui.AsyncRule>; set validationRules(value: Array<DevExpress.ui.RequiredRule | DevExpress.ui.NumericRule | DevExpress.ui.RangeRule | DevExpress.ui.StringLengthRule | DevExpress.ui.CustomRule | DevExpress.ui.CompareRule | DevExpress.ui.PatternRule | DevExpress.ui.EmailRule | DevExpress.ui.AsyncRule>); /** * Specifies the UI component&apos;s width. */ get width(): number | Function | string | undefined; set width(value: number | Function | string | undefined); /** * A function that is executed before the UI component is disposed of. */ onDisposing: EventEmitter<any>; /** * A function used in JavaScript frameworks to save the UI component instance. */ onInitialized: EventEmitter<any>; /** * A function that is executed after a UI component property is changed. */ onOptionChanged: EventEmitter<any>; /** * A function that is executed after a value is validated. */ onValidated: EventEmitter<any>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ adapterChange: EventEmitter<{ applyValidationResults?: Function; bypass?: Function; focus?: Function; getValue?: Function; reset?: Function; validationRequestsCallbacks?: Array<Function>; }>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ elementAttrChange: EventEmitter<any>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ heightChange: EventEmitter<number | Function | string | undefined>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ nameChange: EventEmitter<string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ validationGroupChange: EventEmitter<string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ validationRulesChange: EventEmitter<Array<DevExpress.ui.RequiredRule | DevExpress.ui.NumericRule | DevExpress.ui.RangeRule | DevExpress.ui.StringLengthRule | DevExpress.ui.CustomRule | DevExpress.ui.CompareRule | DevExpress.ui.PatternRule | DevExpress.ui.EmailRule | DevExpress.ui.AsyncRule>>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ widthChange: EventEmitter<number | Function | string | undefined>; get validationRulesChildren(): QueryList<DxiValidationRuleComponent>; set validationRulesChildren(value: QueryList<DxiValidationRuleComponent>); parentElement: any; constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, parentOptionHost: NestedOptionHost, optionHost: NestedOptionHost, transferState: TransferState, platformId: any); protected _createInstance(element: any, options: any): DxValidator; private getParentElement; ngOnDestroy(): void; ngOnChanges(changes: SimpleChanges): void; setupChanges(prop: string, changes: SimpleChanges): void; ngDoCheck(): void; _setOption(name: string, value: any): void; static ɵfac: i0.ɵɵFactoryDeclaration<DxValidatorComponent, [null, null, null, null, null, { optional: true; host: true; skipSelf: true; }, null, null, null]>; static ɵcmp: i0.ɵɵComponentDeclaration<DxValidatorComponent, "dx-validator", never, { "adapter": "adapter"; "elementAttr": "elementAttr"; "height": "height"; "name": "name"; "validationGroup": "validationGroup"; "validationRules": "validationRules"; "width": "width"; }, { "onDisposing": "onDisposing"; "onInitialized": "onInitialized"; "onOptionChanged": "onOptionChanged"; "onValidated": "onValidated"; "adapterChange": "adapterChange"; "elementAttrChange": "elementAttrChange"; "heightChange": "heightChange"; "nameChange": "nameChange"; "validationGroupChange": "validationGroupChange"; "validationRulesChange": "validationRulesChange"; "widthChange": "widthChange"; }, ["validationRulesChildren"], never>; } export declare class DxValidatorModule { static ɵfac: i0.ɵɵFactoryDeclaration<DxValidatorModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<DxValidatorModule, [typeof DxValidatorComponent], [typeof i1.DxoAdapterModule, typeof i1.DxiValidationRuleModule, typeof i2.DxIntegrationModule, typeof i2.DxTemplateModule, typeof i3.BrowserTransferStateModule], [typeof DxValidatorComponent, typeof i1.DxoAdapterModule, typeof i1.DxiValidationRuleModule, typeof i2.DxTemplateModule]>; static ɵinj: i0.ɵɵInjectorDeclaration<DxValidatorModule>; }