@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
38 lines (37 loc) • 1.04 kB
TypeScript
import { BaseState } from './BaseState';
import { ColumnScope, NumberScopeDataType } from './Common/ColumnScope';
import { SuspendableObject } from '../types';
/**
* Adaptable State Section for Shortcut Module
*/
export interface ShortcutState extends BaseState {
/**
* Collection of Shortcuts - designed to speed up data entry
*/
Shortcuts?: Shortcut[];
}
/**
* Used to define a Shortcut as used in Shortcut State
*/
export interface Shortcut extends SuspendableObject {
/**
* Name of the Shortcut
*/
Name: string;
/**
* Numeric Columns where Shortcut is applied
*/
Scope: ColumnScope<NumberScopeDataType>;
/**
* Key which triggers the Shortcut when pressed
*/
ShortcutKey: string;
/**
* Value acting as 2nd operand for ShortcutOperation (1st operand is the cell value)
*/
ShortcutValue: number;
/**
* The Operation: 'Add', 'Subtract', 'Multiply', 'Divide'
*/
ShortcutOperation: 'Add' | 'Subtract' | 'Multiply' | 'Divide';
}