tablor-core-beta
Version:
Core features for data tables, grids, and advanced search, pagination, and sorting in Angular.
26 lines (25 loc) • 1.08 kB
TypeScript
import { ImmutableAugmentedItem, Item } from '../../stores/items-store/interfaces';
import { DateRangesOpts, ProcDateRangesOpts, ProcDateRanges } from './interfaces';
/**
* `Date Range Searcher`. This class provides methods for searching items based on date ranges.
*/
export declare class DateRangeSearcher<T extends Item<T>> {
protected readonly hasField: (key: keyof T) => boolean;
constructor(hasField: (key: keyof T) => boolean);
/**
* Processes string query options.
*/
processOptions(options: DateRangesOpts<T>): ProcDateRangesOpts<T>;
/**
* Checks if the given options are valid.
*/
checkKeys(options: ProcDateRangesOpts<T>): boolean;
/**
* Searches items based on date ranges.
*/
search(items: ImmutableAugmentedItem<T>[], options: ProcDateRangesOpts<T>): ImmutableAugmentedItem<T>[];
/**
* Filters items based on date ranges.
*/
protected filterMatchingItemsUuids(dateRanges: ProcDateRanges<T>, mustMatchAllFields: boolean, items: ImmutableAugmentedItem<T>[]): ImmutableAugmentedItem<T>[];
}