UNPKG

@progress/kendo-angular-spreadsheet

Version:

A Spreadsheet Component for Angular

115 lines (114 loc) 3.69 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Range, Sheet, SpreadsheetWidget, Workbook } from "@progress/kendo-spreadsheet-common"; /** * Provides the event data for the Spreadsheet `change` event. */ export interface SpreadsheetChangeEvent { /** * Specifies the selected `Range` in the active sheet. */ range: Range; /** * Specifies the `SpreadsheetWidget` instance used in the Spreadsheet component. */ sender: SpreadsheetWidget; } /** * Provides the event data for the Spreadsheet `excelExport` event. */ export interface SpreadsheetExcelExportEvent { /** * Specifies the `SpreadsheetWidget` instance. */ sender: SpreadsheetWidget; /** * Specifies the Excel `Workbook` configuration object. Changes to the `Workbook` are reflected in the output Excel document. */ workbook: Workbook; /** * Prevents the Spreadsheet from saving the generated file when invoked. */ preventDefault: Function; } /** * Provides the event data for the Spreadsheet `excelImport` event. */ export interface SpreadsheetExcelImportEvent { /** * Specifies the `SpreadsheetWidget` instance. */ sender: SpreadsheetWidget; /** * Specifies the selected file. */ file: File | Blob; /** * Prevents the Spreadsheet from loading the selected file when invoked. */ preventDefault: Function; } /** * Provides the event data for the Spreadsheet `activeSheetChange` event. */ export interface SpreadsheetActiveSheetChangeEvent { /** * Specifies the `SpreadsheetWidget` instance. */ sender: SpreadsheetWidget; /** * Specifies the new active sheet. */ sheet: Sheet; } /** * Provides the event data for the Spreadsheet `cut`, `copy` and `paste` events. */ export interface SpreadsheetClipboardEvent { /** * The `SpreadsheetWidget` instance which fired the event. */ sender: SpreadsheetWidget; /** * The selected `Range` in the active sheet that is about to be copied. */ range: Range; /** * The type of the clipboard event. */ type: SpreadsheetClipboardEventType; /** * The clipboard content that is being copied, cut, or pasted. */ clipboardContent: SpreadsheetClipboardContent; /** * Prevents the default action for the event. * The Spreadsheet suppresses the built-in behavior that follows the event. */ preventDefault: Function; /** * Returns `true` if any subscriber prevented the default action. * * @returns `true` if the default action was prevented, otherwise, `false`. */ isDefaultPrevented: Function; } /** * Provides information about the clipboard content that is being copied, cut, or pasted, as well as about the merged cells within the selection. */ export interface SpreadsheetClipboardContent { /** * The data that is being copied, cut, or pasted. */ data: any[]; /** * A collection representing the merged cells contained within the selected range. */ mergedCells: string[]; } /** * Defines the possible values for the `type` property of [`SpreadsheetClipboardEvent`](https://www.telerik.com/kendo-angular-ui/components/spreadsheet/api/spreadsheetclipboardevent). */ export type SpreadsheetClipboardEventType = 'copy' | 'cut' | 'paste';