1 | import { ReactWidget } from './vdom';
|
2 | import React from 'react';
|
3 |
|
4 |
|
5 |
|
6 | export interface IFilterBoxProps {
|
7 | |
8 |
|
9 |
|
10 | caseSensitive?: boolean;
|
11 | |
12 |
|
13 |
|
14 | disabled?: boolean;
|
15 | |
16 |
|
17 |
|
18 | forceRefresh?: boolean;
|
19 | |
20 |
|
21 |
|
22 | initialQuery?: string;
|
23 | |
24 |
|
25 |
|
26 | inputRef?: React.RefObject<HTMLInputElement>;
|
27 | |
28 |
|
29 |
|
30 | placeholder?: string;
|
31 | |
32 |
|
33 |
|
34 | updateFilter: (filterFn: (item: string) => Partial<IScore> | null, query?: string) => void;
|
35 | |
36 |
|
37 |
|
38 | useFuzzyFilter: boolean;
|
39 | }
|
40 |
|
41 |
|
42 |
|
43 | export interface IScore {
|
44 | |
45 |
|
46 |
|
47 | score: number;
|
48 | |
49 |
|
50 |
|
51 | indices: number[] | null;
|
52 | }
|
53 |
|
54 |
|
55 |
|
56 | export declare function fuzzySearch(source: string, query: string): IScore | null;
|
57 | export declare const updateFilterFunction: (value: string, useFuzzyFilter: boolean, caseSensitive?: boolean) => (item: string) => Partial<IScore> | null;
|
58 | export declare const FilterBox: (props: IFilterBoxProps) => JSX.Element;
|
59 |
|
60 |
|
61 |
|
62 | export declare const FilenameSearcher: (props: IFilterBoxProps) => ReactWidget;
|