@progress/kendo-angular-spreadsheet
Version:
A Spreadsheet Component for Angular
64 lines (63 loc) • 2.42 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Range, View } from "@progress/kendo-spreadsheet-common";
/**
* Represents the rectangular dimensions and position of a cell or range.
*/
export interface Rectangle {
/**
* Represents the left position of the rectangle in pixels.
*/
left: number;
/**
* Represents the top position of the rectangle in pixels.
*/
top: number;
/**
* Represents the width of the rectangle in pixels.
*/
width: number;
/**
* Represents the height of the rectangle in pixels.
*/
height: number;
/**
* Represents the right position of the rectangle in pixels.
*/
right: number;
/**
* Represents the bottom position of the rectangle in pixels.
*/
bottom: number;
}
/**
* Represents the arguments passed to the handler callback for each cell editor ([see example](slug:custom_cell_editors_spreadsheet#action-handlers)).
*/
export interface SpreadsheetCellEditorHandlerArgs {
/**
* The data returned from the component's original event (for example, the selected color value from a ColorPalette's `valueChange` event).
*/
originalEvent?: any;
/**
* The Spreadsheet `Range` object representing the currently selected cells. Provides methods to apply values, formatting, and styling to the Spreadsheet cells using the original event's data.
*/
range?: Range;
/**
* Represents the `Rectangle` object that provides position and dimension information about the active range, useful for custom positioning logic.
*/
rect?: Rectangle;
/**
* The current Spreadsheet `View` instance, giving access to the broader Spreadsheet context.
*/
view?: View;
/**
* Any validation rules configured for the active range, allowing you to respect existing constraints.
*/
validation?: any;
/**
* A function that edits the active cell or range with a provided value. Use this as an alternative to `args.range.value` manipulation for updating the cell content.
*/
callback?: Function;
}