menu.d.ts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  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 DxMenu from 'devextreme/ui/menu';
  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 Menu widget is a panel with clickable items. A click on an item opens a drop-down menu, which can contain several submenus.
  25. */
  26. export declare class DxMenuComponent extends DxComponent implements OnDestroy, OnChanges, DoCheck {
  27. private _watcherHelper;
  28. private _idh;
  29. instance: DxMenu;
  30. /**
  31. * Specifies the shortcut key that sets focus on the widget.
  32. */
  33. accessKey: string;
  34. /**
  35. * A Boolean value specifying whether or not the widget changes its state when interacting with a user.
  36. */
  37. activeStateEnabled: boolean;
  38. /**
  39. * Specifies whether adaptive widget rendering is enabled on small screens. Applies only if the orientation is "horizontal".
  40. */
  41. adaptivityEnabled: boolean;
  42. /**
  43. * Configures widget visibility animations. This object contains two fields: show and hide.
  44. */
  45. animation: {
  46. hide?: DevExpress.animationConfig;
  47. show?: DevExpress.animationConfig;
  48. };
  49. /**
  50. * Specifies the name of the CSS class to be applied to the root menu level and all submenus.
  51. */
  52. cssClass: string;
  53. /**
  54. * Binds the widget to data.
  55. */
  56. dataSource: DevExpress.data.DataSource | DevExpress.data.DataSourceOptions | string | Array<string | DevExpress.ui.CollectionWidgetItem>;
  57. /**
  58. * Specifies whether the widget responds to user interaction.
  59. */
  60. disabled: boolean;
  61. /**
  62. * Specifies the name of the data source item field whose value defines whether or not the corresponding widget item is disabled.
  63. */
  64. disabledExpr: Function | string;
  65. /**
  66. * Specifies the data field whose values should be displayed.
  67. */
  68. displayExpr: Function | string;
  69. /**
  70. * Specifies the attributes to be attached to the widget's root element.
  71. */
  72. elementAttr: any;
  73. /**
  74. * Specifies whether the widget can be focused using keyboard navigation.
  75. */
  76. focusStateEnabled: boolean;
  77. /**
  78. * Specifies the widget's height.
  79. */
  80. height: number | Function | string;
  81. /**
  82. * Specifies whether or not the submenu is hidden when the mouse pointer leaves it.
  83. */
  84. hideSubmenuOnMouseLeave: boolean;
  85. /**
  86. * Specifies text for a hint that appears when a user pauses on the widget.
  87. */
  88. hint: string;
  89. /**
  90. * Specifies whether the widget changes its state when a user pauses on it.
  91. */
  92. hoverStateEnabled: boolean;
  93. /**
  94. * Holds an array of menu items.
  95. */
  96. items: Array<DevExpress.ui.dxMenuItem>;
  97. /**
  98. * Specifies which data field contains nested items.
  99. */
  100. itemsExpr: Function | string;
  101. /**
  102. * Specifies a custom template for items.
  103. */
  104. itemTemplate: any;
  105. /**
  106. * Specifies whether the menu has horizontal or vertical orientation.
  107. */
  108. orientation: string;
  109. /**
  110. * Switches the widget to a right-to-left representation.
  111. */
  112. rtlEnabled: boolean;
  113. /**
  114. * Specifies whether or not an item becomes selected if a user clicks it.
  115. */
  116. selectByClick: boolean;
  117. /**
  118. * Specifies the name of the data source item field whose value defines whether or not the corresponding widget items is selected.
  119. */
  120. selectedExpr: Function | string;
  121. /**
  122. * The selected item object.
  123. */
  124. selectedItem: any;
  125. /**
  126. * Specifies the selection mode supported by the menu.
  127. */
  128. selectionMode: string;
  129. /**
  130. * Specifies options for showing and hiding the first level submenu.
  131. */
  132. showFirstSubmenuMode: string | {
  133. delay?: number | {
  134. hide?: number;
  135. show?: number;
  136. };
  137. name?: string;
  138. };
  139. /**
  140. * Specifies options of submenu showing and hiding.
  141. */
  142. showSubmenuMode: string | {
  143. delay?: number | {
  144. hide?: number;
  145. show?: number;
  146. };
  147. name?: string;
  148. };
  149. /**
  150. * Specifies the direction at which the submenus are displayed.
  151. */
  152. submenuDirection: string;
  153. /**
  154. * Specifies the number of the element when the Tab key is used for navigating.
  155. */
  156. tabIndex: number;
  157. /**
  158. * Specifies whether the widget is visible.
  159. */
  160. visible: boolean;
  161. /**
  162. * Specifies the widget's width.
  163. */
  164. width: number | Function | string;
  165. /**
  166. * A function that is executed when the widget's content is ready and each time the content is changed.
  167. */
  168. onContentReady: EventEmitter<any>;
  169. /**
  170. * A function that is executed before the widget is disposed of.
  171. */
  172. onDisposing: EventEmitter<any>;
  173. /**
  174. * A function used in JavaScript frameworks to save the widget instance.
  175. */
  176. onInitialized: EventEmitter<any>;
  177. /**
  178. * A function that is executed when a collection item is clicked or tapped.
  179. */
  180. onItemClick: EventEmitter<any>;
  181. /**
  182. * A function that is executed when a collection item is right-clicked or pressed.
  183. */
  184. onItemContextMenu: EventEmitter<any>;
  185. /**
  186. * A function that is executed after a collection item is rendered.
  187. */
  188. onItemRendered: EventEmitter<any>;
  189. /**
  190. * A function that is executed after a widget option is changed.
  191. */
  192. onOptionChanged: EventEmitter<any>;
  193. /**
  194. * A function that is executed when a collection item is selected or selection is canceled.
  195. */
  196. onSelectionChanged: EventEmitter<any>;
  197. /**
  198. * A function that is executed after a submenu is hidden.
  199. */
  200. onSubmenuHidden: EventEmitter<any>;
  201. /**
  202. * A function that is executed before a submenu is hidden.
  203. */
  204. onSubmenuHiding: EventEmitter<any>;
  205. /**
  206. * A function that is executed before a submenu is displayed.
  207. */
  208. onSubmenuShowing: EventEmitter<any>;
  209. /**
  210. * A function that is executed after a submenu is displayed.
  211. */
  212. onSubmenuShown: EventEmitter<any>;
  213. /**
  214. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  215. */
  216. accessKeyChange: EventEmitter<string>;
  217. /**
  218. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  219. */
  220. activeStateEnabledChange: EventEmitter<boolean>;
  221. /**
  222. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  223. */
  224. adaptivityEnabledChange: EventEmitter<boolean>;
  225. /**
  226. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  227. */
  228. animationChange: EventEmitter<{
  229. hide?: DevExpress.animationConfig;
  230. show?: DevExpress.animationConfig;
  231. }>;
  232. /**
  233. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  234. */
  235. cssClassChange: EventEmitter<string>;
  236. /**
  237. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  238. */
  239. dataSourceChange: EventEmitter<DevExpress.data.DataSource | DevExpress.data.DataSourceOptions | string | Array<string | DevExpress.ui.CollectionWidgetItem>>;
  240. /**
  241. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  242. */
  243. disabledChange: EventEmitter<boolean>;
  244. /**
  245. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  246. */
  247. disabledExprChange: EventEmitter<Function | string>;
  248. /**
  249. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  250. */
  251. displayExprChange: EventEmitter<Function | string>;
  252. /**
  253. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  254. */
  255. elementAttrChange: EventEmitter<any>;
  256. /**
  257. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  258. */
  259. focusStateEnabledChange: EventEmitter<boolean>;
  260. /**
  261. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  262. */
  263. heightChange: EventEmitter<number | Function | string>;
  264. /**
  265. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  266. */
  267. hideSubmenuOnMouseLeaveChange: EventEmitter<boolean>;
  268. /**
  269. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  270. */
  271. hintChange: EventEmitter<string>;
  272. /**
  273. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  274. */
  275. hoverStateEnabledChange: EventEmitter<boolean>;
  276. /**
  277. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  278. */
  279. itemsChange: EventEmitter<Array<DevExpress.ui.dxMenuItem>>;
  280. /**
  281. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  282. */
  283. itemsExprChange: EventEmitter<Function | string>;
  284. /**
  285. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  286. */
  287. itemTemplateChange: EventEmitter<any>;
  288. /**
  289. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  290. */
  291. orientationChange: EventEmitter<string>;
  292. /**
  293. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  294. */
  295. rtlEnabledChange: EventEmitter<boolean>;
  296. /**
  297. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  298. */
  299. selectByClickChange: EventEmitter<boolean>;
  300. /**
  301. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  302. */
  303. selectedExprChange: EventEmitter<Function | string>;
  304. /**
  305. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  306. */
  307. selectedItemChange: EventEmitter<any>;
  308. /**
  309. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  310. */
  311. selectionModeChange: EventEmitter<string>;
  312. /**
  313. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  314. */
  315. showFirstSubmenuModeChange: EventEmitter<string | {
  316. delay?: number | {
  317. hide?: number;
  318. show?: number;
  319. };
  320. name?: string;
  321. }>;
  322. /**
  323. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  324. */
  325. showSubmenuModeChange: EventEmitter<string | {
  326. delay?: number | {
  327. hide?: number;
  328. show?: number;
  329. };
  330. name?: string;
  331. }>;
  332. /**
  333. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  334. */
  335. submenuDirectionChange: EventEmitter<string>;
  336. /**
  337. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  338. */
  339. tabIndexChange: EventEmitter<number>;
  340. /**
  341. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  342. */
  343. visibleChange: EventEmitter<boolean>;
  344. /**
  345. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  346. */
  347. widthChange: EventEmitter<number | Function | string>;
  348. itemsChildren: QueryList<DxiItemComponent>;
  349. constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
  350. protected _createInstance(element: any, options: any): DxMenu;
  351. ngOnDestroy(): void;
  352. ngOnChanges(changes: SimpleChanges): void;
  353. setupChanges(prop: string, changes: SimpleChanges): void;
  354. ngDoCheck(): void;
  355. _setOption(name: string, value: any): void;
  356. }
  357. export declare class DxMenuModule {
  358. }