/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { ColumnBaseProps } from '../header/index.js'; import { SelectDescriptor } from '../selection/TableSelection.js'; /** * The possible values of the `type` property. */ export declare enum ClipboardActionType { copy = "copy", cut = "cut", paste = "paste" } /** * Represents the object of the `ClipboardDataEvent` event. */ export interface ClipboardDataEvent { /** * Represents the type of the clipboard action. */ type: ClipboardActionType; /** * Represents the native [ClipboardEvent](https://www.telerik.com/kendo-react-ui/components/grid/api/gridcellssettings) */ nativeEvent?: ClipboardEvent; /** * All the Grid columns. It takes value of type of [ColumnBaseProps](https://www.telerik.com/kendo-react-ui/components/datatools/api/columnbaseprops)<[CellProps](https://www.telerik.com/kendo-react-ui/components/datatools/api/cellprops)>[] */ columns: ColumnBaseProps[]; /** * Passes the dataItemKey prop in the clipboard action. */ dataItemKey: string; /** * Passes the clipboard prop copyHeaders value in the clipboard action. */ copyHeaders?: boolean; /** * Sets the cell delimiter used when manipulating the clipboard data Defaults to `\t`. */ cellDelimiter?: string; /** * Sets the row delimiter used when manipulating the clipboard data Defaults to `\r\n`. */ newLineDelimiter?: string; /** * This is the item that is clicked if the action is raised from the contextMenu. */ dataItem?: any; /** * This is the column field that is clicked if the action is raised from the contextMenu. */ field?: string; } /** * Represents the object of the `GridClipboardEvent` event. */ export interface GridClipboardEvent extends ClipboardDataEvent, ClipboardData { } /** * Represents the `PopulateClipboardArgs` event argument. */ export interface PopulateClipboardArgs { /** * Represents the base object of the `ClipboardDataEvent` event. */ event: ClipboardDataEvent; /** * Represents the current selected state of the data. */ selectedState: SelectDescriptor; /** * Passes the data currently displayed. */ data: any[]; /** * Passes dataItemKey name of the field that could be used to make difference between dataItems. */ dataItemKey?: string; /** * Passes subItemsField that will be used in grouping cases. */ subItemsField?: string; /** * Previous copied items. */ previousCopiedItems?: ClipboardItem[]; } /** * Represents the object that is returned form the `populateClipboardData` function. */ export interface ClipboardData { /** * A collection of the ClipboardItem that are selected. */ copiedItems: ClipboardItem[]; /** * A collection of the ClipboardItem that are pasted. */ pastedItems: ClipboardItem[]; /** * When the action is `copy` or `cut` - the Grid data, copied to the clipboard, in Excel-compatible format. * When the action is `paste` - the current clipboard data, available in the original DOM event. */ clipboardData: string; } /** * Represents the aria that is copied - the dataItem and the fields. */ export interface ClipboardItem { /** * Represents the dataItem used in the clipboard action. */ dataItem: any; /** * Represents the fields used in the clipboard action. */ fields: string[]; } /** * Represents settings that can be added to the clipboard behavior. */ export interface ClipboardSettings { /** * Determines whether column titles or field names will be included in the generated data * during the `copy` and `cut` actions. * Defaults to `false`. */ copyHeaders: boolean; /** * Determines what is the delimiter used to separate the cells. * Defaults to `\t`. */ cellDelimiter?: string; /** * Determines what is the delimiter used to separate the rows. * Defaults to `'\r\n'`. */ newLineDelimiter?: string; } /** * @hidden */ export declare const getItemsToUpdateOnPaste: (args: PopulateClipboardArgs, selectedItems: ClipboardItem[], dataLength: number, dataItemKey: string) => any[]; /** * @hidden */ export declare const getPreviouslyCopiedItemsData: (previousCopiedItems?: ClipboardItem[]) => any[][]; /** * @hidden */ export declare const getClipboardItemsToPaste: (args: PopulateClipboardArgs, clipboardText: string) => string[][]; /** * @hidden */ export declare const getItemsToPaste: (args: PopulateClipboardArgs, clipboardText: string) => any[][]; /** * @hidden */ export declare const getPastedItems: (args: PopulateClipboardArgs, clipboardText: string) => ClipboardItem[]; /** * @hidden */ export declare const itemToString: (item: any, cols: string[]) => string | null; /** * @hidden */ export declare const addHeaders: (initialData: string, cols: string[], event: ClipboardDataEvent) => string; /** * @hidden */ export declare const getSelectedItems: (args: PopulateClipboardArgs) => ClipboardItem[]; /** * @hidden */ export declare const getClipboardText: (copiedItems: ClipboardItem[], event: ClipboardDataEvent) => string; /** * @hidden */ export declare const getClipboardData: (event: ClipboardDataEvent, copiedItems: ClipboardItem[]) => string; /** * A function used to populate the Clipboard data. */ export declare const populateClipboardData: (args: PopulateClipboardArgs) => ClipboardData;