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

@recogito/recogito-client-core

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@recogito/recogito-client-core - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

src/polyfills/index.js

3

package.json
{
"name": "@recogito/recogito-client-core",
"version": "1.3.0",
"version": "1.3.1",
"description": "Core functions, classes and components for RecogitoJS",

@@ -31,2 +31,3 @@ "main": "src/index.js",

"dependencies": {
"@babel/polyfill": "^7.10.4",
"downshift": "^6.1.3",

@@ -33,0 +34,0 @@ "fast-deep-equal": "^3.1.3",

@@ -8,7 +8,2 @@ import React, { Component } from 'react';

/** Shorthand **/
const toArray = body =>
Array.isArray(body) ? body : [ body ];
/**

@@ -217,2 +212,5 @@ * The popup editor component.

onRemoveAndAppend = (bodyOrBodiesToRemove, bodyOrBodiesToAppend, saveImmediately) => {
// Shorthand
const toArray = body => Array.isArray(body) ? body : [ body ];
const toRemove = toArray(bodyOrBodiesToRemove);

@@ -219,0 +217,0 @@ const toAppend = toArray(bodyOrBodiesToAppend).map(b =>

@@ -22,3 +22,3 @@ import React, { Component, createRef } from 'react';

if (this.props.focus)
this.element.current.querySelector('input').focus();
this.element.current.querySelector('input').focus({ preventScroll: true });
}

@@ -25,0 +25,0 @@ }

@@ -24,3 +24,3 @@ import React, { Component, createRef } from 'react';

if (this.props.focus && this.element.current)
this.element.current.focus();
this.element.current.focus({ preventScroll: true });
}

@@ -27,0 +27,0 @@

import I18n from '../i18n';
/**
* Adds DOM polyfills that babel polyfill doesn't include
*/
export const addPolyfills = () => {
if (!Element.prototype.matches) {
Element.prototype.matches = Element.prototype.msMatchesSelector ||
Element.prototype.webkitMatchesSelector;
}
if (!Element.prototype.closest) {
Element.prototype.closest = function(s) {
let el = this;
do {
if (Element.prototype.matches.call(el, s)) return el;
el = el.parentElement || el.parentNode;
} while (el !== null && el.nodeType === 1);
return null;
};
}
}
/**
* Helper to init the i18n class with a pre-defined or auto-detected locale.

@@ -29,0 +5,0 @@ */

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