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

rc-motion

Package Overview
Dependencies
Maintainers
4
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-motion - npm Package Compare versions

Comparing version 2.9.2 to 2.9.3

35

es/CSSMotionList.js

@@ -40,16 +40,22 @@ import _extends from "@babel/runtime/helpers/esm/extends";

_defineProperty(_assertThisInitialized(_this), "removeKey", function (removeKey) {
var keyEntities = _this.state.keyEntities;
var nextKeyEntities = keyEntities.map(function (entity) {
if (entity.key !== removeKey) return entity;
return _objectSpread(_objectSpread({}, entity), {}, {
status: STATUS_REMOVED
_this.setState(function (prevState) {
var nextKeyEntities = prevState.keyEntities.map(function (entity) {
if (entity.key !== removeKey) return entity;
return _objectSpread(_objectSpread({}, entity), {}, {
status: STATUS_REMOVED
});
});
return {
keyEntities: nextKeyEntities
};
}, function () {
var keyEntities = _this.state.keyEntities;
var restKeysCount = keyEntities.filter(function (_ref) {
var status = _ref.status;
return status !== STATUS_REMOVED;
}).length;
if (restKeysCount === 0 && _this.props.onAllRemoved) {
_this.props.onAllRemoved();
}
});
_this.setState({
keyEntities: nextKeyEntities
});
return nextKeyEntities.filter(function (_ref) {
var status = _ref.status;
return status !== STATUS_REMOVED;
}).length;
});

@@ -89,6 +95,3 @@ return _this;

if (!changedVisible) {
var restKeysCount = _this2.removeKey(eventProps.key);
if (restKeysCount === 0 && onAllRemoved) {
onAllRemoved();
}
_this2.removeKey(eventProps.key);
}

@@ -95,0 +98,0 @@ }

@@ -51,16 +51,22 @@ "use strict";

(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "removeKey", function (removeKey) {
var keyEntities = _this.state.keyEntities;
var nextKeyEntities = keyEntities.map(function (entity) {
if (entity.key !== removeKey) return entity;
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, entity), {}, {
status: _diff.STATUS_REMOVED
_this.setState(function (prevState) {
var nextKeyEntities = prevState.keyEntities.map(function (entity) {
if (entity.key !== removeKey) return entity;
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, entity), {}, {
status: _diff.STATUS_REMOVED
});
});
return {
keyEntities: nextKeyEntities
};
}, function () {
var keyEntities = _this.state.keyEntities;
var restKeysCount = keyEntities.filter(function (_ref) {
var status = _ref.status;
return status !== _diff.STATUS_REMOVED;
}).length;
if (restKeysCount === 0 && _this.props.onAllRemoved) {
_this.props.onAllRemoved();
}
});
_this.setState({
keyEntities: nextKeyEntities
});
return nextKeyEntities.filter(function (_ref) {
var status = _ref.status;
return status !== _diff.STATUS_REMOVED;
}).length;
});

@@ -100,6 +106,3 @@ return _this;

if (!changedVisible) {
var restKeysCount = _this2.removeKey(eventProps.key);
if (restKeysCount === 0 && onAllRemoved) {
onAllRemoved();
}
_this2.removeKey(eventProps.key);
}

@@ -106,0 +109,0 @@ }

{
"name": "rc-motion",
"version": "2.9.2",
"version": "2.9.3",
"description": "React lifecycle controlled motion library",

@@ -36,3 +36,3 @@ "keywords": [

"prepare": "husky install",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"prepublishOnly": "npm run compile",
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",

@@ -39,0 +39,0 @@ "postpublish": "npm run docs:build && npm run docs:deploy",

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