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
9
Maintainers
3
Versions
54
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0 to 4.2.0

7

dist/controller.d.ts

@@ -394,2 +394,8 @@ /**

unhideClass?: string;
/**
* Set CSS display attribute to `fixed` on the Address Finder list element
*
* @default false
*/
fixed?: boolean;
}

@@ -741,2 +747,3 @@ /**

export declare const findOrCreate: <T>(scope: HTMLElement | Document, q: string | T | null, create?: (() => T) | undefined) => T;
export declare const setPositionFixed: (mainComponent: HTMLElement, container: HTMLElement, document: Document) => void;
export {};

25

dist/controller.js

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.findOrCreate = exports._onKeyDown = exports.Controller = exports.defaults = exports.NOOP = void 0;
exports.setPositionFixed = exports.findOrCreate = exports._onKeyDown = exports.Controller = exports.defaults = exports.NOOP = void 0;
/* eslint-disable no-invalid-this */

@@ -85,2 +85,4 @@ const announcer_1 = require("./announcer");

hide: [],
//change list position
fixed: false,
// Callbacks

@@ -305,2 +307,6 @@ onOpen: exports.NOOP,

(0, css_1.addStyle)(this);
if (this.options.fixed) {
//set position fixed and width calculation
(0, exports.setPositionFixed)(this.mainComponent, this.container, this.document);
}
this.options.onLoaded.call(this);

@@ -847,1 +853,18 @@ }

exports.findOrCreate = findOrCreate;
const setPositionFixed = (mainComponent, container, document) => {
const setMinWith = (scope, component) => {
if (scope === null)
return;
const box = scope.getBoundingClientRect();
component.style.minWidth = `${Math.round(box.width)}px`;
};
const parent = container.parentElement;
mainComponent.style.position = "fixed";
mainComponent.style.left = "auto";
setMinWith(parent, mainComponent);
document.defaultView !== null &&
document.defaultView.addEventListener("resize", () => {
setMinWith(parent, mainComponent);
});
};
exports.setPositionFixed = setPositionFixed;

@@ -394,2 +394,8 @@ /**

unhideClass?: string;
/**
* Set CSS display attribute to `fixed` on the Address Finder list element
*
* @default false
*/
fixed?: boolean;
}

@@ -741,2 +747,3 @@ /**

export declare const findOrCreate: <T>(scope: HTMLElement | Document, q: string | T | null, create?: (() => T) | undefined) => T;
export declare const setPositionFixed: (mainComponent: HTMLElement, container: HTMLElement, document: Document) => void;
export {};

@@ -77,2 +77,4 @@ /**

hide: [],
//change list position
fixed: false,
// Callbacks

@@ -297,2 +299,6 @@ onOpen: NOOP,

addStyle(this);
if (this.options.fixed) {
//set position fixed and width calculation
setPositionFixed(this.mainComponent, this.container, this.document);
}
this.options.onLoaded.call(this);

@@ -836,1 +842,17 @@ }

};
export const setPositionFixed = (mainComponent, container, document) => {
const setMinWith = (scope, component) => {
if (scope === null)
return;
const box = scope.getBoundingClientRect();
component.style.minWidth = `${Math.round(box.width)}px`;
};
const parent = container.parentElement;
mainComponent.style.position = "fixed";
mainComponent.style.left = "auto";
setMinWith(parent, mainComponent);
document.defaultView !== null &&
document.defaultView.addEventListener("resize", () => {
setMinWith(parent, mainComponent);
});
};

2

package.json
{
"name": "@ideal-postcodes/address-finder",
"version": "4.1.0",
"version": "4.2.0",
"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