New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@geoapify/geocoder-autocomplete

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@geoapify/geocoder-autocomplete - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

13

dist/autocomplete.d.ts

@@ -20,2 +20,3 @@ export declare class GeocoderAutocomplete {

setLimit(limit: number): void;
setValue(value: string): void;
on(operation: 'select' | 'suggestions', callback: (param: any) => any): void;

@@ -35,8 +36,9 @@ off(operation: 'select' | 'suggestions', callback: (param: any) => any): void;

}
export interface GeocoderAutocompleteOptions extends GeocoderAutocompleteAppearance {
type?: 'country' | 'state' | 'city' | 'postcode' | 'street' | 'amenity';
lang?: 'en' | 'de' | 'it' | 'fr';
export interface GeocoderAutocompleteOptions {
type?: LocationType;
lang?: SupportedLanguage;
position?: GeoPosition;
countryCodes?: CountyCode[];
limit?: number;
placeholder?: string;
}

@@ -47,5 +49,4 @@ export interface GeoPosition {

}
export interface GeocoderAutocompleteAppearance {
placeholder?: string;
}
export declare type LocationType = 'country' | 'state' | 'city' | 'postcode' | 'street' | 'amenity';
export declare type SupportedLanguage = 'en' | 'de' | 'it' | 'fr';
export declare type CountyCode = "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "an" | "ao" | "ap" | "aq" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bm" | "bn" | "bo" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "eu" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "in" | "io" | "iq" | "ir" | "is" | "it" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pm" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "st" | "sv" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw";

@@ -54,2 +54,5 @@ "use strict";

}
setValue(value) {
this.inputElement.value = value;
}
on(operation, callback) {

@@ -104,3 +107,3 @@ if (operation === 'select' && this.changeCallbacks.indexOf(callback) < 0) {

if (this.options.countryCodes) {
url += `&lang=${this.options.countryCodes.join(',')}`;
url += `&countryCodes=${this.options.countryCodes.join(',')}`;
}

@@ -122,3 +125,2 @@ if (this.options.position) {

this.currentItems = data.features;
console.log(this.currentItems);
this.notifySuggestions(this.currentItems);

@@ -125,0 +127,0 @@ if (!this.currentItems.length) {

export { GeocoderAutocomplete } from './autocomplete';
export { GeocoderAutocompleteOptions } from './autocomplete';
export { LocationType } from './autocomplete';
export { SupportedLanguage } from './autocomplete';
export { GeoPosition } from './autocomplete';
export { CountyCode } from './autocomplete';
{
"name": "@geoapify/geocoder-autocomplete",
"version": "1.0.1",
"version": "1.0.2",
"description": "Geocoder autocomplete field",

@@ -13,3 +13,3 @@ "main": "dist/index.js",

"type": "git",
"url": "git+ssh://git@gitlab.com/geoapify/geocoder-autocomplete.git"
"url": "git+https://git@github.com/geoapify/geocoder-autocomplete.git"
},

@@ -24,8 +24,8 @@ "keywords": ["geocoding", "address", "autocomplete", "search", "city", "country", "state", "amenity", "location"],

"bugs": {
"url": "https://gitlab.com/geoapify/geocoder-autocomplete/issues"
"url": "https://github.com/geoapify/geocoder-autocomplete/issues"
},
"homepage": "https://gitlab.com/geoapify/geocoder-autocomplete#readme",
"homepage": "https://github.com/geoapify/geocoder-autocomplete#readme",
"devDependencies": {
"typescript": "^3.4.3"
}
}
}

@@ -103,2 +103,10 @@ # Geoapify Geocoder Autocomplete

#### Set display value
You can also set initial value or change display value:
```javascript
const autocomplete = new GeocoderAutocomplete(...);
autocomplete.setValue(value);
```
## Geocoder Autocomplete events

@@ -129,2 +137,2 @@ The Geocoder Autocomplete can notify when the list of suggestions is changed or a selection happened:

# Find more Geoapify APIs, Playgrounds and code samples on [apidocs.geoapify.com](https://apidocs.geoapify.com).
### Find more Geoapify APIs, Playgrounds and code samples on [apidocs.geoapify.com](https://apidocs.geoapify.com).
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