number-box.d.ts 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  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 DxNumberBox from 'devextreme/ui/number_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 NumberBox is a widget that displays a numeric value and allows a user to modify it by typing in a value, and incrementing or decrementing it using the keyboard or mouse.
  26. */
  27. export declare class DxNumberBoxComponent extends DxComponent implements OnDestroy, ControlValueAccessor, OnChanges, DoCheck {
  28. private _watcherHelper;
  29. private _idh;
  30. instance: DxNumberBox;
  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 value's display format and controls user input accordingly.
  57. */
  58. format: DevExpress.ui.format | string;
  59. /**
  60. * Specifies the widget's height.
  61. */
  62. height: number | Function | string;
  63. /**
  64. * Specifies text for a hint that appears when a user pauses on the widget.
  65. */
  66. hint: string;
  67. /**
  68. * Specifies whether the widget changes its state when a user pauses on it.
  69. */
  70. hoverStateEnabled: boolean;
  71. /**
  72. * Specifies the attributes to be passed on to the underlying HTML element.
  73. */
  74. inputAttr: any;
  75. /**
  76. * Specifies the text of the message displayed if the specified value is not a number.
  77. */
  78. invalidValueMessage: string;
  79. /**
  80. * Specifies whether the editor's value is valid.
  81. */
  82. isValid: boolean;
  83. /**
  84. * The maximum value accepted by the number box.
  85. */
  86. max: number;
  87. /**
  88. * The minimum value accepted by the number box.
  89. */
  90. min: number;
  91. /**
  92. * Specifies the value to be passed to the type attribute of the underlying `` element.
  93. */
  94. mode: string;
  95. /**
  96. * The value to be assigned to the `name` attribute of the underlying HTML element.
  97. */
  98. name: string;
  99. /**
  100. * The text displayed by the widget when the widget value is empty.
  101. */
  102. placeholder: string;
  103. /**
  104. * Specifies whether the editor is read-only.
  105. */
  106. readOnly: boolean;
  107. /**
  108. * Switches the widget to a right-to-left representation.
  109. */
  110. rtlEnabled: boolean;
  111. /**
  112. * Specifies whether to display the Clear button in the widget.
  113. */
  114. showClearButton: boolean;
  115. /**
  116. * Specifies whether to show the buttons that change the value by a step.
  117. */
  118. showSpinButtons: boolean;
  119. /**
  120. * Specifies how much the widget's value changes when using the spin buttons, Up/Down arrow keys, or mouse wheel.
  121. */
  122. step: number;
  123. /**
  124. * Specifies how the widget's text field is styled.
  125. */
  126. stylingMode: string;
  127. /**
  128. * Specifies the number of the element when the Tab key is used for navigating.
  129. */
  130. tabIndex: number;
  131. /**
  132. * The read-only option that holds the text displayed by the widget input element.
  133. */
  134. text: string;
  135. /**
  136. * Specifies whether to use touch friendly spin buttons. Applies only if showSpinButtons is true.
  137. */
  138. useLargeSpinButtons: boolean;
  139. /**
  140. * Specifies information on the validation error when using a custom validation engine. Should be changed at runtime along with the isValid option.
  141. */
  142. validationError: any;
  143. /**
  144. * Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed.
  145. */
  146. validationMessageMode: string;
  147. /**
  148. * The current number box value.
  149. */
  150. value: number;
  151. /**
  152. * Specifies the DOM events after which the widget's value should be updated.
  153. */
  154. valueChangeEvent: string;
  155. /**
  156. * Specifies whether the widget is visible.
  157. */
  158. visible: boolean;
  159. /**
  160. * Specifies the widget's width.
  161. */
  162. width: number | Function | string;
  163. /**
  164. * A function that is executed when the widget loses focus after the text field's content was changed using the keyboard.
  165. */
  166. onChange: EventEmitter<any>;
  167. /**
  168. * A function that is executed when the widget's content is ready and each time the content is changed.
  169. */
  170. onContentReady: EventEmitter<any>;
  171. /**
  172. * A function that is executed when the widget's input has been copied.
  173. */
  174. onCopy: EventEmitter<any>;
  175. /**
  176. * A function that is executed when the widget's input has been cut.
  177. */
  178. onCut: EventEmitter<any>;
  179. /**
  180. * A function that is executed before the widget is disposed of.
  181. */
  182. onDisposing: EventEmitter<any>;
  183. /**
  184. * A function that is executed when the Enter key has been pressed while the widget is focused.
  185. */
  186. onEnterKey: EventEmitter<any>;
  187. /**
  188. * A function that is executed when the widget gets focus.
  189. */
  190. onFocusIn: EventEmitter<any>;
  191. /**
  192. * A function that is executed when the widget loses focus.
  193. */
  194. onFocusOut: EventEmitter<any>;
  195. /**
  196. * A function used in JavaScript frameworks to save the widget instance.
  197. */
  198. onInitialized: EventEmitter<any>;
  199. /**
  200. * A function that is executed each time the widget's input is changed while the widget is focused.
  201. */
  202. onInput: EventEmitter<any>;
  203. /**
  204. * A function that is executed when a user is pressing a key on the keyboard.
  205. */
  206. onKeyDown: EventEmitter<any>;
  207. /**
  208. * A function that is executed when a user presses a key on the keyboard.
  209. */
  210. onKeyPress: EventEmitter<any>;
  211. /**
  212. * A function that is executed when a user releases a key on the keyboard.
  213. */
  214. onKeyUp: EventEmitter<any>;
  215. /**
  216. * A function that is executed after a widget option is changed.
  217. */
  218. onOptionChanged: EventEmitter<any>;
  219. /**
  220. * A function that is executed when the widget's input has been pasted.
  221. */
  222. onPaste: EventEmitter<any>;
  223. /**
  224. * A function that is executed after the widget's value is changed.
  225. */
  226. onValueChanged: EventEmitter<any>;
  227. /**
  228. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  229. */
  230. accessKeyChange: EventEmitter<string>;
  231. /**
  232. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  233. */
  234. activeStateEnabledChange: EventEmitter<boolean>;
  235. /**
  236. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  237. */
  238. buttonsChange: EventEmitter<Array<string | DevExpress.ui.dxTextEditorButton>>;
  239. /**
  240. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  241. */
  242. disabledChange: EventEmitter<boolean>;
  243. /**
  244. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  245. */
  246. elementAttrChange: EventEmitter<any>;
  247. /**
  248. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  249. */
  250. focusStateEnabledChange: EventEmitter<boolean>;
  251. /**
  252. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  253. */
  254. formatChange: EventEmitter<DevExpress.ui.format | string>;
  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. invalidValueMessageChange: EventEmitter<string>;
  275. /**
  276. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  277. */
  278. isValidChange: EventEmitter<boolean>;
  279. /**
  280. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  281. */
  282. maxChange: EventEmitter<number>;
  283. /**
  284. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  285. */
  286. minChange: EventEmitter<number>;
  287. /**
  288. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  289. */
  290. modeChange: EventEmitter<string>;
  291. /**
  292. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  293. */
  294. nameChange: EventEmitter<string>;
  295. /**
  296. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  297. */
  298. placeholderChange: EventEmitter<string>;
  299. /**
  300. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  301. */
  302. readOnlyChange: EventEmitter<boolean>;
  303. /**
  304. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  305. */
  306. rtlEnabledChange: EventEmitter<boolean>;
  307. /**
  308. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  309. */
  310. showClearButtonChange: EventEmitter<boolean>;
  311. /**
  312. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  313. */
  314. showSpinButtonsChange: EventEmitter<boolean>;
  315. /**
  316. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  317. */
  318. stepChange: EventEmitter<number>;
  319. /**
  320. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  321. */
  322. stylingModeChange: EventEmitter<string>;
  323. /**
  324. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  325. */
  326. tabIndexChange: EventEmitter<number>;
  327. /**
  328. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  329. */
  330. textChange: EventEmitter<string>;
  331. /**
  332. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  333. */
  334. useLargeSpinButtonsChange: EventEmitter<boolean>;
  335. /**
  336. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  337. */
  338. validationErrorChange: EventEmitter<any>;
  339. /**
  340. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  341. */
  342. validationMessageModeChange: EventEmitter<string>;
  343. /**
  344. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  345. */
  346. valueChange: EventEmitter<number>;
  347. /**
  348. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  349. */
  350. valueChangeEventChange: EventEmitter<string>;
  351. /**
  352. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  353. */
  354. visibleChange: EventEmitter<boolean>;
  355. /**
  356. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  357. */
  358. widthChange: EventEmitter<number | Function | string>;
  359. onBlur: EventEmitter<any>;
  360. change(_: any): void;
  361. touched: (_: any) => void;
  362. buttonsChildren: QueryList<DxiButtonComponent>;
  363. constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
  364. protected _createInstance(element: any, options: any): DxNumberBox;
  365. writeValue(value: any): void;
  366. setDisabledState(isDisabled: boolean): void;
  367. registerOnChange(fn: (_: any) => void): void;
  368. registerOnTouched(fn: () => void): void;
  369. _createWidget(element: any): void;
  370. ngOnDestroy(): void;
  371. ngOnChanges(changes: SimpleChanges): void;
  372. setupChanges(prop: string, changes: SimpleChanges): void;
  373. ngDoCheck(): void;
  374. _setOption(name: string, value: any): void;
  375. }
  376. export declare class DxNumberBoxModule {
  377. }