UNPKG

@adaptabletools/adaptable

Version:

Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

69 lines (68 loc) 1.88 kB
import { ShortcutState, Shortcut } from '../AdaptableState/ShortcutState'; /** * Provides run-time access to Shortcut Module and associated state */ export interface ShortcutApi { /** * Retrieves Shortcut section from Adaptable State */ getShortcutState(): ShortcutState; /** * Gets all Shortcuts in Adaptable State * @returns shortcuts */ getShortcuts(config?: { includeLayoutNotAssociatedObjects?: boolean; }): Shortcut[]; /** * Retrieves Shortcut by Id * @param id Shortcut id * @returns shortcut */ getShortcutById(id: Shortcut['Uuid']): Shortcut; /** * Gets all active (not-suspended) Shortcuts in Adaptable State * @returns shortcuts */ getActiveShortcuts(): Shortcut[]; /** * Gets all suspended Shortcuts in Adaptable State * @returns shortcuts */ getSuspendedShortcuts(): Shortcut[]; /** * Adds new Shortcut to the state * @param shortcut Shortcut to add * @returns shortcut */ addShortcut(shortcut: Shortcut): Shortcut; /** * Deletes Shortcut from the state * @param shortcut Shortcut to delete */ deleteShortcut(shortcut: Shortcut): void; /** * Suspends Shortcut definition * @param shortcut Shortcut to suspend * @returns shortcut */ suspendShortcut(shortcut: Shortcut): Shortcut; /** * Activates a suspended Shortcut definition * @param shortcut Shortcut to suspend * @returns shortcut */ unSuspendShortcut(shortcut: Shortcut): Shortcut; /** * Suspends all Shortcuts */ suspendAllShortcut(): void; /** * Activates all suspended Shortcut */ unSuspendAllShortcut(): void; /** * Opens Settings Panel with Shortcut section selected and visible */ openShortcutSettingsPanel(): void; }