UNPKG

@progress/kendo-angular-grid

Version:

Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.

99 lines (98 loc) 2.87 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ /** * Specifies the starting point (Grid cell) for clipboard operations. */ export type GridClipboardTargetType = 'selection' | 'activeCell'; /** * Defines the possible values for the `type` property of [`GridClipboardEvent`]({% slug api_grid_gridclipboardevent %}). */ export type GridClipboardEventType = 'copy' | 'cut' | 'paste'; /** * Represents a Grid data item and its affected fields during a clipboard operation. */ export interface GridClipboardItem { /** * The data item affected by the clipboard action. */ dataItem: any; /** * The fields of the data item affected by the clipboard action. */ fields: string[]; } /** * Provides event data for the `clipboard` event of the `GridClipboardDirective`. */ export interface GridClipboardEvent { /** * The type of the clipboard event. */ type: GridClipboardEventType; /** * The original DOM clipboard event. */ originalEvent: ClipboardEvent; /** * The clipboard data as a string. * When the action is `copy` or `cut`—contains the grid data copied to the clipboard, formatted for Excel compatibility.. * When the action is `paste`—contains the raw clipboard data extracted from the original DOM event. */ clipboardData: string; /** * The affected Grid data items and fields. */ gridData: GridClipboardItem[]; /** * The target cell for the clipboard operation. */ target: GridClipboardTargetCell; } /** * Describes the target cell for a clipboard operation. */ export interface GridClipboardTargetCell { /** * The data row index of the target cell. */ dataRowIndex: number; /** * The field of the column for the target cell. */ colField: string; /** * The data item for the target cell. */ dataItem: any; } /** * Configures the `GridClipboardDirective` settings. */ export interface GridClipboardSettings { /** * If set to `true`, clipboard actions affect the whole data row. */ wholeRow?: boolean; /** * If set to `true`, includes column titles or field names in the clipboard data. * */ copyHeaders?: boolean; /** * If set to `true`, enables the `copy` operation. * */ copy?: boolean; /** * If set to `true`, enables the `cut` operation. * */ cut?: boolean; /** * If set to `true`, enables the `paste` operation. * */ paste?: boolean; }