drop-down-box.d.ts 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  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 DxDropDownBox from 'devextreme/ui/drop_down_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. import { DxiItemComponent } from './nested/item-dxi';
  25. /**
  26. * The DropDownBox widget consists of a text field, which displays the current value, and a drop-down field, which can contain any UI element.
  27. */
  28. export declare class DxDropDownBoxComponent extends DxComponent implements OnDestroy, ControlValueAccessor, OnChanges, DoCheck {
  29. private _watcherHelper;
  30. private _idh;
  31. instance: DxDropDownBox;
  32. /**
  33. * Specifies whether the widget allows a user to enter a custom value.
  34. */
  35. acceptCustomValue: boolean;
  36. /**
  37. * Specifies the shortcut key that sets focus on the widget.
  38. */
  39. accessKey: string;
  40. /**
  41. * Specifies whether or not the widget changes its state when interacting with a user.
  42. */
  43. activeStateEnabled: boolean;
  44. /**
  45. * Allows you to add custom buttons to the input text field.
  46. */
  47. buttons: Array<string | DevExpress.ui.dxTextEditorButton>;
  48. /**
  49. * Specifies a custom template for the drop-down content.
  50. */
  51. contentTemplate: any;
  52. /**
  53. * Binds the widget to data.
  54. */
  55. dataSource: DevExpress.data.DataSource | DevExpress.data.DataSourceOptions | string | Array<DevExpress.ui.CollectionWidgetItem | any>;
  56. /**
  57. * Specifies whether to render the drop-down field's content when it is displayed. If false, the content is rendered immediately.
  58. */
  59. deferRendering: boolean;
  60. /**
  61. * Specifies whether the widget responds to user interaction.
  62. */
  63. disabled: boolean;
  64. /**
  65. * Specifies the data field whose values should be displayed.
  66. */
  67. displayExpr: Function | string;
  68. /**
  69. * Specifies a custom template for the drop-down button.
  70. */
  71. dropDownButtonTemplate: any;
  72. /**
  73. * Configures the drop-down field which holds the content.
  74. */
  75. dropDownOptions: DevExpress.ui.dxPopupOptions;
  76. /**
  77. * Specifies the attributes to be attached to the widget's root element.
  78. */
  79. elementAttr: any;
  80. /**
  81. * Specifies a custom template for the text field. Must contain the TextBox widget.
  82. */
  83. fieldTemplate: any;
  84. /**
  85. * Specifies whether the widget can be focused using keyboard navigation.
  86. */
  87. focusStateEnabled: boolean;
  88. /**
  89. * Specifies the widget's height.
  90. */
  91. height: number | Function | string;
  92. /**
  93. * Specifies text for a hint that appears when a user pauses on the widget.
  94. */
  95. hint: string;
  96. /**
  97. * Specifies whether the widget changes its state when a user pauses on it.
  98. */
  99. hoverStateEnabled: boolean;
  100. /**
  101. * Specifies the attributes to be passed on to the underlying HTML element.
  102. */
  103. inputAttr: any;
  104. /**
  105. * Specifies whether the editor's value is valid.
  106. */
  107. isValid: boolean;
  108. /**
  109. * An array of items displayed by the widget.
  110. */
  111. items: Array<any | {
  112. disabled?: boolean;
  113. html?: string;
  114. template?: any;
  115. text?: string;
  116. visible?: boolean;
  117. }>;
  118. /**
  119. * Specifies the maximum number of characters you can enter into the textbox.
  120. */
  121. maxLength: number | string;
  122. /**
  123. * The value to be assigned to the `name` attribute of the underlying HTML element.
  124. */
  125. name: string;
  126. /**
  127. * Specifies whether or not the drop-down editor is displayed.
  128. */
  129. opened: boolean;
  130. /**
  131. * Specifies whether a user can open the drop-down list by clicking a text field.
  132. */
  133. openOnFieldClick: boolean;
  134. /**
  135. * The text displayed by the widget when the widget value is empty.
  136. */
  137. placeholder: string;
  138. /**
  139. * Specifies whether the editor is read-only.
  140. */
  141. readOnly: boolean;
  142. /**
  143. * Switches the widget to a right-to-left representation.
  144. */
  145. rtlEnabled: boolean;
  146. /**
  147. * Specifies whether to display the Clear button in the widget.
  148. */
  149. showClearButton: boolean;
  150. /**
  151. * Specifies whether the drop-down button is visible.
  152. */
  153. showDropDownButton: boolean;
  154. /**
  155. * Specifies how the widget's text field is styled.
  156. */
  157. stylingMode: string;
  158. /**
  159. * Specifies the number of the element when the Tab key is used for navigating.
  160. */
  161. tabIndex: number;
  162. /**
  163. * The read-only option that holds the text displayed by the widget input element.
  164. */
  165. text: string;
  166. /**
  167. * Specifies information on the validation error when using a custom validation engine. Should be changed at runtime along with the isValid option.
  168. */
  169. validationError: any;
  170. /**
  171. * Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed.
  172. */
  173. validationMessageMode: string;
  174. /**
  175. * Specifies the currently selected value. May be an object if dataSource contains objects and valueExpr is not set.
  176. */
  177. value: any;
  178. /**
  179. * Specifies the DOM events after which the widget's value should be updated.
  180. */
  181. valueChangeEvent: string;
  182. /**
  183. * Specifies which data field provides unique values to the widget's value.
  184. */
  185. valueExpr: Function | string;
  186. /**
  187. * Specifies whether the widget is visible.
  188. */
  189. visible: boolean;
  190. /**
  191. * Specifies the widget's width.
  192. */
  193. width: number | Function | string;
  194. /**
  195. * A function that is executed when the widget loses focus after the text field's content was changed using the keyboard.
  196. */
  197. onChange: EventEmitter<any>;
  198. /**
  199. * A function that is executed once the drop-down editor is closed.
  200. */
  201. onClosed: EventEmitter<any>;
  202. /**
  203. * A function that is executed when the widget's input has been copied.
  204. */
  205. onCopy: EventEmitter<any>;
  206. /**
  207. * A function that is executed when the widget's input has been cut.
  208. */
  209. onCut: EventEmitter<any>;
  210. /**
  211. * A function that is executed before the widget is disposed of.
  212. */
  213. onDisposing: EventEmitter<any>;
  214. /**
  215. * A function that is executed when the Enter key has been pressed while the widget is focused.
  216. */
  217. onEnterKey: EventEmitter<any>;
  218. /**
  219. * A function that is executed when the widget gets focus.
  220. */
  221. onFocusIn: EventEmitter<any>;
  222. /**
  223. * A function that is executed when the widget loses focus.
  224. */
  225. onFocusOut: EventEmitter<any>;
  226. /**
  227. * A function used in JavaScript frameworks to save the widget instance.
  228. */
  229. onInitialized: EventEmitter<any>;
  230. /**
  231. * A function that is executed each time the widget's input is changed while the widget is focused.
  232. */
  233. onInput: EventEmitter<any>;
  234. /**
  235. * A function that is executed when a user is pressing a key on the keyboard.
  236. */
  237. onKeyDown: EventEmitter<any>;
  238. /**
  239. * A function that is executed when a user presses a key on the keyboard.
  240. */
  241. onKeyPress: EventEmitter<any>;
  242. /**
  243. * A function that is executed when a user releases a key on the keyboard.
  244. */
  245. onKeyUp: EventEmitter<any>;
  246. /**
  247. * A function that is executed once the drop-down editor is opened.
  248. */
  249. onOpened: EventEmitter<any>;
  250. /**
  251. * A function that is executed after a widget option is changed.
  252. */
  253. onOptionChanged: EventEmitter<any>;
  254. /**
  255. * A function that is executed when the widget's input has been pasted.
  256. */
  257. onPaste: EventEmitter<any>;
  258. /**
  259. * A function that is executed after the widget's value is changed.
  260. */
  261. onValueChanged: EventEmitter<any>;
  262. /**
  263. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  264. */
  265. acceptCustomValueChange: EventEmitter<boolean>;
  266. /**
  267. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  268. */
  269. accessKeyChange: EventEmitter<string>;
  270. /**
  271. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  272. */
  273. activeStateEnabledChange: EventEmitter<boolean>;
  274. /**
  275. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  276. */
  277. buttonsChange: EventEmitter<Array<string | DevExpress.ui.dxTextEditorButton>>;
  278. /**
  279. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  280. */
  281. contentTemplateChange: EventEmitter<any>;
  282. /**
  283. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  284. */
  285. dataSourceChange: EventEmitter<DevExpress.data.DataSource | DevExpress.data.DataSourceOptions | string | Array<DevExpress.ui.CollectionWidgetItem | any>>;
  286. /**
  287. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  288. */
  289. deferRenderingChange: EventEmitter<boolean>;
  290. /**
  291. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  292. */
  293. disabledChange: EventEmitter<boolean>;
  294. /**
  295. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  296. */
  297. displayExprChange: EventEmitter<Function | string>;
  298. /**
  299. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  300. */
  301. dropDownButtonTemplateChange: EventEmitter<any>;
  302. /**
  303. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  304. */
  305. dropDownOptionsChange: EventEmitter<DevExpress.ui.dxPopupOptions>;
  306. /**
  307. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  308. */
  309. elementAttrChange: EventEmitter<any>;
  310. /**
  311. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  312. */
  313. fieldTemplateChange: EventEmitter<any>;
  314. /**
  315. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  316. */
  317. focusStateEnabledChange: EventEmitter<boolean>;
  318. /**
  319. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  320. */
  321. heightChange: EventEmitter<number | Function | string>;
  322. /**
  323. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  324. */
  325. hintChange: EventEmitter<string>;
  326. /**
  327. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  328. */
  329. hoverStateEnabledChange: EventEmitter<boolean>;
  330. /**
  331. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  332. */
  333. inputAttrChange: EventEmitter<any>;
  334. /**
  335. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  336. */
  337. isValidChange: EventEmitter<boolean>;
  338. /**
  339. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  340. */
  341. itemsChange: EventEmitter<Array<any | {
  342. disabled?: boolean;
  343. html?: string;
  344. template?: any;
  345. text?: string;
  346. visible?: boolean;
  347. }>>;
  348. /**
  349. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  350. */
  351. maxLengthChange: EventEmitter<number | string>;
  352. /**
  353. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  354. */
  355. nameChange: EventEmitter<string>;
  356. /**
  357. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  358. */
  359. openedChange: EventEmitter<boolean>;
  360. /**
  361. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  362. */
  363. openOnFieldClickChange: EventEmitter<boolean>;
  364. /**
  365. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  366. */
  367. placeholderChange: EventEmitter<string>;
  368. /**
  369. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  370. */
  371. readOnlyChange: EventEmitter<boolean>;
  372. /**
  373. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  374. */
  375. rtlEnabledChange: EventEmitter<boolean>;
  376. /**
  377. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  378. */
  379. showClearButtonChange: EventEmitter<boolean>;
  380. /**
  381. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  382. */
  383. showDropDownButtonChange: EventEmitter<boolean>;
  384. /**
  385. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  386. */
  387. stylingModeChange: EventEmitter<string>;
  388. /**
  389. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  390. */
  391. tabIndexChange: EventEmitter<number>;
  392. /**
  393. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  394. */
  395. textChange: EventEmitter<string>;
  396. /**
  397. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  398. */
  399. validationErrorChange: EventEmitter<any>;
  400. /**
  401. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  402. */
  403. validationMessageModeChange: EventEmitter<string>;
  404. /**
  405. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  406. */
  407. valueChange: EventEmitter<any>;
  408. /**
  409. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  410. */
  411. valueChangeEventChange: EventEmitter<string>;
  412. /**
  413. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  414. */
  415. valueExprChange: EventEmitter<Function | string>;
  416. /**
  417. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  418. */
  419. visibleChange: EventEmitter<boolean>;
  420. /**
  421. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  422. */
  423. widthChange: EventEmitter<number | Function | string>;
  424. onBlur: EventEmitter<any>;
  425. change(_: any): void;
  426. touched: (_: any) => void;
  427. buttonsChildren: QueryList<DxiButtonComponent>;
  428. itemsChildren: QueryList<DxiItemComponent>;
  429. constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
  430. protected _createInstance(element: any, options: any): DxDropDownBox;
  431. writeValue(value: any): void;
  432. setDisabledState(isDisabled: boolean): void;
  433. registerOnChange(fn: (_: any) => void): void;
  434. registerOnTouched(fn: () => void): void;
  435. _createWidget(element: any): void;
  436. ngOnDestroy(): void;
  437. ngOnChanges(changes: SimpleChanges): void;
  438. setupChanges(prop: string, changes: SimpleChanges): void;
  439. ngDoCheck(): void;
  440. _setOption(name: string, value: any): void;
  441. }
  442. export declare class DxDropDownBoxModule {
  443. }