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.7.0 to 1.8.0

12

CHANGELOG.md

@@ -0,1 +1,13 @@

# [1.8.0](https://github.com/ideal-postcodes/address-finder/compare/1.7.0...1.8.0) (2021-03-11)
### Bug Fixes
* **CSS:** Raise z-index of list and selected ([205ec58](https://github.com/ideal-postcodes/address-finder/commit/205ec581afd6706233d4a9f90809da65e7ca0954))
### Features
* **Autofill Prevention:** Custom autocomplete ([86722cc](https://github.com/ideal-postcodes/address-finder/commit/86722ccdcd13811dbdf51a3cad1f9dec6335b95f))
# [1.7.0](https://github.com/ideal-postcodes/address-finder/compare/1.6.0...1.7.0) (2021-03-01)

@@ -2,0 +14,0 @@

1

dist/controller.js

@@ -37,2 +37,3 @@ "use strict";

inputField: "",
autocomplete: "none",
// Messages

@@ -39,0 +40,0 @@ msgFallback: "Please enter your address manually",

2

dist/css.js

@@ -10,3 +10,3 @@ "use strict";

*/
const d = 'div.idpc_autocomplete{position:relative;margin:0;padding:0;border:0}div.idpc_autocomplete > input{display:block}div.idpc_autocomplete > ul{position:absolute;left:0;z-index:1;min-width:100%;box-sizing:border-box;list-style:none;padding:0;border-radius:0.3em;margin:0.2em 0 0;background:#fff;border:1px solid rgba(0,0,0,0.3);box-shadow:0.05em 0.2em 0.6em rgba(0,0,0,0.2);text-shadow:none;max-height:250px;overflow-y:scroll}div.idpc_autocomplete > ul > li{position:relative;padding:0.2em 0.5em;cursor:pointer}div.idpc_autocomplete > ul > li:hover{background:#b8d3e0;color:black}div.idpc_autocomplete > ul > li.idpc_error{font-style:italic;background-color:#eee;cursor:default !important}div.idpc_autocomplete > ul > li[aria-selected="true"]{background:#3d6d8f;color:white}div.idpc_autocomplete>.idpc-unhide{font-size:90%;text-decoration:underline;cursor:pointer}@supports(transform:scale(0)){div.idpc_autocomplete > ul{transition:0.3s cubic-bezier(0.4,0.2,0.5,1.4);transform-origin:1.43em -0.43em}div.idpc_autocomplete > ul[hidden],div.idpc_autocomplete > ul:empty{opacity:0;transform:scale(0);display:block;transition-timing-function:ease}}';
const d = ".idpc_ul.hidden{display:none}div.idpc_autocomplete{position:relative;margin:0;padding:0;border:0}div.idpc_autocomplete>input{display:block}div.idpc_autocomplete>ul{position:absolute;left:0;z-index:999;min-width:100%;box-sizing:border-box;list-style:none;padding:0;border-radius:.3em;margin:.2em 0 0;background:#fff;border:1px solid rgba(0,0,0,.3);box-shadow:.05em .2em .6em rgba(0,0,0,.2);text-shadow:none;max-height:250px;overflow-y:scroll}div.idpc_autocomplete>ul>li{position:relative;padding:.2em .5em;cursor:pointer}div.idpc_autocomplete>ul>li:hover{background:#b8d3e0;color:#000}div.idpc_autocomplete>ul>li.idpc_error{font-style:italic;background-color:#eee;cursor:default!important}div.idpc_autocomplete>ul>li[aria-selected=true]{background:#3d6d8f;color:#fff;z-index:1000}div.idpc_autocomplete>.idpc-unhide{font-size:90%;text-decoration:underline;cursor:pointer}@supports (transform:scale(0)){div.idpc_autocomplete>ul{transition:.3s cubic-bezier(.4, .2, .5, 1.4);transform-origin:1.43em -0.43em}div.idpc_autocomplete>ul:empty,div.idpc_autocomplete>ul[hidden]{opacity:0;transform:scale(0);display:block;transition-timing-function:ease}}";
/**

@@ -13,0 +13,0 @@ * Injects CSS style into DOM

@@ -79,5 +79,4 @@ import { Address, AddressSuggestion } from "@ideal-postcodes/api-typings";

/**
* Optional. An optional field to remove organisation name from address
* lines. Be aware that for some large organisation postcodes, the
* organisation name is the only identifying premise element of an address.
* Optional. An optional field to remove organisation name from address lines.
*
* This is `false` by default.

@@ -110,2 +109,10 @@ */

/**
* 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.
*
* @default "none"
*/
autocomplete?: string;
/**
* Inject stylesheet into DOM to style Address Finder with default theme. Default is `false`

@@ -112,0 +119,0 @@ *

@@ -140,2 +140,6 @@ import { AddressSuggestion } from "@ideal-postcodes/api-typings";

/**
* Sets the `autocomplete` attribute of the input field to prevent Chrome's autofill from clashing
*/
autocomplete: string;
/**
* Invoked when Address Finder suggestion box is opened (i.e. presented to the user).

@@ -142,0 +146,0 @@ */

@@ -56,3 +56,3 @@ "use strict";

}
this.input.setAttribute("autocomplete", "none");
this.input.setAttribute("autocomplete", this.options.autocomplete);
this.input.setAttribute("aria-autocomplete", "list");

@@ -59,0 +59,0 @@ this.input.setAttribute("aria-controls", this.list.id);

@@ -31,2 +31,3 @@ /* eslint-disable no-invalid-this */

inputField: "",
autocomplete: "none",
// Messages

@@ -33,0 +34,0 @@ msgFallback: "Please enter your address manually",

@@ -7,3 +7,3 @@ import { idpcState, loadStyle, isString, injectStyle, } from "@ideal-postcodes/jsutil";

*/
const d = 'div.idpc_autocomplete{position:relative;margin:0;padding:0;border:0}div.idpc_autocomplete > input{display:block}div.idpc_autocomplete > ul{position:absolute;left:0;z-index:1;min-width:100%;box-sizing:border-box;list-style:none;padding:0;border-radius:0.3em;margin:0.2em 0 0;background:#fff;border:1px solid rgba(0,0,0,0.3);box-shadow:0.05em 0.2em 0.6em rgba(0,0,0,0.2);text-shadow:none;max-height:250px;overflow-y:scroll}div.idpc_autocomplete > ul > li{position:relative;padding:0.2em 0.5em;cursor:pointer}div.idpc_autocomplete > ul > li:hover{background:#b8d3e0;color:black}div.idpc_autocomplete > ul > li.idpc_error{font-style:italic;background-color:#eee;cursor:default !important}div.idpc_autocomplete > ul > li[aria-selected="true"]{background:#3d6d8f;color:white}div.idpc_autocomplete>.idpc-unhide{font-size:90%;text-decoration:underline;cursor:pointer}@supports(transform:scale(0)){div.idpc_autocomplete > ul{transition:0.3s cubic-bezier(0.4,0.2,0.5,1.4);transform-origin:1.43em -0.43em}div.idpc_autocomplete > ul[hidden],div.idpc_autocomplete > ul:empty{opacity:0;transform:scale(0);display:block;transition-timing-function:ease}}';
const d = ".idpc_ul.hidden{display:none}div.idpc_autocomplete{position:relative;margin:0;padding:0;border:0}div.idpc_autocomplete>input{display:block}div.idpc_autocomplete>ul{position:absolute;left:0;z-index:999;min-width:100%;box-sizing:border-box;list-style:none;padding:0;border-radius:.3em;margin:.2em 0 0;background:#fff;border:1px solid rgba(0,0,0,.3);box-shadow:.05em .2em .6em rgba(0,0,0,.2);text-shadow:none;max-height:250px;overflow-y:scroll}div.idpc_autocomplete>ul>li{position:relative;padding:.2em .5em;cursor:pointer}div.idpc_autocomplete>ul>li:hover{background:#b8d3e0;color:#000}div.idpc_autocomplete>ul>li.idpc_error{font-style:italic;background-color:#eee;cursor:default!important}div.idpc_autocomplete>ul>li[aria-selected=true]{background:#3d6d8f;color:#fff;z-index:1000}div.idpc_autocomplete>.idpc-unhide{font-size:90%;text-decoration:underline;cursor:pointer}@supports (transform:scale(0)){div.idpc_autocomplete>ul{transition:.3s cubic-bezier(.4, .2, .5, 1.4);transform-origin:1.43em -0.43em}div.idpc_autocomplete>ul:empty,div.idpc_autocomplete>ul[hidden]{opacity:0;transform:scale(0);display:block;transition-timing-function:ease}}";
/**

@@ -10,0 +10,0 @@ * Injects CSS style into DOM

@@ -79,5 +79,4 @@ import { Address, AddressSuggestion } from "@ideal-postcodes/api-typings";

/**
* Optional. An optional field to remove organisation name from address
* lines. Be aware that for some large organisation postcodes, the
* organisation name is the only identifying premise element of an address.
* Optional. An optional field to remove organisation name from address lines.
*
* This is `false` by default.

@@ -110,2 +109,10 @@ */

/**
* 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.
*
* @default "none"
*/
autocomplete?: string;
/**
* Inject stylesheet into DOM to style Address Finder with default theme. Default is `false`

@@ -112,0 +119,0 @@ *

@@ -140,2 +140,6 @@ import { AddressSuggestion } from "@ideal-postcodes/api-typings";

/**
* Sets the `autocomplete` attribute of the input field to prevent Chrome's autofill from clashing
*/
autocomplete: string;
/**
* Invoked when Address Finder suggestion box is opened (i.e. presented to the user).

@@ -142,0 +146,0 @@ */

@@ -53,3 +53,3 @@ import { isString, toKey, setStyle, restoreStyle, idGen, show, hide, remove, toHtmlElem, } from "@ideal-postcodes/jsutil";

}
this.input.setAttribute("autocomplete", "none");
this.input.setAttribute("autocomplete", this.options.autocomplete);
this.input.setAttribute("aria-autocomplete", "list");

@@ -56,0 +56,0 @@ this.input.setAttribute("aria-controls", this.list.id);

{
"name": "@ideal-postcodes/address-finder",
"version": "1.7.0",
"version": "1.8.0",
"description": "Address Finder JS library backed by the Ideal Postcodes UK address search API",

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

"devDependencies": {
"@babel/cli": "~7.12.1",
"@babel/cli": "~7.13.0",
"@babel/core": "~7.12.3",

@@ -132,8 +132,8 @@ "@babel/preset-env": "~7.12.1",

"core-js": "~3.8.3",
"core-js-pure": "~3.8.3",
"cypress": "~6.4.0",
"core-js-pure": "~3.9.1",
"cypress": "~6.6.0",
"dotenv": "~8.2.0",
"eslint": "~7.20.0",
"eslint": "~7.21.0",
"eslint-plugin-compat": "~3.9.0",
"karma": "~5.2.3",
"karma": "~6.1.1",
"karma-chrome-launcher": "~3.1.0",

@@ -151,3 +151,3 @@ "karma-cli": "~2.0.0",

"puppeteer": "~7.1.0",
"rollup": "~2.38.0",
"rollup": "~2.40.0",
"semantic-release": "~17.3.1",

@@ -154,0 +154,0 @@ "sinon": "~9.2.2",

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

2. [Run initialisation code](#instantiate) providing a reference to the Address Finder input and [any other configuration](#setup)
3. Address Finder binds to the input field of your choice and renders a dropdown of address suggestion when the user starts typing
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.
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

@@ -237,6 +238,12 @@ ## Documentation

Note that addresses which are exclusively an organisation name will not result in the organisation name being removed as this will result in no premise identifier.
Defaults to `false`.
#### [`autocomplete`](https://address-finder.ideal-postcodes.dev/interfaces/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.
Defaults to `"none"`.
#### [`hide`](https://address-finder.ideal-postcodes.dev/interfaces/controllerconfig.html#hide)

@@ -243,0 +250,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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