UNPKG

tablor-core-beta

Version:

Core features for data tables, grids, and advanced search, pagination, and sorting in Angular.

25 lines (24 loc) 893 B
import { AugmentedItem, ImmutableAugmentedItem, Item } from '../../stores/items-store/interfaces'; import { CustomOpts, ProcCustomOpts } from './interfaces'; /** * Custom searcher. This searcher is used to filter items based on a custom function. */ export declare class CustomSearcher<T extends Item<T>> { constructor(); /** * Processes the options. */ processOptions(options: CustomOpts<T>): ProcCustomOpts<T>; /** * Checks if the given options are valid. */ checkKeys(): boolean; /** * Filters items based on a custom function. */ search(items: ImmutableAugmentedItem<T>[], options: ProcCustomOpts<T>): ImmutableAugmentedItem<T>[]; /** * Filters items based on a custom function. */ protected filterMatchingItemsUuids(fn: ProcCustomOpts<T>['customFn'], items: AugmentedItem<T>[]): ImmutableAugmentedItem<T>[]; }