@placekit/autocomplete-js
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -1,2 +0,2 @@ | ||
/*! @placekit/autocomplete-js v1.0.1 | © placekit.io | MIT license | https://github.com/placekit/autocomplete-js#readme */ | ||
/*! @placekit/autocomplete-js v1.1.0 | © placekit.io | MIT license | https://github.com/placekit/autocomplete-js#readme */ | ||
import type { PKOptions, PKResult } from '@placekit/client-js'; | ||
@@ -48,2 +48,3 @@ | ||
formatValue?: (item: PKResult) => string; | ||
noResults?: string; | ||
strategy?: 'absolute' | 'fixed'; | ||
@@ -50,0 +51,0 @@ flip?: boolean; |
{ | ||
"name": "@placekit/autocomplete-js", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"author": "PlaceKit <support@placekit.io>", | ||
@@ -43,6 +43,6 @@ "description": "PlaceKit Autocomplete JavaScript library", | ||
"@rollup/plugin-commonjs": "^24.0.1", | ||
"@rollup/plugin-node-resolve": "^15.0.1", | ||
"@rollup/plugin-node-resolve": "^15.0.2", | ||
"@rollup/plugin-replace": "^5.0.2", | ||
"autoprefixer": "^10.4.14", | ||
"eslint": "^8.37.0", | ||
"eslint": "^8.38.0", | ||
"eslint-config-google": "^0.14.0", | ||
@@ -52,3 +52,3 @@ "npm-watch": "^0.11.0", | ||
"postcss-banner": "^4.0.1", | ||
"rimraf": "^4.4.1", | ||
"rimraf": "^5.0.0", | ||
"rollup": "^3.20.2", | ||
@@ -55,0 +55,0 @@ "rollup-plugin-cleanup": "^3.2.1", |
@@ -47,3 +47,3 @@ <h1 align="center"> | ||
```html | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@placekit/autocomplete-js@1.0.0/dist/placekit-autocomplete.min.css" /> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@placekit/autocomplete-js@1.1.0/dist/placekit-autocomplete.min.css" /> | ||
<script src="https://cdn.jsdelivr.net/npm/@placekit/autocomplete-js"></script> | ||
@@ -69,3 +69,3 @@ ``` | ||
<script type="module"> | ||
import placekit from 'https://cdn.jsdelivr.net/npm/@placekit/autocomplete-js@1.0.0/dist/placekit-autocomplete.esm.js'; | ||
import placekit from 'https://cdn.jsdelivr.net/npm/@placekit/autocomplete-js@1.1.0/dist/placekit-autocomplete.esm.js'; | ||
const pka = placekitAutocomplete(/* ... */); | ||
@@ -161,4 +161,5 @@ // ... | ||
| `offset` | AutoComplete | `integer` | `4` | Gap between input and suggestions list in pixels. | | ||
| `template` | AutoComplete | `(item: object) => string` | [see index.js](./src/index.js#L24-L39) | Suggestion item formatting function. | | ||
| `formatValue` | AutoComplete | `(item: object) => string` | [see index.js](./src/index.js#L40) | Input value formatting function when selected from list. | | ||
| `template` | AutoComplete | `(item: object) => string` | [see index.js](./src/index.js#L92-L107) | Suggestion item formatting function. | | ||
| `formatValue` | AutoComplete | `(item: object) => string` | [see index.js](./src/index.js#L108) | Input value formatting function when selected from list. | | ||
| `noResults` | AutoComplete | `string` | [see index.js](./src/index.js#L109-L114) | No result template. | | ||
| `strategy` | AutoComplete | `'absolute' | 'fixed'` | `absolute` | [Popper positioning strategy](https://popper.js.org/docs/v2/constructors/#strategy) | | ||
@@ -165,0 +166,0 @@ | `flip` | AutoComplete | `boolean` | `false` | Flip position top when overflowing. | |
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
262241
6467
413