Socket
Socket
Sign inDemoInstall

react-transition-group

Package Overview
Dependencies
26
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

18

CSSTransitionGroupChild.js

@@ -7,2 +7,4 @@ 'use strict';

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; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

@@ -202,2 +204,7 @@

this.classNameAndNodeQueue.forEach(function (obj) {
// This is for to force a repaint,
// which is necessary in order to transition styles when adding a class name.
/* eslint-disable no-unused-expressions */
obj.node.scrollTop;
/* eslint-enable no-unused-expressions */
(0, _addClass2.default)(obj.node, obj.className);

@@ -212,3 +219,12 @@ });

value: function render() {
return _react2.default.Children.only(this.props.children);
var props = _extends({}, this.props);
delete props.name;
delete props.appear;
delete props.enter;
delete props.leave;
delete props.appearTimeout;
delete props.enterTimeout;
delete props.leaveTimeout;
delete props.children;
return _react2.default.cloneElement(_react2.default.Children.only(this.props.children), props);
}

@@ -215,0 +231,0 @@ }]);

6

package.json
{
"name": "react-transition-group",
"version": "1.0.0",
"version": "1.1.0",
"description": "A react component toolset for managing animations",

@@ -37,4 +37,6 @@ "main": "index.js",

"dependencies": {
"dom-helpers": "^3.2.0"
"chain-function": "^1.0.0",
"dom-helpers": "^3.2.0",
"warning": "^3.0.0"
}
}

@@ -9,2 +9,6 @@ 'use strict';

var _chainFunction = require('chain-function');
var _chainFunction2 = _interopRequireDefault(_chainFunction);
var _react = require('react');

@@ -14,2 +18,6 @@

var _warning = require('warning');
var _warning2 = _interopRequireDefault(_warning);
var _ChildMapping = require('./utils/ChildMapping');

@@ -60,3 +68,3 @@

var component = _this.childRefs[key];
if (component.componentDidAppear) {
if (component && component.componentDidAppear) {
component.componentDidAppear();

@@ -89,3 +97,3 @@ }

var component = _this.childRefs[key];
if (component.componentDidEnter) {
if (component && component.componentDidEnter) {
component.componentDidEnter();

@@ -121,3 +129,3 @@ }

if (component.componentDidLeave) {
if (component && component.componentDidLeave) {
component.componentDidLeave();

@@ -216,2 +224,5 @@ }

if (child) {
var isCallbackRef = typeof child.ref !== 'string';
process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(isCallbackRef, 'string refs are not supported on children of TransitionGroup and will be ignored. ' + 'Please use a callback ref instead: https://facebook.github.io/react/docs/refs-and-the-dom.html#the-ref-callback-attribute') : void 0;
// You may need to apply reactive updates to a child as it is leaving.

@@ -224,5 +235,5 @@ // The normal React way to do it won't work since the child will have

key: key,
ref: function ref(r) {
ref: (0, _chainFunction2.default)(isCallbackRef ? child.ref : null, function (r) {
_this2.childRefs[key] = r;
}
})
}));

@@ -229,0 +240,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc