@types/react-bootstrap-typeahead
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
// Type definitions for react-bootstrap-typeahead 3.2 | ||
// Type definitions for react-bootstrap-typeahead 3.4 | ||
// Project: https://github.com/ericgio/react-bootstrap-typeahead | ||
@@ -6,8 +6,24 @@ // Definitions by: Guymestef <https://github.com/Guymestef> | ||
// Paito Anderson <https://github.com/PaitoAnderson> | ||
// Andreas Richter <https://github.com/arichter83> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.8 | ||
// TODO: <Highlighter>, <Menu>, <MenuItem>, <Token> components | ||
// TODO: <Token> components | ||
import * as React from 'react'; | ||
import * as CSS from 'csstype'; | ||
export interface TypeaheadFilterbyProps { | ||
filterBy: string[]; | ||
labelKey: (string | (() => void)); | ||
multiple: boolean; | ||
selected: any[]; | ||
caseSensitive: boolean; | ||
ignoreDiacritics: boolean; | ||
text: string; | ||
} | ||
export interface TypeaheadMenuProps<T> { | ||
text: string; | ||
} | ||
export interface TypeaheadProps<T> { | ||
@@ -62,3 +78,3 @@ /* For localized accessibility: Should return a string indicating the number of results for screen readers. Receives the current results. */ | ||
/* Either an array of fields in option to search, or a custom filtering callback. */ | ||
filterBy?: (string[] | ((option: T | string, text: string) => boolean)); | ||
filterBy?: (string[] | ((option: T | string, props: TypeaheadFilterbyProps) => boolean)); | ||
@@ -143,3 +159,3 @@ /* Highlights the menu item if there is only one result and allows selecting that item by hitting enter. | ||
/* Provides a hook for customized rendering of menu item contents. */ | ||
renderMenuItemChildren?: (option: T, props: TypeaheadProps<T>, index: number) => any; | ||
renderMenuItemChildren?: (option: T, props: TypeaheadMenuProps<T>, index: number) => any; | ||
@@ -179,1 +195,33 @@ /* Provides a hook for customized rendering of tokens when multiple selections are enabled. */ | ||
export const AsyncTypeahead: React.ClassicComponentClass<AsyncTypeaheadProps<any>>; | ||
export interface HighligherProps<T> { | ||
key?: string; | ||
search: string; | ||
optionId?: any; | ||
} | ||
export const Highlighter: React.ClassicComponentClass<HighligherProps<any>>; | ||
export interface MenuProps<T> { | ||
id: string; | ||
className?: string; | ||
emptyLabel?: string; | ||
innerRef?: string; | ||
maxHeight?: string; | ||
style?: CSS.Properties; | ||
} | ||
export const Menu: React.ClassicComponentClass<MenuProps<any>>; | ||
export interface MenuItemProps<T> { | ||
option: T; | ||
position: number; | ||
label?: string; | ||
active?: boolean; | ||
className?: string; | ||
disabled?: boolean; | ||
onClick?: (e: Event) => any; | ||
onMouseDown?: (e: Event) => any; | ||
} | ||
export const MenuItem: React.ClassicComponentClass<MenuItemProps<any>>; |
{ | ||
"name": "@types/react-bootstrap-typeahead", | ||
"version": "3.2.1", | ||
"version": "3.4.0", | ||
"description": "TypeScript definitions for react-bootstrap-typeahead", | ||
@@ -21,5 +21,11 @@ "license": "MIT", | ||
"githubUsername": "PaitoAnderson" | ||
}, | ||
{ | ||
"name": "Andreas Richter", | ||
"url": "https://github.com/arichter83", | ||
"githubUsername": "arichter83" | ||
} | ||
], | ||
"main": "", | ||
"types": "index", | ||
"repository": { | ||
@@ -31,6 +37,7 @@ "type": "git", | ||
"dependencies": { | ||
"@types/react": "*" | ||
"@types/react": "*", | ||
"csstype": "^2.2.0" | ||
}, | ||
"typesPublisherContentHash": "2c42487b038d2d50d4ee8fe89073afb07b96fea062f00c9280fda125e3765a4e", | ||
"typesPublisherContentHash": "27cd3ef1b6945836bba19f141fca54962cb804f41cbfd02b3d778d2dade808a5", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -11,7 +11,7 @@ # Installation | ||
Additional Details | ||
* Last updated: Sat, 04 Aug 2018 00:56:31 GMT | ||
* Dependencies: react | ||
* Last updated: Tue, 25 Dec 2018 21:10:47 GMT | ||
* Dependencies: @types/react, @types/csstype | ||
* Global values: none | ||
# Credits | ||
These definitions were written by Guymestef <https://github.com/Guymestef>, Rajab Shakirov <https://github.com/radziksh>, Paito Anderson <https://github.com/PaitoAnderson>. | ||
These definitions were written by Guymestef <https://github.com/Guymestef>, Rajab Shakirov <https://github.com/radziksh>, Paito Anderson <https://github.com/PaitoAnderson>, Andreas Richter <https://github.com/arichter83>. |
Sorry, the diff of this file is not supported yet
11423
13.98%162
32.79%2
100%+ Added
+ Added