Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

infinite-autocomplete

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

infinite-autocomplete - npm Package Compare versions

Comparing version 4.0.0-rc to 4.0.0-rc2

src/templates/styles.js

7

package.json
{
"name": "infinite-autocomplete",
"version": "4.0.0-rc",
"version": "4.0.0-rc2",
"description": "infinite-autocomplete",

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

"devDependencies": {
"lodash": "^4.17.11",
"@babel/core": "7.2.0",

@@ -22,5 +21,5 @@ "babel-eslint": "^10.0.1",

"ghooks": "^2.0.4",
"lodash": "^4.17.11",
"parcel-bundler": "^1.6.1",
"rimraf": "^2.6.3",
"sass": "^1.17.3"
"rimraf": "^2.6.3"
},

@@ -27,0 +26,0 @@ "config": {

export const DEFAULT_FETCH_SIZE = 10;
export const DEFAULT_DATA = [];
export const noop = () => {};
export const STYLES_ID = 'infinite-autocomplete-style';
import { curry, flow, get, debounce, each, throttle } from 'lodash/fp';
import mainTemplate from './templates/mainTemplate';
import './templates/style.scss';
import styles from './templates/styles';
import {

@@ -13,3 +13,4 @@ setInnerHTML,

pushToHandlers,
setOptionsScrollHandler
setOptionsScrollHandler,
applyStyles
} from './utils';

@@ -28,2 +29,4 @@ import onInputChange from './onInputChange';

applyStyles(styles);
const templateCreationPipeline = flow([

@@ -30,0 +33,0 @@ mainTemplate,

import { curry, isFunction, constant, get, flow } from 'lodash/fp';
import optionsTemplate from '../templates/optionsTemplate';
import { STYLES_ID } from '../constants';

@@ -16,2 +17,12 @@ export const setInnerHTML = curry((containerEle, htmlTemplate) => {

export const applyStyles = (styles) => {
const isMainWrapperStyleApplied = document.head.querySelector(`#${STYLES_ID}`);
if (!isMainWrapperStyleApplied) {
const mainWrapperStyle = document.createElement('style');
mainWrapperStyle.id = STYLES_ID;
mainWrapperStyle.innerHTML = styles;
document.head.appendChild(mainWrapperStyle);
}
};
export const setInputChangeHandler = (handler, inputEle) => () => {

@@ -18,0 +29,0 @@ inputEle.addEventListener('input', handler);

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 too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc