Socket
Socket
Sign inDemoInstall

react-country-region-selector

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-country-region-selector - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

4

package.json
{
"name": "react-country-region-selector",
"version": "1.4.1",
"version": "1.4.2",
"description": "CountryDropdown and RegionDropdown React components for your forms.",

@@ -41,2 +41,4 @@ "author": "benkeen",

"cross-env": "^5.1.4",
"enzyme": "^3.6.0",
"enzyme-adapter-react-16": "^1.5.0",
"eslint": "^5.0.1",

@@ -43,0 +45,0 @@ "eslint-config-standard": "^11.0.0",

# react-country-region-selector
[![Build Status](https://travis-ci.com/country-regions/react-country-region-selector.svg?branch=master)](https://travis-ci.com/country-regions/react-country-region-selector)
- [About](#about)

@@ -12,2 +14,3 @@ - [Features](#features)

- [Changelog](#changelog)
- [Tests](#tests)
- [Thanks!](#thanks)

@@ -21,10 +24,5 @@ - [License](#license) (spoiler: MIT!)

This library provides a pair of React components to display a connected country and region dropdown in your form containing
country and region data. If you're not using React, check out the
[plain vanilla JS version](https://github.com/country-regions/country-region-selector).
This library provides a pair of React components to display a connected country and region dropdowns. If you're not using React, check out the [plain vanilla JS version](https://github.com/country-regions/country-region-selector) of the library instead. The list of countries and regions is maintained separately and found in the [country-region-data](https://github.com/country-regions/country-region-data) repo.
The list of countries and regions is maintained separately and found in the
[country-region-data](https://github.com/country-regions/country-region-data) repo.
<a name="features"></a>

@@ -60,7 +58,7 @@ #### Features

<a name="examples"></a>
<a name="installation"></a>
### Installation
```javascript
npm i -D react-country-region-selector
npm i react-country-region-selector
```

@@ -131,6 +129,7 @@

| showDefaultOption | No | `true` | `boolean` | Whether you want to show a default option. |
| priorityOptions | No | `array` | `[]` | Lets you target countries that should appear at the top of the dropdown. Should also be an array of country shortcodes. |
| defaultOptionLabel | No | `"Select Country"` | `string` | The default option label. |
| labelType | No | `"full"` | `string` | Either `"full"` or `"short"`. This governs whether you see country names or country short codes in the dropdown. |
| valueType | No | `"full"` | `string` | Either `"full"` or `"short"`. This controls the actual `value` attribute of each `<option>` in the dropdown. Please note, if you set this to `"short"` you will need to let the corresponding `<RegionDropdown />` component know as well, by passing a `countryValueType="short"` attribute. |
| whitelist | No | `[]` | `array` | This setting lets you target specific countries to appear in the dropdown. Only those specified here will appear. This should be an array of country shortcodes. See the [country-region-data](https://github.com/country-region-data/country-region-data) repo for the data and the shortcodes. |
| whitelist | No | `[]` | `array` | This setting lets you target specific countries to appear in the dropdown. Only those specified here will appear. This should be an array of country shortcodes. See the [country-region-data](https://github.com/country-regions/country-region-data) repo for the data and the shortcodes. |
| blacklist | No | `[]` | `array` | Lets you target countries that should *not* appear in the dropdown. Should also be an array of country shortcodes. |

@@ -159,2 +158,3 @@ | disabled | No | `false` | `boolean` | Disables the country field. |

| disabled | No | `false` | `boolean` | Disables the region field. If set to true, it overrides `disableWhenEmpty` |
| customOptions | No | `[]` | `Array<string>` | Appends a list of string to the every region dropdown, regardless of the country selected.

@@ -176,15 +176,18 @@

- `1.4.2` - Nov 8, 2018:
- `customOptions` setting added for the Region dropdown.
- `priorityOptions` option added to the CountryDropdown to allow placing items at the top of the country dropdown.
- `1.4.1` - Sept 9, 2018: bug fix for invalid JSON data source conversion.
- `1.4.0` - Sept 8, 2018:
- *Breaking change*: the library is no longer exported in UMD format. Now only exported in es6
- *Breaking change*: the library is no longer exported in UMD format. Now it's only exported in es6
(`dist/rcrs.es.js`) and commonJS (`dist/rcrs.js`) format. This library is intended for use in _React_ applications.
- *Breaking change*: no longer available via Bower. I don't recall ANY react component used via Bower, so if I'm
mistaken here, open a github issue to explain you use case and I can re-add it.
If you need UMD, check out the []plain vanilla version](https://github.com/country-regions/country-region-selector).
mistaken here, open a github issue to explain your use-case and I can re-add it.
If you need UMD, check out the [plain vanilla version](https://github.com/country-regions/country-region-selector).
- country-region-data updated to latest version (1.4.4)
- You can now pass arbitrary attributes to the components (e.g. `style={{ color: 'red' }}` and have them output in the
markup)
- the old gulp build process updated to use rollup.
- the old gulp build process updated to use rollup
- this component library, the source data set and the plain vanilla JS version are now all grouped under a single github
organization.
organization
- `1.3.0` - Mar 20, 2018. Bug fix for invalid country, [@n-david](https://github.com/n-david)! onBlur event added.

@@ -202,2 +205,9 @@ - `1.2.3` - Nov 7, 2017. Country data updates. React moved to peer dependency, thanks [@iamdey](https://github.com/iamdey)!

<a name="tests"></a>
### Tests
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.
<a name="thanks"></a>

@@ -204,0 +214,0 @@ ### Thanks!

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc