@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
85 lines (84 loc) • 3.47 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { EventEmitter, ChangeDetectorRef, SimpleChanges } from '@angular/core';
import { Subscription } from "rxjs";
import { RowArgs } from "../rendering/common/row-args";
import { SelectionEvent, CellSelectionItem } from "./types";
import { ColumnComponent } from '../columns/column.component';
import { PairSet } from './pair-set';
import { ContextService } from '../common/provider.service';
import * as i0 from "@angular/core";
/**
* @hidden
*/
export declare class Selection {
protected ctx: ContextService;
protected cd: ChangeDetectorRef;
/**
* Defines the collection that will store the selected item keys.
* @default []
*/
selectedKeys: any[];
/**
* Defines the initial shift-click range selection starting row index.
*
* @default 0
*/
rangeSelectionStartRow: RowArgs;
/**
* Defines the initial shift-click range selection starting column index when cell selection is enabled.
*
* @default 0
*/
rangeSelectionStartColumnIndex: number;
/**
* Defines the item key that will be stored in the `selectedKeys` collection. [See example](slug:grid_selection_persistence#by-a-custom-key).
*/
selectionKey: string | ((context: RowArgs) => any);
/**
* Defines a function that determines the column key of a data cell.
*
* The function should return an unique value for each column.
* By default, the Grid uses the column index as a column key.
*/
columnKey: string | ((column: any, columnIndex: number) => any);
/**
* Fires when the `selectedKeys` collection has been updated.
*/
selectedKeysChange: EventEmitter<any[]>;
rowSelectionState: Set<any>;
cellSelectionState: PairSet;
/**
* @hidden
*/
get isCellSelectionMode(): boolean;
protected lastSelectionState: any[];
protected selectionChangeSubscription: Subscription;
constructor(ctx: ContextService, cd: ChangeDetectorRef);
ngOnChanges(changes: SimpleChanges): void;
protected init(): void;
/**
* @hidden
*/
destroy(): void;
/**
* @hidden
*/
reset(): void;
/**
* @hidden
*/
getItemKey(row: RowArgs): any;
/**
* @hidden
*/
stateToArray(): any[];
protected getSelectionItem(row: RowArgs, col: ColumnComponent, colIndex: number): CellSelectionItem;
protected onSelectionChange(selection: SelectionEvent): void;
private notifyChange;
private setState;
static ɵfac: i0.ɵɵFactoryDeclaration<Selection, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<Selection, "kendo-grid-selection-base", never, { "selectedKeys": { "alias": "selectedKeys"; "required": false; }; "rangeSelectionStartRow": { "alias": "rangeSelectionStartRow"; "required": false; }; "rangeSelectionStartColumnIndex": { "alias": "rangeSelectionStartColumnIndex"; "required": false; }; "selectionKey": { "alias": "kendoGridSelectBy"; "required": false; }; "columnKey": { "alias": "columnKey"; "required": false; }; }, { "selectedKeysChange": "selectedKeysChange"; }, never, never, false, never>;
}