/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { SortDescriptor, CompositeFilterDescriptor, GroupDescriptor, State } from '@progress/kendo-data-query'; import { GridColumnProps } from './GridColumnProps'; import { DetailExpandDescriptor, GroupExpandDescriptor, SelectDescriptor, TableDragSelectionReleaseEvent, TableSelectionChangeEvent } from '@progress/kendo-vue-data-tools'; import { GridColumnState } from './GridColumnState'; import { GridHandle } from '../RootGrid'; import { GridState } from '../GridState'; /** * Represents the base event object of the Grid. */ /** * @hidden */ export interface GridEvent { /** * An event target. */ target?: any; /** * A specific native DOM event which is fetched by Vue. */ event: any; } /** * Represents the object of the `onSearchChange` Grid event. */ export interface GridSearchChangeEvent extends GridEvent { /** * The new search based on the user action. */ search: CompositeFilterDescriptor; } /** * Represents the object of the `onPageChange` event. */ export interface GridPageChangeEvent extends GridEvent { page: any; /** * A specific native DOM event which is fetched by Vue. */ event: any; } /** @hidden */ export interface GridDragSelectionReleaseEvent extends TableDragSelectionReleaseEvent { } /** * The returned type of the `onDataStateChange` event. */ export interface GridDataStateChangeEvent extends GridEvent { /** * The state of the Grid based on the user action. */ data: State; /** * The state of the Grid based on the user action. */ dataState: GridState; } /** * Represents the object of the `onSortChange` event. */ export interface GridSortChangeEvent extends GridEvent { /** * The new `SortDescriptor` based on the user action. */ sort: SortDescriptor[]; } /** * Represents the object of the `onFilterChange` event. */ export interface GridFilterChangeEvent extends GridEvent { /** * The new `CompositeFilterDescriptor` based on the user action. */ filter: CompositeFilterDescriptor; } /** * Represents the object of the `onGroupChange` event. */ export interface GridGroupChangeEvent extends GridEvent { /** * An array of `GroupDescriptor` based on the user action. */ group: GroupDescriptor[]; } /** * Represents the object of the `onDetailExpandChange` Grid event. */ export interface GridDetailExpandChangeEvent extends GridEvent { /** * The descriptor defining which detail rows are expanded. */ detailExpand: DetailExpandDescriptor; } /** * Represents the object of the `onGroupExpandChange` Grid event. */ export interface GridGroupExpandChangeEvent extends GridEvent { /** * The descriptors defining which groups are expanded. */ groupExpand: GroupExpandDescriptor[]; } /** * Represents the object of the `onExpandChange` event. */ export interface GridExpandChangeEvent extends GridEvent { /** * The array with collapsed groups. */ collapsedGroups?: any[][]; /** * The data item that is expanded or collapsed. */ dataItem: any; /** * The available values are: * - `true`—If the data item is expanded. * - `false`—If the data item is collapsed. */ value: boolean; } /** * Represents the object of the `onSelectionChange` event. */ export interface GridSelectionChangeEvent extends GridEvent, TableSelectionChangeEvent { /** * The data item which was selected or deselected by the user. */ dataItem: any; /** * The new [SelectDescriptor](https://www.telerik.com/kendo-vue-ui/components/datatools/api/selectdescriptor) based on the user action. */ select: SelectDescriptor; /** * The dataItem from which the selection starts(Valid for scenarios without checkbox selection). */ startDataItem?: any; /** * The dataItem to which the selection ends(Valid for scenarios without checkbox selection) */ endDataItem?: any; } /** * Represents the object of the `onItemChange` event. */ export interface GridItemChangeEvent extends GridEvent { /** * The data object that represents the current row. */ dataItem: any; /** * The field to which the row is bound. */ field?: string; /** * The value of the item. */ value: any; } /** * Represents the object of the `onHeaderSelectionChange` event. */ export interface GridHeaderSelectionChangeEvent extends GridEvent { /** * The new [SelectDescriptor](https://www.telerik.com/kendo-vue-ui/components/datatools/api/selectdescriptor) based on the user action. */ select: SelectDescriptor; /** * The field of the column in which the cell is located. */ field?: string; /** * The current Grid leaf data items. */ dataItems: any[]; } /** * Represents the object of the `GridKeyDownEvent` Grid event. */ export interface GridKeyDownEvent extends GridEvent { /** * The current Grid leaf data items. */ dataItems: any[]; /** * Grid selection mode. */ mode: 'single' | 'multiple'; /** * Indicates if cell selection mode is enabled. */ cell: boolean; /** * The `selectedField` prop of the Grid. */ selectedField: string; /** * The component unique identifier. */ componentId: string; } /** * Represents the object of the `GridNavigationActionEvent` Grid event. */ export interface GridNavigationActionEvent extends GridEvent { /** * The focused element. */ focusElement: any; } /** * Represents the object of the `onRowClick` event. */ export interface GridRowClickEvent extends GridEvent { /** * The item from the `data` property of the Grid which corresponds to the row that is clicked by the user. */ dataItem: any; } /** * Represents the object of the `cancel` event. */ export interface GridCancelEvent { /** * The item from the `data` property of the Grid that corresponds to the item that is canceled by the user. */ dataItem: any; } /** * Represents the object of the `edit` event. */ export interface GridEditEvent { /** * The item from the `data` property of the Grid that corresponds to the item that is edited by the user. */ dataItem: any; } /** * Represents the object of the `remove` event. */ export interface GridRemoveEvent { /** * The item from the `data` property of the Grid that corresponds to the item that is removed by the user. */ dataItem: any; } /** * Represents the object of the `save` event. */ export interface GridSaveEvent { /** * The item from the `data` property of the Grid that corresponds to the item that is saved by the user. */ dataItem: any; } /** * Represents the object of the `onColumnResize` event. */ export interface GridColumnResizeEvent { /** * An event target. */ target: any; /** * A native DOM event. */ event: any; /** * The current column collection. */ columns: GridColumnProps[]; /** * The index of the column. */ index: number; /** * The new width of the column. */ newWidth: number; /** * The actual width of the column prior to resizing. */ oldWidth: number; /** * Indicates that resizing is complete and * the user has dropped the resize handler. */ end: boolean; } /** * Represents the object of the `onColumnReorder` event. */ export interface GridColumnReorderEvent { /** * An event target. */ target: GridHandle; /** * A native DOM event. */ event: any; /** * A previous column index. */ prev: number; /** * A next column index. */ next: number; /** * The current column collection. */ columns: GridColumnProps[]; } /** * Represents the object of the `onColumnsStateChange` Grid event. */ export interface GridColumnsStateChangeEvent { /** * An event target. */ target: GridHandle; /** * The columns state collection. */ columnsState: GridColumnState[]; } /** * Represents the object of the `onRowpinchange` Grid event. */ export interface GridRowPinChangeEvent { /** * The updated array of items pinned to the top of the Grid. */ pinnedTopRows: any[]; /** * The updated array of items pinned to the bottom of the Grid. */ pinnedBottomRows: any[]; /** * The data item that triggered the pin change. */ dataItem: any; } /** * Represents the object of the `onContextmenu` Grid event. */ export interface GridContextMenuEvent { /** * The data object that represents the current row. */ dataItem: any; /** * The field to which the cell is bound. */ field?: string; /** * The native DOM event. */ event: MouseEvent; } /** * Represents the object of the `onContextmenuitemclick` Grid event. */ export interface GridContextMenuItemClickEvent { /** * The Context menu item click event. */ event: any; /** * The data object that represents the current row. */ dataItem?: any; /** * The data object that represents the clicked menu item. */ menuItem: any; /** * The field to which the cell is bound. */ field?: string; }