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