import { IKeybinding, IShortcutRegistry, IShortcutTarget, IShortcutUI } from '../types'; import * as React from 'react'; /** Props for ShortcutUI component */ export interface IShortcutUIProps { external: IShortcutUI.IExternalBundle; height: number; width: number; } /** State for ShortcutUI component */ export interface IShortcutUIState { shortcutRegistry: IShortcutRegistry | null; filteredShortcutList: IShortcutTarget[]; shortcutsFetched: boolean; searchQuery: string; showSelectors: boolean; currentSort: IShortcutUI.ColumnId; } /** Top level React component for widget */ export declare class ShortcutUI extends React.Component implements IShortcutUI { constructor(props: IShortcutUIProps); /** Fetch shortcut list on mount */ componentDidMount(): void; componentWillUnmount(): void; private _onActionRequested; /** Fetch shortcut list from SettingRegistry */ private _refreshShortcutList; /** Set the current search query */ updateSearchQuery: (query: string) => void; /** Filter shortcut list using current search query */ private _searchFilterShortcuts; /** * Reset all keybindings to their defaults */ resetShortcuts: () => Promise; /** * Reset keybindings for given target to defaults. */ resetKeybindings: (target: IShortcutTarget) => Promise; /** * Replace the given keybinding with a new keybinding as defined by given keys. */ replaceKeybinding: (target: IShortcutTarget, keybinding: IKeybinding, keys: string[]) => Promise; /** * Delete a single keybinding for given shortcut target. */ deleteKeybinding: (target: IShortcutTarget, keybinding: IKeybinding) => Promise; /** * Add a new keybinding. */ addKeybinding: (target: IShortcutTarget, keys: string[]) => Promise; /** * Replace the given keybinding with a new keybinding as defined by given keys. * * If keybinding is not given a new keybinding will be created. * If keys are empty (or include a single empty string) the keybinding will be deleted. * If keybinding is a default keybinding and the provided keys differ from default, it will be disabled. */ private _setKeybinding; /** Toggles showing command selectors */ toggleSelectors: () => void; /** * Set the sort order for the shortcuts listing. */ updateSort: (value: IShortcutUI.ColumnId) => void; /** * Sort shortcut list using current sort property. */ sortShortcuts(): void; render(): JSX.Element | null; }