validator.d.ts 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*!
  2. * devextreme-angular
  3. * Version: 19.1.16
  4. * Build date: Tue Oct 18 2022
  5. *
  6. * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
  7. *
  8. * This software may be modified and distributed under the terms
  9. * of the MIT license. See the LICENSE file in the root of the project for details.
  10. *
  11. * https://github.com/DevExpress/devextreme-angular
  12. */
  13. import { TransferState } from '@angular/platform-browser';
  14. import { ElementRef, NgZone, OnDestroy, EventEmitter, OnChanges, DoCheck, SimpleChanges, QueryList } from '@angular/core';
  15. import DevExpress from 'devextreme/bundles/dx.all';
  16. import DxValidator from 'devextreme/ui/validator';
  17. import { DxComponentExtension } from '../core/component';
  18. import { DxTemplateHost } from '../core/template-host';
  19. import { NestedOptionHost } from '../core/nested-option';
  20. import { WatcherHelper } from '../core/watcher-helper';
  21. import { IterableDifferHelper } from '../core/iterable-differ-helper';
  22. import { DxiValidationRuleComponent } from './nested/validation-rule-dxi';
  23. /**
  24. * A widget that is used to validate the associated DevExtreme editors against the defined validation rules.
  25. */
  26. export declare class DxValidatorComponent extends DxComponentExtension implements OnDestroy, OnChanges, DoCheck {
  27. private _watcherHelper;
  28. private _idh;
  29. instance: DxValidator;
  30. /**
  31. * An object that specifies what and when to validate, and how to apply the validation result.
  32. */
  33. adapter: {
  34. applyValidationResults?: Function;
  35. bypass?: Function;
  36. focus?: Function;
  37. getValue?: Function;
  38. reset?: Function;
  39. validationRequestsCallbacks?: any | Array<Function>;
  40. };
  41. /**
  42. * Specifies the attributes to be attached to the widget's root element.
  43. */
  44. elementAttr: any;
  45. /**
  46. * Specifies the widget's height.
  47. */
  48. height: number | Function | string;
  49. /**
  50. * Specifies the editor name to be used in the validation default messages.
  51. */
  52. name: string;
  53. /**
  54. * Specifies the validation group the editor will be related to.
  55. */
  56. validationGroup: string;
  57. /**
  58. * An array of validation rules to be checked for the editor with which the dxValidator object is associated.
  59. */
  60. 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>;
  61. /**
  62. * Specifies the widget's width.
  63. */
  64. width: number | Function | string;
  65. /**
  66. * A function that is executed before the widget is disposed of.
  67. */
  68. onDisposing: EventEmitter<any>;
  69. /**
  70. * A function used in JavaScript frameworks to save the widget instance.
  71. */
  72. onInitialized: EventEmitter<any>;
  73. /**
  74. * A function that is executed after a widget option is changed.
  75. */
  76. onOptionChanged: EventEmitter<any>;
  77. /**
  78. * A function that is executed after a value is validated.
  79. */
  80. onValidated: EventEmitter<any>;
  81. /**
  82. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  83. */
  84. adapterChange: EventEmitter<{
  85. applyValidationResults?: Function;
  86. bypass?: Function;
  87. focus?: Function;
  88. getValue?: Function;
  89. reset?: Function;
  90. validationRequestsCallbacks?: any | Array<Function>;
  91. }>;
  92. /**
  93. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  94. */
  95. elementAttrChange: EventEmitter<any>;
  96. /**
  97. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  98. */
  99. heightChange: EventEmitter<number | Function | string>;
  100. /**
  101. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  102. */
  103. nameChange: EventEmitter<string>;
  104. /**
  105. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  106. */
  107. validationGroupChange: EventEmitter<string>;
  108. /**
  109. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  110. */
  111. 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>>;
  112. /**
  113. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  114. */
  115. widthChange: EventEmitter<number | Function | string>;
  116. validationRulesChildren: QueryList<DxiValidationRuleComponent>;
  117. parentElement: any;
  118. constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, parentOptionHost: NestedOptionHost, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
  119. protected _createInstance(element: any, options: any): DxValidator;
  120. private getParentElement(host);
  121. ngOnDestroy(): void;
  122. ngOnChanges(changes: SimpleChanges): void;
  123. setupChanges(prop: string, changes: SimpleChanges): void;
  124. ngDoCheck(): void;
  125. _setOption(name: string, value: any): void;
  126. }
  127. export declare class DxValidatorModule {
  128. }