drop-down-button.d.ts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  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 DxDropDownButton from 'devextreme/ui/drop_down_button';
  17. import { DxComponent } 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 { DxiItemComponent } from './nested/item-dxi';
  23. /**
  24. * The DropDownButton is a button that opens a drop-down menu.
  25. */
  26. export declare class DxDropDownButtonComponent extends DxComponent implements OnDestroy, OnChanges, DoCheck {
  27. private _watcherHelper;
  28. private _idh;
  29. instance: DxDropDownButton;
  30. /**
  31. * Specifies the shortcut key that sets focus on the widget.
  32. */
  33. accessKey: string;
  34. /**
  35. * Specifies whether or not the widget changes its state when interacting with a user.
  36. */
  37. activeStateEnabled: boolean;
  38. /**
  39. * Provides data for the drop-down menu.
  40. */
  41. dataSource: DevExpress.data.DataSource | DevExpress.data.DataSourceOptions | string | Array<DevExpress.ui.CollectionWidgetItem | any>;
  42. /**
  43. * Specifies whether to wait until the drop-down menu is opened the first time to render its content.
  44. */
  45. deferRendering: boolean;
  46. /**
  47. * Specifies whether the widget responds to user interaction.
  48. */
  49. disabled: boolean;
  50. /**
  51. * Specifies the data field whose values should be displayed in the drop-down menu.
  52. */
  53. displayExpr: Function | string;
  54. /**
  55. * Specifies custom content for the drop-down field.
  56. */
  57. dropDownContentTemplate: any;
  58. /**
  59. * Configures the drop-down field.
  60. */
  61. dropDownOptions: DevExpress.ui.dxPopupOptions;
  62. /**
  63. * Specifies the attributes to be attached to the widget's root element.
  64. */
  65. elementAttr: any;
  66. /**
  67. * Specifies whether users can use keyboard to focus the widget.
  68. */
  69. focusStateEnabled: boolean;
  70. /**
  71. * Specifies the widget's height.
  72. */
  73. height: number | Function | string;
  74. /**
  75. * Specifies text for a hint that appears when a user pauses on the widget.
  76. */
  77. hint: string;
  78. /**
  79. * Specifies whether the widget changes its state when a user hovers the mouse pointer over it.
  80. */
  81. hoverStateEnabled: boolean;
  82. /**
  83. * Specifies the button's icon.
  84. */
  85. icon: string;
  86. /**
  87. * Provides drop-down menu items.
  88. */
  89. items: Array<any | {
  90. badge?: string;
  91. disabled?: boolean;
  92. html?: string;
  93. icon?: string;
  94. template?: any;
  95. text?: string;
  96. visible?: boolean;
  97. }>;
  98. /**
  99. * Specifies a custom template for drop-down menu items.
  100. */
  101. itemTemplate: any;
  102. /**
  103. * Specifies which data field provides keys used to distinguish between the selected drop-down menu items.
  104. */
  105. keyExpr: string;
  106. /**
  107. * Specifies text or HTML markup displayed in the drop-down menu when it does not contain any items.
  108. */
  109. noDataText: string;
  110. /**
  111. * Specifies whether the drop-down menu is opened.
  112. */
  113. opened: boolean;
  114. /**
  115. * Switches the widget to a right-to-left representation.
  116. */
  117. rtlEnabled: boolean;
  118. /**
  119. * Contains the selected item's data. Available when useSelectMode is true.
  120. */
  121. selectedItem: any | number | string;
  122. /**
  123. * Contains the selected item's key and allows you to specify the initially selected item. Applies when useSelectMode is true.
  124. */
  125. selectedItemKey: number | string;
  126. /**
  127. * Specifies whether the arrow icon should be displayed.
  128. */
  129. showArrowIcon: boolean;
  130. /**
  131. * Specifies whether to split the button in two: one executes an action, the other opens and closes the drop-down menu.
  132. */
  133. splitButton: boolean;
  134. /**
  135. * Specifies how the button is styled.
  136. */
  137. stylingMode: string;
  138. /**
  139. * Specifies the number of the element when the Tab key is used for navigating.
  140. */
  141. tabIndex: number;
  142. /**
  143. * Specifies the button's text. Applies only if useSelectMode is false.
  144. */
  145. text: string;
  146. /**
  147. * Specifies whether the widget stores the selected drop-down menu item.
  148. */
  149. useSelectMode: boolean;
  150. /**
  151. * Specifies whether the widget is visible.
  152. */
  153. visible: boolean;
  154. /**
  155. * Specifies the widget's width.
  156. */
  157. width: number | Function | string;
  158. /**
  159. * A function that is executed when the button is clicked or tapped. If splitButton is true, this function is executed for the action button only.
  160. */
  161. onButtonClick: EventEmitter<any>;
  162. /**
  163. * A function that is executed when the widget's content is ready and each time the content is changed.
  164. */
  165. onContentReady: EventEmitter<any>;
  166. /**
  167. * A function that is executed before the widget is disposed of.
  168. */
  169. onDisposing: EventEmitter<any>;
  170. /**
  171. * A function used in JavaScript frameworks to save the widget instance.
  172. */
  173. onInitialized: EventEmitter<any>;
  174. /**
  175. * A function that is executed when a drop-down menu item is clicked.
  176. */
  177. onItemClick: EventEmitter<any>;
  178. /**
  179. * A function that is executed after a widget option is changed.
  180. */
  181. onOptionChanged: EventEmitter<any>;
  182. /**
  183. * A function that is executed when an item is selected or selection is canceled. In effect when useSelectMode is true.
  184. */
  185. onSelectionChanged: EventEmitter<any>;
  186. /**
  187. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  188. */
  189. accessKeyChange: EventEmitter<string>;
  190. /**
  191. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  192. */
  193. activeStateEnabledChange: EventEmitter<boolean>;
  194. /**
  195. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  196. */
  197. dataSourceChange: EventEmitter<DevExpress.data.DataSource | DevExpress.data.DataSourceOptions | string | Array<DevExpress.ui.CollectionWidgetItem | any>>;
  198. /**
  199. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  200. */
  201. deferRenderingChange: EventEmitter<boolean>;
  202. /**
  203. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  204. */
  205. disabledChange: EventEmitter<boolean>;
  206. /**
  207. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  208. */
  209. displayExprChange: EventEmitter<Function | string>;
  210. /**
  211. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  212. */
  213. dropDownContentTemplateChange: EventEmitter<any>;
  214. /**
  215. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  216. */
  217. dropDownOptionsChange: EventEmitter<DevExpress.ui.dxPopupOptions>;
  218. /**
  219. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  220. */
  221. elementAttrChange: EventEmitter<any>;
  222. /**
  223. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  224. */
  225. focusStateEnabledChange: EventEmitter<boolean>;
  226. /**
  227. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  228. */
  229. heightChange: EventEmitter<number | Function | string>;
  230. /**
  231. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  232. */
  233. hintChange: EventEmitter<string>;
  234. /**
  235. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  236. */
  237. hoverStateEnabledChange: EventEmitter<boolean>;
  238. /**
  239. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  240. */
  241. iconChange: EventEmitter<string>;
  242. /**
  243. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  244. */
  245. itemsChange: EventEmitter<Array<any | {
  246. badge?: string;
  247. disabled?: boolean;
  248. html?: string;
  249. icon?: string;
  250. template?: any;
  251. text?: string;
  252. visible?: boolean;
  253. }>>;
  254. /**
  255. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  256. */
  257. itemTemplateChange: EventEmitter<any>;
  258. /**
  259. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  260. */
  261. keyExprChange: EventEmitter<string>;
  262. /**
  263. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  264. */
  265. noDataTextChange: EventEmitter<string>;
  266. /**
  267. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  268. */
  269. openedChange: EventEmitter<boolean>;
  270. /**
  271. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  272. */
  273. rtlEnabledChange: EventEmitter<boolean>;
  274. /**
  275. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  276. */
  277. selectedItemChange: EventEmitter<any | number | string>;
  278. /**
  279. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  280. */
  281. selectedItemKeyChange: EventEmitter<number | string>;
  282. /**
  283. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  284. */
  285. showArrowIconChange: EventEmitter<boolean>;
  286. /**
  287. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  288. */
  289. splitButtonChange: EventEmitter<boolean>;
  290. /**
  291. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  292. */
  293. stylingModeChange: EventEmitter<string>;
  294. /**
  295. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  296. */
  297. tabIndexChange: EventEmitter<number>;
  298. /**
  299. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  300. */
  301. textChange: EventEmitter<string>;
  302. /**
  303. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  304. */
  305. useSelectModeChange: EventEmitter<boolean>;
  306. /**
  307. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  308. */
  309. visibleChange: EventEmitter<boolean>;
  310. /**
  311. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  312. */
  313. widthChange: EventEmitter<number | Function | string>;
  314. itemsChildren: QueryList<DxiItemComponent>;
  315. constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
  316. protected _createInstance(element: any, options: any): DxDropDownButton;
  317. ngOnDestroy(): void;
  318. ngOnChanges(changes: SimpleChanges): void;
  319. setupChanges(prop: string, changes: SimpleChanges): void;
  320. ngDoCheck(): void;
  321. _setOption(name: string, value: any): void;
  322. }
  323. export declare class DxDropDownButtonModule {
  324. }