text-box.d.ts 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  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 DxTextBox from 'devextreme/ui/text_box';
  17. import { ControlValueAccessor } from '@angular/forms';
  18. import { DxComponent } from '../core/component';
  19. import { DxTemplateHost } from '../core/template-host';
  20. import { NestedOptionHost } from '../core/nested-option';
  21. import { WatcherHelper } from '../core/watcher-helper';
  22. import { IterableDifferHelper } from '../core/iterable-differ-helper';
  23. import { DxiButtonComponent } from './nested/button-dxi';
  24. /**
  25. * The TextBox is a widget that enables a user to enter and edit a single line of text.
  26. */
  27. export declare class DxTextBoxComponent extends DxComponent implements OnDestroy, ControlValueAccessor, OnChanges, DoCheck {
  28. private _watcherHelper;
  29. private _idh;
  30. instance: DxTextBox;
  31. /**
  32. * Specifies the shortcut key that sets focus on the widget.
  33. */
  34. accessKey: string;
  35. /**
  36. * Specifies whether or not the widget changes its state when interacting with a user.
  37. */
  38. activeStateEnabled: boolean;
  39. /**
  40. * Allows you to add custom buttons to the input text field.
  41. */
  42. buttons: Array<string | DevExpress.ui.dxTextEditorButton>;
  43. /**
  44. * Specifies whether the widget responds to user interaction.
  45. */
  46. disabled: boolean;
  47. /**
  48. * Specifies the attributes to be attached to the widget's root element.
  49. */
  50. elementAttr: any;
  51. /**
  52. * Specifies whether the widget can be focused using keyboard navigation.
  53. */
  54. focusStateEnabled: boolean;
  55. /**
  56. * Specifies the widget's height.
  57. */
  58. height: number | Function | string;
  59. /**
  60. * Specifies text for a hint that appears when a user pauses on the widget.
  61. */
  62. hint: string;
  63. /**
  64. * Specifies whether the widget changes its state when a user pauses on it.
  65. */
  66. hoverStateEnabled: boolean;
  67. /**
  68. * Specifies the attributes to be passed on to the underlying HTML element.
  69. */
  70. inputAttr: any;
  71. /**
  72. * Specifies whether the editor's value is valid.
  73. */
  74. isValid: boolean;
  75. /**
  76. * The editor mask that specifies the custom format of the entered string.
  77. */
  78. mask: string;
  79. /**
  80. * Specifies a mask placeholder character.
  81. */
  82. maskChar: string;
  83. /**
  84. * A message displayed when the entered text does not match the specified pattern.
  85. */
  86. maskInvalidMessage: string;
  87. /**
  88. * Specifies custom mask rules.
  89. */
  90. maskRules: any;
  91. /**
  92. * Specifies the maximum number of characters you can enter into the textbox.
  93. */
  94. maxLength: number | string;
  95. /**
  96. * The "mode" attribute value of the actual HTML input element representing the text box.
  97. */
  98. mode: string;
  99. /**
  100. * The value to be assigned to the `name` attribute of the underlying HTML element.
  101. */
  102. name: string;
  103. /**
  104. * The text displayed by the widget when the widget value is empty.
  105. */
  106. placeholder: string;
  107. /**
  108. * Specifies whether the editor is read-only.
  109. */
  110. readOnly: boolean;
  111. /**
  112. * Switches the widget to a right-to-left representation.
  113. */
  114. rtlEnabled: boolean;
  115. /**
  116. * Specifies whether to display the Clear button in the widget.
  117. */
  118. showClearButton: boolean;
  119. /**
  120. * Specifies when the widget shows the mask. Applies only if useMaskedValue is true.
  121. */
  122. showMaskMode: string;
  123. /**
  124. * Specifies whether or not the widget checks the inner text for spelling mistakes.
  125. */
  126. spellcheck: boolean;
  127. /**
  128. * Specifies how the widget's text field is styled.
  129. */
  130. stylingMode: string;
  131. /**
  132. * Specifies the number of the element when the Tab key is used for navigating.
  133. */
  134. tabIndex: number;
  135. /**
  136. * The read-only option that holds the text displayed by the widget input element.
  137. */
  138. text: string;
  139. /**
  140. * Specifies whether the value should contain mask characters or not.
  141. */
  142. useMaskedValue: boolean;
  143. /**
  144. * Specifies information on the validation error when using a custom validation engine. Should be changed at runtime along with the isValid option.
  145. */
  146. validationError: any;
  147. /**
  148. * Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed.
  149. */
  150. validationMessageMode: string;
  151. /**
  152. * Specifies a value the widget displays.
  153. */
  154. value: string;
  155. /**
  156. * Specifies the DOM events after which the widget's value should be updated.
  157. */
  158. valueChangeEvent: string;
  159. /**
  160. * Specifies whether the widget is visible.
  161. */
  162. visible: boolean;
  163. /**
  164. * Specifies the widget's width.
  165. */
  166. width: number | Function | string;
  167. /**
  168. * A function that is executed when the widget loses focus after the text field's content was changed using the keyboard.
  169. */
  170. onChange: EventEmitter<any>;
  171. /**
  172. * A function that is executed when the widget's content is ready and each time the content is changed.
  173. */
  174. onContentReady: EventEmitter<any>;
  175. /**
  176. * A function that is executed when the widget's input has been copied.
  177. */
  178. onCopy: EventEmitter<any>;
  179. /**
  180. * A function that is executed when the widget's input has been cut.
  181. */
  182. onCut: EventEmitter<any>;
  183. /**
  184. * A function that is executed before the widget is disposed of.
  185. */
  186. onDisposing: EventEmitter<any>;
  187. /**
  188. * A function that is executed when the Enter key has been pressed while the widget is focused.
  189. */
  190. onEnterKey: EventEmitter<any>;
  191. /**
  192. * A function that is executed when the widget gets focus.
  193. */
  194. onFocusIn: EventEmitter<any>;
  195. /**
  196. * A function that is executed when the widget loses focus.
  197. */
  198. onFocusOut: EventEmitter<any>;
  199. /**
  200. * A function used in JavaScript frameworks to save the widget instance.
  201. */
  202. onInitialized: EventEmitter<any>;
  203. /**
  204. * A function that is executed each time the widget's input is changed while the widget is focused.
  205. */
  206. onInput: EventEmitter<any>;
  207. /**
  208. * A function that is executed when a user is pressing a key on the keyboard.
  209. */
  210. onKeyDown: EventEmitter<any>;
  211. /**
  212. * A function that is executed when a user presses a key on the keyboard.
  213. */
  214. onKeyPress: EventEmitter<any>;
  215. /**
  216. * A function that is executed when a user releases a key on the keyboard.
  217. */
  218. onKeyUp: EventEmitter<any>;
  219. /**
  220. * A function that is executed after a widget option is changed.
  221. */
  222. onOptionChanged: EventEmitter<any>;
  223. /**
  224. * A function that is executed when the widget's input has been pasted.
  225. */
  226. onPaste: EventEmitter<any>;
  227. /**
  228. * A function that is executed after the widget's value is changed.
  229. */
  230. onValueChanged: EventEmitter<any>;
  231. /**
  232. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  233. */
  234. accessKeyChange: EventEmitter<string>;
  235. /**
  236. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  237. */
  238. activeStateEnabledChange: EventEmitter<boolean>;
  239. /**
  240. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  241. */
  242. buttonsChange: EventEmitter<Array<string | DevExpress.ui.dxTextEditorButton>>;
  243. /**
  244. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  245. */
  246. disabledChange: EventEmitter<boolean>;
  247. /**
  248. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  249. */
  250. elementAttrChange: EventEmitter<any>;
  251. /**
  252. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  253. */
  254. focusStateEnabledChange: EventEmitter<boolean>;
  255. /**
  256. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  257. */
  258. heightChange: EventEmitter<number | Function | string>;
  259. /**
  260. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  261. */
  262. hintChange: EventEmitter<string>;
  263. /**
  264. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  265. */
  266. hoverStateEnabledChange: EventEmitter<boolean>;
  267. /**
  268. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  269. */
  270. inputAttrChange: EventEmitter<any>;
  271. /**
  272. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  273. */
  274. isValidChange: EventEmitter<boolean>;
  275. /**
  276. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  277. */
  278. maskChange: EventEmitter<string>;
  279. /**
  280. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  281. */
  282. maskCharChange: EventEmitter<string>;
  283. /**
  284. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  285. */
  286. maskInvalidMessageChange: EventEmitter<string>;
  287. /**
  288. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  289. */
  290. maskRulesChange: EventEmitter<any>;
  291. /**
  292. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  293. */
  294. maxLengthChange: EventEmitter<number | string>;
  295. /**
  296. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  297. */
  298. modeChange: EventEmitter<string>;
  299. /**
  300. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  301. */
  302. nameChange: EventEmitter<string>;
  303. /**
  304. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  305. */
  306. placeholderChange: EventEmitter<string>;
  307. /**
  308. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  309. */
  310. readOnlyChange: EventEmitter<boolean>;
  311. /**
  312. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  313. */
  314. rtlEnabledChange: EventEmitter<boolean>;
  315. /**
  316. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  317. */
  318. showClearButtonChange: EventEmitter<boolean>;
  319. /**
  320. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  321. */
  322. showMaskModeChange: EventEmitter<string>;
  323. /**
  324. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  325. */
  326. spellcheckChange: EventEmitter<boolean>;
  327. /**
  328. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  329. */
  330. stylingModeChange: EventEmitter<string>;
  331. /**
  332. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  333. */
  334. tabIndexChange: EventEmitter<number>;
  335. /**
  336. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  337. */
  338. textChange: EventEmitter<string>;
  339. /**
  340. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  341. */
  342. useMaskedValueChange: EventEmitter<boolean>;
  343. /**
  344. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  345. */
  346. validationErrorChange: EventEmitter<any>;
  347. /**
  348. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  349. */
  350. validationMessageModeChange: EventEmitter<string>;
  351. /**
  352. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  353. */
  354. valueChange: EventEmitter<string>;
  355. /**
  356. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  357. */
  358. valueChangeEventChange: EventEmitter<string>;
  359. /**
  360. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  361. */
  362. visibleChange: EventEmitter<boolean>;
  363. /**
  364. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  365. */
  366. widthChange: EventEmitter<number | Function | string>;
  367. onBlur: EventEmitter<any>;
  368. change(_: any): void;
  369. touched: (_: any) => void;
  370. buttonsChildren: QueryList<DxiButtonComponent>;
  371. constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
  372. protected _createInstance(element: any, options: any): DxTextBox;
  373. writeValue(value: any): void;
  374. setDisabledState(isDisabled: boolean): void;
  375. registerOnChange(fn: (_: any) => void): void;
  376. registerOnTouched(fn: () => void): void;
  377. _createWidget(element: any): void;
  378. ngOnDestroy(): void;
  379. ngOnChanges(changes: SimpleChanges): void;
  380. setupChanges(prop: string, changes: SimpleChanges): void;
  381. ngDoCheck(): void;
  382. _setOption(name: string, value: any): void;
  383. }
  384. export declare class DxTextBoxModule {
  385. }