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

react-sheet

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-sheet - npm Package Compare versions

Comparing version 0.0.26 to 0.0.27

27

es/hoc/withKeyEvents.js

@@ -28,2 +28,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

window.addEventListener('keypress', _this.onKeyPress, false);
document.addEventListener('click', _this.onOutsideClick);
};

@@ -43,2 +44,9 @@

_this.removeAllListeners = function () {
window.removeEventListener('keydown', _this.onKeyDown, false);
window.removeEventListener('keydown', _this.onEscapeKeyDown, false);
window.removeEventListener('keypress', _this.onKeyPress, false);
document.removeEventListener('click', _this.onOutsideClick);
};
_this.onKeyPress = function (e) {

@@ -229,16 +237,8 @@ if (!_this.isFocused()) {

_this.hideOnClickOutside = function (element) {
var outsideClickListener = function outsideClickListener(event) {
if (!element.contains(event.target)) {
if (_this.isVisible(element)) {
_this.removeListeners();
}
_this.onOutsideClick = function (event) {
if (!_this.keyWrapper.contains(event.target)) {
if (_this.isVisible(_this.keyWrapper)) {
_this.removeAllListeners();
}
};
var removeClickListener = function removeClickListener() {
document.removeEventListener('click', outsideClickListener);
};
document.addEventListener('click', outsideClickListener);
}
};

@@ -261,3 +261,2 @@

this.addListeners();
this.hideOnClickOutside(this.keyWrapper);
};

@@ -264,0 +263,0 @@

@@ -43,2 +43,3 @@ 'use strict';

window.addEventListener('keypress', _this.onKeyPress, false);
document.addEventListener('click', _this.onOutsideClick);
};

@@ -58,2 +59,9 @@

_this.removeAllListeners = function () {
window.removeEventListener('keydown', _this.onKeyDown, false);
window.removeEventListener('keydown', _this.onEscapeKeyDown, false);
window.removeEventListener('keypress', _this.onKeyPress, false);
document.removeEventListener('click', _this.onOutsideClick);
};
_this.onKeyPress = function (e) {

@@ -244,16 +252,8 @@ if (!_this.isFocused()) {

_this.hideOnClickOutside = function (element) {
var outsideClickListener = function outsideClickListener(event) {
if (!element.contains(event.target)) {
if (_this.isVisible(element)) {
_this.removeListeners();
}
_this.onOutsideClick = function (event) {
if (!_this.keyWrapper.contains(event.target)) {
if (_this.isVisible(_this.keyWrapper)) {
_this.removeAllListeners();
}
};
var removeClickListener = function removeClickListener() {
document.removeEventListener('click', outsideClickListener);
};
document.addEventListener('click', outsideClickListener);
}
};

@@ -276,3 +276,2 @@

this.addListeners();
this.hideOnClickOutside(this.keyWrapper);
};

@@ -279,0 +278,0 @@

{
"name": "react-sheet",
"version": "0.0.26",
"version": "0.0.27",
"description": "Spreadsheet component for react",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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