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

rc-swipeout

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-swipeout - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

27

lib/Swipeout.js

@@ -88,18 +88,15 @@ 'use strict';

var _splitObject = (0, _splitObject4["default"])(this.props, ['disabled', 'autoClose', 'style', 'left', 'right', 'onOpen', 'onClose', 'children']);
var _splitObject = (0, _splitObject4["default"])(this.props, ['disabled', 'autoClose', 'style', 'left', 'right', 'onOpen', 'onClose', 'children']),
_splitObject2 = (0, _slicedToArray3["default"])(_splitObject, 2),
_splitObject2$ = _splitObject2[0],
disabled = _splitObject2$.disabled,
autoClose = _splitObject2$.autoClose,
style = _splitObject2$.style,
left = _splitObject2$.left,
right = _splitObject2$.right,
onOpen = _splitObject2$.onOpen,
onClose = _splitObject2$.onClose,
children = _splitObject2$.children,
restProps = _splitObject2[1];
var _splitObject2 = (0, _slicedToArray3["default"])(_splitObject, 2);
var _splitObject2$ = _splitObject2[0];
var disabled = _splitObject2$.disabled;
var autoClose = _splitObject2$.autoClose;
var style = _splitObject2$.style;
var left = _splitObject2$.left;
var right = _splitObject2$.right;
var onOpen = _splitObject2$.onOpen;
var onClose = _splitObject2$.onClose;
var children = _splitObject2$.children;
var restProps = _splitObject2[1];
var customLeft = left.map(function (btn) {

@@ -106,0 +103,0 @@ return _this2.renderCustomButton(btn);

@@ -63,5 +63,5 @@ 'use strict';

Swipeout.prototype.componentDidMount = function componentDidMount() {
var _props = this.props;
var left = _props.left;
var right = _props.right;
var _props = this.props,
left = _props.left,
right = _props.right;

@@ -113,5 +113,5 @@ var width = this.refs.content.offsetWidth;

}
var _props2 = this.props;
var left = _props2.left;
var right = _props2.right;
var _props2 = this.props,
left = _props2.left,
right = _props2.right;

@@ -131,5 +131,5 @@ var posX = e.deltaX - this.panStartX;

var _props3 = this.props;
var left = _props3.left;
var right = _props3.right;
var _props3 = this.props,
left = _props3.left,
right = _props3.right;

@@ -180,5 +180,5 @@ var posX = e.deltaX - this.panStartX;

Swipeout.prototype._setStyle = function _setStyle(value) {
var _props4 = this.props;
var left = _props4.left;
var right = _props4.right;
var _props4 = this.props,
left = _props4.left,
right = _props4.right;

@@ -248,13 +248,11 @@ var limit = value > 0 ? this.btnsLeftWidth : -this.btnsRightWidth;

Swipeout.prototype.render = function render() {
var _splitObject = (0, _splitObject4["default"])(this.props, ['prefixCls', 'left', 'right', 'children']);
var _splitObject = (0, _splitObject4["default"])(this.props, ['prefixCls', 'left', 'right', 'children']),
_splitObject2 = (0, _slicedToArray3["default"])(_splitObject, 2),
_splitObject2$ = _splitObject2[0],
prefixCls = _splitObject2$.prefixCls,
left = _splitObject2$.left,
right = _splitObject2$.right,
children = _splitObject2$.children,
restProps = _splitObject2[1];
var _splitObject2 = (0, _slicedToArray3["default"])(_splitObject, 2);
var _splitObject2$ = _splitObject2[0];
var prefixCls = _splitObject2$.prefixCls;
var left = _splitObject2$.left;
var right = _splitObject2$.right;
var children = _splitObject2$.children;
var restProps = _splitObject2[1];
var divProps = (0, _object2["default"])(restProps, ['disabled', 'autoClose', 'onOpen', 'onClose']);

@@ -265,2 +263,5 @@

(0, _extends3["default"])({ className: '' + prefixCls }, divProps),
_react2["default"].createElement('div', { className: prefixCls + '-cover', ref: 'cover' }),
this.renderButtons(left, 'left'),
this.renderButtons(right, 'right'),
_react2["default"].createElement(

@@ -279,6 +280,3 @@ _reactHammerjs2["default"],

)
),
_react2["default"].createElement('div', { className: prefixCls + '-cover', ref: 'cover' }),
this.renderButtons(left, 'left'),
this.renderButtons(right, 'right')
)
) : _react2["default"].createElement(

@@ -285,0 +283,0 @@ 'div',

@@ -6,15 +6,7 @@ "use strict";

});
var _keys = require("babel-runtime/core-js/object/keys");
var _keys2 = _interopRequireDefault(_keys);
exports["default"] = splitObject;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function splitObject(obj, parts) {
var left = {};
var right = {};
(0, _keys2["default"])(obj).forEach(function (k) {
Object.keys(obj).forEach(function (k) {
if (parts.indexOf(k) !== -1) {

@@ -21,0 +13,0 @@ left[k] = obj[k];

{
"name": "rc-swipeout",
"version": "1.2.3",
"version": "1.2.4",
"description": "swipe out ui component for react(web and react-native)",

@@ -5,0 +5,0 @@ "keywords": [

@@ -70,2 +70,8 @@ # rc-swipeout

For the React Native version, use the following import statement.
```js
import Swipeout from 'rc-swipeout/lib'
```
## API

@@ -72,0 +78,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