UNPKG

@progress/kendo-angular-grid

Version:

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

103 lines (102 loc) 3.21 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ /** * Represents the starting point (Grid cell) of the Grid clipboard operations. */ export type GridClipboardTargetType = 'selection' | 'activeCell'; /** * The possible values of the Grid [`GridClipboardEvent`]({% slug api_grid_gridclipboardevent %}) `type` property. */ export type GridClipboardEventType = 'copy' | 'cut' | 'paste'; /** * The Grid data items and their respective fields, affected by the current clipboard operation. */ export interface GridClipboardItem { dataItem: any; fields: string[]; } /** * The event data, exposed in the `GridClipboardDirective` `clipboard` event. */ export interface GridClipboardEvent { /** * The type of the original clipboard event. */ type: GridClipboardEventType; /** * The data of the original DOM event. */ originalEvent: ClipboardEvent; /** * 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; /** * The Grid data items and their respective fields, affected by the clipboard action. */ gridData: GridClipboardItem[]; /** * The Grid cell used as a target of the current clipboard operation. */ target: GridClipboardTargetCell; } /** * */ export interface GridClipboardTargetCell { /** * The data index of the clipboard target cell parent row. */ dataRowIndex: number; /** * The field of the Grid column the clipboard target cell is in. */ colField: string; /** * The Grid data item corresponding to the clipboard target cell. */ dataItem: any; } /** * The `GridClipboardDirective` settings. */ export interface GridClipboardSettings { /** * Determines whether the clipboard actions will affect the whole data row * when it is either partially selected, or contains the active cell. * * Defaults to `false`. */ wholeRow?: boolean; /** * 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 whether the `copy` operation will modify the Clipboard content * and trigger the `clipboard` event. * * Defaults to `true`. */ copy?: boolean; /** * Determines whether the `cut` operation will modify the Clipboard content * and trigger the `clipboard` event. * * Defaults to `true`. */ cut?: boolean; /** * Determines whether the `paste` operation will modify the Clipboard content * and trigger the `clipboard` event. * * Defaults to `true`. */ paste?: boolean; }