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

react-toastify

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-toastify - npm Package Compare versions

Comparing version 3.3.3 to 3.3.4

43

dist/ReactToastify.min.js

@@ -351,4 +351,4 @@ !(function(t, e) {

g = o(v),
E = n(13),
T = o(E),
T = n(13),
E = o(T),
x = n(14),

@@ -685,3 +685,3 @@ C = o(x),

hideProgressBar: !1,
closeButton: d.default.createElement(T.default, null),
closeButton: d.default.createElement(E.default, null),
pauseOnHover: !0,

@@ -1001,3 +1001,3 @@ closeOnClick: !0,

g = n(5),
E = {
T = {
container: function(t) {

@@ -1030,3 +1030,3 @@ return (0, h.css)(

},
T = (function(t) {
E = (function(t) {
function e() {

@@ -1135,4 +1135,4 @@ var t, n, o, a;

'string' != typeof p
? (0, h.css)(E.container(r), p)
: E.container(r),
? (0, h.css)(T.container(r), p)
: T.container(r),
this.getToastProps()

@@ -1145,3 +1145,3 @@ ),

this.props.in && { role: O },
'string' != typeof d ? (0, h.css)(E.body, d) : E.body,
'string' != typeof d ? (0, h.css)(T.body, d) : T.body,
'string' == typeof d && { className: d }

@@ -1170,3 +1170,3 @@ ),

})(c.Component);
(T.propTypes = {
(E.propTypes = {
closeButton: g.falseOrElement.isRequired,

@@ -1199,3 +1199,3 @@ autoClose: g.falseOrDelay.isRequired,

}),
(T.defaultProps = {
(E.defaultProps = {
type: b.TYPE.DEFAULT,

@@ -1212,3 +1212,3 @@ in: !0,

}),
(e.default = T);
(e.default = E);
},

@@ -1893,12 +1893,13 @@ function(t, e, n) {

update: function(t, e) {
if (c && void 0 !== c.collection[t]) {
var n = c.collection[t],
o = n.options,
a = n.content,
s = null !== o.updateId ? o.updateId + 1 : 1,
u = i({}, o, e, { toastId: t, updateId: s }),
l = void 0 !== u.render ? u.render : a;
return delete u.render, r(l, u);
}
return !1;
setTimeout(function() {
if (c && void 0 !== c.collection[t]) {
var n = c.collection[t],
o = n.options,
a = n.content,
s = null !== o.updateId ? o.updateId + 1 : 1,
u = i({}, o, e, { toastId: t, updateId: s }),
l = void 0 !== u.render ? u.render : a;
delete u.render, r(l, u);
}
}, 0);
}

@@ -1905,0 +1906,0 @@ },

@@ -257,3 +257,3 @@ import * as React from 'react';

*/
update(toastId: number, options?: UpdateOptions): number;
update(toastId: number, options?: UpdateOptions): void;

@@ -260,0 +260,0 @@ /**

@@ -83,3 +83,8 @@ 'use strict';

_Transition2.default,
_extends({}, props, { timeout: 750, onEnter: onEnter, onEntered: onEntered, onExit: onExit }),
_extends({}, props, {
timeout: 750,
onEnter: onEnter,
onEntered: onEntered,
onExit: onExit
}),
children

@@ -86,0 +91,0 @@ );

@@ -88,20 +88,19 @@ 'use strict';

update: function update(id, options) {
if (container && typeof container.collection[id] !== 'undefined') {
var _container$collection = container.collection[id],
oldOptions = _container$collection.options,
oldContent = _container$collection.content;
setTimeout(function () {
if (container && typeof container.collection[id] !== 'undefined') {
var _container$collection = container.collection[id],
oldOptions = _container$collection.options,
oldContent = _container$collection.content;
var updateId = oldOptions.updateId !== null ? oldOptions.updateId + 1 : 1;
var updateId = oldOptions.updateId !== null ? oldOptions.updateId + 1 : 1;
var nextOptions = _extends({}, oldOptions, options, {
toastId: id,
updateId: updateId
});
var content = typeof nextOptions.render !== 'undefined' ? nextOptions.render : oldContent;
delete nextOptions.render;
return emitEvent(content, nextOptions);
}
return false;
var nextOptions = _extends({}, oldOptions, options, {
toastId: id,
updateId: updateId
});
var content = typeof nextOptions.render !== 'undefined' ? nextOptions.render : oldContent;
delete nextOptions.render;
emitEvent(content, nextOptions);
}
}, 0);
}

@@ -108,0 +107,0 @@ }, {

{
"name": "react-toastify",
"version": "3.3.3",
"version": "3.3.4",
"description": "React notification made easy",

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

@@ -893,3 +893,6 @@ # React Toastify [![Build Status](https://travis-ci.org/fkhadra/react-toastify.svg?branch=master)](https://travis-ci.org/fkhadra/react-toastify) [![npm](https://img.shields.io/npm/dm/react-toastify.svg)]() [![npm](https://img.shields.io/npm/v/react-toastify.svg)]() [![license](https://img.shields.io/github/license/fkhadra/react-toastify.svg?maxAge=2592000)]() [![Coverage Status](https://coveralls.io/repos/github/fkhadra/react-toastify/badge.svg?branch=master)](https://coveralls.io/github/fkhadra/react-toastify?branch=master)

## Release Notes
### V3.3.4
- `toast.update` run now at the end of the call stack. For more details, check [issue #135](https://github.com/fkhadra/react-toastify/issues/135)
### V3.3.3

@@ -896,0 +899,0 @@

@@ -69,24 +69,23 @@ import EventManager from './util/EventManager';

update(id, options) {
if (container && typeof container.collection[id] !== 'undefined') {
const {
options: oldOptions,
content: oldContent
} = container.collection[id];
const updateId =
oldOptions.updateId !== null ? oldOptions.updateId + 1 : 1;
setTimeout(() => {
if (container && typeof container.collection[id] !== 'undefined') {
const {
options: oldOptions,
content: oldContent
} = container.collection[id];
const updateId =
oldOptions.updateId !== null ? oldOptions.updateId + 1 : 1;
const nextOptions = Object.assign({}, oldOptions, options, {
toastId: id,
updateId: updateId
});
const content =
typeof nextOptions.render !== 'undefined'
? nextOptions.render
: oldContent;
delete nextOptions.render;
return emitEvent(content, nextOptions);
}
return false;
const nextOptions = Object.assign({}, oldOptions, options, {
toastId: id,
updateId: updateId
});
const content =
typeof nextOptions.render !== 'undefined'
? nextOptions.render
: oldContent;
delete nextOptions.render;
emitEvent(content, nextOptions);
}
}, 0);
}

@@ -93,0 +92,0 @@ },

Sorry, the diff of this file is not supported yet

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