react-country-region-selector
Advanced tools
Comparing version 1.4.7 to 2.0.0
@@ -1,8 +0,10 @@ | ||
// Type definitions for react-country-region-selector 1.4.5 by <https://github.com/country-regions/react-country-region-selector> | ||
// Type definitions for react-country-region-selector 2.0.0 by | ||
// Project: https://github.com/country-regions/react-country-region-selector | ||
// Definitions by: Kyle Davis <https://github.com/kyledavisdev> | ||
import * as React from 'react'; | ||
import * as React from "react"; | ||
export interface CountryDropdownProps { | ||
export type ValueType = "full" | "short"; | ||
export interface CountryDropdownProps<T = Element> { | ||
/** | ||
@@ -22,6 +24,8 @@ * The currently selected country. This should either | ||
* using (or just the parent component state). | ||
* | ||
* The original event is also provided optionally. | ||
* | ||
* Default value: undefined | ||
*/ | ||
onChange: (val: string) => void; | ||
onChange: (val: string, e?: React.ChangeEvent<T>) => void; | ||
@@ -85,3 +89,3 @@ /** | ||
*/ | ||
labelType?: string; | ||
labelType?: ValueType; | ||
@@ -97,3 +101,3 @@ /** | ||
*/ | ||
valueType?: string; | ||
valueType?: ValueType; | ||
@@ -128,3 +132,3 @@ /** | ||
export interface RegionDropdownProps { | ||
export interface RegionDropdownProps<T = Element> { | ||
/** | ||
@@ -149,5 +153,7 @@ * The currently selected country. | ||
* | ||
* The original event is also provided optionally. | ||
* | ||
* Default value: undefined | ||
*/ | ||
onChange: (val: string) => void; | ||
onChange: (val: string, e?: React.ChangeEvent<T>) => void; | ||
@@ -213,3 +219,3 @@ /** | ||
*/ | ||
countryValueType?: string; | ||
countryValueType?: ValueType; | ||
@@ -222,3 +228,3 @@ /** | ||
*/ | ||
labelType?: "full" | "short"; | ||
labelType?: ValueType; | ||
@@ -231,3 +237,3 @@ /** | ||
*/ | ||
valueType?: "full" | "short"; | ||
valueType?: ValueType; | ||
@@ -239,3 +245,3 @@ /** | ||
*/ | ||
disableWhenEmpty?: string; | ||
disableWhenEmpty?: boolean; | ||
@@ -247,3 +253,3 @@ /** | ||
*/ | ||
disabled?: string; | ||
disabled?: boolean; | ||
@@ -250,0 +256,0 @@ /** |
{ | ||
"name": "react-country-region-selector", | ||
"version": "1.4.7", | ||
"version": "2.0.0", | ||
"description": "CountryDropdown and RegionDropdown React components for your forms.", | ||
@@ -5,0 +5,0 @@ "author": "country-regions", |
@@ -177,2 +177,5 @@ # react-country-region-selector | ||
- `2.0.0` - Mar 21, 2020 | ||
- Typings fixes | ||
- Dependency updates | ||
- `1.4.7` - Dec 24, 2019: | ||
@@ -222,4 +225,3 @@ - Fix to include typings in published bundle. | ||
The Jest/Enzyme unit tests are found in the `src/tests` folder. The repo is hooked up to Travis CI to automatically run | ||
the tests for each commit. | ||
The Jest/Enzyme unit tests are found in the `src/tests` folder. The repo is hooked up to Travis CI to automatically run the tests for each commit. | ||
@@ -231,5 +233,6 @@ | ||
To run this locally, do the following: | ||
- `yarn install` | ||
- in one terminal window: `yarn start` | ||
- in another terminal window, go to the `/example` subfolder and do the same: `yarn install`, `yarn start` | ||
- `npm install` | ||
- in one terminal window: `npm start` | ||
- in another terminal window, go to the `/example` subfolder and do the same: `npm install`, `npm start` | ||
- open `http://localhost:3000` in your browser. | ||
@@ -236,0 +239,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
250
223309
1704