@commercelayer/react-components 2.53.1 → 2.53.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isValidState=exports.getStateOfCountry=exports.getCountries=void 0;const countries_states_cities_service_1=require("countries-states-cities-service");function getCountries(){return countries_states_cities_service_1.Countries.getCountries({sort:{mode:"alphabetical",key:"name"}}).map(({name,iso2})=>({label:name,value:iso2}))}exports.getCountries=getCountries;function getStateOfCountry(country_code){const filters={country_code};return country_code==="IT"&&(filters.is_region=!1),countries_states_cities_service_1.States.getStates({filters,sort:{mode:"alphabetical",key:"name"}}).map(({name,state_code})=>({label:name.replace("Province of",""),value:state_code}))}exports.getStateOfCountry=getStateOfCountry;function isValidState(state_code,country_code){return countries_states_cities_service_1.States.getStates({filters:{state_code,country_code}}).length>0}exports.isValidState=isValidState;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isValidState=exports.getStateOfCountry=exports.getCountries=void 0;const countries_service_1=require("@ac-dev/countries-service"),states_service_1=require("@ac-dev/states-service");function getCountries(){return countries_service_1.Countries.getCountries({sort:{mode:"alphabetical",key:"name"}}).map(({name,iso2})=>({label:name,value:iso2}))}exports.getCountries=getCountries;function getStateOfCountry(country_code){const filters={country_code};return country_code==="IT"&&(filters.is_region=!1),states_service_1.States.getStates({filters,sort:{mode:"alphabetical",key:"name"}}).map(({name,state_code})=>({label:name.replace("Province of",""),value:state_code}))}exports.getStateOfCountry=getStateOfCountry;function isValidState(state_code,country_code){return states_service_1.States.getStates({filters:{state_code,country_code}}).length>0}exports.isValidState=isValidState;
@@ -1 +1 @@
1
- import{Countries,States}from"countries-states-cities-service";export function getCountries(){return Countries.getCountries({sort:{mode:"alphabetical",key:"name"}}).map(({name,iso2})=>({label:name,value:iso2}))}export function getStateOfCountry(country_code){const filters={country_code};return country_code==="IT"&&(filters.is_region=!1),States.getStates({filters,sort:{mode:"alphabetical",key:"name"}}).map(({name,state_code})=>({label:name.replace("Province of",""),value:state_code}))}export function isValidState(state_code,country_code){return States.getStates({filters:{state_code,country_code}}).length>0}
1
+ import{Countries}from"@ac-dev/countries-service";import{States}from"@ac-dev/states-service";export function getCountries(){return Countries.getCountries({sort:{mode:"alphabetical",key:"name"}}).map(({name,iso2})=>({label:name,value:iso2}))}export function getStateOfCountry(country_code){const filters={country_code};return country_code==="IT"&&(filters.is_region=!1),States.getStates({filters,sort:{mode:"alphabetical",key:"name"}}).map(({name,state_code})=>({label:name.replace("Province of",""),value:state_code}))}export function isValidState(state_code,country_code){return States.getStates({filters:{state_code,country_code}}).length>0}