@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
53 lines (52 loc) • 1.82 kB
TypeScript
import { BaseState } from './BaseState';
import { ColumnScope, NumberScopeDataType } from './Common/ColumnScope';
import { AdaptableBooleanQuery } from './Common/AdaptableQuery';
import { SuspendableObject } from '../types';
/**
* Adaptable State Section for Plus Minus Module
*/
export interface PlusMinusState extends BaseState {
/**
* Array of Plus Minus Nudges
*/
PlusMinusNudges?: PlusMinusNudge[];
}
/**
* Defines a Plus Minus Rule - used in the Plus Minus Module
*/
export interface PlusMinusNudge extends SuspendableObject {
/**
* Name of the Plus Minus Nudge rule
*/
Name: string;
/**
* Numeric columns where the nudge is applied
*/
Scope: ColumnScope<NumberScopeDataType>;
/**
* Amount by which to update cell when Rule is applied
*/
NudgeValue: number;
/**
* (Optional) Boolean Expression to determine whether to apply the Nudge
*/
Rule?: AdaptableBooleanQuery;
/**
* Optional keyboard key that increases cell values for this nudge only (overrides the
* global `incrementKey` in `plusMinusOptions`).
*
* Can be a single key (e.g. `'+'`) or a keyboard shortcut combination that uses `+` as the glue
* between parts (e.g. `'shift+Enter'`, `'ctrl+ArrowUp'`). Supported modifiers are `ctrl`, `cmd`,
* `alt` and `shift`.
*/
IncrementKey?: string;
/**
* Optional keyboard key that decreases cell values for this nudge only (overrides the
* global `decrementKey` in `plusMinusOptions`).
*
* Can be a single key (e.g. `'-'`) or a keyboard shortcut combination that uses `+` as the glue
* between parts (e.g. `'shift+Backspace'`, `'ctrl+ArrowDown'`). Supported modifiers are `ctrl`,
* `cmd`, `alt` and `shift`.
*/
DecrementKey?: string;
}