@placekit/autocomplete-js
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -1,2 +0,2 @@ | ||
/*! @placekit/autocomplete-js v1.5.0 | © placekit.io | MIT license | https://github.com/placekit/autocomplete-js#readme */ | ||
/*! @placekit/autocomplete-js v1.6.0 | © placekit.io | MIT license | https://github.com/placekit/autocomplete-js#readme */ | ||
import type { PKOptions, PKResult } from '@placekit/client-js'; | ||
@@ -33,2 +33,3 @@ | ||
requestGeolocation(opts?: Object, cancelUpdate?: boolean): Promise<GeolocationPosition>; | ||
clearGeolocation(): PKAClient; | ||
open(): PKAClient; | ||
@@ -35,0 +36,0 @@ close(): PKAClient; |
{ | ||
"name": "@placekit/autocomplete-js", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"author": "PlaceKit <support@placekit.io>", | ||
@@ -42,7 +42,7 @@ "description": "PlaceKit Autocomplete JavaScript library", | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^25.0.1", | ||
"@rollup/plugin-commonjs": "^25.0.2", | ||
"@rollup/plugin-node-resolve": "^15.1.0", | ||
"@rollup/plugin-replace": "^5.0.2", | ||
"autoprefixer": "^10.4.14", | ||
"eslint": "^8.42.0", | ||
"eslint": "^8.43.0", | ||
"eslint-config-google": "^0.14.0", | ||
@@ -59,5 +59,5 @@ "npm-watch": "^0.11.0", | ||
"dependencies": { | ||
"@placekit/client-js": "^1.0.0", | ||
"@placekit/client-js": "^1.1.0", | ||
"@popperjs/core": "^2.11.8" | ||
} | ||
} |
@@ -49,4 +49,4 @@ <h1 align="center"> | ||
```html | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@placekit/autocomplete-js@1.4.2/dist/placekit-autocomplete.min.css" /> | ||
<script src="https://cdn.jsdelivr.net/npm/@placekit/autocomplete-js@1.4.2"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@placekit/autocomplete-js@1.5.0/dist/placekit-autocomplete.min.css" /> | ||
<script src="https://cdn.jsdelivr.net/npm/@placekit/autocomplete-js@1.5.0"></script> | ||
``` | ||
@@ -118,2 +118,3 @@ | ||
- [`pka.requestGeolocation()`](#pkarequestGeolocation) | ||
- [`pka.clearGeolocation()`](#pkaclearGeolocation) | ||
- [`pka.open()`](#pkaopen) | ||
@@ -382,3 +383,14 @@ - [`pka.close()`](#pkaclose) | ||
The location will be store in the `coordinates` global options, you can still manually override it. | ||
`state.geolocation` will be set to `true`, dispatching both the `geolocation` and `state` events. | ||
### `pka.clearGeolocation()` | ||
Clear device's geolocation stored with [`pka.requestGeolocation`](#pkarequestGeolocation). | ||
```js | ||
pka.clearGeolocation(); | ||
``` | ||
The global option `coordinates` will be deleted and the `state.geolocation` will be set to `false`, dispatching both the `geolocation` and `state` events. | ||
### `pka.open()` | ||
@@ -385,0 +397,0 @@ |
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 not supported yet
Sorry, the diff of this file is too big to display
279434
6939
482
Updated@placekit/client-js@^1.1.0