import type { BasePubSubService } from '@slickgrid-universal/event-pub-sub'; import type { SlickEventData } from '../core/index.js'; import type { ContextMenu, ContextMenuOption, MenuCallbackArgs, MenuCommandItem, MenuCommandItemCallbackArgs, OnContextMenuArgs } from '../interfaces/index.js'; import type { SharedService } from '../services/shared.service.js'; import type { TreeDataService } from '../services/treeData.service.js'; import type { ExtensionUtility } from './extensionUtility.js'; import { MenuFromCellBaseClass } from './menuFromCellBaseClass.js'; /** * A plugin to add Context Menu (mouse right+click), it subscribes to the cell "onContextMenu" event. * The "contextMenu" is defined in the Grid Options object * * You can use it to change a data property (only 1) through a list of Options AND/OR through a list of Commands. * A good example of a Command would be an Export to CSV, that can be run from anywhere in the grid by doing a mouse right+click * * To specify a custom button in a column header, extend the column definition like so: * this.gridOptions = { * enableContextMenu: true, * contextMenu: { * // ... context menu options * commandItems: [{ ...menu item options... }, { ...menu item options... }] * } * }; */ export declare class SlickContextMenu extends MenuFromCellBaseClass { protected readonly extensionUtility: ExtensionUtility; protected readonly pubSubService: BasePubSubService; protected readonly sharedService: SharedService; protected readonly treeDataService: TreeDataService; protected _originalContextMenu: ContextMenu; protected _defaults: ContextMenuOption; readonly pluginName = "ContextMenu"; /** Constructor of the SlickGrid 3rd party plugin, it can optionally receive options */ constructor(extensionUtility: ExtensionUtility, pubSubService: BasePubSubService, sharedService: SharedService, treeDataService: TreeDataService); /** Initialize plugin. */ init(contextMenuOptions?: ContextMenu): void; /** Translate the Context Menu titles, we need to loop through all column definition to re-translate all list titles & all commands/options */ translateContextMenu(): void; protected handleOnContextMenu(event: SlickEventData, args: OnContextMenuArgs): void; /** Create Context Menu with Custom Commands (copy cell value, export) */ protected addMenuCustomCommands(originalCommandItems: Array): Array> | 'divider'>; /** @deprecated sort all menu items by their position order when defined */ protected sortMenuItems(): void; } //# sourceMappingURL=slickContextMenu.d.ts.map