@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
51 lines (50 loc) • 1.8 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
/**
* @hidden
*
* Quick look-up structure for combinations of keys.
* Similar to the native JS Set, however, working with a couple of keys instead of with a single key.
* Supports both primitive keys and object keys (compared by reference).
*/
export declare class PairSet {
/**
* Gets the total number of X/Y key pairs.
*/
get size(): number;
/**
* Holds a set of Y keys for each defined X key.
* Each X key creates a map which holds a set of Y keys.
*
* Map { 1 => Set { 1, 2, 3 } } // pairs: [1, 1], [1, 2], [1, 3]
*/
private keysX;
/**
* Count the each added or deleted key manually to avoid iterating over all items when calling `this.size`.
*/
private totalKeysCount;
constructor(items?: any[], keyXField?: string, keyYField?: string);
/**
* Adds a couple of items identified as a combination.
*/
add(keyX: any, keyY: any): void;
/**
* Adds a combination of a couple of items identified together.
*/
delete(keyX: any, keyY: any): void;
/**
* Checks whether the defined combination is stored.
*/
has(keyX: any, keyY: any): boolean;
/**
* Clears all key combinations.
*/
clear(): void;
/**
* Converts the persisted data structure to an array of objects,
* using the provided field names for the object props.
*/
toArray(keyXField: string, keyYField: string): any[];
}