@types/react-phone-number-input
Advanced tools
Comparing version 3.0.8 to 3.0.9
@@ -52,4 +52,4 @@ // Type definitions for react-phone-number-input 3.0 | ||
nationalNumber: string; | ||
country?: string; | ||
carrierCode?: string; | ||
country?: string | undefined; | ||
carrierCode?: string | undefined; | ||
} | ||
@@ -68,21 +68,21 @@ | ||
export interface CountrySelectComponentProps { | ||
className?: string; | ||
disabled?: boolean; | ||
name?: string; | ||
onBlur?: () => void; | ||
onChange?: (value?: string) => void; | ||
onFocus?: () => void; | ||
className?: string | undefined; | ||
disabled?: boolean | undefined; | ||
name?: string | undefined; | ||
onBlur?: (() => void) | undefined; | ||
onChange?: ((value?: string) => void) | undefined; | ||
onFocus?: (() => void) | undefined; | ||
/** | ||
* The list of all selectable countries (including "International") | ||
*/ | ||
options?: Array<{ value?: string; label: string; icon: React.Component }>; | ||
tabIndex?: number; | ||
options?: Array<{ value?: string | undefined; label: string; icon: React.Component }> | undefined; | ||
tabIndex?: number | undefined; | ||
/** | ||
* The currently selected country code | ||
*/ | ||
value?: string; | ||
value?: string | undefined; | ||
/** | ||
* Language translations | ||
*/ | ||
labels?: { [key: string]: string }; | ||
labels?: { [key: string]: string } | undefined; | ||
} | ||
@@ -103,3 +103,3 @@ | ||
*/ | ||
addInternationalOption?: boolean; | ||
addInternationalOption?: boolean | undefined; | ||
/** | ||
@@ -109,3 +109,3 @@ * If specified, only these countries will be available for selection. | ||
*/ | ||
countries?: string[]; | ||
countries?: string[] | undefined; | ||
@@ -117,3 +117,3 @@ /** | ||
*/ | ||
country?: string; | ||
country?: string | undefined; | ||
@@ -129,4 +129,4 @@ /** | ||
*/ | ||
countryOptionsOrder?: string[]; | ||
countrySelectComponent?: React.ComponentType<CountrySelectComponentProps>; | ||
countryOptionsOrder?: string[] | undefined; | ||
countrySelectComponent?: React.ComponentType<CountrySelectComponentProps> | undefined; | ||
/** | ||
@@ -136,3 +136,3 @@ * Country <select/> component props. Along with the usual DOM properties such as aria-label | ||
*/ | ||
countrySelectProps?: object; | ||
countrySelectProps?: object | undefined; | ||
/** | ||
@@ -145,7 +145,7 @@ * A two-letter country code for formatting `value` | ||
*/ | ||
defaultCountry?: string; | ||
defaultCountry?: string | undefined; | ||
/** | ||
* Set to true to disable both the phone number <input/> and the country <select/> | ||
*/ | ||
disabled?: boolean; | ||
disabled?: boolean | undefined; | ||
/** | ||
@@ -156,5 +156,5 @@ * @deprecated | ||
*/ | ||
displayInitialValueAsLocalNumber?: boolean; | ||
flagComponent?: React.ComponentType<{ country: string; countryName: string, flagUrl: string; flags: FlagsMap }>; | ||
flags?: FlagsMap; | ||
displayInitialValueAsLocalNumber?: boolean | undefined; | ||
flagComponent?: React.ComponentType<{ country: string; countryName: string, flagUrl: string; flags: FlagsMap }> | undefined; | ||
flags?: FlagsMap | undefined; | ||
/** | ||
@@ -170,3 +170,3 @@ * A URL template of a country flag, where "{XX}" is a two-letter country code in upper case, | ||
*/ | ||
flagUrl?: string; | ||
flagUrl?: string | undefined; | ||
/** | ||
@@ -186,3 +186,3 @@ * Phone number <input/> component. | ||
React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<any> | ||
>; | ||
> | undefined; | ||
@@ -199,3 +199,3 @@ /** | ||
*/ | ||
international?: boolean; | ||
international?: boolean | undefined; | ||
@@ -206,3 +206,3 @@ /** | ||
*/ | ||
initialValueFormat?: "national"; | ||
initialValueFormat?: "national" | undefined; | ||
@@ -219,17 +219,17 @@ /** | ||
*/ | ||
internationalIcon?: React.ComponentType<object>; | ||
labels?: { [key: string]: string }; | ||
internationalIcon?: React.ComponentType<object> | undefined; | ||
labels?: { [key: string]: string } | undefined; | ||
/** | ||
* If set to true the phone number input will get trimmed if it exceeds the maximum length for the country. | ||
*/ | ||
limitMaxLength?: boolean; | ||
metadata?: object; | ||
limitMaxLength?: boolean | undefined; | ||
metadata?: object | undefined; | ||
/** | ||
* Phone number <input/> component additional props. | ||
*/ | ||
numberInputProps?: object; | ||
numberInputProps?: object | undefined; | ||
/** | ||
* Is called every time the selected country changes: either programmatically or when user selects it manually from the list. | ||
*/ | ||
onCountryChange?: (countryCode?: string) => void; | ||
onCountryChange?: ((countryCode?: string) => void) | undefined; | ||
/** | ||
@@ -243,3 +243,3 @@ * By default, the caret position is being "intelligently" managed | ||
*/ | ||
smartCaret?: boolean; | ||
smartCaret?: boolean | undefined; | ||
/** | ||
@@ -251,5 +251,5 @@ * When `defaultCountry` is defined and the initial `value` corresponds to `defaultCountry`, | ||
*/ | ||
useNationalFormatForDefaultCountryValue?: boolean; | ||
useNationalFormatForDefaultCountryValue?: boolean | undefined; | ||
} | ||
export default class PhoneInput extends React.Component<PhoneInputProps, object> {} |
{ | ||
"name": "@types/react-phone-number-input", | ||
"version": "3.0.8", | ||
"version": "3.0.9", | ||
"description": "TypeScript definitions for react-phone-number-input", | ||
@@ -50,4 +50,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-phone-number-input", | ||
}, | ||
"typesPublisherContentHash": "1e78f98a848eff4e9a9fef4deb30cc269b11553c68c53bcfb5aa445ab43bfbf5", | ||
"typesPublisherContentHash": "4eb95db3ef18b33dcd9cf9be44b9e827bc3814d67ff2c949c966de336f41d055", | ||
"typeScriptVersion": "3.6" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Sun, 04 Jul 2021 14:01:16 GMT | ||
* Last updated: Wed, 07 Jul 2021 17:33:53 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react) | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13798