context-menu.d.ts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  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 DxContextMenu from 'devextreme/ui/context_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 ContextMenu widget displays a single- or multi-level context menu. An end user invokes this menu by a right click or a long press.
  25. */
  26. export declare class DxContextMenuComponent extends DxComponent implements OnDestroy, OnChanges, DoCheck {
  27. private _watcherHelper;
  28. private _idh;
  29. instance: DxContextMenu;
  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. * Configures widget visibility animations. This object contains two fields: show and hide.
  40. */
  41. animation: {
  42. hide?: DevExpress.animationConfig;
  43. show?: DevExpress.animationConfig;
  44. };
  45. /**
  46. * Specifies whether to close the ContextMenu if a user clicks outside it.
  47. */
  48. closeOnOutsideClick: boolean | Function;
  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 text for a hint that appears when a user pauses on the widget.
  83. */
  84. hint: string;
  85. /**
  86. * Specifies whether the widget changes its state when a user pauses on it.
  87. */
  88. hoverStateEnabled: boolean;
  89. /**
  90. * Holds an array of menu items.
  91. */
  92. items: Array<DevExpress.ui.dxContextMenuItem>;
  93. /**
  94. * Specifies which data field contains nested items.
  95. */
  96. itemsExpr: Function | string;
  97. /**
  98. * Specifies a custom template for items.
  99. */
  100. itemTemplate: any;
  101. /**
  102. * An object defining widget positioning options.
  103. */
  104. position: DevExpress.positionConfig;
  105. /**
  106. * Switches the widget to a right-to-left representation.
  107. */
  108. rtlEnabled: boolean;
  109. /**
  110. * Specifies whether or not an item becomes selected if a user clicks it.
  111. */
  112. selectByClick: boolean;
  113. /**
  114. * Specifies the name of the data source item field whose value defines whether or not the corresponding widget items is selected.
  115. */
  116. selectedExpr: Function | string;
  117. /**
  118. * The selected item object.
  119. */
  120. selectedItem: any;
  121. /**
  122. * Specifies the selection mode supported by the menu.
  123. */
  124. selectionMode: string;
  125. /**
  126. * Specifies options for displaying the widget.
  127. */
  128. showEvent: string | {
  129. delay?: number;
  130. name?: string;
  131. };
  132. /**
  133. * Specifies options of submenu showing and hiding.
  134. */
  135. showSubmenuMode: string | {
  136. delay?: number | {
  137. hide?: number;
  138. show?: number;
  139. };
  140. name?: string;
  141. };
  142. /**
  143. * Specifies the direction at which submenus are displayed.
  144. */
  145. submenuDirection: string;
  146. /**
  147. * Specifies the number of the element when the Tab key is used for navigating.
  148. */
  149. tabIndex: number;
  150. /**
  151. * The target element associated with the context menu.
  152. */
  153. target: Element | JQuery;
  154. /**
  155. * A Boolean value specifying whether or not the widget is visible.
  156. */
  157. visible: boolean;
  158. /**
  159. * Specifies the widget's width.
  160. */
  161. width: number | Function | string;
  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 that is executed after the ContextMenu is hidden.
  172. */
  173. onHidden: EventEmitter<any>;
  174. /**
  175. * A function that is executed before the ContextMenu is hidden.
  176. */
  177. onHiding: EventEmitter<any>;
  178. /**
  179. * A function used in JavaScript frameworks to save the widget instance.
  180. */
  181. onInitialized: EventEmitter<any>;
  182. /**
  183. * A function that is executed when a collection item is clicked or tapped.
  184. */
  185. onItemClick: EventEmitter<any>;
  186. /**
  187. * A function that is executed when a collection item is right-clicked or pressed.
  188. */
  189. onItemContextMenu: EventEmitter<any>;
  190. /**
  191. * A function that is executed after a collection item is rendered.
  192. */
  193. onItemRendered: EventEmitter<any>;
  194. /**
  195. * A function that is executed after a widget option is changed.
  196. */
  197. onOptionChanged: EventEmitter<any>;
  198. /**
  199. * A function that is executed before the ContextMenu is positioned.
  200. */
  201. onPositioning: EventEmitter<any>;
  202. /**
  203. * A function that is executed when a collection item is selected or selection is canceled.
  204. */
  205. onSelectionChanged: EventEmitter<any>;
  206. /**
  207. * A function that is executed before the ContextMenu is shown.
  208. */
  209. onShowing: EventEmitter<any>;
  210. /**
  211. * A function that is executed after the ContextMenu is shown.
  212. */
  213. onShown: EventEmitter<any>;
  214. /**
  215. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  216. */
  217. accessKeyChange: EventEmitter<string>;
  218. /**
  219. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  220. */
  221. activeStateEnabledChange: EventEmitter<boolean>;
  222. /**
  223. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  224. */
  225. animationChange: EventEmitter<{
  226. hide?: DevExpress.animationConfig;
  227. show?: DevExpress.animationConfig;
  228. }>;
  229. /**
  230. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  231. */
  232. closeOnOutsideClickChange: EventEmitter<boolean | Function>;
  233. /**
  234. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  235. */
  236. cssClassChange: EventEmitter<string>;
  237. /**
  238. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  239. */
  240. dataSourceChange: EventEmitter<DevExpress.data.DataSource | DevExpress.data.DataSourceOptions | string | Array<string | DevExpress.ui.CollectionWidgetItem>>;
  241. /**
  242. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  243. */
  244. disabledChange: EventEmitter<boolean>;
  245. /**
  246. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  247. */
  248. disabledExprChange: EventEmitter<Function | string>;
  249. /**
  250. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  251. */
  252. displayExprChange: EventEmitter<Function | string>;
  253. /**
  254. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  255. */
  256. elementAttrChange: EventEmitter<any>;
  257. /**
  258. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  259. */
  260. focusStateEnabledChange: EventEmitter<boolean>;
  261. /**
  262. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  263. */
  264. heightChange: EventEmitter<number | Function | string>;
  265. /**
  266. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  267. */
  268. hintChange: EventEmitter<string>;
  269. /**
  270. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  271. */
  272. hoverStateEnabledChange: EventEmitter<boolean>;
  273. /**
  274. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  275. */
  276. itemsChange: EventEmitter<Array<DevExpress.ui.dxContextMenuItem>>;
  277. /**
  278. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  279. */
  280. itemsExprChange: EventEmitter<Function | string>;
  281. /**
  282. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  283. */
  284. itemTemplateChange: EventEmitter<any>;
  285. /**
  286. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  287. */
  288. positionChange: EventEmitter<DevExpress.positionConfig>;
  289. /**
  290. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  291. */
  292. rtlEnabledChange: EventEmitter<boolean>;
  293. /**
  294. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  295. */
  296. selectByClickChange: EventEmitter<boolean>;
  297. /**
  298. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  299. */
  300. selectedExprChange: EventEmitter<Function | string>;
  301. /**
  302. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  303. */
  304. selectedItemChange: EventEmitter<any>;
  305. /**
  306. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  307. */
  308. selectionModeChange: EventEmitter<string>;
  309. /**
  310. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  311. */
  312. showEventChange: EventEmitter<string | {
  313. delay?: number;
  314. name?: string;
  315. }>;
  316. /**
  317. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  318. */
  319. showSubmenuModeChange: EventEmitter<string | {
  320. delay?: number | {
  321. hide?: number;
  322. show?: number;
  323. };
  324. name?: string;
  325. }>;
  326. /**
  327. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  328. */
  329. submenuDirectionChange: EventEmitter<string>;
  330. /**
  331. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  332. */
  333. tabIndexChange: EventEmitter<number>;
  334. /**
  335. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  336. */
  337. targetChange: EventEmitter<Element | JQuery>;
  338. /**
  339. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  340. */
  341. visibleChange: EventEmitter<boolean>;
  342. /**
  343. * This member supports the internal infrastructure and is not intended to be used directly from your code.
  344. */
  345. widthChange: EventEmitter<number | Function | string>;
  346. itemsChildren: QueryList<DxiItemComponent>;
  347. constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
  348. protected _createInstance(element: any, options: any): DxContextMenu;
  349. ngOnDestroy(): void;
  350. ngOnChanges(changes: SimpleChanges): void;
  351. setupChanges(prop: string, changes: SimpleChanges): void;
  352. ngDoCheck(): void;
  353. _setOption(name: string, value: any): void;
  354. }
  355. export declare class DxContextMenuModule {
  356. }