react-native-autocomplete-input
Advanced tools
Comparing version 5.5.3 to 5.5.4
@@ -1,2 +0,2 @@ | ||
import React from 'react'; | ||
import React, { ReactElement } from 'react'; | ||
import type { FlatListProps, TextInputProps, StyleProp, ViewStyle } from 'react-native'; | ||
@@ -14,13 +14,5 @@ export type AutocompleteInputProps<Item> = TextInputProps & { | ||
}; | ||
export declare const AutocompleteInput: React.ForwardRefExoticComponent<TextInputProps & { | ||
containerStyle?: StyleProp<ViewStyle>; | ||
hideResults?: boolean; | ||
inputContainerStyle?: StyleProp<ViewStyle>; | ||
listContainerStyle?: StyleProp<ViewStyle>; | ||
onShowResults?: (showResults: boolean) => void; | ||
renderResultList?: React.FC<FlatListProps<unknown>> | undefined; | ||
renderTextInput?: React.FC<TextInputProps>; | ||
flatListProps?: Partial<Omit<FlatListProps<unknown>, "data">> | undefined; | ||
data: readonly unknown[]; | ||
} & React.RefAttributes<unknown>>; | ||
export declare const AutocompleteInput: <Item, Ref>(props: AutocompleteInputProps<Item> & { | ||
ref?: React.ForwardedRef<Ref>; | ||
}) => ReactElement; | ||
export default AutocompleteInput; |
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { FlatList, Platform, StyleSheet, Text, TextInput, View } from 'react-native'; | ||
import { ViewPropTypes } from 'deprecated-react-native-prop-types'; | ||
function defaultKeyExtractor(_, index) { | ||
@@ -95,54 +93,1 @@ return `key-${index}`; | ||
export default AutocompleteInput; | ||
AutocompleteInput.propTypes = { | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
...TextInput.propTypes, | ||
/** | ||
* These styles will be applied to the container which | ||
* surrounds the autocomplete component. | ||
*/ | ||
containerStyle: ViewPropTypes ? ViewPropTypes.style : PropTypes.object, | ||
/** | ||
* Assign an array of data objects which should be | ||
* rendered in respect to the entered text. | ||
*/ | ||
data: PropTypes.array, | ||
/** | ||
* Props which can be applied to result `FlatList`. | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
flatListProps: FlatList.propTypes || PropTypes.object, | ||
/** | ||
* Set to `true` to hide the suggestion list. | ||
*/ | ||
hideResults: PropTypes.bool, | ||
/** | ||
* These styles will be applied to the container which surrounds | ||
* the textInput component. | ||
*/ | ||
inputContainerStyle: ViewPropTypes ? ViewPropTypes.style : PropTypes.object, | ||
/** | ||
* These style will be applied to the result list. | ||
*/ | ||
listContainerStyle: ViewPropTypes ? ViewPropTypes.style : PropTypes.object, | ||
/** | ||
* `onShowResults` will be called when list is going to | ||
* show/hide results. | ||
*/ | ||
onShowResults: PropTypes.func, | ||
/** | ||
* `onShowResults` will be called when list is going to | ||
* show/hide results. | ||
*/ | ||
onStartShouldSetResponderCapture: PropTypes.func, | ||
/** | ||
* renders custom TextInput. All props passed to this function. | ||
*/ | ||
renderTextInput: PropTypes.func, | ||
/** | ||
* renders custom result list. Can be used to replace FlatList. | ||
* All props passed to this function. | ||
*/ | ||
renderResultList: PropTypes.func, | ||
}; |
{ | ||
"name": "react-native-autocomplete-input", | ||
"version": "5.5.3", | ||
"version": "5.5.4", | ||
"description": "Pure javascript autocomplete input for react-native", | ||
@@ -8,5 +8,3 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"test": "npm run lint && npm run testonly", | ||
"lint": "eslint", | ||
"testonly": "jest", | ||
"test": "jest", | ||
"build": "rm -rf dist && tsc --project tsconfig.build.json" | ||
@@ -39,18 +37,10 @@ }, | ||
"@testing-library/react-native": "^12.8.1", | ||
"react-test-renderer": "18.3.1", | ||
"@types/jest": "^29.4.0", | ||
"@types/react": "^18.0.28", | ||
"@types/react": "~18.3.12", | ||
"babel-jest": "^29.4.3", | ||
"eslint": "^9.11.1", | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"eslint-plugin-react": "^7.37.1", | ||
"jest": "^29.4.3", | ||
"prettier": "^3.3.3", | ||
"react": "^18.3.1", | ||
"react-native": "^0.76.1", | ||
"typescript": "^5.6.2", | ||
"typescript-eslint": "^8.8.0" | ||
}, | ||
"dependencies": { | ||
"deprecated-react-native-prop-types": "^5.0.0" | ||
"react": "18.3.1", | ||
"react-native": "0.76.5" | ||
} | ||
} |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
0
9
4666
3
110
1
0
- Removed@react-native/normalize-colors@0.73.2(transitive)
- Removeddeprecated-react-native-prop-types@5.0.0(transitive)
- Removedinvariant@2.2.4(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedreact-is@16.13.1(transitive)