Socket
Socket
Sign inDemoInstall

@ideal-postcodes/address-finder

Package Overview
Dependencies
9
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-beta.1 to 3.0.0-beta.2

7

CHANGELOG.md

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

# [3.0.0-beta.2](https://github.com/ideal-postcodes/address-finder/compare/3.0.0-beta.1...3.0.0-beta.2) (2022-02-28)
### Features
* **Toolbar:** Option to hide toolbar ([441f6de](https://github.com/ideal-postcodes/address-finder/commit/441f6de9f726a087e26b0f30eae6379f8e7a2099))
# [3.0.0-beta.1](https://github.com/ideal-postcodes/address-finder/compare/2.5.1...3.0.0-beta.1) (2022-02-21)

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

8

dist/cache.d.ts

@@ -7,3 +7,3 @@ import { Client } from "@ideal-postcodes/core-axios";

*/
declare type SuggestionRecord = AddressSuggestion[] | Promise<AddressSuggestion[]>;
declare type Suggestions = AddressSuggestion[] | Promise<AddressSuggestion[]>;
/**

@@ -14,8 +14,8 @@ * @hidden

client: Client;
cache: Record<string, SuggestionRecord>;
cache: Record<string, Suggestions>;
prefix: string;
constructor(client: Client);
key(query: string): string;
retrieve(query: string): SuggestionRecord | undefined;
store(query: string, data: SuggestionRecord): SuggestionRecord;
retrieve(query: string): Suggestions | undefined;
store(query: string, data: Suggestions): Suggestions;
clear(): void;

@@ -22,0 +22,0 @@ /**

@@ -147,2 +147,7 @@ /**

/**
* Hides the toolbar. Users are unable to change the country
* @default false
*/
hideToolbar?: boolean;
/**
* Inject stylesheet into DOM to style Address Finder with default theme. Default is `true`

@@ -149,0 +154,0 @@ *

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

offset: 2,
hideToolbar: false,
// Country

@@ -197,2 +198,4 @@ defaultCountry: "GBR",

this.toolbar.appendChild(this.countryToggle);
if (this.options.hideToolbar)
jsutil_1.hide(this.toolbar);
// Configure UL

@@ -199,0 +202,0 @@ this.list = this.options.document.createElement("ul");

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

*/
const d = `
.idpc_af.hidden{
display:none;
}
div.idpc_autocomplete{
position:relative;
margin:0 0 0 0 !important;
padding:0;
border:0;
color: #28282B;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
div.idpc_autocomplete>input{
display:block;
}
div.idpc_af{
position:absolute;
left:0;
z-index:2000;
min-width:100%;
box-sizing:border-box;
border-radius:3px;
background:#fff;
border:1px solid rgba(0,0,0,.3);
box-shadow:.05em .2em .6em rgba(0,0,0,.2);
text-shadow:none;
padding:0;
}
div.idpc_af>ul{
list-style:none;
padding:0;
max-height:250px;
overflow-y: scroll;
margin: 0 0 0 0 !important;
}
div.idpc_af>ul>li{
position:relative;
padding:.2em .5em;
cursor:pointer;
margin:0 0 0 0 !important;
}
div.idpc_toolbar{
padding: .3em .5em;
border-top: 1px solid rgba(0,0,0,0.3);
text-align: right;
}
div.idpc_af>ul>li:hover{
background-color: #E5E4E2;
}
div.idpc_af>ul>li.idpc_error{
padding: .5em;
text-align: center;
cursor:default!important;
}
div.idpc_af>ul>li.idpc_error:hover{
background: #fff;
cursor:default!important;
}
div.idpc_af>ul>li[aria-selected=true]{
background-color: #E5E4E2;
z-index:3000;
}
div.idpc_autocomplete>.idpc-unhide{
font-size:0.9em;
text-decoration:underline;
cursor:pointer;
}
div.idpc_af>div>span{
padding: .2em .5em;
border-radius: 3px;
cursor:pointer;
font-size: 110%;
}
span.idpc_icon {
font-size:1.2em;
line-height: 1em;
vertical-align: middle;
}
div.idpc_toolbar>span span.idpc_country {
margin-right: 0.3em;
max-width: 0;
font-size: 0.9em;
-webkit-transition: max-width 500ms ease-out;
transition: max-width 500ms ease-out;
display: inline-block;
vertical-align: middle;
white-space: nowrap;
overflow: hidden;
}
div.idpc_autocomplete>div>div>span:hover span.idpc_country {
max-width: 7em;
}
div.idpc_autocomplete>div>div>span:hover{
background-color: #E5E4E2;
-webkit-transition: background-color 500ms ease;
-ms-transition: background-color 500ms ease;
transition: background-color 500ms ease;
}
`;
const d = `.idpc_af.hidden{display:none}div.idpc_autocomplete{position:relative;margin:0!important;padding:0;border:0;color:#28282b;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}div.idpc_autocomplete>input{display:block}div.idpc_af{position:absolute;left:0;z-index:2000;min-width:100%;box-sizing:border-box;border-radius:3px;background:#fff;border:1px solid rgba(0,0,0,.3);box-shadow:.05em .2em .6em rgba(0,0,0,.2);text-shadow:none;padding:0;margin-top:2px}div.idpc_af>ul{list-style:none;padding:0;max-height:250px;overflow-y:scroll;margin:0!important}div.idpc_af>ul>li{position:relative;padding:.2em .5em;cursor:pointer;margin:0!important}div.idpc_toolbar{padding:.3em .5em;border-top:1px solid rgba(0,0,0,.3);text-align:right}div.idpc_af>ul>li:hover{background-color:#e5e4e2}div.idpc_af>ul>li.idpc_error{padding:.5em;text-align:center;cursor:default!important}div.idpc_af>ul>li.idpc_error:hover{background:#fff;cursor:default!important}div.idpc_af>ul>li[aria-selected=true]{background-color:#e5e4e2;z-index:3000}div.idpc_autocomplete>.idpc-unhide{font-size:.9em;text-decoration:underline;cursor:pointer}div.idpc_af>div>span{padding:.2em .5em;border-radius:3px;cursor:pointer;font-size:110%}span.idpc_icon{font-size:1.2em;line-height:1em;vertical-align:middle}div.idpc_toolbar>span span.idpc_country{margin-right:.3em;max-width:0;font-size:.9em;-webkit-transition:max-width .5s ease-out;transition:max-width .5s ease-out;display:inline-block;vertical-align:middle;white-space:nowrap;overflow:hidden}div.idpc_autocomplete>div>div>span:hover span.idpc_country{max-width:7em}div.idpc_autocomplete>div>div>span:hover{background-color:#e5e4e2;-webkit-transition:background-color .5s ease;-ms-transition:background-color .5s ease;transition:background-color .5s ease}`;
/**

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

@@ -7,3 +7,3 @@ import { Client } from "@ideal-postcodes/core-axios";

*/
declare type SuggestionRecord = AddressSuggestion[] | Promise<AddressSuggestion[]>;
declare type Suggestions = AddressSuggestion[] | Promise<AddressSuggestion[]>;
/**

@@ -14,8 +14,8 @@ * @hidden

client: Client;
cache: Record<string, SuggestionRecord>;
cache: Record<string, Suggestions>;
prefix: string;
constructor(client: Client);
key(query: string): string;
retrieve(query: string): SuggestionRecord | undefined;
store(query: string, data: SuggestionRecord): SuggestionRecord;
retrieve(query: string): Suggestions | undefined;
store(query: string, data: Suggestions): Suggestions;
clear(): void;

@@ -22,0 +22,0 @@ /**

@@ -147,2 +147,7 @@ /**

/**
* Hides the toolbar. Users are unable to change the country
* @default false
*/
hideToolbar?: boolean;
/**
* Inject stylesheet into DOM to style Address Finder with default theme. Default is `true`

@@ -149,0 +154,0 @@ *

@@ -43,2 +43,3 @@ /**

offset: 2,
hideToolbar: false,
// Country

@@ -190,2 +191,4 @@ defaultCountry: "GBR",

this.toolbar.appendChild(this.countryToggle);
if (this.options.hideToolbar)
hide(this.toolbar);
// Configure UL

@@ -192,0 +195,0 @@ this.list = this.options.document.createElement("ul");

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

*/
const d = `
.idpc_af.hidden{
display:none;
}
div.idpc_autocomplete{
position:relative;
margin:0 0 0 0 !important;
padding:0;
border:0;
color: #28282B;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
div.idpc_autocomplete>input{
display:block;
}
div.idpc_af{
position:absolute;
left:0;
z-index:2000;
min-width:100%;
box-sizing:border-box;
border-radius:3px;
background:#fff;
border:1px solid rgba(0,0,0,.3);
box-shadow:.05em .2em .6em rgba(0,0,0,.2);
text-shadow:none;
padding:0;
}
div.idpc_af>ul{
list-style:none;
padding:0;
max-height:250px;
overflow-y: scroll;
margin: 0 0 0 0 !important;
}
div.idpc_af>ul>li{
position:relative;
padding:.2em .5em;
cursor:pointer;
margin:0 0 0 0 !important;
}
div.idpc_toolbar{
padding: .3em .5em;
border-top: 1px solid rgba(0,0,0,0.3);
text-align: right;
}
div.idpc_af>ul>li:hover{
background-color: #E5E4E2;
}
div.idpc_af>ul>li.idpc_error{
padding: .5em;
text-align: center;
cursor:default!important;
}
div.idpc_af>ul>li.idpc_error:hover{
background: #fff;
cursor:default!important;
}
div.idpc_af>ul>li[aria-selected=true]{
background-color: #E5E4E2;
z-index:3000;
}
div.idpc_autocomplete>.idpc-unhide{
font-size:0.9em;
text-decoration:underline;
cursor:pointer;
}
div.idpc_af>div>span{
padding: .2em .5em;
border-radius: 3px;
cursor:pointer;
font-size: 110%;
}
span.idpc_icon {
font-size:1.2em;
line-height: 1em;
vertical-align: middle;
}
div.idpc_toolbar>span span.idpc_country {
margin-right: 0.3em;
max-width: 0;
font-size: 0.9em;
-webkit-transition: max-width 500ms ease-out;
transition: max-width 500ms ease-out;
display: inline-block;
vertical-align: middle;
white-space: nowrap;
overflow: hidden;
}
div.idpc_autocomplete>div>div>span:hover span.idpc_country {
max-width: 7em;
}
div.idpc_autocomplete>div>div>span:hover{
background-color: #E5E4E2;
-webkit-transition: background-color 500ms ease;
-ms-transition: background-color 500ms ease;
transition: background-color 500ms ease;
}
`;
const d = `.idpc_af.hidden{display:none}div.idpc_autocomplete{position:relative;margin:0!important;padding:0;border:0;color:#28282b;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}div.idpc_autocomplete>input{display:block}div.idpc_af{position:absolute;left:0;z-index:2000;min-width:100%;box-sizing:border-box;border-radius:3px;background:#fff;border:1px solid rgba(0,0,0,.3);box-shadow:.05em .2em .6em rgba(0,0,0,.2);text-shadow:none;padding:0;margin-top:2px}div.idpc_af>ul{list-style:none;padding:0;max-height:250px;overflow-y:scroll;margin:0!important}div.idpc_af>ul>li{position:relative;padding:.2em .5em;cursor:pointer;margin:0!important}div.idpc_toolbar{padding:.3em .5em;border-top:1px solid rgba(0,0,0,.3);text-align:right}div.idpc_af>ul>li:hover{background-color:#e5e4e2}div.idpc_af>ul>li.idpc_error{padding:.5em;text-align:center;cursor:default!important}div.idpc_af>ul>li.idpc_error:hover{background:#fff;cursor:default!important}div.idpc_af>ul>li[aria-selected=true]{background-color:#e5e4e2;z-index:3000}div.idpc_autocomplete>.idpc-unhide{font-size:.9em;text-decoration:underline;cursor:pointer}div.idpc_af>div>span{padding:.2em .5em;border-radius:3px;cursor:pointer;font-size:110%}span.idpc_icon{font-size:1.2em;line-height:1em;vertical-align:middle}div.idpc_toolbar>span span.idpc_country{margin-right:.3em;max-width:0;font-size:.9em;-webkit-transition:max-width .5s ease-out;transition:max-width .5s ease-out;display:inline-block;vertical-align:middle;white-space:nowrap;overflow:hidden}div.idpc_autocomplete>div>div>span:hover span.idpc_country{max-width:7em}div.idpc_autocomplete>div>div>span:hover{background-color:#e5e4e2;-webkit-transition:background-color .5s ease;-ms-transition:background-color .5s ease;transition:background-color .5s ease}`;
/**

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

{
"name": "@ideal-postcodes/address-finder",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"description": "Address Finder JS library backed by the Ideal Postcodes UK address search API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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