Socket
Socket
Sign inDemoInstall

rc-animate

Package Overview
Dependencies
15
Maintainers
3
Versions
68
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.4.4 to 2.5.0

es/CSSMotion.js

26

es/Animate.js

@@ -11,4 +11,5 @@ import _extends from 'babel-runtime/helpers/extends';

import AnimateChild from './AnimateChild';
import animUtil from './util/animate';
var defaultKey = 'rc_animate_' + Date.now();
import animUtil from './util';

@@ -210,3 +211,3 @@ function getChildrenFromProps(props) {

ref: function ref(node) {
return _this4.childrenRefs[child.key] = node;
_this4.childrenRefs[child.key] = node;
},

@@ -259,3 +260,4 @@ animation: props.animation,

onAppear: PropTypes.func,
showProp: PropTypes.string
showProp: PropTypes.string,
children: PropTypes.node
};

@@ -304,14 +306,10 @@ Animate.defaultProps = {

_this5.performLeave(key);
} else {
if (type === 'appear') {
if (animUtil.allowAppearCallback(props)) {
props.onAppear(key);
props.onEnd(key, true);
}
} else {
if (animUtil.allowEnterCallback(props)) {
props.onEnter(key);
props.onEnd(key, true);
}
} else if (type === 'appear') {
if (animUtil.allowAppearCallback(props)) {
props.onAppear(key);
props.onEnd(key, true);
}
} else if (animUtil.allowEnterCallback(props)) {
props.onEnter(key);
props.onEnd(key, true);
}

@@ -318,0 +316,0 @@ };

@@ -1,2 +0,1 @@

import _typeof from 'babel-runtime/helpers/typeof';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';

@@ -10,3 +9,3 @@ import _createClass from 'babel-runtime/helpers/createClass';

import cssAnimate, { isCssAnimationSupported } from 'css-animation';
import animUtil from './util';
import animUtil from './util/animate';

@@ -71,3 +70,3 @@ var transitionMap = {

var transitionName = props.transitionName;
var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : _typeof(transitionName)) === 'object';
var nameIsObj = typeof transitionName === 'object';
this.stop();

@@ -74,0 +73,0 @@ var end = function end() {

@@ -92,3 +92,3 @@ import React from 'react';

next.forEach(function (child) {
if (child && nextChildrenPending.hasOwnProperty(child.key)) {
if (child && Object.prototype.hasOwnProperty.call(nextChildrenPending, child.key)) {
ret = ret.concat(nextChildrenPending[child.key]);

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

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

var _util = require('./util');
var _animate = require('./util/animate');
var _util2 = _interopRequireDefault(_util);
var _animate2 = _interopRequireDefault(_animate);

@@ -54,3 +54,2 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

function getChildrenFromProps(props) {

@@ -251,3 +250,3 @@ var children = props.children;

ref: function ref(node) {
return _this4.childrenRefs[child.key] = node;
_this4.childrenRefs[child.key] = node;
},

@@ -299,3 +298,4 @@ animation: props.animation,

onAppear: _propTypes2['default'].func,
showProp: _propTypes2['default'].string
showProp: _propTypes2['default'].string,
children: _propTypes2['default'].node
};

@@ -344,14 +344,10 @@ Animate.defaultProps = {

_this5.performLeave(key);
} else {
if (type === 'appear') {
if (_util2['default'].allowAppearCallback(props)) {
props.onAppear(key);
props.onEnd(key, true);
}
} else {
if (_util2['default'].allowEnterCallback(props)) {
props.onEnter(key);
props.onEnd(key, true);
}
} else if (type === 'appear') {
if (_animate2['default'].allowAppearCallback(props)) {
props.onAppear(key);
props.onEnd(key, true);
}
} else if (_animate2['default'].allowEnterCallback(props)) {
props.onEnter(key);
props.onEnd(key, true);
}

@@ -381,3 +377,3 @@ };

var end = function end() {
if (_util2['default'].allowLeaveCallback(props)) {
if (_animate2['default'].allowLeaveCallback(props)) {
props.onLeave(key);

@@ -384,0 +380,0 @@ props.onEnd(key, false);

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

var _typeof2 = require('babel-runtime/helpers/typeof');
var _typeof3 = _interopRequireDefault(_typeof2);
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

@@ -44,5 +40,5 @@

var _util = require('./util');
var _animate = require('./util/animate');
var _util2 = _interopRequireDefault(_util);
var _animate2 = _interopRequireDefault(_animate);

@@ -73,3 +69,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

value: function componentWillEnter(done) {
if (_util2['default'].isEnterSupported(this.props)) {
if (_animate2['default'].isEnterSupported(this.props)) {
this.transition('enter', done);

@@ -83,3 +79,3 @@ } else {

value: function componentWillAppear(done) {
if (_util2['default'].isAppearSupported(this.props)) {
if (_animate2['default'].isAppearSupported(this.props)) {
this.transition('appear', done);

@@ -93,3 +89,3 @@ } else {

value: function componentWillLeave(done) {
if (_util2['default'].isLeaveSupported(this.props)) {
if (_animate2['default'].isLeaveSupported(this.props)) {
this.transition('leave', done);

@@ -111,3 +107,3 @@ } else {

var transitionName = props.transitionName;
var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : (0, _typeof3['default'])(transitionName)) === 'object';
var nameIsObj = typeof transitionName === 'object';
this.stop();

@@ -114,0 +110,0 @@ var end = function end() {

@@ -108,3 +108,3 @@ 'use strict';

next.forEach(function (child) {
if (child && nextChildrenPending.hasOwnProperty(child.key)) {
if (child && Object.prototype.hasOwnProperty.call(nextChildrenPending, child.key)) {
ret = ret.concat(nextChildrenPending[child.key]);

@@ -111,0 +111,0 @@ }

{
"name": "rc-animate",
"version": "2.4.4",
"version": "2.5.0",
"description": "css-transition ui component for react",

@@ -46,7 +46,6 @@ "keywords": [

"expect.js": "0.3.x",
"jquery": "~1.11.3",
"object-assign": "4.x",
"jquery": "^3.3.1",
"pre-commit": "1.x",
"rc-test": "6.x",
"rc-tools": "6.x",
"rc-tools": "8.x",
"react": "^16.0.0",

@@ -61,5 +60,8 @@ "react-dom": "^16.0.0",

"babel-runtime": "6.x",
"classnames": "^2.2.6",
"css-animation": "^1.3.2",
"prop-types": "15.x"
"prop-types": "15.x",
"raf": "^3.4.0",
"react-lifecycles-compat": "^3.0.4"
}
}
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