@shopify/address
Advanced tools
Comparing version 4.2.1 to 4.2.2
@@ -34,4 +34,3 @@ 'use strict'; | ||
async getCountries({ | ||
includeHiddenZones = false, | ||
signupOnly = false | ||
includeHiddenZones = false | ||
} = {}) { | ||
@@ -42,4 +41,3 @@ const cacheKey = this.cacheKey(this.locale, includeHiddenZones); | ||
const countries = await loader.loadCountries(this.locale, { | ||
includeHiddenZones, | ||
signupOnly | ||
includeHiddenZones | ||
}); | ||
@@ -46,0 +44,0 @@ ORDERED_COUNTRIES_CACHE.set(cacheKey, countries); |
@@ -6,4 +6,4 @@ 'use strict'; | ||
const query = ` | ||
query countries($locale: SupportedLocale!, $signupOnly: Boolean) { | ||
countries(locale: $locale, signupOnly: $signupOnly) { | ||
query countries($locale: SupportedLocale!) { | ||
countries(locale: $locale) { | ||
name | ||
@@ -10,0 +10,0 @@ code |
@@ -9,4 +9,3 @@ 'use strict'; | ||
const loadCountries = memoizeAsync(async (locale, { | ||
includeHiddenZones = false, | ||
signupOnly = false | ||
includeHiddenZones = false | ||
} = {}) => { | ||
@@ -21,4 +20,3 @@ const response = await fetch(addressConsts.GRAPHQL_ENDPOINT, { | ||
locale: locale.replace(/-/, '_').toUpperCase(), | ||
includeHiddenZones, | ||
signupOnly | ||
includeHiddenZones | ||
} | ||
@@ -25,0 +23,0 @@ }) |
@@ -14,5 +14,4 @@ import type { Address, FieldName, Country } from '@shopify/address-consts'; | ||
}): Promise<Country>; | ||
getCountries({ includeHiddenZones, signupOnly, }?: { | ||
getCountries({ includeHiddenZones }?: { | ||
includeHiddenZones?: boolean | undefined; | ||
signupOnly?: boolean | undefined; | ||
}): Promise<Country[]>; | ||
@@ -19,0 +18,0 @@ getZoneName(countryCode: string, zoneCode: string): Promise<string | undefined>; |
@@ -1,3 +0,3 @@ | ||
declare const query = "\nquery countries($locale: SupportedLocale!, $signupOnly: Boolean) {\n countries(locale: $locale, signupOnly: $signupOnly) {\n name\n code\n continent\n phoneNumberPrefix\n autocompletionField\n provinceKey\n labels {\n address1\n address2\n city\n company\n country\n firstName\n lastName\n phone\n postalCode\n zone\n }\n optionalLabels {\n address2\n }\n formatting {\n edit\n show\n }\n zones {\n name\n code\n }\n }\n}\n\nquery country($countryCode: SupportedCountry!, $locale: SupportedLocale!) {\n country(countryCode: $countryCode, locale: $locale) {\n name\n code\n continent\n phoneNumberPrefix\n autocompletionField\n provinceKey\n labels {\n address1\n address2\n city\n company\n country\n firstName\n lastName\n phone\n postalCode\n zone\n }\n optionalLabels {\n address2\n }\n formatting {\n edit\n show\n }\n zones {\n name\n code\n }\n }\n}\n"; | ||
declare const query = "\nquery countries($locale: SupportedLocale!) {\n countries(locale: $locale) {\n name\n code\n continent\n phoneNumberPrefix\n autocompletionField\n provinceKey\n labels {\n address1\n address2\n city\n company\n country\n firstName\n lastName\n phone\n postalCode\n zone\n }\n optionalLabels {\n address2\n }\n formatting {\n edit\n show\n }\n zones {\n name\n code\n }\n }\n}\n\nquery country($countryCode: SupportedCountry!, $locale: SupportedLocale!) {\n country(countryCode: $countryCode, locale: $locale) {\n name\n code\n continent\n phoneNumberPrefix\n autocompletionField\n provinceKey\n labels {\n address1\n address2\n city\n company\n country\n firstName\n lastName\n phone\n postalCode\n zone\n }\n optionalLabels {\n address2\n }\n formatting {\n edit\n show\n }\n zones {\n name\n code\n }\n }\n}\n"; | ||
export default query; | ||
//# sourceMappingURL=graphqlQuery.d.ts.map |
import type { Country, ResponseError } from '@shopify/address-consts'; | ||
export declare const loadCountries: (locale: string, options?: { | ||
includeHiddenZones?: boolean; | ||
signupOnly?: boolean; | ||
}) => Promise<Country[]>; | ||
@@ -6,0 +5,0 @@ export declare const loadCountry: (locale: string, countryCode: string, options?: { |
{ | ||
"name": "@shopify/address", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Address utilities for formatting addresses", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
0
41053
759