UNPKG

@progress/kendo-react-grid

Version:

React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package

206 lines (205 loc) 5.24 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { Offset } from '@progress/kendo-react-popup'; import { MenuCloseEvent, MenuItemModel, MenuSelectEvent } from '@progress/kendo-react-layout'; import { GridContextMenuItemNames } from './enums.js'; import * as React from 'react'; /** * Represents the `GridContextMenuOptions`. */ export interface GridContextMenuOptions { /** * The contextmenu settings for the head of the data table. */ head?: boolean | (GridContextMenuItemNames | MenuItemModel)[]; /** * The contextmenu settings for the body of the data table. */ body?: boolean | (GridContextMenuItemNames | MenuItemModel)[]; } /** * Represents the `GridCellBaseOptions` object that are passed to the handler. */ export interface GridCellBaseOptions { /** * The data item associated with the cell. */ dataItem?: any; /** * The field name of the column associated with the cell. */ field?: string; } /** * @hidden */ export interface GridContextMenuOpenArgs extends GridCellBaseOptions { event: React.MouseEvent<HTMLElement, MouseEvent>; } /** * @hidden */ export interface GridContextMenuProps { show: boolean; offset: Offset; onClose: (event: MenuCloseEvent) => void; onSelect: (e: { event: MenuSelectEvent; dataItem?: any; field?: string; }) => void; dataItem?: any; field?: string; items?: (GridContextMenuItemNames | MenuItemModel)[]; } /** * @hidden */ export declare const contextMenuItemsMap: { create: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; data: { action: string; }; }; edit: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; data: { action: string; }; }; delete: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; data: { action: string; }; }; select: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; items: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; data: { action: string; }; }[]; }; copySelection: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; data: { action: string; }; options: string; }; copySelectionNoHeaders: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; data: { action: string; }; }; paste: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; data: { action: string; }; }; reorderRow: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; items: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; data: { action: string; }; }[]; }; exportPDF: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; data: { action: string; }; }; exportExcel: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; items: ({ name: string; text: string; data: { action: string; }; options?: undefined; } | { name: string; text: string; data: { action: string; }; options: string; })[]; }; separator: { name: string; separator: boolean; }; sortAsc: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; data: { action: string; }; }; sortDesc: { name: string; text: string; icon: string; svgIcon: import('@progress/kendo-svg-icons').SVGIcon; data: { action: string; }; }; }; /** * @hidden */ export declare const GridContextMenu: (props: GridContextMenuProps) => React.JSX.Element;