/**
* DevExtreme (ui/data_grid.d.ts)
* Version: 22.2.3
* Build date: Mon Dec 05 2022
*
* Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import DataSource, {
} from '../data/data_source';

import {
  UserDefinedElement,
  DxElement,
  UserDefinedElementsArray,
} from '../core/element';

import {
    DxPromise,
} from '../core/utils/deferred';

import {
    template,
} from '../core/templates/template';

import {
    Cancelable,
    EventInfo,
    NativeEventInfo,
    InitializedEventInfo,
    ChangedOptionInfo,
} from '../events/index';

import {
    dxToolbarItem,
} from './toolbar';

import Widget, {
} from './widget/ui.widget';

import {
  Format,
} from '../localization';

import {
    HorizontalAlignment,
    Mode,
    Scrollable,
    SelectAllMode,
    SortOrder,
    ToolbarItemLocation,
} from '../common';

import {
    AdaptiveDetailRowPreparingInfo,
    ColumnBase,
    ColumnButtonBase,
    DataChangeInfo,
    DataErrorOccurredInfo,
    DragDropInfo,
    DragReorderInfo,
    DragStartEventInfo,
    EditingBase,
    EditingTextsBase,
    FilterPanel as ComponentFilterPanel,
    FilterPanelCustomizeTextArg as ComponentFilterPanelCustomizeTextArg,
    GridBase,
    GridBaseOptions,
    GroupExpandMode,
    KeyDownInfo,
    NewRowInfo,
    NewRowPosition,
    PagingBase,
    ReducedNativeEventInfo,
    RowDragging as ComponentRowDragging,
    RowDraggingEventInfo,
    RowDraggingTemplateData,
    RowInsertedInfo,
    RowInsertingInfo,
    RowKeyInfo,
    RowRemovedInfo,
    RowRemovingInfo,
    RowUpdatedInfo,
    RowUpdatingInfo,
    RowValidatingInfo,
    SavingInfo,
    ScrollingBase,
    SelectionBase,
    SelectionChangedInfo,
    SelectionColumnDisplayMode,
    SummaryType,
    ToolbarPreparingInfo,
} from '../common/grids';

export {
    DataType,
    DragDirection,
    Draggable,
    DragHighlight,
    HorizontalAlignment,
    HorizontalEdge,
    Mode,
    Scrollable,
    ScrollbarMode,
    SearchMode,
    SelectAllMode,
    Sortable,
    SortOrder,
    ToolbarItemLocation,
} from '../common';

export {
    ApplyFilterMode,
    ColumnChooser,
    ColumnChooserMode,
    ColumnCustomizeTextArg,
    ColumnFixing,
    ColumnFixingTexts,
    ColumnHeaderFilter,
    ColumnLookup,
    ColumnResizeMode,
    DataChange,
    DataChangeType,
    DataRenderMode,
    EnterKeyAction,
    EnterKeyDirection,
    FilterOperation,
    FilterPanelTexts,
    FilterRow,
    FilterRowOperationDescriptions,
    FilterType,
    GridsEditMode,
    GridsEditRefreshMode,
    GroupExpandMode,
    HeaderFilter,
    HeaderFilterGroupInterval,
    HeaderFilterTexts,
    KeyboardNavigation,
    LoadPanel,
    NewRowPosition,
    Pager,
    PagerDisplayMode,
    PagerPageSize,
    RowDraggingTemplateData,
    SearchPanel,
    SelectedFilterOperation,
    SelectionColumnDisplayMode,
    Sorting,
    StartEditAction,
    StateStoreType,
    StateStoring,
    SummaryType,
} from '../common/grids';

export {
    AdaptiveDetailRowPreparingInfo,
    ColumnBase,
    ColumnButtonBase,
    DataChangeInfo,
    DataErrorOccurredInfo,
    DragDropInfo,
    DragReorderInfo,
    DragStartEventInfo,
    EditingBase,
    EditingTextsBase,
    KeyDownInfo,
    NewRowInfo,
    PagingBase,
    RowDraggingEventInfo,
    RowInsertedInfo,
    RowInsertingInfo,
    RowKeyInfo,
    RowRemovedInfo,
    RowRemovingInfo,
    RowUpdatedInfo,
    RowUpdatingInfo,
    RowValidatingInfo,
    SavingInfo,
    ScrollingBase,
    SelectionBase,
    SelectionChangedInfo,
    ToolbarPreparingInfo,
} from '../common/grids';

export type DataGridCommandColumnType = 'adaptive' | 'buttons' | 'detailExpand' | 'groupExpand' | 'selection' | 'drag';
export type DataGridExportFormat = 'pdf' | 'xlsx';
export type DataGridScrollMode = 'infinite' | 'standard' | 'virtual';
export type DataGridPredefinedColumnButton = 'cancel' | 'delete' | 'edit' | 'save' | 'undelete';
export type DataGridPredefinedToolbarItem = 'addRowButton' | 'applyFilterButton' | 'columnChooserButton' | 'exportButton' | 'groupPanel' | 'revertButton' | 'saveButton' | 'searchPanel';

type GroupKey = any[];

export type GroupData<TRowData> = {
  key: any;
  items: Array<TRowData> | Array<GroupData<TRowData>> | null;
  /**
   * @deprecated Attention! This property is for internal purposes only.
   */
  collapsedItems?: Array<TRowData> | Array<GroupData<TRowData>>;
  /**
   * @deprecated Attention! This property is for internal purposes only.
   */
  aggregates?: Array<any>;
  /**
   * @deprecated Attention! This property is for internal purposes only.
   */
  summary?: Array<any>;
  /**
   * @deprecated Attention! This property is for internal purposes only.
   */
  isContinuation?: boolean;
  /**
   * @deprecated Attention! This property is for internal purposes only.
   */
  isContinuationOnNextPage?: boolean;
};

/**
 * @deprecated 
 */
export type GridBaseEditing<TRowData = any, TKey = any> = EditingBase<TRowData, TKey>;

/**
 * @deprecated 
 */
export type GridBaseEditingTexts = EditingTextsBase;

/**
 * @deprecated 
 */
export type GridBasePaging = PagingBase;

/**
 * @deprecated 
 */
export type GridBaseScrolling = ScrollingBase;

/**
 * @deprecated 
 */
export type GridBaseSelection = SelectionBase;

/**
 * @deprecated 
 */
export type GridBaseColumn<TRowData = any> = ColumnBase<TRowData>;

/**
 * @deprecated 
 */
export type GridBaseColumnButton = ColumnButtonBase;

export type AdaptiveDetailRowPreparingEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & AdaptiveDetailRowPreparingInfo;

export type CellClickEvent<TRowData = any, TKey = any> = NativeEventInfo<dxDataGrid<TRowData, TKey>, PointerEvent | MouseEvent> & {
  readonly data: TRowData;
  readonly key: TKey;
  readonly value?: any;
  readonly displayValue?: any;
  readonly text: string;
  readonly columnIndex: number;
  readonly column: Column<TRowData, TKey>;
  readonly rowIndex: number;
  readonly rowType: string;
  readonly cellElement: DxElement;
  readonly row: Row<TRowData, TKey>;
};

export type CellDblClickEvent<TRowData = any, TKey = any> = NativeEventInfo<dxDataGrid<TRowData, TKey>, PointerEvent | MouseEvent> & {
  readonly data: TRowData;
  readonly key: TKey;
  readonly value?: any;
  readonly displayValue?: any;
  readonly text: string;
  readonly columnIndex: number;
  readonly column: Column<TRowData, TKey>;
  readonly rowIndex: number;
  readonly rowType: string;
  readonly cellElement: DxElement;
  readonly row: Row<TRowData, TKey>;
};

export type CellHoverChangedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & {
  readonly eventType: string;
  readonly data: TRowData;
  readonly key: TKey;
  readonly value?: any;
  readonly text: string;
  readonly displayValue?: any;
  readonly columnIndex: number;
  readonly rowIndex: number;
  readonly column: Column<TRowData, TKey>;
  readonly rowType: string;
  readonly cellElement: DxElement;
  readonly row: Row<TRowData, TKey>;
};

export type CellPreparedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & {
  readonly data: TRowData;
  readonly key: TKey;
  readonly value?: any;
  readonly displayValue?: any;
  readonly text: string;
  readonly columnIndex: number;
  readonly column: Column<TRowData, TKey>;
  readonly rowIndex: number;
  readonly rowType: string;
  readonly row: Row<TRowData, TKey>;
  readonly isSelected?: boolean;
  readonly isExpanded?: boolean;
  readonly isNewRow?: boolean;
  readonly cellElement: DxElement;
  readonly watch?: Function;
  readonly oldValue?: any;
};

export type ContentReadyEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>>;

export type ContextMenuPreparingEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & {
  items?: Array<any>;
  readonly target: string;
  readonly targetElement: DxElement;
  readonly columnIndex: number;
  readonly column?: Column<TRowData, TKey>;
  readonly rowIndex: number;
  readonly row?: Row<TRowData, TKey>;
};

export type DataErrorOccurredEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & DataErrorOccurredInfo;

export type DisposingEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>>;

export type EditCanceledEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & DataChangeInfo<TRowData, TKey>;

export type EditCancelingEvent<TRowData = any, TKey = any> = Cancelable & EventInfo<dxDataGrid<TRowData, TKey>> & DataChangeInfo<TRowData, TKey>;

export type EditingStartEvent<TRowData = any, TKey = any> = Cancelable & EventInfo<dxDataGrid<TRowData, TKey>> & {
  readonly data: TRowData;
  readonly key: TKey;
  readonly column?: Column<TRowData, TKey>;
};

export type EditorPreparedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & {
  readonly parentType: string;
  readonly value?: any;
  readonly setValue?: any;
  readonly updateValueTimeout?: number;
  readonly width?: number;
  readonly disabled: boolean;
  readonly rtlEnabled: boolean;
  readonly editorElement: DxElement;
  readonly readOnly: boolean;
  readonly dataField?: string;
  readonly row?: Row<TRowData, TKey>;
};

export type EditorPreparingEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & {
  readonly parentType: string;
  readonly value?: any;
  readonly setValue?: any;
  readonly updateValueTimeout?: number;
  readonly width?: number;
  readonly disabled: boolean;
  readonly rtlEnabled: boolean;
  cancel: boolean;
  readonly editorElement: DxElement;
  readonly readOnly: boolean;
  editorName: string;
  editorOptions: any;
  readonly dataField?: string;
  readonly row?: Row<TRowData, TKey>;
};

export type ExportingEvent<TRowData = any, TKey = any> = Cancelable & EventInfo<dxDataGrid<TRowData, TKey>> & {
  fileName?: string;
  selectedRowsOnly: boolean;
  format: DataGridExportFormat | string;
};

export type FocusedCellChangedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & {
  readonly cellElement: DxElement;
  readonly columnIndex: number;
  readonly rowIndex: number;
  readonly row?: Row<TRowData, TKey>;
  readonly column?: Column<TRowData, TKey>;
};

export type FocusedCellChangingEvent<TRowData = any, TKey = any> = Cancelable & NativeEventInfo<dxDataGrid<TRowData, TKey>, KeyboardEvent | PointerEvent | MouseEvent | TouchEvent> & {
  readonly cellElement: DxElement;
  readonly prevColumnIndex: number;
  readonly prevRowIndex: number;
  newColumnIndex: number;
  newRowIndex: number;
  readonly rows: Array<Row<TRowData, TKey>>;
  readonly columns: Array<Column<TRowData, TKey>>;
  isHighlighted: boolean;
};

export type FocusedRowChangedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & {
  readonly rowElement: DxElement;
  readonly rowIndex: number;
  readonly row?: Row<TRowData, TKey>;
};

export type FocusedRowChangingEvent<TRowData = any, TKey = any> = Cancelable & NativeEventInfo<dxDataGrid<TRowData, TKey>, KeyboardEvent | PointerEvent | MouseEvent | TouchEvent> & {
  readonly rowElement: DxElement;
  readonly prevRowIndex: number;
  newRowIndex: number;
  readonly rows: Array<Row<TRowData, TKey>>;
};

export type InitializedEvent<TRowData = any, TKey = any> = InitializedEventInfo<dxDataGrid<TRowData, TKey>>;

export type InitNewRowEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & NewRowInfo<TRowData>;

export type KeyDownEvent<TRowData = any, TKey = any> = NativeEventInfo<dxDataGrid<TRowData, TKey>, KeyboardEvent> & KeyDownInfo;

export type OptionChangedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & ChangedOptionInfo;

export type RowClickEvent<TRowData = any, TKey = any> = NativeEventInfo<dxDataGrid<TRowData, TKey>, PointerEvent | MouseEvent> & {
  readonly data: TRowData;
  readonly key: TKey;
  readonly values: Array<any>;
  readonly columns: Array<Column<TRowData, TKey>>;
  readonly rowIndex: number;
  readonly rowType: string;
  readonly isSelected?: boolean;
  readonly isExpanded?: boolean;
  readonly isNewRow?: boolean;
  readonly groupIndex?: number;
  readonly rowElement: DxElement;
  readonly handled: boolean;
};

export type RowCollapsedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & RowKeyInfo<TKey>;

export type RowCollapsingEvent<TRowData = any, TKey = any> = Cancelable & EventInfo<dxDataGrid<TRowData, TKey>> & RowKeyInfo<TKey>;

export type RowDblClickEvent<TRowData = any, TKey = any> = NativeEventInfo<dxDataGrid<TRowData, TKey>, PointerEvent | MouseEvent> & {
  readonly data: TRowData;
  readonly key: TKey;
  readonly values: Array<any>;
  readonly columns: Array<Column<TRowData, TKey>>;
  readonly rowIndex: number;
  readonly rowType: string;
  readonly isSelected?: boolean;
  readonly isExpanded?: boolean;
  readonly isNewRow?: boolean;
  readonly groupIndex?: number;
  readonly rowElement: DxElement;
};

export type RowExpandedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & RowKeyInfo<TKey>;

export type RowExpandingEvent<TRowData = any, TKey = any> = Cancelable & EventInfo<dxDataGrid<TRowData, TKey>> & RowKeyInfo<TKey>;

export type RowInsertedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & RowInsertedInfo<TRowData, TKey>;

export type RowInsertingEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & RowInsertingInfo<TRowData>;

export type RowPreparedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & {
  readonly data: TRowData;
  readonly key: TKey;
  readonly values: Array<any>;
  readonly columns: Array<Column<TRowData, TKey>>;
  readonly rowIndex: number;
  readonly rowType: string;
  readonly groupIndex?: number;
  readonly isSelected?: boolean;
  readonly isExpanded?: boolean;
  readonly isNewRow?: boolean;
  readonly rowElement: DxElement;
};

export type RowRemovedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & RowRemovedInfo<TRowData, TKey>;

export type RowRemovingEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & RowRemovingInfo<TRowData, TKey>;

export type RowUpdatedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & RowUpdatedInfo<TRowData, TKey>;

export type RowUpdatingEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & RowUpdatingInfo<TRowData, TKey>;

export type RowValidatingEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & RowValidatingInfo<TRowData, TKey>;

export type SavedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & DataChangeInfo<TRowData, TKey>;

export type SavingEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & SavingInfo<TRowData, TKey>;

export type SelectionChangedEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & SelectionChangedInfo<TRowData, TKey>;

export type ToolbarPreparingEvent<TRowData = any, TKey = any> = EventInfo<dxDataGrid<TRowData, TKey>> & ToolbarPreparingInfo;

export type RowDraggingAddEvent<TRowData = any, TKey = any> = ReducedNativeEventInfo<dxDataGrid<TRowData, TKey>> & RowDraggingEventInfo<TRowData> & DragDropInfo;

export type RowDraggingChangeEvent<TRowData = any, TKey = any> = Cancelable & ReducedNativeEventInfo<dxDataGrid<TRowData, TKey>> & RowDraggingEventInfo<TRowData> & DragDropInfo;

export type RowDraggingEndEvent<TRowData = any, TKey = any> = Cancelable & ReducedNativeEventInfo<dxDataGrid<TRowData, TKey>> & RowDraggingEventInfo<TRowData> & DragDropInfo;

export type RowDraggingMoveEvent<TRowData = any, TKey = any> = Cancelable & ReducedNativeEventInfo<dxDataGrid<TRowData, TKey>> & RowDraggingEventInfo<TRowData> & DragDropInfo;

export type RowDraggingStartEvent<TRowData = any, TKey = any> = Cancelable & ReducedNativeEventInfo<dxDataGrid<TRowData, TKey>> & DragStartEventInfo<TRowData>;

export type RowDraggingRemoveEvent<TRowData = any, TKey = any> = ReducedNativeEventInfo<dxDataGrid<TRowData, TKey>> & RowDraggingEventInfo<TRowData>;

export type RowDraggingReorderEvent<TRowData = any, TKey = any> = ReducedNativeEventInfo<dxDataGrid<TRowData, TKey>> & RowDraggingEventInfo<TRowData> & DragReorderInfo;

export type ColumnButtonClickEvent<TRowData = any, TKey = any> = NativeEventInfo<dxDataGrid<TRowData, TKey>, PointerEvent | MouseEvent> & {
  row?: Row<TRowData, TKey>;
  column?: Column<TRowData, TKey>;
};

export type ColumnButtonTemplateData<TRowData = any, TKey = any> = {
  readonly component: dxDataGrid<TRowData, TKey>;
  readonly data?: TRowData;
  readonly key?: TKey;
  readonly columnIndex: number;
  readonly column: Column<TRowData, TKey>;
  readonly rowIndex: number;
  readonly rowType: string;
  readonly row: Row<TRowData, TKey>;
};

export type ColumnCellTemplateData<TRowData = any, TKey = any> = {
  readonly data?: TRowData;
  readonly component: dxDataGrid<TRowData, TKey>;
  readonly value?: any;
  readonly oldValue?: any;
  readonly displayValue?: any;
  readonly text: string;
  readonly columnIndex: number;
  readonly rowIndex: number;
  readonly column: Column<TRowData, TKey>;
  readonly row: Row<TRowData, TKey>;
  readonly rowType: string;
  readonly watch?: Function;
};

export type ColumnEditCellTemplateData<TRowData = any, TKey = any> = {
  readonly setValue?: any;
  readonly data?: TRowData;
  readonly component: dxDataGrid<TRowData, TKey>;
  readonly value?: any;
  readonly displayValue?: any;
  readonly text: string;
  readonly columnIndex: number;
  readonly rowIndex: number;
  readonly column: Column<TRowData, TKey>;
  readonly row: Row<TRowData, TKey>;
  readonly rowType: string;
  readonly watch?: Function;
};

export type ColumnGroupCellTemplateData<TRowData = any, TKey = any> = {
  readonly data?: GroupData<TRowData>;
  readonly component: dxDataGrid<TRowData, TKey>;
  readonly value?: any;
  readonly text: string;
  readonly displayValue?: any;
  readonly columnIndex: number;
  readonly rowIndex: number;
  readonly column: Column<TRowData, TKey>;
  readonly row: Row<GroupData<TRowData>, GroupKey>;
  readonly summaryItems: Array<any>;
  readonly groupContinuesMessage?: string;
  readonly groupContinuedMessage?: string;
};

export type ColumnHeaderCellTemplateData<TRowData = any, TKey = any> = {
  readonly component: dxDataGrid<TRowData, TKey>;
  readonly columnIndex: number;
  readonly column: Column<TRowData, TKey>;
};

export type MasterDetailTemplateData<TRowData = any, TKey = any> = {
  readonly key: TKey;
  readonly data: TRowData;
  readonly watch?: Function;
};

export type RowTemplateData<TRowData = any, TKey = any> = {
  readonly key: TKey;
  readonly data: TRowData;
  readonly component: dxDataGrid<TRowData, TKey>;
  readonly values: Array<any>;
  readonly rowIndex: number;
  readonly columns: Array<Column<TRowData, TKey>>;
  readonly isSelected?: boolean;
  readonly rowType: string;
  readonly groupIndex?: number;
  readonly isExpanded?: boolean;
};

export type DataRowTemplateData<TRowData = any, TKey = any> = {
  readonly key: TKey;
  readonly data: TRowData;
  readonly component: dxDataGrid<TRowData, TKey>;
  readonly values: Array<any>;
  readonly rowIndex: number;
  readonly columns: Array<Column<TRowData, TKey>>;
  readonly isSelected?: boolean;
  readonly isExpanded?: boolean;
};

/**
 * @deprecated use Properties instead
 */
export interface dxDataGridOptions<TRowData = any, TKey = any> extends GridBaseOptions<dxDataGrid<TRowData, TKey>, TRowData, TKey> {
    /**
     * An array of grid columns.
     */
    columns?: Array<Column<TRowData, TKey> | string>;
    /**
     * Customizes columns after they are created.
     */
    customizeColumns?: ((columns: Array<Column<TRowData, TKey>>) => void);
    /**
     * Configures editing.
     */
    editing?: Editing<TRowData, TKey>;
    /**
     * Configures client-side exporting.
     */
    export?: Export;
    /**
     * Configures the group panel.
     */
    groupPanel?: GroupPanel;
    /**
     * Configures grouping.
     */
    grouping?: Grouping;
    /**
     * Specifies the key property (or properties) that provide(s) key values to access data items. Each key value must be unique. This property applies only if data is a simple array.
     */
    keyExpr?: string | Array<string>;
    /**
     * Allows you to build a master-detail interface in the grid.
     */
    masterDetail?: MasterDetail<TRowData, TKey>;
    /**
     * A function that is executed when a cell is clicked or tapped. Executed before onRowClick.
     */
    onCellClick?: ((e: CellClickEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed when a cell is double-clicked or double-tapped. Executed before onRowDblClick.
     */
    onCellDblClick?: ((e: CellDblClickEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed after the pointer enters or leaves a cell.
     */
    onCellHoverChanged?: ((e: CellHoverChangedEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed after a grid cell is created.
     */
    onCellPrepared?: ((e: CellPreparedEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed before the context menu is rendered.
     */
    onContextMenuPreparing?: ((e: ContextMenuPreparingEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed before a cell or row switches to the editing state.
     */
    onEditingStart?: ((e: EditingStartEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed after an editor is created. Not executed for cells with an editCellTemplate.
     */
    onEditorPrepared?: ((options: EditorPreparedEvent<TRowData, TKey>) => void);
    /**
     * A function used to customize a cell&apos;s editor. Not executed for cells with an editCellTemplate.
     */
    onEditorPreparing?: ((e: EditorPreparingEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed before data is exported.
     */
    onExporting?: ((e: ExportingEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed after the focused cell changes. Applies only to cells in data or group rows.
     */
    onFocusedCellChanged?: ((e: FocusedCellChangedEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed before the focused cell changes. Applies only to cells in data or group rows.
     */
    onFocusedCellChanging?: ((e: FocusedCellChangingEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed after the focused row changes. Applies only to data or group rows. focusedRowEnabled should be true.
     */
    onFocusedRowChanged?: ((e: FocusedRowChangedEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed before the focused row changes. Applies only to data or group rows. focusedRowEnabled should be true.
     */
    onFocusedRowChanging?: ((e: FocusedRowChangingEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed when a row is clicked or tapped.
     */
    onRowClick?: ((e: RowClickEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed when a row is double-clicked or double-tapped. Executed after onCellDblClick.
     */
    onRowDblClick?: ((e: RowDblClickEvent<TRowData, TKey>) => void);
    /**
     * A function that is executed after a row is created.
     */
    onRowPrepared?: ((e: RowPreparedEvent<TRowData, TKey>) => void);
    /**
     * Notifies the DataGrid of the server&apos;s data processing operations.
     */
    remoteOperations?: boolean | {
      /**
       * Specifies whether or not filtering must be performed on the server side.
       */
      filtering?: boolean;
      /**
       * Specifies whether paging by groups should be performed on the server side.
       */
      groupPaging?: boolean;
      /**
       * Specifies whether or not grouping must be performed on the server side.
       */
      grouping?: boolean;
      /**
       * Specifies whether or not paging must be performed on the server side.
       */
      paging?: boolean;
      /**
       * Specifies whether or not sorting must be performed on the server side.
       */
      sorting?: boolean;
      /**
       * Specifies whether or not summaries summaries are calculated on the server-side.
       */
      summary?: boolean;
    } | Mode;
    /**
     * Specifies a custom template for rows.
     * @deprecated 
     */
    rowTemplate?: template | ((rowElement: DxElement, rowInfo: RowTemplateData<TRowData, TKey>) => any);
        /**
     * Specifies a custom template for data rows.
     */
    dataRowTemplate?: template | ((rowElement: DxElement, rowInfo: DataRowTemplateData<TRowData, TKey>) => any);
    /**
     * Configures scrolling.
     */
    scrolling?: Scrolling;
    /**
     * Configures runtime selection.
     */
    selection?: Selection;
    /**
     * Specifies filters for the rows that must be selected initially. Applies only if selection.deferred is true.
     */
    selectionFilter?: string | Array<any> | Function;
    /**
     * Allows you to sort groups according to the values of group summary items.
     */
    sortByGroupSummaryInfo?: Array<dxDataGridSortByGroupSummaryInfoItem>;
    /**
     * Specifies the properties of the grid summary.
     */
    summary?: Summary<TRowData, TKey>;
    /**
     * Configures the toolbar.
     */
    toolbar?: Toolbar;
}

export type Export = {
  /**
   * Allows users to export selected rows only.
   */
  allowExportSelectedData?: boolean;
  /**
   * Adds the Export button to the DataGrid&apos;s toolbar.
   */
  enabled?: boolean;
  /**
   * 
   */
  formats?: ('xlsx' | 'pdf' | string)[];
  /**
   * Configures the texts of export commands, buttons, and hints.
   */
  texts?: ExportTexts;
};

export type ExportTexts = {
  /**
   * The text or hint of the command that exports all data.
   */
  exportAll?: string;
  /**
   * The text of the command that exports selected rows. Applies when allowExportSelectedData property is true.
   */
  exportSelectedRows?: string;
  /**
   * The hint of the Export button when the allowExportSelectedData property is true.
   */
  exportTo?: string;
};

export type FilterPanel<TRowData = any, TKey = any> = ComponentFilterPanel<dxDataGrid, TRowData, TKey>;

export type FilterPanelCustomizeTextArg = ComponentFilterPanelCustomizeTextArg<dxDataGrid>;

export type GroupPanel = {
  /**
   * Specifies whether columns can be dragged onto or from the group panel.
   */
  allowColumnDragging?: boolean;
  /**
   * Specifies text displayed by the group panel when it does not contain any columns.
   */
  emptyPanelText?: string;
  /**
   * Specifies whether the group panel is visible or not.
   */
  visible?: boolean | Mode;
};

export type Grouping = {
  /**
   * Specifies whether the user can collapse grouped records in a grid or not.
   */
  allowCollapsing?: boolean;
  /**
   * Specifies whether groups appear expanded or not.
   */
  autoExpandAll?: boolean;
  /**
   * Enables the user to group data using the context menu.
   */
  contextMenuEnabled?: boolean;
  /**
   * Specifies the event on which a group will be expanded/collapsed.
   */
  expandMode?: GroupExpandMode;
  /**
   * Defines the texts of grouping-related visual elements.
   */
  texts?: GroupingTexts;
};

export type GroupingTexts = {
  /**
   * Specifies the text of the context menu item that groups data by a specific column.
   */
  groupByThisColumn?: string;
  /**
   * Specifies the message displayed in a group row when the corresponding group is continued from the previous page.
   */
  groupContinuedMessage?: string;
  /**
   * Specifies the message displayed in a group row when the corresponding group continues on the next page.
   */
  groupContinuesMessage?: string;
  /**
   * Specifies the text of the context menu item that clears grouping settings of a specific column.
   */
  ungroup?: string;
  /**
   * Specifies the text of the context menu item that clears grouping settings of all columns.
   */
  ungroupAll?: string;
};

export type MasterDetail<TRowData = any, TKey = any> = {
  /**
   * Specifies whether detail sections appear expanded or collapsed.
   */
  autoExpandAll?: boolean;
  /**
   * Enables an end-user to expand/collapse detail sections.
   */
  enabled?: boolean;
  /**
   * Specifies a custom template for detail sections.
   */
  template?: template | ((detailElement: DxElement, detailInfo: MasterDetailTemplateData<TRowData, TKey>) => any);
};

/**
 * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
 */
export interface dxDataGridSortByGroupSummaryInfoItem {
    /**
     * Specifies the identifier of the column that must be used in grouping so that sorting by group summary item values be applied.
     */
    groupColumn?: string;
    /**
     * Specifies the sort order of group summary item values.
     */
    sortOrder?: SortOrder;
    /**
     * Specifies the group summary item whose values must be used to sort groups.
     */
    summaryItem?: string | number;
}

export type CustomSummaryInfo<TRowData = any, TKey = any> = {
  readonly component: dxDataGrid<TRowData, TKey>;
  readonly name?: string;
  readonly summaryProcess: string;
  readonly value?: any;
  totalValue?: any;
  readonly groupIndex?: number;
};

export type RowDragging<TRowData = any, TKey = any> = ComponentRowDragging<dxDataGrid, TRowData, TKey>;

export type Summary<TRowData = any, TKey = any> = {
  /**
   * Specifies a custom aggregate function. This function is called for summary items whose summaryType is &apos;custom&apos;.
   */
  calculateCustomSummary?: ((options: CustomSummaryInfo<TRowData, TKey>) => void);
  /**
   * Specifies items of the group summary.
   */
  groupItems?: Array<SummaryGroupItem>;
  /**
   * Specifies whether to recalculate summaries while a user edits data.
   */
  recalculateWhileEditing?: boolean;
  /**
   * Specifies whether to skip empty strings, null and undefined values when calculating a summary. Does not apply when you use a remote data source.
   */
  skipEmptyValues?: boolean;
  /**
   * Contains properties that specify text patterns for summary items.
   */
  texts?: SummaryTexts;
  /**
   * Specifies items of the total summary.
   */
  totalItems?: Array<SummaryTotalItem>;
};

export type SummaryItemTextInfo = {
  readonly value?: string | number | Date;
  readonly valueText: string;
};

export type SummaryGroupItem = {
    /**
     * Indicates whether to display group summary items in parentheses after the group row header or to align them by the corresponding columns within the group row.
     */
    alignByColumn?: boolean;
    /**
     * Specifies the column that provides data for a group summary item.
     */
    column?: string;
    /**
     * Customizes the text to be displayed in the summary item.
     */
    customizeText?: ((itemInfo: SummaryItemTextInfo) => string);
    /**
     * Specifies the summary item&apos;s text.
     */
    displayFormat?: string;
    /**
     * Specifies the group summary item&apos;s identifier.
     */
    name?: string;
    /**
     * Specifies the column that must hold the summary item when this item is displayed in the group footer or aligned by a column in the group row.
     */
    showInColumn?: string;
    /**
     * Specifies whether or not a summary item must be displayed in the group footer.
     */
    showInGroupFooter?: boolean;
    /**
     * Specifies whether to skip empty strings, null, and undefined values when calculating a summary. Does not apply when you use a remote data source.
     */
    skipEmptyValues?: boolean;
    /**
     * Specifies how to aggregate data for the group summary item.
     */
    summaryType?: SummaryType | string;
    /**
     * Specifies a summary item value&apos;s display format.
     */
    valueFormat?: Format;
};

export type SummaryTotalItem = {
  /**
   * Specifies the alignment of a summary item.
   */
  alignment?: HorizontalAlignment;
  /**
   * Specifies the column that provides data for a summary item.
   */
  column?: string;
  /**
   * Specifies a CSS class to be applied to a summary item.
   */
  cssClass?: string;
  /**
   * Customizes the text to be displayed in the summary item.
   */
  customizeText?: ((itemInfo: SummaryItemTextInfo) => string);
  /**
   * Specifies the summary item&apos;s text.
   */
  displayFormat?: string;
  /**
   * Specifies the total summary item&apos;s identifier.
   */
  name?: string;
  /**
   * Specifies the column that must hold the summary item.
   */
  showInColumn?: string;
  /**
   * Specifies whether to skip empty strings, null, and undefined values when calculating a summary. Does not apply when you use a remote data source.
   */
  skipEmptyValues?: boolean;
  /**
   * Specifies how to aggregate data for the total summary item.
   */
  summaryType?: SummaryType | string;
  /**
   * Specifies a summary item value&apos;s display format.
   */
  valueFormat?: Format;
};

export type SummaryTexts = {
    /**
     * Specifies a pattern for the &apos;avg&apos; summary items when they are displayed in the parent column.
     */
    avg?: string;
    /**
     * Specifies a pattern for the &apos;avg&apos; summary items displayed in a group row or in any other column rather than the parent one.
     */
    avgOtherColumn?: string;
    /**
     * Specifies a pattern for the &apos;count&apos; summary items.
     */
    count?: string;
    /**
     * Specifies a pattern for the &apos;max&apos; summary items when they are displayed in the parent column.
     */
    max?: string;
    /**
     * Specifies a pattern for the &apos;max&apos; summary items displayed in a group row or in any other column rather than the parent one.
     */
    maxOtherColumn?: string;
    /**
     * Specifies a pattern for the &apos;min&apos; summary items when they are displayed in the parent column.
     */
    min?: string;
    /**
     * Specifies a pattern for the &apos;min&apos; summary items displayed in a group row or in any other column rather than the parent one.
     */
    minOtherColumn?: string;
    /**
     * Specifies a pattern for the &apos;sum&apos; summary items when they are displayed in the parent column.
     */
    sum?: string;
    /**
     * Specifies a pattern for the &apos;sum&apos; summary items displayed in a group row or in any other column rather than the parent one.
     */
    sumOtherColumn?: string;
};

/**
 * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
 */
export type dxDataGridToolbar = Toolbar;
/**
 * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
 */
export type dxDataGridToolbarItem = ToolbarItem;

/**
 * Configures toolbar items.
 */
export type ToolbarItem = dxToolbarItem & {
  /**
   * A name used to identify the toolbar item.
   */
  name?: DataGridPredefinedToolbarItem | string;
  /**
   * Specifies a location for the item on the toolbar.
   */
  location?: ToolbarItemLocation;
};

/**
 * Configures the toolbar.
 */
export type Toolbar = {
  /**
   * Configures toolbar items.
   */
  items?: Array<DataGridPredefinedToolbarItem | ToolbarItem>;
  /**
   * Specifies whether the toolbar is visible.
   */
  visible?: boolean;
  /**
   * Specifies whether the toolbar responds to user interaction.
   */
  disabled?: boolean;
};

/**
 * @deprecated Use Editing instead
 */
export type dxDataGridEditing<TRowData, TKey = any> = Editing<TRowData, TKey>;

export type Editing<TRowData = any, TKey = any> = EditingBase<TRowData, TKey> & {
    /**
     * Specifies whether a user can add new rows.
     */
    allowAdding?: boolean;
    /**
     * Specifies whether a user can delete rows. It is called for each data row when defined as a function.
     */
    allowDeleting?: boolean | ((options: { component?: dxDataGrid<TRowData, TKey>; row?: Row<TRowData, TKey> }) => boolean);
    /**
     * Specifies whether a user can update rows. It is called for each data row when defined as a function.
     */
    allowUpdating?: boolean | ((options: { component?: dxDataGrid<TRowData, TKey>; row?: Row<TRowData, TKey> }) => boolean);
    /**
     * Contains properties that specify texts for editing-related UI elements.
     */
    texts?: any;
    /**
     * Specifies a position for a new row.
     */
    newRowPosition?: NewRowPosition;
};

/**
 * @deprecated Use Scrolling instead
 */
export type dxDataGridScrolling = Scrolling;

export type Scrolling = ScrollingBase & {
    /**
     * Specifies the scrolling mode.
     */
    mode?: DataGridScrollMode;
};

/**
 * @deprecated Use Selection instead
 */
export type dxDataGridSelection = Selection;

export type Selection = SelectionBase & {
    /**
     * Makes selection deferred.
     */
    deferred?: boolean;
    /**
     * Specifies the mode in which all the records are selected. Applies only if selection.allowSelectAll is true.
     */
    selectAllMode?: SelectAllMode;
    /**
     * Specifies when to display the selection column and row selection checkboxes. Applies only if selection.mode is &apos;multiple&apos;.
     */
    showCheckBoxesMode?: SelectionColumnDisplayMode;
};
/**
 * The DataGrid is a UI component that represents data from a local or remote source in the form of a grid. This UI component offers such basic features as sorting, grouping, filtering, as well as more advanced capabilities, like state storing, client-side exporting, master-detail interface, and many others.
 */
declare class dxDataGrid<TRowData = any, TKey = any> extends Widget<dxDataGridOptions<TRowData, TKey>> implements GridBase<TRowData, TKey> {
    /**
     * Adds a new column.
     */
    addColumn(columnOptions: Column<TRowData, TKey> | string): void;
    /**
     * Adds an empty data row and switches it to the editing state.
     */
    addRow(): DxPromise<void>;
    /**
     * Ungroups grid records.
     */
    clearGrouping(): void;
    /**
     * Collapses master rows or groups of a specific level.
     */
    collapseAll(groupIndex?: number): void;
    /**
     * Collapses a group or a master row with a specific key.
     */
    collapseRow(key: TKey): DxPromise<void>;
    /**
     * Expands master rows or groups of a specific level. Does not apply if data is remote.
     */
    expandAll(groupIndex?: number): void;
    /**
     * Expands a group or a master row with a specific key.
     */
    expandRow(key: TKey): DxPromise<void>;
    /**
     * Gets the currently selected rows&apos; keys.
     */
    getSelectedRowKeys(): Array<TKey> & DxPromise<Array<TKey>>;
    /**
     * Gets the selected rows&apos; data objects.
     */
    getSelectedRowsData(): Array<TRowData> & DxPromise<Array<TRowData>>;
    /**
     * Gets the value of a total summary item.
     */
    getTotalSummaryValue(summaryItemName: string): any;
    /**
     * Gets all visible columns.
     */
    getVisibleColumns(): Array<Column<TRowData, TKey>>;
    /**
     * Gets all visible columns at a specific hierarchical level of column headers. Use it to access banded columns.
     */
    getVisibleColumns(headerLevel: number): Array<Column<TRowData, TKey>>;
    /**
     * Gets currently rendered rows.
     */
    getVisibleRows(): Array<Row<TRowData, TKey>>;
    /**
     * Checks whether a specific group or master row is expanded or collapsed.
     */
    isRowExpanded(key: TKey): boolean;
    /**
     * Checks whether a row found using its data object is selected. Takes effect only if selection.deferred is true.
     */
    isRowSelected(data: TRowData): boolean;
    isRowSelected(key: TKey): boolean;
    /**
     * Gets the total row count.
     */
    totalCount(): number;

    beginCustomLoading(messageText: string): void;
    byKey(key: TKey): DxPromise<TRowData>;
    cancelEditData(): void;
    cellValue(rowIndex: number, dataField: string): any;
    cellValue(rowIndex: number, dataField: string, value: any): void;
    cellValue(rowIndex: number, visibleColumnIndex: number): any;
    cellValue(rowIndex: number, visibleColumnIndex: number, value: any): void;
    clearFilter(): void;
    clearFilter(filterName: string): void;
    clearSelection(): void;
    clearSorting(): void;
    closeEditCell(): void;
    collapseAdaptiveDetailRow(): void;
    columnCount(): number;
    columnOption(id: number | string): any;
    columnOption(id: number | string, optionName: string): any;
    columnOption(id: number | string, optionName: string, optionValue: any): void;
    columnOption(id: number | string, options: any): void;
    deleteColumn(id: number | string): void;
    deleteRow(rowIndex: number): void;
    deselectAll(): DxPromise<void>;
    deselectRows(keys: Array<TKey>): DxPromise<Array<TRowData>>;
    editCell(rowIndex: number, dataField: string): void;
    editCell(rowIndex: number, visibleColumnIndex: number): void;
    editRow(rowIndex: number): void;
    endCustomLoading(): void;
    expandAdaptiveDetailRow(key: TKey): void;
    filter(): any;
    filter(filterExpr: any): void;
    focus(): void;
    focus(element: UserDefinedElement): void;
    getCellElement(rowIndex: number, dataField: string): DxElement | undefined;
    getCellElement(rowIndex: number, visibleColumnIndex: number): DxElement | undefined;
    getCombinedFilter(): any;
    getCombinedFilter(returnDataField: boolean): any;
    getDataSource(): DataSource<TRowData, TKey>;
    getKeyByRowIndex(rowIndex: number): TKey | undefined;
    getRowElement(rowIndex: number): UserDefinedElementsArray | undefined;
    getRowIndexByKey(key: TKey): number;
    getScrollable(): Scrollable;
    getVisibleColumnIndex(id: number | string): number;
    hasEditData(): boolean;
    hideColumnChooser(): void;
    isAdaptiveDetailRowExpanded(key: TKey): boolean;
    isRowFocused(key: TKey): boolean;
    keyOf(obj: TRowData): TKey;
    navigateToRow(key: TKey): DxPromise<void>;
    pageCount(): number;
    pageIndex(): number;
    pageIndex(newIndex: number): DxPromise<void>;
    pageSize(): number;
    pageSize(value: number): void;
    refresh(): DxPromise<void>;
    refresh(changesOnly: boolean): DxPromise<void>;
    repaintRows(rowIndexes: Array<number>): void;
    saveEditData(): DxPromise<void>;
    searchByText(text: string): void;
    selectAll(): DxPromise<void>;
    selectRows(keys: Array<TKey>, preserve: boolean): DxPromise<Array<TRowData>>;
    selectRowsByIndexes(indexes: Array<number>): DxPromise<Array<TRowData>>;
    showColumnChooser(): void;
    state(): any;
    state(state: any): void;
    undeleteRow(rowIndex: number): void;
    updateDimensions(): void;
}

export type Column<TRowData = any, TKey = any> = dxDataGridColumn<TRowData, TKey>;

/**
 * @deprecated Use the Column type instead
 * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
 */
export interface dxDataGridColumn<TRowData = any, TKey = any> extends ColumnBase<TRowData> {
    /**
     * Specifies whether data from this column should be exported. Applies only if the column is visible.
     */
    allowExporting?: boolean;
    /**
     * Specifies whether the user can group data by values of this column. Applies only when grouping is enabled.
     */
    allowGrouping?: boolean;
    /**
     * Specifies whether groups appear expanded or not when records are grouped by a specific column. Setting this property makes sense only when grouping is allowed for this column.
     */
    autoExpandGroup?: boolean;
    /**
     * Allows you to customize buttons in the edit column or create a custom command column. Applies only if the column&apos;s type is &apos;buttons&apos;.
     */
    buttons?: Array<DataGridPredefinedColumnButton | ColumnButton<TRowData, TKey>>;
    /**
     * Sets custom column values used to group grid records.
     */
    calculateGroupValue?: string | ((this: ColumnBase, rowData: TRowData) => any);
    /**
     * Specifies a custom template for data cells.
     */
    cellTemplate?: template | ((cellElement: DxElement, cellInfo: ColumnCellTemplateData<TRowData, TKey>) => any);
    /**
     * An array of grid columns.
     */
    columns?: Array<Column<TRowData, TKey> | string>;
    /**
     * Specifies a custom template for data cells in editing state.
     */
    editCellTemplate?: template | ((cellElement: DxElement, cellInfo: ColumnEditCellTemplateData<TRowData, TKey>) => any);
    /**
     * Specifies a custom template for group cells (group rows).
     */
    groupCellTemplate?: template | ((cellElement: DxElement, cellInfo: ColumnGroupCellTemplateData<TRowData, TKey>) => any);
    /**
     * Specifies the index of a column when grid records are grouped by the values of this column.
     */
    groupIndex?: number;
    /**
     * Specifies a custom template for column headers.
     */
    headerCellTemplate?: template | ((columnHeader: DxElement, headerInfo: ColumnHeaderCellTemplateData<TRowData, TKey>) => any);
    /**
     * Specifies whether or not to display the column when grid records are grouped by it.
     */
    showWhenGrouped?: boolean;
    /**
     * Specifies the command column that this object customizes.
     */
    type?: DataGridCommandColumnType;
}

export type ColumnButton<TRowData = any, TKey = any> = dxDataGridColumnButton<TRowData, TKey>;
/**
 * @deprecated Use the DataGrid's ColumnButton type instead
 * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
 */
export interface dxDataGridColumnButton<TRowData = any, TKey = any> extends ColumnButtonBase {
    /**
     * The name used to identify a built-in button.
     */
    name?: DataGridPredefinedColumnButton | string;
    /**
     * A function that is executed when the button is clicked or tapped.
     */
    onClick?: ((e: ColumnButtonClickEvent<TRowData, TKey>) => void);
    /**
     * Specifies a custom button template.
     */
    template?: template | ((cellElement: DxElement, cellInfo: ColumnButtonTemplateData<TRowData, TKey>) => string | UserDefinedElement);
    /**
     * Specifies the button&apos;s visibility.
     */
    visible?: boolean | ((options: { component?: dxDataGrid<TRowData, TKey>; row?: Row<TRowData, TKey>; column?: Column<TRowData, TKey> }) => boolean);
    /**
     * Specifies whether the button is disabled.
     */
    disabled?: boolean | ((options: { component?: dxDataGrid<TRowData, TKey>; row?: Row<TRowData, TKey>; column?: Column<TRowData, TKey> }) => boolean);
}

/**
 * @deprecated Use Row instead
 * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
 */
export type dxDataGridRowObject<TRowData = any, TKey = any> = Row<TRowData, TKey>;

/**
 * A grid row.
 */
export type Row<TRowData = any, TKey = any> = {
    /**
     * The data object represented by the row.
     */
    readonly data: TRowData;
    /**
     * The group index of the row. Available when the rowType is &apos;group&apos;.
     */
    readonly groupIndex?: number;
    /**
     * Indicates whether the row is in the editing state.
     */
    readonly isEditing?: boolean;
    /**
     * Indicates whether the row is expanded or collapsed. Available if rowType is &apos;data&apos; or &apos;group&apos;.
     */
    readonly isExpanded?: boolean;
    /**
     * Indicates that the row is added, but not yet saved. Available if rowType is &apos;data&apos;.
     */
    readonly isNewRow?: boolean;
    /**
     * Indicates whether the row is selected. Available if rowType is &apos;data&apos;.
     */
    readonly isSelected?: boolean;
    /**
     * The key of the data object represented by the row.
     */
    readonly key: TKey;
    /**
     * The visible index of the row.
     */
    readonly rowIndex: number;
    /**
     * The row&apos;s type.
     */
    readonly rowType: string;
    /**
     * Values of the row as they exist in the data source.
     */
    readonly values: Array<any>;
};

export type ExplicitTypes<TRowData, TKey> = {
  AdaptiveDetailRowPreparingEvent: AdaptiveDetailRowPreparingEvent<TRowData, TKey>;
  CellClickEvent: CellClickEvent<TRowData, TKey>;
  CellDblClickEvent: CellDblClickEvent<TRowData, TKey>;
  CellHoverChangedEvent: CellHoverChangedEvent<TRowData, TKey>;
  CellPreparedEvent: CellPreparedEvent<TRowData, TKey>;
  Column: Column<TRowData, TKey>;
  ColumnButton: ColumnButton<TRowData, TKey>;
  ColumnButtonClickEvent: ColumnButtonClickEvent<TRowData, TKey>;
  ColumnButtonTemplateData: ColumnButtonTemplateData<TRowData, TKey>;
  ColumnCellTemplateData: ColumnCellTemplateData<TRowData, TKey>;
  ColumnEditCellTemplateData: ColumnEditCellTemplateData<TRowData, TKey>;
  ColumnGroupCellTemplateData: ColumnGroupCellTemplateData<TRowData, TKey>;
  ColumnHeaderCellTemplateData: ColumnHeaderCellTemplateData<TRowData, TKey>;
  ContentReadyEvent: ContentReadyEvent<TRowData, TKey>;
  ContextMenuPreparingEvent: ContextMenuPreparingEvent<TRowData, TKey>;
  CustomSummaryInfo: CustomSummaryInfo<TRowData, TKey>;
  DataErrorOccurredEvent: DataErrorOccurredEvent<TRowData, TKey>;
  DataRowTemplateData: DataRowTemplateData<TRowData, TKey>;
  DisposingEvent: DisposingEvent<TRowData, TKey>;
  EditCanceledEvent: EditCanceledEvent<TRowData, TKey>;
  EditCancelingEvent: EditCancelingEvent<TRowData, TKey>;
  Editing: Editing<TRowData, TKey>;
  EditingStartEvent: EditingStartEvent<TRowData, TKey>;
  EditorPreparedEvent: EditorPreparedEvent<TRowData, TKey>;
  EditorPreparingEvent: EditorPreparingEvent<TRowData, TKey>;
  Export: Export;
  ExportingEvent: ExportingEvent<TRowData, TKey>;
  ExportTexts: ExportTexts;
  FocusedCellChangedEvent: FocusedCellChangedEvent<TRowData, TKey>;
  FocusedCellChangingEvent: FocusedCellChangingEvent<TRowData, TKey>;
  FocusedRowChangedEvent: FocusedRowChangedEvent<TRowData, TKey>;
  FocusedRowChangingEvent: FocusedRowChangingEvent<TRowData, TKey>;
  GroupData: GroupData<TRowData>;
  Grouping: Grouping;
  GroupingTexts: GroupingTexts;
  GroupPanel: GroupPanel;
  InitializedEvent: InitializedEvent<TRowData, TKey>;
  InitNewRowEvent: InitNewRowEvent<TRowData, TKey>;
  KeyDownEvent: KeyDownEvent<TRowData, TKey>;
  MasterDetail: MasterDetail<TRowData, TKey>;
  MasterDetailTemplateData: MasterDetailTemplateData<TRowData, TKey>;
  OptionChangedEvent: OptionChangedEvent<TRowData, TKey>;
  Properties: Properties<TRowData, TKey>;
  Row: Row<TRowData, TKey>;
  RowClickEvent: RowClickEvent<TRowData, TKey>;
  RowCollapsedEvent: RowCollapsedEvent<TRowData, TKey>;
  RowCollapsingEvent: RowCollapsingEvent<TRowData, TKey>;
  RowDblClickEvent: RowDblClickEvent<TRowData, TKey>;
  RowDraggingAddEvent: RowDraggingAddEvent<TRowData, TKey>;
  RowDraggingChangeEvent: RowDraggingChangeEvent<TRowData, TKey>;
  RowDraggingEndEvent: RowDraggingEndEvent<TRowData, TKey>;
  RowDraggingMoveEvent: RowDraggingMoveEvent<TRowData, TKey>;
  RowDraggingRemoveEvent: RowDraggingRemoveEvent<TRowData, TKey>;
  RowDraggingReorderEvent: RowDraggingReorderEvent<TRowData, TKey>;
  RowDraggingStartEvent: RowDraggingStartEvent<TRowData, TKey>;
  RowDraggingTemplateData: RowDraggingTemplateData<TRowData>;
  RowExpandedEvent: RowExpandedEvent<TRowData, TKey>;
  RowExpandingEvent: RowExpandingEvent<TRowData, TKey>;
  RowInsertedEvent: RowInsertedEvent<TRowData, TKey>;
  RowInsertingEvent: RowInsertingEvent<TRowData, TKey>;
  RowPreparedEvent: RowPreparedEvent<TRowData, TKey>;
  RowRemovedEvent: RowRemovedEvent<TRowData, TKey>;
  RowRemovingEvent: RowRemovingEvent<TRowData, TKey>;
  RowTemplateData: RowTemplateData<TRowData, TKey>;
  RowUpdatedEvent: RowUpdatedEvent<TRowData, TKey>;
  RowUpdatingEvent: RowUpdatingEvent<TRowData, TKey>;
  RowValidatingEvent: RowValidatingEvent<TRowData, TKey>;
  SavedEvent: SavedEvent<TRowData, TKey>;
  SavingEvent: SavingEvent<TRowData, TKey>;
  Scrolling: Scrolling;
  Selection: Selection;
  SelectionChangedEvent: SelectionChangedEvent<TRowData, TKey>;
  Summary: Summary<TRowData, TKey>;
  SummaryGroupItem: SummaryGroupItem;
  SummaryItemTextInfo: SummaryItemTextInfo;
  SummaryTexts: SummaryTexts;
  SummaryTotalItem: SummaryTotalItem;
  Toolbar: Toolbar;
  ToolbarItem: ToolbarItem;
  ToolbarPreparingEvent: ToolbarPreparingEvent<TRowData, TKey>;
};

/**
 * @deprecated RowDraggingTemplateData from 'devextreme/common/grids' instead
 * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
 */
export type RowDraggingTemplateDataModel = RowDraggingTemplateData;

export type Properties<TRowData = any, TKey = any> = dxDataGridOptions<TRowData, TKey>;

/**
 * @deprecated use Properties instead
 * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
 */
export type Options<TRowData = any, TKey = any> = dxDataGridOptions<TRowData, TKey>;

export default dxDataGrid;
