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

react-with-gesture

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-with-gesture - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

37

dist/react-with-gesture.es.js

@@ -27,2 +27,28 @@ import React from 'react';

function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
}
return target;
}
function _assertThisInitialized(self) {

@@ -121,6 +147,13 @@ if (self === void 0) {

_proto.render = function render() {
var _props = this.props,
style = _props.style,
className = _props.className,
props = _objectWithoutProperties(_props, ["style", "className"]);
return React.createElement("div", {
onMouseDown: this.handleMouseDown,
onTouchStart: this.handleTouchStart
}, React.createElement(Wrapped, _extends({}, this.props, this.state)));
onTouchStart: this.handleTouchStart,
style: style,
className: className
}, React.createElement(Wrapped, _extends({}, props, this.state)));
};

@@ -127,0 +160,0 @@

@@ -33,2 +33,28 @@ 'use strict';

function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
}
return target;
}
function _assertThisInitialized(self) {

@@ -127,6 +153,13 @@ if (self === void 0) {

_proto.render = function render() {
var _props = this.props,
style = _props.style,
className = _props.className,
props = _objectWithoutProperties(_props, ["style", "className"]);
return React.createElement("div", {
onMouseDown: this.handleMouseDown,
onTouchStart: this.handleTouchStart
}, React.createElement(Wrapped, _extends({}, this.props, this.state)));
onTouchStart: this.handleTouchStart,
style: style,
className: className
}, React.createElement(Wrapped, _extends({}, props, this.state)));
};

@@ -133,0 +166,0 @@

2

package.json
{
"name": "react-with-gesture",
"version": "1.0.7",
"version": "1.0.8",
"description": "hoc for receiving gestures",

@@ -5,0 +5,0 @@ "main": "dist/react-with-gesture",

@@ -34,9 +34,10 @@ import React from 'react'

const newProps = { ...this.state, x: pageX, y: pageX, xDelta: pageX - this.state.xInitial, yDelta: pageY - this.state.yInitial }
this.setState(this.props.onMove ? this.props.onMove(newProps) : newProps, () => this._busy = false)
this.setState(this.props.onMove ? this.props.onMove(newProps) : newProps, () => (this._busy = false))
}
render() {
const { style, className, ...props } = this.props
return (
<div onMouseDown={this.handleMouseDown} onTouchStart={this.handleTouchStart}>
<Wrapped {...this.props} {...this.state} />
<div onMouseDown={this.handleMouseDown} onTouchStart={this.handleTouchStart} style={style} className={className}>
<Wrapped {...props} {...this.state} />
</div>

@@ -43,0 +44,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