Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@ideal-postcodes/address-finder

Package Overview
Dependencies
8
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.8.2 to 1.8.3

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [1.8.3](https://github.com/ideal-postcodes/address-finder/compare/1.8.2...1.8.3) (2021-04-23)
### Bug Fixes
* **deps:** bump @ideal-postcodes/jsutil from 4.3.7 to 4.3.8 ([#272](https://github.com/ideal-postcodes/address-finder/issues/272)) ([df76ba8](https://github.com/ideal-postcodes/address-finder/commit/df76ba841e7531b38269f882d4e014393fbe2649))
## [1.8.2](https://github.com/ideal-postcodes/address-finder/compare/1.8.1...1.8.2) (2021-03-15)

@@ -2,0 +9,0 @@

34

package.json
{
"name": "@ideal-postcodes/address-finder",
"version": "1.8.2",
"version": "1.8.3",
"description": "Address Finder JS library backed by the Ideal Postcodes UK address search API",

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

"@babel/cli": "~7.13.0",
"@babel/core": "~7.12.3",
"@babel/core": "~7.13.13",
"@babel/preset-env": "~7.13.9",

@@ -114,6 +114,6 @@ "@cablanchard/eslint-config": "~2.1.0",

"@ideal-postcodes/api-fixtures": "~1.2.0",
"@ideal-postcodes/api-typings": "~2.0.1",
"@ideal-postcodes/doc-assets": "~1.0.0",
"@ideal-postcodes/api-typings": "~2.1.0",
"@ideal-postcodes/doc-assets": "~1.0.6",
"@ideal-postcodes/supported-browsers": "~2.5.0",
"@rollup/plugin-commonjs": "~17.1.0",
"@rollup/plugin-commonjs": "~18.0.0",
"@rollup/plugin-inject": "~4.0.2",

@@ -123,3 +123,3 @@ "@rollup/plugin-node-resolve": "~11.2.0",

"@types/dotenv": "~8.2.0",
"@types/karma": "~6.1.0",
"@types/karma": "~6.3.0",
"@types/lodash": "~4.14.168",

@@ -129,13 +129,13 @@ "@types/mocha": "~8.2.0",

"@types/sinon": "~9.0.10",
"@typescript-eslint/eslint-plugin": "~4.15.1",
"@typescript-eslint/eslint-plugin": "~4.21.0",
"@wessberg/rollup-plugin-ts": "~1.3.8",
"chai": "~4.3.0",
"codecov": "~3.8.1",
"core-js": "~3.8.3",
"core-js-pure": "~3.9.1",
"cypress": "~6.6.0",
"core-js": "~3.11.0",
"core-js-pure": "~3.10.0",
"cypress": "~7.1.0",
"dotenv": "~8.2.0",
"eslint": "~7.21.0",
"eslint": "~7.24.0",
"eslint-plugin-compat": "~3.9.0",
"karma": "~6.1.1",
"karma": "~6.3.2",
"karma-chrome-launcher": "~3.1.0",

@@ -146,4 +146,4 @@ "karma-cli": "~2.0.0",

"karma-sauce-launcher": "~4.3.4",
"karma-typescript": "~5.4.0",
"karma-typescript-es6-transform": "~5.4.0",
"karma-typescript": "~5.5.1",
"karma-typescript-es6-transform": "~5.5.0",
"minify": "~7.0.0",

@@ -153,6 +153,6 @@ "mocha": "~8.3.0",

"promise-polyfill": "~8.2.0",
"puppeteer": "~7.1.0",
"rollup": "~2.40.0",
"puppeteer": "~9.0.0",
"rollup": "~2.45.1",
"semantic-release": "~17.4.1",
"sinon": "~9.2.2",
"sinon": "~10.0.0",
"ts-node": "~9.1.1",

@@ -159,0 +159,0 @@ "typedoc": "~0.20.30",

@@ -11,3 +11,3 @@ <h1 align="center">

`@ideal-postcodes/address-finder` is a JavaScript library that delivers address autocomplete (or adress typeahead) search functionality on a webpage.
`@ideal-postcodes/address-finder` is a JavaScript library that delivers address autocomplete (or address typeahead) search functionality on a webpage.

@@ -25,3 +25,3 @@ This package should be consumed by a bundler or transpiler (e.g. webpack, parcel, rollup) for minification, module resolution and specific browser support.

- [Quickstart](#quickstart)
- [Library Documentation](https://address-finder.ideal-postcodes.dev/)
- [Library Documentation](interfaces/index.controlleroptions.html)
- [npm Module](https://www.npmjs.com/package/@ideal-postcodes/address-finder)

@@ -45,3 +45,3 @@ - [GitHub Repository](https://github.com/ideal-postcodes/address-finder)

- [HTTP API Client Repository](https://github.com/ideal-postcodes/core-browser)
- [ideal-postcodes-autocomplete](https://github.com/ideal-postcodes/ideal-postcodes-autocomplete), the predecessor to this library tested on IE9 and above
- [Ideal Postcodes Autocomplete](https://github.com/ideal-postcodes/ideal-postcodes-autocomplete), the predecessor to this library tested on IE9 and above

@@ -51,3 +51,3 @@ ## How it Works

1. [Add the library to your project](#install). Your webpage should have pre-existing address input fields as well as an input field to host the finder
2. [Run initialisation code](#instantiate) providing a reference to the Address Finder input and [any other configuration](#setup)
2. [Run initialisation code](#instantiate) providing a reference to the Address Finder input and [any other configuration](modules/index.html#setup)
3. When initialising, Address Finder will perform a key check to determine whether it is usable. If the check fails, initialisation is aborted. Use the `onCheckFailed` callback to update your page for manual address entry.

@@ -58,5 +58,5 @@ 4. When initialised, Address Finder binds to the input field of your choice and renders a dropdown of address suggestion when the user starts typing

- [Configuration & Usage](#configuration)
- [Configuration & Usage](#configuration-amp-usage)
- [Quickstart](#quickstart)
- [Populating your Address Fields](#populating)
- [Populating your Address Fields](#populating-your-address-fields)
- [Styling](#styling)

@@ -82,3 +82,3 @@ - [Setup Options](#setup-options)

Instantiate Address Finder with [`AddressFinder.setup`](https://address-finder.ideal-postcodes.dev/globals.html#setup).
Instantiate Address Finder with [`AddressFinder.setup`](modules/index.html#setup).

@@ -101,3 +101,3 @@ ```javascript

[Configuration options](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html)
[Configuration options](interfaces/index.controlleroptions.html)

@@ -136,7 +136,7 @@ It's also possible to pass `HTMLElements` as `inputField` or `outputFields`.

When an address is select, the addressing data will be piped to those address inputs designated in `output_fields`. For instance `line_1: "#line_1"` will write Address Line One data to a HTML entity with ID `line_1`.
When an address is select, the addressing data will be piped to those address inputs designated in `outputFields`. For instance `line_1: "#line_1"` will write Address Line One data to a HTML entity with ID `line_1`.
Assigning the 3 address line, post town and postcode fields, is all addressing information required to identify a UK premise. You may extract more data for an address by passing more properties into the `output_fields` configuration object.
Assigning the 3 address line, post town and postcode fields, is all addressing information required to identify a UK premise. You may extract more data for an address by passing more properties into the `outputFields` configuration object.
The configuration attributes for `outputFields` matches the Address response object. E.g. street name can be populated can be populated using the [`thoroughfare`](s://api-typings.ideal-postcodes.dev/interfaces/address.html#thoroughfare) attribute. A list of address attributes provided by the API can be found at [@ideal-postcodes/api-typings](https://api-typings.ideal-postcodes.dev/interfaces/address.html).
The configuration attributes for `outputFields` matches the Address response object. E.g. street name can be populated can be populated using the [`thoroughfare`](https://api-typings.ideal-postcodes.dev/interfaces/address.html#thoroughfare) attribute. A list of address attributes provided by the API can be found at [@ideal-postcodes/api-typings](https://api-typings.ideal-postcodes.dev/interfaces/address.html).

@@ -157,5 +157,5 @@ [More information on addressing data can be found on our data documentation](https://ideal-postcodes.co.uk/documentation/paf-data).

Default CSS classes can be overridden. For instance, [containerClass](https://address-finder.ideal-postcodes.dev/globals.html#defaults.containerclass), [listClass](https://address-finder.ideal-postcodes.dev/globals.html#defaults.listclass) and [messageClass](https://address-finder.ideal-postcodes.dev/globals.html#defaults.messageclass) are all defined in [defaults](https://address-finder.ideal-postcodes.dev/globals.html#defaults).
Default CSS classes can be overridden. For instance, [containerClass](interfaces/index.controlleroptions.html#containerclass), [listClass](interfaces/index.controlleroptions.html#listclass) and [messageClass](interfaces/index.controlleroptions.html#messageclass) are all defined in [defaults](modules/controller.html#defaults).
#### [`injectStyle`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#injectstyle)
#### [`injectStyle`](interfaces/index.controlleroptions.html#injectstyle)

@@ -176,26 +176,26 @@ Set `injectStyle: true` to inject default Address Finder style into DOM. Defaults to `false`.

- [msgFallback](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#msgfallback)
- [msgInitial](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#msginitial)
- [msgNoMatch](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#msgnomatch)
- [msgUnhide](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#msgunhide)
- [msgFallback](interfaces/index.controlleroptions.html#msgfallback)
- [msgInitial](interfaces/index.controlleroptions.html#msginitial)
- [msgNoMatch](interfaces/index.controlleroptions.html#msgnomatch)
- [msgUnhide](interfaces/index.controlleroptions.html#msgunhide)
### Setup Options
[`AddressFinder.setup()`](https://address-finder.ideal-postcodes.dev/globals.html#setup) accepts a single configuration object and returns the [Address Finder controller instance](https://address-finder.ideal-postcodes.dev/classes/controller.html).
[`AddressFinder.setup()`](modules/index.html#setup) accepts a single configuration object and returns the [Address Finder controller instance](classes/controller.controller-1.html).
Below is the list of parameters you can use to modify Address Finder.
A complete list of configuration options can be found [in the library documentation](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html)
A complete list of configuration options can be found [in the library documentation](interfaces/index.controlleroptions.html)
### Required Config
#### [`inputField`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#inputfield)
#### [`inputField`](interfaces/index.controlleroptions.html#inputfield)
CSS selector or HTML Element which specifies the `<input>` field which the Address Finder interface should bind
#### [`apiKey`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#apiKey)
#### [`apiKey`](interfaces/index.controlleroptions.html#apikey)
API Key from your Ideal Postcodes account. Typically begins `ak_`
#### [`outputFields`](https://address-finder.ideal-postcodes.dev/interfaces/controllerconfig.html#outputfields)
#### [`outputFields`](interfaces/index.controlleroptions.html#outputfields)

@@ -216,3 +216,3 @@ Specify where to send address data given a selected address. A object which maps an address attribute to the CSS selector of an input field or `HTMLElement` like `HTMLInputElement` or `HTMLTextAreaElement`.

More complex, dynamic assignment can be performed using the [`onAddressRetrieved`](#onaddressretrieved) callback.
More complex, dynamic assignment can be performed using the [`onAddressRetrieved`](interfaces/index.controlleroptions.html#onaddressretrieved) callback.

@@ -223,3 +223,3 @@ Output fields assigned with a query selector are evaluated lazily (i.e. when an address attribute needs to be piped to a field).

#### [`checkKey`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#checkkey)
#### [`checkKey`](interfaces/index.controlleroptions.html#checkkey)

@@ -235,9 +235,9 @@ If enabled, the plugin will check if the key is in a usable state before initialising itself.

If the check fails, the plugin will not initialise. You can use the [`onFailedCheck`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onfailedcheck) callback to customise your response to a failed check.
If the check fails, the plugin will not initialise. You can use the [`onFailedCheck`](interfaces/index.controlleroptions.html#onfailedcheck) callback to customise your response to a failed check.
#### [`titleizePostTown`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#titleizeposttown)
#### [`titleizePostTown`](interfaces/index.controlleroptions.html#titleizeposttown)
An optional field to convert the case of the Post Town from upper case into title case. E.g. `"LONDON"` becomes `"London".` Default is `true`
#### [`removeOrganisation`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#removeorganisation)
#### [`removeOrganisation`](interfaces/index.controlleroptions.html#removeorganisation)

@@ -248,11 +248,11 @@ If set to `true`, organisation name will be removed from the address.

#### [`autocomplete`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#autocomplete)
#### [`autocomplete`](interfaces/index.controlleroptions.html#autocomplete)
Sets the `autocomplete=` attribute of the input element. Setting this attribute aims to prevent some browsers (particularly Chrome) from providing a clashing autofill overlay.
The best practice for this attribute breaks over time (see https://stackoverflow.com/questions/15738259/disabling-chrome-autofill) and is specific to different forms. If you are observing chrome's autofill clashing on your form, update this attribute to the best practice du jour.
The best practice for this attribute breaks over time (see [https://stackoverflow.com/questions/15738259/disabling-chrome-autofill](https://stackoverflow.com/questions/15738259/disabling-chrome-autofill)) and is specific to different forms. If you are observing Chrome's autofill clashing on your form, update this attribute to the best practice du jour.
Defaults to `"none"`.
#### [`hide`](https://address-finder.ideal-postcodes.dev/interfaces/controllerconfig.html#hide)
#### [`hide`](interfaces/view.viewoptions.html#hide)

@@ -266,3 +266,3 @@ Accepts an array of HTMLElements or CSS selectors. E.g.

document.getElementById("line_2"),
document.querySelector("#line_3")],
document.getElemmentById("line_3")],
],

@@ -278,3 +278,3 @@ }

#### [`unhide`](https://address-finder.ideal-postcodes.dev/interfaces/controllerconfig.html#unhide)
#### [`unhide`](interfaces/view.viewoptions.html#unhide)

@@ -287,23 +287,23 @@ Specify a query selector (`string`) or (`HTMLElement`) as a custom clickable element to unhide and form fields configured with `hide`. This will prevent the default unhide element from being rendered.

#### [`onLoaded`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onloaded)
#### [`onLoaded`](interfaces/index.controlleroptions.html#onloaded)
Invoked when Address Finder has been successfully attached to the input element.
#### [`onFailedCheck`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onfailedcheck)
#### [`onFailedCheck`](interfaces/index.controlleroptions.html#onfailedcheck)
A function invoked if `checkKey` is enabled and the check fails.
#### [`onSuggestionsRetrieved`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onsuggestionsretrieved)
#### [`onSuggestionsRetrieved`](interfaces/index.controlleroptions.html#onsuggestionsretrieved)
Invoked immediately after address suggestions are retrieved from the API. The first argument is an array of address suggestions.
#### [`onAddressSelected`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onAddressSelected)
#### [`onAddressSelected`](interfaces/index.controlleroptions.html#onaddressselected)
Invoked immediately after the user has selected a suggestion (either by click or keypress). The first argument is an object which represents the suggestion selected.
#### [`onAddressRetrieved`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onaddressretrieved)
#### [`onAddressRetrieved`](interfaces/index.controlleroptions.html#onaddressretrieved)
Invoked when the Address Finder client has retrieved a full address from the API following a user accepting a suggestion. The first argument is an object representing the address that has been retrieved.
#### [`onSearchError`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onsearcherror)
#### [`onSearchError`](interfaces/index.controlleroptions.html#onsearcherror)

@@ -316,3 +316,3 @@ Invoked when an error has occurred following an attempt to retrieve a full address. In this scenario the user will also receive a message to manually input their address.

#### [`onSuggestError`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onsuggesterror)
#### [`onSuggestionError`](interfaces/index.controlleroptions.html#onsuggestionerror)

@@ -325,31 +325,31 @@ Invoked when an error has occurred following an attempt to retrieve suggestions for a key press. In this scenario the user will also receive a message to manually input their address.

#### [`onOpen`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onopen)
#### [`onOpen`](interfaces/index.controlleroptions.html#onopen)
Invoked when Address Finder suggestion box is opened (i.e. presented to the user).
#### [`onBlur`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onblur)
#### [`onBlur`](interfaces/index.controlleroptions.html#onblur)
Invoked when the user unfocuses from the address input field.
#### [`onClose`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onclose)
#### [`onClose`](interfaces/index.controlleroptions.html#onclose)
Invoked when Address Finder suggestion box is closed (i.e. hidden from user).
#### [`onFocus`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onfocus)
#### [`onFocus`](interfaces/index.controlleroptions.html#onfocus)
Invoked when user selects or focuses address input field.
#### [`onInput`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#oninput)
#### [`onInput`](interfaces/index.controlleroptions.html#oninput)
Invoked when user selects or focuses address input field.
#### [`onMount`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onmount)
#### [`onMounted`](interfaces/index.controlleroptions.html#onmounted)
Invoked when controller attaches to the DOM (`controller.view.attach()`).
#### [`onRemove`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onremove)
#### [`onRemove`](interfaces/index.controlleroptions.html#onremove)
Invoked when controller detaches from the DOM (`controller.view.detach()`).
#### [`onAddressPopulated`](https://address-finder.ideal-postcodes.dev/interfaces/controlleroptions.html#onaddresspopulated)
#### [`onAddressPopulated`](interfaces/index.controlleroptions.html#onaddresspopulated)

@@ -360,2 +360,2 @@ Invoked after the selected address is applied to input fields.

Copyright IDDQD Limited
Copyright &copy; IDDQD Limited
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc